@critical-path/svelte 0.16.2 → 0.17.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/CHANGELOG.md +61 -0
- package/README.md +4 -4
- package/dist/activity-state.svelte.d.ts +4 -9
- package/dist/activity-state.svelte.d.ts.map +1 -1
- package/dist/comment-state.svelte.d.ts +5 -10
- package/dist/comment-state.svelte.d.ts.map +1 -1
- package/dist/deliverable-state.svelte.d.ts +2 -1
- package/dist/deliverable-state.svelte.d.ts.map +1 -1
- package/dist/index.js +1358 -823
- package/dist/kanban-state.svelte.d.ts +2 -1
- package/dist/kanban-state.svelte.d.ts.map +1 -1
- package/dist/task-state.svelte.d.ts +3 -2
- package/dist/task-state.svelte.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/activity-state.svelte.ts +7 -14
- package/src/comment-state.svelte.ts +7 -14
- package/src/deliverable-state.svelte.ts +2 -1
- package/src/index.test.ts +2 -2
- package/src/kanban-state.svelte.ts +2 -1
- package/src/task-state.svelte.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -103,6 +103,8 @@ var o = class {
|
|
|
103
103
|
async createTask(e) {
|
|
104
104
|
let t = `temp_${Date.now()}_${Math.random().toString(36).substring(2, 7)}`, n = (/* @__PURE__ */ new Date()).toISOString(), r = {
|
|
105
105
|
...e,
|
|
106
|
+
status: e.status ?? "todo",
|
|
107
|
+
priority: e.priority ?? "medium",
|
|
106
108
|
id: t,
|
|
107
109
|
createdAt: n,
|
|
108
110
|
updatedAt: n
|
|
@@ -359,25 +361,19 @@ var te = class {
|
|
|
359
361
|
throw this.error = n, n;
|
|
360
362
|
}
|
|
361
363
|
}
|
|
362
|
-
async addReaction(e, t
|
|
364
|
+
async addReaction(e, t) {
|
|
363
365
|
try {
|
|
364
|
-
let
|
|
365
|
-
|
|
366
|
-
userId: n
|
|
367
|
-
} : t, i = await this.client.addCommentReaction(e, r);
|
|
368
|
-
return this.data = this.data.map((t) => t.id === e ? i : t), i;
|
|
366
|
+
let n = { emoji: t }, r = await this.client.addCommentReaction(e, n);
|
|
367
|
+
return this.data = this.data.map((t) => t.id === e ? r : t), r;
|
|
369
368
|
} catch (e) {
|
|
370
369
|
let t = e instanceof Error ? e : Error(String(e));
|
|
371
370
|
throw this.error = t, t;
|
|
372
371
|
}
|
|
373
372
|
}
|
|
374
|
-
async removeReaction(e, t
|
|
373
|
+
async removeReaction(e, t) {
|
|
375
374
|
try {
|
|
376
|
-
let
|
|
377
|
-
|
|
378
|
-
userId: n
|
|
379
|
-
} : t, i = await this.client.removeCommentReaction(e, r);
|
|
380
|
-
return this.data = this.data.map((t) => t.id === e ? i : t), i;
|
|
375
|
+
let n = { emoji: t }, r = await this.client.removeCommentReaction(e, n);
|
|
376
|
+
return this.data = this.data.map((t) => t.id === e ? r : t), r;
|
|
381
377
|
} catch (e) {
|
|
382
378
|
let t = e instanceof Error ? e : Error(String(e));
|
|
383
379
|
throw this.error = t, t;
|
|
@@ -584,25 +580,19 @@ var ae = class {
|
|
|
584
580
|
throw this.error = n, n;
|
|
585
581
|
}
|
|
586
582
|
}
|
|
587
|
-
async addReaction(e, t
|
|
583
|
+
async addReaction(e, t) {
|
|
588
584
|
try {
|
|
589
|
-
let
|
|
590
|
-
|
|
591
|
-
userId: n
|
|
592
|
-
} : t, i = await this.client.addCommentReaction(e, r);
|
|
593
|
-
return this.comments = this.comments.map((t) => t.id === e ? i : t), i;
|
|
585
|
+
let n = { emoji: t }, r = await this.client.addCommentReaction(e, n);
|
|
586
|
+
return this.comments = this.comments.map((t) => t.id === e ? r : t), r;
|
|
594
587
|
} catch (e) {
|
|
595
588
|
let t = e instanceof Error ? e : Error(String(e));
|
|
596
589
|
throw this.error = t, t;
|
|
597
590
|
}
|
|
598
591
|
}
|
|
599
|
-
async removeReaction(e, t
|
|
592
|
+
async removeReaction(e, t) {
|
|
600
593
|
try {
|
|
601
|
-
let
|
|
602
|
-
|
|
603
|
-
userId: n
|
|
604
|
-
} : t, i = await this.client.removeCommentReaction(e, r);
|
|
605
|
-
return this.comments = this.comments.map((t) => t.id === e ? i : t), i;
|
|
594
|
+
let n = { emoji: t }, r = await this.client.removeCommentReaction(e, n);
|
|
595
|
+
return this.comments = this.comments.map((t) => t.id === e ? r : t), r;
|
|
606
596
|
} catch (e) {
|
|
607
597
|
let t = e instanceof Error ? e : Error(String(e));
|
|
608
598
|
throw this.error = t, t;
|
|
@@ -1156,20 +1146,20 @@ var g = class e {
|
|
|
1156
1146
|
}), v = (e) => ({
|
|
1157
1147
|
status: "valid",
|
|
1158
1148
|
value: e
|
|
1159
|
-
}), be = (e) => e.status === "aborted", xe = (e) => e.status === "dirty", y = (e) => e.status === "valid",
|
|
1149
|
+
}), be = (e) => e.status === "aborted", xe = (e) => e.status === "dirty", y = (e) => e.status === "valid", Se = (e) => typeof Promise < "u" && e instanceof Promise, b;
|
|
1160
1150
|
(function(e) {
|
|
1161
1151
|
e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
1162
|
-
})(
|
|
1152
|
+
})(b ||= {});
|
|
1163
1153
|
//#endregion
|
|
1164
1154
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
1165
|
-
var
|
|
1155
|
+
var x = class {
|
|
1166
1156
|
constructor(e, t, n, r) {
|
|
1167
1157
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
|
|
1168
1158
|
}
|
|
1169
1159
|
get path() {
|
|
1170
1160
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1171
1161
|
}
|
|
1172
|
-
},
|
|
1162
|
+
}, Ce = (e, t) => {
|
|
1173
1163
|
if (y(t)) return {
|
|
1174
1164
|
success: !0,
|
|
1175
1165
|
data: t.value
|
|
@@ -1184,7 +1174,7 @@ var S = class {
|
|
|
1184
1174
|
}
|
|
1185
1175
|
};
|
|
1186
1176
|
};
|
|
1187
|
-
function
|
|
1177
|
+
function S(e) {
|
|
1188
1178
|
if (!e) return {};
|
|
1189
1179
|
let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e;
|
|
1190
1180
|
if (t && (n || r)) throw Error("Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.");
|
|
@@ -1199,7 +1189,7 @@ function C(e) {
|
|
|
1199
1189
|
description: i
|
|
1200
1190
|
};
|
|
1201
1191
|
}
|
|
1202
|
-
var
|
|
1192
|
+
var C = class {
|
|
1203
1193
|
get description() {
|
|
1204
1194
|
return this._def.description;
|
|
1205
1195
|
}
|
|
@@ -1231,7 +1221,7 @@ var w = class {
|
|
|
1231
1221
|
}
|
|
1232
1222
|
_parseSync(e) {
|
|
1233
1223
|
let t = this._parse(e);
|
|
1234
|
-
if (
|
|
1224
|
+
if (Se(t)) throw Error("Synchronous parse encountered promise.");
|
|
1235
1225
|
return t;
|
|
1236
1226
|
}
|
|
1237
1227
|
_parseAsync(e) {
|
|
@@ -1256,7 +1246,7 @@ var w = class {
|
|
|
1256
1246
|
data: e,
|
|
1257
1247
|
parsedType: d(e)
|
|
1258
1248
|
};
|
|
1259
|
-
return
|
|
1249
|
+
return Ce(n, this._parseSync({
|
|
1260
1250
|
data: e,
|
|
1261
1251
|
path: n.path,
|
|
1262
1252
|
parent: n
|
|
@@ -1315,7 +1305,7 @@ var w = class {
|
|
|
1315
1305
|
path: n.path,
|
|
1316
1306
|
parent: n
|
|
1317
1307
|
});
|
|
1318
|
-
return
|
|
1308
|
+
return Ce(n, await (Se(r) ? r : Promise.resolve(r)));
|
|
1319
1309
|
}
|
|
1320
1310
|
refine(e, t) {
|
|
1321
1311
|
let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
|
|
@@ -1331,9 +1321,9 @@ var w = class {
|
|
|
1331
1321
|
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
|
|
1332
1322
|
}
|
|
1333
1323
|
_refinement(e) {
|
|
1334
|
-
return new
|
|
1324
|
+
return new R({
|
|
1335
1325
|
schema: this,
|
|
1336
|
-
typeName:
|
|
1326
|
+
typeName: U.ZodEffects,
|
|
1337
1327
|
effect: {
|
|
1338
1328
|
type: "refinement",
|
|
1339
1329
|
refinement: e
|
|
@@ -1351,31 +1341,31 @@ var w = class {
|
|
|
1351
1341
|
};
|
|
1352
1342
|
}
|
|
1353
1343
|
optional() {
|
|
1354
|
-
return
|
|
1344
|
+
return z.create(this, this._def);
|
|
1355
1345
|
}
|
|
1356
1346
|
nullable() {
|
|
1357
|
-
return
|
|
1347
|
+
return B.create(this, this._def);
|
|
1358
1348
|
}
|
|
1359
1349
|
nullish() {
|
|
1360
1350
|
return this.nullable().optional();
|
|
1361
1351
|
}
|
|
1362
1352
|
array() {
|
|
1363
|
-
return
|
|
1353
|
+
return D.create(this);
|
|
1364
1354
|
}
|
|
1365
1355
|
promise() {
|
|
1366
|
-
return
|
|
1356
|
+
return L.create(this, this._def);
|
|
1367
1357
|
}
|
|
1368
1358
|
or(e) {
|
|
1369
|
-
return
|
|
1359
|
+
return A.create([this, e], this._def);
|
|
1370
1360
|
}
|
|
1371
1361
|
and(e) {
|
|
1372
|
-
return
|
|
1362
|
+
return ot.create(this, e, this._def);
|
|
1373
1363
|
}
|
|
1374
1364
|
transform(e) {
|
|
1375
|
-
return new
|
|
1376
|
-
...
|
|
1365
|
+
return new R({
|
|
1366
|
+
...S(this._def),
|
|
1377
1367
|
schema: this,
|
|
1378
|
-
typeName:
|
|
1368
|
+
typeName: U.ZodEffects,
|
|
1379
1369
|
effect: {
|
|
1380
1370
|
type: "transform",
|
|
1381
1371
|
transform: e
|
|
@@ -1384,27 +1374,27 @@ var w = class {
|
|
|
1384
1374
|
}
|
|
1385
1375
|
default(e) {
|
|
1386
1376
|
let t = typeof e == "function" ? e : () => e;
|
|
1387
|
-
return new
|
|
1388
|
-
...
|
|
1377
|
+
return new V({
|
|
1378
|
+
...S(this._def),
|
|
1389
1379
|
innerType: this,
|
|
1390
1380
|
defaultValue: t,
|
|
1391
|
-
typeName:
|
|
1381
|
+
typeName: U.ZodDefault
|
|
1392
1382
|
});
|
|
1393
1383
|
}
|
|
1394
1384
|
brand() {
|
|
1395
|
-
return new
|
|
1396
|
-
typeName:
|
|
1385
|
+
return new pt({
|
|
1386
|
+
typeName: U.ZodBranded,
|
|
1397
1387
|
type: this,
|
|
1398
|
-
...
|
|
1388
|
+
...S(this._def)
|
|
1399
1389
|
});
|
|
1400
1390
|
}
|
|
1401
1391
|
catch(e) {
|
|
1402
1392
|
let t = typeof e == "function" ? e : () => e;
|
|
1403
|
-
return new
|
|
1404
|
-
...
|
|
1393
|
+
return new H({
|
|
1394
|
+
...S(this._def),
|
|
1405
1395
|
innerType: this,
|
|
1406
1396
|
catchValue: t,
|
|
1407
|
-
typeName:
|
|
1397
|
+
typeName: U.ZodCatch
|
|
1408
1398
|
});
|
|
1409
1399
|
}
|
|
1410
1400
|
describe(e) {
|
|
@@ -1415,10 +1405,10 @@ var w = class {
|
|
|
1415
1405
|
});
|
|
1416
1406
|
}
|
|
1417
1407
|
pipe(e) {
|
|
1418
|
-
return
|
|
1408
|
+
return mt.create(this, e);
|
|
1419
1409
|
}
|
|
1420
1410
|
readonly() {
|
|
1421
|
-
return
|
|
1411
|
+
return ht.create(this);
|
|
1422
1412
|
}
|
|
1423
1413
|
isOptional() {
|
|
1424
1414
|
return this.safeParse(void 0).success;
|
|
@@ -1426,25 +1416,25 @@ var w = class {
|
|
|
1426
1416
|
isNullable() {
|
|
1427
1417
|
return this.safeParse(null).success;
|
|
1428
1418
|
}
|
|
1429
|
-
},
|
|
1430
|
-
function
|
|
1419
|
+
}, we = /^c[^\s-]{8,}$/i, Te = /^[0-9a-z]+$/, Ee = /^[0-9A-HJKMNP-TV-Z]{26}$/i, De = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Oe = /^[a-z0-9_-]{21}$/i, ke = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ae = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, je = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Me = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Ne, Pe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Fe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Ie = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Le = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Re = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ze = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Be = "((\\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])))", Ve = RegExp(`^${Be}$`);
|
|
1420
|
+
function He(e) {
|
|
1431
1421
|
let t = "[0-5]\\d";
|
|
1432
1422
|
e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
|
|
1433
1423
|
let n = e.precision ? "+" : "?";
|
|
1434
1424
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
|
|
1435
1425
|
}
|
|
1436
|
-
function He(e) {
|
|
1437
|
-
return RegExp(`^${Ve(e)}$`);
|
|
1438
|
-
}
|
|
1439
1426
|
function Ue(e) {
|
|
1440
|
-
|
|
1441
|
-
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1427
|
+
return RegExp(`^${He(e)}$`);
|
|
1442
1428
|
}
|
|
1443
|
-
function We(e
|
|
1444
|
-
|
|
1429
|
+
function We(e) {
|
|
1430
|
+
let t = `${Be}T${He(e)}`, n = [];
|
|
1431
|
+
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1445
1432
|
}
|
|
1446
1433
|
function Ge(e, t) {
|
|
1447
|
-
|
|
1434
|
+
return !!((t === "v4" || !t) && Pe.test(e) || (t === "v6" || !t) && Ie.test(e));
|
|
1435
|
+
}
|
|
1436
|
+
function Ke(e, t) {
|
|
1437
|
+
if (!ke.test(e)) return !1;
|
|
1448
1438
|
try {
|
|
1449
1439
|
let [n] = e.split(".");
|
|
1450
1440
|
if (!n) return !1;
|
|
@@ -1454,10 +1444,10 @@ function Ge(e, t) {
|
|
|
1454
1444
|
return !1;
|
|
1455
1445
|
}
|
|
1456
1446
|
}
|
|
1457
|
-
function
|
|
1458
|
-
return !!((t === "v4" || !t) &&
|
|
1447
|
+
function qe(e, t) {
|
|
1448
|
+
return !!((t === "v4" || !t) && Fe.test(e) || (t === "v6" || !t) && Le.test(e));
|
|
1459
1449
|
}
|
|
1460
|
-
var
|
|
1450
|
+
var Je = class e extends C {
|
|
1461
1451
|
_parse(e) {
|
|
1462
1452
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
|
1463
1453
|
let t = this._getOrReturnCtx(e);
|
|
@@ -1501,37 +1491,37 @@ var T = class e extends w {
|
|
|
1501
1491
|
exact: !0,
|
|
1502
1492
|
message: r.message
|
|
1503
1493
|
}), t.dirty());
|
|
1504
|
-
} else if (r.kind === "email")
|
|
1494
|
+
} else if (r.kind === "email") je.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1505
1495
|
validation: "email",
|
|
1506
1496
|
code: f.invalid_string,
|
|
1507
1497
|
message: r.message
|
|
1508
1498
|
}), t.dirty());
|
|
1509
|
-
else if (r.kind === "emoji")
|
|
1499
|
+
else if (r.kind === "emoji") Ne ||= new RegExp(Me, "u"), Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1510
1500
|
validation: "emoji",
|
|
1511
1501
|
code: f.invalid_string,
|
|
1512
1502
|
message: r.message
|
|
1513
1503
|
}), t.dirty());
|
|
1514
|
-
else if (r.kind === "uuid")
|
|
1504
|
+
else if (r.kind === "uuid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1515
1505
|
validation: "uuid",
|
|
1516
1506
|
code: f.invalid_string,
|
|
1517
1507
|
message: r.message
|
|
1518
1508
|
}), t.dirty());
|
|
1519
|
-
else if (r.kind === "nanoid")
|
|
1509
|
+
else if (r.kind === "nanoid") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1520
1510
|
validation: "nanoid",
|
|
1521
1511
|
code: f.invalid_string,
|
|
1522
1512
|
message: r.message
|
|
1523
1513
|
}), t.dirty());
|
|
1524
|
-
else if (r.kind === "cuid")
|
|
1514
|
+
else if (r.kind === "cuid") we.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1525
1515
|
validation: "cuid",
|
|
1526
1516
|
code: f.invalid_string,
|
|
1527
1517
|
message: r.message
|
|
1528
1518
|
}), t.dirty());
|
|
1529
|
-
else if (r.kind === "cuid2")
|
|
1519
|
+
else if (r.kind === "cuid2") Te.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1530
1520
|
validation: "cuid2",
|
|
1531
1521
|
code: f.invalid_string,
|
|
1532
1522
|
message: r.message
|
|
1533
1523
|
}), t.dirty());
|
|
1534
|
-
else if (r.kind === "ulid")
|
|
1524
|
+
else if (r.kind === "ulid") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1535
1525
|
validation: "ulid",
|
|
1536
1526
|
code: f.invalid_string,
|
|
1537
1527
|
message: r.message
|
|
@@ -1564,39 +1554,39 @@ var T = class e extends w {
|
|
|
1564
1554
|
code: f.invalid_string,
|
|
1565
1555
|
validation: { endsWith: r.value },
|
|
1566
1556
|
message: r.message
|
|
1567
|
-
}), t.dirty()) : r.kind === "datetime" ?
|
|
1557
|
+
}), t.dirty()) : r.kind === "datetime" ? We(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1568
1558
|
code: f.invalid_string,
|
|
1569
1559
|
validation: "datetime",
|
|
1570
1560
|
message: r.message
|
|
1571
|
-
}), t.dirty()) : r.kind === "date" ?
|
|
1561
|
+
}), t.dirty()) : r.kind === "date" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1572
1562
|
code: f.invalid_string,
|
|
1573
1563
|
validation: "date",
|
|
1574
1564
|
message: r.message
|
|
1575
|
-
}), t.dirty()) : r.kind === "time" ?
|
|
1565
|
+
}), t.dirty()) : r.kind === "time" ? Ue(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1576
1566
|
code: f.invalid_string,
|
|
1577
1567
|
validation: "time",
|
|
1578
1568
|
message: r.message
|
|
1579
|
-
}), t.dirty()) : r.kind === "duration" ?
|
|
1569
|
+
}), t.dirty()) : r.kind === "duration" ? Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1580
1570
|
validation: "duration",
|
|
1581
1571
|
code: f.invalid_string,
|
|
1582
1572
|
message: r.message
|
|
1583
|
-
}), t.dirty()) : r.kind === "ip" ?
|
|
1573
|
+
}), t.dirty()) : r.kind === "ip" ? Ge(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1584
1574
|
validation: "ip",
|
|
1585
1575
|
code: f.invalid_string,
|
|
1586
1576
|
message: r.message
|
|
1587
|
-
}), t.dirty()) : r.kind === "jwt" ?
|
|
1577
|
+
}), t.dirty()) : r.kind === "jwt" ? Ke(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1588
1578
|
validation: "jwt",
|
|
1589
1579
|
code: f.invalid_string,
|
|
1590
1580
|
message: r.message
|
|
1591
|
-
}), t.dirty()) : r.kind === "cidr" ?
|
|
1581
|
+
}), t.dirty()) : r.kind === "cidr" ? qe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1592
1582
|
validation: "cidr",
|
|
1593
1583
|
code: f.invalid_string,
|
|
1594
1584
|
message: r.message
|
|
1595
|
-
}), t.dirty()) : r.kind === "base64" ?
|
|
1585
|
+
}), t.dirty()) : r.kind === "base64" ? Re.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1596
1586
|
validation: "base64",
|
|
1597
1587
|
code: f.invalid_string,
|
|
1598
1588
|
message: r.message
|
|
1599
|
-
}), t.dirty()) : r.kind === "base64url" ?
|
|
1589
|
+
}), t.dirty()) : r.kind === "base64url" ? ze.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1600
1590
|
validation: "base64url",
|
|
1601
1591
|
code: f.invalid_string,
|
|
1602
1592
|
message: r.message
|
|
@@ -1610,7 +1600,7 @@ var T = class e extends w {
|
|
|
1610
1600
|
return this.refinement((t) => e.test(t), {
|
|
1611
1601
|
validation: t,
|
|
1612
1602
|
code: f.invalid_string,
|
|
1613
|
-
...
|
|
1603
|
+
...b.errToObj(n)
|
|
1614
1604
|
});
|
|
1615
1605
|
}
|
|
1616
1606
|
_addCheck(t) {
|
|
@@ -1622,79 +1612,79 @@ var T = class e extends w {
|
|
|
1622
1612
|
email(e) {
|
|
1623
1613
|
return this._addCheck({
|
|
1624
1614
|
kind: "email",
|
|
1625
|
-
...
|
|
1615
|
+
...b.errToObj(e)
|
|
1626
1616
|
});
|
|
1627
1617
|
}
|
|
1628
1618
|
url(e) {
|
|
1629
1619
|
return this._addCheck({
|
|
1630
1620
|
kind: "url",
|
|
1631
|
-
...
|
|
1621
|
+
...b.errToObj(e)
|
|
1632
1622
|
});
|
|
1633
1623
|
}
|
|
1634
1624
|
emoji(e) {
|
|
1635
1625
|
return this._addCheck({
|
|
1636
1626
|
kind: "emoji",
|
|
1637
|
-
...
|
|
1627
|
+
...b.errToObj(e)
|
|
1638
1628
|
});
|
|
1639
1629
|
}
|
|
1640
1630
|
uuid(e) {
|
|
1641
1631
|
return this._addCheck({
|
|
1642
1632
|
kind: "uuid",
|
|
1643
|
-
...
|
|
1633
|
+
...b.errToObj(e)
|
|
1644
1634
|
});
|
|
1645
1635
|
}
|
|
1646
1636
|
nanoid(e) {
|
|
1647
1637
|
return this._addCheck({
|
|
1648
1638
|
kind: "nanoid",
|
|
1649
|
-
...
|
|
1639
|
+
...b.errToObj(e)
|
|
1650
1640
|
});
|
|
1651
1641
|
}
|
|
1652
1642
|
cuid(e) {
|
|
1653
1643
|
return this._addCheck({
|
|
1654
1644
|
kind: "cuid",
|
|
1655
|
-
...
|
|
1645
|
+
...b.errToObj(e)
|
|
1656
1646
|
});
|
|
1657
1647
|
}
|
|
1658
1648
|
cuid2(e) {
|
|
1659
1649
|
return this._addCheck({
|
|
1660
1650
|
kind: "cuid2",
|
|
1661
|
-
...
|
|
1651
|
+
...b.errToObj(e)
|
|
1662
1652
|
});
|
|
1663
1653
|
}
|
|
1664
1654
|
ulid(e) {
|
|
1665
1655
|
return this._addCheck({
|
|
1666
1656
|
kind: "ulid",
|
|
1667
|
-
...
|
|
1657
|
+
...b.errToObj(e)
|
|
1668
1658
|
});
|
|
1669
1659
|
}
|
|
1670
1660
|
base64(e) {
|
|
1671
1661
|
return this._addCheck({
|
|
1672
1662
|
kind: "base64",
|
|
1673
|
-
...
|
|
1663
|
+
...b.errToObj(e)
|
|
1674
1664
|
});
|
|
1675
1665
|
}
|
|
1676
1666
|
base64url(e) {
|
|
1677
1667
|
return this._addCheck({
|
|
1678
1668
|
kind: "base64url",
|
|
1679
|
-
...
|
|
1669
|
+
...b.errToObj(e)
|
|
1680
1670
|
});
|
|
1681
1671
|
}
|
|
1682
1672
|
jwt(e) {
|
|
1683
1673
|
return this._addCheck({
|
|
1684
1674
|
kind: "jwt",
|
|
1685
|
-
...
|
|
1675
|
+
...b.errToObj(e)
|
|
1686
1676
|
});
|
|
1687
1677
|
}
|
|
1688
1678
|
ip(e) {
|
|
1689
1679
|
return this._addCheck({
|
|
1690
1680
|
kind: "ip",
|
|
1691
|
-
...
|
|
1681
|
+
...b.errToObj(e)
|
|
1692
1682
|
});
|
|
1693
1683
|
}
|
|
1694
1684
|
cidr(e) {
|
|
1695
1685
|
return this._addCheck({
|
|
1696
1686
|
kind: "cidr",
|
|
1697
|
-
...
|
|
1687
|
+
...b.errToObj(e)
|
|
1698
1688
|
});
|
|
1699
1689
|
}
|
|
1700
1690
|
datetime(e) {
|
|
@@ -1709,7 +1699,7 @@ var T = class e extends w {
|
|
|
1709
1699
|
precision: e?.precision === void 0 ? null : e?.precision,
|
|
1710
1700
|
offset: e?.offset ?? !1,
|
|
1711
1701
|
local: e?.local ?? !1,
|
|
1712
|
-
...
|
|
1702
|
+
...b.errToObj(e?.message)
|
|
1713
1703
|
});
|
|
1714
1704
|
}
|
|
1715
1705
|
date(e) {
|
|
@@ -1726,20 +1716,20 @@ var T = class e extends w {
|
|
|
1726
1716
|
}) : this._addCheck({
|
|
1727
1717
|
kind: "time",
|
|
1728
1718
|
precision: e?.precision === void 0 ? null : e?.precision,
|
|
1729
|
-
...
|
|
1719
|
+
...b.errToObj(e?.message)
|
|
1730
1720
|
});
|
|
1731
1721
|
}
|
|
1732
1722
|
duration(e) {
|
|
1733
1723
|
return this._addCheck({
|
|
1734
1724
|
kind: "duration",
|
|
1735
|
-
...
|
|
1725
|
+
...b.errToObj(e)
|
|
1736
1726
|
});
|
|
1737
1727
|
}
|
|
1738
1728
|
regex(e, t) {
|
|
1739
1729
|
return this._addCheck({
|
|
1740
1730
|
kind: "regex",
|
|
1741
1731
|
regex: e,
|
|
1742
|
-
...
|
|
1732
|
+
...b.errToObj(t)
|
|
1743
1733
|
});
|
|
1744
1734
|
}
|
|
1745
1735
|
includes(e, t) {
|
|
@@ -1747,46 +1737,46 @@ var T = class e extends w {
|
|
|
1747
1737
|
kind: "includes",
|
|
1748
1738
|
value: e,
|
|
1749
1739
|
position: t?.position,
|
|
1750
|
-
...
|
|
1740
|
+
...b.errToObj(t?.message)
|
|
1751
1741
|
});
|
|
1752
1742
|
}
|
|
1753
1743
|
startsWith(e, t) {
|
|
1754
1744
|
return this._addCheck({
|
|
1755
1745
|
kind: "startsWith",
|
|
1756
1746
|
value: e,
|
|
1757
|
-
...
|
|
1747
|
+
...b.errToObj(t)
|
|
1758
1748
|
});
|
|
1759
1749
|
}
|
|
1760
1750
|
endsWith(e, t) {
|
|
1761
1751
|
return this._addCheck({
|
|
1762
1752
|
kind: "endsWith",
|
|
1763
1753
|
value: e,
|
|
1764
|
-
...
|
|
1754
|
+
...b.errToObj(t)
|
|
1765
1755
|
});
|
|
1766
1756
|
}
|
|
1767
1757
|
min(e, t) {
|
|
1768
1758
|
return this._addCheck({
|
|
1769
1759
|
kind: "min",
|
|
1770
1760
|
value: e,
|
|
1771
|
-
...
|
|
1761
|
+
...b.errToObj(t)
|
|
1772
1762
|
});
|
|
1773
1763
|
}
|
|
1774
1764
|
max(e, t) {
|
|
1775
1765
|
return this._addCheck({
|
|
1776
1766
|
kind: "max",
|
|
1777
1767
|
value: e,
|
|
1778
|
-
...
|
|
1768
|
+
...b.errToObj(t)
|
|
1779
1769
|
});
|
|
1780
1770
|
}
|
|
1781
1771
|
length(e, t) {
|
|
1782
1772
|
return this._addCheck({
|
|
1783
1773
|
kind: "length",
|
|
1784
1774
|
value: e,
|
|
1785
|
-
...
|
|
1775
|
+
...b.errToObj(t)
|
|
1786
1776
|
});
|
|
1787
1777
|
}
|
|
1788
1778
|
nonempty(e) {
|
|
1789
|
-
return this.min(1,
|
|
1779
|
+
return this.min(1, b.errToObj(e));
|
|
1790
1780
|
}
|
|
1791
1781
|
trim() {
|
|
1792
1782
|
return new e({
|
|
@@ -1865,17 +1855,17 @@ var T = class e extends w {
|
|
|
1865
1855
|
return e;
|
|
1866
1856
|
}
|
|
1867
1857
|
};
|
|
1868
|
-
|
|
1858
|
+
Je.create = (e) => new Je({
|
|
1869
1859
|
checks: [],
|
|
1870
|
-
typeName:
|
|
1860
|
+
typeName: U.ZodString,
|
|
1871
1861
|
coerce: e?.coerce ?? !1,
|
|
1872
|
-
...
|
|
1862
|
+
...S(e)
|
|
1873
1863
|
});
|
|
1874
|
-
function
|
|
1864
|
+
function Ye(e, t) {
|
|
1875
1865
|
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
|
|
1876
1866
|
return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
|
|
1877
1867
|
}
|
|
1878
|
-
var
|
|
1868
|
+
var Xe = class e extends C {
|
|
1879
1869
|
constructor() {
|
|
1880
1870
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1881
1871
|
}
|
|
@@ -1908,7 +1898,7 @@ var Je = class e extends w {
|
|
|
1908
1898
|
inclusive: r.inclusive,
|
|
1909
1899
|
exact: !1,
|
|
1910
1900
|
message: r.message
|
|
1911
|
-
}), n.dirty()) : r.kind === "multipleOf" ?
|
|
1901
|
+
}), n.dirty()) : r.kind === "multipleOf" ? Ye(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
|
|
1912
1902
|
code: f.not_multiple_of,
|
|
1913
1903
|
multipleOf: r.value,
|
|
1914
1904
|
message: r.message
|
|
@@ -1922,16 +1912,16 @@ var Je = class e extends w {
|
|
|
1922
1912
|
};
|
|
1923
1913
|
}
|
|
1924
1914
|
gte(e, t) {
|
|
1925
|
-
return this.setLimit("min", e, !0,
|
|
1915
|
+
return this.setLimit("min", e, !0, b.toString(t));
|
|
1926
1916
|
}
|
|
1927
1917
|
gt(e, t) {
|
|
1928
|
-
return this.setLimit("min", e, !1,
|
|
1918
|
+
return this.setLimit("min", e, !1, b.toString(t));
|
|
1929
1919
|
}
|
|
1930
1920
|
lte(e, t) {
|
|
1931
|
-
return this.setLimit("max", e, !0,
|
|
1921
|
+
return this.setLimit("max", e, !0, b.toString(t));
|
|
1932
1922
|
}
|
|
1933
1923
|
lt(e, t) {
|
|
1934
|
-
return this.setLimit("max", e, !1,
|
|
1924
|
+
return this.setLimit("max", e, !1, b.toString(t));
|
|
1935
1925
|
}
|
|
1936
1926
|
setLimit(t, n, r, i) {
|
|
1937
1927
|
return new e({
|
|
@@ -1940,7 +1930,7 @@ var Je = class e extends w {
|
|
|
1940
1930
|
kind: t,
|
|
1941
1931
|
value: n,
|
|
1942
1932
|
inclusive: r,
|
|
1943
|
-
message:
|
|
1933
|
+
message: b.toString(i)
|
|
1944
1934
|
}]
|
|
1945
1935
|
});
|
|
1946
1936
|
}
|
|
@@ -1953,7 +1943,7 @@ var Je = class e extends w {
|
|
|
1953
1943
|
int(e) {
|
|
1954
1944
|
return this._addCheck({
|
|
1955
1945
|
kind: "int",
|
|
1956
|
-
message:
|
|
1946
|
+
message: b.toString(e)
|
|
1957
1947
|
});
|
|
1958
1948
|
}
|
|
1959
1949
|
positive(e) {
|
|
@@ -1961,7 +1951,7 @@ var Je = class e extends w {
|
|
|
1961
1951
|
kind: "min",
|
|
1962
1952
|
value: 0,
|
|
1963
1953
|
inclusive: !1,
|
|
1964
|
-
message:
|
|
1954
|
+
message: b.toString(e)
|
|
1965
1955
|
});
|
|
1966
1956
|
}
|
|
1967
1957
|
negative(e) {
|
|
@@ -1969,7 +1959,7 @@ var Je = class e extends w {
|
|
|
1969
1959
|
kind: "max",
|
|
1970
1960
|
value: 0,
|
|
1971
1961
|
inclusive: !1,
|
|
1972
|
-
message:
|
|
1962
|
+
message: b.toString(e)
|
|
1973
1963
|
});
|
|
1974
1964
|
}
|
|
1975
1965
|
nonpositive(e) {
|
|
@@ -1977,7 +1967,7 @@ var Je = class e extends w {
|
|
|
1977
1967
|
kind: "max",
|
|
1978
1968
|
value: 0,
|
|
1979
1969
|
inclusive: !0,
|
|
1980
|
-
message:
|
|
1970
|
+
message: b.toString(e)
|
|
1981
1971
|
});
|
|
1982
1972
|
}
|
|
1983
1973
|
nonnegative(e) {
|
|
@@ -1985,20 +1975,20 @@ var Je = class e extends w {
|
|
|
1985
1975
|
kind: "min",
|
|
1986
1976
|
value: 0,
|
|
1987
1977
|
inclusive: !0,
|
|
1988
|
-
message:
|
|
1978
|
+
message: b.toString(e)
|
|
1989
1979
|
});
|
|
1990
1980
|
}
|
|
1991
1981
|
multipleOf(e, t) {
|
|
1992
1982
|
return this._addCheck({
|
|
1993
1983
|
kind: "multipleOf",
|
|
1994
1984
|
value: e,
|
|
1995
|
-
message:
|
|
1985
|
+
message: b.toString(t)
|
|
1996
1986
|
});
|
|
1997
1987
|
}
|
|
1998
1988
|
finite(e) {
|
|
1999
1989
|
return this._addCheck({
|
|
2000
1990
|
kind: "finite",
|
|
2001
|
-
message:
|
|
1991
|
+
message: b.toString(e)
|
|
2002
1992
|
});
|
|
2003
1993
|
}
|
|
2004
1994
|
safe(e) {
|
|
@@ -2006,12 +1996,12 @@ var Je = class e extends w {
|
|
|
2006
1996
|
kind: "min",
|
|
2007
1997
|
inclusive: !0,
|
|
2008
1998
|
value: -(2 ** 53 - 1),
|
|
2009
|
-
message:
|
|
1999
|
+
message: b.toString(e)
|
|
2010
2000
|
})._addCheck({
|
|
2011
2001
|
kind: "max",
|
|
2012
2002
|
inclusive: !0,
|
|
2013
2003
|
value: 2 ** 53 - 1,
|
|
2014
|
-
message:
|
|
2004
|
+
message: b.toString(e)
|
|
2015
2005
|
});
|
|
2016
2006
|
}
|
|
2017
2007
|
get minValue() {
|
|
@@ -2034,13 +2024,13 @@ var Je = class e extends w {
|
|
|
2034
2024
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
2035
2025
|
}
|
|
2036
2026
|
};
|
|
2037
|
-
|
|
2027
|
+
Xe.create = (e) => new Xe({
|
|
2038
2028
|
checks: [],
|
|
2039
|
-
typeName:
|
|
2029
|
+
typeName: U.ZodNumber,
|
|
2040
2030
|
coerce: e?.coerce || !1,
|
|
2041
|
-
...
|
|
2031
|
+
...S(e)
|
|
2042
2032
|
});
|
|
2043
|
-
var
|
|
2033
|
+
var Ze = class e extends C {
|
|
2044
2034
|
constructor() {
|
|
2045
2035
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2046
2036
|
}
|
|
@@ -2083,16 +2073,16 @@ var Ye = class e extends w {
|
|
|
2083
2073
|
}), _;
|
|
2084
2074
|
}
|
|
2085
2075
|
gte(e, t) {
|
|
2086
|
-
return this.setLimit("min", e, !0,
|
|
2076
|
+
return this.setLimit("min", e, !0, b.toString(t));
|
|
2087
2077
|
}
|
|
2088
2078
|
gt(e, t) {
|
|
2089
|
-
return this.setLimit("min", e, !1,
|
|
2079
|
+
return this.setLimit("min", e, !1, b.toString(t));
|
|
2090
2080
|
}
|
|
2091
2081
|
lte(e, t) {
|
|
2092
|
-
return this.setLimit("max", e, !0,
|
|
2082
|
+
return this.setLimit("max", e, !0, b.toString(t));
|
|
2093
2083
|
}
|
|
2094
2084
|
lt(e, t) {
|
|
2095
|
-
return this.setLimit("max", e, !1,
|
|
2085
|
+
return this.setLimit("max", e, !1, b.toString(t));
|
|
2096
2086
|
}
|
|
2097
2087
|
setLimit(t, n, r, i) {
|
|
2098
2088
|
return new e({
|
|
@@ -2101,7 +2091,7 @@ var Ye = class e extends w {
|
|
|
2101
2091
|
kind: t,
|
|
2102
2092
|
value: n,
|
|
2103
2093
|
inclusive: r,
|
|
2104
|
-
message:
|
|
2094
|
+
message: b.toString(i)
|
|
2105
2095
|
}]
|
|
2106
2096
|
});
|
|
2107
2097
|
}
|
|
@@ -2116,7 +2106,7 @@ var Ye = class e extends w {
|
|
|
2116
2106
|
kind: "min",
|
|
2117
2107
|
value: BigInt(0),
|
|
2118
2108
|
inclusive: !1,
|
|
2119
|
-
message:
|
|
2109
|
+
message: b.toString(e)
|
|
2120
2110
|
});
|
|
2121
2111
|
}
|
|
2122
2112
|
negative(e) {
|
|
@@ -2124,7 +2114,7 @@ var Ye = class e extends w {
|
|
|
2124
2114
|
kind: "max",
|
|
2125
2115
|
value: BigInt(0),
|
|
2126
2116
|
inclusive: !1,
|
|
2127
|
-
message:
|
|
2117
|
+
message: b.toString(e)
|
|
2128
2118
|
});
|
|
2129
2119
|
}
|
|
2130
2120
|
nonpositive(e) {
|
|
@@ -2132,7 +2122,7 @@ var Ye = class e extends w {
|
|
|
2132
2122
|
kind: "max",
|
|
2133
2123
|
value: BigInt(0),
|
|
2134
2124
|
inclusive: !0,
|
|
2135
|
-
message:
|
|
2125
|
+
message: b.toString(e)
|
|
2136
2126
|
});
|
|
2137
2127
|
}
|
|
2138
2128
|
nonnegative(e) {
|
|
@@ -2140,14 +2130,14 @@ var Ye = class e extends w {
|
|
|
2140
2130
|
kind: "min",
|
|
2141
2131
|
value: BigInt(0),
|
|
2142
2132
|
inclusive: !0,
|
|
2143
|
-
message:
|
|
2133
|
+
message: b.toString(e)
|
|
2144
2134
|
});
|
|
2145
2135
|
}
|
|
2146
2136
|
multipleOf(e, t) {
|
|
2147
2137
|
return this._addCheck({
|
|
2148
2138
|
kind: "multipleOf",
|
|
2149
2139
|
value: e,
|
|
2150
|
-
message:
|
|
2140
|
+
message: b.toString(t)
|
|
2151
2141
|
});
|
|
2152
2142
|
}
|
|
2153
2143
|
get minValue() {
|
|
@@ -2161,13 +2151,13 @@ var Ye = class e extends w {
|
|
|
2161
2151
|
return e;
|
|
2162
2152
|
}
|
|
2163
2153
|
};
|
|
2164
|
-
|
|
2154
|
+
Ze.create = (e) => new Ze({
|
|
2165
2155
|
checks: [],
|
|
2166
|
-
typeName:
|
|
2156
|
+
typeName: U.ZodBigInt,
|
|
2167
2157
|
coerce: e?.coerce ?? !1,
|
|
2168
|
-
...
|
|
2158
|
+
...S(e)
|
|
2169
2159
|
});
|
|
2170
|
-
var
|
|
2160
|
+
var Qe = class extends C {
|
|
2171
2161
|
_parse(e) {
|
|
2172
2162
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
|
2173
2163
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2180,12 +2170,12 @@ var E = class extends w {
|
|
|
2180
2170
|
return v(e.data);
|
|
2181
2171
|
}
|
|
2182
2172
|
};
|
|
2183
|
-
|
|
2184
|
-
typeName:
|
|
2173
|
+
Qe.create = (e) => new Qe({
|
|
2174
|
+
typeName: U.ZodBoolean,
|
|
2185
2175
|
coerce: e?.coerce || !1,
|
|
2186
|
-
...
|
|
2176
|
+
...S(e)
|
|
2187
2177
|
});
|
|
2188
|
-
var
|
|
2178
|
+
var $e = class e extends C {
|
|
2189
2179
|
_parse(e) {
|
|
2190
2180
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
|
2191
2181
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2227,14 +2217,14 @@ var Xe = class e extends w {
|
|
|
2227
2217
|
return this._addCheck({
|
|
2228
2218
|
kind: "min",
|
|
2229
2219
|
value: e.getTime(),
|
|
2230
|
-
message:
|
|
2220
|
+
message: b.toString(t)
|
|
2231
2221
|
});
|
|
2232
2222
|
}
|
|
2233
2223
|
max(e, t) {
|
|
2234
2224
|
return this._addCheck({
|
|
2235
2225
|
kind: "max",
|
|
2236
2226
|
value: e.getTime(),
|
|
2237
|
-
message:
|
|
2227
|
+
message: b.toString(t)
|
|
2238
2228
|
});
|
|
2239
2229
|
}
|
|
2240
2230
|
get minDate() {
|
|
@@ -2248,13 +2238,13 @@ var Xe = class e extends w {
|
|
|
2248
2238
|
return e == null ? null : new Date(e);
|
|
2249
2239
|
}
|
|
2250
2240
|
};
|
|
2251
|
-
|
|
2241
|
+
$e.create = (e) => new $e({
|
|
2252
2242
|
checks: [],
|
|
2253
2243
|
coerce: e?.coerce || !1,
|
|
2254
|
-
typeName:
|
|
2255
|
-
...
|
|
2244
|
+
typeName: U.ZodDate,
|
|
2245
|
+
...S(e)
|
|
2256
2246
|
});
|
|
2257
|
-
var
|
|
2247
|
+
var et = class extends C {
|
|
2258
2248
|
_parse(e) {
|
|
2259
2249
|
if (this._getType(e) !== u.symbol) {
|
|
2260
2250
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2267,11 +2257,11 @@ var Ze = class extends w {
|
|
|
2267
2257
|
return v(e.data);
|
|
2268
2258
|
}
|
|
2269
2259
|
};
|
|
2270
|
-
|
|
2271
|
-
typeName:
|
|
2272
|
-
...
|
|
2260
|
+
et.create = (e) => new et({
|
|
2261
|
+
typeName: U.ZodSymbol,
|
|
2262
|
+
...S(e)
|
|
2273
2263
|
});
|
|
2274
|
-
var
|
|
2264
|
+
var w = class extends C {
|
|
2275
2265
|
_parse(e) {
|
|
2276
2266
|
if (this._getType(e) !== u.undefined) {
|
|
2277
2267
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2284,11 +2274,11 @@ var D = class extends w {
|
|
|
2284
2274
|
return v(e.data);
|
|
2285
2275
|
}
|
|
2286
2276
|
};
|
|
2287
|
-
|
|
2288
|
-
typeName:
|
|
2289
|
-
...
|
|
2277
|
+
w.create = (e) => new w({
|
|
2278
|
+
typeName: U.ZodUndefined,
|
|
2279
|
+
...S(e)
|
|
2290
2280
|
});
|
|
2291
|
-
var
|
|
2281
|
+
var tt = class extends C {
|
|
2292
2282
|
_parse(e) {
|
|
2293
2283
|
if (this._getType(e) !== u.null) {
|
|
2294
2284
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2301,11 +2291,11 @@ var O = class extends w {
|
|
|
2301
2291
|
return v(e.data);
|
|
2302
2292
|
}
|
|
2303
2293
|
};
|
|
2304
|
-
|
|
2305
|
-
typeName:
|
|
2306
|
-
...
|
|
2294
|
+
tt.create = (e) => new tt({
|
|
2295
|
+
typeName: U.ZodNull,
|
|
2296
|
+
...S(e)
|
|
2307
2297
|
});
|
|
2308
|
-
var
|
|
2298
|
+
var nt = class extends C {
|
|
2309
2299
|
constructor() {
|
|
2310
2300
|
super(...arguments), this._any = !0;
|
|
2311
2301
|
}
|
|
@@ -2313,11 +2303,11 @@ var Qe = class extends w {
|
|
|
2313
2303
|
return v(e.data);
|
|
2314
2304
|
}
|
|
2315
2305
|
};
|
|
2316
|
-
|
|
2317
|
-
typeName:
|
|
2318
|
-
...
|
|
2306
|
+
nt.create = (e) => new nt({
|
|
2307
|
+
typeName: U.ZodAny,
|
|
2308
|
+
...S(e)
|
|
2319
2309
|
});
|
|
2320
|
-
var
|
|
2310
|
+
var T = class extends C {
|
|
2321
2311
|
constructor() {
|
|
2322
2312
|
super(...arguments), this._unknown = !0;
|
|
2323
2313
|
}
|
|
@@ -2325,11 +2315,11 @@ var k = class extends w {
|
|
|
2325
2315
|
return v(e.data);
|
|
2326
2316
|
}
|
|
2327
2317
|
};
|
|
2328
|
-
|
|
2329
|
-
typeName:
|
|
2330
|
-
...
|
|
2318
|
+
T.create = (e) => new T({
|
|
2319
|
+
typeName: U.ZodUnknown,
|
|
2320
|
+
...S(e)
|
|
2331
2321
|
});
|
|
2332
|
-
var
|
|
2322
|
+
var E = class extends C {
|
|
2333
2323
|
_parse(e) {
|
|
2334
2324
|
let t = this._getOrReturnCtx(e);
|
|
2335
2325
|
return h(t, {
|
|
@@ -2339,11 +2329,11 @@ var A = class extends w {
|
|
|
2339
2329
|
}), _;
|
|
2340
2330
|
}
|
|
2341
2331
|
};
|
|
2342
|
-
|
|
2343
|
-
typeName:
|
|
2344
|
-
...
|
|
2332
|
+
E.create = (e) => new E({
|
|
2333
|
+
typeName: U.ZodNever,
|
|
2334
|
+
...S(e)
|
|
2345
2335
|
});
|
|
2346
|
-
var
|
|
2336
|
+
var rt = class extends C {
|
|
2347
2337
|
_parse(e) {
|
|
2348
2338
|
if (this._getType(e) !== u.undefined) {
|
|
2349
2339
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2356,11 +2346,11 @@ var $e = class extends w {
|
|
|
2356
2346
|
return v(e.data);
|
|
2357
2347
|
}
|
|
2358
2348
|
};
|
|
2359
|
-
|
|
2360
|
-
typeName:
|
|
2361
|
-
...
|
|
2349
|
+
rt.create = (e) => new rt({
|
|
2350
|
+
typeName: U.ZodVoid,
|
|
2351
|
+
...S(e)
|
|
2362
2352
|
});
|
|
2363
|
-
var
|
|
2353
|
+
var D = class e extends C {
|
|
2364
2354
|
_parse(e) {
|
|
2365
2355
|
let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
|
|
2366
2356
|
if (t.parsedType !== u.array) return h(t, {
|
|
@@ -2394,8 +2384,8 @@ var j = class e extends w {
|
|
|
2394
2384
|
inclusive: !0,
|
|
2395
2385
|
exact: !1,
|
|
2396
2386
|
message: r.maxLength.message
|
|
2397
|
-
}), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new
|
|
2398
|
-
let i = [...t.data].map((e, n) => r.type._parseSync(new
|
|
2387
|
+
}), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new x(t, e, t.path, n)))).then((e) => g.mergeArray(n, e));
|
|
2388
|
+
let i = [...t.data].map((e, n) => r.type._parseSync(new x(t, e, t.path, n)));
|
|
2399
2389
|
return g.mergeArray(n, i);
|
|
2400
2390
|
}
|
|
2401
2391
|
get element() {
|
|
@@ -2406,7 +2396,7 @@ var j = class e extends w {
|
|
|
2406
2396
|
...this._def,
|
|
2407
2397
|
minLength: {
|
|
2408
2398
|
value: t,
|
|
2409
|
-
message:
|
|
2399
|
+
message: b.toString(n)
|
|
2410
2400
|
}
|
|
2411
2401
|
});
|
|
2412
2402
|
}
|
|
@@ -2415,7 +2405,7 @@ var j = class e extends w {
|
|
|
2415
2405
|
...this._def,
|
|
2416
2406
|
maxLength: {
|
|
2417
2407
|
value: t,
|
|
2418
|
-
message:
|
|
2408
|
+
message: b.toString(n)
|
|
2419
2409
|
}
|
|
2420
2410
|
});
|
|
2421
2411
|
}
|
|
@@ -2424,7 +2414,7 @@ var j = class e extends w {
|
|
|
2424
2414
|
...this._def,
|
|
2425
2415
|
exactLength: {
|
|
2426
2416
|
value: t,
|
|
2427
|
-
message:
|
|
2417
|
+
message: b.toString(n)
|
|
2428
2418
|
}
|
|
2429
2419
|
});
|
|
2430
2420
|
}
|
|
@@ -2432,32 +2422,32 @@ var j = class e extends w {
|
|
|
2432
2422
|
return this.min(1, e);
|
|
2433
2423
|
}
|
|
2434
2424
|
};
|
|
2435
|
-
|
|
2425
|
+
D.create = (e, t) => new D({
|
|
2436
2426
|
type: e,
|
|
2437
2427
|
minLength: null,
|
|
2438
2428
|
maxLength: null,
|
|
2439
2429
|
exactLength: null,
|
|
2440
|
-
typeName:
|
|
2441
|
-
...
|
|
2430
|
+
typeName: U.ZodArray,
|
|
2431
|
+
...S(t)
|
|
2442
2432
|
});
|
|
2443
|
-
function
|
|
2444
|
-
if (e instanceof
|
|
2433
|
+
function O(e) {
|
|
2434
|
+
if (e instanceof k) {
|
|
2445
2435
|
let t = {};
|
|
2446
2436
|
for (let n in e.shape) {
|
|
2447
2437
|
let r = e.shape[n];
|
|
2448
|
-
t[n] =
|
|
2438
|
+
t[n] = z.create(O(r));
|
|
2449
2439
|
}
|
|
2450
|
-
return new
|
|
2440
|
+
return new k({
|
|
2451
2441
|
...e._def,
|
|
2452
2442
|
shape: () => t
|
|
2453
2443
|
});
|
|
2454
2444
|
}
|
|
2455
|
-
return e instanceof
|
|
2445
|
+
return e instanceof D ? new D({
|
|
2456
2446
|
...e._def,
|
|
2457
|
-
type:
|
|
2458
|
-
}) : e instanceof
|
|
2447
|
+
type: O(e.element)
|
|
2448
|
+
}) : e instanceof z ? z.create(O(e.unwrap())) : e instanceof B ? B.create(O(e.unwrap())) : e instanceof M ? M.create(e.items.map((e) => O(e))) : e;
|
|
2459
2449
|
}
|
|
2460
|
-
var
|
|
2450
|
+
var k = class e extends C {
|
|
2461
2451
|
constructor() {
|
|
2462
2452
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
2463
2453
|
}
|
|
@@ -2479,7 +2469,7 @@ var N = class e extends w {
|
|
|
2479
2469
|
}), _;
|
|
2480
2470
|
}
|
|
2481
2471
|
let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
|
|
2482
|
-
if (!(this._def.catchall instanceof
|
|
2472
|
+
if (!(this._def.catchall instanceof E && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
|
|
2483
2473
|
let o = [];
|
|
2484
2474
|
for (let e of i) {
|
|
2485
2475
|
let t = r[e], i = n.data[e];
|
|
@@ -2488,11 +2478,11 @@ var N = class e extends w {
|
|
|
2488
2478
|
status: "valid",
|
|
2489
2479
|
value: e
|
|
2490
2480
|
},
|
|
2491
|
-
value: t._parse(new
|
|
2481
|
+
value: t._parse(new x(n, i, n.path, e)),
|
|
2492
2482
|
alwaysSet: e in n.data
|
|
2493
2483
|
});
|
|
2494
2484
|
}
|
|
2495
|
-
if (this._def.catchall instanceof
|
|
2485
|
+
if (this._def.catchall instanceof E) {
|
|
2496
2486
|
let e = this._def.unknownKeys;
|
|
2497
2487
|
if (e === "passthrough") for (let e of a) o.push({
|
|
2498
2488
|
key: {
|
|
@@ -2518,7 +2508,7 @@ var N = class e extends w {
|
|
|
2518
2508
|
status: "valid",
|
|
2519
2509
|
value: t
|
|
2520
2510
|
},
|
|
2521
|
-
value: e._parse(new
|
|
2511
|
+
value: e._parse(new x(n, r, n.path, t)),
|
|
2522
2512
|
alwaysSet: t in n.data
|
|
2523
2513
|
});
|
|
2524
2514
|
}
|
|
@@ -2540,12 +2530,12 @@ var N = class e extends w {
|
|
|
2540
2530
|
return this._def.shape();
|
|
2541
2531
|
}
|
|
2542
2532
|
strict(t) {
|
|
2543
|
-
return
|
|
2533
|
+
return b.errToObj, new e({
|
|
2544
2534
|
...this._def,
|
|
2545
2535
|
unknownKeys: "strict",
|
|
2546
2536
|
...t === void 0 ? {} : { errorMap: (e, n) => {
|
|
2547
2537
|
let r = this._def.errorMap?.(e, n).message ?? n.defaultError;
|
|
2548
|
-
return e.code === "unrecognized_keys" ? { message:
|
|
2538
|
+
return e.code === "unrecognized_keys" ? { message: b.errToObj(t).message ?? r } : { message: r };
|
|
2549
2539
|
} }
|
|
2550
2540
|
});
|
|
2551
2541
|
}
|
|
@@ -2578,7 +2568,7 @@ var N = class e extends w {
|
|
|
2578
2568
|
...this._def.shape(),
|
|
2579
2569
|
...t._def.shape()
|
|
2580
2570
|
}),
|
|
2581
|
-
typeName:
|
|
2571
|
+
typeName: U.ZodObject
|
|
2582
2572
|
});
|
|
2583
2573
|
}
|
|
2584
2574
|
setKey(e, t) {
|
|
@@ -2607,7 +2597,7 @@ var N = class e extends w {
|
|
|
2607
2597
|
});
|
|
2608
2598
|
}
|
|
2609
2599
|
deepPartial() {
|
|
2610
|
-
return
|
|
2600
|
+
return O(this);
|
|
2611
2601
|
}
|
|
2612
2602
|
partial(t) {
|
|
2613
2603
|
let n = {};
|
|
@@ -2625,7 +2615,7 @@ var N = class e extends w {
|
|
|
2625
2615
|
for (let e of l.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
|
|
2626
2616
|
else {
|
|
2627
2617
|
let t = this.shape[e];
|
|
2628
|
-
for (; t instanceof
|
|
2618
|
+
for (; t instanceof z;) t = t._def.innerType;
|
|
2629
2619
|
n[e] = t;
|
|
2630
2620
|
}
|
|
2631
2621
|
return new e({
|
|
@@ -2634,29 +2624,29 @@ var N = class e extends w {
|
|
|
2634
2624
|
});
|
|
2635
2625
|
}
|
|
2636
2626
|
keyof() {
|
|
2637
|
-
return
|
|
2627
|
+
return dt(l.objectKeys(this.shape));
|
|
2638
2628
|
}
|
|
2639
2629
|
};
|
|
2640
|
-
|
|
2630
|
+
k.create = (e, t) => new k({
|
|
2641
2631
|
shape: () => e,
|
|
2642
2632
|
unknownKeys: "strip",
|
|
2643
|
-
catchall:
|
|
2644
|
-
typeName:
|
|
2645
|
-
...
|
|
2646
|
-
}),
|
|
2633
|
+
catchall: E.create(),
|
|
2634
|
+
typeName: U.ZodObject,
|
|
2635
|
+
...S(t)
|
|
2636
|
+
}), k.strictCreate = (e, t) => new k({
|
|
2647
2637
|
shape: () => e,
|
|
2648
2638
|
unknownKeys: "strict",
|
|
2649
|
-
catchall:
|
|
2650
|
-
typeName:
|
|
2651
|
-
...
|
|
2652
|
-
}),
|
|
2639
|
+
catchall: E.create(),
|
|
2640
|
+
typeName: U.ZodObject,
|
|
2641
|
+
...S(t)
|
|
2642
|
+
}), k.lazycreate = (e, t) => new k({
|
|
2653
2643
|
shape: e,
|
|
2654
2644
|
unknownKeys: "strip",
|
|
2655
|
-
catchall:
|
|
2656
|
-
typeName:
|
|
2657
|
-
...
|
|
2645
|
+
catchall: E.create(),
|
|
2646
|
+
typeName: U.ZodObject,
|
|
2647
|
+
...S(t)
|
|
2658
2648
|
});
|
|
2659
|
-
var
|
|
2649
|
+
var A = class extends C {
|
|
2660
2650
|
_parse(e) {
|
|
2661
2651
|
let { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2662
2652
|
function r(e) {
|
|
@@ -2719,12 +2709,12 @@ var P = class extends w {
|
|
|
2719
2709
|
return this._def.options;
|
|
2720
2710
|
}
|
|
2721
2711
|
};
|
|
2722
|
-
|
|
2712
|
+
A.create = (e, t) => new A({
|
|
2723
2713
|
options: e,
|
|
2724
|
-
typeName:
|
|
2725
|
-
...
|
|
2714
|
+
typeName: U.ZodUnion,
|
|
2715
|
+
...S(t)
|
|
2726
2716
|
});
|
|
2727
|
-
var
|
|
2717
|
+
var j = (e) => e instanceof N ? j(e.schema) : e instanceof R ? j(e.innerType()) : e instanceof P ? [e.value] : e instanceof F ? e.options : e instanceof I ? l.objectValues(e.enum) : e instanceof V ? j(e._def.innerType) : e instanceof w ? [void 0] : e instanceof tt ? [null] : e instanceof z ? [void 0, ...j(e.unwrap())] : e instanceof B ? [null, ...j(e.unwrap())] : e instanceof pt || e instanceof ht ? j(e.unwrap()) : e instanceof H ? j(e._def.innerType) : [], it = class e extends C {
|
|
2728
2718
|
_parse(e) {
|
|
2729
2719
|
let { ctx: t } = this._processInputParams(e);
|
|
2730
2720
|
if (t.parsedType !== u.object) return h(t, {
|
|
@@ -2759,7 +2749,7 @@ var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType())
|
|
|
2759
2749
|
static create(t, n, r) {
|
|
2760
2750
|
let i = /* @__PURE__ */ new Map();
|
|
2761
2751
|
for (let e of n) {
|
|
2762
|
-
let n =
|
|
2752
|
+
let n = j(e.shape[t]);
|
|
2763
2753
|
if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
2764
2754
|
for (let r of n) {
|
|
2765
2755
|
if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
|
|
@@ -2767,15 +2757,15 @@ var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType())
|
|
|
2767
2757
|
}
|
|
2768
2758
|
}
|
|
2769
2759
|
return new e({
|
|
2770
|
-
typeName:
|
|
2760
|
+
typeName: U.ZodDiscriminatedUnion,
|
|
2771
2761
|
discriminator: t,
|
|
2772
2762
|
options: n,
|
|
2773
2763
|
optionsMap: i,
|
|
2774
|
-
...
|
|
2764
|
+
...S(r)
|
|
2775
2765
|
});
|
|
2776
2766
|
}
|
|
2777
2767
|
};
|
|
2778
|
-
function
|
|
2768
|
+
function at(e, t) {
|
|
2779
2769
|
let n = d(e), r = d(t);
|
|
2780
2770
|
if (e === t) return {
|
|
2781
2771
|
valid: !0,
|
|
@@ -2787,7 +2777,7 @@ function tt(e, t) {
|
|
|
2787
2777
|
...t
|
|
2788
2778
|
};
|
|
2789
2779
|
for (let n of r) {
|
|
2790
|
-
let r =
|
|
2780
|
+
let r = at(e[n], t[n]);
|
|
2791
2781
|
if (!r.valid) return { valid: !1 };
|
|
2792
2782
|
i[n] = r.data;
|
|
2793
2783
|
}
|
|
@@ -2800,7 +2790,7 @@ function tt(e, t) {
|
|
|
2800
2790
|
if (e.length !== t.length) return { valid: !1 };
|
|
2801
2791
|
let n = [];
|
|
2802
2792
|
for (let r = 0; r < e.length; r++) {
|
|
2803
|
-
let i = e[r], a = t[r], o =
|
|
2793
|
+
let i = e[r], a = t[r], o = at(i, a);
|
|
2804
2794
|
if (!o.valid) return { valid: !1 };
|
|
2805
2795
|
n.push(o.data);
|
|
2806
2796
|
}
|
|
@@ -2814,11 +2804,11 @@ function tt(e, t) {
|
|
|
2814
2804
|
data: e
|
|
2815
2805
|
} : { valid: !1 };
|
|
2816
2806
|
}
|
|
2817
|
-
var
|
|
2807
|
+
var ot = class extends C {
|
|
2818
2808
|
_parse(e) {
|
|
2819
2809
|
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2820
2810
|
if (be(e) || be(r)) return _;
|
|
2821
|
-
let i =
|
|
2811
|
+
let i = at(e.value, r.value);
|
|
2822
2812
|
return i.valid ? ((xe(e) || xe(r)) && t.dirty(), {
|
|
2823
2813
|
status: t.value,
|
|
2824
2814
|
value: i.data
|
|
@@ -2843,13 +2833,13 @@ var I = class extends w {
|
|
|
2843
2833
|
}));
|
|
2844
2834
|
}
|
|
2845
2835
|
};
|
|
2846
|
-
|
|
2836
|
+
ot.create = (e, t, n) => new ot({
|
|
2847
2837
|
left: e,
|
|
2848
2838
|
right: t,
|
|
2849
|
-
typeName:
|
|
2850
|
-
...
|
|
2839
|
+
typeName: U.ZodIntersection,
|
|
2840
|
+
...S(n)
|
|
2851
2841
|
});
|
|
2852
|
-
var
|
|
2842
|
+
var M = class e extends C {
|
|
2853
2843
|
_parse(e) {
|
|
2854
2844
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2855
2845
|
if (n.parsedType !== u.array) return h(n, {
|
|
@@ -2873,7 +2863,7 @@ var L = class e extends w {
|
|
|
2873
2863
|
}), t.dirty());
|
|
2874
2864
|
let r = [...n.data].map((e, t) => {
|
|
2875
2865
|
let r = this._def.items[t] || this._def.rest;
|
|
2876
|
-
return r ? r._parse(new
|
|
2866
|
+
return r ? r._parse(new x(n, e, n.path, t)) : null;
|
|
2877
2867
|
}).filter((e) => !!e);
|
|
2878
2868
|
return n.common.async ? Promise.all(r).then((e) => g.mergeArray(t, e)) : g.mergeArray(t, r);
|
|
2879
2869
|
}
|
|
@@ -2887,16 +2877,16 @@ var L = class e extends w {
|
|
|
2887
2877
|
});
|
|
2888
2878
|
}
|
|
2889
2879
|
};
|
|
2890
|
-
|
|
2880
|
+
M.create = (e, t) => {
|
|
2891
2881
|
if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2892
|
-
return new
|
|
2882
|
+
return new M({
|
|
2893
2883
|
items: e,
|
|
2894
|
-
typeName:
|
|
2884
|
+
typeName: U.ZodTuple,
|
|
2895
2885
|
rest: null,
|
|
2896
|
-
...
|
|
2886
|
+
...S(t)
|
|
2897
2887
|
});
|
|
2898
2888
|
};
|
|
2899
|
-
var
|
|
2889
|
+
var st = class e extends C {
|
|
2900
2890
|
get keySchema() {
|
|
2901
2891
|
return this._def.keyType;
|
|
2902
2892
|
}
|
|
@@ -2912,8 +2902,8 @@ var nt = class e extends w {
|
|
|
2912
2902
|
}), _;
|
|
2913
2903
|
let r = [], i = this._def.keyType, a = this._def.valueType;
|
|
2914
2904
|
for (let e in n.data) r.push({
|
|
2915
|
-
key: i._parse(new
|
|
2916
|
-
value: a._parse(new
|
|
2905
|
+
key: i._parse(new x(n, e, n.path, e)),
|
|
2906
|
+
value: a._parse(new x(n, n.data[e], n.path, e)),
|
|
2917
2907
|
alwaysSet: e in n.data
|
|
2918
2908
|
});
|
|
2919
2909
|
return n.common.async ? g.mergeObjectAsync(t, r) : g.mergeObjectSync(t, r);
|
|
@@ -2922,19 +2912,19 @@ var nt = class e extends w {
|
|
|
2922
2912
|
return this._def.valueType;
|
|
2923
2913
|
}
|
|
2924
2914
|
static create(t, n, r) {
|
|
2925
|
-
return n instanceof
|
|
2915
|
+
return n instanceof C ? new e({
|
|
2926
2916
|
keyType: t,
|
|
2927
2917
|
valueType: n,
|
|
2928
|
-
typeName:
|
|
2929
|
-
...
|
|
2918
|
+
typeName: U.ZodRecord,
|
|
2919
|
+
...S(r)
|
|
2930
2920
|
}) : new e({
|
|
2931
|
-
keyType:
|
|
2921
|
+
keyType: Je.create(),
|
|
2932
2922
|
valueType: t,
|
|
2933
|
-
typeName:
|
|
2934
|
-
...
|
|
2923
|
+
typeName: U.ZodRecord,
|
|
2924
|
+
...S(n)
|
|
2935
2925
|
});
|
|
2936
2926
|
}
|
|
2937
|
-
},
|
|
2927
|
+
}, ct = class extends C {
|
|
2938
2928
|
get keySchema() {
|
|
2939
2929
|
return this._def.keyType;
|
|
2940
2930
|
}
|
|
@@ -2949,8 +2939,8 @@ var nt = class e extends w {
|
|
|
2949
2939
|
received: n.parsedType
|
|
2950
2940
|
}), _;
|
|
2951
2941
|
let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
|
|
2952
|
-
key: r._parse(new
|
|
2953
|
-
value: i._parse(new
|
|
2942
|
+
key: r._parse(new x(n, e, n.path, [a, "key"])),
|
|
2943
|
+
value: i._parse(new x(n, t, n.path, [a, "value"]))
|
|
2954
2944
|
}));
|
|
2955
2945
|
if (n.common.async) {
|
|
2956
2946
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -2980,13 +2970,13 @@ var nt = class e extends w {
|
|
|
2980
2970
|
}
|
|
2981
2971
|
}
|
|
2982
2972
|
};
|
|
2983
|
-
|
|
2973
|
+
ct.create = (e, t, n) => new ct({
|
|
2984
2974
|
valueType: t,
|
|
2985
2975
|
keyType: e,
|
|
2986
|
-
typeName:
|
|
2987
|
-
...
|
|
2976
|
+
typeName: U.ZodMap,
|
|
2977
|
+
...S(n)
|
|
2988
2978
|
});
|
|
2989
|
-
var
|
|
2979
|
+
var lt = class e extends C {
|
|
2990
2980
|
_parse(e) {
|
|
2991
2981
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2992
2982
|
if (n.parsedType !== u.set) return h(n, {
|
|
@@ -3022,7 +3012,7 @@ var it = class e extends w {
|
|
|
3022
3012
|
value: n
|
|
3023
3013
|
};
|
|
3024
3014
|
}
|
|
3025
|
-
let o = [...n.data.values()].map((e, t) => i._parse(new
|
|
3015
|
+
let o = [...n.data.values()].map((e, t) => i._parse(new x(n, e, n.path, t)));
|
|
3026
3016
|
return n.common.async ? Promise.all(o).then((e) => a(e)) : a(o);
|
|
3027
3017
|
}
|
|
3028
3018
|
min(t, n) {
|
|
@@ -3030,7 +3020,7 @@ var it = class e extends w {
|
|
|
3030
3020
|
...this._def,
|
|
3031
3021
|
minSize: {
|
|
3032
3022
|
value: t,
|
|
3033
|
-
message:
|
|
3023
|
+
message: b.toString(n)
|
|
3034
3024
|
}
|
|
3035
3025
|
});
|
|
3036
3026
|
}
|
|
@@ -3039,7 +3029,7 @@ var it = class e extends w {
|
|
|
3039
3029
|
...this._def,
|
|
3040
3030
|
maxSize: {
|
|
3041
3031
|
value: t,
|
|
3042
|
-
message:
|
|
3032
|
+
message: b.toString(n)
|
|
3043
3033
|
}
|
|
3044
3034
|
});
|
|
3045
3035
|
}
|
|
@@ -3050,14 +3040,14 @@ var it = class e extends w {
|
|
|
3050
3040
|
return this.min(1, e);
|
|
3051
3041
|
}
|
|
3052
3042
|
};
|
|
3053
|
-
|
|
3043
|
+
lt.create = (e, t) => new lt({
|
|
3054
3044
|
valueType: e,
|
|
3055
3045
|
minSize: null,
|
|
3056
3046
|
maxSize: null,
|
|
3057
|
-
typeName:
|
|
3058
|
-
...
|
|
3047
|
+
typeName: U.ZodSet,
|
|
3048
|
+
...S(t)
|
|
3059
3049
|
});
|
|
3060
|
-
var
|
|
3050
|
+
var ut = class e extends C {
|
|
3061
3051
|
constructor() {
|
|
3062
3052
|
super(...arguments), this.validate = this.implement;
|
|
3063
3053
|
}
|
|
@@ -3101,7 +3091,7 @@ var at = class e extends w {
|
|
|
3101
3091
|
});
|
|
3102
3092
|
}
|
|
3103
3093
|
let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
3104
|
-
if (this._def.returns instanceof
|
|
3094
|
+
if (this._def.returns instanceof L) {
|
|
3105
3095
|
let e = this;
|
|
3106
3096
|
return v(async function(...t) {
|
|
3107
3097
|
let o = new p([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
|
|
@@ -3132,7 +3122,7 @@ var at = class e extends w {
|
|
|
3132
3122
|
args(...t) {
|
|
3133
3123
|
return new e({
|
|
3134
3124
|
...this._def,
|
|
3135
|
-
args:
|
|
3125
|
+
args: M.create(t).rest(T.create())
|
|
3136
3126
|
});
|
|
3137
3127
|
}
|
|
3138
3128
|
returns(t) {
|
|
@@ -3149,13 +3139,13 @@ var at = class e extends w {
|
|
|
3149
3139
|
}
|
|
3150
3140
|
static create(t, n, r) {
|
|
3151
3141
|
return new e({
|
|
3152
|
-
args: t ||
|
|
3153
|
-
returns: n ||
|
|
3154
|
-
typeName:
|
|
3155
|
-
...
|
|
3142
|
+
args: t || M.create([]).rest(T.create()),
|
|
3143
|
+
returns: n || T.create(),
|
|
3144
|
+
typeName: U.ZodFunction,
|
|
3145
|
+
...S(r)
|
|
3156
3146
|
});
|
|
3157
3147
|
}
|
|
3158
|
-
},
|
|
3148
|
+
}, N = class extends C {
|
|
3159
3149
|
get schema() {
|
|
3160
3150
|
return this._def.getter();
|
|
3161
3151
|
}
|
|
@@ -3168,12 +3158,12 @@ var at = class e extends w {
|
|
|
3168
3158
|
});
|
|
3169
3159
|
}
|
|
3170
3160
|
};
|
|
3171
|
-
|
|
3161
|
+
N.create = (e, t) => new N({
|
|
3172
3162
|
getter: e,
|
|
3173
|
-
typeName:
|
|
3174
|
-
...
|
|
3163
|
+
typeName: U.ZodLazy,
|
|
3164
|
+
...S(t)
|
|
3175
3165
|
});
|
|
3176
|
-
var
|
|
3166
|
+
var P = class extends C {
|
|
3177
3167
|
_parse(e) {
|
|
3178
3168
|
if (e.data !== this._def.value) {
|
|
3179
3169
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3192,19 +3182,19 @@ var z = class extends w {
|
|
|
3192
3182
|
return this._def.value;
|
|
3193
3183
|
}
|
|
3194
3184
|
};
|
|
3195
|
-
|
|
3185
|
+
P.create = (e, t) => new P({
|
|
3196
3186
|
value: e,
|
|
3197
|
-
typeName:
|
|
3198
|
-
...
|
|
3187
|
+
typeName: U.ZodLiteral,
|
|
3188
|
+
...S(t)
|
|
3199
3189
|
});
|
|
3200
|
-
function
|
|
3201
|
-
return new
|
|
3190
|
+
function dt(e, t) {
|
|
3191
|
+
return new F({
|
|
3202
3192
|
values: e,
|
|
3203
|
-
typeName:
|
|
3204
|
-
...
|
|
3193
|
+
typeName: U.ZodEnum,
|
|
3194
|
+
...S(t)
|
|
3205
3195
|
});
|
|
3206
3196
|
}
|
|
3207
|
-
var
|
|
3197
|
+
var F = class e extends C {
|
|
3208
3198
|
_parse(e) {
|
|
3209
3199
|
if (typeof e.data != "string") {
|
|
3210
3200
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -3255,8 +3245,8 @@ var B = class e extends w {
|
|
|
3255
3245
|
});
|
|
3256
3246
|
}
|
|
3257
3247
|
};
|
|
3258
|
-
|
|
3259
|
-
var
|
|
3248
|
+
F.create = dt;
|
|
3249
|
+
var I = class extends C {
|
|
3260
3250
|
_parse(e) {
|
|
3261
3251
|
let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3262
3252
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -3281,12 +3271,12 @@ var V = class extends w {
|
|
|
3281
3271
|
return this._def.values;
|
|
3282
3272
|
}
|
|
3283
3273
|
};
|
|
3284
|
-
|
|
3274
|
+
I.create = (e, t) => new I({
|
|
3285
3275
|
values: e,
|
|
3286
|
-
typeName:
|
|
3287
|
-
...
|
|
3276
|
+
typeName: U.ZodNativeEnum,
|
|
3277
|
+
...S(t)
|
|
3288
3278
|
});
|
|
3289
|
-
var
|
|
3279
|
+
var L = class extends C {
|
|
3290
3280
|
unwrap() {
|
|
3291
3281
|
return this._def.type;
|
|
3292
3282
|
}
|
|
@@ -3302,17 +3292,17 @@ var H = class extends w {
|
|
|
3302
3292
|
})));
|
|
3303
3293
|
}
|
|
3304
3294
|
};
|
|
3305
|
-
|
|
3295
|
+
L.create = (e, t) => new L({
|
|
3306
3296
|
type: e,
|
|
3307
|
-
typeName:
|
|
3308
|
-
...
|
|
3297
|
+
typeName: U.ZodPromise,
|
|
3298
|
+
...S(t)
|
|
3309
3299
|
});
|
|
3310
|
-
var
|
|
3300
|
+
var R = class extends C {
|
|
3311
3301
|
innerType() {
|
|
3312
3302
|
return this._def.schema;
|
|
3313
3303
|
}
|
|
3314
3304
|
sourceType() {
|
|
3315
|
-
return this._def.schema._def.typeName ===
|
|
3305
|
+
return this._def.schema._def.typeName === U.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3316
3306
|
}
|
|
3317
3307
|
_parse(e) {
|
|
3318
3308
|
let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
|
|
@@ -3398,21 +3388,21 @@ var U = class extends w {
|
|
|
3398
3388
|
l.assertNever(r);
|
|
3399
3389
|
}
|
|
3400
3390
|
};
|
|
3401
|
-
|
|
3391
|
+
R.create = (e, t, n) => new R({
|
|
3402
3392
|
schema: e,
|
|
3403
|
-
typeName:
|
|
3393
|
+
typeName: U.ZodEffects,
|
|
3404
3394
|
effect: t,
|
|
3405
|
-
...
|
|
3406
|
-
}),
|
|
3395
|
+
...S(n)
|
|
3396
|
+
}), R.createWithPreprocess = (e, t, n) => new R({
|
|
3407
3397
|
schema: t,
|
|
3408
3398
|
effect: {
|
|
3409
3399
|
type: "preprocess",
|
|
3410
3400
|
transform: e
|
|
3411
3401
|
},
|
|
3412
|
-
typeName:
|
|
3413
|
-
...
|
|
3402
|
+
typeName: U.ZodEffects,
|
|
3403
|
+
...S(n)
|
|
3414
3404
|
});
|
|
3415
|
-
var
|
|
3405
|
+
var z = class extends C {
|
|
3416
3406
|
_parse(e) {
|
|
3417
3407
|
return this._getType(e) === u.undefined ? v(void 0) : this._def.innerType._parse(e);
|
|
3418
3408
|
}
|
|
@@ -3420,12 +3410,12 @@ var W = class extends w {
|
|
|
3420
3410
|
return this._def.innerType;
|
|
3421
3411
|
}
|
|
3422
3412
|
};
|
|
3423
|
-
|
|
3413
|
+
z.create = (e, t) => new z({
|
|
3424
3414
|
innerType: e,
|
|
3425
|
-
typeName:
|
|
3426
|
-
...
|
|
3415
|
+
typeName: U.ZodOptional,
|
|
3416
|
+
...S(t)
|
|
3427
3417
|
});
|
|
3428
|
-
var
|
|
3418
|
+
var B = class extends C {
|
|
3429
3419
|
_parse(e) {
|
|
3430
3420
|
return this._getType(e) === u.null ? v(null) : this._def.innerType._parse(e);
|
|
3431
3421
|
}
|
|
@@ -3433,12 +3423,12 @@ var G = class extends w {
|
|
|
3433
3423
|
return this._def.innerType;
|
|
3434
3424
|
}
|
|
3435
3425
|
};
|
|
3436
|
-
|
|
3426
|
+
B.create = (e, t) => new B({
|
|
3437
3427
|
innerType: e,
|
|
3438
|
-
typeName:
|
|
3439
|
-
...
|
|
3428
|
+
typeName: U.ZodNullable,
|
|
3429
|
+
...S(t)
|
|
3440
3430
|
});
|
|
3441
|
-
var
|
|
3431
|
+
var V = class extends C {
|
|
3442
3432
|
_parse(e) {
|
|
3443
3433
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3444
3434
|
return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
@@ -3451,13 +3441,13 @@ var K = class extends w {
|
|
|
3451
3441
|
return this._def.innerType;
|
|
3452
3442
|
}
|
|
3453
3443
|
};
|
|
3454
|
-
|
|
3444
|
+
V.create = (e, t) => new V({
|
|
3455
3445
|
innerType: e,
|
|
3456
|
-
typeName:
|
|
3446
|
+
typeName: U.ZodDefault,
|
|
3457
3447
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
3458
|
-
...
|
|
3448
|
+
...S(t)
|
|
3459
3449
|
});
|
|
3460
|
-
var
|
|
3450
|
+
var H = class extends C {
|
|
3461
3451
|
_parse(e) {
|
|
3462
3452
|
let { ctx: t } = this._processInputParams(e), n = {
|
|
3463
3453
|
...t,
|
|
@@ -3470,7 +3460,7 @@ var q = class extends w {
|
|
|
3470
3460
|
path: n.path,
|
|
3471
3461
|
parent: { ...n }
|
|
3472
3462
|
});
|
|
3473
|
-
return
|
|
3463
|
+
return Se(r) ? r.then((e) => ({
|
|
3474
3464
|
status: "valid",
|
|
3475
3465
|
value: e.status === "valid" ? e.value : this._def.catchValue({
|
|
3476
3466
|
get error() {
|
|
@@ -3492,13 +3482,13 @@ var q = class extends w {
|
|
|
3492
3482
|
return this._def.innerType;
|
|
3493
3483
|
}
|
|
3494
3484
|
};
|
|
3495
|
-
|
|
3485
|
+
H.create = (e, t) => new H({
|
|
3496
3486
|
innerType: e,
|
|
3497
|
-
typeName:
|
|
3487
|
+
typeName: U.ZodCatch,
|
|
3498
3488
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
3499
|
-
...
|
|
3489
|
+
...S(t)
|
|
3500
3490
|
});
|
|
3501
|
-
var
|
|
3491
|
+
var ft = class extends C {
|
|
3502
3492
|
_parse(e) {
|
|
3503
3493
|
if (this._getType(e) !== u.nan) {
|
|
3504
3494
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3514,11 +3504,11 @@ var st = class extends w {
|
|
|
3514
3504
|
};
|
|
3515
3505
|
}
|
|
3516
3506
|
};
|
|
3517
|
-
|
|
3518
|
-
typeName:
|
|
3519
|
-
...
|
|
3507
|
+
ft.create = (e) => new ft({
|
|
3508
|
+
typeName: U.ZodNaN,
|
|
3509
|
+
...S(e)
|
|
3520
3510
|
});
|
|
3521
|
-
var
|
|
3511
|
+
var pt = class extends C {
|
|
3522
3512
|
_parse(e) {
|
|
3523
3513
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3524
3514
|
return this._def.type._parse({
|
|
@@ -3530,7 +3520,7 @@ var ct = class extends w {
|
|
|
3530
3520
|
unwrap() {
|
|
3531
3521
|
return this._def.type;
|
|
3532
3522
|
}
|
|
3533
|
-
},
|
|
3523
|
+
}, mt = class e extends C {
|
|
3534
3524
|
_parse(e) {
|
|
3535
3525
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3536
3526
|
if (n.common.async) return (async () => {
|
|
@@ -3565,256 +3555,1022 @@ var ct = class extends w {
|
|
|
3565
3555
|
return new e({
|
|
3566
3556
|
in: t,
|
|
3567
3557
|
out: n,
|
|
3568
|
-
typeName:
|
|
3558
|
+
typeName: U.ZodPipeline
|
|
3569
3559
|
});
|
|
3570
3560
|
}
|
|
3571
|
-
},
|
|
3561
|
+
}, ht = class extends C {
|
|
3572
3562
|
_parse(e) {
|
|
3573
3563
|
let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
|
|
3574
|
-
return
|
|
3564
|
+
return Se(t) ? t.then((e) => n(e)) : n(t);
|
|
3575
3565
|
}
|
|
3576
3566
|
unwrap() {
|
|
3577
3567
|
return this._def.innerType;
|
|
3578
3568
|
}
|
|
3579
3569
|
};
|
|
3580
|
-
|
|
3570
|
+
ht.create = (e, t) => new ht({
|
|
3581
3571
|
innerType: e,
|
|
3582
|
-
typeName:
|
|
3583
|
-
...
|
|
3584
|
-
}),
|
|
3585
|
-
var
|
|
3572
|
+
typeName: U.ZodReadonly,
|
|
3573
|
+
...S(t)
|
|
3574
|
+
}), k.lazycreate;
|
|
3575
|
+
var U;
|
|
3586
3576
|
(function(e) {
|
|
3587
3577
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
3588
|
-
})(
|
|
3589
|
-
var
|
|
3590
|
-
|
|
3591
|
-
var
|
|
3592
|
-
|
|
3593
|
-
var
|
|
3594
|
-
|
|
3595
|
-
var
|
|
3596
|
-
|
|
3578
|
+
})(U ||= {});
|
|
3579
|
+
var W = Je.create, gt = Xe.create;
|
|
3580
|
+
ft.create, Ze.create;
|
|
3581
|
+
var _t = Qe.create;
|
|
3582
|
+
$e.create, et.create, w.create, tt.create, nt.create, T.create, E.create, rt.create;
|
|
3583
|
+
var vt = D.create, G = k.create;
|
|
3584
|
+
k.strictCreate, A.create, it.create, ot.create, M.create, st.create, ct.create, lt.create, ut.create, N.create, P.create;
|
|
3585
|
+
var K = F.create;
|
|
3586
|
+
I.create, L.create, R.create, z.create, B.create, R.createWithPreprocess, mt.create;
|
|
3587
|
+
//#endregion
|
|
3588
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
3589
|
+
var yt = Symbol("Let zodToJsonSchema decide on which parser to use"), bt = {
|
|
3590
|
+
name: void 0,
|
|
3591
|
+
$refStrategy: "root",
|
|
3592
|
+
basePath: ["#"],
|
|
3593
|
+
effectStrategy: "input",
|
|
3594
|
+
pipeStrategy: "all",
|
|
3595
|
+
dateStrategy: "format:date-time",
|
|
3596
|
+
mapStrategy: "entries",
|
|
3597
|
+
removeAdditionalStrategy: "passthrough",
|
|
3598
|
+
allowedAdditionalProperties: !0,
|
|
3599
|
+
rejectedAdditionalProperties: !1,
|
|
3600
|
+
definitionPath: "definitions",
|
|
3601
|
+
target: "jsonSchema7",
|
|
3602
|
+
strictUnions: !1,
|
|
3603
|
+
definitions: {},
|
|
3604
|
+
errorMessages: !1,
|
|
3605
|
+
markdownDescription: !1,
|
|
3606
|
+
patternStrategy: "escape",
|
|
3607
|
+
applyRegexFlags: !1,
|
|
3608
|
+
emailStrategy: "format:email",
|
|
3609
|
+
base64Strategy: "contentEncoding:base64",
|
|
3610
|
+
nameStrategy: "ref",
|
|
3611
|
+
openAiAnyTypeName: "OpenAiAnyType"
|
|
3612
|
+
}, xt = (e) => typeof e == "string" ? {
|
|
3613
|
+
...bt,
|
|
3614
|
+
name: e
|
|
3615
|
+
} : {
|
|
3616
|
+
...bt,
|
|
3617
|
+
...e
|
|
3618
|
+
}, St = (e) => {
|
|
3619
|
+
let t = xt(e), n = t.name === void 0 ? t.basePath : [
|
|
3620
|
+
...t.basePath,
|
|
3621
|
+
t.definitionPath,
|
|
3622
|
+
t.name
|
|
3623
|
+
];
|
|
3624
|
+
return {
|
|
3625
|
+
...t,
|
|
3626
|
+
flags: { hasReferencedOpenAiAnyType: !1 },
|
|
3627
|
+
currentPath: n,
|
|
3628
|
+
propertyPath: void 0,
|
|
3629
|
+
seen: new Map(Object.entries(t.definitions).map(([e, n]) => [n._def, {
|
|
3630
|
+
def: n._def,
|
|
3631
|
+
path: [
|
|
3632
|
+
...t.basePath,
|
|
3633
|
+
t.definitionPath,
|
|
3634
|
+
e
|
|
3635
|
+
],
|
|
3636
|
+
jsonSchema: void 0
|
|
3637
|
+
}]))
|
|
3638
|
+
};
|
|
3639
|
+
};
|
|
3640
|
+
//#endregion
|
|
3641
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
3642
|
+
function Ct(e, t, n, r) {
|
|
3643
|
+
r?.errorMessages && n && (e.errorMessage = {
|
|
3644
|
+
...e.errorMessage,
|
|
3645
|
+
[t]: n
|
|
3646
|
+
});
|
|
3647
|
+
}
|
|
3648
|
+
function q(e, t, n, r, i) {
|
|
3649
|
+
e[t] = n, Ct(e, t, r, i);
|
|
3650
|
+
}
|
|
3651
|
+
//#endregion
|
|
3652
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
3653
|
+
var wt = (e, t) => {
|
|
3654
|
+
let n = 0;
|
|
3655
|
+
for (; n < e.length && n < t.length && e[n] === t[n]; n++);
|
|
3656
|
+
return [(e.length - n).toString(), ...t.slice(n)].join("/");
|
|
3657
|
+
};
|
|
3658
|
+
//#endregion
|
|
3659
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
3660
|
+
function J(e) {
|
|
3661
|
+
if (e.target !== "openAi") return {};
|
|
3662
|
+
let t = [
|
|
3663
|
+
...e.basePath,
|
|
3664
|
+
e.definitionPath,
|
|
3665
|
+
e.openAiAnyTypeName
|
|
3666
|
+
];
|
|
3667
|
+
return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? wt(t, e.currentPath) : t.join("/") };
|
|
3668
|
+
}
|
|
3669
|
+
//#endregion
|
|
3670
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
3671
|
+
function Tt(e, t) {
|
|
3672
|
+
let n = { type: "array" };
|
|
3673
|
+
return e.type?._def && e.type?._def?.typeName !== U.ZodAny && (n.items = Q(e.type._def, {
|
|
3674
|
+
...t,
|
|
3675
|
+
currentPath: [...t.currentPath, "items"]
|
|
3676
|
+
})), e.minLength && q(n, "minItems", e.minLength.value, e.minLength.message, t), e.maxLength && q(n, "maxItems", e.maxLength.value, e.maxLength.message, t), e.exactLength && (q(n, "minItems", e.exactLength.value, e.exactLength.message, t), q(n, "maxItems", e.exactLength.value, e.exactLength.message, t)), n;
|
|
3677
|
+
}
|
|
3678
|
+
//#endregion
|
|
3679
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
3680
|
+
function Et(e, t) {
|
|
3681
|
+
let n = {
|
|
3682
|
+
type: "integer",
|
|
3683
|
+
format: "int64"
|
|
3684
|
+
};
|
|
3685
|
+
if (!e.checks) return n;
|
|
3686
|
+
for (let r of e.checks) switch (r.kind) {
|
|
3687
|
+
case "min":
|
|
3688
|
+
t.target === "jsonSchema7" ? r.inclusive ? q(n, "minimum", r.value, r.message, t) : q(n, "exclusiveMinimum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMinimum = !0), q(n, "minimum", r.value, r.message, t));
|
|
3689
|
+
break;
|
|
3690
|
+
case "max":
|
|
3691
|
+
t.target === "jsonSchema7" ? r.inclusive ? q(n, "maximum", r.value, r.message, t) : q(n, "exclusiveMaximum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMaximum = !0), q(n, "maximum", r.value, r.message, t));
|
|
3692
|
+
break;
|
|
3693
|
+
case "multipleOf": q(n, "multipleOf", r.value, r.message, t);
|
|
3694
|
+
}
|
|
3695
|
+
return n;
|
|
3696
|
+
}
|
|
3697
|
+
//#endregion
|
|
3698
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
3699
|
+
function Dt() {
|
|
3700
|
+
return { type: "boolean" };
|
|
3701
|
+
}
|
|
3702
|
+
//#endregion
|
|
3703
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
3704
|
+
function Ot(e, t) {
|
|
3705
|
+
return Q(e.type._def, t);
|
|
3706
|
+
}
|
|
3707
|
+
//#endregion
|
|
3708
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
3709
|
+
var kt = (e, t) => Q(e.innerType._def, t);
|
|
3710
|
+
//#endregion
|
|
3711
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
3712
|
+
function At(e, t, n) {
|
|
3713
|
+
let r = n ?? t.dateStrategy;
|
|
3714
|
+
if (Array.isArray(r)) return { anyOf: r.map((n, r) => At(e, t, n)) };
|
|
3715
|
+
switch (r) {
|
|
3716
|
+
case "string":
|
|
3717
|
+
case "format:date-time": return {
|
|
3718
|
+
type: "string",
|
|
3719
|
+
format: "date-time"
|
|
3720
|
+
};
|
|
3721
|
+
case "format:date": return {
|
|
3722
|
+
type: "string",
|
|
3723
|
+
format: "date"
|
|
3724
|
+
};
|
|
3725
|
+
case "integer": return jt(e, t);
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
var jt = (e, t) => {
|
|
3729
|
+
let n = {
|
|
3730
|
+
type: "integer",
|
|
3731
|
+
format: "unix-time"
|
|
3732
|
+
};
|
|
3733
|
+
if (t.target === "openApi3") return n;
|
|
3734
|
+
for (let r of e.checks) switch (r.kind) {
|
|
3735
|
+
case "min":
|
|
3736
|
+
q(n, "minimum", r.value, r.message, t);
|
|
3737
|
+
break;
|
|
3738
|
+
case "max": q(n, "maximum", r.value, r.message, t);
|
|
3739
|
+
}
|
|
3740
|
+
return n;
|
|
3741
|
+
};
|
|
3742
|
+
//#endregion
|
|
3743
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
3744
|
+
function Mt(e, t) {
|
|
3745
|
+
return {
|
|
3746
|
+
...Q(e.innerType._def, t),
|
|
3747
|
+
default: e.defaultValue()
|
|
3748
|
+
};
|
|
3749
|
+
}
|
|
3750
|
+
//#endregion
|
|
3751
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
3752
|
+
function Nt(e, t) {
|
|
3753
|
+
return t.effectStrategy === "input" ? Q(e.schema._def, t) : J(t);
|
|
3754
|
+
}
|
|
3755
|
+
//#endregion
|
|
3756
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
3757
|
+
function Pt(e) {
|
|
3758
|
+
return {
|
|
3759
|
+
type: "string",
|
|
3760
|
+
enum: Array.from(e.values)
|
|
3761
|
+
};
|
|
3762
|
+
}
|
|
3763
|
+
//#endregion
|
|
3764
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
3765
|
+
var Ft = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
|
|
3766
|
+
function It(e, t) {
|
|
3767
|
+
let n = [Q(e.left._def, {
|
|
3768
|
+
...t,
|
|
3769
|
+
currentPath: [
|
|
3770
|
+
...t.currentPath,
|
|
3771
|
+
"allOf",
|
|
3772
|
+
"0"
|
|
3773
|
+
]
|
|
3774
|
+
}), Q(e.right._def, {
|
|
3775
|
+
...t,
|
|
3776
|
+
currentPath: [
|
|
3777
|
+
...t.currentPath,
|
|
3778
|
+
"allOf",
|
|
3779
|
+
"1"
|
|
3780
|
+
]
|
|
3781
|
+
})].filter((e) => !!e), r = t.target === "jsonSchema2019-09" ? { unevaluatedProperties: !1 } : void 0, i = [];
|
|
3782
|
+
return n.forEach((e) => {
|
|
3783
|
+
if (Ft(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
|
|
3784
|
+
else {
|
|
3785
|
+
let t = e;
|
|
3786
|
+
if ("additionalProperties" in e && e.additionalProperties === !1) {
|
|
3787
|
+
let { additionalProperties: n, ...r } = e;
|
|
3788
|
+
t = r;
|
|
3789
|
+
} else r = void 0;
|
|
3790
|
+
i.push(t);
|
|
3791
|
+
}
|
|
3792
|
+
}), i.length ? {
|
|
3793
|
+
allOf: i,
|
|
3794
|
+
...r
|
|
3795
|
+
} : void 0;
|
|
3796
|
+
}
|
|
3797
|
+
//#endregion
|
|
3798
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
3799
|
+
function Lt(e, t) {
|
|
3800
|
+
let n = typeof e.value;
|
|
3801
|
+
return n !== "bigint" && n !== "number" && n !== "boolean" && n !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : t.target === "openApi3" ? {
|
|
3802
|
+
type: n === "bigint" ? "integer" : n,
|
|
3803
|
+
enum: [e.value]
|
|
3804
|
+
} : {
|
|
3805
|
+
type: n === "bigint" ? "integer" : n,
|
|
3806
|
+
const: e.value
|
|
3807
|
+
};
|
|
3808
|
+
}
|
|
3809
|
+
//#endregion
|
|
3810
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
3811
|
+
var Rt = void 0, Y = {
|
|
3812
|
+
cuid: /^[cC][^\s-]{8,}$/,
|
|
3813
|
+
cuid2: /^[0-9a-z]+$/,
|
|
3814
|
+
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
3815
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
3816
|
+
emoji: () => (Rt === void 0 && (Rt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Rt),
|
|
3817
|
+
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
3818
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
3819
|
+
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
3820
|
+
ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
|
|
3821
|
+
ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
3822
|
+
base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
3823
|
+
base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
3824
|
+
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
3825
|
+
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
3826
|
+
};
|
|
3827
|
+
function zt(e, t) {
|
|
3828
|
+
let n = { type: "string" };
|
|
3829
|
+
if (e.checks) for (let r of e.checks) switch (r.kind) {
|
|
3830
|
+
case "min":
|
|
3831
|
+
q(n, "minLength", typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, r.message, t);
|
|
3832
|
+
break;
|
|
3833
|
+
case "max":
|
|
3834
|
+
q(n, "maxLength", typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value, r.message, t);
|
|
3835
|
+
break;
|
|
3836
|
+
case "email":
|
|
3837
|
+
switch (t.emailStrategy) {
|
|
3838
|
+
case "format:email":
|
|
3839
|
+
X(n, "email", r.message, t);
|
|
3840
|
+
break;
|
|
3841
|
+
case "format:idn-email":
|
|
3842
|
+
X(n, "idn-email", r.message, t);
|
|
3843
|
+
break;
|
|
3844
|
+
case "pattern:zod": Z(n, Y.email, r.message, t);
|
|
3845
|
+
}
|
|
3846
|
+
break;
|
|
3847
|
+
case "url":
|
|
3848
|
+
X(n, "uri", r.message, t);
|
|
3849
|
+
break;
|
|
3850
|
+
case "uuid":
|
|
3851
|
+
X(n, "uuid", r.message, t);
|
|
3852
|
+
break;
|
|
3853
|
+
case "regex":
|
|
3854
|
+
Z(n, r.regex, r.message, t);
|
|
3855
|
+
break;
|
|
3856
|
+
case "cuid":
|
|
3857
|
+
Z(n, Y.cuid, r.message, t);
|
|
3858
|
+
break;
|
|
3859
|
+
case "cuid2":
|
|
3860
|
+
Z(n, Y.cuid2, r.message, t);
|
|
3861
|
+
break;
|
|
3862
|
+
case "startsWith":
|
|
3863
|
+
Z(n, RegExp(`^${Bt(r.value, t)}`), r.message, t);
|
|
3864
|
+
break;
|
|
3865
|
+
case "endsWith":
|
|
3866
|
+
Z(n, RegExp(`${Bt(r.value, t)}$`), r.message, t);
|
|
3867
|
+
break;
|
|
3868
|
+
case "datetime":
|
|
3869
|
+
X(n, "date-time", r.message, t);
|
|
3870
|
+
break;
|
|
3871
|
+
case "date":
|
|
3872
|
+
X(n, "date", r.message, t);
|
|
3873
|
+
break;
|
|
3874
|
+
case "time":
|
|
3875
|
+
X(n, "time", r.message, t);
|
|
3876
|
+
break;
|
|
3877
|
+
case "duration":
|
|
3878
|
+
X(n, "duration", r.message, t);
|
|
3879
|
+
break;
|
|
3880
|
+
case "length":
|
|
3881
|
+
q(n, "minLength", typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, r.message, t), q(n, "maxLength", typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value, r.message, t);
|
|
3882
|
+
break;
|
|
3883
|
+
case "includes":
|
|
3884
|
+
Z(n, RegExp(Bt(r.value, t)), r.message, t);
|
|
3885
|
+
break;
|
|
3886
|
+
case "ip":
|
|
3887
|
+
r.version !== "v6" && X(n, "ipv4", r.message, t), r.version !== "v4" && X(n, "ipv6", r.message, t);
|
|
3888
|
+
break;
|
|
3889
|
+
case "base64url":
|
|
3890
|
+
Z(n, Y.base64url, r.message, t);
|
|
3891
|
+
break;
|
|
3892
|
+
case "jwt":
|
|
3893
|
+
Z(n, Y.jwt, r.message, t);
|
|
3894
|
+
break;
|
|
3895
|
+
case "cidr":
|
|
3896
|
+
r.version !== "v6" && Z(n, Y.ipv4Cidr, r.message, t), r.version !== "v4" && Z(n, Y.ipv6Cidr, r.message, t);
|
|
3897
|
+
break;
|
|
3898
|
+
case "emoji":
|
|
3899
|
+
Z(n, Y.emoji(), r.message, t);
|
|
3900
|
+
break;
|
|
3901
|
+
case "ulid":
|
|
3902
|
+
Z(n, Y.ulid, r.message, t);
|
|
3903
|
+
break;
|
|
3904
|
+
case "base64":
|
|
3905
|
+
switch (t.base64Strategy) {
|
|
3906
|
+
case "format:binary":
|
|
3907
|
+
X(n, "binary", r.message, t);
|
|
3908
|
+
break;
|
|
3909
|
+
case "contentEncoding:base64":
|
|
3910
|
+
q(n, "contentEncoding", "base64", r.message, t);
|
|
3911
|
+
break;
|
|
3912
|
+
case "pattern:zod": Z(n, Y.base64, r.message, t);
|
|
3913
|
+
}
|
|
3914
|
+
break;
|
|
3915
|
+
case "nanoid": Z(n, Y.nanoid, r.message, t);
|
|
3916
|
+
}
|
|
3917
|
+
return n;
|
|
3918
|
+
}
|
|
3919
|
+
function Bt(e, t) {
|
|
3920
|
+
return t.patternStrategy === "escape" ? Ht(e) : e;
|
|
3921
|
+
}
|
|
3922
|
+
var Vt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
3923
|
+
function Ht(e) {
|
|
3924
|
+
let t = "";
|
|
3925
|
+
for (let n = 0; n < e.length; n++) Vt.has(e[n]) || (t += "\\"), t += e[n];
|
|
3926
|
+
return t;
|
|
3927
|
+
}
|
|
3928
|
+
function X(e, t, n, r) {
|
|
3929
|
+
e.format || e.anyOf?.some((e) => e.format) ? (e.anyOf ||= [], e.format && (e.anyOf.push({
|
|
3930
|
+
format: e.format,
|
|
3931
|
+
...e.errorMessage && r.errorMessages && { errorMessage: { format: e.errorMessage.format } }
|
|
3932
|
+
}), delete e.format, e.errorMessage && (delete e.errorMessage.format, Object.keys(e.errorMessage).length === 0 && delete e.errorMessage)), e.anyOf.push({
|
|
3933
|
+
format: t,
|
|
3934
|
+
...n && r.errorMessages && { errorMessage: { format: n } }
|
|
3935
|
+
})) : q(e, "format", t, n, r);
|
|
3936
|
+
}
|
|
3937
|
+
function Z(e, t, n, r) {
|
|
3938
|
+
e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({
|
|
3939
|
+
pattern: e.pattern,
|
|
3940
|
+
...e.errorMessage && r.errorMessages && { errorMessage: { pattern: e.errorMessage.pattern } }
|
|
3941
|
+
}), delete e.pattern, e.errorMessage && (delete e.errorMessage.pattern, Object.keys(e.errorMessage).length === 0 && delete e.errorMessage)), e.allOf.push({
|
|
3942
|
+
pattern: Ut(t, r),
|
|
3943
|
+
...n && r.errorMessages && { errorMessage: { pattern: n } }
|
|
3944
|
+
})) : q(e, "pattern", Ut(t, r), n, r);
|
|
3945
|
+
}
|
|
3946
|
+
function Ut(e, t) {
|
|
3947
|
+
if (!t.applyRegexFlags || !e.flags) return e.source;
|
|
3948
|
+
let n = {
|
|
3949
|
+
i: e.flags.includes("i"),
|
|
3950
|
+
m: e.flags.includes("m"),
|
|
3951
|
+
s: e.flags.includes("s")
|
|
3952
|
+
}, r = n.i ? e.source.toLowerCase() : e.source, i = "", a = !1, o = !1, s = !1;
|
|
3953
|
+
for (let e = 0; e < r.length; e++) {
|
|
3954
|
+
if (a) {
|
|
3955
|
+
i += r[e], a = !1;
|
|
3956
|
+
continue;
|
|
3957
|
+
}
|
|
3958
|
+
if (n.i) {
|
|
3959
|
+
if (o) {
|
|
3960
|
+
if (r[e].match(/[a-z]/)) {
|
|
3961
|
+
s ? (i += r[e], i += `${r[e - 2]}-${r[e]}`.toUpperCase(), s = !1) : r[e + 1] === "-" && r[e + 2]?.match(/[a-z]/) ? (i += r[e], s = !0) : i += `${r[e]}${r[e].toUpperCase()}`;
|
|
3962
|
+
continue;
|
|
3963
|
+
}
|
|
3964
|
+
} else if (r[e].match(/[a-z]/)) {
|
|
3965
|
+
i += `[${r[e]}${r[e].toUpperCase()}]`;
|
|
3966
|
+
continue;
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
if (n.m) {
|
|
3970
|
+
if (r[e] === "^") {
|
|
3971
|
+
i += "(^|(?<=[\r\n]))";
|
|
3972
|
+
continue;
|
|
3973
|
+
}
|
|
3974
|
+
if (r[e] === "$") {
|
|
3975
|
+
i += "($|(?=[\r\n]))";
|
|
3976
|
+
continue;
|
|
3977
|
+
}
|
|
3978
|
+
}
|
|
3979
|
+
if (n.s && r[e] === ".") {
|
|
3980
|
+
i += o ? `${r[e]}\r\n` : `[${r[e]}\r\n]`;
|
|
3981
|
+
continue;
|
|
3982
|
+
}
|
|
3983
|
+
i += r[e], r[e] === "\\" ? a = !0 : o && r[e] === "]" ? o = !1 : !o && r[e] === "[" && (o = !0);
|
|
3984
|
+
}
|
|
3985
|
+
try {
|
|
3986
|
+
new RegExp(i);
|
|
3987
|
+
} catch {
|
|
3988
|
+
return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`), e.source;
|
|
3989
|
+
}
|
|
3990
|
+
return i;
|
|
3991
|
+
}
|
|
3992
|
+
//#endregion
|
|
3993
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
3994
|
+
function Wt(e, t) {
|
|
3995
|
+
if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName === U.ZodEnum) return {
|
|
3996
|
+
type: "object",
|
|
3997
|
+
required: e.keyType._def.values,
|
|
3998
|
+
properties: e.keyType._def.values.reduce((n, r) => ({
|
|
3999
|
+
...n,
|
|
4000
|
+
[r]: Q(e.valueType._def, {
|
|
4001
|
+
...t,
|
|
4002
|
+
currentPath: [
|
|
4003
|
+
...t.currentPath,
|
|
4004
|
+
"properties",
|
|
4005
|
+
r
|
|
4006
|
+
]
|
|
4007
|
+
}) ?? J(t)
|
|
4008
|
+
}), {}),
|
|
4009
|
+
additionalProperties: t.rejectedAdditionalProperties
|
|
4010
|
+
};
|
|
4011
|
+
let n = {
|
|
4012
|
+
type: "object",
|
|
4013
|
+
additionalProperties: Q(e.valueType._def, {
|
|
4014
|
+
...t,
|
|
4015
|
+
currentPath: [...t.currentPath, "additionalProperties"]
|
|
4016
|
+
}) ?? t.allowedAdditionalProperties
|
|
4017
|
+
};
|
|
4018
|
+
if (t.target === "openApi3") return n;
|
|
4019
|
+
if (e.keyType?._def.typeName === U.ZodString && e.keyType._def.checks?.length) {
|
|
4020
|
+
let { type: r, ...i } = zt(e.keyType._def, t);
|
|
4021
|
+
return {
|
|
4022
|
+
...n,
|
|
4023
|
+
propertyNames: i
|
|
4024
|
+
};
|
|
4025
|
+
}
|
|
4026
|
+
if (e.keyType?._def.typeName === U.ZodEnum) return {
|
|
4027
|
+
...n,
|
|
4028
|
+
propertyNames: { enum: e.keyType._def.values }
|
|
4029
|
+
};
|
|
4030
|
+
if (e.keyType?._def.typeName === U.ZodBranded && e.keyType._def.type._def.typeName === U.ZodString && e.keyType._def.type._def.checks?.length) {
|
|
4031
|
+
let { type: r, ...i } = Ot(e.keyType._def, t);
|
|
4032
|
+
return {
|
|
4033
|
+
...n,
|
|
4034
|
+
propertyNames: i
|
|
4035
|
+
};
|
|
4036
|
+
}
|
|
4037
|
+
return n;
|
|
4038
|
+
}
|
|
4039
|
+
//#endregion
|
|
4040
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
4041
|
+
function Gt(e, t) {
|
|
4042
|
+
return t.mapStrategy === "record" ? Wt(e, t) : {
|
|
4043
|
+
type: "array",
|
|
4044
|
+
maxItems: 125,
|
|
4045
|
+
items: {
|
|
4046
|
+
type: "array",
|
|
4047
|
+
items: [Q(e.keyType._def, {
|
|
4048
|
+
...t,
|
|
4049
|
+
currentPath: [
|
|
4050
|
+
...t.currentPath,
|
|
4051
|
+
"items",
|
|
4052
|
+
"items",
|
|
4053
|
+
"0"
|
|
4054
|
+
]
|
|
4055
|
+
}) || J(t), Q(e.valueType._def, {
|
|
4056
|
+
...t,
|
|
4057
|
+
currentPath: [
|
|
4058
|
+
...t.currentPath,
|
|
4059
|
+
"items",
|
|
4060
|
+
"items",
|
|
4061
|
+
"1"
|
|
4062
|
+
]
|
|
4063
|
+
}) || J(t)],
|
|
4064
|
+
minItems: 2,
|
|
4065
|
+
maxItems: 2
|
|
4066
|
+
}
|
|
4067
|
+
};
|
|
4068
|
+
}
|
|
4069
|
+
//#endregion
|
|
4070
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
4071
|
+
function Kt(e) {
|
|
4072
|
+
let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
|
|
4073
|
+
return {
|
|
4074
|
+
type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
4075
|
+
enum: n
|
|
4076
|
+
};
|
|
4077
|
+
}
|
|
4078
|
+
//#endregion
|
|
4079
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
4080
|
+
function qt(e) {
|
|
4081
|
+
return e.target === "openAi" ? void 0 : { not: J({
|
|
4082
|
+
...e,
|
|
4083
|
+
currentPath: [...e.currentPath, "not"]
|
|
4084
|
+
}) };
|
|
4085
|
+
}
|
|
4086
|
+
//#endregion
|
|
4087
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
4088
|
+
function Jt(e) {
|
|
4089
|
+
return e.target === "openApi3" ? {
|
|
4090
|
+
enum: ["null"],
|
|
4091
|
+
nullable: !0
|
|
4092
|
+
} : { type: "null" };
|
|
4093
|
+
}
|
|
4094
|
+
//#endregion
|
|
4095
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
4096
|
+
var Yt = {
|
|
4097
|
+
ZodString: "string",
|
|
4098
|
+
ZodNumber: "number",
|
|
4099
|
+
ZodBigInt: "integer",
|
|
4100
|
+
ZodBoolean: "boolean",
|
|
4101
|
+
ZodNull: "null"
|
|
4102
|
+
};
|
|
4103
|
+
function Xt(e, t) {
|
|
4104
|
+
if (t.target === "openApi3") return Zt(e, t);
|
|
4105
|
+
let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
|
|
4106
|
+
if (n.every((e) => e._def.typeName in Yt && (!e._def.checks || !e._def.checks.length))) {
|
|
4107
|
+
let e = n.reduce((e, t) => {
|
|
4108
|
+
let n = Yt[t._def.typeName];
|
|
4109
|
+
return n && !e.includes(n) ? [...e, n] : e;
|
|
4110
|
+
}, []);
|
|
4111
|
+
return { type: e.length > 1 ? e : e[0] };
|
|
4112
|
+
}
|
|
4113
|
+
if (n.every((e) => e._def.typeName === "ZodLiteral" && !e.description)) {
|
|
4114
|
+
let e = n.reduce((e, t) => {
|
|
4115
|
+
let n = typeof t._def.value;
|
|
4116
|
+
switch (n) {
|
|
4117
|
+
case "string":
|
|
4118
|
+
case "number":
|
|
4119
|
+
case "boolean": return [...e, n];
|
|
4120
|
+
case "bigint": return [...e, "integer"];
|
|
4121
|
+
case "object": if (t._def.value === null) return [...e, "null"];
|
|
4122
|
+
default: return e;
|
|
4123
|
+
}
|
|
4124
|
+
}, []);
|
|
4125
|
+
if (e.length === n.length) {
|
|
4126
|
+
let t = e.filter((e, t, n) => n.indexOf(e) === t);
|
|
4127
|
+
return {
|
|
4128
|
+
type: t.length > 1 ? t : t[0],
|
|
4129
|
+
enum: n.reduce((e, t) => e.includes(t._def.value) ? e : [...e, t._def.value], [])
|
|
4130
|
+
};
|
|
4131
|
+
}
|
|
4132
|
+
} else if (n.every((e) => e._def.typeName === "ZodEnum")) return {
|
|
4133
|
+
type: "string",
|
|
4134
|
+
enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
|
|
4135
|
+
};
|
|
4136
|
+
return Zt(e, t);
|
|
4137
|
+
}
|
|
4138
|
+
var Zt = (e, t) => {
|
|
4139
|
+
let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => Q(e._def, {
|
|
4140
|
+
...t,
|
|
4141
|
+
currentPath: [
|
|
4142
|
+
...t.currentPath,
|
|
4143
|
+
"anyOf",
|
|
4144
|
+
`${n}`
|
|
4145
|
+
]
|
|
4146
|
+
})).filter((e) => !!e && (!t.strictUnions || typeof e == "object" && Object.keys(e).length > 0));
|
|
4147
|
+
return n.length ? { anyOf: n } : void 0;
|
|
4148
|
+
};
|
|
4149
|
+
//#endregion
|
|
4150
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
4151
|
+
function Qt(e, t) {
|
|
4152
|
+
if ([
|
|
4153
|
+
"ZodString",
|
|
4154
|
+
"ZodNumber",
|
|
4155
|
+
"ZodBigInt",
|
|
4156
|
+
"ZodBoolean",
|
|
4157
|
+
"ZodNull"
|
|
4158
|
+
].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return t.target === "openApi3" ? {
|
|
4159
|
+
type: Yt[e.innerType._def.typeName],
|
|
4160
|
+
nullable: !0
|
|
4161
|
+
} : { type: [Yt[e.innerType._def.typeName], "null"] };
|
|
4162
|
+
if (t.target === "openApi3") {
|
|
4163
|
+
let n = Q(e.innerType._def, {
|
|
4164
|
+
...t,
|
|
4165
|
+
currentPath: [...t.currentPath]
|
|
4166
|
+
});
|
|
4167
|
+
return n && "$ref" in n ? {
|
|
4168
|
+
allOf: [n],
|
|
4169
|
+
nullable: !0
|
|
4170
|
+
} : n && {
|
|
4171
|
+
...n,
|
|
4172
|
+
nullable: !0
|
|
4173
|
+
};
|
|
4174
|
+
}
|
|
4175
|
+
let n = Q(e.innerType._def, {
|
|
4176
|
+
...t,
|
|
4177
|
+
currentPath: [
|
|
4178
|
+
...t.currentPath,
|
|
4179
|
+
"anyOf",
|
|
4180
|
+
"0"
|
|
4181
|
+
]
|
|
4182
|
+
});
|
|
4183
|
+
return n && { anyOf: [n, { type: "null" }] };
|
|
4184
|
+
}
|
|
4185
|
+
//#endregion
|
|
4186
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
4187
|
+
function $t(e, t) {
|
|
4188
|
+
let n = { type: "number" };
|
|
4189
|
+
if (!e.checks) return n;
|
|
4190
|
+
for (let r of e.checks) switch (r.kind) {
|
|
4191
|
+
case "int":
|
|
4192
|
+
n.type = "integer", Ct(n, "type", r.message, t);
|
|
4193
|
+
break;
|
|
4194
|
+
case "min":
|
|
4195
|
+
t.target === "jsonSchema7" ? r.inclusive ? q(n, "minimum", r.value, r.message, t) : q(n, "exclusiveMinimum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMinimum = !0), q(n, "minimum", r.value, r.message, t));
|
|
4196
|
+
break;
|
|
4197
|
+
case "max":
|
|
4198
|
+
t.target === "jsonSchema7" ? r.inclusive ? q(n, "maximum", r.value, r.message, t) : q(n, "exclusiveMaximum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMaximum = !0), q(n, "maximum", r.value, r.message, t));
|
|
4199
|
+
break;
|
|
4200
|
+
case "multipleOf": q(n, "multipleOf", r.value, r.message, t);
|
|
4201
|
+
}
|
|
4202
|
+
return n;
|
|
4203
|
+
}
|
|
4204
|
+
//#endregion
|
|
4205
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
4206
|
+
function en(e, t) {
|
|
4207
|
+
let n = t.target === "openAi", r = {
|
|
4208
|
+
type: "object",
|
|
4209
|
+
properties: {}
|
|
4210
|
+
}, i = [], a = e.shape();
|
|
4211
|
+
for (let e in a) {
|
|
4212
|
+
let o = a[e];
|
|
4213
|
+
if (o === void 0 || o._def === void 0) continue;
|
|
4214
|
+
let s = nn(o);
|
|
4215
|
+
s && n && (o._def.typeName === "ZodOptional" && (o = o._def.innerType), o.isNullable() || (o = o.nullable()), s = !1);
|
|
4216
|
+
let c = Q(o._def, {
|
|
4217
|
+
...t,
|
|
4218
|
+
currentPath: [
|
|
4219
|
+
...t.currentPath,
|
|
4220
|
+
"properties",
|
|
4221
|
+
e
|
|
4222
|
+
],
|
|
4223
|
+
propertyPath: [
|
|
4224
|
+
...t.currentPath,
|
|
4225
|
+
"properties",
|
|
4226
|
+
e
|
|
4227
|
+
]
|
|
4228
|
+
});
|
|
4229
|
+
c !== void 0 && (r.properties[e] = c, s || i.push(e));
|
|
4230
|
+
}
|
|
4231
|
+
i.length && (r.required = i);
|
|
4232
|
+
let o = tn(e, t);
|
|
4233
|
+
return o !== void 0 && (r.additionalProperties = o), r;
|
|
4234
|
+
}
|
|
4235
|
+
function tn(e, t) {
|
|
4236
|
+
if (e.catchall._def.typeName !== "ZodNever") return Q(e.catchall._def, {
|
|
4237
|
+
...t,
|
|
4238
|
+
currentPath: [...t.currentPath, "additionalProperties"]
|
|
4239
|
+
});
|
|
4240
|
+
switch (e.unknownKeys) {
|
|
4241
|
+
case "passthrough": return t.allowedAdditionalProperties;
|
|
4242
|
+
case "strict": return t.rejectedAdditionalProperties;
|
|
4243
|
+
case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
|
|
4244
|
+
}
|
|
4245
|
+
}
|
|
4246
|
+
function nn(e) {
|
|
4247
|
+
try {
|
|
4248
|
+
return e.isOptional();
|
|
4249
|
+
} catch {
|
|
4250
|
+
return !0;
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
//#endregion
|
|
4254
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
4255
|
+
var rn = (e, t) => {
|
|
4256
|
+
if (t.currentPath.toString() === t.propertyPath?.toString()) return Q(e.innerType._def, t);
|
|
4257
|
+
let n = Q(e.innerType._def, {
|
|
4258
|
+
...t,
|
|
4259
|
+
currentPath: [
|
|
4260
|
+
...t.currentPath,
|
|
4261
|
+
"anyOf",
|
|
4262
|
+
"1"
|
|
4263
|
+
]
|
|
4264
|
+
});
|
|
4265
|
+
return n ? { anyOf: [{ not: J(t) }, n] } : J(t);
|
|
4266
|
+
}, an = (e, t) => {
|
|
4267
|
+
if (t.pipeStrategy === "input") return Q(e.in._def, t);
|
|
4268
|
+
if (t.pipeStrategy === "output") return Q(e.out._def, t);
|
|
4269
|
+
let n = Q(e.in._def, {
|
|
4270
|
+
...t,
|
|
4271
|
+
currentPath: [
|
|
4272
|
+
...t.currentPath,
|
|
4273
|
+
"allOf",
|
|
4274
|
+
"0"
|
|
4275
|
+
]
|
|
4276
|
+
});
|
|
4277
|
+
return { allOf: [n, Q(e.out._def, {
|
|
4278
|
+
...t,
|
|
4279
|
+
currentPath: [
|
|
4280
|
+
...t.currentPath,
|
|
4281
|
+
"allOf",
|
|
4282
|
+
n ? "1" : "0"
|
|
4283
|
+
]
|
|
4284
|
+
})].filter((e) => e !== void 0) };
|
|
4285
|
+
};
|
|
4286
|
+
//#endregion
|
|
4287
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
4288
|
+
function on(e, t) {
|
|
4289
|
+
return Q(e.type._def, t);
|
|
4290
|
+
}
|
|
4291
|
+
//#endregion
|
|
4292
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
4293
|
+
function sn(e, t) {
|
|
4294
|
+
let n = {
|
|
4295
|
+
type: "array",
|
|
4296
|
+
uniqueItems: !0,
|
|
4297
|
+
items: Q(e.valueType._def, {
|
|
4298
|
+
...t,
|
|
4299
|
+
currentPath: [...t.currentPath, "items"]
|
|
4300
|
+
})
|
|
4301
|
+
};
|
|
4302
|
+
return e.minSize && q(n, "minItems", e.minSize.value, e.minSize.message, t), e.maxSize && q(n, "maxItems", e.maxSize.value, e.maxSize.message, t), n;
|
|
4303
|
+
}
|
|
4304
|
+
//#endregion
|
|
4305
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
4306
|
+
function cn(e, t) {
|
|
4307
|
+
return e.rest ? {
|
|
4308
|
+
type: "array",
|
|
4309
|
+
minItems: e.items.length,
|
|
4310
|
+
items: e.items.map((e, n) => Q(e._def, {
|
|
4311
|
+
...t,
|
|
4312
|
+
currentPath: [
|
|
4313
|
+
...t.currentPath,
|
|
4314
|
+
"items",
|
|
4315
|
+
`${n}`
|
|
4316
|
+
]
|
|
4317
|
+
})).reduce((e, t) => t === void 0 ? e : [...e, t], []),
|
|
4318
|
+
additionalItems: Q(e.rest._def, {
|
|
4319
|
+
...t,
|
|
4320
|
+
currentPath: [...t.currentPath, "additionalItems"]
|
|
4321
|
+
})
|
|
4322
|
+
} : {
|
|
4323
|
+
type: "array",
|
|
4324
|
+
minItems: e.items.length,
|
|
4325
|
+
maxItems: e.items.length,
|
|
4326
|
+
items: e.items.map((e, n) => Q(e._def, {
|
|
4327
|
+
...t,
|
|
4328
|
+
currentPath: [
|
|
4329
|
+
...t.currentPath,
|
|
4330
|
+
"items",
|
|
4331
|
+
`${n}`
|
|
4332
|
+
]
|
|
4333
|
+
})).reduce((e, t) => t === void 0 ? e : [...e, t], [])
|
|
4334
|
+
};
|
|
4335
|
+
}
|
|
4336
|
+
//#endregion
|
|
4337
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
4338
|
+
function ln(e) {
|
|
4339
|
+
return { not: J(e) };
|
|
4340
|
+
}
|
|
4341
|
+
//#endregion
|
|
4342
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
4343
|
+
function un(e) {
|
|
4344
|
+
return J(e);
|
|
4345
|
+
}
|
|
4346
|
+
//#endregion
|
|
4347
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
4348
|
+
var dn = (e, t) => Q(e.innerType._def, t), fn = (e, t, n) => {
|
|
4349
|
+
switch (t) {
|
|
4350
|
+
case U.ZodString: return zt(e, n);
|
|
4351
|
+
case U.ZodNumber: return $t(e, n);
|
|
4352
|
+
case U.ZodObject: return en(e, n);
|
|
4353
|
+
case U.ZodBigInt: return Et(e, n);
|
|
4354
|
+
case U.ZodBoolean: return Dt();
|
|
4355
|
+
case U.ZodDate: return At(e, n);
|
|
4356
|
+
case U.ZodUndefined: return ln(n);
|
|
4357
|
+
case U.ZodNull: return Jt(n);
|
|
4358
|
+
case U.ZodArray: return Tt(e, n);
|
|
4359
|
+
case U.ZodUnion:
|
|
4360
|
+
case U.ZodDiscriminatedUnion: return Xt(e, n);
|
|
4361
|
+
case U.ZodIntersection: return It(e, n);
|
|
4362
|
+
case U.ZodTuple: return cn(e, n);
|
|
4363
|
+
case U.ZodRecord: return Wt(e, n);
|
|
4364
|
+
case U.ZodLiteral: return Lt(e, n);
|
|
4365
|
+
case U.ZodEnum: return Pt(e);
|
|
4366
|
+
case U.ZodNativeEnum: return Kt(e);
|
|
4367
|
+
case U.ZodNullable: return Qt(e, n);
|
|
4368
|
+
case U.ZodOptional: return rn(e, n);
|
|
4369
|
+
case U.ZodMap: return Gt(e, n);
|
|
4370
|
+
case U.ZodSet: return sn(e, n);
|
|
4371
|
+
case U.ZodLazy: return () => e.getter()._def;
|
|
4372
|
+
case U.ZodPromise: return on(e, n);
|
|
4373
|
+
case U.ZodNaN:
|
|
4374
|
+
case U.ZodNever: return qt(n);
|
|
4375
|
+
case U.ZodEffects: return Nt(e, n);
|
|
4376
|
+
case U.ZodAny: return J(n);
|
|
4377
|
+
case U.ZodUnknown: return un(n);
|
|
4378
|
+
case U.ZodDefault: return Mt(e, n);
|
|
4379
|
+
case U.ZodBranded: return Ot(e, n);
|
|
4380
|
+
case U.ZodReadonly: return dn(e, n);
|
|
4381
|
+
case U.ZodCatch: return kt(e, n);
|
|
4382
|
+
case U.ZodPipeline: return an(e, n);
|
|
4383
|
+
case U.ZodFunction:
|
|
4384
|
+
case U.ZodVoid:
|
|
4385
|
+
case U.ZodSymbol: return;
|
|
4386
|
+
default: return ((e) => void 0)(t);
|
|
4387
|
+
}
|
|
4388
|
+
};
|
|
4389
|
+
//#endregion
|
|
4390
|
+
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
4391
|
+
function Q(e, t, n = !1) {
|
|
4392
|
+
let r = t.seen.get(e);
|
|
4393
|
+
if (t.override) {
|
|
4394
|
+
let i = t.override?.(e, t, r, n);
|
|
4395
|
+
if (i !== yt) return i;
|
|
4396
|
+
}
|
|
4397
|
+
if (r && !n) {
|
|
4398
|
+
let e = pn(r, t);
|
|
4399
|
+
if (e !== void 0) return e;
|
|
4400
|
+
}
|
|
4401
|
+
let i = {
|
|
4402
|
+
def: e,
|
|
4403
|
+
path: t.currentPath,
|
|
4404
|
+
jsonSchema: void 0
|
|
4405
|
+
};
|
|
4406
|
+
t.seen.set(e, i);
|
|
4407
|
+
let a = fn(e, e.typeName, t), o = typeof a == "function" ? Q(a(), t) : a;
|
|
4408
|
+
if (o && mn(e, t, o), t.postProcess) {
|
|
4409
|
+
let n = t.postProcess(o, e, t);
|
|
4410
|
+
return i.jsonSchema = o, n;
|
|
4411
|
+
}
|
|
4412
|
+
return i.jsonSchema = o, o;
|
|
4413
|
+
}
|
|
4414
|
+
var pn = (e, t) => {
|
|
4415
|
+
switch (t.$refStrategy) {
|
|
4416
|
+
case "root": return { $ref: e.path.join("/") };
|
|
4417
|
+
case "relative": return { $ref: wt(t.currentPath, e.path) };
|
|
4418
|
+
case "none":
|
|
4419
|
+
case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), J(t)) : t.$refStrategy === "seen" ? J(t) : void 0;
|
|
4420
|
+
}
|
|
4421
|
+
}, mn = (e, t, n) => (e.description && (n.description = e.description, t.markdownDescription && (n.markdownDescription = e.description)), n), hn = (e, t) => {
|
|
4422
|
+
let n = St(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
|
|
4423
|
+
...e,
|
|
4424
|
+
[t]: Q(r._def, {
|
|
4425
|
+
...n,
|
|
4426
|
+
currentPath: [
|
|
4427
|
+
...n.basePath,
|
|
4428
|
+
n.definitionPath,
|
|
4429
|
+
t
|
|
4430
|
+
]
|
|
4431
|
+
}, !0) ?? J(n)
|
|
4432
|
+
}), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = Q(e._def, i === void 0 ? n : {
|
|
4433
|
+
...n,
|
|
4434
|
+
currentPath: [
|
|
4435
|
+
...n.basePath,
|
|
4436
|
+
n.definitionPath,
|
|
4437
|
+
i
|
|
4438
|
+
]
|
|
4439
|
+
}, !1) ?? J(n), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
|
|
4440
|
+
o !== void 0 && (a.title = o), n.flags.hasReferencedOpenAiAnyType && (r ||= {}, r[n.openAiAnyTypeName] || (r[n.openAiAnyTypeName] = {
|
|
4441
|
+
type: [
|
|
4442
|
+
"string",
|
|
4443
|
+
"number",
|
|
4444
|
+
"integer",
|
|
4445
|
+
"boolean",
|
|
4446
|
+
"array",
|
|
4447
|
+
"null"
|
|
4448
|
+
],
|
|
4449
|
+
items: { $ref: n.$refStrategy === "relative" ? "1" : [
|
|
4450
|
+
...n.basePath,
|
|
4451
|
+
n.definitionPath,
|
|
4452
|
+
n.openAiAnyTypeName
|
|
4453
|
+
].join("/") }
|
|
4454
|
+
}));
|
|
4455
|
+
let s = i === void 0 ? r ? {
|
|
4456
|
+
...a,
|
|
4457
|
+
[n.definitionPath]: r
|
|
4458
|
+
} : a : {
|
|
4459
|
+
$ref: [
|
|
4460
|
+
...n.$refStrategy === "relative" ? [] : n.basePath,
|
|
4461
|
+
n.definitionPath,
|
|
4462
|
+
i
|
|
4463
|
+
].join("/"),
|
|
4464
|
+
[n.definitionPath]: {
|
|
4465
|
+
...r,
|
|
4466
|
+
[i]: a
|
|
4467
|
+
}
|
|
4468
|
+
};
|
|
4469
|
+
return n.target === "jsonSchema7" ? s.$schema = "http://json-schema.org/draft-07/schema#" : (n.target === "jsonSchema2019-09" || n.target === "openAi") && (s.$schema = "https://json-schema.org/draft/2019-09/schema#"), n.target === "openAi" && ("anyOf" in s || "oneOf" in s || "allOf" in s || "type" in s && Array.isArray(s.type)) && console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."), s;
|
|
4470
|
+
};
|
|
3597
4471
|
//#endregion
|
|
3598
4472
|
//#region ../mcp/dist/tools/definitions.js
|
|
3599
|
-
|
|
4473
|
+
function $(e) {
|
|
4474
|
+
let { $schema: t, ...n } = hn(e.zodSchema, { $refStrategy: "none" });
|
|
4475
|
+
return {
|
|
4476
|
+
...e,
|
|
4477
|
+
inputSchema: n
|
|
4478
|
+
};
|
|
4479
|
+
}
|
|
4480
|
+
var gn = class extends Error {
|
|
3600
4481
|
constructor(e, t) {
|
|
3601
4482
|
super(`Invalid arguments for tool "${e}": ${t}`), this.name = "ToolArgumentError";
|
|
3602
4483
|
}
|
|
3603
4484
|
};
|
|
3604
|
-
function
|
|
3605
|
-
let n = e.zodSchema.safeParse(t ?? {});
|
|
4485
|
+
function _n(e, t) {
|
|
4486
|
+
let n = e.zodSchema.strict().safeParse(t ?? {});
|
|
3606
4487
|
if (!n.success) {
|
|
3607
4488
|
let t = n.error.issues.map((e) => `${e.path.join(".") || "(root)"}: ${e.message}`).join("; ");
|
|
3608
|
-
throw new
|
|
4489
|
+
throw new gn(e.name, t);
|
|
3609
4490
|
}
|
|
3610
4491
|
return n.data;
|
|
3611
4492
|
}
|
|
3612
|
-
var
|
|
3613
|
-
{
|
|
4493
|
+
var vn = [
|
|
4494
|
+
$({
|
|
3614
4495
|
name: "list_projects",
|
|
3615
4496
|
title: "List Projects",
|
|
3616
4497
|
description: "Retrieve all projects in the workspace.",
|
|
3617
|
-
zodSchema:
|
|
3618
|
-
inputSchema: {
|
|
3619
|
-
type: "object",
|
|
3620
|
-
properties: {},
|
|
3621
|
-
additionalProperties: !1
|
|
3622
|
-
},
|
|
4498
|
+
zodSchema: G({}),
|
|
3623
4499
|
annotations: { readOnlyHint: !0 },
|
|
3624
4500
|
execute: async (e, t) => t.getProjects()
|
|
3625
|
-
},
|
|
3626
|
-
{
|
|
4501
|
+
}),
|
|
4502
|
+
$({
|
|
3627
4503
|
name: "get_project",
|
|
3628
4504
|
title: "Get Project",
|
|
3629
4505
|
description: "Get details of a specific project by its ID.",
|
|
3630
|
-
zodSchema:
|
|
3631
|
-
inputSchema: {
|
|
3632
|
-
type: "object",
|
|
3633
|
-
properties: { id: {
|
|
3634
|
-
type: "string",
|
|
3635
|
-
description: "The project ID"
|
|
3636
|
-
} },
|
|
3637
|
-
required: ["id"],
|
|
3638
|
-
additionalProperties: !1
|
|
3639
|
-
},
|
|
4506
|
+
zodSchema: G({ id: W().describe("The project ID") }),
|
|
3640
4507
|
annotations: { readOnlyHint: !0 },
|
|
3641
4508
|
execute: async (e, t) => t.getProject(e.id)
|
|
3642
|
-
},
|
|
3643
|
-
{
|
|
4509
|
+
}),
|
|
4510
|
+
$({
|
|
3644
4511
|
name: "create_project",
|
|
3645
4512
|
title: "Create Project",
|
|
3646
4513
|
description: "Create a new project workspace.",
|
|
3647
|
-
zodSchema:
|
|
3648
|
-
name:
|
|
3649
|
-
description:
|
|
3650
|
-
key:
|
|
4514
|
+
zodSchema: G({
|
|
4515
|
+
name: W().describe("Name of the project"),
|
|
4516
|
+
description: W().optional().describe("Description of the project"),
|
|
4517
|
+
key: W().optional().describe("Short project key/prefix (e.g. \"PROJ\")")
|
|
3651
4518
|
}),
|
|
3652
|
-
inputSchema: {
|
|
3653
|
-
type: "object",
|
|
3654
|
-
properties: {
|
|
3655
|
-
name: {
|
|
3656
|
-
type: "string",
|
|
3657
|
-
description: "Name of the project"
|
|
3658
|
-
},
|
|
3659
|
-
description: {
|
|
3660
|
-
type: "string",
|
|
3661
|
-
description: "Description of the project"
|
|
3662
|
-
},
|
|
3663
|
-
key: {
|
|
3664
|
-
type: "string",
|
|
3665
|
-
description: "Short project key/prefix (e.g. \"PROJ\")"
|
|
3666
|
-
}
|
|
3667
|
-
},
|
|
3668
|
-
required: ["name"],
|
|
3669
|
-
additionalProperties: !1
|
|
3670
|
-
},
|
|
3671
4519
|
execute: async (e, t) => t.createProject(e)
|
|
3672
|
-
},
|
|
3673
|
-
{
|
|
4520
|
+
}),
|
|
4521
|
+
$({
|
|
3674
4522
|
name: "list_tasks",
|
|
3675
4523
|
title: "List Tasks",
|
|
3676
4524
|
description: "List tasks, optionally filtered by project, status, priority, or assignee.",
|
|
3677
|
-
zodSchema:
|
|
3678
|
-
projectId:
|
|
3679
|
-
status:
|
|
3680
|
-
priority:
|
|
4525
|
+
zodSchema: G({
|
|
4526
|
+
projectId: W().optional().describe("Filter by project ID"),
|
|
4527
|
+
status: W().optional().describe("Filter by task status key"),
|
|
4528
|
+
priority: K([
|
|
3681
4529
|
"urgent",
|
|
3682
4530
|
"high",
|
|
3683
4531
|
"medium",
|
|
3684
4532
|
"low",
|
|
3685
4533
|
"none"
|
|
3686
4534
|
]).optional().describe("Filter by priority"),
|
|
3687
|
-
assigneeId:
|
|
4535
|
+
assigneeId: W().optional().describe("Filter by assignee ID")
|
|
3688
4536
|
}),
|
|
3689
|
-
inputSchema: {
|
|
3690
|
-
type: "object",
|
|
3691
|
-
properties: {
|
|
3692
|
-
projectId: {
|
|
3693
|
-
type: "string",
|
|
3694
|
-
description: "Filter by project ID"
|
|
3695
|
-
},
|
|
3696
|
-
status: {
|
|
3697
|
-
type: "string",
|
|
3698
|
-
description: "Filter by task status key"
|
|
3699
|
-
},
|
|
3700
|
-
priority: {
|
|
3701
|
-
type: "string",
|
|
3702
|
-
enum: [
|
|
3703
|
-
"urgent",
|
|
3704
|
-
"high",
|
|
3705
|
-
"medium",
|
|
3706
|
-
"low",
|
|
3707
|
-
"none"
|
|
3708
|
-
],
|
|
3709
|
-
description: "Filter by priority"
|
|
3710
|
-
},
|
|
3711
|
-
assigneeId: {
|
|
3712
|
-
type: "string",
|
|
3713
|
-
description: "Filter by assignee ID"
|
|
3714
|
-
}
|
|
3715
|
-
},
|
|
3716
|
-
additionalProperties: !1
|
|
3717
|
-
},
|
|
3718
4537
|
annotations: { readOnlyHint: !0 },
|
|
3719
4538
|
execute: async (e, t, n) => {
|
|
3720
4539
|
let r = e.projectId || n?.projectId, i = await t.getTasks(r);
|
|
3721
4540
|
return e.status && (i = i.filter((t) => t.status === e.status)), e.priority && (i = i.filter((t) => t.priority === e.priority)), e.assigneeId && (i = i.filter((t) => t.assigneeId === e.assigneeId)), i;
|
|
3722
4541
|
}
|
|
3723
|
-
},
|
|
3724
|
-
{
|
|
4542
|
+
}),
|
|
4543
|
+
$({
|
|
3725
4544
|
name: "get_task",
|
|
3726
4545
|
title: "Get Task",
|
|
3727
4546
|
description: "Get task details by ID.",
|
|
3728
|
-
zodSchema:
|
|
3729
|
-
inputSchema: {
|
|
3730
|
-
type: "object",
|
|
3731
|
-
properties: { id: {
|
|
3732
|
-
type: "string",
|
|
3733
|
-
description: "The task ID"
|
|
3734
|
-
} },
|
|
3735
|
-
required: ["id"],
|
|
3736
|
-
additionalProperties: !1
|
|
3737
|
-
},
|
|
4547
|
+
zodSchema: G({ id: W().describe("The task ID") }),
|
|
3738
4548
|
annotations: { readOnlyHint: !0 },
|
|
3739
4549
|
execute: async (e, t) => t.getTask(e.id)
|
|
3740
|
-
},
|
|
3741
|
-
{
|
|
4550
|
+
}),
|
|
4551
|
+
$({
|
|
3742
4552
|
name: "create_task",
|
|
3743
4553
|
title: "Create Task",
|
|
3744
4554
|
description: "Create a new task within a project.",
|
|
3745
|
-
zodSchema:
|
|
3746
|
-
projectId:
|
|
3747
|
-
title:
|
|
3748
|
-
description:
|
|
3749
|
-
status:
|
|
3750
|
-
priority:
|
|
4555
|
+
zodSchema: G({
|
|
4556
|
+
projectId: W().optional().describe("Project ID (inferred from active view in browser if omitted)"),
|
|
4557
|
+
title: W().describe("Title of the task"),
|
|
4558
|
+
description: W().optional().describe("Detailed description / markdown"),
|
|
4559
|
+
status: W().optional().describe("Status (defaults to \"todo\" or first workflow status)"),
|
|
4560
|
+
priority: K([
|
|
3751
4561
|
"urgent",
|
|
3752
4562
|
"high",
|
|
3753
4563
|
"medium",
|
|
3754
4564
|
"low",
|
|
3755
4565
|
"none"
|
|
3756
4566
|
]).optional().default("none").describe("Task priority"),
|
|
3757
|
-
assigneeId:
|
|
3758
|
-
dueDate:
|
|
3759
|
-
tags:
|
|
3760
|
-
estimatedHours:
|
|
3761
|
-
isBlocked:
|
|
3762
|
-
blockedReason:
|
|
4567
|
+
assigneeId: W().optional().describe("User ID to assign task to"),
|
|
4568
|
+
dueDate: W().optional().describe("Due date (ISO string)"),
|
|
4569
|
+
tags: vt(W()).optional().describe("Tags for categorization"),
|
|
4570
|
+
estimatedHours: gt().optional().describe("Estimated hours to complete"),
|
|
4571
|
+
isBlocked: _t().optional().describe("Whether the task is blocked"),
|
|
4572
|
+
blockedReason: W().optional().describe("Reason why the task is blocked")
|
|
3763
4573
|
}),
|
|
3764
|
-
inputSchema: {
|
|
3765
|
-
type: "object",
|
|
3766
|
-
properties: {
|
|
3767
|
-
projectId: {
|
|
3768
|
-
type: "string",
|
|
3769
|
-
description: "Project ID (inferred from active view if omitted)"
|
|
3770
|
-
},
|
|
3771
|
-
title: {
|
|
3772
|
-
type: "string",
|
|
3773
|
-
description: "Title of the task"
|
|
3774
|
-
},
|
|
3775
|
-
description: {
|
|
3776
|
-
type: "string",
|
|
3777
|
-
description: "Detailed description"
|
|
3778
|
-
},
|
|
3779
|
-
status: {
|
|
3780
|
-
type: "string",
|
|
3781
|
-
description: "Status key"
|
|
3782
|
-
},
|
|
3783
|
-
priority: {
|
|
3784
|
-
type: "string",
|
|
3785
|
-
enum: [
|
|
3786
|
-
"urgent",
|
|
3787
|
-
"high",
|
|
3788
|
-
"medium",
|
|
3789
|
-
"low",
|
|
3790
|
-
"none"
|
|
3791
|
-
]
|
|
3792
|
-
},
|
|
3793
|
-
assigneeId: {
|
|
3794
|
-
type: "string",
|
|
3795
|
-
description: "User ID of assignee"
|
|
3796
|
-
},
|
|
3797
|
-
dueDate: {
|
|
3798
|
-
type: "string",
|
|
3799
|
-
description: "Due date in ISO 8601 format"
|
|
3800
|
-
},
|
|
3801
|
-
tags: {
|
|
3802
|
-
type: "array",
|
|
3803
|
-
items: { type: "string" }
|
|
3804
|
-
},
|
|
3805
|
-
estimatedHours: { type: "number" },
|
|
3806
|
-
isBlocked: {
|
|
3807
|
-
type: "boolean",
|
|
3808
|
-
description: "Whether the task is blocked"
|
|
3809
|
-
},
|
|
3810
|
-
blockedReason: {
|
|
3811
|
-
type: "string",
|
|
3812
|
-
description: "Reason why the task is blocked"
|
|
3813
|
-
}
|
|
3814
|
-
},
|
|
3815
|
-
required: ["title"],
|
|
3816
|
-
additionalProperties: !1
|
|
3817
|
-
},
|
|
3818
4574
|
execute: async (e, t, n) => {
|
|
3819
4575
|
let r = e.projectId || n?.projectId;
|
|
3820
4576
|
if (!r) throw Error("projectId is required to create a task, but none was provided or active in context.");
|
|
@@ -3833,139 +4589,67 @@ var mt = [
|
|
|
3833
4589
|
};
|
|
3834
4590
|
return t.createTask(i);
|
|
3835
4591
|
}
|
|
3836
|
-
},
|
|
3837
|
-
{
|
|
4592
|
+
}),
|
|
4593
|
+
$({
|
|
3838
4594
|
name: "update_task",
|
|
3839
4595
|
title: "Update Task",
|
|
3840
4596
|
description: "Update fields of an existing task (e.g. title, status, priority, assignee).",
|
|
3841
|
-
zodSchema:
|
|
3842
|
-
id:
|
|
3843
|
-
title:
|
|
3844
|
-
description:
|
|
3845
|
-
status:
|
|
3846
|
-
priority:
|
|
4597
|
+
zodSchema: G({
|
|
4598
|
+
id: W().describe("The task ID"),
|
|
4599
|
+
title: W().optional(),
|
|
4600
|
+
description: W().optional(),
|
|
4601
|
+
status: W().optional(),
|
|
4602
|
+
priority: K([
|
|
3847
4603
|
"urgent",
|
|
3848
4604
|
"high",
|
|
3849
4605
|
"medium",
|
|
3850
4606
|
"low",
|
|
3851
4607
|
"none"
|
|
3852
4608
|
]).optional(),
|
|
3853
|
-
assigneeId:
|
|
3854
|
-
dueDate:
|
|
3855
|
-
tags:
|
|
3856
|
-
estimatedHours:
|
|
3857
|
-
loggedHours:
|
|
3858
|
-
isBlocked:
|
|
3859
|
-
blockedReason:
|
|
4609
|
+
assigneeId: W().optional(),
|
|
4610
|
+
dueDate: W().optional(),
|
|
4611
|
+
tags: vt(W()).optional(),
|
|
4612
|
+
estimatedHours: gt().optional(),
|
|
4613
|
+
loggedHours: gt().optional(),
|
|
4614
|
+
isBlocked: _t().optional().describe("Whether the task is blocked"),
|
|
4615
|
+
blockedReason: W().optional().describe("Reason why the task is blocked")
|
|
3860
4616
|
}),
|
|
3861
|
-
inputSchema: {
|
|
3862
|
-
type: "object",
|
|
3863
|
-
properties: {
|
|
3864
|
-
id: {
|
|
3865
|
-
type: "string",
|
|
3866
|
-
description: "Task ID"
|
|
3867
|
-
},
|
|
3868
|
-
title: { type: "string" },
|
|
3869
|
-
description: { type: "string" },
|
|
3870
|
-
status: { type: "string" },
|
|
3871
|
-
priority: {
|
|
3872
|
-
type: "string",
|
|
3873
|
-
enum: [
|
|
3874
|
-
"urgent",
|
|
3875
|
-
"high",
|
|
3876
|
-
"medium",
|
|
3877
|
-
"low",
|
|
3878
|
-
"none"
|
|
3879
|
-
]
|
|
3880
|
-
},
|
|
3881
|
-
assigneeId: { type: "string" },
|
|
3882
|
-
dueDate: { type: "string" },
|
|
3883
|
-
tags: {
|
|
3884
|
-
type: "array",
|
|
3885
|
-
items: { type: "string" }
|
|
3886
|
-
},
|
|
3887
|
-
estimatedHours: { type: "number" },
|
|
3888
|
-
loggedHours: { type: "number" },
|
|
3889
|
-
isBlocked: {
|
|
3890
|
-
type: "boolean",
|
|
3891
|
-
description: "Whether the task is blocked"
|
|
3892
|
-
},
|
|
3893
|
-
blockedReason: {
|
|
3894
|
-
type: "string",
|
|
3895
|
-
description: "Reason why the task is blocked"
|
|
3896
|
-
}
|
|
3897
|
-
},
|
|
3898
|
-
required: ["id"],
|
|
3899
|
-
additionalProperties: !1
|
|
3900
|
-
},
|
|
3901
4617
|
execute: async (e, t) => {
|
|
3902
4618
|
let { id: n, ...r } = e;
|
|
3903
4619
|
return t.updateTask(n, r);
|
|
3904
4620
|
}
|
|
3905
|
-
},
|
|
3906
|
-
{
|
|
4621
|
+
}),
|
|
4622
|
+
$({
|
|
3907
4623
|
name: "delete_task",
|
|
3908
4624
|
title: "Delete Task",
|
|
3909
4625
|
description: "Delete a task by ID.",
|
|
3910
|
-
zodSchema:
|
|
3911
|
-
inputSchema: {
|
|
3912
|
-
type: "object",
|
|
3913
|
-
properties: { id: {
|
|
3914
|
-
type: "string",
|
|
3915
|
-
description: "The task ID"
|
|
3916
|
-
} },
|
|
3917
|
-
required: ["id"],
|
|
3918
|
-
additionalProperties: !1
|
|
3919
|
-
},
|
|
4626
|
+
zodSchema: G({ id: W().describe("The task ID to delete") }),
|
|
3920
4627
|
annotations: { requiresConfirmation: !0 },
|
|
3921
4628
|
execute: async (e, t) => ({ success: await t.deleteTask(e.id) })
|
|
3922
|
-
},
|
|
3923
|
-
{
|
|
4629
|
+
}),
|
|
4630
|
+
$({
|
|
3924
4631
|
name: "list_deliverables",
|
|
3925
4632
|
title: "List Deliverables",
|
|
3926
4633
|
description: "List deliverables/milestones for a project.",
|
|
3927
|
-
zodSchema:
|
|
3928
|
-
inputSchema: {
|
|
3929
|
-
type: "object",
|
|
3930
|
-
properties: { projectId: {
|
|
3931
|
-
type: "string",
|
|
3932
|
-
description: "Project ID"
|
|
3933
|
-
} },
|
|
3934
|
-
additionalProperties: !1
|
|
3935
|
-
},
|
|
4634
|
+
zodSchema: G({ projectId: W().optional().describe("Project ID") }),
|
|
3936
4635
|
annotations: { readOnlyHint: !0 },
|
|
3937
4636
|
execute: async (e, t, n) => {
|
|
3938
4637
|
let r = e.projectId || n?.projectId;
|
|
3939
4638
|
if (!r) throw Error("projectId is required to list deliverables.");
|
|
3940
4639
|
return "getDeliverables" in t && typeof t.getDeliverables == "function" ? t.getDeliverables(r) : [];
|
|
3941
4640
|
}
|
|
3942
|
-
},
|
|
3943
|
-
{
|
|
4641
|
+
}),
|
|
4642
|
+
$({
|
|
3944
4643
|
name: "create_deliverable",
|
|
3945
4644
|
title: "Create Deliverable",
|
|
3946
4645
|
description: "Create a milestone deliverable within a project.",
|
|
3947
|
-
zodSchema:
|
|
3948
|
-
projectId:
|
|
3949
|
-
title:
|
|
3950
|
-
description:
|
|
3951
|
-
dueDate:
|
|
3952
|
-
taskIds:
|
|
4646
|
+
zodSchema: G({
|
|
4647
|
+
projectId: W().optional(),
|
|
4648
|
+
title: W(),
|
|
4649
|
+
description: W().optional(),
|
|
4650
|
+
dueDate: W().optional(),
|
|
4651
|
+
taskIds: vt(W()).optional()
|
|
3953
4652
|
}),
|
|
3954
|
-
inputSchema: {
|
|
3955
|
-
type: "object",
|
|
3956
|
-
properties: {
|
|
3957
|
-
projectId: { type: "string" },
|
|
3958
|
-
title: { type: "string" },
|
|
3959
|
-
description: { type: "string" },
|
|
3960
|
-
dueDate: { type: "string" },
|
|
3961
|
-
taskIds: {
|
|
3962
|
-
type: "array",
|
|
3963
|
-
items: { type: "string" }
|
|
3964
|
-
}
|
|
3965
|
-
},
|
|
3966
|
-
required: ["title"],
|
|
3967
|
-
additionalProperties: !1
|
|
3968
|
-
},
|
|
3969
4653
|
execute: async (e, t, n) => {
|
|
3970
4654
|
let r = e.projectId || n?.projectId;
|
|
3971
4655
|
if (!r) throw Error("projectId is required to create a deliverable.");
|
|
@@ -3975,125 +4659,55 @@ var mt = [
|
|
|
3975
4659
|
});
|
|
3976
4660
|
throw Error("createDeliverable is not supported by this backend target.");
|
|
3977
4661
|
}
|
|
3978
|
-
},
|
|
3979
|
-
{
|
|
4662
|
+
}),
|
|
4663
|
+
$({
|
|
3980
4664
|
name: "list_comments",
|
|
3981
4665
|
title: "List Comments",
|
|
3982
4666
|
description: "List comments associated with a task.",
|
|
3983
|
-
zodSchema:
|
|
3984
|
-
inputSchema: {
|
|
3985
|
-
type: "object",
|
|
3986
|
-
properties: { taskId: {
|
|
3987
|
-
type: "string",
|
|
3988
|
-
description: "The task ID"
|
|
3989
|
-
} },
|
|
3990
|
-
required: ["taskId"],
|
|
3991
|
-
additionalProperties: !1
|
|
3992
|
-
},
|
|
4667
|
+
zodSchema: G({ taskId: W().describe("The task ID") }),
|
|
3993
4668
|
annotations: { readOnlyHint: !0 },
|
|
3994
4669
|
execute: async (e, t) => "getComments" in t && typeof t.getComments == "function" ? t.getComments(e.taskId) : []
|
|
3995
|
-
},
|
|
3996
|
-
{
|
|
4670
|
+
}),
|
|
4671
|
+
$({
|
|
3997
4672
|
name: "add_comment",
|
|
3998
4673
|
title: "Add Comment",
|
|
3999
|
-
description: "Add a comment to a task.",
|
|
4000
|
-
zodSchema:
|
|
4001
|
-
taskId:
|
|
4002
|
-
content:
|
|
4003
|
-
authorId: X().describe("Author user ID")
|
|
4674
|
+
description: "Add a comment to a task. The comment is attributed to the identity this MCP server runs as.",
|
|
4675
|
+
zodSchema: G({
|
|
4676
|
+
taskId: W().describe("The task ID"),
|
|
4677
|
+
content: W().describe("Comment body/markdown")
|
|
4004
4678
|
}),
|
|
4005
|
-
inputSchema: {
|
|
4006
|
-
type: "object",
|
|
4007
|
-
properties: {
|
|
4008
|
-
taskId: {
|
|
4009
|
-
type: "string",
|
|
4010
|
-
description: "The task ID"
|
|
4011
|
-
},
|
|
4012
|
-
content: {
|
|
4013
|
-
type: "string",
|
|
4014
|
-
description: "Comment body/markdown"
|
|
4015
|
-
},
|
|
4016
|
-
authorId: {
|
|
4017
|
-
type: "string",
|
|
4018
|
-
description: "Author user ID"
|
|
4019
|
-
}
|
|
4020
|
-
},
|
|
4021
|
-
required: [
|
|
4022
|
-
"taskId",
|
|
4023
|
-
"content",
|
|
4024
|
-
"authorId"
|
|
4025
|
-
],
|
|
4026
|
-
additionalProperties: !1
|
|
4027
|
-
},
|
|
4028
4679
|
execute: async (e, t) => t.addComment({
|
|
4029
4680
|
taskId: e.taskId,
|
|
4030
|
-
content: e.content
|
|
4031
|
-
authorId: e.authorId
|
|
4681
|
+
content: e.content
|
|
4032
4682
|
})
|
|
4033
|
-
},
|
|
4034
|
-
{
|
|
4683
|
+
}),
|
|
4684
|
+
$({
|
|
4035
4685
|
name: "calculate_critical_path",
|
|
4036
4686
|
title: "Calculate Critical Path",
|
|
4037
4687
|
description: "Calculate Critical Path Method (CPM) schedule, early/late start and finish, total slack, and critical bottlenecks for a project.",
|
|
4038
|
-
zodSchema:
|
|
4039
|
-
inputSchema: {
|
|
4040
|
-
type: "object",
|
|
4041
|
-
properties: { projectId: {
|
|
4042
|
-
type: "string",
|
|
4043
|
-
description: "Project ID (falls back to ambient context if omitted)"
|
|
4044
|
-
} },
|
|
4045
|
-
additionalProperties: !1
|
|
4046
|
-
},
|
|
4688
|
+
zodSchema: G({ projectId: W().optional().describe("Project ID (falls back to ambient context if omitted)") }),
|
|
4047
4689
|
annotations: { readOnlyHint: !0 },
|
|
4048
4690
|
execute: async (e, t, n) => {
|
|
4049
4691
|
let r = e.projectId || n?.projectId;
|
|
4050
4692
|
if (!r) throw Error("projectId is required to calculate critical path.");
|
|
4051
4693
|
return t.calculateCriticalPath(r);
|
|
4052
4694
|
}
|
|
4053
|
-
},
|
|
4054
|
-
{
|
|
4695
|
+
}),
|
|
4696
|
+
$({
|
|
4055
4697
|
name: "get_timeline_ladder",
|
|
4056
4698
|
title: "Get Timeline Ladder of Abstraction",
|
|
4057
4699
|
description: "Retrieve Ladder of Abstraction for a project timeline across macro phase envelopes, standard Gantt tasks & CPM, and concrete deliverables/time/attachments.",
|
|
4058
|
-
zodSchema:
|
|
4059
|
-
projectId:
|
|
4060
|
-
level:
|
|
4700
|
+
zodSchema: G({
|
|
4701
|
+
projectId: W().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
4702
|
+
level: K([
|
|
4061
4703
|
"macro",
|
|
4062
4704
|
"standard",
|
|
4063
4705
|
"concrete",
|
|
4064
4706
|
"all"
|
|
4065
4707
|
]).optional().describe("Abstraction level (macro, standard, concrete, or all)"),
|
|
4066
|
-
containerId:
|
|
4067
|
-
iterationId:
|
|
4708
|
+
containerId: W().optional().describe("Optional container ID filter"),
|
|
4709
|
+
iterationId: W().optional().describe("Optional iteration/sprint ID filter")
|
|
4068
4710
|
}),
|
|
4069
|
-
inputSchema: {
|
|
4070
|
-
type: "object",
|
|
4071
|
-
properties: {
|
|
4072
|
-
projectId: {
|
|
4073
|
-
type: "string",
|
|
4074
|
-
description: "Project ID (falls back to ambient context if omitted)"
|
|
4075
|
-
},
|
|
4076
|
-
level: {
|
|
4077
|
-
type: "string",
|
|
4078
|
-
enum: [
|
|
4079
|
-
"macro",
|
|
4080
|
-
"standard",
|
|
4081
|
-
"concrete",
|
|
4082
|
-
"all"
|
|
4083
|
-
],
|
|
4084
|
-
description: "Abstraction level"
|
|
4085
|
-
},
|
|
4086
|
-
containerId: {
|
|
4087
|
-
type: "string",
|
|
4088
|
-
description: "Optional container ID filter"
|
|
4089
|
-
},
|
|
4090
|
-
iterationId: {
|
|
4091
|
-
type: "string",
|
|
4092
|
-
description: "Optional iteration/sprint ID filter"
|
|
4093
|
-
}
|
|
4094
|
-
},
|
|
4095
|
-
additionalProperties: !1
|
|
4096
|
-
},
|
|
4097
4711
|
annotations: { readOnlyHint: !0 },
|
|
4098
4712
|
execute: async (e, t, n) => {
|
|
4099
4713
|
let r = e.projectId || n?.projectId;
|
|
@@ -4104,138 +4718,59 @@ var mt = [
|
|
|
4104
4718
|
iterationId: e.iterationId
|
|
4105
4719
|
});
|
|
4106
4720
|
}
|
|
4107
|
-
},
|
|
4108
|
-
{
|
|
4721
|
+
}),
|
|
4722
|
+
$({
|
|
4109
4723
|
name: "get_task_ladder",
|
|
4110
4724
|
title: "Get Task Ladder View",
|
|
4111
4725
|
description: "Retrieve multi-scale ladder view for a single task, connecting its macro phase, standard CPM timeline position, and concrete work evidence.",
|
|
4112
|
-
zodSchema:
|
|
4113
|
-
inputSchema: {
|
|
4114
|
-
type: "object",
|
|
4115
|
-
properties: { taskId: {
|
|
4116
|
-
type: "string",
|
|
4117
|
-
description: "The task ID"
|
|
4118
|
-
} },
|
|
4119
|
-
required: ["taskId"],
|
|
4120
|
-
additionalProperties: !1
|
|
4121
|
-
},
|
|
4726
|
+
zodSchema: G({ taskId: W().describe("The task ID") }),
|
|
4122
4727
|
annotations: { readOnlyHint: !0 },
|
|
4123
4728
|
execute: async (e, t) => t.getTaskLadder(e.taskId)
|
|
4124
|
-
},
|
|
4125
|
-
{
|
|
4729
|
+
}),
|
|
4730
|
+
$({
|
|
4126
4731
|
name: "get_task_metrics",
|
|
4127
4732
|
title: "Get Task Metrics",
|
|
4128
4733
|
description: "Retrieve multi-dimensional task metrics including inferred actuals, active working duration, effort/duration/schedule variances, progress inference, and Earned Value Management (EVM) metrics.",
|
|
4129
|
-
zodSchema:
|
|
4130
|
-
inputSchema: {
|
|
4131
|
-
type: "object",
|
|
4132
|
-
properties: { taskId: {
|
|
4133
|
-
type: "string",
|
|
4134
|
-
description: "The task ID"
|
|
4135
|
-
} },
|
|
4136
|
-
required: ["taskId"],
|
|
4137
|
-
additionalProperties: !1
|
|
4138
|
-
},
|
|
4734
|
+
zodSchema: G({ taskId: W().describe("The task ID") }),
|
|
4139
4735
|
annotations: { readOnlyHint: !0 },
|
|
4140
4736
|
execute: async (e, t) => t.getTaskMetrics(e.taskId)
|
|
4141
|
-
},
|
|
4142
|
-
{
|
|
4737
|
+
}),
|
|
4738
|
+
$({
|
|
4143
4739
|
name: "get_task_progress_history",
|
|
4144
4740
|
title: "Get Task Progress History",
|
|
4145
4741
|
description: "Retrieve time-series progress data points and curve shape classification (linear, s_curve, early_surge, late_rush, stalled) for a task.",
|
|
4146
|
-
zodSchema:
|
|
4147
|
-
inputSchema: {
|
|
4148
|
-
type: "object",
|
|
4149
|
-
properties: { taskId: {
|
|
4150
|
-
type: "string",
|
|
4151
|
-
description: "The task ID"
|
|
4152
|
-
} },
|
|
4153
|
-
required: ["taskId"],
|
|
4154
|
-
additionalProperties: !1
|
|
4155
|
-
},
|
|
4742
|
+
zodSchema: G({ taskId: W().describe("The task ID") }),
|
|
4156
4743
|
annotations: { readOnlyHint: !0 },
|
|
4157
4744
|
execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
|
|
4158
|
-
},
|
|
4159
|
-
{
|
|
4745
|
+
}),
|
|
4746
|
+
$({
|
|
4160
4747
|
name: "get_workload_distribution",
|
|
4161
4748
|
title: "Get Workload Distribution",
|
|
4162
4749
|
description: "Retrieve time-series workload and capacity distribution suitable for streamgraphs, stacked charts, and team capacity planning.",
|
|
4163
|
-
zodSchema:
|
|
4164
|
-
projectId:
|
|
4165
|
-
startDate:
|
|
4166
|
-
endDate:
|
|
4167
|
-
interval:
|
|
4750
|
+
zodSchema: G({
|
|
4751
|
+
projectId: W().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
|
|
4752
|
+
startDate: W().optional().describe("Start date ISO (YYYY-MM-DD)"),
|
|
4753
|
+
endDate: W().optional().describe("End date ISO (YYYY-MM-DD)"),
|
|
4754
|
+
interval: K([
|
|
4168
4755
|
"day",
|
|
4169
4756
|
"week",
|
|
4170
4757
|
"month"
|
|
4171
4758
|
]).optional().describe("Bucket interval (day, week, month)"),
|
|
4172
|
-
groupBy:
|
|
4759
|
+
groupBy: K([
|
|
4173
4760
|
"assignee",
|
|
4174
4761
|
"team",
|
|
4175
4762
|
"taskType",
|
|
4176
4763
|
"priority",
|
|
4177
4764
|
"status"
|
|
4178
4765
|
]).optional().describe("Dimension to segment by"),
|
|
4179
|
-
metric:
|
|
4766
|
+
metric: K([
|
|
4180
4767
|
"scheduled",
|
|
4181
4768
|
"logged",
|
|
4182
4769
|
"remaining",
|
|
4183
4770
|
"blended"
|
|
4184
4771
|
]).optional().describe("Effort metric mode"),
|
|
4185
|
-
defaultWeeklyCapacityHours:
|
|
4772
|
+
defaultWeeklyCapacityHours: gt().optional().describe("Default weekly capacity hours per person (default 40)")
|
|
4186
4773
|
}),
|
|
4187
|
-
inputSchema: {
|
|
4188
|
-
type: "object",
|
|
4189
|
-
properties: {
|
|
4190
|
-
projectId: {
|
|
4191
|
-
type: "string",
|
|
4192
|
-
description: "Project ID (optional, defaults to workspace-wide or ambient project)"
|
|
4193
|
-
},
|
|
4194
|
-
startDate: {
|
|
4195
|
-
type: "string",
|
|
4196
|
-
description: "Start date ISO (YYYY-MM-DD)"
|
|
4197
|
-
},
|
|
4198
|
-
endDate: {
|
|
4199
|
-
type: "string",
|
|
4200
|
-
description: "End date ISO (YYYY-MM-DD)"
|
|
4201
|
-
},
|
|
4202
|
-
interval: {
|
|
4203
|
-
type: "string",
|
|
4204
|
-
enum: [
|
|
4205
|
-
"day",
|
|
4206
|
-
"week",
|
|
4207
|
-
"month"
|
|
4208
|
-
],
|
|
4209
|
-
description: "Bucket interval"
|
|
4210
|
-
},
|
|
4211
|
-
groupBy: {
|
|
4212
|
-
type: "string",
|
|
4213
|
-
enum: [
|
|
4214
|
-
"assignee",
|
|
4215
|
-
"team",
|
|
4216
|
-
"taskType",
|
|
4217
|
-
"priority",
|
|
4218
|
-
"status"
|
|
4219
|
-
],
|
|
4220
|
-
description: "Dimension to segment by"
|
|
4221
|
-
},
|
|
4222
|
-
metric: {
|
|
4223
|
-
type: "string",
|
|
4224
|
-
enum: [
|
|
4225
|
-
"scheduled",
|
|
4226
|
-
"logged",
|
|
4227
|
-
"remaining",
|
|
4228
|
-
"blended"
|
|
4229
|
-
],
|
|
4230
|
-
description: "Effort metric mode"
|
|
4231
|
-
},
|
|
4232
|
-
defaultWeeklyCapacityHours: {
|
|
4233
|
-
type: "number",
|
|
4234
|
-
description: "Default weekly capacity hours per person"
|
|
4235
|
-
}
|
|
4236
|
-
},
|
|
4237
|
-
additionalProperties: !1
|
|
4238
|
-
},
|
|
4239
4774
|
annotations: { readOnlyHint: !0 },
|
|
4240
4775
|
execute: async (e, t, n) => {
|
|
4241
4776
|
let r = e.projectId || n?.projectId;
|
|
@@ -4248,12 +4783,12 @@ var mt = [
|
|
|
4248
4783
|
defaultWeeklyCapacityHours: e.defaultWeeklyCapacityHours
|
|
4249
4784
|
});
|
|
4250
4785
|
}
|
|
4251
|
-
}
|
|
4786
|
+
})
|
|
4252
4787
|
];
|
|
4253
|
-
new Map(
|
|
4788
|
+
new Map(vn.map((e) => [e.name, e]));
|
|
4254
4789
|
//#endregion
|
|
4255
4790
|
//#region ../mcp/dist/web/index.js
|
|
4256
|
-
function
|
|
4791
|
+
function yn(e = typeof document < "u" ? document : null) {
|
|
4257
4792
|
if (!e) return null;
|
|
4258
4793
|
if (!e.modelContext) {
|
|
4259
4794
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -4278,10 +4813,10 @@ function ht(e = typeof document < "u" ? document : null) {
|
|
|
4278
4813
|
}
|
|
4279
4814
|
return e.modelContext;
|
|
4280
4815
|
}
|
|
4281
|
-
function
|
|
4816
|
+
function bn(e) {
|
|
4282
4817
|
let t = e.document ?? (typeof document < "u" ? document : null), n = e.navigator ?? (typeof navigator < "u" ? navigator : null), r = e.window ?? (typeof window < "u" ? window : null), i;
|
|
4283
|
-
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i =
|
|
4284
|
-
let a = e.tools ?
|
|
4818
|
+
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = yn(t) ?? void 0);
|
|
4819
|
+
let a = e.tools ? vn.filter((t) => e.tools.includes(t.name)) : vn, o = [], s = new AbortController();
|
|
4285
4820
|
e.signal && e.signal.addEventListener("abort", () => s.abort(), { once: !0 });
|
|
4286
4821
|
for (let t of a) {
|
|
4287
4822
|
let n = {
|
|
@@ -4291,7 +4826,7 @@ function gt(e) {
|
|
|
4291
4826
|
inputSchema: t.inputSchema,
|
|
4292
4827
|
annotations: t.annotations,
|
|
4293
4828
|
execute: async (n) => {
|
|
4294
|
-
let r = e.projectId ? { projectId: e.projectId } : void 0, i = await t.execute(
|
|
4829
|
+
let r = e.projectId ? { projectId: e.projectId } : void 0, i = await t.execute(_n(t, n), e.client, r);
|
|
4295
4830
|
return e.onToolExecuted?.(t.name, n, i), i;
|
|
4296
4831
|
}
|
|
4297
4832
|
};
|
|
@@ -4319,7 +4854,7 @@ function gt(e) {
|
|
|
4319
4854
|
}
|
|
4320
4855
|
//#endregion
|
|
4321
4856
|
//#region src/webmcp-state.svelte.ts
|
|
4322
|
-
var
|
|
4857
|
+
var xn = class {
|
|
4323
4858
|
client;
|
|
4324
4859
|
options;
|
|
4325
4860
|
#e = t.state(!1);
|
|
@@ -4359,7 +4894,7 @@ var _t = class {
|
|
|
4359
4894
|
if (!this.registered) {
|
|
4360
4895
|
this.error = null;
|
|
4361
4896
|
try {
|
|
4362
|
-
this.abortController = new AbortController(), this.handle =
|
|
4897
|
+
this.abortController = new AbortController(), this.handle = bn({
|
|
4363
4898
|
client: this.client,
|
|
4364
4899
|
projectId: this.activeProjectId,
|
|
4365
4900
|
tools: this.options.tools,
|
|
@@ -4383,12 +4918,12 @@ var _t = class {
|
|
|
4383
4918
|
this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
|
|
4384
4919
|
}
|
|
4385
4920
|
};
|
|
4386
|
-
function
|
|
4387
|
-
return new
|
|
4921
|
+
function Sn(e, t) {
|
|
4922
|
+
return new xn(e, t);
|
|
4388
4923
|
}
|
|
4389
4924
|
//#endregion
|
|
4390
4925
|
//#region src/critical-path-state.svelte.ts
|
|
4391
|
-
var
|
|
4926
|
+
var Cn = class {
|
|
4392
4927
|
client;
|
|
4393
4928
|
projectId;
|
|
4394
4929
|
#e = t.state(null);
|
|
@@ -4426,12 +4961,12 @@ var yt = class {
|
|
|
4426
4961
|
}
|
|
4427
4962
|
}
|
|
4428
4963
|
};
|
|
4429
|
-
function
|
|
4430
|
-
return new
|
|
4964
|
+
function wn(e, t) {
|
|
4965
|
+
return new Cn(e, t);
|
|
4431
4966
|
}
|
|
4432
4967
|
//#endregion
|
|
4433
4968
|
//#region src/timeline-ladder-state.svelte.ts
|
|
4434
|
-
var
|
|
4969
|
+
var Tn = class {
|
|
4435
4970
|
client;
|
|
4436
4971
|
projectId;
|
|
4437
4972
|
#e = t.state(null);
|
|
@@ -4503,12 +5038,12 @@ var xt = class {
|
|
|
4503
5038
|
}
|
|
4504
5039
|
}
|
|
4505
5040
|
};
|
|
4506
|
-
function
|
|
4507
|
-
return new
|
|
5041
|
+
function En(e, t, n) {
|
|
5042
|
+
return new Tn(e, t, n);
|
|
4508
5043
|
}
|
|
4509
5044
|
//#endregion
|
|
4510
5045
|
//#region src/task-metrics-state.svelte.ts
|
|
4511
|
-
var
|
|
5046
|
+
var Dn = class {
|
|
4512
5047
|
client;
|
|
4513
5048
|
taskId;
|
|
4514
5049
|
#e = t.state(null);
|
|
@@ -4615,12 +5150,12 @@ var Ct = class {
|
|
|
4615
5150
|
}
|
|
4616
5151
|
}
|
|
4617
5152
|
};
|
|
4618
|
-
function
|
|
4619
|
-
return new
|
|
5153
|
+
function On(e, t) {
|
|
5154
|
+
return new Dn(e, t);
|
|
4620
5155
|
}
|
|
4621
5156
|
//#endregion
|
|
4622
5157
|
//#region src/workload-state.svelte.ts
|
|
4623
|
-
var
|
|
5158
|
+
var kn = class {
|
|
4624
5159
|
client;
|
|
4625
5160
|
projectId;
|
|
4626
5161
|
initialOptions;
|
|
@@ -4737,13 +5272,13 @@ var Tt = class {
|
|
|
4737
5272
|
}
|
|
4738
5273
|
}
|
|
4739
5274
|
};
|
|
4740
|
-
function
|
|
4741
|
-
return new
|
|
5275
|
+
function An(e, t, n) {
|
|
5276
|
+
return new kn(e, t, n);
|
|
4742
5277
|
}
|
|
4743
5278
|
//#endregion
|
|
4744
5279
|
//#region src/index.ts
|
|
4745
|
-
function
|
|
5280
|
+
function jn(t) {
|
|
4746
5281
|
return new e(t);
|
|
4747
5282
|
}
|
|
4748
5283
|
//#endregion
|
|
4749
|
-
export { re as AttachmentState, te as CommentState,
|
|
5284
|
+
export { re as AttachmentState, te as CommentState, Cn as CriticalPathState, se as DeliverableState, le as DeliverableSummaryState, de as KanbanState, i as ProjectState, ae as TaskActivityState, Dn as TaskMetricsState, o as TaskState, pe as TaskTransitionsState, Tn as TimelineLadderState, xn as WebMcpState, c as WorkflowState, kn as WorkloadState, ie as createAttachmentState, ne as createCommentState, jn as createCriticalPathClient, wn as createCriticalPathState, ce as createDeliverableState, ue as createDeliverableSummaryState, fe as createKanbanState, a as createProjectState, oe as createTaskActivityState, On as createTaskMetricsState, s as createTaskState, me as createTaskTransitionsState, En as createTimelineLadderState, Sn as createWebMcpState, ee as createWorkflowState, An as createWorkloadState };
|