@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.js
CHANGED
|
@@ -16,9 +16,7 @@ var __export = (target, all) => {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
|
-
//#region ../../node_modules/zod/v4/core/core.js
|
|
20
|
-
/** A special constant with type `never` */
|
|
21
|
-
const NEVER = Object.freeze({ status: "aborted" });
|
|
19
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/core.js
|
|
22
20
|
function $constructor(name, initializer$2, params) {
|
|
23
21
|
function init(inst, def) {
|
|
24
22
|
var _a;
|
|
@@ -69,7 +67,7 @@ function config(newConfig) {
|
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
//#endregion
|
|
72
|
-
//#region ../../node_modules/zod/v4/core/util.js
|
|
70
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/util.js
|
|
73
71
|
var util_exports = {};
|
|
74
72
|
__export(util_exports, {
|
|
75
73
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -84,7 +82,6 @@ __export(util_exports, {
|
|
|
84
82
|
assertNotEqual: () => assertNotEqual,
|
|
85
83
|
assignProp: () => assignProp,
|
|
86
84
|
cached: () => cached,
|
|
87
|
-
captureStackTrace: () => captureStackTrace,
|
|
88
85
|
cleanEnum: () => cleanEnum,
|
|
89
86
|
cleanRegex: () => cleanRegex,
|
|
90
87
|
clone: () => clone,
|
|
@@ -223,14 +220,10 @@ function randomString(length = 10) {
|
|
|
223
220
|
function esc(str) {
|
|
224
221
|
return JSON.stringify(str);
|
|
225
222
|
}
|
|
226
|
-
const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
|
|
227
223
|
function isObject(data) {
|
|
228
224
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
229
225
|
}
|
|
230
226
|
const allowsEval = cached(() => {
|
|
231
|
-
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
232
|
-
return false;
|
|
233
|
-
}
|
|
234
227
|
try {
|
|
235
228
|
const F = Function;
|
|
236
229
|
new F("");
|
|
@@ -239,6 +232,9 @@ const allowsEval = cached(() => {
|
|
|
239
232
|
return false;
|
|
240
233
|
}
|
|
241
234
|
});
|
|
235
|
+
function _isObject(o) {
|
|
236
|
+
return Object.prototype.toString.call(o) === "[object Object]";
|
|
237
|
+
}
|
|
242
238
|
function isPlainObject(o) {
|
|
243
239
|
if (isObject(o) === false) return false;
|
|
244
240
|
const ctor = o.constructor;
|
|
@@ -418,9 +414,6 @@ function omit(schema, mask) {
|
|
|
418
414
|
});
|
|
419
415
|
}
|
|
420
416
|
function extend(schema, shape) {
|
|
421
|
-
if (!isPlainObject(shape)) {
|
|
422
|
-
throw new Error("Invalid input to extend: expected a plain object");
|
|
423
|
-
}
|
|
424
417
|
const def = {
|
|
425
418
|
...schema._zod.def,
|
|
426
419
|
get shape() {
|
|
@@ -508,7 +501,7 @@ function required(Class$1, schema, mask) {
|
|
|
508
501
|
}
|
|
509
502
|
function aborted(x, startIndex = 0) {
|
|
510
503
|
for (let i = startIndex; i < x.issues.length; i++) {
|
|
511
|
-
if (x.issues[i]
|
|
504
|
+
if (x.issues[i].continue !== true) return true;
|
|
512
505
|
}
|
|
513
506
|
return false;
|
|
514
507
|
}
|
|
@@ -572,7 +565,7 @@ var Class = class {
|
|
|
572
565
|
};
|
|
573
566
|
|
|
574
567
|
//#endregion
|
|
575
|
-
//#region ../../node_modules/zod/v4/core/errors.js
|
|
568
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/errors.js
|
|
576
569
|
const initializer$1 = (inst, def) => {
|
|
577
570
|
inst.name = "$ZodError";
|
|
578
571
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -589,17 +582,13 @@ const initializer$1 = (inst, def) => {
|
|
|
589
582
|
},
|
|
590
583
|
enumerable: true
|
|
591
584
|
});
|
|
592
|
-
Object.defineProperty(inst, "toString", {
|
|
593
|
-
value: () => inst.message,
|
|
594
|
-
enumerable: false
|
|
595
|
-
});
|
|
596
585
|
};
|
|
597
586
|
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
598
587
|
const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
|
|
599
|
-
function flattenError(error$
|
|
588
|
+
function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
|
|
600
589
|
const fieldErrors = {};
|
|
601
590
|
const formErrors = [];
|
|
602
|
-
for (const sub of error$
|
|
591
|
+
for (const sub of error$37.issues) {
|
|
603
592
|
if (sub.path.length > 0) {
|
|
604
593
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
605
594
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -612,13 +601,13 @@ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
|
|
|
612
601
|
fieldErrors
|
|
613
602
|
};
|
|
614
603
|
}
|
|
615
|
-
function formatError(error$
|
|
604
|
+
function formatError(error$37, _mapper) {
|
|
616
605
|
const mapper = _mapper || function(issue$1) {
|
|
617
606
|
return issue$1.message;
|
|
618
607
|
};
|
|
619
608
|
const fieldErrors = { _errors: [] };
|
|
620
|
-
const processError = (error$
|
|
621
|
-
for (const issue$1 of error$
|
|
609
|
+
const processError = (error$38) => {
|
|
610
|
+
for (const issue$1 of error$38.issues) {
|
|
622
611
|
if (issue$1.code === "invalid_union" && issue$1.errors.length) {
|
|
623
612
|
issue$1.errors.map((issues) => processError({ issues }));
|
|
624
613
|
} else if (issue$1.code === "invalid_key") {
|
|
@@ -645,17 +634,17 @@ function formatError(error$39, _mapper) {
|
|
|
645
634
|
}
|
|
646
635
|
}
|
|
647
636
|
};
|
|
648
|
-
processError(error$
|
|
637
|
+
processError(error$37);
|
|
649
638
|
return fieldErrors;
|
|
650
639
|
}
|
|
651
|
-
function treeifyError(error$
|
|
640
|
+
function treeifyError(error$37, _mapper) {
|
|
652
641
|
const mapper = _mapper || function(issue$1) {
|
|
653
642
|
return issue$1.message;
|
|
654
643
|
};
|
|
655
644
|
const result = { errors: [] };
|
|
656
|
-
const processError = (error$
|
|
645
|
+
const processError = (error$38, path = []) => {
|
|
657
646
|
var _a, _b;
|
|
658
|
-
for (const issue$1 of error$
|
|
647
|
+
for (const issue$1 of error$38.issues) {
|
|
659
648
|
if (issue$1.code === "invalid_union" && issue$1.errors.length) {
|
|
660
649
|
issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
|
|
661
650
|
} else if (issue$1.code === "invalid_key") {
|
|
@@ -690,7 +679,7 @@ function treeifyError(error$39, _mapper) {
|
|
|
690
679
|
}
|
|
691
680
|
}
|
|
692
681
|
};
|
|
693
|
-
processError(error$
|
|
682
|
+
processError(error$37);
|
|
694
683
|
return result;
|
|
695
684
|
}
|
|
696
685
|
/** Format a ZodError as a human-readable string in the following form.
|
|
@@ -738,9 +727,9 @@ function toDotPath(path) {
|
|
|
738
727
|
}
|
|
739
728
|
return segs.join("");
|
|
740
729
|
}
|
|
741
|
-
function prettifyError(error$
|
|
730
|
+
function prettifyError(error$37) {
|
|
742
731
|
const lines = [];
|
|
743
|
-
const issues = [...error$
|
|
732
|
+
const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
|
|
744
733
|
for (const issue$1 of issues) {
|
|
745
734
|
lines.push(`✖ ${issue$1.message}`);
|
|
746
735
|
if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
|
|
@@ -749,7 +738,7 @@ function prettifyError(error$39) {
|
|
|
749
738
|
}
|
|
750
739
|
|
|
751
740
|
//#endregion
|
|
752
|
-
//#region ../../node_modules/zod/v4/core/parse.js
|
|
741
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/parse.js
|
|
753
742
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
754
743
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
755
744
|
const result = schema._zod.run({
|
|
@@ -761,7 +750,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
761
750
|
}
|
|
762
751
|
if (result.issues.length) {
|
|
763
752
|
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
764
|
-
captureStackTrace(e, _params?.callee);
|
|
753
|
+
Error.captureStackTrace(e, _params?.callee);
|
|
765
754
|
throw e;
|
|
766
755
|
}
|
|
767
756
|
return result.value;
|
|
@@ -776,7 +765,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
776
765
|
if (result instanceof Promise) result = await result;
|
|
777
766
|
if (result.issues.length) {
|
|
778
767
|
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
779
|
-
captureStackTrace(e, params?.callee);
|
|
768
|
+
Error.captureStackTrace(e, params?.callee);
|
|
780
769
|
throw e;
|
|
781
770
|
}
|
|
782
771
|
return result.value;
|
|
@@ -821,9 +810,10 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
821
810
|
const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
822
811
|
|
|
823
812
|
//#endregion
|
|
824
|
-
//#region ../../node_modules/zod/v4/core/regexes.js
|
|
813
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
|
|
825
814
|
var regexes_exports = {};
|
|
826
815
|
__export(regexes_exports, {
|
|
816
|
+
_emoji: () => _emoji$1,
|
|
827
817
|
base64: () => base64$1,
|
|
828
818
|
base64url: () => base64url$1,
|
|
829
819
|
bigint: () => bigint$2,
|
|
@@ -909,23 +899,27 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
|
|
|
909
899
|
const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
|
|
910
900
|
const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
911
901
|
const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
912
|
-
const dateSource = `(
|
|
902
|
+
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])))`;
|
|
913
903
|
const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
914
904
|
function timeSource(args) {
|
|
915
|
-
|
|
916
|
-
|
|
905
|
+
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
|
|
906
|
+
if (args.precision) {
|
|
907
|
+
regex = `${regex}\\.\\d{${args.precision}}`;
|
|
908
|
+
} else if (args.precision == null) {
|
|
909
|
+
regex = `${regex}(\\.\\d+)?`;
|
|
910
|
+
}
|
|
917
911
|
return regex;
|
|
918
912
|
}
|
|
919
913
|
function time$1(args) {
|
|
920
914
|
return new RegExp(`^${timeSource(args)}$`);
|
|
921
915
|
}
|
|
922
916
|
function datetime$1(args) {
|
|
923
|
-
|
|
924
|
-
const opts = [
|
|
925
|
-
|
|
926
|
-
if (args.offset) opts.push(`([+-]\\d{2}
|
|
927
|
-
|
|
928
|
-
return new RegExp(`^${
|
|
917
|
+
let regex = `${dateSource}T${timeSource(args)}`;
|
|
918
|
+
const opts = [];
|
|
919
|
+
opts.push(args.local ? `Z?` : `Z`);
|
|
920
|
+
if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
|
|
921
|
+
regex = `${regex}(${opts.join("|")})`;
|
|
922
|
+
return new RegExp(`^${regex}$`);
|
|
929
923
|
}
|
|
930
924
|
const string$2 = (params) => {
|
|
931
925
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
@@ -941,7 +935,7 @@ const lowercase = /^[^A-Z]*$/;
|
|
|
941
935
|
const uppercase = /^[^a-z]*$/;
|
|
942
936
|
|
|
943
937
|
//#endregion
|
|
944
|
-
//#region ../../node_modules/zod/v4/core/checks.js
|
|
938
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/checks.js
|
|
945
939
|
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
946
940
|
var _a;
|
|
947
941
|
inst._zod ?? (inst._zod = {});
|
|
@@ -1132,12 +1126,11 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
|
|
|
1132
1126
|
};
|
|
1133
1127
|
});
|
|
1134
1128
|
const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1135
|
-
var _a;
|
|
1136
1129
|
$ZodCheck.init(inst, def);
|
|
1137
|
-
|
|
1130
|
+
inst._zod.when = (payload) => {
|
|
1138
1131
|
const val = payload.value;
|
|
1139
1132
|
return !nullish$1(val) && val.size !== undefined;
|
|
1140
|
-
}
|
|
1133
|
+
};
|
|
1141
1134
|
inst._zod.onattach.push((inst$1) => {
|
|
1142
1135
|
const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
1143
1136
|
if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
|
|
@@ -1157,12 +1150,11 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
|
|
|
1157
1150
|
};
|
|
1158
1151
|
});
|
|
1159
1152
|
const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1160
|
-
var _a;
|
|
1161
1153
|
$ZodCheck.init(inst, def);
|
|
1162
|
-
|
|
1154
|
+
inst._zod.when = (payload) => {
|
|
1163
1155
|
const val = payload.value;
|
|
1164
1156
|
return !nullish$1(val) && val.size !== undefined;
|
|
1165
|
-
}
|
|
1157
|
+
};
|
|
1166
1158
|
inst._zod.onattach.push((inst$1) => {
|
|
1167
1159
|
const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
1168
1160
|
if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
|
|
@@ -1182,12 +1174,11 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
|
|
|
1182
1174
|
};
|
|
1183
1175
|
});
|
|
1184
1176
|
const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1185
|
-
var _a;
|
|
1186
1177
|
$ZodCheck.init(inst, def);
|
|
1187
|
-
|
|
1178
|
+
inst._zod.when = (payload) => {
|
|
1188
1179
|
const val = payload.value;
|
|
1189
1180
|
return !nullish$1(val) && val.size !== undefined;
|
|
1190
|
-
}
|
|
1181
|
+
};
|
|
1191
1182
|
inst._zod.onattach.push((inst$1) => {
|
|
1192
1183
|
const bag = inst$1._zod.bag;
|
|
1193
1184
|
bag.minimum = def.size;
|
|
@@ -1208,8 +1199,6 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
|
|
|
1208
1199
|
code: "too_small",
|
|
1209
1200
|
minimum: def.size
|
|
1210
1201
|
},
|
|
1211
|
-
inclusive: true,
|
|
1212
|
-
exact: true,
|
|
1213
1202
|
input: payload.value,
|
|
1214
1203
|
inst,
|
|
1215
1204
|
continue: !def.abort
|
|
@@ -1217,12 +1206,11 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
|
|
|
1217
1206
|
};
|
|
1218
1207
|
});
|
|
1219
1208
|
const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1220
|
-
var _a;
|
|
1221
1209
|
$ZodCheck.init(inst, def);
|
|
1222
|
-
|
|
1210
|
+
inst._zod.when = (payload) => {
|
|
1223
1211
|
const val = payload.value;
|
|
1224
1212
|
return !nullish$1(val) && val.length !== undefined;
|
|
1225
|
-
}
|
|
1213
|
+
};
|
|
1226
1214
|
inst._zod.onattach.push((inst$1) => {
|
|
1227
1215
|
const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
1228
1216
|
if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
|
|
@@ -1244,12 +1232,11 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
|
|
|
1244
1232
|
};
|
|
1245
1233
|
});
|
|
1246
1234
|
const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1247
|
-
var _a;
|
|
1248
1235
|
$ZodCheck.init(inst, def);
|
|
1249
|
-
|
|
1236
|
+
inst._zod.when = (payload) => {
|
|
1250
1237
|
const val = payload.value;
|
|
1251
1238
|
return !nullish$1(val) && val.length !== undefined;
|
|
1252
|
-
}
|
|
1239
|
+
};
|
|
1253
1240
|
inst._zod.onattach.push((inst$1) => {
|
|
1254
1241
|
const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
1255
1242
|
if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
|
|
@@ -1271,12 +1258,11 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
|
|
|
1271
1258
|
};
|
|
1272
1259
|
});
|
|
1273
1260
|
const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1274
|
-
var _a;
|
|
1275
1261
|
$ZodCheck.init(inst, def);
|
|
1276
|
-
|
|
1262
|
+
inst._zod.when = (payload) => {
|
|
1277
1263
|
const val = payload.value;
|
|
1278
1264
|
return !nullish$1(val) && val.length !== undefined;
|
|
1279
|
-
}
|
|
1265
|
+
};
|
|
1280
1266
|
inst._zod.onattach.push((inst$1) => {
|
|
1281
1267
|
const bag = inst$1._zod.bag;
|
|
1282
1268
|
bag.minimum = def.length;
|
|
@@ -1298,8 +1284,6 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
1298
1284
|
code: "too_small",
|
|
1299
1285
|
minimum: def.length
|
|
1300
1286
|
},
|
|
1301
|
-
inclusive: true,
|
|
1302
|
-
exact: true,
|
|
1303
1287
|
input: payload.value,
|
|
1304
1288
|
inst,
|
|
1305
1289
|
continue: !def.abort
|
|
@@ -1307,7 +1291,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
|
|
|
1307
1291
|
};
|
|
1308
1292
|
});
|
|
1309
1293
|
const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1310
|
-
var _a
|
|
1294
|
+
var _a;
|
|
1311
1295
|
$ZodCheck.init(inst, def);
|
|
1312
1296
|
inst._zod.onattach.push((inst$1) => {
|
|
1313
1297
|
const bag = inst$1._zod.bag;
|
|
@@ -1317,7 +1301,8 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
1317
1301
|
bag.patterns.add(def.pattern);
|
|
1318
1302
|
}
|
|
1319
1303
|
});
|
|
1320
|
-
|
|
1304
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
1305
|
+
if (!def.pattern) throw new Error("Not implemented.");
|
|
1321
1306
|
def.pattern.lastIndex = 0;
|
|
1322
1307
|
if (def.pattern.test(payload.value)) return;
|
|
1323
1308
|
payload.issues.push({
|
|
@@ -1330,7 +1315,6 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
|
|
|
1330
1315
|
continue: !def.abort
|
|
1331
1316
|
});
|
|
1332
1317
|
});
|
|
1333
|
-
else (_b = inst._zod).check ?? (_b.check = () => {});
|
|
1334
1318
|
});
|
|
1335
1319
|
const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
|
|
1336
1320
|
$ZodCheckStringFormat.init(inst, def);
|
|
@@ -1454,6 +1438,7 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
|
|
|
1454
1438
|
code: "invalid_value",
|
|
1455
1439
|
values: def.mime,
|
|
1456
1440
|
input: payload.value.type,
|
|
1441
|
+
path: ["type"],
|
|
1457
1442
|
inst
|
|
1458
1443
|
});
|
|
1459
1444
|
};
|
|
@@ -1466,7 +1451,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
1466
1451
|
});
|
|
1467
1452
|
|
|
1468
1453
|
//#endregion
|
|
1469
|
-
//#region ../../node_modules/zod/v4/core/doc.js
|
|
1454
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/doc.js
|
|
1470
1455
|
var Doc = class {
|
|
1471
1456
|
constructor(args = []) {
|
|
1472
1457
|
this.content = [];
|
|
@@ -1502,18 +1487,19 @@ var Doc = class {
|
|
|
1502
1487
|
};
|
|
1503
1488
|
|
|
1504
1489
|
//#endregion
|
|
1505
|
-
//#region ../../node_modules/zod/v4/core/versions.js
|
|
1490
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/versions.js
|
|
1506
1491
|
const version = {
|
|
1507
1492
|
major: 4,
|
|
1508
1493
|
minor: 0,
|
|
1509
|
-
patch:
|
|
1494
|
+
patch: 0
|
|
1510
1495
|
};
|
|
1511
1496
|
|
|
1512
1497
|
//#endregion
|
|
1513
|
-
//#region ../../node_modules/zod/v4/core/schemas.js
|
|
1498
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
|
|
1514
1499
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
1515
1500
|
var _a;
|
|
1516
1501
|
inst ?? (inst = {});
|
|
1502
|
+
inst._zod.id = def.type + "_" + randomString(10);
|
|
1517
1503
|
inst._zod.def = def;
|
|
1518
1504
|
inst._zod.bag = inst._zod.bag || {};
|
|
1519
1505
|
inst._zod.version = version;
|
|
@@ -1536,11 +1522,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
1536
1522
|
let isAborted = aborted(payload);
|
|
1537
1523
|
let asyncResult;
|
|
1538
1524
|
for (const ch of checks$1) {
|
|
1539
|
-
if (ch._zod.
|
|
1540
|
-
const shouldRun = ch._zod.
|
|
1525
|
+
if (ch._zod.when) {
|
|
1526
|
+
const shouldRun = ch._zod.when(payload);
|
|
1541
1527
|
if (!shouldRun) continue;
|
|
1542
|
-
} else
|
|
1543
|
-
|
|
1528
|
+
} else {
|
|
1529
|
+
if (isAborted) {
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1544
1532
|
}
|
|
1545
1533
|
const currLen = payload.issues.length;
|
|
1546
1534
|
const _ = ch._zod.check(payload);
|
|
@@ -1640,9 +1628,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1640
1628
|
$ZodStringFormat.init(inst, def);
|
|
1641
1629
|
inst._zod.check = (payload) => {
|
|
1642
1630
|
try {
|
|
1643
|
-
const
|
|
1644
|
-
const url$1 = new URL(orig);
|
|
1645
|
-
const href = url$1.href;
|
|
1631
|
+
const url$1 = new URL(payload.value);
|
|
1646
1632
|
if (def.hostname) {
|
|
1647
1633
|
def.hostname.lastIndex = 0;
|
|
1648
1634
|
if (!def.hostname.test(url$1.hostname)) {
|
|
@@ -1671,11 +1657,6 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1671
1657
|
});
|
|
1672
1658
|
}
|
|
1673
1659
|
}
|
|
1674
|
-
if (!orig.endsWith("/") && href.endsWith("/")) {
|
|
1675
|
-
payload.value = href.slice(0, -1);
|
|
1676
|
-
} else {
|
|
1677
|
-
payload.value = href;
|
|
1678
|
-
}
|
|
1679
1660
|
return;
|
|
1680
1661
|
} catch (_) {
|
|
1681
1662
|
payload.issues.push({
|
|
@@ -1846,7 +1827,6 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1846
1827
|
const tokensParts = token.split(".");
|
|
1847
1828
|
if (tokensParts.length !== 3) return false;
|
|
1848
1829
|
const [header] = tokensParts;
|
|
1849
|
-
if (!header) return false;
|
|
1850
1830
|
const parsedHeader = JSON.parse(atob(header));
|
|
1851
1831
|
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
|
|
1852
1832
|
if (!parsedHeader.alg) return false;
|
|
@@ -1869,19 +1849,6 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
|
1869
1849
|
});
|
|
1870
1850
|
};
|
|
1871
1851
|
});
|
|
1872
|
-
const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
|
|
1873
|
-
$ZodStringFormat.init(inst, def);
|
|
1874
|
-
inst._zod.check = (payload) => {
|
|
1875
|
-
if (def.fn(payload.value)) return;
|
|
1876
|
-
payload.issues.push({
|
|
1877
|
-
code: "invalid_format",
|
|
1878
|
-
format: def.format,
|
|
1879
|
-
input: payload.value,
|
|
1880
|
-
inst,
|
|
1881
|
-
continue: !def.abort
|
|
1882
|
-
});
|
|
1883
|
-
};
|
|
1884
|
-
});
|
|
1885
1852
|
const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
1886
1853
|
$ZodType.init(inst, def);
|
|
1887
1854
|
inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
|
|
@@ -1933,11 +1900,12 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
1933
1900
|
if (def.coerce) try {
|
|
1934
1901
|
payload.value = BigInt(payload.value);
|
|
1935
1902
|
} catch (_) {}
|
|
1936
|
-
|
|
1903
|
+
const { value: input } = payload;
|
|
1904
|
+
if (typeof input === "bigint") return payload;
|
|
1937
1905
|
payload.issues.push({
|
|
1938
1906
|
expected: "bigint",
|
|
1939
1907
|
code: "invalid_type",
|
|
1940
|
-
input
|
|
1908
|
+
input,
|
|
1941
1909
|
inst
|
|
1942
1910
|
});
|
|
1943
1911
|
return payload;
|
|
@@ -1950,7 +1918,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
|
|
|
1950
1918
|
const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
|
|
1951
1919
|
$ZodType.init(inst, def);
|
|
1952
1920
|
inst._zod.parse = (payload, _ctx) => {
|
|
1953
|
-
const input = payload
|
|
1921
|
+
const { value: input } = payload;
|
|
1954
1922
|
if (typeof input === "symbol") return payload;
|
|
1955
1923
|
payload.issues.push({
|
|
1956
1924
|
expected: "symbol",
|
|
@@ -1965,10 +1933,8 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
|
|
|
1965
1933
|
$ZodType.init(inst, def);
|
|
1966
1934
|
inst._zod.pattern = _undefined$2;
|
|
1967
1935
|
inst._zod.values = new Set([undefined]);
|
|
1968
|
-
inst._zod.optin = "optional";
|
|
1969
|
-
inst._zod.optout = "optional";
|
|
1970
1936
|
inst._zod.parse = (payload, _ctx) => {
|
|
1971
|
-
const input = payload
|
|
1937
|
+
const { value: input } = payload;
|
|
1972
1938
|
if (typeof input === "undefined") return payload;
|
|
1973
1939
|
payload.issues.push({
|
|
1974
1940
|
expected: "undefined",
|
|
@@ -1984,7 +1950,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
|
|
|
1984
1950
|
inst._zod.pattern = _null$2;
|
|
1985
1951
|
inst._zod.values = new Set([null]);
|
|
1986
1952
|
inst._zod.parse = (payload, _ctx) => {
|
|
1987
|
-
const input = payload
|
|
1953
|
+
const { value: input } = payload;
|
|
1988
1954
|
if (input === null) return payload;
|
|
1989
1955
|
payload.issues.push({
|
|
1990
1956
|
expected: "null",
|
|
@@ -2018,7 +1984,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
2018
1984
|
const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
|
|
2019
1985
|
$ZodType.init(inst, def);
|
|
2020
1986
|
inst._zod.parse = (payload, _ctx) => {
|
|
2021
|
-
const input = payload
|
|
1987
|
+
const { value: input } = payload;
|
|
2022
1988
|
if (typeof input === "undefined") return payload;
|
|
2023
1989
|
payload.issues.push({
|
|
2024
1990
|
expected: "void",
|
|
@@ -2149,20 +2115,19 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2149
2115
|
"payload",
|
|
2150
2116
|
"ctx"
|
|
2151
2117
|
]);
|
|
2152
|
-
const
|
|
2118
|
+
const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
|
|
2153
2119
|
const parseStr = (key) => {
|
|
2154
2120
|
const k = esc(key);
|
|
2155
2121
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
2156
2122
|
};
|
|
2157
2123
|
doc.write(`const input = payload.value;`);
|
|
2158
2124
|
const ids = Object.create(null);
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
ids[key] = `key_${counter++}`;
|
|
2125
|
+
for (const key of keys) {
|
|
2126
|
+
ids[key] = randomString(15);
|
|
2162
2127
|
}
|
|
2163
2128
|
doc.write(`const newResult = {}`);
|
|
2164
|
-
for (const key of
|
|
2165
|
-
if (
|
|
2129
|
+
for (const key of keys) {
|
|
2130
|
+
if (optionalKeys$1.has(key)) {
|
|
2166
2131
|
const id = ids[key];
|
|
2167
2132
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2168
2133
|
const k = esc(key);
|
|
@@ -2207,7 +2172,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2207
2172
|
const jit = !globalConfig.jitless;
|
|
2208
2173
|
const allowsEval$1 = allowsEval;
|
|
2209
2174
|
const fastEnabled = jit && allowsEval$1.value;
|
|
2210
|
-
const catchall = def
|
|
2175
|
+
const { catchall } = def;
|
|
2211
2176
|
let value;
|
|
2212
2177
|
inst._zod.parse = (payload, ctx) => {
|
|
2213
2178
|
value ?? (value = _normalized.value);
|
|
@@ -2237,10 +2202,12 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2237
2202
|
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
|
2238
2203
|
if (r instanceof Promise) {
|
|
2239
2204
|
proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
|
|
2240
|
-
} else if (isOptional) {
|
|
2241
|
-
handleOptionalObjectResult(r, payload, key, input);
|
|
2242
2205
|
} else {
|
|
2243
|
-
|
|
2206
|
+
if (isOptional) {
|
|
2207
|
+
handleOptionalObjectResult(r, payload, key, input);
|
|
2208
|
+
} else {
|
|
2209
|
+
handleObjectResult(r, payload, key);
|
|
2210
|
+
}
|
|
2244
2211
|
}
|
|
2245
2212
|
}
|
|
2246
2213
|
}
|
|
@@ -2298,8 +2265,6 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
2298
2265
|
}
|
|
2299
2266
|
const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
2300
2267
|
$ZodType.init(inst, def);
|
|
2301
|
-
defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
|
|
2302
|
-
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
|
|
2303
2268
|
defineLazy(inst._zod, "values", () => {
|
|
2304
2269
|
if (def.options.every((o) => o._zod.values)) {
|
|
2305
2270
|
return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
|
|
@@ -2399,7 +2364,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
|
|
|
2399
2364
|
const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
2400
2365
|
$ZodType.init(inst, def);
|
|
2401
2366
|
inst._zod.parse = (payload, ctx) => {
|
|
2402
|
-
const input = payload
|
|
2367
|
+
const { value: input } = payload;
|
|
2403
2368
|
const left = def.left._zod.run({
|
|
2404
2369
|
value: input,
|
|
2405
2370
|
issues: []
|
|
@@ -2856,9 +2821,6 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
|
|
|
2856
2821
|
return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
|
|
2857
2822
|
});
|
|
2858
2823
|
inst._zod.parse = (payload, ctx) => {
|
|
2859
|
-
if (def.innerType._zod.optin === "optional") {
|
|
2860
|
-
return def.innerType._zod.run(payload, ctx);
|
|
2861
|
-
}
|
|
2862
2824
|
if (payload.value === undefined) {
|
|
2863
2825
|
return payload;
|
|
2864
2826
|
}
|
|
@@ -2958,7 +2920,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
2958
2920
|
});
|
|
2959
2921
|
const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
2960
2922
|
$ZodType.init(inst, def);
|
|
2961
|
-
inst._zod
|
|
2923
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
2962
2924
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
2963
2925
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2964
2926
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3029,7 +2991,6 @@ function handlePipeResult(left, def, ctx) {
|
|
|
3029
2991
|
const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
3030
2992
|
$ZodType.init(inst, def);
|
|
3031
2993
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
3032
|
-
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3033
2994
|
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
3034
2995
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3035
2996
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3080,7 +3041,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
|
|
|
3080
3041
|
input: payload.value,
|
|
3081
3042
|
inst,
|
|
3082
3043
|
code: "invalid_format",
|
|
3083
|
-
format:
|
|
3044
|
+
format: "template_literal",
|
|
3084
3045
|
pattern: inst._zod.pattern.source
|
|
3085
3046
|
});
|
|
3086
3047
|
return payload;
|
|
@@ -3140,8 +3101,8 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
3140
3101
|
}
|
|
3141
3102
|
|
|
3142
3103
|
//#endregion
|
|
3143
|
-
//#region ../../node_modules/zod/v4/locales/ar.js
|
|
3144
|
-
const error$
|
|
3104
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
|
|
3105
|
+
const error$36 = () => {
|
|
3145
3106
|
const Sizable = {
|
|
3146
3107
|
string: {
|
|
3147
3108
|
unit: "حرف",
|
|
@@ -3163,7 +3124,7 @@ const error$38 = () => {
|
|
|
3163
3124
|
function getSizing(origin) {
|
|
3164
3125
|
return Sizable[origin] ?? null;
|
|
3165
3126
|
}
|
|
3166
|
-
const parsedType$
|
|
3127
|
+
const parsedType$2 = (data) => {
|
|
3167
3128
|
const t = typeof data;
|
|
3168
3129
|
switch (t) {
|
|
3169
3130
|
case "number": {
|
|
@@ -3215,7 +3176,7 @@ const error$38 = () => {
|
|
|
3215
3176
|
};
|
|
3216
3177
|
return (issue$1) => {
|
|
3217
3178
|
switch (issue$1.code) {
|
|
3218
|
-
case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$
|
|
3179
|
+
case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
|
|
3219
3180
|
case "invalid_value":
|
|
3220
3181
|
if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3221
3182
|
return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3251,12 +3212,12 @@ const error$38 = () => {
|
|
|
3251
3212
|
};
|
|
3252
3213
|
};
|
|
3253
3214
|
function ar_default() {
|
|
3254
|
-
return { localeError: error$
|
|
3215
|
+
return { localeError: error$36() };
|
|
3255
3216
|
}
|
|
3256
3217
|
|
|
3257
3218
|
//#endregion
|
|
3258
|
-
//#region ../../node_modules/zod/v4/locales/az.js
|
|
3259
|
-
const error$
|
|
3219
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/az.js
|
|
3220
|
+
const error$35 = () => {
|
|
3260
3221
|
const Sizable = {
|
|
3261
3222
|
string: {
|
|
3262
3223
|
unit: "simvol",
|
|
@@ -3278,7 +3239,7 @@ const error$37 = () => {
|
|
|
3278
3239
|
function getSizing(origin) {
|
|
3279
3240
|
return Sizable[origin] ?? null;
|
|
3280
3241
|
}
|
|
3281
|
-
const parsedType$
|
|
3242
|
+
const parsedType$2 = (data) => {
|
|
3282
3243
|
const t = typeof data;
|
|
3283
3244
|
switch (t) {
|
|
3284
3245
|
case "number": {
|
|
@@ -3330,7 +3291,7 @@ const error$37 = () => {
|
|
|
3330
3291
|
};
|
|
3331
3292
|
return (issue$1) => {
|
|
3332
3293
|
switch (issue$1.code) {
|
|
3333
|
-
case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$
|
|
3294
|
+
case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
|
|
3334
3295
|
case "invalid_value":
|
|
3335
3296
|
if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3336
3297
|
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3364,11 +3325,11 @@ const error$37 = () => {
|
|
|
3364
3325
|
};
|
|
3365
3326
|
};
|
|
3366
3327
|
function az_default() {
|
|
3367
|
-
return { localeError: error$
|
|
3328
|
+
return { localeError: error$35() };
|
|
3368
3329
|
}
|
|
3369
3330
|
|
|
3370
3331
|
//#endregion
|
|
3371
|
-
//#region ../../node_modules/zod/v4/locales/be.js
|
|
3332
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/be.js
|
|
3372
3333
|
function getBelarusianPlural(count, one, few, many) {
|
|
3373
3334
|
const absCount = Math.abs(count);
|
|
3374
3335
|
const lastDigit = absCount % 10;
|
|
@@ -3384,7 +3345,7 @@ function getBelarusianPlural(count, one, few, many) {
|
|
|
3384
3345
|
}
|
|
3385
3346
|
return many;
|
|
3386
3347
|
}
|
|
3387
|
-
const error$
|
|
3348
|
+
const error$34 = () => {
|
|
3388
3349
|
const Sizable = {
|
|
3389
3350
|
string: {
|
|
3390
3351
|
unit: {
|
|
@@ -3422,7 +3383,7 @@ const error$36 = () => {
|
|
|
3422
3383
|
function getSizing(origin) {
|
|
3423
3384
|
return Sizable[origin] ?? null;
|
|
3424
3385
|
}
|
|
3425
|
-
const parsedType$
|
|
3386
|
+
const parsedType$2 = (data) => {
|
|
3426
3387
|
const t = typeof data;
|
|
3427
3388
|
switch (t) {
|
|
3428
3389
|
case "number": {
|
|
@@ -3474,7 +3435,7 @@ const error$36 = () => {
|
|
|
3474
3435
|
};
|
|
3475
3436
|
return (issue$1) => {
|
|
3476
3437
|
switch (issue$1.code) {
|
|
3477
|
-
case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$
|
|
3438
|
+
case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
|
|
3478
3439
|
case "invalid_value":
|
|
3479
3440
|
if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3480
3441
|
return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3516,12 +3477,12 @@ const error$36 = () => {
|
|
|
3516
3477
|
};
|
|
3517
3478
|
};
|
|
3518
3479
|
function be_default() {
|
|
3519
|
-
return { localeError: error$
|
|
3480
|
+
return { localeError: error$34() };
|
|
3520
3481
|
}
|
|
3521
3482
|
|
|
3522
3483
|
//#endregion
|
|
3523
|
-
//#region ../../node_modules/zod/v4/locales/ca.js
|
|
3524
|
-
const error$
|
|
3484
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
|
|
3485
|
+
const error$33 = () => {
|
|
3525
3486
|
const Sizable = {
|
|
3526
3487
|
string: {
|
|
3527
3488
|
unit: "caràcters",
|
|
@@ -3543,7 +3504,7 @@ const error$35 = () => {
|
|
|
3543
3504
|
function getSizing(origin) {
|
|
3544
3505
|
return Sizable[origin] ?? null;
|
|
3545
3506
|
}
|
|
3546
|
-
const parsedType$
|
|
3507
|
+
const parsedType$2 = (data) => {
|
|
3547
3508
|
const t = typeof data;
|
|
3548
3509
|
switch (t) {
|
|
3549
3510
|
case "number": {
|
|
@@ -3595,7 +3556,7 @@ const error$35 = () => {
|
|
|
3595
3556
|
};
|
|
3596
3557
|
return (issue$1) => {
|
|
3597
3558
|
switch (issue$1.code) {
|
|
3598
|
-
case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$
|
|
3559
|
+
case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
|
|
3599
3560
|
case "invalid_value":
|
|
3600
3561
|
if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3601
3562
|
return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
|
|
@@ -3633,12 +3594,12 @@ const error$35 = () => {
|
|
|
3633
3594
|
};
|
|
3634
3595
|
};
|
|
3635
3596
|
function ca_default() {
|
|
3636
|
-
return { localeError: error$
|
|
3597
|
+
return { localeError: error$33() };
|
|
3637
3598
|
}
|
|
3638
3599
|
|
|
3639
3600
|
//#endregion
|
|
3640
|
-
//#region ../../node_modules/zod/v4/locales/cs.js
|
|
3641
|
-
const error$
|
|
3601
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
|
|
3602
|
+
const error$32 = () => {
|
|
3642
3603
|
const Sizable = {
|
|
3643
3604
|
string: {
|
|
3644
3605
|
unit: "znaků",
|
|
@@ -3660,7 +3621,7 @@ const error$34 = () => {
|
|
|
3660
3621
|
function getSizing(origin) {
|
|
3661
3622
|
return Sizable[origin] ?? null;
|
|
3662
3623
|
}
|
|
3663
|
-
const parsedType$
|
|
3624
|
+
const parsedType$2 = (data) => {
|
|
3664
3625
|
const t = typeof data;
|
|
3665
3626
|
switch (t) {
|
|
3666
3627
|
case "number": {
|
|
@@ -3730,7 +3691,7 @@ const error$34 = () => {
|
|
|
3730
3691
|
};
|
|
3731
3692
|
return (issue$1) => {
|
|
3732
3693
|
switch (issue$1.code) {
|
|
3733
|
-
case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$
|
|
3694
|
+
case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
|
|
3734
3695
|
case "invalid_value":
|
|
3735
3696
|
if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3736
3697
|
return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3768,12 +3729,12 @@ const error$34 = () => {
|
|
|
3768
3729
|
};
|
|
3769
3730
|
};
|
|
3770
3731
|
function cs_default() {
|
|
3771
|
-
return { localeError: error$
|
|
3732
|
+
return { localeError: error$32() };
|
|
3772
3733
|
}
|
|
3773
3734
|
|
|
3774
3735
|
//#endregion
|
|
3775
|
-
//#region ../../node_modules/zod/v4/locales/de.js
|
|
3776
|
-
const error$
|
|
3736
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/de.js
|
|
3737
|
+
const error$31 = () => {
|
|
3777
3738
|
const Sizable = {
|
|
3778
3739
|
string: {
|
|
3779
3740
|
unit: "Zeichen",
|
|
@@ -3795,7 +3756,7 @@ const error$33 = () => {
|
|
|
3795
3756
|
function getSizing(origin) {
|
|
3796
3757
|
return Sizable[origin] ?? null;
|
|
3797
3758
|
}
|
|
3798
|
-
const parsedType$
|
|
3759
|
+
const parsedType$2 = (data) => {
|
|
3799
3760
|
const t = typeof data;
|
|
3800
3761
|
switch (t) {
|
|
3801
3762
|
case "number": {
|
|
@@ -3847,7 +3808,7 @@ const error$33 = () => {
|
|
|
3847
3808
|
};
|
|
3848
3809
|
return (issue$1) => {
|
|
3849
3810
|
switch (issue$1.code) {
|
|
3850
|
-
case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$
|
|
3811
|
+
case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
|
|
3851
3812
|
case "invalid_value":
|
|
3852
3813
|
if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3853
3814
|
return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
|
|
@@ -3883,12 +3844,12 @@ const error$33 = () => {
|
|
|
3883
3844
|
};
|
|
3884
3845
|
};
|
|
3885
3846
|
function de_default() {
|
|
3886
|
-
return { localeError: error$
|
|
3847
|
+
return { localeError: error$31() };
|
|
3887
3848
|
}
|
|
3888
3849
|
|
|
3889
3850
|
//#endregion
|
|
3890
|
-
//#region ../../node_modules/zod/v4/locales/en.js
|
|
3891
|
-
const parsedType$
|
|
3851
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/en.js
|
|
3852
|
+
const parsedType$1 = (data) => {
|
|
3892
3853
|
const t = typeof data;
|
|
3893
3854
|
switch (t) {
|
|
3894
3855
|
case "number": {
|
|
@@ -3908,7 +3869,7 @@ const parsedType$2 = (data) => {
|
|
|
3908
3869
|
}
|
|
3909
3870
|
return t;
|
|
3910
3871
|
};
|
|
3911
|
-
const error$
|
|
3872
|
+
const error$30 = () => {
|
|
3912
3873
|
const Sizable = {
|
|
3913
3874
|
string: {
|
|
3914
3875
|
unit: "characters",
|
|
@@ -3962,7 +3923,7 @@ const error$32 = () => {
|
|
|
3962
3923
|
};
|
|
3963
3924
|
return (issue$1) => {
|
|
3964
3925
|
switch (issue$1.code) {
|
|
3965
|
-
case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$
|
|
3926
|
+
case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
|
|
3966
3927
|
case "invalid_value":
|
|
3967
3928
|
if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
|
|
3968
3929
|
return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4000,127 +3961,12 @@ const error$32 = () => {
|
|
|
4000
3961
|
};
|
|
4001
3962
|
};
|
|
4002
3963
|
function en_default() {
|
|
4003
|
-
return { localeError: error$
|
|
4004
|
-
}
|
|
4005
|
-
|
|
4006
|
-
//#endregion
|
|
4007
|
-
//#region ../../node_modules/zod/v4/locales/eo.js
|
|
4008
|
-
const parsedType$1 = (data) => {
|
|
4009
|
-
const t = typeof data;
|
|
4010
|
-
switch (t) {
|
|
4011
|
-
case "number": {
|
|
4012
|
-
return Number.isNaN(data) ? "NaN" : "nombro";
|
|
4013
|
-
}
|
|
4014
|
-
case "object": {
|
|
4015
|
-
if (Array.isArray(data)) {
|
|
4016
|
-
return "tabelo";
|
|
4017
|
-
}
|
|
4018
|
-
if (data === null) {
|
|
4019
|
-
return "senvalora";
|
|
4020
|
-
}
|
|
4021
|
-
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
4022
|
-
return data.constructor.name;
|
|
4023
|
-
}
|
|
4024
|
-
}
|
|
4025
|
-
}
|
|
4026
|
-
return t;
|
|
4027
|
-
};
|
|
4028
|
-
const error$31 = () => {
|
|
4029
|
-
const Sizable = {
|
|
4030
|
-
string: {
|
|
4031
|
-
unit: "karaktrojn",
|
|
4032
|
-
verb: "havi"
|
|
4033
|
-
},
|
|
4034
|
-
file: {
|
|
4035
|
-
unit: "bajtojn",
|
|
4036
|
-
verb: "havi"
|
|
4037
|
-
},
|
|
4038
|
-
array: {
|
|
4039
|
-
unit: "elementojn",
|
|
4040
|
-
verb: "havi"
|
|
4041
|
-
},
|
|
4042
|
-
set: {
|
|
4043
|
-
unit: "elementojn",
|
|
4044
|
-
verb: "havi"
|
|
4045
|
-
}
|
|
4046
|
-
};
|
|
4047
|
-
function getSizing(origin) {
|
|
4048
|
-
return Sizable[origin] ?? null;
|
|
4049
|
-
}
|
|
4050
|
-
const Nouns = {
|
|
4051
|
-
regex: "enigo",
|
|
4052
|
-
email: "retadreso",
|
|
4053
|
-
url: "URL",
|
|
4054
|
-
emoji: "emoĝio",
|
|
4055
|
-
uuid: "UUID",
|
|
4056
|
-
uuidv4: "UUIDv4",
|
|
4057
|
-
uuidv6: "UUIDv6",
|
|
4058
|
-
nanoid: "nanoid",
|
|
4059
|
-
guid: "GUID",
|
|
4060
|
-
cuid: "cuid",
|
|
4061
|
-
cuid2: "cuid2",
|
|
4062
|
-
ulid: "ULID",
|
|
4063
|
-
xid: "XID",
|
|
4064
|
-
ksuid: "KSUID",
|
|
4065
|
-
datetime: "ISO-datotempo",
|
|
4066
|
-
date: "ISO-dato",
|
|
4067
|
-
time: "ISO-tempo",
|
|
4068
|
-
duration: "ISO-daŭro",
|
|
4069
|
-
ipv4: "IPv4-adreso",
|
|
4070
|
-
ipv6: "IPv6-adreso",
|
|
4071
|
-
cidrv4: "IPv4-rango",
|
|
4072
|
-
cidrv6: "IPv6-rango",
|
|
4073
|
-
base64: "64-ume kodita karaktraro",
|
|
4074
|
-
base64url: "URL-64-ume kodita karaktraro",
|
|
4075
|
-
json_string: "JSON-karaktraro",
|
|
4076
|
-
e164: "E.164-nombro",
|
|
4077
|
-
jwt: "JWT",
|
|
4078
|
-
template_literal: "enigo"
|
|
4079
|
-
};
|
|
4080
|
-
return (issue$1) => {
|
|
4081
|
-
switch (issue$1.code) {
|
|
4082
|
-
case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
|
|
4083
|
-
case "invalid_value":
|
|
4084
|
-
if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4085
|
-
return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
|
|
4086
|
-
case "too_big": {
|
|
4087
|
-
const adj = issue$1.inclusive ? "<=" : "<";
|
|
4088
|
-
const sizing = getSizing(issue$1.origin);
|
|
4089
|
-
if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
|
|
4090
|
-
return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
|
|
4091
|
-
}
|
|
4092
|
-
case "too_small": {
|
|
4093
|
-
const adj = issue$1.inclusive ? ">=" : ">";
|
|
4094
|
-
const sizing = getSizing(issue$1.origin);
|
|
4095
|
-
if (sizing) {
|
|
4096
|
-
return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
|
|
4097
|
-
}
|
|
4098
|
-
return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
|
|
4099
|
-
}
|
|
4100
|
-
case "invalid_format": {
|
|
4101
|
-
const _issue = issue$1;
|
|
4102
|
-
if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
|
|
4103
|
-
if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
|
|
4104
|
-
if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
|
|
4105
|
-
if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
|
|
4106
|
-
return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
|
|
4107
|
-
}
|
|
4108
|
-
case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
|
|
4109
|
-
case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
|
|
4110
|
-
case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
|
|
4111
|
-
case "invalid_union": return "Nevalida enigo";
|
|
4112
|
-
case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
|
|
4113
|
-
default: return `Nevalida enigo`;
|
|
4114
|
-
}
|
|
4115
|
-
};
|
|
4116
|
-
};
|
|
4117
|
-
function eo_default() {
|
|
4118
|
-
return { localeError: error$31() };
|
|
3964
|
+
return { localeError: error$30() };
|
|
4119
3965
|
}
|
|
4120
3966
|
|
|
4121
3967
|
//#endregion
|
|
4122
|
-
//#region ../../node_modules/zod/v4/locales/es.js
|
|
4123
|
-
const error$
|
|
3968
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/es.js
|
|
3969
|
+
const error$29 = () => {
|
|
4124
3970
|
const Sizable = {
|
|
4125
3971
|
string: {
|
|
4126
3972
|
unit: "caracteres",
|
|
@@ -4142,7 +3988,7 @@ const error$30 = () => {
|
|
|
4142
3988
|
function getSizing(origin) {
|
|
4143
3989
|
return Sizable[origin] ?? null;
|
|
4144
3990
|
}
|
|
4145
|
-
const parsedType$
|
|
3991
|
+
const parsedType$2 = (data) => {
|
|
4146
3992
|
const t = typeof data;
|
|
4147
3993
|
switch (t) {
|
|
4148
3994
|
case "number": {
|
|
@@ -4194,7 +4040,7 @@ const error$30 = () => {
|
|
|
4194
4040
|
};
|
|
4195
4041
|
return (issue$1) => {
|
|
4196
4042
|
switch (issue$1.code) {
|
|
4197
|
-
case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$
|
|
4043
|
+
case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
|
|
4198
4044
|
case "invalid_value":
|
|
4199
4045
|
if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4200
4046
|
return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4230,12 +4076,12 @@ const error$30 = () => {
|
|
|
4230
4076
|
};
|
|
4231
4077
|
};
|
|
4232
4078
|
function es_default() {
|
|
4233
|
-
return { localeError: error$
|
|
4079
|
+
return { localeError: error$29() };
|
|
4234
4080
|
}
|
|
4235
4081
|
|
|
4236
4082
|
//#endregion
|
|
4237
|
-
//#region ../../node_modules/zod/v4/locales/fa.js
|
|
4238
|
-
const error$
|
|
4083
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
|
|
4084
|
+
const error$28 = () => {
|
|
4239
4085
|
const Sizable = {
|
|
4240
4086
|
string: {
|
|
4241
4087
|
unit: "کاراکتر",
|
|
@@ -4257,7 +4103,7 @@ const error$29 = () => {
|
|
|
4257
4103
|
function getSizing(origin) {
|
|
4258
4104
|
return Sizable[origin] ?? null;
|
|
4259
4105
|
}
|
|
4260
|
-
const parsedType$
|
|
4106
|
+
const parsedType$2 = (data) => {
|
|
4261
4107
|
const t = typeof data;
|
|
4262
4108
|
switch (t) {
|
|
4263
4109
|
case "number": {
|
|
@@ -4309,7 +4155,7 @@ const error$29 = () => {
|
|
|
4309
4155
|
};
|
|
4310
4156
|
return (issue$1) => {
|
|
4311
4157
|
switch (issue$1.code) {
|
|
4312
|
-
case "invalid_type": return `ورودی نامعتبر: میبایست ${issue$1.expected} میبود، ${parsedType$
|
|
4158
|
+
case "invalid_type": return `ورودی نامعتبر: میبایست ${issue$1.expected} میبود، ${parsedType$2(issue$1.input)} دریافت شد`;
|
|
4313
4159
|
case "invalid_value":
|
|
4314
4160
|
if (issue$1.values.length === 1) {
|
|
4315
4161
|
return `ورودی نامعتبر: میبایست ${stringifyPrimitive(issue$1.values[0])} میبود`;
|
|
@@ -4357,12 +4203,12 @@ const error$29 = () => {
|
|
|
4357
4203
|
};
|
|
4358
4204
|
};
|
|
4359
4205
|
function fa_default() {
|
|
4360
|
-
return { localeError: error$
|
|
4206
|
+
return { localeError: error$28() };
|
|
4361
4207
|
}
|
|
4362
4208
|
|
|
4363
4209
|
//#endregion
|
|
4364
|
-
//#region ../../node_modules/zod/v4/locales/fi.js
|
|
4365
|
-
const error$
|
|
4210
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
|
|
4211
|
+
const error$27 = () => {
|
|
4366
4212
|
const Sizable = {
|
|
4367
4213
|
string: {
|
|
4368
4214
|
unit: "merkkiä",
|
|
@@ -4400,7 +4246,7 @@ const error$28 = () => {
|
|
|
4400
4246
|
function getSizing(origin) {
|
|
4401
4247
|
return Sizable[origin] ?? null;
|
|
4402
4248
|
}
|
|
4403
|
-
const parsedType$
|
|
4249
|
+
const parsedType$2 = (data) => {
|
|
4404
4250
|
const t = typeof data;
|
|
4405
4251
|
switch (t) {
|
|
4406
4252
|
case "number": {
|
|
@@ -4452,7 +4298,7 @@ const error$28 = () => {
|
|
|
4452
4298
|
};
|
|
4453
4299
|
return (issue$1) => {
|
|
4454
4300
|
switch (issue$1.code) {
|
|
4455
|
-
case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$
|
|
4301
|
+
case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
|
|
4456
4302
|
case "invalid_value":
|
|
4457
4303
|
if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4458
4304
|
return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4492,12 +4338,12 @@ const error$28 = () => {
|
|
|
4492
4338
|
};
|
|
4493
4339
|
};
|
|
4494
4340
|
function fi_default() {
|
|
4495
|
-
return { localeError: error$
|
|
4341
|
+
return { localeError: error$27() };
|
|
4496
4342
|
}
|
|
4497
4343
|
|
|
4498
4344
|
//#endregion
|
|
4499
|
-
//#region ../../node_modules/zod/v4/locales/fr.js
|
|
4500
|
-
const error$
|
|
4345
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
|
|
4346
|
+
const error$26 = () => {
|
|
4501
4347
|
const Sizable = {
|
|
4502
4348
|
string: {
|
|
4503
4349
|
unit: "caractères",
|
|
@@ -4519,7 +4365,7 @@ const error$27 = () => {
|
|
|
4519
4365
|
function getSizing(origin) {
|
|
4520
4366
|
return Sizable[origin] ?? null;
|
|
4521
4367
|
}
|
|
4522
|
-
const parsedType$
|
|
4368
|
+
const parsedType$2 = (data) => {
|
|
4523
4369
|
const t = typeof data;
|
|
4524
4370
|
switch (t) {
|
|
4525
4371
|
case "number": {
|
|
@@ -4571,7 +4417,7 @@ const error$27 = () => {
|
|
|
4571
4417
|
};
|
|
4572
4418
|
return (issue$1) => {
|
|
4573
4419
|
switch (issue$1.code) {
|
|
4574
|
-
case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$
|
|
4420
|
+
case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
|
|
4575
4421
|
case "invalid_value":
|
|
4576
4422
|
if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
|
|
4577
4423
|
return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
|
|
@@ -4607,12 +4453,12 @@ const error$27 = () => {
|
|
|
4607
4453
|
};
|
|
4608
4454
|
};
|
|
4609
4455
|
function fr_default() {
|
|
4610
|
-
return { localeError: error$
|
|
4456
|
+
return { localeError: error$26() };
|
|
4611
4457
|
}
|
|
4612
4458
|
|
|
4613
4459
|
//#endregion
|
|
4614
|
-
//#region ../../node_modules/zod/v4/locales/fr-CA.js
|
|
4615
|
-
const error$
|
|
4460
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
|
|
4461
|
+
const error$25 = () => {
|
|
4616
4462
|
const Sizable = {
|
|
4617
4463
|
string: {
|
|
4618
4464
|
unit: "caractères",
|
|
@@ -4634,7 +4480,7 @@ const error$26 = () => {
|
|
|
4634
4480
|
function getSizing(origin) {
|
|
4635
4481
|
return Sizable[origin] ?? null;
|
|
4636
4482
|
}
|
|
4637
|
-
const parsedType$
|
|
4483
|
+
const parsedType$2 = (data) => {
|
|
4638
4484
|
const t = typeof data;
|
|
4639
4485
|
switch (t) {
|
|
4640
4486
|
case "number": {
|
|
@@ -4686,7 +4532,7 @@ const error$26 = () => {
|
|
|
4686
4532
|
};
|
|
4687
4533
|
return (issue$1) => {
|
|
4688
4534
|
switch (issue$1.code) {
|
|
4689
|
-
case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$
|
|
4535
|
+
case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
|
|
4690
4536
|
case "invalid_value":
|
|
4691
4537
|
if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4692
4538
|
return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4724,12 +4570,12 @@ const error$26 = () => {
|
|
|
4724
4570
|
};
|
|
4725
4571
|
};
|
|
4726
4572
|
function fr_CA_default() {
|
|
4727
|
-
return { localeError: error$
|
|
4573
|
+
return { localeError: error$25() };
|
|
4728
4574
|
}
|
|
4729
4575
|
|
|
4730
4576
|
//#endregion
|
|
4731
|
-
//#region ../../node_modules/zod/v4/locales/he.js
|
|
4732
|
-
const error$
|
|
4577
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/he.js
|
|
4578
|
+
const error$24 = () => {
|
|
4733
4579
|
const Sizable = {
|
|
4734
4580
|
string: {
|
|
4735
4581
|
unit: "אותיות",
|
|
@@ -4751,7 +4597,7 @@ const error$25 = () => {
|
|
|
4751
4597
|
function getSizing(origin) {
|
|
4752
4598
|
return Sizable[origin] ?? null;
|
|
4753
4599
|
}
|
|
4754
|
-
const parsedType$
|
|
4600
|
+
const parsedType$2 = (data) => {
|
|
4755
4601
|
const t = typeof data;
|
|
4756
4602
|
switch (t) {
|
|
4757
4603
|
case "number": {
|
|
@@ -4803,7 +4649,7 @@ const error$25 = () => {
|
|
|
4803
4649
|
};
|
|
4804
4650
|
return (issue$1) => {
|
|
4805
4651
|
switch (issue$1.code) {
|
|
4806
|
-
case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$
|
|
4652
|
+
case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
|
|
4807
4653
|
case "invalid_value":
|
|
4808
4654
|
if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4809
4655
|
return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4839,12 +4685,12 @@ const error$25 = () => {
|
|
|
4839
4685
|
};
|
|
4840
4686
|
};
|
|
4841
4687
|
function he_default() {
|
|
4842
|
-
return { localeError: error$
|
|
4688
|
+
return { localeError: error$24() };
|
|
4843
4689
|
}
|
|
4844
4690
|
|
|
4845
4691
|
//#endregion
|
|
4846
|
-
//#region ../../node_modules/zod/v4/locales/hu.js
|
|
4847
|
-
const error$
|
|
4692
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
|
|
4693
|
+
const error$23 = () => {
|
|
4848
4694
|
const Sizable = {
|
|
4849
4695
|
string: {
|
|
4850
4696
|
unit: "karakter",
|
|
@@ -4866,7 +4712,7 @@ const error$24 = () => {
|
|
|
4866
4712
|
function getSizing(origin) {
|
|
4867
4713
|
return Sizable[origin] ?? null;
|
|
4868
4714
|
}
|
|
4869
|
-
const parsedType$
|
|
4715
|
+
const parsedType$2 = (data) => {
|
|
4870
4716
|
const t = typeof data;
|
|
4871
4717
|
switch (t) {
|
|
4872
4718
|
case "number": {
|
|
@@ -4918,7 +4764,7 @@ const error$24 = () => {
|
|
|
4918
4764
|
};
|
|
4919
4765
|
return (issue$1) => {
|
|
4920
4766
|
switch (issue$1.code) {
|
|
4921
|
-
case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$
|
|
4767
|
+
case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
|
|
4922
4768
|
case "invalid_value":
|
|
4923
4769
|
if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
|
|
4924
4770
|
return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
|
|
@@ -4954,12 +4800,12 @@ const error$24 = () => {
|
|
|
4954
4800
|
};
|
|
4955
4801
|
};
|
|
4956
4802
|
function hu_default() {
|
|
4957
|
-
return { localeError: error$
|
|
4803
|
+
return { localeError: error$23() };
|
|
4958
4804
|
}
|
|
4959
4805
|
|
|
4960
4806
|
//#endregion
|
|
4961
|
-
//#region ../../node_modules/zod/v4/locales/id.js
|
|
4962
|
-
const error$
|
|
4807
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/id.js
|
|
4808
|
+
const error$22 = () => {
|
|
4963
4809
|
const Sizable = {
|
|
4964
4810
|
string: {
|
|
4965
4811
|
unit: "karakter",
|
|
@@ -4981,7 +4827,7 @@ const error$23 = () => {
|
|
|
4981
4827
|
function getSizing(origin) {
|
|
4982
4828
|
return Sizable[origin] ?? null;
|
|
4983
4829
|
}
|
|
4984
|
-
const parsedType$
|
|
4830
|
+
const parsedType$2 = (data) => {
|
|
4985
4831
|
const t = typeof data;
|
|
4986
4832
|
switch (t) {
|
|
4987
4833
|
case "number": {
|
|
@@ -5033,7 +4879,7 @@ const error$23 = () => {
|
|
|
5033
4879
|
};
|
|
5034
4880
|
return (issue$1) => {
|
|
5035
4881
|
switch (issue$1.code) {
|
|
5036
|
-
case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$
|
|
4882
|
+
case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
|
|
5037
4883
|
case "invalid_value":
|
|
5038
4884
|
if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5039
4885
|
return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5069,12 +4915,12 @@ const error$23 = () => {
|
|
|
5069
4915
|
};
|
|
5070
4916
|
};
|
|
5071
4917
|
function id_default() {
|
|
5072
|
-
return { localeError: error$
|
|
4918
|
+
return { localeError: error$22() };
|
|
5073
4919
|
}
|
|
5074
4920
|
|
|
5075
4921
|
//#endregion
|
|
5076
|
-
//#region ../../node_modules/zod/v4/locales/it.js
|
|
5077
|
-
const error$
|
|
4922
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/it.js
|
|
4923
|
+
const error$21 = () => {
|
|
5078
4924
|
const Sizable = {
|
|
5079
4925
|
string: {
|
|
5080
4926
|
unit: "caratteri",
|
|
@@ -5096,7 +4942,7 @@ const error$22 = () => {
|
|
|
5096
4942
|
function getSizing(origin) {
|
|
5097
4943
|
return Sizable[origin] ?? null;
|
|
5098
4944
|
}
|
|
5099
|
-
const parsedType$
|
|
4945
|
+
const parsedType$2 = (data) => {
|
|
5100
4946
|
const t = typeof data;
|
|
5101
4947
|
switch (t) {
|
|
5102
4948
|
case "number": {
|
|
@@ -5148,7 +4994,7 @@ const error$22 = () => {
|
|
|
5148
4994
|
};
|
|
5149
4995
|
return (issue$1) => {
|
|
5150
4996
|
switch (issue$1.code) {
|
|
5151
|
-
case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$
|
|
4997
|
+
case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
|
|
5152
4998
|
case "invalid_value":
|
|
5153
4999
|
if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5154
5000
|
return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5184,12 +5030,12 @@ const error$22 = () => {
|
|
|
5184
5030
|
};
|
|
5185
5031
|
};
|
|
5186
5032
|
function it_default() {
|
|
5187
|
-
return { localeError: error$
|
|
5033
|
+
return { localeError: error$21() };
|
|
5188
5034
|
}
|
|
5189
5035
|
|
|
5190
5036
|
//#endregion
|
|
5191
|
-
//#region ../../node_modules/zod/v4/locales/ja.js
|
|
5192
|
-
const error$
|
|
5037
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
|
|
5038
|
+
const error$20 = () => {
|
|
5193
5039
|
const Sizable = {
|
|
5194
5040
|
string: {
|
|
5195
5041
|
unit: "文字",
|
|
@@ -5211,7 +5057,7 @@ const error$21 = () => {
|
|
|
5211
5057
|
function getSizing(origin) {
|
|
5212
5058
|
return Sizable[origin] ?? null;
|
|
5213
5059
|
}
|
|
5214
|
-
const parsedType$
|
|
5060
|
+
const parsedType$2 = (data) => {
|
|
5215
5061
|
const t = typeof data;
|
|
5216
5062
|
switch (t) {
|
|
5217
5063
|
case "number": {
|
|
@@ -5263,21 +5109,21 @@ const error$21 = () => {
|
|
|
5263
5109
|
};
|
|
5264
5110
|
return (issue$1) => {
|
|
5265
5111
|
switch (issue$1.code) {
|
|
5266
|
-
case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$
|
|
5112
|
+
case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
|
|
5267
5113
|
case "invalid_value":
|
|
5268
5114
|
if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
|
|
5269
5115
|
return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
|
|
5270
5116
|
case "too_big": {
|
|
5271
|
-
const adj = issue$1.inclusive ? "
|
|
5117
|
+
const adj = issue$1.inclusive ? "<=" : "<";
|
|
5272
5118
|
const sizing = getSizing(issue$1.origin);
|
|
5273
|
-
if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}
|
|
5274
|
-
return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}
|
|
5119
|
+
if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
|
|
5120
|
+
return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
|
|
5275
5121
|
}
|
|
5276
5122
|
case "too_small": {
|
|
5277
|
-
const adj = issue$1.inclusive ? "
|
|
5123
|
+
const adj = issue$1.inclusive ? ">=" : ">";
|
|
5278
5124
|
const sizing = getSizing(issue$1.origin);
|
|
5279
|
-
if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}
|
|
5280
|
-
return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}
|
|
5125
|
+
if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
|
|
5126
|
+
return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
|
|
5281
5127
|
}
|
|
5282
5128
|
case "invalid_format": {
|
|
5283
5129
|
const _issue = issue$1;
|
|
@@ -5297,12 +5143,12 @@ const error$21 = () => {
|
|
|
5297
5143
|
};
|
|
5298
5144
|
};
|
|
5299
5145
|
function ja_default() {
|
|
5300
|
-
return { localeError: error$
|
|
5146
|
+
return { localeError: error$20() };
|
|
5301
5147
|
}
|
|
5302
5148
|
|
|
5303
5149
|
//#endregion
|
|
5304
|
-
//#region ../../node_modules/zod/v4/locales/kh.js
|
|
5305
|
-
const error$
|
|
5150
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
|
|
5151
|
+
const error$19 = () => {
|
|
5306
5152
|
const Sizable = {
|
|
5307
5153
|
string: {
|
|
5308
5154
|
unit: "តួអក្សរ",
|
|
@@ -5324,7 +5170,7 @@ const error$20 = () => {
|
|
|
5324
5170
|
function getSizing(origin) {
|
|
5325
5171
|
return Sizable[origin] ?? null;
|
|
5326
5172
|
}
|
|
5327
|
-
const parsedType$
|
|
5173
|
+
const parsedType$2 = (data) => {
|
|
5328
5174
|
const t = typeof data;
|
|
5329
5175
|
switch (t) {
|
|
5330
5176
|
case "number": {
|
|
@@ -5376,7 +5222,7 @@ const error$20 = () => {
|
|
|
5376
5222
|
};
|
|
5377
5223
|
return (issue$1) => {
|
|
5378
5224
|
switch (issue$1.code) {
|
|
5379
|
-
case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$
|
|
5225
|
+
case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
|
|
5380
5226
|
case "invalid_value":
|
|
5381
5227
|
if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5382
5228
|
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5414,12 +5260,12 @@ const error$20 = () => {
|
|
|
5414
5260
|
};
|
|
5415
5261
|
};
|
|
5416
5262
|
function kh_default() {
|
|
5417
|
-
return { localeError: error$
|
|
5263
|
+
return { localeError: error$19() };
|
|
5418
5264
|
}
|
|
5419
5265
|
|
|
5420
5266
|
//#endregion
|
|
5421
|
-
//#region ../../node_modules/zod/v4/locales/ko.js
|
|
5422
|
-
const error$
|
|
5267
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
|
|
5268
|
+
const error$18 = () => {
|
|
5423
5269
|
const Sizable = {
|
|
5424
5270
|
string: {
|
|
5425
5271
|
unit: "문자",
|
|
@@ -5441,7 +5287,7 @@ const error$19 = () => {
|
|
|
5441
5287
|
function getSizing(origin) {
|
|
5442
5288
|
return Sizable[origin] ?? null;
|
|
5443
5289
|
}
|
|
5444
|
-
const parsedType$
|
|
5290
|
+
const parsedType$2 = (data) => {
|
|
5445
5291
|
const t = typeof data;
|
|
5446
5292
|
switch (t) {
|
|
5447
5293
|
case "number": {
|
|
@@ -5493,7 +5339,7 @@ const error$19 = () => {
|
|
|
5493
5339
|
};
|
|
5494
5340
|
return (issue$1) => {
|
|
5495
5341
|
switch (issue$1.code) {
|
|
5496
|
-
case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$
|
|
5342
|
+
case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
|
|
5497
5343
|
case "invalid_value":
|
|
5498
5344
|
if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
|
|
5499
5345
|
return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
|
|
@@ -5535,12 +5381,12 @@ const error$19 = () => {
|
|
|
5535
5381
|
};
|
|
5536
5382
|
};
|
|
5537
5383
|
function ko_default() {
|
|
5538
|
-
return { localeError: error$
|
|
5384
|
+
return { localeError: error$18() };
|
|
5539
5385
|
}
|
|
5540
5386
|
|
|
5541
5387
|
//#endregion
|
|
5542
|
-
//#region ../../node_modules/zod/v4/locales/mk.js
|
|
5543
|
-
const error$
|
|
5388
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
|
|
5389
|
+
const error$17 = () => {
|
|
5544
5390
|
const Sizable = {
|
|
5545
5391
|
string: {
|
|
5546
5392
|
unit: "знаци",
|
|
@@ -5562,7 +5408,7 @@ const error$18 = () => {
|
|
|
5562
5408
|
function getSizing(origin) {
|
|
5563
5409
|
return Sizable[origin] ?? null;
|
|
5564
5410
|
}
|
|
5565
|
-
const parsedType$
|
|
5411
|
+
const parsedType$2 = (data) => {
|
|
5566
5412
|
const t = typeof data;
|
|
5567
5413
|
switch (t) {
|
|
5568
5414
|
case "number": {
|
|
@@ -5614,7 +5460,7 @@ const error$18 = () => {
|
|
|
5614
5460
|
};
|
|
5615
5461
|
return (issue$1) => {
|
|
5616
5462
|
switch (issue$1.code) {
|
|
5617
|
-
case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$
|
|
5463
|
+
case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
|
|
5618
5464
|
case "invalid_value":
|
|
5619
5465
|
if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5620
5466
|
return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5652,12 +5498,12 @@ const error$18 = () => {
|
|
|
5652
5498
|
};
|
|
5653
5499
|
};
|
|
5654
5500
|
function mk_default() {
|
|
5655
|
-
return { localeError: error$
|
|
5501
|
+
return { localeError: error$17() };
|
|
5656
5502
|
}
|
|
5657
5503
|
|
|
5658
5504
|
//#endregion
|
|
5659
|
-
//#region ../../node_modules/zod/v4/locales/ms.js
|
|
5660
|
-
const error$
|
|
5505
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
|
|
5506
|
+
const error$16 = () => {
|
|
5661
5507
|
const Sizable = {
|
|
5662
5508
|
string: {
|
|
5663
5509
|
unit: "aksara",
|
|
@@ -5679,7 +5525,7 @@ const error$17 = () => {
|
|
|
5679
5525
|
function getSizing(origin) {
|
|
5680
5526
|
return Sizable[origin] ?? null;
|
|
5681
5527
|
}
|
|
5682
|
-
const parsedType$
|
|
5528
|
+
const parsedType$2 = (data) => {
|
|
5683
5529
|
const t = typeof data;
|
|
5684
5530
|
switch (t) {
|
|
5685
5531
|
case "number": {
|
|
@@ -5731,7 +5577,7 @@ const error$17 = () => {
|
|
|
5731
5577
|
};
|
|
5732
5578
|
return (issue$1) => {
|
|
5733
5579
|
switch (issue$1.code) {
|
|
5734
|
-
case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$
|
|
5580
|
+
case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
|
|
5735
5581
|
case "invalid_value":
|
|
5736
5582
|
if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5737
5583
|
return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5767,12 +5613,12 @@ const error$17 = () => {
|
|
|
5767
5613
|
};
|
|
5768
5614
|
};
|
|
5769
5615
|
function ms_default() {
|
|
5770
|
-
return { localeError: error$
|
|
5616
|
+
return { localeError: error$16() };
|
|
5771
5617
|
}
|
|
5772
5618
|
|
|
5773
5619
|
//#endregion
|
|
5774
|
-
//#region ../../node_modules/zod/v4/locales/nl.js
|
|
5775
|
-
const error$
|
|
5620
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
|
|
5621
|
+
const error$15 = () => {
|
|
5776
5622
|
const Sizable = {
|
|
5777
5623
|
string: { unit: "tekens" },
|
|
5778
5624
|
file: { unit: "bytes" },
|
|
@@ -5782,7 +5628,7 @@ const error$16 = () => {
|
|
|
5782
5628
|
function getSizing(origin) {
|
|
5783
5629
|
return Sizable[origin] ?? null;
|
|
5784
5630
|
}
|
|
5785
|
-
const parsedType$
|
|
5631
|
+
const parsedType$2 = (data) => {
|
|
5786
5632
|
const t = typeof data;
|
|
5787
5633
|
switch (t) {
|
|
5788
5634
|
case "number": {
|
|
@@ -5834,7 +5680,7 @@ const error$16 = () => {
|
|
|
5834
5680
|
};
|
|
5835
5681
|
return (issue$1) => {
|
|
5836
5682
|
switch (issue$1.code) {
|
|
5837
|
-
case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$
|
|
5683
|
+
case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
|
|
5838
5684
|
case "invalid_value":
|
|
5839
5685
|
if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5840
5686
|
return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5872,12 +5718,12 @@ const error$16 = () => {
|
|
|
5872
5718
|
};
|
|
5873
5719
|
};
|
|
5874
5720
|
function nl_default() {
|
|
5875
|
-
return { localeError: error$
|
|
5721
|
+
return { localeError: error$15() };
|
|
5876
5722
|
}
|
|
5877
5723
|
|
|
5878
5724
|
//#endregion
|
|
5879
|
-
//#region ../../node_modules/zod/v4/locales/no.js
|
|
5880
|
-
const error$
|
|
5725
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/no.js
|
|
5726
|
+
const error$14 = () => {
|
|
5881
5727
|
const Sizable = {
|
|
5882
5728
|
string: {
|
|
5883
5729
|
unit: "tegn",
|
|
@@ -5899,7 +5745,7 @@ const error$15 = () => {
|
|
|
5899
5745
|
function getSizing(origin) {
|
|
5900
5746
|
return Sizable[origin] ?? null;
|
|
5901
5747
|
}
|
|
5902
|
-
const parsedType$
|
|
5748
|
+
const parsedType$2 = (data) => {
|
|
5903
5749
|
const t = typeof data;
|
|
5904
5750
|
switch (t) {
|
|
5905
5751
|
case "number": {
|
|
@@ -5951,7 +5797,7 @@ const error$15 = () => {
|
|
|
5951
5797
|
};
|
|
5952
5798
|
return (issue$1) => {
|
|
5953
5799
|
switch (issue$1.code) {
|
|
5954
|
-
case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$
|
|
5800
|
+
case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
|
|
5955
5801
|
case "invalid_value":
|
|
5956
5802
|
if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
|
|
5957
5803
|
return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
|
|
@@ -5987,12 +5833,12 @@ const error$15 = () => {
|
|
|
5987
5833
|
};
|
|
5988
5834
|
};
|
|
5989
5835
|
function no_default() {
|
|
5990
|
-
return { localeError: error$
|
|
5836
|
+
return { localeError: error$14() };
|
|
5991
5837
|
}
|
|
5992
5838
|
|
|
5993
5839
|
//#endregion
|
|
5994
|
-
//#region ../../node_modules/zod/v4/locales/ota.js
|
|
5995
|
-
const error$
|
|
5840
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
|
|
5841
|
+
const error$13 = () => {
|
|
5996
5842
|
const Sizable = {
|
|
5997
5843
|
string: {
|
|
5998
5844
|
unit: "harf",
|
|
@@ -6014,7 +5860,7 @@ const error$14 = () => {
|
|
|
6014
5860
|
function getSizing(origin) {
|
|
6015
5861
|
return Sizable[origin] ?? null;
|
|
6016
5862
|
}
|
|
6017
|
-
const parsedType$
|
|
5863
|
+
const parsedType$2 = (data) => {
|
|
6018
5864
|
const t = typeof data;
|
|
6019
5865
|
switch (t) {
|
|
6020
5866
|
case "number": {
|
|
@@ -6066,7 +5912,7 @@ const error$14 = () => {
|
|
|
6066
5912
|
};
|
|
6067
5913
|
return (issue$1) => {
|
|
6068
5914
|
switch (issue$1.code) {
|
|
6069
|
-
case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$
|
|
5915
|
+
case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
|
|
6070
5916
|
case "invalid_value":
|
|
6071
5917
|
if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6072
5918
|
return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6102,138 +5948,11 @@ const error$14 = () => {
|
|
|
6102
5948
|
};
|
|
6103
5949
|
};
|
|
6104
5950
|
function ota_default() {
|
|
6105
|
-
return { localeError: error$14() };
|
|
6106
|
-
}
|
|
6107
|
-
|
|
6108
|
-
//#endregion
|
|
6109
|
-
//#region ../../node_modules/zod/v4/locales/ps.js
|
|
6110
|
-
const error$13 = () => {
|
|
6111
|
-
const Sizable = {
|
|
6112
|
-
string: {
|
|
6113
|
-
unit: "توکي",
|
|
6114
|
-
verb: "ولري"
|
|
6115
|
-
},
|
|
6116
|
-
file: {
|
|
6117
|
-
unit: "بایټس",
|
|
6118
|
-
verb: "ولري"
|
|
6119
|
-
},
|
|
6120
|
-
array: {
|
|
6121
|
-
unit: "توکي",
|
|
6122
|
-
verb: "ولري"
|
|
6123
|
-
},
|
|
6124
|
-
set: {
|
|
6125
|
-
unit: "توکي",
|
|
6126
|
-
verb: "ولري"
|
|
6127
|
-
}
|
|
6128
|
-
};
|
|
6129
|
-
function getSizing(origin) {
|
|
6130
|
-
return Sizable[origin] ?? null;
|
|
6131
|
-
}
|
|
6132
|
-
const parsedType$3 = (data) => {
|
|
6133
|
-
const t = typeof data;
|
|
6134
|
-
switch (t) {
|
|
6135
|
-
case "number": {
|
|
6136
|
-
return Number.isNaN(data) ? "NaN" : "عدد";
|
|
6137
|
-
}
|
|
6138
|
-
case "object": {
|
|
6139
|
-
if (Array.isArray(data)) {
|
|
6140
|
-
return "ارې";
|
|
6141
|
-
}
|
|
6142
|
-
if (data === null) {
|
|
6143
|
-
return "null";
|
|
6144
|
-
}
|
|
6145
|
-
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
6146
|
-
return data.constructor.name;
|
|
6147
|
-
}
|
|
6148
|
-
}
|
|
6149
|
-
}
|
|
6150
|
-
return t;
|
|
6151
|
-
};
|
|
6152
|
-
const Nouns = {
|
|
6153
|
-
regex: "ورودي",
|
|
6154
|
-
email: "بریښنالیک",
|
|
6155
|
-
url: "یو آر ال",
|
|
6156
|
-
emoji: "ایموجي",
|
|
6157
|
-
uuid: "UUID",
|
|
6158
|
-
uuidv4: "UUIDv4",
|
|
6159
|
-
uuidv6: "UUIDv6",
|
|
6160
|
-
nanoid: "nanoid",
|
|
6161
|
-
guid: "GUID",
|
|
6162
|
-
cuid: "cuid",
|
|
6163
|
-
cuid2: "cuid2",
|
|
6164
|
-
ulid: "ULID",
|
|
6165
|
-
xid: "XID",
|
|
6166
|
-
ksuid: "KSUID",
|
|
6167
|
-
datetime: "نیټه او وخت",
|
|
6168
|
-
date: "نېټه",
|
|
6169
|
-
time: "وخت",
|
|
6170
|
-
duration: "موده",
|
|
6171
|
-
ipv4: "د IPv4 پته",
|
|
6172
|
-
ipv6: "د IPv6 پته",
|
|
6173
|
-
cidrv4: "د IPv4 ساحه",
|
|
6174
|
-
cidrv6: "د IPv6 ساحه",
|
|
6175
|
-
base64: "base64-encoded متن",
|
|
6176
|
-
base64url: "base64url-encoded متن",
|
|
6177
|
-
json_string: "JSON متن",
|
|
6178
|
-
e164: "د E.164 شمېره",
|
|
6179
|
-
jwt: "JWT",
|
|
6180
|
-
template_literal: "ورودي"
|
|
6181
|
-
};
|
|
6182
|
-
return (issue$1) => {
|
|
6183
|
-
switch (issue$1.code) {
|
|
6184
|
-
case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
|
|
6185
|
-
case "invalid_value":
|
|
6186
|
-
if (issue$1.values.length === 1) {
|
|
6187
|
-
return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
|
|
6188
|
-
}
|
|
6189
|
-
return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
|
|
6190
|
-
case "too_big": {
|
|
6191
|
-
const adj = issue$1.inclusive ? "<=" : "<";
|
|
6192
|
-
const sizing = getSizing(issue$1.origin);
|
|
6193
|
-
if (sizing) {
|
|
6194
|
-
return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
|
|
6195
|
-
}
|
|
6196
|
-
return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
|
|
6197
|
-
}
|
|
6198
|
-
case "too_small": {
|
|
6199
|
-
const adj = issue$1.inclusive ? ">=" : ">";
|
|
6200
|
-
const sizing = getSizing(issue$1.origin);
|
|
6201
|
-
if (sizing) {
|
|
6202
|
-
return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
|
|
6203
|
-
}
|
|
6204
|
-
return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
|
|
6205
|
-
}
|
|
6206
|
-
case "invalid_format": {
|
|
6207
|
-
const _issue = issue$1;
|
|
6208
|
-
if (_issue.format === "starts_with") {
|
|
6209
|
-
return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
|
|
6210
|
-
}
|
|
6211
|
-
if (_issue.format === "ends_with") {
|
|
6212
|
-
return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
|
|
6213
|
-
}
|
|
6214
|
-
if (_issue.format === "includes") {
|
|
6215
|
-
return `ناسم متن: باید "${_issue.includes}" ولري`;
|
|
6216
|
-
}
|
|
6217
|
-
if (_issue.format === "regex") {
|
|
6218
|
-
return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
|
|
6219
|
-
}
|
|
6220
|
-
return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
|
|
6221
|
-
}
|
|
6222
|
-
case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
|
|
6223
|
-
case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
|
|
6224
|
-
case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
|
|
6225
|
-
case "invalid_union": return `ناسمه ورودي`;
|
|
6226
|
-
case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
|
|
6227
|
-
default: return `ناسمه ورودي`;
|
|
6228
|
-
}
|
|
6229
|
-
};
|
|
6230
|
-
};
|
|
6231
|
-
function ps_default() {
|
|
6232
5951
|
return { localeError: error$13() };
|
|
6233
5952
|
}
|
|
6234
5953
|
|
|
6235
5954
|
//#endregion
|
|
6236
|
-
//#region ../../node_modules/zod/v4/locales/pl.js
|
|
5955
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
|
|
6237
5956
|
const error$12 = () => {
|
|
6238
5957
|
const Sizable = {
|
|
6239
5958
|
string: {
|
|
@@ -6256,7 +5975,7 @@ const error$12 = () => {
|
|
|
6256
5975
|
function getSizing(origin) {
|
|
6257
5976
|
return Sizable[origin] ?? null;
|
|
6258
5977
|
}
|
|
6259
|
-
const parsedType$
|
|
5978
|
+
const parsedType$2 = (data) => {
|
|
6260
5979
|
const t = typeof data;
|
|
6261
5980
|
switch (t) {
|
|
6262
5981
|
case "number": {
|
|
@@ -6308,7 +6027,7 @@ const error$12 = () => {
|
|
|
6308
6027
|
};
|
|
6309
6028
|
return (issue$1) => {
|
|
6310
6029
|
switch (issue$1.code) {
|
|
6311
|
-
case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$
|
|
6030
|
+
case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
|
|
6312
6031
|
case "invalid_value":
|
|
6313
6032
|
if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6314
6033
|
return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6350,7 +6069,7 @@ function pl_default() {
|
|
|
6350
6069
|
}
|
|
6351
6070
|
|
|
6352
6071
|
//#endregion
|
|
6353
|
-
//#region ../../node_modules/zod/v4/locales/pt.js
|
|
6072
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
|
|
6354
6073
|
const error$11 = () => {
|
|
6355
6074
|
const Sizable = {
|
|
6356
6075
|
string: {
|
|
@@ -6373,7 +6092,7 @@ const error$11 = () => {
|
|
|
6373
6092
|
function getSizing(origin) {
|
|
6374
6093
|
return Sizable[origin] ?? null;
|
|
6375
6094
|
}
|
|
6376
|
-
const parsedType$
|
|
6095
|
+
const parsedType$2 = (data) => {
|
|
6377
6096
|
const t = typeof data;
|
|
6378
6097
|
switch (t) {
|
|
6379
6098
|
case "number": {
|
|
@@ -6425,7 +6144,7 @@ const error$11 = () => {
|
|
|
6425
6144
|
};
|
|
6426
6145
|
return (issue$1) => {
|
|
6427
6146
|
switch (issue$1.code) {
|
|
6428
|
-
case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$
|
|
6147
|
+
case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
|
|
6429
6148
|
case "invalid_value":
|
|
6430
6149
|
if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6431
6150
|
return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6465,7 +6184,7 @@ function pt_default() {
|
|
|
6465
6184
|
}
|
|
6466
6185
|
|
|
6467
6186
|
//#endregion
|
|
6468
|
-
//#region ../../node_modules/zod/v4/locales/ru.js
|
|
6187
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
|
|
6469
6188
|
function getRussianPlural(count, one, few, many) {
|
|
6470
6189
|
const absCount = Math.abs(count);
|
|
6471
6190
|
const lastDigit = absCount % 10;
|
|
@@ -6519,7 +6238,7 @@ const error$10 = () => {
|
|
|
6519
6238
|
function getSizing(origin) {
|
|
6520
6239
|
return Sizable[origin] ?? null;
|
|
6521
6240
|
}
|
|
6522
|
-
const parsedType$
|
|
6241
|
+
const parsedType$2 = (data) => {
|
|
6523
6242
|
const t = typeof data;
|
|
6524
6243
|
switch (t) {
|
|
6525
6244
|
case "number": {
|
|
@@ -6571,7 +6290,7 @@ const error$10 = () => {
|
|
|
6571
6290
|
};
|
|
6572
6291
|
return (issue$1) => {
|
|
6573
6292
|
switch (issue$1.code) {
|
|
6574
|
-
case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$
|
|
6293
|
+
case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
|
|
6575
6294
|
case "invalid_value":
|
|
6576
6295
|
if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6577
6296
|
return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6617,7 +6336,7 @@ function ru_default() {
|
|
|
6617
6336
|
}
|
|
6618
6337
|
|
|
6619
6338
|
//#endregion
|
|
6620
|
-
//#region ../../node_modules/zod/v4/locales/sl.js
|
|
6339
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
|
|
6621
6340
|
const error$9 = () => {
|
|
6622
6341
|
const Sizable = {
|
|
6623
6342
|
string: {
|
|
@@ -6640,7 +6359,7 @@ const error$9 = () => {
|
|
|
6640
6359
|
function getSizing(origin) {
|
|
6641
6360
|
return Sizable[origin] ?? null;
|
|
6642
6361
|
}
|
|
6643
|
-
const parsedType$
|
|
6362
|
+
const parsedType$2 = (data) => {
|
|
6644
6363
|
const t = typeof data;
|
|
6645
6364
|
switch (t) {
|
|
6646
6365
|
case "number": {
|
|
@@ -6692,7 +6411,7 @@ const error$9 = () => {
|
|
|
6692
6411
|
};
|
|
6693
6412
|
return (issue$1) => {
|
|
6694
6413
|
switch (issue$1.code) {
|
|
6695
|
-
case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$
|
|
6414
|
+
case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
|
|
6696
6415
|
case "invalid_value":
|
|
6697
6416
|
if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6698
6417
|
return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6734,7 +6453,7 @@ function sl_default() {
|
|
|
6734
6453
|
}
|
|
6735
6454
|
|
|
6736
6455
|
//#endregion
|
|
6737
|
-
//#region ../../node_modules/zod/v4/locales/sv.js
|
|
6456
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
|
|
6738
6457
|
const error$8 = () => {
|
|
6739
6458
|
const Sizable = {
|
|
6740
6459
|
string: {
|
|
@@ -6757,7 +6476,7 @@ const error$8 = () => {
|
|
|
6757
6476
|
function getSizing(origin) {
|
|
6758
6477
|
return Sizable[origin] ?? null;
|
|
6759
6478
|
}
|
|
6760
|
-
const parsedType$
|
|
6479
|
+
const parsedType$2 = (data) => {
|
|
6761
6480
|
const t = typeof data;
|
|
6762
6481
|
switch (t) {
|
|
6763
6482
|
case "number": {
|
|
@@ -6809,7 +6528,7 @@ const error$8 = () => {
|
|
|
6809
6528
|
};
|
|
6810
6529
|
return (issue$1) => {
|
|
6811
6530
|
switch (issue$1.code) {
|
|
6812
|
-
case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$
|
|
6531
|
+
case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
|
|
6813
6532
|
case "invalid_value":
|
|
6814
6533
|
if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6815
6534
|
return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
|
|
@@ -6853,7 +6572,7 @@ function sv_default() {
|
|
|
6853
6572
|
}
|
|
6854
6573
|
|
|
6855
6574
|
//#endregion
|
|
6856
|
-
//#region ../../node_modules/zod/v4/locales/ta.js
|
|
6575
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
|
|
6857
6576
|
const error$7 = () => {
|
|
6858
6577
|
const Sizable = {
|
|
6859
6578
|
string: {
|
|
@@ -6876,7 +6595,7 @@ const error$7 = () => {
|
|
|
6876
6595
|
function getSizing(origin) {
|
|
6877
6596
|
return Sizable[origin] ?? null;
|
|
6878
6597
|
}
|
|
6879
|
-
const parsedType$
|
|
6598
|
+
const parsedType$2 = (data) => {
|
|
6880
6599
|
const t = typeof data;
|
|
6881
6600
|
switch (t) {
|
|
6882
6601
|
case "number": {
|
|
@@ -6928,7 +6647,7 @@ const error$7 = () => {
|
|
|
6928
6647
|
};
|
|
6929
6648
|
return (issue$1) => {
|
|
6930
6649
|
switch (issue$1.code) {
|
|
6931
|
-
case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$
|
|
6650
|
+
case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
|
|
6932
6651
|
case "invalid_value":
|
|
6933
6652
|
if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
|
|
6934
6653
|
return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
|
|
@@ -6970,7 +6689,7 @@ function ta_default() {
|
|
|
6970
6689
|
}
|
|
6971
6690
|
|
|
6972
6691
|
//#endregion
|
|
6973
|
-
//#region ../../node_modules/zod/v4/locales/th.js
|
|
6692
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/th.js
|
|
6974
6693
|
const error$6 = () => {
|
|
6975
6694
|
const Sizable = {
|
|
6976
6695
|
string: {
|
|
@@ -6993,7 +6712,7 @@ const error$6 = () => {
|
|
|
6993
6712
|
function getSizing(origin) {
|
|
6994
6713
|
return Sizable[origin] ?? null;
|
|
6995
6714
|
}
|
|
6996
|
-
const parsedType$
|
|
6715
|
+
const parsedType$2 = (data) => {
|
|
6997
6716
|
const t = typeof data;
|
|
6998
6717
|
switch (t) {
|
|
6999
6718
|
case "number": {
|
|
@@ -7045,7 +6764,7 @@ const error$6 = () => {
|
|
|
7045
6764
|
};
|
|
7046
6765
|
return (issue$1) => {
|
|
7047
6766
|
switch (issue$1.code) {
|
|
7048
|
-
case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$
|
|
6767
|
+
case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
|
|
7049
6768
|
case "invalid_value":
|
|
7050
6769
|
if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7051
6770
|
return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7087,7 +6806,7 @@ function th_default() {
|
|
|
7087
6806
|
}
|
|
7088
6807
|
|
|
7089
6808
|
//#endregion
|
|
7090
|
-
//#region ../../node_modules/zod/v4/locales/tr.js
|
|
6809
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
|
|
7091
6810
|
const parsedType = (data) => {
|
|
7092
6811
|
const t = typeof data;
|
|
7093
6812
|
switch (t) {
|
|
@@ -7200,7 +6919,7 @@ function tr_default() {
|
|
|
7200
6919
|
}
|
|
7201
6920
|
|
|
7202
6921
|
//#endregion
|
|
7203
|
-
//#region ../../node_modules/zod/v4/locales/ua.js
|
|
6922
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
|
|
7204
6923
|
const error$4 = () => {
|
|
7205
6924
|
const Sizable = {
|
|
7206
6925
|
string: {
|
|
@@ -7223,7 +6942,7 @@ const error$4 = () => {
|
|
|
7223
6942
|
function getSizing(origin) {
|
|
7224
6943
|
return Sizable[origin] ?? null;
|
|
7225
6944
|
}
|
|
7226
|
-
const parsedType$
|
|
6945
|
+
const parsedType$2 = (data) => {
|
|
7227
6946
|
const t = typeof data;
|
|
7228
6947
|
switch (t) {
|
|
7229
6948
|
case "number": {
|
|
@@ -7275,7 +6994,7 @@ const error$4 = () => {
|
|
|
7275
6994
|
};
|
|
7276
6995
|
return (issue$1) => {
|
|
7277
6996
|
switch (issue$1.code) {
|
|
7278
|
-
case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$
|
|
6997
|
+
case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
|
|
7279
6998
|
case "invalid_value":
|
|
7280
6999
|
if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7281
7000
|
return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7315,7 +7034,7 @@ function ua_default() {
|
|
|
7315
7034
|
}
|
|
7316
7035
|
|
|
7317
7036
|
//#endregion
|
|
7318
|
-
//#region ../../node_modules/zod/v4/locales/ur.js
|
|
7037
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
|
|
7319
7038
|
const error$3 = () => {
|
|
7320
7039
|
const Sizable = {
|
|
7321
7040
|
string: {
|
|
@@ -7338,7 +7057,7 @@ const error$3 = () => {
|
|
|
7338
7057
|
function getSizing(origin) {
|
|
7339
7058
|
return Sizable[origin] ?? null;
|
|
7340
7059
|
}
|
|
7341
|
-
const parsedType$
|
|
7060
|
+
const parsedType$2 = (data) => {
|
|
7342
7061
|
const t = typeof data;
|
|
7343
7062
|
switch (t) {
|
|
7344
7063
|
case "number": {
|
|
@@ -7390,7 +7109,7 @@ const error$3 = () => {
|
|
|
7390
7109
|
};
|
|
7391
7110
|
return (issue$1) => {
|
|
7392
7111
|
switch (issue$1.code) {
|
|
7393
|
-
case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$
|
|
7112
|
+
case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
|
|
7394
7113
|
case "invalid_value":
|
|
7395
7114
|
if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
|
|
7396
7115
|
return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
|
|
@@ -7432,7 +7151,7 @@ function ur_default() {
|
|
|
7432
7151
|
}
|
|
7433
7152
|
|
|
7434
7153
|
//#endregion
|
|
7435
|
-
//#region ../../node_modules/zod/v4/locales/vi.js
|
|
7154
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
|
|
7436
7155
|
const error$2 = () => {
|
|
7437
7156
|
const Sizable = {
|
|
7438
7157
|
string: {
|
|
@@ -7455,7 +7174,7 @@ const error$2 = () => {
|
|
|
7455
7174
|
function getSizing(origin) {
|
|
7456
7175
|
return Sizable[origin] ?? null;
|
|
7457
7176
|
}
|
|
7458
|
-
const parsedType$
|
|
7177
|
+
const parsedType$2 = (data) => {
|
|
7459
7178
|
const t = typeof data;
|
|
7460
7179
|
switch (t) {
|
|
7461
7180
|
case "number": {
|
|
@@ -7507,7 +7226,7 @@ const error$2 = () => {
|
|
|
7507
7226
|
};
|
|
7508
7227
|
return (issue$1) => {
|
|
7509
7228
|
switch (issue$1.code) {
|
|
7510
|
-
case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$
|
|
7229
|
+
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)}`;
|
|
7511
7230
|
case "invalid_value":
|
|
7512
7231
|
if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7513
7232
|
return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7547,7 +7266,7 @@ function vi_default() {
|
|
|
7547
7266
|
}
|
|
7548
7267
|
|
|
7549
7268
|
//#endregion
|
|
7550
|
-
//#region ../../node_modules/zod/v4/locales/zh-CN.js
|
|
7269
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
|
|
7551
7270
|
const error$1 = () => {
|
|
7552
7271
|
const Sizable = {
|
|
7553
7272
|
string: {
|
|
@@ -7570,7 +7289,7 @@ const error$1 = () => {
|
|
|
7570
7289
|
function getSizing(origin) {
|
|
7571
7290
|
return Sizable[origin] ?? null;
|
|
7572
7291
|
}
|
|
7573
|
-
const parsedType$
|
|
7292
|
+
const parsedType$2 = (data) => {
|
|
7574
7293
|
const t = typeof data;
|
|
7575
7294
|
switch (t) {
|
|
7576
7295
|
case "number": {
|
|
@@ -7622,7 +7341,7 @@ const error$1 = () => {
|
|
|
7622
7341
|
};
|
|
7623
7342
|
return (issue$1) => {
|
|
7624
7343
|
switch (issue$1.code) {
|
|
7625
|
-
case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$
|
|
7344
|
+
case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
|
|
7626
7345
|
case "invalid_value":
|
|
7627
7346
|
if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7628
7347
|
return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7662,7 +7381,7 @@ function zh_CN_default() {
|
|
|
7662
7381
|
}
|
|
7663
7382
|
|
|
7664
7383
|
//#endregion
|
|
7665
|
-
//#region ../../node_modules/zod/v4/locales/zh-TW.js
|
|
7384
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
|
|
7666
7385
|
const error = () => {
|
|
7667
7386
|
const Sizable = {
|
|
7668
7387
|
string: {
|
|
@@ -7685,7 +7404,7 @@ const error = () => {
|
|
|
7685
7404
|
function getSizing(origin) {
|
|
7686
7405
|
return Sizable[origin] ?? null;
|
|
7687
7406
|
}
|
|
7688
|
-
const parsedType$
|
|
7407
|
+
const parsedType$2 = (data) => {
|
|
7689
7408
|
const t = typeof data;
|
|
7690
7409
|
switch (t) {
|
|
7691
7410
|
case "number": {
|
|
@@ -7737,7 +7456,7 @@ const error = () => {
|
|
|
7737
7456
|
};
|
|
7738
7457
|
return (issue$1) => {
|
|
7739
7458
|
switch (issue$1.code) {
|
|
7740
|
-
case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$
|
|
7459
|
+
case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
|
|
7741
7460
|
case "invalid_value":
|
|
7742
7461
|
if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
|
|
7743
7462
|
return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
|
|
@@ -7779,7 +7498,7 @@ function zh_TW_default() {
|
|
|
7779
7498
|
}
|
|
7780
7499
|
|
|
7781
7500
|
//#endregion
|
|
7782
|
-
//#region ../../node_modules/zod/v4/locales/index.js
|
|
7501
|
+
//#region ../../node_modules/zod/dist/esm/v4/locales/index.js
|
|
7783
7502
|
var locales_exports = {};
|
|
7784
7503
|
__export(locales_exports, {
|
|
7785
7504
|
ar: () => ar_default,
|
|
@@ -7789,7 +7508,6 @@ __export(locales_exports, {
|
|
|
7789
7508
|
cs: () => cs_default,
|
|
7790
7509
|
de: () => de_default,
|
|
7791
7510
|
en: () => en_default,
|
|
7792
|
-
eo: () => eo_default,
|
|
7793
7511
|
es: () => es_default,
|
|
7794
7512
|
fa: () => fa_default,
|
|
7795
7513
|
fi: () => fi_default,
|
|
@@ -7808,7 +7526,6 @@ __export(locales_exports, {
|
|
|
7808
7526
|
no: () => no_default,
|
|
7809
7527
|
ota: () => ota_default,
|
|
7810
7528
|
pl: () => pl_default,
|
|
7811
|
-
ps: () => ps_default,
|
|
7812
7529
|
pt: () => pt_default,
|
|
7813
7530
|
ru: () => ru_default,
|
|
7814
7531
|
sl: () => sl_default,
|
|
@@ -7824,12 +7541,12 @@ __export(locales_exports, {
|
|
|
7824
7541
|
});
|
|
7825
7542
|
|
|
7826
7543
|
//#endregion
|
|
7827
|
-
//#region ../../node_modules/zod/v4/core/registries.js
|
|
7544
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/registries.js
|
|
7828
7545
|
const $output = Symbol("ZodOutput");
|
|
7829
7546
|
const $input = Symbol("ZodInput");
|
|
7830
7547
|
var $ZodRegistry = class {
|
|
7831
7548
|
constructor() {
|
|
7832
|
-
this._map = new
|
|
7549
|
+
this._map = new WeakMap();
|
|
7833
7550
|
this._idmap = new Map();
|
|
7834
7551
|
}
|
|
7835
7552
|
add(schema, ..._meta) {
|
|
@@ -7843,16 +7560,7 @@ var $ZodRegistry = class {
|
|
|
7843
7560
|
}
|
|
7844
7561
|
return this;
|
|
7845
7562
|
}
|
|
7846
|
-
clear() {
|
|
7847
|
-
this._map = new Map();
|
|
7848
|
-
this._idmap = new Map();
|
|
7849
|
-
return this;
|
|
7850
|
-
}
|
|
7851
7563
|
remove(schema) {
|
|
7852
|
-
const meta = this._map.get(schema);
|
|
7853
|
-
if (meta && typeof meta === "object" && "id" in meta) {
|
|
7854
|
-
this._idmap.delete(meta.id);
|
|
7855
|
-
}
|
|
7856
7564
|
this._map.delete(schema);
|
|
7857
7565
|
return this;
|
|
7858
7566
|
}
|
|
@@ -7878,7 +7586,7 @@ function registry() {
|
|
|
7878
7586
|
const globalRegistry = /* @__PURE__ */ registry();
|
|
7879
7587
|
|
|
7880
7588
|
//#endregion
|
|
7881
|
-
//#region ../../node_modules/zod/v4/core/api.js
|
|
7589
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/api.js
|
|
7882
7590
|
function _string(Class$1, params) {
|
|
7883
7591
|
return new Class$1({
|
|
7884
7592
|
type: "string",
|
|
@@ -8093,13 +7801,6 @@ function _jwt(Class$1, params) {
|
|
|
8093
7801
|
...normalizeParams(params)
|
|
8094
7802
|
});
|
|
8095
7803
|
}
|
|
8096
|
-
const TimePrecision = {
|
|
8097
|
-
Any: null,
|
|
8098
|
-
Minute: -1,
|
|
8099
|
-
Second: 0,
|
|
8100
|
-
Millisecond: 3,
|
|
8101
|
-
Microsecond: 6
|
|
8102
|
-
};
|
|
8103
7804
|
function _isoDateTime(Class$1, params) {
|
|
8104
7805
|
return new Class$1({
|
|
8105
7806
|
type: "string",
|
|
@@ -8666,8 +8367,8 @@ function _refine(Class$1, fn, _params) {
|
|
|
8666
8367
|
return schema;
|
|
8667
8368
|
}
|
|
8668
8369
|
function _stringbool(Classes, _params) {
|
|
8669
|
-
const
|
|
8670
|
-
let truthyArray =
|
|
8370
|
+
const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
|
|
8371
|
+
let truthyArray = truthy ?? [
|
|
8671
8372
|
"true",
|
|
8672
8373
|
"1",
|
|
8673
8374
|
"yes",
|
|
@@ -8675,7 +8376,7 @@ function _stringbool(Classes, _params) {
|
|
|
8675
8376
|
"y",
|
|
8676
8377
|
"enabled"
|
|
8677
8378
|
];
|
|
8678
|
-
let falsyArray =
|
|
8379
|
+
let falsyArray = falsy ?? [
|
|
8679
8380
|
"false",
|
|
8680
8381
|
"0",
|
|
8681
8382
|
"no",
|
|
@@ -8683,7 +8384,7 @@ function _stringbool(Classes, _params) {
|
|
|
8683
8384
|
"n",
|
|
8684
8385
|
"disabled"
|
|
8685
8386
|
];
|
|
8686
|
-
if (
|
|
8387
|
+
if (_case !== "sensitive") {
|
|
8687
8388
|
truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
|
|
8688
8389
|
falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
|
|
8689
8390
|
}
|
|
@@ -8697,7 +8398,7 @@ function _stringbool(Classes, _params) {
|
|
|
8697
8398
|
type: "transform",
|
|
8698
8399
|
transform: (input, payload) => {
|
|
8699
8400
|
let data = input;
|
|
8700
|
-
if (
|
|
8401
|
+
if (_case !== "sensitive") data = data.toLowerCase();
|
|
8701
8402
|
if (truthySet.has(data)) {
|
|
8702
8403
|
return true;
|
|
8703
8404
|
} else if (falsySet.has(data)) {
|
|
@@ -8713,47 +8414,31 @@ function _stringbool(Classes, _params) {
|
|
|
8713
8414
|
return {};
|
|
8714
8415
|
}
|
|
8715
8416
|
},
|
|
8716
|
-
error:
|
|
8417
|
+
error: error$37
|
|
8717
8418
|
});
|
|
8718
8419
|
const innerPipe = new _Pipe({
|
|
8719
8420
|
type: "pipe",
|
|
8720
8421
|
in: new _String({
|
|
8721
8422
|
type: "string",
|
|
8722
|
-
error:
|
|
8423
|
+
error: error$37
|
|
8723
8424
|
}),
|
|
8724
8425
|
out: tx,
|
|
8725
|
-
error:
|
|
8426
|
+
error: error$37
|
|
8726
8427
|
});
|
|
8727
8428
|
const outerPipe = new _Pipe({
|
|
8728
8429
|
type: "pipe",
|
|
8729
8430
|
in: innerPipe,
|
|
8730
8431
|
out: new _Boolean({
|
|
8731
8432
|
type: "boolean",
|
|
8732
|
-
error:
|
|
8433
|
+
error: error$37
|
|
8733
8434
|
}),
|
|
8734
|
-
error:
|
|
8435
|
+
error: error$37
|
|
8735
8436
|
});
|
|
8736
8437
|
return outerPipe;
|
|
8737
8438
|
}
|
|
8738
|
-
function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
|
|
8739
|
-
const params = normalizeParams(_params);
|
|
8740
|
-
const def = {
|
|
8741
|
-
...normalizeParams(_params),
|
|
8742
|
-
check: "string_format",
|
|
8743
|
-
type: "string",
|
|
8744
|
-
format,
|
|
8745
|
-
fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
|
|
8746
|
-
...params
|
|
8747
|
-
};
|
|
8748
|
-
if (fnOrRegex instanceof RegExp) {
|
|
8749
|
-
def.pattern = fnOrRegex;
|
|
8750
|
-
}
|
|
8751
|
-
const inst = new Class$1(def);
|
|
8752
|
-
return inst;
|
|
8753
|
-
}
|
|
8754
8439
|
|
|
8755
8440
|
//#endregion
|
|
8756
|
-
//#region ../../node_modules/zod/v4/core/function.js
|
|
8441
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/function.js
|
|
8757
8442
|
var $ZodFunction = class {
|
|
8758
8443
|
constructor(def) {
|
|
8759
8444
|
this._def = def;
|
|
@@ -8824,7 +8509,7 @@ function _function(params) {
|
|
|
8824
8509
|
}
|
|
8825
8510
|
|
|
8826
8511
|
//#endregion
|
|
8827
|
-
//#region ../../node_modules/zod/v4/core/to-json-schema.js
|
|
8512
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
|
|
8828
8513
|
var JSONSchemaGenerator = class {
|
|
8829
8514
|
constructor(params) {
|
|
8830
8515
|
this.counter = 0;
|
|
@@ -8860,435 +8545,431 @@ var JSONSchemaGenerator = class {
|
|
|
8860
8545
|
const result = {
|
|
8861
8546
|
schema: {},
|
|
8862
8547
|
count: 1,
|
|
8863
|
-
cycle: undefined
|
|
8864
|
-
path: _params.path
|
|
8548
|
+
cycle: undefined
|
|
8865
8549
|
};
|
|
8866
8550
|
this.seen.set(schema, result);
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8551
|
+
if (schema._zod.toJSONSchema) {
|
|
8552
|
+
result.schema = schema._zod.toJSONSchema();
|
|
8553
|
+
}
|
|
8554
|
+
const params = {
|
|
8555
|
+
..._params,
|
|
8556
|
+
schemaPath: [..._params.schemaPath, schema],
|
|
8557
|
+
path: _params.path
|
|
8558
|
+
};
|
|
8559
|
+
const parent = schema._zod.parent;
|
|
8560
|
+
if (parent) {
|
|
8561
|
+
result.ref = parent;
|
|
8562
|
+
this.process(parent, params);
|
|
8563
|
+
this.seen.get(parent).isParent = true;
|
|
8870
8564
|
} else {
|
|
8871
|
-
const
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
const _json = result.schema;
|
|
8883
|
-
switch (def.type) {
|
|
8884
|
-
case "string": {
|
|
8885
|
-
const json$1 = _json;
|
|
8886
|
-
json$1.type = "string";
|
|
8887
|
-
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
8888
|
-
if (typeof minimum === "number") json$1.minLength = minimum;
|
|
8889
|
-
if (typeof maximum === "number") json$1.maxLength = maximum;
|
|
8890
|
-
if (format) {
|
|
8891
|
-
json$1.format = formatMap[format] ?? format;
|
|
8892
|
-
if (json$1.format === "") delete json$1.format;
|
|
8893
|
-
}
|
|
8894
|
-
if (contentEncoding) json$1.contentEncoding = contentEncoding;
|
|
8895
|
-
if (patterns && patterns.size > 0) {
|
|
8896
|
-
const regexes = [...patterns];
|
|
8897
|
-
if (regexes.length === 1) json$1.pattern = regexes[0].source;
|
|
8898
|
-
else if (regexes.length > 1) {
|
|
8899
|
-
result.schema.allOf = [...regexes.map((regex) => ({
|
|
8900
|
-
...this.target === "draft-7" ? { type: "string" } : {},
|
|
8901
|
-
pattern: regex.source
|
|
8902
|
-
}))];
|
|
8903
|
-
}
|
|
8904
|
-
}
|
|
8905
|
-
break;
|
|
8906
|
-
}
|
|
8907
|
-
case "number": {
|
|
8908
|
-
const json$1 = _json;
|
|
8909
|
-
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
8910
|
-
if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
|
|
8911
|
-
else json$1.type = "number";
|
|
8912
|
-
if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
|
|
8913
|
-
if (typeof minimum === "number") {
|
|
8914
|
-
json$1.minimum = minimum;
|
|
8915
|
-
if (typeof exclusiveMinimum === "number") {
|
|
8916
|
-
if (exclusiveMinimum >= minimum) delete json$1.minimum;
|
|
8917
|
-
else delete json$1.exclusiveMinimum;
|
|
8918
|
-
}
|
|
8919
|
-
}
|
|
8920
|
-
if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
|
|
8921
|
-
if (typeof maximum === "number") {
|
|
8922
|
-
json$1.maximum = maximum;
|
|
8923
|
-
if (typeof exclusiveMaximum === "number") {
|
|
8924
|
-
if (exclusiveMaximum <= maximum) delete json$1.maximum;
|
|
8925
|
-
else delete json$1.exclusiveMaximum;
|
|
8926
|
-
}
|
|
8927
|
-
}
|
|
8928
|
-
if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
|
|
8929
|
-
break;
|
|
8930
|
-
}
|
|
8931
|
-
case "boolean": {
|
|
8932
|
-
const json$1 = _json;
|
|
8933
|
-
json$1.type = "boolean";
|
|
8934
|
-
break;
|
|
8935
|
-
}
|
|
8936
|
-
case "bigint": {
|
|
8937
|
-
if (this.unrepresentable === "throw") {
|
|
8938
|
-
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
8939
|
-
}
|
|
8940
|
-
break;
|
|
8565
|
+
const _json = result.schema;
|
|
8566
|
+
switch (def.type) {
|
|
8567
|
+
case "string": {
|
|
8568
|
+
const json$1 = _json;
|
|
8569
|
+
json$1.type = "string";
|
|
8570
|
+
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
8571
|
+
if (typeof minimum === "number") json$1.minLength = minimum;
|
|
8572
|
+
if (typeof maximum === "number") json$1.maxLength = maximum;
|
|
8573
|
+
if (format) {
|
|
8574
|
+
json$1.format = formatMap[format] ?? format;
|
|
8575
|
+
if (json$1.format === "") delete json$1.format;
|
|
8941
8576
|
}
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8577
|
+
if (contentEncoding) json$1.contentEncoding = contentEncoding;
|
|
8578
|
+
if (patterns && patterns.size > 0) {
|
|
8579
|
+
const regexes = [...patterns];
|
|
8580
|
+
if (regexes.length === 1) json$1.pattern = regexes[0].source;
|
|
8581
|
+
else if (regexes.length > 1) {
|
|
8582
|
+
result.schema.allOf = [...regexes.map((regex) => ({
|
|
8583
|
+
...this.target === "draft-7" ? { type: "string" } : {},
|
|
8584
|
+
pattern: regex.source
|
|
8585
|
+
}))];
|
|
8945
8586
|
}
|
|
8946
|
-
break;
|
|
8947
8587
|
}
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8588
|
+
break;
|
|
8589
|
+
}
|
|
8590
|
+
case "number": {
|
|
8591
|
+
const json$1 = _json;
|
|
8592
|
+
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
8593
|
+
if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
|
|
8594
|
+
else json$1.type = "number";
|
|
8595
|
+
if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
|
|
8596
|
+
if (typeof minimum === "number") {
|
|
8597
|
+
json$1.minimum = minimum;
|
|
8598
|
+
if (typeof exclusiveMinimum === "number") {
|
|
8599
|
+
if (exclusiveMinimum >= minimum) delete json$1.minimum;
|
|
8600
|
+
else delete json$1.exclusiveMinimum;
|
|
8961
8601
|
}
|
|
8962
|
-
break;
|
|
8963
8602
|
}
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8603
|
+
if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
|
|
8604
|
+
if (typeof maximum === "number") {
|
|
8605
|
+
json$1.maximum = maximum;
|
|
8606
|
+
if (typeof exclusiveMaximum === "number") {
|
|
8607
|
+
if (exclusiveMaximum <= maximum) delete json$1.maximum;
|
|
8608
|
+
else delete json$1.exclusiveMaximum;
|
|
8967
8609
|
}
|
|
8968
|
-
break;
|
|
8969
|
-
}
|
|
8970
|
-
case "never": {
|
|
8971
|
-
_json.not = {};
|
|
8972
|
-
break;
|
|
8973
8610
|
}
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8611
|
+
if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
|
|
8612
|
+
break;
|
|
8613
|
+
}
|
|
8614
|
+
case "boolean": {
|
|
8615
|
+
const json$1 = _json;
|
|
8616
|
+
json$1.type = "boolean";
|
|
8617
|
+
break;
|
|
8618
|
+
}
|
|
8619
|
+
case "bigint": {
|
|
8620
|
+
if (this.unrepresentable === "throw") {
|
|
8621
|
+
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
8979
8622
|
}
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
json$1.type = "array";
|
|
8986
|
-
json$1.items = this.process(def.element, {
|
|
8987
|
-
...params,
|
|
8988
|
-
path: [...params.path, "items"]
|
|
8989
|
-
});
|
|
8990
|
-
break;
|
|
8623
|
+
break;
|
|
8624
|
+
}
|
|
8625
|
+
case "symbol": {
|
|
8626
|
+
if (this.unrepresentable === "throw") {
|
|
8627
|
+
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
8991
8628
|
}
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
if (requiredKeys.size > 0) {
|
|
9017
|
-
json$1.required = Array.from(requiredKeys);
|
|
9018
|
-
}
|
|
9019
|
-
if (def.catchall?._zod.def.type === "never") {
|
|
9020
|
-
json$1.additionalProperties = false;
|
|
9021
|
-
} else if (!def.catchall) {
|
|
9022
|
-
if (this.io === "output") json$1.additionalProperties = false;
|
|
9023
|
-
} else if (def.catchall) {
|
|
9024
|
-
json$1.additionalProperties = this.process(def.catchall, {
|
|
9025
|
-
...params,
|
|
9026
|
-
path: [...params.path, "additionalProperties"]
|
|
9027
|
-
});
|
|
9028
|
-
}
|
|
9029
|
-
break;
|
|
8629
|
+
break;
|
|
8630
|
+
}
|
|
8631
|
+
case "undefined": {
|
|
8632
|
+
const json$1 = _json;
|
|
8633
|
+
json$1.type = "null";
|
|
8634
|
+
break;
|
|
8635
|
+
}
|
|
8636
|
+
case "null": {
|
|
8637
|
+
_json.type = "null";
|
|
8638
|
+
break;
|
|
8639
|
+
}
|
|
8640
|
+
case "any": {
|
|
8641
|
+
break;
|
|
8642
|
+
}
|
|
8643
|
+
case "unknown": {
|
|
8644
|
+
break;
|
|
8645
|
+
}
|
|
8646
|
+
case "never": {
|
|
8647
|
+
_json.not = {};
|
|
8648
|
+
break;
|
|
8649
|
+
}
|
|
8650
|
+
case "void": {
|
|
8651
|
+
if (this.unrepresentable === "throw") {
|
|
8652
|
+
throw new Error("Void cannot be represented in JSON Schema");
|
|
9030
8653
|
}
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
...params.path,
|
|
9037
|
-
"anyOf",
|
|
9038
|
-
i
|
|
9039
|
-
]
|
|
9040
|
-
}));
|
|
9041
|
-
break;
|
|
8654
|
+
break;
|
|
8655
|
+
}
|
|
8656
|
+
case "date": {
|
|
8657
|
+
if (this.unrepresentable === "throw") {
|
|
8658
|
+
throw new Error("Date cannot be represented in JSON Schema");
|
|
9042
8659
|
}
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
8660
|
+
break;
|
|
8661
|
+
}
|
|
8662
|
+
case "array": {
|
|
8663
|
+
const json$1 = _json;
|
|
8664
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
8665
|
+
if (typeof minimum === "number") json$1.minItems = minimum;
|
|
8666
|
+
if (typeof maximum === "number") json$1.maxItems = maximum;
|
|
8667
|
+
json$1.type = "array";
|
|
8668
|
+
json$1.items = this.process(def.element, {
|
|
8669
|
+
...params,
|
|
8670
|
+
path: [...params.path, "items"]
|
|
8671
|
+
});
|
|
8672
|
+
break;
|
|
8673
|
+
}
|
|
8674
|
+
case "object": {
|
|
8675
|
+
const json$1 = _json;
|
|
8676
|
+
json$1.type = "object";
|
|
8677
|
+
json$1.properties = {};
|
|
8678
|
+
const shape = def.shape;
|
|
8679
|
+
for (const key in shape) {
|
|
8680
|
+
json$1.properties[key] = this.process(shape[key], {
|
|
9054
8681
|
...params,
|
|
9055
8682
|
path: [
|
|
9056
8683
|
...params.path,
|
|
9057
|
-
"
|
|
9058
|
-
|
|
8684
|
+
"properties",
|
|
8685
|
+
key
|
|
9059
8686
|
]
|
|
9060
8687
|
});
|
|
9061
|
-
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
9062
|
-
const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
9063
|
-
json$1.allOf = allOf;
|
|
9064
|
-
break;
|
|
9065
8688
|
}
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
path: [
|
|
9072
|
-
...params.path,
|
|
9073
|
-
"prefixItems",
|
|
9074
|
-
i
|
|
9075
|
-
]
|
|
9076
|
-
}));
|
|
9077
|
-
if (this.target === "draft-2020-12") {
|
|
9078
|
-
json$1.prefixItems = prefixItems;
|
|
8689
|
+
const allKeys = new Set(Object.keys(shape));
|
|
8690
|
+
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
8691
|
+
const v = def.shape[key]._zod;
|
|
8692
|
+
if (this.io === "input") {
|
|
8693
|
+
return v.optin === undefined;
|
|
9079
8694
|
} else {
|
|
9080
|
-
|
|
8695
|
+
return v.optout === undefined;
|
|
9081
8696
|
}
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
path: [...params.path, "items"]
|
|
9086
|
-
});
|
|
9087
|
-
if (this.target === "draft-2020-12") {
|
|
9088
|
-
json$1.items = rest;
|
|
9089
|
-
} else {
|
|
9090
|
-
json$1.additionalItems = rest;
|
|
9091
|
-
}
|
|
9092
|
-
}
|
|
9093
|
-
if (def.rest) {
|
|
9094
|
-
json$1.items = this.process(def.rest, {
|
|
9095
|
-
...params,
|
|
9096
|
-
path: [...params.path, "items"]
|
|
9097
|
-
});
|
|
9098
|
-
}
|
|
9099
|
-
const { minimum, maximum } = schema._zod.bag;
|
|
9100
|
-
if (typeof minimum === "number") json$1.minItems = minimum;
|
|
9101
|
-
if (typeof maximum === "number") json$1.maxItems = maximum;
|
|
9102
|
-
break;
|
|
8697
|
+
}));
|
|
8698
|
+
if (requiredKeys.size > 0) {
|
|
8699
|
+
json$1.required = Array.from(requiredKeys);
|
|
9103
8700
|
}
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
json$1.
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
});
|
|
9111
|
-
json$1.additionalProperties = this.process(def.valueType, {
|
|
8701
|
+
if (def.catchall?._zod.def.type === "never") {
|
|
8702
|
+
json$1.additionalProperties = false;
|
|
8703
|
+
} else if (!def.catchall) {
|
|
8704
|
+
if (this.io === "output") json$1.additionalProperties = false;
|
|
8705
|
+
} else if (def.catchall) {
|
|
8706
|
+
json$1.additionalProperties = this.process(def.catchall, {
|
|
9112
8707
|
...params,
|
|
9113
8708
|
path: [...params.path, "additionalProperties"]
|
|
9114
8709
|
});
|
|
9115
|
-
break;
|
|
9116
8710
|
}
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
8711
|
+
break;
|
|
8712
|
+
}
|
|
8713
|
+
case "union": {
|
|
8714
|
+
const json$1 = _json;
|
|
8715
|
+
json$1.anyOf = def.options.map((x, i) => this.process(x, {
|
|
8716
|
+
...params,
|
|
8717
|
+
path: [
|
|
8718
|
+
...params.path,
|
|
8719
|
+
"anyOf",
|
|
8720
|
+
i
|
|
8721
|
+
]
|
|
8722
|
+
}));
|
|
8723
|
+
break;
|
|
8724
|
+
}
|
|
8725
|
+
case "intersection": {
|
|
8726
|
+
const json$1 = _json;
|
|
8727
|
+
const a = this.process(def.left, {
|
|
8728
|
+
...params,
|
|
8729
|
+
path: [
|
|
8730
|
+
...params.path,
|
|
8731
|
+
"allOf",
|
|
8732
|
+
0
|
|
8733
|
+
]
|
|
8734
|
+
});
|
|
8735
|
+
const b = this.process(def.right, {
|
|
8736
|
+
...params,
|
|
8737
|
+
path: [
|
|
8738
|
+
...params.path,
|
|
8739
|
+
"allOf",
|
|
8740
|
+
1
|
|
8741
|
+
]
|
|
8742
|
+
});
|
|
8743
|
+
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
8744
|
+
const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
8745
|
+
json$1.allOf = allOf;
|
|
8746
|
+
break;
|
|
8747
|
+
}
|
|
8748
|
+
case "tuple": {
|
|
8749
|
+
const json$1 = _json;
|
|
8750
|
+
json$1.type = "array";
|
|
8751
|
+
const prefixItems = def.items.map((x, i) => this.process(x, {
|
|
8752
|
+
...params,
|
|
8753
|
+
path: [
|
|
8754
|
+
...params.path,
|
|
8755
|
+
"prefixItems",
|
|
8756
|
+
i
|
|
8757
|
+
]
|
|
8758
|
+
}));
|
|
8759
|
+
if (this.target === "draft-2020-12") {
|
|
8760
|
+
json$1.prefixItems = prefixItems;
|
|
8761
|
+
} else {
|
|
8762
|
+
json$1.items = prefixItems;
|
|
9122
8763
|
}
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
8764
|
+
if (def.rest) {
|
|
8765
|
+
const rest = this.process(def.rest, {
|
|
8766
|
+
...params,
|
|
8767
|
+
path: [...params.path, "items"]
|
|
8768
|
+
});
|
|
8769
|
+
if (this.target === "draft-2020-12") {
|
|
8770
|
+
json$1.items = rest;
|
|
8771
|
+
} else {
|
|
8772
|
+
json$1.additionalItems = rest;
|
|
9126
8773
|
}
|
|
9127
|
-
break;
|
|
9128
8774
|
}
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
8775
|
+
if (def.rest) {
|
|
8776
|
+
json$1.items = this.process(def.rest, {
|
|
8777
|
+
...params,
|
|
8778
|
+
path: [...params.path, "items"]
|
|
8779
|
+
});
|
|
8780
|
+
}
|
|
8781
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
8782
|
+
if (typeof minimum === "number") json$1.minItems = minimum;
|
|
8783
|
+
if (typeof maximum === "number") json$1.maxItems = maximum;
|
|
8784
|
+
break;
|
|
8785
|
+
}
|
|
8786
|
+
case "record": {
|
|
8787
|
+
const json$1 = _json;
|
|
8788
|
+
json$1.type = "object";
|
|
8789
|
+
json$1.propertyNames = this.process(def.keyType, {
|
|
8790
|
+
...params,
|
|
8791
|
+
path: [...params.path, "propertyNames"]
|
|
8792
|
+
});
|
|
8793
|
+
json$1.additionalProperties = this.process(def.valueType, {
|
|
8794
|
+
...params,
|
|
8795
|
+
path: [...params.path, "additionalProperties"]
|
|
8796
|
+
});
|
|
8797
|
+
break;
|
|
8798
|
+
}
|
|
8799
|
+
case "map": {
|
|
8800
|
+
if (this.unrepresentable === "throw") {
|
|
8801
|
+
throw new Error("Map cannot be represented in JSON Schema");
|
|
9136
8802
|
}
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
if (this.unrepresentable === "throw") {
|
|
9143
|
-
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
9144
|
-
} else {}
|
|
9145
|
-
} else if (typeof val === "bigint") {
|
|
9146
|
-
if (this.unrepresentable === "throw") {
|
|
9147
|
-
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
9148
|
-
} else {
|
|
9149
|
-
vals.push(Number(val));
|
|
9150
|
-
}
|
|
9151
|
-
} else {
|
|
9152
|
-
vals.push(val);
|
|
9153
|
-
}
|
|
9154
|
-
}
|
|
9155
|
-
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
9156
|
-
const val = vals[0];
|
|
9157
|
-
json$1.type = val === null ? "null" : typeof val;
|
|
9158
|
-
json$1.const = val;
|
|
9159
|
-
} else {
|
|
9160
|
-
if (vals.every((v) => typeof v === "number")) json$1.type = "number";
|
|
9161
|
-
if (vals.every((v) => typeof v === "string")) json$1.type = "string";
|
|
9162
|
-
if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
|
|
9163
|
-
if (vals.every((v) => v === null)) json$1.type = "null";
|
|
9164
|
-
json$1.enum = vals;
|
|
9165
|
-
}
|
|
9166
|
-
break;
|
|
8803
|
+
break;
|
|
8804
|
+
}
|
|
8805
|
+
case "set": {
|
|
8806
|
+
if (this.unrepresentable === "throw") {
|
|
8807
|
+
throw new Error("Set cannot be represented in JSON Schema");
|
|
9167
8808
|
}
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
8809
|
+
break;
|
|
8810
|
+
}
|
|
8811
|
+
case "enum": {
|
|
8812
|
+
const json$1 = _json;
|
|
8813
|
+
const values = getEnumValues(def.entries);
|
|
8814
|
+
if (values.every((v) => typeof v === "number")) json$1.type = "number";
|
|
8815
|
+
if (values.every((v) => typeof v === "string")) json$1.type = "string";
|
|
8816
|
+
json$1.enum = values;
|
|
8817
|
+
break;
|
|
8818
|
+
}
|
|
8819
|
+
case "literal": {
|
|
8820
|
+
const json$1 = _json;
|
|
8821
|
+
const vals = [];
|
|
8822
|
+
for (const val of def.values) {
|
|
8823
|
+
if (val === undefined) {
|
|
8824
|
+
if (this.unrepresentable === "throw") {
|
|
8825
|
+
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
8826
|
+
} else {}
|
|
8827
|
+
} else if (typeof val === "bigint") {
|
|
8828
|
+
if (this.unrepresentable === "throw") {
|
|
8829
|
+
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
9182
8830
|
} else {
|
|
9183
|
-
|
|
9184
|
-
const mFile = {
|
|
9185
|
-
...file$1,
|
|
9186
|
-
contentMediaType: m
|
|
9187
|
-
};
|
|
9188
|
-
return mFile;
|
|
9189
|
-
});
|
|
8831
|
+
vals.push(Number(val));
|
|
9190
8832
|
}
|
|
9191
8833
|
} else {
|
|
9192
|
-
|
|
9193
|
-
}
|
|
9194
|
-
break;
|
|
9195
|
-
}
|
|
9196
|
-
case "transform": {
|
|
9197
|
-
if (this.unrepresentable === "throw") {
|
|
9198
|
-
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
8834
|
+
vals.push(val);
|
|
9199
8835
|
}
|
|
9200
|
-
break;
|
|
9201
8836
|
}
|
|
9202
|
-
|
|
9203
|
-
const
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
}
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
case "success": {
|
|
9213
|
-
const json$1 = _json;
|
|
9214
|
-
json$1.type = "boolean";
|
|
9215
|
-
break;
|
|
9216
|
-
}
|
|
9217
|
-
case "default": {
|
|
9218
|
-
this.process(def.innerType, params);
|
|
9219
|
-
result.ref = def.innerType;
|
|
9220
|
-
_json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
9221
|
-
break;
|
|
9222
|
-
}
|
|
9223
|
-
case "prefault": {
|
|
9224
|
-
this.process(def.innerType, params);
|
|
9225
|
-
result.ref = def.innerType;
|
|
9226
|
-
if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
9227
|
-
break;
|
|
9228
|
-
}
|
|
9229
|
-
case "catch": {
|
|
9230
|
-
this.process(def.innerType, params);
|
|
9231
|
-
result.ref = def.innerType;
|
|
9232
|
-
let catchValue;
|
|
9233
|
-
try {
|
|
9234
|
-
catchValue = def.catchValue(undefined);
|
|
9235
|
-
} catch {
|
|
9236
|
-
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
9237
|
-
}
|
|
9238
|
-
_json.default = catchValue;
|
|
9239
|
-
break;
|
|
8837
|
+
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
8838
|
+
const val = vals[0];
|
|
8839
|
+
json$1.type = val === null ? "null" : typeof val;
|
|
8840
|
+
json$1.const = val;
|
|
8841
|
+
} else {
|
|
8842
|
+
if (vals.every((v) => typeof v === "number")) json$1.type = "number";
|
|
8843
|
+
if (vals.every((v) => typeof v === "string")) json$1.type = "string";
|
|
8844
|
+
if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
|
|
8845
|
+
if (vals.every((v) => v === null)) json$1.type = "null";
|
|
8846
|
+
json$1.enum = vals;
|
|
9240
8847
|
}
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
8848
|
+
break;
|
|
8849
|
+
}
|
|
8850
|
+
case "file": {
|
|
8851
|
+
const json$1 = _json;
|
|
8852
|
+
const file$1 = {
|
|
8853
|
+
type: "string",
|
|
8854
|
+
format: "binary",
|
|
8855
|
+
contentEncoding: "binary"
|
|
8856
|
+
};
|
|
8857
|
+
const { minimum, maximum, mime } = schema._zod.bag;
|
|
8858
|
+
if (minimum !== undefined) file$1.minLength = minimum;
|
|
8859
|
+
if (maximum !== undefined) file$1.maxLength = maximum;
|
|
8860
|
+
if (mime) {
|
|
8861
|
+
if (mime.length === 1) {
|
|
8862
|
+
file$1.contentMediaType = mime[0];
|
|
8863
|
+
Object.assign(json$1, file$1);
|
|
8864
|
+
} else {
|
|
8865
|
+
json$1.anyOf = mime.map((m) => {
|
|
8866
|
+
const mFile = {
|
|
8867
|
+
...file$1,
|
|
8868
|
+
contentMediaType: m
|
|
8869
|
+
};
|
|
8870
|
+
return mFile;
|
|
8871
|
+
});
|
|
9244
8872
|
}
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
case "template_literal": {
|
|
9248
|
-
const json$1 = _json;
|
|
9249
|
-
const pattern = schema._zod.pattern;
|
|
9250
|
-
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
9251
|
-
json$1.type = "string";
|
|
9252
|
-
json$1.pattern = pattern.source;
|
|
9253
|
-
break;
|
|
9254
|
-
}
|
|
9255
|
-
case "pipe": {
|
|
9256
|
-
const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
9257
|
-
this.process(innerType, params);
|
|
9258
|
-
result.ref = innerType;
|
|
9259
|
-
break;
|
|
9260
|
-
}
|
|
9261
|
-
case "readonly": {
|
|
9262
|
-
this.process(def.innerType, params);
|
|
9263
|
-
result.ref = def.innerType;
|
|
9264
|
-
_json.readOnly = true;
|
|
9265
|
-
break;
|
|
9266
|
-
}
|
|
9267
|
-
case "promise": {
|
|
9268
|
-
this.process(def.innerType, params);
|
|
9269
|
-
result.ref = def.innerType;
|
|
9270
|
-
break;
|
|
8873
|
+
} else {
|
|
8874
|
+
Object.assign(json$1, file$1);
|
|
9271
8875
|
}
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
8876
|
+
break;
|
|
8877
|
+
}
|
|
8878
|
+
case "transform": {
|
|
8879
|
+
if (this.unrepresentable === "throw") {
|
|
8880
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
9276
8881
|
}
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
8882
|
+
break;
|
|
8883
|
+
}
|
|
8884
|
+
case "nullable": {
|
|
8885
|
+
const inner = this.process(def.innerType, params);
|
|
8886
|
+
_json.anyOf = [inner, { type: "null" }];
|
|
8887
|
+
break;
|
|
8888
|
+
}
|
|
8889
|
+
case "nonoptional": {
|
|
8890
|
+
this.process(def.innerType, params);
|
|
8891
|
+
result.ref = def.innerType;
|
|
8892
|
+
break;
|
|
8893
|
+
}
|
|
8894
|
+
case "success": {
|
|
8895
|
+
const json$1 = _json;
|
|
8896
|
+
json$1.type = "boolean";
|
|
8897
|
+
break;
|
|
8898
|
+
}
|
|
8899
|
+
case "default": {
|
|
8900
|
+
this.process(def.innerType, params);
|
|
8901
|
+
result.ref = def.innerType;
|
|
8902
|
+
_json.default = def.defaultValue;
|
|
8903
|
+
break;
|
|
8904
|
+
}
|
|
8905
|
+
case "prefault": {
|
|
8906
|
+
this.process(def.innerType, params);
|
|
8907
|
+
result.ref = def.innerType;
|
|
8908
|
+
if (this.io === "input") _json._prefault = def.defaultValue;
|
|
8909
|
+
break;
|
|
8910
|
+
}
|
|
8911
|
+
case "catch": {
|
|
8912
|
+
this.process(def.innerType, params);
|
|
8913
|
+
result.ref = def.innerType;
|
|
8914
|
+
let catchValue;
|
|
8915
|
+
try {
|
|
8916
|
+
catchValue = def.catchValue(undefined);
|
|
8917
|
+
} catch {
|
|
8918
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
9282
8919
|
}
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
8920
|
+
_json.default = catchValue;
|
|
8921
|
+
break;
|
|
8922
|
+
}
|
|
8923
|
+
case "nan": {
|
|
8924
|
+
if (this.unrepresentable === "throw") {
|
|
8925
|
+
throw new Error("NaN cannot be represented in JSON Schema");
|
|
9288
8926
|
}
|
|
9289
|
-
|
|
9290
|
-
|
|
8927
|
+
break;
|
|
8928
|
+
}
|
|
8929
|
+
case "template_literal": {
|
|
8930
|
+
const json$1 = _json;
|
|
8931
|
+
const pattern = schema._zod.pattern;
|
|
8932
|
+
if (!pattern) throw new Error("Pattern not found in template literal");
|
|
8933
|
+
json$1.type = "string";
|
|
8934
|
+
json$1.pattern = pattern.source;
|
|
8935
|
+
break;
|
|
8936
|
+
}
|
|
8937
|
+
case "pipe": {
|
|
8938
|
+
const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
8939
|
+
this.process(innerType, params);
|
|
8940
|
+
result.ref = innerType;
|
|
8941
|
+
break;
|
|
8942
|
+
}
|
|
8943
|
+
case "readonly": {
|
|
8944
|
+
this.process(def.innerType, params);
|
|
8945
|
+
result.ref = def.innerType;
|
|
8946
|
+
_json.readOnly = true;
|
|
8947
|
+
break;
|
|
8948
|
+
}
|
|
8949
|
+
case "promise": {
|
|
8950
|
+
this.process(def.innerType, params);
|
|
8951
|
+
result.ref = def.innerType;
|
|
8952
|
+
break;
|
|
8953
|
+
}
|
|
8954
|
+
case "optional": {
|
|
8955
|
+
this.process(def.innerType, params);
|
|
8956
|
+
result.ref = def.innerType;
|
|
8957
|
+
break;
|
|
8958
|
+
}
|
|
8959
|
+
case "lazy": {
|
|
8960
|
+
const innerType = schema._zod.innerType;
|
|
8961
|
+
this.process(innerType, params);
|
|
8962
|
+
result.ref = innerType;
|
|
8963
|
+
break;
|
|
8964
|
+
}
|
|
8965
|
+
case "custom": {
|
|
8966
|
+
if (this.unrepresentable === "throw") {
|
|
8967
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
9291
8968
|
}
|
|
8969
|
+
break;
|
|
8970
|
+
}
|
|
8971
|
+
default: {
|
|
8972
|
+
def;
|
|
9292
8973
|
}
|
|
9293
8974
|
}
|
|
9294
8975
|
}
|
|
@@ -9315,15 +8996,12 @@ var JSONSchemaGenerator = class {
|
|
|
9315
8996
|
const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
9316
8997
|
if (params.external) {
|
|
9317
8998
|
const externalId = params.external.registry.get(entry[0])?.id;
|
|
9318
|
-
|
|
9319
|
-
if (externalId) {
|
|
9320
|
-
return { ref: uriGenerator(externalId) };
|
|
9321
|
-
}
|
|
8999
|
+
if (externalId) return { ref: params.external.uri(externalId) };
|
|
9322
9000
|
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
|
|
9323
9001
|
entry[1].defId = id;
|
|
9324
9002
|
return {
|
|
9325
9003
|
defId: id,
|
|
9326
|
-
ref: `${
|
|
9004
|
+
ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
|
|
9327
9005
|
};
|
|
9328
9006
|
}
|
|
9329
9007
|
if (entry[1] === root) {
|
|
@@ -9351,14 +9029,6 @@ var JSONSchemaGenerator = class {
|
|
|
9351
9029
|
}
|
|
9352
9030
|
schema$1.$ref = ref;
|
|
9353
9031
|
};
|
|
9354
|
-
if (params.cycles === "throw") {
|
|
9355
|
-
for (const entry of this.seen.entries()) {
|
|
9356
|
-
const seen = entry[1];
|
|
9357
|
-
if (seen.cycle) {
|
|
9358
|
-
throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
|
|
9359
|
-
}
|
|
9360
|
-
}
|
|
9361
|
-
}
|
|
9362
9032
|
for (const entry of this.seen.entries()) {
|
|
9363
9033
|
const seen = entry[1];
|
|
9364
9034
|
if (schema === entry[0]) {
|
|
@@ -9378,7 +9048,11 @@ var JSONSchemaGenerator = class {
|
|
|
9378
9048
|
continue;
|
|
9379
9049
|
}
|
|
9380
9050
|
if (seen.cycle) {
|
|
9381
|
-
|
|
9051
|
+
if (params.cycles === "throw") {
|
|
9052
|
+
throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
|
|
9053
|
+
} else if (params.cycles === "ref") {
|
|
9054
|
+
extractToDef(entry);
|
|
9055
|
+
}
|
|
9382
9056
|
continue;
|
|
9383
9057
|
}
|
|
9384
9058
|
if (seen.count > 1) {
|
|
@@ -9410,8 +9084,7 @@ var JSONSchemaGenerator = class {
|
|
|
9410
9084
|
}
|
|
9411
9085
|
if (!seen.isParent) this.override({
|
|
9412
9086
|
zodSchema,
|
|
9413
|
-
jsonSchema: schema$1
|
|
9414
|
-
path: seen.path ?? []
|
|
9087
|
+
jsonSchema: schema$1
|
|
9415
9088
|
});
|
|
9416
9089
|
};
|
|
9417
9090
|
for (const entry of [...this.seen.entries()].reverse()) {
|
|
@@ -9425,11 +9098,6 @@ var JSONSchemaGenerator = class {
|
|
|
9425
9098
|
} else {
|
|
9426
9099
|
console.warn(`Invalid target: ${this.target}`);
|
|
9427
9100
|
}
|
|
9428
|
-
if (params.external?.uri) {
|
|
9429
|
-
const id = params.external.registry.get(schema)?.id;
|
|
9430
|
-
if (!id) throw new Error("Schema is missing an `id` property");
|
|
9431
|
-
result.$id = params.external.uri(id);
|
|
9432
|
-
}
|
|
9433
9101
|
Object.assign(result, root.def);
|
|
9434
9102
|
const defs = params.external?.defs ?? {};
|
|
9435
9103
|
for (const entry of this.seen.entries()) {
|
|
@@ -9438,13 +9106,11 @@ var JSONSchemaGenerator = class {
|
|
|
9438
9106
|
defs[seen.defId] = seen.def;
|
|
9439
9107
|
}
|
|
9440
9108
|
}
|
|
9441
|
-
if (params.external)
|
|
9442
|
-
if (
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
result.definitions = defs;
|
|
9447
|
-
}
|
|
9109
|
+
if (!params.external && Object.keys(defs).length > 0) {
|
|
9110
|
+
if (this.target === "draft-2020-12") {
|
|
9111
|
+
result.$defs = defs;
|
|
9112
|
+
} else {
|
|
9113
|
+
result.definitions = defs;
|
|
9448
9114
|
}
|
|
9449
9115
|
}
|
|
9450
9116
|
try {
|
|
@@ -9465,7 +9131,7 @@ function toJSONSchema(input, _params) {
|
|
|
9465
9131
|
const schemas = {};
|
|
9466
9132
|
const external = {
|
|
9467
9133
|
registry: input,
|
|
9468
|
-
uri: _params?.uri,
|
|
9134
|
+
uri: _params?.uri || ((id) => id),
|
|
9469
9135
|
defs
|
|
9470
9136
|
};
|
|
9471
9137
|
for (const entry of input._idmap.entries()) {
|
|
@@ -9576,11 +9242,11 @@ function isTransforming(_schema, _ctx) {
|
|
|
9576
9242
|
}
|
|
9577
9243
|
|
|
9578
9244
|
//#endregion
|
|
9579
|
-
//#region ../../node_modules/zod/v4/core/json-schema.js
|
|
9245
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
|
|
9580
9246
|
var json_schema_exports = {};
|
|
9581
9247
|
|
|
9582
9248
|
//#endregion
|
|
9583
|
-
//#region ../../node_modules/zod/v4/core/index.js
|
|
9249
|
+
//#region ../../node_modules/zod/dist/esm/v4/core/index.js
|
|
9584
9250
|
var core_exports = {};
|
|
9585
9251
|
__export(core_exports, {
|
|
9586
9252
|
$ZodAny: () => $ZodAny,
|
|
@@ -9619,7 +9285,6 @@ __export(core_exports, {
|
|
|
9619
9285
|
$ZodCheckStringFormat: () => $ZodCheckStringFormat,
|
|
9620
9286
|
$ZodCheckUpperCase: () => $ZodCheckUpperCase,
|
|
9621
9287
|
$ZodCustom: () => $ZodCustom,
|
|
9622
|
-
$ZodCustomStringFormat: () => $ZodCustomStringFormat,
|
|
9623
9288
|
$ZodDate: () => $ZodDate,
|
|
9624
9289
|
$ZodDefault: () => $ZodDefault,
|
|
9625
9290
|
$ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
|
|
@@ -9684,8 +9349,6 @@ __export(core_exports, {
|
|
|
9684
9349
|
Doc: () => Doc,
|
|
9685
9350
|
JSONSchema: () => json_schema_exports,
|
|
9686
9351
|
JSONSchemaGenerator: () => JSONSchemaGenerator,
|
|
9687
|
-
NEVER: () => NEVER,
|
|
9688
|
-
TimePrecision: () => TimePrecision,
|
|
9689
9352
|
_any: () => _any,
|
|
9690
9353
|
_array: () => _array,
|
|
9691
9354
|
_base64: () => _base64,
|
|
@@ -9775,7 +9438,6 @@ __export(core_exports, {
|
|
|
9775
9438
|
_size: () => _size,
|
|
9776
9439
|
_startsWith: () => _startsWith,
|
|
9777
9440
|
_string: () => _string,
|
|
9778
|
-
_stringFormat: () => _stringFormat,
|
|
9779
9441
|
_stringbool: () => _stringbool,
|
|
9780
9442
|
_success: () => _success,
|
|
9781
9443
|
_symbol: () => _symbol,
|
|
@@ -9825,7 +9487,7 @@ __export(core_exports, {
|
|
|
9825
9487
|
});
|
|
9826
9488
|
|
|
9827
9489
|
//#endregion
|
|
9828
|
-
//#region ../../node_modules/zod/v4/classic/iso.js
|
|
9490
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
|
|
9829
9491
|
var iso_exports = {};
|
|
9830
9492
|
__export(iso_exports, {
|
|
9831
9493
|
ZodISODate: () => ZodISODate,
|
|
@@ -9867,7 +9529,7 @@ function duration(params) {
|
|
|
9867
9529
|
}
|
|
9868
9530
|
|
|
9869
9531
|
//#endregion
|
|
9870
|
-
//#region ../../node_modules/zod/v4/classic/errors.js
|
|
9532
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
|
|
9871
9533
|
const initializer = (inst, issues) => {
|
|
9872
9534
|
$ZodError.init(inst, issues);
|
|
9873
9535
|
inst.name = "ZodError";
|
|
@@ -9885,14 +9547,14 @@ const ZodError = $constructor("ZodError", initializer);
|
|
|
9885
9547
|
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
9886
9548
|
|
|
9887
9549
|
//#endregion
|
|
9888
|
-
//#region ../../node_modules/zod/v4/classic/parse.js
|
|
9550
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
|
|
9889
9551
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
9890
9552
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
9891
9553
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
9892
9554
|
const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
9893
9555
|
|
|
9894
9556
|
//#endregion
|
|
9895
|
-
//#region ../../node_modules/zod/v4/classic/schemas.js
|
|
9557
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
|
|
9896
9558
|
const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
9897
9559
|
$ZodType.init(inst, def);
|
|
9898
9560
|
inst.def = def;
|
|
@@ -10160,13 +9822,6 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
|
10160
9822
|
function jwt(params) {
|
|
10161
9823
|
return _jwt(ZodJWT, params);
|
|
10162
9824
|
}
|
|
10163
|
-
const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
|
|
10164
|
-
$ZodCustomStringFormat.init(inst, def);
|
|
10165
|
-
ZodStringFormat.init(inst, def);
|
|
10166
|
-
});
|
|
10167
|
-
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
10168
|
-
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
10169
|
-
}
|
|
10170
9825
|
const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
10171
9826
|
$ZodNumber.init(inst, def);
|
|
10172
9827
|
ZodType.init(inst, def);
|
|
@@ -10336,7 +9991,9 @@ function keyof(schema) {
|
|
|
10336
9991
|
const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
10337
9992
|
$ZodObject.init(inst, def);
|
|
10338
9993
|
ZodType.init(inst, def);
|
|
10339
|
-
defineLazy(inst, "shape", () =>
|
|
9994
|
+
defineLazy(inst, "shape", () => {
|
|
9995
|
+
return Object.fromEntries(Object.entries(inst._zod.def.shape));
|
|
9996
|
+
});
|
|
10340
9997
|
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
10341
9998
|
inst.catchall = (catchall) => inst.clone({
|
|
10342
9999
|
...inst._zod.def,
|
|
@@ -10781,8 +10438,11 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
10781
10438
|
$ZodCustom.init(inst, def);
|
|
10782
10439
|
ZodType.init(inst, def);
|
|
10783
10440
|
});
|
|
10784
|
-
function check(fn) {
|
|
10785
|
-
const ch = new $ZodCheck({
|
|
10441
|
+
function check(fn, params) {
|
|
10442
|
+
const ch = new $ZodCheck({
|
|
10443
|
+
check: "custom",
|
|
10444
|
+
...normalizeParams(params)
|
|
10445
|
+
});
|
|
10786
10446
|
ch._zod.check = fn;
|
|
10787
10447
|
return ch;
|
|
10788
10448
|
}
|
|
@@ -10792,7 +10452,7 @@ function custom(fn, _params) {
|
|
|
10792
10452
|
function refine(fn, _params = {}) {
|
|
10793
10453
|
return _refine(ZodCustom, fn, _params);
|
|
10794
10454
|
}
|
|
10795
|
-
function superRefine(fn) {
|
|
10455
|
+
function superRefine(fn, params) {
|
|
10796
10456
|
const ch = check((payload) => {
|
|
10797
10457
|
payload.addIssue = (issue$1) => {
|
|
10798
10458
|
if (typeof issue$1 === "string") {
|
|
@@ -10808,7 +10468,7 @@ function superRefine(fn) {
|
|
|
10808
10468
|
}
|
|
10809
10469
|
};
|
|
10810
10470
|
return fn(payload.value, payload);
|
|
10811
|
-
});
|
|
10471
|
+
}, params);
|
|
10812
10472
|
return ch;
|
|
10813
10473
|
}
|
|
10814
10474
|
function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
|
|
@@ -10846,7 +10506,7 @@ function preprocess(fn, schema) {
|
|
|
10846
10506
|
}
|
|
10847
10507
|
|
|
10848
10508
|
//#endregion
|
|
10849
|
-
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
10509
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
|
|
10850
10510
|
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
10851
10511
|
const ZodIssueCode = {
|
|
10852
10512
|
invalid_type: "invalid_type",
|
|
@@ -10861,6 +10521,10 @@ const ZodIssueCode = {
|
|
|
10861
10521
|
invalid_value: "invalid_value",
|
|
10862
10522
|
custom: "custom"
|
|
10863
10523
|
};
|
|
10524
|
+
/** @deprecated Not necessary in Zod 4. */
|
|
10525
|
+
const INVALID = Object.freeze({ status: "aborted" });
|
|
10526
|
+
/** A special constant with type `never` */
|
|
10527
|
+
const NEVER = INVALID;
|
|
10864
10528
|
/** @deprecated Use `z.config(params)` instead. */
|
|
10865
10529
|
function setErrorMap(map$1) {
|
|
10866
10530
|
config({ customError: map$1 });
|
|
@@ -10871,7 +10535,7 @@ function getErrorMap() {
|
|
|
10871
10535
|
}
|
|
10872
10536
|
|
|
10873
10537
|
//#endregion
|
|
10874
|
-
//#region ../../node_modules/zod/v4/classic/coerce.js
|
|
10538
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
|
|
10875
10539
|
var coerce_exports = {};
|
|
10876
10540
|
__export(coerce_exports, {
|
|
10877
10541
|
bigint: () => bigint,
|
|
@@ -10897,14 +10561,13 @@ function date(params) {
|
|
|
10897
10561
|
}
|
|
10898
10562
|
|
|
10899
10563
|
//#endregion
|
|
10900
|
-
//#region ../../node_modules/zod/v4/classic/external.js
|
|
10564
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/external.js
|
|
10901
10565
|
var external_exports = {};
|
|
10902
10566
|
__export(external_exports, {
|
|
10903
10567
|
$brand: () => $brand,
|
|
10904
10568
|
$input: () => $input,
|
|
10905
10569
|
$output: () => $output,
|
|
10906
10570
|
NEVER: () => NEVER,
|
|
10907
|
-
TimePrecision: () => TimePrecision,
|
|
10908
10571
|
ZodAny: () => ZodAny,
|
|
10909
10572
|
ZodArray: () => ZodArray,
|
|
10910
10573
|
ZodBase64: () => ZodBase64,
|
|
@@ -10918,7 +10581,6 @@ __export(external_exports, {
|
|
|
10918
10581
|
ZodCUID2: () => ZodCUID2,
|
|
10919
10582
|
ZodCatch: () => ZodCatch,
|
|
10920
10583
|
ZodCustom: () => ZodCustom,
|
|
10921
|
-
ZodCustomStringFormat: () => ZodCustomStringFormat,
|
|
10922
10584
|
ZodDate: () => ZodDate,
|
|
10923
10585
|
ZodDefault: () => ZodDefault,
|
|
10924
10586
|
ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
|
|
@@ -11080,7 +10742,6 @@ __export(external_exports, {
|
|
|
11080
10742
|
startsWith: () => _startsWith,
|
|
11081
10743
|
strictObject: () => strictObject,
|
|
11082
10744
|
string: () => string$1,
|
|
11083
|
-
stringFormat: () => stringFormat,
|
|
11084
10745
|
stringbool: () => stringbool,
|
|
11085
10746
|
success: () => success,
|
|
11086
10747
|
superRefine: () => superRefine,
|
|
@@ -11111,11 +10772,11 @@ __export(external_exports, {
|
|
|
11111
10772
|
config(en_default());
|
|
11112
10773
|
|
|
11113
10774
|
//#endregion
|
|
11114
|
-
//#region ../../node_modules/zod/v4/classic/index.js
|
|
10775
|
+
//#region ../../node_modules/zod/dist/esm/v4/classic/index.js
|
|
11115
10776
|
var classic_default = external_exports;
|
|
11116
10777
|
|
|
11117
10778
|
//#endregion
|
|
11118
|
-
//#region ../../node_modules/zod/v4/index.js
|
|
10779
|
+
//#region ../../node_modules/zod/dist/esm/v4/index.js
|
|
11119
10780
|
var v4_default = classic_default;
|
|
11120
10781
|
|
|
11121
10782
|
//#endregion
|