@settlemint/sdk-viem 2.4.1-prb593b885 → 2.4.1-prc7777fc9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/viem.js +685 -1024
- package/dist/browser/viem.js.map +1 -1
- package/dist/viem.cjs +685 -1024
- package/dist/viem.cjs.map +1 -1
- package/dist/viem.js +685 -1024
- package/dist/viem.js.map +1 -1
- package/package.json +2 -2
package/dist/viem.cjs
CHANGED
|
@@ -34,9 +34,7 @@ const __settlemint_sdk_utils_validation = __toESM(require("@settlemint/sdk-utils
|
|
|
34
34
|
const viem = __toESM(require("viem"));
|
|
35
35
|
const viem_chains = __toESM(require("viem/chains"));
|
|
36
36
|
|
|
37
|
-
//#region ../../node_modules/zod/v4/core/core.js
|
|
38
|
-
/** A special constant with type `never` */
|
|
39
|
-
const NEVER = Object.freeze({ status: "aborted" });
|
|
37
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/core.js
|
|
40
38
|
function $constructor(name, initializer$2, params) {
|
|
41
39
|
function init(inst, def) {
|
|
42
40
|
var _a;
|
|
@@ -87,7 +85,7 @@ function config(newConfig) {
|
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
//#endregion
|
|
90
|
-
//#region ../../node_modules/zod/v4/core/util.js
|
|
88
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/util.js
|
|
91
89
|
var util_exports = {};
|
|
92
90
|
__export(util_exports, {
|
|
93
91
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -102,7 +100,6 @@ __export(util_exports, {
|
|
|
102
100
|
assertNotEqual: () => assertNotEqual,
|
|
103
101
|
assignProp: () => assignProp,
|
|
104
102
|
cached: () => cached,
|
|
105
|
-
captureStackTrace: () => captureStackTrace,
|
|
106
103
|
cleanEnum: () => cleanEnum,
|
|
107
104
|
cleanRegex: () => cleanRegex,
|
|
108
105
|
clone: () => clone,
|
|
@@ -241,14 +238,10 @@ function randomString(length = 10) {
|
|
|
241
238
|
function esc(str) {
|
|
242
239
|
return JSON.stringify(str);
|
|
243
240
|
}
|
|
244
|
-
const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
|
|
245
241
|
function isObject(data) {
|
|
246
242
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
247
243
|
}
|
|
248
244
|
const allowsEval = cached(() => {
|
|
249
|
-
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
245
|
try {
|
|
253
246
|
const F = Function;
|
|
254
247
|
new F("");
|
|
@@ -257,6 +250,9 @@ const allowsEval = cached(() => {
|
|
|
257
250
|
return false;
|
|
258
251
|
}
|
|
259
252
|
});
|
|
253
|
+
function _isObject(o) {
|
|
254
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
255
|
+
}
|
|
260
256
|
function isPlainObject(o) {
|
|
261
257
|
if (isObject(o) === false) return false;
|
|
262
258
|
const ctor = o.constructor;
|
|
@@ -436,9 +432,6 @@ function omit(schema, mask) {
|
|
|
436
432
|
});
|
|
437
433
|
}
|
|
438
434
|
function extend(schema, shape) {
|
|
439
|
-
if (!isPlainObject(shape)) {
|
|
440
|
-
throw new Error("Invalid input to extend: expected a plain object");
|
|
441
|
-
}
|
|
442
435
|
const def = {
|
|
443
436
|
...schema._zod.def,
|
|
444
437
|
get shape() {
|
|
@@ -526,7 +519,7 @@ function required(Class$1, schema, mask) {
|
|
|
526
519
|
}
|
|
527
520
|
function aborted(x, startIndex = 0) {
|
|
528
521
|
for (let i = startIndex; i < x.issues.length; i++) {
|
|
529
|
-
if (x.issues[i]
|
|
522
|
+
if (x.issues[i].continue !== true) return true;
|
|
530
523
|
}
|
|
531
524
|
return false;
|
|
532
525
|
}
|
|
@@ -590,7 +583,7 @@ var Class = class {
|
|
|
590
583
|
};
|
|
591
584
|
|
|
592
585
|
//#endregion
|
|
593
|
-
//#region ../../node_modules/zod/v4/core/errors.js
|
|
586
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/errors.js
|
|
594
587
|
const initializer$1 = (inst, def) => {
|
|
595
588
|
inst.name = "$ZodError";
|
|
596
589
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -607,17 +600,13 @@ const initializer$1 = (inst, def) => {
|
|
|
607
600
|
},
|
|
608
601
|
enumerable: true
|
|
609
602
|
});
|
|
610
|
-
Object.defineProperty(inst, "toString", {
|
|
611
|
-
value: () => inst.message,
|
|
612
|
-
enumerable: false
|
|
613
|
-
});
|
|
614
603
|
};
|
|
615
604
|
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
616
605
|
const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
|
|
617
|
-
function flattenError(error$
|
|
606
|
+
function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
|
|
618
607
|
const fieldErrors = {};
|
|
619
608
|
const formErrors = [];
|
|
620
|
-
for (const sub of error$
|
|
609
|
+
for (const sub of error$37.issues) {
|
|
621
610
|
if (sub.path.length > 0) {
|
|
622
611
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
623
612
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -630,13 +619,13 @@ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
|
|
|
630
619
|
fieldErrors
|
|
631
620
|
};
|
|
632
621
|
}
|
|
633
|
-
function formatError(error$
|
|
622
|
+
function formatError(error$37, _mapper) {
|
|
634
623
|
const mapper = _mapper || function(issue$1) {
|
|
635
624
|
return issue$1.message;
|
|
636
625
|
};
|
|
637
626
|
const fieldErrors = { _errors: [] };
|
|
638
|
-
const processError = (error$
|
|
639
|
-
for (const issue$1 of error$
|
|
627
|
+
const processError = (error$38) => {
|
|
628
|
+
for (const issue$1 of error$38.issues) {
|
|
640
629
|
if (issue$1.code === "invalid_union" && issue$1.errors.length) {
|
|
641
630
|
issue$1.errors.map((issues) => processError({ issues }));
|
|
642
631
|
} else if (issue$1.code === "invalid_key") {
|
|
@@ -663,17 +652,17 @@ function formatError(error$39, _mapper) {
|
|
|
663
652
|
}
|
|
664
653
|
}
|
|
665
654
|
};
|
|
666
|
-
processError(error$
|
|
655
|
+
processError(error$37);
|
|
667
656
|
return fieldErrors;
|
|
668
657
|
}
|
|
669
|
-
function treeifyError(error$
|
|
658
|
+
function treeifyError(error$37, _mapper) {
|
|
670
659
|
const mapper = _mapper || function(issue$1) {
|
|
671
660
|
return issue$1.message;
|
|
672
661
|
};
|
|
673
662
|
const result = { errors: [] };
|
|
674
|
-
const processError = (error$
|
|
663
|
+
const processError = (error$38, path = []) => {
|
|
675
664
|
var _a, _b;
|
|
676
|
-
for (const issue$1 of error$
|
|
665
|
+
for (const issue$1 of error$38.issues) {
|
|
677
666
|
if (issue$1.code === "invalid_union" && issue$1.errors.length) {
|
|
678
667
|
issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
|
|
679
668
|
} else if (issue$1.code === "invalid_key") {
|
|
@@ -708,7 +697,7 @@ function treeifyError(error$39, _mapper) {
|
|
|
708
697
|
}
|
|
709
698
|
}
|
|
710
699
|
};
|
|
711
|
-
processError(error$
|
|
700
|
+
processError(error$37);
|
|
712
701
|
return result;
|
|
713
702
|
}
|
|
714
703
|
/** Format a ZodError as a human-readable string in the following form.
|
|
@@ -756,9 +745,9 @@ function toDotPath(path) {
|
|
|
756
745
|
}
|
|
757
746
|
return segs.join("");
|
|
758
747
|
}
|
|
759
|
-
function prettifyError(error$
|
|
748
|
+
function prettifyError(error$37) {
|
|
760
749
|
const lines = [];
|
|
761
|
-
const issues = [...error$
|
|
750
|
+
const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
|
|
762
751
|
for (const issue$1 of issues) {
|
|
763
752
|
lines.push(`✖ ${issue$1.message}`);
|
|
764
753
|
if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
|
|
@@ -767,7 +756,7 @@ function prettifyError(error$39) {
|
|
|
767
756
|
}
|
|
768
757
|
|
|
769
758
|
//#endregion
|
|
770
|
-
//#region ../../node_modules/zod/v4/core/parse.js
|
|
759
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/parse.js
|
|
771
760
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
772
761
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
773
762
|
const result = schema._zod.run({
|
|
@@ -779,7 +768,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
779
768
|
}
|
|
780
769
|
if (result.issues.length) {
|
|
781
770
|
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
782
|
-
captureStackTrace(e, _params?.callee);
|
|
771
|
+
Error.captureStackTrace(e, _params?.callee);
|
|
783
772
|
throw e;
|
|
784
773
|
}
|
|
785
774
|
return result.value;
|
|
@@ -794,7 +783,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
794
783
|
if (result instanceof Promise) result = await result;
|
|
795
784
|
if (result.issues.length) {
|
|
796
785
|
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
797
|
-
captureStackTrace(e, params?.callee);
|
|
786
|
+
Error.captureStackTrace(e, params?.callee);
|
|
798
787
|
throw e;
|
|
799
788
|
}
|
|
800
789
|
return result.value;
|
|
@@ -839,9 +828,10 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
839
828
|
const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
840
829
|
|
|
841
830
|
//#endregion
|
|
842
|
-
//#region ../../node_modules/zod/v4/core/regexes.js
|
|
831
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
|
|
843
832
|
var regexes_exports = {};
|
|
844
833
|
__export(regexes_exports, {
|
|
834
|
+
_emoji: () => _emoji$1,
|
|
845
835
|
base64: () => base64$1,
|
|
846
836
|
base64url: () => base64url$1,
|
|
847
837
|
bigint: () => bigint$2,
|
|
@@ -927,23 +917,27 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
|
|
|
927
917
|
const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
|
|
928
918
|
const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
929
919
|
const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
930
|
-
const dateSource = `(
|
|
920
|
+
const 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])))`;
|
|
931
921
|
const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
932
922
|
function timeSource(args) {
|
|
933
|
-
|
|
934
|
-
|
|
923
|
+
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
|
|
924
|
+
if (args.precision) {
|
|
925
|
+
regex = `${regex}\\.\\d{${args.precision}}`;
|
|
926
|
+
} else if (args.precision == null) {
|
|
927
|
+
regex = `${regex}(\\.\\d+)?`;
|
|
928
|
+
}
|
|
935
929
|
return regex;
|
|
936
930
|
}
|
|
937
931
|
function time$1(args) {
|
|
938
932
|
return new RegExp(`^${timeSource(args)}$`);
|
|
939
933
|
}
|
|
940
934
|
function datetime$1(args) {
|
|
941
|
-
|
|
942
|
-
const opts = [
|
|
943
|
-
|
|
944
|
-
if (args.offset) opts.push(`([+-]\\d{2}
|
|
945
|
-
|
|
946
|
-
return new RegExp(`^${
|
|
935
|
+
let regex = `${dateSource}T${timeSource(args)}`;
|
|
936
|
+
const opts = [];
|
|
937
|
+
opts.push(args.local ? `Z?` : `Z`);
|
|
938
|
+
if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
|
|
939
|
+
regex = `${regex}(${opts.join("|")})`;
|
|
940
|
+
return new RegExp(`^${regex}$`);
|
|
947
941
|
}
|
|
948
942
|
const string$2 = (params) => {
|
|
949
943
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
@@ -959,7 +953,7 @@ const lowercase = /^[^A-Z]*$/;
|
|
|
959
953
|
const uppercase = /^[^a-z]*$/;
|
|
960
954
|
|
|
961
955
|
//#endregion
|
|
962
|
-
//#region ../../node_modules/zod/v4/core/checks.js
|
|
956
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/checks.js
|
|
963
957
|
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
964
958
|
var _a;
|
|
965
959
|
inst._zod ?? (inst._zod = {});
|
|
@@ -1150,12 +1144,11 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
|
|
|
1150
1144
|
};
|
|
1151
1145
|
});
|
|
1152
1146
|
const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1153
|
-
var _a;
|
|
1154
1147
|
$ZodCheck.init(inst, def);
|
|
1155
|
-
|
|
1148
|
+
inst._zod.when = (payload) => {
|
|
1156
1149
|
const val = payload.value;
|
|
1157
1150
|
return !nullish$1(val) && val.size !== undefined;
|
|
1158
|
-
}
|
|
1151
|
+
};
|
|
1159
1152
|
inst._zod.onattach.push((inst$1) => {
|
|
1160
1153
|
const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
1161
1154
|
if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
|
|
@@ -1175,12 +1168,11 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
|
|
|
1175
1168
|
};
|
|
1176
1169
|
});
|
|
1177
1170
|
const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1178
|
-
var _a;
|
|
1179
1171
|
$ZodCheck.init(inst, def);
|
|
1180
|
-
|
|
1172
|
+
inst._zod.when = (payload) => {
|
|
1181
1173
|
const val = payload.value;
|
|
1182
1174
|
return !nullish$1(val) && val.size !== undefined;
|
|
1183
|
-
}
|
|
1175
|
+
};
|
|
1184
1176
|
inst._zod.onattach.push((inst$1) => {
|
|
1185
1177
|
const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
1186
1178
|
if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
|
|
@@ -1200,12 +1192,11 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
|
|
|
1200
1192
|
};
|
|
1201
1193
|
});
|
|
1202
1194
|
const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1203
|
-
var _a;
|
|
1204
1195
|
$ZodCheck.init(inst, def);
|
|
1205
|
-
|
|
1196
|
+
inst._zod.when = (payload) => {
|
|
1206
1197
|
const val = payload.value;
|
|
1207
1198
|
return !nullish$1(val) && val.size !== undefined;
|
|
1208
|
-
}
|
|
1199
|
+
};
|
|
1209
1200
|
inst._zod.onattach.push((inst$1) => {
|
|
1210
1201
|
const bag = inst$1._zod.bag;
|
|
1211
1202
|
bag.minimum = def.size;
|
|
@@ -1226,8 +1217,6 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
|
|
|
1226
1217
|
code: "too_small",
|
|
1227
1218
|
minimum: def.size
|
|
1228
1219
|
},
|
|
1229
|
-
inclusive: true,
|
|
1230
|
-
exact: true,
|
|
1231
1220
|
input: payload.value,
|
|
1232
1221
|
inst,
|
|
1233
1222
|
continue: !def.abort
|
|
@@ -1235,12 +1224,11 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
|
|
|
1235
1224
|
};
|
|
1236
1225
|
});
|
|
1237
1226
|
const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1238
|
-
var _a;
|
|
1239
1227
|
$ZodCheck.init(inst, def);
|
|
1240
|
-
|
|
1228
|
+
inst._zod.when = (payload) => {
|
|
1241
1229
|
const val = payload.value;
|
|
1242
1230
|
return !nullish$1(val) && val.length !== undefined;
|
|
1243
|
-
}
|
|
1231
|
+
};
|
|
1244
1232
|
inst._zod.onattach.push((inst$1) => {
|
|
1245
1233
|
const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
1246
1234
|
if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
|
|
@@ -1262,12 +1250,11 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
|
|
|
1262
1250
|
};
|
|
1263
1251
|
});
|
|
1264
1252
|
const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1265
|
-
var _a;
|
|
1266
1253
|
$ZodCheck.init(inst, def);
|
|
1267
|
-
|
|
1254
|
+
inst._zod.when = (payload) => {
|
|
1268
1255
|
const val = payload.value;
|
|
1269
1256
|
return !nullish$1(val) && val.length !== undefined;
|
|
1270
|
-
}
|
|
1257
|
+
};
|
|
1271
1258
|
inst._zod.onattach.push((inst$1) => {
|
|
1272
1259
|
const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
1273
1260
|
if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
|
|
@@ -1289,12 +1276,11 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
|
|
|
1289
1276
|
};
|
|
1290
1277
|
});
|
|
1291
1278
|
const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1292
|
-
var _a;
|
|
1293
1279
|
$ZodCheck.init(inst, def);
|
|
1294
|
-
|
|
1280
|
+
inst._zod.when = (payload) => {
|
|
1295
1281
|
const val = payload.value;
|
|
1296
1282
|
return !nullish$1(val) && val.length !== undefined;
|
|
1297
|
-
}
|
|
1283
|
+
};
|
|
1298
1284
|
inst._zod.onattach.push((inst$1) => {
|
|
1299
1285
|
const bag = inst$1._zod.bag;
|
|
1300
1286
|
bag.minimum = def.length;
|
|
@@ -1316,8 +1302,6 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
1316
1302
|
code: "too_small",
|
|
1317
1303
|
minimum: def.length
|
|
1318
1304
|
},
|
|
1319
|
-
inclusive: true,
|
|
1320
|
-
exact: true,
|
|
1321
1305
|
input: payload.value,
|
|
1322
1306
|
inst,
|
|
1323
1307
|
continue: !def.abort
|
|
@@ -1325,7 +1309,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
1325
1309
|
};
|
|
1326
1310
|
});
|
|
1327
1311
|
const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1328
|
-
var _a
|
|
1312
|
+
var _a;
|
|
1329
1313
|
$ZodCheck.init(inst, def);
|
|
1330
1314
|
inst._zod.onattach.push((inst$1) => {
|
|
1331
1315
|
const bag = inst$1._zod.bag;
|
|
@@ -1335,7 +1319,8 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
1335
1319
|
bag.patterns.add(def.pattern);
|
|
1336
1320
|
}
|
|
1337
1321
|
});
|
|
1338
|
-
|
|
1322
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
1323
|
+
if (!def.pattern) throw new Error("Not implemented.");
|
|
1339
1324
|
def.pattern.lastIndex = 0;
|
|
1340
1325
|
if (def.pattern.test(payload.value)) return;
|
|
1341
1326
|
payload.issues.push({
|
|
@@ -1348,7 +1333,6 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
1348
1333
|
continue: !def.abort
|
|
1349
1334
|
});
|
|
1350
1335
|
});
|
|
1351
|
-
else (_b = inst._zod).check ?? (_b.check = () => {});
|
|
1352
1336
|
});
|
|
1353
1337
|
const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
1354
1338
|
$ZodCheckStringFormat.init(inst, def);
|
|
@@ -1472,6 +1456,7 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
|
|
|
1472
1456
|
code: "invalid_value",
|
|
1473
1457
|
values: def.mime,
|
|
1474
1458
|
input: payload.value.type,
|
|
1459
|
+
path: ["type"],
|
|
1475
1460
|
inst
|
|
1476
1461
|
});
|
|
1477
1462
|
};
|
|
@@ -1484,7 +1469,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
1484
1469
|
});
|
|
1485
1470
|
|
|
1486
1471
|
//#endregion
|
|
1487
|
-
//#region ../../node_modules/zod/v4/core/doc.js
|
|
1472
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/doc.js
|
|
1488
1473
|
var Doc = class {
|
|
1489
1474
|
constructor(args = []) {
|
|
1490
1475
|
this.content = [];
|
|
@@ -1520,18 +1505,19 @@ var Doc = class {
|
|
|
1520
1505
|
};
|
|
1521
1506
|
|
|
1522
1507
|
//#endregion
|
|
1523
|
-
//#region ../../node_modules/zod/v4/core/versions.js
|
|
1508
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/versions.js
|
|
1524
1509
|
const version = {
|
|
1525
1510
|
major: 4,
|
|
1526
1511
|
minor: 0,
|
|
1527
|
-
patch:
|
|
1512
|
+
patch: 0
|
|
1528
1513
|
};
|
|
1529
1514
|
|
|
1530
1515
|
//#endregion
|
|
1531
|
-
//#region ../../node_modules/zod/v4/core/schemas.js
|
|
1516
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
|
|
1532
1517
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
1533
1518
|
var _a;
|
|
1534
1519
|
inst ?? (inst = {});
|
|
1520
|
+
inst._zod.id = def.type + "_" + randomString(10);
|
|
1535
1521
|
inst._zod.def = def;
|
|
1536
1522
|
inst._zod.bag = inst._zod.bag || {};
|
|
1537
1523
|
inst._zod.version = version;
|
|
@@ -1554,11 +1540,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1554
1540
|
let isAborted = aborted(payload);
|
|
1555
1541
|
let asyncResult;
|
|
1556
1542
|
for (const ch of checks$1) {
|
|
1557
|
-
if (ch._zod.
|
|
1558
|
-
const shouldRun = ch._zod.
|
|
1543
|
+
if (ch._zod.when) {
|
|
1544
|
+
const shouldRun = ch._zod.when(payload);
|
|
1559
1545
|
if (!shouldRun) continue;
|
|
1560
|
-
} else
|
|
1561
|
-
|
|
1546
|
+
} else {
|
|
1547
|
+
if (isAborted) {
|
|
1548
|
+
continue;
|
|
1549
|
+
}
|
|
1562
1550
|
}
|
|
1563
1551
|
const currLen = payload.issues.length;
|
|
1564
1552
|
const _ = ch._zod.check(payload);
|
|
@@ -1658,9 +1646,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1658
1646
|
$ZodStringFormat.init(inst, def);
|
|
1659
1647
|
inst._zod.check = (payload) => {
|
|
1660
1648
|
try {
|
|
1661
|
-
const
|
|
1662
|
-
const url$1 = new URL(orig);
|
|
1663
|
-
const href = url$1.href;
|
|
1649
|
+
const url$1 = new URL(payload.value);
|
|
1664
1650
|
if (def.hostname) {
|
|
1665
1651
|
def.hostname.lastIndex = 0;
|
|
1666
1652
|
if (!def.hostname.test(url$1.hostname)) {
|
|
@@ -1689,11 +1675,6 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1689
1675
|
});
|
|
1690
1676
|
}
|
|
1691
1677
|
}
|
|
1692
|
-
if (!orig.endsWith("/") && href.endsWith("/")) {
|
|
1693
|
-
payload.value = href.slice(0, -1);
|
|
1694
|
-
} else {
|
|
1695
|
-
payload.value = href;
|
|
1696
|
-
}
|
|
1697
1678
|
return;
|
|
1698
1679
|
} catch (_) {
|
|
1699
1680
|
payload.issues.push({
|
|
@@ -1864,7 +1845,6 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1864
1845
|
const tokensParts = token.split(".");
|
|
1865
1846
|
if (tokensParts.length !== 3) return false;
|
|
1866
1847
|
const [header] = tokensParts;
|
|
1867
|
-
if (!header) return false;
|
|
1868
1848
|
const parsedHeader = JSON.parse(atob(header));
|
|
1869
1849
|
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
|
|
1870
1850
|
if (!parsedHeader.alg) return false;
|
|
@@ -1887,19 +1867,6 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
|
1887
1867
|
});
|
|
1888
1868
|
};
|
|
1889
1869
|
});
|
|
1890
|
-
const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
|
|
1891
|
-
$ZodStringFormat.init(inst, def);
|
|
1892
|
-
inst._zod.check = (payload) => {
|
|
1893
|
-
if (def.fn(payload.value)) return;
|
|
1894
|
-
payload.issues.push({
|
|
1895
|
-
code: "invalid_format",
|
|
1896
|
-
format: def.format,
|
|
1897
|
-
input: payload.value,
|
|
1898
|
-
inst,
|
|
1899
|
-
continue: !def.abort
|
|
1900
|
-
});
|
|
1901
|
-
};
|
|
1902
|
-
});
|
|
1903
1870
|
const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
1904
1871
|
$ZodType.init(inst, def);
|
|
1905
1872
|
inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
|
|
@@ -1951,11 +1918,12 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
1951
1918
|
if (def.coerce) try {
|
|
1952
1919
|
payload.value = BigInt(payload.value);
|
|
1953
1920
|
} catch (_) {}
|
|
1954
|
-
|
|
1921
|
+
const { value: input } = payload;
|
|
1922
|
+
if (typeof input === "bigint") return payload;
|
|
1955
1923
|
payload.issues.push({
|
|
1956
1924
|
expected: "bigint",
|
|
1957
1925
|
code: "invalid_type",
|
|
1958
|
-
input
|
|
1926
|
+
input,
|
|
1959
1927
|
inst
|
|
1960
1928
|
});
|
|
1961
1929
|
return payload;
|
|
@@ -1968,7 +1936,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
|
|
|
1968
1936
|
const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
|
|
1969
1937
|
$ZodType.init(inst, def);
|
|
1970
1938
|
inst._zod.parse = (payload, _ctx) => {
|
|
1971
|
-
const input = payload
|
|
1939
|
+
const { value: input } = payload;
|
|
1972
1940
|
if (typeof input === "symbol") return payload;
|
|
1973
1941
|
payload.issues.push({
|
|
1974
1942
|
expected: "symbol",
|
|
@@ -1983,10 +1951,8 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
|
|
|
1983
1951
|
$ZodType.init(inst, def);
|
|
1984
1952
|
inst._zod.pattern = _undefined$2;
|
|
1985
1953
|
inst._zod.values = new Set([undefined]);
|
|
1986
|
-
inst._zod.optin = "optional";
|
|
1987
|
-
inst._zod.optout = "optional";
|
|
1988
1954
|
inst._zod.parse = (payload, _ctx) => {
|
|
1989
|
-
const input = payload
|
|
1955
|
+
const { value: input } = payload;
|
|
1990
1956
|
if (typeof input === "undefined") return payload;
|
|
1991
1957
|
payload.issues.push({
|
|
1992
1958
|
expected: "undefined",
|
|
@@ -2002,7 +1968,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
|
|
|
2002
1968
|
inst._zod.pattern = _null$2;
|
|
2003
1969
|
inst._zod.values = new Set([null]);
|
|
2004
1970
|
inst._zod.parse = (payload, _ctx) => {
|
|
2005
|
-
const input = payload
|
|
1971
|
+
const { value: input } = payload;
|
|
2006
1972
|
if (input === null) return payload;
|
|
2007
1973
|
payload.issues.push({
|
|
2008
1974
|
expected: "null",
|
|
@@ -2036,7 +2002,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
2036
2002
|
const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
|
|
2037
2003
|
$ZodType.init(inst, def);
|
|
2038
2004
|
inst._zod.parse = (payload, _ctx) => {
|
|
2039
|
-
const input = payload
|
|
2005
|
+
const { value: input } = payload;
|
|
2040
2006
|
if (typeof input === "undefined") return payload;
|
|
2041
2007
|
payload.issues.push({
|
|
2042
2008
|
expected: "void",
|
|
@@ -2167,20 +2133,19 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2167
2133
|
"payload",
|
|
2168
2134
|
"ctx"
|
|
2169
2135
|
]);
|
|
2170
|
-
const
|
|
2136
|
+
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
|
2171
2137
|
const parseStr = (key) => {
|
|
2172
2138
|
const k = esc(key);
|
|
2173
2139
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
2174
2140
|
};
|
|
2175
2141
|
doc.write(`const input = payload.value;`);
|
|
2176
2142
|
const ids = Object.create(null);
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
ids[key] = `key_${counter++}`;
|
|
2143
|
+
for (const key of keys) {
|
|
2144
|
+
ids[key] = randomString(15);
|
|
2180
2145
|
}
|
|
2181
2146
|
doc.write(`const newResult = {}`);
|
|
2182
|
-
for (const key of
|
|
2183
|
-
if (
|
|
2147
|
+
for (const key of keys) {
|
|
2148
|
+
if (optionalKeys$1.has(key)) {
|
|
2184
2149
|
const id = ids[key];
|
|
2185
2150
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2186
2151
|
const k = esc(key);
|
|
@@ -2225,7 +2190,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2225
2190
|
const jit = !globalConfig.jitless;
|
|
2226
2191
|
const allowsEval$1 = allowsEval;
|
|
2227
2192
|
const fastEnabled = jit && allowsEval$1.value;
|
|
2228
|
-
const catchall = def
|
|
2193
|
+
const { catchall } = def;
|
|
2229
2194
|
let value;
|
|
2230
2195
|
inst._zod.parse = (payload, ctx) => {
|
|
2231
2196
|
value ?? (value = _normalized.value);
|
|
@@ -2255,10 +2220,12 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2255
2220
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
|
2256
2221
|
if (r instanceof Promise) {
|
|
2257
2222
|
proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
|
|
2258
|
-
} else if (isOptional) {
|
|
2259
|
-
handleOptionalObjectResult(r, payload, key, input);
|
|
2260
2223
|
} else {
|
|
2261
|
-
|
|
2224
|
+
if (isOptional) {
|
|
2225
|
+
handleOptionalObjectResult(r, payload, key, input);
|
|
2226
|
+
} else {
|
|
2227
|
+
handleObjectResult(r, payload, key);
|
|
2228
|
+
}
|
|
2262
2229
|
}
|
|
2263
2230
|
}
|
|
2264
2231
|
}
|
|
@@ -2316,8 +2283,6 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
2316
2283
|
}
|
|
2317
2284
|
const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
2318
2285
|
$ZodType.init(inst, def);
|
|
2319
|
-
defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
|
|
2320
|
-
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
|
|
2321
2286
|
defineLazy(inst._zod, "values", () => {
|
|
2322
2287
|
if (def.options.every((o) => o._zod.values)) {
|
|
2323
2288
|
return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
@@ -2417,7 +2382,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
2417
2382
|
const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
2418
2383
|
$ZodType.init(inst, def);
|
|
2419
2384
|
inst._zod.parse = (payload, ctx) => {
|
|
2420
|
-
const input = payload
|
|
2385
|
+
const { value: input } = payload;
|
|
2421
2386
|
const left = def.left._zod.run({
|
|
2422
2387
|
value: input,
|
|
2423
2388
|
issues: []
|
|
@@ -2874,9 +2839,6 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
|
|
|
2874
2839
|
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
|
|
2875
2840
|
});
|
|
2876
2841
|
inst._zod.parse = (payload, ctx) => {
|
|
2877
|
-
if (def.innerType._zod.optin === "optional") {
|
|
2878
|
-
return def.innerType._zod.run(payload, ctx);
|
|
2879
|
-
}
|
|
2880
2842
|
if (payload.value === undefined) {
|
|
2881
2843
|
return payload;
|
|
2882
2844
|
}
|
|
@@ -2976,7 +2938,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
2976
2938
|
});
|
|
2977
2939
|
const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
2978
2940
|
$ZodType.init(inst, def);
|
|
2979
|
-
inst._zod
|
|
2941
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
2980
2942
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
2981
2943
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2982
2944
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3047,7 +3009,6 @@ function handlePipeResult(left, def, ctx) {
|
|
|
3047
3009
|
const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
3048
3010
|
$ZodType.init(inst, def);
|
|
3049
3011
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
3050
|
-
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3051
3012
|
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
3052
3013
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3053
3014
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3098,7 +3059,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
|
|
|
3098
3059
|
input: payload.value,
|
|
3099
3060
|
inst,
|
|
3100
3061
|
code: "invalid_format",
|
|
3101
|
-
format:
|
|
3062
|
+
format: "template_literal",
|
|
3102
3063
|
pattern: inst._zod.pattern.source
|
|
3103
3064
|
});
|
|
3104
3065
|
return payload;
|
|
@@ -3158,8 +3119,8 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
3158
3119
|
}
|
|
3159
3120
|
|
|
3160
3121
|
//#endregion
|
|
3161
|
-
//#region ../../node_modules/zod/v4/locales/ar.js
|
|
3162
|
-
const error$
|
|
3122
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
|
|
3123
|
+
const error$36 = () => {
|
|
3163
3124
|
const Sizable = {
|
|
3164
3125
|
string: {
|
|
3165
3126
|
unit: "حرف",
|
|
@@ -3181,7 +3142,7 @@ const error$38 = () => {
|
|
|
3181
3142
|
function getSizing(origin) {
|
|
3182
3143
|
return Sizable[origin] ?? null;
|
|
3183
3144
|
}
|
|
3184
|
-
const parsedType$
|
|
3145
|
+
const parsedType$2 = (data) => {
|
|
3185
3146
|
const t = typeof data;
|
|
3186
3147
|
switch (t) {
|
|
3187
3148
|
case "number": {
|
|
@@ -3233,7 +3194,7 @@ const error$38 = () => {
|
|
|
3233
3194
|
};
|
|
3234
3195
|
return (issue$1) => {
|
|
3235
3196
|
switch (issue$1.code) {
|
|
3236
|
-
case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$
|
|
3197
|
+
case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
|
|
3237
3198
|
case "invalid_value":
|
|
3238
3199
|
if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3239
3200
|
return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3269,12 +3230,12 @@ const error$38 = () => {
|
|
|
3269
3230
|
};
|
|
3270
3231
|
};
|
|
3271
3232
|
function ar_default() {
|
|
3272
|
-
return { localeError: error$
|
|
3233
|
+
return { localeError: error$36() };
|
|
3273
3234
|
}
|
|
3274
3235
|
|
|
3275
3236
|
//#endregion
|
|
3276
|
-
//#region ../../node_modules/zod/v4/locales/az.js
|
|
3277
|
-
const error$
|
|
3237
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/az.js
|
|
3238
|
+
const error$35 = () => {
|
|
3278
3239
|
const Sizable = {
|
|
3279
3240
|
string: {
|
|
3280
3241
|
unit: "simvol",
|
|
@@ -3296,7 +3257,7 @@ const error$37 = () => {
|
|
|
3296
3257
|
function getSizing(origin) {
|
|
3297
3258
|
return Sizable[origin] ?? null;
|
|
3298
3259
|
}
|
|
3299
|
-
const parsedType$
|
|
3260
|
+
const parsedType$2 = (data) => {
|
|
3300
3261
|
const t = typeof data;
|
|
3301
3262
|
switch (t) {
|
|
3302
3263
|
case "number": {
|
|
@@ -3348,7 +3309,7 @@ const error$37 = () => {
|
|
|
3348
3309
|
};
|
|
3349
3310
|
return (issue$1) => {
|
|
3350
3311
|
switch (issue$1.code) {
|
|
3351
|
-
case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$
|
|
3312
|
+
case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
|
|
3352
3313
|
case "invalid_value":
|
|
3353
3314
|
if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3354
3315
|
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3382,11 +3343,11 @@ const error$37 = () => {
|
|
|
3382
3343
|
};
|
|
3383
3344
|
};
|
|
3384
3345
|
function az_default() {
|
|
3385
|
-
return { localeError: error$
|
|
3346
|
+
return { localeError: error$35() };
|
|
3386
3347
|
}
|
|
3387
3348
|
|
|
3388
3349
|
//#endregion
|
|
3389
|
-
//#region ../../node_modules/zod/v4/locales/be.js
|
|
3350
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/be.js
|
|
3390
3351
|
function getBelarusianPlural(count, one, few, many) {
|
|
3391
3352
|
const absCount = Math.abs(count);
|
|
3392
3353
|
const lastDigit = absCount % 10;
|
|
@@ -3402,7 +3363,7 @@ function getBelarusianPlural(count, one, few, many) {
|
|
|
3402
3363
|
}
|
|
3403
3364
|
return many;
|
|
3404
3365
|
}
|
|
3405
|
-
const error$
|
|
3366
|
+
const error$34 = () => {
|
|
3406
3367
|
const Sizable = {
|
|
3407
3368
|
string: {
|
|
3408
3369
|
unit: {
|
|
@@ -3440,7 +3401,7 @@ const error$36 = () => {
|
|
|
3440
3401
|
function getSizing(origin) {
|
|
3441
3402
|
return Sizable[origin] ?? null;
|
|
3442
3403
|
}
|
|
3443
|
-
const parsedType$
|
|
3404
|
+
const parsedType$2 = (data) => {
|
|
3444
3405
|
const t = typeof data;
|
|
3445
3406
|
switch (t) {
|
|
3446
3407
|
case "number": {
|
|
@@ -3492,7 +3453,7 @@ const error$36 = () => {
|
|
|
3492
3453
|
};
|
|
3493
3454
|
return (issue$1) => {
|
|
3494
3455
|
switch (issue$1.code) {
|
|
3495
|
-
case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$
|
|
3456
|
+
case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
|
|
3496
3457
|
case "invalid_value":
|
|
3497
3458
|
if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3498
3459
|
return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3534,12 +3495,12 @@ const error$36 = () => {
|
|
|
3534
3495
|
};
|
|
3535
3496
|
};
|
|
3536
3497
|
function be_default() {
|
|
3537
|
-
return { localeError: error$
|
|
3498
|
+
return { localeError: error$34() };
|
|
3538
3499
|
}
|
|
3539
3500
|
|
|
3540
3501
|
//#endregion
|
|
3541
|
-
//#region ../../node_modules/zod/v4/locales/ca.js
|
|
3542
|
-
const error$
|
|
3502
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
|
|
3503
|
+
const error$33 = () => {
|
|
3543
3504
|
const Sizable = {
|
|
3544
3505
|
string: {
|
|
3545
3506
|
unit: "caràcters",
|
|
@@ -3561,7 +3522,7 @@ const error$35 = () => {
|
|
|
3561
3522
|
function getSizing(origin) {
|
|
3562
3523
|
return Sizable[origin] ?? null;
|
|
3563
3524
|
}
|
|
3564
|
-
const parsedType$
|
|
3525
|
+
const parsedType$2 = (data) => {
|
|
3565
3526
|
const t = typeof data;
|
|
3566
3527
|
switch (t) {
|
|
3567
3528
|
case "number": {
|
|
@@ -3613,7 +3574,7 @@ const error$35 = () => {
|
|
|
3613
3574
|
};
|
|
3614
3575
|
return (issue$1) => {
|
|
3615
3576
|
switch (issue$1.code) {
|
|
3616
|
-
case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$
|
|
3577
|
+
case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
|
|
3617
3578
|
case "invalid_value":
|
|
3618
3579
|
if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3619
3580
|
return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
|
|
@@ -3651,12 +3612,12 @@ const error$35 = () => {
|
|
|
3651
3612
|
};
|
|
3652
3613
|
};
|
|
3653
3614
|
function ca_default() {
|
|
3654
|
-
return { localeError: error$
|
|
3615
|
+
return { localeError: error$33() };
|
|
3655
3616
|
}
|
|
3656
3617
|
|
|
3657
3618
|
//#endregion
|
|
3658
|
-
//#region ../../node_modules/zod/v4/locales/cs.js
|
|
3659
|
-
const error$
|
|
3619
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
|
|
3620
|
+
const error$32 = () => {
|
|
3660
3621
|
const Sizable = {
|
|
3661
3622
|
string: {
|
|
3662
3623
|
unit: "znaků",
|
|
@@ -3678,7 +3639,7 @@ const error$34 = () => {
|
|
|
3678
3639
|
function getSizing(origin) {
|
|
3679
3640
|
return Sizable[origin] ?? null;
|
|
3680
3641
|
}
|
|
3681
|
-
const parsedType$
|
|
3642
|
+
const parsedType$2 = (data) => {
|
|
3682
3643
|
const t = typeof data;
|
|
3683
3644
|
switch (t) {
|
|
3684
3645
|
case "number": {
|
|
@@ -3748,7 +3709,7 @@ const error$34 = () => {
|
|
|
3748
3709
|
};
|
|
3749
3710
|
return (issue$1) => {
|
|
3750
3711
|
switch (issue$1.code) {
|
|
3751
|
-
case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$
|
|
3712
|
+
case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
|
|
3752
3713
|
case "invalid_value":
|
|
3753
3714
|
if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3754
3715
|
return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3786,12 +3747,12 @@ const error$34 = () => {
|
|
|
3786
3747
|
};
|
|
3787
3748
|
};
|
|
3788
3749
|
function cs_default() {
|
|
3789
|
-
return { localeError: error$
|
|
3750
|
+
return { localeError: error$32() };
|
|
3790
3751
|
}
|
|
3791
3752
|
|
|
3792
3753
|
//#endregion
|
|
3793
|
-
//#region ../../node_modules/zod/v4/locales/de.js
|
|
3794
|
-
const error$
|
|
3754
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/de.js
|
|
3755
|
+
const error$31 = () => {
|
|
3795
3756
|
const Sizable = {
|
|
3796
3757
|
string: {
|
|
3797
3758
|
unit: "Zeichen",
|
|
@@ -3813,7 +3774,7 @@ const error$33 = () => {
|
|
|
3813
3774
|
function getSizing(origin) {
|
|
3814
3775
|
return Sizable[origin] ?? null;
|
|
3815
3776
|
}
|
|
3816
|
-
const parsedType$
|
|
3777
|
+
const parsedType$2 = (data) => {
|
|
3817
3778
|
const t = typeof data;
|
|
3818
3779
|
switch (t) {
|
|
3819
3780
|
case "number": {
|
|
@@ -3865,7 +3826,7 @@ const error$33 = () => {
|
|
|
3865
3826
|
};
|
|
3866
3827
|
return (issue$1) => {
|
|
3867
3828
|
switch (issue$1.code) {
|
|
3868
|
-
case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$
|
|
3829
|
+
case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
|
|
3869
3830
|
case "invalid_value":
|
|
3870
3831
|
if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3871
3832
|
return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3901,12 +3862,12 @@ const error$33 = () => {
|
|
|
3901
3862
|
};
|
|
3902
3863
|
};
|
|
3903
3864
|
function de_default() {
|
|
3904
|
-
return { localeError: error$
|
|
3865
|
+
return { localeError: error$31() };
|
|
3905
3866
|
}
|
|
3906
3867
|
|
|
3907
3868
|
//#endregion
|
|
3908
|
-
//#region ../../node_modules/zod/v4/locales/en.js
|
|
3909
|
-
const parsedType$
|
|
3869
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/en.js
|
|
3870
|
+
const parsedType$1 = (data) => {
|
|
3910
3871
|
const t = typeof data;
|
|
3911
3872
|
switch (t) {
|
|
3912
3873
|
case "number": {
|
|
@@ -3926,7 +3887,7 @@ const parsedType$2 = (data) => {
|
|
|
3926
3887
|
}
|
|
3927
3888
|
return t;
|
|
3928
3889
|
};
|
|
3929
|
-
const error$
|
|
3890
|
+
const error$30 = () => {
|
|
3930
3891
|
const Sizable = {
|
|
3931
3892
|
string: {
|
|
3932
3893
|
unit: "characters",
|
|
@@ -3980,7 +3941,7 @@ const error$32 = () => {
|
|
|
3980
3941
|
};
|
|
3981
3942
|
return (issue$1) => {
|
|
3982
3943
|
switch (issue$1.code) {
|
|
3983
|
-
case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$
|
|
3944
|
+
case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
|
|
3984
3945
|
case "invalid_value":
|
|
3985
3946
|
if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3986
3947
|
return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4018,127 +3979,12 @@ const error$32 = () => {
|
|
|
4018
3979
|
};
|
|
4019
3980
|
};
|
|
4020
3981
|
function en_default() {
|
|
4021
|
-
return { localeError: error$
|
|
4022
|
-
}
|
|
4023
|
-
|
|
4024
|
-
//#endregion
|
|
4025
|
-
//#region ../../node_modules/zod/v4/locales/eo.js
|
|
4026
|
-
const parsedType$1 = (data) => {
|
|
4027
|
-
const t = typeof data;
|
|
4028
|
-
switch (t) {
|
|
4029
|
-
case "number": {
|
|
4030
|
-
return Number.isNaN(data) ? "NaN" : "nombro";
|
|
4031
|
-
}
|
|
4032
|
-
case "object": {
|
|
4033
|
-
if (Array.isArray(data)) {
|
|
4034
|
-
return "tabelo";
|
|
4035
|
-
}
|
|
4036
|
-
if (data === null) {
|
|
4037
|
-
return "senvalora";
|
|
4038
|
-
}
|
|
4039
|
-
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
4040
|
-
return data.constructor.name;
|
|
4041
|
-
}
|
|
4042
|
-
}
|
|
4043
|
-
}
|
|
4044
|
-
return t;
|
|
4045
|
-
};
|
|
4046
|
-
const error$31 = () => {
|
|
4047
|
-
const Sizable = {
|
|
4048
|
-
string: {
|
|
4049
|
-
unit: "karaktrojn",
|
|
4050
|
-
verb: "havi"
|
|
4051
|
-
},
|
|
4052
|
-
file: {
|
|
4053
|
-
unit: "bajtojn",
|
|
4054
|
-
verb: "havi"
|
|
4055
|
-
},
|
|
4056
|
-
array: {
|
|
4057
|
-
unit: "elementojn",
|
|
4058
|
-
verb: "havi"
|
|
4059
|
-
},
|
|
4060
|
-
set: {
|
|
4061
|
-
unit: "elementojn",
|
|
4062
|
-
verb: "havi"
|
|
4063
|
-
}
|
|
4064
|
-
};
|
|
4065
|
-
function getSizing(origin) {
|
|
4066
|
-
return Sizable[origin] ?? null;
|
|
4067
|
-
}
|
|
4068
|
-
const Nouns = {
|
|
4069
|
-
regex: "enigo",
|
|
4070
|
-
email: "retadreso",
|
|
4071
|
-
url: "URL",
|
|
4072
|
-
emoji: "emoĝio",
|
|
4073
|
-
uuid: "UUID",
|
|
4074
|
-
uuidv4: "UUIDv4",
|
|
4075
|
-
uuidv6: "UUIDv6",
|
|
4076
|
-
nanoid: "nanoid",
|
|
4077
|
-
guid: "GUID",
|
|
4078
|
-
cuid: "cuid",
|
|
4079
|
-
cuid2: "cuid2",
|
|
4080
|
-
ulid: "ULID",
|
|
4081
|
-
xid: "XID",
|
|
4082
|
-
ksuid: "KSUID",
|
|
4083
|
-
datetime: "ISO-datotempo",
|
|
4084
|
-
date: "ISO-dato",
|
|
4085
|
-
time: "ISO-tempo",
|
|
4086
|
-
duration: "ISO-daŭro",
|
|
4087
|
-
ipv4: "IPv4-adreso",
|
|
4088
|
-
ipv6: "IPv6-adreso",
|
|
4089
|
-
cidrv4: "IPv4-rango",
|
|
4090
|
-
cidrv6: "IPv6-rango",
|
|
4091
|
-
base64: "64-ume kodita karaktraro",
|
|
4092
|
-
base64url: "URL-64-ume kodita karaktraro",
|
|
4093
|
-
json_string: "JSON-karaktraro",
|
|
4094
|
-
e164: "E.164-nombro",
|
|
4095
|
-
jwt: "JWT",
|
|
4096
|
-
template_literal: "enigo"
|
|
4097
|
-
};
|
|
4098
|
-
return (issue$1) => {
|
|
4099
|
-
switch (issue$1.code) {
|
|
4100
|
-
case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
|
|
4101
|
-
case "invalid_value":
|
|
4102
|
-
if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4103
|
-
return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
|
|
4104
|
-
case "too_big": {
|
|
4105
|
-
const adj = issue$1.inclusive ? "<=" : "<";
|
|
4106
|
-
const sizing = getSizing(issue$1.origin);
|
|
4107
|
-
if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
|
|
4108
|
-
return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
|
|
4109
|
-
}
|
|
4110
|
-
case "too_small": {
|
|
4111
|
-
const adj = issue$1.inclusive ? ">=" : ">";
|
|
4112
|
-
const sizing = getSizing(issue$1.origin);
|
|
4113
|
-
if (sizing) {
|
|
4114
|
-
return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
|
|
4115
|
-
}
|
|
4116
|
-
return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
|
|
4117
|
-
}
|
|
4118
|
-
case "invalid_format": {
|
|
4119
|
-
const _issue = issue$1;
|
|
4120
|
-
if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
|
|
4121
|
-
if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
|
|
4122
|
-
if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
|
|
4123
|
-
if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
|
|
4124
|
-
return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
|
|
4125
|
-
}
|
|
4126
|
-
case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
|
|
4127
|
-
case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
|
|
4128
|
-
case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
|
|
4129
|
-
case "invalid_union": return "Nevalida enigo";
|
|
4130
|
-
case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
|
|
4131
|
-
default: return `Nevalida enigo`;
|
|
4132
|
-
}
|
|
4133
|
-
};
|
|
4134
|
-
};
|
|
4135
|
-
function eo_default() {
|
|
4136
|
-
return { localeError: error$31() };
|
|
3982
|
+
return { localeError: error$30() };
|
|
4137
3983
|
}
|
|
4138
3984
|
|
|
4139
3985
|
//#endregion
|
|
4140
|
-
//#region ../../node_modules/zod/v4/locales/es.js
|
|
4141
|
-
const error$
|
|
3986
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/es.js
|
|
3987
|
+
const error$29 = () => {
|
|
4142
3988
|
const Sizable = {
|
|
4143
3989
|
string: {
|
|
4144
3990
|
unit: "caracteres",
|
|
@@ -4160,7 +4006,7 @@ const error$30 = () => {
|
|
|
4160
4006
|
function getSizing(origin) {
|
|
4161
4007
|
return Sizable[origin] ?? null;
|
|
4162
4008
|
}
|
|
4163
|
-
const parsedType$
|
|
4009
|
+
const parsedType$2 = (data) => {
|
|
4164
4010
|
const t = typeof data;
|
|
4165
4011
|
switch (t) {
|
|
4166
4012
|
case "number": {
|
|
@@ -4212,7 +4058,7 @@ const error$30 = () => {
|
|
|
4212
4058
|
};
|
|
4213
4059
|
return (issue$1) => {
|
|
4214
4060
|
switch (issue$1.code) {
|
|
4215
|
-
case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$
|
|
4061
|
+
case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
|
|
4216
4062
|
case "invalid_value":
|
|
4217
4063
|
if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4218
4064
|
return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4248,12 +4094,12 @@ const error$30 = () => {
|
|
|
4248
4094
|
};
|
|
4249
4095
|
};
|
|
4250
4096
|
function es_default() {
|
|
4251
|
-
return { localeError: error$
|
|
4097
|
+
return { localeError: error$29() };
|
|
4252
4098
|
}
|
|
4253
4099
|
|
|
4254
4100
|
//#endregion
|
|
4255
|
-
//#region ../../node_modules/zod/v4/locales/fa.js
|
|
4256
|
-
const error$
|
|
4101
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
|
|
4102
|
+
const error$28 = () => {
|
|
4257
4103
|
const Sizable = {
|
|
4258
4104
|
string: {
|
|
4259
4105
|
unit: "کاراکتر",
|
|
@@ -4275,7 +4121,7 @@ const error$29 = () => {
|
|
|
4275
4121
|
function getSizing(origin) {
|
|
4276
4122
|
return Sizable[origin] ?? null;
|
|
4277
4123
|
}
|
|
4278
|
-
const parsedType$
|
|
4124
|
+
const parsedType$2 = (data) => {
|
|
4279
4125
|
const t = typeof data;
|
|
4280
4126
|
switch (t) {
|
|
4281
4127
|
case "number": {
|
|
@@ -4327,7 +4173,7 @@ const error$29 = () => {
|
|
|
4327
4173
|
};
|
|
4328
4174
|
return (issue$1) => {
|
|
4329
4175
|
switch (issue$1.code) {
|
|
4330
|
-
case "invalid_type": return `ورودی نامعتبر: میبایست ${issue$1.expected} میبود، ${parsedType$
|
|
4176
|
+
case "invalid_type": return `ورودی نامعتبر: میبایست ${issue$1.expected} میبود، ${parsedType$2(issue$1.input)} دریافت شد`;
|
|
4331
4177
|
case "invalid_value":
|
|
4332
4178
|
if (issue$1.values.length === 1) {
|
|
4333
4179
|
return `ورودی نامعتبر: میبایست ${stringifyPrimitive(issue$1.values[0])} میبود`;
|
|
@@ -4375,12 +4221,12 @@ const error$29 = () => {
|
|
|
4375
4221
|
};
|
|
4376
4222
|
};
|
|
4377
4223
|
function fa_default() {
|
|
4378
|
-
return { localeError: error$
|
|
4224
|
+
return { localeError: error$28() };
|
|
4379
4225
|
}
|
|
4380
4226
|
|
|
4381
4227
|
//#endregion
|
|
4382
|
-
//#region ../../node_modules/zod/v4/locales/fi.js
|
|
4383
|
-
const error$
|
|
4228
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
|
|
4229
|
+
const error$27 = () => {
|
|
4384
4230
|
const Sizable = {
|
|
4385
4231
|
string: {
|
|
4386
4232
|
unit: "merkkiä",
|
|
@@ -4418,7 +4264,7 @@ const error$28 = () => {
|
|
|
4418
4264
|
function getSizing(origin) {
|
|
4419
4265
|
return Sizable[origin] ?? null;
|
|
4420
4266
|
}
|
|
4421
|
-
const parsedType$
|
|
4267
|
+
const parsedType$2 = (data) => {
|
|
4422
4268
|
const t = typeof data;
|
|
4423
4269
|
switch (t) {
|
|
4424
4270
|
case "number": {
|
|
@@ -4470,7 +4316,7 @@ const error$28 = () => {
|
|
|
4470
4316
|
};
|
|
4471
4317
|
return (issue$1) => {
|
|
4472
4318
|
switch (issue$1.code) {
|
|
4473
|
-
case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$
|
|
4319
|
+
case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
|
|
4474
4320
|
case "invalid_value":
|
|
4475
4321
|
if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4476
4322
|
return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4510,12 +4356,12 @@ const error$28 = () => {
|
|
|
4510
4356
|
};
|
|
4511
4357
|
};
|
|
4512
4358
|
function fi_default() {
|
|
4513
|
-
return { localeError: error$
|
|
4359
|
+
return { localeError: error$27() };
|
|
4514
4360
|
}
|
|
4515
4361
|
|
|
4516
4362
|
//#endregion
|
|
4517
|
-
//#region ../../node_modules/zod/v4/locales/fr.js
|
|
4518
|
-
const error$
|
|
4363
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
|
|
4364
|
+
const error$26 = () => {
|
|
4519
4365
|
const Sizable = {
|
|
4520
4366
|
string: {
|
|
4521
4367
|
unit: "caractères",
|
|
@@ -4537,7 +4383,7 @@ const error$27 = () => {
|
|
|
4537
4383
|
function getSizing(origin) {
|
|
4538
4384
|
return Sizable[origin] ?? null;
|
|
4539
4385
|
}
|
|
4540
|
-
const parsedType$
|
|
4386
|
+
const parsedType$2 = (data) => {
|
|
4541
4387
|
const t = typeof data;
|
|
4542
4388
|
switch (t) {
|
|
4543
4389
|
case "number": {
|
|
@@ -4589,7 +4435,7 @@ const error$27 = () => {
|
|
|
4589
4435
|
};
|
|
4590
4436
|
return (issue$1) => {
|
|
4591
4437
|
switch (issue$1.code) {
|
|
4592
|
-
case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$
|
|
4438
|
+
case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
|
|
4593
4439
|
case "invalid_value":
|
|
4594
4440
|
if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
|
|
4595
4441
|
return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
|
|
@@ -4625,12 +4471,12 @@ const error$27 = () => {
|
|
|
4625
4471
|
};
|
|
4626
4472
|
};
|
|
4627
4473
|
function fr_default() {
|
|
4628
|
-
return { localeError: error$
|
|
4474
|
+
return { localeError: error$26() };
|
|
4629
4475
|
}
|
|
4630
4476
|
|
|
4631
4477
|
//#endregion
|
|
4632
|
-
//#region ../../node_modules/zod/v4/locales/fr-CA.js
|
|
4633
|
-
const error$
|
|
4478
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
|
|
4479
|
+
const error$25 = () => {
|
|
4634
4480
|
const Sizable = {
|
|
4635
4481
|
string: {
|
|
4636
4482
|
unit: "caractères",
|
|
@@ -4652,7 +4498,7 @@ const error$26 = () => {
|
|
|
4652
4498
|
function getSizing(origin) {
|
|
4653
4499
|
return Sizable[origin] ?? null;
|
|
4654
4500
|
}
|
|
4655
|
-
const parsedType$
|
|
4501
|
+
const parsedType$2 = (data) => {
|
|
4656
4502
|
const t = typeof data;
|
|
4657
4503
|
switch (t) {
|
|
4658
4504
|
case "number": {
|
|
@@ -4704,7 +4550,7 @@ const error$26 = () => {
|
|
|
4704
4550
|
};
|
|
4705
4551
|
return (issue$1) => {
|
|
4706
4552
|
switch (issue$1.code) {
|
|
4707
|
-
case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$
|
|
4553
|
+
case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
|
|
4708
4554
|
case "invalid_value":
|
|
4709
4555
|
if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4710
4556
|
return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4742,12 +4588,12 @@ const error$26 = () => {
|
|
|
4742
4588
|
};
|
|
4743
4589
|
};
|
|
4744
4590
|
function fr_CA_default() {
|
|
4745
|
-
return { localeError: error$
|
|
4591
|
+
return { localeError: error$25() };
|
|
4746
4592
|
}
|
|
4747
4593
|
|
|
4748
4594
|
//#endregion
|
|
4749
|
-
//#region ../../node_modules/zod/v4/locales/he.js
|
|
4750
|
-
const error$
|
|
4595
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/he.js
|
|
4596
|
+
const error$24 = () => {
|
|
4751
4597
|
const Sizable = {
|
|
4752
4598
|
string: {
|
|
4753
4599
|
unit: "אותיות",
|
|
@@ -4769,7 +4615,7 @@ const error$25 = () => {
|
|
|
4769
4615
|
function getSizing(origin) {
|
|
4770
4616
|
return Sizable[origin] ?? null;
|
|
4771
4617
|
}
|
|
4772
|
-
const parsedType$
|
|
4618
|
+
const parsedType$2 = (data) => {
|
|
4773
4619
|
const t = typeof data;
|
|
4774
4620
|
switch (t) {
|
|
4775
4621
|
case "number": {
|
|
@@ -4821,7 +4667,7 @@ const error$25 = () => {
|
|
|
4821
4667
|
};
|
|
4822
4668
|
return (issue$1) => {
|
|
4823
4669
|
switch (issue$1.code) {
|
|
4824
|
-
case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$
|
|
4670
|
+
case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
|
|
4825
4671
|
case "invalid_value":
|
|
4826
4672
|
if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4827
4673
|
return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4857,12 +4703,12 @@ const error$25 = () => {
|
|
|
4857
4703
|
};
|
|
4858
4704
|
};
|
|
4859
4705
|
function he_default() {
|
|
4860
|
-
return { localeError: error$
|
|
4706
|
+
return { localeError: error$24() };
|
|
4861
4707
|
}
|
|
4862
4708
|
|
|
4863
4709
|
//#endregion
|
|
4864
|
-
//#region ../../node_modules/zod/v4/locales/hu.js
|
|
4865
|
-
const error$
|
|
4710
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
|
|
4711
|
+
const error$23 = () => {
|
|
4866
4712
|
const Sizable = {
|
|
4867
4713
|
string: {
|
|
4868
4714
|
unit: "karakter",
|
|
@@ -4884,7 +4730,7 @@ const error$24 = () => {
|
|
|
4884
4730
|
function getSizing(origin) {
|
|
4885
4731
|
return Sizable[origin] ?? null;
|
|
4886
4732
|
}
|
|
4887
|
-
const parsedType$
|
|
4733
|
+
const parsedType$2 = (data) => {
|
|
4888
4734
|
const t = typeof data;
|
|
4889
4735
|
switch (t) {
|
|
4890
4736
|
case "number": {
|
|
@@ -4936,7 +4782,7 @@ const error$24 = () => {
|
|
|
4936
4782
|
};
|
|
4937
4783
|
return (issue$1) => {
|
|
4938
4784
|
switch (issue$1.code) {
|
|
4939
|
-
case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$
|
|
4785
|
+
case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
|
|
4940
4786
|
case "invalid_value":
|
|
4941
4787
|
if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4942
4788
|
return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4972,12 +4818,12 @@ const error$24 = () => {
|
|
|
4972
4818
|
};
|
|
4973
4819
|
};
|
|
4974
4820
|
function hu_default() {
|
|
4975
|
-
return { localeError: error$
|
|
4821
|
+
return { localeError: error$23() };
|
|
4976
4822
|
}
|
|
4977
4823
|
|
|
4978
4824
|
//#endregion
|
|
4979
|
-
//#region ../../node_modules/zod/v4/locales/id.js
|
|
4980
|
-
const error$
|
|
4825
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/id.js
|
|
4826
|
+
const error$22 = () => {
|
|
4981
4827
|
const Sizable = {
|
|
4982
4828
|
string: {
|
|
4983
4829
|
unit: "karakter",
|
|
@@ -4999,7 +4845,7 @@ const error$23 = () => {
|
|
|
4999
4845
|
function getSizing(origin) {
|
|
5000
4846
|
return Sizable[origin] ?? null;
|
|
5001
4847
|
}
|
|
5002
|
-
const parsedType$
|
|
4848
|
+
const parsedType$2 = (data) => {
|
|
5003
4849
|
const t = typeof data;
|
|
5004
4850
|
switch (t) {
|
|
5005
4851
|
case "number": {
|
|
@@ -5051,7 +4897,7 @@ const error$23 = () => {
|
|
|
5051
4897
|
};
|
|
5052
4898
|
return (issue$1) => {
|
|
5053
4899
|
switch (issue$1.code) {
|
|
5054
|
-
case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$
|
|
4900
|
+
case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
|
|
5055
4901
|
case "invalid_value":
|
|
5056
4902
|
if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5057
4903
|
return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5087,12 +4933,12 @@ const error$23 = () => {
|
|
|
5087
4933
|
};
|
|
5088
4934
|
};
|
|
5089
4935
|
function id_default() {
|
|
5090
|
-
return { localeError: error$
|
|
4936
|
+
return { localeError: error$22() };
|
|
5091
4937
|
}
|
|
5092
4938
|
|
|
5093
4939
|
//#endregion
|
|
5094
|
-
//#region ../../node_modules/zod/v4/locales/it.js
|
|
5095
|
-
const error$
|
|
4940
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/it.js
|
|
4941
|
+
const error$21 = () => {
|
|
5096
4942
|
const Sizable = {
|
|
5097
4943
|
string: {
|
|
5098
4944
|
unit: "caratteri",
|
|
@@ -5114,7 +4960,7 @@ const error$22 = () => {
|
|
|
5114
4960
|
function getSizing(origin) {
|
|
5115
4961
|
return Sizable[origin] ?? null;
|
|
5116
4962
|
}
|
|
5117
|
-
const parsedType$
|
|
4963
|
+
const parsedType$2 = (data) => {
|
|
5118
4964
|
const t = typeof data;
|
|
5119
4965
|
switch (t) {
|
|
5120
4966
|
case "number": {
|
|
@@ -5166,7 +5012,7 @@ const error$22 = () => {
|
|
|
5166
5012
|
};
|
|
5167
5013
|
return (issue$1) => {
|
|
5168
5014
|
switch (issue$1.code) {
|
|
5169
|
-
case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$
|
|
5015
|
+
case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
|
|
5170
5016
|
case "invalid_value":
|
|
5171
5017
|
if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5172
5018
|
return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5202,12 +5048,12 @@ const error$22 = () => {
|
|
|
5202
5048
|
};
|
|
5203
5049
|
};
|
|
5204
5050
|
function it_default() {
|
|
5205
|
-
return { localeError: error$
|
|
5051
|
+
return { localeError: error$21() };
|
|
5206
5052
|
}
|
|
5207
5053
|
|
|
5208
5054
|
//#endregion
|
|
5209
|
-
//#region ../../node_modules/zod/v4/locales/ja.js
|
|
5210
|
-
const error$
|
|
5055
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
|
|
5056
|
+
const error$20 = () => {
|
|
5211
5057
|
const Sizable = {
|
|
5212
5058
|
string: {
|
|
5213
5059
|
unit: "文字",
|
|
@@ -5229,7 +5075,7 @@ const error$21 = () => {
|
|
|
5229
5075
|
function getSizing(origin) {
|
|
5230
5076
|
return Sizable[origin] ?? null;
|
|
5231
5077
|
}
|
|
5232
|
-
const parsedType$
|
|
5078
|
+
const parsedType$2 = (data) => {
|
|
5233
5079
|
const t = typeof data;
|
|
5234
5080
|
switch (t) {
|
|
5235
5081
|
case "number": {
|
|
@@ -5281,21 +5127,21 @@ const error$21 = () => {
|
|
|
5281
5127
|
};
|
|
5282
5128
|
return (issue$1) => {
|
|
5283
5129
|
switch (issue$1.code) {
|
|
5284
|
-
case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$
|
|
5130
|
+
case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
|
|
5285
5131
|
case "invalid_value":
|
|
5286
5132
|
if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
|
|
5287
5133
|
return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
|
|
5288
5134
|
case "too_big": {
|
|
5289
|
-
const adj = issue$1.inclusive ? "
|
|
5135
|
+
const adj = issue$1.inclusive ? "<=" : "<";
|
|
5290
5136
|
const sizing = getSizing(issue$1.origin);
|
|
5291
|
-
if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}
|
|
5292
|
-
return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}
|
|
5137
|
+
if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
|
|
5138
|
+
return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
|
|
5293
5139
|
}
|
|
5294
5140
|
case "too_small": {
|
|
5295
|
-
const adj = issue$1.inclusive ? "
|
|
5141
|
+
const adj = issue$1.inclusive ? ">=" : ">";
|
|
5296
5142
|
const sizing = getSizing(issue$1.origin);
|
|
5297
|
-
if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}
|
|
5298
|
-
return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}
|
|
5143
|
+
if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
|
|
5144
|
+
return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
|
|
5299
5145
|
}
|
|
5300
5146
|
case "invalid_format": {
|
|
5301
5147
|
const _issue = issue$1;
|
|
@@ -5315,12 +5161,12 @@ const error$21 = () => {
|
|
|
5315
5161
|
};
|
|
5316
5162
|
};
|
|
5317
5163
|
function ja_default() {
|
|
5318
|
-
return { localeError: error$
|
|
5164
|
+
return { localeError: error$20() };
|
|
5319
5165
|
}
|
|
5320
5166
|
|
|
5321
5167
|
//#endregion
|
|
5322
|
-
//#region ../../node_modules/zod/v4/locales/kh.js
|
|
5323
|
-
const error$
|
|
5168
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
|
|
5169
|
+
const error$19 = () => {
|
|
5324
5170
|
const Sizable = {
|
|
5325
5171
|
string: {
|
|
5326
5172
|
unit: "តួអក្សរ",
|
|
@@ -5342,7 +5188,7 @@ const error$20 = () => {
|
|
|
5342
5188
|
function getSizing(origin) {
|
|
5343
5189
|
return Sizable[origin] ?? null;
|
|
5344
5190
|
}
|
|
5345
|
-
const parsedType$
|
|
5191
|
+
const parsedType$2 = (data) => {
|
|
5346
5192
|
const t = typeof data;
|
|
5347
5193
|
switch (t) {
|
|
5348
5194
|
case "number": {
|
|
@@ -5394,7 +5240,7 @@ const error$20 = () => {
|
|
|
5394
5240
|
};
|
|
5395
5241
|
return (issue$1) => {
|
|
5396
5242
|
switch (issue$1.code) {
|
|
5397
|
-
case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$
|
|
5243
|
+
case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
|
|
5398
5244
|
case "invalid_value":
|
|
5399
5245
|
if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5400
5246
|
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5432,12 +5278,12 @@ const error$20 = () => {
|
|
|
5432
5278
|
};
|
|
5433
5279
|
};
|
|
5434
5280
|
function kh_default() {
|
|
5435
|
-
return { localeError: error$
|
|
5281
|
+
return { localeError: error$19() };
|
|
5436
5282
|
}
|
|
5437
5283
|
|
|
5438
5284
|
//#endregion
|
|
5439
|
-
//#region ../../node_modules/zod/v4/locales/ko.js
|
|
5440
|
-
const error$
|
|
5285
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
|
|
5286
|
+
const error$18 = () => {
|
|
5441
5287
|
const Sizable = {
|
|
5442
5288
|
string: {
|
|
5443
5289
|
unit: "문자",
|
|
@@ -5459,7 +5305,7 @@ const error$19 = () => {
|
|
|
5459
5305
|
function getSizing(origin) {
|
|
5460
5306
|
return Sizable[origin] ?? null;
|
|
5461
5307
|
}
|
|
5462
|
-
const parsedType$
|
|
5308
|
+
const parsedType$2 = (data) => {
|
|
5463
5309
|
const t = typeof data;
|
|
5464
5310
|
switch (t) {
|
|
5465
5311
|
case "number": {
|
|
@@ -5511,7 +5357,7 @@ const error$19 = () => {
|
|
|
5511
5357
|
};
|
|
5512
5358
|
return (issue$1) => {
|
|
5513
5359
|
switch (issue$1.code) {
|
|
5514
|
-
case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$
|
|
5360
|
+
case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
|
|
5515
5361
|
case "invalid_value":
|
|
5516
5362
|
if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
|
|
5517
5363
|
return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
|
|
@@ -5553,12 +5399,12 @@ const error$19 = () => {
|
|
|
5553
5399
|
};
|
|
5554
5400
|
};
|
|
5555
5401
|
function ko_default() {
|
|
5556
|
-
return { localeError: error$
|
|
5402
|
+
return { localeError: error$18() };
|
|
5557
5403
|
}
|
|
5558
5404
|
|
|
5559
5405
|
//#endregion
|
|
5560
|
-
//#region ../../node_modules/zod/v4/locales/mk.js
|
|
5561
|
-
const error$
|
|
5406
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
|
|
5407
|
+
const error$17 = () => {
|
|
5562
5408
|
const Sizable = {
|
|
5563
5409
|
string: {
|
|
5564
5410
|
unit: "знаци",
|
|
@@ -5580,7 +5426,7 @@ const error$18 = () => {
|
|
|
5580
5426
|
function getSizing(origin) {
|
|
5581
5427
|
return Sizable[origin] ?? null;
|
|
5582
5428
|
}
|
|
5583
|
-
const parsedType$
|
|
5429
|
+
const parsedType$2 = (data) => {
|
|
5584
5430
|
const t = typeof data;
|
|
5585
5431
|
switch (t) {
|
|
5586
5432
|
case "number": {
|
|
@@ -5632,7 +5478,7 @@ const error$18 = () => {
|
|
|
5632
5478
|
};
|
|
5633
5479
|
return (issue$1) => {
|
|
5634
5480
|
switch (issue$1.code) {
|
|
5635
|
-
case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$
|
|
5481
|
+
case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
|
|
5636
5482
|
case "invalid_value":
|
|
5637
5483
|
if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5638
5484
|
return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5670,12 +5516,12 @@ const error$18 = () => {
|
|
|
5670
5516
|
};
|
|
5671
5517
|
};
|
|
5672
5518
|
function mk_default() {
|
|
5673
|
-
return { localeError: error$
|
|
5519
|
+
return { localeError: error$17() };
|
|
5674
5520
|
}
|
|
5675
5521
|
|
|
5676
5522
|
//#endregion
|
|
5677
|
-
//#region ../../node_modules/zod/v4/locales/ms.js
|
|
5678
|
-
const error$
|
|
5523
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
|
|
5524
|
+
const error$16 = () => {
|
|
5679
5525
|
const Sizable = {
|
|
5680
5526
|
string: {
|
|
5681
5527
|
unit: "aksara",
|
|
@@ -5697,7 +5543,7 @@ const error$17 = () => {
|
|
|
5697
5543
|
function getSizing(origin) {
|
|
5698
5544
|
return Sizable[origin] ?? null;
|
|
5699
5545
|
}
|
|
5700
|
-
const parsedType$
|
|
5546
|
+
const parsedType$2 = (data) => {
|
|
5701
5547
|
const t = typeof data;
|
|
5702
5548
|
switch (t) {
|
|
5703
5549
|
case "number": {
|
|
@@ -5749,7 +5595,7 @@ const error$17 = () => {
|
|
|
5749
5595
|
};
|
|
5750
5596
|
return (issue$1) => {
|
|
5751
5597
|
switch (issue$1.code) {
|
|
5752
|
-
case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$
|
|
5598
|
+
case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
|
|
5753
5599
|
case "invalid_value":
|
|
5754
5600
|
if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5755
5601
|
return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5785,12 +5631,12 @@ const error$17 = () => {
|
|
|
5785
5631
|
};
|
|
5786
5632
|
};
|
|
5787
5633
|
function ms_default() {
|
|
5788
|
-
return { localeError: error$
|
|
5634
|
+
return { localeError: error$16() };
|
|
5789
5635
|
}
|
|
5790
5636
|
|
|
5791
5637
|
//#endregion
|
|
5792
|
-
//#region ../../node_modules/zod/v4/locales/nl.js
|
|
5793
|
-
const error$
|
|
5638
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
|
|
5639
|
+
const error$15 = () => {
|
|
5794
5640
|
const Sizable = {
|
|
5795
5641
|
string: { unit: "tekens" },
|
|
5796
5642
|
file: { unit: "bytes" },
|
|
@@ -5800,7 +5646,7 @@ const error$16 = () => {
|
|
|
5800
5646
|
function getSizing(origin) {
|
|
5801
5647
|
return Sizable[origin] ?? null;
|
|
5802
5648
|
}
|
|
5803
|
-
const parsedType$
|
|
5649
|
+
const parsedType$2 = (data) => {
|
|
5804
5650
|
const t = typeof data;
|
|
5805
5651
|
switch (t) {
|
|
5806
5652
|
case "number": {
|
|
@@ -5852,7 +5698,7 @@ const error$16 = () => {
|
|
|
5852
5698
|
};
|
|
5853
5699
|
return (issue$1) => {
|
|
5854
5700
|
switch (issue$1.code) {
|
|
5855
|
-
case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$
|
|
5701
|
+
case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
|
|
5856
5702
|
case "invalid_value":
|
|
5857
5703
|
if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5858
5704
|
return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5890,12 +5736,12 @@ const error$16 = () => {
|
|
|
5890
5736
|
};
|
|
5891
5737
|
};
|
|
5892
5738
|
function nl_default() {
|
|
5893
|
-
return { localeError: error$
|
|
5739
|
+
return { localeError: error$15() };
|
|
5894
5740
|
}
|
|
5895
5741
|
|
|
5896
5742
|
//#endregion
|
|
5897
|
-
//#region ../../node_modules/zod/v4/locales/no.js
|
|
5898
|
-
const error$
|
|
5743
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/no.js
|
|
5744
|
+
const error$14 = () => {
|
|
5899
5745
|
const Sizable = {
|
|
5900
5746
|
string: {
|
|
5901
5747
|
unit: "tegn",
|
|
@@ -5917,7 +5763,7 @@ const error$15 = () => {
|
|
|
5917
5763
|
function getSizing(origin) {
|
|
5918
5764
|
return Sizable[origin] ?? null;
|
|
5919
5765
|
}
|
|
5920
|
-
const parsedType$
|
|
5766
|
+
const parsedType$2 = (data) => {
|
|
5921
5767
|
const t = typeof data;
|
|
5922
5768
|
switch (t) {
|
|
5923
5769
|
case "number": {
|
|
@@ -5969,7 +5815,7 @@ const error$15 = () => {
|
|
|
5969
5815
|
};
|
|
5970
5816
|
return (issue$1) => {
|
|
5971
5817
|
switch (issue$1.code) {
|
|
5972
|
-
case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$
|
|
5818
|
+
case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
|
|
5973
5819
|
case "invalid_value":
|
|
5974
5820
|
if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5975
5821
|
return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6005,12 +5851,12 @@ const error$15 = () => {
|
|
|
6005
5851
|
};
|
|
6006
5852
|
};
|
|
6007
5853
|
function no_default() {
|
|
6008
|
-
return { localeError: error$
|
|
5854
|
+
return { localeError: error$14() };
|
|
6009
5855
|
}
|
|
6010
5856
|
|
|
6011
5857
|
//#endregion
|
|
6012
|
-
//#region ../../node_modules/zod/v4/locales/ota.js
|
|
6013
|
-
const error$
|
|
5858
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
|
|
5859
|
+
const error$13 = () => {
|
|
6014
5860
|
const Sizable = {
|
|
6015
5861
|
string: {
|
|
6016
5862
|
unit: "harf",
|
|
@@ -6032,7 +5878,7 @@ const error$14 = () => {
|
|
|
6032
5878
|
function getSizing(origin) {
|
|
6033
5879
|
return Sizable[origin] ?? null;
|
|
6034
5880
|
}
|
|
6035
|
-
const parsedType$
|
|
5881
|
+
const parsedType$2 = (data) => {
|
|
6036
5882
|
const t = typeof data;
|
|
6037
5883
|
switch (t) {
|
|
6038
5884
|
case "number": {
|
|
@@ -6084,7 +5930,7 @@ const error$14 = () => {
|
|
|
6084
5930
|
};
|
|
6085
5931
|
return (issue$1) => {
|
|
6086
5932
|
switch (issue$1.code) {
|
|
6087
|
-
case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$
|
|
5933
|
+
case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
|
|
6088
5934
|
case "invalid_value":
|
|
6089
5935
|
if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6090
5936
|
return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6120,138 +5966,11 @@ const error$14 = () => {
|
|
|
6120
5966
|
};
|
|
6121
5967
|
};
|
|
6122
5968
|
function ota_default() {
|
|
6123
|
-
return { localeError: error$14() };
|
|
6124
|
-
}
|
|
6125
|
-
|
|
6126
|
-
//#endregion
|
|
6127
|
-
//#region ../../node_modules/zod/v4/locales/ps.js
|
|
6128
|
-
const error$13 = () => {
|
|
6129
|
-
const Sizable = {
|
|
6130
|
-
string: {
|
|
6131
|
-
unit: "توکي",
|
|
6132
|
-
verb: "ولري"
|
|
6133
|
-
},
|
|
6134
|
-
file: {
|
|
6135
|
-
unit: "بایټس",
|
|
6136
|
-
verb: "ولري"
|
|
6137
|
-
},
|
|
6138
|
-
array: {
|
|
6139
|
-
unit: "توکي",
|
|
6140
|
-
verb: "ولري"
|
|
6141
|
-
},
|
|
6142
|
-
set: {
|
|
6143
|
-
unit: "توکي",
|
|
6144
|
-
verb: "ولري"
|
|
6145
|
-
}
|
|
6146
|
-
};
|
|
6147
|
-
function getSizing(origin) {
|
|
6148
|
-
return Sizable[origin] ?? null;
|
|
6149
|
-
}
|
|
6150
|
-
const parsedType$3 = (data) => {
|
|
6151
|
-
const t = typeof data;
|
|
6152
|
-
switch (t) {
|
|
6153
|
-
case "number": {
|
|
6154
|
-
return Number.isNaN(data) ? "NaN" : "عدد";
|
|
6155
|
-
}
|
|
6156
|
-
case "object": {
|
|
6157
|
-
if (Array.isArray(data)) {
|
|
6158
|
-
return "ارې";
|
|
6159
|
-
}
|
|
6160
|
-
if (data === null) {
|
|
6161
|
-
return "null";
|
|
6162
|
-
}
|
|
6163
|
-
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
6164
|
-
return data.constructor.name;
|
|
6165
|
-
}
|
|
6166
|
-
}
|
|
6167
|
-
}
|
|
6168
|
-
return t;
|
|
6169
|
-
};
|
|
6170
|
-
const Nouns = {
|
|
6171
|
-
regex: "ورودي",
|
|
6172
|
-
email: "بریښنالیک",
|
|
6173
|
-
url: "یو آر ال",
|
|
6174
|
-
emoji: "ایموجي",
|
|
6175
|
-
uuid: "UUID",
|
|
6176
|
-
uuidv4: "UUIDv4",
|
|
6177
|
-
uuidv6: "UUIDv6",
|
|
6178
|
-
nanoid: "nanoid",
|
|
6179
|
-
guid: "GUID",
|
|
6180
|
-
cuid: "cuid",
|
|
6181
|
-
cuid2: "cuid2",
|
|
6182
|
-
ulid: "ULID",
|
|
6183
|
-
xid: "XID",
|
|
6184
|
-
ksuid: "KSUID",
|
|
6185
|
-
datetime: "نیټه او وخت",
|
|
6186
|
-
date: "نېټه",
|
|
6187
|
-
time: "وخت",
|
|
6188
|
-
duration: "موده",
|
|
6189
|
-
ipv4: "د IPv4 پته",
|
|
6190
|
-
ipv6: "د IPv6 پته",
|
|
6191
|
-
cidrv4: "د IPv4 ساحه",
|
|
6192
|
-
cidrv6: "د IPv6 ساحه",
|
|
6193
|
-
base64: "base64-encoded متن",
|
|
6194
|
-
base64url: "base64url-encoded متن",
|
|
6195
|
-
json_string: "JSON متن",
|
|
6196
|
-
e164: "د E.164 شمېره",
|
|
6197
|
-
jwt: "JWT",
|
|
6198
|
-
template_literal: "ورودي"
|
|
6199
|
-
};
|
|
6200
|
-
return (issue$1) => {
|
|
6201
|
-
switch (issue$1.code) {
|
|
6202
|
-
case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
|
|
6203
|
-
case "invalid_value":
|
|
6204
|
-
if (issue$1.values.length === 1) {
|
|
6205
|
-
return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
|
|
6206
|
-
}
|
|
6207
|
-
return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
|
|
6208
|
-
case "too_big": {
|
|
6209
|
-
const adj = issue$1.inclusive ? "<=" : "<";
|
|
6210
|
-
const sizing = getSizing(issue$1.origin);
|
|
6211
|
-
if (sizing) {
|
|
6212
|
-
return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
|
|
6213
|
-
}
|
|
6214
|
-
return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
|
|
6215
|
-
}
|
|
6216
|
-
case "too_small": {
|
|
6217
|
-
const adj = issue$1.inclusive ? ">=" : ">";
|
|
6218
|
-
const sizing = getSizing(issue$1.origin);
|
|
6219
|
-
if (sizing) {
|
|
6220
|
-
return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
|
|
6221
|
-
}
|
|
6222
|
-
return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
|
|
6223
|
-
}
|
|
6224
|
-
case "invalid_format": {
|
|
6225
|
-
const _issue = issue$1;
|
|
6226
|
-
if (_issue.format === "starts_with") {
|
|
6227
|
-
return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
|
|
6228
|
-
}
|
|
6229
|
-
if (_issue.format === "ends_with") {
|
|
6230
|
-
return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
|
|
6231
|
-
}
|
|
6232
|
-
if (_issue.format === "includes") {
|
|
6233
|
-
return `ناسم متن: باید "${_issue.includes}" ولري`;
|
|
6234
|
-
}
|
|
6235
|
-
if (_issue.format === "regex") {
|
|
6236
|
-
return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
|
|
6237
|
-
}
|
|
6238
|
-
return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
|
|
6239
|
-
}
|
|
6240
|
-
case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
|
|
6241
|
-
case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
|
|
6242
|
-
case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
|
|
6243
|
-
case "invalid_union": return `ناسمه ورودي`;
|
|
6244
|
-
case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
|
|
6245
|
-
default: return `ناسمه ورودي`;
|
|
6246
|
-
}
|
|
6247
|
-
};
|
|
6248
|
-
};
|
|
6249
|
-
function ps_default() {
|
|
6250
5969
|
return { localeError: error$13() };
|
|
6251
5970
|
}
|
|
6252
5971
|
|
|
6253
5972
|
//#endregion
|
|
6254
|
-
//#region ../../node_modules/zod/v4/locales/pl.js
|
|
5973
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
|
|
6255
5974
|
const error$12 = () => {
|
|
6256
5975
|
const Sizable = {
|
|
6257
5976
|
string: {
|
|
@@ -6274,7 +5993,7 @@ const error$12 = () => {
|
|
|
6274
5993
|
function getSizing(origin) {
|
|
6275
5994
|
return Sizable[origin] ?? null;
|
|
6276
5995
|
}
|
|
6277
|
-
const parsedType$
|
|
5996
|
+
const parsedType$2 = (data) => {
|
|
6278
5997
|
const t = typeof data;
|
|
6279
5998
|
switch (t) {
|
|
6280
5999
|
case "number": {
|
|
@@ -6326,7 +6045,7 @@ const error$12 = () => {
|
|
|
6326
6045
|
};
|
|
6327
6046
|
return (issue$1) => {
|
|
6328
6047
|
switch (issue$1.code) {
|
|
6329
|
-
case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$
|
|
6048
|
+
case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
|
|
6330
6049
|
case "invalid_value":
|
|
6331
6050
|
if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6332
6051
|
return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6368,7 +6087,7 @@ function pl_default() {
|
|
|
6368
6087
|
}
|
|
6369
6088
|
|
|
6370
6089
|
//#endregion
|
|
6371
|
-
//#region ../../node_modules/zod/v4/locales/pt.js
|
|
6090
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
|
|
6372
6091
|
const error$11 = () => {
|
|
6373
6092
|
const Sizable = {
|
|
6374
6093
|
string: {
|
|
@@ -6391,7 +6110,7 @@ const error$11 = () => {
|
|
|
6391
6110
|
function getSizing(origin) {
|
|
6392
6111
|
return Sizable[origin] ?? null;
|
|
6393
6112
|
}
|
|
6394
|
-
const parsedType$
|
|
6113
|
+
const parsedType$2 = (data) => {
|
|
6395
6114
|
const t = typeof data;
|
|
6396
6115
|
switch (t) {
|
|
6397
6116
|
case "number": {
|
|
@@ -6443,7 +6162,7 @@ const error$11 = () => {
|
|
|
6443
6162
|
};
|
|
6444
6163
|
return (issue$1) => {
|
|
6445
6164
|
switch (issue$1.code) {
|
|
6446
|
-
case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$
|
|
6165
|
+
case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
|
|
6447
6166
|
case "invalid_value":
|
|
6448
6167
|
if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6449
6168
|
return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6483,7 +6202,7 @@ function pt_default() {
|
|
|
6483
6202
|
}
|
|
6484
6203
|
|
|
6485
6204
|
//#endregion
|
|
6486
|
-
//#region ../../node_modules/zod/v4/locales/ru.js
|
|
6205
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
|
|
6487
6206
|
function getRussianPlural(count, one, few, many) {
|
|
6488
6207
|
const absCount = Math.abs(count);
|
|
6489
6208
|
const lastDigit = absCount % 10;
|
|
@@ -6537,7 +6256,7 @@ const error$10 = () => {
|
|
|
6537
6256
|
function getSizing(origin) {
|
|
6538
6257
|
return Sizable[origin] ?? null;
|
|
6539
6258
|
}
|
|
6540
|
-
const parsedType$
|
|
6259
|
+
const parsedType$2 = (data) => {
|
|
6541
6260
|
const t = typeof data;
|
|
6542
6261
|
switch (t) {
|
|
6543
6262
|
case "number": {
|
|
@@ -6589,7 +6308,7 @@ const error$10 = () => {
|
|
|
6589
6308
|
};
|
|
6590
6309
|
return (issue$1) => {
|
|
6591
6310
|
switch (issue$1.code) {
|
|
6592
|
-
case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$
|
|
6311
|
+
case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
|
|
6593
6312
|
case "invalid_value":
|
|
6594
6313
|
if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6595
6314
|
return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6635,7 +6354,7 @@ function ru_default() {
|
|
|
6635
6354
|
}
|
|
6636
6355
|
|
|
6637
6356
|
//#endregion
|
|
6638
|
-
//#region ../../node_modules/zod/v4/locales/sl.js
|
|
6357
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
|
|
6639
6358
|
const error$9 = () => {
|
|
6640
6359
|
const Sizable = {
|
|
6641
6360
|
string: {
|
|
@@ -6658,7 +6377,7 @@ const error$9 = () => {
|
|
|
6658
6377
|
function getSizing(origin) {
|
|
6659
6378
|
return Sizable[origin] ?? null;
|
|
6660
6379
|
}
|
|
6661
|
-
const parsedType$
|
|
6380
|
+
const parsedType$2 = (data) => {
|
|
6662
6381
|
const t = typeof data;
|
|
6663
6382
|
switch (t) {
|
|
6664
6383
|
case "number": {
|
|
@@ -6710,7 +6429,7 @@ const error$9 = () => {
|
|
|
6710
6429
|
};
|
|
6711
6430
|
return (issue$1) => {
|
|
6712
6431
|
switch (issue$1.code) {
|
|
6713
|
-
case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$
|
|
6432
|
+
case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
|
|
6714
6433
|
case "invalid_value":
|
|
6715
6434
|
if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6716
6435
|
return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6752,7 +6471,7 @@ function sl_default() {
|
|
|
6752
6471
|
}
|
|
6753
6472
|
|
|
6754
6473
|
//#endregion
|
|
6755
|
-
//#region ../../node_modules/zod/v4/locales/sv.js
|
|
6474
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
|
|
6756
6475
|
const error$8 = () => {
|
|
6757
6476
|
const Sizable = {
|
|
6758
6477
|
string: {
|
|
@@ -6775,7 +6494,7 @@ const error$8 = () => {
|
|
|
6775
6494
|
function getSizing(origin) {
|
|
6776
6495
|
return Sizable[origin] ?? null;
|
|
6777
6496
|
}
|
|
6778
|
-
const parsedType$
|
|
6497
|
+
const parsedType$2 = (data) => {
|
|
6779
6498
|
const t = typeof data;
|
|
6780
6499
|
switch (t) {
|
|
6781
6500
|
case "number": {
|
|
@@ -6827,7 +6546,7 @@ const error$8 = () => {
|
|
|
6827
6546
|
};
|
|
6828
6547
|
return (issue$1) => {
|
|
6829
6548
|
switch (issue$1.code) {
|
|
6830
|
-
case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$
|
|
6549
|
+
case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
|
|
6831
6550
|
case "invalid_value":
|
|
6832
6551
|
if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6833
6552
|
return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6871,7 +6590,7 @@ function sv_default() {
|
|
|
6871
6590
|
}
|
|
6872
6591
|
|
|
6873
6592
|
//#endregion
|
|
6874
|
-
//#region ../../node_modules/zod/v4/locales/ta.js
|
|
6593
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
|
|
6875
6594
|
const error$7 = () => {
|
|
6876
6595
|
const Sizable = {
|
|
6877
6596
|
string: {
|
|
@@ -6894,7 +6613,7 @@ const error$7 = () => {
|
|
|
6894
6613
|
function getSizing(origin) {
|
|
6895
6614
|
return Sizable[origin] ?? null;
|
|
6896
6615
|
}
|
|
6897
|
-
const parsedType$
|
|
6616
|
+
const parsedType$2 = (data) => {
|
|
6898
6617
|
const t = typeof data;
|
|
6899
6618
|
switch (t) {
|
|
6900
6619
|
case "number": {
|
|
@@ -6946,7 +6665,7 @@ const error$7 = () => {
|
|
|
6946
6665
|
};
|
|
6947
6666
|
return (issue$1) => {
|
|
6948
6667
|
switch (issue$1.code) {
|
|
6949
|
-
case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$
|
|
6668
|
+
case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
|
|
6950
6669
|
case "invalid_value":
|
|
6951
6670
|
if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6952
6671
|
return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
|
|
@@ -6988,7 +6707,7 @@ function ta_default() {
|
|
|
6988
6707
|
}
|
|
6989
6708
|
|
|
6990
6709
|
//#endregion
|
|
6991
|
-
//#region ../../node_modules/zod/v4/locales/th.js
|
|
6710
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/th.js
|
|
6992
6711
|
const error$6 = () => {
|
|
6993
6712
|
const Sizable = {
|
|
6994
6713
|
string: {
|
|
@@ -7011,7 +6730,7 @@ const error$6 = () => {
|
|
|
7011
6730
|
function getSizing(origin) {
|
|
7012
6731
|
return Sizable[origin] ?? null;
|
|
7013
6732
|
}
|
|
7014
|
-
const parsedType$
|
|
6733
|
+
const parsedType$2 = (data) => {
|
|
7015
6734
|
const t = typeof data;
|
|
7016
6735
|
switch (t) {
|
|
7017
6736
|
case "number": {
|
|
@@ -7063,7 +6782,7 @@ const error$6 = () => {
|
|
|
7063
6782
|
};
|
|
7064
6783
|
return (issue$1) => {
|
|
7065
6784
|
switch (issue$1.code) {
|
|
7066
|
-
case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$
|
|
6785
|
+
case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
|
|
7067
6786
|
case "invalid_value":
|
|
7068
6787
|
if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7069
6788
|
return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7105,7 +6824,7 @@ function th_default() {
|
|
|
7105
6824
|
}
|
|
7106
6825
|
|
|
7107
6826
|
//#endregion
|
|
7108
|
-
//#region ../../node_modules/zod/v4/locales/tr.js
|
|
6827
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
|
|
7109
6828
|
const parsedType = (data) => {
|
|
7110
6829
|
const t = typeof data;
|
|
7111
6830
|
switch (t) {
|
|
@@ -7218,7 +6937,7 @@ function tr_default() {
|
|
|
7218
6937
|
}
|
|
7219
6938
|
|
|
7220
6939
|
//#endregion
|
|
7221
|
-
//#region ../../node_modules/zod/v4/locales/ua.js
|
|
6940
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
|
|
7222
6941
|
const error$4 = () => {
|
|
7223
6942
|
const Sizable = {
|
|
7224
6943
|
string: {
|
|
@@ -7241,7 +6960,7 @@ const error$4 = () => {
|
|
|
7241
6960
|
function getSizing(origin) {
|
|
7242
6961
|
return Sizable[origin] ?? null;
|
|
7243
6962
|
}
|
|
7244
|
-
const parsedType$
|
|
6963
|
+
const parsedType$2 = (data) => {
|
|
7245
6964
|
const t = typeof data;
|
|
7246
6965
|
switch (t) {
|
|
7247
6966
|
case "number": {
|
|
@@ -7293,7 +7012,7 @@ const error$4 = () => {
|
|
|
7293
7012
|
};
|
|
7294
7013
|
return (issue$1) => {
|
|
7295
7014
|
switch (issue$1.code) {
|
|
7296
|
-
case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$
|
|
7015
|
+
case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
|
|
7297
7016
|
case "invalid_value":
|
|
7298
7017
|
if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7299
7018
|
return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7333,7 +7052,7 @@ function ua_default() {
|
|
|
7333
7052
|
}
|
|
7334
7053
|
|
|
7335
7054
|
//#endregion
|
|
7336
|
-
//#region ../../node_modules/zod/v4/locales/ur.js
|
|
7055
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
|
|
7337
7056
|
const error$3 = () => {
|
|
7338
7057
|
const Sizable = {
|
|
7339
7058
|
string: {
|
|
@@ -7356,7 +7075,7 @@ const error$3 = () => {
|
|
|
7356
7075
|
function getSizing(origin) {
|
|
7357
7076
|
return Sizable[origin] ?? null;
|
|
7358
7077
|
}
|
|
7359
|
-
const parsedType$
|
|
7078
|
+
const parsedType$2 = (data) => {
|
|
7360
7079
|
const t = typeof data;
|
|
7361
7080
|
switch (t) {
|
|
7362
7081
|
case "number": {
|
|
@@ -7408,7 +7127,7 @@ const error$3 = () => {
|
|
|
7408
7127
|
};
|
|
7409
7128
|
return (issue$1) => {
|
|
7410
7129
|
switch (issue$1.code) {
|
|
7411
|
-
case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$
|
|
7130
|
+
case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
|
|
7412
7131
|
case "invalid_value":
|
|
7413
7132
|
if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
|
|
7414
7133
|
return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
|
|
@@ -7450,7 +7169,7 @@ function ur_default() {
|
|
|
7450
7169
|
}
|
|
7451
7170
|
|
|
7452
7171
|
//#endregion
|
|
7453
|
-
//#region ../../node_modules/zod/v4/locales/vi.js
|
|
7172
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
|
|
7454
7173
|
const error$2 = () => {
|
|
7455
7174
|
const Sizable = {
|
|
7456
7175
|
string: {
|
|
@@ -7473,7 +7192,7 @@ const error$2 = () => {
|
|
|
7473
7192
|
function getSizing(origin) {
|
|
7474
7193
|
return Sizable[origin] ?? null;
|
|
7475
7194
|
}
|
|
7476
|
-
const parsedType$
|
|
7195
|
+
const parsedType$2 = (data) => {
|
|
7477
7196
|
const t = typeof data;
|
|
7478
7197
|
switch (t) {
|
|
7479
7198
|
case "number": {
|
|
@@ -7525,7 +7244,7 @@ const error$2 = () => {
|
|
|
7525
7244
|
};
|
|
7526
7245
|
return (issue$1) => {
|
|
7527
7246
|
switch (issue$1.code) {
|
|
7528
|
-
case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$
|
|
7247
|
+
case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$2(issue$1.input)}`;
|
|
7529
7248
|
case "invalid_value":
|
|
7530
7249
|
if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7531
7250
|
return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7565,7 +7284,7 @@ function vi_default() {
|
|
|
7565
7284
|
}
|
|
7566
7285
|
|
|
7567
7286
|
//#endregion
|
|
7568
|
-
//#region ../../node_modules/zod/v4/locales/zh-CN.js
|
|
7287
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
|
|
7569
7288
|
const error$1 = () => {
|
|
7570
7289
|
const Sizable = {
|
|
7571
7290
|
string: {
|
|
@@ -7588,7 +7307,7 @@ const error$1 = () => {
|
|
|
7588
7307
|
function getSizing(origin) {
|
|
7589
7308
|
return Sizable[origin] ?? null;
|
|
7590
7309
|
}
|
|
7591
|
-
const parsedType$
|
|
7310
|
+
const parsedType$2 = (data) => {
|
|
7592
7311
|
const t = typeof data;
|
|
7593
7312
|
switch (t) {
|
|
7594
7313
|
case "number": {
|
|
@@ -7640,7 +7359,7 @@ const error$1 = () => {
|
|
|
7640
7359
|
};
|
|
7641
7360
|
return (issue$1) => {
|
|
7642
7361
|
switch (issue$1.code) {
|
|
7643
|
-
case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$
|
|
7362
|
+
case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
|
|
7644
7363
|
case "invalid_value":
|
|
7645
7364
|
if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7646
7365
|
return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7680,7 +7399,7 @@ function zh_CN_default() {
|
|
|
7680
7399
|
}
|
|
7681
7400
|
|
|
7682
7401
|
//#endregion
|
|
7683
|
-
//#region ../../node_modules/zod/v4/locales/zh-TW.js
|
|
7402
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
|
|
7684
7403
|
const error = () => {
|
|
7685
7404
|
const Sizable = {
|
|
7686
7405
|
string: {
|
|
@@ -7703,7 +7422,7 @@ const error = () => {
|
|
|
7703
7422
|
function getSizing(origin) {
|
|
7704
7423
|
return Sizable[origin] ?? null;
|
|
7705
7424
|
}
|
|
7706
|
-
const parsedType$
|
|
7425
|
+
const parsedType$2 = (data) => {
|
|
7707
7426
|
const t = typeof data;
|
|
7708
7427
|
switch (t) {
|
|
7709
7428
|
case "number": {
|
|
@@ -7755,7 +7474,7 @@ const error = () => {
|
|
|
7755
7474
|
};
|
|
7756
7475
|
return (issue$1) => {
|
|
7757
7476
|
switch (issue$1.code) {
|
|
7758
|
-
case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$
|
|
7477
|
+
case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
|
|
7759
7478
|
case "invalid_value":
|
|
7760
7479
|
if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7761
7480
|
return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7797,7 +7516,7 @@ function zh_TW_default() {
|
|
|
7797
7516
|
}
|
|
7798
7517
|
|
|
7799
7518
|
//#endregion
|
|
7800
|
-
//#region ../../node_modules/zod/v4/locales/index.js
|
|
7519
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/index.js
|
|
7801
7520
|
var locales_exports = {};
|
|
7802
7521
|
__export(locales_exports, {
|
|
7803
7522
|
ar: () => ar_default,
|
|
@@ -7807,7 +7526,6 @@ __export(locales_exports, {
|
|
|
7807
7526
|
cs: () => cs_default,
|
|
7808
7527
|
de: () => de_default,
|
|
7809
7528
|
en: () => en_default,
|
|
7810
|
-
eo: () => eo_default,
|
|
7811
7529
|
es: () => es_default,
|
|
7812
7530
|
fa: () => fa_default,
|
|
7813
7531
|
fi: () => fi_default,
|
|
@@ -7826,7 +7544,6 @@ __export(locales_exports, {
|
|
|
7826
7544
|
no: () => no_default,
|
|
7827
7545
|
ota: () => ota_default,
|
|
7828
7546
|
pl: () => pl_default,
|
|
7829
|
-
ps: () => ps_default,
|
|
7830
7547
|
pt: () => pt_default,
|
|
7831
7548
|
ru: () => ru_default,
|
|
7832
7549
|
sl: () => sl_default,
|
|
@@ -7842,12 +7559,12 @@ __export(locales_exports, {
|
|
|
7842
7559
|
});
|
|
7843
7560
|
|
|
7844
7561
|
//#endregion
|
|
7845
|
-
//#region ../../node_modules/zod/v4/core/registries.js
|
|
7562
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/registries.js
|
|
7846
7563
|
const $output = Symbol("ZodOutput");
|
|
7847
7564
|
const $input = Symbol("ZodInput");
|
|
7848
7565
|
var $ZodRegistry = class {
|
|
7849
7566
|
constructor() {
|
|
7850
|
-
this._map = new
|
|
7567
|
+
this._map = new WeakMap();
|
|
7851
7568
|
this._idmap = new Map();
|
|
7852
7569
|
}
|
|
7853
7570
|
add(schema, ..._meta) {
|
|
@@ -7861,16 +7578,7 @@ var $ZodRegistry = class {
|
|
|
7861
7578
|
}
|
|
7862
7579
|
return this;
|
|
7863
7580
|
}
|
|
7864
|
-
clear() {
|
|
7865
|
-
this._map = new Map();
|
|
7866
|
-
this._idmap = new Map();
|
|
7867
|
-
return this;
|
|
7868
|
-
}
|
|
7869
7581
|
remove(schema) {
|
|
7870
|
-
const meta = this._map.get(schema);
|
|
7871
|
-
if (meta && typeof meta === "object" && "id" in meta) {
|
|
7872
|
-
this._idmap.delete(meta.id);
|
|
7873
|
-
}
|
|
7874
7582
|
this._map.delete(schema);
|
|
7875
7583
|
return this;
|
|
7876
7584
|
}
|
|
@@ -7896,7 +7604,7 @@ function registry() {
|
|
|
7896
7604
|
const globalRegistry = /* @__PURE__ */ registry();
|
|
7897
7605
|
|
|
7898
7606
|
//#endregion
|
|
7899
|
-
//#region ../../node_modules/zod/v4/core/api.js
|
|
7607
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/api.js
|
|
7900
7608
|
function _string(Class$1, params) {
|
|
7901
7609
|
return new Class$1({
|
|
7902
7610
|
type: "string",
|
|
@@ -8111,13 +7819,6 @@ function _jwt(Class$1, params) {
|
|
|
8111
7819
|
...normalizeParams(params)
|
|
8112
7820
|
});
|
|
8113
7821
|
}
|
|
8114
|
-
const TimePrecision = {
|
|
8115
|
-
Any: null,
|
|
8116
|
-
Minute: -1,
|
|
8117
|
-
Second: 0,
|
|
8118
|
-
Millisecond: 3,
|
|
8119
|
-
Microsecond: 6
|
|
8120
|
-
};
|
|
8121
7822
|
function _isoDateTime(Class$1, params) {
|
|
8122
7823
|
return new Class$1({
|
|
8123
7824
|
type: "string",
|
|
@@ -8684,8 +8385,8 @@ function _refine(Class$1, fn, _params) {
|
|
|
8684
8385
|
return schema;
|
|
8685
8386
|
}
|
|
8686
8387
|
function _stringbool(Classes, _params) {
|
|
8687
|
-
const
|
|
8688
|
-
let truthyArray =
|
|
8388
|
+
const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
|
|
8389
|
+
let truthyArray = truthy ?? [
|
|
8689
8390
|
"true",
|
|
8690
8391
|
"1",
|
|
8691
8392
|
"yes",
|
|
@@ -8693,7 +8394,7 @@ function _stringbool(Classes, _params) {
|
|
|
8693
8394
|
"y",
|
|
8694
8395
|
"enabled"
|
|
8695
8396
|
];
|
|
8696
|
-
let falsyArray =
|
|
8397
|
+
let falsyArray = falsy ?? [
|
|
8697
8398
|
"false",
|
|
8698
8399
|
"0",
|
|
8699
8400
|
"no",
|
|
@@ -8701,7 +8402,7 @@ function _stringbool(Classes, _params) {
|
|
|
8701
8402
|
"n",
|
|
8702
8403
|
"disabled"
|
|
8703
8404
|
];
|
|
8704
|
-
if (
|
|
8405
|
+
if (_case !== "sensitive") {
|
|
8705
8406
|
truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
|
|
8706
8407
|
falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
|
|
8707
8408
|
}
|
|
@@ -8715,7 +8416,7 @@ function _stringbool(Classes, _params) {
|
|
|
8715
8416
|
type: "transform",
|
|
8716
8417
|
transform: (input, payload) => {
|
|
8717
8418
|
let data = input;
|
|
8718
|
-
if (
|
|
8419
|
+
if (_case !== "sensitive") data = data.toLowerCase();
|
|
8719
8420
|
if (truthySet.has(data)) {
|
|
8720
8421
|
return true;
|
|
8721
8422
|
} else if (falsySet.has(data)) {
|
|
@@ -8731,47 +8432,31 @@ function _stringbool(Classes, _params) {
|
|
|
8731
8432
|
return {};
|
|
8732
8433
|
}
|
|
8733
8434
|
},
|
|
8734
|
-
error:
|
|
8435
|
+
error: error$37
|
|
8735
8436
|
});
|
|
8736
8437
|
const innerPipe = new _Pipe({
|
|
8737
8438
|
type: "pipe",
|
|
8738
8439
|
in: new _String({
|
|
8739
8440
|
type: "string",
|
|
8740
|
-
error:
|
|
8441
|
+
error: error$37
|
|
8741
8442
|
}),
|
|
8742
8443
|
out: tx,
|
|
8743
|
-
error:
|
|
8444
|
+
error: error$37
|
|
8744
8445
|
});
|
|
8745
8446
|
const outerPipe = new _Pipe({
|
|
8746
8447
|
type: "pipe",
|
|
8747
8448
|
in: innerPipe,
|
|
8748
8449
|
out: new _Boolean({
|
|
8749
8450
|
type: "boolean",
|
|
8750
|
-
error:
|
|
8451
|
+
error: error$37
|
|
8751
8452
|
}),
|
|
8752
|
-
error:
|
|
8453
|
+
error: error$37
|
|
8753
8454
|
});
|
|
8754
8455
|
return outerPipe;
|
|
8755
8456
|
}
|
|
8756
|
-
function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
|
|
8757
|
-
const params = normalizeParams(_params);
|
|
8758
|
-
const def = {
|
|
8759
|
-
...normalizeParams(_params),
|
|
8760
|
-
check: "string_format",
|
|
8761
|
-
type: "string",
|
|
8762
|
-
format,
|
|
8763
|
-
fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
|
|
8764
|
-
...params
|
|
8765
|
-
};
|
|
8766
|
-
if (fnOrRegex instanceof RegExp) {
|
|
8767
|
-
def.pattern = fnOrRegex;
|
|
8768
|
-
}
|
|
8769
|
-
const inst = new Class$1(def);
|
|
8770
|
-
return inst;
|
|
8771
|
-
}
|
|
8772
8457
|
|
|
8773
8458
|
//#endregion
|
|
8774
|
-
//#region ../../node_modules/zod/v4/core/function.js
|
|
8459
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/function.js
|
|
8775
8460
|
var $ZodFunction = class {
|
|
8776
8461
|
constructor(def) {
|
|
8777
8462
|
this._def = def;
|
|
@@ -8842,7 +8527,7 @@ function _function(params) {
|
|
|
8842
8527
|
}
|
|
8843
8528
|
|
|
8844
8529
|
//#endregion
|
|
8845
|
-
//#region ../../node_modules/zod/v4/core/to-json-schema.js
|
|
8530
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
|
|
8846
8531
|
var JSONSchemaGenerator = class {
|
|
8847
8532
|
constructor(params) {
|
|
8848
8533
|
this.counter = 0;
|
|
@@ -8878,435 +8563,431 @@ var JSONSchemaGenerator = class {
|
|
|
8878
8563
|
const result = {
|
|
8879
8564
|
schema: {},
|
|
8880
8565
|
count: 1,
|
|
8881
|
-
cycle: undefined
|
|
8882
|
-
path: _params.path
|
|
8566
|
+
cycle: undefined
|
|
8883
8567
|
};
|
|
8884
8568
|
this.seen.set(schema, result);
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8569
|
+
if (schema._zod.toJSONSchema) {
|
|
8570
|
+
result.schema = schema._zod.toJSONSchema();
|
|
8571
|
+
}
|
|
8572
|
+
const params = {
|
|
8573
|
+
..._params,
|
|
8574
|
+
schemaPath: [..._params.schemaPath, schema],
|
|
8575
|
+
path: _params.path
|
|
8576
|
+
};
|
|
8577
|
+
const parent = schema._zod.parent;
|
|
8578
|
+
if (parent) {
|
|
8579
|
+
result.ref = parent;
|
|
8580
|
+
this.process(parent, params);
|
|
8581
|
+
this.seen.get(parent).isParent = true;
|
|
8888
8582
|
} else {
|
|
8889
|
-
const
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
const _json = result.schema;
|
|
8901
|
-
switch (def.type) {
|
|
8902
|
-
case "string": {
|
|
8903
|
-
const json$1 = _json;
|
|
8904
|
-
json$1.type = "string";
|
|
8905
|
-
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
8906
|
-
if (typeof minimum === "number") json$1.minLength = minimum;
|
|
8907
|
-
if (typeof maximum === "number") json$1.maxLength = maximum;
|
|
8908
|
-
if (format) {
|
|
8909
|
-
json$1.format = formatMap[format] ?? format;
|
|
8910
|
-
if (json$1.format === "") delete json$1.format;
|
|
8911
|
-
}
|
|
8912
|
-
if (contentEncoding) json$1.contentEncoding = contentEncoding;
|
|
8913
|
-
if (patterns && patterns.size > 0) {
|
|
8914
|
-
const regexes = [...patterns];
|
|
8915
|
-
if (regexes.length === 1) json$1.pattern = regexes[0].source;
|
|
8916
|
-
else if (regexes.length > 1) {
|
|
8917
|
-
result.schema.allOf = [...regexes.map((regex) => ({
|
|
8918
|
-
...this.target === "draft-7" ? { type: "string" } : {},
|
|
8919
|
-
pattern: regex.source
|
|
8920
|
-
}))];
|
|
8921
|
-
}
|
|
8922
|
-
}
|
|
8923
|
-
break;
|
|
8924
|
-
}
|
|
8925
|
-
case "number": {
|
|
8926
|
-
const json$1 = _json;
|
|
8927
|
-
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
8928
|
-
if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
|
|
8929
|
-
else json$1.type = "number";
|
|
8930
|
-
if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
|
|
8931
|
-
if (typeof minimum === "number") {
|
|
8932
|
-
json$1.minimum = minimum;
|
|
8933
|
-
if (typeof exclusiveMinimum === "number") {
|
|
8934
|
-
if (exclusiveMinimum >= minimum) delete json$1.minimum;
|
|
8935
|
-
else delete json$1.exclusiveMinimum;
|
|
8936
|
-
}
|
|
8937
|
-
}
|
|
8938
|
-
if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
|
|
8939
|
-
if (typeof maximum === "number") {
|
|
8940
|
-
json$1.maximum = maximum;
|
|
8941
|
-
if (typeof exclusiveMaximum === "number") {
|
|
8942
|
-
if (exclusiveMaximum <= maximum) delete json$1.maximum;
|
|
8943
|
-
else delete json$1.exclusiveMaximum;
|
|
8944
|
-
}
|
|
8945
|
-
}
|
|
8946
|
-
if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
|
|
8947
|
-
break;
|
|
8948
|
-
}
|
|
8949
|
-
case "boolean": {
|
|
8950
|
-
const json$1 = _json;
|
|
8951
|
-
json$1.type = "boolean";
|
|
8952
|
-
break;
|
|
8953
|
-
}
|
|
8954
|
-
case "bigint": {
|
|
8955
|
-
if (this.unrepresentable === "throw") {
|
|
8956
|
-
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
8957
|
-
}
|
|
8958
|
-
break;
|
|
8583
|
+
const _json = result.schema;
|
|
8584
|
+
switch (def.type) {
|
|
8585
|
+
case "string": {
|
|
8586
|
+
const json$1 = _json;
|
|
8587
|
+
json$1.type = "string";
|
|
8588
|
+
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
8589
|
+
if (typeof minimum === "number") json$1.minLength = minimum;
|
|
8590
|
+
if (typeof maximum === "number") json$1.maxLength = maximum;
|
|
8591
|
+
if (format) {
|
|
8592
|
+
json$1.format = formatMap[format] ?? format;
|
|
8593
|
+
if (json$1.format === "") delete json$1.format;
|
|
8959
8594
|
}
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8595
|
+
if (contentEncoding) json$1.contentEncoding = contentEncoding;
|
|
8596
|
+
if (patterns && patterns.size > 0) {
|
|
8597
|
+
const regexes = [...patterns];
|
|
8598
|
+
if (regexes.length === 1) json$1.pattern = regexes[0].source;
|
|
8599
|
+
else if (regexes.length > 1) {
|
|
8600
|
+
result.schema.allOf = [...regexes.map((regex) => ({
|
|
8601
|
+
...this.target === "draft-7" ? { type: "string" } : {},
|
|
8602
|
+
pattern: regex.source
|
|
8603
|
+
}))];
|
|
8963
8604
|
}
|
|
8964
|
-
break;
|
|
8965
8605
|
}
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8606
|
+
break;
|
|
8607
|
+
}
|
|
8608
|
+
case "number": {
|
|
8609
|
+
const json$1 = _json;
|
|
8610
|
+
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
8611
|
+
if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
|
|
8612
|
+
else json$1.type = "number";
|
|
8613
|
+
if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
|
|
8614
|
+
if (typeof minimum === "number") {
|
|
8615
|
+
json$1.minimum = minimum;
|
|
8616
|
+
if (typeof exclusiveMinimum === "number") {
|
|
8617
|
+
if (exclusiveMinimum >= minimum) delete json$1.minimum;
|
|
8618
|
+
else delete json$1.exclusiveMinimum;
|
|
8979
8619
|
}
|
|
8980
|
-
break;
|
|
8981
8620
|
}
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8621
|
+
if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
|
|
8622
|
+
if (typeof maximum === "number") {
|
|
8623
|
+
json$1.maximum = maximum;
|
|
8624
|
+
if (typeof exclusiveMaximum === "number") {
|
|
8625
|
+
if (exclusiveMaximum <= maximum) delete json$1.maximum;
|
|
8626
|
+
else delete json$1.exclusiveMaximum;
|
|
8985
8627
|
}
|
|
8986
|
-
break;
|
|
8987
|
-
}
|
|
8988
|
-
case "never": {
|
|
8989
|
-
_json.not = {};
|
|
8990
|
-
break;
|
|
8991
8628
|
}
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8629
|
+
if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
|
|
8630
|
+
break;
|
|
8631
|
+
}
|
|
8632
|
+
case "boolean": {
|
|
8633
|
+
const json$1 = _json;
|
|
8634
|
+
json$1.type = "boolean";
|
|
8635
|
+
break;
|
|
8636
|
+
}
|
|
8637
|
+
case "bigint": {
|
|
8638
|
+
if (this.unrepresentable === "throw") {
|
|
8639
|
+
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
8997
8640
|
}
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
json$1.type = "array";
|
|
9004
|
-
json$1.items = this.process(def.element, {
|
|
9005
|
-
...params,
|
|
9006
|
-
path: [...params.path, "items"]
|
|
9007
|
-
});
|
|
9008
|
-
break;
|
|
8641
|
+
break;
|
|
8642
|
+
}
|
|
8643
|
+
case "symbol": {
|
|
8644
|
+
if (this.unrepresentable === "throw") {
|
|
8645
|
+
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
9009
8646
|
}
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
if (requiredKeys.size > 0) {
|
|
9035
|
-
json$1.required = Array.from(requiredKeys);
|
|
9036
|
-
}
|
|
9037
|
-
if (def.catchall?._zod.def.type === "never") {
|
|
9038
|
-
json$1.additionalProperties = false;
|
|
9039
|
-
} else if (!def.catchall) {
|
|
9040
|
-
if (this.io === "output") json$1.additionalProperties = false;
|
|
9041
|
-
} else if (def.catchall) {
|
|
9042
|
-
json$1.additionalProperties = this.process(def.catchall, {
|
|
9043
|
-
...params,
|
|
9044
|
-
path: [...params.path, "additionalProperties"]
|
|
9045
|
-
});
|
|
9046
|
-
}
|
|
9047
|
-
break;
|
|
8647
|
+
break;
|
|
8648
|
+
}
|
|
8649
|
+
case "undefined": {
|
|
8650
|
+
const json$1 = _json;
|
|
8651
|
+
json$1.type = "null";
|
|
8652
|
+
break;
|
|
8653
|
+
}
|
|
8654
|
+
case "null": {
|
|
8655
|
+
_json.type = "null";
|
|
8656
|
+
break;
|
|
8657
|
+
}
|
|
8658
|
+
case "any": {
|
|
8659
|
+
break;
|
|
8660
|
+
}
|
|
8661
|
+
case "unknown": {
|
|
8662
|
+
break;
|
|
8663
|
+
}
|
|
8664
|
+
case "never": {
|
|
8665
|
+
_json.not = {};
|
|
8666
|
+
break;
|
|
8667
|
+
}
|
|
8668
|
+
case "void": {
|
|
8669
|
+
if (this.unrepresentable === "throw") {
|
|
8670
|
+
throw new Error("Void cannot be represented in JSON Schema");
|
|
9048
8671
|
}
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
...params.path,
|
|
9055
|
-
"anyOf",
|
|
9056
|
-
i
|
|
9057
|
-
]
|
|
9058
|
-
}));
|
|
9059
|
-
break;
|
|
8672
|
+
break;
|
|
8673
|
+
}
|
|
8674
|
+
case "date": {
|
|
8675
|
+
if (this.unrepresentable === "throw") {
|
|
8676
|
+
throw new Error("Date cannot be represented in JSON Schema");
|
|
9060
8677
|
}
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
8678
|
+
break;
|
|
8679
|
+
}
|
|
8680
|
+
case "array": {
|
|
8681
|
+
const json$1 = _json;
|
|
8682
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
8683
|
+
if (typeof minimum === "number") json$1.minItems = minimum;
|
|
8684
|
+
if (typeof maximum === "number") json$1.maxItems = maximum;
|
|
8685
|
+
json$1.type = "array";
|
|
8686
|
+
json$1.items = this.process(def.element, {
|
|
8687
|
+
...params,
|
|
8688
|
+
path: [...params.path, "items"]
|
|
8689
|
+
});
|
|
8690
|
+
break;
|
|
8691
|
+
}
|
|
8692
|
+
case "object": {
|
|
8693
|
+
const json$1 = _json;
|
|
8694
|
+
json$1.type = "object";
|
|
8695
|
+
json$1.properties = {};
|
|
8696
|
+
const shape = def.shape;
|
|
8697
|
+
for (const key in shape) {
|
|
8698
|
+
json$1.properties[key] = this.process(shape[key], {
|
|
9072
8699
|
...params,
|
|
9073
8700
|
path: [
|
|
9074
8701
|
...params.path,
|
|
9075
|
-
"
|
|
9076
|
-
|
|
8702
|
+
"properties",
|
|
8703
|
+
key
|
|
9077
8704
|
]
|
|
9078
8705
|
});
|
|
9079
|
-
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
9080
|
-
const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
9081
|
-
json$1.allOf = allOf;
|
|
9082
|
-
break;
|
|
9083
8706
|
}
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
path: [
|
|
9090
|
-
...params.path,
|
|
9091
|
-
"prefixItems",
|
|
9092
|
-
i
|
|
9093
|
-
]
|
|
9094
|
-
}));
|
|
9095
|
-
if (this.target === "draft-2020-12") {
|
|
9096
|
-
json$1.prefixItems = prefixItems;
|
|
8707
|
+
const allKeys = new Set(Object.keys(shape));
|
|
8708
|
+
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
8709
|
+
const v = def.shape[key]._zod;
|
|
8710
|
+
if (this.io === "input") {
|
|
8711
|
+
return v.optin === undefined;
|
|
9097
8712
|
} else {
|
|
9098
|
-
|
|
8713
|
+
return v.optout === undefined;
|
|
9099
8714
|
}
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
path: [...params.path, "items"]
|
|
9104
|
-
});
|
|
9105
|
-
if (this.target === "draft-2020-12") {
|
|
9106
|
-
json$1.items = rest;
|
|
9107
|
-
} else {
|
|
9108
|
-
json$1.additionalItems = rest;
|
|
9109
|
-
}
|
|
9110
|
-
}
|
|
9111
|
-
if (def.rest) {
|
|
9112
|
-
json$1.items = this.process(def.rest, {
|
|
9113
|
-
...params,
|
|
9114
|
-
path: [...params.path, "items"]
|
|
9115
|
-
});
|
|
9116
|
-
}
|
|
9117
|
-
const { minimum, maximum } = schema._zod.bag;
|
|
9118
|
-
if (typeof minimum === "number") json$1.minItems = minimum;
|
|
9119
|
-
if (typeof maximum === "number") json$1.maxItems = maximum;
|
|
9120
|
-
break;
|
|
8715
|
+
}));
|
|
8716
|
+
if (requiredKeys.size > 0) {
|
|
8717
|
+
json$1.required = Array.from(requiredKeys);
|
|
9121
8718
|
}
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
json$1.
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
});
|
|
9129
|
-
json$1.additionalProperties = this.process(def.valueType, {
|
|
8719
|
+
if (def.catchall?._zod.def.type === "never") {
|
|
8720
|
+
json$1.additionalProperties = false;
|
|
8721
|
+
} else if (!def.catchall) {
|
|
8722
|
+
if (this.io === "output") json$1.additionalProperties = false;
|
|
8723
|
+
} else if (def.catchall) {
|
|
8724
|
+
json$1.additionalProperties = this.process(def.catchall, {
|
|
9130
8725
|
...params,
|
|
9131
8726
|
path: [...params.path, "additionalProperties"]
|
|
9132
8727
|
});
|
|
9133
|
-
break;
|
|
9134
8728
|
}
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
8729
|
+
break;
|
|
8730
|
+
}
|
|
8731
|
+
case "union": {
|
|
8732
|
+
const json$1 = _json;
|
|
8733
|
+
json$1.anyOf = def.options.map((x, i) => this.process(x, {
|
|
8734
|
+
...params,
|
|
8735
|
+
path: [
|
|
8736
|
+
...params.path,
|
|
8737
|
+
"anyOf",
|
|
8738
|
+
i
|
|
8739
|
+
]
|
|
8740
|
+
}));
|
|
8741
|
+
break;
|
|
8742
|
+
}
|
|
8743
|
+
case "intersection": {
|
|
8744
|
+
const json$1 = _json;
|
|
8745
|
+
const a = this.process(def.left, {
|
|
8746
|
+
...params,
|
|
8747
|
+
path: [
|
|
8748
|
+
...params.path,
|
|
8749
|
+
"allOf",
|
|
8750
|
+
0
|
|
8751
|
+
]
|
|
8752
|
+
});
|
|
8753
|
+
const b = this.process(def.right, {
|
|
8754
|
+
...params,
|
|
8755
|
+
path: [
|
|
8756
|
+
...params.path,
|
|
8757
|
+
"allOf",
|
|
8758
|
+
1
|
|
8759
|
+
]
|
|
8760
|
+
});
|
|
8761
|
+
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
8762
|
+
const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
8763
|
+
json$1.allOf = allOf;
|
|
8764
|
+
break;
|
|
8765
|
+
}
|
|
8766
|
+
case "tuple": {
|
|
8767
|
+
const json$1 = _json;
|
|
8768
|
+
json$1.type = "array";
|
|
8769
|
+
const prefixItems = def.items.map((x, i) => this.process(x, {
|
|
8770
|
+
...params,
|
|
8771
|
+
path: [
|
|
8772
|
+
...params.path,
|
|
8773
|
+
"prefixItems",
|
|
8774
|
+
i
|
|
8775
|
+
]
|
|
8776
|
+
}));
|
|
8777
|
+
if (this.target === "draft-2020-12") {
|
|
8778
|
+
json$1.prefixItems = prefixItems;
|
|
8779
|
+
} else {
|
|
8780
|
+
json$1.items = prefixItems;
|
|
9140
8781
|
}
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
8782
|
+
if (def.rest) {
|
|
8783
|
+
const rest = this.process(def.rest, {
|
|
8784
|
+
...params,
|
|
8785
|
+
path: [...params.path, "items"]
|
|
8786
|
+
});
|
|
8787
|
+
if (this.target === "draft-2020-12") {
|
|
8788
|
+
json$1.items = rest;
|
|
8789
|
+
} else {
|
|
8790
|
+
json$1.additionalItems = rest;
|
|
9144
8791
|
}
|
|
9145
|
-
break;
|
|
9146
8792
|
}
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
8793
|
+
if (def.rest) {
|
|
8794
|
+
json$1.items = this.process(def.rest, {
|
|
8795
|
+
...params,
|
|
8796
|
+
path: [...params.path, "items"]
|
|
8797
|
+
});
|
|
8798
|
+
}
|
|
8799
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
8800
|
+
if (typeof minimum === "number") json$1.minItems = minimum;
|
|
8801
|
+
if (typeof maximum === "number") json$1.maxItems = maximum;
|
|
8802
|
+
break;
|
|
8803
|
+
}
|
|
8804
|
+
case "record": {
|
|
8805
|
+
const json$1 = _json;
|
|
8806
|
+
json$1.type = "object";
|
|
8807
|
+
json$1.propertyNames = this.process(def.keyType, {
|
|
8808
|
+
...params,
|
|
8809
|
+
path: [...params.path, "propertyNames"]
|
|
8810
|
+
});
|
|
8811
|
+
json$1.additionalProperties = this.process(def.valueType, {
|
|
8812
|
+
...params,
|
|
8813
|
+
path: [...params.path, "additionalProperties"]
|
|
8814
|
+
});
|
|
8815
|
+
break;
|
|
8816
|
+
}
|
|
8817
|
+
case "map": {
|
|
8818
|
+
if (this.unrepresentable === "throw") {
|
|
8819
|
+
throw new Error("Map cannot be represented in JSON Schema");
|
|
9154
8820
|
}
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
if (this.unrepresentable === "throw") {
|
|
9161
|
-
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
9162
|
-
} else {}
|
|
9163
|
-
} else if (typeof val === "bigint") {
|
|
9164
|
-
if (this.unrepresentable === "throw") {
|
|
9165
|
-
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
9166
|
-
} else {
|
|
9167
|
-
vals.push(Number(val));
|
|
9168
|
-
}
|
|
9169
|
-
} else {
|
|
9170
|
-
vals.push(val);
|
|
9171
|
-
}
|
|
9172
|
-
}
|
|
9173
|
-
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
9174
|
-
const val = vals[0];
|
|
9175
|
-
json$1.type = val === null ? "null" : typeof val;
|
|
9176
|
-
json$1.const = val;
|
|
9177
|
-
} else {
|
|
9178
|
-
if (vals.every((v) => typeof v === "number")) json$1.type = "number";
|
|
9179
|
-
if (vals.every((v) => typeof v === "string")) json$1.type = "string";
|
|
9180
|
-
if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
|
|
9181
|
-
if (vals.every((v) => v === null)) json$1.type = "null";
|
|
9182
|
-
json$1.enum = vals;
|
|
9183
|
-
}
|
|
9184
|
-
break;
|
|
8821
|
+
break;
|
|
8822
|
+
}
|
|
8823
|
+
case "set": {
|
|
8824
|
+
if (this.unrepresentable === "throw") {
|
|
8825
|
+
throw new Error("Set cannot be represented in JSON Schema");
|
|
9185
8826
|
}
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
8827
|
+
break;
|
|
8828
|
+
}
|
|
8829
|
+
case "enum": {
|
|
8830
|
+
const json$1 = _json;
|
|
8831
|
+
const values = getEnumValues(def.entries);
|
|
8832
|
+
if (values.every((v) => typeof v === "number")) json$1.type = "number";
|
|
8833
|
+
if (values.every((v) => typeof v === "string")) json$1.type = "string";
|
|
8834
|
+
json$1.enum = values;
|
|
8835
|
+
break;
|
|
8836
|
+
}
|
|
8837
|
+
case "literal": {
|
|
8838
|
+
const json$1 = _json;
|
|
8839
|
+
const vals = [];
|
|
8840
|
+
for (const val of def.values) {
|
|
8841
|
+
if (val === undefined) {
|
|
8842
|
+
if (this.unrepresentable === "throw") {
|
|
8843
|
+
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
8844
|
+
} else {}
|
|
8845
|
+
} else if (typeof val === "bigint") {
|
|
8846
|
+
if (this.unrepresentable === "throw") {
|
|
8847
|
+
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
9200
8848
|
} else {
|
|
9201
|
-
|
|
9202
|
-
const mFile = {
|
|
9203
|
-
...file$1,
|
|
9204
|
-
contentMediaType: m
|
|
9205
|
-
};
|
|
9206
|
-
return mFile;
|
|
9207
|
-
});
|
|
8849
|
+
vals.push(Number(val));
|
|
9208
8850
|
}
|
|
9209
8851
|
} else {
|
|
9210
|
-
|
|
9211
|
-
}
|
|
9212
|
-
break;
|
|
9213
|
-
}
|
|
9214
|
-
case "transform": {
|
|
9215
|
-
if (this.unrepresentable === "throw") {
|
|
9216
|
-
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
8852
|
+
vals.push(val);
|
|
9217
8853
|
}
|
|
9218
|
-
break;
|
|
9219
8854
|
}
|
|
9220
|
-
|
|
9221
|
-
const
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
}
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
case "success": {
|
|
9231
|
-
const json$1 = _json;
|
|
9232
|
-
json$1.type = "boolean";
|
|
9233
|
-
break;
|
|
9234
|
-
}
|
|
9235
|
-
case "default": {
|
|
9236
|
-
this.process(def.innerType, params);
|
|
9237
|
-
result.ref = def.innerType;
|
|
9238
|
-
_json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
9239
|
-
break;
|
|
9240
|
-
}
|
|
9241
|
-
case "prefault": {
|
|
9242
|
-
this.process(def.innerType, params);
|
|
9243
|
-
result.ref = def.innerType;
|
|
9244
|
-
if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
9245
|
-
break;
|
|
9246
|
-
}
|
|
9247
|
-
case "catch": {
|
|
9248
|
-
this.process(def.innerType, params);
|
|
9249
|
-
result.ref = def.innerType;
|
|
9250
|
-
let catchValue;
|
|
9251
|
-
try {
|
|
9252
|
-
catchValue = def.catchValue(undefined);
|
|
9253
|
-
} catch {
|
|
9254
|
-
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
9255
|
-
}
|
|
9256
|
-
_json.default = catchValue;
|
|
9257
|
-
break;
|
|
8855
|
+
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
8856
|
+
const val = vals[0];
|
|
8857
|
+
json$1.type = val === null ? "null" : typeof val;
|
|
8858
|
+
json$1.const = val;
|
|
8859
|
+
} else {
|
|
8860
|
+
if (vals.every((v) => typeof v === "number")) json$1.type = "number";
|
|
8861
|
+
if (vals.every((v) => typeof v === "string")) json$1.type = "string";
|
|
8862
|
+
if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
|
|
8863
|
+
if (vals.every((v) => v === null)) json$1.type = "null";
|
|
8864
|
+
json$1.enum = vals;
|
|
9258
8865
|
}
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
8866
|
+
break;
|
|
8867
|
+
}
|
|
8868
|
+
case "file": {
|
|
8869
|
+
const json$1 = _json;
|
|
8870
|
+
const file$1 = {
|
|
8871
|
+
type: "string",
|
|
8872
|
+
format: "binary",
|
|
8873
|
+
contentEncoding: "binary"
|
|
8874
|
+
};
|
|
8875
|
+
const { minimum, maximum, mime } = schema._zod.bag;
|
|
8876
|
+
if (minimum !== undefined) file$1.minLength = minimum;
|
|
8877
|
+
if (maximum !== undefined) file$1.maxLength = maximum;
|
|
8878
|
+
if (mime) {
|
|
8879
|
+
if (mime.length === 1) {
|
|
8880
|
+
file$1.contentMediaType = mime[0];
|
|
8881
|
+
Object.assign(json$1, file$1);
|
|
8882
|
+
} else {
|
|
8883
|
+
json$1.anyOf = mime.map((m) => {
|
|
8884
|
+
const mFile = {
|
|
8885
|
+
...file$1,
|
|
8886
|
+
contentMediaType: m
|
|
8887
|
+
};
|
|
8888
|
+
return mFile;
|
|
8889
|
+
});
|
|
9262
8890
|
}
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
case "template_literal": {
|
|
9266
|
-
const json$1 = _json;
|
|
9267
|
-
const pattern = schema._zod.pattern;
|
|
9268
|
-
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
9269
|
-
json$1.type = "string";
|
|
9270
|
-
json$1.pattern = pattern.source;
|
|
9271
|
-
break;
|
|
9272
|
-
}
|
|
9273
|
-
case "pipe": {
|
|
9274
|
-
const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
9275
|
-
this.process(innerType, params);
|
|
9276
|
-
result.ref = innerType;
|
|
9277
|
-
break;
|
|
9278
|
-
}
|
|
9279
|
-
case "readonly": {
|
|
9280
|
-
this.process(def.innerType, params);
|
|
9281
|
-
result.ref = def.innerType;
|
|
9282
|
-
_json.readOnly = true;
|
|
9283
|
-
break;
|
|
9284
|
-
}
|
|
9285
|
-
case "promise": {
|
|
9286
|
-
this.process(def.innerType, params);
|
|
9287
|
-
result.ref = def.innerType;
|
|
9288
|
-
break;
|
|
8891
|
+
} else {
|
|
8892
|
+
Object.assign(json$1, file$1);
|
|
9289
8893
|
}
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
8894
|
+
break;
|
|
8895
|
+
}
|
|
8896
|
+
case "transform": {
|
|
8897
|
+
if (this.unrepresentable === "throw") {
|
|
8898
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
9294
8899
|
}
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
8900
|
+
break;
|
|
8901
|
+
}
|
|
8902
|
+
case "nullable": {
|
|
8903
|
+
const inner = this.process(def.innerType, params);
|
|
8904
|
+
_json.anyOf = [inner, { type: "null" }];
|
|
8905
|
+
break;
|
|
8906
|
+
}
|
|
8907
|
+
case "nonoptional": {
|
|
8908
|
+
this.process(def.innerType, params);
|
|
8909
|
+
result.ref = def.innerType;
|
|
8910
|
+
break;
|
|
8911
|
+
}
|
|
8912
|
+
case "success": {
|
|
8913
|
+
const json$1 = _json;
|
|
8914
|
+
json$1.type = "boolean";
|
|
8915
|
+
break;
|
|
8916
|
+
}
|
|
8917
|
+
case "default": {
|
|
8918
|
+
this.process(def.innerType, params);
|
|
8919
|
+
result.ref = def.innerType;
|
|
8920
|
+
_json.default = def.defaultValue;
|
|
8921
|
+
break;
|
|
8922
|
+
}
|
|
8923
|
+
case "prefault": {
|
|
8924
|
+
this.process(def.innerType, params);
|
|
8925
|
+
result.ref = def.innerType;
|
|
8926
|
+
if (this.io === "input") _json._prefault = def.defaultValue;
|
|
8927
|
+
break;
|
|
8928
|
+
}
|
|
8929
|
+
case "catch": {
|
|
8930
|
+
this.process(def.innerType, params);
|
|
8931
|
+
result.ref = def.innerType;
|
|
8932
|
+
let catchValue;
|
|
8933
|
+
try {
|
|
8934
|
+
catchValue = def.catchValue(undefined);
|
|
8935
|
+
} catch {
|
|
8936
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
9300
8937
|
}
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
8938
|
+
_json.default = catchValue;
|
|
8939
|
+
break;
|
|
8940
|
+
}
|
|
8941
|
+
case "nan": {
|
|
8942
|
+
if (this.unrepresentable === "throw") {
|
|
8943
|
+
throw new Error("NaN cannot be represented in JSON Schema");
|
|
9306
8944
|
}
|
|
9307
|
-
|
|
9308
|
-
|
|
8945
|
+
break;
|
|
8946
|
+
}
|
|
8947
|
+
case "template_literal": {
|
|
8948
|
+
const json$1 = _json;
|
|
8949
|
+
const pattern = schema._zod.pattern;
|
|
8950
|
+
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
8951
|
+
json$1.type = "string";
|
|
8952
|
+
json$1.pattern = pattern.source;
|
|
8953
|
+
break;
|
|
8954
|
+
}
|
|
8955
|
+
case "pipe": {
|
|
8956
|
+
const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
8957
|
+
this.process(innerType, params);
|
|
8958
|
+
result.ref = innerType;
|
|
8959
|
+
break;
|
|
8960
|
+
}
|
|
8961
|
+
case "readonly": {
|
|
8962
|
+
this.process(def.innerType, params);
|
|
8963
|
+
result.ref = def.innerType;
|
|
8964
|
+
_json.readOnly = true;
|
|
8965
|
+
break;
|
|
8966
|
+
}
|
|
8967
|
+
case "promise": {
|
|
8968
|
+
this.process(def.innerType, params);
|
|
8969
|
+
result.ref = def.innerType;
|
|
8970
|
+
break;
|
|
8971
|
+
}
|
|
8972
|
+
case "optional": {
|
|
8973
|
+
this.process(def.innerType, params);
|
|
8974
|
+
result.ref = def.innerType;
|
|
8975
|
+
break;
|
|
8976
|
+
}
|
|
8977
|
+
case "lazy": {
|
|
8978
|
+
const innerType = schema._zod.innerType;
|
|
8979
|
+
this.process(innerType, params);
|
|
8980
|
+
result.ref = innerType;
|
|
8981
|
+
break;
|
|
8982
|
+
}
|
|
8983
|
+
case "custom": {
|
|
8984
|
+
if (this.unrepresentable === "throw") {
|
|
8985
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
9309
8986
|
}
|
|
8987
|
+
break;
|
|
8988
|
+
}
|
|
8989
|
+
default: {
|
|
8990
|
+
def;
|
|
9310
8991
|
}
|
|
9311
8992
|
}
|
|
9312
8993
|
}
|
|
@@ -9333,15 +9014,12 @@ var JSONSchemaGenerator = class {
|
|
|
9333
9014
|
const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
9334
9015
|
if (params.external) {
|
|
9335
9016
|
const externalId = params.external.registry.get(entry[0])?.id;
|
|
9336
|
-
|
|
9337
|
-
if (externalId) {
|
|
9338
|
-
return { ref: uriGenerator(externalId) };
|
|
9339
|
-
}
|
|
9017
|
+
if (externalId) return { ref: params.external.uri(externalId) };
|
|
9340
9018
|
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
|
|
9341
9019
|
entry[1].defId = id;
|
|
9342
9020
|
return {
|
|
9343
9021
|
defId: id,
|
|
9344
|
-
ref: `${
|
|
9022
|
+
ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
|
|
9345
9023
|
};
|
|
9346
9024
|
}
|
|
9347
9025
|
if (entry[1] === root) {
|
|
@@ -9369,14 +9047,6 @@ var JSONSchemaGenerator = class {
|
|
|
9369
9047
|
}
|
|
9370
9048
|
schema$1.$ref = ref;
|
|
9371
9049
|
};
|
|
9372
|
-
if (params.cycles === "throw") {
|
|
9373
|
-
for (const entry of this.seen.entries()) {
|
|
9374
|
-
const seen = entry[1];
|
|
9375
|
-
if (seen.cycle) {
|
|
9376
|
-
throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
|
|
9377
|
-
}
|
|
9378
|
-
}
|
|
9379
|
-
}
|
|
9380
9050
|
for (const entry of this.seen.entries()) {
|
|
9381
9051
|
const seen = entry[1];
|
|
9382
9052
|
if (schema === entry[0]) {
|
|
@@ -9396,7 +9066,11 @@ var JSONSchemaGenerator = class {
|
|
|
9396
9066
|
continue;
|
|
9397
9067
|
}
|
|
9398
9068
|
if (seen.cycle) {
|
|
9399
|
-
|
|
9069
|
+
if (params.cycles === "throw") {
|
|
9070
|
+
throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
|
|
9071
|
+
} else if (params.cycles === "ref") {
|
|
9072
|
+
extractToDef(entry);
|
|
9073
|
+
}
|
|
9400
9074
|
continue;
|
|
9401
9075
|
}
|
|
9402
9076
|
if (seen.count > 1) {
|
|
@@ -9428,8 +9102,7 @@ var JSONSchemaGenerator = class {
|
|
|
9428
9102
|
}
|
|
9429
9103
|
if (!seen.isParent) this.override({
|
|
9430
9104
|
zodSchema,
|
|
9431
|
-
jsonSchema: schema$1
|
|
9432
|
-
path: seen.path ?? []
|
|
9105
|
+
jsonSchema: schema$1
|
|
9433
9106
|
});
|
|
9434
9107
|
};
|
|
9435
9108
|
for (const entry of [...this.seen.entries()].reverse()) {
|
|
@@ -9443,11 +9116,6 @@ var JSONSchemaGenerator = class {
|
|
|
9443
9116
|
} else {
|
|
9444
9117
|
console.warn(`Invalid target: ${this.target}`);
|
|
9445
9118
|
}
|
|
9446
|
-
if (params.external?.uri) {
|
|
9447
|
-
const id = params.external.registry.get(schema)?.id;
|
|
9448
|
-
if (!id) throw new Error("Schema is missing an `id` property");
|
|
9449
|
-
result.$id = params.external.uri(id);
|
|
9450
|
-
}
|
|
9451
9119
|
Object.assign(result, root.def);
|
|
9452
9120
|
const defs = params.external?.defs ?? {};
|
|
9453
9121
|
for (const entry of this.seen.entries()) {
|
|
@@ -9456,13 +9124,11 @@ var JSONSchemaGenerator = class {
|
|
|
9456
9124
|
defs[seen.defId] = seen.def;
|
|
9457
9125
|
}
|
|
9458
9126
|
}
|
|
9459
|
-
if (params.external)
|
|
9460
|
-
if (
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
result.definitions = defs;
|
|
9465
|
-
}
|
|
9127
|
+
if (!params.external && Object.keys(defs).length > 0) {
|
|
9128
|
+
if (this.target === "draft-2020-12") {
|
|
9129
|
+
result.$defs = defs;
|
|
9130
|
+
} else {
|
|
9131
|
+
result.definitions = defs;
|
|
9466
9132
|
}
|
|
9467
9133
|
}
|
|
9468
9134
|
try {
|
|
@@ -9483,7 +9149,7 @@ function toJSONSchema(input, _params) {
|
|
|
9483
9149
|
const schemas = {};
|
|
9484
9150
|
const external = {
|
|
9485
9151
|
registry: input,
|
|
9486
|
-
uri: _params?.uri,
|
|
9152
|
+
uri: _params?.uri || ((id) => id),
|
|
9487
9153
|
defs
|
|
9488
9154
|
};
|
|
9489
9155
|
for (const entry of input._idmap.entries()) {
|
|
@@ -9594,11 +9260,11 @@ function isTransforming(_schema, _ctx) {
|
|
|
9594
9260
|
}
|
|
9595
9261
|
|
|
9596
9262
|
//#endregion
|
|
9597
|
-
//#region ../../node_modules/zod/v4/core/json-schema.js
|
|
9263
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
|
|
9598
9264
|
var json_schema_exports = {};
|
|
9599
9265
|
|
|
9600
9266
|
//#endregion
|
|
9601
|
-
//#region ../../node_modules/zod/v4/core/index.js
|
|
9267
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/index.js
|
|
9602
9268
|
var core_exports = {};
|
|
9603
9269
|
__export(core_exports, {
|
|
9604
9270
|
$ZodAny: () => $ZodAny,
|
|
@@ -9637,7 +9303,6 @@ __export(core_exports, {
|
|
|
9637
9303
|
$ZodCheckStringFormat: () => $ZodCheckStringFormat,
|
|
9638
9304
|
$ZodCheckUpperCase: () => $ZodCheckUpperCase,
|
|
9639
9305
|
$ZodCustom: () => $ZodCustom,
|
|
9640
|
-
$ZodCustomStringFormat: () => $ZodCustomStringFormat,
|
|
9641
9306
|
$ZodDate: () => $ZodDate,
|
|
9642
9307
|
$ZodDefault: () => $ZodDefault,
|
|
9643
9308
|
$ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
|
|
@@ -9702,8 +9367,6 @@ __export(core_exports, {
|
|
|
9702
9367
|
Doc: () => Doc,
|
|
9703
9368
|
JSONSchema: () => json_schema_exports,
|
|
9704
9369
|
JSONSchemaGenerator: () => JSONSchemaGenerator,
|
|
9705
|
-
NEVER: () => NEVER,
|
|
9706
|
-
TimePrecision: () => TimePrecision,
|
|
9707
9370
|
_any: () => _any,
|
|
9708
9371
|
_array: () => _array,
|
|
9709
9372
|
_base64: () => _base64,
|
|
@@ -9793,7 +9456,6 @@ __export(core_exports, {
|
|
|
9793
9456
|
_size: () => _size,
|
|
9794
9457
|
_startsWith: () => _startsWith,
|
|
9795
9458
|
_string: () => _string,
|
|
9796
|
-
_stringFormat: () => _stringFormat,
|
|
9797
9459
|
_stringbool: () => _stringbool,
|
|
9798
9460
|
_success: () => _success,
|
|
9799
9461
|
_symbol: () => _symbol,
|
|
@@ -9843,7 +9505,7 @@ __export(core_exports, {
|
|
|
9843
9505
|
});
|
|
9844
9506
|
|
|
9845
9507
|
//#endregion
|
|
9846
|
-
//#region ../../node_modules/zod/v4/classic/iso.js
|
|
9508
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
|
|
9847
9509
|
var iso_exports = {};
|
|
9848
9510
|
__export(iso_exports, {
|
|
9849
9511
|
ZodISODate: () => ZodISODate,
|
|
@@ -9885,7 +9547,7 @@ function duration(params) {
|
|
|
9885
9547
|
}
|
|
9886
9548
|
|
|
9887
9549
|
//#endregion
|
|
9888
|
-
//#region ../../node_modules/zod/v4/classic/errors.js
|
|
9550
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
|
|
9889
9551
|
const initializer = (inst, issues) => {
|
|
9890
9552
|
$ZodError.init(inst, issues);
|
|
9891
9553
|
inst.name = "ZodError";
|
|
@@ -9903,14 +9565,14 @@ const ZodError = $constructor("ZodError", initializer);
|
|
|
9903
9565
|
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
9904
9566
|
|
|
9905
9567
|
//#endregion
|
|
9906
|
-
//#region ../../node_modules/zod/v4/classic/parse.js
|
|
9568
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
|
|
9907
9569
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
9908
9570
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
9909
9571
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
9910
9572
|
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
9911
9573
|
|
|
9912
9574
|
//#endregion
|
|
9913
|
-
//#region ../../node_modules/zod/v4/classic/schemas.js
|
|
9575
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
|
|
9914
9576
|
const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
9915
9577
|
$ZodType.init(inst, def);
|
|
9916
9578
|
inst.def = def;
|
|
@@ -10178,13 +9840,6 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
|
10178
9840
|
function jwt(params) {
|
|
10179
9841
|
return _jwt(ZodJWT, params);
|
|
10180
9842
|
}
|
|
10181
|
-
const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
|
|
10182
|
-
$ZodCustomStringFormat.init(inst, def);
|
|
10183
|
-
ZodStringFormat.init(inst, def);
|
|
10184
|
-
});
|
|
10185
|
-
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
10186
|
-
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
10187
|
-
}
|
|
10188
9843
|
const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
10189
9844
|
$ZodNumber.init(inst, def);
|
|
10190
9845
|
ZodType.init(inst, def);
|
|
@@ -10354,7 +10009,9 @@ function keyof(schema) {
|
|
|
10354
10009
|
const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
10355
10010
|
$ZodObject.init(inst, def);
|
|
10356
10011
|
ZodType.init(inst, def);
|
|
10357
|
-
defineLazy(inst, "shape", () =>
|
|
10012
|
+
defineLazy(inst, "shape", () => {
|
|
10013
|
+
return Object.fromEntries(Object.entries(inst._zod.def.shape));
|
|
10014
|
+
});
|
|
10358
10015
|
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
10359
10016
|
inst.catchall = (catchall) => inst.clone({
|
|
10360
10017
|
...inst._zod.def,
|
|
@@ -10799,8 +10456,11 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
10799
10456
|
$ZodCustom.init(inst, def);
|
|
10800
10457
|
ZodType.init(inst, def);
|
|
10801
10458
|
});
|
|
10802
|
-
function check(fn) {
|
|
10803
|
-
const ch = new $ZodCheck({
|
|
10459
|
+
function check(fn, params) {
|
|
10460
|
+
const ch = new $ZodCheck({
|
|
10461
|
+
check: "custom",
|
|
10462
|
+
...normalizeParams(params)
|
|
10463
|
+
});
|
|
10804
10464
|
ch._zod.check = fn;
|
|
10805
10465
|
return ch;
|
|
10806
10466
|
}
|
|
@@ -10810,7 +10470,7 @@ function custom(fn, _params) {
|
|
|
10810
10470
|
function refine(fn, _params = {}) {
|
|
10811
10471
|
return _refine(ZodCustom, fn, _params);
|
|
10812
10472
|
}
|
|
10813
|
-
function superRefine(fn) {
|
|
10473
|
+
function superRefine(fn, params) {
|
|
10814
10474
|
const ch = check((payload) => {
|
|
10815
10475
|
payload.addIssue = (issue$1) => {
|
|
10816
10476
|
if (typeof issue$1 === "string") {
|
|
@@ -10826,7 +10486,7 @@ function superRefine(fn) {
|
|
|
10826
10486
|
}
|
|
10827
10487
|
};
|
|
10828
10488
|
return fn(payload.value, payload);
|
|
10829
|
-
});
|
|
10489
|
+
}, params);
|
|
10830
10490
|
return ch;
|
|
10831
10491
|
}
|
|
10832
10492
|
function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
|
|
@@ -10864,7 +10524,7 @@ function preprocess(fn, schema) {
|
|
|
10864
10524
|
}
|
|
10865
10525
|
|
|
10866
10526
|
//#endregion
|
|
10867
|
-
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
10527
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
|
|
10868
10528
|
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
10869
10529
|
const ZodIssueCode = {
|
|
10870
10530
|
invalid_type: "invalid_type",
|
|
@@ -10879,6 +10539,10 @@ const ZodIssueCode = {
|
|
|
10879
10539
|
invalid_value: "invalid_value",
|
|
10880
10540
|
custom: "custom"
|
|
10881
10541
|
};
|
|
10542
|
+
/** @deprecated Not necessary in Zod 4. */
|
|
10543
|
+
const INVALID = Object.freeze({ status: "aborted" });
|
|
10544
|
+
/** A special constant with type `never` */
|
|
10545
|
+
const NEVER = INVALID;
|
|
10882
10546
|
/** @deprecated Use `z.config(params)` instead. */
|
|
10883
10547
|
function setErrorMap(map$1) {
|
|
10884
10548
|
config({ customError: map$1 });
|
|
@@ -10889,7 +10553,7 @@ function getErrorMap() {
|
|
|
10889
10553
|
}
|
|
10890
10554
|
|
|
10891
10555
|
//#endregion
|
|
10892
|
-
//#region ../../node_modules/zod/v4/classic/coerce.js
|
|
10556
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
|
|
10893
10557
|
var coerce_exports = {};
|
|
10894
10558
|
__export(coerce_exports, {
|
|
10895
10559
|
bigint: () => bigint,
|
|
@@ -10915,14 +10579,13 @@ function date(params) {
|
|
|
10915
10579
|
}
|
|
10916
10580
|
|
|
10917
10581
|
//#endregion
|
|
10918
|
-
//#region ../../node_modules/zod/v4/classic/external.js
|
|
10582
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/external.js
|
|
10919
10583
|
var external_exports = {};
|
|
10920
10584
|
__export(external_exports, {
|
|
10921
10585
|
$brand: () => $brand,
|
|
10922
10586
|
$input: () => $input,
|
|
10923
10587
|
$output: () => $output,
|
|
10924
10588
|
NEVER: () => NEVER,
|
|
10925
|
-
TimePrecision: () => TimePrecision,
|
|
10926
10589
|
ZodAny: () => ZodAny,
|
|
10927
10590
|
ZodArray: () => ZodArray,
|
|
10928
10591
|
ZodBase64: () => ZodBase64,
|
|
@@ -10936,7 +10599,6 @@ __export(external_exports, {
|
|
|
10936
10599
|
ZodCUID2: () => ZodCUID2,
|
|
10937
10600
|
ZodCatch: () => ZodCatch,
|
|
10938
10601
|
ZodCustom: () => ZodCustom,
|
|
10939
|
-
ZodCustomStringFormat: () => ZodCustomStringFormat,
|
|
10940
10602
|
ZodDate: () => ZodDate,
|
|
10941
10603
|
ZodDefault: () => ZodDefault,
|
|
10942
10604
|
ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
|
|
@@ -11098,7 +10760,6 @@ __export(external_exports, {
|
|
|
11098
10760
|
startsWith: () => _startsWith,
|
|
11099
10761
|
strictObject: () => strictObject,
|
|
11100
10762
|
string: () => string$1,
|
|
11101
|
-
stringFormat: () => stringFormat,
|
|
11102
10763
|
stringbool: () => stringbool,
|
|
11103
10764
|
success: () => success,
|
|
11104
10765
|
superRefine: () => superRefine,
|
|
@@ -11129,11 +10790,11 @@ __export(external_exports, {
|
|
|
11129
10790
|
config(en_default());
|
|
11130
10791
|
|
|
11131
10792
|
//#endregion
|
|
11132
|
-
//#region ../../node_modules/zod/v4/classic/index.js
|
|
10793
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/index.js
|
|
11133
10794
|
var classic_default = external_exports;
|
|
11134
10795
|
|
|
11135
10796
|
//#endregion
|
|
11136
|
-
//#region ../../node_modules/zod/v4/index.js
|
|
10797
|
+
//#region ../../node_modules/zod/dist/esm/v4/index.js
|
|
11137
10798
|
var v4_default = classic_default;
|
|
11138
10799
|
|
|
11139
10800
|
//#endregion
|