@declaro/data 2.0.0-beta.100 → 2.0.0-beta.101
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/index.js +20 -26
- package/dist/browser/index.js.map +27 -21
- package/dist/node/index.cjs +1855 -577
- package/dist/node/index.cjs.map +27 -21
- package/dist/node/index.js +1855 -577
- package/dist/node/index.js.map +27 -21
- package/package.json +6 -6
package/dist/node/index.js
CHANGED
|
@@ -258,6 +258,7 @@ __export(exports_external, {
|
|
|
258
258
|
uuidv6: () => uuidv6,
|
|
259
259
|
uuidv4: () => uuidv4,
|
|
260
260
|
uuid: () => uuid2,
|
|
261
|
+
util: () => exports_util,
|
|
261
262
|
url: () => url,
|
|
262
263
|
uppercase: () => _uppercase,
|
|
263
264
|
unknown: () => unknown,
|
|
@@ -287,6 +288,10 @@ __export(exports_external, {
|
|
|
287
288
|
set: () => set,
|
|
288
289
|
safeParseAsync: () => safeParseAsync2,
|
|
289
290
|
safeParse: () => safeParse2,
|
|
291
|
+
safeEncodeAsync: () => safeEncodeAsync2,
|
|
292
|
+
safeEncode: () => safeEncode2,
|
|
293
|
+
safeDecodeAsync: () => safeDecodeAsync2,
|
|
294
|
+
safeDecode: () => safeDecode2,
|
|
290
295
|
registry: () => registry,
|
|
291
296
|
regexes: () => exports_regexes,
|
|
292
297
|
regex: () => _regex,
|
|
@@ -347,6 +352,10 @@ __export(exports_external, {
|
|
|
347
352
|
int: () => int,
|
|
348
353
|
instanceof: () => _instanceof,
|
|
349
354
|
includes: () => _includes,
|
|
355
|
+
httpUrl: () => httpUrl,
|
|
356
|
+
hostname: () => hostname2,
|
|
357
|
+
hex: () => hex2,
|
|
358
|
+
hash: () => hash,
|
|
350
359
|
guid: () => guid2,
|
|
351
360
|
gte: () => _gte,
|
|
352
361
|
gt: () => _gt,
|
|
@@ -360,10 +369,14 @@ __export(exports_external, {
|
|
|
360
369
|
file: () => file,
|
|
361
370
|
enum: () => _enum2,
|
|
362
371
|
endsWith: () => _endsWith,
|
|
372
|
+
encodeAsync: () => encodeAsync2,
|
|
373
|
+
encode: () => encode2,
|
|
363
374
|
emoji: () => emoji2,
|
|
364
375
|
email: () => email2,
|
|
365
376
|
e164: () => e1642,
|
|
366
377
|
discriminatedUnion: () => discriminatedUnion,
|
|
378
|
+
decodeAsync: () => decodeAsync2,
|
|
379
|
+
decode: () => decode2,
|
|
367
380
|
date: () => date3,
|
|
368
381
|
custom: () => custom,
|
|
369
382
|
cuid2: () => cuid22,
|
|
@@ -371,6 +384,7 @@ __export(exports_external, {
|
|
|
371
384
|
core: () => exports_core2,
|
|
372
385
|
config: () => config,
|
|
373
386
|
coerce: () => exports_coerce,
|
|
387
|
+
codec: () => codec,
|
|
374
388
|
clone: () => clone,
|
|
375
389
|
cidrv6: () => cidrv62,
|
|
376
390
|
cidrv4: () => cidrv42,
|
|
@@ -382,6 +396,7 @@ __export(exports_external, {
|
|
|
382
396
|
base64: () => base642,
|
|
383
397
|
array: () => array,
|
|
384
398
|
any: () => any,
|
|
399
|
+
_function: () => _function,
|
|
385
400
|
_default: () => _default2,
|
|
386
401
|
_ZodString: () => _ZodString,
|
|
387
402
|
ZodXID: () => ZodXID,
|
|
@@ -431,6 +446,8 @@ __export(exports_external, {
|
|
|
431
446
|
ZodIPv6: () => ZodIPv6,
|
|
432
447
|
ZodIPv4: () => ZodIPv4,
|
|
433
448
|
ZodGUID: () => ZodGUID,
|
|
449
|
+
ZodFunction: () => ZodFunction,
|
|
450
|
+
ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
|
|
434
451
|
ZodFile: () => ZodFile,
|
|
435
452
|
ZodError: () => ZodError,
|
|
436
453
|
ZodEnum: () => ZodEnum,
|
|
@@ -442,6 +459,7 @@ __export(exports_external, {
|
|
|
442
459
|
ZodDate: () => ZodDate,
|
|
443
460
|
ZodCustomStringFormat: () => ZodCustomStringFormat,
|
|
444
461
|
ZodCustom: () => ZodCustom,
|
|
462
|
+
ZodCodec: () => ZodCodec,
|
|
445
463
|
ZodCatch: () => ZodCatch,
|
|
446
464
|
ZodCUID2: () => ZodCUID2,
|
|
447
465
|
ZodCUID: () => ZodCUID,
|
|
@@ -471,6 +489,10 @@ __export(exports_core2, {
|
|
|
471
489
|
toDotPath: () => toDotPath,
|
|
472
490
|
safeParseAsync: () => safeParseAsync,
|
|
473
491
|
safeParse: () => safeParse,
|
|
492
|
+
safeEncodeAsync: () => safeEncodeAsync,
|
|
493
|
+
safeEncode: () => safeEncode,
|
|
494
|
+
safeDecodeAsync: () => safeDecodeAsync,
|
|
495
|
+
safeDecode: () => safeDecode,
|
|
474
496
|
registry: () => registry,
|
|
475
497
|
regexes: () => exports_regexes,
|
|
476
498
|
prettifyError: () => prettifyError,
|
|
@@ -482,9 +504,12 @@ __export(exports_core2, {
|
|
|
482
504
|
isValidBase64: () => isValidBase64,
|
|
483
505
|
globalRegistry: () => globalRegistry,
|
|
484
506
|
globalConfig: () => globalConfig,
|
|
485
|
-
function: () => _function,
|
|
486
507
|
formatError: () => formatError,
|
|
487
508
|
flattenError: () => flattenError,
|
|
509
|
+
encodeAsync: () => encodeAsync,
|
|
510
|
+
encode: () => encode,
|
|
511
|
+
decodeAsync: () => decodeAsync,
|
|
512
|
+
decode: () => decode,
|
|
488
513
|
config: () => config,
|
|
489
514
|
clone: () => clone,
|
|
490
515
|
_xid: () => _xid,
|
|
@@ -508,6 +533,7 @@ __export(exports_core2, {
|
|
|
508
533
|
_toLowerCase: () => _toLowerCase,
|
|
509
534
|
_templateLiteral: () => _templateLiteral,
|
|
510
535
|
_symbol: () => _symbol,
|
|
536
|
+
_superRefine: () => _superRefine,
|
|
511
537
|
_success: () => _success,
|
|
512
538
|
_stringbool: () => _stringbool,
|
|
513
539
|
_stringFormat: () => _stringFormat,
|
|
@@ -517,6 +543,10 @@ __export(exports_core2, {
|
|
|
517
543
|
_set: () => _set,
|
|
518
544
|
_safeParseAsync: () => _safeParseAsync,
|
|
519
545
|
_safeParse: () => _safeParse,
|
|
546
|
+
_safeEncodeAsync: () => _safeEncodeAsync,
|
|
547
|
+
_safeEncode: () => _safeEncode,
|
|
548
|
+
_safeDecodeAsync: () => _safeDecodeAsync,
|
|
549
|
+
_safeDecode: () => _safeDecode,
|
|
520
550
|
_regex: () => _regex,
|
|
521
551
|
_refine: () => _refine,
|
|
522
552
|
_record: () => _record,
|
|
@@ -577,11 +607,15 @@ __export(exports_core2, {
|
|
|
577
607
|
_file: () => _file,
|
|
578
608
|
_enum: () => _enum,
|
|
579
609
|
_endsWith: () => _endsWith,
|
|
610
|
+
_encodeAsync: () => _encodeAsync,
|
|
611
|
+
_encode: () => _encode,
|
|
580
612
|
_emoji: () => _emoji2,
|
|
581
613
|
_email: () => _email,
|
|
582
614
|
_e164: () => _e164,
|
|
583
615
|
_discriminatedUnion: () => _discriminatedUnion,
|
|
584
616
|
_default: () => _default,
|
|
617
|
+
_decodeAsync: () => _decodeAsync,
|
|
618
|
+
_decode: () => _decode,
|
|
585
619
|
_date: () => _date,
|
|
586
620
|
_custom: () => _custom,
|
|
587
621
|
_cuid2: () => _cuid2,
|
|
@@ -593,6 +627,7 @@ __export(exports_core2, {
|
|
|
593
627
|
_coercedBigint: () => _coercedBigint,
|
|
594
628
|
_cidrv6: () => _cidrv6,
|
|
595
629
|
_cidrv4: () => _cidrv4,
|
|
630
|
+
_check: () => _check,
|
|
596
631
|
_catch: () => _catch,
|
|
597
632
|
_boolean: () => _boolean,
|
|
598
633
|
_bigint: () => _bigint,
|
|
@@ -634,6 +669,7 @@ __export(exports_core2, {
|
|
|
634
669
|
$ZodPrefault: () => $ZodPrefault,
|
|
635
670
|
$ZodPipe: () => $ZodPipe,
|
|
636
671
|
$ZodOptional: () => $ZodOptional,
|
|
672
|
+
$ZodObjectJIT: () => $ZodObjectJIT,
|
|
637
673
|
$ZodObject: () => $ZodObject,
|
|
638
674
|
$ZodNumberFormat: () => $ZodNumberFormat,
|
|
639
675
|
$ZodNumber: () => $ZodNumber,
|
|
@@ -660,6 +696,7 @@ __export(exports_core2, {
|
|
|
660
696
|
$ZodFile: () => $ZodFile,
|
|
661
697
|
$ZodError: () => $ZodError,
|
|
662
698
|
$ZodEnum: () => $ZodEnum,
|
|
699
|
+
$ZodEncodeError: () => $ZodEncodeError,
|
|
663
700
|
$ZodEmoji: () => $ZodEmoji,
|
|
664
701
|
$ZodEmail: () => $ZodEmail,
|
|
665
702
|
$ZodE164: () => $ZodE164,
|
|
@@ -668,6 +705,7 @@ __export(exports_core2, {
|
|
|
668
705
|
$ZodDate: () => $ZodDate,
|
|
669
706
|
$ZodCustomStringFormat: () => $ZodCustomStringFormat,
|
|
670
707
|
$ZodCustom: () => $ZodCustom,
|
|
708
|
+
$ZodCodec: () => $ZodCodec,
|
|
671
709
|
$ZodCheckUpperCase: () => $ZodCheckUpperCase,
|
|
672
710
|
$ZodCheckStringFormat: () => $ZodCheckStringFormat,
|
|
673
711
|
$ZodCheckStartsWith: () => $ZodCheckStartsWith,
|
|
@@ -759,6 +797,13 @@ class $ZodAsyncError extends Error {
|
|
|
759
797
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
760
798
|
}
|
|
761
799
|
}
|
|
800
|
+
|
|
801
|
+
class $ZodEncodeError extends Error {
|
|
802
|
+
constructor(name) {
|
|
803
|
+
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
804
|
+
this.name = "ZodEncodeError";
|
|
805
|
+
}
|
|
806
|
+
}
|
|
762
807
|
var globalConfig = {};
|
|
763
808
|
function config(newConfig) {
|
|
764
809
|
if (newConfig)
|
|
@@ -769,7 +814,12 @@ function config(newConfig) {
|
|
|
769
814
|
var exports_util = {};
|
|
770
815
|
__export(exports_util, {
|
|
771
816
|
unwrapMessage: () => unwrapMessage,
|
|
817
|
+
uint8ArrayToHex: () => uint8ArrayToHex,
|
|
818
|
+
uint8ArrayToBase64url: () => uint8ArrayToBase64url,
|
|
819
|
+
uint8ArrayToBase64: () => uint8ArrayToBase64,
|
|
772
820
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
821
|
+
shallowClone: () => shallowClone,
|
|
822
|
+
safeExtend: () => safeExtend,
|
|
773
823
|
required: () => required,
|
|
774
824
|
randomString: () => randomString,
|
|
775
825
|
propertyKeyTypes: () => propertyKeyTypes,
|
|
@@ -780,15 +830,18 @@ __export(exports_util, {
|
|
|
780
830
|
partial: () => partial,
|
|
781
831
|
optionalKeys: () => optionalKeys,
|
|
782
832
|
omit: () => omit,
|
|
833
|
+
objectClone: () => objectClone,
|
|
783
834
|
numKeys: () => numKeys,
|
|
784
835
|
nullish: () => nullish,
|
|
785
836
|
normalizeParams: () => normalizeParams,
|
|
837
|
+
mergeDefs: () => mergeDefs,
|
|
786
838
|
merge: () => merge,
|
|
787
839
|
jsonStringifyReplacer: () => jsonStringifyReplacer,
|
|
788
840
|
joinValues: () => joinValues,
|
|
789
841
|
issue: () => issue,
|
|
790
842
|
isPlainObject: () => isPlainObject,
|
|
791
843
|
isObject: () => isObject,
|
|
844
|
+
hexToUint8Array: () => hexToUint8Array,
|
|
792
845
|
getSizableOrigin: () => getSizableOrigin,
|
|
793
846
|
getParsedType: () => getParsedType,
|
|
794
847
|
getLengthableOrigin: () => getLengthableOrigin,
|
|
@@ -801,11 +854,14 @@ __export(exports_util, {
|
|
|
801
854
|
esc: () => esc,
|
|
802
855
|
defineLazy: () => defineLazy,
|
|
803
856
|
createTransparentProxy: () => createTransparentProxy,
|
|
857
|
+
cloneDef: () => cloneDef,
|
|
804
858
|
clone: () => clone,
|
|
805
859
|
cleanRegex: () => cleanRegex,
|
|
806
860
|
cleanEnum: () => cleanEnum,
|
|
807
861
|
captureStackTrace: () => captureStackTrace,
|
|
808
862
|
cached: () => cached,
|
|
863
|
+
base64urlToUint8Array: () => base64urlToUint8Array,
|
|
864
|
+
base64ToUint8Array: () => base64ToUint8Array,
|
|
809
865
|
assignProp: () => assignProp,
|
|
810
866
|
assertNotEqual: () => assertNotEqual,
|
|
811
867
|
assertNever: () => assertNever,
|
|
@@ -865,22 +921,32 @@ function cleanRegex(source) {
|
|
|
865
921
|
}
|
|
866
922
|
function floatSafeRemainder(val, step) {
|
|
867
923
|
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
868
|
-
const
|
|
924
|
+
const stepString = step.toString();
|
|
925
|
+
let stepDecCount = (stepString.split(".")[1] || "").length;
|
|
926
|
+
if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
|
|
927
|
+
const match = stepString.match(/\d?e-(\d?)/);
|
|
928
|
+
if (match?.[1]) {
|
|
929
|
+
stepDecCount = Number.parseInt(match[1]);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
869
932
|
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
870
933
|
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
871
934
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
872
935
|
return valInt % stepInt / 10 ** decCount;
|
|
873
936
|
}
|
|
937
|
+
var EVALUATING = Symbol("evaluating");
|
|
874
938
|
function defineLazy(object, key, getter) {
|
|
875
|
-
|
|
939
|
+
let value = undefined;
|
|
876
940
|
Object.defineProperty(object, key, {
|
|
877
941
|
get() {
|
|
878
|
-
if (
|
|
879
|
-
|
|
880
|
-
object[key] = value;
|
|
881
|
-
return value;
|
|
942
|
+
if (value === EVALUATING) {
|
|
943
|
+
return;
|
|
882
944
|
}
|
|
883
|
-
|
|
945
|
+
if (value === undefined) {
|
|
946
|
+
value = EVALUATING;
|
|
947
|
+
value = getter();
|
|
948
|
+
}
|
|
949
|
+
return value;
|
|
884
950
|
},
|
|
885
951
|
set(v) {
|
|
886
952
|
Object.defineProperty(object, key, {
|
|
@@ -890,6 +956,9 @@ function defineLazy(object, key, getter) {
|
|
|
890
956
|
configurable: true
|
|
891
957
|
});
|
|
892
958
|
}
|
|
959
|
+
function objectClone(obj) {
|
|
960
|
+
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
961
|
+
}
|
|
893
962
|
function assignProp(target, prop, value) {
|
|
894
963
|
Object.defineProperty(target, prop, {
|
|
895
964
|
value,
|
|
@@ -898,6 +967,17 @@ function assignProp(target, prop, value) {
|
|
|
898
967
|
configurable: true
|
|
899
968
|
});
|
|
900
969
|
}
|
|
970
|
+
function mergeDefs(...defs) {
|
|
971
|
+
const mergedDescriptors = {};
|
|
972
|
+
for (const def of defs) {
|
|
973
|
+
const descriptors = Object.getOwnPropertyDescriptors(def);
|
|
974
|
+
Object.assign(mergedDescriptors, descriptors);
|
|
975
|
+
}
|
|
976
|
+
return Object.defineProperties({}, mergedDescriptors);
|
|
977
|
+
}
|
|
978
|
+
function cloneDef(schema) {
|
|
979
|
+
return mergeDefs(schema._zod.def);
|
|
980
|
+
}
|
|
901
981
|
function getElementAtPath(obj, path) {
|
|
902
982
|
if (!path)
|
|
903
983
|
return obj;
|
|
@@ -925,7 +1005,7 @@ function randomString(length = 10) {
|
|
|
925
1005
|
function esc(str) {
|
|
926
1006
|
return JSON.stringify(str);
|
|
927
1007
|
}
|
|
928
|
-
var captureStackTrace =
|
|
1008
|
+
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
|
|
929
1009
|
function isObject(data) {
|
|
930
1010
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
931
1011
|
}
|
|
@@ -955,6 +1035,13 @@ function isPlainObject(o) {
|
|
|
955
1035
|
}
|
|
956
1036
|
return true;
|
|
957
1037
|
}
|
|
1038
|
+
function shallowClone(o) {
|
|
1039
|
+
if (isPlainObject(o))
|
|
1040
|
+
return { ...o };
|
|
1041
|
+
if (Array.isArray(o))
|
|
1042
|
+
return [...o];
|
|
1043
|
+
return o;
|
|
1044
|
+
}
|
|
958
1045
|
function numKeys(data) {
|
|
959
1046
|
let keyCount = 0;
|
|
960
1047
|
for (const key in data) {
|
|
@@ -1092,43 +1179,68 @@ var BIGINT_FORMAT_RANGES = {
|
|
|
1092
1179
|
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
1093
1180
|
};
|
|
1094
1181
|
function pick(schema, mask) {
|
|
1095
|
-
const newShape = {};
|
|
1096
1182
|
const currDef = schema._zod.def;
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1183
|
+
const def = mergeDefs(schema._zod.def, {
|
|
1184
|
+
get shape() {
|
|
1185
|
+
const newShape = {};
|
|
1186
|
+
for (const key in mask) {
|
|
1187
|
+
if (!(key in currDef.shape)) {
|
|
1188
|
+
throw new Error(`Unrecognized key: "${key}"`);
|
|
1189
|
+
}
|
|
1190
|
+
if (!mask[key])
|
|
1191
|
+
continue;
|
|
1192
|
+
newShape[key] = currDef.shape[key];
|
|
1193
|
+
}
|
|
1194
|
+
assignProp(this, "shape", newShape);
|
|
1195
|
+
return newShape;
|
|
1196
|
+
},
|
|
1108
1197
|
checks: []
|
|
1109
1198
|
});
|
|
1199
|
+
return clone(schema, def);
|
|
1110
1200
|
}
|
|
1111
1201
|
function omit(schema, mask) {
|
|
1112
|
-
const newShape = { ...schema._zod.def.shape };
|
|
1113
1202
|
const currDef = schema._zod.def;
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1203
|
+
const def = mergeDefs(schema._zod.def, {
|
|
1204
|
+
get shape() {
|
|
1205
|
+
const newShape = { ...schema._zod.def.shape };
|
|
1206
|
+
for (const key in mask) {
|
|
1207
|
+
if (!(key in currDef.shape)) {
|
|
1208
|
+
throw new Error(`Unrecognized key: "${key}"`);
|
|
1209
|
+
}
|
|
1210
|
+
if (!mask[key])
|
|
1211
|
+
continue;
|
|
1212
|
+
delete newShape[key];
|
|
1213
|
+
}
|
|
1214
|
+
assignProp(this, "shape", newShape);
|
|
1215
|
+
return newShape;
|
|
1216
|
+
},
|
|
1125
1217
|
checks: []
|
|
1126
1218
|
});
|
|
1219
|
+
return clone(schema, def);
|
|
1127
1220
|
}
|
|
1128
1221
|
function extend(schema, shape) {
|
|
1129
1222
|
if (!isPlainObject(shape)) {
|
|
1130
1223
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
1131
1224
|
}
|
|
1225
|
+
const checks = schema._zod.def.checks;
|
|
1226
|
+
const hasChecks = checks && checks.length > 0;
|
|
1227
|
+
if (hasChecks) {
|
|
1228
|
+
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
1229
|
+
}
|
|
1230
|
+
const def = mergeDefs(schema._zod.def, {
|
|
1231
|
+
get shape() {
|
|
1232
|
+
const _shape = { ...schema._zod.def.shape, ...shape };
|
|
1233
|
+
assignProp(this, "shape", _shape);
|
|
1234
|
+
return _shape;
|
|
1235
|
+
},
|
|
1236
|
+
checks: []
|
|
1237
|
+
});
|
|
1238
|
+
return clone(schema, def);
|
|
1239
|
+
}
|
|
1240
|
+
function safeExtend(schema, shape) {
|
|
1241
|
+
if (!isPlainObject(shape)) {
|
|
1242
|
+
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
1243
|
+
}
|
|
1132
1244
|
const def = {
|
|
1133
1245
|
...schema._zod.def,
|
|
1134
1246
|
get shape() {
|
|
@@ -1136,84 +1248,95 @@ function extend(schema, shape) {
|
|
|
1136
1248
|
assignProp(this, "shape", _shape);
|
|
1137
1249
|
return _shape;
|
|
1138
1250
|
},
|
|
1139
|
-
checks:
|
|
1251
|
+
checks: schema._zod.def.checks
|
|
1140
1252
|
};
|
|
1141
1253
|
return clone(schema, def);
|
|
1142
1254
|
}
|
|
1143
1255
|
function merge(a, b) {
|
|
1144
|
-
|
|
1145
|
-
...a._zod.def,
|
|
1256
|
+
const def = mergeDefs(a._zod.def, {
|
|
1146
1257
|
get shape() {
|
|
1147
1258
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
1148
1259
|
assignProp(this, "shape", _shape);
|
|
1149
1260
|
return _shape;
|
|
1150
1261
|
},
|
|
1151
|
-
catchall
|
|
1262
|
+
get catchall() {
|
|
1263
|
+
return b._zod.def.catchall;
|
|
1264
|
+
},
|
|
1152
1265
|
checks: []
|
|
1153
1266
|
});
|
|
1267
|
+
return clone(a, def);
|
|
1154
1268
|
}
|
|
1155
1269
|
function partial(Class, schema, mask) {
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1270
|
+
const def = mergeDefs(schema._zod.def, {
|
|
1271
|
+
get shape() {
|
|
1272
|
+
const oldShape = schema._zod.def.shape;
|
|
1273
|
+
const shape = { ...oldShape };
|
|
1274
|
+
if (mask) {
|
|
1275
|
+
for (const key in mask) {
|
|
1276
|
+
if (!(key in oldShape)) {
|
|
1277
|
+
throw new Error(`Unrecognized key: "${key}"`);
|
|
1278
|
+
}
|
|
1279
|
+
if (!mask[key])
|
|
1280
|
+
continue;
|
|
1281
|
+
shape[key] = Class ? new Class({
|
|
1282
|
+
type: "optional",
|
|
1283
|
+
innerType: oldShape[key]
|
|
1284
|
+
}) : oldShape[key];
|
|
1285
|
+
}
|
|
1286
|
+
} else {
|
|
1287
|
+
for (const key in oldShape) {
|
|
1288
|
+
shape[key] = Class ? new Class({
|
|
1289
|
+
type: "optional",
|
|
1290
|
+
innerType: oldShape[key]
|
|
1291
|
+
}) : oldShape[key];
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
assignProp(this, "shape", shape);
|
|
1295
|
+
return shape;
|
|
1296
|
+
},
|
|
1181
1297
|
checks: []
|
|
1182
1298
|
});
|
|
1299
|
+
return clone(schema, def);
|
|
1183
1300
|
}
|
|
1184
1301
|
function required(Class, schema, mask) {
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1302
|
+
const def = mergeDefs(schema._zod.def, {
|
|
1303
|
+
get shape() {
|
|
1304
|
+
const oldShape = schema._zod.def.shape;
|
|
1305
|
+
const shape = { ...oldShape };
|
|
1306
|
+
if (mask) {
|
|
1307
|
+
for (const key in mask) {
|
|
1308
|
+
if (!(key in shape)) {
|
|
1309
|
+
throw new Error(`Unrecognized key: "${key}"`);
|
|
1310
|
+
}
|
|
1311
|
+
if (!mask[key])
|
|
1312
|
+
continue;
|
|
1313
|
+
shape[key] = new Class({
|
|
1314
|
+
type: "nonoptional",
|
|
1315
|
+
innerType: oldShape[key]
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
} else {
|
|
1319
|
+
for (const key in oldShape) {
|
|
1320
|
+
shape[key] = new Class({
|
|
1321
|
+
type: "nonoptional",
|
|
1322
|
+
innerType: oldShape[key]
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
assignProp(this, "shape", shape);
|
|
1327
|
+
return shape;
|
|
1328
|
+
},
|
|
1210
1329
|
checks: []
|
|
1211
1330
|
});
|
|
1331
|
+
return clone(schema, def);
|
|
1212
1332
|
}
|
|
1213
1333
|
function aborted(x, startIndex = 0) {
|
|
1334
|
+
if (x.aborted === true)
|
|
1335
|
+
return true;
|
|
1214
1336
|
for (let i = startIndex;i < x.issues.length; i++) {
|
|
1215
|
-
if (x.issues[i]?.continue !== true)
|
|
1337
|
+
if (x.issues[i]?.continue !== true) {
|
|
1216
1338
|
return true;
|
|
1339
|
+
}
|
|
1217
1340
|
}
|
|
1218
1341
|
return false;
|
|
1219
1342
|
}
|
|
@@ -1274,6 +1397,43 @@ function cleanEnum(obj) {
|
|
|
1274
1397
|
return Number.isNaN(Number.parseInt(k, 10));
|
|
1275
1398
|
}).map((el) => el[1]);
|
|
1276
1399
|
}
|
|
1400
|
+
function base64ToUint8Array(base64) {
|
|
1401
|
+
const binaryString = atob(base64);
|
|
1402
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
1403
|
+
for (let i = 0;i < binaryString.length; i++) {
|
|
1404
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
1405
|
+
}
|
|
1406
|
+
return bytes;
|
|
1407
|
+
}
|
|
1408
|
+
function uint8ArrayToBase64(bytes) {
|
|
1409
|
+
let binaryString = "";
|
|
1410
|
+
for (let i = 0;i < bytes.length; i++) {
|
|
1411
|
+
binaryString += String.fromCharCode(bytes[i]);
|
|
1412
|
+
}
|
|
1413
|
+
return btoa(binaryString);
|
|
1414
|
+
}
|
|
1415
|
+
function base64urlToUint8Array(base64url) {
|
|
1416
|
+
const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
|
|
1417
|
+
const padding = "=".repeat((4 - base64.length % 4) % 4);
|
|
1418
|
+
return base64ToUint8Array(base64 + padding);
|
|
1419
|
+
}
|
|
1420
|
+
function uint8ArrayToBase64url(bytes) {
|
|
1421
|
+
return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
1422
|
+
}
|
|
1423
|
+
function hexToUint8Array(hex) {
|
|
1424
|
+
const cleanHex = hex.replace(/^0x/, "");
|
|
1425
|
+
if (cleanHex.length % 2 !== 0) {
|
|
1426
|
+
throw new Error("Invalid hex string length");
|
|
1427
|
+
}
|
|
1428
|
+
const bytes = new Uint8Array(cleanHex.length / 2);
|
|
1429
|
+
for (let i = 0;i < cleanHex.length; i += 2) {
|
|
1430
|
+
bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);
|
|
1431
|
+
}
|
|
1432
|
+
return bytes;
|
|
1433
|
+
}
|
|
1434
|
+
function uint8ArrayToHex(bytes) {
|
|
1435
|
+
return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
1436
|
+
}
|
|
1277
1437
|
|
|
1278
1438
|
class Class {
|
|
1279
1439
|
constructor(..._args) {}
|
|
@@ -1290,12 +1450,7 @@ var initializer = (inst, def) => {
|
|
|
1290
1450
|
value: def,
|
|
1291
1451
|
enumerable: false
|
|
1292
1452
|
});
|
|
1293
|
-
|
|
1294
|
-
get() {
|
|
1295
|
-
return JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
1296
|
-
},
|
|
1297
|
-
enumerable: true
|
|
1298
|
-
});
|
|
1453
|
+
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
1299
1454
|
Object.defineProperty(inst, "toString", {
|
|
1300
1455
|
value: () => inst.message,
|
|
1301
1456
|
enumerable: false
|
|
@@ -1397,8 +1552,9 @@ function treeifyError(error, _mapper) {
|
|
|
1397
1552
|
processError(error);
|
|
1398
1553
|
return result;
|
|
1399
1554
|
}
|
|
1400
|
-
function toDotPath(
|
|
1555
|
+
function toDotPath(_path) {
|
|
1401
1556
|
const segs = [];
|
|
1557
|
+
const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
1402
1558
|
for (const seg of path) {
|
|
1403
1559
|
if (typeof seg === "number")
|
|
1404
1560
|
segs.push(`[${seg}]`);
|
|
@@ -1416,7 +1572,7 @@ function toDotPath(path) {
|
|
|
1416
1572
|
}
|
|
1417
1573
|
function prettifyError(error) {
|
|
1418
1574
|
const lines = [];
|
|
1419
|
-
const issues = [...error.issues].sort((a, b) => a.path.length - b.path.length);
|
|
1575
|
+
const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
1420
1576
|
for (const issue2 of issues) {
|
|
1421
1577
|
lines.push(`✖ ${issue2.message}`);
|
|
1422
1578
|
if (issue2.path?.length)
|
|
@@ -1477,6 +1633,42 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1477
1633
|
} : { success: true, data: result.value };
|
|
1478
1634
|
};
|
|
1479
1635
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1636
|
+
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
1637
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1638
|
+
return _parse(_Err)(schema, value, ctx);
|
|
1639
|
+
};
|
|
1640
|
+
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
1641
|
+
var _decode = (_Err) => (schema, value, _ctx) => {
|
|
1642
|
+
return _parse(_Err)(schema, value, _ctx);
|
|
1643
|
+
};
|
|
1644
|
+
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
1645
|
+
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1646
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1647
|
+
return _parseAsync(_Err)(schema, value, ctx);
|
|
1648
|
+
};
|
|
1649
|
+
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
1650
|
+
var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1651
|
+
return _parseAsync(_Err)(schema, value, _ctx);
|
|
1652
|
+
};
|
|
1653
|
+
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
1654
|
+
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1655
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1656
|
+
return _safeParse(_Err)(schema, value, ctx);
|
|
1657
|
+
};
|
|
1658
|
+
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
1659
|
+
var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
1660
|
+
return _safeParse(_Err)(schema, value, _ctx);
|
|
1661
|
+
};
|
|
1662
|
+
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1663
|
+
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1664
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1665
|
+
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1666
|
+
};
|
|
1667
|
+
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
1668
|
+
var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1669
|
+
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
1670
|
+
};
|
|
1671
|
+
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1480
1672
|
// ../../node_modules/zod/v4/core/regexes.js
|
|
1481
1673
|
var exports_regexes = {};
|
|
1482
1674
|
__export(exports_regexes, {
|
|
@@ -1491,17 +1683,34 @@ __export(exports_regexes, {
|
|
|
1491
1683
|
ulid: () => ulid,
|
|
1492
1684
|
time: () => time,
|
|
1493
1685
|
string: () => string,
|
|
1686
|
+
sha512_hex: () => sha512_hex,
|
|
1687
|
+
sha512_base64url: () => sha512_base64url,
|
|
1688
|
+
sha512_base64: () => sha512_base64,
|
|
1689
|
+
sha384_hex: () => sha384_hex,
|
|
1690
|
+
sha384_base64url: () => sha384_base64url,
|
|
1691
|
+
sha384_base64: () => sha384_base64,
|
|
1692
|
+
sha256_hex: () => sha256_hex,
|
|
1693
|
+
sha256_base64url: () => sha256_base64url,
|
|
1694
|
+
sha256_base64: () => sha256_base64,
|
|
1695
|
+
sha1_hex: () => sha1_hex,
|
|
1696
|
+
sha1_base64url: () => sha1_base64url,
|
|
1697
|
+
sha1_base64: () => sha1_base64,
|
|
1494
1698
|
rfc5322Email: () => rfc5322Email,
|
|
1495
1699
|
number: () => number,
|
|
1496
1700
|
null: () => _null,
|
|
1497
1701
|
nanoid: () => nanoid,
|
|
1702
|
+
md5_hex: () => md5_hex,
|
|
1703
|
+
md5_base64url: () => md5_base64url,
|
|
1704
|
+
md5_base64: () => md5_base64,
|
|
1498
1705
|
lowercase: () => lowercase,
|
|
1499
1706
|
ksuid: () => ksuid,
|
|
1500
1707
|
ipv6: () => ipv6,
|
|
1501
1708
|
ipv4: () => ipv4,
|
|
1502
1709
|
integer: () => integer,
|
|
1710
|
+
idnEmail: () => idnEmail,
|
|
1503
1711
|
html5Email: () => html5Email,
|
|
1504
1712
|
hostname: () => hostname,
|
|
1713
|
+
hex: () => hex,
|
|
1505
1714
|
guid: () => guid,
|
|
1506
1715
|
extendedDuration: () => extendedDuration,
|
|
1507
1716
|
emoji: () => emoji,
|
|
@@ -1519,8 +1728,7 @@ __export(exports_regexes, {
|
|
|
1519
1728
|
boolean: () => boolean,
|
|
1520
1729
|
bigint: () => bigint,
|
|
1521
1730
|
base64url: () => base64url,
|
|
1522
|
-
base64: () => base64
|
|
1523
|
-
_emoji: () => _emoji
|
|
1731
|
+
base64: () => base64
|
|
1524
1732
|
});
|
|
1525
1733
|
var cuid = /^[cC][^\s-]{8,}$/;
|
|
1526
1734
|
var cuid2 = /^[0-9a-z]+$/;
|
|
@@ -1533,7 +1741,7 @@ var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(
|
|
|
1533
1741
|
var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
1534
1742
|
var uuid = (version) => {
|
|
1535
1743
|
if (!version)
|
|
1536
|
-
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;
|
|
1744
|
+
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
1537
1745
|
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
1538
1746
|
};
|
|
1539
1747
|
var uuid4 = /* @__PURE__ */ uuid(4);
|
|
@@ -1543,18 +1751,19 @@ var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A
|
|
|
1543
1751
|
var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
1544
1752
|
var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
1545
1753
|
var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
|
|
1754
|
+
var idnEmail = unicodeEmail;
|
|
1546
1755
|
var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
1547
1756
|
var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
1548
1757
|
function emoji() {
|
|
1549
1758
|
return new RegExp(_emoji, "u");
|
|
1550
1759
|
}
|
|
1551
1760
|
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1552
|
-
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}
|
|
1761
|
+
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
1553
1762
|
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
1554
1763
|
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
1555
1764
|
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
1556
1765
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
1557
|
-
var hostname = /^([a-zA-Z0-9-]
|
|
1766
|
+
var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
1558
1767
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
1559
1768
|
var e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
1560
1769
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
@@ -1573,7 +1782,7 @@ function datetime(args) {
|
|
|
1573
1782
|
if (args.local)
|
|
1574
1783
|
opts.push("");
|
|
1575
1784
|
if (args.offset)
|
|
1576
|
-
opts.push(`([+-]\\d
|
|
1785
|
+
opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
|
|
1577
1786
|
const timeRegex = `${time2}(?:${opts.join("|")})`;
|
|
1578
1787
|
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
1579
1788
|
}
|
|
@@ -1581,14 +1790,36 @@ var string = (params) => {
|
|
|
1581
1790
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
1582
1791
|
return new RegExp(`^${regex}$`);
|
|
1583
1792
|
};
|
|
1584
|
-
var bigint =
|
|
1585
|
-
var integer =
|
|
1586
|
-
var number = /^-?\d+(?:\.\d+)
|
|
1587
|
-
var boolean =
|
|
1588
|
-
var _null =
|
|
1589
|
-
var _undefined =
|
|
1793
|
+
var bigint = /^-?\d+n?$/;
|
|
1794
|
+
var integer = /^-?\d+$/;
|
|
1795
|
+
var number = /^-?\d+(?:\.\d+)?/;
|
|
1796
|
+
var boolean = /^(?:true|false)$/i;
|
|
1797
|
+
var _null = /^null$/i;
|
|
1798
|
+
var _undefined = /^undefined$/i;
|
|
1590
1799
|
var lowercase = /^[^A-Z]*$/;
|
|
1591
1800
|
var uppercase = /^[^a-z]*$/;
|
|
1801
|
+
var hex = /^[0-9a-fA-F]*$/;
|
|
1802
|
+
function fixedBase64(bodyLength, padding) {
|
|
1803
|
+
return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);
|
|
1804
|
+
}
|
|
1805
|
+
function fixedBase64url(length) {
|
|
1806
|
+
return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
|
|
1807
|
+
}
|
|
1808
|
+
var md5_hex = /^[0-9a-fA-F]{32}$/;
|
|
1809
|
+
var md5_base64 = /* @__PURE__ */ fixedBase64(22, "==");
|
|
1810
|
+
var md5_base64url = /* @__PURE__ */ fixedBase64url(22);
|
|
1811
|
+
var sha1_hex = /^[0-9a-fA-F]{40}$/;
|
|
1812
|
+
var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "=");
|
|
1813
|
+
var sha1_base64url = /* @__PURE__ */ fixedBase64url(27);
|
|
1814
|
+
var sha256_hex = /^[0-9a-fA-F]{64}$/;
|
|
1815
|
+
var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "=");
|
|
1816
|
+
var sha256_base64url = /* @__PURE__ */ fixedBase64url(43);
|
|
1817
|
+
var sha384_hex = /^[0-9a-fA-F]{96}$/;
|
|
1818
|
+
var sha384_base64 = /* @__PURE__ */ fixedBase64(64, "");
|
|
1819
|
+
var sha384_base64url = /* @__PURE__ */ fixedBase64url(64);
|
|
1820
|
+
var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
1821
|
+
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
1822
|
+
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
1592
1823
|
|
|
1593
1824
|
// ../../node_modules/zod/v4/core/checks.js
|
|
1594
1825
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
@@ -1702,6 +1933,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1702
1933
|
expected: origin,
|
|
1703
1934
|
format: def.format,
|
|
1704
1935
|
code: "invalid_type",
|
|
1936
|
+
continue: false,
|
|
1705
1937
|
input,
|
|
1706
1938
|
inst
|
|
1707
1939
|
});
|
|
@@ -1808,6 +2040,7 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1808
2040
|
origin: getSizableOrigin(input),
|
|
1809
2041
|
code: "too_big",
|
|
1810
2042
|
maximum: def.maximum,
|
|
2043
|
+
inclusive: true,
|
|
1811
2044
|
input,
|
|
1812
2045
|
inst,
|
|
1813
2046
|
continue: !def.abort
|
|
@@ -1835,6 +2068,7 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1835
2068
|
origin: getSizableOrigin(input),
|
|
1836
2069
|
code: "too_small",
|
|
1837
2070
|
minimum: def.minimum,
|
|
2071
|
+
inclusive: true,
|
|
1838
2072
|
input,
|
|
1839
2073
|
inst,
|
|
1840
2074
|
continue: !def.abort
|
|
@@ -2116,7 +2350,8 @@ var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst,
|
|
|
2116
2350
|
code: "invalid_value",
|
|
2117
2351
|
values: def.mime,
|
|
2118
2352
|
input: payload.value.type,
|
|
2119
|
-
inst
|
|
2353
|
+
inst,
|
|
2354
|
+
continue: !def.abort
|
|
2120
2355
|
});
|
|
2121
2356
|
};
|
|
2122
2357
|
});
|
|
@@ -2168,8 +2403,8 @@ class Doc {
|
|
|
2168
2403
|
// ../../node_modules/zod/v4/core/versions.js
|
|
2169
2404
|
var version = {
|
|
2170
2405
|
major: 4,
|
|
2171
|
-
minor:
|
|
2172
|
-
patch:
|
|
2406
|
+
minor: 1,
|
|
2407
|
+
patch: 11
|
|
2173
2408
|
};
|
|
2174
2409
|
|
|
2175
2410
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
@@ -2234,7 +2469,32 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2234
2469
|
}
|
|
2235
2470
|
return payload;
|
|
2236
2471
|
};
|
|
2472
|
+
const handleCanaryResult = (canary, payload, ctx) => {
|
|
2473
|
+
if (aborted(canary)) {
|
|
2474
|
+
canary.aborted = true;
|
|
2475
|
+
return canary;
|
|
2476
|
+
}
|
|
2477
|
+
const checkResult = runChecks(payload, checks, ctx);
|
|
2478
|
+
if (checkResult instanceof Promise) {
|
|
2479
|
+
if (ctx.async === false)
|
|
2480
|
+
throw new $ZodAsyncError;
|
|
2481
|
+
return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
|
|
2482
|
+
}
|
|
2483
|
+
return inst._zod.parse(checkResult, ctx);
|
|
2484
|
+
};
|
|
2237
2485
|
inst._zod.run = (payload, ctx) => {
|
|
2486
|
+
if (ctx.skipChecks) {
|
|
2487
|
+
return inst._zod.parse(payload, ctx);
|
|
2488
|
+
}
|
|
2489
|
+
if (ctx.direction === "backward") {
|
|
2490
|
+
const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
|
|
2491
|
+
if (canary instanceof Promise) {
|
|
2492
|
+
return canary.then((canary2) => {
|
|
2493
|
+
return handleCanaryResult(canary2, payload, ctx);
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2496
|
+
return handleCanaryResult(canary, payload, ctx);
|
|
2497
|
+
}
|
|
2238
2498
|
const result = inst._zod.parse(payload, ctx);
|
|
2239
2499
|
if (result instanceof Promise) {
|
|
2240
2500
|
if (ctx.async === false)
|
|
@@ -2312,9 +2572,8 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2312
2572
|
$ZodStringFormat.init(inst, def);
|
|
2313
2573
|
inst._zod.check = (payload) => {
|
|
2314
2574
|
try {
|
|
2315
|
-
const
|
|
2316
|
-
const url = new URL(
|
|
2317
|
-
const href = url.href;
|
|
2575
|
+
const trimmed = payload.value.trim();
|
|
2576
|
+
const url = new URL(trimmed);
|
|
2318
2577
|
if (def.hostname) {
|
|
2319
2578
|
def.hostname.lastIndex = 0;
|
|
2320
2579
|
if (!def.hostname.test(url.hostname)) {
|
|
@@ -2343,10 +2602,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2343
2602
|
});
|
|
2344
2603
|
}
|
|
2345
2604
|
}
|
|
2346
|
-
if (
|
|
2347
|
-
payload.value = href
|
|
2605
|
+
if (def.normalize) {
|
|
2606
|
+
payload.value = url.href;
|
|
2348
2607
|
} else {
|
|
2349
|
-
payload.value =
|
|
2608
|
+
payload.value = trimmed;
|
|
2350
2609
|
}
|
|
2351
2610
|
return;
|
|
2352
2611
|
} catch (_) {
|
|
@@ -2441,8 +2700,11 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
2441
2700
|
def.pattern ?? (def.pattern = cidrv6);
|
|
2442
2701
|
$ZodStringFormat.init(inst, def);
|
|
2443
2702
|
inst._zod.check = (payload) => {
|
|
2444
|
-
const
|
|
2703
|
+
const parts = payload.value.split("/");
|
|
2445
2704
|
try {
|
|
2705
|
+
if (parts.length !== 2)
|
|
2706
|
+
throw new Error;
|
|
2707
|
+
const [address, prefix] = parts;
|
|
2446
2708
|
if (!prefix)
|
|
2447
2709
|
throw new Error;
|
|
2448
2710
|
const prefixNum = Number(prefix);
|
|
@@ -2787,48 +3049,83 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
2787
3049
|
return payload;
|
|
2788
3050
|
};
|
|
2789
3051
|
});
|
|
2790
|
-
function
|
|
3052
|
+
function handlePropertyResult(result, final, key, input) {
|
|
2791
3053
|
if (result.issues.length) {
|
|
2792
3054
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
2793
3055
|
}
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
function handleOptionalObjectResult(result, final, key, input) {
|
|
2797
|
-
if (result.issues.length) {
|
|
2798
|
-
if (input[key] === undefined) {
|
|
2799
|
-
if (key in input) {
|
|
2800
|
-
final.value[key] = undefined;
|
|
2801
|
-
} else {
|
|
2802
|
-
final.value[key] = result.value;
|
|
2803
|
-
}
|
|
2804
|
-
} else {
|
|
2805
|
-
final.issues.push(...prefixIssues(key, result.issues));
|
|
2806
|
-
}
|
|
2807
|
-
} else if (result.value === undefined) {
|
|
2808
|
-
if (key in input)
|
|
3056
|
+
if (result.value === undefined) {
|
|
3057
|
+
if (key in input) {
|
|
2809
3058
|
final.value[key] = undefined;
|
|
3059
|
+
}
|
|
2810
3060
|
} else {
|
|
2811
3061
|
final.value[key] = result.value;
|
|
2812
3062
|
}
|
|
2813
3063
|
}
|
|
3064
|
+
function normalizeDef(def) {
|
|
3065
|
+
const keys = Object.keys(def.shape);
|
|
3066
|
+
for (const k of keys) {
|
|
3067
|
+
if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
|
|
3068
|
+
throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
const okeys = optionalKeys(def.shape);
|
|
3072
|
+
return {
|
|
3073
|
+
...def,
|
|
3074
|
+
keys,
|
|
3075
|
+
keySet: new Set(keys),
|
|
3076
|
+
numKeys: keys.length,
|
|
3077
|
+
optionalKeys: new Set(okeys)
|
|
3078
|
+
};
|
|
3079
|
+
}
|
|
3080
|
+
function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
3081
|
+
const unrecognized = [];
|
|
3082
|
+
const keySet = def.keySet;
|
|
3083
|
+
const _catchall = def.catchall._zod;
|
|
3084
|
+
const t = _catchall.def.type;
|
|
3085
|
+
for (const key of Object.keys(input)) {
|
|
3086
|
+
if (keySet.has(key))
|
|
3087
|
+
continue;
|
|
3088
|
+
if (t === "never") {
|
|
3089
|
+
unrecognized.push(key);
|
|
3090
|
+
continue;
|
|
3091
|
+
}
|
|
3092
|
+
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
3093
|
+
if (r instanceof Promise) {
|
|
3094
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
|
|
3095
|
+
} else {
|
|
3096
|
+
handlePropertyResult(r, payload, key, input);
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
if (unrecognized.length) {
|
|
3100
|
+
payload.issues.push({
|
|
3101
|
+
code: "unrecognized_keys",
|
|
3102
|
+
keys: unrecognized,
|
|
3103
|
+
input,
|
|
3104
|
+
inst
|
|
3105
|
+
});
|
|
3106
|
+
}
|
|
3107
|
+
if (!proms.length)
|
|
3108
|
+
return payload;
|
|
3109
|
+
return Promise.all(proms).then(() => {
|
|
3110
|
+
return payload;
|
|
3111
|
+
});
|
|
3112
|
+
}
|
|
2814
3113
|
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
2815
3114
|
$ZodType.init(inst, def);
|
|
2816
|
-
const
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
3115
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
3116
|
+
if (!desc?.get) {
|
|
3117
|
+
const sh = def.shape;
|
|
3118
|
+
Object.defineProperty(def, "shape", {
|
|
3119
|
+
get: () => {
|
|
3120
|
+
const newSh = { ...sh };
|
|
3121
|
+
Object.defineProperty(def, "shape", {
|
|
3122
|
+
value: newSh
|
|
3123
|
+
});
|
|
3124
|
+
return newSh;
|
|
2821
3125
|
}
|
|
2822
|
-
}
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
shape: def.shape,
|
|
2826
|
-
keys,
|
|
2827
|
-
keySet: new Set(keys),
|
|
2828
|
-
numKeys: keys.length,
|
|
2829
|
-
optionalKeys: new Set(okeys)
|
|
2830
|
-
};
|
|
2831
|
-
});
|
|
3126
|
+
});
|
|
3127
|
+
}
|
|
3128
|
+
const _normalized = cached(() => normalizeDef(def));
|
|
2832
3129
|
defineLazy(inst._zod, "propValues", () => {
|
|
2833
3130
|
const shape = def.shape;
|
|
2834
3131
|
const propValues = {};
|
|
@@ -2842,6 +3139,43 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2842
3139
|
}
|
|
2843
3140
|
return propValues;
|
|
2844
3141
|
});
|
|
3142
|
+
const isObject2 = isObject;
|
|
3143
|
+
const catchall = def.catchall;
|
|
3144
|
+
let value;
|
|
3145
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3146
|
+
value ?? (value = _normalized.value);
|
|
3147
|
+
const input = payload.value;
|
|
3148
|
+
if (!isObject2(input)) {
|
|
3149
|
+
payload.issues.push({
|
|
3150
|
+
expected: "object",
|
|
3151
|
+
code: "invalid_type",
|
|
3152
|
+
input,
|
|
3153
|
+
inst
|
|
3154
|
+
});
|
|
3155
|
+
return payload;
|
|
3156
|
+
}
|
|
3157
|
+
payload.value = {};
|
|
3158
|
+
const proms = [];
|
|
3159
|
+
const shape = value.shape;
|
|
3160
|
+
for (const key of value.keys) {
|
|
3161
|
+
const el = shape[key];
|
|
3162
|
+
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3163
|
+
if (r instanceof Promise) {
|
|
3164
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
|
|
3165
|
+
} else {
|
|
3166
|
+
handlePropertyResult(r, payload, key, input);
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
if (!catchall) {
|
|
3170
|
+
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
3171
|
+
}
|
|
3172
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
3173
|
+
};
|
|
3174
|
+
});
|
|
3175
|
+
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
3176
|
+
$ZodObject.init(inst, def);
|
|
3177
|
+
const superParse = inst._zod.parse;
|
|
3178
|
+
const _normalized = cached(() => normalizeDef(def));
|
|
2845
3179
|
const generateFastpass = (shape) => {
|
|
2846
3180
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
2847
3181
|
const normalized = _normalized.value;
|
|
@@ -2855,42 +3189,29 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2855
3189
|
for (const key of normalized.keys) {
|
|
2856
3190
|
ids[key] = `key_${counter++}`;
|
|
2857
3191
|
}
|
|
2858
|
-
doc.write(`const newResult = {}
|
|
3192
|
+
doc.write(`const newResult = {};`);
|
|
2859
3193
|
for (const key of normalized.keys) {
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
doc.write(`
|
|
3194
|
+
const id = ids[key];
|
|
3195
|
+
const k = esc(key);
|
|
3196
|
+
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3197
|
+
doc.write(`
|
|
2865
3198
|
if (${id}.issues.length) {
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
);
|
|
3199
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3200
|
+
...iss,
|
|
3201
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3202
|
+
})));
|
|
3203
|
+
}
|
|
3204
|
+
|
|
3205
|
+
|
|
3206
|
+
if (${id}.value === undefined) {
|
|
3207
|
+
if (${k} in input) {
|
|
3208
|
+
newResult[${k}] = undefined;
|
|
2877
3209
|
}
|
|
2878
|
-
} else if (${id}.value === undefined) {
|
|
2879
|
-
if (${k} in input) newResult[${k}] = undefined;
|
|
2880
3210
|
} else {
|
|
2881
3211
|
newResult[${k}] = ${id}.value;
|
|
2882
3212
|
}
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
const id = ids[key];
|
|
2886
|
-
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2887
|
-
doc.write(`
|
|
2888
|
-
if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
2889
|
-
...iss,
|
|
2890
|
-
path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}]
|
|
2891
|
-
})));`);
|
|
2892
|
-
doc.write(`newResult[${esc(key)}] = ${id}.value`);
|
|
2893
|
-
}
|
|
3213
|
+
|
|
3214
|
+
`);
|
|
2894
3215
|
}
|
|
2895
3216
|
doc.write(`payload.value = newResult;`);
|
|
2896
3217
|
doc.write(`return payload;`);
|
|
@@ -2916,61 +3237,15 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2916
3237
|
});
|
|
2917
3238
|
return payload;
|
|
2918
3239
|
}
|
|
2919
|
-
const proms = [];
|
|
2920
3240
|
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
2921
3241
|
if (!fastpass)
|
|
2922
3242
|
fastpass = generateFastpass(def.shape);
|
|
2923
3243
|
payload = fastpass(payload, ctx);
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
for (const key of value.keys) {
|
|
2928
|
-
const el = shape[key];
|
|
2929
|
-
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
2930
|
-
const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
|
|
2931
|
-
if (r instanceof Promise) {
|
|
2932
|
-
proms.push(r.then((r2) => isOptional ? handleOptionalObjectResult(r2, payload, key, input) : handleObjectResult(r2, payload, key)));
|
|
2933
|
-
} else if (isOptional) {
|
|
2934
|
-
handleOptionalObjectResult(r, payload, key, input);
|
|
2935
|
-
} else {
|
|
2936
|
-
handleObjectResult(r, payload, key);
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
if (!catchall) {
|
|
2941
|
-
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
2942
|
-
}
|
|
2943
|
-
const unrecognized = [];
|
|
2944
|
-
const keySet = value.keySet;
|
|
2945
|
-
const _catchall = catchall._zod;
|
|
2946
|
-
const t = _catchall.def.type;
|
|
2947
|
-
for (const key of Object.keys(input)) {
|
|
2948
|
-
if (keySet.has(key))
|
|
2949
|
-
continue;
|
|
2950
|
-
if (t === "never") {
|
|
2951
|
-
unrecognized.push(key);
|
|
2952
|
-
continue;
|
|
2953
|
-
}
|
|
2954
|
-
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
2955
|
-
if (r instanceof Promise) {
|
|
2956
|
-
proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
|
|
2957
|
-
} else {
|
|
2958
|
-
handleObjectResult(r, payload, key);
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2961
|
-
if (unrecognized.length) {
|
|
2962
|
-
payload.issues.push({
|
|
2963
|
-
code: "unrecognized_keys",
|
|
2964
|
-
keys: unrecognized,
|
|
2965
|
-
input,
|
|
2966
|
-
inst
|
|
2967
|
-
});
|
|
3244
|
+
if (!catchall)
|
|
3245
|
+
return payload;
|
|
3246
|
+
return handleCatchall([], input, payload, ctx, value, inst);
|
|
2968
3247
|
}
|
|
2969
|
-
|
|
2970
|
-
return payload;
|
|
2971
|
-
return Promise.all(proms).then(() => {
|
|
2972
|
-
return payload;
|
|
2973
|
-
});
|
|
3248
|
+
return superParse(payload, ctx);
|
|
2974
3249
|
};
|
|
2975
3250
|
});
|
|
2976
3251
|
function handleUnionResults(results, final, inst, ctx) {
|
|
@@ -2980,6 +3255,11 @@ function handleUnionResults(results, final, inst, ctx) {
|
|
|
2980
3255
|
return final;
|
|
2981
3256
|
}
|
|
2982
3257
|
}
|
|
3258
|
+
const nonaborted = results.filter((r) => !aborted(r));
|
|
3259
|
+
if (nonaborted.length === 1) {
|
|
3260
|
+
final.value = nonaborted[0].value;
|
|
3261
|
+
return nonaborted[0];
|
|
3262
|
+
}
|
|
2983
3263
|
final.issues.push({
|
|
2984
3264
|
code: "invalid_union",
|
|
2985
3265
|
input: final.value,
|
|
@@ -3005,7 +3285,12 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
3005
3285
|
}
|
|
3006
3286
|
return;
|
|
3007
3287
|
});
|
|
3288
|
+
const single = def.options.length === 1;
|
|
3289
|
+
const first = def.options[0]._zod.run;
|
|
3008
3290
|
inst._zod.parse = (payload, ctx) => {
|
|
3291
|
+
if (single) {
|
|
3292
|
+
return first(payload, ctx);
|
|
3293
|
+
}
|
|
3009
3294
|
let async = false;
|
|
3010
3295
|
const results = [];
|
|
3011
3296
|
for (const option of def.options) {
|
|
@@ -3052,7 +3337,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3052
3337
|
const opts = def.options;
|
|
3053
3338
|
const map = new Map;
|
|
3054
3339
|
for (const o of opts) {
|
|
3055
|
-
const values = o._zod.propValues[def.discriminator];
|
|
3340
|
+
const values = o._zod.propValues?.[def.discriminator];
|
|
3056
3341
|
if (!values || values.size === 0)
|
|
3057
3342
|
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
3058
3343
|
for (const v of values) {
|
|
@@ -3086,6 +3371,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3086
3371
|
code: "invalid_union",
|
|
3087
3372
|
errors: [],
|
|
3088
3373
|
note: "No matching discriminator",
|
|
3374
|
+
discriminator: def.discriminator,
|
|
3089
3375
|
input,
|
|
3090
3376
|
path: [def.discriminator],
|
|
3091
3377
|
inst
|
|
@@ -3190,10 +3476,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3190
3476
|
const tooSmall = input.length < optStart - 1;
|
|
3191
3477
|
if (tooBig || tooSmall) {
|
|
3192
3478
|
payload.issues.push({
|
|
3479
|
+
...tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length },
|
|
3193
3480
|
input,
|
|
3194
3481
|
inst,
|
|
3195
|
-
origin: "array"
|
|
3196
|
-
...tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }
|
|
3482
|
+
origin: "array"
|
|
3197
3483
|
});
|
|
3198
3484
|
return payload;
|
|
3199
3485
|
}
|
|
@@ -3302,8 +3588,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3302
3588
|
}
|
|
3303
3589
|
if (keyResult.issues.length) {
|
|
3304
3590
|
payload.issues.push({
|
|
3305
|
-
origin: "record",
|
|
3306
3591
|
code: "invalid_key",
|
|
3592
|
+
origin: "record",
|
|
3307
3593
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
3308
3594
|
input: key,
|
|
3309
3595
|
path: [key],
|
|
@@ -3371,8 +3657,8 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
|
3371
3657
|
final.issues.push(...prefixIssues(key, keyResult.issues));
|
|
3372
3658
|
} else {
|
|
3373
3659
|
final.issues.push({
|
|
3374
|
-
origin: "map",
|
|
3375
3660
|
code: "invalid_key",
|
|
3661
|
+
origin: "map",
|
|
3376
3662
|
input,
|
|
3377
3663
|
inst,
|
|
3378
3664
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
@@ -3431,11 +3717,12 @@ function handleSetResult(result, final) {
|
|
|
3431
3717
|
var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
3432
3718
|
$ZodType.init(inst, def);
|
|
3433
3719
|
const values = getEnumValues(def.entries);
|
|
3434
|
-
|
|
3720
|
+
const valuesSet = new Set(values);
|
|
3721
|
+
inst._zod.values = valuesSet;
|
|
3435
3722
|
inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
3436
3723
|
inst._zod.parse = (payload, _ctx) => {
|
|
3437
3724
|
const input = payload.value;
|
|
3438
|
-
if (
|
|
3725
|
+
if (valuesSet.has(input)) {
|
|
3439
3726
|
return payload;
|
|
3440
3727
|
}
|
|
3441
3728
|
payload.issues.push({
|
|
@@ -3449,8 +3736,11 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
3449
3736
|
});
|
|
3450
3737
|
var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
3451
3738
|
$ZodType.init(inst, def);
|
|
3739
|
+
if (def.values.length === 0) {
|
|
3740
|
+
throw new Error("Cannot create literal schema with no valid values");
|
|
3741
|
+
}
|
|
3452
3742
|
inst._zod.values = new Set(def.values);
|
|
3453
|
-
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`);
|
|
3743
|
+
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
3454
3744
|
inst._zod.parse = (payload, _ctx) => {
|
|
3455
3745
|
const input = payload.value;
|
|
3456
3746
|
if (inst._zod.values.has(input)) {
|
|
@@ -3482,9 +3772,12 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
3482
3772
|
});
|
|
3483
3773
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
3484
3774
|
$ZodType.init(inst, def);
|
|
3485
|
-
inst._zod.parse = (payload,
|
|
3775
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3776
|
+
if (ctx.direction === "backward") {
|
|
3777
|
+
throw new $ZodEncodeError(inst.constructor.name);
|
|
3778
|
+
}
|
|
3486
3779
|
const _out = def.transform(payload.value, payload);
|
|
3487
|
-
if (
|
|
3780
|
+
if (ctx.async) {
|
|
3488
3781
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
3489
3782
|
return output.then((output2) => {
|
|
3490
3783
|
payload.value = output2;
|
|
@@ -3498,6 +3791,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3498
3791
|
return payload;
|
|
3499
3792
|
};
|
|
3500
3793
|
});
|
|
3794
|
+
function handleOptionalResult(result, input) {
|
|
3795
|
+
if (result.issues.length && input === undefined) {
|
|
3796
|
+
return { issues: [], value: undefined };
|
|
3797
|
+
}
|
|
3798
|
+
return result;
|
|
3799
|
+
}
|
|
3501
3800
|
var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
3502
3801
|
$ZodType.init(inst, def);
|
|
3503
3802
|
inst._zod.optin = "optional";
|
|
@@ -3511,7 +3810,10 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
3511
3810
|
});
|
|
3512
3811
|
inst._zod.parse = (payload, ctx) => {
|
|
3513
3812
|
if (def.innerType._zod.optin === "optional") {
|
|
3514
|
-
|
|
3813
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
3814
|
+
if (result instanceof Promise)
|
|
3815
|
+
return result.then((r) => handleOptionalResult(r, payload.value));
|
|
3816
|
+
return handleOptionalResult(result, payload.value);
|
|
3515
3817
|
}
|
|
3516
3818
|
if (payload.value === undefined) {
|
|
3517
3819
|
return payload;
|
|
@@ -3541,6 +3843,9 @@ var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
|
|
|
3541
3843
|
inst._zod.optin = "optional";
|
|
3542
3844
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3543
3845
|
inst._zod.parse = (payload, ctx) => {
|
|
3846
|
+
if (ctx.direction === "backward") {
|
|
3847
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3848
|
+
}
|
|
3544
3849
|
if (payload.value === undefined) {
|
|
3545
3850
|
payload.value = def.defaultValue;
|
|
3546
3851
|
return payload;
|
|
@@ -3563,6 +3868,9 @@ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
|
|
|
3563
3868
|
inst._zod.optin = "optional";
|
|
3564
3869
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3565
3870
|
inst._zod.parse = (payload, ctx) => {
|
|
3871
|
+
if (ctx.direction === "backward") {
|
|
3872
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3873
|
+
}
|
|
3566
3874
|
if (payload.value === undefined) {
|
|
3567
3875
|
payload.value = def.defaultValue;
|
|
3568
3876
|
}
|
|
@@ -3597,6 +3905,9 @@ function handleNonOptionalResult(payload, inst) {
|
|
|
3597
3905
|
var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
3598
3906
|
$ZodType.init(inst, def);
|
|
3599
3907
|
inst._zod.parse = (payload, ctx) => {
|
|
3908
|
+
if (ctx.direction === "backward") {
|
|
3909
|
+
throw new $ZodEncodeError("ZodSuccess");
|
|
3910
|
+
}
|
|
3600
3911
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3601
3912
|
if (result instanceof Promise) {
|
|
3602
3913
|
return result.then((result2) => {
|
|
@@ -3610,10 +3921,13 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
3610
3921
|
});
|
|
3611
3922
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
3612
3923
|
$ZodType.init(inst, def);
|
|
3613
|
-
inst._zod
|
|
3924
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
3614
3925
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3615
3926
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3616
3927
|
inst._zod.parse = (payload, ctx) => {
|
|
3928
|
+
if (ctx.direction === "backward") {
|
|
3929
|
+
return def.innerType._zod.run(payload, ctx);
|
|
3930
|
+
}
|
|
3617
3931
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3618
3932
|
if (result instanceof Promise) {
|
|
3619
3933
|
return result.then((result2) => {
|
|
@@ -3665,31 +3979,93 @@ var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
|
|
|
3665
3979
|
defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
3666
3980
|
defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
3667
3981
|
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
3982
|
+
defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
|
|
3668
3983
|
inst._zod.parse = (payload, ctx) => {
|
|
3984
|
+
if (ctx.direction === "backward") {
|
|
3985
|
+
const right = def.out._zod.run(payload, ctx);
|
|
3986
|
+
if (right instanceof Promise) {
|
|
3987
|
+
return right.then((right2) => handlePipeResult(right2, def.in, ctx));
|
|
3988
|
+
}
|
|
3989
|
+
return handlePipeResult(right, def.in, ctx);
|
|
3990
|
+
}
|
|
3669
3991
|
const left = def.in._zod.run(payload, ctx);
|
|
3670
3992
|
if (left instanceof Promise) {
|
|
3671
|
-
return left.then((left2) => handlePipeResult(left2, def, ctx));
|
|
3993
|
+
return left.then((left2) => handlePipeResult(left2, def.out, ctx));
|
|
3672
3994
|
}
|
|
3673
|
-
return handlePipeResult(left, def, ctx);
|
|
3995
|
+
return handlePipeResult(left, def.out, ctx);
|
|
3674
3996
|
};
|
|
3675
3997
|
});
|
|
3676
|
-
function handlePipeResult(left,
|
|
3677
|
-
if (
|
|
3998
|
+
function handlePipeResult(left, next, ctx) {
|
|
3999
|
+
if (left.issues.length) {
|
|
4000
|
+
left.aborted = true;
|
|
3678
4001
|
return left;
|
|
3679
4002
|
}
|
|
3680
|
-
return
|
|
4003
|
+
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
3681
4004
|
}
|
|
3682
|
-
var $
|
|
4005
|
+
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
3683
4006
|
$ZodType.init(inst, def);
|
|
3684
|
-
defineLazy(inst._zod, "
|
|
3685
|
-
defineLazy(inst._zod, "
|
|
3686
|
-
defineLazy(inst._zod, "
|
|
3687
|
-
defineLazy(inst._zod, "
|
|
4007
|
+
defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
4008
|
+
defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
4009
|
+
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
4010
|
+
defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
|
|
3688
4011
|
inst._zod.parse = (payload, ctx) => {
|
|
3689
|
-
const
|
|
3690
|
-
if (
|
|
3691
|
-
|
|
3692
|
-
|
|
4012
|
+
const direction = ctx.direction || "forward";
|
|
4013
|
+
if (direction === "forward") {
|
|
4014
|
+
const left = def.in._zod.run(payload, ctx);
|
|
4015
|
+
if (left instanceof Promise) {
|
|
4016
|
+
return left.then((left2) => handleCodecAResult(left2, def, ctx));
|
|
4017
|
+
}
|
|
4018
|
+
return handleCodecAResult(left, def, ctx);
|
|
4019
|
+
} else {
|
|
4020
|
+
const right = def.out._zod.run(payload, ctx);
|
|
4021
|
+
if (right instanceof Promise) {
|
|
4022
|
+
return right.then((right2) => handleCodecAResult(right2, def, ctx));
|
|
4023
|
+
}
|
|
4024
|
+
return handleCodecAResult(right, def, ctx);
|
|
4025
|
+
}
|
|
4026
|
+
};
|
|
4027
|
+
});
|
|
4028
|
+
function handleCodecAResult(result, def, ctx) {
|
|
4029
|
+
if (result.issues.length) {
|
|
4030
|
+
result.aborted = true;
|
|
4031
|
+
return result;
|
|
4032
|
+
}
|
|
4033
|
+
const direction = ctx.direction || "forward";
|
|
4034
|
+
if (direction === "forward") {
|
|
4035
|
+
const transformed = def.transform(result.value, result);
|
|
4036
|
+
if (transformed instanceof Promise) {
|
|
4037
|
+
return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
|
|
4038
|
+
}
|
|
4039
|
+
return handleCodecTxResult(result, transformed, def.out, ctx);
|
|
4040
|
+
} else {
|
|
4041
|
+
const transformed = def.reverseTransform(result.value, result);
|
|
4042
|
+
if (transformed instanceof Promise) {
|
|
4043
|
+
return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
|
|
4044
|
+
}
|
|
4045
|
+
return handleCodecTxResult(result, transformed, def.in, ctx);
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
4049
|
+
if (left.issues.length) {
|
|
4050
|
+
left.aborted = true;
|
|
4051
|
+
return left;
|
|
4052
|
+
}
|
|
4053
|
+
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4054
|
+
}
|
|
4055
|
+
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4056
|
+
$ZodType.init(inst, def);
|
|
4057
|
+
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
4058
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
4059
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
4060
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
4061
|
+
inst._zod.parse = (payload, ctx) => {
|
|
4062
|
+
if (ctx.direction === "backward") {
|
|
4063
|
+
return def.innerType._zod.run(payload, ctx);
|
|
4064
|
+
}
|
|
4065
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
4066
|
+
if (result instanceof Promise) {
|
|
4067
|
+
return result.then(handleReadonlyResult);
|
|
4068
|
+
}
|
|
3693
4069
|
return handleReadonlyResult(result);
|
|
3694
4070
|
};
|
|
3695
4071
|
});
|
|
@@ -3701,7 +4077,7 @@ var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (i
|
|
|
3701
4077
|
$ZodType.init(inst, def);
|
|
3702
4078
|
const regexParts = [];
|
|
3703
4079
|
for (const part of def.parts) {
|
|
3704
|
-
if (part
|
|
4080
|
+
if (typeof part === "object" && part !== null) {
|
|
3705
4081
|
if (!part._zod.pattern) {
|
|
3706
4082
|
throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
|
|
3707
4083
|
}
|
|
@@ -3734,7 +4110,7 @@ var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (i
|
|
|
3734
4110
|
input: payload.value,
|
|
3735
4111
|
inst,
|
|
3736
4112
|
code: "invalid_format",
|
|
3737
|
-
format: "template_literal",
|
|
4113
|
+
format: def.format ?? "template_literal",
|
|
3738
4114
|
pattern: inst._zod.pattern.source
|
|
3739
4115
|
});
|
|
3740
4116
|
return payload;
|
|
@@ -3742,6 +4118,83 @@ var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (i
|
|
|
3742
4118
|
return payload;
|
|
3743
4119
|
};
|
|
3744
4120
|
});
|
|
4121
|
+
var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => {
|
|
4122
|
+
$ZodType.init(inst, def);
|
|
4123
|
+
inst._def = def;
|
|
4124
|
+
inst._zod.def = def;
|
|
4125
|
+
inst.implement = (func) => {
|
|
4126
|
+
if (typeof func !== "function") {
|
|
4127
|
+
throw new Error("implement() must be called with a function");
|
|
4128
|
+
}
|
|
4129
|
+
return function(...args) {
|
|
4130
|
+
const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
|
|
4131
|
+
const result = Reflect.apply(func, this, parsedArgs);
|
|
4132
|
+
if (inst._def.output) {
|
|
4133
|
+
return parse(inst._def.output, result);
|
|
4134
|
+
}
|
|
4135
|
+
return result;
|
|
4136
|
+
};
|
|
4137
|
+
};
|
|
4138
|
+
inst.implementAsync = (func) => {
|
|
4139
|
+
if (typeof func !== "function") {
|
|
4140
|
+
throw new Error("implementAsync() must be called with a function");
|
|
4141
|
+
}
|
|
4142
|
+
return async function(...args) {
|
|
4143
|
+
const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
|
|
4144
|
+
const result = await Reflect.apply(func, this, parsedArgs);
|
|
4145
|
+
if (inst._def.output) {
|
|
4146
|
+
return await parseAsync(inst._def.output, result);
|
|
4147
|
+
}
|
|
4148
|
+
return result;
|
|
4149
|
+
};
|
|
4150
|
+
};
|
|
4151
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
4152
|
+
if (typeof payload.value !== "function") {
|
|
4153
|
+
payload.issues.push({
|
|
4154
|
+
code: "invalid_type",
|
|
4155
|
+
expected: "function",
|
|
4156
|
+
input: payload.value,
|
|
4157
|
+
inst
|
|
4158
|
+
});
|
|
4159
|
+
return payload;
|
|
4160
|
+
}
|
|
4161
|
+
const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
|
|
4162
|
+
if (hasPromiseOutput) {
|
|
4163
|
+
payload.value = inst.implementAsync(payload.value);
|
|
4164
|
+
} else {
|
|
4165
|
+
payload.value = inst.implement(payload.value);
|
|
4166
|
+
}
|
|
4167
|
+
return payload;
|
|
4168
|
+
};
|
|
4169
|
+
inst.input = (...args) => {
|
|
4170
|
+
const F = inst.constructor;
|
|
4171
|
+
if (Array.isArray(args[0])) {
|
|
4172
|
+
return new F({
|
|
4173
|
+
type: "function",
|
|
4174
|
+
input: new $ZodTuple({
|
|
4175
|
+
type: "tuple",
|
|
4176
|
+
items: args[0],
|
|
4177
|
+
rest: args[1]
|
|
4178
|
+
}),
|
|
4179
|
+
output: inst._def.output
|
|
4180
|
+
});
|
|
4181
|
+
}
|
|
4182
|
+
return new F({
|
|
4183
|
+
type: "function",
|
|
4184
|
+
input: args[0],
|
|
4185
|
+
output: inst._def.output
|
|
4186
|
+
});
|
|
4187
|
+
};
|
|
4188
|
+
inst.output = (output) => {
|
|
4189
|
+
const F = inst.constructor;
|
|
4190
|
+
return new F({
|
|
4191
|
+
type: "function",
|
|
4192
|
+
input: inst._def.input,
|
|
4193
|
+
output
|
|
4194
|
+
});
|
|
4195
|
+
};
|
|
4196
|
+
return inst;
|
|
4197
|
+
});
|
|
3745
4198
|
var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
3746
4199
|
$ZodType.init(inst, def);
|
|
3747
4200
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3753,8 +4206,8 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
|
3753
4206
|
defineLazy(inst._zod, "innerType", () => def.getter());
|
|
3754
4207
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
|
|
3755
4208
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
|
|
3756
|
-
defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin);
|
|
3757
|
-
defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout);
|
|
4209
|
+
defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin ?? undefined);
|
|
4210
|
+
defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout ?? undefined);
|
|
3758
4211
|
inst._zod.parse = (payload, ctx) => {
|
|
3759
4212
|
const inner = inst._zod.innerType;
|
|
3760
4213
|
return inner._zod.run(payload, ctx);
|
|
@@ -3795,8 +4248,10 @@ var exports_locales = {};
|
|
|
3795
4248
|
__export(exports_locales, {
|
|
3796
4249
|
zhTW: () => zh_TW_default,
|
|
3797
4250
|
zhCN: () => zh_CN_default,
|
|
4251
|
+
yo: () => yo_default,
|
|
3798
4252
|
vi: () => vi_default,
|
|
3799
4253
|
ur: () => ur_default,
|
|
4254
|
+
uk: () => uk_default,
|
|
3800
4255
|
ua: () => ua_default,
|
|
3801
4256
|
tr: () => tr_default,
|
|
3802
4257
|
th: () => th_default,
|
|
@@ -3812,10 +4267,14 @@ __export(exports_locales, {
|
|
|
3812
4267
|
nl: () => nl_default,
|
|
3813
4268
|
ms: () => ms_default,
|
|
3814
4269
|
mk: () => mk_default,
|
|
4270
|
+
lt: () => lt_default,
|
|
3815
4271
|
ko: () => ko_default,
|
|
4272
|
+
km: () => km_default,
|
|
3816
4273
|
kh: () => kh_default,
|
|
4274
|
+
ka: () => ka_default,
|
|
3817
4275
|
ja: () => ja_default,
|
|
3818
4276
|
it: () => it_default,
|
|
4277
|
+
is: () => is_default,
|
|
3819
4278
|
id: () => id_default,
|
|
3820
4279
|
hu: () => hu_default,
|
|
3821
4280
|
he: () => he_default,
|
|
@@ -3827,6 +4286,7 @@ __export(exports_locales, {
|
|
|
3827
4286
|
eo: () => eo_default,
|
|
3828
4287
|
en: () => en_default,
|
|
3829
4288
|
de: () => de_default,
|
|
4289
|
+
da: () => da_default,
|
|
3830
4290
|
cs: () => cs_default,
|
|
3831
4291
|
ca: () => ca_default,
|
|
3832
4292
|
be: () => be_default,
|
|
@@ -4481,8 +4941,139 @@ function cs_default() {
|
|
|
4481
4941
|
localeError: error5()
|
|
4482
4942
|
};
|
|
4483
4943
|
}
|
|
4484
|
-
// ../../node_modules/zod/v4/locales/
|
|
4944
|
+
// ../../node_modules/zod/v4/locales/da.js
|
|
4485
4945
|
var error6 = () => {
|
|
4946
|
+
const Sizable = {
|
|
4947
|
+
string: { unit: "tegn", verb: "havde" },
|
|
4948
|
+
file: { unit: "bytes", verb: "havde" },
|
|
4949
|
+
array: { unit: "elementer", verb: "indeholdt" },
|
|
4950
|
+
set: { unit: "elementer", verb: "indeholdt" }
|
|
4951
|
+
};
|
|
4952
|
+
const TypeNames = {
|
|
4953
|
+
string: "streng",
|
|
4954
|
+
number: "tal",
|
|
4955
|
+
boolean: "boolean",
|
|
4956
|
+
array: "liste",
|
|
4957
|
+
object: "objekt",
|
|
4958
|
+
set: "sæt",
|
|
4959
|
+
file: "fil"
|
|
4960
|
+
};
|
|
4961
|
+
function getSizing(origin) {
|
|
4962
|
+
return Sizable[origin] ?? null;
|
|
4963
|
+
}
|
|
4964
|
+
function getTypeName(type) {
|
|
4965
|
+
return TypeNames[type] ?? type;
|
|
4966
|
+
}
|
|
4967
|
+
const parsedType = (data) => {
|
|
4968
|
+
const t = typeof data;
|
|
4969
|
+
switch (t) {
|
|
4970
|
+
case "number": {
|
|
4971
|
+
return Number.isNaN(data) ? "NaN" : "tal";
|
|
4972
|
+
}
|
|
4973
|
+
case "object": {
|
|
4974
|
+
if (Array.isArray(data)) {
|
|
4975
|
+
return "liste";
|
|
4976
|
+
}
|
|
4977
|
+
if (data === null) {
|
|
4978
|
+
return "null";
|
|
4979
|
+
}
|
|
4980
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
4981
|
+
return data.constructor.name;
|
|
4982
|
+
}
|
|
4983
|
+
return "objekt";
|
|
4984
|
+
}
|
|
4985
|
+
}
|
|
4986
|
+
return t;
|
|
4987
|
+
};
|
|
4988
|
+
const Nouns = {
|
|
4989
|
+
regex: "input",
|
|
4990
|
+
email: "e-mailadresse",
|
|
4991
|
+
url: "URL",
|
|
4992
|
+
emoji: "emoji",
|
|
4993
|
+
uuid: "UUID",
|
|
4994
|
+
uuidv4: "UUIDv4",
|
|
4995
|
+
uuidv6: "UUIDv6",
|
|
4996
|
+
nanoid: "nanoid",
|
|
4997
|
+
guid: "GUID",
|
|
4998
|
+
cuid: "cuid",
|
|
4999
|
+
cuid2: "cuid2",
|
|
5000
|
+
ulid: "ULID",
|
|
5001
|
+
xid: "XID",
|
|
5002
|
+
ksuid: "KSUID",
|
|
5003
|
+
datetime: "ISO dato- og klokkeslæt",
|
|
5004
|
+
date: "ISO-dato",
|
|
5005
|
+
time: "ISO-klokkeslæt",
|
|
5006
|
+
duration: "ISO-varighed",
|
|
5007
|
+
ipv4: "IPv4-område",
|
|
5008
|
+
ipv6: "IPv6-område",
|
|
5009
|
+
cidrv4: "IPv4-spektrum",
|
|
5010
|
+
cidrv6: "IPv6-spektrum",
|
|
5011
|
+
base64: "base64-kodet streng",
|
|
5012
|
+
base64url: "base64url-kodet streng",
|
|
5013
|
+
json_string: "JSON-streng",
|
|
5014
|
+
e164: "E.164-nummer",
|
|
5015
|
+
jwt: "JWT",
|
|
5016
|
+
template_literal: "input"
|
|
5017
|
+
};
|
|
5018
|
+
return (issue2) => {
|
|
5019
|
+
switch (issue2.code) {
|
|
5020
|
+
case "invalid_type":
|
|
5021
|
+
return `Ugyldigt input: forventede ${getTypeName(issue2.expected)}, fik ${getTypeName(parsedType(issue2.input))}`;
|
|
5022
|
+
case "invalid_value":
|
|
5023
|
+
if (issue2.values.length === 1)
|
|
5024
|
+
return `Ugyldig værdi: forventede ${stringifyPrimitive(issue2.values[0])}`;
|
|
5025
|
+
return `Ugyldigt valg: forventede en af følgende ${joinValues(issue2.values, "|")}`;
|
|
5026
|
+
case "too_big": {
|
|
5027
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
5028
|
+
const sizing = getSizing(issue2.origin);
|
|
5029
|
+
const origin = getTypeName(issue2.origin);
|
|
5030
|
+
if (sizing)
|
|
5031
|
+
return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
|
|
5032
|
+
return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
|
|
5033
|
+
}
|
|
5034
|
+
case "too_small": {
|
|
5035
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
5036
|
+
const sizing = getSizing(issue2.origin);
|
|
5037
|
+
const origin = getTypeName(issue2.origin);
|
|
5038
|
+
if (sizing) {
|
|
5039
|
+
return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5040
|
+
}
|
|
5041
|
+
return `For lille: forventede ${origin} havde ${adj} ${issue2.minimum.toString()}`;
|
|
5042
|
+
}
|
|
5043
|
+
case "invalid_format": {
|
|
5044
|
+
const _issue = issue2;
|
|
5045
|
+
if (_issue.format === "starts_with")
|
|
5046
|
+
return `Ugyldig streng: skal starte med "${_issue.prefix}"`;
|
|
5047
|
+
if (_issue.format === "ends_with")
|
|
5048
|
+
return `Ugyldig streng: skal ende med "${_issue.suffix}"`;
|
|
5049
|
+
if (_issue.format === "includes")
|
|
5050
|
+
return `Ugyldig streng: skal indeholde "${_issue.includes}"`;
|
|
5051
|
+
if (_issue.format === "regex")
|
|
5052
|
+
return `Ugyldig streng: skal matche mønsteret ${_issue.pattern}`;
|
|
5053
|
+
return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`;
|
|
5054
|
+
}
|
|
5055
|
+
case "not_multiple_of":
|
|
5056
|
+
return `Ugyldigt tal: skal være deleligt med ${issue2.divisor}`;
|
|
5057
|
+
case "unrecognized_keys":
|
|
5058
|
+
return `${issue2.keys.length > 1 ? "Ukendte nøgler" : "Ukendt nøgle"}: ${joinValues(issue2.keys, ", ")}`;
|
|
5059
|
+
case "invalid_key":
|
|
5060
|
+
return `Ugyldig nøgle i ${issue2.origin}`;
|
|
5061
|
+
case "invalid_union":
|
|
5062
|
+
return "Ugyldigt input: matcher ingen af de tilladte typer";
|
|
5063
|
+
case "invalid_element":
|
|
5064
|
+
return `Ugyldig værdi i ${issue2.origin}`;
|
|
5065
|
+
default:
|
|
5066
|
+
return `Ugyldigt input`;
|
|
5067
|
+
}
|
|
5068
|
+
};
|
|
5069
|
+
};
|
|
5070
|
+
function da_default() {
|
|
5071
|
+
return {
|
|
5072
|
+
localeError: error6()
|
|
5073
|
+
};
|
|
5074
|
+
}
|
|
5075
|
+
// ../../node_modules/zod/v4/locales/de.js
|
|
5076
|
+
var error7 = () => {
|
|
4486
5077
|
const Sizable = {
|
|
4487
5078
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
4488
5079
|
file: { unit: "Bytes", verb: "zu haben" },
|
|
@@ -4594,7 +5185,7 @@ var error6 = () => {
|
|
|
4594
5185
|
};
|
|
4595
5186
|
function de_default() {
|
|
4596
5187
|
return {
|
|
4597
|
-
localeError:
|
|
5188
|
+
localeError: error7()
|
|
4598
5189
|
};
|
|
4599
5190
|
}
|
|
4600
5191
|
// ../../node_modules/zod/v4/locales/en.js
|
|
@@ -4618,7 +5209,7 @@ var parsedType = (data) => {
|
|
|
4618
5209
|
}
|
|
4619
5210
|
return t;
|
|
4620
5211
|
};
|
|
4621
|
-
var
|
|
5212
|
+
var error8 = () => {
|
|
4622
5213
|
const Sizable = {
|
|
4623
5214
|
string: { unit: "characters", verb: "to have" },
|
|
4624
5215
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -4711,7 +5302,7 @@ var error7 = () => {
|
|
|
4711
5302
|
};
|
|
4712
5303
|
function en_default() {
|
|
4713
5304
|
return {
|
|
4714
|
-
localeError:
|
|
5305
|
+
localeError: error8()
|
|
4715
5306
|
};
|
|
4716
5307
|
}
|
|
4717
5308
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
@@ -4735,7 +5326,7 @@ var parsedType2 = (data) => {
|
|
|
4735
5326
|
}
|
|
4736
5327
|
return t;
|
|
4737
5328
|
};
|
|
4738
|
-
var
|
|
5329
|
+
var error9 = () => {
|
|
4739
5330
|
const Sizable = {
|
|
4740
5331
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
4741
5332
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -4827,36 +5418,66 @@ var error8 = () => {
|
|
|
4827
5418
|
};
|
|
4828
5419
|
function eo_default() {
|
|
4829
5420
|
return {
|
|
4830
|
-
localeError:
|
|
5421
|
+
localeError: error9()
|
|
4831
5422
|
};
|
|
4832
5423
|
}
|
|
4833
5424
|
// ../../node_modules/zod/v4/locales/es.js
|
|
4834
|
-
var
|
|
5425
|
+
var error10 = () => {
|
|
4835
5426
|
const Sizable = {
|
|
4836
5427
|
string: { unit: "caracteres", verb: "tener" },
|
|
4837
5428
|
file: { unit: "bytes", verb: "tener" },
|
|
4838
5429
|
array: { unit: "elementos", verb: "tener" },
|
|
4839
5430
|
set: { unit: "elementos", verb: "tener" }
|
|
4840
5431
|
};
|
|
5432
|
+
const TypeNames = {
|
|
5433
|
+
string: "texto",
|
|
5434
|
+
number: "número",
|
|
5435
|
+
boolean: "booleano",
|
|
5436
|
+
array: "arreglo",
|
|
5437
|
+
object: "objeto",
|
|
5438
|
+
set: "conjunto",
|
|
5439
|
+
file: "archivo",
|
|
5440
|
+
date: "fecha",
|
|
5441
|
+
bigint: "número grande",
|
|
5442
|
+
symbol: "símbolo",
|
|
5443
|
+
undefined: "indefinido",
|
|
5444
|
+
null: "nulo",
|
|
5445
|
+
function: "función",
|
|
5446
|
+
map: "mapa",
|
|
5447
|
+
record: "registro",
|
|
5448
|
+
tuple: "tupla",
|
|
5449
|
+
enum: "enumeración",
|
|
5450
|
+
union: "unión",
|
|
5451
|
+
literal: "literal",
|
|
5452
|
+
promise: "promesa",
|
|
5453
|
+
void: "vacío",
|
|
5454
|
+
never: "nunca",
|
|
5455
|
+
unknown: "desconocido",
|
|
5456
|
+
any: "cualquiera"
|
|
5457
|
+
};
|
|
4841
5458
|
function getSizing(origin) {
|
|
4842
5459
|
return Sizable[origin] ?? null;
|
|
4843
5460
|
}
|
|
5461
|
+
function getTypeName(type) {
|
|
5462
|
+
return TypeNames[type] ?? type;
|
|
5463
|
+
}
|
|
4844
5464
|
const parsedType3 = (data) => {
|
|
4845
5465
|
const t = typeof data;
|
|
4846
5466
|
switch (t) {
|
|
4847
5467
|
case "number": {
|
|
4848
|
-
return Number.isNaN(data) ? "NaN" : "
|
|
5468
|
+
return Number.isNaN(data) ? "NaN" : "number";
|
|
4849
5469
|
}
|
|
4850
5470
|
case "object": {
|
|
4851
5471
|
if (Array.isArray(data)) {
|
|
4852
|
-
return "
|
|
5472
|
+
return "array";
|
|
4853
5473
|
}
|
|
4854
5474
|
if (data === null) {
|
|
4855
|
-
return "
|
|
5475
|
+
return "null";
|
|
4856
5476
|
}
|
|
4857
5477
|
if (Object.getPrototypeOf(data) !== Object.prototype) {
|
|
4858
5478
|
return data.constructor.name;
|
|
4859
5479
|
}
|
|
5480
|
+
return "object";
|
|
4860
5481
|
}
|
|
4861
5482
|
}
|
|
4862
5483
|
return t;
|
|
@@ -4894,7 +5515,7 @@ var error9 = () => {
|
|
|
4894
5515
|
return (issue2) => {
|
|
4895
5516
|
switch (issue2.code) {
|
|
4896
5517
|
case "invalid_type":
|
|
4897
|
-
return `Entrada inválida: se esperaba ${issue2.expected}, recibido ${parsedType3(issue2.input)}`;
|
|
5518
|
+
return `Entrada inválida: se esperaba ${getTypeName(issue2.expected)}, recibido ${getTypeName(parsedType3(issue2.input))}`;
|
|
4898
5519
|
case "invalid_value":
|
|
4899
5520
|
if (issue2.values.length === 1)
|
|
4900
5521
|
return `Entrada inválida: se esperaba ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -4902,17 +5523,19 @@ var error9 = () => {
|
|
|
4902
5523
|
case "too_big": {
|
|
4903
5524
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
4904
5525
|
const sizing = getSizing(issue2.origin);
|
|
5526
|
+
const origin = getTypeName(issue2.origin);
|
|
4905
5527
|
if (sizing)
|
|
4906
|
-
return `Demasiado grande: se esperaba que ${
|
|
4907
|
-
return `Demasiado grande: se esperaba que ${
|
|
5528
|
+
return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
|
|
5529
|
+
return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
|
|
4908
5530
|
}
|
|
4909
5531
|
case "too_small": {
|
|
4910
5532
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
4911
5533
|
const sizing = getSizing(issue2.origin);
|
|
5534
|
+
const origin = getTypeName(issue2.origin);
|
|
4912
5535
|
if (sizing) {
|
|
4913
|
-
return `Demasiado pequeño: se esperaba que ${
|
|
5536
|
+
return `Demasiado pequeño: se esperaba que ${origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
4914
5537
|
}
|
|
4915
|
-
return `Demasiado pequeño: se esperaba que ${
|
|
5538
|
+
return `Demasiado pequeño: se esperaba que ${origin} fuera ${adj}${issue2.minimum.toString()}`;
|
|
4916
5539
|
}
|
|
4917
5540
|
case "invalid_format": {
|
|
4918
5541
|
const _issue = issue2;
|
|
@@ -4931,11 +5554,11 @@ var error9 = () => {
|
|
|
4931
5554
|
case "unrecognized_keys":
|
|
4932
5555
|
return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
|
|
4933
5556
|
case "invalid_key":
|
|
4934
|
-
return `Llave inválida en ${issue2.origin}`;
|
|
5557
|
+
return `Llave inválida en ${getTypeName(issue2.origin)}`;
|
|
4935
5558
|
case "invalid_union":
|
|
4936
5559
|
return "Entrada inválida";
|
|
4937
5560
|
case "invalid_element":
|
|
4938
|
-
return `Valor inválido en ${issue2.origin}`;
|
|
5561
|
+
return `Valor inválido en ${getTypeName(issue2.origin)}`;
|
|
4939
5562
|
default:
|
|
4940
5563
|
return `Entrada inválida`;
|
|
4941
5564
|
}
|
|
@@ -4943,11 +5566,11 @@ var error9 = () => {
|
|
|
4943
5566
|
};
|
|
4944
5567
|
function es_default() {
|
|
4945
5568
|
return {
|
|
4946
|
-
localeError:
|
|
5569
|
+
localeError: error10()
|
|
4947
5570
|
};
|
|
4948
5571
|
}
|
|
4949
5572
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
4950
|
-
var
|
|
5573
|
+
var error11 = () => {
|
|
4951
5574
|
const Sizable = {
|
|
4952
5575
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
4953
5576
|
file: { unit: "بایت", verb: "داشته باشد" },
|
|
@@ -5065,11 +5688,11 @@ var error10 = () => {
|
|
|
5065
5688
|
};
|
|
5066
5689
|
function fa_default() {
|
|
5067
5690
|
return {
|
|
5068
|
-
localeError:
|
|
5691
|
+
localeError: error11()
|
|
5069
5692
|
};
|
|
5070
5693
|
}
|
|
5071
5694
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
5072
|
-
var
|
|
5695
|
+
var error12 = () => {
|
|
5073
5696
|
const Sizable = {
|
|
5074
5697
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
5075
5698
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -5187,11 +5810,11 @@ var error11 = () => {
|
|
|
5187
5810
|
};
|
|
5188
5811
|
function fi_default() {
|
|
5189
5812
|
return {
|
|
5190
|
-
localeError:
|
|
5813
|
+
localeError: error12()
|
|
5191
5814
|
};
|
|
5192
5815
|
}
|
|
5193
5816
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
5194
|
-
var
|
|
5817
|
+
var error13 = () => {
|
|
5195
5818
|
const Sizable = {
|
|
5196
5819
|
string: { unit: "caractères", verb: "avoir" },
|
|
5197
5820
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5303,11 +5926,11 @@ var error12 = () => {
|
|
|
5303
5926
|
};
|
|
5304
5927
|
function fr_default() {
|
|
5305
5928
|
return {
|
|
5306
|
-
localeError:
|
|
5929
|
+
localeError: error13()
|
|
5307
5930
|
};
|
|
5308
5931
|
}
|
|
5309
5932
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
5310
|
-
var
|
|
5933
|
+
var error14 = () => {
|
|
5311
5934
|
const Sizable = {
|
|
5312
5935
|
string: { unit: "caractères", verb: "avoir" },
|
|
5313
5936
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5420,11 +6043,11 @@ var error13 = () => {
|
|
|
5420
6043
|
};
|
|
5421
6044
|
function fr_CA_default() {
|
|
5422
6045
|
return {
|
|
5423
|
-
localeError:
|
|
6046
|
+
localeError: error14()
|
|
5424
6047
|
};
|
|
5425
6048
|
}
|
|
5426
6049
|
// ../../node_modules/zod/v4/locales/he.js
|
|
5427
|
-
var
|
|
6050
|
+
var error15 = () => {
|
|
5428
6051
|
const Sizable = {
|
|
5429
6052
|
string: { unit: "אותיות", verb: "לכלול" },
|
|
5430
6053
|
file: { unit: "בייטים", verb: "לכלול" },
|
|
@@ -5536,11 +6159,11 @@ var error14 = () => {
|
|
|
5536
6159
|
};
|
|
5537
6160
|
function he_default() {
|
|
5538
6161
|
return {
|
|
5539
|
-
localeError:
|
|
6162
|
+
localeError: error15()
|
|
5540
6163
|
};
|
|
5541
6164
|
}
|
|
5542
6165
|
// ../../node_modules/zod/v4/locales/hu.js
|
|
5543
|
-
var
|
|
6166
|
+
var error16 = () => {
|
|
5544
6167
|
const Sizable = {
|
|
5545
6168
|
string: { unit: "karakter", verb: "legyen" },
|
|
5546
6169
|
file: { unit: "byte", verb: "legyen" },
|
|
@@ -5652,11 +6275,11 @@ var error15 = () => {
|
|
|
5652
6275
|
};
|
|
5653
6276
|
function hu_default() {
|
|
5654
6277
|
return {
|
|
5655
|
-
localeError:
|
|
6278
|
+
localeError: error16()
|
|
5656
6279
|
};
|
|
5657
6280
|
}
|
|
5658
6281
|
// ../../node_modules/zod/v4/locales/id.js
|
|
5659
|
-
var
|
|
6282
|
+
var error17 = () => {
|
|
5660
6283
|
const Sizable = {
|
|
5661
6284
|
string: { unit: "karakter", verb: "memiliki" },
|
|
5662
6285
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -5768,35 +6391,152 @@ var error16 = () => {
|
|
|
5768
6391
|
};
|
|
5769
6392
|
function id_default() {
|
|
5770
6393
|
return {
|
|
5771
|
-
localeError:
|
|
6394
|
+
localeError: error17()
|
|
5772
6395
|
};
|
|
5773
6396
|
}
|
|
5774
|
-
// ../../node_modules/zod/v4/locales/
|
|
5775
|
-
var
|
|
6397
|
+
// ../../node_modules/zod/v4/locales/is.js
|
|
6398
|
+
var parsedType3 = (data) => {
|
|
6399
|
+
const t = typeof data;
|
|
6400
|
+
switch (t) {
|
|
6401
|
+
case "number": {
|
|
6402
|
+
return Number.isNaN(data) ? "NaN" : "númer";
|
|
6403
|
+
}
|
|
6404
|
+
case "object": {
|
|
6405
|
+
if (Array.isArray(data)) {
|
|
6406
|
+
return "fylki";
|
|
6407
|
+
}
|
|
6408
|
+
if (data === null) {
|
|
6409
|
+
return "null";
|
|
6410
|
+
}
|
|
6411
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
6412
|
+
return data.constructor.name;
|
|
6413
|
+
}
|
|
6414
|
+
}
|
|
6415
|
+
}
|
|
6416
|
+
return t;
|
|
6417
|
+
};
|
|
6418
|
+
var error18 = () => {
|
|
5776
6419
|
const Sizable = {
|
|
5777
|
-
string: { unit: "
|
|
5778
|
-
file: { unit: "
|
|
5779
|
-
array: { unit: "
|
|
5780
|
-
set: { unit: "
|
|
6420
|
+
string: { unit: "stafi", verb: "að hafa" },
|
|
6421
|
+
file: { unit: "bæti", verb: "að hafa" },
|
|
6422
|
+
array: { unit: "hluti", verb: "að hafa" },
|
|
6423
|
+
set: { unit: "hluti", verb: "að hafa" }
|
|
5781
6424
|
};
|
|
5782
6425
|
function getSizing(origin) {
|
|
5783
6426
|
return Sizable[origin] ?? null;
|
|
5784
6427
|
}
|
|
5785
|
-
const
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
6428
|
+
const Nouns = {
|
|
6429
|
+
regex: "gildi",
|
|
6430
|
+
email: "netfang",
|
|
6431
|
+
url: "vefslóð",
|
|
6432
|
+
emoji: "emoji",
|
|
6433
|
+
uuid: "UUID",
|
|
6434
|
+
uuidv4: "UUIDv4",
|
|
6435
|
+
uuidv6: "UUIDv6",
|
|
6436
|
+
nanoid: "nanoid",
|
|
6437
|
+
guid: "GUID",
|
|
6438
|
+
cuid: "cuid",
|
|
6439
|
+
cuid2: "cuid2",
|
|
6440
|
+
ulid: "ULID",
|
|
6441
|
+
xid: "XID",
|
|
6442
|
+
ksuid: "KSUID",
|
|
6443
|
+
datetime: "ISO dagsetning og tími",
|
|
6444
|
+
date: "ISO dagsetning",
|
|
6445
|
+
time: "ISO tími",
|
|
6446
|
+
duration: "ISO tímalengd",
|
|
6447
|
+
ipv4: "IPv4 address",
|
|
6448
|
+
ipv6: "IPv6 address",
|
|
6449
|
+
cidrv4: "IPv4 range",
|
|
6450
|
+
cidrv6: "IPv6 range",
|
|
6451
|
+
base64: "base64-encoded strengur",
|
|
6452
|
+
base64url: "base64url-encoded strengur",
|
|
6453
|
+
json_string: "JSON strengur",
|
|
6454
|
+
e164: "E.164 tölugildi",
|
|
6455
|
+
jwt: "JWT",
|
|
6456
|
+
template_literal: "gildi"
|
|
6457
|
+
};
|
|
6458
|
+
return (issue2) => {
|
|
6459
|
+
switch (issue2.code) {
|
|
6460
|
+
case "invalid_type":
|
|
6461
|
+
return `Rangt gildi: Þú slóst inn ${parsedType3(issue2.input)} þar sem á að vera ${issue2.expected}`;
|
|
6462
|
+
case "invalid_value":
|
|
6463
|
+
if (issue2.values.length === 1)
|
|
6464
|
+
return `Rangt gildi: gert ráð fyrir ${stringifyPrimitive(issue2.values[0])}`;
|
|
6465
|
+
return `Ógilt val: má vera eitt af eftirfarandi ${joinValues(issue2.values, "|")}`;
|
|
6466
|
+
case "too_big": {
|
|
6467
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6468
|
+
const sizing = getSizing(issue2.origin);
|
|
6469
|
+
if (sizing)
|
|
6470
|
+
return `Of stórt: gert er ráð fyrir að ${issue2.origin ?? "gildi"} hafi ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "hluti"}`;
|
|
6471
|
+
return `Of stórt: gert er ráð fyrir að ${issue2.origin ?? "gildi"} sé ${adj}${issue2.maximum.toString()}`;
|
|
6472
|
+
}
|
|
6473
|
+
case "too_small": {
|
|
6474
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6475
|
+
const sizing = getSizing(issue2.origin);
|
|
6476
|
+
if (sizing) {
|
|
6477
|
+
return `Of lítið: gert er ráð fyrir að ${issue2.origin} hafi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6478
|
+
}
|
|
6479
|
+
return `Of lítið: gert er ráð fyrir að ${issue2.origin} sé ${adj}${issue2.minimum.toString()}`;
|
|
6480
|
+
}
|
|
6481
|
+
case "invalid_format": {
|
|
6482
|
+
const _issue = issue2;
|
|
6483
|
+
if (_issue.format === "starts_with") {
|
|
6484
|
+
return `Ógildur strengur: verður að byrja á "${_issue.prefix}"`;
|
|
6485
|
+
}
|
|
6486
|
+
if (_issue.format === "ends_with")
|
|
6487
|
+
return `Ógildur strengur: verður að enda á "${_issue.suffix}"`;
|
|
6488
|
+
if (_issue.format === "includes")
|
|
6489
|
+
return `Ógildur strengur: verður að innihalda "${_issue.includes}"`;
|
|
6490
|
+
if (_issue.format === "regex")
|
|
6491
|
+
return `Ógildur strengur: verður að fylgja mynstri ${_issue.pattern}`;
|
|
6492
|
+
return `Rangt ${Nouns[_issue.format] ?? issue2.format}`;
|
|
6493
|
+
}
|
|
6494
|
+
case "not_multiple_of":
|
|
6495
|
+
return `Röng tala: verður að vera margfeldi af ${issue2.divisor}`;
|
|
6496
|
+
case "unrecognized_keys":
|
|
6497
|
+
return `Óþekkt ${issue2.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6498
|
+
case "invalid_key":
|
|
6499
|
+
return `Rangur lykill í ${issue2.origin}`;
|
|
6500
|
+
case "invalid_union":
|
|
6501
|
+
return "Rangt gildi";
|
|
6502
|
+
case "invalid_element":
|
|
6503
|
+
return `Rangt gildi í ${issue2.origin}`;
|
|
6504
|
+
default:
|
|
6505
|
+
return `Rangt gildi`;
|
|
6506
|
+
}
|
|
6507
|
+
};
|
|
6508
|
+
};
|
|
6509
|
+
function is_default() {
|
|
6510
|
+
return {
|
|
6511
|
+
localeError: error18()
|
|
6512
|
+
};
|
|
6513
|
+
}
|
|
6514
|
+
// ../../node_modules/zod/v4/locales/it.js
|
|
6515
|
+
var error19 = () => {
|
|
6516
|
+
const Sizable = {
|
|
6517
|
+
string: { unit: "caratteri", verb: "avere" },
|
|
6518
|
+
file: { unit: "byte", verb: "avere" },
|
|
6519
|
+
array: { unit: "elementi", verb: "avere" },
|
|
6520
|
+
set: { unit: "elementi", verb: "avere" }
|
|
6521
|
+
};
|
|
6522
|
+
function getSizing(origin) {
|
|
6523
|
+
return Sizable[origin] ?? null;
|
|
6524
|
+
}
|
|
6525
|
+
const parsedType4 = (data) => {
|
|
6526
|
+
const t = typeof data;
|
|
6527
|
+
switch (t) {
|
|
6528
|
+
case "number": {
|
|
6529
|
+
return Number.isNaN(data) ? "NaN" : "numero";
|
|
6530
|
+
}
|
|
6531
|
+
case "object": {
|
|
6532
|
+
if (Array.isArray(data)) {
|
|
6533
|
+
return "vettore";
|
|
6534
|
+
}
|
|
6535
|
+
if (data === null) {
|
|
6536
|
+
return "null";
|
|
6537
|
+
}
|
|
6538
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
6539
|
+
return data.constructor.name;
|
|
5800
6540
|
}
|
|
5801
6541
|
}
|
|
5802
6542
|
}
|
|
@@ -5835,7 +6575,7 @@ var error17 = () => {
|
|
|
5835
6575
|
return (issue2) => {
|
|
5836
6576
|
switch (issue2.code) {
|
|
5837
6577
|
case "invalid_type":
|
|
5838
|
-
return `Input non valido: atteso ${issue2.expected}, ricevuto ${
|
|
6578
|
+
return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType4(issue2.input)}`;
|
|
5839
6579
|
case "invalid_value":
|
|
5840
6580
|
if (issue2.values.length === 1)
|
|
5841
6581
|
return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -5884,11 +6624,11 @@ var error17 = () => {
|
|
|
5884
6624
|
};
|
|
5885
6625
|
function it_default() {
|
|
5886
6626
|
return {
|
|
5887
|
-
localeError:
|
|
6627
|
+
localeError: error19()
|
|
5888
6628
|
};
|
|
5889
6629
|
}
|
|
5890
6630
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
5891
|
-
var
|
|
6631
|
+
var error20 = () => {
|
|
5892
6632
|
const Sizable = {
|
|
5893
6633
|
string: { unit: "文字", verb: "である" },
|
|
5894
6634
|
file: { unit: "バイト", verb: "である" },
|
|
@@ -5898,7 +6638,7 @@ var error18 = () => {
|
|
|
5898
6638
|
function getSizing(origin) {
|
|
5899
6639
|
return Sizable[origin] ?? null;
|
|
5900
6640
|
}
|
|
5901
|
-
const
|
|
6641
|
+
const parsedType4 = (data) => {
|
|
5902
6642
|
const t = typeof data;
|
|
5903
6643
|
switch (t) {
|
|
5904
6644
|
case "number": {
|
|
@@ -5951,7 +6691,7 @@ var error18 = () => {
|
|
|
5951
6691
|
return (issue2) => {
|
|
5952
6692
|
switch (issue2.code) {
|
|
5953
6693
|
case "invalid_type":
|
|
5954
|
-
return `無効な入力: ${issue2.expected}が期待されましたが、${
|
|
6694
|
+
return `無効な入力: ${issue2.expected}が期待されましたが、${parsedType4(issue2.input)}が入力されました`;
|
|
5955
6695
|
case "invalid_value":
|
|
5956
6696
|
if (issue2.values.length === 1)
|
|
5957
6697
|
return `無効な入力: ${stringifyPrimitive(issue2.values[0])}が期待されました`;
|
|
@@ -5999,11 +6739,136 @@ var error18 = () => {
|
|
|
5999
6739
|
};
|
|
6000
6740
|
function ja_default() {
|
|
6001
6741
|
return {
|
|
6002
|
-
localeError:
|
|
6742
|
+
localeError: error20()
|
|
6003
6743
|
};
|
|
6004
6744
|
}
|
|
6005
|
-
// ../../node_modules/zod/v4/locales/
|
|
6006
|
-
var
|
|
6745
|
+
// ../../node_modules/zod/v4/locales/ka.js
|
|
6746
|
+
var parsedType4 = (data) => {
|
|
6747
|
+
const t = typeof data;
|
|
6748
|
+
switch (t) {
|
|
6749
|
+
case "number": {
|
|
6750
|
+
return Number.isNaN(data) ? "NaN" : "რიცხვი";
|
|
6751
|
+
}
|
|
6752
|
+
case "object": {
|
|
6753
|
+
if (Array.isArray(data)) {
|
|
6754
|
+
return "მასივი";
|
|
6755
|
+
}
|
|
6756
|
+
if (data === null) {
|
|
6757
|
+
return "null";
|
|
6758
|
+
}
|
|
6759
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
6760
|
+
return data.constructor.name;
|
|
6761
|
+
}
|
|
6762
|
+
}
|
|
6763
|
+
}
|
|
6764
|
+
const typeMap = {
|
|
6765
|
+
string: "სტრინგი",
|
|
6766
|
+
boolean: "ბულეანი",
|
|
6767
|
+
undefined: "undefined",
|
|
6768
|
+
bigint: "bigint",
|
|
6769
|
+
symbol: "symbol",
|
|
6770
|
+
function: "ფუნქცია"
|
|
6771
|
+
};
|
|
6772
|
+
return typeMap[t] ?? t;
|
|
6773
|
+
};
|
|
6774
|
+
var error21 = () => {
|
|
6775
|
+
const Sizable = {
|
|
6776
|
+
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
6777
|
+
file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
|
|
6778
|
+
array: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
|
|
6779
|
+
set: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" }
|
|
6780
|
+
};
|
|
6781
|
+
function getSizing(origin) {
|
|
6782
|
+
return Sizable[origin] ?? null;
|
|
6783
|
+
}
|
|
6784
|
+
const Nouns = {
|
|
6785
|
+
regex: "შეყვანა",
|
|
6786
|
+
email: "ელ-ფოსტის მისამართი",
|
|
6787
|
+
url: "URL",
|
|
6788
|
+
emoji: "ემოჯი",
|
|
6789
|
+
uuid: "UUID",
|
|
6790
|
+
uuidv4: "UUIDv4",
|
|
6791
|
+
uuidv6: "UUIDv6",
|
|
6792
|
+
nanoid: "nanoid",
|
|
6793
|
+
guid: "GUID",
|
|
6794
|
+
cuid: "cuid",
|
|
6795
|
+
cuid2: "cuid2",
|
|
6796
|
+
ulid: "ULID",
|
|
6797
|
+
xid: "XID",
|
|
6798
|
+
ksuid: "KSUID",
|
|
6799
|
+
datetime: "თარიღი-დრო",
|
|
6800
|
+
date: "თარიღი",
|
|
6801
|
+
time: "დრო",
|
|
6802
|
+
duration: "ხანგრძლივობა",
|
|
6803
|
+
ipv4: "IPv4 მისამართი",
|
|
6804
|
+
ipv6: "IPv6 მისამართი",
|
|
6805
|
+
cidrv4: "IPv4 დიაპაზონი",
|
|
6806
|
+
cidrv6: "IPv6 დიაპაზონი",
|
|
6807
|
+
base64: "base64-კოდირებული სტრინგი",
|
|
6808
|
+
base64url: "base64url-კოდირებული სტრინგი",
|
|
6809
|
+
json_string: "JSON სტრინგი",
|
|
6810
|
+
e164: "E.164 ნომერი",
|
|
6811
|
+
jwt: "JWT",
|
|
6812
|
+
template_literal: "შეყვანა"
|
|
6813
|
+
};
|
|
6814
|
+
return (issue2) => {
|
|
6815
|
+
switch (issue2.code) {
|
|
6816
|
+
case "invalid_type":
|
|
6817
|
+
return `არასწორი შეყვანა: მოსალოდნელი ${issue2.expected}, მიღებული ${parsedType4(issue2.input)}`;
|
|
6818
|
+
case "invalid_value":
|
|
6819
|
+
if (issue2.values.length === 1)
|
|
6820
|
+
return `არასწორი შეყვანა: მოსალოდნელი ${stringifyPrimitive(issue2.values[0])}`;
|
|
6821
|
+
return `არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${joinValues(issue2.values, "|")}-დან`;
|
|
6822
|
+
case "too_big": {
|
|
6823
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6824
|
+
const sizing = getSizing(issue2.origin);
|
|
6825
|
+
if (sizing)
|
|
6826
|
+
return `ზედმეტად დიდი: მოსალოდნელი ${issue2.origin ?? "მნიშვნელობა"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit}`;
|
|
6827
|
+
return `ზედმეტად დიდი: მოსალოდნელი ${issue2.origin ?? "მნიშვნელობა"} იყოს ${adj}${issue2.maximum.toString()}`;
|
|
6828
|
+
}
|
|
6829
|
+
case "too_small": {
|
|
6830
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6831
|
+
const sizing = getSizing(issue2.origin);
|
|
6832
|
+
if (sizing) {
|
|
6833
|
+
return `ზედმეტად პატარა: მოსალოდნელი ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6834
|
+
}
|
|
6835
|
+
return `ზედმეტად პატარა: მოსალოდნელი ${issue2.origin} იყოს ${adj}${issue2.minimum.toString()}`;
|
|
6836
|
+
}
|
|
6837
|
+
case "invalid_format": {
|
|
6838
|
+
const _issue = issue2;
|
|
6839
|
+
if (_issue.format === "starts_with") {
|
|
6840
|
+
return `არასწორი სტრინგი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
|
|
6841
|
+
}
|
|
6842
|
+
if (_issue.format === "ends_with")
|
|
6843
|
+
return `არასწორი სტრინგი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
|
|
6844
|
+
if (_issue.format === "includes")
|
|
6845
|
+
return `არასწორი სტრინგი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
|
|
6846
|
+
if (_issue.format === "regex")
|
|
6847
|
+
return `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
|
|
6848
|
+
return `არასწორი ${Nouns[_issue.format] ?? issue2.format}`;
|
|
6849
|
+
}
|
|
6850
|
+
case "not_multiple_of":
|
|
6851
|
+
return `არასწორი რიცხვი: უნდა იყოს ${issue2.divisor}-ის ჯერადი`;
|
|
6852
|
+
case "unrecognized_keys":
|
|
6853
|
+
return `უცნობი გასაღებ${issue2.keys.length > 1 ? "ები" : "ი"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6854
|
+
case "invalid_key":
|
|
6855
|
+
return `არასწორი გასაღები ${issue2.origin}-ში`;
|
|
6856
|
+
case "invalid_union":
|
|
6857
|
+
return "არასწორი შეყვანა";
|
|
6858
|
+
case "invalid_element":
|
|
6859
|
+
return `არასწორი მნიშვნელობა ${issue2.origin}-ში`;
|
|
6860
|
+
default:
|
|
6861
|
+
return `არასწორი შეყვანა`;
|
|
6862
|
+
}
|
|
6863
|
+
};
|
|
6864
|
+
};
|
|
6865
|
+
function ka_default() {
|
|
6866
|
+
return {
|
|
6867
|
+
localeError: error21()
|
|
6868
|
+
};
|
|
6869
|
+
}
|
|
6870
|
+
// ../../node_modules/zod/v4/locales/km.js
|
|
6871
|
+
var error22 = () => {
|
|
6007
6872
|
const Sizable = {
|
|
6008
6873
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
6009
6874
|
file: { unit: "បៃ", verb: "គួរមាន" },
|
|
@@ -6013,7 +6878,7 @@ var error19 = () => {
|
|
|
6013
6878
|
function getSizing(origin) {
|
|
6014
6879
|
return Sizable[origin] ?? null;
|
|
6015
6880
|
}
|
|
6016
|
-
const
|
|
6881
|
+
const parsedType5 = (data) => {
|
|
6017
6882
|
const t = typeof data;
|
|
6018
6883
|
switch (t) {
|
|
6019
6884
|
case "number": {
|
|
@@ -6066,7 +6931,7 @@ var error19 = () => {
|
|
|
6066
6931
|
return (issue2) => {
|
|
6067
6932
|
switch (issue2.code) {
|
|
6068
6933
|
case "invalid_type":
|
|
6069
|
-
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue2.expected} ប៉ុន្តែទទួលបាន ${
|
|
6934
|
+
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue2.expected} ប៉ុន្តែទទួលបាន ${parsedType5(issue2.input)}`;
|
|
6070
6935
|
case "invalid_value":
|
|
6071
6936
|
if (issue2.values.length === 1)
|
|
6072
6937
|
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -6114,13 +6979,18 @@ var error19 = () => {
|
|
|
6114
6979
|
}
|
|
6115
6980
|
};
|
|
6116
6981
|
};
|
|
6117
|
-
function
|
|
6982
|
+
function km_default() {
|
|
6118
6983
|
return {
|
|
6119
|
-
localeError:
|
|
6984
|
+
localeError: error22()
|
|
6120
6985
|
};
|
|
6121
6986
|
}
|
|
6987
|
+
|
|
6988
|
+
// ../../node_modules/zod/v4/locales/kh.js
|
|
6989
|
+
function kh_default() {
|
|
6990
|
+
return km_default();
|
|
6991
|
+
}
|
|
6122
6992
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
6123
|
-
var
|
|
6993
|
+
var error23 = () => {
|
|
6124
6994
|
const Sizable = {
|
|
6125
6995
|
string: { unit: "문자", verb: "to have" },
|
|
6126
6996
|
file: { unit: "바이트", verb: "to have" },
|
|
@@ -6130,7 +7000,7 @@ var error20 = () => {
|
|
|
6130
7000
|
function getSizing(origin) {
|
|
6131
7001
|
return Sizable[origin] ?? null;
|
|
6132
7002
|
}
|
|
6133
|
-
const
|
|
7003
|
+
const parsedType5 = (data) => {
|
|
6134
7004
|
const t = typeof data;
|
|
6135
7005
|
switch (t) {
|
|
6136
7006
|
case "number": {
|
|
@@ -6183,7 +7053,7 @@ var error20 = () => {
|
|
|
6183
7053
|
return (issue2) => {
|
|
6184
7054
|
switch (issue2.code) {
|
|
6185
7055
|
case "invalid_type":
|
|
6186
|
-
return `잘못된 입력: 예상 타입은 ${issue2.expected}, 받은 타입은 ${
|
|
7056
|
+
return `잘못된 입력: 예상 타입은 ${issue2.expected}, 받은 타입은 ${parsedType5(issue2.input)}입니다`;
|
|
6187
7057
|
case "invalid_value":
|
|
6188
7058
|
if (issue2.values.length === 1)
|
|
6189
7059
|
return `잘못된 입력: 값은 ${stringifyPrimitive(issue2.values[0])} 이어야 합니다`;
|
|
@@ -6237,11 +7107,240 @@ var error20 = () => {
|
|
|
6237
7107
|
};
|
|
6238
7108
|
function ko_default() {
|
|
6239
7109
|
return {
|
|
6240
|
-
localeError:
|
|
7110
|
+
localeError: error23()
|
|
7111
|
+
};
|
|
7112
|
+
}
|
|
7113
|
+
// ../../node_modules/zod/v4/locales/lt.js
|
|
7114
|
+
var parsedType5 = (data) => {
|
|
7115
|
+
const t = typeof data;
|
|
7116
|
+
return parsedTypeFromType(t, data);
|
|
7117
|
+
};
|
|
7118
|
+
var parsedTypeFromType = (t, data = undefined) => {
|
|
7119
|
+
switch (t) {
|
|
7120
|
+
case "number": {
|
|
7121
|
+
return Number.isNaN(data) ? "NaN" : "skaičius";
|
|
7122
|
+
}
|
|
7123
|
+
case "bigint": {
|
|
7124
|
+
return "sveikasis skaičius";
|
|
7125
|
+
}
|
|
7126
|
+
case "string": {
|
|
7127
|
+
return "eilutė";
|
|
7128
|
+
}
|
|
7129
|
+
case "boolean": {
|
|
7130
|
+
return "loginė reikšmė";
|
|
7131
|
+
}
|
|
7132
|
+
case "undefined":
|
|
7133
|
+
case "void": {
|
|
7134
|
+
return "neapibrėžta reikšmė";
|
|
7135
|
+
}
|
|
7136
|
+
case "function": {
|
|
7137
|
+
return "funkcija";
|
|
7138
|
+
}
|
|
7139
|
+
case "symbol": {
|
|
7140
|
+
return "simbolis";
|
|
7141
|
+
}
|
|
7142
|
+
case "object": {
|
|
7143
|
+
if (data === undefined)
|
|
7144
|
+
return "nežinomas objektas";
|
|
7145
|
+
if (data === null)
|
|
7146
|
+
return "nulinė reikšmė";
|
|
7147
|
+
if (Array.isArray(data))
|
|
7148
|
+
return "masyvas";
|
|
7149
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
7150
|
+
return data.constructor.name;
|
|
7151
|
+
}
|
|
7152
|
+
return "objektas";
|
|
7153
|
+
}
|
|
7154
|
+
case "null": {
|
|
7155
|
+
return "nulinė reikšmė";
|
|
7156
|
+
}
|
|
7157
|
+
}
|
|
7158
|
+
return t;
|
|
7159
|
+
};
|
|
7160
|
+
var capitalizeFirstCharacter = (text) => {
|
|
7161
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
7162
|
+
};
|
|
7163
|
+
function getUnitTypeFromNumber(number2) {
|
|
7164
|
+
const abs = Math.abs(number2);
|
|
7165
|
+
const last = abs % 10;
|
|
7166
|
+
const last2 = abs % 100;
|
|
7167
|
+
if (last2 >= 11 && last2 <= 19 || last === 0)
|
|
7168
|
+
return "many";
|
|
7169
|
+
if (last === 1)
|
|
7170
|
+
return "one";
|
|
7171
|
+
return "few";
|
|
7172
|
+
}
|
|
7173
|
+
var error24 = () => {
|
|
7174
|
+
const Sizable = {
|
|
7175
|
+
string: {
|
|
7176
|
+
unit: {
|
|
7177
|
+
one: "simbolis",
|
|
7178
|
+
few: "simboliai",
|
|
7179
|
+
many: "simbolių"
|
|
7180
|
+
},
|
|
7181
|
+
verb: {
|
|
7182
|
+
smaller: {
|
|
7183
|
+
inclusive: "turi būti ne ilgesnė kaip",
|
|
7184
|
+
notInclusive: "turi būti trumpesnė kaip"
|
|
7185
|
+
},
|
|
7186
|
+
bigger: {
|
|
7187
|
+
inclusive: "turi būti ne trumpesnė kaip",
|
|
7188
|
+
notInclusive: "turi būti ilgesnė kaip"
|
|
7189
|
+
}
|
|
7190
|
+
}
|
|
7191
|
+
},
|
|
7192
|
+
file: {
|
|
7193
|
+
unit: {
|
|
7194
|
+
one: "baitas",
|
|
7195
|
+
few: "baitai",
|
|
7196
|
+
many: "baitų"
|
|
7197
|
+
},
|
|
7198
|
+
verb: {
|
|
7199
|
+
smaller: {
|
|
7200
|
+
inclusive: "turi būti ne didesnis kaip",
|
|
7201
|
+
notInclusive: "turi būti mažesnis kaip"
|
|
7202
|
+
},
|
|
7203
|
+
bigger: {
|
|
7204
|
+
inclusive: "turi būti ne mažesnis kaip",
|
|
7205
|
+
notInclusive: "turi būti didesnis kaip"
|
|
7206
|
+
}
|
|
7207
|
+
}
|
|
7208
|
+
},
|
|
7209
|
+
array: {
|
|
7210
|
+
unit: {
|
|
7211
|
+
one: "elementą",
|
|
7212
|
+
few: "elementus",
|
|
7213
|
+
many: "elementų"
|
|
7214
|
+
},
|
|
7215
|
+
verb: {
|
|
7216
|
+
smaller: {
|
|
7217
|
+
inclusive: "turi turėti ne daugiau kaip",
|
|
7218
|
+
notInclusive: "turi turėti mažiau kaip"
|
|
7219
|
+
},
|
|
7220
|
+
bigger: {
|
|
7221
|
+
inclusive: "turi turėti ne mažiau kaip",
|
|
7222
|
+
notInclusive: "turi turėti daugiau kaip"
|
|
7223
|
+
}
|
|
7224
|
+
}
|
|
7225
|
+
},
|
|
7226
|
+
set: {
|
|
7227
|
+
unit: {
|
|
7228
|
+
one: "elementą",
|
|
7229
|
+
few: "elementus",
|
|
7230
|
+
many: "elementų"
|
|
7231
|
+
},
|
|
7232
|
+
verb: {
|
|
7233
|
+
smaller: {
|
|
7234
|
+
inclusive: "turi turėti ne daugiau kaip",
|
|
7235
|
+
notInclusive: "turi turėti mažiau kaip"
|
|
7236
|
+
},
|
|
7237
|
+
bigger: {
|
|
7238
|
+
inclusive: "turi turėti ne mažiau kaip",
|
|
7239
|
+
notInclusive: "turi turėti daugiau kaip"
|
|
7240
|
+
}
|
|
7241
|
+
}
|
|
7242
|
+
}
|
|
7243
|
+
};
|
|
7244
|
+
function getSizing(origin, unitType, inclusive, targetShouldBe) {
|
|
7245
|
+
const result = Sizable[origin] ?? null;
|
|
7246
|
+
if (result === null)
|
|
7247
|
+
return result;
|
|
7248
|
+
return {
|
|
7249
|
+
unit: result.unit[unitType],
|
|
7250
|
+
verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"]
|
|
7251
|
+
};
|
|
7252
|
+
}
|
|
7253
|
+
const Nouns = {
|
|
7254
|
+
regex: "įvestis",
|
|
7255
|
+
email: "el. pašto adresas",
|
|
7256
|
+
url: "URL",
|
|
7257
|
+
emoji: "jaustukas",
|
|
7258
|
+
uuid: "UUID",
|
|
7259
|
+
uuidv4: "UUIDv4",
|
|
7260
|
+
uuidv6: "UUIDv6",
|
|
7261
|
+
nanoid: "nanoid",
|
|
7262
|
+
guid: "GUID",
|
|
7263
|
+
cuid: "cuid",
|
|
7264
|
+
cuid2: "cuid2",
|
|
7265
|
+
ulid: "ULID",
|
|
7266
|
+
xid: "XID",
|
|
7267
|
+
ksuid: "KSUID",
|
|
7268
|
+
datetime: "ISO data ir laikas",
|
|
7269
|
+
date: "ISO data",
|
|
7270
|
+
time: "ISO laikas",
|
|
7271
|
+
duration: "ISO trukmė",
|
|
7272
|
+
ipv4: "IPv4 adresas",
|
|
7273
|
+
ipv6: "IPv6 adresas",
|
|
7274
|
+
cidrv4: "IPv4 tinklo prefiksas (CIDR)",
|
|
7275
|
+
cidrv6: "IPv6 tinklo prefiksas (CIDR)",
|
|
7276
|
+
base64: "base64 užkoduota eilutė",
|
|
7277
|
+
base64url: "base64url užkoduota eilutė",
|
|
7278
|
+
json_string: "JSON eilutė",
|
|
7279
|
+
e164: "E.164 numeris",
|
|
7280
|
+
jwt: "JWT",
|
|
7281
|
+
template_literal: "įvestis"
|
|
7282
|
+
};
|
|
7283
|
+
return (issue2) => {
|
|
7284
|
+
switch (issue2.code) {
|
|
7285
|
+
case "invalid_type":
|
|
7286
|
+
return `Gautas tipas ${parsedType5(issue2.input)}, o tikėtasi - ${parsedTypeFromType(issue2.expected)}`;
|
|
7287
|
+
case "invalid_value":
|
|
7288
|
+
if (issue2.values.length === 1)
|
|
7289
|
+
return `Privalo būti ${stringifyPrimitive(issue2.values[0])}`;
|
|
7290
|
+
return `Privalo būti vienas iš ${joinValues(issue2.values, "|")} pasirinkimų`;
|
|
7291
|
+
case "too_big": {
|
|
7292
|
+
const origin = parsedTypeFromType(issue2.origin);
|
|
7293
|
+
const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller");
|
|
7294
|
+
if (sizing?.verb)
|
|
7295
|
+
return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "elementų"}`;
|
|
7296
|
+
const adj = issue2.inclusive ? "ne didesnis kaip" : "mažesnis kaip";
|
|
7297
|
+
return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
|
|
7298
|
+
}
|
|
7299
|
+
case "too_small": {
|
|
7300
|
+
const origin = parsedTypeFromType(issue2.origin);
|
|
7301
|
+
const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger");
|
|
7302
|
+
if (sizing?.verb)
|
|
7303
|
+
return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "elementų"}`;
|
|
7304
|
+
const adj = issue2.inclusive ? "ne mažesnis kaip" : "didesnis kaip";
|
|
7305
|
+
return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
|
|
7306
|
+
}
|
|
7307
|
+
case "invalid_format": {
|
|
7308
|
+
const _issue = issue2;
|
|
7309
|
+
if (_issue.format === "starts_with") {
|
|
7310
|
+
return `Eilutė privalo prasidėti "${_issue.prefix}"`;
|
|
7311
|
+
}
|
|
7312
|
+
if (_issue.format === "ends_with")
|
|
7313
|
+
return `Eilutė privalo pasibaigti "${_issue.suffix}"`;
|
|
7314
|
+
if (_issue.format === "includes")
|
|
7315
|
+
return `Eilutė privalo įtraukti "${_issue.includes}"`;
|
|
7316
|
+
if (_issue.format === "regex")
|
|
7317
|
+
return `Eilutė privalo atitikti ${_issue.pattern}`;
|
|
7318
|
+
return `Neteisingas ${Nouns[_issue.format] ?? issue2.format}`;
|
|
7319
|
+
}
|
|
7320
|
+
case "not_multiple_of":
|
|
7321
|
+
return `Skaičius privalo būti ${issue2.divisor} kartotinis.`;
|
|
7322
|
+
case "unrecognized_keys":
|
|
7323
|
+
return `Neatpažint${issue2.keys.length > 1 ? "i" : "as"} rakt${issue2.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue2.keys, ", ")}`;
|
|
7324
|
+
case "invalid_key":
|
|
7325
|
+
return "Rastas klaidingas raktas";
|
|
7326
|
+
case "invalid_union":
|
|
7327
|
+
return "Klaidinga įvestis";
|
|
7328
|
+
case "invalid_element": {
|
|
7329
|
+
const origin = parsedTypeFromType(issue2.origin);
|
|
7330
|
+
return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi klaidingą įvestį`;
|
|
7331
|
+
}
|
|
7332
|
+
default:
|
|
7333
|
+
return "Klaidinga įvestis";
|
|
7334
|
+
}
|
|
7335
|
+
};
|
|
7336
|
+
};
|
|
7337
|
+
function lt_default() {
|
|
7338
|
+
return {
|
|
7339
|
+
localeError: error24()
|
|
6241
7340
|
};
|
|
6242
7341
|
}
|
|
6243
7342
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
6244
|
-
var
|
|
7343
|
+
var error25 = () => {
|
|
6245
7344
|
const Sizable = {
|
|
6246
7345
|
string: { unit: "знаци", verb: "да имаат" },
|
|
6247
7346
|
file: { unit: "бајти", verb: "да имаат" },
|
|
@@ -6251,7 +7350,7 @@ var error21 = () => {
|
|
|
6251
7350
|
function getSizing(origin) {
|
|
6252
7351
|
return Sizable[origin] ?? null;
|
|
6253
7352
|
}
|
|
6254
|
-
const
|
|
7353
|
+
const parsedType6 = (data) => {
|
|
6255
7354
|
const t = typeof data;
|
|
6256
7355
|
switch (t) {
|
|
6257
7356
|
case "number": {
|
|
@@ -6304,7 +7403,7 @@ var error21 = () => {
|
|
|
6304
7403
|
return (issue2) => {
|
|
6305
7404
|
switch (issue2.code) {
|
|
6306
7405
|
case "invalid_type":
|
|
6307
|
-
return `Грешен внес: се очекува ${issue2.expected}, примено ${
|
|
7406
|
+
return `Грешен внес: се очекува ${issue2.expected}, примено ${parsedType6(issue2.input)}`;
|
|
6308
7407
|
case "invalid_value":
|
|
6309
7408
|
if (issue2.values.length === 1)
|
|
6310
7409
|
return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -6354,11 +7453,11 @@ var error21 = () => {
|
|
|
6354
7453
|
};
|
|
6355
7454
|
function mk_default() {
|
|
6356
7455
|
return {
|
|
6357
|
-
localeError:
|
|
7456
|
+
localeError: error25()
|
|
6358
7457
|
};
|
|
6359
7458
|
}
|
|
6360
7459
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
6361
|
-
var
|
|
7460
|
+
var error26 = () => {
|
|
6362
7461
|
const Sizable = {
|
|
6363
7462
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
6364
7463
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -6368,7 +7467,7 @@ var error22 = () => {
|
|
|
6368
7467
|
function getSizing(origin) {
|
|
6369
7468
|
return Sizable[origin] ?? null;
|
|
6370
7469
|
}
|
|
6371
|
-
const
|
|
7470
|
+
const parsedType6 = (data) => {
|
|
6372
7471
|
const t = typeof data;
|
|
6373
7472
|
switch (t) {
|
|
6374
7473
|
case "number": {
|
|
@@ -6421,7 +7520,7 @@ var error22 = () => {
|
|
|
6421
7520
|
return (issue2) => {
|
|
6422
7521
|
switch (issue2.code) {
|
|
6423
7522
|
case "invalid_type":
|
|
6424
|
-
return `Input tidak sah: dijangka ${issue2.expected}, diterima ${
|
|
7523
|
+
return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType6(issue2.input)}`;
|
|
6425
7524
|
case "invalid_value":
|
|
6426
7525
|
if (issue2.values.length === 1)
|
|
6427
7526
|
return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -6470,11 +7569,11 @@ var error22 = () => {
|
|
|
6470
7569
|
};
|
|
6471
7570
|
function ms_default() {
|
|
6472
7571
|
return {
|
|
6473
|
-
localeError:
|
|
7572
|
+
localeError: error26()
|
|
6474
7573
|
};
|
|
6475
7574
|
}
|
|
6476
7575
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
6477
|
-
var
|
|
7576
|
+
var error27 = () => {
|
|
6478
7577
|
const Sizable = {
|
|
6479
7578
|
string: { unit: "tekens" },
|
|
6480
7579
|
file: { unit: "bytes" },
|
|
@@ -6484,7 +7583,7 @@ var error23 = () => {
|
|
|
6484
7583
|
function getSizing(origin) {
|
|
6485
7584
|
return Sizable[origin] ?? null;
|
|
6486
7585
|
}
|
|
6487
|
-
const
|
|
7586
|
+
const parsedType6 = (data) => {
|
|
6488
7587
|
const t = typeof data;
|
|
6489
7588
|
switch (t) {
|
|
6490
7589
|
case "number": {
|
|
@@ -6537,7 +7636,7 @@ var error23 = () => {
|
|
|
6537
7636
|
return (issue2) => {
|
|
6538
7637
|
switch (issue2.code) {
|
|
6539
7638
|
case "invalid_type":
|
|
6540
|
-
return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${
|
|
7639
|
+
return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType6(issue2.input)}`;
|
|
6541
7640
|
case "invalid_value":
|
|
6542
7641
|
if (issue2.values.length === 1)
|
|
6543
7642
|
return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -6587,11 +7686,11 @@ var error23 = () => {
|
|
|
6587
7686
|
};
|
|
6588
7687
|
function nl_default() {
|
|
6589
7688
|
return {
|
|
6590
|
-
localeError:
|
|
7689
|
+
localeError: error27()
|
|
6591
7690
|
};
|
|
6592
7691
|
}
|
|
6593
7692
|
// ../../node_modules/zod/v4/locales/no.js
|
|
6594
|
-
var
|
|
7693
|
+
var error28 = () => {
|
|
6595
7694
|
const Sizable = {
|
|
6596
7695
|
string: { unit: "tegn", verb: "å ha" },
|
|
6597
7696
|
file: { unit: "bytes", verb: "å ha" },
|
|
@@ -6601,7 +7700,7 @@ var error24 = () => {
|
|
|
6601
7700
|
function getSizing(origin) {
|
|
6602
7701
|
return Sizable[origin] ?? null;
|
|
6603
7702
|
}
|
|
6604
|
-
const
|
|
7703
|
+
const parsedType6 = (data) => {
|
|
6605
7704
|
const t = typeof data;
|
|
6606
7705
|
switch (t) {
|
|
6607
7706
|
case "number": {
|
|
@@ -6654,7 +7753,7 @@ var error24 = () => {
|
|
|
6654
7753
|
return (issue2) => {
|
|
6655
7754
|
switch (issue2.code) {
|
|
6656
7755
|
case "invalid_type":
|
|
6657
|
-
return `Ugyldig input: forventet ${issue2.expected}, fikk ${
|
|
7756
|
+
return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType6(issue2.input)}`;
|
|
6658
7757
|
case "invalid_value":
|
|
6659
7758
|
if (issue2.values.length === 1)
|
|
6660
7759
|
return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -6703,11 +7802,11 @@ var error24 = () => {
|
|
|
6703
7802
|
};
|
|
6704
7803
|
function no_default() {
|
|
6705
7804
|
return {
|
|
6706
|
-
localeError:
|
|
7805
|
+
localeError: error28()
|
|
6707
7806
|
};
|
|
6708
7807
|
}
|
|
6709
7808
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
6710
|
-
var
|
|
7809
|
+
var error29 = () => {
|
|
6711
7810
|
const Sizable = {
|
|
6712
7811
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
6713
7812
|
file: { unit: "bayt", verb: "olmalıdır" },
|
|
@@ -6717,7 +7816,7 @@ var error25 = () => {
|
|
|
6717
7816
|
function getSizing(origin) {
|
|
6718
7817
|
return Sizable[origin] ?? null;
|
|
6719
7818
|
}
|
|
6720
|
-
const
|
|
7819
|
+
const parsedType6 = (data) => {
|
|
6721
7820
|
const t = typeof data;
|
|
6722
7821
|
switch (t) {
|
|
6723
7822
|
case "number": {
|
|
@@ -6770,7 +7869,7 @@ var error25 = () => {
|
|
|
6770
7869
|
return (issue2) => {
|
|
6771
7870
|
switch (issue2.code) {
|
|
6772
7871
|
case "invalid_type":
|
|
6773
|
-
return `Fâsit giren: umulan ${issue2.expected}, alınan ${
|
|
7872
|
+
return `Fâsit giren: umulan ${issue2.expected}, alınan ${parsedType6(issue2.input)}`;
|
|
6774
7873
|
case "invalid_value":
|
|
6775
7874
|
if (issue2.values.length === 1)
|
|
6776
7875
|
return `Fâsit giren: umulan ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -6819,11 +7918,11 @@ var error25 = () => {
|
|
|
6819
7918
|
};
|
|
6820
7919
|
function ota_default() {
|
|
6821
7920
|
return {
|
|
6822
|
-
localeError:
|
|
7921
|
+
localeError: error29()
|
|
6823
7922
|
};
|
|
6824
7923
|
}
|
|
6825
7924
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
6826
|
-
var
|
|
7925
|
+
var error30 = () => {
|
|
6827
7926
|
const Sizable = {
|
|
6828
7927
|
string: { unit: "توکي", verb: "ولري" },
|
|
6829
7928
|
file: { unit: "بایټس", verb: "ولري" },
|
|
@@ -6833,7 +7932,7 @@ var error26 = () => {
|
|
|
6833
7932
|
function getSizing(origin) {
|
|
6834
7933
|
return Sizable[origin] ?? null;
|
|
6835
7934
|
}
|
|
6836
|
-
const
|
|
7935
|
+
const parsedType6 = (data) => {
|
|
6837
7936
|
const t = typeof data;
|
|
6838
7937
|
switch (t) {
|
|
6839
7938
|
case "number": {
|
|
@@ -6886,7 +7985,7 @@ var error26 = () => {
|
|
|
6886
7985
|
return (issue2) => {
|
|
6887
7986
|
switch (issue2.code) {
|
|
6888
7987
|
case "invalid_type":
|
|
6889
|
-
return `ناسم ورودي: باید ${issue2.expected} وای, مګر ${
|
|
7988
|
+
return `ناسم ورودي: باید ${issue2.expected} وای, مګر ${parsedType6(issue2.input)} ترلاسه شو`;
|
|
6890
7989
|
case "invalid_value":
|
|
6891
7990
|
if (issue2.values.length === 1) {
|
|
6892
7991
|
return `ناسم ورودي: باید ${stringifyPrimitive(issue2.values[0])} وای`;
|
|
@@ -6941,11 +8040,11 @@ var error26 = () => {
|
|
|
6941
8040
|
};
|
|
6942
8041
|
function ps_default() {
|
|
6943
8042
|
return {
|
|
6944
|
-
localeError:
|
|
8043
|
+
localeError: error30()
|
|
6945
8044
|
};
|
|
6946
8045
|
}
|
|
6947
8046
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
6948
|
-
var
|
|
8047
|
+
var error31 = () => {
|
|
6949
8048
|
const Sizable = {
|
|
6950
8049
|
string: { unit: "znaków", verb: "mieć" },
|
|
6951
8050
|
file: { unit: "bajtów", verb: "mieć" },
|
|
@@ -6955,7 +8054,7 @@ var error27 = () => {
|
|
|
6955
8054
|
function getSizing(origin) {
|
|
6956
8055
|
return Sizable[origin] ?? null;
|
|
6957
8056
|
}
|
|
6958
|
-
const
|
|
8057
|
+
const parsedType6 = (data) => {
|
|
6959
8058
|
const t = typeof data;
|
|
6960
8059
|
switch (t) {
|
|
6961
8060
|
case "number": {
|
|
@@ -7008,7 +8107,7 @@ var error27 = () => {
|
|
|
7008
8107
|
return (issue2) => {
|
|
7009
8108
|
switch (issue2.code) {
|
|
7010
8109
|
case "invalid_type":
|
|
7011
|
-
return `Nieprawidłowe dane wejściowe: oczekiwano ${issue2.expected}, otrzymano ${
|
|
8110
|
+
return `Nieprawidłowe dane wejściowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType6(issue2.input)}`;
|
|
7012
8111
|
case "invalid_value":
|
|
7013
8112
|
if (issue2.values.length === 1)
|
|
7014
8113
|
return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7058,11 +8157,11 @@ var error27 = () => {
|
|
|
7058
8157
|
};
|
|
7059
8158
|
function pl_default() {
|
|
7060
8159
|
return {
|
|
7061
|
-
localeError:
|
|
8160
|
+
localeError: error31()
|
|
7062
8161
|
};
|
|
7063
8162
|
}
|
|
7064
8163
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
7065
|
-
var
|
|
8164
|
+
var error32 = () => {
|
|
7066
8165
|
const Sizable = {
|
|
7067
8166
|
string: { unit: "caracteres", verb: "ter" },
|
|
7068
8167
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -7072,7 +8171,7 @@ var error28 = () => {
|
|
|
7072
8171
|
function getSizing(origin) {
|
|
7073
8172
|
return Sizable[origin] ?? null;
|
|
7074
8173
|
}
|
|
7075
|
-
const
|
|
8174
|
+
const parsedType6 = (data) => {
|
|
7076
8175
|
const t = typeof data;
|
|
7077
8176
|
switch (t) {
|
|
7078
8177
|
case "number": {
|
|
@@ -7125,7 +8224,7 @@ var error28 = () => {
|
|
|
7125
8224
|
return (issue2) => {
|
|
7126
8225
|
switch (issue2.code) {
|
|
7127
8226
|
case "invalid_type":
|
|
7128
|
-
return `Tipo inválido: esperado ${issue2.expected}, recebido ${
|
|
8227
|
+
return `Tipo inválido: esperado ${issue2.expected}, recebido ${parsedType6(issue2.input)}`;
|
|
7129
8228
|
case "invalid_value":
|
|
7130
8229
|
if (issue2.values.length === 1)
|
|
7131
8230
|
return `Entrada inválida: esperado ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7174,7 +8273,7 @@ var error28 = () => {
|
|
|
7174
8273
|
};
|
|
7175
8274
|
function pt_default() {
|
|
7176
8275
|
return {
|
|
7177
|
-
localeError:
|
|
8276
|
+
localeError: error32()
|
|
7178
8277
|
};
|
|
7179
8278
|
}
|
|
7180
8279
|
// ../../node_modules/zod/v4/locales/ru.js
|
|
@@ -7193,7 +8292,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
7193
8292
|
}
|
|
7194
8293
|
return many;
|
|
7195
8294
|
}
|
|
7196
|
-
var
|
|
8295
|
+
var error33 = () => {
|
|
7197
8296
|
const Sizable = {
|
|
7198
8297
|
string: {
|
|
7199
8298
|
unit: {
|
|
@@ -7231,7 +8330,7 @@ var error29 = () => {
|
|
|
7231
8330
|
function getSizing(origin) {
|
|
7232
8331
|
return Sizable[origin] ?? null;
|
|
7233
8332
|
}
|
|
7234
|
-
const
|
|
8333
|
+
const parsedType6 = (data) => {
|
|
7235
8334
|
const t = typeof data;
|
|
7236
8335
|
switch (t) {
|
|
7237
8336
|
case "number": {
|
|
@@ -7284,7 +8383,7 @@ var error29 = () => {
|
|
|
7284
8383
|
return (issue2) => {
|
|
7285
8384
|
switch (issue2.code) {
|
|
7286
8385
|
case "invalid_type":
|
|
7287
|
-
return `Неверный ввод: ожидалось ${issue2.expected}, получено ${
|
|
8386
|
+
return `Неверный ввод: ожидалось ${issue2.expected}, получено ${parsedType6(issue2.input)}`;
|
|
7288
8387
|
case "invalid_value":
|
|
7289
8388
|
if (issue2.values.length === 1)
|
|
7290
8389
|
return `Неверный ввод: ожидалось ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7338,11 +8437,11 @@ var error29 = () => {
|
|
|
7338
8437
|
};
|
|
7339
8438
|
function ru_default() {
|
|
7340
8439
|
return {
|
|
7341
|
-
localeError:
|
|
8440
|
+
localeError: error33()
|
|
7342
8441
|
};
|
|
7343
8442
|
}
|
|
7344
8443
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
7345
|
-
var
|
|
8444
|
+
var error34 = () => {
|
|
7346
8445
|
const Sizable = {
|
|
7347
8446
|
string: { unit: "znakov", verb: "imeti" },
|
|
7348
8447
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -7352,7 +8451,7 @@ var error30 = () => {
|
|
|
7352
8451
|
function getSizing(origin) {
|
|
7353
8452
|
return Sizable[origin] ?? null;
|
|
7354
8453
|
}
|
|
7355
|
-
const
|
|
8454
|
+
const parsedType6 = (data) => {
|
|
7356
8455
|
const t = typeof data;
|
|
7357
8456
|
switch (t) {
|
|
7358
8457
|
case "number": {
|
|
@@ -7405,7 +8504,7 @@ var error30 = () => {
|
|
|
7405
8504
|
return (issue2) => {
|
|
7406
8505
|
switch (issue2.code) {
|
|
7407
8506
|
case "invalid_type":
|
|
7408
|
-
return `Neveljaven vnos: pričakovano ${issue2.expected}, prejeto ${
|
|
8507
|
+
return `Neveljaven vnos: pričakovano ${issue2.expected}, prejeto ${parsedType6(issue2.input)}`;
|
|
7409
8508
|
case "invalid_value":
|
|
7410
8509
|
if (issue2.values.length === 1)
|
|
7411
8510
|
return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7455,11 +8554,11 @@ var error30 = () => {
|
|
|
7455
8554
|
};
|
|
7456
8555
|
function sl_default() {
|
|
7457
8556
|
return {
|
|
7458
|
-
localeError:
|
|
8557
|
+
localeError: error34()
|
|
7459
8558
|
};
|
|
7460
8559
|
}
|
|
7461
8560
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
7462
|
-
var
|
|
8561
|
+
var error35 = () => {
|
|
7463
8562
|
const Sizable = {
|
|
7464
8563
|
string: { unit: "tecken", verb: "att ha" },
|
|
7465
8564
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -7469,7 +8568,7 @@ var error31 = () => {
|
|
|
7469
8568
|
function getSizing(origin) {
|
|
7470
8569
|
return Sizable[origin] ?? null;
|
|
7471
8570
|
}
|
|
7472
|
-
const
|
|
8571
|
+
const parsedType6 = (data) => {
|
|
7473
8572
|
const t = typeof data;
|
|
7474
8573
|
switch (t) {
|
|
7475
8574
|
case "number": {
|
|
@@ -7522,7 +8621,7 @@ var error31 = () => {
|
|
|
7522
8621
|
return (issue2) => {
|
|
7523
8622
|
switch (issue2.code) {
|
|
7524
8623
|
case "invalid_type":
|
|
7525
|
-
return `Ogiltig inmatning: förväntat ${issue2.expected}, fick ${
|
|
8624
|
+
return `Ogiltig inmatning: förväntat ${issue2.expected}, fick ${parsedType6(issue2.input)}`;
|
|
7526
8625
|
case "invalid_value":
|
|
7527
8626
|
if (issue2.values.length === 1)
|
|
7528
8627
|
return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7573,11 +8672,11 @@ var error31 = () => {
|
|
|
7573
8672
|
};
|
|
7574
8673
|
function sv_default() {
|
|
7575
8674
|
return {
|
|
7576
|
-
localeError:
|
|
8675
|
+
localeError: error35()
|
|
7577
8676
|
};
|
|
7578
8677
|
}
|
|
7579
8678
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
7580
|
-
var
|
|
8679
|
+
var error36 = () => {
|
|
7581
8680
|
const Sizable = {
|
|
7582
8681
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
7583
8682
|
file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -7587,7 +8686,7 @@ var error32 = () => {
|
|
|
7587
8686
|
function getSizing(origin) {
|
|
7588
8687
|
return Sizable[origin] ?? null;
|
|
7589
8688
|
}
|
|
7590
|
-
const
|
|
8689
|
+
const parsedType6 = (data) => {
|
|
7591
8690
|
const t = typeof data;
|
|
7592
8691
|
switch (t) {
|
|
7593
8692
|
case "number": {
|
|
@@ -7640,7 +8739,7 @@ var error32 = () => {
|
|
|
7640
8739
|
return (issue2) => {
|
|
7641
8740
|
switch (issue2.code) {
|
|
7642
8741
|
case "invalid_type":
|
|
7643
|
-
return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue2.expected}, பெறப்பட்டது ${
|
|
8742
|
+
return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue2.expected}, பெறப்பட்டது ${parsedType6(issue2.input)}`;
|
|
7644
8743
|
case "invalid_value":
|
|
7645
8744
|
if (issue2.values.length === 1)
|
|
7646
8745
|
return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7690,11 +8789,11 @@ var error32 = () => {
|
|
|
7690
8789
|
};
|
|
7691
8790
|
function ta_default() {
|
|
7692
8791
|
return {
|
|
7693
|
-
localeError:
|
|
8792
|
+
localeError: error36()
|
|
7694
8793
|
};
|
|
7695
8794
|
}
|
|
7696
8795
|
// ../../node_modules/zod/v4/locales/th.js
|
|
7697
|
-
var
|
|
8796
|
+
var error37 = () => {
|
|
7698
8797
|
const Sizable = {
|
|
7699
8798
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
7700
8799
|
file: { unit: "ไบต์", verb: "ควรมี" },
|
|
@@ -7704,7 +8803,7 @@ var error33 = () => {
|
|
|
7704
8803
|
function getSizing(origin) {
|
|
7705
8804
|
return Sizable[origin] ?? null;
|
|
7706
8805
|
}
|
|
7707
|
-
const
|
|
8806
|
+
const parsedType6 = (data) => {
|
|
7708
8807
|
const t = typeof data;
|
|
7709
8808
|
switch (t) {
|
|
7710
8809
|
case "number": {
|
|
@@ -7757,7 +8856,7 @@ var error33 = () => {
|
|
|
7757
8856
|
return (issue2) => {
|
|
7758
8857
|
switch (issue2.code) {
|
|
7759
8858
|
case "invalid_type":
|
|
7760
|
-
return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue2.expected} แต่ได้รับ ${
|
|
8859
|
+
return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue2.expected} แต่ได้รับ ${parsedType6(issue2.input)}`;
|
|
7761
8860
|
case "invalid_value":
|
|
7762
8861
|
if (issue2.values.length === 1)
|
|
7763
8862
|
return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7807,11 +8906,11 @@ var error33 = () => {
|
|
|
7807
8906
|
};
|
|
7808
8907
|
function th_default() {
|
|
7809
8908
|
return {
|
|
7810
|
-
localeError:
|
|
8909
|
+
localeError: error37()
|
|
7811
8910
|
};
|
|
7812
8911
|
}
|
|
7813
8912
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
7814
|
-
var
|
|
8913
|
+
var parsedType6 = (data) => {
|
|
7815
8914
|
const t = typeof data;
|
|
7816
8915
|
switch (t) {
|
|
7817
8916
|
case "number": {
|
|
@@ -7831,7 +8930,7 @@ var parsedType3 = (data) => {
|
|
|
7831
8930
|
}
|
|
7832
8931
|
return t;
|
|
7833
8932
|
};
|
|
7834
|
-
var
|
|
8933
|
+
var error38 = () => {
|
|
7835
8934
|
const Sizable = {
|
|
7836
8935
|
string: { unit: "karakter", verb: "olmalı" },
|
|
7837
8936
|
file: { unit: "bayt", verb: "olmalı" },
|
|
@@ -7874,7 +8973,7 @@ var error34 = () => {
|
|
|
7874
8973
|
return (issue2) => {
|
|
7875
8974
|
switch (issue2.code) {
|
|
7876
8975
|
case "invalid_type":
|
|
7877
|
-
return `Geçersiz değer: beklenen ${issue2.expected}, alınan ${
|
|
8976
|
+
return `Geçersiz değer: beklenen ${issue2.expected}, alınan ${parsedType6(issue2.input)}`;
|
|
7878
8977
|
case "invalid_value":
|
|
7879
8978
|
if (issue2.values.length === 1)
|
|
7880
8979
|
return `Geçersiz değer: beklenen ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -7922,11 +9021,11 @@ var error34 = () => {
|
|
|
7922
9021
|
};
|
|
7923
9022
|
function tr_default() {
|
|
7924
9023
|
return {
|
|
7925
|
-
localeError:
|
|
9024
|
+
localeError: error38()
|
|
7926
9025
|
};
|
|
7927
9026
|
}
|
|
7928
|
-
// ../../node_modules/zod/v4/locales/
|
|
7929
|
-
var
|
|
9027
|
+
// ../../node_modules/zod/v4/locales/uk.js
|
|
9028
|
+
var error39 = () => {
|
|
7930
9029
|
const Sizable = {
|
|
7931
9030
|
string: { unit: "символів", verb: "матиме" },
|
|
7932
9031
|
file: { unit: "байтів", verb: "матиме" },
|
|
@@ -7936,7 +9035,7 @@ var error35 = () => {
|
|
|
7936
9035
|
function getSizing(origin) {
|
|
7937
9036
|
return Sizable[origin] ?? null;
|
|
7938
9037
|
}
|
|
7939
|
-
const
|
|
9038
|
+
const parsedType7 = (data) => {
|
|
7940
9039
|
const t = typeof data;
|
|
7941
9040
|
switch (t) {
|
|
7942
9041
|
case "number": {
|
|
@@ -7989,7 +9088,7 @@ var error35 = () => {
|
|
|
7989
9088
|
return (issue2) => {
|
|
7990
9089
|
switch (issue2.code) {
|
|
7991
9090
|
case "invalid_type":
|
|
7992
|
-
return `Неправильні вхідні дані: очікується ${issue2.expected}, отримано ${
|
|
9091
|
+
return `Неправильні вхідні дані: очікується ${issue2.expected}, отримано ${parsedType7(issue2.input)}`;
|
|
7993
9092
|
case "invalid_value":
|
|
7994
9093
|
if (issue2.values.length === 1)
|
|
7995
9094
|
return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -8036,13 +9135,18 @@ var error35 = () => {
|
|
|
8036
9135
|
}
|
|
8037
9136
|
};
|
|
8038
9137
|
};
|
|
8039
|
-
function
|
|
9138
|
+
function uk_default() {
|
|
8040
9139
|
return {
|
|
8041
|
-
localeError:
|
|
9140
|
+
localeError: error39()
|
|
8042
9141
|
};
|
|
8043
9142
|
}
|
|
9143
|
+
|
|
9144
|
+
// ../../node_modules/zod/v4/locales/ua.js
|
|
9145
|
+
function ua_default() {
|
|
9146
|
+
return uk_default();
|
|
9147
|
+
}
|
|
8044
9148
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
8045
|
-
var
|
|
9149
|
+
var error40 = () => {
|
|
8046
9150
|
const Sizable = {
|
|
8047
9151
|
string: { unit: "حروف", verb: "ہونا" },
|
|
8048
9152
|
file: { unit: "بائٹس", verb: "ہونا" },
|
|
@@ -8052,7 +9156,7 @@ var error36 = () => {
|
|
|
8052
9156
|
function getSizing(origin) {
|
|
8053
9157
|
return Sizable[origin] ?? null;
|
|
8054
9158
|
}
|
|
8055
|
-
const
|
|
9159
|
+
const parsedType7 = (data) => {
|
|
8056
9160
|
const t = typeof data;
|
|
8057
9161
|
switch (t) {
|
|
8058
9162
|
case "number": {
|
|
@@ -8105,7 +9209,7 @@ var error36 = () => {
|
|
|
8105
9209
|
return (issue2) => {
|
|
8106
9210
|
switch (issue2.code) {
|
|
8107
9211
|
case "invalid_type":
|
|
8108
|
-
return `غلط ان پٹ: ${issue2.expected} متوقع تھا، ${
|
|
9212
|
+
return `غلط ان پٹ: ${issue2.expected} متوقع تھا، ${parsedType7(issue2.input)} موصول ہوا`;
|
|
8109
9213
|
case "invalid_value":
|
|
8110
9214
|
if (issue2.values.length === 1)
|
|
8111
9215
|
return `غلط ان پٹ: ${stringifyPrimitive(issue2.values[0])} متوقع تھا`;
|
|
@@ -8155,11 +9259,11 @@ var error36 = () => {
|
|
|
8155
9259
|
};
|
|
8156
9260
|
function ur_default() {
|
|
8157
9261
|
return {
|
|
8158
|
-
localeError:
|
|
9262
|
+
localeError: error40()
|
|
8159
9263
|
};
|
|
8160
9264
|
}
|
|
8161
9265
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
8162
|
-
var
|
|
9266
|
+
var error41 = () => {
|
|
8163
9267
|
const Sizable = {
|
|
8164
9268
|
string: { unit: "ký tự", verb: "có" },
|
|
8165
9269
|
file: { unit: "byte", verb: "có" },
|
|
@@ -8169,7 +9273,7 @@ var error37 = () => {
|
|
|
8169
9273
|
function getSizing(origin) {
|
|
8170
9274
|
return Sizable[origin] ?? null;
|
|
8171
9275
|
}
|
|
8172
|
-
const
|
|
9276
|
+
const parsedType7 = (data) => {
|
|
8173
9277
|
const t = typeof data;
|
|
8174
9278
|
switch (t) {
|
|
8175
9279
|
case "number": {
|
|
@@ -8222,7 +9326,7 @@ var error37 = () => {
|
|
|
8222
9326
|
return (issue2) => {
|
|
8223
9327
|
switch (issue2.code) {
|
|
8224
9328
|
case "invalid_type":
|
|
8225
|
-
return `Đầu vào không hợp lệ: mong đợi ${issue2.expected}, nhận được ${
|
|
9329
|
+
return `Đầu vào không hợp lệ: mong đợi ${issue2.expected}, nhận được ${parsedType7(issue2.input)}`;
|
|
8226
9330
|
case "invalid_value":
|
|
8227
9331
|
if (issue2.values.length === 1)
|
|
8228
9332
|
return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -8271,11 +9375,11 @@ var error37 = () => {
|
|
|
8271
9375
|
};
|
|
8272
9376
|
function vi_default() {
|
|
8273
9377
|
return {
|
|
8274
|
-
localeError:
|
|
9378
|
+
localeError: error41()
|
|
8275
9379
|
};
|
|
8276
9380
|
}
|
|
8277
9381
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
8278
|
-
var
|
|
9382
|
+
var error42 = () => {
|
|
8279
9383
|
const Sizable = {
|
|
8280
9384
|
string: { unit: "字符", verb: "包含" },
|
|
8281
9385
|
file: { unit: "字节", verb: "包含" },
|
|
@@ -8285,7 +9389,7 @@ var error38 = () => {
|
|
|
8285
9389
|
function getSizing(origin) {
|
|
8286
9390
|
return Sizable[origin] ?? null;
|
|
8287
9391
|
}
|
|
8288
|
-
const
|
|
9392
|
+
const parsedType7 = (data) => {
|
|
8289
9393
|
const t = typeof data;
|
|
8290
9394
|
switch (t) {
|
|
8291
9395
|
case "number": {
|
|
@@ -8338,7 +9442,7 @@ var error38 = () => {
|
|
|
8338
9442
|
return (issue2) => {
|
|
8339
9443
|
switch (issue2.code) {
|
|
8340
9444
|
case "invalid_type":
|
|
8341
|
-
return `无效输入:期望 ${issue2.expected},实际接收 ${
|
|
9445
|
+
return `无效输入:期望 ${issue2.expected},实际接收 ${parsedType7(issue2.input)}`;
|
|
8342
9446
|
case "invalid_value":
|
|
8343
9447
|
if (issue2.values.length === 1)
|
|
8344
9448
|
return `无效输入:期望 ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -8387,11 +9491,11 @@ var error38 = () => {
|
|
|
8387
9491
|
};
|
|
8388
9492
|
function zh_CN_default() {
|
|
8389
9493
|
return {
|
|
8390
|
-
localeError:
|
|
9494
|
+
localeError: error42()
|
|
8391
9495
|
};
|
|
8392
9496
|
}
|
|
8393
9497
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
8394
|
-
var
|
|
9498
|
+
var error43 = () => {
|
|
8395
9499
|
const Sizable = {
|
|
8396
9500
|
string: { unit: "字元", verb: "擁有" },
|
|
8397
9501
|
file: { unit: "位元組", verb: "擁有" },
|
|
@@ -8401,7 +9505,7 @@ var error39 = () => {
|
|
|
8401
9505
|
function getSizing(origin) {
|
|
8402
9506
|
return Sizable[origin] ?? null;
|
|
8403
9507
|
}
|
|
8404
|
-
const
|
|
9508
|
+
const parsedType7 = (data) => {
|
|
8405
9509
|
const t = typeof data;
|
|
8406
9510
|
switch (t) {
|
|
8407
9511
|
case "number": {
|
|
@@ -8454,7 +9558,7 @@ var error39 = () => {
|
|
|
8454
9558
|
return (issue2) => {
|
|
8455
9559
|
switch (issue2.code) {
|
|
8456
9560
|
case "invalid_type":
|
|
8457
|
-
return `無效的輸入值:預期為 ${issue2.expected},但收到 ${
|
|
9561
|
+
return `無效的輸入值:預期為 ${issue2.expected},但收到 ${parsedType7(issue2.input)}`;
|
|
8458
9562
|
case "invalid_value":
|
|
8459
9563
|
if (issue2.values.length === 1)
|
|
8460
9564
|
return `無效的輸入值:預期為 ${stringifyPrimitive(issue2.values[0])}`;
|
|
@@ -8504,7 +9608,122 @@ var error39 = () => {
|
|
|
8504
9608
|
};
|
|
8505
9609
|
function zh_TW_default() {
|
|
8506
9610
|
return {
|
|
8507
|
-
localeError:
|
|
9611
|
+
localeError: error43()
|
|
9612
|
+
};
|
|
9613
|
+
}
|
|
9614
|
+
// ../../node_modules/zod/v4/locales/yo.js
|
|
9615
|
+
var error44 = () => {
|
|
9616
|
+
const Sizable = {
|
|
9617
|
+
string: { unit: "àmi", verb: "ní" },
|
|
9618
|
+
file: { unit: "bytes", verb: "ní" },
|
|
9619
|
+
array: { unit: "nkan", verb: "ní" },
|
|
9620
|
+
set: { unit: "nkan", verb: "ní" }
|
|
9621
|
+
};
|
|
9622
|
+
function getSizing(origin) {
|
|
9623
|
+
return Sizable[origin] ?? null;
|
|
9624
|
+
}
|
|
9625
|
+
const parsedType7 = (data) => {
|
|
9626
|
+
const t = typeof data;
|
|
9627
|
+
switch (t) {
|
|
9628
|
+
case "number": {
|
|
9629
|
+
return Number.isNaN(data) ? "NaN" : "nọ́mbà";
|
|
9630
|
+
}
|
|
9631
|
+
case "object": {
|
|
9632
|
+
if (Array.isArray(data)) {
|
|
9633
|
+
return "akopọ";
|
|
9634
|
+
}
|
|
9635
|
+
if (data === null) {
|
|
9636
|
+
return "null";
|
|
9637
|
+
}
|
|
9638
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
9639
|
+
return data.constructor.name;
|
|
9640
|
+
}
|
|
9641
|
+
}
|
|
9642
|
+
}
|
|
9643
|
+
return t;
|
|
9644
|
+
};
|
|
9645
|
+
const Nouns = {
|
|
9646
|
+
regex: "ẹ̀rọ ìbáwọlé",
|
|
9647
|
+
email: "àdírẹ́sì ìmẹ́lì",
|
|
9648
|
+
url: "URL",
|
|
9649
|
+
emoji: "emoji",
|
|
9650
|
+
uuid: "UUID",
|
|
9651
|
+
uuidv4: "UUIDv4",
|
|
9652
|
+
uuidv6: "UUIDv6",
|
|
9653
|
+
nanoid: "nanoid",
|
|
9654
|
+
guid: "GUID",
|
|
9655
|
+
cuid: "cuid",
|
|
9656
|
+
cuid2: "cuid2",
|
|
9657
|
+
ulid: "ULID",
|
|
9658
|
+
xid: "XID",
|
|
9659
|
+
ksuid: "KSUID",
|
|
9660
|
+
datetime: "àkókò ISO",
|
|
9661
|
+
date: "ọjọ́ ISO",
|
|
9662
|
+
time: "àkókò ISO",
|
|
9663
|
+
duration: "àkókò tó pé ISO",
|
|
9664
|
+
ipv4: "àdírẹ́sì IPv4",
|
|
9665
|
+
ipv6: "àdírẹ́sì IPv6",
|
|
9666
|
+
cidrv4: "àgbègbè IPv4",
|
|
9667
|
+
cidrv6: "àgbègbè IPv6",
|
|
9668
|
+
base64: "ọ̀rọ̀ tí a kọ́ ní base64",
|
|
9669
|
+
base64url: "ọ̀rọ̀ base64url",
|
|
9670
|
+
json_string: "ọ̀rọ̀ JSON",
|
|
9671
|
+
e164: "nọ́mbà E.164",
|
|
9672
|
+
jwt: "JWT",
|
|
9673
|
+
template_literal: "ẹ̀rọ ìbáwọlé"
|
|
9674
|
+
};
|
|
9675
|
+
return (issue2) => {
|
|
9676
|
+
switch (issue2.code) {
|
|
9677
|
+
case "invalid_type":
|
|
9678
|
+
return `Ìbáwọlé aṣìṣe: a ní láti fi ${issue2.expected}, àmọ̀ a rí ${parsedType7(issue2.input)}`;
|
|
9679
|
+
case "invalid_value":
|
|
9680
|
+
if (issue2.values.length === 1)
|
|
9681
|
+
return `Ìbáwọlé aṣìṣe: a ní láti fi ${stringifyPrimitive(issue2.values[0])}`;
|
|
9682
|
+
return `Àṣàyàn aṣìṣe: yan ọ̀kan lára ${joinValues(issue2.values, "|")}`;
|
|
9683
|
+
case "too_big": {
|
|
9684
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
9685
|
+
const sizing = getSizing(issue2.origin);
|
|
9686
|
+
if (sizing)
|
|
9687
|
+
return `Tó pọ̀ jù: a ní láti jẹ́ pé ${issue2.origin ?? "iye"} ${sizing.verb} ${adj}${issue2.maximum} ${sizing.unit}`;
|
|
9688
|
+
return `Tó pọ̀ jù: a ní láti jẹ́ ${adj}${issue2.maximum}`;
|
|
9689
|
+
}
|
|
9690
|
+
case "too_small": {
|
|
9691
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
9692
|
+
const sizing = getSizing(issue2.origin);
|
|
9693
|
+
if (sizing)
|
|
9694
|
+
return `Kéré ju: a ní láti jẹ́ pé ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum} ${sizing.unit}`;
|
|
9695
|
+
return `Kéré ju: a ní láti jẹ́ ${adj}${issue2.minimum}`;
|
|
9696
|
+
}
|
|
9697
|
+
case "invalid_format": {
|
|
9698
|
+
const _issue = issue2;
|
|
9699
|
+
if (_issue.format === "starts_with")
|
|
9700
|
+
return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${_issue.prefix}"`;
|
|
9701
|
+
if (_issue.format === "ends_with")
|
|
9702
|
+
return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${_issue.suffix}"`;
|
|
9703
|
+
if (_issue.format === "includes")
|
|
9704
|
+
return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${_issue.includes}"`;
|
|
9705
|
+
if (_issue.format === "regex")
|
|
9706
|
+
return `Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${_issue.pattern}`;
|
|
9707
|
+
return `Aṣìṣe: ${Nouns[_issue.format] ?? issue2.format}`;
|
|
9708
|
+
}
|
|
9709
|
+
case "not_multiple_of":
|
|
9710
|
+
return `Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${issue2.divisor}`;
|
|
9711
|
+
case "unrecognized_keys":
|
|
9712
|
+
return `Bọtìnì àìmọ̀: ${joinValues(issue2.keys, ", ")}`;
|
|
9713
|
+
case "invalid_key":
|
|
9714
|
+
return `Bọtìnì aṣìṣe nínú ${issue2.origin}`;
|
|
9715
|
+
case "invalid_union":
|
|
9716
|
+
return "Ìbáwọlé aṣìṣe";
|
|
9717
|
+
case "invalid_element":
|
|
9718
|
+
return `Iye aṣìṣe nínú ${issue2.origin}`;
|
|
9719
|
+
default:
|
|
9720
|
+
return "Ìbáwọlé aṣìṣe";
|
|
9721
|
+
}
|
|
9722
|
+
};
|
|
9723
|
+
};
|
|
9724
|
+
function yo_default() {
|
|
9725
|
+
return {
|
|
9726
|
+
localeError: error44()
|
|
8508
9727
|
};
|
|
8509
9728
|
}
|
|
8510
9729
|
// ../../node_modules/zod/v4/core/registries.js
|
|
@@ -8513,7 +9732,7 @@ var $input = Symbol("ZodInput");
|
|
|
8513
9732
|
|
|
8514
9733
|
class $ZodRegistry {
|
|
8515
9734
|
constructor() {
|
|
8516
|
-
this._map = new
|
|
9735
|
+
this._map = new WeakMap;
|
|
8517
9736
|
this._idmap = new Map;
|
|
8518
9737
|
}
|
|
8519
9738
|
add(schema, ..._meta) {
|
|
@@ -8528,7 +9747,7 @@ class $ZodRegistry {
|
|
|
8528
9747
|
return this;
|
|
8529
9748
|
}
|
|
8530
9749
|
clear() {
|
|
8531
|
-
this._map = new
|
|
9750
|
+
this._map = new WeakMap;
|
|
8532
9751
|
this._idmap = new Map;
|
|
8533
9752
|
return this;
|
|
8534
9753
|
}
|
|
@@ -8545,7 +9764,8 @@ class $ZodRegistry {
|
|
|
8545
9764
|
if (p) {
|
|
8546
9765
|
const pm = { ...this.get(p) ?? {} };
|
|
8547
9766
|
delete pm.id;
|
|
8548
|
-
|
|
9767
|
+
const f = { ...pm, ...this._map.get(schema) };
|
|
9768
|
+
return Object.keys(f).length ? f : undefined;
|
|
8549
9769
|
}
|
|
8550
9770
|
return this._map.get(schema);
|
|
8551
9771
|
}
|
|
@@ -9265,7 +10485,7 @@ function _default(Class2, innerType, defaultValue) {
|
|
|
9265
10485
|
type: "default",
|
|
9266
10486
|
innerType,
|
|
9267
10487
|
get defaultValue() {
|
|
9268
|
-
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
10488
|
+
return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
|
|
9269
10489
|
}
|
|
9270
10490
|
});
|
|
9271
10491
|
}
|
|
@@ -9341,6 +10561,34 @@ function _refine(Class2, fn, _params) {
|
|
|
9341
10561
|
});
|
|
9342
10562
|
return schema;
|
|
9343
10563
|
}
|
|
10564
|
+
function _superRefine(fn) {
|
|
10565
|
+
const ch = _check((payload) => {
|
|
10566
|
+
payload.addIssue = (issue2) => {
|
|
10567
|
+
if (typeof issue2 === "string") {
|
|
10568
|
+
payload.issues.push(issue(issue2, payload.value, ch._zod.def));
|
|
10569
|
+
} else {
|
|
10570
|
+
const _issue = issue2;
|
|
10571
|
+
if (_issue.fatal)
|
|
10572
|
+
_issue.continue = false;
|
|
10573
|
+
_issue.code ?? (_issue.code = "custom");
|
|
10574
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
10575
|
+
_issue.inst ?? (_issue.inst = ch);
|
|
10576
|
+
_issue.continue ?? (_issue.continue = !ch._zod.def.abort);
|
|
10577
|
+
payload.issues.push(issue(_issue));
|
|
10578
|
+
}
|
|
10579
|
+
};
|
|
10580
|
+
return fn(payload.value, payload);
|
|
10581
|
+
});
|
|
10582
|
+
return ch;
|
|
10583
|
+
}
|
|
10584
|
+
function _check(fn, params) {
|
|
10585
|
+
const ch = new $ZodCheck({
|
|
10586
|
+
check: "custom",
|
|
10587
|
+
...normalizeParams(params)
|
|
10588
|
+
});
|
|
10589
|
+
ch._zod.check = fn;
|
|
10590
|
+
return ch;
|
|
10591
|
+
}
|
|
9344
10592
|
function _stringbool(Classes, _params) {
|
|
9345
10593
|
const params = normalizeParams(_params);
|
|
9346
10594
|
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
|
|
@@ -9351,12 +10599,15 @@ function _stringbool(Classes, _params) {
|
|
|
9351
10599
|
}
|
|
9352
10600
|
const truthySet = new Set(truthyArray);
|
|
9353
10601
|
const falsySet = new Set(falsyArray);
|
|
9354
|
-
const
|
|
10602
|
+
const _Codec = Classes.Codec ?? $ZodCodec;
|
|
9355
10603
|
const _Boolean = Classes.Boolean ?? $ZodBoolean;
|
|
9356
10604
|
const _String = Classes.String ?? $ZodString;
|
|
9357
|
-
const
|
|
9358
|
-
const
|
|
9359
|
-
|
|
10605
|
+
const stringSchema = new _String({ type: "string", error: params.error });
|
|
10606
|
+
const booleanSchema = new _Boolean({ type: "boolean", error: params.error });
|
|
10607
|
+
const codec = new _Codec({
|
|
10608
|
+
type: "pipe",
|
|
10609
|
+
in: stringSchema,
|
|
10610
|
+
out: booleanSchema,
|
|
9360
10611
|
transform: (input, payload) => {
|
|
9361
10612
|
let data = input;
|
|
9362
10613
|
if (params.case !== "sensitive")
|
|
@@ -9371,29 +10622,22 @@ function _stringbool(Classes, _params) {
|
|
|
9371
10622
|
expected: "stringbool",
|
|
9372
10623
|
values: [...truthySet, ...falsySet],
|
|
9373
10624
|
input: payload.value,
|
|
9374
|
-
inst:
|
|
10625
|
+
inst: codec,
|
|
10626
|
+
continue: false
|
|
9375
10627
|
});
|
|
9376
10628
|
return {};
|
|
9377
10629
|
}
|
|
9378
10630
|
},
|
|
10631
|
+
reverseTransform: (input, _payload) => {
|
|
10632
|
+
if (input === true) {
|
|
10633
|
+
return truthyArray[0] || "true";
|
|
10634
|
+
} else {
|
|
10635
|
+
return falsyArray[0] || "false";
|
|
10636
|
+
}
|
|
10637
|
+
},
|
|
9379
10638
|
error: params.error
|
|
9380
10639
|
});
|
|
9381
|
-
|
|
9382
|
-
type: "pipe",
|
|
9383
|
-
in: new _String({ type: "string", error: params.error }),
|
|
9384
|
-
out: tx,
|
|
9385
|
-
error: params.error
|
|
9386
|
-
});
|
|
9387
|
-
const outerPipe = new _Pipe({
|
|
9388
|
-
type: "pipe",
|
|
9389
|
-
in: innerPipe,
|
|
9390
|
-
out: new _Boolean({
|
|
9391
|
-
type: "boolean",
|
|
9392
|
-
error: params.error
|
|
9393
|
-
}),
|
|
9394
|
-
error: params.error
|
|
9395
|
-
});
|
|
9396
|
-
return outerPipe;
|
|
10640
|
+
return codec;
|
|
9397
10641
|
}
|
|
9398
10642
|
function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
9399
10643
|
const params = normalizeParams(_params);
|
|
@@ -9411,76 +10655,6 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
9411
10655
|
const inst = new Class2(def);
|
|
9412
10656
|
return inst;
|
|
9413
10657
|
}
|
|
9414
|
-
|
|
9415
|
-
// ../../node_modules/zod/v4/core/function.js
|
|
9416
|
-
class $ZodFunction {
|
|
9417
|
-
constructor(def) {
|
|
9418
|
-
this._def = def;
|
|
9419
|
-
this.def = def;
|
|
9420
|
-
}
|
|
9421
|
-
implement(func) {
|
|
9422
|
-
if (typeof func !== "function") {
|
|
9423
|
-
throw new Error("implement() must be called with a function");
|
|
9424
|
-
}
|
|
9425
|
-
const impl = (...args) => {
|
|
9426
|
-
const parsedArgs = this._def.input ? parse(this._def.input, args, undefined, { callee: impl }) : args;
|
|
9427
|
-
if (!Array.isArray(parsedArgs)) {
|
|
9428
|
-
throw new Error("Invalid arguments schema: not an array or tuple schema.");
|
|
9429
|
-
}
|
|
9430
|
-
const output = func(...parsedArgs);
|
|
9431
|
-
return this._def.output ? parse(this._def.output, output, undefined, { callee: impl }) : output;
|
|
9432
|
-
};
|
|
9433
|
-
return impl;
|
|
9434
|
-
}
|
|
9435
|
-
implementAsync(func) {
|
|
9436
|
-
if (typeof func !== "function") {
|
|
9437
|
-
throw new Error("implement() must be called with a function");
|
|
9438
|
-
}
|
|
9439
|
-
const impl = async (...args) => {
|
|
9440
|
-
const parsedArgs = this._def.input ? await parseAsync(this._def.input, args, undefined, { callee: impl }) : args;
|
|
9441
|
-
if (!Array.isArray(parsedArgs)) {
|
|
9442
|
-
throw new Error("Invalid arguments schema: not an array or tuple schema.");
|
|
9443
|
-
}
|
|
9444
|
-
const output = await func(...parsedArgs);
|
|
9445
|
-
return this._def.output ? parseAsync(this._def.output, output, undefined, { callee: impl }) : output;
|
|
9446
|
-
};
|
|
9447
|
-
return impl;
|
|
9448
|
-
}
|
|
9449
|
-
input(...args) {
|
|
9450
|
-
const F = this.constructor;
|
|
9451
|
-
if (Array.isArray(args[0])) {
|
|
9452
|
-
return new F({
|
|
9453
|
-
type: "function",
|
|
9454
|
-
input: new $ZodTuple({
|
|
9455
|
-
type: "tuple",
|
|
9456
|
-
items: args[0],
|
|
9457
|
-
rest: args[1]
|
|
9458
|
-
}),
|
|
9459
|
-
output: this._def.output
|
|
9460
|
-
});
|
|
9461
|
-
}
|
|
9462
|
-
return new F({
|
|
9463
|
-
type: "function",
|
|
9464
|
-
input: args[0],
|
|
9465
|
-
output: this._def.output
|
|
9466
|
-
});
|
|
9467
|
-
}
|
|
9468
|
-
output(output) {
|
|
9469
|
-
const F = this.constructor;
|
|
9470
|
-
return new F({
|
|
9471
|
-
type: "function",
|
|
9472
|
-
input: this._def.input,
|
|
9473
|
-
output
|
|
9474
|
-
});
|
|
9475
|
-
}
|
|
9476
|
-
}
|
|
9477
|
-
function _function(params) {
|
|
9478
|
-
return new $ZodFunction({
|
|
9479
|
-
type: "function",
|
|
9480
|
-
input: Array.isArray(params?.input) ? _tuple($ZodTuple, params?.input) : params?.input ?? _array($ZodArray, _unknown($ZodUnknown)),
|
|
9481
|
-
output: params?.output ?? _unknown($ZodUnknown)
|
|
9482
|
-
});
|
|
9483
|
-
}
|
|
9484
10658
|
// ../../node_modules/zod/v4/core/to-json-schema.js
|
|
9485
10659
|
class JSONSchemaGenerator {
|
|
9486
10660
|
constructor(params) {
|
|
@@ -9552,7 +10726,7 @@ class JSONSchemaGenerator {
|
|
|
9552
10726
|
else if (regexes.length > 1) {
|
|
9553
10727
|
result.schema.allOf = [
|
|
9554
10728
|
...regexes.map((regex) => ({
|
|
9555
|
-
...this.target === "draft-7" ? { type: "string" } : {},
|
|
10729
|
+
...this.target === "draft-7" || this.target === "draft-4" || this.target === "openapi-3.0" ? { type: "string" } : {},
|
|
9556
10730
|
pattern: regex.source
|
|
9557
10731
|
}))
|
|
9558
10732
|
];
|
|
@@ -9567,22 +10741,34 @@ class JSONSchemaGenerator {
|
|
|
9567
10741
|
json.type = "integer";
|
|
9568
10742
|
else
|
|
9569
10743
|
json.type = "number";
|
|
9570
|
-
if (typeof exclusiveMinimum === "number")
|
|
9571
|
-
|
|
10744
|
+
if (typeof exclusiveMinimum === "number") {
|
|
10745
|
+
if (this.target === "draft-4" || this.target === "openapi-3.0") {
|
|
10746
|
+
json.minimum = exclusiveMinimum;
|
|
10747
|
+
json.exclusiveMinimum = true;
|
|
10748
|
+
} else {
|
|
10749
|
+
json.exclusiveMinimum = exclusiveMinimum;
|
|
10750
|
+
}
|
|
10751
|
+
}
|
|
9572
10752
|
if (typeof minimum === "number") {
|
|
9573
10753
|
json.minimum = minimum;
|
|
9574
|
-
if (typeof exclusiveMinimum === "number") {
|
|
10754
|
+
if (typeof exclusiveMinimum === "number" && this.target !== "draft-4") {
|
|
9575
10755
|
if (exclusiveMinimum >= minimum)
|
|
9576
10756
|
delete json.minimum;
|
|
9577
10757
|
else
|
|
9578
10758
|
delete json.exclusiveMinimum;
|
|
9579
10759
|
}
|
|
9580
10760
|
}
|
|
9581
|
-
if (typeof exclusiveMaximum === "number")
|
|
9582
|
-
|
|
10761
|
+
if (typeof exclusiveMaximum === "number") {
|
|
10762
|
+
if (this.target === "draft-4" || this.target === "openapi-3.0") {
|
|
10763
|
+
json.maximum = exclusiveMaximum;
|
|
10764
|
+
json.exclusiveMaximum = true;
|
|
10765
|
+
} else {
|
|
10766
|
+
json.exclusiveMaximum = exclusiveMaximum;
|
|
10767
|
+
}
|
|
10768
|
+
}
|
|
9583
10769
|
if (typeof maximum === "number") {
|
|
9584
10770
|
json.maximum = maximum;
|
|
9585
|
-
if (typeof exclusiveMaximum === "number") {
|
|
10771
|
+
if (typeof exclusiveMaximum === "number" && this.target !== "draft-4") {
|
|
9586
10772
|
if (exclusiveMaximum <= maximum)
|
|
9587
10773
|
delete json.maximum;
|
|
9588
10774
|
else
|
|
@@ -9611,7 +10797,12 @@ class JSONSchemaGenerator {
|
|
|
9611
10797
|
break;
|
|
9612
10798
|
}
|
|
9613
10799
|
case "null": {
|
|
9614
|
-
|
|
10800
|
+
if (this.target === "openapi-3.0") {
|
|
10801
|
+
_json.type = "string";
|
|
10802
|
+
_json.nullable = true;
|
|
10803
|
+
_json.enum = [null];
|
|
10804
|
+
} else
|
|
10805
|
+
_json.type = "null";
|
|
9615
10806
|
break;
|
|
9616
10807
|
}
|
|
9617
10808
|
case "any": {
|
|
@@ -9691,10 +10882,11 @@ class JSONSchemaGenerator {
|
|
|
9691
10882
|
}
|
|
9692
10883
|
case "union": {
|
|
9693
10884
|
const json = _json;
|
|
9694
|
-
|
|
10885
|
+
const options = def.options.map((x, i) => this.process(x, {
|
|
9695
10886
|
...params,
|
|
9696
10887
|
path: [...params.path, "anyOf", i]
|
|
9697
10888
|
}));
|
|
10889
|
+
json.anyOf = options;
|
|
9698
10890
|
break;
|
|
9699
10891
|
}
|
|
9700
10892
|
case "intersection": {
|
|
@@ -9718,29 +10910,38 @@ class JSONSchemaGenerator {
|
|
|
9718
10910
|
case "tuple": {
|
|
9719
10911
|
const json = _json;
|
|
9720
10912
|
json.type = "array";
|
|
9721
|
-
const
|
|
10913
|
+
const prefixPath = this.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
10914
|
+
const restPath = this.target === "draft-2020-12" ? "items" : this.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
10915
|
+
const prefixItems = def.items.map((x, i) => this.process(x, {
|
|
10916
|
+
...params,
|
|
10917
|
+
path: [...params.path, prefixPath, i]
|
|
10918
|
+
}));
|
|
10919
|
+
const rest = def.rest ? this.process(def.rest, {
|
|
10920
|
+
...params,
|
|
10921
|
+
path: [...params.path, restPath, ...this.target === "openapi-3.0" ? [def.items.length] : []]
|
|
10922
|
+
}) : null;
|
|
9722
10923
|
if (this.target === "draft-2020-12") {
|
|
9723
10924
|
json.prefixItems = prefixItems;
|
|
10925
|
+
if (rest) {
|
|
10926
|
+
json.items = rest;
|
|
10927
|
+
}
|
|
10928
|
+
} else if (this.target === "openapi-3.0") {
|
|
10929
|
+
json.items = {
|
|
10930
|
+
anyOf: prefixItems
|
|
10931
|
+
};
|
|
10932
|
+
if (rest) {
|
|
10933
|
+
json.items.anyOf.push(rest);
|
|
10934
|
+
}
|
|
10935
|
+
json.minItems = prefixItems.length;
|
|
10936
|
+
if (!rest) {
|
|
10937
|
+
json.maxItems = prefixItems.length;
|
|
10938
|
+
}
|
|
9724
10939
|
} else {
|
|
9725
10940
|
json.items = prefixItems;
|
|
9726
|
-
|
|
9727
|
-
if (def.rest) {
|
|
9728
|
-
const rest = this.process(def.rest, {
|
|
9729
|
-
...params,
|
|
9730
|
-
path: [...params.path, "items"]
|
|
9731
|
-
});
|
|
9732
|
-
if (this.target === "draft-2020-12") {
|
|
9733
|
-
json.items = rest;
|
|
9734
|
-
} else {
|
|
10941
|
+
if (rest) {
|
|
9735
10942
|
json.additionalItems = rest;
|
|
9736
10943
|
}
|
|
9737
10944
|
}
|
|
9738
|
-
if (def.rest) {
|
|
9739
|
-
json.items = this.process(def.rest, {
|
|
9740
|
-
...params,
|
|
9741
|
-
path: [...params.path, "items"]
|
|
9742
|
-
});
|
|
9743
|
-
}
|
|
9744
10945
|
const { minimum, maximum } = schema._zod.bag;
|
|
9745
10946
|
if (typeof minimum === "number")
|
|
9746
10947
|
json.minItems = minimum;
|
|
@@ -9751,7 +10952,12 @@ class JSONSchemaGenerator {
|
|
|
9751
10952
|
case "record": {
|
|
9752
10953
|
const json = _json;
|
|
9753
10954
|
json.type = "object";
|
|
9754
|
-
|
|
10955
|
+
if (this.target === "draft-7" || this.target === "draft-2020-12") {
|
|
10956
|
+
json.propertyNames = this.process(def.keyType, {
|
|
10957
|
+
...params,
|
|
10958
|
+
path: [...params.path, "propertyNames"]
|
|
10959
|
+
});
|
|
10960
|
+
}
|
|
9755
10961
|
json.additionalProperties = this.process(def.valueType, {
|
|
9756
10962
|
...params,
|
|
9757
10963
|
path: [...params.path, "additionalProperties"]
|
|
@@ -9801,7 +11007,11 @@ class JSONSchemaGenerator {
|
|
|
9801
11007
|
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
9802
11008
|
const val = vals[0];
|
|
9803
11009
|
json.type = val === null ? "null" : typeof val;
|
|
9804
|
-
|
|
11010
|
+
if (this.target === "draft-4" || this.target === "openapi-3.0") {
|
|
11011
|
+
json.enum = [val];
|
|
11012
|
+
} else {
|
|
11013
|
+
json.const = val;
|
|
11014
|
+
}
|
|
9805
11015
|
} else {
|
|
9806
11016
|
if (vals.every((v) => typeof v === "number"))
|
|
9807
11017
|
json.type = "number";
|
|
@@ -9850,7 +11060,12 @@ class JSONSchemaGenerator {
|
|
|
9850
11060
|
}
|
|
9851
11061
|
case "nullable": {
|
|
9852
11062
|
const inner = this.process(def.innerType, params);
|
|
9853
|
-
|
|
11063
|
+
if (this.target === "openapi-3.0") {
|
|
11064
|
+
result.ref = def.innerType;
|
|
11065
|
+
_json.nullable = true;
|
|
11066
|
+
} else {
|
|
11067
|
+
_json.anyOf = [inner, { type: "null" }];
|
|
11068
|
+
}
|
|
9854
11069
|
break;
|
|
9855
11070
|
}
|
|
9856
11071
|
case "nonoptional": {
|
|
@@ -9937,6 +11152,12 @@ class JSONSchemaGenerator {
|
|
|
9937
11152
|
}
|
|
9938
11153
|
break;
|
|
9939
11154
|
}
|
|
11155
|
+
case "function": {
|
|
11156
|
+
if (this.unrepresentable === "throw") {
|
|
11157
|
+
throw new Error("Function types cannot be represented in JSON Schema");
|
|
11158
|
+
}
|
|
11159
|
+
break;
|
|
11160
|
+
}
|
|
9940
11161
|
default: {}
|
|
9941
11162
|
}
|
|
9942
11163
|
}
|
|
@@ -10047,7 +11268,7 @@ class JSONSchemaGenerator {
|
|
|
10047
11268
|
if (ref) {
|
|
10048
11269
|
flattenRef(ref, params2);
|
|
10049
11270
|
const refSchema = this.seen.get(ref).schema;
|
|
10050
|
-
if (refSchema.$ref && params2.target === "draft-7") {
|
|
11271
|
+
if (refSchema.$ref && (params2.target === "draft-7" || params2.target === "draft-4" || params2.target === "openapi-3.0")) {
|
|
10051
11272
|
schema2.allOf = schema2.allOf ?? [];
|
|
10052
11273
|
schema2.allOf.push(refSchema);
|
|
10053
11274
|
} else {
|
|
@@ -10070,7 +11291,9 @@ class JSONSchemaGenerator {
|
|
|
10070
11291
|
result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
10071
11292
|
} else if (this.target === "draft-7") {
|
|
10072
11293
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
10073
|
-
} else {
|
|
11294
|
+
} else if (this.target === "draft-4") {
|
|
11295
|
+
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
11296
|
+
} else if (this.target === "openapi-3.0") {} else {
|
|
10074
11297
|
console.warn(`Invalid target: ${this.target}`);
|
|
10075
11298
|
}
|
|
10076
11299
|
if (params.external?.uri) {
|
|
@@ -10229,6 +11452,9 @@ function isTransforming(_schema, _ctx) {
|
|
|
10229
11452
|
case "catch": {
|
|
10230
11453
|
return false;
|
|
10231
11454
|
}
|
|
11455
|
+
case "function": {
|
|
11456
|
+
return false;
|
|
11457
|
+
}
|
|
10232
11458
|
default:
|
|
10233
11459
|
}
|
|
10234
11460
|
throw new Error(`Unknown schema type: ${def.type}`);
|
|
@@ -10288,10 +11514,16 @@ var initializer2 = (inst, issues) => {
|
|
|
10288
11514
|
value: (mapper) => flattenError(inst, mapper)
|
|
10289
11515
|
},
|
|
10290
11516
|
addIssue: {
|
|
10291
|
-
value: (issue2) =>
|
|
11517
|
+
value: (issue2) => {
|
|
11518
|
+
inst.issues.push(issue2);
|
|
11519
|
+
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
11520
|
+
}
|
|
10292
11521
|
},
|
|
10293
11522
|
addIssues: {
|
|
10294
|
-
value: (issues2) =>
|
|
11523
|
+
value: (issues2) => {
|
|
11524
|
+
inst.issues.push(...issues2);
|
|
11525
|
+
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
11526
|
+
}
|
|
10295
11527
|
},
|
|
10296
11528
|
isEmpty: {
|
|
10297
11529
|
get() {
|
|
@@ -10310,20 +11542,28 @@ var parse3 = /* @__PURE__ */ _parse(ZodRealError);
|
|
|
10310
11542
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
10311
11543
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
10312
11544
|
var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
11545
|
+
var encode2 = /* @__PURE__ */ _encode(ZodRealError);
|
|
11546
|
+
var decode2 = /* @__PURE__ */ _decode(ZodRealError);
|
|
11547
|
+
var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError);
|
|
11548
|
+
var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError);
|
|
11549
|
+
var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
11550
|
+
var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
11551
|
+
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
11552
|
+
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
10313
11553
|
|
|
10314
11554
|
// ../../node_modules/zod/v4/classic/schemas.js
|
|
10315
11555
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
10316
11556
|
$ZodType.init(inst, def);
|
|
10317
11557
|
inst.def = def;
|
|
11558
|
+
inst.type = def.type;
|
|
10318
11559
|
Object.defineProperty(inst, "_def", { value: def });
|
|
10319
11560
|
inst.check = (...checks2) => {
|
|
10320
|
-
return inst.clone({
|
|
10321
|
-
...def,
|
|
11561
|
+
return inst.clone(exports_util.mergeDefs(def, {
|
|
10322
11562
|
checks: [
|
|
10323
11563
|
...def.checks ?? [],
|
|
10324
11564
|
...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
10325
11565
|
]
|
|
10326
|
-
});
|
|
11566
|
+
}));
|
|
10327
11567
|
};
|
|
10328
11568
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
10329
11569
|
inst.brand = () => inst;
|
|
@@ -10336,6 +11576,14 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
10336
11576
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
10337
11577
|
inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params);
|
|
10338
11578
|
inst.spa = inst.safeParseAsync;
|
|
11579
|
+
inst.encode = (data, params) => encode2(inst, data, params);
|
|
11580
|
+
inst.decode = (data, params) => decode2(inst, data, params);
|
|
11581
|
+
inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params);
|
|
11582
|
+
inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params);
|
|
11583
|
+
inst.safeEncode = (data, params) => safeEncode2(inst, data, params);
|
|
11584
|
+
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
11585
|
+
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
11586
|
+
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
10339
11587
|
inst.refine = (check, params) => inst.check(refine(check, params));
|
|
10340
11588
|
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
10341
11589
|
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
@@ -10472,6 +11720,13 @@ var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
|
|
|
10472
11720
|
function url(params) {
|
|
10473
11721
|
return _url(ZodURL, params);
|
|
10474
11722
|
}
|
|
11723
|
+
function httpUrl(params) {
|
|
11724
|
+
return _url(ZodURL, {
|
|
11725
|
+
protocol: /^https?$/,
|
|
11726
|
+
hostname: exports_regexes.domain,
|
|
11727
|
+
...exports_util.normalizeParams(params)
|
|
11728
|
+
});
|
|
11729
|
+
}
|
|
10475
11730
|
var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
|
|
10476
11731
|
$ZodEmoji.init(inst, def);
|
|
10477
11732
|
ZodStringFormat.init(inst, def);
|
|
@@ -10584,6 +11839,20 @@ var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat"
|
|
|
10584
11839
|
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
10585
11840
|
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
10586
11841
|
}
|
|
11842
|
+
function hostname2(_params) {
|
|
11843
|
+
return _stringFormat(ZodCustomStringFormat, "hostname", exports_regexes.hostname, _params);
|
|
11844
|
+
}
|
|
11845
|
+
function hex2(_params) {
|
|
11846
|
+
return _stringFormat(ZodCustomStringFormat, "hex", exports_regexes.hex, _params);
|
|
11847
|
+
}
|
|
11848
|
+
function hash(alg, params) {
|
|
11849
|
+
const enc = params?.enc ?? "hex";
|
|
11850
|
+
const format = `${alg}_${enc}`;
|
|
11851
|
+
const regex = exports_regexes[format];
|
|
11852
|
+
if (!regex)
|
|
11853
|
+
throw new Error(`Unrecognized hash format: ${format}`);
|
|
11854
|
+
return _stringFormat(ZodCustomStringFormat, format, regex, params);
|
|
11855
|
+
}
|
|
10587
11856
|
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
10588
11857
|
$ZodNumber.init(inst, def);
|
|
10589
11858
|
ZodType.init(inst, def);
|
|
@@ -10748,12 +12017,14 @@ function array(element, params) {
|
|
|
10748
12017
|
}
|
|
10749
12018
|
function keyof(schema) {
|
|
10750
12019
|
const shape = schema._zod.def.shape;
|
|
10751
|
-
return
|
|
12020
|
+
return _enum2(Object.keys(shape));
|
|
10752
12021
|
}
|
|
10753
12022
|
var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
10754
|
-
$
|
|
12023
|
+
$ZodObjectJIT.init(inst, def);
|
|
10755
12024
|
ZodType.init(inst, def);
|
|
10756
|
-
exports_util.defineLazy(inst, "shape", () =>
|
|
12025
|
+
exports_util.defineLazy(inst, "shape", () => {
|
|
12026
|
+
return def.shape;
|
|
12027
|
+
});
|
|
10757
12028
|
inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
|
|
10758
12029
|
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
|
|
10759
12030
|
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
@@ -10763,6 +12034,9 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
10763
12034
|
inst.extend = (incoming) => {
|
|
10764
12035
|
return exports_util.extend(inst, incoming);
|
|
10765
12036
|
};
|
|
12037
|
+
inst.safeExtend = (incoming) => {
|
|
12038
|
+
return exports_util.safeExtend(inst, incoming);
|
|
12039
|
+
};
|
|
10766
12040
|
inst.merge = (other) => exports_util.merge(inst, other);
|
|
10767
12041
|
inst.pick = (mask) => exports_util.pick(inst, mask);
|
|
10768
12042
|
inst.omit = (mask) => exports_util.omit(inst, mask);
|
|
@@ -10772,10 +12046,7 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
10772
12046
|
function object(shape, params) {
|
|
10773
12047
|
const def = {
|
|
10774
12048
|
type: "object",
|
|
10775
|
-
|
|
10776
|
-
exports_util.assignProp(this, "shape", { ...shape });
|
|
10777
|
-
return this.shape;
|
|
10778
|
-
},
|
|
12049
|
+
shape: shape ?? {},
|
|
10779
12050
|
...exports_util.normalizeParams(params)
|
|
10780
12051
|
};
|
|
10781
12052
|
return new ZodObject(def);
|
|
@@ -10783,10 +12054,7 @@ function object(shape, params) {
|
|
|
10783
12054
|
function strictObject(shape, params) {
|
|
10784
12055
|
return new ZodObject({
|
|
10785
12056
|
type: "object",
|
|
10786
|
-
|
|
10787
|
-
exports_util.assignProp(this, "shape", { ...shape });
|
|
10788
|
-
return this.shape;
|
|
10789
|
-
},
|
|
12057
|
+
shape,
|
|
10790
12058
|
catchall: never(),
|
|
10791
12059
|
...exports_util.normalizeParams(params)
|
|
10792
12060
|
});
|
|
@@ -10794,10 +12062,7 @@ function strictObject(shape, params) {
|
|
|
10794
12062
|
function looseObject(shape, params) {
|
|
10795
12063
|
return new ZodObject({
|
|
10796
12064
|
type: "object",
|
|
10797
|
-
|
|
10798
|
-
exports_util.assignProp(this, "shape", { ...shape });
|
|
10799
|
-
return this.shape;
|
|
10800
|
-
},
|
|
12065
|
+
shape,
|
|
10801
12066
|
catchall: unknown(),
|
|
10802
12067
|
...exports_util.normalizeParams(params)
|
|
10803
12068
|
});
|
|
@@ -10871,9 +12136,11 @@ function record(keyType, valueType, params) {
|
|
|
10871
12136
|
});
|
|
10872
12137
|
}
|
|
10873
12138
|
function partialRecord(keyType, valueType, params) {
|
|
12139
|
+
const k = clone(keyType);
|
|
12140
|
+
k._zod.values = undefined;
|
|
10874
12141
|
return new ZodRecord({
|
|
10875
12142
|
type: "record",
|
|
10876
|
-
keyType:
|
|
12143
|
+
keyType: k,
|
|
10877
12144
|
valueType,
|
|
10878
12145
|
...exports_util.normalizeParams(params)
|
|
10879
12146
|
});
|
|
@@ -10993,6 +12260,9 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
10993
12260
|
$ZodTransform.init(inst, def);
|
|
10994
12261
|
ZodType.init(inst, def);
|
|
10995
12262
|
inst._zod.parse = (payload, _ctx) => {
|
|
12263
|
+
if (_ctx.direction === "backward") {
|
|
12264
|
+
throw new $ZodEncodeError(inst.constructor.name);
|
|
12265
|
+
}
|
|
10996
12266
|
payload.addIssue = (issue2) => {
|
|
10997
12267
|
if (typeof issue2 === "string") {
|
|
10998
12268
|
payload.issues.push(exports_util.issue(issue2, payload.value, def));
|
|
@@ -11003,7 +12273,6 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
11003
12273
|
_issue.code ?? (_issue.code = "custom");
|
|
11004
12274
|
_issue.input ?? (_issue.input = payload.value);
|
|
11005
12275
|
_issue.inst ?? (_issue.inst = inst);
|
|
11006
|
-
_issue.continue ?? (_issue.continue = true);
|
|
11007
12276
|
payload.issues.push(exports_util.issue(_issue));
|
|
11008
12277
|
}
|
|
11009
12278
|
};
|
|
@@ -11060,7 +12329,7 @@ function _default2(innerType, defaultValue) {
|
|
|
11060
12329
|
type: "default",
|
|
11061
12330
|
innerType,
|
|
11062
12331
|
get defaultValue() {
|
|
11063
|
-
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
12332
|
+
return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
|
|
11064
12333
|
}
|
|
11065
12334
|
});
|
|
11066
12335
|
}
|
|
@@ -11074,7 +12343,7 @@ function prefault(innerType, defaultValue) {
|
|
|
11074
12343
|
type: "prefault",
|
|
11075
12344
|
innerType,
|
|
11076
12345
|
get defaultValue() {
|
|
11077
|
-
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
12346
|
+
return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
|
|
11078
12347
|
}
|
|
11079
12348
|
});
|
|
11080
12349
|
}
|
|
@@ -11134,9 +12403,23 @@ function pipe(in_, out) {
|
|
|
11134
12403
|
out
|
|
11135
12404
|
});
|
|
11136
12405
|
}
|
|
12406
|
+
var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => {
|
|
12407
|
+
ZodPipe.init(inst, def);
|
|
12408
|
+
$ZodCodec.init(inst, def);
|
|
12409
|
+
});
|
|
12410
|
+
function codec(in_, out, params) {
|
|
12411
|
+
return new ZodCodec({
|
|
12412
|
+
type: "pipe",
|
|
12413
|
+
in: in_,
|
|
12414
|
+
out,
|
|
12415
|
+
transform: params.decode,
|
|
12416
|
+
reverseTransform: params.encode
|
|
12417
|
+
});
|
|
12418
|
+
}
|
|
11137
12419
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
11138
12420
|
$ZodReadonly.init(inst, def);
|
|
11139
12421
|
ZodType.init(inst, def);
|
|
12422
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
11140
12423
|
});
|
|
11141
12424
|
function readonly(innerType) {
|
|
11142
12425
|
return new ZodReadonly({
|
|
@@ -11177,6 +12460,17 @@ function promise(innerType) {
|
|
|
11177
12460
|
innerType
|
|
11178
12461
|
});
|
|
11179
12462
|
}
|
|
12463
|
+
var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
|
|
12464
|
+
$ZodFunction.init(inst, def);
|
|
12465
|
+
ZodType.init(inst, def);
|
|
12466
|
+
});
|
|
12467
|
+
function _function(params) {
|
|
12468
|
+
return new ZodFunction({
|
|
12469
|
+
type: "function",
|
|
12470
|
+
input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()),
|
|
12471
|
+
output: params?.output ?? unknown()
|
|
12472
|
+
});
|
|
12473
|
+
}
|
|
11180
12474
|
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
11181
12475
|
$ZodCustom.init(inst, def);
|
|
11182
12476
|
ZodType.init(inst, def);
|
|
@@ -11195,24 +12489,7 @@ function refine(fn, _params = {}) {
|
|
|
11195
12489
|
return _refine(ZodCustom, fn, _params);
|
|
11196
12490
|
}
|
|
11197
12491
|
function superRefine(fn) {
|
|
11198
|
-
|
|
11199
|
-
payload.addIssue = (issue2) => {
|
|
11200
|
-
if (typeof issue2 === "string") {
|
|
11201
|
-
payload.issues.push(exports_util.issue(issue2, payload.value, ch._zod.def));
|
|
11202
|
-
} else {
|
|
11203
|
-
const _issue = issue2;
|
|
11204
|
-
if (_issue.fatal)
|
|
11205
|
-
_issue.continue = false;
|
|
11206
|
-
_issue.code ?? (_issue.code = "custom");
|
|
11207
|
-
_issue.input ?? (_issue.input = payload.value);
|
|
11208
|
-
_issue.inst ?? (_issue.inst = ch);
|
|
11209
|
-
_issue.continue ?? (_issue.continue = !ch._zod.def.abort);
|
|
11210
|
-
payload.issues.push(exports_util.issue(_issue));
|
|
11211
|
-
}
|
|
11212
|
-
};
|
|
11213
|
-
return fn(payload.value, payload);
|
|
11214
|
-
});
|
|
11215
|
-
return ch;
|
|
12492
|
+
return _superRefine(fn);
|
|
11216
12493
|
}
|
|
11217
12494
|
function _instanceof(cls, params = {
|
|
11218
12495
|
error: `Input not instance of ${cls.name}`
|
|
@@ -11228,10 +12505,9 @@ function _instanceof(cls, params = {
|
|
|
11228
12505
|
return inst;
|
|
11229
12506
|
}
|
|
11230
12507
|
var stringbool = (...args) => _stringbool({
|
|
11231
|
-
|
|
12508
|
+
Codec: ZodCodec,
|
|
11232
12509
|
Boolean: ZodBoolean,
|
|
11233
|
-
String: ZodString
|
|
11234
|
-
Transform: ZodTransform
|
|
12510
|
+
String: ZodString
|
|
11235
12511
|
}, ...args);
|
|
11236
12512
|
function json(params) {
|
|
11237
12513
|
const jsonSchema = lazy(() => {
|
|
@@ -11264,6 +12540,8 @@ function setErrorMap(map2) {
|
|
|
11264
12540
|
function getErrorMap() {
|
|
11265
12541
|
return config().customError;
|
|
11266
12542
|
}
|
|
12543
|
+
var ZodFirstPartyTypeKind;
|
|
12544
|
+
(function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
11267
12545
|
// ../../node_modules/zod/v4/classic/coerce.js
|
|
11268
12546
|
var exports_coerce = {};
|
|
11269
12547
|
__export(exports_coerce, {
|
|
@@ -11791,5 +13069,5 @@ export {
|
|
|
11791
13069
|
BaseModelService
|
|
11792
13070
|
};
|
|
11793
13071
|
|
|
11794
|
-
//# debugId=
|
|
13072
|
+
//# debugId=16140025E800A8D064756E2164756E21
|
|
11795
13073
|
//# sourceMappingURL=index.js.map
|