@intlayer/ai 7.5.2-canary.1 → 7.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/assets/auditDictionaryMetadata/EXAMPLE_REQUEST.md +21 -0
  2. package/dist/assets/auditDictionaryMetadata/EXAMPLE_RESPONSE.md +1 -0
  3. package/dist/assets/auditDictionaryMetadata/PROMPT.md +0 -41
  4. package/dist/assets/translateJSON/PROMPT.md +25 -29
  5. package/dist/cjs/aiSdk.cjs +1 -1
  6. package/dist/cjs/aiSdk.cjs.map +1 -1
  7. package/dist/cjs/auditDictionaryMetadata/index.cjs +30 -15
  8. package/dist/cjs/auditDictionaryMetadata/index.cjs.map +1 -1
  9. package/dist/cjs/index.cjs +1 -1
  10. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/errors.cjs +30 -0
  11. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/errors.cjs.map +1 -0
  12. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/iso.cjs +41 -0
  13. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/iso.cjs.map +1 -0
  14. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/parse.cjs +31 -0
  15. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/parse.cjs.map +1 -0
  16. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/schemas.cjs +577 -0
  17. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
  18. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/api.cjs +535 -0
  19. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/api.cjs.map +1 -0
  20. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/checks.cjs +376 -0
  21. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/checks.cjs.map +1 -0
  22. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/core.cjs +67 -0
  23. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/core.cjs.map +1 -0
  24. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/doc.cjs +35 -0
  25. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/doc.cjs.map +1 -0
  26. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/errors.cjs +66 -0
  27. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/errors.cjs.map +1 -0
  28. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/json-schema-processors.cjs +239 -0
  29. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -0
  30. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/parse.cjs +123 -0
  31. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/parse.cjs.map +1 -0
  32. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/regexes.cjs +88 -0
  33. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/regexes.cjs.map +1 -0
  34. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/registries.cjs +54 -0
  35. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/registries.cjs.map +1 -0
  36. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/schemas.cjs +1048 -0
  37. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/schemas.cjs.map +1 -0
  38. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/to-json-schema.cjs +263 -0
  39. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -0
  40. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/util.cjs +350 -0
  41. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/util.cjs.map +1 -0
  42. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/versions.cjs +11 -0
  43. package/dist/cjs/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/versions.cjs.map +1 -0
  44. package/dist/cjs/translateJSON/index.cjs +29 -6
  45. package/dist/cjs/translateJSON/index.cjs.map +1 -1
  46. package/dist/esm/aiSdk.mjs +1 -1
  47. package/dist/esm/aiSdk.mjs.map +1 -1
  48. package/dist/esm/auditDictionaryMetadata/index.mjs +31 -16
  49. package/dist/esm/auditDictionaryMetadata/index.mjs.map +1 -1
  50. package/dist/esm/index.mjs +1 -1
  51. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/errors.mjs +30 -0
  52. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/errors.mjs.map +1 -0
  53. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/iso.mjs +38 -0
  54. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/iso.mjs.map +1 -0
  55. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/parse.mjs +20 -0
  56. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/parse.mjs.map +1 -0
  57. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/schemas.mjs +571 -0
  58. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/schemas.mjs.map +1 -0
  59. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/api.mjs +478 -0
  60. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/api.mjs.map +1 -0
  61. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/checks.mjs +361 -0
  62. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/checks.mjs.map +1 -0
  63. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/core.mjs +62 -0
  64. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/core.mjs.map +1 -0
  65. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/doc.mjs +34 -0
  66. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/doc.mjs.map +1 -0
  67. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/errors.mjs +63 -0
  68. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/errors.mjs.map +1 -0
  69. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/json-schema-processors.mjs +219 -0
  70. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/json-schema-processors.mjs.map +1 -0
  71. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/parse.mjs +110 -0
  72. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/parse.mjs.map +1 -0
  73. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/regexes.mjs +61 -0
  74. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/regexes.mjs.map +1 -0
  75. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/registries.mjs +53 -0
  76. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/registries.mjs.map +1 -0
  77. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/schemas.mjs +1002 -0
  78. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/schemas.mjs.map +1 -0
  79. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/to-json-schema.mjs +261 -0
  80. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/to-json-schema.mjs.map +1 -0
  81. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/util.mjs +317 -0
  82. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/util.mjs.map +1 -0
  83. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/versions.mjs +10 -0
  84. package/dist/esm/node_modules/.bun/zod@4.2.1/node_modules/zod/v4/core/versions.mjs.map +1 -0
  85. package/dist/esm/translateJSON/index.mjs +30 -7
  86. package/dist/esm/translateJSON/index.mjs.map +1 -1
  87. package/dist/types/translateJSON/index.d.ts +7 -7
  88. package/dist/types/translateJSON/index.d.ts.map +1 -1
  89. package/package.json +5 -5
