@glasstrace/sdk 1.10.2 → 1.12.0
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/README.md +63 -8
- package/dist/async-context/index.cjs +1189 -440
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-CRQSqKgd.d.cts} +2 -2
- package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CqCbjoMq.d.ts} +2 -2
- package/dist/{chunk-OXM2BZMF.js → chunk-4YRYR32D.js} +2 -2
- package/dist/{chunk-XG6WR2KS.js → chunk-6NKMAKMI.js} +3 -3
- package/dist/{chunk-6RKS3DNA.js → chunk-BN5DVIUO.js} +1176 -424
- package/dist/chunk-BN5DVIUO.js.map +1 -0
- package/dist/{chunk-QS5RZ2TC.js → chunk-CZQN6G4I.js} +28 -22
- package/dist/chunk-CZQN6G4I.js.map +1 -0
- package/dist/{chunk-D54FMQHF.js → chunk-FFNGE5RR.js} +2 -2
- package/dist/{chunk-RL43PU2X.js → chunk-J3ZCVE67.js} +2 -2
- package/dist/{chunk-BSVWJSVX.js → chunk-KBHGPQZ2.js} +2 -2
- package/dist/{chunk-CIKPFJOM.js → chunk-KOYZJN6G.js} +310 -20
- package/dist/chunk-KOYZJN6G.js.map +1 -0
- package/dist/{chunk-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
- package/dist/{chunk-UMGZJYC4.js → chunk-V75ZB4G4.js} +10 -5
- package/dist/chunk-V75ZB4G4.js.map +1 -0
- package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
- package/dist/chunk-YIEXKQYP.js.map +1 -0
- package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
- package/dist/cli/init.cjs +1672 -576
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +33 -20
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +1509 -521
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +34 -16
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +6 -1
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.js +7 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +6 -1
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +4 -4
- package/dist/cli/upgrade-instructions.cjs +383 -112
- package/dist/cli/upgrade-instructions.cjs.map +1 -1
- package/dist/cli/upgrade-instructions.js +72 -20
- package/dist/cli/upgrade-instructions.js.map +1 -1
- package/dist/cli/validate.cjs +1168 -422
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
- package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
- package/dist/edge-entry.cjs +1197 -448
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/index.cjs +1341 -553
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.cts} +1 -1
- package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.ts} +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.cjs +1192 -443
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +1329 -551
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +3 -3
- package/dist/node-entry.d.ts +3 -3
- package/dist/node-entry.js +8 -8
- package/dist/node-subpath.cjs +1168 -422
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +1 -1
- package/dist/node-subpath.d.ts +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
- package/dist/trpc/index.cjs +1187 -438
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6RKS3DNA.js.map +0 -1
- package/dist/chunk-CIKPFJOM.js.map +0 -1
- package/dist/chunk-QS5RZ2TC.js.map +0 -1
- package/dist/chunk-UMGZJYC4.js.map +0 -1
- package/dist/chunk-ZBQQXVHD.js.map +0 -1
- /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
- /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
- /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
- /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
- /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
- /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
- /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
- /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
package/dist/node-entry.cjs
CHANGED
|
@@ -119,10 +119,10 @@ function $constructor(name, initializer3, params) {
|
|
|
119
119
|
}
|
|
120
120
|
Object.defineProperty(Definition, "name", { value: name });
|
|
121
121
|
function _(def) {
|
|
122
|
-
var
|
|
122
|
+
var _a3;
|
|
123
123
|
const inst = params?.Parent ? new Definition() : this;
|
|
124
124
|
init(inst, def);
|
|
125
|
-
(
|
|
125
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
126
126
|
for (const fn of inst._zod.deferred) {
|
|
127
127
|
fn();
|
|
128
128
|
}
|
|
@@ -144,11 +144,11 @@ function config(newConfig) {
|
|
|
144
144
|
Object.assign(globalConfig, newConfig);
|
|
145
145
|
return globalConfig;
|
|
146
146
|
}
|
|
147
|
-
var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
147
|
+
var _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
|
|
148
148
|
var init_core = __esm({
|
|
149
149
|
"../../node_modules/zod/v4/core/core.js"() {
|
|
150
150
|
"use strict";
|
|
151
|
-
NEVER = Object.freeze({
|
|
151
|
+
NEVER = /* @__PURE__ */ Object.freeze({
|
|
152
152
|
status: "aborted"
|
|
153
153
|
});
|
|
154
154
|
$brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
@@ -163,7 +163,8 @@ var init_core = __esm({
|
|
|
163
163
|
this.name = "ZodEncodeError";
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
|
-
|
|
166
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
167
|
+
globalConfig = globalThis.__zod_globalConfig;
|
|
167
168
|
}
|
|
168
169
|
});
|
|
169
170
|
|
|
@@ -193,6 +194,7 @@ __export(util_exports, {
|
|
|
193
194
|
defineLazy: () => defineLazy,
|
|
194
195
|
esc: () => esc,
|
|
195
196
|
escapeRegex: () => escapeRegex,
|
|
197
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
196
198
|
extend: () => extend,
|
|
197
199
|
finalizeIssue: () => finalizeIssue,
|
|
198
200
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -281,19 +283,12 @@ function cleanRegex(source) {
|
|
|
281
283
|
return source.slice(start, end);
|
|
282
284
|
}
|
|
283
285
|
function floatSafeRemainder(val, step) {
|
|
284
|
-
const
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
294
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
295
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
296
|
-
return valInt % stepInt / 10 ** decCount;
|
|
286
|
+
const ratio = val / step;
|
|
287
|
+
const roundedRatio = Math.round(ratio);
|
|
288
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
289
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
290
|
+
return 0;
|
|
291
|
+
return ratio - roundedRatio;
|
|
297
292
|
}
|
|
298
293
|
function defineLazy(object2, key, getter) {
|
|
299
294
|
let value = void 0;
|
|
@@ -393,6 +388,10 @@ function shallowClone(o) {
|
|
|
393
388
|
return { ...o };
|
|
394
389
|
if (Array.isArray(o))
|
|
395
390
|
return [...o];
|
|
391
|
+
if (o instanceof Map)
|
|
392
|
+
return new Map(o);
|
|
393
|
+
if (o instanceof Set)
|
|
394
|
+
return new Set(o);
|
|
396
395
|
return o;
|
|
397
396
|
}
|
|
398
397
|
function numKeys(data) {
|
|
@@ -561,6 +560,9 @@ function safeExtend(schema, shape) {
|
|
|
561
560
|
return clone(schema, def);
|
|
562
561
|
}
|
|
563
562
|
function merge(a, b) {
|
|
563
|
+
if (a._zod.def.checks?.length) {
|
|
564
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
565
|
+
}
|
|
564
566
|
const def = mergeDefs(a._zod.def, {
|
|
565
567
|
get shape() {
|
|
566
568
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -570,8 +572,7 @@ function merge(a, b) {
|
|
|
570
572
|
get catchall() {
|
|
571
573
|
return b._zod.def.catchall;
|
|
572
574
|
},
|
|
573
|
-
checks: []
|
|
574
|
-
// delete existing checks
|
|
575
|
+
checks: b._zod.def.checks ?? []
|
|
575
576
|
});
|
|
576
577
|
return clone(a, def);
|
|
577
578
|
}
|
|
@@ -654,10 +655,20 @@ function aborted(x, startIndex = 0) {
|
|
|
654
655
|
}
|
|
655
656
|
return false;
|
|
656
657
|
}
|
|
658
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
659
|
+
if (x.aborted === true)
|
|
660
|
+
return true;
|
|
661
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
662
|
+
if (x.issues[i]?.continue === false) {
|
|
663
|
+
return true;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
657
668
|
function prefixIssues(path5, issues) {
|
|
658
669
|
return issues.map((iss) => {
|
|
659
|
-
var
|
|
660
|
-
(
|
|
670
|
+
var _a3;
|
|
671
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
661
672
|
iss.path.unshift(path5);
|
|
662
673
|
return iss;
|
|
663
674
|
});
|
|
@@ -666,17 +677,14 @@ function unwrapMessage(message) {
|
|
|
666
677
|
return typeof message === "string" ? message : message?.message;
|
|
667
678
|
}
|
|
668
679
|
function finalizeIssue(iss, ctx, config2) {
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
680
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
681
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
682
|
+
rest.path ?? (rest.path = []);
|
|
683
|
+
rest.message = message;
|
|
684
|
+
if (ctx?.reportInput) {
|
|
685
|
+
rest.input = _input;
|
|
673
686
|
}
|
|
674
|
-
|
|
675
|
-
delete full.continue;
|
|
676
|
-
if (!ctx?.reportInput) {
|
|
677
|
-
delete full.input;
|
|
678
|
-
}
|
|
679
|
-
return full;
|
|
687
|
+
return rest;
|
|
680
688
|
}
|
|
681
689
|
function getSizableOrigin(input) {
|
|
682
690
|
if (input instanceof Set)
|
|
@@ -773,10 +781,14 @@ var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes,
|
|
|
773
781
|
var init_util = __esm({
|
|
774
782
|
"../../node_modules/zod/v4/core/util.js"() {
|
|
775
783
|
"use strict";
|
|
784
|
+
init_core();
|
|
776
785
|
EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
777
786
|
captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
778
787
|
};
|
|
779
|
-
allowsEval = cached(() => {
|
|
788
|
+
allowsEval = /* @__PURE__ */ cached(() => {
|
|
789
|
+
if (globalConfig.jitless) {
|
|
790
|
+
return false;
|
|
791
|
+
}
|
|
780
792
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
781
793
|
return false;
|
|
782
794
|
}
|
|
@@ -833,7 +845,14 @@ var init_util = __esm({
|
|
|
833
845
|
}
|
|
834
846
|
};
|
|
835
847
|
propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
836
|
-
primitiveTypes = /* @__PURE__ */ new Set([
|
|
848
|
+
primitiveTypes = /* @__PURE__ */ new Set([
|
|
849
|
+
"string",
|
|
850
|
+
"number",
|
|
851
|
+
"bigint",
|
|
852
|
+
"boolean",
|
|
853
|
+
"symbol",
|
|
854
|
+
"undefined"
|
|
855
|
+
]);
|
|
837
856
|
NUMBER_FORMAT_RANGES = {
|
|
838
857
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
839
858
|
int32: [-2147483648, 2147483647],
|
|
@@ -853,10 +872,10 @@ var init_util = __esm({
|
|
|
853
872
|
});
|
|
854
873
|
|
|
855
874
|
// ../../node_modules/zod/v4/core/errors.js
|
|
856
|
-
function flattenError(
|
|
875
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
857
876
|
const fieldErrors = {};
|
|
858
877
|
const formErrors = [];
|
|
859
|
-
for (const sub of
|
|
878
|
+
for (const sub of error51.issues) {
|
|
860
879
|
if (sub.path.length > 0) {
|
|
861
880
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
862
881
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -866,50 +885,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
866
885
|
}
|
|
867
886
|
return { formErrors, fieldErrors };
|
|
868
887
|
}
|
|
869
|
-
function formatError(
|
|
888
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
870
889
|
const fieldErrors = { _errors: [] };
|
|
871
|
-
const processError = (
|
|
872
|
-
for (const issue2 of
|
|
890
|
+
const processError = (error52, path5 = []) => {
|
|
891
|
+
for (const issue2 of error52.issues) {
|
|
873
892
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
874
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
893
|
+
issue2.errors.map((issues) => processError({ issues }, [...path5, ...issue2.path]));
|
|
875
894
|
} else if (issue2.code === "invalid_key") {
|
|
876
|
-
processError({ issues: issue2.issues });
|
|
895
|
+
processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
|
|
877
896
|
} else if (issue2.code === "invalid_element") {
|
|
878
|
-
processError({ issues: issue2.issues });
|
|
879
|
-
} else if (issue2.path.length === 0) {
|
|
880
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
897
|
+
processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
|
|
881
898
|
} else {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
899
|
+
const fullpath = [...path5, ...issue2.path];
|
|
900
|
+
if (fullpath.length === 0) {
|
|
901
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
902
|
+
} else {
|
|
903
|
+
let curr = fieldErrors;
|
|
904
|
+
let i = 0;
|
|
905
|
+
while (i < fullpath.length) {
|
|
906
|
+
const el = fullpath[i];
|
|
907
|
+
const terminal = i === fullpath.length - 1;
|
|
908
|
+
if (!terminal) {
|
|
909
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
910
|
+
} else {
|
|
911
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
912
|
+
curr[el]._errors.push(mapper(issue2));
|
|
913
|
+
}
|
|
914
|
+
curr = curr[el];
|
|
915
|
+
i++;
|
|
892
916
|
}
|
|
893
|
-
curr = curr[el];
|
|
894
|
-
i++;
|
|
895
917
|
}
|
|
896
918
|
}
|
|
897
919
|
}
|
|
898
920
|
};
|
|
899
|
-
processError(
|
|
921
|
+
processError(error51);
|
|
900
922
|
return fieldErrors;
|
|
901
923
|
}
|
|
902
|
-
function treeifyError(
|
|
924
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
903
925
|
const result = { errors: [] };
|
|
904
|
-
const processError = (
|
|
905
|
-
var
|
|
906
|
-
for (const issue2 of
|
|
926
|
+
const processError = (error52, path5 = []) => {
|
|
927
|
+
var _a3, _b;
|
|
928
|
+
for (const issue2 of error52.issues) {
|
|
907
929
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
908
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
930
|
+
issue2.errors.map((issues) => processError({ issues }, [...path5, ...issue2.path]));
|
|
909
931
|
} else if (issue2.code === "invalid_key") {
|
|
910
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
932
|
+
processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
|
|
911
933
|
} else if (issue2.code === "invalid_element") {
|
|
912
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
934
|
+
processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
|
|
913
935
|
} else {
|
|
914
936
|
const fullpath = [...path5, ...issue2.path];
|
|
915
937
|
if (fullpath.length === 0) {
|
|
@@ -923,7 +945,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
923
945
|
const terminal = i === fullpath.length - 1;
|
|
924
946
|
if (typeof el === "string") {
|
|
925
947
|
curr.properties ?? (curr.properties = {});
|
|
926
|
-
(
|
|
948
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
927
949
|
curr = curr.properties[el];
|
|
928
950
|
} else {
|
|
929
951
|
curr.items ?? (curr.items = []);
|
|
@@ -938,7 +960,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
938
960
|
}
|
|
939
961
|
}
|
|
940
962
|
};
|
|
941
|
-
processError(
|
|
963
|
+
processError(error51);
|
|
942
964
|
return result;
|
|
943
965
|
}
|
|
944
966
|
function toDotPath(_path) {
|
|
@@ -959,9 +981,9 @@ function toDotPath(_path) {
|
|
|
959
981
|
}
|
|
960
982
|
return segs.join("");
|
|
961
983
|
}
|
|
962
|
-
function prettifyError(
|
|
984
|
+
function prettifyError(error51) {
|
|
963
985
|
const lines = [];
|
|
964
|
-
const issues = [...
|
|
986
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
965
987
|
for (const issue2 of issues) {
|
|
966
988
|
lines.push(`\u2716 ${issue2.message}`);
|
|
967
989
|
if (issue2.path?.length)
|
|
@@ -1005,7 +1027,7 @@ var init_parse = __esm({
|
|
|
1005
1027
|
init_errors();
|
|
1006
1028
|
init_util();
|
|
1007
1029
|
_parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1008
|
-
const ctx = _ctx ?
|
|
1030
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1009
1031
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1010
1032
|
if (result instanceof Promise) {
|
|
1011
1033
|
throw new $ZodAsyncError();
|
|
@@ -1019,7 +1041,7 @@ var init_parse = __esm({
|
|
|
1019
1041
|
};
|
|
1020
1042
|
parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1021
1043
|
_parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1022
|
-
const ctx = _ctx ?
|
|
1044
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1023
1045
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1024
1046
|
if (result instanceof Promise)
|
|
1025
1047
|
result = await result;
|
|
@@ -1044,7 +1066,7 @@ var init_parse = __esm({
|
|
|
1044
1066
|
};
|
|
1045
1067
|
safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
1046
1068
|
_safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1047
|
-
const ctx = _ctx ?
|
|
1069
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1048
1070
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1049
1071
|
if (result instanceof Promise)
|
|
1050
1072
|
result = await result;
|
|
@@ -1055,7 +1077,7 @@ var init_parse = __esm({
|
|
|
1055
1077
|
};
|
|
1056
1078
|
safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1057
1079
|
_encode = (_Err) => (schema, value, _ctx) => {
|
|
1058
|
-
const ctx = _ctx ?
|
|
1080
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1059
1081
|
return _parse(_Err)(schema, value, ctx);
|
|
1060
1082
|
};
|
|
1061
1083
|
encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -1064,7 +1086,7 @@ var init_parse = __esm({
|
|
|
1064
1086
|
};
|
|
1065
1087
|
decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
1066
1088
|
_encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1067
|
-
const ctx = _ctx ?
|
|
1089
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1068
1090
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
1069
1091
|
};
|
|
1070
1092
|
encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -1073,7 +1095,7 @@ var init_parse = __esm({
|
|
|
1073
1095
|
};
|
|
1074
1096
|
decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
1075
1097
|
_safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1076
|
-
const ctx = _ctx ?
|
|
1098
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1077
1099
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1078
1100
|
};
|
|
1079
1101
|
safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -1082,7 +1104,7 @@ var init_parse = __esm({
|
|
|
1082
1104
|
};
|
|
1083
1105
|
safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1084
1106
|
_safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1085
|
-
const ctx = _ctx ?
|
|
1107
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1086
1108
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1087
1109
|
};
|
|
1088
1110
|
safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -1117,6 +1139,7 @@ __export(regexes_exports, {
|
|
|
1117
1139
|
hex: () => hex,
|
|
1118
1140
|
hostname: () => hostname,
|
|
1119
1141
|
html5Email: () => html5Email,
|
|
1142
|
+
httpProtocol: () => httpProtocol,
|
|
1120
1143
|
idnEmail: () => idnEmail,
|
|
1121
1144
|
integer: () => integer,
|
|
1122
1145
|
ipv4: () => ipv4,
|
|
@@ -1182,12 +1205,12 @@ function fixedBase64(bodyLength, padding) {
|
|
|
1182
1205
|
function fixedBase64url(length) {
|
|
1183
1206
|
return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
|
|
1184
1207
|
}
|
|
1185
|
-
var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
1208
|
+
var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
1186
1209
|
var init_regexes = __esm({
|
|
1187
1210
|
"../../node_modules/zod/v4/core/regexes.js"() {
|
|
1188
1211
|
"use strict";
|
|
1189
1212
|
init_util();
|
|
1190
|
-
cuid = /^[cC][
|
|
1213
|
+
cuid = /^[cC][0-9a-z]{6,}$/;
|
|
1191
1214
|
cuid2 = /^[0-9a-z]+$/;
|
|
1192
1215
|
ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
1193
1216
|
xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -1223,6 +1246,7 @@ var init_regexes = __esm({
|
|
|
1223
1246
|
base64url = /^[A-Za-z0-9_-]*$/;
|
|
1224
1247
|
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])?)*\.?$/;
|
|
1225
1248
|
domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
1249
|
+
httpProtocol = /^https?$/;
|
|
1226
1250
|
e164 = /^\+[1-9]\d{6,14}$/;
|
|
1227
1251
|
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])))`;
|
|
1228
1252
|
date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -1271,10 +1295,10 @@ var init_checks = __esm({
|
|
|
1271
1295
|
init_regexes();
|
|
1272
1296
|
init_util();
|
|
1273
1297
|
$ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1274
|
-
var
|
|
1298
|
+
var _a3;
|
|
1275
1299
|
inst._zod ?? (inst._zod = {});
|
|
1276
1300
|
inst._zod.def = def;
|
|
1277
|
-
(
|
|
1301
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1278
1302
|
});
|
|
1279
1303
|
numericOriginMap = {
|
|
1280
1304
|
number: "number",
|
|
@@ -1340,8 +1364,8 @@ var init_checks = __esm({
|
|
|
1340
1364
|
$ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1341
1365
|
$ZodCheck.init(inst, def);
|
|
1342
1366
|
inst._zod.onattach.push((inst2) => {
|
|
1343
|
-
var
|
|
1344
|
-
(
|
|
1367
|
+
var _a3;
|
|
1368
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1345
1369
|
});
|
|
1346
1370
|
inst._zod.check = (payload) => {
|
|
1347
1371
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1474,9 +1498,9 @@ var init_checks = __esm({
|
|
|
1474
1498
|
};
|
|
1475
1499
|
});
|
|
1476
1500
|
$ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1477
|
-
var
|
|
1501
|
+
var _a3;
|
|
1478
1502
|
$ZodCheck.init(inst, def);
|
|
1479
|
-
(
|
|
1503
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1480
1504
|
const val = payload.value;
|
|
1481
1505
|
return !nullish(val) && val.size !== void 0;
|
|
1482
1506
|
});
|
|
@@ -1502,9 +1526,9 @@ var init_checks = __esm({
|
|
|
1502
1526
|
};
|
|
1503
1527
|
});
|
|
1504
1528
|
$ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1505
|
-
var
|
|
1529
|
+
var _a3;
|
|
1506
1530
|
$ZodCheck.init(inst, def);
|
|
1507
|
-
(
|
|
1531
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1508
1532
|
const val = payload.value;
|
|
1509
1533
|
return !nullish(val) && val.size !== void 0;
|
|
1510
1534
|
});
|
|
@@ -1530,9 +1554,9 @@ var init_checks = __esm({
|
|
|
1530
1554
|
};
|
|
1531
1555
|
});
|
|
1532
1556
|
$ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1533
|
-
var
|
|
1557
|
+
var _a3;
|
|
1534
1558
|
$ZodCheck.init(inst, def);
|
|
1535
|
-
(
|
|
1559
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1536
1560
|
const val = payload.value;
|
|
1537
1561
|
return !nullish(val) && val.size !== void 0;
|
|
1538
1562
|
});
|
|
@@ -1560,9 +1584,9 @@ var init_checks = __esm({
|
|
|
1560
1584
|
};
|
|
1561
1585
|
});
|
|
1562
1586
|
$ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1563
|
-
var
|
|
1587
|
+
var _a3;
|
|
1564
1588
|
$ZodCheck.init(inst, def);
|
|
1565
|
-
(
|
|
1589
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1566
1590
|
const val = payload.value;
|
|
1567
1591
|
return !nullish(val) && val.length !== void 0;
|
|
1568
1592
|
});
|
|
@@ -1589,9 +1613,9 @@ var init_checks = __esm({
|
|
|
1589
1613
|
};
|
|
1590
1614
|
});
|
|
1591
1615
|
$ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1592
|
-
var
|
|
1616
|
+
var _a3;
|
|
1593
1617
|
$ZodCheck.init(inst, def);
|
|
1594
|
-
(
|
|
1618
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1595
1619
|
const val = payload.value;
|
|
1596
1620
|
return !nullish(val) && val.length !== void 0;
|
|
1597
1621
|
});
|
|
@@ -1618,9 +1642,9 @@ var init_checks = __esm({
|
|
|
1618
1642
|
};
|
|
1619
1643
|
});
|
|
1620
1644
|
$ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1621
|
-
var
|
|
1645
|
+
var _a3;
|
|
1622
1646
|
$ZodCheck.init(inst, def);
|
|
1623
|
-
(
|
|
1647
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1624
1648
|
const val = payload.value;
|
|
1625
1649
|
return !nullish(val) && val.length !== void 0;
|
|
1626
1650
|
});
|
|
@@ -1649,7 +1673,7 @@ var init_checks = __esm({
|
|
|
1649
1673
|
};
|
|
1650
1674
|
});
|
|
1651
1675
|
$ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1652
|
-
var
|
|
1676
|
+
var _a3, _b;
|
|
1653
1677
|
$ZodCheck.init(inst, def);
|
|
1654
1678
|
inst._zod.onattach.push((inst2) => {
|
|
1655
1679
|
const bag = inst2._zod.bag;
|
|
@@ -1660,7 +1684,7 @@ var init_checks = __esm({
|
|
|
1660
1684
|
}
|
|
1661
1685
|
});
|
|
1662
1686
|
if (def.pattern)
|
|
1663
|
-
(
|
|
1687
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
1664
1688
|
def.pattern.lastIndex = 0;
|
|
1665
1689
|
if (def.pattern.test(payload.value))
|
|
1666
1690
|
return;
|
|
@@ -1863,8 +1887,8 @@ var init_versions = __esm({
|
|
|
1863
1887
|
"use strict";
|
|
1864
1888
|
version = {
|
|
1865
1889
|
major: 4,
|
|
1866
|
-
minor:
|
|
1867
|
-
patch:
|
|
1890
|
+
minor: 4,
|
|
1891
|
+
patch: 3
|
|
1868
1892
|
};
|
|
1869
1893
|
}
|
|
1870
1894
|
});
|
|
@@ -1873,6 +1897,8 @@ var init_versions = __esm({
|
|
|
1873
1897
|
function isValidBase64(data) {
|
|
1874
1898
|
if (data === "")
|
|
1875
1899
|
return true;
|
|
1900
|
+
if (/\s/.test(data))
|
|
1901
|
+
return false;
|
|
1876
1902
|
if (data.length % 4 !== 0)
|
|
1877
1903
|
return false;
|
|
1878
1904
|
try {
|
|
@@ -1915,15 +1941,27 @@ function handleArrayResult(result, final, index) {
|
|
|
1915
1941
|
}
|
|
1916
1942
|
final.value[index] = result.value;
|
|
1917
1943
|
}
|
|
1918
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
1944
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
1945
|
+
const isPresent = key in input;
|
|
1919
1946
|
if (result.issues.length) {
|
|
1920
|
-
if (isOptionalOut && !
|
|
1947
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
1921
1948
|
return;
|
|
1922
1949
|
}
|
|
1923
1950
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
1924
1951
|
}
|
|
1952
|
+
if (!isPresent && !isOptionalIn) {
|
|
1953
|
+
if (!result.issues.length) {
|
|
1954
|
+
final.issues.push({
|
|
1955
|
+
code: "invalid_type",
|
|
1956
|
+
expected: "nonoptional",
|
|
1957
|
+
input: void 0,
|
|
1958
|
+
path: [key]
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
return;
|
|
1962
|
+
}
|
|
1925
1963
|
if (result.value === void 0) {
|
|
1926
|
-
if (
|
|
1964
|
+
if (isPresent) {
|
|
1927
1965
|
final.value[key] = void 0;
|
|
1928
1966
|
}
|
|
1929
1967
|
} else {
|
|
@@ -1951,8 +1989,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
1951
1989
|
const keySet = def.keySet;
|
|
1952
1990
|
const _catchall = def.catchall._zod;
|
|
1953
1991
|
const t = _catchall.def.type;
|
|
1992
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
1954
1993
|
const isOptionalOut = _catchall.optout === "optional";
|
|
1955
1994
|
for (const key in input) {
|
|
1995
|
+
if (key === "__proto__")
|
|
1996
|
+
continue;
|
|
1956
1997
|
if (keySet.has(key))
|
|
1957
1998
|
continue;
|
|
1958
1999
|
if (t === "never") {
|
|
@@ -1961,9 +2002,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
1961
2002
|
}
|
|
1962
2003
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
1963
2004
|
if (r instanceof Promise) {
|
|
1964
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
2005
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
1965
2006
|
} else {
|
|
1966
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
2007
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
1967
2008
|
}
|
|
1968
2009
|
}
|
|
1969
2010
|
if (unrecognized.length) {
|
|
@@ -2107,12 +2148,41 @@ function handleIntersectionResults(result, left, right) {
|
|
|
2107
2148
|
result.value = merged.data;
|
|
2108
2149
|
return result;
|
|
2109
2150
|
}
|
|
2151
|
+
function getTupleOptStart(items, key) {
|
|
2152
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
2153
|
+
if (items[i]._zod[key] !== "optional")
|
|
2154
|
+
return i + 1;
|
|
2155
|
+
}
|
|
2156
|
+
return 0;
|
|
2157
|
+
}
|
|
2110
2158
|
function handleTupleResult(result, final, index) {
|
|
2111
2159
|
if (result.issues.length) {
|
|
2112
2160
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
2113
2161
|
}
|
|
2114
2162
|
final.value[index] = result.value;
|
|
2115
2163
|
}
|
|
2164
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
2165
|
+
for (let i = 0; i < items.length; i++) {
|
|
2166
|
+
const r = itemResults[i];
|
|
2167
|
+
const isPresent = i < input.length;
|
|
2168
|
+
if (r.issues.length) {
|
|
2169
|
+
if (!isPresent && i >= optoutStart) {
|
|
2170
|
+
final.value.length = i;
|
|
2171
|
+
break;
|
|
2172
|
+
}
|
|
2173
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
2174
|
+
}
|
|
2175
|
+
final.value[i] = r.value;
|
|
2176
|
+
}
|
|
2177
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
2178
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
2179
|
+
final.value.length = i;
|
|
2180
|
+
} else {
|
|
2181
|
+
break;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
return final;
|
|
2185
|
+
}
|
|
2116
2186
|
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
2117
2187
|
if (keyResult.issues.length) {
|
|
2118
2188
|
if (propertyKeyTypes.has(typeof key)) {
|
|
@@ -2150,7 +2220,7 @@ function handleSetResult(result, final) {
|
|
|
2150
2220
|
final.value.add(result.value);
|
|
2151
2221
|
}
|
|
2152
2222
|
function handleOptionalResult(result, input) {
|
|
2153
|
-
if (result.issues.length
|
|
2223
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
2154
2224
|
return { issues: [], value: void 0 };
|
|
2155
2225
|
}
|
|
2156
2226
|
return result;
|
|
@@ -2177,7 +2247,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
2177
2247
|
left.aborted = true;
|
|
2178
2248
|
return left;
|
|
2179
2249
|
}
|
|
2180
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
2250
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
2181
2251
|
}
|
|
2182
2252
|
function handleCodecAResult(result, def, ctx) {
|
|
2183
2253
|
if (result.issues.length) {
|
|
@@ -2227,7 +2297,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2227
2297
|
payload.issues.push(issue(_iss));
|
|
2228
2298
|
}
|
|
2229
2299
|
}
|
|
2230
|
-
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
2300
|
+
var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
|
|
2231
2301
|
var init_schemas = __esm({
|
|
2232
2302
|
"../../node_modules/zod/v4/core/schemas.js"() {
|
|
2233
2303
|
"use strict";
|
|
@@ -2240,7 +2310,7 @@ var init_schemas = __esm({
|
|
|
2240
2310
|
init_versions();
|
|
2241
2311
|
init_util();
|
|
2242
2312
|
$ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2243
|
-
var
|
|
2313
|
+
var _a3;
|
|
2244
2314
|
inst ?? (inst = {});
|
|
2245
2315
|
inst._zod.def = def;
|
|
2246
2316
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2255,7 +2325,7 @@ var init_schemas = __esm({
|
|
|
2255
2325
|
}
|
|
2256
2326
|
}
|
|
2257
2327
|
if (checks.length === 0) {
|
|
2258
|
-
(
|
|
2328
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2259
2329
|
inst._zod.deferred?.push(() => {
|
|
2260
2330
|
inst._zod.run = inst._zod.parse;
|
|
2261
2331
|
});
|
|
@@ -2265,6 +2335,8 @@ var init_schemas = __esm({
|
|
|
2265
2335
|
let asyncResult;
|
|
2266
2336
|
for (const ch of checks2) {
|
|
2267
2337
|
if (ch._zod.def.when) {
|
|
2338
|
+
if (explicitlyAborted(payload))
|
|
2339
|
+
continue;
|
|
2268
2340
|
const shouldRun = ch._zod.def.when(payload);
|
|
2269
2341
|
if (!shouldRun)
|
|
2270
2342
|
continue;
|
|
@@ -2405,6 +2477,19 @@ var init_schemas = __esm({
|
|
|
2405
2477
|
inst._zod.check = (payload) => {
|
|
2406
2478
|
try {
|
|
2407
2479
|
const trimmed = payload.value.trim();
|
|
2480
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
2481
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
2482
|
+
payload.issues.push({
|
|
2483
|
+
code: "invalid_format",
|
|
2484
|
+
format: "url",
|
|
2485
|
+
note: "Invalid URL format",
|
|
2486
|
+
input: payload.value,
|
|
2487
|
+
inst,
|
|
2488
|
+
continue: !def.abort
|
|
2489
|
+
});
|
|
2490
|
+
return;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2408
2493
|
const url2 = new URL(trimmed);
|
|
2409
2494
|
if (def.hostname) {
|
|
2410
2495
|
def.hostname.lastIndex = 0;
|
|
@@ -2711,8 +2796,6 @@ var init_schemas = __esm({
|
|
|
2711
2796
|
$ZodType.init(inst, def);
|
|
2712
2797
|
inst._zod.pattern = _undefined;
|
|
2713
2798
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
2714
|
-
inst._zod.optin = "optional";
|
|
2715
|
-
inst._zod.optout = "optional";
|
|
2716
2799
|
inst._zod.parse = (payload, _ctx) => {
|
|
2717
2800
|
const input = payload.value;
|
|
2718
2801
|
if (typeof input === "undefined")
|
|
@@ -2884,12 +2967,13 @@ var init_schemas = __esm({
|
|
|
2884
2967
|
const shape = value.shape;
|
|
2885
2968
|
for (const key of value.keys) {
|
|
2886
2969
|
const el = shape[key];
|
|
2970
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
2887
2971
|
const isOptionalOut = el._zod.optout === "optional";
|
|
2888
2972
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
2889
2973
|
if (r instanceof Promise) {
|
|
2890
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
2974
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
2891
2975
|
} else {
|
|
2892
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
2976
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
2893
2977
|
}
|
|
2894
2978
|
}
|
|
2895
2979
|
if (!catchall) {
|
|
@@ -2920,9 +3004,10 @@ var init_schemas = __esm({
|
|
|
2920
3004
|
const id = ids[key];
|
|
2921
3005
|
const k = esc(key);
|
|
2922
3006
|
const schema = shape[key];
|
|
3007
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
2923
3008
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
2924
3009
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2925
|
-
if (isOptionalOut) {
|
|
3010
|
+
if (isOptionalIn && isOptionalOut) {
|
|
2926
3011
|
doc.write(`
|
|
2927
3012
|
if (${id}.issues.length) {
|
|
2928
3013
|
if (${k} in input) {
|
|
@@ -2941,6 +3026,33 @@ var init_schemas = __esm({
|
|
|
2941
3026
|
newResult[${k}] = ${id}.value;
|
|
2942
3027
|
}
|
|
2943
3028
|
|
|
3029
|
+
`);
|
|
3030
|
+
} else if (!isOptionalIn) {
|
|
3031
|
+
doc.write(`
|
|
3032
|
+
const ${id}_present = ${k} in input;
|
|
3033
|
+
if (${id}.issues.length) {
|
|
3034
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3035
|
+
...iss,
|
|
3036
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3037
|
+
})));
|
|
3038
|
+
}
|
|
3039
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3040
|
+
payload.issues.push({
|
|
3041
|
+
code: "invalid_type",
|
|
3042
|
+
expected: "nonoptional",
|
|
3043
|
+
input: undefined,
|
|
3044
|
+
path: [${k}]
|
|
3045
|
+
});
|
|
3046
|
+
}
|
|
3047
|
+
|
|
3048
|
+
if (${id}_present) {
|
|
3049
|
+
if (${id}.value === undefined) {
|
|
3050
|
+
newResult[${k}] = undefined;
|
|
3051
|
+
} else {
|
|
3052
|
+
newResult[${k}] = ${id}.value;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
|
|
2944
3056
|
`);
|
|
2945
3057
|
} else {
|
|
2946
3058
|
doc.write(`
|
|
@@ -3014,10 +3126,9 @@ var init_schemas = __esm({
|
|
|
3014
3126
|
}
|
|
3015
3127
|
return void 0;
|
|
3016
3128
|
});
|
|
3017
|
-
const
|
|
3018
|
-
const first = def.options[0]._zod.run;
|
|
3129
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3019
3130
|
inst._zod.parse = (payload, ctx) => {
|
|
3020
|
-
if (
|
|
3131
|
+
if (first) {
|
|
3021
3132
|
return first(payload, ctx);
|
|
3022
3133
|
}
|
|
3023
3134
|
let async = false;
|
|
@@ -3046,10 +3157,9 @@ var init_schemas = __esm({
|
|
|
3046
3157
|
$ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3047
3158
|
$ZodUnion.init(inst, def);
|
|
3048
3159
|
def.inclusive = false;
|
|
3049
|
-
const
|
|
3050
|
-
const first = def.options[0]._zod.run;
|
|
3160
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3051
3161
|
inst._zod.parse = (payload, ctx) => {
|
|
3052
|
-
if (
|
|
3162
|
+
if (first) {
|
|
3053
3163
|
return first(payload, ctx);
|
|
3054
3164
|
}
|
|
3055
3165
|
let async = false;
|
|
@@ -3124,7 +3234,7 @@ var init_schemas = __esm({
|
|
|
3124
3234
|
if (opt) {
|
|
3125
3235
|
return opt._zod.run(payload, ctx);
|
|
3126
3236
|
}
|
|
3127
|
-
if (def.unionFallback) {
|
|
3237
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3128
3238
|
return _super(payload, ctx);
|
|
3129
3239
|
}
|
|
3130
3240
|
payload.issues.push({
|
|
@@ -3132,6 +3242,7 @@ var init_schemas = __esm({
|
|
|
3132
3242
|
errors: [],
|
|
3133
3243
|
note: "No matching discriminator",
|
|
3134
3244
|
discriminator: def.discriminator,
|
|
3245
|
+
options: Array.from(disc.value.keys()),
|
|
3135
3246
|
input,
|
|
3136
3247
|
path: [def.discriminator],
|
|
3137
3248
|
inst
|
|
@@ -3170,56 +3281,59 @@ var init_schemas = __esm({
|
|
|
3170
3281
|
}
|
|
3171
3282
|
payload.value = [];
|
|
3172
3283
|
const proms = [];
|
|
3173
|
-
const
|
|
3174
|
-
const
|
|
3284
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
3285
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3175
3286
|
if (!def.rest) {
|
|
3176
|
-
|
|
3177
|
-
const tooSmall = input.length < optStart - 1;
|
|
3178
|
-
if (tooBig || tooSmall) {
|
|
3287
|
+
if (input.length < optinStart) {
|
|
3179
3288
|
payload.issues.push({
|
|
3180
|
-
|
|
3289
|
+
code: "too_small",
|
|
3290
|
+
minimum: optinStart,
|
|
3291
|
+
inclusive: true,
|
|
3181
3292
|
input,
|
|
3182
3293
|
inst,
|
|
3183
3294
|
origin: "array"
|
|
3184
3295
|
});
|
|
3185
3296
|
return payload;
|
|
3186
3297
|
}
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3298
|
+
if (input.length > items.length) {
|
|
3299
|
+
payload.issues.push({
|
|
3300
|
+
code: "too_big",
|
|
3301
|
+
maximum: items.length,
|
|
3302
|
+
inclusive: true,
|
|
3303
|
+
input,
|
|
3304
|
+
inst,
|
|
3305
|
+
origin: "array"
|
|
3306
|
+
});
|
|
3194
3307
|
}
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
}, ctx);
|
|
3199
|
-
if (
|
|
3200
|
-
proms.push(
|
|
3308
|
+
}
|
|
3309
|
+
const itemResults = new Array(items.length);
|
|
3310
|
+
for (let i = 0; i < items.length; i++) {
|
|
3311
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
3312
|
+
if (r instanceof Promise) {
|
|
3313
|
+
proms.push(r.then((rr) => {
|
|
3314
|
+
itemResults[i] = rr;
|
|
3315
|
+
}));
|
|
3201
3316
|
} else {
|
|
3202
|
-
|
|
3317
|
+
itemResults[i] = r;
|
|
3203
3318
|
}
|
|
3204
3319
|
}
|
|
3205
3320
|
if (def.rest) {
|
|
3321
|
+
let i = items.length - 1;
|
|
3206
3322
|
const rest = input.slice(items.length);
|
|
3207
3323
|
for (const el of rest) {
|
|
3208
3324
|
i++;
|
|
3209
|
-
const result = def.rest._zod.run({
|
|
3210
|
-
value: el,
|
|
3211
|
-
issues: []
|
|
3212
|
-
}, ctx);
|
|
3325
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
3213
3326
|
if (result instanceof Promise) {
|
|
3214
|
-
proms.push(result.then((
|
|
3327
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
3215
3328
|
} else {
|
|
3216
3329
|
handleTupleResult(result, payload, i);
|
|
3217
3330
|
}
|
|
3218
3331
|
}
|
|
3219
3332
|
}
|
|
3220
|
-
if (proms.length)
|
|
3221
|
-
return Promise.all(proms).then(() => payload);
|
|
3222
|
-
|
|
3333
|
+
if (proms.length) {
|
|
3334
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
3335
|
+
}
|
|
3336
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
3223
3337
|
};
|
|
3224
3338
|
});
|
|
3225
3339
|
$ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
@@ -3243,19 +3357,35 @@ var init_schemas = __esm({
|
|
|
3243
3357
|
for (const key of values) {
|
|
3244
3358
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3245
3359
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3360
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3361
|
+
if (keyResult instanceof Promise) {
|
|
3362
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
3363
|
+
}
|
|
3364
|
+
if (keyResult.issues.length) {
|
|
3365
|
+
payload.issues.push({
|
|
3366
|
+
code: "invalid_key",
|
|
3367
|
+
origin: "record",
|
|
3368
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
3369
|
+
input: key,
|
|
3370
|
+
path: [key],
|
|
3371
|
+
inst
|
|
3372
|
+
});
|
|
3373
|
+
continue;
|
|
3374
|
+
}
|
|
3375
|
+
const outKey = keyResult.value;
|
|
3246
3376
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3247
3377
|
if (result instanceof Promise) {
|
|
3248
3378
|
proms.push(result.then((result2) => {
|
|
3249
3379
|
if (result2.issues.length) {
|
|
3250
3380
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
3251
3381
|
}
|
|
3252
|
-
payload.value[
|
|
3382
|
+
payload.value[outKey] = result2.value;
|
|
3253
3383
|
}));
|
|
3254
3384
|
} else {
|
|
3255
3385
|
if (result.issues.length) {
|
|
3256
3386
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
3257
3387
|
}
|
|
3258
|
-
payload.value[
|
|
3388
|
+
payload.value[outKey] = result.value;
|
|
3259
3389
|
}
|
|
3260
3390
|
}
|
|
3261
3391
|
}
|
|
@@ -3279,6 +3409,8 @@ var init_schemas = __esm({
|
|
|
3279
3409
|
for (const key of Reflect.ownKeys(input)) {
|
|
3280
3410
|
if (key === "__proto__")
|
|
3281
3411
|
continue;
|
|
3412
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
3413
|
+
continue;
|
|
3282
3414
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3283
3415
|
if (keyResult instanceof Promise) {
|
|
3284
3416
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3447,6 +3579,7 @@ var init_schemas = __esm({
|
|
|
3447
3579
|
});
|
|
3448
3580
|
$ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
3449
3581
|
$ZodType.init(inst, def);
|
|
3582
|
+
inst._zod.optin = "optional";
|
|
3450
3583
|
inst._zod.parse = (payload, ctx) => {
|
|
3451
3584
|
if (ctx.direction === "backward") {
|
|
3452
3585
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -3456,6 +3589,7 @@ var init_schemas = __esm({
|
|
|
3456
3589
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
3457
3590
|
return output.then((output2) => {
|
|
3458
3591
|
payload.value = output2;
|
|
3592
|
+
payload.fallback = true;
|
|
3459
3593
|
return payload;
|
|
3460
3594
|
});
|
|
3461
3595
|
}
|
|
@@ -3463,6 +3597,7 @@ var init_schemas = __esm({
|
|
|
3463
3597
|
throw new $ZodAsyncError();
|
|
3464
3598
|
}
|
|
3465
3599
|
payload.value = _out;
|
|
3600
|
+
payload.fallback = true;
|
|
3466
3601
|
return payload;
|
|
3467
3602
|
};
|
|
3468
3603
|
});
|
|
@@ -3479,10 +3614,11 @@ var init_schemas = __esm({
|
|
|
3479
3614
|
});
|
|
3480
3615
|
inst._zod.parse = (payload, ctx) => {
|
|
3481
3616
|
if (def.innerType._zod.optin === "optional") {
|
|
3617
|
+
const input = payload.value;
|
|
3482
3618
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3483
3619
|
if (result instanceof Promise)
|
|
3484
|
-
return result.then((r) => handleOptionalResult(r,
|
|
3485
|
-
return handleOptionalResult(result,
|
|
3620
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
3621
|
+
return handleOptionalResult(result, input);
|
|
3486
3622
|
}
|
|
3487
3623
|
if (payload.value === void 0) {
|
|
3488
3624
|
return payload;
|
|
@@ -3581,7 +3717,7 @@ var init_schemas = __esm({
|
|
|
3581
3717
|
});
|
|
3582
3718
|
$ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
3583
3719
|
$ZodType.init(inst, def);
|
|
3584
|
-
|
|
3720
|
+
inst._zod.optin = "optional";
|
|
3585
3721
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3586
3722
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3587
3723
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3601,6 +3737,7 @@ var init_schemas = __esm({
|
|
|
3601
3737
|
input: payload.value
|
|
3602
3738
|
});
|
|
3603
3739
|
payload.issues = [];
|
|
3740
|
+
payload.fallback = true;
|
|
3604
3741
|
}
|
|
3605
3742
|
return payload;
|
|
3606
3743
|
});
|
|
@@ -3615,6 +3752,7 @@ var init_schemas = __esm({
|
|
|
3615
3752
|
input: payload.value
|
|
3616
3753
|
});
|
|
3617
3754
|
payload.issues = [];
|
|
3755
|
+
payload.fallback = true;
|
|
3618
3756
|
}
|
|
3619
3757
|
return payload;
|
|
3620
3758
|
};
|
|
@@ -3678,6 +3816,9 @@ var init_schemas = __esm({
|
|
|
3678
3816
|
}
|
|
3679
3817
|
};
|
|
3680
3818
|
});
|
|
3819
|
+
$ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
3820
|
+
$ZodPipe.init(inst, def);
|
|
3821
|
+
});
|
|
3681
3822
|
$ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
3682
3823
|
$ZodType.init(inst, def);
|
|
3683
3824
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -3825,7 +3966,12 @@ var init_schemas = __esm({
|
|
|
3825
3966
|
});
|
|
3826
3967
|
$ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
3827
3968
|
$ZodType.init(inst, def);
|
|
3828
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
3969
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
3970
|
+
const d = def;
|
|
3971
|
+
if (!d._cachedInner)
|
|
3972
|
+
d._cachedInner = def.getter();
|
|
3973
|
+
return d._cachedInner;
|
|
3974
|
+
});
|
|
3829
3975
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
3830
3976
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
3831
3977
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4847,18 +4993,135 @@ var init_de = __esm({
|
|
|
4847
4993
|
}
|
|
4848
4994
|
});
|
|
4849
4995
|
|
|
4850
|
-
// ../../node_modules/zod/v4/locales/
|
|
4851
|
-
function
|
|
4996
|
+
// ../../node_modules/zod/v4/locales/el.js
|
|
4997
|
+
function el_default() {
|
|
4852
4998
|
return {
|
|
4853
4999
|
localeError: error9()
|
|
4854
5000
|
};
|
|
4855
5001
|
}
|
|
4856
5002
|
var error9;
|
|
5003
|
+
var init_el = __esm({
|
|
5004
|
+
"../../node_modules/zod/v4/locales/el.js"() {
|
|
5005
|
+
"use strict";
|
|
5006
|
+
init_util();
|
|
5007
|
+
error9 = () => {
|
|
5008
|
+
const Sizable = {
|
|
5009
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5010
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5011
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5012
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5013
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
5014
|
+
};
|
|
5015
|
+
function getSizing(origin) {
|
|
5016
|
+
return Sizable[origin] ?? null;
|
|
5017
|
+
}
|
|
5018
|
+
const FormatDictionary = {
|
|
5019
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
5020
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
5021
|
+
url: "URL",
|
|
5022
|
+
emoji: "emoji",
|
|
5023
|
+
uuid: "UUID",
|
|
5024
|
+
uuidv4: "UUIDv4",
|
|
5025
|
+
uuidv6: "UUIDv6",
|
|
5026
|
+
nanoid: "nanoid",
|
|
5027
|
+
guid: "GUID",
|
|
5028
|
+
cuid: "cuid",
|
|
5029
|
+
cuid2: "cuid2",
|
|
5030
|
+
ulid: "ULID",
|
|
5031
|
+
xid: "XID",
|
|
5032
|
+
ksuid: "KSUID",
|
|
5033
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
5034
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5035
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5036
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5037
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5038
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5039
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5040
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5041
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5042
|
+
base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
|
|
5043
|
+
base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
|
|
5044
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5045
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5046
|
+
jwt: "JWT",
|
|
5047
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
5048
|
+
};
|
|
5049
|
+
const TypeDictionary = {
|
|
5050
|
+
nan: "NaN"
|
|
5051
|
+
};
|
|
5052
|
+
return (issue2) => {
|
|
5053
|
+
switch (issue2.code) {
|
|
5054
|
+
case "invalid_type": {
|
|
5055
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
5056
|
+
const receivedType = parsedType(issue2.input);
|
|
5057
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
5058
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
5059
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
5060
|
+
}
|
|
5061
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
5062
|
+
}
|
|
5063
|
+
case "invalid_value":
|
|
5064
|
+
if (issue2.values.length === 1)
|
|
5065
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
|
|
5066
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
|
|
5067
|
+
case "too_big": {
|
|
5068
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
5069
|
+
const sizing = getSizing(issue2.origin);
|
|
5070
|
+
if (sizing)
|
|
5071
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
|
|
5072
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
|
|
5073
|
+
}
|
|
5074
|
+
case "too_small": {
|
|
5075
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
5076
|
+
const sizing = getSizing(issue2.origin);
|
|
5077
|
+
if (sizing) {
|
|
5078
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5079
|
+
}
|
|
5080
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
|
|
5081
|
+
}
|
|
5082
|
+
case "invalid_format": {
|
|
5083
|
+
const _issue = issue2;
|
|
5084
|
+
if (_issue.format === "starts_with") {
|
|
5085
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
|
|
5086
|
+
}
|
|
5087
|
+
if (_issue.format === "ends_with")
|
|
5088
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
|
|
5089
|
+
if (_issue.format === "includes")
|
|
5090
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
|
|
5091
|
+
if (_issue.format === "regex")
|
|
5092
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
|
|
5093
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
5094
|
+
}
|
|
5095
|
+
case "not_multiple_of":
|
|
5096
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
|
|
5097
|
+
case "unrecognized_keys":
|
|
5098
|
+
return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
|
|
5099
|
+
case "invalid_key":
|
|
5100
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5101
|
+
case "invalid_union":
|
|
5102
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
5103
|
+
case "invalid_element":
|
|
5104
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5105
|
+
default:
|
|
5106
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
5107
|
+
}
|
|
5108
|
+
};
|
|
5109
|
+
};
|
|
5110
|
+
}
|
|
5111
|
+
});
|
|
5112
|
+
|
|
5113
|
+
// ../../node_modules/zod/v4/locales/en.js
|
|
5114
|
+
function en_default() {
|
|
5115
|
+
return {
|
|
5116
|
+
localeError: error10()
|
|
5117
|
+
};
|
|
5118
|
+
}
|
|
5119
|
+
var error10;
|
|
4857
5120
|
var init_en = __esm({
|
|
4858
5121
|
"../../node_modules/zod/v4/locales/en.js"() {
|
|
4859
5122
|
"use strict";
|
|
4860
5123
|
init_util();
|
|
4861
|
-
|
|
5124
|
+
error10 = () => {
|
|
4862
5125
|
const Sizable = {
|
|
4863
5126
|
string: { unit: "characters", verb: "to have" },
|
|
4864
5127
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -4952,6 +5215,10 @@ var init_en = __esm({
|
|
|
4952
5215
|
case "invalid_key":
|
|
4953
5216
|
return `Invalid key in ${issue2.origin}`;
|
|
4954
5217
|
case "invalid_union":
|
|
5218
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
5219
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
5220
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
5221
|
+
}
|
|
4955
5222
|
return "Invalid input";
|
|
4956
5223
|
case "invalid_element":
|
|
4957
5224
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -4966,15 +5233,15 @@ var init_en = __esm({
|
|
|
4966
5233
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
4967
5234
|
function eo_default() {
|
|
4968
5235
|
return {
|
|
4969
|
-
localeError:
|
|
5236
|
+
localeError: error11()
|
|
4970
5237
|
};
|
|
4971
5238
|
}
|
|
4972
|
-
var
|
|
5239
|
+
var error11;
|
|
4973
5240
|
var init_eo = __esm({
|
|
4974
5241
|
"../../node_modules/zod/v4/locales/eo.js"() {
|
|
4975
5242
|
"use strict";
|
|
4976
5243
|
init_util();
|
|
4977
|
-
|
|
5244
|
+
error11 = () => {
|
|
4978
5245
|
const Sizable = {
|
|
4979
5246
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
4980
5247
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5083,15 +5350,15 @@ var init_eo = __esm({
|
|
|
5083
5350
|
// ../../node_modules/zod/v4/locales/es.js
|
|
5084
5351
|
function es_default() {
|
|
5085
5352
|
return {
|
|
5086
|
-
localeError:
|
|
5353
|
+
localeError: error12()
|
|
5087
5354
|
};
|
|
5088
5355
|
}
|
|
5089
|
-
var
|
|
5356
|
+
var error12;
|
|
5090
5357
|
var init_es = __esm({
|
|
5091
5358
|
"../../node_modules/zod/v4/locales/es.js"() {
|
|
5092
5359
|
"use strict";
|
|
5093
5360
|
init_util();
|
|
5094
|
-
|
|
5361
|
+
error12 = () => {
|
|
5095
5362
|
const Sizable = {
|
|
5096
5363
|
string: { unit: "caracteres", verb: "tener" },
|
|
5097
5364
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -5223,15 +5490,15 @@ var init_es = __esm({
|
|
|
5223
5490
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
5224
5491
|
function fa_default() {
|
|
5225
5492
|
return {
|
|
5226
|
-
localeError:
|
|
5493
|
+
localeError: error13()
|
|
5227
5494
|
};
|
|
5228
5495
|
}
|
|
5229
|
-
var
|
|
5496
|
+
var error13;
|
|
5230
5497
|
var init_fa = __esm({
|
|
5231
5498
|
"../../node_modules/zod/v4/locales/fa.js"() {
|
|
5232
5499
|
"use strict";
|
|
5233
5500
|
init_util();
|
|
5234
|
-
|
|
5501
|
+
error13 = () => {
|
|
5235
5502
|
const Sizable = {
|
|
5236
5503
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
5237
5504
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -5345,15 +5612,15 @@ var init_fa = __esm({
|
|
|
5345
5612
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
5346
5613
|
function fi_default() {
|
|
5347
5614
|
return {
|
|
5348
|
-
localeError:
|
|
5615
|
+
localeError: error14()
|
|
5349
5616
|
};
|
|
5350
5617
|
}
|
|
5351
|
-
var
|
|
5618
|
+
var error14;
|
|
5352
5619
|
var init_fi = __esm({
|
|
5353
5620
|
"../../node_modules/zod/v4/locales/fi.js"() {
|
|
5354
5621
|
"use strict";
|
|
5355
5622
|
init_util();
|
|
5356
|
-
|
|
5623
|
+
error14 = () => {
|
|
5357
5624
|
const Sizable = {
|
|
5358
5625
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
5359
5626
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -5465,15 +5732,15 @@ var init_fi = __esm({
|
|
|
5465
5732
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
5466
5733
|
function fr_default() {
|
|
5467
5734
|
return {
|
|
5468
|
-
localeError:
|
|
5735
|
+
localeError: error15()
|
|
5469
5736
|
};
|
|
5470
5737
|
}
|
|
5471
|
-
var
|
|
5738
|
+
var error15;
|
|
5472
5739
|
var init_fr = __esm({
|
|
5473
5740
|
"../../node_modules/zod/v4/locales/fr.js"() {
|
|
5474
5741
|
"use strict";
|
|
5475
5742
|
init_util();
|
|
5476
|
-
|
|
5743
|
+
error15 = () => {
|
|
5477
5744
|
const Sizable = {
|
|
5478
5745
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5479
5746
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5514,9 +5781,27 @@ var init_fr = __esm({
|
|
|
5514
5781
|
template_literal: "entr\xE9e"
|
|
5515
5782
|
};
|
|
5516
5783
|
const TypeDictionary = {
|
|
5517
|
-
|
|
5784
|
+
string: "cha\xEEne",
|
|
5518
5785
|
number: "nombre",
|
|
5519
|
-
|
|
5786
|
+
int: "entier",
|
|
5787
|
+
boolean: "bool\xE9en",
|
|
5788
|
+
bigint: "grand entier",
|
|
5789
|
+
symbol: "symbole",
|
|
5790
|
+
undefined: "ind\xE9fini",
|
|
5791
|
+
null: "null",
|
|
5792
|
+
never: "jamais",
|
|
5793
|
+
void: "vide",
|
|
5794
|
+
date: "date",
|
|
5795
|
+
array: "tableau",
|
|
5796
|
+
object: "objet",
|
|
5797
|
+
tuple: "tuple",
|
|
5798
|
+
record: "enregistrement",
|
|
5799
|
+
map: "carte",
|
|
5800
|
+
set: "ensemble",
|
|
5801
|
+
file: "fichier",
|
|
5802
|
+
nonoptional: "non-optionnel",
|
|
5803
|
+
nan: "NaN",
|
|
5804
|
+
function: "fonction"
|
|
5520
5805
|
};
|
|
5521
5806
|
return (issue2) => {
|
|
5522
5807
|
switch (issue2.code) {
|
|
@@ -5537,16 +5822,15 @@ var init_fr = __esm({
|
|
|
5537
5822
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
5538
5823
|
const sizing = getSizing(issue2.origin);
|
|
5539
5824
|
if (sizing)
|
|
5540
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5541
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5825
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5826
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5542
5827
|
}
|
|
5543
5828
|
case "too_small": {
|
|
5544
5829
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
5545
5830
|
const sizing = getSizing(issue2.origin);
|
|
5546
|
-
if (sizing)
|
|
5547
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5548
|
-
}
|
|
5549
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5831
|
+
if (sizing)
|
|
5832
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5833
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5550
5834
|
}
|
|
5551
5835
|
case "invalid_format": {
|
|
5552
5836
|
const _issue = issue2;
|
|
@@ -5581,15 +5865,15 @@ var init_fr = __esm({
|
|
|
5581
5865
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
5582
5866
|
function fr_CA_default() {
|
|
5583
5867
|
return {
|
|
5584
|
-
localeError:
|
|
5868
|
+
localeError: error16()
|
|
5585
5869
|
};
|
|
5586
5870
|
}
|
|
5587
|
-
var
|
|
5871
|
+
var error16;
|
|
5588
5872
|
var init_fr_CA = __esm({
|
|
5589
5873
|
"../../node_modules/zod/v4/locales/fr-CA.js"() {
|
|
5590
5874
|
"use strict";
|
|
5591
5875
|
init_util();
|
|
5592
|
-
|
|
5876
|
+
error16 = () => {
|
|
5593
5877
|
const Sizable = {
|
|
5594
5878
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5595
5879
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5696,15 +5980,15 @@ var init_fr_CA = __esm({
|
|
|
5696
5980
|
// ../../node_modules/zod/v4/locales/he.js
|
|
5697
5981
|
function he_default() {
|
|
5698
5982
|
return {
|
|
5699
|
-
localeError:
|
|
5983
|
+
localeError: error17()
|
|
5700
5984
|
};
|
|
5701
5985
|
}
|
|
5702
|
-
var
|
|
5986
|
+
var error17;
|
|
5703
5987
|
var init_he = __esm({
|
|
5704
5988
|
"../../node_modules/zod/v4/locales/he.js"() {
|
|
5705
5989
|
"use strict";
|
|
5706
5990
|
init_util();
|
|
5707
|
-
|
|
5991
|
+
error17 = () => {
|
|
5708
5992
|
const TypeNames = {
|
|
5709
5993
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
5710
5994
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -5895,22 +6179,152 @@ var init_he = __esm({
|
|
|
5895
6179
|
}
|
|
5896
6180
|
});
|
|
5897
6181
|
|
|
5898
|
-
// ../../node_modules/zod/v4/locales/
|
|
5899
|
-
function
|
|
6182
|
+
// ../../node_modules/zod/v4/locales/hr.js
|
|
6183
|
+
function hr_default() {
|
|
5900
6184
|
return {
|
|
5901
|
-
localeError:
|
|
6185
|
+
localeError: error18()
|
|
5902
6186
|
};
|
|
5903
6187
|
}
|
|
5904
|
-
var
|
|
5905
|
-
var
|
|
5906
|
-
"../../node_modules/zod/v4/locales/
|
|
6188
|
+
var error18;
|
|
6189
|
+
var init_hr = __esm({
|
|
6190
|
+
"../../node_modules/zod/v4/locales/hr.js"() {
|
|
5907
6191
|
"use strict";
|
|
5908
6192
|
init_util();
|
|
5909
|
-
|
|
6193
|
+
error18 = () => {
|
|
5910
6194
|
const Sizable = {
|
|
5911
|
-
string: { unit: "
|
|
5912
|
-
file: { unit: "
|
|
5913
|
-
array: { unit: "
|
|
6195
|
+
string: { unit: "znakova", verb: "imati" },
|
|
6196
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
6197
|
+
array: { unit: "stavki", verb: "imati" },
|
|
6198
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6199
|
+
};
|
|
6200
|
+
function getSizing(origin) {
|
|
6201
|
+
return Sizable[origin] ?? null;
|
|
6202
|
+
}
|
|
6203
|
+
const FormatDictionary = {
|
|
6204
|
+
regex: "unos",
|
|
6205
|
+
email: "email adresa",
|
|
6206
|
+
url: "URL",
|
|
6207
|
+
emoji: "emoji",
|
|
6208
|
+
uuid: "UUID",
|
|
6209
|
+
uuidv4: "UUIDv4",
|
|
6210
|
+
uuidv6: "UUIDv6",
|
|
6211
|
+
nanoid: "nanoid",
|
|
6212
|
+
guid: "GUID",
|
|
6213
|
+
cuid: "cuid",
|
|
6214
|
+
cuid2: "cuid2",
|
|
6215
|
+
ulid: "ULID",
|
|
6216
|
+
xid: "XID",
|
|
6217
|
+
ksuid: "KSUID",
|
|
6218
|
+
datetime: "ISO datum i vrijeme",
|
|
6219
|
+
date: "ISO datum",
|
|
6220
|
+
time: "ISO vrijeme",
|
|
6221
|
+
duration: "ISO trajanje",
|
|
6222
|
+
ipv4: "IPv4 adresa",
|
|
6223
|
+
ipv6: "IPv6 adresa",
|
|
6224
|
+
cidrv4: "IPv4 raspon",
|
|
6225
|
+
cidrv6: "IPv6 raspon",
|
|
6226
|
+
base64: "base64 kodirani tekst",
|
|
6227
|
+
base64url: "base64url kodirani tekst",
|
|
6228
|
+
json_string: "JSON tekst",
|
|
6229
|
+
e164: "E.164 broj",
|
|
6230
|
+
jwt: "JWT",
|
|
6231
|
+
template_literal: "unos"
|
|
6232
|
+
};
|
|
6233
|
+
const TypeDictionary = {
|
|
6234
|
+
nan: "NaN",
|
|
6235
|
+
string: "tekst",
|
|
6236
|
+
number: "broj",
|
|
6237
|
+
boolean: "boolean",
|
|
6238
|
+
array: "niz",
|
|
6239
|
+
object: "objekt",
|
|
6240
|
+
set: "skup",
|
|
6241
|
+
file: "datoteka",
|
|
6242
|
+
date: "datum",
|
|
6243
|
+
bigint: "bigint",
|
|
6244
|
+
symbol: "simbol",
|
|
6245
|
+
undefined: "undefined",
|
|
6246
|
+
null: "null",
|
|
6247
|
+
function: "funkcija",
|
|
6248
|
+
map: "mapa"
|
|
6249
|
+
};
|
|
6250
|
+
return (issue2) => {
|
|
6251
|
+
switch (issue2.code) {
|
|
6252
|
+
case "invalid_type": {
|
|
6253
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6254
|
+
const receivedType = parsedType(issue2.input);
|
|
6255
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6256
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6257
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
6258
|
+
}
|
|
6259
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
6260
|
+
}
|
|
6261
|
+
case "invalid_value":
|
|
6262
|
+
if (issue2.values.length === 1)
|
|
6263
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
6264
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
6265
|
+
case "too_big": {
|
|
6266
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6267
|
+
const sizing = getSizing(issue2.origin);
|
|
6268
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6269
|
+
if (sizing)
|
|
6270
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
6271
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
6272
|
+
}
|
|
6273
|
+
case "too_small": {
|
|
6274
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6275
|
+
const sizing = getSizing(issue2.origin);
|
|
6276
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6277
|
+
if (sizing) {
|
|
6278
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6279
|
+
}
|
|
6280
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
6281
|
+
}
|
|
6282
|
+
case "invalid_format": {
|
|
6283
|
+
const _issue = issue2;
|
|
6284
|
+
if (_issue.format === "starts_with")
|
|
6285
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
6286
|
+
if (_issue.format === "ends_with")
|
|
6287
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
6288
|
+
if (_issue.format === "includes")
|
|
6289
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
6290
|
+
if (_issue.format === "regex")
|
|
6291
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
6292
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6293
|
+
}
|
|
6294
|
+
case "not_multiple_of":
|
|
6295
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
6296
|
+
case "unrecognized_keys":
|
|
6297
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6298
|
+
case "invalid_key":
|
|
6299
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6300
|
+
case "invalid_union":
|
|
6301
|
+
return "Neispravan unos";
|
|
6302
|
+
case "invalid_element":
|
|
6303
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6304
|
+
default:
|
|
6305
|
+
return `Neispravan unos`;
|
|
6306
|
+
}
|
|
6307
|
+
};
|
|
6308
|
+
};
|
|
6309
|
+
}
|
|
6310
|
+
});
|
|
6311
|
+
|
|
6312
|
+
// ../../node_modules/zod/v4/locales/hu.js
|
|
6313
|
+
function hu_default() {
|
|
6314
|
+
return {
|
|
6315
|
+
localeError: error19()
|
|
6316
|
+
};
|
|
6317
|
+
}
|
|
6318
|
+
var error19;
|
|
6319
|
+
var init_hu = __esm({
|
|
6320
|
+
"../../node_modules/zod/v4/locales/hu.js"() {
|
|
6321
|
+
"use strict";
|
|
6322
|
+
init_util();
|
|
6323
|
+
error19 = () => {
|
|
6324
|
+
const Sizable = {
|
|
6325
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
6326
|
+
file: { unit: "byte", verb: "legyen" },
|
|
6327
|
+
array: { unit: "elem", verb: "legyen" },
|
|
5914
6328
|
set: { unit: "elem", verb: "legyen" }
|
|
5915
6329
|
};
|
|
5916
6330
|
function getSizing(origin) {
|
|
@@ -6024,15 +6438,15 @@ function withDefiniteArticle(word) {
|
|
|
6024
6438
|
}
|
|
6025
6439
|
function hy_default() {
|
|
6026
6440
|
return {
|
|
6027
|
-
localeError:
|
|
6441
|
+
localeError: error20()
|
|
6028
6442
|
};
|
|
6029
6443
|
}
|
|
6030
|
-
var
|
|
6444
|
+
var error20;
|
|
6031
6445
|
var init_hy = __esm({
|
|
6032
6446
|
"../../node_modules/zod/v4/locales/hy.js"() {
|
|
6033
6447
|
"use strict";
|
|
6034
6448
|
init_util();
|
|
6035
|
-
|
|
6449
|
+
error20 = () => {
|
|
6036
6450
|
const Sizable = {
|
|
6037
6451
|
string: {
|
|
6038
6452
|
unit: {
|
|
@@ -6169,15 +6583,15 @@ var init_hy = __esm({
|
|
|
6169
6583
|
// ../../node_modules/zod/v4/locales/id.js
|
|
6170
6584
|
function id_default() {
|
|
6171
6585
|
return {
|
|
6172
|
-
localeError:
|
|
6586
|
+
localeError: error21()
|
|
6173
6587
|
};
|
|
6174
6588
|
}
|
|
6175
|
-
var
|
|
6589
|
+
var error21;
|
|
6176
6590
|
var init_id = __esm({
|
|
6177
6591
|
"../../node_modules/zod/v4/locales/id.js"() {
|
|
6178
6592
|
"use strict";
|
|
6179
6593
|
init_util();
|
|
6180
|
-
|
|
6594
|
+
error21 = () => {
|
|
6181
6595
|
const Sizable = {
|
|
6182
6596
|
string: { unit: "karakter", verb: "memiliki" },
|
|
6183
6597
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -6283,15 +6697,15 @@ var init_id = __esm({
|
|
|
6283
6697
|
// ../../node_modules/zod/v4/locales/is.js
|
|
6284
6698
|
function is_default() {
|
|
6285
6699
|
return {
|
|
6286
|
-
localeError:
|
|
6700
|
+
localeError: error22()
|
|
6287
6701
|
};
|
|
6288
6702
|
}
|
|
6289
|
-
var
|
|
6703
|
+
var error22;
|
|
6290
6704
|
var init_is = __esm({
|
|
6291
6705
|
"../../node_modules/zod/v4/locales/is.js"() {
|
|
6292
6706
|
"use strict";
|
|
6293
6707
|
init_util();
|
|
6294
|
-
|
|
6708
|
+
error22 = () => {
|
|
6295
6709
|
const Sizable = {
|
|
6296
6710
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
6297
6711
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -6400,15 +6814,15 @@ var init_is = __esm({
|
|
|
6400
6814
|
// ../../node_modules/zod/v4/locales/it.js
|
|
6401
6815
|
function it_default() {
|
|
6402
6816
|
return {
|
|
6403
|
-
localeError:
|
|
6817
|
+
localeError: error23()
|
|
6404
6818
|
};
|
|
6405
6819
|
}
|
|
6406
|
-
var
|
|
6820
|
+
var error23;
|
|
6407
6821
|
var init_it = __esm({
|
|
6408
6822
|
"../../node_modules/zod/v4/locales/it.js"() {
|
|
6409
6823
|
"use strict";
|
|
6410
6824
|
init_util();
|
|
6411
|
-
|
|
6825
|
+
error23 = () => {
|
|
6412
6826
|
const Sizable = {
|
|
6413
6827
|
string: { unit: "caratteri", verb: "avere" },
|
|
6414
6828
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -6493,7 +6907,7 @@ var init_it = __esm({
|
|
|
6493
6907
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
6494
6908
|
if (_issue.format === "regex")
|
|
6495
6909
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
6496
|
-
return `
|
|
6910
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6497
6911
|
}
|
|
6498
6912
|
case "not_multiple_of":
|
|
6499
6913
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -6516,15 +6930,15 @@ var init_it = __esm({
|
|
|
6516
6930
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
6517
6931
|
function ja_default() {
|
|
6518
6932
|
return {
|
|
6519
|
-
localeError:
|
|
6933
|
+
localeError: error24()
|
|
6520
6934
|
};
|
|
6521
6935
|
}
|
|
6522
|
-
var
|
|
6936
|
+
var error24;
|
|
6523
6937
|
var init_ja = __esm({
|
|
6524
6938
|
"../../node_modules/zod/v4/locales/ja.js"() {
|
|
6525
6939
|
"use strict";
|
|
6526
6940
|
init_util();
|
|
6527
|
-
|
|
6941
|
+
error24 = () => {
|
|
6528
6942
|
const Sizable = {
|
|
6529
6943
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
6530
6944
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -6631,15 +7045,15 @@ var init_ja = __esm({
|
|
|
6631
7045
|
// ../../node_modules/zod/v4/locales/ka.js
|
|
6632
7046
|
function ka_default() {
|
|
6633
7047
|
return {
|
|
6634
|
-
localeError:
|
|
7048
|
+
localeError: error25()
|
|
6635
7049
|
};
|
|
6636
7050
|
}
|
|
6637
|
-
var
|
|
7051
|
+
var error25;
|
|
6638
7052
|
var init_ka = __esm({
|
|
6639
7053
|
"../../node_modules/zod/v4/locales/ka.js"() {
|
|
6640
7054
|
"use strict";
|
|
6641
7055
|
init_util();
|
|
6642
|
-
|
|
7056
|
+
error25 = () => {
|
|
6643
7057
|
const Sizable = {
|
|
6644
7058
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
6645
7059
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -6672,9 +7086,9 @@ var init_ka = __esm({
|
|
|
6672
7086
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
6673
7087
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6674
7088
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6675
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6676
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6677
|
-
json_string: "JSON \
|
|
7089
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7090
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7091
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
6678
7092
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
6679
7093
|
jwt: "JWT",
|
|
6680
7094
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -6682,7 +7096,7 @@ var init_ka = __esm({
|
|
|
6682
7096
|
const TypeDictionary = {
|
|
6683
7097
|
nan: "NaN",
|
|
6684
7098
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
6685
|
-
string: "\
|
|
7099
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
6686
7100
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
6687
7101
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
6688
7102
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -6720,14 +7134,14 @@ var init_ka = __esm({
|
|
|
6720
7134
|
case "invalid_format": {
|
|
6721
7135
|
const _issue = issue2;
|
|
6722
7136
|
if (_issue.format === "starts_with") {
|
|
6723
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7137
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
|
|
6724
7138
|
}
|
|
6725
7139
|
if (_issue.format === "ends_with")
|
|
6726
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7140
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
|
|
6727
7141
|
if (_issue.format === "includes")
|
|
6728
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7142
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
|
|
6729
7143
|
if (_issue.format === "regex")
|
|
6730
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7144
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
|
|
6731
7145
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6732
7146
|
}
|
|
6733
7147
|
case "not_multiple_of":
|
|
@@ -6751,15 +7165,15 @@ var init_ka = __esm({
|
|
|
6751
7165
|
// ../../node_modules/zod/v4/locales/km.js
|
|
6752
7166
|
function km_default() {
|
|
6753
7167
|
return {
|
|
6754
|
-
localeError:
|
|
7168
|
+
localeError: error26()
|
|
6755
7169
|
};
|
|
6756
7170
|
}
|
|
6757
|
-
var
|
|
7171
|
+
var error26;
|
|
6758
7172
|
var init_km = __esm({
|
|
6759
7173
|
"../../node_modules/zod/v4/locales/km.js"() {
|
|
6760
7174
|
"use strict";
|
|
6761
7175
|
init_util();
|
|
6762
|
-
|
|
7176
|
+
error26 = () => {
|
|
6763
7177
|
const Sizable = {
|
|
6764
7178
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
6765
7179
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -6880,15 +7294,15 @@ var init_kh = __esm({
|
|
|
6880
7294
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
6881
7295
|
function ko_default() {
|
|
6882
7296
|
return {
|
|
6883
|
-
localeError:
|
|
7297
|
+
localeError: error27()
|
|
6884
7298
|
};
|
|
6885
7299
|
}
|
|
6886
|
-
var
|
|
7300
|
+
var error27;
|
|
6887
7301
|
var init_ko = __esm({
|
|
6888
7302
|
"../../node_modules/zod/v4/locales/ko.js"() {
|
|
6889
7303
|
"use strict";
|
|
6890
7304
|
init_util();
|
|
6891
|
-
|
|
7305
|
+
error27 = () => {
|
|
6892
7306
|
const Sizable = {
|
|
6893
7307
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
6894
7308
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -7009,10 +7423,10 @@ function getUnitTypeFromNumber(number4) {
|
|
|
7009
7423
|
}
|
|
7010
7424
|
function lt_default() {
|
|
7011
7425
|
return {
|
|
7012
|
-
localeError:
|
|
7426
|
+
localeError: error28()
|
|
7013
7427
|
};
|
|
7014
7428
|
}
|
|
7015
|
-
var capitalizeFirstCharacter,
|
|
7429
|
+
var capitalizeFirstCharacter, error28;
|
|
7016
7430
|
var init_lt = __esm({
|
|
7017
7431
|
"../../node_modules/zod/v4/locales/lt.js"() {
|
|
7018
7432
|
"use strict";
|
|
@@ -7020,7 +7434,7 @@ var init_lt = __esm({
|
|
|
7020
7434
|
capitalizeFirstCharacter = (text) => {
|
|
7021
7435
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
7022
7436
|
};
|
|
7023
|
-
|
|
7437
|
+
error28 = () => {
|
|
7024
7438
|
const Sizable = {
|
|
7025
7439
|
string: {
|
|
7026
7440
|
unit: {
|
|
@@ -7210,15 +7624,15 @@ var init_lt = __esm({
|
|
|
7210
7624
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
7211
7625
|
function mk_default() {
|
|
7212
7626
|
return {
|
|
7213
|
-
localeError:
|
|
7627
|
+
localeError: error29()
|
|
7214
7628
|
};
|
|
7215
7629
|
}
|
|
7216
|
-
var
|
|
7630
|
+
var error29;
|
|
7217
7631
|
var init_mk = __esm({
|
|
7218
7632
|
"../../node_modules/zod/v4/locales/mk.js"() {
|
|
7219
7633
|
"use strict";
|
|
7220
7634
|
init_util();
|
|
7221
|
-
|
|
7635
|
+
error29 = () => {
|
|
7222
7636
|
const Sizable = {
|
|
7223
7637
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
7224
7638
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -7327,15 +7741,15 @@ var init_mk = __esm({
|
|
|
7327
7741
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
7328
7742
|
function ms_default() {
|
|
7329
7743
|
return {
|
|
7330
|
-
localeError:
|
|
7744
|
+
localeError: error30()
|
|
7331
7745
|
};
|
|
7332
7746
|
}
|
|
7333
|
-
var
|
|
7747
|
+
var error30;
|
|
7334
7748
|
var init_ms = __esm({
|
|
7335
7749
|
"../../node_modules/zod/v4/locales/ms.js"() {
|
|
7336
7750
|
"use strict";
|
|
7337
7751
|
init_util();
|
|
7338
|
-
|
|
7752
|
+
error30 = () => {
|
|
7339
7753
|
const Sizable = {
|
|
7340
7754
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
7341
7755
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -7442,15 +7856,15 @@ var init_ms = __esm({
|
|
|
7442
7856
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
7443
7857
|
function nl_default() {
|
|
7444
7858
|
return {
|
|
7445
|
-
localeError:
|
|
7859
|
+
localeError: error31()
|
|
7446
7860
|
};
|
|
7447
7861
|
}
|
|
7448
|
-
var
|
|
7862
|
+
var error31;
|
|
7449
7863
|
var init_nl = __esm({
|
|
7450
7864
|
"../../node_modules/zod/v4/locales/nl.js"() {
|
|
7451
7865
|
"use strict";
|
|
7452
7866
|
init_util();
|
|
7453
|
-
|
|
7867
|
+
error31 = () => {
|
|
7454
7868
|
const Sizable = {
|
|
7455
7869
|
string: { unit: "tekens", verb: "heeft" },
|
|
7456
7870
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -7560,15 +7974,15 @@ var init_nl = __esm({
|
|
|
7560
7974
|
// ../../node_modules/zod/v4/locales/no.js
|
|
7561
7975
|
function no_default() {
|
|
7562
7976
|
return {
|
|
7563
|
-
localeError:
|
|
7977
|
+
localeError: error32()
|
|
7564
7978
|
};
|
|
7565
7979
|
}
|
|
7566
|
-
var
|
|
7980
|
+
var error32;
|
|
7567
7981
|
var init_no = __esm({
|
|
7568
7982
|
"../../node_modules/zod/v4/locales/no.js"() {
|
|
7569
7983
|
"use strict";
|
|
7570
7984
|
init_util();
|
|
7571
|
-
|
|
7985
|
+
error32 = () => {
|
|
7572
7986
|
const Sizable = {
|
|
7573
7987
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
7574
7988
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -7676,15 +8090,15 @@ var init_no = __esm({
|
|
|
7676
8090
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
7677
8091
|
function ota_default() {
|
|
7678
8092
|
return {
|
|
7679
|
-
localeError:
|
|
8093
|
+
localeError: error33()
|
|
7680
8094
|
};
|
|
7681
8095
|
}
|
|
7682
|
-
var
|
|
8096
|
+
var error33;
|
|
7683
8097
|
var init_ota = __esm({
|
|
7684
8098
|
"../../node_modules/zod/v4/locales/ota.js"() {
|
|
7685
8099
|
"use strict";
|
|
7686
8100
|
init_util();
|
|
7687
|
-
|
|
8101
|
+
error33 = () => {
|
|
7688
8102
|
const Sizable = {
|
|
7689
8103
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
7690
8104
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -7793,15 +8207,15 @@ var init_ota = __esm({
|
|
|
7793
8207
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
7794
8208
|
function ps_default() {
|
|
7795
8209
|
return {
|
|
7796
|
-
localeError:
|
|
8210
|
+
localeError: error34()
|
|
7797
8211
|
};
|
|
7798
8212
|
}
|
|
7799
|
-
var
|
|
8213
|
+
var error34;
|
|
7800
8214
|
var init_ps = __esm({
|
|
7801
8215
|
"../../node_modules/zod/v4/locales/ps.js"() {
|
|
7802
8216
|
"use strict";
|
|
7803
8217
|
init_util();
|
|
7804
|
-
|
|
8218
|
+
error34 = () => {
|
|
7805
8219
|
const Sizable = {
|
|
7806
8220
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
7807
8221
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -7915,15 +8329,15 @@ var init_ps = __esm({
|
|
|
7915
8329
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
7916
8330
|
function pl_default() {
|
|
7917
8331
|
return {
|
|
7918
|
-
localeError:
|
|
8332
|
+
localeError: error35()
|
|
7919
8333
|
};
|
|
7920
8334
|
}
|
|
7921
|
-
var
|
|
8335
|
+
var error35;
|
|
7922
8336
|
var init_pl = __esm({
|
|
7923
8337
|
"../../node_modules/zod/v4/locales/pl.js"() {
|
|
7924
8338
|
"use strict";
|
|
7925
8339
|
init_util();
|
|
7926
|
-
|
|
8340
|
+
error35 = () => {
|
|
7927
8341
|
const Sizable = {
|
|
7928
8342
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
7929
8343
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8032,27 +8446,144 @@ var init_pl = __esm({
|
|
|
8032
8446
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
8033
8447
|
function pt_default() {
|
|
8034
8448
|
return {
|
|
8035
|
-
localeError:
|
|
8449
|
+
localeError: error36()
|
|
8036
8450
|
};
|
|
8037
8451
|
}
|
|
8038
|
-
var
|
|
8452
|
+
var error36;
|
|
8039
8453
|
var init_pt = __esm({
|
|
8040
8454
|
"../../node_modules/zod/v4/locales/pt.js"() {
|
|
8041
8455
|
"use strict";
|
|
8042
8456
|
init_util();
|
|
8043
|
-
|
|
8457
|
+
error36 = () => {
|
|
8458
|
+
const Sizable = {
|
|
8459
|
+
string: { unit: "caracteres", verb: "ter" },
|
|
8460
|
+
file: { unit: "bytes", verb: "ter" },
|
|
8461
|
+
array: { unit: "itens", verb: "ter" },
|
|
8462
|
+
set: { unit: "itens", verb: "ter" }
|
|
8463
|
+
};
|
|
8464
|
+
function getSizing(origin) {
|
|
8465
|
+
return Sizable[origin] ?? null;
|
|
8466
|
+
}
|
|
8467
|
+
const FormatDictionary = {
|
|
8468
|
+
regex: "padr\xE3o",
|
|
8469
|
+
email: "endere\xE7o de e-mail",
|
|
8470
|
+
url: "URL",
|
|
8471
|
+
emoji: "emoji",
|
|
8472
|
+
uuid: "UUID",
|
|
8473
|
+
uuidv4: "UUIDv4",
|
|
8474
|
+
uuidv6: "UUIDv6",
|
|
8475
|
+
nanoid: "nanoid",
|
|
8476
|
+
guid: "GUID",
|
|
8477
|
+
cuid: "cuid",
|
|
8478
|
+
cuid2: "cuid2",
|
|
8479
|
+
ulid: "ULID",
|
|
8480
|
+
xid: "XID",
|
|
8481
|
+
ksuid: "KSUID",
|
|
8482
|
+
datetime: "data e hora ISO",
|
|
8483
|
+
date: "data ISO",
|
|
8484
|
+
time: "hora ISO",
|
|
8485
|
+
duration: "dura\xE7\xE3o ISO",
|
|
8486
|
+
ipv4: "endere\xE7o IPv4",
|
|
8487
|
+
ipv6: "endere\xE7o IPv6",
|
|
8488
|
+
cidrv4: "faixa de IPv4",
|
|
8489
|
+
cidrv6: "faixa de IPv6",
|
|
8490
|
+
base64: "texto codificado em base64",
|
|
8491
|
+
base64url: "URL codificada em base64",
|
|
8492
|
+
json_string: "texto JSON",
|
|
8493
|
+
e164: "n\xFAmero E.164",
|
|
8494
|
+
jwt: "JWT",
|
|
8495
|
+
template_literal: "entrada"
|
|
8496
|
+
};
|
|
8497
|
+
const TypeDictionary = {
|
|
8498
|
+
nan: "NaN",
|
|
8499
|
+
number: "n\xFAmero",
|
|
8500
|
+
null: "nulo"
|
|
8501
|
+
};
|
|
8502
|
+
return (issue2) => {
|
|
8503
|
+
switch (issue2.code) {
|
|
8504
|
+
case "invalid_type": {
|
|
8505
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8506
|
+
const receivedType = parsedType(issue2.input);
|
|
8507
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8508
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
8509
|
+
return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
|
|
8510
|
+
}
|
|
8511
|
+
return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
|
|
8512
|
+
}
|
|
8513
|
+
case "invalid_value":
|
|
8514
|
+
if (issue2.values.length === 1)
|
|
8515
|
+
return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`;
|
|
8516
|
+
return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`;
|
|
8517
|
+
case "too_big": {
|
|
8518
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
8519
|
+
const sizing = getSizing(issue2.origin);
|
|
8520
|
+
if (sizing)
|
|
8521
|
+
return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
|
|
8522
|
+
return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
|
|
8523
|
+
}
|
|
8524
|
+
case "too_small": {
|
|
8525
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
8526
|
+
const sizing = getSizing(issue2.origin);
|
|
8527
|
+
if (sizing) {
|
|
8528
|
+
return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8529
|
+
}
|
|
8530
|
+
return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
|
|
8531
|
+
}
|
|
8532
|
+
case "invalid_format": {
|
|
8533
|
+
const _issue = issue2;
|
|
8534
|
+
if (_issue.format === "starts_with")
|
|
8535
|
+
return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`;
|
|
8536
|
+
if (_issue.format === "ends_with")
|
|
8537
|
+
return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`;
|
|
8538
|
+
if (_issue.format === "includes")
|
|
8539
|
+
return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`;
|
|
8540
|
+
if (_issue.format === "regex")
|
|
8541
|
+
return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`;
|
|
8542
|
+
return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`;
|
|
8543
|
+
}
|
|
8544
|
+
case "not_multiple_of":
|
|
8545
|
+
return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
|
|
8546
|
+
case "unrecognized_keys":
|
|
8547
|
+
return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
|
|
8548
|
+
case "invalid_key":
|
|
8549
|
+
return `Chave inv\xE1lida em ${issue2.origin}`;
|
|
8550
|
+
case "invalid_union":
|
|
8551
|
+
return "Entrada inv\xE1lida";
|
|
8552
|
+
case "invalid_element":
|
|
8553
|
+
return `Valor inv\xE1lido em ${issue2.origin}`;
|
|
8554
|
+
default:
|
|
8555
|
+
return `Campo inv\xE1lido`;
|
|
8556
|
+
}
|
|
8557
|
+
};
|
|
8558
|
+
};
|
|
8559
|
+
}
|
|
8560
|
+
});
|
|
8561
|
+
|
|
8562
|
+
// ../../node_modules/zod/v4/locales/ro.js
|
|
8563
|
+
function ro_default() {
|
|
8564
|
+
return {
|
|
8565
|
+
localeError: error37()
|
|
8566
|
+
};
|
|
8567
|
+
}
|
|
8568
|
+
var error37;
|
|
8569
|
+
var init_ro = __esm({
|
|
8570
|
+
"../../node_modules/zod/v4/locales/ro.js"() {
|
|
8571
|
+
"use strict";
|
|
8572
|
+
init_util();
|
|
8573
|
+
error37 = () => {
|
|
8044
8574
|
const Sizable = {
|
|
8045
|
-
string: { unit: "
|
|
8046
|
-
file: { unit: "
|
|
8047
|
-
array: { unit: "
|
|
8048
|
-
set: { unit: "
|
|
8575
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
8576
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
8577
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8578
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8579
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
8049
8580
|
};
|
|
8050
8581
|
function getSizing(origin) {
|
|
8051
8582
|
return Sizable[origin] ?? null;
|
|
8052
8583
|
}
|
|
8053
8584
|
const FormatDictionary = {
|
|
8054
|
-
regex: "
|
|
8055
|
-
email: "
|
|
8585
|
+
regex: "intrare",
|
|
8586
|
+
email: "adres\u0103 de email",
|
|
8056
8587
|
url: "URL",
|
|
8057
8588
|
emoji: "emoji",
|
|
8058
8589
|
uuid: "UUID",
|
|
@@ -8065,25 +8596,37 @@ var init_pt = __esm({
|
|
|
8065
8596
|
ulid: "ULID",
|
|
8066
8597
|
xid: "XID",
|
|
8067
8598
|
ksuid: "KSUID",
|
|
8068
|
-
datetime: "
|
|
8069
|
-
date: "
|
|
8070
|
-
time: "
|
|
8071
|
-
duration: "
|
|
8072
|
-
ipv4: "
|
|
8073
|
-
ipv6: "
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8599
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
8600
|
+
date: "dat\u0103 ISO",
|
|
8601
|
+
time: "or\u0103 ISO",
|
|
8602
|
+
duration: "durat\u0103 ISO",
|
|
8603
|
+
ipv4: "adres\u0103 IPv4",
|
|
8604
|
+
ipv6: "adres\u0103 IPv6",
|
|
8605
|
+
mac: "adres\u0103 MAC",
|
|
8606
|
+
cidrv4: "interval IPv4",
|
|
8607
|
+
cidrv6: "interval IPv6",
|
|
8608
|
+
base64: "\u0219ir codat base64",
|
|
8609
|
+
base64url: "\u0219ir codat base64url",
|
|
8610
|
+
json_string: "\u0219ir JSON",
|
|
8611
|
+
e164: "num\u0103r E.164",
|
|
8080
8612
|
jwt: "JWT",
|
|
8081
|
-
template_literal: "
|
|
8613
|
+
template_literal: "intrare"
|
|
8082
8614
|
};
|
|
8083
8615
|
const TypeDictionary = {
|
|
8084
8616
|
nan: "NaN",
|
|
8085
|
-
|
|
8086
|
-
|
|
8617
|
+
string: "\u0219ir",
|
|
8618
|
+
number: "num\u0103r",
|
|
8619
|
+
boolean: "boolean",
|
|
8620
|
+
function: "func\u021Bie",
|
|
8621
|
+
array: "matrice",
|
|
8622
|
+
object: "obiect",
|
|
8623
|
+
undefined: "nedefinit",
|
|
8624
|
+
symbol: "simbol",
|
|
8625
|
+
bigint: "num\u0103r mare",
|
|
8626
|
+
void: "void",
|
|
8627
|
+
never: "never",
|
|
8628
|
+
map: "hart\u0103",
|
|
8629
|
+
set: "set"
|
|
8087
8630
|
};
|
|
8088
8631
|
return (issue2) => {
|
|
8089
8632
|
switch (issue2.code) {
|
|
@@ -8091,54 +8634,52 @@ var init_pt = __esm({
|
|
|
8091
8634
|
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8092
8635
|
const receivedType = parsedType(issue2.input);
|
|
8093
8636
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8094
|
-
|
|
8095
|
-
return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
|
|
8096
|
-
}
|
|
8097
|
-
return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
|
|
8637
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
8098
8638
|
}
|
|
8099
8639
|
case "invalid_value":
|
|
8100
8640
|
if (issue2.values.length === 1)
|
|
8101
|
-
return `
|
|
8102
|
-
return `Op\
|
|
8641
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
8642
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
8103
8643
|
case "too_big": {
|
|
8104
8644
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
8105
8645
|
const sizing = getSizing(issue2.origin);
|
|
8106
8646
|
if (sizing)
|
|
8107
|
-
return `
|
|
8108
|
-
return `
|
|
8647
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
8648
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
8109
8649
|
}
|
|
8110
8650
|
case "too_small": {
|
|
8111
8651
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
8112
8652
|
const sizing = getSizing(issue2.origin);
|
|
8113
8653
|
if (sizing) {
|
|
8114
|
-
return `
|
|
8654
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8115
8655
|
}
|
|
8116
|
-
return `
|
|
8656
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
8117
8657
|
}
|
|
8118
8658
|
case "invalid_format": {
|
|
8119
8659
|
const _issue = issue2;
|
|
8120
|
-
if (_issue.format === "starts_with")
|
|
8121
|
-
return
|
|
8660
|
+
if (_issue.format === "starts_with") {
|
|
8661
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
8662
|
+
}
|
|
8122
8663
|
if (_issue.format === "ends_with")
|
|
8123
|
-
return
|
|
8664
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
8124
8665
|
if (_issue.format === "includes")
|
|
8125
|
-
return
|
|
8666
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
8126
8667
|
if (_issue.format === "regex")
|
|
8127
|
-
return
|
|
8128
|
-
return
|
|
8668
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
8669
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
8129
8670
|
}
|
|
8130
8671
|
case "not_multiple_of":
|
|
8131
|
-
return `
|
|
8672
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
8132
8673
|
case "unrecognized_keys":
|
|
8133
|
-
return `
|
|
8674
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
8134
8675
|
case "invalid_key":
|
|
8135
|
-
return `
|
|
8676
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8136
8677
|
case "invalid_union":
|
|
8137
|
-
return "
|
|
8678
|
+
return "Intrare invalid\u0103";
|
|
8138
8679
|
case "invalid_element":
|
|
8139
|
-
return `
|
|
8680
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8140
8681
|
default:
|
|
8141
|
-
return `
|
|
8682
|
+
return `Intrare invalid\u0103`;
|
|
8142
8683
|
}
|
|
8143
8684
|
};
|
|
8144
8685
|
};
|
|
@@ -8163,15 +8704,15 @@ function getRussianPlural(count, one, few, many) {
|
|
|
8163
8704
|
}
|
|
8164
8705
|
function ru_default() {
|
|
8165
8706
|
return {
|
|
8166
|
-
localeError:
|
|
8707
|
+
localeError: error38()
|
|
8167
8708
|
};
|
|
8168
8709
|
}
|
|
8169
|
-
var
|
|
8710
|
+
var error38;
|
|
8170
8711
|
var init_ru = __esm({
|
|
8171
8712
|
"../../node_modules/zod/v4/locales/ru.js"() {
|
|
8172
8713
|
"use strict";
|
|
8173
8714
|
init_util();
|
|
8174
|
-
|
|
8715
|
+
error38 = () => {
|
|
8175
8716
|
const Sizable = {
|
|
8176
8717
|
string: {
|
|
8177
8718
|
unit: {
|
|
@@ -8312,15 +8853,15 @@ var init_ru = __esm({
|
|
|
8312
8853
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
8313
8854
|
function sl_default() {
|
|
8314
8855
|
return {
|
|
8315
|
-
localeError:
|
|
8856
|
+
localeError: error39()
|
|
8316
8857
|
};
|
|
8317
8858
|
}
|
|
8318
|
-
var
|
|
8859
|
+
var error39;
|
|
8319
8860
|
var init_sl = __esm({
|
|
8320
8861
|
"../../node_modules/zod/v4/locales/sl.js"() {
|
|
8321
8862
|
"use strict";
|
|
8322
8863
|
init_util();
|
|
8323
|
-
|
|
8864
|
+
error39 = () => {
|
|
8324
8865
|
const Sizable = {
|
|
8325
8866
|
string: { unit: "znakov", verb: "imeti" },
|
|
8326
8867
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -8429,15 +8970,15 @@ var init_sl = __esm({
|
|
|
8429
8970
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
8430
8971
|
function sv_default() {
|
|
8431
8972
|
return {
|
|
8432
|
-
localeError:
|
|
8973
|
+
localeError: error40()
|
|
8433
8974
|
};
|
|
8434
8975
|
}
|
|
8435
|
-
var
|
|
8976
|
+
var error40;
|
|
8436
8977
|
var init_sv = __esm({
|
|
8437
8978
|
"../../node_modules/zod/v4/locales/sv.js"() {
|
|
8438
8979
|
"use strict";
|
|
8439
8980
|
init_util();
|
|
8440
|
-
|
|
8981
|
+
error40 = () => {
|
|
8441
8982
|
const Sizable = {
|
|
8442
8983
|
string: { unit: "tecken", verb: "att ha" },
|
|
8443
8984
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -8547,15 +9088,15 @@ var init_sv = __esm({
|
|
|
8547
9088
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
8548
9089
|
function ta_default() {
|
|
8549
9090
|
return {
|
|
8550
|
-
localeError:
|
|
9091
|
+
localeError: error41()
|
|
8551
9092
|
};
|
|
8552
9093
|
}
|
|
8553
|
-
var
|
|
9094
|
+
var error41;
|
|
8554
9095
|
var init_ta = __esm({
|
|
8555
9096
|
"../../node_modules/zod/v4/locales/ta.js"() {
|
|
8556
9097
|
"use strict";
|
|
8557
9098
|
init_util();
|
|
8558
|
-
|
|
9099
|
+
error41 = () => {
|
|
8559
9100
|
const Sizable = {
|
|
8560
9101
|
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" },
|
|
8561
9102
|
file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -8665,15 +9206,15 @@ var init_ta = __esm({
|
|
|
8665
9206
|
// ../../node_modules/zod/v4/locales/th.js
|
|
8666
9207
|
function th_default() {
|
|
8667
9208
|
return {
|
|
8668
|
-
localeError:
|
|
9209
|
+
localeError: error42()
|
|
8669
9210
|
};
|
|
8670
9211
|
}
|
|
8671
|
-
var
|
|
9212
|
+
var error42;
|
|
8672
9213
|
var init_th = __esm({
|
|
8673
9214
|
"../../node_modules/zod/v4/locales/th.js"() {
|
|
8674
9215
|
"use strict";
|
|
8675
9216
|
init_util();
|
|
8676
|
-
|
|
9217
|
+
error42 = () => {
|
|
8677
9218
|
const Sizable = {
|
|
8678
9219
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
8679
9220
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -8783,15 +9324,15 @@ var init_th = __esm({
|
|
|
8783
9324
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
8784
9325
|
function tr_default() {
|
|
8785
9326
|
return {
|
|
8786
|
-
localeError:
|
|
9327
|
+
localeError: error43()
|
|
8787
9328
|
};
|
|
8788
9329
|
}
|
|
8789
|
-
var
|
|
9330
|
+
var error43;
|
|
8790
9331
|
var init_tr = __esm({
|
|
8791
9332
|
"../../node_modules/zod/v4/locales/tr.js"() {
|
|
8792
9333
|
"use strict";
|
|
8793
9334
|
init_util();
|
|
8794
|
-
|
|
9335
|
+
error43 = () => {
|
|
8795
9336
|
const Sizable = {
|
|
8796
9337
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
8797
9338
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -8896,15 +9437,15 @@ var init_tr = __esm({
|
|
|
8896
9437
|
// ../../node_modules/zod/v4/locales/uk.js
|
|
8897
9438
|
function uk_default() {
|
|
8898
9439
|
return {
|
|
8899
|
-
localeError:
|
|
9440
|
+
localeError: error44()
|
|
8900
9441
|
};
|
|
8901
9442
|
}
|
|
8902
|
-
var
|
|
9443
|
+
var error44;
|
|
8903
9444
|
var init_uk = __esm({
|
|
8904
9445
|
"../../node_modules/zod/v4/locales/uk.js"() {
|
|
8905
9446
|
"use strict";
|
|
8906
9447
|
init_util();
|
|
8907
|
-
|
|
9448
|
+
error44 = () => {
|
|
8908
9449
|
const Sizable = {
|
|
8909
9450
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
8910
9451
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9023,15 +9564,15 @@ var init_ua = __esm({
|
|
|
9023
9564
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
9024
9565
|
function ur_default() {
|
|
9025
9566
|
return {
|
|
9026
|
-
localeError:
|
|
9567
|
+
localeError: error45()
|
|
9027
9568
|
};
|
|
9028
9569
|
}
|
|
9029
|
-
var
|
|
9570
|
+
var error45;
|
|
9030
9571
|
var init_ur = __esm({
|
|
9031
9572
|
"../../node_modules/zod/v4/locales/ur.js"() {
|
|
9032
9573
|
"use strict";
|
|
9033
9574
|
init_util();
|
|
9034
|
-
|
|
9575
|
+
error45 = () => {
|
|
9035
9576
|
const Sizable = {
|
|
9036
9577
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9037
9578
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9141,20 +9682,21 @@ var init_ur = __esm({
|
|
|
9141
9682
|
// ../../node_modules/zod/v4/locales/uz.js
|
|
9142
9683
|
function uz_default() {
|
|
9143
9684
|
return {
|
|
9144
|
-
localeError:
|
|
9685
|
+
localeError: error46()
|
|
9145
9686
|
};
|
|
9146
9687
|
}
|
|
9147
|
-
var
|
|
9688
|
+
var error46;
|
|
9148
9689
|
var init_uz = __esm({
|
|
9149
9690
|
"../../node_modules/zod/v4/locales/uz.js"() {
|
|
9150
9691
|
"use strict";
|
|
9151
9692
|
init_util();
|
|
9152
|
-
|
|
9693
|
+
error46 = () => {
|
|
9153
9694
|
const Sizable = {
|
|
9154
9695
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9155
9696
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9156
9697
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9157
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
9698
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9699
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9158
9700
|
};
|
|
9159
9701
|
function getSizing(origin) {
|
|
9160
9702
|
return Sizable[origin] ?? null;
|
|
@@ -9258,15 +9800,15 @@ var init_uz = __esm({
|
|
|
9258
9800
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
9259
9801
|
function vi_default() {
|
|
9260
9802
|
return {
|
|
9261
|
-
localeError:
|
|
9803
|
+
localeError: error47()
|
|
9262
9804
|
};
|
|
9263
9805
|
}
|
|
9264
|
-
var
|
|
9806
|
+
var error47;
|
|
9265
9807
|
var init_vi = __esm({
|
|
9266
9808
|
"../../node_modules/zod/v4/locales/vi.js"() {
|
|
9267
9809
|
"use strict";
|
|
9268
9810
|
init_util();
|
|
9269
|
-
|
|
9811
|
+
error47 = () => {
|
|
9270
9812
|
const Sizable = {
|
|
9271
9813
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9272
9814
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -9374,15 +9916,15 @@ var init_vi = __esm({
|
|
|
9374
9916
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
9375
9917
|
function zh_CN_default() {
|
|
9376
9918
|
return {
|
|
9377
|
-
localeError:
|
|
9919
|
+
localeError: error48()
|
|
9378
9920
|
};
|
|
9379
9921
|
}
|
|
9380
|
-
var
|
|
9922
|
+
var error48;
|
|
9381
9923
|
var init_zh_CN = __esm({
|
|
9382
9924
|
"../../node_modules/zod/v4/locales/zh-CN.js"() {
|
|
9383
9925
|
"use strict";
|
|
9384
9926
|
init_util();
|
|
9385
|
-
|
|
9927
|
+
error48 = () => {
|
|
9386
9928
|
const Sizable = {
|
|
9387
9929
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
9388
9930
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -9491,15 +10033,15 @@ var init_zh_CN = __esm({
|
|
|
9491
10033
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
9492
10034
|
function zh_TW_default() {
|
|
9493
10035
|
return {
|
|
9494
|
-
localeError:
|
|
10036
|
+
localeError: error49()
|
|
9495
10037
|
};
|
|
9496
10038
|
}
|
|
9497
|
-
var
|
|
10039
|
+
var error49;
|
|
9498
10040
|
var init_zh_TW = __esm({
|
|
9499
10041
|
"../../node_modules/zod/v4/locales/zh-TW.js"() {
|
|
9500
10042
|
"use strict";
|
|
9501
10043
|
init_util();
|
|
9502
|
-
|
|
10044
|
+
error49 = () => {
|
|
9503
10045
|
const Sizable = {
|
|
9504
10046
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
9505
10047
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -9606,15 +10148,15 @@ var init_zh_TW = __esm({
|
|
|
9606
10148
|
// ../../node_modules/zod/v4/locales/yo.js
|
|
9607
10149
|
function yo_default() {
|
|
9608
10150
|
return {
|
|
9609
|
-
localeError:
|
|
10151
|
+
localeError: error50()
|
|
9610
10152
|
};
|
|
9611
10153
|
}
|
|
9612
|
-
var
|
|
10154
|
+
var error50;
|
|
9613
10155
|
var init_yo = __esm({
|
|
9614
10156
|
"../../node_modules/zod/v4/locales/yo.js"() {
|
|
9615
10157
|
"use strict";
|
|
9616
10158
|
init_util();
|
|
9617
|
-
|
|
10159
|
+
error50 = () => {
|
|
9618
10160
|
const Sizable = {
|
|
9619
10161
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
9620
10162
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -9729,6 +10271,7 @@ __export(locales_exports, {
|
|
|
9729
10271
|
cs: () => cs_default,
|
|
9730
10272
|
da: () => da_default,
|
|
9731
10273
|
de: () => de_default,
|
|
10274
|
+
el: () => el_default,
|
|
9732
10275
|
en: () => en_default,
|
|
9733
10276
|
eo: () => eo_default,
|
|
9734
10277
|
es: () => es_default,
|
|
@@ -9737,6 +10280,7 @@ __export(locales_exports, {
|
|
|
9737
10280
|
fr: () => fr_default,
|
|
9738
10281
|
frCA: () => fr_CA_default,
|
|
9739
10282
|
he: () => he_default,
|
|
10283
|
+
hr: () => hr_default,
|
|
9740
10284
|
hu: () => hu_default,
|
|
9741
10285
|
hy: () => hy_default,
|
|
9742
10286
|
id: () => id_default,
|
|
@@ -9756,6 +10300,7 @@ __export(locales_exports, {
|
|
|
9756
10300
|
pl: () => pl_default,
|
|
9757
10301
|
ps: () => ps_default,
|
|
9758
10302
|
pt: () => pt_default,
|
|
10303
|
+
ro: () => ro_default,
|
|
9759
10304
|
ru: () => ru_default,
|
|
9760
10305
|
sl: () => sl_default,
|
|
9761
10306
|
sv: () => sv_default,
|
|
@@ -9782,6 +10327,7 @@ var init_locales = __esm({
|
|
|
9782
10327
|
init_cs();
|
|
9783
10328
|
init_da();
|
|
9784
10329
|
init_de();
|
|
10330
|
+
init_el();
|
|
9785
10331
|
init_en();
|
|
9786
10332
|
init_eo();
|
|
9787
10333
|
init_es();
|
|
@@ -9790,6 +10336,7 @@ var init_locales = __esm({
|
|
|
9790
10336
|
init_fr();
|
|
9791
10337
|
init_fr_CA();
|
|
9792
10338
|
init_he();
|
|
10339
|
+
init_hr();
|
|
9793
10340
|
init_hu();
|
|
9794
10341
|
init_hy();
|
|
9795
10342
|
init_id();
|
|
@@ -9809,6 +10356,7 @@ var init_locales = __esm({
|
|
|
9809
10356
|
init_ps();
|
|
9810
10357
|
init_pl();
|
|
9811
10358
|
init_pt();
|
|
10359
|
+
init_ro();
|
|
9812
10360
|
init_ru();
|
|
9813
10361
|
init_sl();
|
|
9814
10362
|
init_sv();
|
|
@@ -9830,7 +10378,7 @@ var init_locales = __esm({
|
|
|
9830
10378
|
function registry() {
|
|
9831
10379
|
return new $ZodRegistry();
|
|
9832
10380
|
}
|
|
9833
|
-
var
|
|
10381
|
+
var _a2, $output, $input, $ZodRegistry, globalRegistry;
|
|
9834
10382
|
var init_registries = __esm({
|
|
9835
10383
|
"../../node_modules/zod/v4/core/registries.js"() {
|
|
9836
10384
|
"use strict";
|
|
@@ -9876,7 +10424,7 @@ var init_registries = __esm({
|
|
|
9876
10424
|
return this._map.has(schema);
|
|
9877
10425
|
}
|
|
9878
10426
|
};
|
|
9879
|
-
(
|
|
10427
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
9880
10428
|
globalRegistry = globalThis.__zod_globalRegistry;
|
|
9881
10429
|
}
|
|
9882
10430
|
});
|
|
@@ -10789,7 +11337,7 @@ function _refine(Class2, fn, _params) {
|
|
|
10789
11337
|
return schema;
|
|
10790
11338
|
}
|
|
10791
11339
|
// @__NO_SIDE_EFFECTS__
|
|
10792
|
-
function _superRefine(fn) {
|
|
11340
|
+
function _superRefine(fn, params) {
|
|
10793
11341
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
10794
11342
|
payload.addIssue = (issue2) => {
|
|
10795
11343
|
if (typeof issue2 === "string") {
|
|
@@ -10806,7 +11354,7 @@ function _superRefine(fn) {
|
|
|
10806
11354
|
}
|
|
10807
11355
|
};
|
|
10808
11356
|
return fn(payload.value, payload);
|
|
10809
|
-
});
|
|
11357
|
+
}, params);
|
|
10810
11358
|
return ch;
|
|
10811
11359
|
}
|
|
10812
11360
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -10953,7 +11501,7 @@ function initializeContext(params) {
|
|
|
10953
11501
|
};
|
|
10954
11502
|
}
|
|
10955
11503
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
10956
|
-
var
|
|
11504
|
+
var _a3;
|
|
10957
11505
|
const def = schema._zod.def;
|
|
10958
11506
|
const seen = ctx.seen.get(schema);
|
|
10959
11507
|
if (seen) {
|
|
@@ -11000,8 +11548,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
11000
11548
|
delete result.schema.examples;
|
|
11001
11549
|
delete result.schema.default;
|
|
11002
11550
|
}
|
|
11003
|
-
if (ctx.io === "input" && result.schema
|
|
11004
|
-
(
|
|
11551
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
11552
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
11005
11553
|
delete result.schema._prefault;
|
|
11006
11554
|
const _result = ctx.seen.get(schema);
|
|
11007
11555
|
return _result.schema;
|
|
@@ -11182,10 +11730,15 @@ function finalize(ctx, schema) {
|
|
|
11182
11730
|
result.$id = ctx.external.uri(id);
|
|
11183
11731
|
}
|
|
11184
11732
|
Object.assign(result, root.def ?? root.schema);
|
|
11733
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
11734
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
11735
|
+
delete result.id;
|
|
11185
11736
|
const defs = ctx.external?.defs ?? {};
|
|
11186
11737
|
for (const entry of ctx.seen.entries()) {
|
|
11187
11738
|
const seen = entry[1];
|
|
11188
11739
|
if (seen.def && seen.defId) {
|
|
11740
|
+
if (seen.def.id === seen.defId)
|
|
11741
|
+
delete seen.def.id;
|
|
11189
11742
|
defs[seen.defId] = seen.def;
|
|
11190
11743
|
}
|
|
11191
11744
|
}
|
|
@@ -11241,6 +11794,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
11241
11794
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11242
11795
|
}
|
|
11243
11796
|
if (def.type === "pipe") {
|
|
11797
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
11798
|
+
return true;
|
|
11244
11799
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11245
11800
|
}
|
|
11246
11801
|
if (def.type === "object") {
|
|
@@ -11377,39 +11932,28 @@ var init_json_schema_processors = __esm({
|
|
|
11377
11932
|
json2.type = "integer";
|
|
11378
11933
|
else
|
|
11379
11934
|
json2.type = "number";
|
|
11380
|
-
|
|
11381
|
-
|
|
11935
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
11936
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
11937
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
11938
|
+
if (exMin) {
|
|
11939
|
+
if (legacy) {
|
|
11382
11940
|
json2.minimum = exclusiveMinimum;
|
|
11383
11941
|
json2.exclusiveMinimum = true;
|
|
11384
11942
|
} else {
|
|
11385
11943
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11386
11944
|
}
|
|
11387
|
-
}
|
|
11388
|
-
if (typeof minimum === "number") {
|
|
11945
|
+
} else if (typeof minimum === "number") {
|
|
11389
11946
|
json2.minimum = minimum;
|
|
11390
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
11391
|
-
if (exclusiveMinimum >= minimum)
|
|
11392
|
-
delete json2.minimum;
|
|
11393
|
-
else
|
|
11394
|
-
delete json2.exclusiveMinimum;
|
|
11395
|
-
}
|
|
11396
11947
|
}
|
|
11397
|
-
if (
|
|
11398
|
-
if (
|
|
11948
|
+
if (exMax) {
|
|
11949
|
+
if (legacy) {
|
|
11399
11950
|
json2.maximum = exclusiveMaximum;
|
|
11400
11951
|
json2.exclusiveMaximum = true;
|
|
11401
11952
|
} else {
|
|
11402
11953
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11403
11954
|
}
|
|
11404
|
-
}
|
|
11405
|
-
if (typeof maximum === "number") {
|
|
11955
|
+
} else if (typeof maximum === "number") {
|
|
11406
11956
|
json2.maximum = maximum;
|
|
11407
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
11408
|
-
if (exclusiveMaximum <= maximum)
|
|
11409
|
-
delete json2.maximum;
|
|
11410
|
-
else
|
|
11411
|
-
delete json2.exclusiveMaximum;
|
|
11412
|
-
}
|
|
11413
11957
|
}
|
|
11414
11958
|
if (typeof multipleOf === "number")
|
|
11415
11959
|
json2.multipleOf = multipleOf;
|
|
@@ -11581,7 +12125,10 @@ var init_json_schema_processors = __esm({
|
|
|
11581
12125
|
if (typeof maximum === "number")
|
|
11582
12126
|
json2.maxItems = maximum;
|
|
11583
12127
|
json2.type = "array";
|
|
11584
|
-
json2.items = process2(def.element, ctx, {
|
|
12128
|
+
json2.items = process2(def.element, ctx, {
|
|
12129
|
+
...params,
|
|
12130
|
+
path: [...params.path, "items"]
|
|
12131
|
+
});
|
|
11585
12132
|
};
|
|
11586
12133
|
objectProcessor = (schema, ctx, _json, params) => {
|
|
11587
12134
|
const json2 = _json;
|
|
@@ -11774,7 +12321,8 @@ var init_json_schema_processors = __esm({
|
|
|
11774
12321
|
};
|
|
11775
12322
|
pipeProcessor = (schema, ctx, _json, params) => {
|
|
11776
12323
|
const def = schema._zod.def;
|
|
11777
|
-
const
|
|
12324
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12325
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
11778
12326
|
process2(innerType, ctx, params);
|
|
11779
12327
|
const seen = ctx.seen.get(schema);
|
|
11780
12328
|
seen.ref = innerType;
|
|
@@ -12019,6 +12567,7 @@ __export(core_exports2, {
|
|
|
12019
12567
|
$ZodOptional: () => $ZodOptional,
|
|
12020
12568
|
$ZodPipe: () => $ZodPipe,
|
|
12021
12569
|
$ZodPrefault: () => $ZodPrefault,
|
|
12570
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
12022
12571
|
$ZodPromise: () => $ZodPromise,
|
|
12023
12572
|
$ZodReadonly: () => $ZodReadonly,
|
|
12024
12573
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -12369,8 +12918,8 @@ var init_errors2 = __esm({
|
|
|
12369
12918
|
}
|
|
12370
12919
|
});
|
|
12371
12920
|
};
|
|
12372
|
-
ZodError = $constructor("ZodError", initializer2);
|
|
12373
|
-
ZodRealError = $constructor("ZodError", initializer2, {
|
|
12921
|
+
ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
12922
|
+
ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12374
12923
|
Parent: Error
|
|
12375
12924
|
});
|
|
12376
12925
|
}
|
|
@@ -12448,6 +12997,7 @@ __export(schemas_exports2, {
|
|
|
12448
12997
|
ZodOptional: () => ZodOptional,
|
|
12449
12998
|
ZodPipe: () => ZodPipe,
|
|
12450
12999
|
ZodPrefault: () => ZodPrefault,
|
|
13000
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
12451
13001
|
ZodPromise: () => ZodPromise,
|
|
12452
13002
|
ZodReadonly: () => ZodReadonly,
|
|
12453
13003
|
ZodRecord: () => ZodRecord,
|
|
@@ -12508,6 +13058,7 @@ __export(schemas_exports2, {
|
|
|
12508
13058
|
int32: () => int32,
|
|
12509
13059
|
int64: () => int64,
|
|
12510
13060
|
intersection: () => intersection,
|
|
13061
|
+
invertCodec: () => invertCodec,
|
|
12511
13062
|
ipv4: () => ipv42,
|
|
12512
13063
|
ipv6: () => ipv62,
|
|
12513
13064
|
json: () => json,
|
|
@@ -12566,6 +13117,42 @@ __export(schemas_exports2, {
|
|
|
12566
13117
|
xid: () => xid2,
|
|
12567
13118
|
xor: () => xor
|
|
12568
13119
|
});
|
|
13120
|
+
function _installLazyMethods(inst, group, methods) {
|
|
13121
|
+
const proto = Object.getPrototypeOf(inst);
|
|
13122
|
+
let installed2 = _installedGroups.get(proto);
|
|
13123
|
+
if (!installed2) {
|
|
13124
|
+
installed2 = /* @__PURE__ */ new Set();
|
|
13125
|
+
_installedGroups.set(proto, installed2);
|
|
13126
|
+
}
|
|
13127
|
+
if (installed2.has(group))
|
|
13128
|
+
return;
|
|
13129
|
+
installed2.add(group);
|
|
13130
|
+
for (const key in methods) {
|
|
13131
|
+
const fn = methods[key];
|
|
13132
|
+
Object.defineProperty(proto, key, {
|
|
13133
|
+
configurable: true,
|
|
13134
|
+
enumerable: false,
|
|
13135
|
+
get() {
|
|
13136
|
+
const bound = fn.bind(this);
|
|
13137
|
+
Object.defineProperty(this, key, {
|
|
13138
|
+
configurable: true,
|
|
13139
|
+
writable: true,
|
|
13140
|
+
enumerable: true,
|
|
13141
|
+
value: bound
|
|
13142
|
+
});
|
|
13143
|
+
return bound;
|
|
13144
|
+
},
|
|
13145
|
+
set(v) {
|
|
13146
|
+
Object.defineProperty(this, key, {
|
|
13147
|
+
configurable: true,
|
|
13148
|
+
writable: true,
|
|
13149
|
+
enumerable: true,
|
|
13150
|
+
value: v
|
|
13151
|
+
});
|
|
13152
|
+
}
|
|
13153
|
+
});
|
|
13154
|
+
}
|
|
13155
|
+
}
|
|
12569
13156
|
function string2(params) {
|
|
12570
13157
|
return _string(ZodString, params);
|
|
12571
13158
|
}
|
|
@@ -12592,7 +13179,7 @@ function url(params) {
|
|
|
12592
13179
|
}
|
|
12593
13180
|
function httpUrl(params) {
|
|
12594
13181
|
return _url(ZodURL, {
|
|
12595
|
-
protocol:
|
|
13182
|
+
protocol: regexes_exports.httpProtocol,
|
|
12596
13183
|
hostname: regexes_exports.domain,
|
|
12597
13184
|
...util_exports.normalizeParams(params)
|
|
12598
13185
|
});
|
|
@@ -12789,6 +13376,14 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
12789
13376
|
});
|
|
12790
13377
|
}
|
|
12791
13378
|
function record(keyType, valueType, params) {
|
|
13379
|
+
if (!valueType || !valueType._zod) {
|
|
13380
|
+
return new ZodRecord({
|
|
13381
|
+
type: "record",
|
|
13382
|
+
keyType: string2(),
|
|
13383
|
+
valueType: keyType,
|
|
13384
|
+
...util_exports.normalizeParams(valueType)
|
|
13385
|
+
});
|
|
13386
|
+
}
|
|
12792
13387
|
return new ZodRecord({
|
|
12793
13388
|
type: "record",
|
|
12794
13389
|
keyType,
|
|
@@ -12940,6 +13535,16 @@ function codec(in_, out, params) {
|
|
|
12940
13535
|
reverseTransform: params.encode
|
|
12941
13536
|
});
|
|
12942
13537
|
}
|
|
13538
|
+
function invertCodec(codec2) {
|
|
13539
|
+
const def = codec2._zod.def;
|
|
13540
|
+
return new ZodCodec({
|
|
13541
|
+
type: "pipe",
|
|
13542
|
+
in: def.out,
|
|
13543
|
+
out: def.in,
|
|
13544
|
+
transform: def.reverseTransform,
|
|
13545
|
+
reverseTransform: def.transform
|
|
13546
|
+
});
|
|
13547
|
+
}
|
|
12943
13548
|
function readonly(innerType) {
|
|
12944
13549
|
return new ZodReadonly({
|
|
12945
13550
|
type: "readonly",
|
|
@@ -12986,8 +13591,8 @@ function custom(fn, _params) {
|
|
|
12986
13591
|
function refine(fn, _params = {}) {
|
|
12987
13592
|
return _refine(ZodCustom, fn, _params);
|
|
12988
13593
|
}
|
|
12989
|
-
function superRefine(fn) {
|
|
12990
|
-
return _superRefine(fn);
|
|
13594
|
+
function superRefine(fn, params) {
|
|
13595
|
+
return _superRefine(fn, params);
|
|
12991
13596
|
}
|
|
12992
13597
|
function _instanceof(cls, params = {}) {
|
|
12993
13598
|
const inst = new ZodCustom({
|
|
@@ -13018,9 +13623,13 @@ function json(params) {
|
|
|
13018
13623
|
return jsonSchema;
|
|
13019
13624
|
}
|
|
13020
13625
|
function preprocess(fn, schema) {
|
|
13021
|
-
return
|
|
13626
|
+
return new ZodPreprocess({
|
|
13627
|
+
type: "pipe",
|
|
13628
|
+
in: transform(fn),
|
|
13629
|
+
out: schema
|
|
13630
|
+
});
|
|
13022
13631
|
}
|
|
13023
|
-
var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool;
|
|
13632
|
+
var _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool;
|
|
13024
13633
|
var init_schemas2 = __esm({
|
|
13025
13634
|
"../../node_modules/zod/v4/classic/schemas.js"() {
|
|
13026
13635
|
"use strict";
|
|
@@ -13031,6 +13640,7 @@ var init_schemas2 = __esm({
|
|
|
13031
13640
|
init_checks2();
|
|
13032
13641
|
init_iso();
|
|
13033
13642
|
init_parse2();
|
|
13643
|
+
_installedGroups = /* @__PURE__ */ new WeakMap();
|
|
13034
13644
|
ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
13035
13645
|
$ZodType.init(inst, def);
|
|
13036
13646
|
Object.assign(inst["~standard"], {
|
|
@@ -13043,23 +13653,6 @@ var init_schemas2 = __esm({
|
|
|
13043
13653
|
inst.def = def;
|
|
13044
13654
|
inst.type = def.type;
|
|
13045
13655
|
Object.defineProperty(inst, "_def", { value: def });
|
|
13046
|
-
inst.check = (...checks) => {
|
|
13047
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
13048
|
-
checks: [
|
|
13049
|
-
...def.checks ?? [],
|
|
13050
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13051
|
-
]
|
|
13052
|
-
}), {
|
|
13053
|
-
parent: true
|
|
13054
|
-
});
|
|
13055
|
-
};
|
|
13056
|
-
inst.with = inst.check;
|
|
13057
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
13058
|
-
inst.brand = () => inst;
|
|
13059
|
-
inst.register = ((reg, meta3) => {
|
|
13060
|
-
reg.add(inst, meta3);
|
|
13061
|
-
return inst;
|
|
13062
|
-
});
|
|
13063
13656
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
13064
13657
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
13065
13658
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -13073,45 +13666,108 @@ var init_schemas2 = __esm({
|
|
|
13073
13666
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
13074
13667
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
13075
13668
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
13076
|
-
inst
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13669
|
+
_installLazyMethods(inst, "ZodType", {
|
|
13670
|
+
check(...chks) {
|
|
13671
|
+
const def2 = this.def;
|
|
13672
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
13673
|
+
checks: [
|
|
13674
|
+
...def2.checks ?? [],
|
|
13675
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
13676
|
+
]
|
|
13677
|
+
}), { parent: true });
|
|
13678
|
+
},
|
|
13679
|
+
with(...chks) {
|
|
13680
|
+
return this.check(...chks);
|
|
13681
|
+
},
|
|
13682
|
+
clone(def2, params) {
|
|
13683
|
+
return clone(this, def2, params);
|
|
13684
|
+
},
|
|
13685
|
+
brand() {
|
|
13686
|
+
return this;
|
|
13687
|
+
},
|
|
13688
|
+
register(reg, meta3) {
|
|
13689
|
+
reg.add(this, meta3);
|
|
13690
|
+
return this;
|
|
13691
|
+
},
|
|
13692
|
+
refine(check2, params) {
|
|
13693
|
+
return this.check(refine(check2, params));
|
|
13694
|
+
},
|
|
13695
|
+
superRefine(refinement, params) {
|
|
13696
|
+
return this.check(superRefine(refinement, params));
|
|
13697
|
+
},
|
|
13698
|
+
overwrite(fn) {
|
|
13699
|
+
return this.check(_overwrite(fn));
|
|
13700
|
+
},
|
|
13701
|
+
optional() {
|
|
13702
|
+
return optional(this);
|
|
13703
|
+
},
|
|
13704
|
+
exactOptional() {
|
|
13705
|
+
return exactOptional(this);
|
|
13706
|
+
},
|
|
13707
|
+
nullable() {
|
|
13708
|
+
return nullable(this);
|
|
13709
|
+
},
|
|
13710
|
+
nullish() {
|
|
13711
|
+
return optional(nullable(this));
|
|
13712
|
+
},
|
|
13713
|
+
nonoptional(params) {
|
|
13714
|
+
return nonoptional(this, params);
|
|
13715
|
+
},
|
|
13716
|
+
array() {
|
|
13717
|
+
return array(this);
|
|
13718
|
+
},
|
|
13719
|
+
or(arg) {
|
|
13720
|
+
return union([this, arg]);
|
|
13721
|
+
},
|
|
13722
|
+
and(arg) {
|
|
13723
|
+
return intersection(this, arg);
|
|
13724
|
+
},
|
|
13725
|
+
transform(tx) {
|
|
13726
|
+
return pipe(this, transform(tx));
|
|
13727
|
+
},
|
|
13728
|
+
default(d) {
|
|
13729
|
+
return _default2(this, d);
|
|
13730
|
+
},
|
|
13731
|
+
prefault(d) {
|
|
13732
|
+
return prefault(this, d);
|
|
13733
|
+
},
|
|
13734
|
+
catch(params) {
|
|
13735
|
+
return _catch2(this, params);
|
|
13736
|
+
},
|
|
13737
|
+
pipe(target) {
|
|
13738
|
+
return pipe(this, target);
|
|
13739
|
+
},
|
|
13740
|
+
readonly() {
|
|
13741
|
+
return readonly(this);
|
|
13742
|
+
},
|
|
13743
|
+
describe(description) {
|
|
13744
|
+
const cl = this.clone();
|
|
13745
|
+
globalRegistry.add(cl, { description });
|
|
13746
|
+
return cl;
|
|
13747
|
+
},
|
|
13748
|
+
meta(...args) {
|
|
13749
|
+
if (args.length === 0)
|
|
13750
|
+
return globalRegistry.get(this);
|
|
13751
|
+
const cl = this.clone();
|
|
13752
|
+
globalRegistry.add(cl, args[0]);
|
|
13753
|
+
return cl;
|
|
13754
|
+
},
|
|
13755
|
+
isOptional() {
|
|
13756
|
+
return this.safeParse(void 0).success;
|
|
13757
|
+
},
|
|
13758
|
+
isNullable() {
|
|
13759
|
+
return this.safeParse(null).success;
|
|
13760
|
+
},
|
|
13761
|
+
apply(fn) {
|
|
13762
|
+
return fn(this);
|
|
13763
|
+
}
|
|
13764
|
+
});
|
|
13098
13765
|
Object.defineProperty(inst, "description", {
|
|
13099
13766
|
get() {
|
|
13100
13767
|
return globalRegistry.get(inst)?.description;
|
|
13101
13768
|
},
|
|
13102
13769
|
configurable: true
|
|
13103
13770
|
});
|
|
13104
|
-
inst.meta = (...args) => {
|
|
13105
|
-
if (args.length === 0) {
|
|
13106
|
-
return globalRegistry.get(inst);
|
|
13107
|
-
}
|
|
13108
|
-
const cl = inst.clone();
|
|
13109
|
-
globalRegistry.add(cl, args[0]);
|
|
13110
|
-
return cl;
|
|
13111
|
-
};
|
|
13112
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
13113
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
13114
|
-
inst.apply = (fn) => fn(inst);
|
|
13115
13771
|
return inst;
|
|
13116
13772
|
});
|
|
13117
13773
|
_ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -13122,21 +13778,53 @@ var init_schemas2 = __esm({
|
|
|
13122
13778
|
inst.format = bag.format ?? null;
|
|
13123
13779
|
inst.minLength = bag.minimum ?? null;
|
|
13124
13780
|
inst.maxLength = bag.maximum ?? null;
|
|
13125
|
-
inst
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13781
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
13782
|
+
regex(...args) {
|
|
13783
|
+
return this.check(_regex(...args));
|
|
13784
|
+
},
|
|
13785
|
+
includes(...args) {
|
|
13786
|
+
return this.check(_includes(...args));
|
|
13787
|
+
},
|
|
13788
|
+
startsWith(...args) {
|
|
13789
|
+
return this.check(_startsWith(...args));
|
|
13790
|
+
},
|
|
13791
|
+
endsWith(...args) {
|
|
13792
|
+
return this.check(_endsWith(...args));
|
|
13793
|
+
},
|
|
13794
|
+
min(...args) {
|
|
13795
|
+
return this.check(_minLength(...args));
|
|
13796
|
+
},
|
|
13797
|
+
max(...args) {
|
|
13798
|
+
return this.check(_maxLength(...args));
|
|
13799
|
+
},
|
|
13800
|
+
length(...args) {
|
|
13801
|
+
return this.check(_length(...args));
|
|
13802
|
+
},
|
|
13803
|
+
nonempty(...args) {
|
|
13804
|
+
return this.check(_minLength(1, ...args));
|
|
13805
|
+
},
|
|
13806
|
+
lowercase(params) {
|
|
13807
|
+
return this.check(_lowercase(params));
|
|
13808
|
+
},
|
|
13809
|
+
uppercase(params) {
|
|
13810
|
+
return this.check(_uppercase(params));
|
|
13811
|
+
},
|
|
13812
|
+
trim() {
|
|
13813
|
+
return this.check(_trim());
|
|
13814
|
+
},
|
|
13815
|
+
normalize(...args) {
|
|
13816
|
+
return this.check(_normalize(...args));
|
|
13817
|
+
},
|
|
13818
|
+
toLowerCase() {
|
|
13819
|
+
return this.check(_toLowerCase());
|
|
13820
|
+
},
|
|
13821
|
+
toUpperCase() {
|
|
13822
|
+
return this.check(_toUpperCase());
|
|
13823
|
+
},
|
|
13824
|
+
slugify() {
|
|
13825
|
+
return this.check(_slugify());
|
|
13826
|
+
}
|
|
13827
|
+
});
|
|
13140
13828
|
});
|
|
13141
13829
|
ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
13142
13830
|
$ZodString.init(inst, def);
|
|
@@ -13261,21 +13949,53 @@ var init_schemas2 = __esm({
|
|
|
13261
13949
|
$ZodNumber.init(inst, def);
|
|
13262
13950
|
ZodType.init(inst, def);
|
|
13263
13951
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
13264
|
-
inst
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13952
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13953
|
+
gt(value, params) {
|
|
13954
|
+
return this.check(_gt(value, params));
|
|
13955
|
+
},
|
|
13956
|
+
gte(value, params) {
|
|
13957
|
+
return this.check(_gte(value, params));
|
|
13958
|
+
},
|
|
13959
|
+
min(value, params) {
|
|
13960
|
+
return this.check(_gte(value, params));
|
|
13961
|
+
},
|
|
13962
|
+
lt(value, params) {
|
|
13963
|
+
return this.check(_lt(value, params));
|
|
13964
|
+
},
|
|
13965
|
+
lte(value, params) {
|
|
13966
|
+
return this.check(_lte(value, params));
|
|
13967
|
+
},
|
|
13968
|
+
max(value, params) {
|
|
13969
|
+
return this.check(_lte(value, params));
|
|
13970
|
+
},
|
|
13971
|
+
int(params) {
|
|
13972
|
+
return this.check(int(params));
|
|
13973
|
+
},
|
|
13974
|
+
safe(params) {
|
|
13975
|
+
return this.check(int(params));
|
|
13976
|
+
},
|
|
13977
|
+
positive(params) {
|
|
13978
|
+
return this.check(_gt(0, params));
|
|
13979
|
+
},
|
|
13980
|
+
nonnegative(params) {
|
|
13981
|
+
return this.check(_gte(0, params));
|
|
13982
|
+
},
|
|
13983
|
+
negative(params) {
|
|
13984
|
+
return this.check(_lt(0, params));
|
|
13985
|
+
},
|
|
13986
|
+
nonpositive(params) {
|
|
13987
|
+
return this.check(_lte(0, params));
|
|
13988
|
+
},
|
|
13989
|
+
multipleOf(value, params) {
|
|
13990
|
+
return this.check(_multipleOf(value, params));
|
|
13991
|
+
},
|
|
13992
|
+
step(value, params) {
|
|
13993
|
+
return this.check(_multipleOf(value, params));
|
|
13994
|
+
},
|
|
13995
|
+
finite() {
|
|
13996
|
+
return this;
|
|
13997
|
+
}
|
|
13998
|
+
});
|
|
13279
13999
|
const bag = inst._zod.bag;
|
|
13280
14000
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
13281
14001
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -13368,11 +14088,23 @@ var init_schemas2 = __esm({
|
|
|
13368
14088
|
ZodType.init(inst, def);
|
|
13369
14089
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
13370
14090
|
inst.element = def.element;
|
|
13371
|
-
inst
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
14091
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
14092
|
+
min(n, params) {
|
|
14093
|
+
return this.check(_minLength(n, params));
|
|
14094
|
+
},
|
|
14095
|
+
nonempty(params) {
|
|
14096
|
+
return this.check(_minLength(1, params));
|
|
14097
|
+
},
|
|
14098
|
+
max(n, params) {
|
|
14099
|
+
return this.check(_maxLength(n, params));
|
|
14100
|
+
},
|
|
14101
|
+
length(n, params) {
|
|
14102
|
+
return this.check(_length(n, params));
|
|
14103
|
+
},
|
|
14104
|
+
unwrap() {
|
|
14105
|
+
return this.element;
|
|
14106
|
+
}
|
|
14107
|
+
});
|
|
13376
14108
|
});
|
|
13377
14109
|
ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
13378
14110
|
$ZodObjectJIT.init(inst, def);
|
|
@@ -13381,23 +14113,47 @@ var init_schemas2 = __esm({
|
|
|
13381
14113
|
util_exports.defineLazy(inst, "shape", () => {
|
|
13382
14114
|
return def.shape;
|
|
13383
14115
|
});
|
|
13384
|
-
inst
|
|
13385
|
-
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13399
|
-
|
|
13400
|
-
|
|
14116
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
14117
|
+
keyof() {
|
|
14118
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
14119
|
+
},
|
|
14120
|
+
catchall(catchall) {
|
|
14121
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
14122
|
+
},
|
|
14123
|
+
passthrough() {
|
|
14124
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14125
|
+
},
|
|
14126
|
+
loose() {
|
|
14127
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
14128
|
+
},
|
|
14129
|
+
strict() {
|
|
14130
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
14131
|
+
},
|
|
14132
|
+
strip() {
|
|
14133
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
14134
|
+
},
|
|
14135
|
+
extend(incoming) {
|
|
14136
|
+
return util_exports.extend(this, incoming);
|
|
14137
|
+
},
|
|
14138
|
+
safeExtend(incoming) {
|
|
14139
|
+
return util_exports.safeExtend(this, incoming);
|
|
14140
|
+
},
|
|
14141
|
+
merge(other) {
|
|
14142
|
+
return util_exports.merge(this, other);
|
|
14143
|
+
},
|
|
14144
|
+
pick(mask) {
|
|
14145
|
+
return util_exports.pick(this, mask);
|
|
14146
|
+
},
|
|
14147
|
+
omit(mask) {
|
|
14148
|
+
return util_exports.omit(this, mask);
|
|
14149
|
+
},
|
|
14150
|
+
partial(...args) {
|
|
14151
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
14152
|
+
},
|
|
14153
|
+
required(...args) {
|
|
14154
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
14155
|
+
}
|
|
14156
|
+
});
|
|
13401
14157
|
});
|
|
13402
14158
|
ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
13403
14159
|
$ZodUnion.init(inst, def);
|
|
@@ -13541,10 +14297,12 @@ var init_schemas2 = __esm({
|
|
|
13541
14297
|
if (output instanceof Promise) {
|
|
13542
14298
|
return output.then((output2) => {
|
|
13543
14299
|
payload.value = output2;
|
|
14300
|
+
payload.fallback = true;
|
|
13544
14301
|
return payload;
|
|
13545
14302
|
});
|
|
13546
14303
|
}
|
|
13547
14304
|
payload.value = output;
|
|
14305
|
+
payload.fallback = true;
|
|
13548
14306
|
return payload;
|
|
13549
14307
|
};
|
|
13550
14308
|
});
|
|
@@ -13614,6 +14372,10 @@ var init_schemas2 = __esm({
|
|
|
13614
14372
|
ZodPipe.init(inst, def);
|
|
13615
14373
|
$ZodCodec.init(inst, def);
|
|
13616
14374
|
});
|
|
14375
|
+
ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
14376
|
+
ZodPipe.init(inst, def);
|
|
14377
|
+
$ZodPreprocess.init(inst, def);
|
|
14378
|
+
});
|
|
13617
14379
|
ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13618
14380
|
$ZodReadonly.init(inst, def);
|
|
13619
14381
|
ZodType.init(inst, def);
|
|
@@ -13671,7 +14433,6 @@ var init_compat = __esm({
|
|
|
13671
14433
|
"../../node_modules/zod/v4/classic/compat.js"() {
|
|
13672
14434
|
"use strict";
|
|
13673
14435
|
init_core2();
|
|
13674
|
-
init_core2();
|
|
13675
14436
|
ZodIssueCode = {
|
|
13676
14437
|
invalid_type: "invalid_type",
|
|
13677
14438
|
too_big: "too_big",
|
|
@@ -14006,12 +14767,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
14006
14767
|
default:
|
|
14007
14768
|
throw new Error(`Unsupported type: ${type}`);
|
|
14008
14769
|
}
|
|
14009
|
-
if (schema.description) {
|
|
14010
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
14011
|
-
}
|
|
14012
|
-
if (schema.default !== void 0) {
|
|
14013
|
-
zodSchema = zodSchema.default(schema.default);
|
|
14014
|
-
}
|
|
14015
14770
|
return zodSchema;
|
|
14016
14771
|
}
|
|
14017
14772
|
function convertSchema(schema, ctx) {
|
|
@@ -14048,6 +14803,9 @@ function convertSchema(schema, ctx) {
|
|
|
14048
14803
|
if (schema.readOnly === true) {
|
|
14049
14804
|
baseSchema = z.readonly(baseSchema);
|
|
14050
14805
|
}
|
|
14806
|
+
if (schema.default !== void 0) {
|
|
14807
|
+
baseSchema = baseSchema.default(schema.default);
|
|
14808
|
+
}
|
|
14051
14809
|
const extraMeta = {};
|
|
14052
14810
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
14053
14811
|
for (const key of coreMetadataKeys) {
|
|
@@ -14069,23 +14827,32 @@ function convertSchema(schema, ctx) {
|
|
|
14069
14827
|
if (Object.keys(extraMeta).length > 0) {
|
|
14070
14828
|
ctx.registry.add(baseSchema, extraMeta);
|
|
14071
14829
|
}
|
|
14830
|
+
if (schema.description) {
|
|
14831
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
14832
|
+
}
|
|
14072
14833
|
return baseSchema;
|
|
14073
14834
|
}
|
|
14074
14835
|
function fromJSONSchema(schema, params) {
|
|
14075
14836
|
if (typeof schema === "boolean") {
|
|
14076
14837
|
return schema ? z.any() : z.never();
|
|
14077
14838
|
}
|
|
14078
|
-
|
|
14079
|
-
|
|
14839
|
+
let normalized;
|
|
14840
|
+
try {
|
|
14841
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
14842
|
+
} catch {
|
|
14843
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
14844
|
+
}
|
|
14845
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
14846
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
14080
14847
|
const ctx = {
|
|
14081
14848
|
version: version2,
|
|
14082
14849
|
defs,
|
|
14083
14850
|
refs: /* @__PURE__ */ new Map(),
|
|
14084
14851
|
processing: /* @__PURE__ */ new Set(),
|
|
14085
|
-
rootSchema:
|
|
14852
|
+
rootSchema: normalized,
|
|
14086
14853
|
registry: params?.registry ?? globalRegistry
|
|
14087
14854
|
};
|
|
14088
|
-
return convertSchema(
|
|
14855
|
+
return convertSchema(normalized, ctx);
|
|
14089
14856
|
}
|
|
14090
14857
|
var z, RECOGNIZED_KEYS;
|
|
14091
14858
|
var init_from_json_schema = __esm({
|
|
@@ -14268,6 +15035,7 @@ __export(external_exports, {
|
|
|
14268
15035
|
ZodOptional: () => ZodOptional,
|
|
14269
15036
|
ZodPipe: () => ZodPipe,
|
|
14270
15037
|
ZodPrefault: () => ZodPrefault,
|
|
15038
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
14271
15039
|
ZodPromise: () => ZodPromise,
|
|
14272
15040
|
ZodReadonly: () => ZodReadonly,
|
|
14273
15041
|
ZodRealError: () => ZodRealError,
|
|
@@ -14346,6 +15114,7 @@ __export(external_exports, {
|
|
|
14346
15114
|
int32: () => int32,
|
|
14347
15115
|
int64: () => int64,
|
|
14348
15116
|
intersection: () => intersection,
|
|
15117
|
+
invertCodec: () => invertCodec,
|
|
14349
15118
|
ipv4: () => ipv42,
|
|
14350
15119
|
ipv6: () => ipv62,
|
|
14351
15120
|
iso: () => iso_exports,
|
|
@@ -14784,6 +15553,9 @@ var init_dist = __esm({
|
|
|
14784
15553
|
SIDE_EFFECT_FIELD_TIMEZONE: "glasstrace.side_effect.field.timezone",
|
|
14785
15554
|
SIDE_EFFECT_FIELD_STATUS: "glasstrace.side_effect.field.status",
|
|
14786
15555
|
SIDE_EFFECT_FIELD_PHASE: "glasstrace.side_effect.field.phase",
|
|
15556
|
+
SIDE_EFFECT_FIELD_RECIPIENT_CLASS: "glasstrace.side_effect.field.recipientClass",
|
|
15557
|
+
SIDE_EFFECT_FIELD_PARTICIPANT_COUNT: "glasstrace.side_effect.field.participantCount",
|
|
15558
|
+
SIDE_EFFECT_FIELD_ACTIVE_PARTICIPANT_COUNT: "glasstrace.side_effect.field.activeParticipantCount",
|
|
14787
15559
|
// Omission reason attributes — one per allowlisted reason. The
|
|
14788
15560
|
// attribute value carries an integer count; the rejected value is
|
|
14789
15561
|
// never echoed.
|
|
@@ -15078,8 +15850,8 @@ var init_semver = __esm({
|
|
|
15078
15850
|
|
|
15079
15851
|
// ../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
|
|
15080
15852
|
function registerGlobal(type, instance, diag3, allowOverride = false) {
|
|
15081
|
-
var
|
|
15082
|
-
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (
|
|
15853
|
+
var _a3;
|
|
15854
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
|
|
15083
15855
|
version: VERSION
|
|
15084
15856
|
};
|
|
15085
15857
|
if (!allowOverride && api[type]) {
|
|
@@ -15097,8 +15869,8 @@ function registerGlobal(type, instance, diag3, allowOverride = false) {
|
|
|
15097
15869
|
return true;
|
|
15098
15870
|
}
|
|
15099
15871
|
function getGlobal(type) {
|
|
15100
|
-
var
|
|
15101
|
-
const globalVersion = (
|
|
15872
|
+
var _a3, _b;
|
|
15873
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version;
|
|
15102
15874
|
if (!globalVersion || !isCompatible(globalVersion)) {
|
|
15103
15875
|
return;
|
|
15104
15876
|
}
|
|
@@ -15240,10 +16012,10 @@ var init_diag = __esm({
|
|
|
15240
16012
|
}
|
|
15241
16013
|
const self2 = this;
|
|
15242
16014
|
const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
|
|
15243
|
-
var
|
|
16015
|
+
var _a3, _b, _c;
|
|
15244
16016
|
if (logger === self2) {
|
|
15245
16017
|
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
15246
|
-
self2.error((
|
|
16018
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message);
|
|
15247
16019
|
return false;
|
|
15248
16020
|
}
|
|
15249
16021
|
if (typeof optionsOrLogLevel === "number") {
|
|
@@ -15784,8 +16556,8 @@ function setSpanContext(context2, spanContext) {
|
|
|
15784
16556
|
return setSpan(context2, new NonRecordingSpan(spanContext));
|
|
15785
16557
|
}
|
|
15786
16558
|
function getSpanContext(context2) {
|
|
15787
|
-
var
|
|
15788
|
-
return (
|
|
16559
|
+
var _a3;
|
|
16560
|
+
return (_a3 = getSpan(context2)) === null || _a3 === void 0 ? void 0 : _a3.spanContext();
|
|
15789
16561
|
}
|
|
15790
16562
|
var SPAN_KEY;
|
|
15791
16563
|
var init_context_utils = __esm({
|
|
@@ -16053,12 +16825,12 @@ var init_ProxyTracerProvider = __esm({
|
|
|
16053
16825
|
* Get a {@link ProxyTracer}
|
|
16054
16826
|
*/
|
|
16055
16827
|
getTracer(name, version2, options) {
|
|
16056
|
-
var
|
|
16057
|
-
return (
|
|
16828
|
+
var _a3;
|
|
16829
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version2, options);
|
|
16058
16830
|
}
|
|
16059
16831
|
getDelegate() {
|
|
16060
|
-
var
|
|
16061
|
-
return (
|
|
16832
|
+
var _a3;
|
|
16833
|
+
return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER;
|
|
16062
16834
|
}
|
|
16063
16835
|
/**
|
|
16064
16836
|
* Set the delegate tracer provider
|
|
@@ -16067,8 +16839,8 @@ var init_ProxyTracerProvider = __esm({
|
|
|
16067
16839
|
this._delegate = delegate;
|
|
16068
16840
|
}
|
|
16069
16841
|
getDelegateTracer(name, version2, options) {
|
|
16070
|
-
var
|
|
16071
|
-
return (
|
|
16842
|
+
var _a3;
|
|
16843
|
+
return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version2, options);
|
|
16072
16844
|
}
|
|
16073
16845
|
};
|
|
16074
16846
|
}
|
|
@@ -18293,9 +19065,9 @@ async function sendInitRequest(config2, anonKey, sdkVersion, importGraph, health
|
|
|
18293
19065
|
});
|
|
18294
19066
|
} catch (err) {
|
|
18295
19067
|
if (err instanceof HttpsStatusError) {
|
|
18296
|
-
const
|
|
18297
|
-
|
|
18298
|
-
throw
|
|
19068
|
+
const error51 = new Error(`Init request failed with status ${err.status}`);
|
|
19069
|
+
error51.status = err.status;
|
|
19070
|
+
throw error51;
|
|
18299
19071
|
}
|
|
18300
19072
|
if (err instanceof HttpsBodyParseError) {
|
|
18301
19073
|
const cause = err.cause;
|
|
@@ -20349,7 +21121,7 @@ function getStringFromEnv(key) {
|
|
|
20349
21121
|
}
|
|
20350
21122
|
|
|
20351
21123
|
// ../../node_modules/@opentelemetry/core/build/esm/version.js
|
|
20352
|
-
var VERSION2 = "2.7.
|
|
21124
|
+
var VERSION2 = "2.7.1";
|
|
20353
21125
|
|
|
20354
21126
|
// ../../node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js
|
|
20355
21127
|
var ATTR_EXCEPTION_MESSAGE = "exception.message";
|
|
@@ -21217,7 +21989,7 @@ function parseRetryAfterToMills(retryAfter) {
|
|
|
21217
21989
|
}
|
|
21218
21990
|
|
|
21219
21991
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js
|
|
21220
|
-
var VERSION3 = "0.
|
|
21992
|
+
var VERSION3 = "0.218.0";
|
|
21221
21993
|
|
|
21222
21994
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-transport-utils.js
|
|
21223
21995
|
var DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION3}`;
|
|
@@ -21231,14 +22003,11 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
|
|
|
21231
22003
|
headers["User-Agent"] = DEFAULT_USER_AGENT;
|
|
21232
22004
|
}
|
|
21233
22005
|
const options = {
|
|
21234
|
-
hostname: parsedUrl.hostname,
|
|
21235
|
-
port: parsedUrl.port,
|
|
21236
|
-
path: parsedUrl.pathname,
|
|
21237
22006
|
method: "POST",
|
|
21238
22007
|
headers,
|
|
21239
22008
|
agent
|
|
21240
22009
|
};
|
|
21241
|
-
const req = request(options, (res) => {
|
|
22010
|
+
const req = request(parsedUrl, options, (res) => {
|
|
21242
22011
|
const responseData = [];
|
|
21243
22012
|
let responseSize = 0;
|
|
21244
22013
|
res.on("data", (chunk) => {
|
|
@@ -21263,14 +22032,14 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
|
|
|
21263
22032
|
retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
|
|
21264
22033
|
});
|
|
21265
22034
|
} else {
|
|
21266
|
-
const
|
|
22035
|
+
const error51 = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
|
|
21267
22036
|
resolve3({
|
|
21268
22037
|
status: "failure",
|
|
21269
|
-
error:
|
|
22038
|
+
error: error51
|
|
21270
22039
|
});
|
|
21271
22040
|
}
|
|
21272
22041
|
});
|
|
21273
|
-
res.on("error", (
|
|
22042
|
+
res.on("error", (error51) => {
|
|
21274
22043
|
if (res.statusCode && res.statusCode <= 299) {
|
|
21275
22044
|
resolve3({
|
|
21276
22045
|
status: "success"
|
|
@@ -21278,13 +22047,13 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
|
|
|
21278
22047
|
} else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
|
|
21279
22048
|
resolve3({
|
|
21280
22049
|
status: "retryable",
|
|
21281
|
-
error:
|
|
22050
|
+
error: error51,
|
|
21282
22051
|
retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
|
|
21283
22052
|
});
|
|
21284
22053
|
} else {
|
|
21285
22054
|
resolve3({
|
|
21286
22055
|
status: "failure",
|
|
21287
|
-
error:
|
|
22056
|
+
error: error51
|
|
21288
22057
|
});
|
|
21289
22058
|
}
|
|
21290
22059
|
});
|
|
@@ -21296,23 +22065,23 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
|
|
|
21296
22065
|
error: new Error("Request timed out")
|
|
21297
22066
|
});
|
|
21298
22067
|
});
|
|
21299
|
-
req.on("error", (
|
|
21300
|
-
if (isHttpTransportNetworkErrorRetryable(
|
|
22068
|
+
req.on("error", (error51) => {
|
|
22069
|
+
if (isHttpTransportNetworkErrorRetryable(error51)) {
|
|
21301
22070
|
resolve3({
|
|
21302
22071
|
status: "retryable",
|
|
21303
|
-
error:
|
|
22072
|
+
error: error51
|
|
21304
22073
|
});
|
|
21305
22074
|
} else {
|
|
21306
22075
|
resolve3({
|
|
21307
22076
|
status: "failure",
|
|
21308
|
-
error:
|
|
22077
|
+
error: error51
|
|
21309
22078
|
});
|
|
21310
22079
|
}
|
|
21311
22080
|
});
|
|
21312
|
-
compressAndSend(req, compression, data, (
|
|
22081
|
+
compressAndSend(req, compression, data, (error51) => {
|
|
21313
22082
|
resolve3({
|
|
21314
22083
|
status: "failure",
|
|
21315
|
-
error:
|
|
22084
|
+
error: error51
|
|
21316
22085
|
});
|
|
21317
22086
|
});
|
|
21318
22087
|
});
|
|
@@ -21331,7 +22100,7 @@ function readableFromUint8Array(buff) {
|
|
|
21331
22100
|
readable.push(null);
|
|
21332
22101
|
return readable;
|
|
21333
22102
|
}
|
|
21334
|
-
function isHttpTransportNetworkErrorRetryable(
|
|
22103
|
+
function isHttpTransportNetworkErrorRetryable(error51) {
|
|
21335
22104
|
const RETRYABLE_NETWORK_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
21336
22105
|
"ECONNRESET",
|
|
21337
22106
|
"ECONNREFUSED",
|
|
@@ -21342,8 +22111,8 @@ function isHttpTransportNetworkErrorRetryable(error48) {
|
|
|
21342
22111
|
"ENETUNREACH",
|
|
21343
22112
|
"EHOSTUNREACH"
|
|
21344
22113
|
]);
|
|
21345
|
-
if ("code" in
|
|
21346
|
-
return RETRYABLE_NETWORK_ERROR_CODES.has(
|
|
22114
|
+
if ("code" in error51 && typeof error51.code === "string") {
|
|
22115
|
+
return RETRYABLE_NETWORK_ERROR_CODES.has(error51.code);
|
|
21347
22116
|
}
|
|
21348
22117
|
return false;
|
|
21349
22118
|
}
|
|
@@ -21949,8 +22718,8 @@ var SpanImpl = class {
|
|
|
21949
22718
|
}
|
|
21950
22719
|
_isSpanEnded() {
|
|
21951
22720
|
if (this._ended) {
|
|
21952
|
-
const
|
|
21953
|
-
diag2.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,
|
|
22721
|
+
const error51 = new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);
|
|
22722
|
+
diag2.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`, error51);
|
|
21954
22723
|
}
|
|
21955
22724
|
return this._ended;
|
|
21956
22725
|
}
|
|
@@ -22090,9 +22859,13 @@ var TraceIdRatioBasedSampler = class {
|
|
|
22090
22859
|
}
|
|
22091
22860
|
_accumulate(traceId) {
|
|
22092
22861
|
let accumulation = 0;
|
|
22093
|
-
for (let i = 0; i <
|
|
22094
|
-
|
|
22095
|
-
|
|
22862
|
+
for (let i = 0; i < 32; i += 8) {
|
|
22863
|
+
let part = 0;
|
|
22864
|
+
for (let j = 0; j < 8; j++) {
|
|
22865
|
+
const c = traceId.charCodeAt(i + j);
|
|
22866
|
+
const v = c < 58 ? c - 48 : c < 71 ? c - 55 : c - 87;
|
|
22867
|
+
part = part << 4 | v;
|
|
22868
|
+
}
|
|
22096
22869
|
accumulation = (accumulation ^ part) >>> 0;
|
|
22097
22870
|
}
|
|
22098
22871
|
return accumulation;
|
|
@@ -22453,7 +23226,7 @@ function samplingDecisionToString(decision) {
|
|
|
22453
23226
|
}
|
|
22454
23227
|
|
|
22455
23228
|
// ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js
|
|
22456
|
-
var VERSION4 = "2.7.
|
|
23229
|
+
var VERSION4 = "2.7.1";
|
|
22457
23230
|
|
|
22458
23231
|
// ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js
|
|
22459
23232
|
var Tracer = class {
|
|
@@ -22587,8 +23360,8 @@ var MultiSpanProcessor = class {
|
|
|
22587
23360
|
return new Promise((resolve3) => {
|
|
22588
23361
|
Promise.all(promises).then(() => {
|
|
22589
23362
|
resolve3();
|
|
22590
|
-
}).catch((
|
|
22591
|
-
globalErrorHandler(
|
|
23363
|
+
}).catch((error51) => {
|
|
23364
|
+
globalErrorHandler(error51 || new Error("MultiSpanProcessor: forceFlush failed"));
|
|
22592
23365
|
resolve3();
|
|
22593
23366
|
});
|
|
22594
23367
|
});
|
|
@@ -22670,10 +23443,10 @@ var BasicTracerProvider = class {
|
|
|
22670
23443
|
state = ForceFlushState.resolved;
|
|
22671
23444
|
resolve3(state);
|
|
22672
23445
|
}
|
|
22673
|
-
}).catch((
|
|
23446
|
+
}).catch((error51) => {
|
|
22674
23447
|
clearTimeout(timeoutInterval);
|
|
22675
23448
|
state = ForceFlushState.error;
|
|
22676
|
-
resolve3(
|
|
23449
|
+
resolve3(error51);
|
|
22677
23450
|
});
|
|
22678
23451
|
});
|
|
22679
23452
|
});
|
|
@@ -22685,7 +23458,7 @@ var BasicTracerProvider = class {
|
|
|
22685
23458
|
} else {
|
|
22686
23459
|
resolve3();
|
|
22687
23460
|
}
|
|
22688
|
-
}).catch((
|
|
23461
|
+
}).catch((error51) => reject([error51]));
|
|
22689
23462
|
});
|
|
22690
23463
|
}
|
|
22691
23464
|
shutdown() {
|
|
@@ -23449,9 +24222,14 @@ function isEndMarkerLine(line) {
|
|
|
23449
24222
|
// src/agent-detection/upgrade-notice.ts
|
|
23450
24223
|
var warningEmitted = false;
|
|
23451
24224
|
var AGENT_INSTRUCTION_FILES = [
|
|
24225
|
+
"AGENTS.md",
|
|
23452
24226
|
"CLAUDE.md",
|
|
24227
|
+
"GEMINI.md",
|
|
24228
|
+
".cursor/rules/glasstrace.mdc",
|
|
24229
|
+
".windsurf/rules/glasstrace.md",
|
|
24230
|
+
".cursorrules",
|
|
23453
24231
|
"codex.md",
|
|
23454
|
-
".
|
|
24232
|
+
".windsurfrules"
|
|
23455
24233
|
];
|
|
23456
24234
|
function parseSemver(input) {
|
|
23457
24235
|
const plusIdx = input.indexOf("+");
|
|
@@ -23612,11 +24390,11 @@ function registerGlasstrace(options) {
|
|
|
23612
24390
|
setCoreState(CoreState.REGISTERING);
|
|
23613
24391
|
maybeWarnStaleAgentInstructions({
|
|
23614
24392
|
projectRoot: process.cwd(),
|
|
23615
|
-
sdkVersion: "1.
|
|
24393
|
+
sdkVersion: "1.12.0"
|
|
23616
24394
|
});
|
|
23617
24395
|
startRuntimeStateWriter({
|
|
23618
24396
|
projectRoot: process.cwd(),
|
|
23619
|
-
sdkVersion: "1.
|
|
24397
|
+
sdkVersion: "1.12.0"
|
|
23620
24398
|
});
|
|
23621
24399
|
const config2 = resolveConfig(options);
|
|
23622
24400
|
if (config2.verbose) {
|
|
@@ -23783,8 +24561,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
23783
24561
|
if (config2.verbose) {
|
|
23784
24562
|
console.info("[glasstrace] Background init firing.");
|
|
23785
24563
|
}
|
|
23786
|
-
const healthReport = collectHealthReport("1.
|
|
23787
|
-
const initResult = await performInit(config2, anonKeyForInit, "1.
|
|
24564
|
+
const healthReport = collectHealthReport("1.12.0");
|
|
24565
|
+
const initResult = await performInit(config2, anonKeyForInit, "1.12.0", healthReport);
|
|
23788
24566
|
if (generation !== registrationGeneration) return;
|
|
23789
24567
|
const currentState = getCoreState();
|
|
23790
24568
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -23807,7 +24585,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
23807
24585
|
}
|
|
23808
24586
|
maybeInstallConsoleCapture();
|
|
23809
24587
|
if (didLastInitSucceed()) {
|
|
23810
|
-
startHeartbeat(config2, anonKeyForInit, "1.
|
|
24588
|
+
startHeartbeat(config2, anonKeyForInit, "1.12.0", generation, (newApiKey, accountId) => {
|
|
23811
24589
|
setAuthState(AuthState.CLAIMING);
|
|
23812
24590
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
23813
24591
|
setResolvedApiKey(newApiKey);
|
|
@@ -23955,8 +24733,8 @@ async function handleSourceMapUpload(distDir) {
|
|
|
23955
24733
|
console.info(
|
|
23956
24734
|
`[glasstrace] Uploaded ${String(files.length)} source map(s) for build ${buildHash}.`
|
|
23957
24735
|
);
|
|
23958
|
-
} catch (
|
|
23959
|
-
const message =
|
|
24736
|
+
} catch (error51) {
|
|
24737
|
+
const message = error51 instanceof Error ? error51.message : "Unknown error";
|
|
23960
24738
|
console.warn(
|
|
23961
24739
|
`[glasstrace] Source map upload failed: ${message}. Build continues normally.`
|
|
23962
24740
|
);
|
|
@@ -24013,18 +24791,18 @@ function parseTopStackFrame(stack) {
|
|
|
24013
24791
|
}
|
|
24014
24792
|
|
|
24015
24793
|
// src/capture-error.ts
|
|
24016
|
-
function captureError(
|
|
24794
|
+
function captureError(error51) {
|
|
24017
24795
|
try {
|
|
24018
24796
|
const span = trace.getSpan(context.active());
|
|
24019
24797
|
if (!span) return;
|
|
24020
24798
|
const attributes = {
|
|
24021
|
-
"error.message": String(
|
|
24799
|
+
"error.message": String(error51)
|
|
24022
24800
|
};
|
|
24023
|
-
if (
|
|
24024
|
-
attributes["error.type"] =
|
|
24025
|
-
if (
|
|
24026
|
-
attributes["error.stack"] =
|
|
24027
|
-
const frame = parseTopStackFrame(
|
|
24801
|
+
if (error51 instanceof Error) {
|
|
24802
|
+
attributes["error.type"] = error51.constructor.name;
|
|
24803
|
+
if (error51.stack) {
|
|
24804
|
+
attributes["error.stack"] = error51.stack;
|
|
24805
|
+
const frame = parseTopStackFrame(error51.stack);
|
|
24028
24806
|
if (frame) {
|
|
24029
24807
|
attributes[GLASSTRACE_ATTRIBUTE_NAMES.SOURCE_FILE] = frame.file;
|
|
24030
24808
|
attributes[GLASSTRACE_ATTRIBUTE_NAMES.SOURCE_LINE] = frame.line;
|
|
@@ -24032,7 +24810,7 @@ function captureError(error48) {
|
|
|
24032
24810
|
}
|
|
24033
24811
|
}
|
|
24034
24812
|
span.addEvent("glasstrace.error", attributes);
|
|
24035
|
-
maybeShowMcpNudge(String(
|
|
24813
|
+
maybeShowMcpNudge(String(error51));
|
|
24036
24814
|
} catch {
|
|
24037
24815
|
}
|
|
24038
24816
|
}
|