@go-labs-sg/gosh 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1530 -749
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -412,12 +412,13 @@ var createPkcePair = () => {
|
|
|
412
412
|
verifier
|
|
413
413
|
};
|
|
414
414
|
};
|
|
415
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
415
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/external.js
|
|
416
416
|
var exports_external = {};
|
|
417
417
|
__export(exports_external, {
|
|
418
418
|
$brand: () => $brand,
|
|
419
419
|
$input: () => $input,
|
|
420
420
|
$output: () => $output,
|
|
421
|
+
INVALID: () => INVALID,
|
|
421
422
|
NEVER: () => NEVER,
|
|
422
423
|
TimePrecision: () => TimePrecision,
|
|
423
424
|
ZodAny: () => ZodAny,
|
|
@@ -451,12 +452,14 @@ __export(exports_external, {
|
|
|
451
452
|
ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
|
|
452
453
|
ZodFunction: () => ZodFunction,
|
|
453
454
|
ZodGUID: () => ZodGUID,
|
|
455
|
+
ZodIBAN: () => ZodIBAN,
|
|
454
456
|
ZodIPv4: () => ZodIPv4,
|
|
455
457
|
ZodIPv6: () => ZodIPv6,
|
|
456
458
|
ZodISODate: () => ZodISODate,
|
|
457
459
|
ZodISODateTime: () => ZodISODateTime,
|
|
458
460
|
ZodISODuration: () => ZodISODuration,
|
|
459
461
|
ZodISOTime: () => ZodISOTime,
|
|
462
|
+
ZodInstanceOf: () => ZodInstanceOf,
|
|
460
463
|
ZodIntersection: () => ZodIntersection,
|
|
461
464
|
ZodIssueCode: () => ZodIssueCode,
|
|
462
465
|
ZodJWT: () => ZodJWT,
|
|
@@ -522,6 +525,7 @@ __export(exports_external, {
|
|
|
522
525
|
creditCard: () => creditCard2,
|
|
523
526
|
cuid: () => cuid3,
|
|
524
527
|
cuid2: () => cuid22,
|
|
528
|
+
currencyCode: () => currencyCode2,
|
|
525
529
|
custom: () => custom,
|
|
526
530
|
date: () => date2,
|
|
527
531
|
decode: () => decode2,
|
|
@@ -554,6 +558,7 @@ __export(exports_external, {
|
|
|
554
558
|
hex: () => hex2,
|
|
555
559
|
hostname: () => hostname2,
|
|
556
560
|
httpUrl: () => httpUrl,
|
|
561
|
+
iban: () => iban2,
|
|
557
562
|
includes: () => _includes,
|
|
558
563
|
input: () => input,
|
|
559
564
|
instanceof: () => _instanceof,
|
|
@@ -665,11 +670,12 @@ __export(exports_external, {
|
|
|
665
670
|
validate: () => validate,
|
|
666
671
|
validateAsync: () => validateAsync,
|
|
667
672
|
void: () => _void2,
|
|
673
|
+
withParser: () => withParser,
|
|
668
674
|
xid: () => xid2,
|
|
669
675
|
xor: () => xor
|
|
670
676
|
});
|
|
671
677
|
|
|
672
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
678
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/index.js
|
|
673
679
|
var exports_core2 = {};
|
|
674
680
|
__export(exports_core2, {
|
|
675
681
|
$ZodAny: () => $ZodAny,
|
|
@@ -701,6 +707,7 @@ __export(exports_core2, {
|
|
|
701
707
|
$ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
|
|
702
708
|
$ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
|
|
703
709
|
$ZodCheckOverwrite: () => $ZodCheckOverwrite,
|
|
710
|
+
$ZodCheckProperties: () => $ZodCheckProperties,
|
|
704
711
|
$ZodCheckProperty: () => $ZodCheckProperty,
|
|
705
712
|
$ZodCheckRegex: () => $ZodCheckRegex,
|
|
706
713
|
$ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
|
|
@@ -725,6 +732,7 @@ __export(exports_core2, {
|
|
|
725
732
|
$ZodFile: () => $ZodFile,
|
|
726
733
|
$ZodFunction: () => $ZodFunction,
|
|
727
734
|
$ZodGUID: () => $ZodGUID,
|
|
735
|
+
$ZodIBAN: () => $ZodIBAN,
|
|
728
736
|
$ZodIPv4: () => $ZodIPv4,
|
|
729
737
|
$ZodIPv6: () => $ZodIPv6,
|
|
730
738
|
$ZodISODate: () => $ZodISODate,
|
|
@@ -826,6 +834,7 @@ __export(exports_core2, {
|
|
|
826
834
|
_gt: () => _gt,
|
|
827
835
|
_gte: () => _gte,
|
|
828
836
|
_guid: () => _guid,
|
|
837
|
+
_iban: () => _iban,
|
|
829
838
|
_includes: () => _includes,
|
|
830
839
|
_int: () => _int,
|
|
831
840
|
_int32: () => _int32,
|
|
@@ -917,6 +926,9 @@ __export(exports_core2, {
|
|
|
917
926
|
_void: () => _void,
|
|
918
927
|
_xid: () => _xid,
|
|
919
928
|
_xor: () => _xor,
|
|
929
|
+
base64Charset: () => base64Charset,
|
|
930
|
+
base64urlCharset: () => base64urlCharset,
|
|
931
|
+
canParseURL: () => canParseURL,
|
|
920
932
|
clone: () => clone,
|
|
921
933
|
compile: () => compile,
|
|
922
934
|
compileFn: () => compileFn,
|
|
@@ -943,6 +955,7 @@ __export(exports_core2, {
|
|
|
943
955
|
isValidBase64URL: () => isValidBase64URL,
|
|
944
956
|
isValidCIDRv6: () => isValidCIDRv6,
|
|
945
957
|
isValidCreditCard: () => isValidCreditCard,
|
|
958
|
+
isValidIBAN: () => isValidIBAN,
|
|
946
959
|
isValidIPv6: () => isValidIPv6,
|
|
947
960
|
isValidJWT: () => isValidJWT,
|
|
948
961
|
locales: () => exports_locales,
|
|
@@ -953,7 +966,8 @@ __export(exports_core2, {
|
|
|
953
966
|
parseAsync: () => parseAsync,
|
|
954
967
|
parseURLObject: () => parseURLObject,
|
|
955
968
|
prettifyError: () => prettifyError,
|
|
956
|
-
process: () =>
|
|
969
|
+
process: () => processSchema,
|
|
970
|
+
processSchema: () => processSchema,
|
|
957
971
|
regexes: () => exports_regexes,
|
|
958
972
|
registry: () => registry,
|
|
959
973
|
safeDecode: () => safeDecode,
|
|
@@ -973,10 +987,12 @@ __export(exports_core2, {
|
|
|
973
987
|
util: () => exports_util,
|
|
974
988
|
validate: () => validate,
|
|
975
989
|
validateAsync: () => validateAsync,
|
|
976
|
-
|
|
990
|
+
validateURL: () => validateURL,
|
|
991
|
+
version: () => version,
|
|
992
|
+
withParser: () => withParser
|
|
977
993
|
});
|
|
978
994
|
|
|
979
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
995
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/util.js
|
|
980
996
|
var exports_util = {};
|
|
981
997
|
__export(exports_util, {
|
|
982
998
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -1005,6 +1021,7 @@ __export(exports_util, {
|
|
|
1005
1021
|
createTransparentProxy: () => createTransparentProxy,
|
|
1006
1022
|
defineLazy: () => defineLazy,
|
|
1007
1023
|
defineLazyInternal: () => defineLazyInternal,
|
|
1024
|
+
derived: () => derived,
|
|
1008
1025
|
esc: () => esc,
|
|
1009
1026
|
escapeRegex: () => escapeRegex,
|
|
1010
1027
|
explicitlyAborted: () => explicitlyAborted,
|
|
@@ -1042,6 +1059,7 @@ __export(exports_util, {
|
|
|
1042
1059
|
promiseAllObject: () => promiseAllObject,
|
|
1043
1060
|
propertyKeyTypes: () => propertyKeyTypes,
|
|
1044
1061
|
randomString: () => randomString,
|
|
1062
|
+
rawShape: () => rawShape,
|
|
1045
1063
|
required: () => required,
|
|
1046
1064
|
safeExtend: () => safeExtend,
|
|
1047
1065
|
shallowClone: () => shallowClone,
|
|
@@ -1080,18 +1098,23 @@ function jsonStringifyReplacer(_, value) {
|
|
|
1080
1098
|
return value.toString();
|
|
1081
1099
|
return value;
|
|
1082
1100
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1101
|
+
|
|
1102
|
+
class Cached {
|
|
1103
|
+
constructor(getter) {
|
|
1104
|
+
this._getter = getter;
|
|
1105
|
+
this._value = undefined;
|
|
1106
|
+
}
|
|
1107
|
+
get value() {
|
|
1108
|
+
const getter = this._getter;
|
|
1109
|
+
if (getter !== undefined) {
|
|
1110
|
+
this._value = getter();
|
|
1111
|
+
this._getter = undefined;
|
|
1093
1112
|
}
|
|
1094
|
-
|
|
1113
|
+
return this._value;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
function cached(getter) {
|
|
1117
|
+
return new Cached(getter);
|
|
1095
1118
|
}
|
|
1096
1119
|
function nullish(input) {
|
|
1097
1120
|
return input === null || input === undefined;
|
|
@@ -1142,6 +1165,56 @@ function assignProp(target, prop, value) {
|
|
|
1142
1165
|
configurable: true
|
|
1143
1166
|
});
|
|
1144
1167
|
}
|
|
1168
|
+
function rawShape(def) {
|
|
1169
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
1170
|
+
return desc?.get ? desc.get.raw : desc?.value;
|
|
1171
|
+
}
|
|
1172
|
+
function sourceShape(schema) {
|
|
1173
|
+
return rawShape(schema._zod.def) ?? schema._zod.def.shape;
|
|
1174
|
+
}
|
|
1175
|
+
function deferProp(target, key, getter) {
|
|
1176
|
+
Object.defineProperty(target, key, {
|
|
1177
|
+
get() {
|
|
1178
|
+
const value = getter();
|
|
1179
|
+
assignProp(this, key, value);
|
|
1180
|
+
return value;
|
|
1181
|
+
},
|
|
1182
|
+
enumerable: true,
|
|
1183
|
+
configurable: true
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
function putProp(target, key, value) {
|
|
1187
|
+
if (key in target)
|
|
1188
|
+
assignProp(target, key, value);
|
|
1189
|
+
else
|
|
1190
|
+
target[key] = value;
|
|
1191
|
+
}
|
|
1192
|
+
function mirrorShape(target, source, keys, wrap) {
|
|
1193
|
+
const raw = sourceShape(source);
|
|
1194
|
+
for (const key of keys) {
|
|
1195
|
+
const desc = Object.getOwnPropertyDescriptor(raw, key);
|
|
1196
|
+
if (!desc.enumerable)
|
|
1197
|
+
continue;
|
|
1198
|
+
if (desc.get) {
|
|
1199
|
+
deferProp(target, key, () => {
|
|
1200
|
+
const value = source._zod.def.shape[key];
|
|
1201
|
+
return wrap ? wrap(value, key) : value;
|
|
1202
|
+
});
|
|
1203
|
+
} else
|
|
1204
|
+
putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
function mirrorProps(target, source) {
|
|
1208
|
+
for (const key of Reflect.ownKeys(source)) {
|
|
1209
|
+
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
1210
|
+
if (!desc.enumerable)
|
|
1211
|
+
continue;
|
|
1212
|
+
if (desc.get)
|
|
1213
|
+
deferProp(target, key, () => source[key]);
|
|
1214
|
+
else
|
|
1215
|
+
putProp(target, key, desc.value);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1145
1218
|
function mergeDefs(...defs) {
|
|
1146
1219
|
const mergedDescriptors = {};
|
|
1147
1220
|
for (const def of defs) {
|
|
@@ -1379,23 +1452,21 @@ function pick(schema, mask) {
|
|
|
1379
1452
|
if (hasChecks) {
|
|
1380
1453
|
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
1381
1454
|
}
|
|
1382
|
-
const
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
});
|
|
1398
|
-
return clone(schema, def);
|
|
1455
|
+
const newShape = {};
|
|
1456
|
+
mirrorShape(newShape, schema, maskedKeys(schema, mask));
|
|
1457
|
+
return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
|
|
1458
|
+
}
|
|
1459
|
+
function maskedKeys(schema, mask) {
|
|
1460
|
+
const raw = sourceShape(schema);
|
|
1461
|
+
const keys = [];
|
|
1462
|
+
for (const key of Reflect.ownKeys(mask)) {
|
|
1463
|
+
if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {
|
|
1464
|
+
throw new Error(`Unrecognized key: "${String(key)}"`);
|
|
1465
|
+
}
|
|
1466
|
+
if (mask[key])
|
|
1467
|
+
keys.push(key);
|
|
1468
|
+
}
|
|
1469
|
+
return keys;
|
|
1399
1470
|
}
|
|
1400
1471
|
function omit(schema, mask) {
|
|
1401
1472
|
const currDef = schema._zod.def;
|
|
@@ -1404,23 +1475,10 @@ function omit(schema, mask) {
|
|
|
1404
1475
|
if (hasChecks) {
|
|
1405
1476
|
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
1406
1477
|
}
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
|
|
1412
|
-
throw new Error(`Unrecognized key: "${String(key)}"`);
|
|
1413
|
-
}
|
|
1414
|
-
if (!mask[key])
|
|
1415
|
-
continue;
|
|
1416
|
-
delete newShape[key];
|
|
1417
|
-
}
|
|
1418
|
-
assignProp(this, "shape", newShape);
|
|
1419
|
-
return newShape;
|
|
1420
|
-
},
|
|
1421
|
-
checks: []
|
|
1422
|
-
});
|
|
1423
|
-
return clone(schema, def);
|
|
1478
|
+
const omitted = new Set(maskedKeys(schema, mask));
|
|
1479
|
+
const newShape = {};
|
|
1480
|
+
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
|
|
1481
|
+
return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
|
|
1424
1482
|
}
|
|
1425
1483
|
function extend(schema, shape) {
|
|
1426
1484
|
if (!isPlainObject(shape)) {
|
|
@@ -1429,34 +1487,26 @@ function extend(schema, shape) {
|
|
|
1429
1487
|
const checks = schema._zod.def.checks;
|
|
1430
1488
|
const hasChecks = checks && checks.length > 0;
|
|
1431
1489
|
if (hasChecks) {
|
|
1432
|
-
const existingShape = schema
|
|
1490
|
+
const existingShape = sourceShape(schema);
|
|
1433
1491
|
for (const key of Reflect.ownKeys(shape)) {
|
|
1434
1492
|
if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {
|
|
1435
1493
|
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
1436
1494
|
}
|
|
1437
1495
|
}
|
|
1438
1496
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
return clone(schema, def);
|
|
1497
|
+
return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
|
|
1498
|
+
}
|
|
1499
|
+
function extended(schema, shape) {
|
|
1500
|
+
const newShape = {};
|
|
1501
|
+
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));
|
|
1502
|
+
mirrorProps(newShape, shape);
|
|
1503
|
+
return newShape;
|
|
1447
1504
|
}
|
|
1448
1505
|
function safeExtend(schema, shape) {
|
|
1449
1506
|
if (!isPlainObject(shape)) {
|
|
1450
1507
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
1451
1508
|
}
|
|
1452
|
-
|
|
1453
|
-
get shape() {
|
|
1454
|
-
const _shape = { ...schema._zod.def.shape, ...shape };
|
|
1455
|
-
assignProp(this, "shape", _shape);
|
|
1456
|
-
return _shape;
|
|
1457
|
-
}
|
|
1458
|
-
});
|
|
1459
|
-
return clone(schema, def);
|
|
1509
|
+
return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
|
|
1460
1510
|
}
|
|
1461
1511
|
function merge(a, b) {
|
|
1462
1512
|
if (!b?._zod?.def) {
|
|
@@ -1465,12 +1515,11 @@ function merge(a, b) {
|
|
|
1465
1515
|
if (a._zod.def.checks?.length) {
|
|
1466
1516
|
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1467
1517
|
}
|
|
1518
|
+
const newShape = {};
|
|
1519
|
+
mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
|
|
1520
|
+
mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
|
|
1468
1521
|
const def = mergeDefs(a._zod.def, {
|
|
1469
|
-
|
|
1470
|
-
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
1471
|
-
assignProp(this, "shape", _shape);
|
|
1472
|
-
return _shape;
|
|
1473
|
-
},
|
|
1522
|
+
shape: newShape,
|
|
1474
1523
|
get catchall() {
|
|
1475
1524
|
return b._zod.def.catchall;
|
|
1476
1525
|
},
|
|
@@ -1485,67 +1534,16 @@ function partial(Class, schema, mask, name = "partial") {
|
|
|
1485
1534
|
if (hasChecks) {
|
|
1486
1535
|
throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
|
|
1487
1536
|
}
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
if (mask) {
|
|
1493
|
-
for (const key of Reflect.ownKeys(mask)) {
|
|
1494
|
-
if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {
|
|
1495
|
-
throw new Error(`Unrecognized key: "${String(key)}"`);
|
|
1496
|
-
}
|
|
1497
|
-
if (!mask[key])
|
|
1498
|
-
continue;
|
|
1499
|
-
shape[key] = Class ? new Class({
|
|
1500
|
-
type: "optional",
|
|
1501
|
-
innerType: oldShape[key]
|
|
1502
|
-
}) : oldShape[key];
|
|
1503
|
-
}
|
|
1504
|
-
} else {
|
|
1505
|
-
for (const key of Reflect.ownKeys(oldShape)) {
|
|
1506
|
-
shape[key] = Class ? new Class({
|
|
1507
|
-
type: "optional",
|
|
1508
|
-
innerType: oldShape[key]
|
|
1509
|
-
}) : oldShape[key];
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
assignProp(this, "shape", shape);
|
|
1513
|
-
return shape;
|
|
1514
|
-
},
|
|
1515
|
-
checks: []
|
|
1516
|
-
});
|
|
1517
|
-
return clone(schema, def);
|
|
1537
|
+
const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;
|
|
1538
|
+
const newShape = {};
|
|
1539
|
+
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class && ((value, key) => selected && !selected.has(key) ? value : new Class({ type: "optional", innerType: value })));
|
|
1540
|
+
return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
|
|
1518
1541
|
}
|
|
1519
1542
|
function required(Class, schema, mask) {
|
|
1520
|
-
const
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
if (mask) {
|
|
1525
|
-
for (const key of Reflect.ownKeys(mask)) {
|
|
1526
|
-
if (!Object.prototype.hasOwnProperty.call(shape, key)) {
|
|
1527
|
-
throw new Error(`Unrecognized key: "${String(key)}"`);
|
|
1528
|
-
}
|
|
1529
|
-
if (!mask[key])
|
|
1530
|
-
continue;
|
|
1531
|
-
shape[key] = new Class({
|
|
1532
|
-
type: "nonoptional",
|
|
1533
|
-
innerType: oldShape[key]
|
|
1534
|
-
});
|
|
1535
|
-
}
|
|
1536
|
-
} else {
|
|
1537
|
-
for (const key of Reflect.ownKeys(oldShape)) {
|
|
1538
|
-
shape[key] = new Class({
|
|
1539
|
-
type: "nonoptional",
|
|
1540
|
-
innerType: oldShape[key]
|
|
1541
|
-
});
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
assignProp(this, "shape", shape);
|
|
1545
|
-
return shape;
|
|
1546
|
-
}
|
|
1547
|
-
});
|
|
1548
|
-
return clone(schema, def);
|
|
1543
|
+
const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;
|
|
1544
|
+
const newShape = {};
|
|
1545
|
+
mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => selected && !selected.has(key) ? value : new Class({ type: "nonoptional", innerType: value }));
|
|
1546
|
+
return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));
|
|
1549
1547
|
}
|
|
1550
1548
|
function aborted(x, startIndex = 0) {
|
|
1551
1549
|
if (x.aborted === true)
|
|
@@ -1595,13 +1593,18 @@ function finalizeIssue(iss, ctx, config2) {
|
|
|
1595
1593
|
}
|
|
1596
1594
|
const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : undefined;
|
|
1597
1595
|
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1600
|
-
|
|
1596
|
+
const full = {};
|
|
1597
|
+
for (const k of Object.keys(iss)) {
|
|
1598
|
+
if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__")
|
|
1599
|
+
continue;
|
|
1600
|
+
full[k] = iss[k];
|
|
1601
|
+
}
|
|
1602
|
+
full.path ?? (full.path = []);
|
|
1603
|
+
full.message = message;
|
|
1601
1604
|
if (ctx?.reportInput) {
|
|
1602
|
-
|
|
1605
|
+
full.input = iss.input;
|
|
1603
1606
|
}
|
|
1604
|
-
return
|
|
1607
|
+
return full;
|
|
1605
1608
|
}
|
|
1606
1609
|
function getSizableOrigin(input) {
|
|
1607
1610
|
if (input instanceof Set)
|
|
@@ -1728,6 +1731,22 @@ function own(inst, key, value, enumerable = true) {
|
|
|
1728
1731
|
function hide(inst, key, value) {
|
|
1729
1732
|
return own(inst, key, value, false);
|
|
1730
1733
|
}
|
|
1734
|
+
function derived(computes, table) {
|
|
1735
|
+
for (const key in computes) {
|
|
1736
|
+
const compute = computes[key];
|
|
1737
|
+
Object.defineProperty(table, key, {
|
|
1738
|
+
configurable: true,
|
|
1739
|
+
enumerable: true,
|
|
1740
|
+
get() {
|
|
1741
|
+
return own(this, key, compute(this));
|
|
1742
|
+
},
|
|
1743
|
+
set(value) {
|
|
1744
|
+
own(this, key, value);
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1747
|
+
}
|
|
1748
|
+
return table;
|
|
1749
|
+
}
|
|
1731
1750
|
function defineBound(proto, key, fn) {
|
|
1732
1751
|
Object.defineProperty(proto, key, {
|
|
1733
1752
|
configurable: true,
|
|
@@ -1809,7 +1828,7 @@ function constantCatch(value) {
|
|
|
1809
1828
|
return fn;
|
|
1810
1829
|
}
|
|
1811
1830
|
|
|
1812
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
1831
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/core.js
|
|
1813
1832
|
var _a;
|
|
1814
1833
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1815
1834
|
status: "aborted"
|
|
@@ -1854,8 +1873,7 @@ function $constructor(name, initializer, proto, params) {
|
|
|
1854
1873
|
} finally {
|
|
1855
1874
|
_zodDesc.value = undefined;
|
|
1856
1875
|
}
|
|
1857
|
-
}
|
|
1858
|
-
if (inst._zod.traits.has(name)) {
|
|
1876
|
+
} else if (inst._zod.traits.has(name)) {
|
|
1859
1877
|
return;
|
|
1860
1878
|
}
|
|
1861
1879
|
inst._zod.traits.add(name);
|
|
@@ -1933,7 +1951,7 @@ function config2(newConfig) {
|
|
|
1933
1951
|
Object.assign(globalConfig, newConfig);
|
|
1934
1952
|
return globalConfig;
|
|
1935
1953
|
}
|
|
1936
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
1954
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/errors.js
|
|
1937
1955
|
function _getMessage() {
|
|
1938
1956
|
const internals = this._zod;
|
|
1939
1957
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -1948,16 +1966,12 @@ var _messageDesc = {
|
|
|
1948
1966
|
enumerable: true,
|
|
1949
1967
|
configurable: true
|
|
1950
1968
|
};
|
|
1951
|
-
var _zodDesc2 = { value: undefined, enumerable: false };
|
|
1952
1969
|
var _issuesDesc = { value: undefined, enumerable: false };
|
|
1953
1970
|
var _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
1954
1971
|
var initializer = (inst, def) => {
|
|
1955
1972
|
inst.name = "$ZodError";
|
|
1956
|
-
_zodDesc2.value = inst._zod;
|
|
1957
|
-
Object.defineProperty(inst, "_zod", _zodDesc2);
|
|
1958
1973
|
_issuesDesc.value = def;
|
|
1959
1974
|
Object.defineProperty(inst, "issues", _issuesDesc);
|
|
1960
|
-
_zodDesc2.value = undefined;
|
|
1961
1975
|
_issuesDesc.value = undefined;
|
|
1962
1976
|
Object.defineProperty(inst, "message", _messageDesc);
|
|
1963
1977
|
const proto = Object.getPrototypeOf(inst);
|
|
@@ -2130,7 +2144,7 @@ function prettifyError(error) {
|
|
|
2130
2144
|
`);
|
|
2131
2145
|
}
|
|
2132
2146
|
|
|
2133
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
2147
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/parse.js
|
|
2134
2148
|
function finalizeParams(callee, params) {
|
|
2135
2149
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
2136
2150
|
}
|
|
@@ -2173,33 +2187,50 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
2173
2187
|
if (result instanceof Promise) {
|
|
2174
2188
|
throw new $ZodAsyncError;
|
|
2175
2189
|
}
|
|
2176
|
-
return result.issues.length ? {
|
|
2177
|
-
success: false,
|
|
2178
|
-
error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config2())))
|
|
2179
|
-
} : { success: true, data: result.value };
|
|
2190
|
+
return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
|
|
2180
2191
|
};
|
|
2181
2192
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
2193
|
+
function failure(Err, issues, ctx) {
|
|
2194
|
+
let error;
|
|
2195
|
+
return {
|
|
2196
|
+
success: false,
|
|
2197
|
+
get error() {
|
|
2198
|
+
if (!error) {
|
|
2199
|
+
error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config2())));
|
|
2200
|
+
issues = undefined;
|
|
2201
|
+
ctx = undefined;
|
|
2202
|
+
}
|
|
2203
|
+
return error;
|
|
2204
|
+
},
|
|
2205
|
+
set error(e) {
|
|
2206
|
+
error = e;
|
|
2207
|
+
issues = undefined;
|
|
2208
|
+
ctx = undefined;
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
}
|
|
2182
2212
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
2183
2213
|
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2184
2214
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2185
2215
|
if (result instanceof Promise)
|
|
2186
2216
|
result = await result;
|
|
2187
|
-
return result.issues.length ? {
|
|
2188
|
-
success: false,
|
|
2189
|
-
error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config2())))
|
|
2190
|
-
} : { success: true, data: result.value };
|
|
2217
|
+
return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
|
|
2191
2218
|
};
|
|
2192
2219
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
2193
2220
|
var COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
2194
2221
|
var COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
2195
2222
|
var validate = (schema, value, _ctx) => {
|
|
2196
2223
|
const validator = schema._zod.bag.validator;
|
|
2197
|
-
if (validator !== undefined
|
|
2198
|
-
|
|
2224
|
+
if (validator !== undefined) {
|
|
2225
|
+
if (validator(value) !== COMPILE_INVALID)
|
|
2226
|
+
return true;
|
|
2227
|
+
if (validator.definite === true && _ctx === undefined)
|
|
2228
|
+
return false;
|
|
2229
|
+
}
|
|
2199
2230
|
return validateFallback(schema, value, _ctx);
|
|
2200
2231
|
};
|
|
2201
2232
|
function validateFallback(schema, value, _ctx) {
|
|
2202
|
-
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
2233
|
+
const ctx = _ctx ? { ..._ctx, async: false, abortEarly: true } : { async: false, abortEarly: true };
|
|
2203
2234
|
const fallbackRun = schema._zod.bag.fallbackRun;
|
|
2204
2235
|
let result;
|
|
2205
2236
|
if (fallbackRun) {
|
|
@@ -2214,7 +2245,7 @@ function validateFallback(schema, value, _ctx) {
|
|
|
2214
2245
|
return result.issues.length === 0;
|
|
2215
2246
|
}
|
|
2216
2247
|
var validateAsync = async (schema, value, _ctx) => {
|
|
2217
|
-
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
2248
|
+
const ctx = _ctx ? { ..._ctx, async: true, abortEarly: true } : { async: true, abortEarly: true };
|
|
2218
2249
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
2219
2250
|
if (result instanceof Promise)
|
|
2220
2251
|
result = await result;
|
|
@@ -2272,9 +2303,10 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2272
2303
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
2273
2304
|
};
|
|
2274
2305
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
2275
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
2306
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/regexes.js
|
|
2276
2307
|
var exports_regexes = {};
|
|
2277
2308
|
__export(exports_regexes, {
|
|
2309
|
+
anyString: () => anyString,
|
|
2278
2310
|
base64: () => base64,
|
|
2279
2311
|
base64url: () => base64url,
|
|
2280
2312
|
bigint: () => bigint,
|
|
@@ -2285,6 +2317,7 @@ __export(exports_regexes, {
|
|
|
2285
2317
|
creditCard: () => creditCard,
|
|
2286
2318
|
cuid: () => cuid,
|
|
2287
2319
|
cuid2: () => cuid2,
|
|
2320
|
+
currencyCode: () => currencyCode,
|
|
2288
2321
|
date: () => date,
|
|
2289
2322
|
datetime: () => datetime,
|
|
2290
2323
|
domain: () => domain,
|
|
@@ -2298,6 +2331,7 @@ __export(exports_regexes, {
|
|
|
2298
2331
|
hostname: () => hostname,
|
|
2299
2332
|
html5Email: () => html5Email,
|
|
2300
2333
|
httpProtocol: () => httpProtocol,
|
|
2334
|
+
iban: () => iban,
|
|
2301
2335
|
idnEmail: () => idnEmail,
|
|
2302
2336
|
integer: () => integer,
|
|
2303
2337
|
ipv4: () => ipv4,
|
|
@@ -2357,13 +2391,13 @@ var uuid = (version) => {
|
|
|
2357
2391
|
var uuid4 = /* @__PURE__ */ uuid(4);
|
|
2358
2392
|
var uuid6 = /* @__PURE__ */ uuid(6);
|
|
2359
2393
|
var uuid7 = /* @__PURE__ */ uuid(7);
|
|
2360
|
-
var email = /^(
|
|
2394
|
+
var email = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
2361
2395
|
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])?)*$/;
|
|
2362
2396
|
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,}))$/;
|
|
2363
2397
|
var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
|
|
2364
2398
|
var idnEmail = unicodeEmail;
|
|
2365
2399
|
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])?)*$/;
|
|
2366
|
-
var _emoji = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
|
|
2400
|
+
var _emoji = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
|
|
2367
2401
|
function emoji() {
|
|
2368
2402
|
return new RegExp(_emoji, "u");
|
|
2369
2403
|
}
|
|
@@ -2376,12 +2410,14 @@ var mac = (delimiter) => {
|
|
|
2376
2410
|
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])$/;
|
|
2377
2411
|
var cidrv6 = /^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
2378
2412
|
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
2379
|
-
var base64url = /^[A-Za-z0-9_-]
|
|
2413
|
+
var base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
|
|
2380
2414
|
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])?)*\.?$/;
|
|
2381
2415
|
var domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/;
|
|
2382
2416
|
var httpProtocol = /^https?$/;
|
|
2383
2417
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2384
2418
|
var creditCard = /^\d(?:[ -]?\d){11,18}$/;
|
|
2419
|
+
var currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
|
|
2420
|
+
var iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
|
|
2385
2421
|
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])))`;
|
|
2386
2422
|
function anchor(source) {
|
|
2387
2423
|
return new RegExp(`^${source}$`);
|
|
@@ -2403,6 +2439,7 @@ function datetime(args) {
|
|
|
2403
2439
|
const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;
|
|
2404
2440
|
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
2405
2441
|
}
|
|
2442
|
+
var anyString = /^[\s\S]{0,}$/;
|
|
2406
2443
|
var string = (params) => {
|
|
2407
2444
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
2408
2445
|
return new RegExp(`^${regex}$`);
|
|
@@ -2438,7 +2475,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
2438
2475
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
2439
2476
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
2440
2477
|
|
|
2441
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
2478
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/checks.js
|
|
2442
2479
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2443
2480
|
var _a2;
|
|
2444
2481
|
inst._zod ?? (inst._zod = {});
|
|
@@ -2461,16 +2498,6 @@ var numericOriginMap = {
|
|
|
2461
2498
|
var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
2462
2499
|
$ZodCheck.init(inst, def);
|
|
2463
2500
|
const origin = numericOriginMap[typeof def.value];
|
|
2464
|
-
inst._zod.onattach.push((inst2) => {
|
|
2465
|
-
const bag = inst2._zod.bag;
|
|
2466
|
-
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
2467
|
-
if (def.value < curr) {
|
|
2468
|
-
if (def.inclusive)
|
|
2469
|
-
bag.maximum = def.value;
|
|
2470
|
-
else
|
|
2471
|
-
bag.exclusiveMaximum = def.value;
|
|
2472
|
-
}
|
|
2473
|
-
});
|
|
2474
2501
|
inst._zod.check = (payload) => {
|
|
2475
2502
|
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
|
|
2476
2503
|
return;
|
|
@@ -2489,16 +2516,6 @@ var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst,
|
|
|
2489
2516
|
var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
2490
2517
|
$ZodCheck.init(inst, def);
|
|
2491
2518
|
const origin = numericOriginMap[typeof def.value];
|
|
2492
|
-
inst._zod.onattach.push((inst2) => {
|
|
2493
|
-
const bag = inst2._zod.bag;
|
|
2494
|
-
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
2495
|
-
if (def.value > curr) {
|
|
2496
|
-
if (def.inclusive)
|
|
2497
|
-
bag.minimum = def.value;
|
|
2498
|
-
else
|
|
2499
|
-
bag.exclusiveMinimum = def.value;
|
|
2500
|
-
}
|
|
2501
|
-
});
|
|
2502
2519
|
inst._zod.check = (payload) => {
|
|
2503
2520
|
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
|
|
2504
2521
|
return;
|
|
@@ -2516,10 +2533,6 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
2516
2533
|
});
|
|
2517
2534
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2518
2535
|
$ZodCheck.init(inst, def);
|
|
2519
|
-
inst._zod.onattach.push((inst2) => {
|
|
2520
|
-
var _a2;
|
|
2521
|
-
(_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
|
|
2522
|
-
});
|
|
2523
2536
|
inst._zod.check = (payload) => {
|
|
2524
2537
|
if (typeof payload.value !== typeof def.value)
|
|
2525
2538
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
@@ -2542,14 +2555,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
2542
2555
|
const isInt = def.format?.includes("int");
|
|
2543
2556
|
const origin = isInt ? "int" : "number";
|
|
2544
2557
|
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
2545
|
-
inst._zod.onattach.push((inst2) => {
|
|
2546
|
-
const bag = inst2._zod.bag;
|
|
2547
|
-
bag.format = def.format;
|
|
2548
|
-
bag.minimum = minimum;
|
|
2549
|
-
bag.maximum = maximum;
|
|
2550
|
-
if (isInt)
|
|
2551
|
-
bag.pattern = integer;
|
|
2552
|
-
});
|
|
2553
2558
|
inst._zod.check = (payload) => {
|
|
2554
2559
|
const input = payload.value;
|
|
2555
2560
|
if (isInt) {
|
|
@@ -2618,12 +2623,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
2618
2623
|
var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
|
|
2619
2624
|
$ZodCheck.init(inst, def);
|
|
2620
2625
|
const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
|
|
2621
|
-
inst._zod.onattach.push((inst2) => {
|
|
2622
|
-
const bag = inst2._zod.bag;
|
|
2623
|
-
bag.format = def.format;
|
|
2624
|
-
bag.minimum = minimum;
|
|
2625
|
-
bag.maximum = maximum;
|
|
2626
|
-
});
|
|
2627
2626
|
inst._zod.check = (payload) => {
|
|
2628
2627
|
const input = payload.value;
|
|
2629
2628
|
if (input < minimum) {
|
|
@@ -2654,11 +2653,6 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2654
2653
|
var _a2;
|
|
2655
2654
|
$ZodCheck.init(inst, def);
|
|
2656
2655
|
(_a2 = inst._zod.def).when ?? (_a2.when = _whenHasSize);
|
|
2657
|
-
inst._zod.onattach.push((inst2) => {
|
|
2658
|
-
const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
2659
|
-
if (def.maximum < curr)
|
|
2660
|
-
inst2._zod.bag.maximum = def.maximum;
|
|
2661
|
-
});
|
|
2662
2656
|
inst._zod.check = (payload) => {
|
|
2663
2657
|
const input = payload.value;
|
|
2664
2658
|
const size = input.size;
|
|
@@ -2679,11 +2673,6 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2679
2673
|
var _a2;
|
|
2680
2674
|
$ZodCheck.init(inst, def);
|
|
2681
2675
|
(_a2 = inst._zod.def).when ?? (_a2.when = _whenHasSize);
|
|
2682
|
-
inst._zod.onattach.push((inst2) => {
|
|
2683
|
-
const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
2684
|
-
if (def.minimum > curr)
|
|
2685
|
-
inst2._zod.bag.minimum = def.minimum;
|
|
2686
|
-
});
|
|
2687
2676
|
inst._zod.check = (payload) => {
|
|
2688
2677
|
const input = payload.value;
|
|
2689
2678
|
const size = input.size;
|
|
@@ -2704,12 +2693,6 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2704
2693
|
var _a2;
|
|
2705
2694
|
$ZodCheck.init(inst, def);
|
|
2706
2695
|
(_a2 = inst._zod.def).when ?? (_a2.when = _whenHasSize);
|
|
2707
|
-
inst._zod.onattach.push((inst2) => {
|
|
2708
|
-
const bag = inst2._zod.bag;
|
|
2709
|
-
bag.minimum = def.size;
|
|
2710
|
-
bag.maximum = def.size;
|
|
2711
|
-
bag.size = def.size;
|
|
2712
|
-
});
|
|
2713
2696
|
inst._zod.check = (payload) => {
|
|
2714
2697
|
const input = payload.value;
|
|
2715
2698
|
const size = input.size;
|
|
@@ -2731,11 +2714,6 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2731
2714
|
var _a2;
|
|
2732
2715
|
$ZodCheck.init(inst, def);
|
|
2733
2716
|
(_a2 = inst._zod.def).when ?? (_a2.when = _whenHasLength);
|
|
2734
|
-
inst._zod.onattach.push((inst2) => {
|
|
2735
|
-
const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
2736
|
-
if (def.maximum < curr)
|
|
2737
|
-
inst2._zod.bag.maximum = def.maximum;
|
|
2738
|
-
});
|
|
2739
2717
|
inst._zod.check = (payload) => {
|
|
2740
2718
|
const input = payload.value;
|
|
2741
2719
|
const units = input.length;
|
|
@@ -2758,11 +2736,6 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2758
2736
|
var _a2;
|
|
2759
2737
|
$ZodCheck.init(inst, def);
|
|
2760
2738
|
(_a2 = inst._zod.def).when ?? (_a2.when = _whenHasLength);
|
|
2761
|
-
inst._zod.onattach.push((inst2) => {
|
|
2762
|
-
const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
2763
|
-
if (def.minimum > curr)
|
|
2764
|
-
inst2._zod.bag.minimum = def.minimum;
|
|
2765
|
-
});
|
|
2766
2739
|
inst._zod.check = (payload) => {
|
|
2767
2740
|
const input = payload.value;
|
|
2768
2741
|
const units = input.length;
|
|
@@ -2785,12 +2758,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2785
2758
|
var _a2;
|
|
2786
2759
|
$ZodCheck.init(inst, def);
|
|
2787
2760
|
(_a2 = inst._zod.def).when ?? (_a2.when = _whenHasLength);
|
|
2788
|
-
inst._zod.onattach.push((inst2) => {
|
|
2789
|
-
const bag = inst2._zod.bag;
|
|
2790
|
-
bag.minimum = def.length;
|
|
2791
|
-
bag.maximum = def.length;
|
|
2792
|
-
bag.length = def.length;
|
|
2793
|
-
});
|
|
2794
2761
|
inst._zod.check = (payload) => {
|
|
2795
2762
|
const input = payload.value;
|
|
2796
2763
|
const units = input.length;
|
|
@@ -2813,14 +2780,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2813
2780
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2814
2781
|
var _a2, _b;
|
|
2815
2782
|
$ZodCheck.init(inst, def);
|
|
2816
|
-
inst._zod.onattach.push((inst2) => {
|
|
2817
|
-
const bag = inst2._zod.bag;
|
|
2818
|
-
bag.format = def.format;
|
|
2819
|
-
if (def.pattern) {
|
|
2820
|
-
bag.patterns ?? (bag.patterns = new Set);
|
|
2821
|
-
bag.patterns.add(def.pattern);
|
|
2822
|
-
}
|
|
2823
|
-
});
|
|
2824
2783
|
if (def.pattern)
|
|
2825
2784
|
(_a2 = inst._zod).check ?? (_a2.check = (payload) => {
|
|
2826
2785
|
def.pattern.lastIndex = 0;
|
|
@@ -2869,11 +2828,6 @@ var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst,
|
|
|
2869
2828
|
const escapedRegex = escapeRegex(def.includes);
|
|
2870
2829
|
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
|
|
2871
2830
|
def.pattern = pattern;
|
|
2872
|
-
inst._zod.onattach.push((inst2) => {
|
|
2873
|
-
const bag = inst2._zod.bag;
|
|
2874
|
-
bag.patterns ?? (bag.patterns = new Set);
|
|
2875
|
-
bag.patterns.add(pattern);
|
|
2876
|
-
});
|
|
2877
2831
|
inst._zod.check = (payload) => {
|
|
2878
2832
|
if (payload.value.includes(def.includes, def.position))
|
|
2879
2833
|
return;
|
|
@@ -2892,11 +2846,6 @@ var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (i
|
|
|
2892
2846
|
$ZodCheck.init(inst, def);
|
|
2893
2847
|
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
2894
2848
|
def.pattern ?? (def.pattern = pattern);
|
|
2895
|
-
inst._zod.onattach.push((inst2) => {
|
|
2896
|
-
const bag = inst2._zod.bag;
|
|
2897
|
-
bag.patterns ?? (bag.patterns = new Set);
|
|
2898
|
-
bag.patterns.add(pattern);
|
|
2899
|
-
});
|
|
2900
2849
|
inst._zod.check = (payload) => {
|
|
2901
2850
|
if (payload.value.startsWith(def.prefix))
|
|
2902
2851
|
return;
|
|
@@ -2915,11 +2864,6 @@ var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst,
|
|
|
2915
2864
|
$ZodCheck.init(inst, def);
|
|
2916
2865
|
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
2917
2866
|
def.pattern ?? (def.pattern = pattern);
|
|
2918
|
-
inst._zod.onattach.push((inst2) => {
|
|
2919
|
-
const bag = inst2._zod.bag;
|
|
2920
|
-
bag.patterns ?? (bag.patterns = new Set);
|
|
2921
|
-
bag.patterns.add(pattern);
|
|
2922
|
-
});
|
|
2923
2867
|
inst._zod.check = (payload) => {
|
|
2924
2868
|
if (payload.value.endsWith(def.suffix))
|
|
2925
2869
|
return;
|
|
@@ -2953,12 +2897,39 @@ var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst,
|
|
|
2953
2897
|
return;
|
|
2954
2898
|
};
|
|
2955
2899
|
});
|
|
2900
|
+
var $ZodCheckProperties = /* @__PURE__ */ $constructor("$ZodCheckProperties", (inst, def) => {
|
|
2901
|
+
$ZodCheck.init(inst, def);
|
|
2902
|
+
hide(inst, Symbol.iterator, function* () {
|
|
2903
|
+
yield inst;
|
|
2904
|
+
});
|
|
2905
|
+
let entries;
|
|
2906
|
+
inst._zod.check = (payload) => {
|
|
2907
|
+
if (payload.value == null) {
|
|
2908
|
+
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
2909
|
+
return;
|
|
2910
|
+
}
|
|
2911
|
+
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
2912
|
+
const input = payload.value;
|
|
2913
|
+
let proms;
|
|
2914
|
+
for (const [key, schema] of entries) {
|
|
2915
|
+
const result = schema._zod.run({ value: input[key], issues: [] }, {});
|
|
2916
|
+
if (result instanceof Promise) {
|
|
2917
|
+
proms ?? (proms = []);
|
|
2918
|
+
proms.push(result.then((result2) => handleCheckPropertyResult(result2, payload, key)));
|
|
2919
|
+
} else {
|
|
2920
|
+
handleCheckPropertyResult(result, payload, key);
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
if (proms)
|
|
2924
|
+
return Promise.all(proms).then(() => {
|
|
2925
|
+
return;
|
|
2926
|
+
});
|
|
2927
|
+
return;
|
|
2928
|
+
};
|
|
2929
|
+
});
|
|
2956
2930
|
var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
|
|
2957
2931
|
$ZodCheck.init(inst, def);
|
|
2958
2932
|
const mimeSet = new Set(def.mime);
|
|
2959
|
-
inst._zod.onattach.push((inst2) => {
|
|
2960
|
-
inst2._zod.bag.mime = def.mime;
|
|
2961
|
-
});
|
|
2962
2933
|
inst._zod.check = (payload) => {
|
|
2963
2934
|
if (mimeSet.has(payload.value.type))
|
|
2964
2935
|
return;
|
|
@@ -2978,7 +2949,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2978
2949
|
};
|
|
2979
2950
|
});
|
|
2980
2951
|
|
|
2981
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
2952
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/doc.js
|
|
2982
2953
|
class Doc {
|
|
2983
2954
|
constructor(args = [], closed = {}) {
|
|
2984
2955
|
this.content = [];
|
|
@@ -2988,8 +2959,11 @@ class Doc {
|
|
|
2988
2959
|
}
|
|
2989
2960
|
indented(fn) {
|
|
2990
2961
|
this.indent += 1;
|
|
2991
|
-
|
|
2992
|
-
|
|
2962
|
+
try {
|
|
2963
|
+
fn(this);
|
|
2964
|
+
} finally {
|
|
2965
|
+
this.indent -= 1;
|
|
2966
|
+
}
|
|
2993
2967
|
}
|
|
2994
2968
|
write(arg) {
|
|
2995
2969
|
if (typeof arg === "function") {
|
|
@@ -3017,14 +2991,14 @@ ${content.join(`
|
|
|
3017
2991
|
}
|
|
3018
2992
|
}
|
|
3019
2993
|
|
|
3020
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
2994
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/versions.js
|
|
3021
2995
|
var version = {
|
|
3022
2996
|
major: 4,
|
|
3023
|
-
minor:
|
|
3024
|
-
patch:
|
|
2997
|
+
minor: 6,
|
|
2998
|
+
patch: 5
|
|
3025
2999
|
};
|
|
3026
3000
|
|
|
3027
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
3001
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/schemas.js
|
|
3028
3002
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3029
3003
|
var _a2;
|
|
3030
3004
|
inst ?? (inst = {});
|
|
@@ -3133,15 +3107,21 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3133
3107
|
own(this, "~standard", value);
|
|
3134
3108
|
}
|
|
3135
3109
|
});
|
|
3136
|
-
var toStandardResult = (r) => r.
|
|
3110
|
+
var toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config2())) } : { value: r.value };
|
|
3111
|
+
async function validateAsync2(inst, value) {
|
|
3112
|
+
const ctx = { async: true };
|
|
3113
|
+
return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx);
|
|
3114
|
+
}
|
|
3137
3115
|
function standardProps(inst) {
|
|
3138
3116
|
return {
|
|
3139
3117
|
validate: (value) => {
|
|
3118
|
+
const ctx = { async: false };
|
|
3140
3119
|
try {
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
}
|
|
3120
|
+
const r = inst._zod.run({ value, issues: [] }, ctx);
|
|
3121
|
+
if (!(r instanceof Promise))
|
|
3122
|
+
return toStandardResult(r, ctx);
|
|
3123
|
+
} catch (_) {}
|
|
3124
|
+
return validateAsync2(inst, value);
|
|
3145
3125
|
},
|
|
3146
3126
|
vendor: "zod",
|
|
3147
3127
|
version: 1
|
|
@@ -3149,7 +3129,7 @@ function standardProps(inst) {
|
|
|
3149
3129
|
}
|
|
3150
3130
|
var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
3151
3131
|
$ZodType.init(inst, def);
|
|
3152
|
-
inst._zod.pattern =
|
|
3132
|
+
inst._zod.pattern = def.pattern ?? anyString;
|
|
3153
3133
|
inst._zod.parse = (payload, _) => {
|
|
3154
3134
|
if (def.coerce)
|
|
3155
3135
|
try {
|
|
@@ -3200,11 +3180,32 @@ var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
|
3200
3180
|
});
|
|
3201
3181
|
var URL_BAD_FORMAT = 1;
|
|
3202
3182
|
var URL_UNPARSEABLE = 2;
|
|
3183
|
+
function canParseURL(input) {
|
|
3184
|
+
try {
|
|
3185
|
+
if (typeof URL !== "undefined" && typeof URL.canParse === "function")
|
|
3186
|
+
return URL.canParse(input);
|
|
3187
|
+
new URL(input);
|
|
3188
|
+
return true;
|
|
3189
|
+
} catch {
|
|
3190
|
+
return false;
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
function validateURL(trimmed, def) {
|
|
3194
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
|
|
3195
|
+
return canParseURL(trimmed) || URL_UNPARSEABLE;
|
|
3196
|
+
}
|
|
3197
|
+
return parseURLObject(trimmed, def);
|
|
3198
|
+
}
|
|
3203
3199
|
function parseURLObject(trimmed, def) {
|
|
3204
3200
|
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
|
|
3205
3201
|
return URL_BAD_FORMAT;
|
|
3206
3202
|
}
|
|
3207
3203
|
try {
|
|
3204
|
+
if (typeof URL !== "undefined") {
|
|
3205
|
+
const URLStatic = URL;
|
|
3206
|
+
if (typeof URLStatic.parse === "function")
|
|
3207
|
+
return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
|
|
3208
|
+
}
|
|
3208
3209
|
return new URL(trimmed);
|
|
3209
3210
|
} catch {
|
|
3210
3211
|
return URL_UNPARSEABLE;
|
|
@@ -3227,7 +3228,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3227
3228
|
inst._zod.check = (payload) => {
|
|
3228
3229
|
try {
|
|
3229
3230
|
const trimmed = payload.value.trim();
|
|
3230
|
-
const url =
|
|
3231
|
+
const url = validateURL(trimmed, def);
|
|
3231
3232
|
if (url === URL_BAD_FORMAT) {
|
|
3232
3233
|
payload.issues.push({
|
|
3233
3234
|
code: "invalid_format",
|
|
@@ -3249,6 +3250,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3249
3250
|
});
|
|
3250
3251
|
return;
|
|
3251
3252
|
}
|
|
3253
|
+
if (url === true) {
|
|
3254
|
+
payload.value = stripTabAndNewline(trimmed);
|
|
3255
|
+
return;
|
|
3256
|
+
}
|
|
3252
3257
|
if (def.hostname && !urlHostnameOk(url, def.hostname)) {
|
|
3253
3258
|
payload.issues.push({
|
|
3254
3259
|
code: "invalid_format",
|
|
@@ -3317,12 +3322,6 @@ var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
|
|
|
3317
3322
|
var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
|
|
3318
3323
|
def.pattern ?? (def.pattern = datetime(def));
|
|
3319
3324
|
$ZodStringFormat.init(inst, def);
|
|
3320
|
-
if (def.local || def.precision === -1) {
|
|
3321
|
-
inst._zod.bag.laxFormat = true;
|
|
3322
|
-
inst._zod.onattach.push((s) => {
|
|
3323
|
-
s._zod.bag.laxFormat = true;
|
|
3324
|
-
});
|
|
3325
|
-
}
|
|
3326
3325
|
});
|
|
3327
3326
|
var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
3328
3327
|
def.pattern ?? (def.pattern = date);
|
|
@@ -3339,23 +3338,16 @@ var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def
|
|
|
3339
3338
|
var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
3340
3339
|
def.pattern ?? (def.pattern = ipv4);
|
|
3341
3340
|
$ZodStringFormat.init(inst, def);
|
|
3342
|
-
inst._zod.bag.format = `ipv4`;
|
|
3343
3341
|
});
|
|
3344
3342
|
var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
3345
3343
|
function isValidIPv6(value) {
|
|
3346
3344
|
if (!ipv6Alphabet.test(value))
|
|
3347
3345
|
return false;
|
|
3348
|
-
|
|
3349
|
-
new URL(`http://[${value}]`);
|
|
3350
|
-
return true;
|
|
3351
|
-
} catch {
|
|
3352
|
-
return false;
|
|
3353
|
-
}
|
|
3346
|
+
return canParseURL(`http://[${value}]`);
|
|
3354
3347
|
}
|
|
3355
3348
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
3356
3349
|
def.pattern ?? (def.pattern = ipv6);
|
|
3357
3350
|
$ZodStringFormat.init(inst, def);
|
|
3358
|
-
inst._zod.bag.format = `ipv6`;
|
|
3359
3351
|
inst._zod.check = (payload) => {
|
|
3360
3352
|
if (!isValidIPv6(payload.value)) {
|
|
3361
3353
|
payload.issues.push({
|
|
@@ -3371,7 +3363,6 @@ var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
|
3371
3363
|
var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
|
|
3372
3364
|
def.pattern ?? (def.pattern = mac(def.delimiter));
|
|
3373
3365
|
$ZodStringFormat.init(inst, def);
|
|
3374
|
-
inst._zod.bag.format = `mac`;
|
|
3375
3366
|
});
|
|
3376
3367
|
var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
3377
3368
|
def.pattern ?? (def.pattern = cidrv4);
|
|
@@ -3420,10 +3411,10 @@ function isValidBase64(data) {
|
|
|
3420
3411
|
return false;
|
|
3421
3412
|
}
|
|
3422
3413
|
}
|
|
3414
|
+
var base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
|
|
3423
3415
|
var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
3424
|
-
def.pattern ?? (def.pattern =
|
|
3416
|
+
def.pattern ?? (def.pattern = base64Charset);
|
|
3425
3417
|
$ZodStringFormat.init(inst, def);
|
|
3426
|
-
inst._zod.bag.contentEncoding = "base64";
|
|
3427
3418
|
inst._zod.check = (payload) => {
|
|
3428
3419
|
if (isValidBase64(payload.value))
|
|
3429
3420
|
return;
|
|
@@ -3436,17 +3427,17 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
|
3436
3427
|
});
|
|
3437
3428
|
};
|
|
3438
3429
|
});
|
|
3430
|
+
var base64urlCharset = /^[A-Za-z0-9_-]*$/;
|
|
3439
3431
|
function isValidBase64URL(data) {
|
|
3440
|
-
if (!
|
|
3432
|
+
if (!base64urlCharset.test(data))
|
|
3441
3433
|
return false;
|
|
3442
3434
|
const base642 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
3443
3435
|
const padded = base642.padEnd(Math.ceil(base642.length / 4) * 4, "=");
|
|
3444
3436
|
return isValidBase64(padded);
|
|
3445
3437
|
}
|
|
3446
3438
|
var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
3447
|
-
def.pattern ?? (def.pattern =
|
|
3439
|
+
def.pattern ?? (def.pattern = base64urlCharset);
|
|
3448
3440
|
$ZodStringFormat.init(inst, def);
|
|
3449
|
-
inst._zod.bag.contentEncoding = "base64url";
|
|
3450
3441
|
inst._zod.check = (payload) => {
|
|
3451
3442
|
if (isValidBase64URL(payload.value))
|
|
3452
3443
|
return;
|
|
@@ -3469,7 +3460,7 @@ function isLuhnAlgo(digits) {
|
|
|
3469
3460
|
let bit = 1;
|
|
3470
3461
|
let sum = 0;
|
|
3471
3462
|
while (length) {
|
|
3472
|
-
const value =
|
|
3463
|
+
const value = digits.charCodeAt(--length) - 48;
|
|
3473
3464
|
bit ^= 1;
|
|
3474
3465
|
sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
|
|
3475
3466
|
}
|
|
@@ -3495,6 +3486,39 @@ var $ZodCreditCard = /* @__PURE__ */ $constructor("$ZodCreditCard", (inst, def)
|
|
|
3495
3486
|
});
|
|
3496
3487
|
};
|
|
3497
3488
|
});
|
|
3489
|
+
function isIso7064Mod97(iban2) {
|
|
3490
|
+
let remainder = 0;
|
|
3491
|
+
const len = iban2.length;
|
|
3492
|
+
for (let i = 4;i < len; i++) {
|
|
3493
|
+
const code = iban2.charCodeAt(i);
|
|
3494
|
+
remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
|
|
3495
|
+
}
|
|
3496
|
+
for (let i = 0;i < 4; i++) {
|
|
3497
|
+
const code = iban2.charCodeAt(i);
|
|
3498
|
+
remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
|
|
3499
|
+
}
|
|
3500
|
+
return remainder === 1;
|
|
3501
|
+
}
|
|
3502
|
+
function isValidIBAN(input) {
|
|
3503
|
+
if (!iban.test(input))
|
|
3504
|
+
return false;
|
|
3505
|
+
return isIso7064Mod97(input);
|
|
3506
|
+
}
|
|
3507
|
+
var $ZodIBAN = /* @__PURE__ */ $constructor("$ZodIBAN", (inst, def) => {
|
|
3508
|
+
def.pattern ?? (def.pattern = iban);
|
|
3509
|
+
$ZodStringFormat.init(inst, def);
|
|
3510
|
+
inst._zod.check = (payload) => {
|
|
3511
|
+
if (isValidIBAN(payload.value))
|
|
3512
|
+
return;
|
|
3513
|
+
payload.issues.push({
|
|
3514
|
+
code: "invalid_format",
|
|
3515
|
+
format: "iban",
|
|
3516
|
+
input: payload.value,
|
|
3517
|
+
inst,
|
|
3518
|
+
continue: !def.abort
|
|
3519
|
+
});
|
|
3520
|
+
};
|
|
3521
|
+
});
|
|
3498
3522
|
function isValidJWT(token, algorithm = null) {
|
|
3499
3523
|
try {
|
|
3500
3524
|
const tokensParts = token.split(".");
|
|
@@ -3545,7 +3569,7 @@ var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringForma
|
|
|
3545
3569
|
});
|
|
3546
3570
|
var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
3547
3571
|
$ZodType.init(inst, def);
|
|
3548
|
-
inst._zod.pattern =
|
|
3572
|
+
inst._zod.pattern = number;
|
|
3549
3573
|
inst._zod.parse = (payload, _ctx) => {
|
|
3550
3574
|
if (def.coerce)
|
|
3551
3575
|
try {
|
|
@@ -3743,6 +3767,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
3743
3767
|
}
|
|
3744
3768
|
payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
|
|
3745
3769
|
const proms = [];
|
|
3770
|
+
const abortEarly = ctx?.abortEarly;
|
|
3746
3771
|
for (let i = 0;i < input.length; i++) {
|
|
3747
3772
|
const item = input[i];
|
|
3748
3773
|
const result = def.element._zod.run({
|
|
@@ -3753,6 +3778,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
3753
3778
|
proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
|
|
3754
3779
|
} else {
|
|
3755
3780
|
handleArrayResult(result, payload, i);
|
|
3781
|
+
if (abortEarly && result.issues.length !== 0 && aborted(result))
|
|
3782
|
+
break;
|
|
3756
3783
|
}
|
|
3757
3784
|
}
|
|
3758
3785
|
if (proms.length) {
|
|
@@ -3785,7 +3812,7 @@ function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
|
3785
3812
|
return;
|
|
3786
3813
|
}
|
|
3787
3814
|
if (result.value === undefined) {
|
|
3788
|
-
if (isPresent) {
|
|
3815
|
+
if (isPresent || optin === "defaulted" && !isOptionalOut) {
|
|
3789
3816
|
final.value[key] = undefined;
|
|
3790
3817
|
}
|
|
3791
3818
|
} else {
|
|
@@ -3813,14 +3840,20 @@ function normalizeDef(def) {
|
|
|
3813
3840
|
optionalKeys: new Set(okeys)
|
|
3814
3841
|
};
|
|
3815
3842
|
}
|
|
3816
|
-
function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
3843
|
+
function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
|
|
3817
3844
|
const unrecognized = [];
|
|
3818
3845
|
const keySet = def.keySet;
|
|
3819
3846
|
const _catchall = def.catchall._zod;
|
|
3820
3847
|
const t = _catchall.def.type;
|
|
3821
3848
|
const optin = _catchall.optin;
|
|
3822
3849
|
const optout = _catchall.optout;
|
|
3850
|
+
let seen = 0;
|
|
3823
3851
|
for (const key in input) {
|
|
3852
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
3853
|
+
if (aborted(payload, seen))
|
|
3854
|
+
break;
|
|
3855
|
+
seen = payload.issues.length;
|
|
3856
|
+
}
|
|
3824
3857
|
if (keySet.has(key))
|
|
3825
3858
|
continue;
|
|
3826
3859
|
if (key === "__proto__") {
|
|
@@ -3854,23 +3887,19 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
3854
3887
|
return payload;
|
|
3855
3888
|
});
|
|
3856
3889
|
}
|
|
3857
|
-
var propShapes = new WeakMap;
|
|
3858
3890
|
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
3859
3891
|
$ZodType.init(inst, def);
|
|
3860
3892
|
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
return newSh;
|
|
3872
|
-
}
|
|
3873
|
-
});
|
|
3893
|
+
const sh = desc?.get ? desc.get.raw : def.shape ?? {};
|
|
3894
|
+
if (sh) {
|
|
3895
|
+
const get = () => {
|
|
3896
|
+
const newSh = { ...sh };
|
|
3897
|
+
Object.defineProperty(def, "shape", { value: newSh });
|
|
3898
|
+
get.raw = newSh;
|
|
3899
|
+
return newSh;
|
|
3900
|
+
};
|
|
3901
|
+
get.raw = sh;
|
|
3902
|
+
Object.defineProperty(def, "shape", { get });
|
|
3874
3903
|
}
|
|
3875
3904
|
const _normalized = cached(() => normalizeDef(def));
|
|
3876
3905
|
defineLazyInternal(inst, "propValues", (zod) => {
|
|
@@ -3910,7 +3939,14 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3910
3939
|
payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
|
|
3911
3940
|
const proms = [];
|
|
3912
3941
|
const shape = value.shape;
|
|
3942
|
+
const abortEarly = ctx?.abortEarly;
|
|
3943
|
+
let seen = payload.issues.length;
|
|
3913
3944
|
for (const key of value.allKeys) {
|
|
3945
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
3946
|
+
if (aborted(payload, seen))
|
|
3947
|
+
break;
|
|
3948
|
+
seen = payload.issues.length;
|
|
3949
|
+
}
|
|
3914
3950
|
if (key === "__proto__")
|
|
3915
3951
|
continue;
|
|
3916
3952
|
const el = shape[key];
|
|
@@ -3926,7 +3962,7 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3926
3962
|
if (!catchall) {
|
|
3927
3963
|
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
3928
3964
|
}
|
|
3929
|
-
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
3965
|
+
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
|
|
3930
3966
|
};
|
|
3931
3967
|
});
|
|
3932
3968
|
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
@@ -3940,10 +3976,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3940
3976
|
const doc = new Doc(["payload", "ctx"], { shape, inst, memo, syms });
|
|
3941
3977
|
const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
3942
3978
|
const prefixStr = (id, k) => `
|
|
3979
|
+
let ${id}_ab = false;
|
|
3943
3980
|
for (let i = 0; i < ${id}.issues.length; i++) {
|
|
3944
3981
|
const iss = ${id}.issues[i];
|
|
3945
3982
|
iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
|
|
3946
3983
|
payload.issues.push(iss);
|
|
3984
|
+
if (iss.continue !== true) ${id}_ab = true;
|
|
3985
|
+
}
|
|
3986
|
+
if (${id}_ab && ctx && ctx.abortEarly) {
|
|
3987
|
+
payload.value = newResult;
|
|
3988
|
+
return payload;
|
|
3947
3989
|
}`;
|
|
3948
3990
|
doc.write(`const input = payload.value;`);
|
|
3949
3991
|
const ids = Object.create(null);
|
|
@@ -3989,6 +4031,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3989
4031
|
input: undefined,
|
|
3990
4032
|
path: [${k}]
|
|
3991
4033
|
});
|
|
4034
|
+
if (ctx && ctx.abortEarly) {
|
|
4035
|
+
payload.value = newResult;
|
|
4036
|
+
return payload;
|
|
4037
|
+
}
|
|
3992
4038
|
}
|
|
3993
4039
|
|
|
3994
4040
|
if (${id}_present) {
|
|
@@ -4000,16 +4046,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
4000
4046
|
doc.write(`
|
|
4001
4047
|
if (${id}.issues.length) {${prefixStr(id, k)}
|
|
4002
4048
|
}
|
|
4003
|
-
|
|
4004
|
-
if (
|
|
4005
|
-
|
|
4006
|
-
newResult[${k}] = undefined;
|
|
4007
|
-
}
|
|
4049
|
+
`);
|
|
4050
|
+
if (optin === "defaulted") {
|
|
4051
|
+
doc.write(`newResult[${k}] = ${id}.value;`);
|
|
4008
4052
|
} else {
|
|
4053
|
+
doc.write(`
|
|
4054
|
+
if (${id}.value !== undefined || ${isPresent}) {
|
|
4009
4055
|
newResult[${k}] = ${id}.value;
|
|
4010
4056
|
}
|
|
4011
|
-
|
|
4012
4057
|
`);
|
|
4058
|
+
}
|
|
4013
4059
|
}
|
|
4014
4060
|
}
|
|
4015
4061
|
doc.write(`payload.value = newResult;`);
|
|
@@ -4041,7 +4087,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
4041
4087
|
payload = fastpass(payload, ctx);
|
|
4042
4088
|
if (!catchall)
|
|
4043
4089
|
return payload;
|
|
4044
|
-
return handleCatchall([], input, payload, ctx, value, inst);
|
|
4090
|
+
return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);
|
|
4045
4091
|
}
|
|
4046
4092
|
return superParse(payload, ctx);
|
|
4047
4093
|
};
|
|
@@ -4173,16 +4219,31 @@ function getDiscriminatedOption(union, value) {
|
|
|
4173
4219
|
const internals = union._zod;
|
|
4174
4220
|
let map = internals.bag.optionsMap;
|
|
4175
4221
|
if (!map) {
|
|
4176
|
-
map =
|
|
4177
|
-
const { options, discriminator } = internals.def;
|
|
4178
|
-
for (const option of options) {
|
|
4179
|
-
for (const v of option._zod.propValues?.[discriminator] ?? [])
|
|
4180
|
-
if (!map.has(v))
|
|
4181
|
-
map.set(v, option);
|
|
4182
|
-
}
|
|
4222
|
+
map = discriminatorMap(internals.def);
|
|
4183
4223
|
internals.bag.optionsMap = map;
|
|
4184
4224
|
}
|
|
4185
|
-
|
|
4225
|
+
const option = map.get(value);
|
|
4226
|
+
if (option === null)
|
|
4227
|
+
throw new Error(`Ambiguous discriminator value "${String(value)}"`);
|
|
4228
|
+
return option;
|
|
4229
|
+
}
|
|
4230
|
+
function discriminatorMap(def) {
|
|
4231
|
+
const map = new Map;
|
|
4232
|
+
for (const option of def.options) {
|
|
4233
|
+
const values = option._zod.propValues?.[def.discriminator];
|
|
4234
|
+
if (!values || values.size === 0)
|
|
4235
|
+
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
|
|
4236
|
+
for (const value of values) {
|
|
4237
|
+
if (map.has(value)) {
|
|
4238
|
+
if (value !== undefined)
|
|
4239
|
+
throw new Error(`Duplicate discriminator value "${String(value)}"`);
|
|
4240
|
+
map.set(value, null);
|
|
4241
|
+
} else {
|
|
4242
|
+
map.set(value, option);
|
|
4243
|
+
}
|
|
4244
|
+
}
|
|
4245
|
+
}
|
|
4246
|
+
return map;
|
|
4186
4247
|
}
|
|
4187
4248
|
var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
4188
4249
|
def.inclusive = false;
|
|
@@ -4190,10 +4251,13 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4190
4251
|
const _super = inst._zod.parse;
|
|
4191
4252
|
defineLazyInternal(inst, "propValues", (zod) => {
|
|
4192
4253
|
const propValues = {};
|
|
4254
|
+
let undefinedCount = 0;
|
|
4193
4255
|
for (const option of zod.def.options) {
|
|
4194
4256
|
const pv = option._zod.propValues;
|
|
4195
4257
|
if (!pv || Object.keys(pv).length === 0)
|
|
4196
4258
|
throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
|
|
4259
|
+
if (pv[zod.def.discriminator]?.has(undefined))
|
|
4260
|
+
undefinedCount++;
|
|
4197
4261
|
for (const [k, v] of Object.entries(pv)) {
|
|
4198
4262
|
if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
|
|
4199
4263
|
assignProp(propValues, k, new Set);
|
|
@@ -4203,30 +4267,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4203
4267
|
}
|
|
4204
4268
|
}
|
|
4205
4269
|
}
|
|
4270
|
+
if (!zod.def.unionFallback && undefinedCount > 1)
|
|
4271
|
+
propValues[zod.def.discriminator]?.delete(undefined);
|
|
4206
4272
|
return propValues;
|
|
4207
4273
|
});
|
|
4208
4274
|
def.options.forEach((option, i) => {
|
|
4209
|
-
const propShape =
|
|
4275
|
+
const propShape = rawShape(option._zod.def);
|
|
4210
4276
|
if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
|
|
4211
4277
|
throw new Error(`Invalid discriminated union option at index "${i}"`);
|
|
4212
4278
|
}
|
|
4213
4279
|
});
|
|
4214
|
-
const disc = cached(() =>
|
|
4215
|
-
const opts = def.options;
|
|
4216
|
-
const map = new Map;
|
|
4217
|
-
for (const o of opts) {
|
|
4218
|
-
const values = o._zod.propValues?.[def.discriminator];
|
|
4219
|
-
if (!values || values.size === 0)
|
|
4220
|
-
throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
|
|
4221
|
-
for (const v of values) {
|
|
4222
|
-
if (map.has(v)) {
|
|
4223
|
-
throw new Error(`Duplicate discriminator value "${String(v)}"`);
|
|
4224
|
-
}
|
|
4225
|
-
map.set(v, o);
|
|
4226
|
-
}
|
|
4227
|
-
}
|
|
4228
|
-
return map;
|
|
4229
|
-
});
|
|
4280
|
+
const disc = cached(() => discriminatorMap(def));
|
|
4230
4281
|
inst._zod.parse = (payload, ctx) => {
|
|
4231
4282
|
const input = payload.value;
|
|
4232
4283
|
if (!isObject(input)) {
|
|
@@ -4238,8 +4289,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4238
4289
|
});
|
|
4239
4290
|
return payload;
|
|
4240
4291
|
}
|
|
4241
|
-
const
|
|
4242
|
-
|
|
4292
|
+
const value = input?.[def.discriminator];
|
|
4293
|
+
const opt = disc.value.get(value);
|
|
4294
|
+
if (opt && (value !== undefined || ctx.direction !== "backward")) {
|
|
4243
4295
|
return opt._zod.run(payload, ctx);
|
|
4244
4296
|
}
|
|
4245
4297
|
if (def.unionFallback || ctx.direction === "backward") {
|
|
@@ -4250,7 +4302,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
4250
4302
|
errors: [],
|
|
4251
4303
|
note: "No matching discriminator",
|
|
4252
4304
|
discriminator: def.discriminator,
|
|
4253
|
-
options: Array.from(disc.value.keys()),
|
|
4305
|
+
options: Array.from(disc.value.keys()).filter((value2) => disc.value.get(value2) !== null),
|
|
4254
4306
|
input,
|
|
4255
4307
|
path: [def.discriminator],
|
|
4256
4308
|
inst
|
|
@@ -4416,6 +4468,8 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
4416
4468
|
}
|
|
4417
4469
|
}
|
|
4418
4470
|
const itemResults = new Array(items.length);
|
|
4471
|
+
const abortEarly = def.rest ? ctx?.abortEarly : undefined;
|
|
4472
|
+
let itemAborted = false;
|
|
4419
4473
|
for (let i = 0;i < items.length; i++) {
|
|
4420
4474
|
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
4421
4475
|
if (r instanceof Promise) {
|
|
@@ -4424,12 +4478,20 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
4424
4478
|
}));
|
|
4425
4479
|
} else {
|
|
4426
4480
|
itemResults[i] = r;
|
|
4481
|
+
if (abortEarly && !itemAborted && r.issues.length)
|
|
4482
|
+
itemAborted = aborted(r);
|
|
4427
4483
|
}
|
|
4428
4484
|
}
|
|
4429
|
-
if (def.rest) {
|
|
4485
|
+
if (def.rest && !itemAborted) {
|
|
4430
4486
|
let i = items.length - 1;
|
|
4431
4487
|
const rest = input.slice(items.length);
|
|
4488
|
+
let seen = payload.issues.length;
|
|
4432
4489
|
for (const el of rest) {
|
|
4490
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
4491
|
+
if (aborted(payload, seen))
|
|
4492
|
+
break;
|
|
4493
|
+
seen = payload.issues.length;
|
|
4494
|
+
}
|
|
4433
4495
|
i++;
|
|
4434
4496
|
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
4435
4497
|
if (result instanceof Promise) {
|
|
@@ -4657,7 +4719,14 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
4657
4719
|
}
|
|
4658
4720
|
const proms = [];
|
|
4659
4721
|
payload.value = memo ? memo.alloc(inst, payload, new Map, ctx) : new Map;
|
|
4722
|
+
const abortEarly = ctx?.abortEarly;
|
|
4723
|
+
let seen = payload.issues.length;
|
|
4660
4724
|
for (const [key, value] of input) {
|
|
4725
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
4726
|
+
if (aborted(payload, seen))
|
|
4727
|
+
break;
|
|
4728
|
+
seen = payload.issues.length;
|
|
4729
|
+
}
|
|
4661
4730
|
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
4662
4731
|
const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
|
|
4663
4732
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
@@ -4720,7 +4789,14 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
4720
4789
|
}
|
|
4721
4790
|
const proms = [];
|
|
4722
4791
|
payload.value = memo ? memo.alloc(inst, payload, new Set, ctx) : new Set;
|
|
4792
|
+
const abortEarly = ctx?.abortEarly;
|
|
4793
|
+
let seen = payload.issues.length;
|
|
4723
4794
|
for (const item of input) {
|
|
4795
|
+
if (abortEarly && payload.issues.length !== seen) {
|
|
4796
|
+
if (aborted(payload, seen))
|
|
4797
|
+
break;
|
|
4798
|
+
seen = payload.issues.length;
|
|
4799
|
+
}
|
|
4724
4800
|
const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
|
|
4725
4801
|
if (result instanceof Promise) {
|
|
4726
4802
|
proms.push(result.then((result2) => handleSetResult(result2, payload)));
|
|
@@ -4743,8 +4819,10 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
4743
4819
|
const values = getEnumValues(def.entries);
|
|
4744
4820
|
const valuesSet = new Set(values);
|
|
4745
4821
|
inst._zod.values = valuesSet;
|
|
4746
|
-
|
|
4747
|
-
|
|
4822
|
+
defineLazyInternal(inst, "pattern", (zod) => {
|
|
4823
|
+
const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k));
|
|
4824
|
+
return new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
4825
|
+
});
|
|
4748
4826
|
inst._zod.parse = (payload, _ctx) => {
|
|
4749
4827
|
const input = payload.value;
|
|
4750
4828
|
if (valuesSet.has(input)) {
|
|
@@ -4763,7 +4841,10 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
4763
4841
|
$ZodType.init(inst, def);
|
|
4764
4842
|
const values = new Set(def.values);
|
|
4765
4843
|
inst._zod.values = values;
|
|
4766
|
-
inst
|
|
4844
|
+
defineLazyInternal(inst, "pattern", (zod) => {
|
|
4845
|
+
const vals = zod.def.values;
|
|
4846
|
+
return new RegExp(vals.length ? `^(${vals.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
|
|
4847
|
+
});
|
|
4767
4848
|
inst._zod.parse = (payload, _ctx) => {
|
|
4768
4849
|
const input = payload.value;
|
|
4769
4850
|
if (values.has(input)) {
|
|
@@ -5101,20 +5182,62 @@ function handleReadonlyResult(payload) {
|
|
|
5101
5182
|
payload.value = Object.freeze(payload.value);
|
|
5102
5183
|
return payload;
|
|
5103
5184
|
}
|
|
5185
|
+
function leafPattern(schema) {
|
|
5186
|
+
const def = schema._zod.def;
|
|
5187
|
+
let pattern = def.pattern;
|
|
5188
|
+
let isInt = !!def.format?.includes("int");
|
|
5189
|
+
let minimum;
|
|
5190
|
+
let maximum;
|
|
5191
|
+
for (const ch of def.checks ?? []) {
|
|
5192
|
+
const d = ch._zod.def;
|
|
5193
|
+
if (d.pattern)
|
|
5194
|
+
pattern = d.pattern;
|
|
5195
|
+
isInt || (isInt = !!d.format?.includes("int"));
|
|
5196
|
+
const lo = d.minimum ?? d.length;
|
|
5197
|
+
const hi = d.maximum ?? d.length;
|
|
5198
|
+
if (lo !== undefined && (minimum === undefined || lo > minimum))
|
|
5199
|
+
minimum = lo;
|
|
5200
|
+
if (hi !== undefined && (maximum === undefined || hi < maximum))
|
|
5201
|
+
maximum = hi;
|
|
5202
|
+
}
|
|
5203
|
+
if (pattern)
|
|
5204
|
+
return pattern.source;
|
|
5205
|
+
if (minimum !== undefined && maximum !== undefined && minimum > maximum)
|
|
5206
|
+
return "(?!)";
|
|
5207
|
+
if (minimum !== undefined || maximum !== undefined)
|
|
5208
|
+
return string({ minimum, maximum }).source;
|
|
5209
|
+
const own2 = schema._zod.pattern;
|
|
5210
|
+
return (isInt && own2 === number ? integer : own2)?.source;
|
|
5211
|
+
}
|
|
5212
|
+
function partPattern(schema) {
|
|
5213
|
+
const def = schema._zod.def;
|
|
5214
|
+
const own2 = schema._zod.pattern?.source;
|
|
5215
|
+
const inner = def.innerType ?? schema._zod.innerType;
|
|
5216
|
+
if (inner) {
|
|
5217
|
+
const before = inner._zod.pattern?.source;
|
|
5218
|
+
const after = partPattern(inner);
|
|
5219
|
+
if (own2 && before && after && after !== before) {
|
|
5220
|
+
return own2.replace(cleanRegex(before), () => cleanRegex(after));
|
|
5221
|
+
}
|
|
5222
|
+
return own2;
|
|
5223
|
+
}
|
|
5224
|
+
if (def.options) {
|
|
5225
|
+
const sources = def.options.map(partPattern);
|
|
5226
|
+
if (sources.every(Boolean))
|
|
5227
|
+
return `^(${sources.map((s) => cleanRegex(s)).join("|")})$`;
|
|
5228
|
+
}
|
|
5229
|
+
return leafPattern(schema);
|
|
5230
|
+
}
|
|
5104
5231
|
var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => {
|
|
5105
5232
|
$ZodType.init(inst, def);
|
|
5106
5233
|
const regexParts = [];
|
|
5107
5234
|
for (const part of def.parts) {
|
|
5108
5235
|
if (typeof part === "object" && part !== null) {
|
|
5109
|
-
|
|
5236
|
+
const source = partPattern(part);
|
|
5237
|
+
if (!source) {
|
|
5110
5238
|
throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
|
|
5111
5239
|
}
|
|
5112
|
-
|
|
5113
|
-
if (!source)
|
|
5114
|
-
throw new Error(`Invalid template literal part: ${part._zod.traits}`);
|
|
5115
|
-
const start = source.startsWith("^") ? 1 : 0;
|
|
5116
|
-
const end = source.endsWith("$") ? source.length - 1 : source.length;
|
|
5117
|
-
regexParts.push(source.slice(start, end));
|
|
5240
|
+
regexParts.push(cleanRegex(source));
|
|
5118
5241
|
} else if (part === null || primitiveTypes.has(typeof part)) {
|
|
5119
5242
|
regexParts.push(escapeRegex(`${part}`));
|
|
5120
5243
|
} else {
|
|
@@ -5276,7 +5399,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
5276
5399
|
payload.issues.push(issue(_iss));
|
|
5277
5400
|
}
|
|
5278
5401
|
}
|
|
5279
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
5402
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
|
|
5280
5403
|
class $ZodCyclicError extends Error {
|
|
5281
5404
|
constructor() {
|
|
5282
5405
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -5285,28 +5408,53 @@ class $ZodCyclicError extends Error {
|
|
|
5285
5408
|
}
|
|
5286
5409
|
var STATE = "~memo";
|
|
5287
5410
|
var NO_ISSUES = [];
|
|
5411
|
+
function isRef(value) {
|
|
5412
|
+
return value !== null && typeof value === "object";
|
|
5413
|
+
}
|
|
5288
5414
|
function cloneIssues(issues) {
|
|
5289
5415
|
return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
|
|
5290
5416
|
}
|
|
5291
5417
|
var recursive = /* @__PURE__ */ new WeakMap;
|
|
5292
|
-
|
|
5418
|
+
var NONE = 0;
|
|
5419
|
+
var ASSUMED = 1;
|
|
5420
|
+
var PROVEN = 2;
|
|
5421
|
+
function isRecursive(inst, stack, resolve) {
|
|
5293
5422
|
const cached2 = recursive.get(inst);
|
|
5294
5423
|
if (cached2 !== undefined)
|
|
5295
|
-
return cached2;
|
|
5424
|
+
return cached2 ? PROVEN : NONE;
|
|
5296
5425
|
if (stack.has(inst))
|
|
5297
|
-
return
|
|
5426
|
+
return PROVEN;
|
|
5298
5427
|
stack.add(inst);
|
|
5299
|
-
let result =
|
|
5428
|
+
let result = NONE;
|
|
5300
5429
|
const check = (child) => {
|
|
5301
|
-
if (
|
|
5302
|
-
|
|
5430
|
+
if (result !== PROVEN && child?._zod) {
|
|
5431
|
+
const answer = isRecursive(child, stack, resolve);
|
|
5432
|
+
if (answer > result)
|
|
5433
|
+
result = answer;
|
|
5434
|
+
}
|
|
5435
|
+
};
|
|
5436
|
+
const shape = (sh, spread) => {
|
|
5437
|
+
let answer = NONE;
|
|
5438
|
+
for (const key of Reflect.ownKeys(sh)) {
|
|
5439
|
+
const desc = Object.getOwnPropertyDescriptor(sh, key);
|
|
5440
|
+
if (spread && !desc.enumerable)
|
|
5441
|
+
continue;
|
|
5442
|
+
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
|
|
5443
|
+
if (child > answer)
|
|
5444
|
+
answer = child;
|
|
5445
|
+
}
|
|
5446
|
+
return answer;
|
|
5447
|
+
};
|
|
5448
|
+
const merge2 = (answer) => {
|
|
5449
|
+
if (answer > result)
|
|
5450
|
+
result = answer;
|
|
5303
5451
|
};
|
|
5304
5452
|
const def = inst._zod.def;
|
|
5305
5453
|
const kind = def.type;
|
|
5306
5454
|
switch (kind) {
|
|
5307
5455
|
case "object": {
|
|
5308
|
-
|
|
5309
|
-
|
|
5456
|
+
const raw = rawShape(def);
|
|
5457
|
+
merge2(raw ? shape(raw, true) : ASSUMED);
|
|
5310
5458
|
check(def.catchall);
|
|
5311
5459
|
break;
|
|
5312
5460
|
}
|
|
@@ -5353,9 +5501,11 @@ function isRecursive(inst, stack) {
|
|
|
5353
5501
|
check(def.input);
|
|
5354
5502
|
check(def.output);
|
|
5355
5503
|
break;
|
|
5356
|
-
case "lazy":
|
|
5357
|
-
|
|
5504
|
+
case "lazy": {
|
|
5505
|
+
const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : undefined);
|
|
5506
|
+
merge2(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
5358
5507
|
break;
|
|
5508
|
+
}
|
|
5359
5509
|
case "template_literal":
|
|
5360
5510
|
case "string":
|
|
5361
5511
|
case "number":
|
|
@@ -5394,16 +5544,20 @@ function isRecursive(inst, stack) {
|
|
|
5394
5544
|
}
|
|
5395
5545
|
}
|
|
5396
5546
|
stack.delete(inst);
|
|
5397
|
-
|
|
5398
|
-
|
|
5547
|
+
return settle(inst, result);
|
|
5548
|
+
}
|
|
5549
|
+
function settle(inst, answer) {
|
|
5550
|
+
if (answer !== ASSUMED)
|
|
5551
|
+
recursive.set(inst, answer === PROVEN);
|
|
5552
|
+
return answer;
|
|
5399
5553
|
}
|
|
5400
5554
|
function isRecursiveSchema(inst) {
|
|
5401
|
-
return isRecursive(inst, new Set);
|
|
5555
|
+
return isRecursive(inst, new Set, true) !== NONE;
|
|
5402
5556
|
}
|
|
5403
5557
|
function bucketFor(state, inst) {
|
|
5404
5558
|
let bucket = state.buckets.get(inst);
|
|
5405
5559
|
if (!bucket) {
|
|
5406
|
-
bucket = new
|
|
5560
|
+
bucket = new WeakMap;
|
|
5407
5561
|
state.buckets.set(inst, bucket);
|
|
5408
5562
|
}
|
|
5409
5563
|
return bucket;
|
|
@@ -5439,6 +5593,7 @@ var memo = {
|
|
|
5439
5593
|
attach(inst) {
|
|
5440
5594
|
var _a2;
|
|
5441
5595
|
let isRecursiveInst;
|
|
5596
|
+
let rechecked = false;
|
|
5442
5597
|
let lastCtx;
|
|
5443
5598
|
let lastBucket;
|
|
5444
5599
|
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
@@ -5446,20 +5601,24 @@ var memo = {
|
|
|
5446
5601
|
const base = inst._zod.parse;
|
|
5447
5602
|
const wrapped = (payload, ctx) => {
|
|
5448
5603
|
if (isRecursiveInst === undefined) {
|
|
5449
|
-
|
|
5450
|
-
if (
|
|
5604
|
+
const walked = isRecursive(inst, new Set, false);
|
|
5605
|
+
if (walked === NONE) {
|
|
5451
5606
|
inst._zod.parse = base;
|
|
5452
5607
|
if (inst._zod.run === wrapped)
|
|
5453
5608
|
inst._zod.run = base;
|
|
5454
5609
|
return base(payload, ctx);
|
|
5455
5610
|
}
|
|
5611
|
+
if (walked === PROVEN || rechecked)
|
|
5612
|
+
isRecursiveInst = true;
|
|
5613
|
+
else
|
|
5614
|
+
rechecked = true;
|
|
5456
5615
|
}
|
|
5457
5616
|
const input = payload.value;
|
|
5458
|
-
if (input
|
|
5617
|
+
if (!isRef(input))
|
|
5459
5618
|
return base(payload, ctx);
|
|
5460
5619
|
let state = ctx[STATE];
|
|
5461
5620
|
if (!state) {
|
|
5462
|
-
state = { buckets: new
|
|
5621
|
+
state = { buckets: new WeakMap, backEdges: undefined };
|
|
5463
5622
|
ctx[STATE] = state;
|
|
5464
5623
|
}
|
|
5465
5624
|
let bucket;
|
|
@@ -5478,7 +5637,7 @@ var memo = {
|
|
|
5478
5637
|
payload.issues.push(...cloneIssues(hit.issues));
|
|
5479
5638
|
} else {
|
|
5480
5639
|
payload.memo = true;
|
|
5481
|
-
state.backEdges ?? (state.backEdges = new
|
|
5640
|
+
state.backEdges ?? (state.backEdges = new WeakSet);
|
|
5482
5641
|
state.backEdges.add(hit.value);
|
|
5483
5642
|
}
|
|
5484
5643
|
return payload;
|
|
@@ -5510,9 +5669,9 @@ function memoizer() {
|
|
|
5510
5669
|
}
|
|
5511
5670
|
function isBackEdge(ctx, value) {
|
|
5512
5671
|
const backEdges = ctx[STATE]?.backEdges;
|
|
5513
|
-
return backEdges !== undefined && value
|
|
5672
|
+
return backEdges !== undefined && isRef(value) && backEdges.has(value);
|
|
5514
5673
|
}
|
|
5515
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
5674
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/index.js
|
|
5516
5675
|
var exports_locales = {};
|
|
5517
5676
|
__export(exports_locales, {
|
|
5518
5677
|
ar: () => ar_default,
|
|
@@ -5566,6 +5725,7 @@ __export(exports_locales, {
|
|
|
5566
5725
|
sl: () => sl_default,
|
|
5567
5726
|
sv: () => sv_default,
|
|
5568
5727
|
ta: () => ta_default,
|
|
5728
|
+
tg: () => tg_default,
|
|
5569
5729
|
th: () => th_default,
|
|
5570
5730
|
tk: () => tk_default,
|
|
5571
5731
|
tr: () => tr_default,
|
|
@@ -5579,7 +5739,7 @@ __export(exports_locales, {
|
|
|
5579
5739
|
zhTW: () => zh_TW_default
|
|
5580
5740
|
});
|
|
5581
5741
|
|
|
5582
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
5742
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ar.js
|
|
5583
5743
|
var error = () => {
|
|
5584
5744
|
const Sizable = {
|
|
5585
5745
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -5620,6 +5780,8 @@ var error = () => {
|
|
|
5620
5780
|
json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
|
|
5621
5781
|
e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
|
|
5622
5782
|
credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
|
|
5783
|
+
currency_code: "\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",
|
|
5784
|
+
iban: "IBAN",
|
|
5623
5785
|
jwt: "JWT",
|
|
5624
5786
|
template_literal: "\u0645\u062F\u062E\u0644"
|
|
5625
5787
|
};
|
|
@@ -5688,7 +5850,7 @@ function ar_default() {
|
|
|
5688
5850
|
localeError: error()
|
|
5689
5851
|
};
|
|
5690
5852
|
}
|
|
5691
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
5853
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/az.js
|
|
5692
5854
|
var error2 = () => {
|
|
5693
5855
|
const Sizable = {
|
|
5694
5856
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -5729,6 +5891,8 @@ var error2 = () => {
|
|
|
5729
5891
|
json_string: "JSON string",
|
|
5730
5892
|
e164: "E.164 number",
|
|
5731
5893
|
credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
|
|
5894
|
+
currency_code: "valyuta kodu",
|
|
5895
|
+
iban: "IBAN",
|
|
5732
5896
|
jwt: "JWT",
|
|
5733
5897
|
template_literal: "input"
|
|
5734
5898
|
};
|
|
@@ -5796,7 +5960,7 @@ function az_default() {
|
|
|
5796
5960
|
localeError: error2()
|
|
5797
5961
|
};
|
|
5798
5962
|
}
|
|
5799
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
5963
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/be.js
|
|
5800
5964
|
function getBelarusianPlural(count, one, few, many) {
|
|
5801
5965
|
const absCount = Math.abs(count);
|
|
5802
5966
|
const lastDigit = absCount % 10;
|
|
@@ -5887,6 +6051,8 @@ var error3 = () => {
|
|
|
5887
6051
|
json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
|
|
5888
6052
|
e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
|
|
5889
6053
|
credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
|
|
6054
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
|
|
6055
|
+
iban: "IBAN",
|
|
5890
6056
|
jwt: "JWT",
|
|
5891
6057
|
template_literal: "\u0443\u0432\u043E\u0434"
|
|
5892
6058
|
};
|
|
@@ -5962,7 +6128,7 @@ function be_default() {
|
|
|
5962
6128
|
localeError: error3()
|
|
5963
6129
|
};
|
|
5964
6130
|
}
|
|
5965
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6131
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/bg.js
|
|
5966
6132
|
var error4 = () => {
|
|
5967
6133
|
const Sizable = {
|
|
5968
6134
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -6003,6 +6169,8 @@ var error4 = () => {
|
|
|
6003
6169
|
json_string: "JSON \u043D\u0438\u0437",
|
|
6004
6170
|
e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
|
|
6005
6171
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
|
|
6172
|
+
currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
|
|
6173
|
+
iban: "IBAN",
|
|
6006
6174
|
jwt: "JWT",
|
|
6007
6175
|
template_literal: "\u0432\u0445\u043E\u0434"
|
|
6008
6176
|
};
|
|
@@ -6085,7 +6253,7 @@ function bg_default() {
|
|
|
6085
6253
|
localeError: error4()
|
|
6086
6254
|
};
|
|
6087
6255
|
}
|
|
6088
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6256
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/bn.js
|
|
6089
6257
|
var error5 = () => {
|
|
6090
6258
|
const Sizable = {
|
|
6091
6259
|
string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
|
|
@@ -6126,6 +6294,8 @@ var error5 = () => {
|
|
|
6126
6294
|
json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
|
|
6127
6295
|
e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
|
|
6128
6296
|
credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
|
|
6297
|
+
currency_code: "\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",
|
|
6298
|
+
iban: "IBAN",
|
|
6129
6299
|
jwt: "JWT",
|
|
6130
6300
|
template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
|
|
6131
6301
|
};
|
|
@@ -6196,7 +6366,7 @@ function bn_default() {
|
|
|
6196
6366
|
localeError: error5()
|
|
6197
6367
|
};
|
|
6198
6368
|
}
|
|
6199
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6369
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ca.js
|
|
6200
6370
|
var error6 = () => {
|
|
6201
6371
|
const Sizable = {
|
|
6202
6372
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -6237,6 +6407,8 @@ var error6 = () => {
|
|
|
6237
6407
|
json_string: "cadena JSON",
|
|
6238
6408
|
e164: "n\xFAmero E.164",
|
|
6239
6409
|
credit_card: "n\xFAmero de targeta de cr\xE8dit",
|
|
6410
|
+
currency_code: "codi de moneda",
|
|
6411
|
+
iban: "IBAN",
|
|
6240
6412
|
jwt: "JWT",
|
|
6241
6413
|
template_literal: "entrada"
|
|
6242
6414
|
};
|
|
@@ -6306,7 +6478,7 @@ function ca_default() {
|
|
|
6306
6478
|
localeError: error6()
|
|
6307
6479
|
};
|
|
6308
6480
|
}
|
|
6309
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6481
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ckb.js
|
|
6310
6482
|
var error7 = () => {
|
|
6311
6483
|
const Sizable = {
|
|
6312
6484
|
string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
|
|
@@ -6347,6 +6519,8 @@ var error7 = () => {
|
|
|
6347
6519
|
json_string: "\u062F\u06D5\u0642\u06CC JSON",
|
|
6348
6520
|
e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
|
|
6349
6521
|
credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
|
|
6522
|
+
currency_code: "\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",
|
|
6523
|
+
iban: "IBAN",
|
|
6350
6524
|
jwt: "JWT",
|
|
6351
6525
|
template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
|
|
6352
6526
|
};
|
|
@@ -6436,7 +6610,7 @@ function ckb_default() {
|
|
|
6436
6610
|
localeError: error7()
|
|
6437
6611
|
};
|
|
6438
6612
|
}
|
|
6439
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6613
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/cs.js
|
|
6440
6614
|
var error8 = () => {
|
|
6441
6615
|
const Sizable = {
|
|
6442
6616
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -6477,6 +6651,8 @@ var error8 = () => {
|
|
|
6477
6651
|
json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
|
|
6478
6652
|
e164: "\u010D\xEDslo E.164",
|
|
6479
6653
|
credit_card: "\u010D\xEDslo kreditn\xED karty",
|
|
6654
|
+
currency_code: "k\xF3d m\u011Bny",
|
|
6655
|
+
iban: "IBAN",
|
|
6480
6656
|
jwt: "JWT",
|
|
6481
6657
|
template_literal: "vstup"
|
|
6482
6658
|
};
|
|
@@ -6550,7 +6726,7 @@ function cs_default() {
|
|
|
6550
6726
|
localeError: error8()
|
|
6551
6727
|
};
|
|
6552
6728
|
}
|
|
6553
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6729
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/da.js
|
|
6554
6730
|
var error9 = () => {
|
|
6555
6731
|
const Sizable = {
|
|
6556
6732
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -6591,6 +6767,8 @@ var error9 = () => {
|
|
|
6591
6767
|
json_string: "JSON-streng",
|
|
6592
6768
|
e164: "E.164-nummer",
|
|
6593
6769
|
credit_card: "kreditkortnummer",
|
|
6770
|
+
currency_code: "valutakode",
|
|
6771
|
+
iban: "IBAN",
|
|
6594
6772
|
jwt: "JWT",
|
|
6595
6773
|
template_literal: "input"
|
|
6596
6774
|
};
|
|
@@ -6668,7 +6846,7 @@ function da_default() {
|
|
|
6668
6846
|
localeError: error9()
|
|
6669
6847
|
};
|
|
6670
6848
|
}
|
|
6671
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6849
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/de.js
|
|
6672
6850
|
var error10 = () => {
|
|
6673
6851
|
const Sizable = {
|
|
6674
6852
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -6709,6 +6887,8 @@ var error10 = () => {
|
|
|
6709
6887
|
json_string: "JSON-String",
|
|
6710
6888
|
e164: "E.164-Nummer",
|
|
6711
6889
|
credit_card: "Kreditkartennummer",
|
|
6890
|
+
currency_code: "W\xE4hrungscode",
|
|
6891
|
+
iban: "IBAN",
|
|
6712
6892
|
jwt: "JWT",
|
|
6713
6893
|
template_literal: "Eingabe"
|
|
6714
6894
|
};
|
|
@@ -6779,7 +6959,7 @@ function de_default() {
|
|
|
6779
6959
|
localeError: error10()
|
|
6780
6960
|
};
|
|
6781
6961
|
}
|
|
6782
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
6962
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/el.js
|
|
6783
6963
|
var error11 = () => {
|
|
6784
6964
|
const Sizable = {
|
|
6785
6965
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -6820,6 +7000,8 @@ var error11 = () => {
|
|
|
6820
7000
|
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
6821
7001
|
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
6822
7002
|
credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
|
|
7003
|
+
currency_code: "\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",
|
|
7004
|
+
iban: "IBAN",
|
|
6823
7005
|
jwt: "JWT",
|
|
6824
7006
|
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
6825
7007
|
};
|
|
@@ -6889,7 +7071,7 @@ function el_default() {
|
|
|
6889
7071
|
localeError: error11()
|
|
6890
7072
|
};
|
|
6891
7073
|
}
|
|
6892
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7074
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/en.js
|
|
6893
7075
|
var error12 = () => {
|
|
6894
7076
|
const Sizable = {
|
|
6895
7077
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -6929,7 +7111,9 @@ var error12 = () => {
|
|
|
6929
7111
|
base64url: "base64url-encoded string",
|
|
6930
7112
|
json_string: "JSON string",
|
|
6931
7113
|
e164: "E.164 number",
|
|
7114
|
+
currency_code: "currency code",
|
|
6932
7115
|
credit_card: "credit card number",
|
|
7116
|
+
iban: "IBAN",
|
|
6933
7117
|
jwt: "JWT",
|
|
6934
7118
|
template_literal: "input"
|
|
6935
7119
|
};
|
|
@@ -7009,7 +7193,7 @@ function en_default() {
|
|
|
7009
7193
|
localeError: error12()
|
|
7010
7194
|
};
|
|
7011
7195
|
}
|
|
7012
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7196
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/eo.js
|
|
7013
7197
|
var error13 = () => {
|
|
7014
7198
|
const Sizable = {
|
|
7015
7199
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -7050,6 +7234,8 @@ var error13 = () => {
|
|
|
7050
7234
|
json_string: "JSON-karaktraro",
|
|
7051
7235
|
e164: "E.164-nombro",
|
|
7052
7236
|
credit_card: "kreditkarta numero",
|
|
7237
|
+
currency_code: "valuta kodo",
|
|
7238
|
+
iban: "IBAN",
|
|
7053
7239
|
jwt: "JWT",
|
|
7054
7240
|
template_literal: "enigo"
|
|
7055
7241
|
};
|
|
@@ -7121,7 +7307,7 @@ function eo_default() {
|
|
|
7121
7307
|
localeError: error13()
|
|
7122
7308
|
};
|
|
7123
7309
|
}
|
|
7124
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7310
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/es.js
|
|
7125
7311
|
var error14 = () => {
|
|
7126
7312
|
const Sizable = {
|
|
7127
7313
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -7161,6 +7347,8 @@ var error14 = () => {
|
|
|
7161
7347
|
json_string: "cadena JSON",
|
|
7162
7348
|
e164: "n\xFAmero E.164",
|
|
7163
7349
|
credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
|
|
7350
|
+
currency_code: "c\xF3digo de moneda",
|
|
7351
|
+
iban: "IBAN",
|
|
7164
7352
|
jwt: "JWT",
|
|
7165
7353
|
template_literal: "entrada"
|
|
7166
7354
|
};
|
|
@@ -7255,7 +7443,7 @@ function es_default() {
|
|
|
7255
7443
|
localeError: error14()
|
|
7256
7444
|
};
|
|
7257
7445
|
}
|
|
7258
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7446
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/fa.js
|
|
7259
7447
|
var error15 = () => {
|
|
7260
7448
|
const Sizable = {
|
|
7261
7449
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -7296,6 +7484,8 @@ var error15 = () => {
|
|
|
7296
7484
|
json_string: "JSON \u0631\u0634\u062A\u0647",
|
|
7297
7485
|
e164: "E.164 \u0639\u062F\u062F",
|
|
7298
7486
|
credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
|
|
7487
|
+
currency_code: "\u06A9\u062F \u0627\u0631\u0632",
|
|
7488
|
+
iban: "IBAN",
|
|
7299
7489
|
jwt: "JWT",
|
|
7300
7490
|
template_literal: "\u0648\u0631\u0648\u062F\u06CC"
|
|
7301
7491
|
};
|
|
@@ -7372,7 +7562,7 @@ function fa_default() {
|
|
|
7372
7562
|
localeError: error15()
|
|
7373
7563
|
};
|
|
7374
7564
|
}
|
|
7375
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7565
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/fi.js
|
|
7376
7566
|
var error16 = () => {
|
|
7377
7567
|
const Sizable = {
|
|
7378
7568
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -7417,6 +7607,8 @@ var error16 = () => {
|
|
|
7417
7607
|
json_string: "JSON-merkkijono",
|
|
7418
7608
|
e164: "E.164-luku",
|
|
7419
7609
|
credit_card: "luottokortin numero",
|
|
7610
|
+
currency_code: "valuuttakoodi",
|
|
7611
|
+
iban: "IBAN",
|
|
7420
7612
|
jwt: "JWT",
|
|
7421
7613
|
template_literal: "templaattimerkkijono"
|
|
7422
7614
|
};
|
|
@@ -7487,7 +7679,7 @@ function fi_default() {
|
|
|
7487
7679
|
localeError: error16()
|
|
7488
7680
|
};
|
|
7489
7681
|
}
|
|
7490
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7682
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/fr.js
|
|
7491
7683
|
var error17 = () => {
|
|
7492
7684
|
const Sizable = {
|
|
7493
7685
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7527,6 +7719,8 @@ var error17 = () => {
|
|
|
7527
7719
|
json_string: "cha\xEEne de caract\xE8res JSON",
|
|
7528
7720
|
e164: "num\xE9ro au format E.164",
|
|
7529
7721
|
credit_card: "num\xE9ro de carte de cr\xE9dit",
|
|
7722
|
+
currency_code: "code de devise",
|
|
7723
|
+
iban: "IBAN",
|
|
7530
7724
|
jwt: "JWT",
|
|
7531
7725
|
template_literal: "entr\xE9e"
|
|
7532
7726
|
};
|
|
@@ -7614,7 +7808,7 @@ function fr_default() {
|
|
|
7614
7808
|
localeError: error17()
|
|
7615
7809
|
};
|
|
7616
7810
|
}
|
|
7617
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7811
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/fr-CA.js
|
|
7618
7812
|
var error18 = () => {
|
|
7619
7813
|
const Sizable = {
|
|
7620
7814
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7655,6 +7849,8 @@ var error18 = () => {
|
|
|
7655
7849
|
json_string: "cha\xEEne JSON",
|
|
7656
7850
|
e164: "num\xE9ro E.164",
|
|
7657
7851
|
credit_card: "num\xE9ro de carte de cr\xE9dit",
|
|
7852
|
+
currency_code: "code de devise",
|
|
7853
|
+
iban: "IBAN",
|
|
7658
7854
|
jwt: "JWT",
|
|
7659
7855
|
template_literal: "entr\xE9e"
|
|
7660
7856
|
};
|
|
@@ -7724,7 +7920,7 @@ function fr_CA_default() {
|
|
|
7724
7920
|
localeError: error18()
|
|
7725
7921
|
};
|
|
7726
7922
|
}
|
|
7727
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
7923
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/gu.js
|
|
7728
7924
|
var error19 = () => {
|
|
7729
7925
|
const Sizable = {
|
|
7730
7926
|
string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
|
|
@@ -7765,6 +7961,8 @@ var error19 = () => {
|
|
|
7765
7961
|
json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
|
|
7766
7962
|
e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
|
|
7767
7963
|
credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
|
|
7964
|
+
currency_code: "\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",
|
|
7965
|
+
iban: "IBAN",
|
|
7768
7966
|
jwt: "JWT",
|
|
7769
7967
|
template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
|
|
7770
7968
|
};
|
|
@@ -7835,7 +8033,7 @@ function gu_default() {
|
|
|
7835
8033
|
localeError: error19()
|
|
7836
8034
|
};
|
|
7837
8035
|
}
|
|
7838
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8036
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/he.js
|
|
7839
8037
|
var error20 = () => {
|
|
7840
8038
|
const TypeNames = {
|
|
7841
8039
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -7911,6 +8109,8 @@ var error20 = () => {
|
|
|
7911
8109
|
json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
|
|
7912
8110
|
e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
|
|
7913
8111
|
credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
|
|
8112
|
+
currency_code: { label: "\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2", gender: "m" },
|
|
8113
|
+
iban: { label: "IBAN", gender: "m" },
|
|
7914
8114
|
jwt: { label: "JWT", gender: "m" },
|
|
7915
8115
|
template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
7916
8116
|
ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
@@ -8033,7 +8233,7 @@ function he_default() {
|
|
|
8033
8233
|
localeError: error20()
|
|
8034
8234
|
};
|
|
8035
8235
|
}
|
|
8036
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8236
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/hi.js
|
|
8037
8237
|
var error21 = () => {
|
|
8038
8238
|
const Sizable = {
|
|
8039
8239
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
|
|
@@ -8074,6 +8274,8 @@ var error21 = () => {
|
|
|
8074
8274
|
json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
|
|
8075
8275
|
e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
|
|
8076
8276
|
credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
|
|
8277
|
+
currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
|
|
8278
|
+
iban: "IBAN",
|
|
8077
8279
|
jwt: "JWT",
|
|
8078
8280
|
template_literal: "\u0907\u0928\u092A\u0941\u091F"
|
|
8079
8281
|
};
|
|
@@ -8142,7 +8344,7 @@ function hi_default() {
|
|
|
8142
8344
|
localeError: error21()
|
|
8143
8345
|
};
|
|
8144
8346
|
}
|
|
8145
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8347
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/hr.js
|
|
8146
8348
|
var error22 = () => {
|
|
8147
8349
|
const Sizable = {
|
|
8148
8350
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -8182,6 +8384,8 @@ var error22 = () => {
|
|
|
8182
8384
|
json_string: "JSON tekst",
|
|
8183
8385
|
e164: "E.164 broj",
|
|
8184
8386
|
credit_card: "broj kreditne kartice",
|
|
8387
|
+
currency_code: "kod valute",
|
|
8388
|
+
iban: "IBAN",
|
|
8185
8389
|
jwt: "JWT",
|
|
8186
8390
|
template_literal: "unos"
|
|
8187
8391
|
};
|
|
@@ -8266,7 +8470,7 @@ function hr_default() {
|
|
|
8266
8470
|
localeError: error22()
|
|
8267
8471
|
};
|
|
8268
8472
|
}
|
|
8269
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8473
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/hu.js
|
|
8270
8474
|
var error23 = () => {
|
|
8271
8475
|
const Sizable = {
|
|
8272
8476
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -8307,6 +8511,8 @@ var error23 = () => {
|
|
|
8307
8511
|
json_string: "JSON string",
|
|
8308
8512
|
e164: "E.164 sz\xE1m",
|
|
8309
8513
|
credit_card: "hitelk\xE1rtyasz\xE1m",
|
|
8514
|
+
currency_code: "p\xE9nznemk\xF3d",
|
|
8515
|
+
iban: "IBAN",
|
|
8310
8516
|
jwt: "JWT",
|
|
8311
8517
|
template_literal: "bemenet"
|
|
8312
8518
|
};
|
|
@@ -8377,7 +8583,7 @@ function hu_default() {
|
|
|
8377
8583
|
localeError: error23()
|
|
8378
8584
|
};
|
|
8379
8585
|
}
|
|
8380
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8586
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/hy.js
|
|
8381
8587
|
function getArmenianPlural(count, one, many) {
|
|
8382
8588
|
return Math.abs(count) === 1 ? one : many;
|
|
8383
8589
|
}
|
|
@@ -8458,6 +8664,8 @@ var error24 = () => {
|
|
|
8458
8664
|
json_string: "JSON \u057F\u0578\u0572",
|
|
8459
8665
|
e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
|
|
8460
8666
|
credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
|
|
8667
|
+
currency_code: "\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",
|
|
8668
|
+
iban: "IBAN",
|
|
8461
8669
|
jwt: "JWT",
|
|
8462
8670
|
template_literal: "\u0574\u0578\u0582\u057F\u0584"
|
|
8463
8671
|
};
|
|
@@ -8533,7 +8741,7 @@ function hy_default() {
|
|
|
8533
8741
|
localeError: error24()
|
|
8534
8742
|
};
|
|
8535
8743
|
}
|
|
8536
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8744
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/id.js
|
|
8537
8745
|
var error25 = () => {
|
|
8538
8746
|
const Sizable = {
|
|
8539
8747
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -8574,6 +8782,8 @@ var error25 = () => {
|
|
|
8574
8782
|
json_string: "string JSON",
|
|
8575
8783
|
e164: "angka E.164",
|
|
8576
8784
|
credit_card: "nomor kartu kredit",
|
|
8785
|
+
currency_code: "kode mata uang",
|
|
8786
|
+
iban: "IBAN",
|
|
8577
8787
|
jwt: "JWT",
|
|
8578
8788
|
template_literal: "input"
|
|
8579
8789
|
};
|
|
@@ -8642,7 +8852,7 @@ function id_default() {
|
|
|
8642
8852
|
localeError: error25()
|
|
8643
8853
|
};
|
|
8644
8854
|
}
|
|
8645
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8855
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/is.js
|
|
8646
8856
|
var error26 = () => {
|
|
8647
8857
|
const Sizable = {
|
|
8648
8858
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -8683,6 +8893,8 @@ var error26 = () => {
|
|
|
8683
8893
|
json_string: "JSON strengur",
|
|
8684
8894
|
e164: "E.164 t\xF6lugildi",
|
|
8685
8895
|
credit_card: "kreditkortan\xFAmer",
|
|
8896
|
+
currency_code: "gjaldmi\xF0ilsk\xF3\xF0i",
|
|
8897
|
+
iban: "IBAN",
|
|
8686
8898
|
jwt: "JWT",
|
|
8687
8899
|
template_literal: "gildi"
|
|
8688
8900
|
};
|
|
@@ -8754,7 +8966,7 @@ function is_default() {
|
|
|
8754
8966
|
localeError: error26()
|
|
8755
8967
|
};
|
|
8756
8968
|
}
|
|
8757
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
8969
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/it.js
|
|
8758
8970
|
var error27 = () => {
|
|
8759
8971
|
const Sizable = {
|
|
8760
8972
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -8795,6 +9007,8 @@ var error27 = () => {
|
|
|
8795
9007
|
json_string: "stringa JSON",
|
|
8796
9008
|
e164: "numero E.164",
|
|
8797
9009
|
credit_card: "numero di carta di credito",
|
|
9010
|
+
currency_code: "codice valuta",
|
|
9011
|
+
iban: "IBAN",
|
|
8798
9012
|
jwt: "JWT",
|
|
8799
9013
|
template_literal: "input"
|
|
8800
9014
|
};
|
|
@@ -8865,7 +9079,7 @@ function it_default() {
|
|
|
8865
9079
|
localeError: error27()
|
|
8866
9080
|
};
|
|
8867
9081
|
}
|
|
8868
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9082
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ja.js
|
|
8869
9083
|
var error28 = () => {
|
|
8870
9084
|
const Sizable = {
|
|
8871
9085
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -8906,6 +9120,8 @@ var error28 = () => {
|
|
|
8906
9120
|
json_string: "JSON\u6587\u5B57\u5217",
|
|
8907
9121
|
e164: "E.164\u756A\u53F7",
|
|
8908
9122
|
credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
|
|
9123
|
+
currency_code: "\u901A\u8CA8\u30B3\u30FC\u30C9",
|
|
9124
|
+
iban: "IBAN",
|
|
8909
9125
|
jwt: "JWT",
|
|
8910
9126
|
template_literal: "\u5165\u529B\u5024"
|
|
8911
9127
|
};
|
|
@@ -8975,7 +9191,7 @@ function ja_default() {
|
|
|
8975
9191
|
localeError: error28()
|
|
8976
9192
|
};
|
|
8977
9193
|
}
|
|
8978
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9194
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ka.js
|
|
8979
9195
|
var error29 = () => {
|
|
8980
9196
|
const Sizable = {
|
|
8981
9197
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -9016,6 +9232,8 @@ var error29 = () => {
|
|
|
9016
9232
|
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
9017
9233
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
9018
9234
|
credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
9235
|
+
currency_code: "\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",
|
|
9236
|
+
iban: "IBAN",
|
|
9019
9237
|
jwt: "JWT",
|
|
9020
9238
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
9021
9239
|
};
|
|
@@ -9090,7 +9308,7 @@ function ka_default() {
|
|
|
9090
9308
|
localeError: error29()
|
|
9091
9309
|
};
|
|
9092
9310
|
}
|
|
9093
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9311
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/km.js
|
|
9094
9312
|
var error30 = () => {
|
|
9095
9313
|
const Sizable = {
|
|
9096
9314
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -9131,6 +9349,8 @@ var error30 = () => {
|
|
|
9131
9349
|
json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
|
|
9132
9350
|
e164: "\u179B\u17C1\u1781 E.164",
|
|
9133
9351
|
credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
|
|
9352
|
+
currency_code: "\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",
|
|
9353
|
+
iban: "IBAN",
|
|
9134
9354
|
jwt: "JWT",
|
|
9135
9355
|
template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
|
|
9136
9356
|
};
|
|
@@ -9204,11 +9424,11 @@ function km_default() {
|
|
|
9204
9424
|
};
|
|
9205
9425
|
}
|
|
9206
9426
|
|
|
9207
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9427
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/kh.js
|
|
9208
9428
|
function kh_default() {
|
|
9209
9429
|
return km_default();
|
|
9210
9430
|
}
|
|
9211
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9431
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/kn.js
|
|
9212
9432
|
var error31 = () => {
|
|
9213
9433
|
const Sizable = {
|
|
9214
9434
|
string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
|
|
@@ -9249,6 +9469,8 @@ var error31 = () => {
|
|
|
9249
9469
|
json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
|
|
9250
9470
|
e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
|
|
9251
9471
|
credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
|
|
9472
|
+
currency_code: "\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",
|
|
9473
|
+
iban: "IBAN",
|
|
9252
9474
|
jwt: "JWT",
|
|
9253
9475
|
template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
|
|
9254
9476
|
};
|
|
@@ -9319,7 +9541,7 @@ function kn_default() {
|
|
|
9319
9541
|
localeError: error31()
|
|
9320
9542
|
};
|
|
9321
9543
|
}
|
|
9322
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9544
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ko.js
|
|
9323
9545
|
var error32 = () => {
|
|
9324
9546
|
const Sizable = {
|
|
9325
9547
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -9360,6 +9582,8 @@ var error32 = () => {
|
|
|
9360
9582
|
json_string: "JSON \uBB38\uC790\uC5F4",
|
|
9361
9583
|
e164: "E.164 \uBC88\uD638",
|
|
9362
9584
|
credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
|
|
9585
|
+
currency_code: "\uD1B5\uD654 \uCF54\uB4DC",
|
|
9586
|
+
iban: "IBAN",
|
|
9363
9587
|
jwt: "JWT",
|
|
9364
9588
|
template_literal: "\uC785\uB825"
|
|
9365
9589
|
};
|
|
@@ -9433,7 +9657,7 @@ function ko_default() {
|
|
|
9433
9657
|
localeError: error32()
|
|
9434
9658
|
};
|
|
9435
9659
|
}
|
|
9436
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9660
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/lt.js
|
|
9437
9661
|
var capitalizeFirstCharacter = (text) => {
|
|
9438
9662
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
9439
9663
|
};
|
|
@@ -9556,6 +9780,8 @@ var error33 = () => {
|
|
|
9556
9780
|
json_string: "JSON eilut\u0117",
|
|
9557
9781
|
e164: "E.164 numeris",
|
|
9558
9782
|
credit_card: "kredito kortel\u0117s numeris",
|
|
9783
|
+
currency_code: "valiutos kodas",
|
|
9784
|
+
iban: "IBAN",
|
|
9559
9785
|
jwt: "JWT",
|
|
9560
9786
|
template_literal: "\u012Fvestis"
|
|
9561
9787
|
};
|
|
@@ -9638,7 +9864,7 @@ function lt_default() {
|
|
|
9638
9864
|
localeError: error33()
|
|
9639
9865
|
};
|
|
9640
9866
|
}
|
|
9641
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9867
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/mk.js
|
|
9642
9868
|
var error34 = () => {
|
|
9643
9869
|
const Sizable = {
|
|
9644
9870
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -9679,6 +9905,8 @@ var error34 = () => {
|
|
|
9679
9905
|
json_string: "JSON \u043D\u0438\u0437\u0430",
|
|
9680
9906
|
e164: "E.164 \u0431\u0440\u043E\u0458",
|
|
9681
9907
|
credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
|
|
9908
|
+
currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
|
|
9909
|
+
iban: "IBAN",
|
|
9682
9910
|
jwt: "JWT",
|
|
9683
9911
|
template_literal: "\u0432\u043D\u0435\u0441"
|
|
9684
9912
|
};
|
|
@@ -9750,7 +9978,7 @@ function mk_default() {
|
|
|
9750
9978
|
localeError: error34()
|
|
9751
9979
|
};
|
|
9752
9980
|
}
|
|
9753
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
9981
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ms.js
|
|
9754
9982
|
var error35 = () => {
|
|
9755
9983
|
const Sizable = {
|
|
9756
9984
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -9791,6 +10019,8 @@ var error35 = () => {
|
|
|
9791
10019
|
json_string: "string JSON",
|
|
9792
10020
|
e164: "nombor E.164",
|
|
9793
10021
|
credit_card: "nombor kad kredit",
|
|
10022
|
+
currency_code: "kod mata wang",
|
|
10023
|
+
iban: "IBAN",
|
|
9794
10024
|
jwt: "JWT",
|
|
9795
10025
|
template_literal: "input"
|
|
9796
10026
|
};
|
|
@@ -9860,7 +10090,7 @@ function ms_default() {
|
|
|
9860
10090
|
localeError: error35()
|
|
9861
10091
|
};
|
|
9862
10092
|
}
|
|
9863
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10093
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ne.js
|
|
9864
10094
|
var error36 = () => {
|
|
9865
10095
|
const Sizable = {
|
|
9866
10096
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
|
|
@@ -9901,6 +10131,8 @@ var error36 = () => {
|
|
|
9901
10131
|
json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
|
|
9902
10132
|
e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
|
|
9903
10133
|
credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
|
|
10134
|
+
currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
|
|
10135
|
+
iban: "IBAN",
|
|
9904
10136
|
jwt: "JWT",
|
|
9905
10137
|
template_literal: "\u0907\u0928\u092A\u0941\u091F"
|
|
9906
10138
|
};
|
|
@@ -9969,7 +10201,7 @@ function ne_default() {
|
|
|
9969
10201
|
localeError: error36()
|
|
9970
10202
|
};
|
|
9971
10203
|
}
|
|
9972
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10204
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/nl.js
|
|
9973
10205
|
var error37 = () => {
|
|
9974
10206
|
const Sizable = {
|
|
9975
10207
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -10010,6 +10242,8 @@ var error37 = () => {
|
|
|
10010
10242
|
json_string: "JSON string",
|
|
10011
10243
|
e164: "E.164-nummer",
|
|
10012
10244
|
credit_card: "creditcardnummer",
|
|
10245
|
+
currency_code: "valutacode",
|
|
10246
|
+
iban: "IBAN",
|
|
10013
10247
|
jwt: "JWT",
|
|
10014
10248
|
template_literal: "invoer"
|
|
10015
10249
|
};
|
|
@@ -10082,7 +10316,7 @@ function nl_default() {
|
|
|
10082
10316
|
localeError: error37()
|
|
10083
10317
|
};
|
|
10084
10318
|
}
|
|
10085
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10319
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/nn.js
|
|
10086
10320
|
var error38 = () => {
|
|
10087
10321
|
const Sizable = {
|
|
10088
10322
|
string: { unit: "teikn", verb: "\xE5 ha" },
|
|
@@ -10123,6 +10357,8 @@ var error38 = () => {
|
|
|
10123
10357
|
json_string: "JSON-streng",
|
|
10124
10358
|
e164: "E.164-nummer",
|
|
10125
10359
|
credit_card: "kredittkortnummer",
|
|
10360
|
+
currency_code: "valutakode",
|
|
10361
|
+
iban: "IBAN",
|
|
10126
10362
|
jwt: "JWT",
|
|
10127
10363
|
template_literal: "input"
|
|
10128
10364
|
};
|
|
@@ -10193,7 +10429,7 @@ function nn_default() {
|
|
|
10193
10429
|
localeError: error38()
|
|
10194
10430
|
};
|
|
10195
10431
|
}
|
|
10196
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10432
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/no.js
|
|
10197
10433
|
var error39 = () => {
|
|
10198
10434
|
const Sizable = {
|
|
10199
10435
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -10234,6 +10470,8 @@ var error39 = () => {
|
|
|
10234
10470
|
json_string: "JSON-streng",
|
|
10235
10471
|
e164: "E.164-nummer",
|
|
10236
10472
|
credit_card: "kredittkortnummer",
|
|
10473
|
+
currency_code: "valutakode",
|
|
10474
|
+
iban: "IBAN",
|
|
10237
10475
|
jwt: "JWT",
|
|
10238
10476
|
template_literal: "input"
|
|
10239
10477
|
};
|
|
@@ -10304,7 +10542,7 @@ function no_default() {
|
|
|
10304
10542
|
localeError: error39()
|
|
10305
10543
|
};
|
|
10306
10544
|
}
|
|
10307
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10545
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ota.js
|
|
10308
10546
|
var error40 = () => {
|
|
10309
10547
|
const Sizable = {
|
|
10310
10548
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -10345,6 +10583,8 @@ var error40 = () => {
|
|
|
10345
10583
|
json_string: "JSON metin",
|
|
10346
10584
|
e164: "E.164 say\u0131s\u0131",
|
|
10347
10585
|
credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
|
|
10586
|
+
currency_code: "para birimi kodu",
|
|
10587
|
+
iban: "IBAN",
|
|
10348
10588
|
jwt: "JWT",
|
|
10349
10589
|
template_literal: "giren"
|
|
10350
10590
|
};
|
|
@@ -10416,7 +10656,7 @@ function ota_default() {
|
|
|
10416
10656
|
localeError: error40()
|
|
10417
10657
|
};
|
|
10418
10658
|
}
|
|
10419
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10659
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ps.js
|
|
10420
10660
|
var error41 = () => {
|
|
10421
10661
|
const Sizable = {
|
|
10422
10662
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -10457,6 +10697,8 @@ var error41 = () => {
|
|
|
10457
10697
|
json_string: "JSON \u0645\u062A\u0646",
|
|
10458
10698
|
e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
|
|
10459
10699
|
credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
|
|
10700
|
+
currency_code: "\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",
|
|
10701
|
+
iban: "IBAN",
|
|
10460
10702
|
jwt: "JWT",
|
|
10461
10703
|
template_literal: "\u0648\u0631\u0648\u062F\u064A"
|
|
10462
10704
|
};
|
|
@@ -10533,7 +10775,7 @@ function ps_default() {
|
|
|
10533
10775
|
localeError: error41()
|
|
10534
10776
|
};
|
|
10535
10777
|
}
|
|
10536
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10778
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/pl.js
|
|
10537
10779
|
var error42 = () => {
|
|
10538
10780
|
const Sizable = {
|
|
10539
10781
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -10574,6 +10816,8 @@ var error42 = () => {
|
|
|
10574
10816
|
json_string: "ci\u0105g znak\xF3w w formacie JSON",
|
|
10575
10817
|
e164: "liczba E.164",
|
|
10576
10818
|
credit_card: "numer karty kredytowej",
|
|
10819
|
+
currency_code: "kod waluty",
|
|
10820
|
+
iban: "IBAN",
|
|
10577
10821
|
jwt: "JWT",
|
|
10578
10822
|
template_literal: "wej\u015Bcie"
|
|
10579
10823
|
};
|
|
@@ -10645,7 +10889,7 @@ function pl_default() {
|
|
|
10645
10889
|
localeError: error42()
|
|
10646
10890
|
};
|
|
10647
10891
|
}
|
|
10648
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
10892
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/pt.js
|
|
10649
10893
|
var error43 = () => {
|
|
10650
10894
|
const Sizable = {
|
|
10651
10895
|
string: { unit: "caracteres" },
|
|
@@ -10686,6 +10930,8 @@ var error43 = () => {
|
|
|
10686
10930
|
json_string: "o texto JSON",
|
|
10687
10931
|
e164: "o n\xFAmero E.164",
|
|
10688
10932
|
credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
|
|
10933
|
+
currency_code: "o c\xF3digo de moeda",
|
|
10934
|
+
iban: "o IBAN",
|
|
10689
10935
|
jwt: "o JWT",
|
|
10690
10936
|
template_literal: "a entrada"
|
|
10691
10937
|
};
|
|
@@ -10785,7 +11031,7 @@ function pt_default() {
|
|
|
10785
11031
|
localeError: error43()
|
|
10786
11032
|
};
|
|
10787
11033
|
}
|
|
10788
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11034
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/pt-BR.js
|
|
10789
11035
|
var error44 = () => {
|
|
10790
11036
|
const Sizable = {
|
|
10791
11037
|
string: { unit: "caracteres" },
|
|
@@ -10826,6 +11072,8 @@ var error44 = () => {
|
|
|
10826
11072
|
json_string: "o texto JSON",
|
|
10827
11073
|
e164: "o n\xFAmero E.164",
|
|
10828
11074
|
credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
|
|
11075
|
+
currency_code: "o c\xF3digo de moeda",
|
|
11076
|
+
iban: "o IBAN",
|
|
10829
11077
|
jwt: "o JWT",
|
|
10830
11078
|
template_literal: "a entrada"
|
|
10831
11079
|
};
|
|
@@ -10926,7 +11174,7 @@ function pt_BR_default() {
|
|
|
10926
11174
|
localeError: error44()
|
|
10927
11175
|
};
|
|
10928
11176
|
}
|
|
10929
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11177
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ro.js
|
|
10930
11178
|
var error45 = () => {
|
|
10931
11179
|
const Sizable = {
|
|
10932
11180
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -10967,6 +11215,8 @@ var error45 = () => {
|
|
|
10967
11215
|
json_string: "\u0219ir JSON",
|
|
10968
11216
|
e164: "num\u0103r E.164",
|
|
10969
11217
|
credit_card: "num\u0103r de card de credit",
|
|
11218
|
+
currency_code: "cod valutar",
|
|
11219
|
+
iban: "IBAN",
|
|
10970
11220
|
jwt: "JWT",
|
|
10971
11221
|
template_literal: "intrare"
|
|
10972
11222
|
};
|
|
@@ -11046,7 +11296,7 @@ function ro_default() {
|
|
|
11046
11296
|
localeError: error45()
|
|
11047
11297
|
};
|
|
11048
11298
|
}
|
|
11049
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11299
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ru.js
|
|
11050
11300
|
function getRussianPlural(count, one, few, many) {
|
|
11051
11301
|
const absCount = Math.abs(count);
|
|
11052
11302
|
const lastDigit = absCount % 10;
|
|
@@ -11137,6 +11387,8 @@ var error46 = () => {
|
|
|
11137
11387
|
json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
|
|
11138
11388
|
e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
|
|
11139
11389
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
|
|
11390
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
|
|
11391
|
+
iban: "IBAN",
|
|
11140
11392
|
jwt: "JWT",
|
|
11141
11393
|
template_literal: "\u0432\u0432\u043E\u0434"
|
|
11142
11394
|
};
|
|
@@ -11212,7 +11464,7 @@ function ru_default() {
|
|
|
11212
11464
|
localeError: error46()
|
|
11213
11465
|
};
|
|
11214
11466
|
}
|
|
11215
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11467
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/sk.js
|
|
11216
11468
|
var error47 = () => {
|
|
11217
11469
|
const Sizable = {
|
|
11218
11470
|
string: { unit: "znakov", verb: "ma\u0165" },
|
|
@@ -11253,6 +11505,8 @@ var error47 = () => {
|
|
|
11253
11505
|
json_string: "re\u0165azec vo form\xE1te JSON",
|
|
11254
11506
|
e164: "\u010D\xEDslo E.164",
|
|
11255
11507
|
credit_card: "\u010D\xEDslo kreditnej karty",
|
|
11508
|
+
currency_code: "k\xF3d meny",
|
|
11509
|
+
iban: "IBAN",
|
|
11256
11510
|
jwt: "JWT",
|
|
11257
11511
|
template_literal: "vstup"
|
|
11258
11512
|
};
|
|
@@ -11326,7 +11580,7 @@ function sk_default() {
|
|
|
11326
11580
|
localeError: error47()
|
|
11327
11581
|
};
|
|
11328
11582
|
}
|
|
11329
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11583
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/sl.js
|
|
11330
11584
|
var error48 = () => {
|
|
11331
11585
|
const Sizable = {
|
|
11332
11586
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -11367,6 +11621,8 @@ var error48 = () => {
|
|
|
11367
11621
|
json_string: "JSON niz",
|
|
11368
11622
|
e164: "E.164 \u0161tevilka",
|
|
11369
11623
|
credit_card: "\u0161tevilka kreditne kartice",
|
|
11624
|
+
currency_code: "koda valute",
|
|
11625
|
+
iban: "IBAN",
|
|
11370
11626
|
jwt: "JWT",
|
|
11371
11627
|
template_literal: "vnos"
|
|
11372
11628
|
};
|
|
@@ -11438,7 +11694,7 @@ function sl_default() {
|
|
|
11438
11694
|
localeError: error48()
|
|
11439
11695
|
};
|
|
11440
11696
|
}
|
|
11441
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11697
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/sv.js
|
|
11442
11698
|
var error49 = () => {
|
|
11443
11699
|
const Sizable = {
|
|
11444
11700
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -11479,6 +11735,8 @@ var error49 = () => {
|
|
|
11479
11735
|
json_string: "JSON-str\xE4ng",
|
|
11480
11736
|
e164: "E.164-nummer",
|
|
11481
11737
|
credit_card: "kreditkortsnummer",
|
|
11738
|
+
currency_code: "valutakod",
|
|
11739
|
+
iban: "IBAN",
|
|
11482
11740
|
jwt: "JWT",
|
|
11483
11741
|
template_literal: "mall-literal"
|
|
11484
11742
|
};
|
|
@@ -11551,7 +11809,7 @@ function sv_default() {
|
|
|
11551
11809
|
localeError: error49()
|
|
11552
11810
|
};
|
|
11553
11811
|
}
|
|
11554
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11812
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ta.js
|
|
11555
11813
|
var error50 = () => {
|
|
11556
11814
|
const Sizable = {
|
|
11557
11815
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -11592,6 +11850,8 @@ var error50 = () => {
|
|
|
11592
11850
|
json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
|
|
11593
11851
|
e164: "E.164 \u0B8E\u0BA3\u0BCD",
|
|
11594
11852
|
credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
|
|
11853
|
+
currency_code: "\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",
|
|
11854
|
+
iban: "IBAN",
|
|
11595
11855
|
jwt: "JWT",
|
|
11596
11856
|
template_literal: "input"
|
|
11597
11857
|
};
|
|
@@ -11664,23 +11924,23 @@ function ta_default() {
|
|
|
11664
11924
|
localeError: error50()
|
|
11665
11925
|
};
|
|
11666
11926
|
}
|
|
11667
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11927
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/tg.js
|
|
11668
11928
|
var error51 = () => {
|
|
11669
11929
|
const Sizable = {
|
|
11670
|
-
string: { unit: "\
|
|
11671
|
-
file: { unit: "\
|
|
11672
|
-
array: { unit: "\
|
|
11673
|
-
set: { unit: "\
|
|
11674
|
-
map: { unit: "\
|
|
11930
|
+
string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
11931
|
+
file: { unit: "\u0431\u0430\u0439\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
11932
|
+
array: { unit: "\u0443\u043D\u0441\u0443\u0440", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
11933
|
+
set: { unit: "\u0443\u043D\u0441\u0443\u0440", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
11934
|
+
map: { unit: "\u0441\u0430\u0431\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" }
|
|
11675
11935
|
};
|
|
11676
11936
|
function getSizing(origin) {
|
|
11677
11937
|
return Sizable[origin] ?? null;
|
|
11678
11938
|
}
|
|
11679
11939
|
const FormatDictionary = {
|
|
11680
|
-
regex: "\
|
|
11681
|
-
email: "\
|
|
11940
|
+
regex: "\u0432\u0443\u0440\u0443\u0434",
|
|
11941
|
+
email: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",
|
|
11682
11942
|
url: "URL",
|
|
11683
|
-
emoji: "\
|
|
11943
|
+
emoji: "\u044D\u043C\u043E\u04B7\u0438",
|
|
11684
11944
|
uuid: "UUID",
|
|
11685
11945
|
uuidv4: "UUIDv4",
|
|
11686
11946
|
uuidv6: "UUIDv6",
|
|
@@ -11691,28 +11951,32 @@ var error51 = () => {
|
|
|
11691
11951
|
ulid: "ULID",
|
|
11692
11952
|
xid: "XID",
|
|
11693
11953
|
ksuid: "KSUID",
|
|
11694
|
-
datetime: "\
|
|
11695
|
-
date: "\
|
|
11696
|
-
time: "\
|
|
11697
|
-
duration: "\
|
|
11698
|
-
ipv4: "\
|
|
11699
|
-
ipv6: "\
|
|
11700
|
-
mac: "\
|
|
11701
|
-
cidrv4: "\
|
|
11702
|
-
cidrv6: "\
|
|
11703
|
-
base64: "\
|
|
11704
|
-
base64url: "\
|
|
11705
|
-
json_string: "\
|
|
11706
|
-
e164: "\
|
|
11707
|
-
credit_card: "\
|
|
11708
|
-
|
|
11709
|
-
|
|
11954
|
+
datetime: "\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",
|
|
11955
|
+
date: "\u0441\u0430\u043D\u0430\u0438 ISO",
|
|
11956
|
+
time: "\u0432\u0430\u049B\u0442\u0438 ISO",
|
|
11957
|
+
duration: "\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",
|
|
11958
|
+
ipv4: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",
|
|
11959
|
+
ipv6: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",
|
|
11960
|
+
mac: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",
|
|
11961
|
+
cidrv4: "\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",
|
|
11962
|
+
cidrv6: "\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",
|
|
11963
|
+
base64: "\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",
|
|
11964
|
+
base64url: "\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",
|
|
11965
|
+
json_string: "\u0441\u0430\u0442\u0440\u0438 JSON",
|
|
11966
|
+
e164: "\u0440\u0430\u049B\u0430\u043C\u0438 E.164",
|
|
11967
|
+
credit_card: "\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",
|
|
11968
|
+
currency_code: "\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",
|
|
11969
|
+
iban: "IBAN",
|
|
11970
|
+
jwt: "JWT",
|
|
11971
|
+
template_literal: "\u0432\u0443\u0440\u0443\u0434"
|
|
11710
11972
|
};
|
|
11711
11973
|
const TypeDictionary = {
|
|
11712
11974
|
nan: "NaN",
|
|
11713
|
-
number: "\
|
|
11714
|
-
|
|
11715
|
-
|
|
11975
|
+
number: "\u0440\u0430\u049B\u0430\u043C",
|
|
11976
|
+
string: "\u0441\u0430\u0442\u0440",
|
|
11977
|
+
array: "\u043C\u0430\u0441\u0441\u0438\u0432",
|
|
11978
|
+
object: "\u043E\u0431\u044A\u0435\u043A\u0442",
|
|
11979
|
+
date: "\u0441\u0430\u043D\u0430"
|
|
11716
11980
|
};
|
|
11717
11981
|
return (issue2) => {
|
|
11718
11982
|
switch (issue2.code) {
|
|
@@ -11720,9 +11984,123 @@ var error51 = () => {
|
|
|
11720
11984
|
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
11721
11985
|
const receivedType = parsedType(issue2.input);
|
|
11722
11986
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11987
|
+
return `\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${expected} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${received} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`;
|
|
11988
|
+
}
|
|
11989
|
+
case "invalid_value":
|
|
11990
|
+
if (issue2.values.length === 1)
|
|
11991
|
+
return `\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${stringifyPrimitive(issue2.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;
|
|
11992
|
+
return `\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${joinValues(issue2.values, "|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;
|
|
11993
|
+
case "too_big": {
|
|
11994
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
11995
|
+
const sizing = getSizing(issue2.origin);
|
|
11996
|
+
if (sizing)
|
|
11997
|
+
return `\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${issue2.origin ?? "\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`;
|
|
11998
|
+
return `\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${issue2.origin ?? "\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${adj}${issue2.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`;
|
|
11999
|
+
}
|
|
12000
|
+
case "too_small": {
|
|
12001
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
12002
|
+
const sizing = getSizing(issue2.origin);
|
|
12003
|
+
if (sizing)
|
|
12004
|
+
return `\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${issue2.origin} \u0431\u043E\u044F\u0434 ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
|
|
12005
|
+
return `\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${issue2.origin} \u0431\u043E\u044F\u0434 ${adj}${issue2.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`;
|
|
12006
|
+
}
|
|
12007
|
+
case "invalid_format": {
|
|
12008
|
+
const _issue = issue2;
|
|
12009
|
+
if (_issue.format === "starts_with")
|
|
12010
|
+
return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${_issue.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`;
|
|
12011
|
+
if (_issue.format === "ends_with")
|
|
12012
|
+
return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${_issue.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`;
|
|
12013
|
+
if (_issue.format === "includes")
|
|
12014
|
+
return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${_issue.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`;
|
|
12015
|
+
if (_issue.format === "regex")
|
|
12016
|
+
return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${_issue.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`;
|
|
12017
|
+
return `${FormatDictionary[_issue.format] ?? issue2.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`;
|
|
12018
|
+
}
|
|
12019
|
+
case "not_multiple_of":
|
|
12020
|
+
return `\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${issue2.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;
|
|
12021
|
+
case "unrecognized_keys":
|
|
12022
|
+
return `\u041A\u0430\u043B\u0438\u0434${issue2.keys.length > 1 ? "\u04B3\u043E\u0438" : "\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${joinValues(issue2.keys, ", ")}`;
|
|
12023
|
+
case "invalid_key":
|
|
12024
|
+
return `\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${issue2.origin}`;
|
|
12025
|
+
case "invalid_union":
|
|
12026
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
12027
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
12028
|
+
return `\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${opts} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;
|
|
12029
|
+
}
|
|
12030
|
+
return "\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";
|
|
12031
|
+
case "invalid_element":
|
|
12032
|
+
return `\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${issue2.origin}`;
|
|
12033
|
+
default:
|
|
12034
|
+
return `\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`;
|
|
12035
|
+
}
|
|
12036
|
+
};
|
|
12037
|
+
};
|
|
12038
|
+
function tg_default() {
|
|
12039
|
+
return {
|
|
12040
|
+
localeError: error51()
|
|
12041
|
+
};
|
|
12042
|
+
}
|
|
12043
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/th.js
|
|
12044
|
+
var error52 = () => {
|
|
12045
|
+
const Sizable = {
|
|
12046
|
+
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
12047
|
+
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
12048
|
+
array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
12049
|
+
set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
12050
|
+
map: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }
|
|
12051
|
+
};
|
|
12052
|
+
function getSizing(origin) {
|
|
12053
|
+
return Sizable[origin] ?? null;
|
|
12054
|
+
}
|
|
12055
|
+
const FormatDictionary = {
|
|
12056
|
+
regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",
|
|
12057
|
+
email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",
|
|
12058
|
+
url: "URL",
|
|
12059
|
+
emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",
|
|
12060
|
+
uuid: "UUID",
|
|
12061
|
+
uuidv4: "UUIDv4",
|
|
12062
|
+
uuidv6: "UUIDv6",
|
|
12063
|
+
nanoid: "nanoid",
|
|
12064
|
+
guid: "GUID",
|
|
12065
|
+
cuid: "cuid",
|
|
12066
|
+
cuid2: "cuid2",
|
|
12067
|
+
ulid: "ULID",
|
|
12068
|
+
xid: "XID",
|
|
12069
|
+
ksuid: "KSUID",
|
|
12070
|
+
datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
|
|
12071
|
+
date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",
|
|
12072
|
+
time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
|
|
12073
|
+
duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
|
|
12074
|
+
ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",
|
|
12075
|
+
ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",
|
|
12076
|
+
mac: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",
|
|
12077
|
+
cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",
|
|
12078
|
+
cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",
|
|
12079
|
+
base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",
|
|
12080
|
+
base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",
|
|
12081
|
+
json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
|
|
12082
|
+
e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
|
|
12083
|
+
credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
|
|
12084
|
+
currency_code: "\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",
|
|
12085
|
+
iban: "IBAN",
|
|
12086
|
+
jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
|
|
12087
|
+
template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
|
|
12088
|
+
};
|
|
12089
|
+
const TypeDictionary = {
|
|
12090
|
+
nan: "NaN",
|
|
12091
|
+
number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",
|
|
12092
|
+
array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",
|
|
12093
|
+
null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"
|
|
12094
|
+
};
|
|
12095
|
+
return (issue2) => {
|
|
12096
|
+
switch (issue2.code) {
|
|
12097
|
+
case "invalid_type": {
|
|
12098
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
12099
|
+
const receivedType = parsedType(issue2.input);
|
|
12100
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
12101
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
12102
|
+
return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
|
|
12103
|
+
}
|
|
11726
12104
|
return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
|
|
11727
12105
|
}
|
|
11728
12106
|
case "invalid_value":
|
|
@@ -11774,11 +12152,11 @@ var error51 = () => {
|
|
|
11774
12152
|
};
|
|
11775
12153
|
function th_default() {
|
|
11776
12154
|
return {
|
|
11777
|
-
localeError:
|
|
12155
|
+
localeError: error52()
|
|
11778
12156
|
};
|
|
11779
12157
|
}
|
|
11780
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11781
|
-
var
|
|
12158
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/tk.js
|
|
12159
|
+
var error53 = () => {
|
|
11782
12160
|
const Sizable = {
|
|
11783
12161
|
string: { unit: "simwol", verb: "bolmaly" },
|
|
11784
12162
|
file: { unit: "ba\xFDt", verb: "bolmaly" },
|
|
@@ -11818,6 +12196,8 @@ var error52 = () => {
|
|
|
11818
12196
|
json_string: "JSON setiri",
|
|
11819
12197
|
e164: "E.164 nomeri",
|
|
11820
12198
|
credit_card: "kredit kartyny\u0148 nomeri",
|
|
12199
|
+
currency_code: "wal\xFDuta kody",
|
|
12200
|
+
iban: "IBAN",
|
|
11821
12201
|
jwt: "JWT",
|
|
11822
12202
|
template_literal: "\u015Fablon"
|
|
11823
12203
|
};
|
|
@@ -11879,11 +12259,11 @@ var error52 = () => {
|
|
|
11879
12259
|
};
|
|
11880
12260
|
function tk_default() {
|
|
11881
12261
|
return {
|
|
11882
|
-
localeError:
|
|
12262
|
+
localeError: error53()
|
|
11883
12263
|
};
|
|
11884
12264
|
}
|
|
11885
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11886
|
-
var
|
|
12265
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/tr.js
|
|
12266
|
+
var error54 = () => {
|
|
11887
12267
|
const Sizable = {
|
|
11888
12268
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
11889
12269
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -11923,6 +12303,8 @@ var error53 = () => {
|
|
|
11923
12303
|
json_string: "JSON dizesi",
|
|
11924
12304
|
e164: "E.164 say\u0131s\u0131",
|
|
11925
12305
|
credit_card: "kredi kart\u0131 numaras\u0131",
|
|
12306
|
+
currency_code: "para birimi kodu",
|
|
12307
|
+
iban: "IBAN",
|
|
11926
12308
|
jwt: "JWT",
|
|
11927
12309
|
template_literal: "\u015Eablon dizesi"
|
|
11928
12310
|
};
|
|
@@ -11987,11 +12369,11 @@ var error53 = () => {
|
|
|
11987
12369
|
};
|
|
11988
12370
|
function tr_default() {
|
|
11989
12371
|
return {
|
|
11990
|
-
localeError:
|
|
12372
|
+
localeError: error54()
|
|
11991
12373
|
};
|
|
11992
12374
|
}
|
|
11993
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
11994
|
-
var
|
|
12375
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/uk.js
|
|
12376
|
+
var error55 = () => {
|
|
11995
12377
|
const Sizable = {
|
|
11996
12378
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
11997
12379
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -12031,6 +12413,8 @@ var error54 = () => {
|
|
|
12031
12413
|
json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
|
|
12032
12414
|
e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
|
|
12033
12415
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
|
|
12416
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",
|
|
12417
|
+
iban: "IBAN",
|
|
12034
12418
|
jwt: "JWT",
|
|
12035
12419
|
template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
|
|
12036
12420
|
};
|
|
@@ -12098,16 +12482,16 @@ var error54 = () => {
|
|
|
12098
12482
|
};
|
|
12099
12483
|
function uk_default() {
|
|
12100
12484
|
return {
|
|
12101
|
-
localeError:
|
|
12485
|
+
localeError: error55()
|
|
12102
12486
|
};
|
|
12103
12487
|
}
|
|
12104
12488
|
|
|
12105
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12489
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ua.js
|
|
12106
12490
|
function ua_default() {
|
|
12107
12491
|
return uk_default();
|
|
12108
12492
|
}
|
|
12109
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12110
|
-
var
|
|
12493
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/ur.js
|
|
12494
|
+
var error56 = () => {
|
|
12111
12495
|
const Sizable = {
|
|
12112
12496
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
12113
12497
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -12147,6 +12531,8 @@ var error55 = () => {
|
|
|
12147
12531
|
json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
|
|
12148
12532
|
e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
|
|
12149
12533
|
credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
|
|
12534
|
+
currency_code: "\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",
|
|
12535
|
+
iban: "IBAN",
|
|
12150
12536
|
jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
|
|
12151
12537
|
template_literal: "\u0627\u0646 \u067E\u0679"
|
|
12152
12538
|
};
|
|
@@ -12216,11 +12602,11 @@ var error55 = () => {
|
|
|
12216
12602
|
};
|
|
12217
12603
|
function ur_default() {
|
|
12218
12604
|
return {
|
|
12219
|
-
localeError:
|
|
12605
|
+
localeError: error56()
|
|
12220
12606
|
};
|
|
12221
12607
|
}
|
|
12222
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12223
|
-
var
|
|
12608
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/uz.js
|
|
12609
|
+
var error57 = () => {
|
|
12224
12610
|
const Sizable = {
|
|
12225
12611
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
12226
12612
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
@@ -12260,6 +12646,8 @@ var error56 = () => {
|
|
|
12260
12646
|
json_string: "JSON satr",
|
|
12261
12647
|
e164: "E.164 raqam",
|
|
12262
12648
|
credit_card: "kredit karta raqami",
|
|
12649
|
+
currency_code: "valyuta kodi",
|
|
12650
|
+
iban: "IBAN",
|
|
12263
12651
|
jwt: "JWT",
|
|
12264
12652
|
template_literal: "kirish"
|
|
12265
12653
|
};
|
|
@@ -12327,11 +12715,11 @@ var error56 = () => {
|
|
|
12327
12715
|
};
|
|
12328
12716
|
function uz_default() {
|
|
12329
12717
|
return {
|
|
12330
|
-
localeError:
|
|
12718
|
+
localeError: error57()
|
|
12331
12719
|
};
|
|
12332
12720
|
}
|
|
12333
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12334
|
-
var
|
|
12721
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/vi.js
|
|
12722
|
+
var error58 = () => {
|
|
12335
12723
|
const Sizable = {
|
|
12336
12724
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
12337
12725
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -12371,6 +12759,8 @@ var error57 = () => {
|
|
|
12371
12759
|
json_string: "chu\u1ED7i JSON",
|
|
12372
12760
|
e164: "s\u1ED1 E.164",
|
|
12373
12761
|
credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
|
|
12762
|
+
currency_code: "m\xE3 ti\u1EC1n t\u1EC7",
|
|
12763
|
+
iban: "IBAN",
|
|
12374
12764
|
jwt: "JWT",
|
|
12375
12765
|
template_literal: "\u0111\u1EA7u v\xE0o"
|
|
12376
12766
|
};
|
|
@@ -12438,11 +12828,11 @@ var error57 = () => {
|
|
|
12438
12828
|
};
|
|
12439
12829
|
function vi_default() {
|
|
12440
12830
|
return {
|
|
12441
|
-
localeError:
|
|
12831
|
+
localeError: error58()
|
|
12442
12832
|
};
|
|
12443
12833
|
}
|
|
12444
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12445
|
-
var
|
|
12834
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/zh-CN.js
|
|
12835
|
+
var error59 = () => {
|
|
12446
12836
|
const Sizable = {
|
|
12447
12837
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
12448
12838
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -12482,6 +12872,8 @@ var error58 = () => {
|
|
|
12482
12872
|
json_string: "JSON\u5B57\u7B26\u4E32",
|
|
12483
12873
|
e164: "E.164\u53F7\u7801",
|
|
12484
12874
|
credit_card: "\u4FE1\u7528\u5361\u53F7",
|
|
12875
|
+
currency_code: "\u8D27\u5E01\u4EE3\u7801",
|
|
12876
|
+
iban: "IBAN",
|
|
12485
12877
|
jwt: "JWT",
|
|
12486
12878
|
template_literal: "\u8F93\u5165"
|
|
12487
12879
|
};
|
|
@@ -12550,11 +12942,11 @@ var error58 = () => {
|
|
|
12550
12942
|
};
|
|
12551
12943
|
function zh_CN_default() {
|
|
12552
12944
|
return {
|
|
12553
|
-
localeError:
|
|
12945
|
+
localeError: error59()
|
|
12554
12946
|
};
|
|
12555
12947
|
}
|
|
12556
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12557
|
-
var
|
|
12948
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/zh-TW.js
|
|
12949
|
+
var error60 = () => {
|
|
12558
12950
|
const Sizable = {
|
|
12559
12951
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
12560
12952
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -12594,6 +12986,8 @@ var error59 = () => {
|
|
|
12594
12986
|
json_string: "JSON \u5B57\u4E32",
|
|
12595
12987
|
e164: "E.164 \u6578\u503C",
|
|
12596
12988
|
credit_card: "\u4FE1\u7528\u5361\u865F",
|
|
12989
|
+
currency_code: "\u8CA8\u5E63\u4EE3\u78BC",
|
|
12990
|
+
iban: "IBAN",
|
|
12597
12991
|
jwt: "JWT",
|
|
12598
12992
|
template_literal: "\u8F38\u5165"
|
|
12599
12993
|
};
|
|
@@ -12660,11 +13054,11 @@ var error59 = () => {
|
|
|
12660
13054
|
};
|
|
12661
13055
|
function zh_TW_default() {
|
|
12662
13056
|
return {
|
|
12663
|
-
localeError:
|
|
13057
|
+
localeError: error60()
|
|
12664
13058
|
};
|
|
12665
13059
|
}
|
|
12666
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
12667
|
-
var
|
|
13060
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/yo.js
|
|
13061
|
+
var error61 = () => {
|
|
12668
13062
|
const Sizable = {
|
|
12669
13063
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
12670
13064
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -12704,6 +13098,8 @@ var error60 = () => {
|
|
|
12704
13098
|
json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
|
|
12705
13099
|
e164: "n\u1ECD\u0301mb\xE0 E.164",
|
|
12706
13100
|
credit_card: "n\u1ECDmba kaadi gbese",
|
|
13101
|
+
currency_code: "koodu ow\xF3",
|
|
13102
|
+
iban: "IBAN",
|
|
12707
13103
|
jwt: "JWT",
|
|
12708
13104
|
template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
|
|
12709
13105
|
};
|
|
@@ -12770,10 +13166,10 @@ var error60 = () => {
|
|
|
12770
13166
|
};
|
|
12771
13167
|
function yo_default() {
|
|
12772
13168
|
return {
|
|
12773
|
-
localeError:
|
|
13169
|
+
localeError: error61()
|
|
12774
13170
|
};
|
|
12775
13171
|
}
|
|
12776
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
13172
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/registries.js
|
|
12777
13173
|
var _a2;
|
|
12778
13174
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
12779
13175
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
@@ -12823,7 +13219,7 @@ function registry() {
|
|
|
12823
13219
|
}
|
|
12824
13220
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
12825
13221
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
12826
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
13222
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/compile.js
|
|
12827
13223
|
var INVALID = Symbol.for("zod.compile.invalid");
|
|
12828
13224
|
var FALLBACK_FLAG = Symbol.for("zod.compile.fallback");
|
|
12829
13225
|
|
|
@@ -12851,31 +13247,8 @@ function compileValidator(schema, parser) {
|
|
|
12851
13247
|
function compile(schema, options) {
|
|
12852
13248
|
try {
|
|
12853
13249
|
const parser = compileFn(schema);
|
|
12854
|
-
const clone2 =
|
|
12855
|
-
const liveRun = schema._zod.run;
|
|
12856
|
-
const originalRun = liveRun.__originalRun ?? liveRun;
|
|
12857
|
-
const wrapped = (payload, ctx) => {
|
|
12858
|
-
if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks || ctx?.[FALLBACK_FLAG]) {
|
|
12859
|
-
return originalRun(payload, ctx);
|
|
12860
|
-
}
|
|
12861
|
-
if (ctx && isBackEdge(ctx, payload.value)) {
|
|
12862
|
-
return originalRun(payload, ctx);
|
|
12863
|
-
}
|
|
12864
|
-
const out = parser(payload.value);
|
|
12865
|
-
if (out !== INVALID) {
|
|
12866
|
-
payload.value = out;
|
|
12867
|
-
return payload;
|
|
12868
|
-
}
|
|
12869
|
-
if (ctx)
|
|
12870
|
-
ctx[FALLBACK_FLAG] = true;
|
|
12871
|
-
return originalRun(payload, ctx);
|
|
12872
|
-
};
|
|
12873
|
-
wrapped.__originalRun = originalRun;
|
|
12874
|
-
clone2._zod.bag.fallbackRun = originalRun;
|
|
13250
|
+
const clone2 = withParser(schema, parser);
|
|
12875
13251
|
clone2._zod.bag.validator = compileValidator(schema, parser);
|
|
12876
|
-
clone2._zod.run = wrapped;
|
|
12877
|
-
if (!liveRun.__originalRun)
|
|
12878
|
-
installCompiledUserMethods(clone2, schema, parser);
|
|
12879
13252
|
return clone2;
|
|
12880
13253
|
} catch (err) {
|
|
12881
13254
|
if (options?.strict)
|
|
@@ -12883,6 +13256,37 @@ function compile(schema, options) {
|
|
|
12883
13256
|
return schema;
|
|
12884
13257
|
}
|
|
12885
13258
|
}
|
|
13259
|
+
function withParser(schema, parser) {
|
|
13260
|
+
if (isRecursiveSchema(schema)) {
|
|
13261
|
+
throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");
|
|
13262
|
+
}
|
|
13263
|
+
const clone2 = clone(schema);
|
|
13264
|
+
const liveRun = schema._zod.run;
|
|
13265
|
+
const originalRun = liveRun.__originalRun ?? liveRun;
|
|
13266
|
+
const wrapped = (payload, ctx) => {
|
|
13267
|
+
if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks || ctx?.[FALLBACK_FLAG]) {
|
|
13268
|
+
return originalRun(payload, ctx);
|
|
13269
|
+
}
|
|
13270
|
+
if (ctx && isBackEdge(ctx, payload.value)) {
|
|
13271
|
+
return originalRun(payload, ctx);
|
|
13272
|
+
}
|
|
13273
|
+
const out = parser(payload.value);
|
|
13274
|
+
if (out !== INVALID) {
|
|
13275
|
+
payload.value = out;
|
|
13276
|
+
return payload;
|
|
13277
|
+
}
|
|
13278
|
+
if (ctx)
|
|
13279
|
+
ctx[FALLBACK_FLAG] = true;
|
|
13280
|
+
return originalRun(payload, ctx);
|
|
13281
|
+
};
|
|
13282
|
+
wrapped.__originalRun = originalRun;
|
|
13283
|
+
clone2._zod.bag.fallbackRun = originalRun;
|
|
13284
|
+
clone2._zod.bag.validator = parser;
|
|
13285
|
+
clone2._zod.run = wrapped;
|
|
13286
|
+
if (!liveRun.__originalRun)
|
|
13287
|
+
installCompiledUserMethods(clone2, schema, parser);
|
|
13288
|
+
return clone2;
|
|
13289
|
+
}
|
|
12886
13290
|
function installCompiledUserMethods(target, source, parser) {
|
|
12887
13291
|
const targetAny = target;
|
|
12888
13292
|
const sourceAny = source;
|
|
@@ -12918,7 +13322,8 @@ function compileFn(schema, options) {
|
|
|
12918
13322
|
const ctx = {
|
|
12919
13323
|
constants: new Map,
|
|
12920
13324
|
constantCounter: 0,
|
|
12921
|
-
varCounter: 0
|
|
13325
|
+
varCounter: 0,
|
|
13326
|
+
definite: true
|
|
12922
13327
|
};
|
|
12923
13328
|
const doc = new Doc(["input"]);
|
|
12924
13329
|
const outputAccessor = generateCheck(doc, ctx, schema, "input", !options?.assertOnly);
|
|
@@ -12943,6 +13348,7 @@ ${code}
|
|
|
12943
13348
|
if (options?.debug) {
|
|
12944
13349
|
fn.code = fullCode;
|
|
12945
13350
|
}
|
|
13351
|
+
fn.definite = ctx.definite;
|
|
12946
13352
|
return fn;
|
|
12947
13353
|
}
|
|
12948
13354
|
function addConstant(ctx, value) {
|
|
@@ -12954,6 +13360,10 @@ function addConstant(ctx, value) {
|
|
|
12954
13360
|
ctx.constants.set(name, value);
|
|
12955
13361
|
return name;
|
|
12956
13362
|
}
|
|
13363
|
+
function addUserConstant(ctx, fn) {
|
|
13364
|
+
ctx.definite = false;
|
|
13365
|
+
return addConstant(ctx, fn);
|
|
13366
|
+
}
|
|
12957
13367
|
function newVar(ctx) {
|
|
12958
13368
|
return `v${ctx.varCounter++}`;
|
|
12959
13369
|
}
|
|
@@ -12986,6 +13396,7 @@ function compileChild(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
12986
13396
|
}
|
|
12987
13397
|
}
|
|
12988
13398
|
function emitRuntimeIsland(doc, ctx, schema, accessor) {
|
|
13399
|
+
ctx.definite = false;
|
|
12989
13400
|
const schemaConst = addConstant(ctx, schema);
|
|
12990
13401
|
const runConst = addConstant(ctx, runtimeRun);
|
|
12991
13402
|
const outVar = newVar(ctx);
|
|
@@ -13066,6 +13477,9 @@ function generateChecks(doc, ctx, schema, accessor) {
|
|
|
13066
13477
|
case "property":
|
|
13067
13478
|
generatePropertyCheck(doc, ctx, def, currentAccessor);
|
|
13068
13479
|
break;
|
|
13480
|
+
case "properties":
|
|
13481
|
+
generatePropertiesChecks(doc, ctx, def, currentAccessor);
|
|
13482
|
+
break;
|
|
13069
13483
|
case "overwrite": {
|
|
13070
13484
|
const newAccessor = newVar(ctx);
|
|
13071
13485
|
generateOverwriteCheck(doc, ctx, check, currentAccessor, newAccessor);
|
|
@@ -13171,6 +13585,19 @@ function generateMimeTypeCheck(doc, ctx, def, accessor) {
|
|
|
13171
13585
|
doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
|
|
13172
13586
|
}
|
|
13173
13587
|
}
|
|
13588
|
+
function generatePropertiesChecks(doc, ctx, def, accessor) {
|
|
13589
|
+
if (def.when) {
|
|
13590
|
+
throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
|
|
13591
|
+
}
|
|
13592
|
+
doc.write(`if (${accessor} == null) return INVALID;`);
|
|
13593
|
+
const shape = def.shape;
|
|
13594
|
+
for (const key of Reflect.ownKeys(shape)) {
|
|
13595
|
+
const keyExpr = typeof key === "symbol" ? addConstant(ctx, key) : esc(key);
|
|
13596
|
+
const inputVar = newVar(ctx);
|
|
13597
|
+
doc.write(`const ${inputVar} = ${accessor}[${keyExpr}];`);
|
|
13598
|
+
compileChild(doc, ctx, shape[key], inputVar, false);
|
|
13599
|
+
}
|
|
13600
|
+
}
|
|
13174
13601
|
function generatePropertyCheck(doc, ctx, def, accessor) {
|
|
13175
13602
|
const propAccessor = `${accessor}[${JSON.stringify(def.property)}]`;
|
|
13176
13603
|
generateCheck(doc, ctx, def.schema, propAccessor);
|
|
@@ -13198,7 +13625,7 @@ function generateCustomRefineCheck(doc, ctx, check, accessor) {
|
|
|
13198
13625
|
if (isAsyncFunction(def.fn)) {
|
|
13199
13626
|
throw new ZodCompileAsyncError("z.compile: async .refine() predicates are not supported");
|
|
13200
13627
|
}
|
|
13201
|
-
const fnConst =
|
|
13628
|
+
const fnConst = addUserConstant(ctx, def.fn);
|
|
13202
13629
|
const throwAsyncConst = addConstant(ctx, throwAsync);
|
|
13203
13630
|
const resVar = newVar(ctx);
|
|
13204
13631
|
doc.write(`const ${resVar} = ${fnConst}(${accessor});`);
|
|
@@ -13218,7 +13645,7 @@ function generateCustomRefineCheck(doc, ctx, check, accessor) {
|
|
|
13218
13645
|
throwAsync();
|
|
13219
13646
|
return fakePayload.issues.length === 0 ? fakePayload.value : INVALID;
|
|
13220
13647
|
};
|
|
13221
|
-
const helperConst =
|
|
13648
|
+
const helperConst = addUserConstant(ctx, helperFn);
|
|
13222
13649
|
const outVar = newVar(ctx);
|
|
13223
13650
|
doc.write(`const ${outVar} = ${helperConst}(${accessor});`);
|
|
13224
13651
|
doc.write(`if (${outVar} === INVALID) return INVALID;`);
|
|
@@ -13252,7 +13679,7 @@ var PATTERN_IS_COMPLETE = new Set([
|
|
|
13252
13679
|
"uuid",
|
|
13253
13680
|
"xid"
|
|
13254
13681
|
]);
|
|
13255
|
-
function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
13682
|
+
function generateStringFormatCheck(doc, ctx, def, accessor, needsValue = true) {
|
|
13256
13683
|
const fmt = def.format;
|
|
13257
13684
|
if (fmt === "base64") {
|
|
13258
13685
|
const validator = addConstant(ctx, isValidBase64);
|
|
@@ -13285,9 +13712,14 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
|
13285
13712
|
doc.write(`if (!${validator}(${accessor})) return INVALID;`);
|
|
13286
13713
|
return accessor;
|
|
13287
13714
|
}
|
|
13715
|
+
if (fmt === "iban") {
|
|
13716
|
+
const validator = addConstant(ctx, isValidIBAN);
|
|
13717
|
+
doc.write(`if (!${validator}(${accessor})) return INVALID;`);
|
|
13718
|
+
return accessor;
|
|
13719
|
+
}
|
|
13288
13720
|
const formatDef = def;
|
|
13289
13721
|
if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== undefined || formatDef.protocol !== undefined) {
|
|
13290
|
-
const parseConst = addConstant(ctx,
|
|
13722
|
+
const parseConst = addConstant(ctx, validateURL);
|
|
13291
13723
|
const defConst = addConstant(ctx, def);
|
|
13292
13724
|
const trimVar = newVar(ctx);
|
|
13293
13725
|
const urlVar = newVar(ctx);
|
|
@@ -13302,6 +13734,8 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
|
13302
13734
|
const protocolConst = addConstant(ctx, urlProtocolOk);
|
|
13303
13735
|
doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
|
|
13304
13736
|
}
|
|
13737
|
+
if (!needsValue)
|
|
13738
|
+
return null;
|
|
13305
13739
|
const outputVar = newVar(ctx);
|
|
13306
13740
|
const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;
|
|
13307
13741
|
doc.write(`const ${outputVar} = ${outputExpr};`);
|
|
@@ -13360,7 +13794,7 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13360
13794
|
let typeAccessor;
|
|
13361
13795
|
switch (type) {
|
|
13362
13796
|
case "string":
|
|
13363
|
-
typeAccessor = generateStringCheck(doc, ctx, schema, accessor);
|
|
13797
|
+
typeAccessor = generateStringCheck(doc, ctx, schema, accessor, buildsValue);
|
|
13364
13798
|
break;
|
|
13365
13799
|
case "number":
|
|
13366
13800
|
typeAccessor = generateNumberCheck(doc, schema, accessor);
|
|
@@ -13480,12 +13914,12 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13480
13914
|
return null;
|
|
13481
13915
|
return generateChecks(doc, ctx, schema, typeAccessor);
|
|
13482
13916
|
}
|
|
13483
|
-
function generateStringCheck(doc, ctx, schema, accessor) {
|
|
13917
|
+
function generateStringCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
13484
13918
|
doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
|
|
13485
13919
|
const def = schema._zod.def;
|
|
13486
13920
|
if (def.format === undefined)
|
|
13487
13921
|
return accessor;
|
|
13488
|
-
return generateStringFormatCheck(doc, ctx, def, accessor);
|
|
13922
|
+
return generateStringFormatCheck(doc, ctx, def, accessor, needsValue);
|
|
13489
13923
|
}
|
|
13490
13924
|
function generateNumberCheck(doc, schema, accessor) {
|
|
13491
13925
|
doc.write(`if (typeof ${accessor} !== "number" || !Number.isFinite(${accessor})) return INVALID;`);
|
|
@@ -13603,7 +14037,7 @@ function generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
13603
14037
|
}
|
|
13604
14038
|
}
|
|
13605
14039
|
const outputVar = newVar(ctx);
|
|
13606
|
-
const hasConditionalKeys = allKeys.some((k) =>
|
|
14040
|
+
const hasConditionalKeys = allKeys.some((k) => mayOmitUndefined(propShape[k]) || dropsWhenAbsent(propShape[k]));
|
|
13607
14041
|
if (!buildsValue) {
|
|
13608
14042
|
if (unknownKeysMode === "schema") {
|
|
13609
14043
|
const knownSet = keys.length > 0 ? addConstant(ctx, new Set(keys)) : null;
|
|
@@ -13630,7 +14064,7 @@ function generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
13630
14064
|
const out = propOutputs.get(k);
|
|
13631
14065
|
if (dropsWhenAbsent(propShape[k])) {
|
|
13632
14066
|
doc.write(`if (${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);
|
|
13633
|
-
} else if (
|
|
14067
|
+
} else if (mayOmitUndefined(propShape[k])) {
|
|
13634
14068
|
doc.write(`if (${out} !== undefined || ${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);
|
|
13635
14069
|
} else {
|
|
13636
14070
|
doc.write(`${outputVar}[${kx}] = ${out};`);
|
|
@@ -13763,6 +14197,9 @@ function fastPathAcceptsAbsence(schema) {
|
|
|
13763
14197
|
function dropsWhenAbsent(schema) {
|
|
13764
14198
|
return schema._zod.optin === "optional" && schema._zod.optout === "optional";
|
|
13765
14199
|
}
|
|
14200
|
+
function mayOmitUndefined(schema) {
|
|
14201
|
+
return (schema._zod.optin !== "defaulted" || schema._zod.optout === "optional") && mayOutputUndefined(schema);
|
|
14202
|
+
}
|
|
13766
14203
|
function mayOutputUndefined(schema) {
|
|
13767
14204
|
const def = schema._zod.def;
|
|
13768
14205
|
switch (def.type) {
|
|
@@ -14105,6 +14542,7 @@ function literalEquality(ctx, accessor, value) {
|
|
|
14105
14542
|
}
|
|
14106
14543
|
function generateIntersectionCheck(doc, ctx, schema, accessor) {
|
|
14107
14544
|
const def = schema._zod.def;
|
|
14545
|
+
ctx.definite = false;
|
|
14108
14546
|
const leftOutput = compileChild(doc, ctx, def.left, accessor);
|
|
14109
14547
|
const rightOutput = compileChild(doc, ctx, def.right, accessor);
|
|
14110
14548
|
const mergeConst = addConstant(ctx, mergeValues);
|
|
@@ -14158,14 +14596,13 @@ function generateRecordCheck(doc, ctx, schema, accessor) {
|
|
|
14158
14596
|
const keyIsBareString = keyDef.type === "string" && keyDef.format === undefined && !keyDef.coerce && (keyDef.checks?.length ?? 0) === 0;
|
|
14159
14597
|
if (!keyIsBareString) {
|
|
14160
14598
|
const isLoose = def.mode === "loose";
|
|
14161
|
-
const
|
|
14599
|
+
const keyFn = compileFn(def.keyType);
|
|
14600
|
+
if (keyFn.definite === false)
|
|
14601
|
+
ctx.definite = false;
|
|
14602
|
+
const keyFast = addConstant(ctx, keyFn);
|
|
14162
14603
|
const numericConst = addConstant(ctx, number);
|
|
14163
|
-
const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);
|
|
14164
14604
|
const outKeyVar = newVar(ctx);
|
|
14165
|
-
doc
|
|
14166
|
-
doc.indented((d) => {
|
|
14167
|
-
d.write(`if (${kVar} === "__proto__") continue;`);
|
|
14168
|
-
d.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
|
|
14605
|
+
emitOwnKeys(doc, ctx, accessor, kVar, (d) => {
|
|
14169
14606
|
d.write(`let ${outKeyVar} = ${keyFast}(${kVar});`);
|
|
14170
14607
|
d.write(`if (${outKeyVar} === INVALID && typeof ${kVar} === "string" && ${numericConst}.test(${kVar})) ${outKeyVar} = ${keyFast}(Number(${kVar}));`);
|
|
14171
14608
|
if (isLoose) {
|
|
@@ -14179,21 +14616,39 @@ function generateRecordCheck(doc, ctx, schema, accessor) {
|
|
|
14179
14616
|
const valOutput = compileChild(d, ctx, def.valueType, valueVar);
|
|
14180
14617
|
d.write(`${outputVar}[${outKeyVar}] = ${valOutput};`);
|
|
14181
14618
|
});
|
|
14182
|
-
doc.write(`}`);
|
|
14183
14619
|
return outputVar;
|
|
14184
14620
|
}
|
|
14185
|
-
|
|
14186
|
-
doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);
|
|
14187
|
-
doc.indented((d) => {
|
|
14188
|
-
d.write(`if (${kVar} === "__proto__") continue;`);
|
|
14189
|
-
d.write(`if (!${propIsEnumerable}.call(${accessor}, ${kVar})) continue;`);
|
|
14190
|
-
d.write(`if (typeof ${kVar} !== "string") return INVALID;`);
|
|
14621
|
+
emitOwnKeys(doc, ctx, accessor, kVar, (d) => {
|
|
14191
14622
|
d.write(`const ${valVar} = ${accessor}[${kVar}];`);
|
|
14192
14623
|
const valOutput = compileChild(d, ctx, def.valueType, valVar);
|
|
14193
14624
|
d.write(`${outputVar}[${kVar}] = ${valOutput};`);
|
|
14625
|
+
}, `return INVALID;`);
|
|
14626
|
+
return outputVar;
|
|
14627
|
+
}
|
|
14628
|
+
function emitOwnKeys(doc, ctx, accessor, kVar, body, onSymbol) {
|
|
14629
|
+
const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);
|
|
14630
|
+
const symsVar = newVar(ctx);
|
|
14631
|
+
const keysVar = newVar(ctx);
|
|
14632
|
+
const iVar = newVar(ctx);
|
|
14633
|
+
doc.write(`const ${symsVar} = Object.getOwnPropertySymbols(${accessor});`);
|
|
14634
|
+
doc.write(`const ${keysVar} = Object.getOwnPropertyNames(${accessor});`);
|
|
14635
|
+
doc.write(`for (let ${iVar} = 0; ${iVar} < ${keysVar}.length; ${iVar}++) {`);
|
|
14636
|
+
doc.indented((d) => {
|
|
14637
|
+
d.write(`const ${kVar} = ${keysVar}[${iVar}];`);
|
|
14638
|
+
d.write(`if (${kVar} === "__proto__" || !${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
|
|
14639
|
+
body(d);
|
|
14640
|
+
});
|
|
14641
|
+
doc.write(`}`);
|
|
14642
|
+
doc.write(`for (let ${iVar} = 0; ${iVar} < ${symsVar}.length; ${iVar}++) {`);
|
|
14643
|
+
doc.indented((d) => {
|
|
14644
|
+
d.write(`const ${kVar} = ${symsVar}[${iVar}];`);
|
|
14645
|
+
d.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
|
|
14646
|
+
if (onSymbol)
|
|
14647
|
+
d.write(onSymbol);
|
|
14648
|
+
else
|
|
14649
|
+
body(d);
|
|
14194
14650
|
});
|
|
14195
14651
|
doc.write(`}`);
|
|
14196
|
-
return outputVar;
|
|
14197
14652
|
}
|
|
14198
14653
|
function literalPropertyKey(ctx, key) {
|
|
14199
14654
|
if (typeof key === "string")
|
|
@@ -14246,7 +14701,7 @@ function generateTemplateLiteralCheck(doc, ctx, schema, accessor) {
|
|
|
14246
14701
|
}
|
|
14247
14702
|
function generateLazyCheck(doc, ctx, schema, accessor) {
|
|
14248
14703
|
const def = schema._zod.def;
|
|
14249
|
-
const getterConst =
|
|
14704
|
+
const getterConst = addUserConstant(ctx, def.getter);
|
|
14250
14705
|
const cacheConst = addConstant(ctx, { parser: null });
|
|
14251
14706
|
doc.write(`if (!${cacheConst}.parser) {`);
|
|
14252
14707
|
doc.indented((d) => {
|
|
@@ -14279,7 +14734,7 @@ function generatePipeCheck(doc, ctx, schema, accessor) {
|
|
|
14279
14734
|
return INVALID;
|
|
14280
14735
|
return fakePayload.issues.length === 0 ? result : INVALID;
|
|
14281
14736
|
};
|
|
14282
|
-
const helperConst =
|
|
14737
|
+
const helperConst = addUserConstant(ctx, helperFn);
|
|
14283
14738
|
const transformedVar = newVar(ctx);
|
|
14284
14739
|
doc.write(`const ${transformedVar} = ${helperConst}(${inputOutput});`);
|
|
14285
14740
|
doc.write(`if (${transformedVar} === INVALID) return INVALID;`);
|
|
@@ -14297,7 +14752,7 @@ function generateCustomCheck(doc, ctx, schema, accessor) {
|
|
|
14297
14752
|
if (isAsyncFunction(def.fn)) {
|
|
14298
14753
|
throw new ZodCompileAsyncError("z.compile: async custom predicates are not supported");
|
|
14299
14754
|
}
|
|
14300
|
-
const fnConst =
|
|
14755
|
+
const fnConst = addUserConstant(ctx, def.fn);
|
|
14301
14756
|
const throwAsyncConst = addConstant(ctx, throwAsync);
|
|
14302
14757
|
const resVar = newVar(ctx);
|
|
14303
14758
|
doc.write(`const ${resVar} = ${fnConst}(${accessor});`);
|
|
@@ -14330,7 +14785,7 @@ function generateCatchCheck(doc, ctx, schema, accessor) {
|
|
|
14330
14785
|
});
|
|
14331
14786
|
doc.write(`})();`);
|
|
14332
14787
|
const innerConst = addConstant(ctx, def.innerType);
|
|
14333
|
-
const catchConst =
|
|
14788
|
+
const catchConst = addUserConstant(ctx, def.catchValue);
|
|
14334
14789
|
const catchHelperConst = addConstant(ctx, runtimeCatch);
|
|
14335
14790
|
doc.write(`if (${outputVar} === INVALID) {`);
|
|
14336
14791
|
doc.indented((d) => {
|
|
@@ -14354,7 +14809,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
14354
14809
|
return INVALID;
|
|
14355
14810
|
return fakePayload.issues.length === 0 ? result : INVALID;
|
|
14356
14811
|
};
|
|
14357
|
-
const helperConst =
|
|
14812
|
+
const helperConst = addUserConstant(ctx, helperFn);
|
|
14358
14813
|
const outputVar = newVar(ctx);
|
|
14359
14814
|
doc.write(`const ${outputVar} = ${helperConst}(${accessor});`);
|
|
14360
14815
|
doc.write(`if (${outputVar} === INVALID) return INVALID;`);
|
|
@@ -14362,19 +14817,17 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
14362
14817
|
}
|
|
14363
14818
|
return accessor;
|
|
14364
14819
|
}
|
|
14365
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
14820
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/api.js
|
|
14821
|
+
function snapshotChecks(def) {
|
|
14822
|
+
if (def.checks)
|
|
14823
|
+
def.checks = [...def.checks];
|
|
14824
|
+
return def;
|
|
14825
|
+
}
|
|
14366
14826
|
function _string(Class2, params) {
|
|
14367
|
-
return new Class2({
|
|
14368
|
-
type: "string",
|
|
14369
|
-
...normalizeParams(params)
|
|
14370
|
-
});
|
|
14827
|
+
return new Class2(snapshotChecks({ type: "string", ...normalizeParams(params) }));
|
|
14371
14828
|
}
|
|
14372
14829
|
function _coercedString(Class2, params) {
|
|
14373
|
-
return new Class2({
|
|
14374
|
-
type: "string",
|
|
14375
|
-
coerce: true,
|
|
14376
|
-
...normalizeParams(params)
|
|
14377
|
-
});
|
|
14830
|
+
return new Class2(snapshotChecks({ type: "string", coerce: true, ...normalizeParams(params) }));
|
|
14378
14831
|
}
|
|
14379
14832
|
function _email(Class2, params) {
|
|
14380
14833
|
return new Class2({
|
|
@@ -14586,6 +15039,15 @@ function _creditCard(Class2, params) {
|
|
|
14586
15039
|
...normalizeParams(params)
|
|
14587
15040
|
});
|
|
14588
15041
|
}
|
|
15042
|
+
function _iban(Class2, params) {
|
|
15043
|
+
return new Class2({
|
|
15044
|
+
type: "string",
|
|
15045
|
+
format: "iban",
|
|
15046
|
+
check: "string_format",
|
|
15047
|
+
abort: false,
|
|
15048
|
+
...normalizeParams(params)
|
|
15049
|
+
});
|
|
15050
|
+
}
|
|
14589
15051
|
function _jwt(Class2, params) {
|
|
14590
15052
|
return new Class2({
|
|
14591
15053
|
type: "string",
|
|
@@ -14639,19 +15101,10 @@ function _isoDuration(Class2, params) {
|
|
|
14639
15101
|
});
|
|
14640
15102
|
}
|
|
14641
15103
|
function _number(Class2, params) {
|
|
14642
|
-
return new Class2({
|
|
14643
|
-
type: "number",
|
|
14644
|
-
checks: [],
|
|
14645
|
-
...normalizeParams(params)
|
|
14646
|
-
});
|
|
15104
|
+
return new Class2(snapshotChecks({ type: "number", checks: [], ...normalizeParams(params) }));
|
|
14647
15105
|
}
|
|
14648
15106
|
function _coercedNumber(Class2, params) {
|
|
14649
|
-
return new Class2({
|
|
14650
|
-
type: "number",
|
|
14651
|
-
coerce: true,
|
|
14652
|
-
checks: [],
|
|
14653
|
-
...normalizeParams(params)
|
|
14654
|
-
});
|
|
15107
|
+
return new Class2(snapshotChecks({ type: "number", coerce: true, checks: [], ...normalizeParams(params) }));
|
|
14655
15108
|
}
|
|
14656
15109
|
function _int(Class2, params) {
|
|
14657
15110
|
return new Class2({
|
|
@@ -14949,8 +15402,12 @@ function _property(property, schema, params) {
|
|
|
14949
15402
|
...normalizeParams(params)
|
|
14950
15403
|
});
|
|
14951
15404
|
}
|
|
14952
|
-
function _properties(shape) {
|
|
14953
|
-
return
|
|
15405
|
+
function _properties(shape, params) {
|
|
15406
|
+
return new $ZodCheckProperties({
|
|
15407
|
+
check: "properties",
|
|
15408
|
+
shape,
|
|
15409
|
+
...normalizeParams(params)
|
|
15410
|
+
});
|
|
14954
15411
|
}
|
|
14955
15412
|
function _mime(types, params) {
|
|
14956
15413
|
return new $ZodCheckMimeType({
|
|
@@ -15297,7 +15754,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
15297
15754
|
const inst = new Class2(def);
|
|
15298
15755
|
return inst;
|
|
15299
15756
|
}
|
|
15300
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
15757
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
|
|
15301
15758
|
function assignProps(target, ...sources) {
|
|
15302
15759
|
for (const source of sources) {
|
|
15303
15760
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -15341,7 +15798,7 @@ function handleUnrepresentable(schema, ctx, json, params, message) {
|
|
|
15341
15798
|
Object.assign(json, result);
|
|
15342
15799
|
return true;
|
|
15343
15800
|
}
|
|
15344
|
-
function
|
|
15801
|
+
function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
15345
15802
|
var _a3;
|
|
15346
15803
|
const def = schema._zod.def;
|
|
15347
15804
|
const seen = ctx.seen.get(schema);
|
|
@@ -15380,7 +15837,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
15380
15837
|
if (parent) {
|
|
15381
15838
|
if (!result.ref)
|
|
15382
15839
|
result.ref = parent;
|
|
15383
|
-
|
|
15840
|
+
processSchema(parent, ctx, params);
|
|
15384
15841
|
ctx.seen.get(parent).isParent = true;
|
|
15385
15842
|
}
|
|
15386
15843
|
}
|
|
@@ -15485,7 +15942,6 @@ function extractDefs(ctx, schema) {
|
|
|
15485
15942
|
if (seen.count > 1) {
|
|
15486
15943
|
if (ctx.reused === "ref") {
|
|
15487
15944
|
extractToDef(entry);
|
|
15488
|
-
continue;
|
|
15489
15945
|
}
|
|
15490
15946
|
}
|
|
15491
15947
|
}
|
|
@@ -15810,18 +16266,106 @@ function isTransforming(_schema, _ctx) {
|
|
|
15810
16266
|
}
|
|
15811
16267
|
var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
15812
16268
|
const ctx = initializeContext({ ...params, processors });
|
|
15813
|
-
|
|
16269
|
+
processSchema(schema, ctx);
|
|
15814
16270
|
extractDefs(ctx, schema);
|
|
15815
16271
|
return finalize(ctx, schema);
|
|
15816
16272
|
};
|
|
15817
16273
|
var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
|
|
15818
16274
|
const { libraryOptions, target } = params ?? {};
|
|
15819
16275
|
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
|
|
15820
|
-
|
|
16276
|
+
processSchema(schema, ctx);
|
|
15821
16277
|
extractDefs(ctx, schema);
|
|
15822
16278
|
return finalize(ctx, schema);
|
|
15823
16279
|
};
|
|
15824
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
16280
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
|
|
16281
|
+
var narrowMin = (agg, key, value) => {
|
|
16282
|
+
if (agg[key] === undefined || value > agg[key])
|
|
16283
|
+
agg[key] = value;
|
|
16284
|
+
};
|
|
16285
|
+
var narrowMax = (agg, key, value) => {
|
|
16286
|
+
if (agg[key] === undefined || value < agg[key])
|
|
16287
|
+
agg[key] = value;
|
|
16288
|
+
};
|
|
16289
|
+
var narrowBoth = (agg, value) => {
|
|
16290
|
+
narrowMin(agg, "minimum", value);
|
|
16291
|
+
narrowMax(agg, "maximum", value);
|
|
16292
|
+
};
|
|
16293
|
+
var addDivisor = (agg, value) => {
|
|
16294
|
+
agg.multipleOf ?? (agg.multipleOf = []);
|
|
16295
|
+
if (!agg.multipleOf.includes(value))
|
|
16296
|
+
agg.multipleOf.push(value);
|
|
16297
|
+
};
|
|
16298
|
+
var addPattern = (agg, pattern) => {
|
|
16299
|
+
agg.patterns ?? (agg.patterns = new Set);
|
|
16300
|
+
agg.patterns.add(pattern);
|
|
16301
|
+
};
|
|
16302
|
+
var intersectMime = (agg, mime) => {
|
|
16303
|
+
agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime];
|
|
16304
|
+
};
|
|
16305
|
+
var setFormat = (agg, format) => {
|
|
16306
|
+
agg.format = format;
|
|
16307
|
+
if (format.includes("int"))
|
|
16308
|
+
agg.isInt = true;
|
|
16309
|
+
};
|
|
16310
|
+
var minContributor = (agg, def) => narrowMin(agg, "minimum", def.minimum);
|
|
16311
|
+
var maxContributor = (agg, def) => narrowMax(agg, "maximum", def.maximum);
|
|
16312
|
+
var formatContributor = (ranges) => (agg, def) => {
|
|
16313
|
+
setFormat(agg, def.format);
|
|
16314
|
+
const [minimum, maximum] = ranges[def.format];
|
|
16315
|
+
narrowMin(agg, "minimum", minimum);
|
|
16316
|
+
narrowMax(agg, "maximum", maximum);
|
|
16317
|
+
};
|
|
16318
|
+
var contributors = {
|
|
16319
|
+
greater_than: (agg, def) => narrowMin(agg, def.inclusive ? "minimum" : "exclusiveMinimum", def.value),
|
|
16320
|
+
less_than: (agg, def) => narrowMax(agg, def.inclusive ? "maximum" : "exclusiveMaximum", def.value),
|
|
16321
|
+
multiple_of: (agg, def) => addDivisor(agg, def.value),
|
|
16322
|
+
number_format: formatContributor(NUMBER_FORMAT_RANGES),
|
|
16323
|
+
bigint_format: formatContributor(BIGINT_FORMAT_RANGES),
|
|
16324
|
+
min_length: minContributor,
|
|
16325
|
+
max_length: maxContributor,
|
|
16326
|
+
length_equals: (agg, def) => narrowBoth(agg, def.length),
|
|
16327
|
+
min_size: minContributor,
|
|
16328
|
+
max_size: maxContributor,
|
|
16329
|
+
size_equals: (agg, def) => narrowBoth(agg, def.size),
|
|
16330
|
+
string_format: (agg, def) => {
|
|
16331
|
+
setFormat(agg, def.format);
|
|
16332
|
+
if (def.pattern)
|
|
16333
|
+
addPattern(agg, def.pattern);
|
|
16334
|
+
if (def.format === "base64" || def.format === "base64url")
|
|
16335
|
+
agg.contentEncoding = def.format;
|
|
16336
|
+
if (def.local || def.precision === -1)
|
|
16337
|
+
agg.laxFormat = true;
|
|
16338
|
+
},
|
|
16339
|
+
mime_type: (agg, def) => intersectMime(agg, def.mime)
|
|
16340
|
+
};
|
|
16341
|
+
function aggregateChecks(schema) {
|
|
16342
|
+
const agg = {};
|
|
16343
|
+
const def = schema._zod.def;
|
|
16344
|
+
const list = schema._zod.traits.has("$ZodCheck") ? [schema, ...def.checks ?? []] : def.checks ?? [];
|
|
16345
|
+
for (const ch of list)
|
|
16346
|
+
contributors[ch._zod.def.check]?.(agg, ch._zod.def);
|
|
16347
|
+
const bag = schema._zod.bag;
|
|
16348
|
+
if (bag.minimum !== undefined)
|
|
16349
|
+
narrowMin(agg, "minimum", bag.minimum);
|
|
16350
|
+
if (bag.exclusiveMinimum !== undefined)
|
|
16351
|
+
narrowMin(agg, "exclusiveMinimum", bag.exclusiveMinimum);
|
|
16352
|
+
if (bag.maximum !== undefined)
|
|
16353
|
+
narrowMax(agg, "maximum", bag.maximum);
|
|
16354
|
+
if (bag.exclusiveMaximum !== undefined)
|
|
16355
|
+
narrowMax(agg, "exclusiveMaximum", bag.exclusiveMaximum);
|
|
16356
|
+
if (bag.multipleOf !== undefined)
|
|
16357
|
+
addDivisor(agg, bag.multipleOf);
|
|
16358
|
+
if (bag.format !== undefined) {
|
|
16359
|
+
agg.format ?? (agg.format = bag.format);
|
|
16360
|
+
if (bag.format.includes("int"))
|
|
16361
|
+
agg.isInt = true;
|
|
16362
|
+
}
|
|
16363
|
+
if (bag.mime)
|
|
16364
|
+
intersectMime(agg, bag.mime);
|
|
16365
|
+
for (const pattern of bag.patterns ?? [])
|
|
16366
|
+
addPattern(agg, pattern);
|
|
16367
|
+
return agg;
|
|
16368
|
+
}
|
|
15825
16369
|
var formatMap = {
|
|
15826
16370
|
guid: "uuid",
|
|
15827
16371
|
url: "uri",
|
|
@@ -15829,10 +16373,15 @@ var formatMap = {
|
|
|
15829
16373
|
json_string: "json-string",
|
|
15830
16374
|
regex: ""
|
|
15831
16375
|
};
|
|
16376
|
+
var exactPatterns = new Map([
|
|
16377
|
+
[base64Charset, base64],
|
|
16378
|
+
[base64urlCharset, base64url]
|
|
16379
|
+
]);
|
|
16380
|
+
var exactPattern = (p) => exactPatterns.get(p) ?? p;
|
|
15832
16381
|
var stringProcessor = (schema, ctx, _json, _params) => {
|
|
15833
16382
|
const json = _json;
|
|
15834
16383
|
json.type = "string";
|
|
15835
|
-
const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = schema
|
|
16384
|
+
const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);
|
|
15836
16385
|
if (typeof minimum === "number")
|
|
15837
16386
|
json.minLength = minimum;
|
|
15838
16387
|
if (typeof maximum === "number")
|
|
@@ -15848,7 +16397,7 @@ var stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
15848
16397
|
if (contentEncoding)
|
|
15849
16398
|
json.contentEncoding = contentEncoding;
|
|
15850
16399
|
if (patterns && patterns.size > 0) {
|
|
15851
|
-
const patternList = [...patterns];
|
|
16400
|
+
const patternList = [...patterns].map(exactPattern);
|
|
15852
16401
|
if (patternList.length === 1)
|
|
15853
16402
|
json.pattern = patternList[0].source;
|
|
15854
16403
|
else if (patternList.length > 1) {
|
|
@@ -15863,11 +16412,8 @@ var stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
15863
16412
|
};
|
|
15864
16413
|
var numberProcessor = (schema, ctx, _json, params) => {
|
|
15865
16414
|
const json = _json;
|
|
15866
|
-
const { minimum, maximum,
|
|
15867
|
-
|
|
15868
|
-
json.type = "integer";
|
|
15869
|
-
else
|
|
15870
|
-
json.type = "number";
|
|
16415
|
+
const { minimum, maximum, multipleOf, exclusiveMaximum, exclusiveMinimum, isInt } = aggregateChecks(schema);
|
|
16416
|
+
json.type = isInt ? "integer" : "number";
|
|
15871
16417
|
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
15872
16418
|
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
15873
16419
|
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
@@ -15891,11 +16437,19 @@ var numberProcessor = (schema, ctx, _json, params) => {
|
|
|
15891
16437
|
} else if (typeof maximum === "number") {
|
|
15892
16438
|
json.maximum = maximum;
|
|
15893
16439
|
}
|
|
15894
|
-
if (
|
|
15895
|
-
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
|
|
16440
|
+
if (multipleOf) {
|
|
16441
|
+
const divisors = new Set;
|
|
16442
|
+
for (const divisor of multipleOf) {
|
|
16443
|
+
if (Number.isFinite(divisor) && divisor !== 0)
|
|
16444
|
+
divisors.add(Math.abs(divisor));
|
|
16445
|
+
else
|
|
16446
|
+
handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`);
|
|
16447
|
+
}
|
|
16448
|
+
const [first, ...rest] = divisors;
|
|
16449
|
+
if (first !== undefined)
|
|
16450
|
+
json.multipleOf = first;
|
|
16451
|
+
if (rest.length)
|
|
16452
|
+
json.allOf = [...json.allOf ?? [], ...rest.map((m) => ({ multipleOf: m }))];
|
|
15899
16453
|
}
|
|
15900
16454
|
};
|
|
15901
16455
|
var booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
@@ -15995,27 +16549,22 @@ var templateLiteralProcessor = (schema, _ctx, json, _params) => {
|
|
|
15995
16549
|
};
|
|
15996
16550
|
var fileProcessor = (schema, _ctx, json, _params) => {
|
|
15997
16551
|
const _json = json;
|
|
15998
|
-
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
};
|
|
16003
|
-
const { minimum, maximum, mime } = schema._zod.bag;
|
|
16552
|
+
_json.type = "string";
|
|
16553
|
+
_json.format = "binary";
|
|
16554
|
+
_json.contentEncoding = "binary";
|
|
16555
|
+
const { minimum, maximum, mime } = aggregateChecks(schema);
|
|
16004
16556
|
if (minimum !== undefined)
|
|
16005
|
-
|
|
16557
|
+
_json.minLength = minimum;
|
|
16006
16558
|
if (maximum !== undefined)
|
|
16007
|
-
|
|
16008
|
-
if (mime)
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
}
|
|
16016
|
-
} else {
|
|
16017
|
-
Object.assign(_json, file);
|
|
16018
|
-
}
|
|
16559
|
+
_json.maxLength = maximum;
|
|
16560
|
+
if (!mime)
|
|
16561
|
+
return;
|
|
16562
|
+
if (mime.length === 0)
|
|
16563
|
+
_json.not = {};
|
|
16564
|
+
else if (mime.length === 1)
|
|
16565
|
+
_json.contentMediaType = mime[0];
|
|
16566
|
+
else
|
|
16567
|
+
_json.anyOf = mime.map((m) => ({ contentMediaType: m }));
|
|
16019
16568
|
};
|
|
16020
16569
|
var successProcessor = (_schema, _ctx, json, _params) => {
|
|
16021
16570
|
json.type = "boolean";
|
|
@@ -16038,13 +16587,13 @@ var setProcessor = (schema, ctx, json, params) => {
|
|
|
16038
16587
|
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
16039
16588
|
const json = _json;
|
|
16040
16589
|
const def = schema._zod.def;
|
|
16041
|
-
const { minimum, maximum } = schema
|
|
16590
|
+
const { minimum, maximum } = aggregateChecks(schema);
|
|
16042
16591
|
if (typeof minimum === "number")
|
|
16043
16592
|
json.minItems = minimum;
|
|
16044
16593
|
if (typeof maximum === "number")
|
|
16045
16594
|
json.maxItems = maximum;
|
|
16046
16595
|
json.type = "array";
|
|
16047
|
-
json.items =
|
|
16596
|
+
json.items = processSchema(def.element, ctx, {
|
|
16048
16597
|
...params,
|
|
16049
16598
|
path: [...params.path, "items"]
|
|
16050
16599
|
});
|
|
@@ -16070,22 +16619,20 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16070
16619
|
json.type = "object";
|
|
16071
16620
|
json.properties = {};
|
|
16072
16621
|
for (const key in shape) {
|
|
16073
|
-
assignProp(json.properties, key,
|
|
16622
|
+
assignProp(json.properties, key, processSchema(shape[key], ctx, {
|
|
16074
16623
|
...params,
|
|
16075
16624
|
path: [...params.path, "properties", key]
|
|
16076
16625
|
}));
|
|
16077
16626
|
}
|
|
16078
|
-
const
|
|
16079
|
-
const
|
|
16627
|
+
const requiredKeys = [];
|
|
16628
|
+
for (const key of Object.keys(shape)) {
|
|
16080
16629
|
const field = def.shape[key];
|
|
16081
|
-
if (ctx.io === "input") {
|
|
16082
|
-
|
|
16083
|
-
} else {
|
|
16084
|
-
return field._zod.optout === undefined;
|
|
16630
|
+
if (ctx.io === "input" ? inputOptin(field) === undefined : field._zod.optout === undefined) {
|
|
16631
|
+
requiredKeys.push(key);
|
|
16085
16632
|
}
|
|
16086
|
-
}
|
|
16087
|
-
if (requiredKeys.
|
|
16088
|
-
json.required =
|
|
16633
|
+
}
|
|
16634
|
+
if (requiredKeys.length > 0) {
|
|
16635
|
+
json.required = requiredKeys;
|
|
16089
16636
|
}
|
|
16090
16637
|
if (def.catchall?._zod.def.type === "never") {
|
|
16091
16638
|
json.additionalProperties = false;
|
|
@@ -16093,7 +16640,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16093
16640
|
if (ctx.io === "output")
|
|
16094
16641
|
json.additionalProperties = false;
|
|
16095
16642
|
} else if (def.catchall) {
|
|
16096
|
-
json.additionalProperties =
|
|
16643
|
+
json.additionalProperties = processSchema(def.catchall, ctx, {
|
|
16097
16644
|
...params,
|
|
16098
16645
|
path: [...params.path, "additionalProperties"]
|
|
16099
16646
|
});
|
|
@@ -16102,7 +16649,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16102
16649
|
var unionProcessor = (schema, ctx, json, params) => {
|
|
16103
16650
|
const def = schema._zod.def;
|
|
16104
16651
|
const isExclusive = def.inclusive === false;
|
|
16105
|
-
const options = def.options.map((x, i) =>
|
|
16652
|
+
const options = def.options.map((x, i) => processSchema(x, ctx, {
|
|
16106
16653
|
...params,
|
|
16107
16654
|
path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
|
|
16108
16655
|
}));
|
|
@@ -16114,11 +16661,11 @@ var unionProcessor = (schema, ctx, json, params) => {
|
|
|
16114
16661
|
};
|
|
16115
16662
|
var intersectionProcessor = (schema, ctx, json, params) => {
|
|
16116
16663
|
const def = schema._zod.def;
|
|
16117
|
-
const a =
|
|
16664
|
+
const a = processSchema(def.left, ctx, {
|
|
16118
16665
|
...params,
|
|
16119
16666
|
path: [...params.path, "allOf", 0]
|
|
16120
16667
|
});
|
|
16121
|
-
const b =
|
|
16668
|
+
const b = processSchema(def.right, ctx, {
|
|
16122
16669
|
...params,
|
|
16123
16670
|
path: [...params.path, "allOf", 1]
|
|
16124
16671
|
});
|
|
@@ -16136,11 +16683,11 @@ var tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
16136
16683
|
json.type = "array";
|
|
16137
16684
|
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
16138
16685
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
16139
|
-
const prefixItems = def.items.map((x, i) =>
|
|
16686
|
+
const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
|
|
16140
16687
|
...params,
|
|
16141
16688
|
path: [...params.path, prefixPath, i]
|
|
16142
16689
|
}));
|
|
16143
|
-
const rest = def.rest ?
|
|
16690
|
+
const rest = def.rest ? processSchema(def.rest, ctx, {
|
|
16144
16691
|
...params,
|
|
16145
16692
|
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
16146
16693
|
}) : null;
|
|
@@ -16188,7 +16735,7 @@ var tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
16188
16735
|
if (isClosed)
|
|
16189
16736
|
json.maxItems = maxItems;
|
|
16190
16737
|
}
|
|
16191
|
-
const { minimum, maximum } = schema
|
|
16738
|
+
const { minimum, maximum } = aggregateChecks(schema);
|
|
16192
16739
|
if (typeof minimum === "number")
|
|
16193
16740
|
json.minItems = minimum;
|
|
16194
16741
|
if (typeof maximum === "number")
|
|
@@ -16262,20 +16809,19 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
16262
16809
|
const def = schema._zod.def;
|
|
16263
16810
|
json.type = "object";
|
|
16264
16811
|
const keyType = def.keyType;
|
|
16265
|
-
const
|
|
16266
|
-
const patterns = keyBag?.patterns;
|
|
16812
|
+
const patterns = aggregateChecks(keyType).patterns;
|
|
16267
16813
|
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
16268
|
-
const valueSchema =
|
|
16814
|
+
const valueSchema = processSchema(def.valueType, ctx, {
|
|
16269
16815
|
...params,
|
|
16270
16816
|
path: [...params.path, "patternProperties", "*"]
|
|
16271
16817
|
});
|
|
16272
16818
|
json.patternProperties = {};
|
|
16273
16819
|
for (const pattern of patterns) {
|
|
16274
|
-
assignProp(json.patternProperties, pattern.source, valueSchema);
|
|
16820
|
+
assignProp(json.patternProperties, exactPattern(pattern).source, valueSchema);
|
|
16275
16821
|
}
|
|
16276
16822
|
} else {
|
|
16277
16823
|
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
|
|
16278
|
-
json.propertyNames =
|
|
16824
|
+
json.propertyNames = processSchema(def.keyType, ctx, {
|
|
16279
16825
|
...params,
|
|
16280
16826
|
path: [...params.path, "propertyNames"]
|
|
16281
16827
|
});
|
|
@@ -16287,7 +16833,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
16287
16833
|
}
|
|
16288
16834
|
pending.push(schema);
|
|
16289
16835
|
}
|
|
16290
|
-
json.additionalProperties =
|
|
16836
|
+
json.additionalProperties = processSchema(def.valueType, ctx, {
|
|
16291
16837
|
...params,
|
|
16292
16838
|
path: [...params.path, "additionalProperties"]
|
|
16293
16839
|
});
|
|
@@ -16303,7 +16849,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
16303
16849
|
};
|
|
16304
16850
|
var nullableProcessor = (schema, ctx, json, params) => {
|
|
16305
16851
|
const def = schema._zod.def;
|
|
16306
|
-
const inner =
|
|
16852
|
+
const inner = processSchema(def.innerType, ctx, params);
|
|
16307
16853
|
const seen = ctx.seen.get(schema);
|
|
16308
16854
|
if (ctx.target === "openapi-3.0") {
|
|
16309
16855
|
seen.ref = def.innerType;
|
|
@@ -16314,7 +16860,7 @@ var nullableProcessor = (schema, ctx, json, params) => {
|
|
|
16314
16860
|
};
|
|
16315
16861
|
var nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
16316
16862
|
const def = schema._zod.def;
|
|
16317
|
-
|
|
16863
|
+
processSchema(def.innerType, ctx, params);
|
|
16318
16864
|
const seen = ctx.seen.get(schema);
|
|
16319
16865
|
seen.ref = def.innerType;
|
|
16320
16866
|
};
|
|
@@ -16334,7 +16880,7 @@ function serializeDefaultValue(value, schema, ctx, json, params) {
|
|
|
16334
16880
|
}
|
|
16335
16881
|
var defaultProcessor = (schema, ctx, json, params) => {
|
|
16336
16882
|
const def = schema._zod.def;
|
|
16337
|
-
|
|
16883
|
+
processSchema(def.innerType, ctx, params);
|
|
16338
16884
|
const seen = ctx.seen.get(schema);
|
|
16339
16885
|
seen.ref = def.innerType;
|
|
16340
16886
|
const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);
|
|
@@ -16343,7 +16889,7 @@ var defaultProcessor = (schema, ctx, json, params) => {
|
|
|
16343
16889
|
};
|
|
16344
16890
|
var prefaultProcessor = (schema, ctx, json, params) => {
|
|
16345
16891
|
const def = schema._zod.def;
|
|
16346
|
-
|
|
16892
|
+
processSchema(def.innerType, ctx, params);
|
|
16347
16893
|
const seen = ctx.seen.get(schema);
|
|
16348
16894
|
seen.ref = def.innerType;
|
|
16349
16895
|
if (ctx.io !== "input")
|
|
@@ -16354,7 +16900,7 @@ var prefaultProcessor = (schema, ctx, json, params) => {
|
|
|
16354
16900
|
};
|
|
16355
16901
|
var catchProcessor = (schema, ctx, json, params) => {
|
|
16356
16902
|
const def = schema._zod.def;
|
|
16357
|
-
|
|
16903
|
+
processSchema(def.innerType, ctx, params);
|
|
16358
16904
|
const seen = ctx.seen.get(schema);
|
|
16359
16905
|
seen.ref = def.innerType;
|
|
16360
16906
|
let catchValue;
|
|
@@ -16370,32 +16916,32 @@ var pipeProcessor = (schema, ctx, _json, params) => {
|
|
|
16370
16916
|
const def = schema._zod.def;
|
|
16371
16917
|
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
16372
16918
|
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
16373
|
-
|
|
16919
|
+
processSchema(innerType, ctx, params);
|
|
16374
16920
|
const seen = ctx.seen.get(schema);
|
|
16375
16921
|
seen.ref = innerType;
|
|
16376
16922
|
};
|
|
16377
16923
|
var readonlyProcessor = (schema, ctx, json, params) => {
|
|
16378
16924
|
const def = schema._zod.def;
|
|
16379
|
-
|
|
16925
|
+
processSchema(def.innerType, ctx, params);
|
|
16380
16926
|
const seen = ctx.seen.get(schema);
|
|
16381
16927
|
seen.ref = def.innerType;
|
|
16382
16928
|
json.readOnly = true;
|
|
16383
16929
|
};
|
|
16384
16930
|
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
16385
16931
|
const def = schema._zod.def;
|
|
16386
|
-
|
|
16932
|
+
processSchema(def.innerType, ctx, params);
|
|
16387
16933
|
const seen = ctx.seen.get(schema);
|
|
16388
16934
|
seen.ref = def.innerType;
|
|
16389
16935
|
};
|
|
16390
16936
|
var optionalProcessor = (schema, ctx, _json, params) => {
|
|
16391
16937
|
const def = schema._zod.def;
|
|
16392
|
-
|
|
16938
|
+
processSchema(def.innerType, ctx, params);
|
|
16393
16939
|
const seen = ctx.seen.get(schema);
|
|
16394
16940
|
seen.ref = def.innerType;
|
|
16395
16941
|
};
|
|
16396
16942
|
var lazyProcessor = (schema, ctx, _json, params) => {
|
|
16397
16943
|
const innerType = schema._zod.innerType;
|
|
16398
|
-
|
|
16944
|
+
processSchema(innerType, ctx, params);
|
|
16399
16945
|
const seen = ctx.seen.get(schema);
|
|
16400
16946
|
seen.ref = innerType;
|
|
16401
16947
|
};
|
|
@@ -16447,7 +16993,7 @@ function toJSONSchema(input, params) {
|
|
|
16447
16993
|
const defs = {};
|
|
16448
16994
|
for (const entry of registry2._idmap.entries()) {
|
|
16449
16995
|
const [_, schema] = entry;
|
|
16450
|
-
|
|
16996
|
+
processSchema(schema, ctx2);
|
|
16451
16997
|
}
|
|
16452
16998
|
const schemas = {};
|
|
16453
16999
|
const external = {
|
|
@@ -16470,11 +17016,11 @@ function toJSONSchema(input, params) {
|
|
|
16470
17016
|
return { schemas };
|
|
16471
17017
|
}
|
|
16472
17018
|
const ctx = initializeContext({ ...params, processors: allProcessors });
|
|
16473
|
-
|
|
17019
|
+
processSchema(input, ctx);
|
|
16474
17020
|
extractDefs(ctx, input);
|
|
16475
17021
|
return finalize(ctx, input);
|
|
16476
17022
|
}
|
|
16477
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17023
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/json-schema-generator.js
|
|
16478
17024
|
class JSONSchemaGenerator {
|
|
16479
17025
|
get metadataRegistry() {
|
|
16480
17026
|
return this.ctx.metadataRegistry;
|
|
@@ -16516,7 +17062,7 @@ class JSONSchemaGenerator {
|
|
|
16516
17062
|
});
|
|
16517
17063
|
}
|
|
16518
17064
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
16519
|
-
return
|
|
17065
|
+
return processSchema(schema, this.ctx, _params);
|
|
16520
17066
|
}
|
|
16521
17067
|
emit(schema, _params) {
|
|
16522
17068
|
if (_params) {
|
|
@@ -16535,9 +17081,9 @@ class JSONSchemaGenerator {
|
|
|
16535
17081
|
return plainResult;
|
|
16536
17082
|
}
|
|
16537
17083
|
}
|
|
16538
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17084
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/json-schema.js
|
|
16539
17085
|
var exports_json_schema = {};
|
|
16540
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17086
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
16541
17087
|
var exports_schemas2 = {};
|
|
16542
17088
|
__export(exports_schemas2, {
|
|
16543
17089
|
ZodAny: () => ZodAny,
|
|
@@ -16567,12 +17113,14 @@ __export(exports_schemas2, {
|
|
|
16567
17113
|
ZodFile: () => ZodFile,
|
|
16568
17114
|
ZodFunction: () => ZodFunction,
|
|
16569
17115
|
ZodGUID: () => ZodGUID,
|
|
17116
|
+
ZodIBAN: () => ZodIBAN,
|
|
16570
17117
|
ZodIPv4: () => ZodIPv4,
|
|
16571
17118
|
ZodIPv6: () => ZodIPv6,
|
|
16572
17119
|
ZodISODate: () => ZodISODate,
|
|
16573
17120
|
ZodISODateTime: () => ZodISODateTime,
|
|
16574
17121
|
ZodISODuration: () => ZodISODuration,
|
|
16575
17122
|
ZodISOTime: () => ZodISOTime,
|
|
17123
|
+
ZodInstanceOf: () => ZodInstanceOf,
|
|
16576
17124
|
ZodIntersection: () => ZodIntersection,
|
|
16577
17125
|
ZodJWT: () => ZodJWT,
|
|
16578
17126
|
ZodKSUID: () => ZodKSUID,
|
|
@@ -16631,6 +17179,7 @@ __export(exports_schemas2, {
|
|
|
16631
17179
|
creditCard: () => creditCard2,
|
|
16632
17180
|
cuid: () => cuid3,
|
|
16633
17181
|
cuid2: () => cuid22,
|
|
17182
|
+
currencyCode: () => currencyCode2,
|
|
16634
17183
|
custom: () => custom,
|
|
16635
17184
|
date: () => date2,
|
|
16636
17185
|
describe: () => describe2,
|
|
@@ -16649,6 +17198,7 @@ __export(exports_schemas2, {
|
|
|
16649
17198
|
hex: () => hex2,
|
|
16650
17199
|
hostname: () => hostname2,
|
|
16651
17200
|
httpUrl: () => httpUrl,
|
|
17201
|
+
iban: () => iban2,
|
|
16652
17202
|
instanceof: () => _instanceof,
|
|
16653
17203
|
int: () => int,
|
|
16654
17204
|
int32: () => int32,
|
|
@@ -16714,7 +17264,7 @@ __export(exports_schemas2, {
|
|
|
16714
17264
|
xor: () => xor
|
|
16715
17265
|
});
|
|
16716
17266
|
|
|
16717
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17267
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/checks.js
|
|
16718
17268
|
var exports_checks2 = {};
|
|
16719
17269
|
__export(exports_checks2, {
|
|
16720
17270
|
endsWith: () => _endsWith,
|
|
@@ -16749,7 +17299,7 @@ __export(exports_checks2, {
|
|
|
16749
17299
|
uppercase: () => _uppercase
|
|
16750
17300
|
});
|
|
16751
17301
|
|
|
16752
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17302
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/errors.js
|
|
16753
17303
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
16754
17304
|
function _lazyMethod(proto, key, make) {
|
|
16755
17305
|
Object.defineProperty(proto, key, {
|
|
@@ -16795,7 +17345,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, undefi
|
|
|
16795
17345
|
Parent: Error
|
|
16796
17346
|
});
|
|
16797
17347
|
|
|
16798
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17348
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/parse.js
|
|
16799
17349
|
var parse3 = /* @__PURE__ */ _parse(ZodRealError);
|
|
16800
17350
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
16801
17351
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -16809,7 +17359,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
16809
17359
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
16810
17360
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
16811
17361
|
|
|
16812
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
17362
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
|
|
16813
17363
|
function _ensureDefaultLocale() {
|
|
16814
17364
|
if (!globalConfig.localeError)
|
|
16815
17365
|
config2(en_default());
|
|
@@ -16949,6 +17499,12 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
16949
17499
|
set spa(value) {
|
|
16950
17500
|
exports_util.own(this, "spa", value);
|
|
16951
17501
|
},
|
|
17502
|
+
validate(data, params) {
|
|
17503
|
+
return validate(this, data, params);
|
|
17504
|
+
},
|
|
17505
|
+
validateAsync(data, params) {
|
|
17506
|
+
return validateAsync(this, data, params);
|
|
17507
|
+
},
|
|
16952
17508
|
encode: function _encode2(data, params) {
|
|
16953
17509
|
return encode2(this, data, params, { callee: _encode2 });
|
|
16954
17510
|
},
|
|
@@ -16987,10 +17543,10 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
16987
17543
|
$ZodString.init(inst, def);
|
|
16988
17544
|
ZodType.init(inst, def);
|
|
16989
17545
|
inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
|
|
17546
|
+
}, /* @__PURE__ */ exports_util.derived({
|
|
17547
|
+
format: (inst) => aggregateChecks(inst).format ?? null,
|
|
17548
|
+
minLength: (inst) => aggregateChecks(inst).minimum ?? null,
|
|
17549
|
+
maxLength: (inst) => aggregateChecks(inst).maximum ?? null
|
|
16994
17550
|
}, {
|
|
16995
17551
|
regex(...args) {
|
|
16996
17552
|
return this.check(_regex(...args));
|
|
@@ -17037,7 +17593,7 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
17037
17593
|
slugify() {
|
|
17038
17594
|
return this.check(_slugify());
|
|
17039
17595
|
}
|
|
17040
|
-
});
|
|
17596
|
+
}));
|
|
17041
17597
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
17042
17598
|
$ZodString.init(inst, def);
|
|
17043
17599
|
_ZodString.init(inst, def);
|
|
@@ -17183,8 +17739,8 @@ function url(params) {
|
|
|
17183
17739
|
}
|
|
17184
17740
|
function httpUrl(params) {
|
|
17185
17741
|
return _url(ZodURL, {
|
|
17186
|
-
protocol:
|
|
17187
|
-
hostname:
|
|
17742
|
+
protocol: httpProtocol,
|
|
17743
|
+
hostname: domain,
|
|
17188
17744
|
...exports_util.normalizeParams(params)
|
|
17189
17745
|
});
|
|
17190
17746
|
}
|
|
@@ -17300,6 +17856,13 @@ var ZodCreditCard = /* @__PURE__ */ $constructor("ZodCreditCard", (inst, def) =>
|
|
|
17300
17856
|
function creditCard2(params) {
|
|
17301
17857
|
return _creditCard(ZodCreditCard, params);
|
|
17302
17858
|
}
|
|
17859
|
+
var ZodIBAN = /* @__PURE__ */ $constructor("ZodIBAN", (inst, def) => {
|
|
17860
|
+
$ZodIBAN.init(inst, def);
|
|
17861
|
+
ZodStringFormat.init(inst, def);
|
|
17862
|
+
});
|
|
17863
|
+
function iban2(params) {
|
|
17864
|
+
return _iban(ZodIBAN, params);
|
|
17865
|
+
}
|
|
17303
17866
|
var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
17304
17867
|
$ZodJWT.init(inst, def);
|
|
17305
17868
|
ZodStringFormat.init(inst, def);
|
|
@@ -17315,10 +17878,13 @@ function stringFormat(format, fnOrRegex, _params = {}) {
|
|
|
17315
17878
|
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
17316
17879
|
}
|
|
17317
17880
|
function hostname2(_params) {
|
|
17318
|
-
return _stringFormat(ZodCustomStringFormat, "hostname",
|
|
17881
|
+
return _stringFormat(ZodCustomStringFormat, "hostname", hostname, _params);
|
|
17319
17882
|
}
|
|
17320
17883
|
function hex2(_params) {
|
|
17321
|
-
return _stringFormat(ZodCustomStringFormat, "hex",
|
|
17884
|
+
return _stringFormat(ZodCustomStringFormat, "hex", hex, _params);
|
|
17885
|
+
}
|
|
17886
|
+
function currencyCode2(_params) {
|
|
17887
|
+
return _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode, _params);
|
|
17322
17888
|
}
|
|
17323
17889
|
function hash(alg, params) {
|
|
17324
17890
|
const enc = params?.enc ?? "hex";
|
|
@@ -17332,12 +17898,21 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
17332
17898
|
$ZodNumber.init(inst, def);
|
|
17333
17899
|
ZodType.init(inst, def);
|
|
17334
17900
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
17335
|
-
const bag = inst._zod.bag;
|
|
17336
|
-
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
17337
|
-
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
17338
|
-
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
|
|
17339
17901
|
inst.isFinite = true;
|
|
17340
|
-
|
|
17902
|
+
}, /* @__PURE__ */ exports_util.derived({
|
|
17903
|
+
minValue: (inst) => {
|
|
17904
|
+
const { minimum, exclusiveMinimum } = aggregateChecks(inst);
|
|
17905
|
+
return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
|
|
17906
|
+
},
|
|
17907
|
+
maxValue: (inst) => {
|
|
17908
|
+
const { maximum, exclusiveMaximum } = aggregateChecks(inst);
|
|
17909
|
+
return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
|
|
17910
|
+
},
|
|
17911
|
+
isInt: (inst) => {
|
|
17912
|
+
const { isInt, multipleOf } = aggregateChecks(inst);
|
|
17913
|
+
return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
|
|
17914
|
+
},
|
|
17915
|
+
format: (inst) => aggregateChecks(inst).format ?? null
|
|
17341
17916
|
}, {
|
|
17342
17917
|
gt(value, params) {
|
|
17343
17918
|
return this.check(_gt(value, params));
|
|
@@ -17384,7 +17959,7 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
17384
17959
|
finite() {
|
|
17385
17960
|
return this;
|
|
17386
17961
|
}
|
|
17387
|
-
});
|
|
17962
|
+
}));
|
|
17388
17963
|
function number2(params) {
|
|
17389
17964
|
return _number(ZodNumber, params);
|
|
17390
17965
|
}
|
|
@@ -17419,10 +17994,10 @@ var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
|
17419
17994
|
$ZodBigInt.init(inst, def);
|
|
17420
17995
|
ZodType.init(inst, def);
|
|
17421
17996
|
inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17997
|
+
}, /* @__PURE__ */ exports_util.derived({
|
|
17998
|
+
minValue: (inst) => aggregateChecks(inst).minimum ?? null,
|
|
17999
|
+
maxValue: (inst) => aggregateChecks(inst).maximum ?? null,
|
|
18000
|
+
format: (inst) => aggregateChecks(inst).format ?? null
|
|
17426
18001
|
}, {
|
|
17427
18002
|
gte(value, params) {
|
|
17428
18003
|
return this.check(_gte(value, params));
|
|
@@ -17457,7 +18032,7 @@ var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
|
17457
18032
|
multipleOf(value, params) {
|
|
17458
18033
|
return this.check(_multipleOf(value, params));
|
|
17459
18034
|
}
|
|
17460
|
-
});
|
|
18035
|
+
}));
|
|
17461
18036
|
function bigint2(params) {
|
|
17462
18037
|
return _bigint(ZodBigInt, params);
|
|
17463
18038
|
}
|
|
@@ -17533,10 +18108,16 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
|
17533
18108
|
inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
|
|
17534
18109
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
17535
18110
|
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
|
|
17539
|
-
|
|
18111
|
+
}, /* @__PURE__ */ exports_util.derived({
|
|
18112
|
+
minDate: (inst) => {
|
|
18113
|
+
const { minimum } = aggregateChecks(inst);
|
|
18114
|
+
return minimum ? new Date(minimum) : null;
|
|
18115
|
+
},
|
|
18116
|
+
maxDate: (inst) => {
|
|
18117
|
+
const { maximum } = aggregateChecks(inst);
|
|
18118
|
+
return maximum ? new Date(maximum) : null;
|
|
18119
|
+
}
|
|
18120
|
+
}, {}));
|
|
17540
18121
|
function date2(params) {
|
|
17541
18122
|
return _date(ZodDate, params);
|
|
17542
18123
|
}
|
|
@@ -17581,19 +18162,19 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
17581
18162
|
return _enum2(Object.keys(this._zod.def.shape));
|
|
17582
18163
|
},
|
|
17583
18164
|
catchall(catchall) {
|
|
17584
|
-
return this.clone(
|
|
18165
|
+
return this.clone(exports_util.mergeDefs(this._zod.def, { catchall }));
|
|
17585
18166
|
},
|
|
17586
18167
|
passthrough() {
|
|
17587
|
-
return this.clone(
|
|
18168
|
+
return this.clone(exports_util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
17588
18169
|
},
|
|
17589
18170
|
loose() {
|
|
17590
|
-
return this.clone(
|
|
18171
|
+
return this.clone(exports_util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
17591
18172
|
},
|
|
17592
18173
|
strict() {
|
|
17593
|
-
return this.clone(
|
|
18174
|
+
return this.clone(exports_util.mergeDefs(this._zod.def, { catchall: never() }));
|
|
17594
18175
|
},
|
|
17595
18176
|
strip() {
|
|
17596
|
-
return this.clone(
|
|
18177
|
+
return this.clone(exports_util.mergeDefs(this._zod.def, { catchall: undefined }));
|
|
17597
18178
|
},
|
|
17598
18179
|
extend(incoming) {
|
|
17599
18180
|
return exports_util.extend(this, incoming);
|
|
@@ -17812,7 +18393,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
|
17812
18393
|
ZodType.init(inst, def);
|
|
17813
18394
|
inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
|
|
17814
18395
|
inst.enum = def.entries;
|
|
17815
|
-
inst.options =
|
|
18396
|
+
inst.options = [...inst._zod.values];
|
|
17816
18397
|
const keys = new Set(Object.keys(def.entries));
|
|
17817
18398
|
inst.extract = (values, params) => {
|
|
17818
18399
|
const newEntries = {};
|
|
@@ -18173,8 +18754,15 @@ function superRefine(fn, params) {
|
|
|
18173
18754
|
}
|
|
18174
18755
|
var describe2 = describe;
|
|
18175
18756
|
var meta2 = meta;
|
|
18757
|
+
var ZodInstanceOf = /* @__PURE__ */ $constructor("ZodInstanceOf", (inst, def) => {
|
|
18758
|
+
ZodCustom.init(inst, def);
|
|
18759
|
+
}, {
|
|
18760
|
+
properties(shape, params) {
|
|
18761
|
+
return this.check(_properties(shape, params));
|
|
18762
|
+
}
|
|
18763
|
+
});
|
|
18176
18764
|
function _instanceof(cls, params = {}) {
|
|
18177
|
-
const inst = new
|
|
18765
|
+
const inst = new ZodInstanceOf({
|
|
18178
18766
|
type: "custom",
|
|
18179
18767
|
check: "custom",
|
|
18180
18768
|
fn: (data) => data instanceof cls,
|
|
@@ -18213,7 +18801,7 @@ function preprocess(fn, schema) {
|
|
|
18213
18801
|
out: schema
|
|
18214
18802
|
});
|
|
18215
18803
|
}
|
|
18216
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
18804
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/compat.js
|
|
18217
18805
|
var ZodIssueCode = {
|
|
18218
18806
|
invalid_type: "invalid_type",
|
|
18219
18807
|
too_big: "too_big",
|
|
@@ -18237,7 +18825,7 @@ function getErrorMap() {
|
|
|
18237
18825
|
}
|
|
18238
18826
|
var ZodFirstPartyTypeKind;
|
|
18239
18827
|
(function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
18240
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
18828
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/iso.js
|
|
18241
18829
|
var exports_iso = {};
|
|
18242
18830
|
__export(exports_iso, {
|
|
18243
18831
|
ZodISODate: () => ZodISODate,
|
|
@@ -18262,7 +18850,7 @@ function duration2(params) {
|
|
|
18262
18850
|
return _isoDuration(ZodISODuration, params);
|
|
18263
18851
|
}
|
|
18264
18852
|
|
|
18265
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
18853
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/from-json-schema.js
|
|
18266
18854
|
var z = {
|
|
18267
18855
|
...exports_schemas2,
|
|
18268
18856
|
...exports_checks2,
|
|
@@ -18364,27 +18952,188 @@ function resolveRef(ref, ctx) {
|
|
|
18364
18952
|
}
|
|
18365
18953
|
throw new Error(`Reference not found: ${ref}`);
|
|
18366
18954
|
}
|
|
18367
|
-
function
|
|
18955
|
+
function checkObjectGuards(objectSchema, guards) {
|
|
18368
18956
|
const guard = z.transform((value) => value).check((payload) => {
|
|
18369
18957
|
const value = payload.value;
|
|
18370
18958
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
18371
18959
|
return;
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
if (result.success)
|
|
18375
|
-
continue;
|
|
18960
|
+
const keys = Object.getOwnPropertyNames(value);
|
|
18961
|
+
if (guards.minProperties !== undefined && keys.length < guards.minProperties) {
|
|
18376
18962
|
payload.issues.push({
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18380
|
-
|
|
18381
|
-
|
|
18963
|
+
origin: "object",
|
|
18964
|
+
code: "too_small",
|
|
18965
|
+
minimum: guards.minProperties,
|
|
18966
|
+
inclusive: true,
|
|
18967
|
+
message: `Too small: expected object to have >=${guards.minProperties} properties`,
|
|
18968
|
+
input: value,
|
|
18969
|
+
inst: objectSchema,
|
|
18382
18970
|
continue: true
|
|
18383
18971
|
});
|
|
18384
18972
|
}
|
|
18973
|
+
if (guards.maxProperties !== undefined && keys.length > guards.maxProperties) {
|
|
18974
|
+
payload.issues.push({
|
|
18975
|
+
origin: "object",
|
|
18976
|
+
code: "too_big",
|
|
18977
|
+
maximum: guards.maxProperties,
|
|
18978
|
+
inclusive: true,
|
|
18979
|
+
message: `Too big: expected object to have <=${guards.maxProperties} properties`,
|
|
18980
|
+
input: value,
|
|
18981
|
+
inst: objectSchema,
|
|
18982
|
+
continue: true
|
|
18983
|
+
});
|
|
18984
|
+
}
|
|
18985
|
+
if (guards.keySchema) {
|
|
18986
|
+
for (const key of keys) {
|
|
18987
|
+
const result = guards.keySchema.safeParse(key);
|
|
18988
|
+
if (result.success)
|
|
18989
|
+
continue;
|
|
18990
|
+
payload.issues.push({
|
|
18991
|
+
code: "invalid_key",
|
|
18992
|
+
origin: "record",
|
|
18993
|
+
issues: result.error.issues,
|
|
18994
|
+
input: key,
|
|
18995
|
+
path: [key],
|
|
18996
|
+
continue: true
|
|
18997
|
+
});
|
|
18998
|
+
}
|
|
18999
|
+
}
|
|
18385
19000
|
});
|
|
18386
19001
|
return guard.pipe(objectSchema);
|
|
18387
19002
|
}
|
|
19003
|
+
function canonicalKey(value, seen) {
|
|
19004
|
+
if (value === null)
|
|
19005
|
+
return "z";
|
|
19006
|
+
const type = typeof value;
|
|
19007
|
+
if (type !== "object") {
|
|
19008
|
+
if (type === "number" && Number.isNaN(value))
|
|
19009
|
+
return null;
|
|
19010
|
+
const raw = String(value);
|
|
19011
|
+
return `${type[0]}${raw.length}:${raw}`;
|
|
19012
|
+
}
|
|
19013
|
+
if (seen.has(value))
|
|
19014
|
+
return null;
|
|
19015
|
+
seen.add(value);
|
|
19016
|
+
try {
|
|
19017
|
+
if (Array.isArray(value)) {
|
|
19018
|
+
const parts2 = [];
|
|
19019
|
+
for (const item of value) {
|
|
19020
|
+
const key = canonicalKey(item, seen);
|
|
19021
|
+
if (key === null)
|
|
19022
|
+
return null;
|
|
19023
|
+
parts2.push(key);
|
|
19024
|
+
}
|
|
19025
|
+
return `a${parts2.length}:[${parts2.join(",")}]`;
|
|
19026
|
+
}
|
|
19027
|
+
const keys = Object.keys(value).sort();
|
|
19028
|
+
const parts = [];
|
|
19029
|
+
for (const k of keys) {
|
|
19030
|
+
const key = canonicalKey(value[k], seen);
|
|
19031
|
+
if (key === null)
|
|
19032
|
+
return null;
|
|
19033
|
+
parts.push(`${k.length}:${k}=${key}`);
|
|
19034
|
+
}
|
|
19035
|
+
return `o${parts.length}:{${parts.join(",")}}`;
|
|
19036
|
+
} finally {
|
|
19037
|
+
seen.delete(value);
|
|
19038
|
+
}
|
|
19039
|
+
}
|
|
19040
|
+
var SCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
|
|
19041
|
+
"items",
|
|
19042
|
+
"prefixItems",
|
|
19043
|
+
"additionalItems",
|
|
19044
|
+
"additionalProperties",
|
|
19045
|
+
"contains",
|
|
19046
|
+
"propertyNames",
|
|
19047
|
+
"not",
|
|
19048
|
+
"if",
|
|
19049
|
+
"then",
|
|
19050
|
+
"else",
|
|
19051
|
+
"allOf",
|
|
19052
|
+
"anyOf",
|
|
19053
|
+
"oneOf",
|
|
19054
|
+
"unevaluatedItems",
|
|
19055
|
+
"unevaluatedProperties",
|
|
19056
|
+
"contentSchema"
|
|
19057
|
+
]);
|
|
19058
|
+
var SCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set([
|
|
19059
|
+
"properties",
|
|
19060
|
+
"patternProperties",
|
|
19061
|
+
"dependentSchemas",
|
|
19062
|
+
"dependencies",
|
|
19063
|
+
"$defs",
|
|
19064
|
+
"definitions"
|
|
19065
|
+
]);
|
|
19066
|
+
function containsRef(value) {
|
|
19067
|
+
if (typeof value !== "object" || value === null)
|
|
19068
|
+
return false;
|
|
19069
|
+
if (Array.isArray(value))
|
|
19070
|
+
return value.some(containsRef);
|
|
19071
|
+
if (typeof value.$ref === "string")
|
|
19072
|
+
return true;
|
|
19073
|
+
return Object.entries(value).some(([key, sub]) => {
|
|
19074
|
+
if (SCHEMA_KEYWORDS.has(key))
|
|
19075
|
+
return containsRef(sub);
|
|
19076
|
+
if (!SCHEMA_MAP_KEYWORDS.has(key) || typeof sub !== "object" || sub === null)
|
|
19077
|
+
return false;
|
|
19078
|
+
return Object.values(sub).some(containsRef);
|
|
19079
|
+
});
|
|
19080
|
+
}
|
|
19081
|
+
function plural(n) {
|
|
19082
|
+
return n === 1 ? "element" : "elements";
|
|
19083
|
+
}
|
|
19084
|
+
function checkArrayGuards(arraySchema, guards) {
|
|
19085
|
+
const guard = z.transform((value) => value).check((payload) => {
|
|
19086
|
+
const items = payload.value;
|
|
19087
|
+
if (!Array.isArray(items))
|
|
19088
|
+
return;
|
|
19089
|
+
if (guards.uniqueItems === true) {
|
|
19090
|
+
const firstSeen = new Map;
|
|
19091
|
+
for (let i = 0;i < items.length; i++) {
|
|
19092
|
+
const key = canonicalKey(items[i], new Set);
|
|
19093
|
+
if (key === null)
|
|
19094
|
+
continue;
|
|
19095
|
+
const first = firstSeen.get(key);
|
|
19096
|
+
if (first === undefined) {
|
|
19097
|
+
firstSeen.set(key, i);
|
|
19098
|
+
continue;
|
|
19099
|
+
}
|
|
19100
|
+
payload.issues.push({
|
|
19101
|
+
code: "custom",
|
|
19102
|
+
message: `Array items must be unique: element at index ${i} duplicates the one at index ${first}`,
|
|
19103
|
+
input: items,
|
|
19104
|
+
path: [i],
|
|
19105
|
+
continue: true
|
|
19106
|
+
});
|
|
19107
|
+
}
|
|
19108
|
+
}
|
|
19109
|
+
if (guards.containsSchema) {
|
|
19110
|
+
const minContains = guards.minContains ?? 1;
|
|
19111
|
+
const ceiling = guards.maxContains !== undefined ? guards.maxContains + 1 : Number.POSITIVE_INFINITY;
|
|
19112
|
+
let matches = 0;
|
|
19113
|
+
for (const item of items) {
|
|
19114
|
+
if (guards.containsSchema.safeParse(item).success && ++matches >= ceiling)
|
|
19115
|
+
break;
|
|
19116
|
+
}
|
|
19117
|
+
if (matches < minContains) {
|
|
19118
|
+
payload.issues.push({
|
|
19119
|
+
code: "custom",
|
|
19120
|
+
message: `Array must contain at least ${minContains} matching ${plural(minContains)}; found ${matches}`,
|
|
19121
|
+
input: items,
|
|
19122
|
+
continue: true
|
|
19123
|
+
});
|
|
19124
|
+
}
|
|
19125
|
+
if (guards.maxContains !== undefined && matches > guards.maxContains) {
|
|
19126
|
+
payload.issues.push({
|
|
19127
|
+
code: "custom",
|
|
19128
|
+
message: `Array must contain at most ${guards.maxContains} matching ${plural(guards.maxContains)}`,
|
|
19129
|
+
input: items,
|
|
19130
|
+
continue: true
|
|
19131
|
+
});
|
|
19132
|
+
}
|
|
19133
|
+
}
|
|
19134
|
+
});
|
|
19135
|
+
return guard.pipe(arraySchema);
|
|
19136
|
+
}
|
|
18388
19137
|
function getTupleRest(restSchema, ctx) {
|
|
18389
19138
|
if (restSchema === false) {
|
|
18390
19139
|
return;
|
|
@@ -18514,6 +19263,8 @@ function convertBaseSchema(schema, ctx) {
|
|
|
18514
19263
|
stringSchema = stringSchema.check(z.e164());
|
|
18515
19264
|
} else if (format === "credit_card") {
|
|
18516
19265
|
stringSchema = stringSchema.check(z.creditCard());
|
|
19266
|
+
} else if (format === "iban") {
|
|
19267
|
+
stringSchema = stringSchema.check(z.iban());
|
|
18517
19268
|
} else if (format === "jwt") {
|
|
18518
19269
|
stringSchema = stringSchema.check(z.jwt());
|
|
18519
19270
|
} else if (format === "emoji") {
|
|
@@ -18646,9 +19397,16 @@ function convertBaseSchema(schema, ctx) {
|
|
|
18646
19397
|
zodSchema = objectSchema.passthrough();
|
|
18647
19398
|
}
|
|
18648
19399
|
}
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
19400
|
+
const hasKeyGuard = schema.propertyNames !== undefined && schema.propertyNames !== true;
|
|
19401
|
+
const minProperties = typeof schema.minProperties === "number" ? schema.minProperties : undefined;
|
|
19402
|
+
const maxProperties = typeof schema.maxProperties === "number" ? schema.maxProperties : undefined;
|
|
19403
|
+
if (hasKeyGuard || minProperties !== undefined || maxProperties !== undefined) {
|
|
19404
|
+
let keySchema;
|
|
19405
|
+
if (hasKeyGuard) {
|
|
19406
|
+
const keyJSONSchema = typeof schema.propertyNames === "object" && schema.propertyNames.type === undefined ? { type: "string", ...schema.propertyNames } : schema.propertyNames;
|
|
19407
|
+
keySchema = convertSchema(keyJSONSchema, ctx);
|
|
19408
|
+
}
|
|
19409
|
+
zodSchema = checkObjectGuards(zodSchema, { keySchema, minProperties, maxProperties });
|
|
18652
19410
|
}
|
|
18653
19411
|
break;
|
|
18654
19412
|
}
|
|
@@ -18694,6 +19452,14 @@ function convertBaseSchema(schema, ctx) {
|
|
|
18694
19452
|
} else {
|
|
18695
19453
|
zodSchema = z.array(z.any());
|
|
18696
19454
|
}
|
|
19455
|
+
if (schema.uniqueItems === true || schema.contains !== undefined) {
|
|
19456
|
+
zodSchema = checkArrayGuards(zodSchema, {
|
|
19457
|
+
uniqueItems: schema.uniqueItems === true,
|
|
19458
|
+
containsSchema: schema.contains !== undefined ? convertSchema(schema.contains, ctx) : undefined,
|
|
19459
|
+
minContains: typeof schema.minContains === "number" ? schema.minContains : undefined,
|
|
19460
|
+
maxContains: typeof schema.maxContains === "number" ? schema.maxContains : undefined
|
|
19461
|
+
});
|
|
19462
|
+
}
|
|
18697
19463
|
break;
|
|
18698
19464
|
}
|
|
18699
19465
|
default:
|
|
@@ -18751,8 +19517,23 @@ function convertSchema(schema, ctx) {
|
|
|
18751
19517
|
extraMeta[key] = schema[key];
|
|
18752
19518
|
}
|
|
18753
19519
|
}
|
|
18754
|
-
if (schema.
|
|
18755
|
-
|
|
19520
|
+
if (schema.type === "object" && schema.$ref === undefined) {
|
|
19521
|
+
if (schema.propertyNames !== undefined && !containsRef(schema.propertyNames)) {
|
|
19522
|
+
extraMeta.propertyNames = schema.propertyNames;
|
|
19523
|
+
}
|
|
19524
|
+
for (const key of ["minProperties", "maxProperties"]) {
|
|
19525
|
+
if (schema[key] !== undefined)
|
|
19526
|
+
extraMeta[key] = schema[key];
|
|
19527
|
+
}
|
|
19528
|
+
}
|
|
19529
|
+
if (schema.type === "array" && schema.$ref === undefined) {
|
|
19530
|
+
if (schema.contains !== undefined && !containsRef(schema.contains)) {
|
|
19531
|
+
extraMeta.contains = schema.contains;
|
|
19532
|
+
}
|
|
19533
|
+
for (const key of ["uniqueItems", "minContains", "maxContains"]) {
|
|
19534
|
+
if (schema[key] !== undefined)
|
|
19535
|
+
extraMeta[key] = schema[key];
|
|
19536
|
+
}
|
|
18756
19537
|
}
|
|
18757
19538
|
for (const key of Object.keys(schema)) {
|
|
18758
19539
|
if (!RECOGNIZED_KEYS.has(key)) {
|
|
@@ -18789,7 +19570,7 @@ function fromJSONSchema(schema, params) {
|
|
|
18789
19570
|
};
|
|
18790
19571
|
return convertSchema(normalized, ctx);
|
|
18791
19572
|
}
|
|
18792
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
19573
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/visit.js
|
|
18793
19574
|
var RESOLVING = Symbol("z.visit/resolving");
|
|
18794
19575
|
function visit(schema, fnOrHandlers) {
|
|
18795
19576
|
const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node2, rewritten) => {
|
|
@@ -18941,7 +19722,7 @@ function visit(schema, fnOrHandlers) {
|
|
|
18941
19722
|
return run(schema);
|
|
18942
19723
|
}
|
|
18943
19724
|
|
|
18944
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
19725
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/deep-partial.js
|
|
18945
19726
|
function deepPartial(schema) {
|
|
18946
19727
|
return visit(schema, {
|
|
18947
19728
|
object: (s) => s.partial(),
|
|
@@ -18951,7 +19732,7 @@ function deepPartial(schema) {
|
|
|
18951
19732
|
}
|
|
18952
19733
|
});
|
|
18953
19734
|
}
|
|
18954
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
19735
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/in-out.js
|
|
18955
19736
|
function withChecks(side, checks2) {
|
|
18956
19737
|
if (!checks2?.length)
|
|
18957
19738
|
return side;
|
|
@@ -18977,7 +19758,7 @@ function output(schema) {
|
|
|
18977
19758
|
prefault: (s, rewritten) => rewritten ? s._zod.def.innerType : s
|
|
18978
19759
|
});
|
|
18979
19760
|
}
|
|
18980
|
-
// ../../../node_modules/.bun/zod@4.5
|
|
19761
|
+
// ../../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/coerce.js
|
|
18981
19762
|
var exports_coerce = {};
|
|
18982
19763
|
__export(exports_coerce, {
|
|
18983
19764
|
bigint: () => bigint3,
|
|
@@ -19286,8 +20067,8 @@ var openSystemBrowser = async (url2) => {
|
|
|
19286
20067
|
url2
|
|
19287
20068
|
] : ["xdg-open", url2];
|
|
19288
20069
|
try {
|
|
19289
|
-
const
|
|
19290
|
-
return await
|
|
20070
|
+
const process2 = Bun.spawn(command, { stderr: "ignore", stdout: "ignore" });
|
|
20071
|
+
return await process2.exited === 0;
|
|
19291
20072
|
} catch {
|
|
19292
20073
|
return false;
|
|
19293
20074
|
}
|
|
@@ -19335,17 +20116,17 @@ var loginWithBrowser = async ({
|
|
|
19335
20116
|
await withCredentialLock(store, () => store.set(credentials));
|
|
19336
20117
|
return credentials;
|
|
19337
20118
|
}
|
|
19338
|
-
const
|
|
19339
|
-
if (!
|
|
20119
|
+
const error62 = deviceTokenErrorSchema.safeParse(payload);
|
|
20120
|
+
if (!error62.success) {
|
|
19340
20121
|
throw new Error(`CLI authentication failed with HTTP ${response.status}.`);
|
|
19341
20122
|
}
|
|
19342
|
-
if (
|
|
20123
|
+
if (error62.data.error === "authorization_pending")
|
|
19343
20124
|
continue;
|
|
19344
|
-
if (
|
|
20125
|
+
if (error62.data.error === "slow_down") {
|
|
19345
20126
|
intervalMs += 5000;
|
|
19346
20127
|
continue;
|
|
19347
20128
|
}
|
|
19348
|
-
if (
|
|
20129
|
+
if (error62.data.error === "access_denied") {
|
|
19349
20130
|
throw new Error("CLI authentication was denied in the browser.");
|
|
19350
20131
|
}
|
|
19351
20132
|
throw new Error("CLI authentication expired. Run auth login again.");
|
|
@@ -19543,10 +20324,10 @@ class AuthenticatedEventSource {
|
|
|
19543
20324
|
this.readyState = this.OPEN;
|
|
19544
20325
|
this.dispatch("open", new Event("open"));
|
|
19545
20326
|
await this.consume(response.body);
|
|
19546
|
-
} catch (
|
|
20327
|
+
} catch (error62) {
|
|
19547
20328
|
if (!this.closed) {
|
|
19548
20329
|
this.dispatch("error", new ErrorEvent("error", {
|
|
19549
|
-
error:
|
|
20330
|
+
error: error62 instanceof Error ? error62 : new Error(String(error62))
|
|
19550
20331
|
}));
|
|
19551
20332
|
}
|
|
19552
20333
|
}
|
|
@@ -19620,15 +20401,15 @@ var trpcCodeMap = {
|
|
|
19620
20401
|
UNPROCESSABLE_CONTENT: "VALIDATION"
|
|
19621
20402
|
};
|
|
19622
20403
|
var networkMessagePattern = /\b(fetch failed|network error|unable to connect|econnrefused|econnreset|enotfound|etimedout|socket hang up)\b/i;
|
|
19623
|
-
var isNetworkError = (
|
|
19624
|
-
if (depth > 3 || !isRecord(
|
|
20404
|
+
var isNetworkError = (error62, depth = 0) => {
|
|
20405
|
+
if (depth > 3 || !isRecord(error62))
|
|
19625
20406
|
return false;
|
|
19626
|
-
const message = typeof
|
|
19627
|
-
const code = typeof
|
|
20407
|
+
const message = typeof error62.message === "string" ? error62.message : undefined;
|
|
20408
|
+
const code = typeof error62.code === "string" ? error62.code : undefined;
|
|
19628
20409
|
if (message && networkMessagePattern.test(message) || code && networkMessagePattern.test(code)) {
|
|
19629
20410
|
return true;
|
|
19630
20411
|
}
|
|
19631
|
-
return isNetworkError(
|
|
20412
|
+
return isNetworkError(error62.cause, depth + 1);
|
|
19632
20413
|
};
|
|
19633
20414
|
|
|
19634
20415
|
class CliError extends Error {
|
|
@@ -19688,31 +20469,31 @@ var sanitizeValue = (value, seen = new WeakSet) => {
|
|
|
19688
20469
|
sensitiveKeyPattern.test(key) ? "[redacted]" : sanitizeValue(nestedValue, seen)
|
|
19689
20470
|
]));
|
|
19690
20471
|
};
|
|
19691
|
-
var normalizeError = (
|
|
19692
|
-
if (
|
|
20472
|
+
var normalizeError = (error62) => {
|
|
20473
|
+
if (error62 instanceof CliError) {
|
|
19693
20474
|
return {
|
|
19694
|
-
code:
|
|
19695
|
-
message:
|
|
19696
|
-
...
|
|
20475
|
+
code: error62.code,
|
|
20476
|
+
message: error62.message,
|
|
20477
|
+
...error62.details ? { details: error62.details } : {}
|
|
19697
20478
|
};
|
|
19698
20479
|
}
|
|
19699
|
-
if (isNetworkError(
|
|
20480
|
+
if (isNetworkError(error62)) {
|
|
19700
20481
|
return {
|
|
19701
20482
|
code: "NETWORK",
|
|
19702
|
-
message:
|
|
20483
|
+
message: error62 instanceof Error ? error62.message : "The GOSH API could not be reached."
|
|
19703
20484
|
};
|
|
19704
20485
|
}
|
|
19705
|
-
if (isRecord(
|
|
19706
|
-
const data = isRecord(
|
|
20486
|
+
if (isRecord(error62)) {
|
|
20487
|
+
const data = isRecord(error62.data) ? error62.data : undefined;
|
|
19707
20488
|
const rawCode = typeof data?.code === "string" ? data.code : undefined;
|
|
19708
20489
|
const code = rawCode ? trpcCodeMap[rawCode] ?? "API" : "INTERNAL";
|
|
19709
|
-
const message = typeof
|
|
20490
|
+
const message = typeof error62.message === "string" ? error62.message : "The GOSH API request failed.";
|
|
19710
20491
|
const details = isRecord(data?.zodError) && isJsonValue(data.zodError) ? { validation: data.zodError } : undefined;
|
|
19711
20492
|
return { code, message, ...details ? { details } : {} };
|
|
19712
20493
|
}
|
|
19713
20494
|
return {
|
|
19714
20495
|
code: "INTERNAL",
|
|
19715
|
-
message:
|
|
20496
|
+
message: error62 instanceof Error ? error62.message : String(error62)
|
|
19716
20497
|
};
|
|
19717
20498
|
};
|
|
19718
20499
|
var serialize = (value) => `${JSON.stringify(value, null, 2)}
|
|
@@ -19745,8 +20526,8 @@ var emitSubscriptionEvent = (runtime2, invocation, data) => {
|
|
|
19745
20526
|
})}
|
|
19746
20527
|
`);
|
|
19747
20528
|
};
|
|
19748
|
-
var emitError = (runtime2, command,
|
|
19749
|
-
const normalized = normalizeError(
|
|
20529
|
+
var emitError = (runtime2, command, error62) => {
|
|
20530
|
+
const normalized = normalizeError(error62);
|
|
19750
20531
|
runtime2.stderr.write(redactKnownSecrets(serialize({ ok: false, error: normalized, meta: { command } }), runtime2));
|
|
19751
20532
|
return invocationCodes.has(normalized.code) ? 2 : 1;
|
|
19752
20533
|
};
|
|
@@ -20793,7 +21574,7 @@ var uploadMultipartMissionMedia = async ({
|
|
|
20793
21574
|
}
|
|
20794
21575
|
completedParts.push({ eTag, partNumber: part.partNumber });
|
|
20795
21576
|
}
|
|
20796
|
-
} catch (
|
|
21577
|
+
} catch (error62) {
|
|
20797
21578
|
await client.mutation("event.abortMissionMediaMultipartUpload", {
|
|
20798
21579
|
eventId: input2.eventId,
|
|
20799
21580
|
key: metadata.key,
|
|
@@ -20802,7 +21583,7 @@ var uploadMultipartMissionMedia = async ({
|
|
|
20802
21583
|
}).catch(() => {
|
|
20803
21584
|
return;
|
|
20804
21585
|
});
|
|
20805
|
-
throw
|
|
21586
|
+
throw error62;
|
|
20806
21587
|
} finally {
|
|
20807
21588
|
await file2.close();
|
|
20808
21589
|
}
|
|
@@ -20912,10 +21693,10 @@ var parseJsonInput = (value) => {
|
|
|
20912
21693
|
throw new CliError("VALIDATION", "--input must be a JSON object.");
|
|
20913
21694
|
}
|
|
20914
21695
|
return parsed;
|
|
20915
|
-
} catch (
|
|
20916
|
-
if (
|
|
20917
|
-
throw
|
|
20918
|
-
throw new CliError("VALIDATION", `--input is not valid JSON: ${
|
|
21696
|
+
} catch (error62) {
|
|
21697
|
+
if (error62 instanceof CliError)
|
|
21698
|
+
throw error62;
|
|
21699
|
+
throw new CliError("VALIDATION", `--input is not valid JSON: ${error62 instanceof Error ? error62.message : String(error62)}`);
|
|
20919
21700
|
}
|
|
20920
21701
|
};
|
|
20921
21702
|
|
|
@@ -20980,8 +21761,8 @@ var resolveApiBaseUrl = (runtime2, flags) => {
|
|
|
20980
21761
|
const configured = getStringFlag(flags, "api-url") ?? runtime2.env.GOSH_API_URL?.trim() ?? DEFAULT_GOSH_API_BASE_URL;
|
|
20981
21762
|
try {
|
|
20982
21763
|
return normalizeApiBaseUrl(configured);
|
|
20983
|
-
} catch (
|
|
20984
|
-
throw new CliError("VALIDATION",
|
|
21764
|
+
} catch (error62) {
|
|
21765
|
+
throw new CliError("VALIDATION", error62 instanceof Error ? error62.message : "Invalid GOSH API URL.");
|
|
20985
21766
|
}
|
|
20986
21767
|
};
|
|
20987
21768
|
var emitHelp = (runtime2, apiBaseUrl, positional) => {
|
|
@@ -21124,9 +21905,9 @@ Waiting for approval\u2026
|
|
|
21124
21905
|
};
|
|
21125
21906
|
const stop = () => {
|
|
21126
21907
|
unsubscribe();
|
|
21127
|
-
|
|
21908
|
+
settle2(0);
|
|
21128
21909
|
};
|
|
21129
|
-
const
|
|
21910
|
+
const settle2 = (exitCode) => {
|
|
21130
21911
|
if (settled)
|
|
21131
21912
|
return;
|
|
21132
21913
|
settled = true;
|
|
@@ -21135,10 +21916,10 @@ Waiting for approval\u2026
|
|
|
21135
21916
|
};
|
|
21136
21917
|
process.on("SIGINT", stop);
|
|
21137
21918
|
const subscriptionHandle = client.subscription(command.procedure, input2, {
|
|
21138
|
-
complete: () =>
|
|
21139
|
-
error: (
|
|
21140
|
-
emitError(dependencies.runtime, requestedCommand,
|
|
21141
|
-
|
|
21919
|
+
complete: () => settle2(0),
|
|
21920
|
+
error: (error62) => {
|
|
21921
|
+
emitError(dependencies.runtime, requestedCommand, error62);
|
|
21922
|
+
settle2(1);
|
|
21142
21923
|
},
|
|
21143
21924
|
next: (value) => emitSubscriptionEvent(dependencies.runtime, invocation, value)
|
|
21144
21925
|
});
|
|
@@ -21167,8 +21948,8 @@ Waiting for approval\u2026
|
|
|
21167
21948
|
cliVersion: GOSH_CLI_VERSION,
|
|
21168
21949
|
command: commandName(command)
|
|
21169
21950
|
}, result);
|
|
21170
|
-
} catch (
|
|
21171
|
-
return emitError(dependencies.runtime, requestedCommand,
|
|
21951
|
+
} catch (error62) {
|
|
21952
|
+
return emitError(dependencies.runtime, requestedCommand, error62);
|
|
21172
21953
|
}
|
|
21173
21954
|
};
|
|
21174
21955
|
var runGoshCliFromProcess = async () => {
|
|
@@ -21176,8 +21957,8 @@ var runGoshCliFromProcess = async () => {
|
|
|
21176
21957
|
try {
|
|
21177
21958
|
assertBunRuntime();
|
|
21178
21959
|
return await runGoshCli(process.argv.slice(2), { runtime: runtime2 });
|
|
21179
|
-
} catch (
|
|
21180
|
-
return emitError(runtime2, "runtime",
|
|
21960
|
+
} catch (error62) {
|
|
21961
|
+
return emitError(runtime2, "runtime", error62);
|
|
21181
21962
|
}
|
|
21182
21963
|
};
|
|
21183
21964
|
|