@@ -0,0 +1,571 @@
1
+ import { $ZodEncodeError, $constructor } from "../core/core.mjs";
2
+ import { clone, defineLazy, extend, issue, merge, mergeDefs, normalizeParams, omit, partial, pick, required, safeExtend, shallowClone } from "../core/util.mjs";
3
+ import { $ZodAny, $ZodArray, $ZodBase64, $ZodBase64URL, $ZodBoolean, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodE164, $ZodEmail, $ZodEmoji, $ZodEnum, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodNanoID, $ZodNever, $ZodNonOptional, $ZodNullable, $ZodNumber, $ZodNumberFormat, $ZodObjectJIT, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodUnknown, $ZodXID } from "../core/schemas.mjs";
4
+ import { globalRegistry } from "../core/registries.mjs";
5
+ import { _any, _array, _base64, _base64url, _boolean, _cidrv4, _cidrv6, _cuid, _cuid2, _e164, _email, _emoji, _endsWith, _gt, _gte, _guid, _includes, _int, _ipv4, _ipv6, _jwt, _ksuid, _length, _lowercase, _lt, _lte, _maxLength, _minLength, _multipleOf, _nanoid, _never, _normalize, _number, _overwrite, _refine, _regex, _slugify, _startsWith, _string, _superRefine, _toLowerCase, _toUpperCase, _trim, _ulid, _unknown, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _xid, describe as describe$1, meta as meta$1 } from "../core/api.mjs";
6
+ import { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from "../core/to-json-schema.mjs";
7
+ import { anyProcessor, arrayProcessor, booleanProcessor, catchProcessor, customProcessor, defaultProcessor, enumProcessor, intersectionProcessor, neverProcessor, nonoptionalProcessor, nullableProcessor, numberProcessor, objectProcessor, optionalProcessor, pipeProcessor, prefaultProcessor, readonlyProcessor, stringProcessor, transformProcessor, unionProcessor, unknownProcessor } from "../core/json-schema-processors.mjs";
8
+ import { date, datetime, duration, time } from "./iso.mjs";
9
+ import { decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync } from "./parse.mjs";
10
+
11
+ //#region ../../../node_modules/.bun/zod@4.2.1/node_modules/zod/v4/classic/schemas.js
12
+ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13
+ $ZodType.init(inst, def);
14
+ Object.assign(inst["~standard"], { jsonSchema: {
15
+ input: createStandardJSONSchemaMethod(inst, "input"),
16
+ output: createStandardJSONSchemaMethod(inst, "output")
17
+ } });
18
+ inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
19
+ inst.def = def;
20
+ inst.type = def.type;
21
+ Object.defineProperty(inst, "_def", { value: def });
22
+ inst.check = (...checks) => {
23
+ return inst.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === "function" ? { _zod: {
24
+ check: ch,
25
+ def: { check: "custom" },
26
+ onattach: []
27
+ } } : ch)] }));
28
+ };
29
+ inst.clone = (def$1, params) => clone(inst, def$1, params);
30
+ inst.brand = () => inst;
31
+ inst.register = ((reg, meta$2) => {
32
+ reg.add(inst, meta$2);
33
+ return inst;
34
+ });
35
+ inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
36
+ inst.safeParse = (data, params) => safeParse(inst, data, params);
37
+ inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
38
+ inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
39
+ inst.spa = inst.safeParseAsync;
40
+ inst.encode = (data, params) => encode(inst, data, params);
41
+ inst.decode = (data, params) => decode(inst, data, params);
42
+ inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
43
+ inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
44
+ inst.safeEncode = (data, params) => safeEncode(inst, data, params);
45
+ inst.safeDecode = (data, params) => safeDecode(inst, data, params);
46
+ inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
47
+ inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
48
+ inst.refine = (check, params) => inst.check(refine(check, params));
49
+ inst.superRefine = (refinement) => inst.check(superRefine(refinement));
50
+ inst.overwrite = (fn) => inst.check(_overwrite(fn));
51
+ inst.optional = () => optional(inst);
52
+ inst.nullable = () => nullable(inst);
53
+ inst.nullish = () => optional(nullable(inst));
54
+ inst.nonoptional = (params) => nonoptional(inst, params);
55
+ inst.array = () => array(inst);
56
+ inst.or = (arg) => union([inst, arg]);
57
+ inst.and = (arg) => intersection(inst, arg);
58
+ inst.transform = (tx) => pipe(inst, transform(tx));
59
+ inst.default = (def$1) => _default(inst, def$1);
60
+ inst.prefault = (def$1) => prefault(inst, def$1);
61
+ inst.catch = (params) => _catch(inst, params);
62
+ inst.pipe = (target) => pipe(inst, target);
63
+ inst.readonly = () => readonly(inst);
64
+ inst.describe = (description) => {
65
+ const cl = inst.clone();
66
+ globalRegistry.add(cl, { description });
67
+ return cl;
68
+ };
69
+ Object.defineProperty(inst, "description", {
70
+ get() {
71
+ return globalRegistry.get(inst)?.description;
72
+ },
73
+ configurable: true
74
+ });
75
+ inst.meta = (...args) => {
76
+ if (args.length === 0) return globalRegistry.get(inst);
77
+ const cl = inst.clone();
78
+ globalRegistry.add(cl, args[0]);
79
+ return cl;
80
+ };
81
+ inst.isOptional = () => inst.safeParse(void 0).success;
82
+ inst.isNullable = () => inst.safeParse(null).success;
83
+ return inst;
84
+ });
85
+ /** @internal */
86
+ const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
87
+ $ZodString.init(inst, def);
88
+ ZodType.init(inst, def);
89
+ inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
90
+ const bag = inst._zod.bag;
91
+ inst.format = bag.format ?? null;
92
+ inst.minLength = bag.minimum ?? null;
93
+ inst.maxLength = bag.maximum ?? null;
94
+ inst.regex = (...args) => inst.check(_regex(...args));
95
+ inst.includes = (...args) => inst.check(_includes(...args));
96
+ inst.startsWith = (...args) => inst.check(_startsWith(...args));
97
+ inst.endsWith = (...args) => inst.check(_endsWith(...args));
98
+ inst.min = (...args) => inst.check(_minLength(...args));
99
+ inst.max = (...args) => inst.check(_maxLength(...args));
100
+ inst.length = (...args) => inst.check(_length(...args));
101
+ inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
102
+ inst.lowercase = (params) => inst.check(_lowercase(params));
103
+ inst.uppercase = (params) => inst.check(_uppercase(params));
104
+ inst.trim = () => inst.check(_trim());
105
+ inst.normalize = (...args) => inst.check(_normalize(...args));
106
+ inst.toLowerCase = () => inst.check(_toLowerCase());
107
+ inst.toUpperCase = () => inst.check(_toUpperCase());
108
+ inst.slugify = () => inst.check(_slugify());
109
+ });
110
+ const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
111
+ $ZodString.init(inst, def);
112
+ _ZodString.init(inst, def);
113
+ inst.email = (params) => inst.check(_email(ZodEmail, params));
114
+ inst.url = (params) => inst.check(_url(ZodURL, params));
115
+ inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
116
+ inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
117
+ inst.guid = (params) => inst.check(_guid(ZodGUID, params));
118
+ inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
119
+ inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
120
+ inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
121
+ inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
122
+ inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
123
+ inst.guid = (params) => inst.check(_guid(ZodGUID, params));
124
+ inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
125
+ inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
126
+ inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
127
+ inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
128
+ inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
129
+ inst.xid = (params) => inst.check(_xid(ZodXID, params));
130
+ inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
131
+ inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
132
+ inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
133
+ inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
134
+ inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
135
+ inst.e164 = (params) => inst.check(_e164(ZodE164, params));
136
+ inst.datetime = (params) => inst.check(datetime(params));
137
+ inst.date = (params) => inst.check(date(params));
138
+ inst.time = (params) => inst.check(time(params));
139
+ inst.duration = (params) => inst.check(duration(params));
140
+ });
141
+ function string(params) {
142
+ return _string(ZodString, params);
143
+ }
144
+ const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
145
+ $ZodStringFormat.init(inst, def);
146
+ _ZodString.init(inst, def);
147
+ });
148
+ const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
149
+ $ZodEmail.init(inst, def);
150
+ ZodStringFormat.init(inst, def);
151
+ });
152
+ const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
153
+ $ZodGUID.init(inst, def);
154
+ ZodStringFormat.init(inst, def);
155
+ });
156
+ const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
157
+ $ZodUUID.init(inst, def);
158
+ ZodStringFormat.init(inst, def);
159
+ });
160
+ const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
161
+ $ZodURL.init(inst, def);
162
+ ZodStringFormat.init(inst, def);
163
+ });
164
+ const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
165
+ $ZodEmoji.init(inst, def);
166
+ ZodStringFormat.init(inst, def);
167
+ });
168
+ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
169
+ $ZodNanoID.init(inst, def);
170
+ ZodStringFormat.init(inst, def);
171
+ });
172
+ const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
173
+ $ZodCUID.init(inst, def);
174
+ ZodStringFormat.init(inst, def);
175
+ });
176
+ const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
177
+ $ZodCUID2.init(inst, def);
178
+ ZodStringFormat.init(inst, def);
179
+ });
180
+ const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
181
+ $ZodULID.init(inst, def);
182
+ ZodStringFormat.init(inst, def);
183
+ });
184
+ const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
185
+ $ZodXID.init(inst, def);
186
+ ZodStringFormat.init(inst, def);
187
+ });
188
+ const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
189
+ $ZodKSUID.init(inst, def);
190
+ ZodStringFormat.init(inst, def);
191
+ });
192
+ const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
193
+ $ZodIPv4.init(inst, def);
194
+ ZodStringFormat.init(inst, def);
195
+ });
196
+ const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
197
+ $ZodIPv6.init(inst, def);
198
+ ZodStringFormat.init(inst, def);
199
+ });
200
+ const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
201
+ $ZodCIDRv4.init(inst, def);
202
+ ZodStringFormat.init(inst, def);
203
+ });
204
+ const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
205
+ $ZodCIDRv6.init(inst, def);
206
+ ZodStringFormat.init(inst, def);
207
+ });
208
+ const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
209
+ $ZodBase64.init(inst, def);
210
+ ZodStringFormat.init(inst, def);
211
+ });
212
+ const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
213
+ $ZodBase64URL.init(inst, def);
214
+ ZodStringFormat.init(inst, def);
215
+ });
216
+ const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
217
+ $ZodE164.init(inst, def);
218
+ ZodStringFormat.init(inst, def);
219
+ });
220
+ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
221
+ $ZodJWT.init(inst, def);
222
+ ZodStringFormat.init(inst, def);
223
+ });
224
+ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
225
+ $ZodNumber.init(inst, def);
226
+ ZodType.init(inst, def);
227
+ inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
228
+ inst.gt = (value, params) => inst.check(_gt(value, params));
229
+ inst.gte = (value, params) => inst.check(_gte(value, params));
230
+ inst.min = (value, params) => inst.check(_gte(value, params));
231
+ inst.lt = (value, params) => inst.check(_lt(value, params));
232
+ inst.lte = (value, params) => inst.check(_lte(value, params));
233
+ inst.max = (value, params) => inst.check(_lte(value, params));
234
+ inst.int = (params) => inst.check(int(params));
235
+ inst.safe = (params) => inst.check(int(params));
236
+ inst.positive = (params) => inst.check(_gt(0, params));
237
+ inst.nonnegative = (params) => inst.check(_gte(0, params));
238
+ inst.negative = (params) => inst.check(_lt(0, params));
239
+ inst.nonpositive = (params) => inst.check(_lte(0, params));
240
+ inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
241
+ inst.step = (value, params) => inst.check(_multipleOf(value, params));
242
+ inst.finite = () => inst;
243
+ const bag = inst._zod.bag;
244
+ inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
245
+ inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
246
+ inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? .5);
247
+ inst.isFinite = true;
248
+ inst.format = bag.format ?? null;
249
+ });
250
+ function number(params) {
251
+ return _number(ZodNumber, params);
252
+ }
253
+ const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
254
+ $ZodNumberFormat.init(inst, def);
255
+ ZodNumber.init(inst, def);
256
+ });
257
+ function int(params) {
258
+ return _int(ZodNumberFormat, params);
259
+ }
260
+ const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
261
+ $ZodBoolean.init(inst, def);
262
+ ZodType.init(inst, def);
263
+ inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
264
+ });
265
+ function boolean(params) {
266
+ return _boolean(ZodBoolean, params);
267
+ }
268
+ const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
269
+ $ZodAny.init(inst, def);
270
+ ZodType.init(inst, def);
271
+ inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor(inst, ctx, json, params);
272
+ });
273
+ function any() {
274
+ return _any(ZodAny);
275
+ }
276
+ const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
277
+ $ZodUnknown.init(inst, def);
278
+ ZodType.init(inst, def);
279
+ inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
280
+ });
281
+ function unknown() {
282
+ return _unknown(ZodUnknown);
283
+ }
284
+ const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
285
+ $ZodNever.init(inst, def);
286
+ ZodType.init(inst, def);
287
+ inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
288
+ });
289
+ function never(params) {
290
+ return _never(ZodNever, params);
291
+ }
292
+ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
293
+ $ZodArray.init(inst, def);
294
+ ZodType.init(inst, def);
295
+ inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
296
+ inst.element = def.element;
297
+ inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
298
+ inst.nonempty = (params) => inst.check(_minLength(1, params));
299
+ inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
300
+ inst.length = (len, params) => inst.check(_length(len, params));
301
+ inst.unwrap = () => inst.element;
302
+ });
303
+ function array(element, params) {
304
+ return _array(ZodArray, element, params);
305
+ }
306
+ const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
307
+ $ZodObjectJIT.init(inst, def);
308
+ ZodType.init(inst, def);
309
+ inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
310
+ defineLazy(inst, "shape", () => {
311
+ return def.shape;
312
+ });
313
+ inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
314
+ inst.catchall = (catchall) => inst.clone({
315
+ ...inst._zod.def,
316
+ catchall
317
+ });
318
+ inst.passthrough = () => inst.clone({
319
+ ...inst._zod.def,
320
+ catchall: unknown()
321
+ });
322
+ inst.loose = () => inst.clone({
323
+ ...inst._zod.def,
324
+ catchall: unknown()
325
+ });
326
+ inst.strict = () => inst.clone({
327
+ ...inst._zod.def,
328
+ catchall: never()
329
+ });
330
+ inst.strip = () => inst.clone({
331
+ ...inst._zod.def,
332
+ catchall: void 0
333
+ });
334
+ inst.extend = (incoming) => {
335
+ return extend(inst, incoming);
336
+ };
337
+ inst.safeExtend = (incoming) => {
338
+ return safeExtend(inst, incoming);
339
+ };
340
+ inst.merge = (other) => merge(inst, other);
341
+ inst.pick = (mask) => pick(inst, mask);
342
+ inst.omit = (mask) => omit(inst, mask);
343
+ inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
344
+ inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
345
+ });
346
+ function object(shape, params) {
347
+ return new ZodObject({
348
+ type: "object",
349
+ shape: shape ?? {},
350
+ ...normalizeParams(params)
351
+ });
352
+ }
353
+ const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
354
+ $ZodUnion.init(inst, def);
355
+ ZodType.init(inst, def);
356
+ inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
357
+ inst.options = def.options;
358
+ });
359
+ function union(options, params) {
360
+ return new ZodUnion({
361
+ type: "union",
362
+ options,
363
+ ...normalizeParams(params)
364
+ });
365
+ }
366
+ const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
367
+ $ZodIntersection.init(inst, def);
368
+ ZodType.init(inst, def);
369
+ inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
370
+ });
371
+ function intersection(left, right) {
372
+ return new ZodIntersection({
373
+ type: "intersection",
374
+ left,
375
+ right
376
+ });
377
+ }
378
+ const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
379
+ $ZodEnum.init(inst, def);
380
+ ZodType.init(inst, def);
381
+ inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
382
+ inst.enum = def.entries;
383
+ inst.options = Object.values(def.entries);
384
+ const keys = new Set(Object.keys(def.entries));
385
+ inst.extract = (values, params) => {
386
+ const newEntries = {};
387
+ for (const value of values) if (keys.has(value)) newEntries[value] = def.entries[value];
388
+ else throw new Error(`Key ${value} not found in enum`);
389
+ return new ZodEnum({
390
+ ...def,
391
+ checks: [],
392
+ ...normalizeParams(params),
393
+ entries: newEntries
394
+ });
395
+ };
396
+ inst.exclude = (values, params) => {
397
+ const newEntries = { ...def.entries };
398
+ for (const value of values) if (keys.has(value)) delete newEntries[value];
399
+ else throw new Error(`Key ${value} not found in enum`);
400
+ return new ZodEnum({
401
+ ...def,
402
+ checks: [],
403
+ ...normalizeParams(params),
404
+ entries: newEntries
405
+ });
406
+ };
407
+ });
408
+ function _enum(values, params) {
409
+ return new ZodEnum({
410
+ type: "enum",
411
+ entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,
412
+ ...normalizeParams(params)
413
+ });
414
+ }
415
+ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
416
+ $ZodTransform.init(inst, def);
417
+ ZodType.init(inst, def);
418
+ inst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);
419
+ inst._zod.parse = (payload, _ctx) => {
420
+ if (_ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
421
+ payload.addIssue = (issue$1) => {
422
+ if (typeof issue$1 === "string") payload.issues.push(issue(issue$1, payload.value, def));
423
+ else {
424
+ const _issue = issue$1;
425
+ if (_issue.fatal) _issue.continue = false;
426
+ _issue.code ?? (_issue.code = "custom");
427
+ _issue.input ?? (_issue.input = payload.value);
428
+ _issue.inst ?? (_issue.inst = inst);
429
+ payload.issues.push(issue(_issue));
430
+ }
431
+ };
432
+ const output = def.transform(payload.value, payload);
433
+ if (output instanceof Promise) return output.then((output$1) => {
434
+ payload.value = output$1;
435
+ return payload;
436
+ });
437
+ payload.value = output;
438
+ return payload;
439
+ };
440
+ });
441
+ function transform(fn) {
442
+ return new ZodTransform({
443
+ type: "transform",
444
+ transform: fn
445
+ });
446
+ }
447
+ const ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
448
+ $ZodOptional.init(inst, def);
449
+ ZodType.init(inst, def);
450
+ inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
451
+ inst.unwrap = () => inst._zod.def.innerType;
452
+ });
453
+ function optional(innerType) {
454
+ return new ZodOptional({
455
+ type: "optional",
456
+ innerType
457
+ });
458
+ }
459
+ const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
460
+ $ZodNullable.init(inst, def);
461
+ ZodType.init(inst, def);
462
+ inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
463
+ inst.unwrap = () => inst._zod.def.innerType;
464
+ });
465
+ function nullable(innerType) {
466
+ return new ZodNullable({
467
+ type: "nullable",
468
+ innerType
469
+ });
470
+ }
471
+ const ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
472
+ $ZodDefault.init(inst, def);
473
+ ZodType.init(inst, def);
474
+ inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
475
+ inst.unwrap = () => inst._zod.def.innerType;
476
+ inst.removeDefault = inst.unwrap;
477
+ });
478
+ function _default(innerType, defaultValue) {
479
+ return new ZodDefault({
480
+ type: "default",
481
+ innerType,
482
+ get defaultValue() {
483
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
484
+ }
485
+ });
486
+ }
487
+ const ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
488
+ $ZodPrefault.init(inst, def);
489
+ ZodType.init(inst, def);
490
+ inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
491
+ inst.unwrap = () => inst._zod.def.innerType;
492
+ });
493
+ function prefault(innerType, defaultValue) {
494
+ return new ZodPrefault({
495
+ type: "prefault",
496
+ innerType,
497
+ get defaultValue() {
498
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
499
+ }
500
+ });
501
+ }
502
+ const ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
503
+ $ZodNonOptional.init(inst, def);
504
+ ZodType.init(inst, def);
505
+ inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
506
+ inst.unwrap = () => inst._zod.def.innerType;
507
+ });
508
+ function nonoptional(innerType, params) {
509
+ return new ZodNonOptional({
510
+ type: "nonoptional",
511
+ innerType,
512
+ ...normalizeParams(params)
513
+ });
514
+ }
515
+ const ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
516
+ $ZodCatch.init(inst, def);
517
+ ZodType.init(inst, def);
518
+ inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
519
+ inst.unwrap = () => inst._zod.def.innerType;
520
+ inst.removeCatch = inst.unwrap;
521
+ });
522
+ function _catch(innerType, catchValue) {
523
+ return new ZodCatch({
524
+ type: "catch",
525
+ innerType,
526
+ catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
527
+ });
528
+ }
529
+ const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
530
+ $ZodPipe.init(inst, def);
531
+ ZodType.init(inst, def);
532
+ inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
533
+ inst.in = def.in;
534
+ inst.out = def.out;
535
+ });
536
+ function pipe(in_, out) {
537
+ return new ZodPipe({
538
+ type: "pipe",
539
+ in: in_,
540
+ out
541
+ });
542
+ }
543
+ const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
544
+ $ZodReadonly.init(inst, def);
545
+ ZodType.init(inst, def);
546
+ inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
547
+ inst.unwrap = () => inst._zod.def.innerType;
548
+ });
549
+ function readonly(innerType) {
550
+ return new ZodReadonly({
551
+ type: "readonly",
552
+ innerType
553
+ });
554
+ }
555
+ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
556
+ $ZodCustom.init(inst, def);
557
+ ZodType.init(inst, def);
558
+ inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
559
+ });
560
+ function refine(fn, _params = {}) {
561
+ return _refine(ZodCustom, fn, _params);
562
+ }
563
+ function superRefine(fn) {
564
+ return _superRefine(fn);
565
+ }
566
+ const describe = describe$1;
567
+ const meta = meta$1;
568
+
569
+ //#endregion
570
+ export { ZodStringFormat, any, array, boolean, number, object, string };
571
+ //# sourceMappingURL=schemas.mjs.map