@critical-path/svelte 0.19.4 → 0.19.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CriticalPathClient as e } from "@critical-path/client";
2
2
  import * as t from "svelte/internal/client";
3
- import { isTempTaskId as n, precedenceOf as r, resolveStatusDefinition as i } from "@critical-path/core";
3
+ import { applyUpdate as n, isTempTaskId as r, precedenceOf as i, resolveStatusDefinition as a } from "@critical-path/core";
4
4
  //#region src/latest-request.ts
5
- var a = class {
5
+ var o = class {
6
6
  controller;
7
7
  begin(e) {
8
8
  this.controller?.abort(), this.controller = new AbortController();
@@ -15,9 +15,9 @@ var a = class {
15
15
  cancel() {
16
16
  this.controller?.abort(), this.controller = void 0;
17
17
  }
18
- }, o = class {
18
+ }, s = class {
19
19
  client;
20
- #e = new a();
20
+ #e = new o();
21
21
  #t = t.state(t.proxy([]));
22
22
  get data() {
23
23
  return t.get(this.#t);
@@ -75,15 +75,15 @@ var a = class {
75
75
  this.#e.cancel();
76
76
  }
77
77
  };
78
- function s(e) {
79
- return new o(e);
78
+ function c(e) {
79
+ return new s(e);
80
80
  }
81
81
  //#endregion
82
82
  //#region src/task-state.svelte.ts
83
- var c = class {
83
+ var ee = class {
84
84
  client;
85
85
  projectId;
86
- #e = new a();
86
+ #e = new o();
87
87
  #t = t.state(t.proxy([]));
88
88
  get data() {
89
89
  return t.get(this.#t);
@@ -146,44 +146,43 @@ var c = class {
146
146
  }
147
147
  }
148
148
  async updateTask(e, t) {
149
- let r = e;
150
- this.tempToRealIdMap.has(e) && (r = this.tempToRealIdMap.get(e));
151
- let i = this.data.findIndex((t) => t.id === r || t.id === e), a;
152
- if (i !== -1) {
153
- a = this.data[i];
149
+ let i = e;
150
+ this.tempToRealIdMap.has(e) && (i = this.tempToRealIdMap.get(e));
151
+ let a = this.data.findIndex((t) => t.id === i || t.id === e), o;
152
+ if (a !== -1) {
153
+ o = this.data[a];
154
154
  let e = {
155
- ...a,
156
- ...t,
155
+ ...n(o, t),
157
156
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
158
- }, n = [...this.data];
159
- n[i] = e, this.data = n;
157
+ }, r = [...this.data];
158
+ r[a] = e, this.data = r;
160
159
  }
161
- if (n(r)) {
162
- let t = this.pendingCreations.get(r) || (this.pendingCreations.size === 1 ? Array.from(this.pendingCreations.values())[0] : void 0);
160
+ if (r(i)) {
161
+ let t = this.pendingCreations.get(i) || (this.pendingCreations.size === 1 ? Array.from(this.pendingCreations.values())[0] : void 0);
163
162
  if (t) try {
164
163
  let n = await t;
165
- n && n.id && (r = n.id, this.tempToRealIdMap.set(e, r));
164
+ n && n.id && (i = n.id, this.tempToRealIdMap.set(e, i));
166
165
  } catch {
167
166
  throw Error(`Failed to update task: task creation failed for "${e}"`);
168
167
  }
169
168
  }
170
- if (n(r)) return this.data.find((t) => t.id === r || t.id === e) || {
171
- id: r,
169
+ if (r(i)) return this.data.find((t) => t.id === i || t.id === e) || {
170
+ id: i,
172
171
  ...t
173
172
  };
174
173
  try {
175
- let n = await this.client.updateTask(r, t), i = this.data.findIndex((t) => t.id === r || t.id === e);
176
- if (i !== -1) {
174
+ let n = await this.client.updateTask(i, t), r = this.data.findIndex((t) => t.id === i || t.id === e);
175
+ if (r !== -1) {
177
176
  let e = [...this.data];
178
- e[i] = n, this.data = e;
177
+ e[r] = n, this.data = e;
179
178
  }
180
179
  return n;
181
180
  } catch (t) {
182
- if (a) {
183
- let t = this.data.findIndex((t) => t.id === r || t.id === e);
181
+ if (o) {
182
+ let t = this.data.findIndex((t) => t.id === i || t.id === e);
184
183
  if (t !== -1) {
185
184
  let e = [...this.data];
186
- e[t] = a, this.data = e;
185
+ e[t] = o, this.data = e;
187
186
  }
188
187
  }
189
188
  let n = t instanceof Error ? t : Error(String(t));
@@ -196,8 +195,8 @@ var c = class {
196
195
  async deleteTask(e) {
197
196
  let t = e;
198
197
  this.tempToRealIdMap.has(e) && (t = this.tempToRealIdMap.get(e));
199
- let r = this.data.findIndex((n) => n.id === t || n.id === e), i = r === -1 ? void 0 : this.data[r];
200
- if (r !== -1 && (this.data = this.data.filter((n) => n.id !== t && n.id !== e)), n(t)) {
198
+ let n = this.data.findIndex((n) => n.id === t || n.id === e), i = n === -1 ? void 0 : this.data[n];
199
+ if (n !== -1 && (this.data = this.data.filter((n) => n.id !== t && n.id !== e)), r(t)) {
201
200
  let e = this.pendingCreations.get(t);
202
201
  if (e) try {
203
202
  let t = await e;
@@ -206,9 +205,9 @@ var c = class {
206
205
  } else try {
207
206
  await this.client.deleteTask(t);
208
207
  } catch (e) {
209
- if (i && r !== -1) {
208
+ if (i && n !== -1) {
210
209
  let e = [...this.data];
211
- e.splice(r, 0, i), this.data = e;
210
+ e.splice(n, 0, i), this.data = e;
212
211
  }
213
212
  let t = e instanceof Error ? e : Error(String(e));
214
213
  throw this.error = t, t;
@@ -218,14 +217,14 @@ var c = class {
218
217
  this.#e.cancel();
219
218
  }
220
219
  };
221
- function ee(e, t) {
222
- return new c(e, t);
220
+ function te(e, t) {
221
+ return new ee(e, t);
223
222
  }
224
223
  //#endregion
225
224
  //#region src/workflow-state.svelte.ts
226
- var te = class {
225
+ var ne = class {
227
226
  client;
228
- #e = new a();
227
+ #e = new o();
229
228
  #t = t.state(t.proxy([]));
230
229
  get data() {
231
230
  return t.get(this.#t);
@@ -292,15 +291,15 @@ var te = class {
292
291
  this.#e.cancel();
293
292
  }
294
293
  };
295
- function ne(e) {
296
- return new te(e);
294
+ function re(e) {
295
+ return new ne(e);
297
296
  }
298
297
  //#endregion
299
298
  //#region src/comment-state.svelte.ts
300
- var re = class {
299
+ var ie = class {
301
300
  client;
302
301
  taskId;
303
- #e = new a();
302
+ #e = new o();
304
303
  #t = t.state(t.proxy([]));
305
304
  get data() {
306
305
  return t.get(this.#t);
@@ -413,15 +412,15 @@ var re = class {
413
412
  this.#e.cancel();
414
413
  }
415
414
  };
416
- function ie(e, t) {
417
- return new re(e, t);
415
+ function ae(e, t) {
416
+ return new ie(e, t);
418
417
  }
419
418
  //#endregion
420
419
  //#region src/attachment-state.svelte.ts
421
- var ae = class {
420
+ var oe = class {
422
421
  client;
423
422
  filter;
424
- #e = new a();
423
+ #e = new o();
425
424
  #t = t.state(t.proxy([]));
426
425
  get data() {
427
426
  return t.get(this.#t);
@@ -482,15 +481,15 @@ var ae = class {
482
481
  this.#e.cancel();
483
482
  }
484
483
  };
485
- function oe(e, t) {
486
- return new ae(e, t);
484
+ function se(e, t) {
485
+ return new oe(e, t);
487
486
  }
488
487
  //#endregion
489
488
  //#region src/activity-state.svelte.ts
490
- var se = class {
489
+ var ce = class {
491
490
  client;
492
491
  taskId;
493
- #e = new a();
492
+ #e = new o();
494
493
  #t = t.state(t.proxy([]));
495
494
  get comments() {
496
495
  return t.get(this.#t);
@@ -643,15 +642,15 @@ var se = class {
643
642
  this.#e.cancel();
644
643
  }
645
644
  };
646
- function ce(e, t) {
647
- return new se(e, t);
645
+ function le(e, t) {
646
+ return new ce(e, t);
648
647
  }
649
648
  //#endregion
650
649
  //#region src/deliverable-state.svelte.ts
651
- var le = class {
650
+ var ue = class {
652
651
  client;
653
652
  projectId;
654
- #e = new a();
653
+ #e = new o();
655
654
  #t = t.state(t.proxy([]));
656
655
  get data() {
657
656
  return t.get(this.#t);
@@ -700,16 +699,13 @@ var le = class {
700
699
  }
701
700
  }
702
701
  async updateDeliverable(e, t) {
703
- let n = this.data;
704
- this.data = this.data.map((n) => n.id === e ? {
705
- ...n,
706
- ...t
707
- } : n);
702
+ let r = this.data;
703
+ this.data = this.data.map((r) => r.id === e ? n(r, t) : r);
708
704
  try {
709
705
  let n = await this.client.updateDeliverable(e, t);
710
706
  return this.data = this.data.map((t) => t.id === e ? n : t), n;
711
707
  } catch (e) {
712
- this.data = n;
708
+ this.data = r;
713
709
  let t = e instanceof Error ? e : Error(String(e));
714
710
  throw this.error = t, t;
715
711
  }
@@ -732,15 +728,15 @@ var le = class {
732
728
  this.#e.cancel();
733
729
  }
734
730
  };
735
- function ue(e, t) {
736
- return new le(e, t);
731
+ function de(e, t) {
732
+ return new ue(e, t);
737
733
  }
738
734
  //#endregion
739
735
  //#region src/deliverable-summary-state.svelte.ts
740
- var de = class {
736
+ var fe = class {
741
737
  client;
742
738
  deliverableId;
743
- #e = new a();
739
+ #e = new o();
744
740
  #t = t.state(null);
745
741
  get summary() {
746
742
  return t.get(this.#t);
@@ -787,12 +783,12 @@ var de = class {
787
783
  this.#e.cancel();
788
784
  }
789
785
  };
790
- function fe(e, t) {
791
- return new de(e, t);
786
+ function pe(e, t) {
787
+ return new fe(e, t);
792
788
  }
793
789
  //#endregion
794
790
  //#region src/kanban-state.svelte.ts
795
- var pe = class {
791
+ var me = class {
796
792
  projectId;
797
793
  options;
798
794
  taskState;
@@ -818,7 +814,7 @@ var pe = class {
818
814
  canceled: []
819
815
  };
820
816
  for (let n of e) {
821
- let e = n.semanticStatus || i(n.status, this.options?.customDefinitions).category;
817
+ let e = n.semanticStatus || a(n.status, this.options?.customDefinitions).category;
822
818
  t[e] ? t[e].push(n) : t.not_started.push(n);
823
819
  }
824
820
  return t;
@@ -836,7 +832,7 @@ var pe = class {
836
832
  t.set(this.#e, e);
837
833
  }
838
834
  constructor(e, t, n = {}) {
839
- this.projectId = t, this.options = n, this.taskState = new c(e, t);
835
+ this.projectId = t, this.options = n, this.taskState = new ee(e, t);
840
836
  }
841
837
  async fetch() {
842
838
  return this.taskState.fetch();
@@ -854,15 +850,15 @@ var pe = class {
854
850
  return this.taskState.deleteTask(e);
855
851
  }
856
852
  };
857
- function me(e, t, n) {
858
- return new pe(e, t, n);
853
+ function he(e, t, n) {
854
+ return new me(e, t, n);
859
855
  }
860
856
  //#endregion
861
857
  //#region src/task-transitions-state.svelte.ts
862
- var he = class {
858
+ var ge = class {
863
859
  client;
864
860
  taskId;
865
- #e = new a();
861
+ #e = new o();
866
862
  #t = t.state(t.proxy([]));
867
863
  get allowedTransitions() {
868
864
  return t.get(this.#t);
@@ -906,8 +902,8 @@ var he = class {
906
902
  this.#e.cancel();
907
903
  }
908
904
  };
909
- function ge(e, t) {
910
- return new he(e, t);
905
+ function _e(e, t) {
906
+ return new ge(e, t);
911
907
  }
912
908
  //#endregion
913
909
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
@@ -941,13 +937,13 @@ var l;
941
937
  }
942
938
  e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
943
939
  })(l ||= {});
944
- var _e;
940
+ var ve;
945
941
  (function(e) {
946
942
  e.mergeShapes = (e, t) => ({
947
943
  ...e,
948
944
  ...t
949
945
  });
950
- })(_e ||= {});
946
+ })(ve ||= {});
951
947
  var u = l.arrayToEnum([
952
948
  "string",
953
949
  "nan",
@@ -1059,7 +1055,7 @@ var u = l.arrayToEnum([
1059
1055
  p.create = (e) => new p(e);
1060
1056
  //#endregion
1061
1057
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
1062
- var ve = (e, t) => {
1058
+ var m = (e, t) => {
1063
1059
  let n;
1064
1060
  switch (e.code) {
1065
1061
  case f.invalid_type:
@@ -1113,7 +1109,7 @@ var ve = (e, t) => {
1113
1109
  default: n = t.defaultError, l.assertNever(e);
1114
1110
  }
1115
1111
  return { message: n };
1116
- }, ye = ve;
1112
+ }, ye = m;
1117
1113
  function be() {
1118
1114
  return ye;
1119
1115
  }
@@ -1140,7 +1136,7 @@ var xe = (e) => {
1140
1136
  message: s
1141
1137
  };
1142
1138
  };
1143
- function m(e, t) {
1139
+ function h(e, t) {
1144
1140
  let n = be(), r = xe({
1145
1141
  issueData: t,
1146
1142
  data: e.data,
@@ -1149,12 +1145,12 @@ function m(e, t) {
1149
1145
  e.common.contextualErrorMap,
1150
1146
  e.schemaErrorMap,
1151
1147
  n,
1152
- n === ve ? void 0 : ve
1148
+ n === m ? void 0 : m
1153
1149
  ].filter((e) => !!e)
1154
1150
  });
1155
1151
  e.common.issues.push(r);
1156
1152
  }
1157
- var h = class e {
1153
+ var g = class e {
1158
1154
  constructor() {
1159
1155
  this.value = "valid";
1160
1156
  }
@@ -1167,7 +1163,7 @@ var h = class e {
1167
1163
  static mergeArray(e, t) {
1168
1164
  let n = [];
1169
1165
  for (let r of t) {
1170
- if (r.status === "aborted") return g;
1166
+ if (r.status === "aborted") return _;
1171
1167
  r.status === "dirty" && e.dirty(), n.push(r.value);
1172
1168
  }
1173
1169
  return {
@@ -1190,7 +1186,7 @@ var h = class e {
1190
1186
  let n = {};
1191
1187
  for (let r of t) {
1192
1188
  let { key: t, value: i } = r;
1193
- if (t.status === "aborted" || i.status === "aborted") return g;
1189
+ if (t.status === "aborted" || i.status === "aborted") return _;
1194
1190
  t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
1195
1191
  }
1196
1192
  return {
@@ -1198,19 +1194,19 @@ var h = class e {
1198
1194
  value: n
1199
1195
  };
1200
1196
  }
1201
- }, g = Object.freeze({ status: "aborted" }), Se = (e) => ({
1197
+ }, _ = Object.freeze({ status: "aborted" }), Se = (e) => ({
1202
1198
  status: "dirty",
1203
1199
  value: e
1204
- }), _ = (e) => ({
1200
+ }), v = (e) => ({
1205
1201
  status: "valid",
1206
1202
  value: e
1207
- }), Ce = (e) => e.status === "aborted", we = (e) => e.status === "dirty", v = (e) => e.status === "valid", Te = (e) => typeof Promise < "u" && e instanceof Promise, y;
1203
+ }), Ce = (e) => e.status === "aborted", we = (e) => e.status === "dirty", y = (e) => e.status === "valid", Te = (e) => typeof Promise < "u" && e instanceof Promise, b;
1208
1204
  (function(e) {
1209
1205
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
1210
- })(y ||= {});
1206
+ })(b ||= {});
1211
1207
  //#endregion
1212
1208
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
1213
- var b = class {
1209
+ var x = class {
1214
1210
  constructor(e, t, n, r) {
1215
1211
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
1216
1212
  }
@@ -1218,7 +1214,7 @@ var b = class {
1218
1214
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
1219
1215
  }
1220
1216
  }, Ee = (e, t) => {
1221
- if (v(t)) return {
1217
+ if (y(t)) return {
1222
1218
  success: !0,
1223
1219
  data: t.value
1224
1220
  };
@@ -1232,7 +1228,7 @@ var b = class {
1232
1228
  }
1233
1229
  };
1234
1230
  };
1235
- function x(e) {
1231
+ function S(e) {
1236
1232
  if (!e) return {};
1237
1233
  let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e;
1238
1234
  if (t && (n || r)) throw Error("Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.");
@@ -1247,7 +1243,7 @@ function x(e) {
1247
1243
  description: i
1248
1244
  };
1249
1245
  }
1250
- var S = class {
1246
+ var C = class {
1251
1247
  get description() {
1252
1248
  return this._def.description;
1253
1249
  }
@@ -1266,7 +1262,7 @@ var S = class {
1266
1262
  }
1267
1263
  _processInputParams(e) {
1268
1264
  return {
1269
- status: new h(),
1265
+ status: new g(),
1270
1266
  ctx: {
1271
1267
  common: e.parent.common,
1272
1268
  data: e.data,
@@ -1328,7 +1324,7 @@ var S = class {
1328
1324
  path: [],
1329
1325
  parent: t
1330
1326
  });
1331
- return v(n) ? { value: n.value } : { issues: t.common.issues };
1327
+ return y(n) ? { value: n.value } : { issues: t.common.issues };
1332
1328
  } catch (e) {
1333
1329
  e?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
1334
1330
  issues: [],
@@ -1339,7 +1335,7 @@ var S = class {
1339
1335
  data: e,
1340
1336
  path: [],
1341
1337
  parent: t
1342
- }).then((e) => v(e) ? { value: e.value } : { issues: t.common.issues });
1338
+ }).then((e) => y(e) ? { value: e.value } : { issues: t.common.issues });
1343
1339
  }
1344
1340
  async parseAsync(e, t) {
1345
1341
  let n = await this.safeParseAsync(e, t);
@@ -1379,9 +1375,9 @@ var S = class {
1379
1375
  return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
1380
1376
  }
1381
1377
  _refinement(e) {
1382
- return new j({
1378
+ return new M({
1383
1379
  schema: this,
1384
- typeName: P.ZodEffects,
1380
+ typeName: F.ZodEffects,
1385
1381
  effect: {
1386
1382
  type: "refinement",
1387
1383
  refinement: e
@@ -1399,19 +1395,19 @@ var S = class {
1399
1395
  };
1400
1396
  }
1401
1397
  optional() {
1402
- return M.create(this, this._def);
1398
+ return N.create(this, this._def);
1403
1399
  }
1404
1400
  nullable() {
1405
- return N.create(this, this._def);
1401
+ return P.create(this, this._def);
1406
1402
  }
1407
1403
  nullish() {
1408
1404
  return this.nullable().optional();
1409
1405
  }
1410
1406
  array() {
1411
- return T.create(this);
1407
+ return E.create(this);
1412
1408
  }
1413
1409
  promise() {
1414
- return A.create(this, this._def);
1410
+ return j.create(this, this._def);
1415
1411
  }
1416
1412
  or(e) {
1417
1413
  return ct.create([this, e], this._def);
@@ -1420,10 +1416,10 @@ var S = class {
1420
1416
  return dt.create(this, e, this._def);
1421
1417
  }
1422
1418
  transform(e) {
1423
- return new j({
1424
- ...x(this._def),
1419
+ return new M({
1420
+ ...S(this._def),
1425
1421
  schema: this,
1426
- typeName: P.ZodEffects,
1422
+ typeName: F.ZodEffects,
1427
1423
  effect: {
1428
1424
  type: "transform",
1429
1425
  transform: e
@@ -1433,26 +1429,26 @@ var S = class {
1433
1429
  default(e) {
1434
1430
  let t = typeof e == "function" ? e : () => e;
1435
1431
  return new xt({
1436
- ...x(this._def),
1432
+ ...S(this._def),
1437
1433
  innerType: this,
1438
1434
  defaultValue: t,
1439
- typeName: P.ZodDefault
1435
+ typeName: F.ZodDefault
1440
1436
  });
1441
1437
  }
1442
1438
  brand() {
1443
1439
  return new wt({
1444
- typeName: P.ZodBranded,
1440
+ typeName: F.ZodBranded,
1445
1441
  type: this,
1446
- ...x(this._def)
1442
+ ...S(this._def)
1447
1443
  });
1448
1444
  }
1449
1445
  catch(e) {
1450
1446
  let t = typeof e == "function" ? e : () => e;
1451
1447
  return new St({
1452
- ...x(this._def),
1448
+ ...S(this._def),
1453
1449
  innerType: this,
1454
1450
  catchValue: t,
1455
- typeName: P.ZodCatch
1451
+ typeName: F.ZodCatch
1456
1452
  });
1457
1453
  }
1458
1454
  describe(e) {
@@ -1505,18 +1501,18 @@ function Ye(e, t) {
1505
1501
  function Xe(e, t) {
1506
1502
  return !((t !== "v4" && t || !Re.test(e)) && (t !== "v6" && t || !Be.test(e)));
1507
1503
  }
1508
- var Ze = class e extends S {
1504
+ var Ze = class e extends C {
1509
1505
  _parse(e) {
1510
1506
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
1511
1507
  let t = this._getOrReturnCtx(e);
1512
- return m(t, {
1508
+ return h(t, {
1513
1509
  code: f.invalid_type,
1514
1510
  expected: u.string,
1515
1511
  received: t.parsedType
1516
- }), g;
1512
+ }), _;
1517
1513
  }
1518
- let t = new h(), n;
1519
- for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), m(n, {
1514
+ let t = new g(), n;
1515
+ for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), h(n, {
1520
1516
  code: f.too_small,
1521
1517
  minimum: r.value,
1522
1518
  type: "string",
@@ -1524,7 +1520,7 @@ var Ze = class e extends S {
1524
1520
  exact: !1,
1525
1521
  message: r.message
1526
1522
  }), t.dirty());
1527
- else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), m(n, {
1523
+ else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), h(n, {
1528
1524
  code: f.too_big,
1529
1525
  maximum: r.value,
1530
1526
  type: "string",
@@ -1534,14 +1530,14 @@ var Ze = class e extends S {
1534
1530
  }), t.dirty());
1535
1531
  else if (r.kind === "length") {
1536
1532
  let i = e.data.length > r.value, a = e.data.length < r.value;
1537
- (i || a) && (n = this._getOrReturnCtx(e, n), i ? m(n, {
1533
+ (i || a) && (n = this._getOrReturnCtx(e, n), i ? h(n, {
1538
1534
  code: f.too_big,
1539
1535
  maximum: r.value,
1540
1536
  type: "string",
1541
1537
  inclusive: !0,
1542
1538
  exact: !0,
1543
1539
  message: r.message
1544
- }) : a && m(n, {
1540
+ }) : a && h(n, {
1545
1541
  code: f.too_small,
1546
1542
  minimum: r.value,
1547
1543
  type: "string",
@@ -1549,37 +1545,37 @@ var Ze = class e extends S {
1549
1545
  exact: !0,
1550
1546
  message: r.message
1551
1547
  }), t.dirty());
1552
- } else if (r.kind === "email") Pe.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1548
+ } else if (r.kind === "email") Pe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1553
1549
  validation: "email",
1554
1550
  code: f.invalid_string,
1555
1551
  message: r.message
1556
1552
  }), t.dirty());
1557
- else if (r.kind === "emoji") Ie ||= new RegExp(Fe, "u"), Ie.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1553
+ else if (r.kind === "emoji") Ie ||= new RegExp(Fe, "u"), Ie.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1558
1554
  validation: "emoji",
1559
1555
  code: f.invalid_string,
1560
1556
  message: r.message
1561
1557
  }), t.dirty());
1562
- else if (r.kind === "uuid") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1558
+ else if (r.kind === "uuid") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1563
1559
  validation: "uuid",
1564
1560
  code: f.invalid_string,
1565
1561
  message: r.message
1566
1562
  }), t.dirty());
1567
- else if (r.kind === "nanoid") je.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1563
+ else if (r.kind === "nanoid") je.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1568
1564
  validation: "nanoid",
1569
1565
  code: f.invalid_string,
1570
1566
  message: r.message
1571
1567
  }), t.dirty());
1572
- else if (r.kind === "cuid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1568
+ else if (r.kind === "cuid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1573
1569
  validation: "cuid",
1574
1570
  code: f.invalid_string,
1575
1571
  message: r.message
1576
1572
  }), t.dirty());
1577
- else if (r.kind === "cuid2") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1573
+ else if (r.kind === "cuid2") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1578
1574
  validation: "cuid2",
1579
1575
  code: f.invalid_string,
1580
1576
  message: r.message
1581
1577
  }), t.dirty());
1582
- else if (r.kind === "ulid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1578
+ else if (r.kind === "ulid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1583
1579
  validation: "ulid",
1584
1580
  code: f.invalid_string,
1585
1581
  message: r.message
@@ -1587,64 +1583,64 @@ var Ze = class e extends S {
1587
1583
  else if (r.kind === "url") try {
1588
1584
  new URL(e.data);
1589
1585
  } catch {
1590
- n = this._getOrReturnCtx(e, n), m(n, {
1586
+ n = this._getOrReturnCtx(e, n), h(n, {
1591
1587
  validation: "url",
1592
1588
  code: f.invalid_string,
1593
1589
  message: r.message
1594
1590
  }), t.dirty();
1595
1591
  }
1596
- else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1592
+ else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1597
1593
  validation: "regex",
1598
1594
  code: f.invalid_string,
1599
1595
  message: r.message
1600
- }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), m(n, {
1596
+ }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), h(n, {
1601
1597
  code: f.invalid_string,
1602
1598
  validation: {
1603
1599
  includes: r.value,
1604
1600
  position: r.position
1605
1601
  },
1606
1602
  message: r.message
1607
- }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), m(n, {
1603
+ }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), h(n, {
1608
1604
  code: f.invalid_string,
1609
1605
  validation: { startsWith: r.value },
1610
1606
  message: r.message
1611
- }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), m(n, {
1607
+ }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), h(n, {
1612
1608
  code: f.invalid_string,
1613
1609
  validation: { endsWith: r.value },
1614
1610
  message: r.message
1615
- }), t.dirty()) : r.kind === "datetime" ? qe(r).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1611
+ }), t.dirty()) : r.kind === "datetime" ? qe(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1616
1612
  code: f.invalid_string,
1617
1613
  validation: "datetime",
1618
1614
  message: r.message
1619
- }), t.dirty()) : r.kind === "date" ? We.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1615
+ }), t.dirty()) : r.kind === "date" ? We.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1620
1616
  code: f.invalid_string,
1621
1617
  validation: "date",
1622
1618
  message: r.message
1623
- }), t.dirty()) : r.kind === "time" ? Ke(r).test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1619
+ }), t.dirty()) : r.kind === "time" ? Ke(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1624
1620
  code: f.invalid_string,
1625
1621
  validation: "time",
1626
1622
  message: r.message
1627
- }), t.dirty()) : r.kind === "duration" ? Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1623
+ }), t.dirty()) : r.kind === "duration" ? Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1628
1624
  validation: "duration",
1629
1625
  code: f.invalid_string,
1630
1626
  message: r.message
1631
- }), t.dirty()) : r.kind === "ip" ? Je(e.data, r.version) || (n = this._getOrReturnCtx(e, n), m(n, {
1627
+ }), t.dirty()) : r.kind === "ip" ? Je(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1632
1628
  validation: "ip",
1633
1629
  code: f.invalid_string,
1634
1630
  message: r.message
1635
- }), t.dirty()) : r.kind === "jwt" ? Ye(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), m(n, {
1631
+ }), t.dirty()) : r.kind === "jwt" ? Ye(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
1636
1632
  validation: "jwt",
1637
1633
  code: f.invalid_string,
1638
1634
  message: r.message
1639
- }), t.dirty()) : r.kind === "cidr" ? Xe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), m(n, {
1635
+ }), t.dirty()) : r.kind === "cidr" ? Xe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1640
1636
  validation: "cidr",
1641
1637
  code: f.invalid_string,
1642
1638
  message: r.message
1643
- }), t.dirty()) : r.kind === "base64" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1639
+ }), t.dirty()) : r.kind === "base64" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1644
1640
  validation: "base64",
1645
1641
  code: f.invalid_string,
1646
1642
  message: r.message
1647
- }), t.dirty()) : r.kind === "base64url" ? He.test(e.data) || (n = this._getOrReturnCtx(e, n), m(n, {
1643
+ }), t.dirty()) : r.kind === "base64url" ? He.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1648
1644
  validation: "base64url",
1649
1645
  code: f.invalid_string,
1650
1646
  message: r.message
@@ -1658,7 +1654,7 @@ var Ze = class e extends S {
1658
1654
  return this.refinement((t) => e.test(t), {
1659
1655
  validation: t,
1660
1656
  code: f.invalid_string,
1661
- ...y.errToObj(n)
1657
+ ...b.errToObj(n)
1662
1658
  });
1663
1659
  }
1664
1660
  _addCheck(t) {
@@ -1670,79 +1666,79 @@ var Ze = class e extends S {
1670
1666
  email(e) {
1671
1667
  return this._addCheck({
1672
1668
  kind: "email",
1673
- ...y.errToObj(e)
1669
+ ...b.errToObj(e)
1674
1670
  });
1675
1671
  }
1676
1672
  url(e) {
1677
1673
  return this._addCheck({
1678
1674
  kind: "url",
1679
- ...y.errToObj(e)
1675
+ ...b.errToObj(e)
1680
1676
  });
1681
1677
  }
1682
1678
  emoji(e) {
1683
1679
  return this._addCheck({
1684
1680
  kind: "emoji",
1685
- ...y.errToObj(e)
1681
+ ...b.errToObj(e)
1686
1682
  });
1687
1683
  }
1688
1684
  uuid(e) {
1689
1685
  return this._addCheck({
1690
1686
  kind: "uuid",
1691
- ...y.errToObj(e)
1687
+ ...b.errToObj(e)
1692
1688
  });
1693
1689
  }
1694
1690
  nanoid(e) {
1695
1691
  return this._addCheck({
1696
1692
  kind: "nanoid",
1697
- ...y.errToObj(e)
1693
+ ...b.errToObj(e)
1698
1694
  });
1699
1695
  }
1700
1696
  cuid(e) {
1701
1697
  return this._addCheck({
1702
1698
  kind: "cuid",
1703
- ...y.errToObj(e)
1699
+ ...b.errToObj(e)
1704
1700
  });
1705
1701
  }
1706
1702
  cuid2(e) {
1707
1703
  return this._addCheck({
1708
1704
  kind: "cuid2",
1709
- ...y.errToObj(e)
1705
+ ...b.errToObj(e)
1710
1706
  });
1711
1707
  }
1712
1708
  ulid(e) {
1713
1709
  return this._addCheck({
1714
1710
  kind: "ulid",
1715
- ...y.errToObj(e)
1711
+ ...b.errToObj(e)
1716
1712
  });
1717
1713
  }
1718
1714
  base64(e) {
1719
1715
  return this._addCheck({
1720
1716
  kind: "base64",
1721
- ...y.errToObj(e)
1717
+ ...b.errToObj(e)
1722
1718
  });
1723
1719
  }
1724
1720
  base64url(e) {
1725
1721
  return this._addCheck({
1726
1722
  kind: "base64url",
1727
- ...y.errToObj(e)
1723
+ ...b.errToObj(e)
1728
1724
  });
1729
1725
  }
1730
1726
  jwt(e) {
1731
1727
  return this._addCheck({
1732
1728
  kind: "jwt",
1733
- ...y.errToObj(e)
1729
+ ...b.errToObj(e)
1734
1730
  });
1735
1731
  }
1736
1732
  ip(e) {
1737
1733
  return this._addCheck({
1738
1734
  kind: "ip",
1739
- ...y.errToObj(e)
1735
+ ...b.errToObj(e)
1740
1736
  });
1741
1737
  }
1742
1738
  cidr(e) {
1743
1739
  return this._addCheck({
1744
1740
  kind: "cidr",
1745
- ...y.errToObj(e)
1741
+ ...b.errToObj(e)
1746
1742
  });
1747
1743
  }
1748
1744
  datetime(e) {
@@ -1757,7 +1753,7 @@ var Ze = class e extends S {
1757
1753
  precision: e?.precision === void 0 ? null : e?.precision,
1758
1754
  offset: e?.offset ?? !1,
1759
1755
  local: e?.local ?? !1,
1760
- ...y.errToObj(e?.message)
1756
+ ...b.errToObj(e?.message)
1761
1757
  });
1762
1758
  }
1763
1759
  date(e) {
@@ -1774,20 +1770,20 @@ var Ze = class e extends S {
1774
1770
  }) : this._addCheck({
1775
1771
  kind: "time",
1776
1772
  precision: e?.precision === void 0 ? null : e?.precision,
1777
- ...y.errToObj(e?.message)
1773
+ ...b.errToObj(e?.message)
1778
1774
  });
1779
1775
  }
1780
1776
  duration(e) {
1781
1777
  return this._addCheck({
1782
1778
  kind: "duration",
1783
- ...y.errToObj(e)
1779
+ ...b.errToObj(e)
1784
1780
  });
1785
1781
  }
1786
1782
  regex(e, t) {
1787
1783
  return this._addCheck({
1788
1784
  kind: "regex",
1789
1785
  regex: e,
1790
- ...y.errToObj(t)
1786
+ ...b.errToObj(t)
1791
1787
  });
1792
1788
  }
1793
1789
  includes(e, t) {
@@ -1795,46 +1791,46 @@ var Ze = class e extends S {
1795
1791
  kind: "includes",
1796
1792
  value: e,
1797
1793
  position: t?.position,
1798
- ...y.errToObj(t?.message)
1794
+ ...b.errToObj(t?.message)
1799
1795
  });
1800
1796
  }
1801
1797
  startsWith(e, t) {
1802
1798
  return this._addCheck({
1803
1799
  kind: "startsWith",
1804
1800
  value: e,
1805
- ...y.errToObj(t)
1801
+ ...b.errToObj(t)
1806
1802
  });
1807
1803
  }
1808
1804
  endsWith(e, t) {
1809
1805
  return this._addCheck({
1810
1806
  kind: "endsWith",
1811
1807
  value: e,
1812
- ...y.errToObj(t)
1808
+ ...b.errToObj(t)
1813
1809
  });
1814
1810
  }
1815
1811
  min(e, t) {
1816
1812
  return this._addCheck({
1817
1813
  kind: "min",
1818
1814
  value: e,
1819
- ...y.errToObj(t)
1815
+ ...b.errToObj(t)
1820
1816
  });
1821
1817
  }
1822
1818
  max(e, t) {
1823
1819
  return this._addCheck({
1824
1820
  kind: "max",
1825
1821
  value: e,
1826
- ...y.errToObj(t)
1822
+ ...b.errToObj(t)
1827
1823
  });
1828
1824
  }
1829
1825
  length(e, t) {
1830
1826
  return this._addCheck({
1831
1827
  kind: "length",
1832
1828
  value: e,
1833
- ...y.errToObj(t)
1829
+ ...b.errToObj(t)
1834
1830
  });
1835
1831
  }
1836
1832
  nonempty(e) {
1837
- return this.min(1, y.errToObj(e));
1833
+ return this.min(1, b.errToObj(e));
1838
1834
  }
1839
1835
  trim() {
1840
1836
  return new e({
@@ -1915,52 +1911,52 @@ var Ze = class e extends S {
1915
1911
  };
1916
1912
  Ze.create = (e) => new Ze({
1917
1913
  checks: [],
1918
- typeName: P.ZodString,
1914
+ typeName: F.ZodString,
1919
1915
  coerce: e?.coerce ?? !1,
1920
- ...x(e)
1916
+ ...S(e)
1921
1917
  });
1922
1918
  function Qe(e, t) {
1923
1919
  let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
1924
1920
  return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
1925
1921
  }
1926
- var $e = class e extends S {
1922
+ var $e = class e extends C {
1927
1923
  constructor() {
1928
1924
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1929
1925
  }
1930
1926
  _parse(e) {
1931
1927
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== u.number) {
1932
1928
  let t = this._getOrReturnCtx(e);
1933
- return m(t, {
1929
+ return h(t, {
1934
1930
  code: f.invalid_type,
1935
1931
  expected: u.number,
1936
1932
  received: t.parsedType
1937
- }), g;
1933
+ }), _;
1938
1934
  }
1939
- let t, n = new h();
1940
- for (let r of this._def.checks) r.kind === "int" ? l.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), m(t, {
1935
+ let t, n = new g();
1936
+ for (let r of this._def.checks) r.kind === "int" ? l.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), h(t, {
1941
1937
  code: f.invalid_type,
1942
1938
  expected: "integer",
1943
1939
  received: "float",
1944
1940
  message: r.message
1945
- }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
1941
+ }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
1946
1942
  code: f.too_small,
1947
1943
  minimum: r.value,
1948
1944
  type: "number",
1949
1945
  inclusive: r.inclusive,
1950
1946
  exact: !1,
1951
1947
  message: r.message
1952
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
1948
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
1953
1949
  code: f.too_big,
1954
1950
  maximum: r.value,
1955
1951
  type: "number",
1956
1952
  inclusive: r.inclusive,
1957
1953
  exact: !1,
1958
1954
  message: r.message
1959
- }), n.dirty()) : r.kind === "multipleOf" ? Qe(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), m(t, {
1955
+ }), n.dirty()) : r.kind === "multipleOf" ? Qe(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
1960
1956
  code: f.not_multiple_of,
1961
1957
  multipleOf: r.value,
1962
1958
  message: r.message
1963
- }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), m(t, {
1959
+ }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), h(t, {
1964
1960
  code: f.not_finite,
1965
1961
  message: r.message
1966
1962
  }), n.dirty()) : l.assertNever(r);
@@ -1970,16 +1966,16 @@ var $e = class e extends S {
1970
1966
  };
1971
1967
  }
1972
1968
  gte(e, t) {
1973
- return this.setLimit("min", e, !0, y.toString(t));
1969
+ return this.setLimit("min", e, !0, b.toString(t));
1974
1970
  }
1975
1971
  gt(e, t) {
1976
- return this.setLimit("min", e, !1, y.toString(t));
1972
+ return this.setLimit("min", e, !1, b.toString(t));
1977
1973
  }
1978
1974
  lte(e, t) {
1979
- return this.setLimit("max", e, !0, y.toString(t));
1975
+ return this.setLimit("max", e, !0, b.toString(t));
1980
1976
  }
1981
1977
  lt(e, t) {
1982
- return this.setLimit("max", e, !1, y.toString(t));
1978
+ return this.setLimit("max", e, !1, b.toString(t));
1983
1979
  }
1984
1980
  setLimit(t, n, r, i) {
1985
1981
  return new e({
@@ -1988,7 +1984,7 @@ var $e = class e extends S {
1988
1984
  kind: t,
1989
1985
  value: n,
1990
1986
  inclusive: r,
1991
- message: y.toString(i)
1987
+ message: b.toString(i)
1992
1988
  }]
1993
1989
  });
1994
1990
  }
@@ -2001,7 +1997,7 @@ var $e = class e extends S {
2001
1997
  int(e) {
2002
1998
  return this._addCheck({
2003
1999
  kind: "int",
2004
- message: y.toString(e)
2000
+ message: b.toString(e)
2005
2001
  });
2006
2002
  }
2007
2003
  positive(e) {
@@ -2009,7 +2005,7 @@ var $e = class e extends S {
2009
2005
  kind: "min",
2010
2006
  value: 0,
2011
2007
  inclusive: !1,
2012
- message: y.toString(e)
2008
+ message: b.toString(e)
2013
2009
  });
2014
2010
  }
2015
2011
  negative(e) {
@@ -2017,7 +2013,7 @@ var $e = class e extends S {
2017
2013
  kind: "max",
2018
2014
  value: 0,
2019
2015
  inclusive: !1,
2020
- message: y.toString(e)
2016
+ message: b.toString(e)
2021
2017
  });
2022
2018
  }
2023
2019
  nonpositive(e) {
@@ -2025,7 +2021,7 @@ var $e = class e extends S {
2025
2021
  kind: "max",
2026
2022
  value: 0,
2027
2023
  inclusive: !0,
2028
- message: y.toString(e)
2024
+ message: b.toString(e)
2029
2025
  });
2030
2026
  }
2031
2027
  nonnegative(e) {
@@ -2033,20 +2029,20 @@ var $e = class e extends S {
2033
2029
  kind: "min",
2034
2030
  value: 0,
2035
2031
  inclusive: !0,
2036
- message: y.toString(e)
2032
+ message: b.toString(e)
2037
2033
  });
2038
2034
  }
2039
2035
  multipleOf(e, t) {
2040
2036
  return this._addCheck({
2041
2037
  kind: "multipleOf",
2042
2038
  value: e,
2043
- message: y.toString(t)
2039
+ message: b.toString(t)
2044
2040
  });
2045
2041
  }
2046
2042
  finite(e) {
2047
2043
  return this._addCheck({
2048
2044
  kind: "finite",
2049
- message: y.toString(e)
2045
+ message: b.toString(e)
2050
2046
  });
2051
2047
  }
2052
2048
  safe(e) {
@@ -2054,12 +2050,12 @@ var $e = class e extends S {
2054
2050
  kind: "min",
2055
2051
  inclusive: !0,
2056
2052
  value: -(2 ** 53 - 1),
2057
- message: y.toString(e)
2053
+ message: b.toString(e)
2058
2054
  })._addCheck({
2059
2055
  kind: "max",
2060
2056
  inclusive: !0,
2061
2057
  value: 2 ** 53 - 1,
2062
- message: y.toString(e)
2058
+ message: b.toString(e)
2063
2059
  });
2064
2060
  }
2065
2061
  get minValue() {
@@ -2084,11 +2080,11 @@ var $e = class e extends S {
2084
2080
  };
2085
2081
  $e.create = (e) => new $e({
2086
2082
  checks: [],
2087
- typeName: P.ZodNumber,
2083
+ typeName: F.ZodNumber,
2088
2084
  coerce: e?.coerce || !1,
2089
- ...x(e)
2085
+ ...S(e)
2090
2086
  });
2091
- var et = class e extends S {
2087
+ var et = class e extends C {
2092
2088
  constructor() {
2093
2089
  super(...arguments), this.min = this.gte, this.max = this.lte;
2094
2090
  }
@@ -2099,20 +2095,20 @@ var et = class e extends S {
2099
2095
  return this._getInvalidInput(e);
2100
2096
  }
2101
2097
  if (this._getType(e) !== u.bigint) return this._getInvalidInput(e);
2102
- let t, n = new h();
2103
- for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
2098
+ let t, n = new g();
2099
+ for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
2104
2100
  code: f.too_small,
2105
2101
  type: "bigint",
2106
2102
  minimum: r.value,
2107
2103
  inclusive: r.inclusive,
2108
2104
  message: r.message
2109
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), m(t, {
2105
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), h(t, {
2110
2106
  code: f.too_big,
2111
2107
  type: "bigint",
2112
2108
  maximum: r.value,
2113
2109
  inclusive: r.inclusive,
2114
2110
  message: r.message
2115
- }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), m(t, {
2111
+ }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), h(t, {
2116
2112
  code: f.not_multiple_of,
2117
2113
  multipleOf: r.value,
2118
2114
  message: r.message
@@ -2124,23 +2120,23 @@ var et = class e extends S {
2124
2120
  }
2125
2121
  _getInvalidInput(e) {
2126
2122
  let t = this._getOrReturnCtx(e);
2127
- return m(t, {
2123
+ return h(t, {
2128
2124
  code: f.invalid_type,
2129
2125
  expected: u.bigint,
2130
2126
  received: t.parsedType
2131
- }), g;
2127
+ }), _;
2132
2128
  }
2133
2129
  gte(e, t) {
2134
- return this.setLimit("min", e, !0, y.toString(t));
2130
+ return this.setLimit("min", e, !0, b.toString(t));
2135
2131
  }
2136
2132
  gt(e, t) {
2137
- return this.setLimit("min", e, !1, y.toString(t));
2133
+ return this.setLimit("min", e, !1, b.toString(t));
2138
2134
  }
2139
2135
  lte(e, t) {
2140
- return this.setLimit("max", e, !0, y.toString(t));
2136
+ return this.setLimit("max", e, !0, b.toString(t));
2141
2137
  }
2142
2138
  lt(e, t) {
2143
- return this.setLimit("max", e, !1, y.toString(t));
2139
+ return this.setLimit("max", e, !1, b.toString(t));
2144
2140
  }
2145
2141
  setLimit(t, n, r, i) {
2146
2142
  return new e({
@@ -2149,7 +2145,7 @@ var et = class e extends S {
2149
2145
  kind: t,
2150
2146
  value: n,
2151
2147
  inclusive: r,
2152
- message: y.toString(i)
2148
+ message: b.toString(i)
2153
2149
  }]
2154
2150
  });
2155
2151
  }
@@ -2164,7 +2160,7 @@ var et = class e extends S {
2164
2160
  kind: "min",
2165
2161
  value: BigInt(0),
2166
2162
  inclusive: !1,
2167
- message: y.toString(e)
2163
+ message: b.toString(e)
2168
2164
  });
2169
2165
  }
2170
2166
  negative(e) {
@@ -2172,7 +2168,7 @@ var et = class e extends S {
2172
2168
  kind: "max",
2173
2169
  value: BigInt(0),
2174
2170
  inclusive: !1,
2175
- message: y.toString(e)
2171
+ message: b.toString(e)
2176
2172
  });
2177
2173
  }
2178
2174
  nonpositive(e) {
@@ -2180,7 +2176,7 @@ var et = class e extends S {
2180
2176
  kind: "max",
2181
2177
  value: BigInt(0),
2182
2178
  inclusive: !0,
2183
- message: y.toString(e)
2179
+ message: b.toString(e)
2184
2180
  });
2185
2181
  }
2186
2182
  nonnegative(e) {
@@ -2188,14 +2184,14 @@ var et = class e extends S {
2188
2184
  kind: "min",
2189
2185
  value: BigInt(0),
2190
2186
  inclusive: !0,
2191
- message: y.toString(e)
2187
+ message: b.toString(e)
2192
2188
  });
2193
2189
  }
2194
2190
  multipleOf(e, t) {
2195
2191
  return this._addCheck({
2196
2192
  kind: "multipleOf",
2197
2193
  value: e,
2198
- message: y.toString(t)
2194
+ message: b.toString(t)
2199
2195
  });
2200
2196
  }
2201
2197
  get minValue() {
@@ -2211,48 +2207,48 @@ var et = class e extends S {
2211
2207
  };
2212
2208
  et.create = (e) => new et({
2213
2209
  checks: [],
2214
- typeName: P.ZodBigInt,
2210
+ typeName: F.ZodBigInt,
2215
2211
  coerce: e?.coerce ?? !1,
2216
- ...x(e)
2212
+ ...S(e)
2217
2213
  });
2218
- var tt = class extends S {
2214
+ var tt = class extends C {
2219
2215
  _parse(e) {
2220
2216
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
2221
2217
  let t = this._getOrReturnCtx(e);
2222
- return m(t, {
2218
+ return h(t, {
2223
2219
  code: f.invalid_type,
2224
2220
  expected: u.boolean,
2225
2221
  received: t.parsedType
2226
- }), g;
2222
+ }), _;
2227
2223
  }
2228
- return _(e.data);
2224
+ return v(e.data);
2229
2225
  }
2230
2226
  };
2231
2227
  tt.create = (e) => new tt({
2232
- typeName: P.ZodBoolean,
2228
+ typeName: F.ZodBoolean,
2233
2229
  coerce: e?.coerce || !1,
2234
- ...x(e)
2230
+ ...S(e)
2235
2231
  });
2236
- var nt = class e extends S {
2232
+ var nt = class e extends C {
2237
2233
  _parse(e) {
2238
2234
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
2239
2235
  let t = this._getOrReturnCtx(e);
2240
- return m(t, {
2236
+ return h(t, {
2241
2237
  code: f.invalid_type,
2242
2238
  expected: u.date,
2243
2239
  received: t.parsedType
2244
- }), g;
2240
+ }), _;
2245
2241
  }
2246
- if (Number.isNaN(e.data.getTime())) return m(this._getOrReturnCtx(e), { code: f.invalid_date }), g;
2247
- let t = new h(), n;
2248
- for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), m(n, {
2242
+ if (Number.isNaN(e.data.getTime())) return h(this._getOrReturnCtx(e), { code: f.invalid_date }), _;
2243
+ let t = new g(), n;
2244
+ for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), h(n, {
2249
2245
  code: f.too_small,
2250
2246
  message: r.message,
2251
2247
  inclusive: !0,
2252
2248
  exact: !1,
2253
2249
  minimum: r.value,
2254
2250
  type: "date"
2255
- }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), m(n, {
2251
+ }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), h(n, {
2256
2252
  code: f.too_big,
2257
2253
  message: r.message,
2258
2254
  inclusive: !0,
@@ -2275,14 +2271,14 @@ var nt = class e extends S {
2275
2271
  return this._addCheck({
2276
2272
  kind: "min",
2277
2273
  value: e.getTime(),
2278
- message: y.toString(t)
2274
+ message: b.toString(t)
2279
2275
  });
2280
2276
  }
2281
2277
  max(e, t) {
2282
2278
  return this._addCheck({
2283
2279
  kind: "max",
2284
2280
  value: e.getTime(),
2285
- message: y.toString(t)
2281
+ message: b.toString(t)
2286
2282
  });
2287
2283
  }
2288
2284
  get minDate() {
@@ -2299,126 +2295,126 @@ var nt = class e extends S {
2299
2295
  nt.create = (e) => new nt({
2300
2296
  checks: [],
2301
2297
  coerce: e?.coerce || !1,
2302
- typeName: P.ZodDate,
2303
- ...x(e)
2298
+ typeName: F.ZodDate,
2299
+ ...S(e)
2304
2300
  });
2305
- var rt = class extends S {
2301
+ var rt = class extends C {
2306
2302
  _parse(e) {
2307
2303
  if (this._getType(e) !== u.symbol) {
2308
2304
  let t = this._getOrReturnCtx(e);
2309
- return m(t, {
2305
+ return h(t, {
2310
2306
  code: f.invalid_type,
2311
2307
  expected: u.symbol,
2312
2308
  received: t.parsedType
2313
- }), g;
2309
+ }), _;
2314
2310
  }
2315
- return _(e.data);
2311
+ return v(e.data);
2316
2312
  }
2317
2313
  };
2318
2314
  rt.create = (e) => new rt({
2319
- typeName: P.ZodSymbol,
2320
- ...x(e)
2315
+ typeName: F.ZodSymbol,
2316
+ ...S(e)
2321
2317
  });
2322
- var it = class extends S {
2318
+ var it = class extends C {
2323
2319
  _parse(e) {
2324
2320
  if (this._getType(e) !== u.undefined) {
2325
2321
  let t = this._getOrReturnCtx(e);
2326
- return m(t, {
2322
+ return h(t, {
2327
2323
  code: f.invalid_type,
2328
2324
  expected: u.undefined,
2329
2325
  received: t.parsedType
2330
- }), g;
2326
+ }), _;
2331
2327
  }
2332
- return _(e.data);
2328
+ return v(e.data);
2333
2329
  }
2334
2330
  };
2335
2331
  it.create = (e) => new it({
2336
- typeName: P.ZodUndefined,
2337
- ...x(e)
2332
+ typeName: F.ZodUndefined,
2333
+ ...S(e)
2338
2334
  });
2339
- var at = class extends S {
2335
+ var at = class extends C {
2340
2336
  _parse(e) {
2341
2337
  if (this._getType(e) !== u.null) {
2342
2338
  let t = this._getOrReturnCtx(e);
2343
- return m(t, {
2339
+ return h(t, {
2344
2340
  code: f.invalid_type,
2345
2341
  expected: u.null,
2346
2342
  received: t.parsedType
2347
- }), g;
2343
+ }), _;
2348
2344
  }
2349
- return _(e.data);
2345
+ return v(e.data);
2350
2346
  }
2351
2347
  };
2352
2348
  at.create = (e) => new at({
2353
- typeName: P.ZodNull,
2354
- ...x(e)
2349
+ typeName: F.ZodNull,
2350
+ ...S(e)
2355
2351
  });
2356
- var ot = class extends S {
2352
+ var ot = class extends C {
2357
2353
  constructor() {
2358
2354
  super(...arguments), this._any = !0;
2359
2355
  }
2360
2356
  _parse(e) {
2361
- return _(e.data);
2357
+ return v(e.data);
2362
2358
  }
2363
2359
  };
2364
2360
  ot.create = (e) => new ot({
2365
- typeName: P.ZodAny,
2366
- ...x(e)
2361
+ typeName: F.ZodAny,
2362
+ ...S(e)
2367
2363
  });
2368
- var C = class extends S {
2364
+ var w = class extends C {
2369
2365
  constructor() {
2370
2366
  super(...arguments), this._unknown = !0;
2371
2367
  }
2372
2368
  _parse(e) {
2373
- return _(e.data);
2369
+ return v(e.data);
2374
2370
  }
2375
2371
  };
2376
- C.create = (e) => new C({
2377
- typeName: P.ZodUnknown,
2378
- ...x(e)
2372
+ w.create = (e) => new w({
2373
+ typeName: F.ZodUnknown,
2374
+ ...S(e)
2379
2375
  });
2380
- var w = class extends S {
2376
+ var T = class extends C {
2381
2377
  _parse(e) {
2382
2378
  let t = this._getOrReturnCtx(e);
2383
- return m(t, {
2379
+ return h(t, {
2384
2380
  code: f.invalid_type,
2385
2381
  expected: u.never,
2386
2382
  received: t.parsedType
2387
- }), g;
2383
+ }), _;
2388
2384
  }
2389
2385
  };
2390
- w.create = (e) => new w({
2391
- typeName: P.ZodNever,
2392
- ...x(e)
2386
+ T.create = (e) => new T({
2387
+ typeName: F.ZodNever,
2388
+ ...S(e)
2393
2389
  });
2394
- var st = class extends S {
2390
+ var st = class extends C {
2395
2391
  _parse(e) {
2396
2392
  if (this._getType(e) !== u.undefined) {
2397
2393
  let t = this._getOrReturnCtx(e);
2398
- return m(t, {
2394
+ return h(t, {
2399
2395
  code: f.invalid_type,
2400
2396
  expected: u.void,
2401
2397
  received: t.parsedType
2402
- }), g;
2398
+ }), _;
2403
2399
  }
2404
- return _(e.data);
2400
+ return v(e.data);
2405
2401
  }
2406
2402
  };
2407
2403
  st.create = (e) => new st({
2408
- typeName: P.ZodVoid,
2409
- ...x(e)
2404
+ typeName: F.ZodVoid,
2405
+ ...S(e)
2410
2406
  });
2411
- var T = class e extends S {
2407
+ var E = class e extends C {
2412
2408
  _parse(e) {
2413
2409
  let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
2414
- if (t.parsedType !== u.array) return m(t, {
2410
+ if (t.parsedType !== u.array) return h(t, {
2415
2411
  code: f.invalid_type,
2416
2412
  expected: u.array,
2417
2413
  received: t.parsedType
2418
- }), g;
2414
+ }), _;
2419
2415
  if (r.exactLength !== null) {
2420
2416
  let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
2421
- (e || i) && (m(t, {
2417
+ (e || i) && (h(t, {
2422
2418
  code: e ? f.too_big : f.too_small,
2423
2419
  minimum: i ? r.exactLength.value : void 0,
2424
2420
  maximum: e ? r.exactLength.value : void 0,
@@ -2428,23 +2424,23 @@ var T = class e extends S {
2428
2424
  message: r.exactLength.message
2429
2425
  }), n.dirty());
2430
2426
  }
2431
- if (r.minLength !== null && t.data.length < r.minLength.value && (m(t, {
2427
+ if (r.minLength !== null && t.data.length < r.minLength.value && (h(t, {
2432
2428
  code: f.too_small,
2433
2429
  minimum: r.minLength.value,
2434
2430
  type: "array",
2435
2431
  inclusive: !0,
2436
2432
  exact: !1,
2437
2433
  message: r.minLength.message
2438
- }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (m(t, {
2434
+ }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (h(t, {
2439
2435
  code: f.too_big,
2440
2436
  maximum: r.maxLength.value,
2441
2437
  type: "array",
2442
2438
  inclusive: !0,
2443
2439
  exact: !1,
2444
2440
  message: r.maxLength.message
2445
- }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new b(t, e, t.path, n)))).then((e) => h.mergeArray(n, e));
2446
- let i = [...t.data].map((e, n) => r.type._parseSync(new b(t, e, t.path, n)));
2447
- return h.mergeArray(n, i);
2441
+ }), 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));
2442
+ let i = [...t.data].map((e, n) => r.type._parseSync(new x(t, e, t.path, n)));
2443
+ return g.mergeArray(n, i);
2448
2444
  }
2449
2445
  get element() {
2450
2446
  return this._def.type;
@@ -2454,7 +2450,7 @@ var T = class e extends S {
2454
2450
  ...this._def,
2455
2451
  minLength: {
2456
2452
  value: t,
2457
- message: y.toString(n)
2453
+ message: b.toString(n)
2458
2454
  }
2459
2455
  });
2460
2456
  }
@@ -2463,7 +2459,7 @@ var T = class e extends S {
2463
2459
  ...this._def,
2464
2460
  maxLength: {
2465
2461
  value: t,
2466
- message: y.toString(n)
2462
+ message: b.toString(n)
2467
2463
  }
2468
2464
  });
2469
2465
  }
@@ -2472,7 +2468,7 @@ var T = class e extends S {
2472
2468
  ...this._def,
2473
2469
  exactLength: {
2474
2470
  value: t,
2475
- message: y.toString(n)
2471
+ message: b.toString(n)
2476
2472
  }
2477
2473
  });
2478
2474
  }
@@ -2480,32 +2476,32 @@ var T = class e extends S {
2480
2476
  return this.min(1, e);
2481
2477
  }
2482
2478
  };
2483
- T.create = (e, t) => new T({
2479
+ E.create = (e, t) => new E({
2484
2480
  type: e,
2485
2481
  minLength: null,
2486
2482
  maxLength: null,
2487
2483
  exactLength: null,
2488
- typeName: P.ZodArray,
2489
- ...x(t)
2484
+ typeName: F.ZodArray,
2485
+ ...S(t)
2490
2486
  });
2491
- function E(e) {
2492
- if (e instanceof D) {
2487
+ function D(e) {
2488
+ if (e instanceof O) {
2493
2489
  let t = {};
2494
2490
  for (let n in e.shape) {
2495
2491
  let r = e.shape[n];
2496
- t[n] = M.create(E(r));
2492
+ t[n] = N.create(D(r));
2497
2493
  }
2498
- return new D({
2494
+ return new O({
2499
2495
  ...e._def,
2500
2496
  shape: () => t
2501
2497
  });
2502
2498
  }
2503
- return e instanceof T ? new T({
2499
+ return e instanceof E ? new E({
2504
2500
  ...e._def,
2505
- type: E(e.element)
2506
- }) : e instanceof M ? M.create(E(e.unwrap())) : e instanceof N ? N.create(E(e.unwrap())) : e instanceof k ? k.create(e.items.map((e) => E(e))) : e;
2501
+ type: D(e.element)
2502
+ }) : e instanceof N ? N.create(D(e.unwrap())) : e instanceof P ? P.create(D(e.unwrap())) : e instanceof A ? A.create(e.items.map((e) => D(e))) : e;
2507
2503
  }
2508
- var D = class e extends S {
2504
+ var O = class e extends C {
2509
2505
  constructor() {
2510
2506
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
2511
2507
  }
@@ -2520,14 +2516,14 @@ var D = class e extends S {
2520
2516
  _parse(e) {
2521
2517
  if (this._getType(e) !== u.object) {
2522
2518
  let t = this._getOrReturnCtx(e);
2523
- return m(t, {
2519
+ return h(t, {
2524
2520
  code: f.invalid_type,
2525
2521
  expected: u.object,
2526
2522
  received: t.parsedType
2527
- }), g;
2523
+ }), _;
2528
2524
  }
2529
2525
  let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
2530
- if (!(this._def.catchall instanceof w && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
2526
+ if (!(this._def.catchall instanceof T && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
2531
2527
  let o = [];
2532
2528
  for (let e of i) {
2533
2529
  let t = r[e], i = n.data[e];
@@ -2536,11 +2532,11 @@ var D = class e extends S {
2536
2532
  status: "valid",
2537
2533
  value: e
2538
2534
  },
2539
- value: t._parse(new b(n, i, n.path, e)),
2535
+ value: t._parse(new x(n, i, n.path, e)),
2540
2536
  alwaysSet: e in n.data
2541
2537
  });
2542
2538
  }
2543
- if (this._def.catchall instanceof w) {
2539
+ if (this._def.catchall instanceof T) {
2544
2540
  let e = this._def.unknownKeys;
2545
2541
  if (e === "passthrough") for (let e of a) o.push({
2546
2542
  key: {
@@ -2552,7 +2548,7 @@ var D = class e extends S {
2552
2548
  value: n.data[e]
2553
2549
  }
2554
2550
  });
2555
- else if (e === "strict") a.length > 0 && (m(n, {
2551
+ else if (e === "strict") a.length > 0 && (h(n, {
2556
2552
  code: f.unrecognized_keys,
2557
2553
  keys: a
2558
2554
  }), t.dirty());
@@ -2566,7 +2562,7 @@ var D = class e extends S {
2566
2562
  status: "valid",
2567
2563
  value: t
2568
2564
  },
2569
- value: e._parse(new b(n, r, n.path, t)),
2565
+ value: e._parse(new x(n, r, n.path, t)),
2570
2566
  alwaysSet: t in n.data
2571
2567
  });
2572
2568
  }
@@ -2582,18 +2578,18 @@ var D = class e extends S {
2582
2578
  });
2583
2579
  }
2584
2580
  return e;
2585
- }).then((e) => h.mergeObjectSync(t, e)) : h.mergeObjectSync(t, o);
2581
+ }).then((e) => g.mergeObjectSync(t, e)) : g.mergeObjectSync(t, o);
2586
2582
  }
2587
2583
  get shape() {
2588
2584
  return this._def.shape();
2589
2585
  }
2590
2586
  strict(t) {
2591
- return y.errToObj, new e({
2587
+ return b.errToObj, new e({
2592
2588
  ...this._def,
2593
2589
  unknownKeys: "strict",
2594
2590
  ...t === void 0 ? {} : { errorMap: (e, n) => {
2595
2591
  let r = this._def.errorMap?.(e, n).message ?? n.defaultError;
2596
- return e.code === "unrecognized_keys" ? { message: y.errToObj(t).message ?? r } : { message: r };
2592
+ return e.code === "unrecognized_keys" ? { message: b.errToObj(t).message ?? r } : { message: r };
2597
2593
  } }
2598
2594
  });
2599
2595
  }
@@ -2626,7 +2622,7 @@ var D = class e extends S {
2626
2622
  ...this._def.shape(),
2627
2623
  ...t._def.shape()
2628
2624
  }),
2629
- typeName: P.ZodObject
2625
+ typeName: F.ZodObject
2630
2626
  });
2631
2627
  }
2632
2628
  setKey(e, t) {
@@ -2655,7 +2651,7 @@ var D = class e extends S {
2655
2651
  });
2656
2652
  }
2657
2653
  deepPartial() {
2658
- return E(this);
2654
+ return D(this);
2659
2655
  }
2660
2656
  partial(t) {
2661
2657
  let n = {};
@@ -2673,7 +2669,7 @@ var D = class e extends S {
2673
2669
  for (let e of l.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
2674
2670
  else {
2675
2671
  let t = this.shape[e];
2676
- for (; t instanceof M;) t = t._def.innerType;
2672
+ for (; t instanceof N;) t = t._def.innerType;
2677
2673
  n[e] = t;
2678
2674
  }
2679
2675
  return new e({
@@ -2685,36 +2681,36 @@ var D = class e extends S {
2685
2681
  return vt(l.objectKeys(this.shape));
2686
2682
  }
2687
2683
  };
2688
- D.create = (e, t) => new D({
2684
+ O.create = (e, t) => new O({
2689
2685
  shape: () => e,
2690
2686
  unknownKeys: "strip",
2691
- catchall: w.create(),
2692
- typeName: P.ZodObject,
2693
- ...x(t)
2694
- }), D.strictCreate = (e, t) => new D({
2687
+ catchall: T.create(),
2688
+ typeName: F.ZodObject,
2689
+ ...S(t)
2690
+ }), O.strictCreate = (e, t) => new O({
2695
2691
  shape: () => e,
2696
2692
  unknownKeys: "strict",
2697
- catchall: w.create(),
2698
- typeName: P.ZodObject,
2699
- ...x(t)
2700
- }), D.lazycreate = (e, t) => new D({
2693
+ catchall: T.create(),
2694
+ typeName: F.ZodObject,
2695
+ ...S(t)
2696
+ }), O.lazycreate = (e, t) => new O({
2701
2697
  shape: e,
2702
2698
  unknownKeys: "strip",
2703
- catchall: w.create(),
2704
- typeName: P.ZodObject,
2705
- ...x(t)
2699
+ catchall: T.create(),
2700
+ typeName: F.ZodObject,
2701
+ ...S(t)
2706
2702
  });
2707
- var ct = class extends S {
2703
+ var ct = class extends C {
2708
2704
  _parse(e) {
2709
2705
  let { ctx: t } = this._processInputParams(e), n = this._def.options;
2710
2706
  function r(e) {
2711
2707
  for (let t of e) if (t.result.status === "valid") return t.result;
2712
2708
  for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
2713
2709
  let n = e.map((e) => new p(e.ctx.common.issues));
2714
- return m(t, {
2710
+ return h(t, {
2715
2711
  code: f.invalid_union,
2716
2712
  unionErrors: n
2717
- }), g;
2713
+ }), _;
2718
2714
  }
2719
2715
  if (t.common.async) return Promise.all(n.map(async (e) => {
2720
2716
  let n = {
@@ -2757,10 +2753,10 @@ var ct = class extends S {
2757
2753
  }
2758
2754
  if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
2759
2755
  let i = r.map((e) => new p(e));
2760
- return m(t, {
2756
+ return h(t, {
2761
2757
  code: f.invalid_union,
2762
2758
  unionErrors: i
2763
- }), g;
2759
+ }), _;
2764
2760
  }
2765
2761
  }
2766
2762
  get options() {
@@ -2769,17 +2765,17 @@ var ct = class extends S {
2769
2765
  };
2770
2766
  ct.create = (e, t) => new ct({
2771
2767
  options: e,
2772
- typeName: P.ZodUnion,
2773
- ...x(t)
2768
+ typeName: F.ZodUnion,
2769
+ ...S(t)
2774
2770
  });
2775
- var O = (e) => e instanceof gt ? O(e.schema) : e instanceof j ? O(e.innerType()) : e instanceof _t ? [e.value] : e instanceof yt ? e.options : e instanceof bt ? l.objectValues(e.enum) : e instanceof xt ? O(e._def.innerType) : e instanceof it ? [void 0] : e instanceof at ? [null] : e instanceof M ? [void 0, ...O(e.unwrap())] : e instanceof N ? [null, ...O(e.unwrap())] : e instanceof wt || e instanceof Et ? O(e.unwrap()) : e instanceof St ? O(e._def.innerType) : [], lt = class e extends S {
2771
+ var k = (e) => e instanceof gt ? k(e.schema) : e instanceof M ? k(e.innerType()) : e instanceof _t ? [e.value] : e instanceof yt ? e.options : e instanceof bt ? l.objectValues(e.enum) : e instanceof xt ? k(e._def.innerType) : e instanceof it ? [void 0] : e instanceof at ? [null] : e instanceof N ? [void 0, ...k(e.unwrap())] : e instanceof P ? [null, ...k(e.unwrap())] : e instanceof wt || e instanceof Et ? k(e.unwrap()) : e instanceof St ? k(e._def.innerType) : [], lt = class e extends C {
2776
2772
  _parse(e) {
2777
2773
  let { ctx: t } = this._processInputParams(e);
2778
- if (t.parsedType !== u.object) return m(t, {
2774
+ if (t.parsedType !== u.object) return h(t, {
2779
2775
  code: f.invalid_type,
2780
2776
  expected: u.object,
2781
2777
  received: t.parsedType
2782
- }), g;
2778
+ }), _;
2783
2779
  let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
2784
2780
  return i ? t.common.async ? i._parseAsync({
2785
2781
  data: t.data,
@@ -2789,11 +2785,11 @@ var O = (e) => e instanceof gt ? O(e.schema) : e instanceof j ? O(e.innerType())
2789
2785
  data: t.data,
2790
2786
  path: t.path,
2791
2787
  parent: t
2792
- }) : (m(t, {
2788
+ }) : (h(t, {
2793
2789
  code: f.invalid_union_discriminator,
2794
2790
  options: Array.from(this.optionsMap.keys()),
2795
2791
  path: [n]
2796
- }), g);
2792
+ }), _);
2797
2793
  }
2798
2794
  get discriminator() {
2799
2795
  return this._def.discriminator;
@@ -2807,7 +2803,7 @@ var O = (e) => e instanceof gt ? O(e.schema) : e instanceof j ? O(e.innerType())
2807
2803
  static create(t, n, r) {
2808
2804
  let i = /* @__PURE__ */ new Map();
2809
2805
  for (let e of n) {
2810
- let n = O(e.shape[t]);
2806
+ let n = k(e.shape[t]);
2811
2807
  if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
2812
2808
  for (let r of n) {
2813
2809
  if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
@@ -2815,11 +2811,11 @@ var O = (e) => e instanceof gt ? O(e.schema) : e instanceof j ? O(e.innerType())
2815
2811
  }
2816
2812
  }
2817
2813
  return new e({
2818
- typeName: P.ZodDiscriminatedUnion,
2814
+ typeName: F.ZodDiscriminatedUnion,
2819
2815
  discriminator: t,
2820
2816
  options: n,
2821
2817
  optionsMap: i,
2822
- ...x(r)
2818
+ ...S(r)
2823
2819
  });
2824
2820
  }
2825
2821
  };
@@ -2862,15 +2858,15 @@ function ut(e, t) {
2862
2858
  data: e
2863
2859
  } : { valid: !1 };
2864
2860
  }
2865
- var dt = class extends S {
2861
+ var dt = class extends C {
2866
2862
  _parse(e) {
2867
2863
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
2868
- if (Ce(e) || Ce(r)) return g;
2864
+ if (Ce(e) || Ce(r)) return _;
2869
2865
  let i = ut(e.value, r.value);
2870
2866
  return i.valid ? ((we(e) || we(r)) && t.dirty(), {
2871
2867
  status: t.value,
2872
2868
  value: i.data
2873
- }) : (m(n, { code: f.invalid_intersection_types }), g);
2869
+ }) : (h(n, { code: f.invalid_intersection_types }), _);
2874
2870
  };
2875
2871
  return n.common.async ? Promise.all([this._def.left._parseAsync({
2876
2872
  data: n.data,
@@ -2894,25 +2890,25 @@ var dt = class extends S {
2894
2890
  dt.create = (e, t, n) => new dt({
2895
2891
  left: e,
2896
2892
  right: t,
2897
- typeName: P.ZodIntersection,
2898
- ...x(n)
2893
+ typeName: F.ZodIntersection,
2894
+ ...S(n)
2899
2895
  });
2900
- var k = class e extends S {
2896
+ var A = class e extends C {
2901
2897
  _parse(e) {
2902
2898
  let { status: t, ctx: n } = this._processInputParams(e);
2903
- if (n.parsedType !== u.array) return m(n, {
2899
+ if (n.parsedType !== u.array) return h(n, {
2904
2900
  code: f.invalid_type,
2905
2901
  expected: u.array,
2906
2902
  received: n.parsedType
2907
- }), g;
2908
- if (n.data.length < this._def.items.length) return m(n, {
2903
+ }), _;
2904
+ if (n.data.length < this._def.items.length) return h(n, {
2909
2905
  code: f.too_small,
2910
2906
  minimum: this._def.items.length,
2911
2907
  inclusive: !0,
2912
2908
  exact: !1,
2913
2909
  type: "array"
2914
- }), g;
2915
- !this._def.rest && n.data.length > this._def.items.length && (m(n, {
2910
+ }), _;
2911
+ !this._def.rest && n.data.length > this._def.items.length && (h(n, {
2916
2912
  code: f.too_big,
2917
2913
  maximum: this._def.items.length,
2918
2914
  inclusive: !0,
@@ -2921,9 +2917,9 @@ var k = class e extends S {
2921
2917
  }), t.dirty());
2922
2918
  let r = [...n.data].map((e, t) => {
2923
2919
  let r = this._def.items[t] || this._def.rest;
2924
- return r ? r._parse(new b(n, e, n.path, t)) : null;
2920
+ return r ? r._parse(new x(n, e, n.path, t)) : null;
2925
2921
  }).filter((e) => !!e);
2926
- return n.common.async ? Promise.all(r).then((e) => h.mergeArray(t, e)) : h.mergeArray(t, r);
2922
+ return n.common.async ? Promise.all(r).then((e) => g.mergeArray(t, e)) : g.mergeArray(t, r);
2927
2923
  }
2928
2924
  get items() {
2929
2925
  return this._def.items;
@@ -2935,16 +2931,16 @@ var k = class e extends S {
2935
2931
  });
2936
2932
  }
2937
2933
  };
2938
- k.create = (e, t) => {
2934
+ A.create = (e, t) => {
2939
2935
  if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
2940
- return new k({
2936
+ return new A({
2941
2937
  items: e,
2942
- typeName: P.ZodTuple,
2938
+ typeName: F.ZodTuple,
2943
2939
  rest: null,
2944
- ...x(t)
2940
+ ...S(t)
2945
2941
  });
2946
2942
  };
2947
- var ft = class e extends S {
2943
+ var ft = class e extends C {
2948
2944
  get keySchema() {
2949
2945
  return this._def.keyType;
2950
2946
  }
@@ -2953,36 +2949,36 @@ var ft = class e extends S {
2953
2949
  }
2954
2950
  _parse(e) {
2955
2951
  let { status: t, ctx: n } = this._processInputParams(e);
2956
- if (n.parsedType !== u.object) return m(n, {
2952
+ if (n.parsedType !== u.object) return h(n, {
2957
2953
  code: f.invalid_type,
2958
2954
  expected: u.object,
2959
2955
  received: n.parsedType
2960
- }), g;
2956
+ }), _;
2961
2957
  let r = [], i = this._def.keyType, a = this._def.valueType;
2962
2958
  for (let e in n.data) r.push({
2963
- key: i._parse(new b(n, e, n.path, e)),
2964
- value: a._parse(new b(n, n.data[e], n.path, e)),
2959
+ key: i._parse(new x(n, e, n.path, e)),
2960
+ value: a._parse(new x(n, n.data[e], n.path, e)),
2965
2961
  alwaysSet: e in n.data
2966
2962
  });
2967
- return n.common.async ? h.mergeObjectAsync(t, r) : h.mergeObjectSync(t, r);
2963
+ return n.common.async ? g.mergeObjectAsync(t, r) : g.mergeObjectSync(t, r);
2968
2964
  }
2969
2965
  get element() {
2970
2966
  return this._def.valueType;
2971
2967
  }
2972
2968
  static create(t, n, r) {
2973
- return n instanceof S ? new e({
2969
+ return n instanceof C ? new e({
2974
2970
  keyType: t,
2975
2971
  valueType: n,
2976
- typeName: P.ZodRecord,
2977
- ...x(r)
2972
+ typeName: F.ZodRecord,
2973
+ ...S(r)
2978
2974
  }) : new e({
2979
2975
  keyType: Ze.create(),
2980
2976
  valueType: t,
2981
- typeName: P.ZodRecord,
2982
- ...x(n)
2977
+ typeName: F.ZodRecord,
2978
+ ...S(n)
2983
2979
  });
2984
2980
  }
2985
- }, pt = class extends S {
2981
+ }, pt = class extends C {
2986
2982
  get keySchema() {
2987
2983
  return this._def.keyType;
2988
2984
  }
@@ -2991,21 +2987,21 @@ var ft = class e extends S {
2991
2987
  }
2992
2988
  _parse(e) {
2993
2989
  let { status: t, ctx: n } = this._processInputParams(e);
2994
- if (n.parsedType !== u.map) return m(n, {
2990
+ if (n.parsedType !== u.map) return h(n, {
2995
2991
  code: f.invalid_type,
2996
2992
  expected: u.map,
2997
2993
  received: n.parsedType
2998
- }), g;
2994
+ }), _;
2999
2995
  let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
3000
- key: r._parse(new b(n, e, n.path, [a, "key"])),
3001
- value: i._parse(new b(n, t, n.path, [a, "value"]))
2996
+ key: r._parse(new x(n, e, n.path, [a, "key"])),
2997
+ value: i._parse(new x(n, t, n.path, [a, "value"]))
3002
2998
  }));
3003
2999
  if (n.common.async) {
3004
3000
  let e = /* @__PURE__ */ new Map();
3005
3001
  return Promise.resolve().then(async () => {
3006
3002
  for (let n of a) {
3007
3003
  let r = await n.key, i = await n.value;
3008
- if (r.status === "aborted" || i.status === "aborted") return g;
3004
+ if (r.status === "aborted" || i.status === "aborted") return _;
3009
3005
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
3010
3006
  }
3011
3007
  return {
@@ -3018,7 +3014,7 @@ var ft = class e extends S {
3018
3014
  let e = /* @__PURE__ */ new Map();
3019
3015
  for (let n of a) {
3020
3016
  let r = n.key, i = n.value;
3021
- if (r.status === "aborted" || i.status === "aborted") return g;
3017
+ if (r.status === "aborted" || i.status === "aborted") return _;
3022
3018
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
3023
3019
  }
3024
3020
  return {
@@ -3031,26 +3027,26 @@ var ft = class e extends S {
3031
3027
  pt.create = (e, t, n) => new pt({
3032
3028
  valueType: t,
3033
3029
  keyType: e,
3034
- typeName: P.ZodMap,
3035
- ...x(n)
3030
+ typeName: F.ZodMap,
3031
+ ...S(n)
3036
3032
  });
3037
- var mt = class e extends S {
3033
+ var mt = class e extends C {
3038
3034
  _parse(e) {
3039
3035
  let { status: t, ctx: n } = this._processInputParams(e);
3040
- if (n.parsedType !== u.set) return m(n, {
3036
+ if (n.parsedType !== u.set) return h(n, {
3041
3037
  code: f.invalid_type,
3042
3038
  expected: u.set,
3043
3039
  received: n.parsedType
3044
- }), g;
3040
+ }), _;
3045
3041
  let r = this._def;
3046
- r.minSize !== null && n.data.size < r.minSize.value && (m(n, {
3042
+ r.minSize !== null && n.data.size < r.minSize.value && (h(n, {
3047
3043
  code: f.too_small,
3048
3044
  minimum: r.minSize.value,
3049
3045
  type: "set",
3050
3046
  inclusive: !0,
3051
3047
  exact: !1,
3052
3048
  message: r.minSize.message
3053
- }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (m(n, {
3049
+ }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (h(n, {
3054
3050
  code: f.too_big,
3055
3051
  maximum: r.maxSize.value,
3056
3052
  type: "set",
@@ -3062,7 +3058,7 @@ var mt = class e extends S {
3062
3058
  function a(e) {
3063
3059
  let n = /* @__PURE__ */ new Set();
3064
3060
  for (let r of e) {
3065
- if (r.status === "aborted") return g;
3061
+ if (r.status === "aborted") return _;
3066
3062
  r.status === "dirty" && t.dirty(), n.add(r.value);
3067
3063
  }
3068
3064
  return {
@@ -3070,7 +3066,7 @@ var mt = class e extends S {
3070
3066
  value: n
3071
3067
  };
3072
3068
  }
3073
- let o = [...n.data.values()].map((e, t) => i._parse(new b(n, e, n.path, t)));
3069
+ let o = [...n.data.values()].map((e, t) => i._parse(new x(n, e, n.path, t)));
3074
3070
  return n.common.async ? Promise.all(o).then((e) => a(e)) : a(o);
3075
3071
  }
3076
3072
  min(t, n) {
@@ -3078,7 +3074,7 @@ var mt = class e extends S {
3078
3074
  ...this._def,
3079
3075
  minSize: {
3080
3076
  value: t,
3081
- message: y.toString(n)
3077
+ message: b.toString(n)
3082
3078
  }
3083
3079
  });
3084
3080
  }
@@ -3087,7 +3083,7 @@ var mt = class e extends S {
3087
3083
  ...this._def,
3088
3084
  maxSize: {
3089
3085
  value: t,
3090
- message: y.toString(n)
3086
+ message: b.toString(n)
3091
3087
  }
3092
3088
  });
3093
3089
  }
@@ -3102,20 +3098,20 @@ mt.create = (e, t) => new mt({
3102
3098
  valueType: e,
3103
3099
  minSize: null,
3104
3100
  maxSize: null,
3105
- typeName: P.ZodSet,
3106
- ...x(t)
3101
+ typeName: F.ZodSet,
3102
+ ...S(t)
3107
3103
  });
3108
- var ht = class e extends S {
3104
+ var ht = class e extends C {
3109
3105
  constructor() {
3110
3106
  super(...arguments), this.validate = this.implement;
3111
3107
  }
3112
3108
  _parse(e) {
3113
3109
  let { ctx: t } = this._processInputParams(e);
3114
- if (t.parsedType !== u.function) return m(t, {
3110
+ if (t.parsedType !== u.function) return h(t, {
3115
3111
  code: f.invalid_type,
3116
3112
  expected: u.function,
3117
3113
  received: t.parsedType
3118
- }), g;
3114
+ }), _;
3119
3115
  function n(e, n) {
3120
3116
  return xe({
3121
3117
  data: e,
@@ -3124,7 +3120,7 @@ var ht = class e extends S {
3124
3120
  t.common.contextualErrorMap,
3125
3121
  t.schemaErrorMap,
3126
3122
  be(),
3127
- ve
3123
+ m
3128
3124
  ].filter((e) => !!e),
3129
3125
  issueData: {
3130
3126
  code: f.invalid_arguments,
@@ -3140,7 +3136,7 @@ var ht = class e extends S {
3140
3136
  t.common.contextualErrorMap,
3141
3137
  t.schemaErrorMap,
3142
3138
  be(),
3143
- ve
3139
+ m
3144
3140
  ].filter((e) => !!e),
3145
3141
  issueData: {
3146
3142
  code: f.invalid_return_type,
@@ -3149,9 +3145,9 @@ var ht = class e extends S {
3149
3145
  });
3150
3146
  }
3151
3147
  let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
3152
- if (this._def.returns instanceof A) {
3148
+ if (this._def.returns instanceof j) {
3153
3149
  let e = this;
3154
- return _(async function(...t) {
3150
+ return v(async function(...t) {
3155
3151
  let o = new p([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
3156
3152
  throw o.addIssue(n(t, e)), o;
3157
3153
  }), c = await Reflect.apply(a, this, s);
@@ -3162,7 +3158,7 @@ var ht = class e extends S {
3162
3158
  }
3163
3159
  {
3164
3160
  let e = this;
3165
- return _(function(...t) {
3161
+ return v(function(...t) {
3166
3162
  let o = e._def.args.safeParse(t, i);
3167
3163
  if (!o.success) throw new p([n(t, o.error)]);
3168
3164
  let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i);
@@ -3180,7 +3176,7 @@ var ht = class e extends S {
3180
3176
  args(...t) {
3181
3177
  return new e({
3182
3178
  ...this._def,
3183
- args: k.create(t).rest(C.create())
3179
+ args: A.create(t).rest(w.create())
3184
3180
  });
3185
3181
  }
3186
3182
  returns(t) {
@@ -3197,13 +3193,13 @@ var ht = class e extends S {
3197
3193
  }
3198
3194
  static create(t, n, r) {
3199
3195
  return new e({
3200
- args: t || k.create([]).rest(C.create()),
3201
- returns: n || C.create(),
3202
- typeName: P.ZodFunction,
3203
- ...x(r)
3196
+ args: t || A.create([]).rest(w.create()),
3197
+ returns: n || w.create(),
3198
+ typeName: F.ZodFunction,
3199
+ ...S(r)
3204
3200
  });
3205
3201
  }
3206
- }, gt = class extends S {
3202
+ }, gt = class extends C {
3207
3203
  get schema() {
3208
3204
  return this._def.getter();
3209
3205
  }
@@ -3218,18 +3214,18 @@ var ht = class e extends S {
3218
3214
  };
3219
3215
  gt.create = (e, t) => new gt({
3220
3216
  getter: e,
3221
- typeName: P.ZodLazy,
3222
- ...x(t)
3217
+ typeName: F.ZodLazy,
3218
+ ...S(t)
3223
3219
  });
3224
- var _t = class extends S {
3220
+ var _t = class extends C {
3225
3221
  _parse(e) {
3226
3222
  if (e.data !== this._def.value) {
3227
3223
  let t = this._getOrReturnCtx(e);
3228
- return m(t, {
3224
+ return h(t, {
3229
3225
  received: t.data,
3230
3226
  code: f.invalid_literal,
3231
3227
  expected: this._def.value
3232
- }), g;
3228
+ }), _;
3233
3229
  }
3234
3230
  return {
3235
3231
  status: "valid",
@@ -3242,35 +3238,35 @@ var _t = class extends S {
3242
3238
  };
3243
3239
  _t.create = (e, t) => new _t({
3244
3240
  value: e,
3245
- typeName: P.ZodLiteral,
3246
- ...x(t)
3241
+ typeName: F.ZodLiteral,
3242
+ ...S(t)
3247
3243
  });
3248
3244
  function vt(e, t) {
3249
3245
  return new yt({
3250
3246
  values: e,
3251
- typeName: P.ZodEnum,
3252
- ...x(t)
3247
+ typeName: F.ZodEnum,
3248
+ ...S(t)
3253
3249
  });
3254
3250
  }
3255
- var yt = class e extends S {
3251
+ var yt = class e extends C {
3256
3252
  _parse(e) {
3257
3253
  if (typeof e.data != "string") {
3258
3254
  let t = this._getOrReturnCtx(e), n = this._def.values;
3259
- return m(t, {
3255
+ return h(t, {
3260
3256
  expected: l.joinValues(n),
3261
3257
  received: t.parsedType,
3262
3258
  code: f.invalid_type
3263
- }), g;
3259
+ }), _;
3264
3260
  }
3265
3261
  if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
3266
3262
  let t = this._getOrReturnCtx(e), n = this._def.values;
3267
- return m(t, {
3263
+ return h(t, {
3268
3264
  received: t.data,
3269
3265
  code: f.invalid_enum_value,
3270
3266
  options: n
3271
- }), g;
3267
+ }), _;
3272
3268
  }
3273
- return _(e.data);
3269
+ return v(e.data);
3274
3270
  }
3275
3271
  get options() {
3276
3272
  return this._def.values;
@@ -3304,26 +3300,26 @@ var yt = class e extends S {
3304
3300
  }
3305
3301
  };
3306
3302
  yt.create = vt;
3307
- var bt = class extends S {
3303
+ var bt = class extends C {
3308
3304
  _parse(e) {
3309
3305
  let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
3310
3306
  if (n.parsedType !== u.string && n.parsedType !== u.number) {
3311
3307
  let e = l.objectValues(t);
3312
- return m(n, {
3308
+ return h(n, {
3313
3309
  expected: l.joinValues(e),
3314
3310
  received: n.parsedType,
3315
3311
  code: f.invalid_type
3316
- }), g;
3312
+ }), _;
3317
3313
  }
3318
3314
  if (this._cache ||= new Set(l.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
3319
3315
  let e = l.objectValues(t);
3320
- return m(n, {
3316
+ return h(n, {
3321
3317
  received: n.data,
3322
3318
  code: f.invalid_enum_value,
3323
3319
  options: e
3324
- }), g;
3320
+ }), _;
3325
3321
  }
3326
- return _(e.data);
3322
+ return v(e.data);
3327
3323
  }
3328
3324
  get enum() {
3329
3325
  return this._def.values;
@@ -3331,41 +3327,41 @@ var bt = class extends S {
3331
3327
  };
3332
3328
  bt.create = (e, t) => new bt({
3333
3329
  values: e,
3334
- typeName: P.ZodNativeEnum,
3335
- ...x(t)
3330
+ typeName: F.ZodNativeEnum,
3331
+ ...S(t)
3336
3332
  });
3337
- var A = class extends S {
3333
+ var j = class extends C {
3338
3334
  unwrap() {
3339
3335
  return this._def.type;
3340
3336
  }
3341
3337
  _parse(e) {
3342
3338
  let { ctx: t } = this._processInputParams(e);
3343
- return t.parsedType !== u.promise && t.common.async === !1 ? (m(t, {
3339
+ return t.parsedType !== u.promise && t.common.async === !1 ? (h(t, {
3344
3340
  code: f.invalid_type,
3345
3341
  expected: u.promise,
3346
3342
  received: t.parsedType
3347
- }), g) : _((t.parsedType === u.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
3343
+ }), _) : v((t.parsedType === u.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
3348
3344
  path: t.path,
3349
3345
  errorMap: t.common.contextualErrorMap
3350
3346
  })));
3351
3347
  }
3352
3348
  };
3353
- A.create = (e, t) => new A({
3349
+ j.create = (e, t) => new j({
3354
3350
  type: e,
3355
- typeName: P.ZodPromise,
3356
- ...x(t)
3351
+ typeName: F.ZodPromise,
3352
+ ...S(t)
3357
3353
  });
3358
- var j = class extends S {
3354
+ var M = class extends C {
3359
3355
  innerType() {
3360
3356
  return this._def.schema;
3361
3357
  }
3362
3358
  sourceType() {
3363
- return this._def.schema._def.typeName === P.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3359
+ return this._def.schema._def.typeName === F.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
3364
3360
  }
3365
3361
  _parse(e) {
3366
3362
  let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
3367
3363
  addIssue: (e) => {
3368
- m(n, e), e.fatal ? t.abort() : t.dirty();
3364
+ h(n, e), e.fatal ? t.abort() : t.dirty();
3369
3365
  },
3370
3366
  get path() {
3371
3367
  return n.path;
@@ -3374,22 +3370,22 @@ var j = class extends S {
3374
3370
  if (i.addIssue = i.addIssue.bind(i), r.type === "preprocess") {
3375
3371
  let e = r.transform(n.data, i);
3376
3372
  if (n.common.async) return Promise.resolve(e).then(async (e) => {
3377
- if (t.value === "aborted") return g;
3373
+ if (t.value === "aborted") return _;
3378
3374
  let r = await this._def.schema._parseAsync({
3379
3375
  data: e,
3380
3376
  path: n.path,
3381
3377
  parent: n
3382
3378
  });
3383
- return r.status === "aborted" ? g : r.status === "dirty" || t.value === "dirty" ? Se(r.value) : r;
3379
+ return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? Se(r.value) : r;
3384
3380
  });
3385
3381
  {
3386
- if (t.value === "aborted") return g;
3382
+ if (t.value === "aborted") return _;
3387
3383
  let r = this._def.schema._parseSync({
3388
3384
  data: e,
3389
3385
  path: n.path,
3390
3386
  parent: n
3391
3387
  });
3392
- return r.status === "aborted" ? g : r.status === "dirty" || t.value === "dirty" ? Se(r.value) : r;
3388
+ return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? Se(r.value) : r;
3393
3389
  }
3394
3390
  }
3395
3391
  if (r.type === "refinement") {
@@ -3405,7 +3401,7 @@ var j = class extends S {
3405
3401
  path: n.path,
3406
3402
  parent: n
3407
3403
  });
3408
- return r.status === "aborted" ? g : (r.status === "dirty" && t.dirty(), e(r.value), {
3404
+ return r.status === "aborted" ? _ : (r.status === "dirty" && t.dirty(), e(r.value), {
3409
3405
  status: t.value,
3410
3406
  value: r.value
3411
3407
  });
@@ -3414,7 +3410,7 @@ var j = class extends S {
3414
3410
  data: n.data,
3415
3411
  path: n.path,
3416
3412
  parent: n
3417
- }).then((n) => n.status === "aborted" ? g : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
3413
+ }).then((n) => n.status === "aborted" ? _ : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
3418
3414
  status: t.value,
3419
3415
  value: n.value
3420
3416
  }))));
@@ -3426,7 +3422,7 @@ var j = class extends S {
3426
3422
  path: n.path,
3427
3423
  parent: n
3428
3424
  });
3429
- if (!v(e)) return g;
3425
+ if (!y(e)) return _;
3430
3426
  let a = r.transform(e.value, i);
3431
3427
  if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
3432
3428
  return {
@@ -3438,55 +3434,55 @@ var j = class extends S {
3438
3434
  data: n.data,
3439
3435
  path: n.path,
3440
3436
  parent: n
3441
- }).then((e) => v(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
3437
+ }).then((e) => y(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
3442
3438
  status: t.value,
3443
3439
  value: e
3444
- })) : g);
3440
+ })) : _);
3445
3441
  }
3446
3442
  l.assertNever(r);
3447
3443
  }
3448
3444
  };
3449
- j.create = (e, t, n) => new j({
3445
+ M.create = (e, t, n) => new M({
3450
3446
  schema: e,
3451
- typeName: P.ZodEffects,
3447
+ typeName: F.ZodEffects,
3452
3448
  effect: t,
3453
- ...x(n)
3454
- }), j.createWithPreprocess = (e, t, n) => new j({
3449
+ ...S(n)
3450
+ }), M.createWithPreprocess = (e, t, n) => new M({
3455
3451
  schema: t,
3456
3452
  effect: {
3457
3453
  type: "preprocess",
3458
3454
  transform: e
3459
3455
  },
3460
- typeName: P.ZodEffects,
3461
- ...x(n)
3456
+ typeName: F.ZodEffects,
3457
+ ...S(n)
3462
3458
  });
3463
- var M = class extends S {
3459
+ var N = class extends C {
3464
3460
  _parse(e) {
3465
- return this._getType(e) === u.undefined ? _(void 0) : this._def.innerType._parse(e);
3461
+ return this._getType(e) === u.undefined ? v(void 0) : this._def.innerType._parse(e);
3466
3462
  }
3467
3463
  unwrap() {
3468
3464
  return this._def.innerType;
3469
3465
  }
3470
3466
  };
3471
- M.create = (e, t) => new M({
3467
+ N.create = (e, t) => new N({
3472
3468
  innerType: e,
3473
- typeName: P.ZodOptional,
3474
- ...x(t)
3469
+ typeName: F.ZodOptional,
3470
+ ...S(t)
3475
3471
  });
3476
- var N = class extends S {
3472
+ var P = class extends C {
3477
3473
  _parse(e) {
3478
- return this._getType(e) === u.null ? _(null) : this._def.innerType._parse(e);
3474
+ return this._getType(e) === u.null ? v(null) : this._def.innerType._parse(e);
3479
3475
  }
3480
3476
  unwrap() {
3481
3477
  return this._def.innerType;
3482
3478
  }
3483
3479
  };
3484
- N.create = (e, t) => new N({
3480
+ P.create = (e, t) => new P({
3485
3481
  innerType: e,
3486
- typeName: P.ZodNullable,
3487
- ...x(t)
3482
+ typeName: F.ZodNullable,
3483
+ ...S(t)
3488
3484
  });
3489
- var xt = class extends S {
3485
+ var xt = class extends C {
3490
3486
  _parse(e) {
3491
3487
  let { ctx: t } = this._processInputParams(e), n = t.data;
3492
3488
  return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
@@ -3501,11 +3497,11 @@ var xt = class extends S {
3501
3497
  };
3502
3498
  xt.create = (e, t) => new xt({
3503
3499
  innerType: e,
3504
- typeName: P.ZodDefault,
3500
+ typeName: F.ZodDefault,
3505
3501
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
3506
- ...x(t)
3502
+ ...S(t)
3507
3503
  });
3508
- var St = class extends S {
3504
+ var St = class extends C {
3509
3505
  _parse(e) {
3510
3506
  let { ctx: t } = this._processInputParams(e), n = {
3511
3507
  ...t,
@@ -3542,19 +3538,19 @@ var St = class extends S {
3542
3538
  };
3543
3539
  St.create = (e, t) => new St({
3544
3540
  innerType: e,
3545
- typeName: P.ZodCatch,
3541
+ typeName: F.ZodCatch,
3546
3542
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
3547
- ...x(t)
3543
+ ...S(t)
3548
3544
  });
3549
- var Ct = class extends S {
3545
+ var Ct = class extends C {
3550
3546
  _parse(e) {
3551
3547
  if (this._getType(e) !== u.nan) {
3552
3548
  let t = this._getOrReturnCtx(e);
3553
- return m(t, {
3549
+ return h(t, {
3554
3550
  code: f.invalid_type,
3555
3551
  expected: u.nan,
3556
3552
  received: t.parsedType
3557
- }), g;
3553
+ }), _;
3558
3554
  }
3559
3555
  return {
3560
3556
  status: "valid",
@@ -3563,10 +3559,10 @@ var Ct = class extends S {
3563
3559
  }
3564
3560
  };
3565
3561
  Ct.create = (e) => new Ct({
3566
- typeName: P.ZodNaN,
3567
- ...x(e)
3562
+ typeName: F.ZodNaN,
3563
+ ...S(e)
3568
3564
  });
3569
- var wt = class extends S {
3565
+ var wt = class extends C {
3570
3566
  _parse(e) {
3571
3567
  let { ctx: t } = this._processInputParams(e), n = t.data;
3572
3568
  return this._def.type._parse({
@@ -3578,7 +3574,7 @@ var wt = class extends S {
3578
3574
  unwrap() {
3579
3575
  return this._def.type;
3580
3576
  }
3581
- }, Tt = class e extends S {
3577
+ }, Tt = class e extends C {
3582
3578
  _parse(e) {
3583
3579
  let { status: t, ctx: n } = this._processInputParams(e);
3584
3580
  if (n.common.async) return (async () => {
@@ -3587,7 +3583,7 @@ var wt = class extends S {
3587
3583
  path: n.path,
3588
3584
  parent: n
3589
3585
  });
3590
- return e.status === "aborted" ? g : e.status === "dirty" ? (t.dirty(), Se(e.value)) : this._def.out._parseAsync({
3586
+ return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), Se(e.value)) : this._def.out._parseAsync({
3591
3587
  data: e.value,
3592
3588
  path: n.path,
3593
3589
  parent: n
@@ -3599,7 +3595,7 @@ var wt = class extends S {
3599
3595
  path: n.path,
3600
3596
  parent: n
3601
3597
  });
3602
- return e.status === "aborted" ? g : e.status === "dirty" ? (t.dirty(), {
3598
+ return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), {
3603
3599
  status: "dirty",
3604
3600
  value: e.value
3605
3601
  }) : this._def.out._parseSync({
@@ -3613,12 +3609,12 @@ var wt = class extends S {
3613
3609
  return new e({
3614
3610
  in: t,
3615
3611
  out: n,
3616
- typeName: P.ZodPipeline
3612
+ typeName: F.ZodPipeline
3617
3613
  });
3618
3614
  }
3619
- }, Et = class extends S {
3615
+ }, Et = class extends C {
3620
3616
  _parse(e) {
3621
- let t = this._def.innerType._parse(e), n = (e) => (v(e) && (e.value = Object.freeze(e.value)), e);
3617
+ let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
3622
3618
  return Te(t) ? t.then((e) => n(e)) : n(t);
3623
3619
  }
3624
3620
  unwrap() {
@@ -3627,28 +3623,28 @@ var wt = class extends S {
3627
3623
  };
3628
3624
  Et.create = (e, t) => new Et({
3629
3625
  innerType: e,
3630
- typeName: P.ZodReadonly,
3631
- ...x(t)
3632
- }), D.lazycreate;
3633
- var P;
3626
+ typeName: F.ZodReadonly,
3627
+ ...S(t)
3628
+ }), O.lazycreate;
3629
+ var F;
3634
3630
  (function(e) {
3635
3631
  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";
3636
- })(P ||= {});
3637
- var F = Ze.create, I = $e.create;
3632
+ })(F ||= {});
3633
+ var I = Ze.create, L = $e.create;
3638
3634
  Ct.create, et.create;
3639
- var L = tt.create;
3635
+ var R = tt.create;
3640
3636
  nt.create, rt.create, it.create, at.create, ot.create;
3641
- var R = C.create;
3642
- w.create, st.create;
3643
- var z = T.create, B = D.create;
3644
- D.strictCreate, ct.create, lt.create, dt.create, k.create;
3637
+ var Dt = w.create;
3638
+ T.create, st.create;
3639
+ var z = E.create, B = O.create;
3640
+ O.strictCreate, ct.create, lt.create, dt.create, A.create;
3645
3641
  var V = ft.create;
3646
3642
  pt.create, mt.create, ht.create, gt.create, _t.create;
3647
3643
  var H = yt.create;
3648
- bt.create, A.create, j.create, M.create, N.create, j.createWithPreprocess, Tt.create;
3644
+ bt.create, j.create, M.create, N.create, P.create, M.createWithPreprocess, Tt.create;
3649
3645
  //#endregion
3650
3646
  //#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
3651
- var Dt = Symbol("Let zodToJsonSchema decide on which parser to use"), Ot = {
3647
+ var Ot = Symbol("Let zodToJsonSchema decide on which parser to use"), kt = {
3652
3648
  name: void 0,
3653
3649
  $refStrategy: "root",
3654
3650
  basePath: ["#"],
@@ -3671,14 +3667,14 @@ var Dt = Symbol("Let zodToJsonSchema decide on which parser to use"), Ot = {
3671
3667
  base64Strategy: "contentEncoding:base64",
3672
3668
  nameStrategy: "ref",
3673
3669
  openAiAnyTypeName: "OpenAiAnyType"
3674
- }, kt = (e) => typeof e == "string" ? {
3675
- ...Ot,
3670
+ }, At = (e) => typeof e == "string" ? {
3671
+ ...kt,
3676
3672
  name: e
3677
3673
  } : {
3678
- ...Ot,
3674
+ ...kt,
3679
3675
  ...e
3680
- }, At = (e) => {
3681
- let t = kt(e), n = t.name === void 0 ? t.basePath : [
3676
+ }, jt = (e) => {
3677
+ let t = At(e), n = t.name === void 0 ? t.basePath : [
3682
3678
  ...t.basePath,
3683
3679
  t.definitionPath,
3684
3680
  t.name
@@ -3701,18 +3697,18 @@ var Dt = Symbol("Let zodToJsonSchema decide on which parser to use"), Ot = {
3701
3697
  };
3702
3698
  //#endregion
3703
3699
  //#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
3704
- function jt(e, t, n, r) {
3700
+ function Mt(e, t, n, r) {
3705
3701
  r?.errorMessages && n && (e.errorMessage = {
3706
3702
  ...e.errorMessage,
3707
3703
  [t]: n
3708
3704
  });
3709
3705
  }
3710
3706
  function U(e, t, n, r, i) {
3711
- e[t] = n, jt(e, t, r, i);
3707
+ e[t] = n, Mt(e, t, r, i);
3712
3708
  }
3713
3709
  //#endregion
3714
3710
  //#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
3715
- var Mt = (e, t) => {
3711
+ var Nt = (e, t) => {
3716
3712
  let n = 0;
3717
3713
  for (; n < e.length && n < t.length && e[n] === t[n]; n++);
3718
3714
  return [(e.length - n).toString(), ...t.slice(n)].join("/");
@@ -3726,20 +3722,20 @@ function W(e) {
3726
3722
  e.definitionPath,
3727
3723
  e.openAiAnyTypeName
3728
3724
  ];
3729
- return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? Mt(t, e.currentPath) : t.join("/") };
3725
+ return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? Nt(t, e.currentPath) : t.join("/") };
3730
3726
  }
3731
3727
  //#endregion
3732
3728
  //#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
3733
- function Nt(e, t) {
3729
+ function Pt(e, t) {
3734
3730
  let n = { type: "array" };
3735
- return e.type?._def && e.type?._def?.typeName !== P.ZodAny && (n.items = J(e.type._def, {
3731
+ return e.type?._def && e.type?._def?.typeName !== F.ZodAny && (n.items = J(e.type._def, {
3736
3732
  ...t,
3737
3733
  currentPath: [...t.currentPath, "items"]
3738
3734
  })), e.minLength && U(n, "minItems", e.minLength.value, e.minLength.message, t), e.maxLength && U(n, "maxItems", e.maxLength.value, e.maxLength.message, t), e.exactLength && (U(n, "minItems", e.exactLength.value, e.exactLength.message, t), U(n, "maxItems", e.exactLength.value, e.exactLength.message, t)), n;
3739
3735
  }
3740
3736
  //#endregion
3741
3737
  //#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
3742
- function Pt(e, t) {
3738
+ function Ft(e, t) {
3743
3739
  let n = {
3744
3740
  type: "integer",
3745
3741
  format: "int64"
@@ -3758,22 +3754,22 @@ function Pt(e, t) {
3758
3754
  }
3759
3755
  //#endregion
3760
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/boolean.js
3761
- function Ft() {
3757
+ function It() {
3762
3758
  return { type: "boolean" };
3763
3759
  }
3764
3760
  //#endregion
3765
3761
  //#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
3766
- function It(e, t) {
3762
+ function Lt(e, t) {
3767
3763
  return J(e.type._def, t);
3768
3764
  }
3769
3765
  //#endregion
3770
3766
  //#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
3771
- var Lt = (e, t) => J(e.innerType._def, t);
3767
+ var Rt = (e, t) => J(e.innerType._def, t);
3772
3768
  //#endregion
3773
3769
  //#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
3774
- function Rt(e, t, n) {
3770
+ function zt(e, t, n) {
3775
3771
  let r = n ?? t.dateStrategy;
3776
- if (Array.isArray(r)) return { anyOf: r.map((n, r) => Rt(e, t, n)) };
3772
+ if (Array.isArray(r)) return { anyOf: r.map((n, r) => zt(e, t, n)) };
3777
3773
  switch (r) {
3778
3774
  case "string":
3779
3775
  case "format:date-time": return {
@@ -3784,10 +3780,10 @@ function Rt(e, t, n) {
3784
3780
  type: "string",
3785
3781
  format: "date"
3786
3782
  };
3787
- case "integer": return zt(e, t);
3783
+ case "integer": return Bt(e, t);
3788
3784
  }
3789
3785
  }
3790
- var zt = (e, t) => {
3786
+ var Bt = (e, t) => {
3791
3787
  let n = {
3792
3788
  type: "integer",
3793
3789
  format: "unix-time"
@@ -3803,7 +3799,7 @@ var zt = (e, t) => {
3803
3799
  };
3804
3800
  //#endregion
3805
3801
  //#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
3806
- function Bt(e, t) {
3802
+ function Vt(e, t) {
3807
3803
  return {
3808
3804
  ...J(e.innerType._def, t),
3809
3805
  default: e.defaultValue()
@@ -3811,12 +3807,12 @@ function Bt(e, t) {
3811
3807
  }
3812
3808
  //#endregion
3813
3809
  //#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
3814
- function Vt(e, t) {
3810
+ function Ht(e, t) {
3815
3811
  return t.effectStrategy === "input" ? J(e.schema._def, t) : W(t);
3816
3812
  }
3817
3813
  //#endregion
3818
3814
  //#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
3819
- function Ht(e) {
3815
+ function Ut(e) {
3820
3816
  return {
3821
3817
  type: "string",
3822
3818
  enum: Array.from(e.values)
@@ -3824,8 +3820,8 @@ function Ht(e) {
3824
3820
  }
3825
3821
  //#endregion
3826
3822
  //#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
3827
- var Ut = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3828
- function Wt(e, t) {
3823
+ var Wt = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3824
+ function Gt(e, t) {
3829
3825
  let n = [J(e.left._def, {
3830
3826
  ...t,
3831
3827
  currentPath: [
@@ -3842,7 +3838,7 @@ function Wt(e, t) {
3842
3838
  ]
3843
3839
  })].filter((e) => !!e), r = t.target === "jsonSchema2019-09" ? { unevaluatedProperties: !1 } : void 0, i = [];
3844
3840
  return n.forEach((e) => {
3845
- if (Ut(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
3841
+ if (Wt(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
3846
3842
  else {
3847
3843
  let t = e;
3848
3844
  if ("additionalProperties" in e && e.additionalProperties === !1) {
@@ -3858,7 +3854,7 @@ function Wt(e, t) {
3858
3854
  }
3859
3855
  //#endregion
3860
3856
  //#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
3861
- function Gt(e, t) {
3857
+ function Kt(e, t) {
3862
3858
  let n = typeof e.value;
3863
3859
  return n !== "bigint" && n !== "number" && n !== "boolean" && n !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : t.target === "openApi3" ? {
3864
3860
  type: n === "bigint" ? "integer" : n,
@@ -3870,12 +3866,12 @@ function Gt(e, t) {
3870
3866
  }
3871
3867
  //#endregion
3872
3868
  //#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
3873
- var Kt = void 0, G = {
3869
+ var qt = void 0, G = {
3874
3870
  cuid: /^[cC][^\s-]{8,}$/,
3875
3871
  cuid2: /^[0-9a-z]+$/,
3876
3872
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
3877
3873
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
3878
- emoji: () => (Kt === void 0 && (Kt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Kt),
3874
+ emoji: () => (qt === void 0 && (qt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), qt),
3879
3875
  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}$/,
3880
3876
  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])$/,
3881
3877
  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])$/,
@@ -3886,7 +3882,7 @@ var Kt = void 0, G = {
3886
3882
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
3887
3883
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
3888
3884
  };
3889
- function qt(e, t) {
3885
+ function Jt(e, t) {
3890
3886
  let n = { type: "string" };
3891
3887
  if (e.checks) for (let r of e.checks) switch (r.kind) {
3892
3888
  case "min":
@@ -3922,10 +3918,10 @@ function qt(e, t) {
3922
3918
  q(n, G.cuid2, r.message, t);
3923
3919
  break;
3924
3920
  case "startsWith":
3925
- q(n, RegExp(`^${Jt(r.value, t)}`), r.message, t);
3921
+ q(n, RegExp(`^${Yt(r.value, t)}`), r.message, t);
3926
3922
  break;
3927
3923
  case "endsWith":
3928
- q(n, RegExp(`${Jt(r.value, t)}$`), r.message, t);
3924
+ q(n, RegExp(`${Yt(r.value, t)}$`), r.message, t);
3929
3925
  break;
3930
3926
  case "datetime":
3931
3927
  K(n, "date-time", r.message, t);
@@ -3943,7 +3939,7 @@ function qt(e, t) {
3943
3939
  U(n, "minLength", typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, r.message, t), U(n, "maxLength", typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value, r.message, t);
3944
3940
  break;
3945
3941
  case "includes":
3946
- q(n, RegExp(Jt(r.value, t)), r.message, t);
3942
+ q(n, RegExp(Yt(r.value, t)), r.message, t);
3947
3943
  break;
3948
3944
  case "ip":
3949
3945
  r.version !== "v6" && K(n, "ipv4", r.message, t), r.version !== "v4" && K(n, "ipv6", r.message, t);
@@ -3978,13 +3974,13 @@ function qt(e, t) {
3978
3974
  }
3979
3975
  return n;
3980
3976
  }
3981
- function Jt(e, t) {
3982
- return t.patternStrategy === "escape" ? Xt(e) : e;
3977
+ function Yt(e, t) {
3978
+ return t.patternStrategy === "escape" ? Zt(e) : e;
3983
3979
  }
3984
- var Yt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3985
- function Xt(e) {
3980
+ var Xt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3981
+ function Zt(e) {
3986
3982
  let t = "";
3987
- for (let n = 0; n < e.length; n++) Yt.has(e[n]) || (t += "\\"), t += e[n];
3983
+ for (let n = 0; n < e.length; n++) Xt.has(e[n]) || (t += "\\"), t += e[n];
3988
3984
  return t;
3989
3985
  }
3990
3986
  function K(e, t, n, r) {
@@ -4001,11 +3997,11 @@ function q(e, t, n, r) {
4001
3997
  pattern: e.pattern,
4002
3998
  ...e.errorMessage && r.errorMessages && { errorMessage: { pattern: e.errorMessage.pattern } }
4003
3999
  }), delete e.pattern, e.errorMessage && (delete e.errorMessage.pattern, Object.keys(e.errorMessage).length === 0 && delete e.errorMessage)), e.allOf.push({
4004
- pattern: Zt(t, r),
4000
+ pattern: Qt(t, r),
4005
4001
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
4006
- })) : U(e, "pattern", Zt(t, r), n, r);
4002
+ })) : U(e, "pattern", Qt(t, r), n, r);
4007
4003
  }
4008
- function Zt(e, t) {
4004
+ function Qt(e, t) {
4009
4005
  if (!t.applyRegexFlags || !e.flags) return e.source;
4010
4006
  let n = {
4011
4007
  i: e.flags.includes("i"),
@@ -4046,8 +4042,8 @@ function Zt(e, t) {
4046
4042
  }
4047
4043
  //#endregion
4048
4044
  //#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
4049
- function Qt(e, t) {
4050
- 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 === P.ZodEnum) return {
4045
+ function $t(e, t) {
4046
+ 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 === F.ZodEnum) return {
4051
4047
  type: "object",
4052
4048
  required: e.keyType._def.values,
4053
4049
  properties: e.keyType._def.values.reduce((n, r) => ({
@@ -4071,19 +4067,19 @@ function Qt(e, t) {
4071
4067
  }) ?? t.allowedAdditionalProperties
4072
4068
  };
4073
4069
  if (t.target === "openApi3") return n;
4074
- if (e.keyType?._def.typeName === P.ZodString && e.keyType._def.checks?.length) {
4075
- let { type: r, ...i } = qt(e.keyType._def, t);
4070
+ if (e.keyType?._def.typeName === F.ZodString && e.keyType._def.checks?.length) {
4071
+ let { type: r, ...i } = Jt(e.keyType._def, t);
4076
4072
  return {
4077
4073
  ...n,
4078
4074
  propertyNames: i
4079
4075
  };
4080
4076
  }
4081
- if (e.keyType?._def.typeName === P.ZodEnum) return {
4077
+ if (e.keyType?._def.typeName === F.ZodEnum) return {
4082
4078
  ...n,
4083
4079
  propertyNames: { enum: e.keyType._def.values }
4084
4080
  };
4085
- if (e.keyType?._def.typeName === P.ZodBranded && e.keyType._def.type._def.typeName === P.ZodString && e.keyType._def.type._def.checks?.length) {
4086
- let { type: r, ...i } = It(e.keyType._def, t);
4081
+ if (e.keyType?._def.typeName === F.ZodBranded && e.keyType._def.type._def.typeName === F.ZodString && e.keyType._def.type._def.checks?.length) {
4082
+ let { type: r, ...i } = Lt(e.keyType._def, t);
4087
4083
  return {
4088
4084
  ...n,
4089
4085
  propertyNames: i
@@ -4093,8 +4089,8 @@ function Qt(e, t) {
4093
4089
  }
4094
4090
  //#endregion
4095
4091
  //#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
4096
- function $t(e, t) {
4097
- return t.mapStrategy === "record" ? Qt(e, t) : {
4092
+ function en(e, t) {
4093
+ return t.mapStrategy === "record" ? $t(e, t) : {
4098
4094
  type: "array",
4099
4095
  maxItems: 125,
4100
4096
  items: {
@@ -4123,7 +4119,7 @@ function $t(e, t) {
4123
4119
  }
4124
4120
  //#endregion
4125
4121
  //#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
4126
- function en(e) {
4122
+ function tn(e) {
4127
4123
  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)));
4128
4124
  return {
4129
4125
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
@@ -4132,7 +4128,7 @@ function en(e) {
4132
4128
  }
4133
4129
  //#endregion
4134
4130
  //#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
4135
- function tn(e) {
4131
+ function nn(e) {
4136
4132
  return e.target === "openAi" ? void 0 : { not: W({
4137
4133
  ...e,
4138
4134
  currentPath: [...e.currentPath, "not"]
@@ -4140,7 +4136,7 @@ function tn(e) {
4140
4136
  }
4141
4137
  //#endregion
4142
4138
  //#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
4143
- function nn(e) {
4139
+ function rn(e) {
4144
4140
  return e.target === "openApi3" ? {
4145
4141
  enum: ["null"],
4146
4142
  nullable: !0
@@ -4148,19 +4144,19 @@ function nn(e) {
4148
4144
  }
4149
4145
  //#endregion
4150
4146
  //#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
4151
- var rn = {
4147
+ var an = {
4152
4148
  ZodString: "string",
4153
4149
  ZodNumber: "number",
4154
4150
  ZodBigInt: "integer",
4155
4151
  ZodBoolean: "boolean",
4156
4152
  ZodNull: "null"
4157
4153
  };
4158
- function an(e, t) {
4159
- if (t.target === "openApi3") return on(e, t);
4154
+ function on(e, t) {
4155
+ if (t.target === "openApi3") return sn(e, t);
4160
4156
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
4161
- if (n.every((e) => e._def.typeName in rn && (!e._def.checks || !e._def.checks.length))) {
4157
+ if (n.every((e) => e._def.typeName in an && (!e._def.checks || !e._def.checks.length))) {
4162
4158
  let e = n.reduce((e, t) => {
4163
- let n = rn[t._def.typeName];
4159
+ let n = an[t._def.typeName];
4164
4160
  return n && !e.includes(n) ? [...e, n] : e;
4165
4161
  }, []);
4166
4162
  return { type: e.length > 1 ? e : e[0] };
@@ -4188,9 +4184,9 @@ function an(e, t) {
4188
4184
  type: "string",
4189
4185
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
4190
4186
  };
4191
- return on(e, t);
4187
+ return sn(e, t);
4192
4188
  }
4193
- var on = (e, t) => {
4189
+ var sn = (e, t) => {
4194
4190
  let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => J(e._def, {
4195
4191
  ...t,
4196
4192
  currentPath: [
@@ -4203,7 +4199,7 @@ var on = (e, t) => {
4203
4199
  };
4204
4200
  //#endregion
4205
4201
  //#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
4206
- function sn(e, t) {
4202
+ function cn(e, t) {
4207
4203
  if ([
4208
4204
  "ZodString",
4209
4205
  "ZodNumber",
@@ -4211,9 +4207,9 @@ function sn(e, t) {
4211
4207
  "ZodBoolean",
4212
4208
  "ZodNull"
4213
4209
  ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return t.target === "openApi3" ? {
4214
- type: rn[e.innerType._def.typeName],
4210
+ type: an[e.innerType._def.typeName],
4215
4211
  nullable: !0
4216
- } : { type: [rn[e.innerType._def.typeName], "null"] };
4212
+ } : { type: [an[e.innerType._def.typeName], "null"] };
4217
4213
  if (t.target === "openApi3") {
4218
4214
  let n = J(e.innerType._def, {
4219
4215
  ...t,
@@ -4239,12 +4235,12 @@ function sn(e, t) {
4239
4235
  }
4240
4236
  //#endregion
4241
4237
  //#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
4242
- function cn(e, t) {
4238
+ function ln(e, t) {
4243
4239
  let n = { type: "number" };
4244
4240
  if (!e.checks) return n;
4245
4241
  for (let r of e.checks) switch (r.kind) {
4246
4242
  case "int":
4247
- n.type = "integer", jt(n, "type", r.message, t);
4243
+ n.type = "integer", Mt(n, "type", r.message, t);
4248
4244
  break;
4249
4245
  case "min":
4250
4246
  t.target === "jsonSchema7" ? r.inclusive ? U(n, "minimum", r.value, r.message, t) : U(n, "exclusiveMinimum", r.value, r.message, t) : (r.inclusive || (n.exclusiveMinimum = !0), U(n, "minimum", r.value, r.message, t));
@@ -4258,7 +4254,7 @@ function cn(e, t) {
4258
4254
  }
4259
4255
  //#endregion
4260
4256
  //#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
4261
- function ln(e, t) {
4257
+ function un(e, t) {
4262
4258
  let n = t.target === "openAi", r = {
4263
4259
  type: "object",
4264
4260
  properties: {}
@@ -4266,7 +4262,7 @@ function ln(e, t) {
4266
4262
  for (let e in a) {
4267
4263
  let o = a[e];
4268
4264
  if (o === void 0 || o._def === void 0) continue;
4269
- let s = dn(o);
4265
+ let s = fn(o);
4270
4266
  s && n && (o._def.typeName === "ZodOptional" && (o = o._def.innerType), o.isNullable() || (o = o.nullable()), s = !1);
4271
4267
  let c = J(o._def, {
4272
4268
  ...t,
@@ -4284,10 +4280,10 @@ function ln(e, t) {
4284
4280
  c !== void 0 && (r.properties[e] = c, s || i.push(e));
4285
4281
  }
4286
4282
  i.length && (r.required = i);
4287
- let o = un(e, t);
4283
+ let o = dn(e, t);
4288
4284
  return o !== void 0 && (r.additionalProperties = o), r;
4289
4285
  }
4290
- function un(e, t) {
4286
+ function dn(e, t) {
4291
4287
  if (e.catchall._def.typeName !== "ZodNever") return J(e.catchall._def, {
4292
4288
  ...t,
4293
4289
  currentPath: [...t.currentPath, "additionalProperties"]
@@ -4298,7 +4294,7 @@ function un(e, t) {
4298
4294
  case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
4299
4295
  }
4300
4296
  }
4301
- function dn(e) {
4297
+ function fn(e) {
4302
4298
  try {
4303
4299
  return e.isOptional();
4304
4300
  } catch {
@@ -4307,7 +4303,7 @@ function dn(e) {
4307
4303
  }
4308
4304
  //#endregion
4309
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/optional.js
4310
- var fn = (e, t) => {
4306
+ var pn = (e, t) => {
4311
4307
  if (t.currentPath.toString() === t.propertyPath?.toString()) return J(e.innerType._def, t);
4312
4308
  let n = J(e.innerType._def, {
4313
4309
  ...t,
@@ -4318,7 +4314,7 @@ var fn = (e, t) => {
4318
4314
  ]
4319
4315
  });
4320
4316
  return n ? { anyOf: [{ not: W(t) }, n] } : W(t);
4321
- }, pn = (e, t) => {
4317
+ }, mn = (e, t) => {
4322
4318
  if (t.pipeStrategy === "input") return J(e.in._def, t);
4323
4319
  if (t.pipeStrategy === "output") return J(e.out._def, t);
4324
4320
  let n = J(e.in._def, {
@@ -4340,12 +4336,12 @@ var fn = (e, t) => {
4340
4336
  };
4341
4337
  //#endregion
4342
4338
  //#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
4343
- function mn(e, t) {
4339
+ function hn(e, t) {
4344
4340
  return J(e.type._def, t);
4345
4341
  }
4346
4342
  //#endregion
4347
4343
  //#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
4348
- function hn(e, t) {
4344
+ function gn(e, t) {
4349
4345
  let n = {
4350
4346
  type: "array",
4351
4347
  uniqueItems: !0,
@@ -4358,7 +4354,7 @@ function hn(e, t) {
4358
4354
  }
4359
4355
  //#endregion
4360
4356
  //#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
4361
- function gn(e, t) {
4357
+ function _n(e, t) {
4362
4358
  return e.rest ? {
4363
4359
  type: "array",
4364
4360
  minItems: e.items.length,
@@ -4390,54 +4386,54 @@ function gn(e, t) {
4390
4386
  }
4391
4387
  //#endregion
4392
4388
  //#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
4393
- function _n(e) {
4389
+ function vn(e) {
4394
4390
  return { not: W(e) };
4395
4391
  }
4396
4392
  //#endregion
4397
4393
  //#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
4398
- function vn(e) {
4394
+ function yn(e) {
4399
4395
  return W(e);
4400
4396
  }
4401
4397
  //#endregion
4402
4398
  //#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
4403
- var yn = (e, t) => J(e.innerType._def, t), bn = (e, t, n) => {
4399
+ var bn = (e, t) => J(e.innerType._def, t), xn = (e, t, n) => {
4404
4400
  switch (t) {
4405
- case P.ZodString: return qt(e, n);
4406
- case P.ZodNumber: return cn(e, n);
4407
- case P.ZodObject: return ln(e, n);
4408
- case P.ZodBigInt: return Pt(e, n);
4409
- case P.ZodBoolean: return Ft();
4410
- case P.ZodDate: return Rt(e, n);
4411
- case P.ZodUndefined: return _n(n);
4412
- case P.ZodNull: return nn(n);
4413
- case P.ZodArray: return Nt(e, n);
4414
- case P.ZodUnion:
4415
- case P.ZodDiscriminatedUnion: return an(e, n);
4416
- case P.ZodIntersection: return Wt(e, n);
4417
- case P.ZodTuple: return gn(e, n);
4418
- case P.ZodRecord: return Qt(e, n);
4419
- case P.ZodLiteral: return Gt(e, n);
4420
- case P.ZodEnum: return Ht(e);
4421
- case P.ZodNativeEnum: return en(e);
4422
- case P.ZodNullable: return sn(e, n);
4423
- case P.ZodOptional: return fn(e, n);
4424
- case P.ZodMap: return $t(e, n);
4425
- case P.ZodSet: return hn(e, n);
4426
- case P.ZodLazy: return () => e.getter()._def;
4427
- case P.ZodPromise: return mn(e, n);
4428
- case P.ZodNaN:
4429
- case P.ZodNever: return tn(n);
4430
- case P.ZodEffects: return Vt(e, n);
4431
- case P.ZodAny: return W(n);
4432
- case P.ZodUnknown: return vn(n);
4433
- case P.ZodDefault: return Bt(e, n);
4434
- case P.ZodBranded: return It(e, n);
4435
- case P.ZodReadonly: return yn(e, n);
4436
- case P.ZodCatch: return Lt(e, n);
4437
- case P.ZodPipeline: return pn(e, n);
4438
- case P.ZodFunction:
4439
- case P.ZodVoid:
4440
- case P.ZodSymbol: return;
4401
+ case F.ZodString: return Jt(e, n);
4402
+ case F.ZodNumber: return ln(e, n);
4403
+ case F.ZodObject: return un(e, n);
4404
+ case F.ZodBigInt: return Ft(e, n);
4405
+ case F.ZodBoolean: return It();
4406
+ case F.ZodDate: return zt(e, n);
4407
+ case F.ZodUndefined: return vn(n);
4408
+ case F.ZodNull: return rn(n);
4409
+ case F.ZodArray: return Pt(e, n);
4410
+ case F.ZodUnion:
4411
+ case F.ZodDiscriminatedUnion: return on(e, n);
4412
+ case F.ZodIntersection: return Gt(e, n);
4413
+ case F.ZodTuple: return _n(e, n);
4414
+ case F.ZodRecord: return $t(e, n);
4415
+ case F.ZodLiteral: return Kt(e, n);
4416
+ case F.ZodEnum: return Ut(e);
4417
+ case F.ZodNativeEnum: return tn(e);
4418
+ case F.ZodNullable: return cn(e, n);
4419
+ case F.ZodOptional: return pn(e, n);
4420
+ case F.ZodMap: return en(e, n);
4421
+ case F.ZodSet: return gn(e, n);
4422
+ case F.ZodLazy: return () => e.getter()._def;
4423
+ case F.ZodPromise: return hn(e, n);
4424
+ case F.ZodNaN:
4425
+ case F.ZodNever: return nn(n);
4426
+ case F.ZodEffects: return Ht(e, n);
4427
+ case F.ZodAny: return W(n);
4428
+ case F.ZodUnknown: return yn(n);
4429
+ case F.ZodDefault: return Vt(e, n);
4430
+ case F.ZodBranded: return Lt(e, n);
4431
+ case F.ZodReadonly: return bn(e, n);
4432
+ case F.ZodCatch: return Rt(e, n);
4433
+ case F.ZodPipeline: return mn(e, n);
4434
+ case F.ZodFunction:
4435
+ case F.ZodVoid:
4436
+ case F.ZodSymbol: return;
4441
4437
  default: return ((e) => void 0)(t);
4442
4438
  }
4443
4439
  };
@@ -4447,10 +4443,10 @@ function J(e, t, n = !1) {
4447
4443
  let r = t.seen.get(e);
4448
4444
  if (t.override) {
4449
4445
  let i = t.override?.(e, t, r, n);
4450
- if (i !== Dt) return i;
4446
+ if (i !== Ot) return i;
4451
4447
  }
4452
4448
  if (r && !n) {
4453
- let e = xn(r, t);
4449
+ let e = Sn(r, t);
4454
4450
  if (e !== void 0) return e;
4455
4451
  }
4456
4452
  let i = {
@@ -4459,22 +4455,22 @@ function J(e, t, n = !1) {
4459
4455
  jsonSchema: void 0
4460
4456
  };
4461
4457
  t.seen.set(e, i);
4462
- let a = bn(e, e.typeName, t), o = typeof a == "function" ? J(a(), t) : a;
4463
- if (o && Sn(e, t, o), t.postProcess) {
4458
+ let a = xn(e, e.typeName, t), o = typeof a == "function" ? J(a(), t) : a;
4459
+ if (o && Cn(e, t, o), t.postProcess) {
4464
4460
  let n = t.postProcess(o, e, t);
4465
4461
  return i.jsonSchema = o, n;
4466
4462
  }
4467
4463
  return i.jsonSchema = o, o;
4468
4464
  }
4469
- var xn = (e, t) => {
4465
+ var Sn = (e, t) => {
4470
4466
  switch (t.$refStrategy) {
4471
4467
  case "root": return { $ref: e.path.join("/") };
4472
- case "relative": return { $ref: Mt(t.currentPath, e.path) };
4468
+ case "relative": return { $ref: Nt(t.currentPath, e.path) };
4473
4469
  case "none":
4474
4470
  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`), W(t)) : t.$refStrategy === "seen" ? W(t) : void 0;
4475
4471
  }
4476
- }, Sn = (e, t, n) => (e.description && (n.description = e.description, t.markdownDescription && (n.markdownDescription = e.description)), n), Cn = (e, t) => {
4477
- let n = At(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
4472
+ }, Cn = (e, t, n) => (e.description && (n.description = e.description, t.markdownDescription && (n.markdownDescription = e.description)), n), wn = (e, t) => {
4473
+ let n = jt(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
4478
4474
  ...e,
4479
4475
  [t]: J(r._def, {
4480
4476
  ...n,
@@ -4522,181 +4518,181 @@ var xn = (e, t) => {
4522
4518
  }
4523
4519
  };
4524
4520
  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;
4525
- }, Y = (e) => B(e).passthrough(), X = (e) => e.nullable().optional(), Z = B({}).passthrough(), wn = Y({
4526
- id: F().describe("Project id; pass as projectId to other tools"),
4527
- name: F(),
4528
- key: X(F()).describe("Short prefix, e.g. \"PROJ\""),
4529
- description: X(F())
4530
- }).describe("A project"), Tn = Y({
4531
- id: F().describe("Task id; pass as id or taskId to other tools"),
4532
- projectId: F(),
4533
- title: F(),
4534
- status: F().describe("Workflow status key"),
4535
- priority: F().describe("urgent, high, medium, low or none"),
4536
- assigneeId: X(F()),
4537
- dueDate: X(F()),
4538
- deadline: X(F()).describe("Latest acceptable finish, enforced by critical path analysis"),
4539
- isMilestone: X(L()).describe("A zero-duration checkpoint"),
4540
- estimatedHours: X(I()),
4541
- loggedHours: X(I()),
4542
- isBlocked: X(L())
4543
- }).describe("A task"), En = Y({
4544
- dependencyId: F().describe("Id of the dependency record"),
4545
- taskId: F().describe("The other task"),
4546
- title: F(),
4547
- status: F(),
4548
- type: F().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
4549
- }), Dn = Tn.extend({ dependencies: X(Y({
4550
- dependsOn: z(En).describe("Tasks this task waits for (upstream)"),
4551
- dependents: z(En).describe("Tasks waiting for this task (downstream)")
4552
- })).describe("Present when includeDependencies is true") }).describe("A task"), On = Y({
4553
- id: F(),
4554
- taskId: F().describe("The task that waits"),
4555
- dependsOnTaskId: F().describe("The task it waits for"),
4556
- type: F().describe("blocking or relates_to")
4557
- }).describe("A dependency between two tasks"), kn = Y({
4558
- id: F(),
4559
- projectId: F(),
4560
- title: F(),
4561
- dueDate: X(F())
4562
- }).describe("A deliverable"), An = Y({
4563
- id: F(),
4564
- taskId: F(),
4565
- hours: I(),
4566
- userId: X(F()),
4567
- loggedAt: X(F())
4568
- }).describe("A time entry"), jn = Y({
4569
- id: F(),
4570
- taskId: F(),
4571
- content: F(),
4572
- authorId: X(F())
4573
- }).describe("A task comment"), Mn = Y({
4574
- assigneeId: X(F()),
4575
- teamId: X(F()),
4576
- capacity: I().describe("1 for a person, headcount for a team pool"),
4577
- allocation: I().describe("Total booked in the period, e.g. 1.5 for 150%"),
4578
- start: F(),
4579
- end: F(),
4580
- taskIds: z(F())
4581
- }), Nn = Y({
4582
- taskId: F(),
4583
- isCritical: L().describe("True when any delay to this task delays the project end"),
4584
- totalSlack: I().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
4585
- slackWorkingHours: X(I()).describe("Slack in working hours on the task calendar"),
4586
- earlyStartDate: X(F()),
4587
- earlyFinishDate: X(F()),
4588
- lateStartDate: X(F()),
4589
- lateFinishDate: X(F()),
4590
- levelingDelayHours: X(I()).describe("With levelling: hours spent waiting for the assignee"),
4591
- waitingOn: X(F()).describe("With levelling: the task this one waited for"),
4592
- isMilestone: X(L()).describe("True for a milestone"),
4593
- isSummary: X(L()).describe("True for a task with subtasks: its dates and slack are roll-ups of them"),
4594
- deadlineDate: X(F()).describe("The task's deadline as an instant"),
4595
- deadlineVarianceHours: X(I()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
4521
+ }, Y = (e) => B(e).passthrough(), X = (e) => e.nullable().optional(), Z = B({}).passthrough(), Tn = Y({
4522
+ id: I().describe("Project id; pass as projectId to other tools"),
4523
+ name: I(),
4524
+ key: X(I()).describe("Short prefix, e.g. \"PROJ\""),
4525
+ description: X(I())
4526
+ }).describe("A project"), En = Y({
4527
+ id: I().describe("Task id; pass as id or taskId to other tools"),
4528
+ projectId: I(),
4529
+ title: I(),
4530
+ status: I().describe("Workflow status key"),
4531
+ priority: I().describe("urgent, high, medium, low or none"),
4532
+ assigneeId: X(I()),
4533
+ dueDate: X(I()),
4534
+ deadline: X(I()).describe("Latest acceptable finish, enforced by critical path analysis"),
4535
+ isMilestone: X(R()).describe("A zero-duration checkpoint"),
4536
+ estimatedHours: X(L()),
4537
+ loggedHours: X(L()),
4538
+ isBlocked: X(R())
4539
+ }).describe("A task"), Dn = Y({
4540
+ dependencyId: I().describe("Id of the dependency record"),
4541
+ taskId: I().describe("The other task"),
4542
+ title: I(),
4543
+ status: I(),
4544
+ type: I().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
4545
+ }), On = En.extend({ dependencies: X(Y({
4546
+ dependsOn: z(Dn).describe("Tasks this task waits for (upstream)"),
4547
+ dependents: z(Dn).describe("Tasks waiting for this task (downstream)")
4548
+ })).describe("Present when includeDependencies is true") }).describe("A task"), kn = Y({
4549
+ id: I(),
4550
+ taskId: I().describe("The task that waits"),
4551
+ dependsOnTaskId: I().describe("The task it waits for"),
4552
+ type: I().describe("blocking or relates_to")
4553
+ }).describe("A dependency between two tasks"), An = Y({
4554
+ id: I(),
4555
+ projectId: I(),
4556
+ title: I(),
4557
+ dueDate: X(I())
4558
+ }).describe("A deliverable"), jn = Y({
4559
+ id: I(),
4560
+ taskId: I(),
4561
+ hours: L(),
4562
+ userId: X(I()),
4563
+ loggedAt: X(I())
4564
+ }).describe("A time entry"), Mn = Y({
4565
+ id: I(),
4566
+ taskId: I(),
4567
+ content: I(),
4568
+ authorId: X(I())
4569
+ }).describe("A task comment"), Nn = Y({
4570
+ assigneeId: X(I()),
4571
+ teamId: X(I()),
4572
+ capacity: L().describe("1 for a person, headcount for a team pool"),
4573
+ allocation: L().describe("Total booked in the period, e.g. 1.5 for 150%"),
4574
+ start: I(),
4575
+ end: I(),
4576
+ taskIds: z(I())
4596
4577
  }), Pn = Y({
4597
- projectId: F(),
4598
- projectStartDate: X(F()),
4599
- projectEndDate: X(F()).describe("Forecast finish date"),
4600
- totalDurationHours: I(),
4601
- criticalTaskIds: z(F()).describe("Tasks with zero or negative slack, in schedule order"),
4602
- missedDeadlineTaskIds: X(z(F())).describe("Tasks forecast to finish after their deadline"),
4603
- unestimatedTaskIds: X(z(F())).describe("Unfinished tasks with no estimate, scheduled for defaultEstimateHours"),
4604
- cyclicTaskIds: X(z(F())).describe("Tasks on a dependency cycle; their dates are not reliable"),
4605
- tasks: z(Nn),
4606
- leveled: X(L()),
4607
- unleveledProjectEndDate: X(F()).describe("With levelling: the end date before levelling"),
4608
- overallocations: X(z(Mn)).describe("Assignee mode: periods where someone is booked above capacity")
4578
+ taskId: I(),
4579
+ isCritical: R().describe("True when any delay to this task delays the project end"),
4580
+ totalSlack: L().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
4581
+ slackWorkingHours: X(L()).describe("Slack in working hours on the task calendar"),
4582
+ earlyStartDate: X(I()),
4583
+ earlyFinishDate: X(I()),
4584
+ lateStartDate: X(I()),
4585
+ lateFinishDate: X(I()),
4586
+ levelingDelayHours: X(L()).describe("With levelling: hours spent waiting for the assignee"),
4587
+ waitingOn: X(I()).describe("With levelling: the task this one waited for"),
4588
+ isMilestone: X(R()).describe("True for a milestone"),
4589
+ isSummary: X(R()).describe("True for a task with subtasks: its dates and slack are roll-ups of them"),
4590
+ deadlineDate: X(I()).describe("The task's deadline as an instant"),
4591
+ deadlineVarianceHours: X(L()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
4609
4592
  }), Fn = Y({
4610
- projects: z(Pn).describe("One analysis per project"),
4611
- projectEndDate: X(F()).describe("The latest project end"),
4612
- leveled: X(L()),
4613
- overallocations: z(Mn)
4593
+ projectId: I(),
4594
+ projectStartDate: X(I()),
4595
+ projectEndDate: X(I()).describe("Forecast finish date"),
4596
+ totalDurationHours: L(),
4597
+ criticalTaskIds: z(I()).describe("Tasks with zero or negative slack, in schedule order"),
4598
+ missedDeadlineTaskIds: X(z(I())).describe("Tasks forecast to finish after their deadline"),
4599
+ unestimatedTaskIds: X(z(I())).describe("Unfinished tasks with no estimate, scheduled for defaultEstimateHours"),
4600
+ cyclicTaskIds: X(z(I())).describe("Tasks on a dependency cycle; their dates are not reliable"),
4601
+ tasks: z(Pn),
4602
+ leveled: X(R()),
4603
+ unleveledProjectEndDate: X(I()).describe("With levelling: the end date before levelling"),
4604
+ overallocations: X(z(Nn)).describe("Assignee mode: periods where someone is booked above capacity")
4614
4605
  }), In = Y({
4615
- id: F(),
4616
- type: F().describe("container, iteration, deliverable or phase"),
4617
- name: F(),
4618
- health: F().describe("on_track, at_risk, blocked, overdue or completed"),
4619
- progressPercentage: I().describe("0-100"),
4620
- isCritical: L(),
4621
- blockedTasks: I(),
4622
- taskIds: z(F())
4606
+ projects: z(Fn).describe("One analysis per project"),
4607
+ projectEndDate: X(I()).describe("The latest project end"),
4608
+ leveled: X(R()),
4609
+ overallocations: z(Nn)
4623
4610
  }), Ln = Y({
4624
- projectId: F(),
4625
- level: F(),
4611
+ id: I(),
4612
+ type: I().describe("container, iteration, deliverable or phase"),
4613
+ name: I(),
4614
+ health: I().describe("on_track, at_risk, blocked, overdue or completed"),
4615
+ progressPercentage: L().describe("0-100"),
4616
+ isCritical: R(),
4617
+ blockedTasks: L(),
4618
+ taskIds: z(I())
4619
+ }), Rn = Y({
4620
+ projectId: I(),
4621
+ level: I(),
4626
4622
  macro: X(Y({
4627
- health: F().describe("on_track, at_risk, blocked, overdue or completed"),
4628
- overallProgressPercentage: I().describe("0-100"),
4629
- projectedFinishDate: X(F()),
4630
- totalTasks: I(),
4631
- completedTasks: I(),
4632
- blockedTasks: I(),
4633
- phases: z(In)
4623
+ health: I().describe("on_track, at_risk, blocked, overdue or completed"),
4624
+ overallProgressPercentage: L().describe("0-100"),
4625
+ projectedFinishDate: X(I()),
4626
+ totalTasks: L(),
4627
+ completedTasks: L(),
4628
+ blockedTasks: L(),
4629
+ phases: z(Ln)
4634
4630
  })).describe("Phase-level summary"),
4635
4631
  standard: X(Z).describe("Task timeline: { tasks, criticalPathTaskIds, dependencies, totalDurationHours }"),
4636
4632
  concrete: X(V(Z)).describe("Work evidence (time entries, attachments) by task id")
4637
- }), Rn = Y({
4638
- taskId: F(),
4639
- macroPhase: X(In).describe("The phase this task belongs to"),
4633
+ }), zn = Y({
4634
+ taskId: I(),
4635
+ macroPhase: X(Ln).describe("The phase this task belongs to"),
4640
4636
  standard: Z.describe("The task with cpm (isCritical, slackWorkingHours, dates), blockingTaskIds and dependentTaskIds"),
4641
4637
  concrete: Z.describe("Evidence of work on the task"),
4642
4638
  metrics: X(Z).describe("Same as get_task_metrics")
4643
- }), zn = Y({
4644
- taskId: F(),
4639
+ }), Bn = Y({
4640
+ taskId: I(),
4645
4641
  points: z(Y({
4646
- timestamp: F(),
4647
- progress: I().describe("0-100"),
4648
- status: F()
4642
+ timestamp: I(),
4643
+ progress: L().describe("0-100"),
4644
+ status: I()
4649
4645
  })),
4650
- curveProfile: F().describe("linear, s_curve, early_surge, late_rush, stalled or insufficient_data")
4651
- }), Bn = Y({
4652
- taskId: F(),
4646
+ curveProfile: I().describe("linear, s_curve, early_surge, late_rush, stalled or insufficient_data")
4647
+ }), Vn = Y({
4648
+ taskId: I(),
4653
4649
  progress: Y({
4654
- progressPercentage: I().describe("0-100"),
4655
- source: F().describe("Where the figure comes from: explicit, todos, time_effort, schedule_elapsed or blended")
4650
+ progressPercentage: L().describe("0-100"),
4651
+ source: I().describe("Where the figure comes from: explicit, todos, time_effort, schedule_elapsed or blended")
4656
4652
  }),
4657
4653
  realityDelta: Y({
4658
- estimatedHours: I(),
4659
- loggedHours: I(),
4660
- varianceHours: I().describe("logged minus estimated"),
4661
- isOverdue: L(),
4662
- isOverEstimate: L(),
4663
- scheduleVarianceWorkingDays: X(I()).describe("Working days late (positive) or early (negative)")
4654
+ estimatedHours: L(),
4655
+ loggedHours: L(),
4656
+ varianceHours: L().describe("logged minus estimated"),
4657
+ isOverdue: R(),
4658
+ isOverEstimate: R(),
4659
+ scheduleVarianceWorkingDays: X(L()).describe("Working days late (positive) or early (negative)")
4664
4660
  }),
4665
4661
  evm: Y({
4666
- plannedValue: I(),
4667
- earnedValue: I(),
4668
- actualCost: I(),
4669
- costPerformanceIndex: I().describe("CPI = EV / AC; below 1 is over budget"),
4670
- schedulePerformanceIndex: I().describe("SPI = EV / PV; below 1 is behind schedule")
4662
+ plannedValue: L(),
4663
+ earnedValue: L(),
4664
+ actualCost: L(),
4665
+ costPerformanceIndex: L().describe("CPI = EV / AC; below 1 is over budget"),
4666
+ schedulePerformanceIndex: L().describe("SPI = EV / PV; below 1 is behind schedule")
4671
4667
  }),
4672
4668
  inferredActuals: Z.describe("Actual start/end dates and active working time"),
4673
- progressHistory: zn
4674
- }), Vn = Y({
4675
- startDate: F(),
4676
- endDate: F(),
4677
- interval: F(),
4678
- groupBy: F(),
4679
- metric: F(),
4680
- seriesKeys: z(F()).describe("Ids of the people, teams, etc. in the series"),
4681
- seriesLabels: V(F()).describe("Display name for each series key"),
4669
+ progressHistory: Bn
4670
+ }), Hn = Y({
4671
+ startDate: I(),
4672
+ endDate: I(),
4673
+ interval: I(),
4674
+ groupBy: I(),
4675
+ metric: I(),
4676
+ seriesKeys: z(I()).describe("Ids of the people, teams, etc. in the series"),
4677
+ seriesLabels: V(I()).describe("Display name for each series key"),
4682
4678
  buckets: z(Y({
4683
- date: F().describe("Start of the bucket (YYYY-MM-DD)"),
4684
- totalHours: I(),
4685
- values: V(I()).describe("Hours per series key"),
4686
- capacity: X(V(I())).describe("Capacity hours per series key"),
4687
- utilizationRatio: X(I()).describe("totalHours / totalCapacity; above 1 is overloaded")
4679
+ date: I().describe("Start of the bucket (YYYY-MM-DD)"),
4680
+ totalHours: L(),
4681
+ values: V(L()).describe("Hours per series key"),
4682
+ capacity: X(V(L())).describe("Capacity hours per series key"),
4683
+ utilizationRatio: X(L()).describe("totalHours / totalCapacity; above 1 is overloaded")
4688
4684
  })),
4689
- totalHours: I(),
4690
- totalCapacity: X(I()),
4691
- averageUtilization: X(I())
4692
- }), Hn = Y({
4685
+ totalHours: L(),
4686
+ totalCapacity: X(L()),
4687
+ averageUtilization: X(L())
4688
+ }), Un = Y({
4693
4689
  skills: X(z(Y({
4694
- name: F(),
4695
- description: F()
4690
+ name: I(),
4691
+ description: I()
4696
4692
  }))).describe("Present when no name was given"),
4697
- name: X(F()),
4698
- description: X(F()),
4699
- content: X(F()).describe("The playbook (markdown); follow its steps")
4693
+ name: X(I()),
4694
+ description: X(I()),
4695
+ content: X(I()).describe("The playbook (markdown); follow its steps")
4700
4696
  }), Q = [
4701
4697
  {
4702
4698
  name: "analyze-schedule",
@@ -4729,28 +4725,28 @@ var xn = (e, t) => {
4729
4725
  content: "---\nname: triage-tasks\ndescription: Review new, unprioritized or stale tasks and set priority, estimate, tags and blocked state consistently. Use when the user asks to triage, groom or clean up a backlog.\n---\n\n# Triage tasks\n\nMake every task in scope actionable: a clear title, a priority, an estimate and an honest blocked state.\n\n## 1. Gather the tasks\n\n1. Get the `projectId` with `list_projects` if you do not have it, then `get_project` to learn the workflow status keys.\n2. Call `list_tasks` with filters that match the request, for example:\n - untriaged: `priority: \"none\"`;\n - a backlog: `status` set to the backlog key from the workflow;\n - one person's work: `assigneeId`.\n Page with `nextCursor` until it is empty, or stop at a sensible batch (about 25) and say how many remain.\n3. For tasks whose description is thin or which look blocked, read the discussion with `list_comments`.\n\n## 2. Decide, task by task\n\n| Field | Rule |\n| --- | --- |\n| `priority` | `urgent`: blocks other people now or a live problem. `high`: needed for the next deliverable. `medium`: planned work. `low`: nice to have. Reserve `urgent` for a handful of tasks. |\n| `estimatedHours` | Effort in hours. If a task is over about 24 hours, propose splitting it instead of estimating it. |\n| `tags` | Reuse tags already used in the project; do not invent a new scheme. |\n| `isBlocked` / `blockedReason` | Blocked only when work cannot continue; the reason names what it waits for. |\n| title | Starts with a verb and says the outcome. Rewrite only when it is unclear. |\n\nFlag likely duplicates (same outcome, different words) instead of deleting them.\n\n## 3. Propose, then apply\n\n1. Show the user a table: task title, current values, proposed values, one-line reason.\n2. After the user approves (all or some), apply each change with `update_task`, passing only the fields that change.\n3. For any non-obvious change, record why with `add_comment` on the task.\n\n## Guardrails\n\n- Do not change `status` or `assigneeId` during triage unless the user asked for it.\n- Never call `delete_task` during triage. Suggest canceling duplicates and let the user decide.\n"
4730
4726
  }
4731
4727
  ];
4732
- function Un(e) {
4728
+ function Wn(e) {
4733
4729
  return Q.find((t) => t.name === e);
4734
4730
  }
4735
4731
  //#endregion
4736
4732
  //#region ../mcp/dist/tools/definitions.js
4737
- var Wn = {
4733
+ var Gn = {
4738
4734
  core: "Projects, tasks and task dependencies: find, read, create, update and delete",
4739
4735
  collaboration: "Deliverables and task comments",
4740
4736
  scheduling: "Critical path, portfolio scheduling and workload/capacity",
4741
4737
  analytics: "Project status ladder, task metrics, earned value and progress history",
4742
4738
  guidance: "Skills: step-by-step playbooks for multi-step jobs"
4743
4739
  };
4744
- function Gn(e) {
4745
- let { $schema: t, ...n } = Cn(e, { $refStrategy: "none" });
4740
+ function Kn(e) {
4741
+ let { $schema: t, ...n } = wn(e, { $refStrategy: "none" });
4746
4742
  return n;
4747
4743
  }
4748
4744
  function $(e) {
4749
4745
  let t = e.annotations?.readOnlyHint ?? !1;
4750
4746
  return {
4751
4747
  ...e,
4752
- inputSchema: Gn(e.zodSchema),
4753
- outputSchema: Gn(e.outputZodSchema),
4748
+ inputSchema: Kn(e.zodSchema),
4749
+ outputSchema: Kn(e.outputZodSchema),
4754
4750
  annotations: {
4755
4751
  readOnlyHint: t,
4756
4752
  destructiveHint: e.annotations?.destructiveHint ?? !1,
@@ -4759,65 +4755,65 @@ function $(e) {
4759
4755
  }
4760
4756
  };
4761
4757
  }
4762
- var Kn = class extends Error {
4758
+ var qn = class extends Error {
4763
4759
  constructor(e, t) {
4764
4760
  super(`Invalid arguments for tool "${e}": ${t}`), this.name = "ToolArgumentError";
4765
4761
  }
4766
4762
  };
4767
- function qn(e, t) {
4763
+ function Jn(e, t) {
4768
4764
  let n = e.zodSchema.strict().safeParse(t ?? {});
4769
4765
  if (!n.success) {
4770
4766
  let t = n.error.issues.map((e) => `${e.path.join(".") || "(root)"}: ${e.message}`).join("; ");
4771
- throw new Kn(e.name, t);
4767
+ throw new qn(e.name, t);
4772
4768
  }
4773
4769
  return n.data;
4774
4770
  }
4775
- async function Jn(e) {
4771
+ async function Yn(e) {
4776
4772
  return { isEngine: "store" in e && typeof e.store == "object" };
4777
4773
  }
4778
- var Yn = $({
4774
+ var Xn = $({
4779
4775
  name: "list_projects",
4780
4776
  title: "List Projects",
4781
4777
  description: "List every project you can read, with its id, name and key. Start here to find a projectId; never guess ids. Returns { projects }.",
4782
4778
  toolset: "core",
4783
- outputZodSchema: B({ projects: z(wn) }),
4779
+ outputZodSchema: B({ projects: z(Tn) }),
4784
4780
  zodSchema: B({}),
4785
4781
  annotations: { readOnlyHint: !0 },
4786
4782
  execute: async (e, t) => ({ projects: await t.getProjects() })
4787
- }), Xn = $({
4783
+ }), Zn = $({
4788
4784
  name: "get_project",
4789
4785
  title: "Get Project",
4790
4786
  description: "Get one project by id: name, key, workflow statuses, custom field definitions and calendar. Use it before creating or moving tasks to learn the valid status keys and custom fields. Returns the project. For its tasks use `list_tasks`.",
4791
4787
  toolset: "core",
4792
- outputZodSchema: wn,
4793
- zodSchema: B({ id: F().describe("The project ID") }),
4788
+ outputZodSchema: Tn,
4789
+ zodSchema: B({ id: I().describe("The project ID") }),
4794
4790
  annotations: { readOnlyHint: !0 },
4795
4791
  execute: async (e, t) => t.getProject(e.id)
4796
- }), Zn = $({
4792
+ }), Qn = $({
4797
4793
  name: "create_project",
4798
4794
  title: "Create Project",
4799
4795
  description: "Create a new, empty project. Use only when the user wants a new project; to add work to an existing one use `create_task`. Returns the created project with its id.",
4800
4796
  toolset: "core",
4801
- outputZodSchema: wn,
4797
+ outputZodSchema: Tn,
4802
4798
  zodSchema: B({
4803
- name: F().describe("Name of the project"),
4804
- description: F().optional().describe("Description of the project"),
4805
- key: F().optional().describe("Short project key/prefix (e.g. \"PROJ\")"),
4806
- customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4799
+ name: I().describe("Name of the project"),
4800
+ description: I().optional().describe("Description of the project"),
4801
+ key: I().optional().describe("Short project key/prefix (e.g. \"PROJ\")"),
4802
+ customFields: V(Dt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4807
4803
  }),
4808
4804
  execute: async (e, t) => t.createProject(e)
4809
- }), Qn = $({
4805
+ }), $n = $({
4810
4806
  name: "list_tasks",
4811
4807
  title: "List Tasks",
4812
4808
  description: "Find tasks, oldest first, filtered by project, status, priority, assignee, iteration, deliverable, container or parent task ('none' for top-level tasks only). Use it for questions like \"what is blocked / assigned to X / in progress\" and to look up task ids. Returns { tasks, nextCursor }; pass nextCursor back as cursor for the next page. For one task's full record use `get_task`.",
4813
4809
  toolset: "core",
4814
4810
  outputZodSchema: B({
4815
- tasks: z(Tn),
4816
- nextCursor: F().nullable().optional()
4811
+ tasks: z(En),
4812
+ nextCursor: I().nullable().optional()
4817
4813
  }),
4818
4814
  zodSchema: B({
4819
- projectId: F().optional().describe("Filter by project ID"),
4820
- status: F().optional().describe("Filter by task status key"),
4815
+ projectId: I().optional().describe("Filter by project ID"),
4816
+ status: I().optional().describe("Filter by task status key"),
4821
4817
  priority: H([
4822
4818
  "urgent",
4823
4819
  "high",
@@ -4825,13 +4821,13 @@ var Yn = $({
4825
4821
  "low",
4826
4822
  "none"
4827
4823
  ]).optional().describe("Filter by priority"),
4828
- assigneeId: F().optional().describe("Filter by assignee ID"),
4829
- iterationId: F().optional().describe("Filter by iteration (sprint) ID"),
4830
- deliverableId: F().optional().describe("Filter by deliverable ID"),
4831
- containerId: F().optional().describe("Filter by container (e.g. epic) ID"),
4832
- parentId: F().optional().describe("Subtasks of this task ID, or 'none' for top-level tasks only"),
4833
- limit: I().int().min(1).max(500).optional().describe("Page size (default 100)"),
4834
- cursor: F().optional().describe("nextCursor from a previous call")
4824
+ assigneeId: I().optional().describe("Filter by assignee ID"),
4825
+ iterationId: I().optional().describe("Filter by iteration (sprint) ID"),
4826
+ deliverableId: I().optional().describe("Filter by deliverable ID"),
4827
+ containerId: I().optional().describe("Filter by container (e.g. epic) ID"),
4828
+ parentId: I().optional().describe("Subtasks of this task ID, or 'none' for top-level tasks only"),
4829
+ limit: L().int().min(1).max(500).optional().describe("Page size (default 100)"),
4830
+ cursor: I().optional().describe("nextCursor from a previous call")
4835
4831
  }),
4836
4832
  annotations: { readOnlyHint: !0 },
4837
4833
  execute: async (e, t, n) => {
@@ -4852,21 +4848,21 @@ var Yn = $({
4852
4848
  nextCursor: r.nextCursor
4853
4849
  };
4854
4850
  }
4855
- }), $n = $({
4851
+ }), er = $({
4856
4852
  name: "get_task",
4857
4853
  title: "Get Task",
4858
4854
  description: "Get one task by id: status, priority, assignee, estimate, logged hours, dates, blocked state and custom fields. Set includeDependencies to also see which tasks it waits for and which wait for it. Returns the task, with { dependencies: { dependsOn, dependents } } when asked. For its discussion use `list_comments`; for progress and variance use `get_task_metrics`.",
4859
4855
  toolset: "core",
4860
- outputZodSchema: Dn,
4856
+ outputZodSchema: On,
4861
4857
  zodSchema: B({
4862
- id: F().describe("The task ID"),
4863
- includeDependencies: L().optional().describe("Also return the tasks this one waits for (dependsOn) and the tasks waiting for it (dependents)")
4858
+ id: I().describe("The task ID"),
4859
+ includeDependencies: R().optional().describe("Also return the tasks this one waits for (dependsOn) and the tasks waiting for it (dependents)")
4864
4860
  }),
4865
4861
  annotations: { readOnlyHint: !0 },
4866
4862
  execute: async (e, t) => {
4867
4863
  let n = await t.getTask(e.id);
4868
4864
  if (!n || !e.includeDependencies) return n;
4869
- let r = await nr(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e]));
4865
+ let r = await rr(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e]));
4870
4866
  for (let n of r.dependencies) {
4871
4867
  let r = n.taskId === e.id ? n.dependsOnTaskId : n.taskId;
4872
4868
  if (i.has(r) || r === e.id) continue;
@@ -4875,14 +4871,14 @@ var Yn = $({
4875
4871
  }
4876
4872
  let a = [], o = [];
4877
4873
  for (let t of r.dependencies) {
4878
- let { waiting: n, waitedFor: r } = er(t), s = n === e.id ? r : n, c = i.get(s);
4874
+ let { waiting: n, waitedFor: r } = tr(t), s = n === e.id ? r : n, c = i.get(s);
4879
4875
  if (!c || s === e.id) continue;
4880
4876
  let ee = {
4881
4877
  dependencyId: t.id,
4882
4878
  taskId: c.id,
4883
4879
  title: c.title,
4884
4880
  status: c.status,
4885
- type: tr(t)
4881
+ type: nr(t)
4886
4882
  };
4887
4883
  (n === e.id ? a : o).push(ee);
4888
4884
  }
@@ -4895,8 +4891,8 @@ var Yn = $({
4895
4891
  };
4896
4892
  }
4897
4893
  });
4898
- function er(e) {
4899
- let t = r(e);
4894
+ function tr(e) {
4895
+ let t = i(e);
4900
4896
  return t ? {
4901
4897
  waiting: t.after,
4902
4898
  waitedFor: t.before
@@ -4905,22 +4901,22 @@ function er(e) {
4905
4901
  waitedFor: e.dependsOnTaskId
4906
4902
  };
4907
4903
  }
4908
- var tr = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
4909
- async function nr(e, t) {
4910
- let { isEngine: n } = await Jn(e);
4904
+ var nr = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
4905
+ async function rr(e, t) {
4906
+ let { isEngine: n } = await Yn(e);
4911
4907
  return n ? e.getTaskDependencyGraph(t) : e.getTaskDependencies(t);
4912
4908
  }
4913
- var rr = $({
4909
+ var ir = $({
4914
4910
  name: "create_task",
4915
4911
  title: "Create Task",
4916
4912
  description: "Create a task in a project. Check with `list_tasks` first so you do not add a duplicate. Without a status the task starts in the project's default workflow status. Returns the created task with its id.",
4917
4913
  toolset: "core",
4918
- outputZodSchema: Tn,
4914
+ outputZodSchema: En,
4919
4915
  zodSchema: B({
4920
- projectId: F().optional().describe("Project ID (inferred from active view in browser if omitted)"),
4921
- title: F().describe("Title of the task"),
4922
- description: F().optional().describe("Detailed description / markdown"),
4923
- status: F().optional().describe("Status key (defaults to the project workflow's default status)"),
4916
+ projectId: I().optional().describe("Project ID (inferred from active view in browser if omitted)"),
4917
+ title: I().describe("Title of the task"),
4918
+ description: I().optional().describe("Detailed description / markdown"),
4919
+ status: I().optional().describe("Status key (defaults to the project workflow's default status)"),
4924
4920
  priority: H([
4925
4921
  "urgent",
4926
4922
  "high",
@@ -4928,16 +4924,16 @@ var rr = $({
4928
4924
  "low",
4929
4925
  "none"
4930
4926
  ]).optional().default("none").describe("Task priority"),
4931
- assigneeId: F().optional().describe("User ID to assign task to"),
4932
- dueDate: F().optional().describe("Due date (ISO string)"),
4933
- deadline: F().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4934
- isMilestone: L().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4935
- tags: z(F()).optional().describe("Tags for categorization"),
4936
- estimatedHours: I().optional().describe("Estimated hours to complete"),
4937
- allocation: I().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4938
- isBlocked: L().optional().describe("Whether the task is blocked"),
4939
- blockedReason: F().optional().describe("Reason why the task is blocked"),
4940
- customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4927
+ assigneeId: I().optional().describe("User ID to assign task to"),
4928
+ dueDate: I().optional().describe("Due date (ISO string)"),
4929
+ deadline: I().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4930
+ isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4931
+ tags: z(I()).optional().describe("Tags for categorization"),
4932
+ estimatedHours: L().optional().describe("Estimated hours to complete"),
4933
+ allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4934
+ isBlocked: R().optional().describe("Whether the task is blocked"),
4935
+ blockedReason: I().optional().describe("Reason why the task is blocked"),
4936
+ customFields: V(Dt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4941
4937
  }),
4942
4938
  execute: async (e, t, n) => {
4943
4939
  let r = e.projectId || n?.projectId;
@@ -4961,17 +4957,17 @@ var rr = $({
4961
4957
  };
4962
4958
  return t.createTask(i);
4963
4959
  }
4964
- }), ir = $({
4960
+ }), ar = $({
4965
4961
  name: "update_task",
4966
4962
  title: "Update Task",
4967
4963
  description: "Change an existing task: title, description, status, priority, assignee, due date, deadline, milestone flag, estimate, allocation, blocked state, tags or custom fields. Only the fields you pass change. Use it to move a task through its workflow or re-plan it. Returns the updated task.",
4968
4964
  toolset: "core",
4969
- outputZodSchema: Tn,
4965
+ outputZodSchema: En,
4970
4966
  zodSchema: B({
4971
- id: F().describe("The task ID"),
4972
- title: F().optional().describe("New title"),
4973
- description: F().optional().describe("New description (markdown)"),
4974
- status: F().optional().describe("Status key from the project's workflow (see `get_project`)"),
4967
+ id: I().describe("The task ID"),
4968
+ title: I().optional().describe("New title"),
4969
+ description: I().optional().describe("New description (markdown)"),
4970
+ status: I().optional().describe("Status key from the project's workflow (see `get_project`)"),
4975
4971
  priority: H([
4976
4972
  "urgent",
4977
4973
  "high",
@@ -4979,62 +4975,92 @@ var rr = $({
4979
4975
  "low",
4980
4976
  "none"
4981
4977
  ]).optional().describe("New priority"),
4982
- assigneeId: F().optional().describe("User ID to assign the task to"),
4983
- dueDate: F().optional().describe("Due date (ISO string)"),
4984
- deadline: F().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4985
- isMilestone: L().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4986
- tags: z(F()).optional().describe("Replaces all tags"),
4987
- estimatedHours: I().optional().describe("Estimated effort in hours"),
4988
- allocation: I().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4989
- isBlocked: L().optional().describe("Whether the task is blocked"),
4990
- blockedReason: F().optional().describe("Reason why the task is blocked"),
4991
- customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4978
+ assigneeId: I().optional().describe("User ID to assign the task to"),
4979
+ dueDate: I().optional().describe("Due date (ISO string)"),
4980
+ deadline: I().optional().describe("Latest acceptable finish (YYYY-MM-DD for the end of that working day, or an ISO date-time). Critical path analysis reports a miss as negative slack"),
4981
+ isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4982
+ tags: z(I()).optional().describe("Replaces all tags"),
4983
+ estimatedHours: L().optional().describe("Estimated effort in hours"),
4984
+ allocation: L().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
4985
+ isBlocked: R().optional().describe("Whether the task is blocked"),
4986
+ blockedReason: I().optional().describe("Reason why the task is blocked"),
4987
+ customFields: V(Dt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4992
4988
  }),
4993
4989
  annotations: { idempotentHint: !0 },
4994
4990
  execute: async (e, t) => {
4995
4991
  let { id: n, ...r } = e;
4996
4992
  return t.updateTask(n, r);
4997
4993
  }
4998
- }), ar = $({
4994
+ }), or = $({
4999
4995
  name: "delete_task",
5000
4996
  title: "Delete Task",
5001
4997
  description: "Permanently delete a task by id. This cannot be undone: confirm with the user first, and prefer `update_task` with a canceled status when the history should be kept. Returns { success }.",
5002
4998
  toolset: "core",
5003
- outputZodSchema: B({ success: L() }),
5004
- zodSchema: B({ id: F().describe("The task ID to delete") }),
4999
+ outputZodSchema: B({ success: R() }),
5000
+ zodSchema: B({ id: I().describe("The task ID to delete") }),
5005
5001
  annotations: {
5006
5002
  destructiveHint: !0,
5007
5003
  idempotentHint: !0
5008
5004
  },
5009
5005
  execute: async (e, t) => ({ success: await t.deleteTask(e.id) })
5010
- }), or = $({
5006
+ }), sr = $({
5011
5007
  name: "log_time",
5012
5008
  title: "Log Time",
5013
5009
  description: "Record time worked on a task. The task's logged hours are the sum of its time entries, so this is how hours are added (they cannot be set directly). Returns the time entry.",
5014
5010
  toolset: "core",
5015
- outputZodSchema: An,
5011
+ outputZodSchema: jn,
5016
5012
  zodSchema: B({
5017
- taskId: F().describe("The task worked on"),
5018
- hours: I().positive().describe("Hours worked, e.g. 1.5"),
5019
- description: F().optional().describe("What was done"),
5020
- isBillable: L().optional().describe("Whether the time is billable (default true)"),
5021
- loggedAt: F().optional().describe("When the work was done (ISO date-time; default now)")
5013
+ taskId: I().describe("The task worked on"),
5014
+ hours: L().positive().describe("Hours worked, e.g. 1.5"),
5015
+ description: I().optional().describe("What was done"),
5016
+ isBillable: R().optional().describe("Whether the time is billable (default true)"),
5017
+ loggedAt: I().optional().describe("When the work was done (ISO date-time; default now)")
5022
5018
  }),
5023
5019
  execute: async (e, t) => t.logTime(e)
5024
- }), sr = $({
5020
+ }), cr = $({
5021
+ name: "update_time_entry",
5022
+ title: "Update Time Entry",
5023
+ description: "Correct a time entry logged with `log_time` (its id is in that result). The task's logged hours move by the difference. You can change your own entries; other people's need a project manager. Returns the entry.",
5024
+ toolset: "core",
5025
+ outputZodSchema: jn,
5026
+ zodSchema: B({
5027
+ id: I().describe("The time entry id"),
5028
+ hours: L().positive().optional().describe("Corrected hours"),
5029
+ description: I().optional().describe("What was done"),
5030
+ isBillable: R().optional().describe("Whether the time is billable"),
5031
+ loggedAt: I().optional().describe("When the work was done (ISO date-time)")
5032
+ }),
5033
+ annotations: { idempotentHint: !0 },
5034
+ execute: async (e, t) => {
5035
+ let { id: n, ...r } = e;
5036
+ return t.updateTimeEntry(n, r);
5037
+ }
5038
+ }), lr = $({
5039
+ name: "delete_time_entry",
5040
+ title: "Delete Time Entry",
5041
+ description: "Delete a time entry logged by mistake; its hours come off the task. Confirm with the user first. Returns { success }.",
5042
+ toolset: "core",
5043
+ outputZodSchema: B({ success: R() }),
5044
+ zodSchema: B({ id: I().describe("The time entry id") }),
5045
+ annotations: {
5046
+ destructiveHint: !0,
5047
+ idempotentHint: !0
5048
+ },
5049
+ execute: async (e, t) => ({ success: await t.deleteTimeEntry(e.id) })
5050
+ }), ur = $({
5025
5051
  name: "add_dependency",
5026
5052
  title: "Add Dependency",
5027
5053
  description: "Record that a task cannot start until another task finishes, so the critical path schedules them in order. Use it when planning or re-sequencing work. Adding a link that already exists returns it; a link that would make a loop is refused. Returns the dependency { id, taskId, dependsOnTaskId, type }. To undo use `remove_dependency`.",
5028
5054
  toolset: "core",
5029
- outputZodSchema: On,
5055
+ outputZodSchema: kn,
5030
5056
  zodSchema: B({
5031
- taskId: F().describe("The task that waits"),
5032
- dependsOnTaskId: F().describe("The task that must finish first"),
5057
+ taskId: I().describe("The task that waits"),
5058
+ dependsOnTaskId: I().describe("The task that must finish first"),
5033
5059
  type: H(["blocking", "relates_to"]).optional().describe("'blocking' (default) affects the schedule; 'relates_to' only links the tasks for reference")
5034
5060
  }),
5035
5061
  annotations: { idempotentHint: !0 },
5036
5062
  execute: async (e, t) => {
5037
- let n = e.type ?? "blocking", { isEngine: r } = await Jn(t);
5063
+ let n = e.type ?? "blocking", { isEngine: r } = await Yn(t);
5038
5064
  return r ? t.addDependency({
5039
5065
  taskId: e.taskId,
5040
5066
  dependsOnTaskId: e.dependsOnTaskId,
@@ -5044,58 +5070,58 @@ var rr = $({
5044
5070
  type: n
5045
5071
  });
5046
5072
  }
5047
- }), cr = $({
5073
+ }), dr = $({
5048
5074
  name: "remove_dependency",
5049
5075
  title: "Remove Dependency",
5050
5076
  description: "Stop a task waiting for another task, for example when the order was wrong or the work no longer depends on it. Identify the link by its two task ids, as given to `add_dependency`. Removing a link that does not exist is not an error. Returns { removed, dependencyIds } with the number of links removed.",
5051
5077
  toolset: "core",
5052
5078
  outputZodSchema: B({
5053
- removed: I().describe("How many dependency records were removed (0 if none matched)"),
5054
- dependencyIds: z(F()).describe("Ids of the removed records")
5079
+ removed: L().describe("How many dependency records were removed (0 if none matched)"),
5080
+ dependencyIds: z(I()).describe("Ids of the removed records")
5055
5081
  }),
5056
5082
  zodSchema: B({
5057
- taskId: F().describe("The task that waits"),
5058
- dependsOnTaskId: F().describe("The task it waits for"),
5083
+ taskId: I().describe("The task that waits"),
5084
+ dependsOnTaskId: I().describe("The task it waits for"),
5059
5085
  type: H(["blocking", "relates_to"]).optional().describe("Remove only links of this type (default: both)")
5060
5086
  }),
5061
5087
  annotations: { idempotentHint: !0 },
5062
5088
  execute: async (e, t) => {
5063
- let n = (await nr(t, e.taskId)).dependencies.filter((t) => {
5064
- let { waiting: n, waitedFor: r } = er(t);
5065
- return n === e.taskId && r === e.dependsOnTaskId && (!e.type || tr(t) === e.type);
5066
- }), { isEngine: r } = await Jn(t), i = [];
5089
+ let n = (await rr(t, e.taskId)).dependencies.filter((t) => {
5090
+ let { waiting: n, waitedFor: r } = tr(t);
5091
+ return n === e.taskId && r === e.dependsOnTaskId && (!e.type || nr(t) === e.type);
5092
+ }), { isEngine: r } = await Yn(t), i = [];
5067
5093
  for (let e of n) (r ? await t.removeDependency(e.id) : await t.removeDependency(e.taskId, e.id)) && i.push(e.id);
5068
5094
  return {
5069
5095
  removed: i.length,
5070
5096
  dependencyIds: i
5071
5097
  };
5072
5098
  }
5073
- }), lr = $({
5099
+ }), fr = $({
5074
5100
  name: "list_deliverables",
5075
5101
  title: "List Deliverables",
5076
5102
  description: "List a project's deliverables: outputs that group the tasks producing them. Use it to see what is due and which tasks feed each deliverable. For dated checkpoints, look for milestone tasks (`isMilestone`). Returns { deliverables }.",
5077
5103
  toolset: "collaboration",
5078
- outputZodSchema: B({ deliverables: z(kn) }),
5079
- zodSchema: B({ projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)") }),
5104
+ outputZodSchema: B({ deliverables: z(An) }),
5105
+ zodSchema: B({ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)") }),
5080
5106
  annotations: { readOnlyHint: !0 },
5081
5107
  execute: async (e, t, n) => {
5082
5108
  let r = e.projectId || n?.projectId;
5083
5109
  if (!r) throw Error("projectId is required to list deliverables. Find one with `list_projects`.");
5084
5110
  return "getDeliverables" in t && typeof t.getDeliverables == "function" ? { deliverables: await t.getDeliverables(r) } : { deliverables: [] };
5085
5111
  }
5086
- }), ur = $({
5112
+ }), pr = $({
5087
5113
  name: "create_deliverable",
5088
5114
  title: "Create Deliverable",
5089
5115
  description: "Create a deliverable in a project, optionally linking existing tasks by id. Use it for an output (a document, a build, an asset) that several tasks produce. For a dated checkpoint the schedule should enforce, create a task with `isMilestone: true` and a `deadline` instead. Returns the created deliverable.",
5090
5116
  toolset: "collaboration",
5091
- outputZodSchema: kn,
5117
+ outputZodSchema: An,
5092
5118
  zodSchema: B({
5093
- projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)"),
5094
- title: F().describe("Name of the deliverable"),
5095
- description: F().optional().describe("What the deliverable is and how it is accepted"),
5096
- dueDate: F().optional().describe("Due date (ISO string)"),
5097
- taskIds: z(F()).optional().describe("IDs of existing tasks that feed this deliverable"),
5098
- customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5119
+ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5120
+ title: I().describe("Name of the deliverable"),
5121
+ description: I().optional().describe("What the deliverable is and how it is accepted"),
5122
+ dueDate: I().optional().describe("Due date (ISO string)"),
5123
+ taskIds: z(I()).optional().describe("IDs of existing tasks that feed this deliverable"),
5124
+ customFields: V(Dt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5099
5125
  }),
5100
5126
  execute: async (e, t, n) => {
5101
5127
  let r = e.projectId || n?.projectId;
@@ -5106,43 +5132,43 @@ var rr = $({
5106
5132
  });
5107
5133
  throw Error("createDeliverable is not supported by this backend target.");
5108
5134
  }
5109
- }), dr = $({
5135
+ }), mr = $({
5110
5136
  name: "list_comments",
5111
5137
  title: "List Comments",
5112
5138
  description: "List the comments on a task. Use it to read the discussion, decisions or blockers recorded there. Returns { comments }.",
5113
5139
  toolset: "collaboration",
5114
- outputZodSchema: B({ comments: z(jn) }),
5115
- zodSchema: B({ taskId: F().describe("The task ID") }),
5140
+ outputZodSchema: B({ comments: z(Mn) }),
5141
+ zodSchema: B({ taskId: I().describe("The task ID") }),
5116
5142
  annotations: { readOnlyHint: !0 },
5117
5143
  execute: async (e, t) => "getComments" in t && typeof t.getComments == "function" ? { comments: await t.getComments(e.taskId) } : { comments: [] }
5118
- }), fr = $({
5144
+ }), hr = $({
5119
5145
  name: "add_comment",
5120
5146
  title: "Add Comment",
5121
5147
  description: "Post a comment on a task, attributed to the identity this server runs as. Use it to record a decision, status note, question or the reasoning behind a change you made. Returns the created comment.",
5122
5148
  toolset: "collaboration",
5123
- outputZodSchema: jn,
5149
+ outputZodSchema: Mn,
5124
5150
  zodSchema: B({
5125
- taskId: F().describe("The task ID"),
5126
- content: F().describe("Comment body/markdown"),
5127
- customFields: V(R()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5151
+ taskId: I().describe("The task ID"),
5152
+ content: I().describe("Comment body/markdown"),
5153
+ customFields: V(Dt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5128
5154
  }),
5129
5155
  execute: async (e, t) => t.addComment({
5130
5156
  taskId: e.taskId,
5131
5157
  content: e.content,
5132
5158
  customFields: e.customFields
5133
5159
  })
5134
- }), pr = $({
5160
+ }), gr = $({
5135
5161
  name: "calculate_portfolio_critical_path",
5136
5162
  title: "Calculate Portfolio Critical Path",
5137
5163
  description: "Schedule several projects together (default: every project you can read) so people and teams shared between them are not double-booked. Use it for cross-project delivery dates and resource conflicts. Returns { projects, projectEndDate, overallocations } with one analysis per project. For a single project use `calculate_critical_path`.",
5138
5164
  toolset: "scheduling",
5139
- outputZodSchema: Fn,
5165
+ outputZodSchema: In,
5140
5166
  zodSchema: B({
5141
- projectIds: z(F()).optional().describe("Projects to include (default: every project you can read)"),
5142
- projectOrder: z(F()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
5143
- includeHiddenWork: L().optional().describe("Also count other projects' work (even unreadable ones, shown only as 'hidden') toward people's capacity. Requires workspace.manage"),
5167
+ projectIds: z(I()).optional().describe("Projects to include (default: every project you can read)"),
5168
+ projectOrder: z(I()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
5169
+ includeHiddenWork: R().optional().describe("Also count other projects' work (even unreadable ones, shown only as 'hidden') toward people's capacity. Requires workspace.manage"),
5144
5170
  calendars: H(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's calendar"),
5145
- levelResources: L().optional().describe("With calendars 'assignee': share people and team pools across the projects"),
5171
+ levelResources: R().optional().describe("With calendars 'assignee': share people and team pools across the projects"),
5146
5172
  levelingPriority: H([
5147
5173
  "slack",
5148
5174
  "priority",
@@ -5150,17 +5176,16 @@ var rr = $({
5150
5176
  "order"
5151
5177
  ]).optional().describe("Which ready task gets an assignee first when levelling (default: least slack, then task priority)"),
5152
5178
  effort: H(["estimate", "remaining"]).optional().describe("'remaining' schedules only estimate minus logged hours for in-progress tasks (default: full estimates)"),
5153
- defaultEstimateHours: I().nonnegative().optional().describe("Hours to assume for tasks with no estimate (default 1). They are listed in unestimatedTaskIds")
5179
+ defaultEstimateHours: L().nonnegative().optional().describe("Hours to assume for tasks with no estimate (default 1). They are listed in unestimatedTaskIds")
5154
5180
  }),
5155
5181
  annotations: { readOnlyHint: !0 },
5156
5182
  execute: async (e, t) => t.calculatePortfolioCriticalPath(e)
5157
- }), mr = [
5158
- Yn,
5183
+ }), _r = [
5159
5184
  Xn,
5160
5185
  Zn,
5161
5186
  Qn,
5162
5187
  $n,
5163
- rr,
5188
+ er,
5164
5189
  ir,
5165
5190
  ar,
5166
5191
  or,
@@ -5170,16 +5195,19 @@ var rr = $({
5170
5195
  ur,
5171
5196
  dr,
5172
5197
  fr,
5198
+ pr,
5199
+ mr,
5200
+ hr,
5173
5201
  $({
5174
5202
  name: "calculate_critical_path",
5175
5203
  title: "Calculate Critical Path",
5176
5204
  description: "Schedule one project with the Critical Path Method: which tasks drive the end date, each task's early and late start and finish, and how much it can slip (slack). Use it for \"when will this finish?\", \"what is on the critical path?\" or \"can this task slip?\". Set calendars 'assignee' with levelResources so each person works on one task at a time. Returns { projectEndDate, criticalTaskIds, tasks, overallocations }. For several projects that share people use `calculate_portfolio_critical_path`.",
5177
5205
  toolset: "scheduling",
5178
- outputZodSchema: Pn,
5206
+ outputZodSchema: Fn,
5179
5207
  zodSchema: B({
5180
- projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)"),
5208
+ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5181
5209
  calendars: H(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's working calendar; default uses the project calendar"),
5182
- levelResources: L().optional().describe("With calendars 'assignee': delay tasks so each assignee works on one task at a time"),
5210
+ levelResources: R().optional().describe("With calendars 'assignee': delay tasks so each assignee works on one task at a time"),
5183
5211
  levelingPriority: H([
5184
5212
  "slack",
5185
5213
  "priority",
@@ -5187,7 +5215,7 @@ var rr = $({
5187
5215
  "order"
5188
5216
  ]).optional().describe("Which ready task gets an assignee first when levelling (default: least slack, then task priority)"),
5189
5217
  effort: H(["estimate", "remaining"]).optional().describe("'remaining' schedules only estimate minus logged hours for in-progress tasks (default: full estimates)"),
5190
- defaultEstimateHours: I().nonnegative().optional().describe("Hours to assume for tasks with no estimate (default 1). They are listed in unestimatedTaskIds")
5218
+ defaultEstimateHours: L().nonnegative().optional().describe("Hours to assume for tasks with no estimate (default 1). They are listed in unestimatedTaskIds")
5191
5219
  }),
5192
5220
  annotations: { readOnlyHint: !0 },
5193
5221
  execute: async (e, t, n) => {
@@ -5203,23 +5231,23 @@ var rr = $({
5203
5231
  });
5204
5232
  }
5205
5233
  }),
5206
- pr,
5234
+ gr,
5207
5235
  $({
5208
5236
  name: "get_timeline_ladder",
5209
5237
  title: "Get Timeline Ladder of Abstraction",
5210
5238
  description: "Project status at three zoom levels: 'macro' phases with health (on_track, at_risk, blocked, overdue) and progress, 'standard' task timeline with the critical path and dependencies, and 'concrete' evidence of work (time logged, attachments) per task. Use it for project status reports; level 'macro' gives a compact summary. Returns { macro, standard, concrete }. For a single task use `get_task_ladder`.",
5211
5239
  toolset: "analytics",
5212
- outputZodSchema: Ln,
5240
+ outputZodSchema: Rn,
5213
5241
  zodSchema: B({
5214
- projectId: F().optional().describe("Project ID (falls back to ambient context if omitted)"),
5242
+ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5215
5243
  level: H([
5216
5244
  "macro",
5217
5245
  "standard",
5218
5246
  "concrete",
5219
5247
  "all"
5220
5248
  ]).optional().describe("Abstraction level (macro, standard, concrete, or all)"),
5221
- containerId: F().optional().describe("Optional container ID filter"),
5222
- iterationId: F().optional().describe("Optional iteration/sprint ID filter")
5249
+ containerId: I().optional().describe("Optional container ID filter"),
5250
+ iterationId: I().optional().describe("Optional iteration/sprint ID filter")
5223
5251
  }),
5224
5252
  annotations: { readOnlyHint: !0 },
5225
5253
  execute: async (e, t, n) => {
@@ -5237,8 +5265,8 @@ var rr = $({
5237
5265
  title: "Get Task Ladder View",
5238
5266
  description: "One task in context: the phase it belongs to and that phase's health, its place in the schedule (dates, slack, critical or not) and evidence of work done. Use it to explain where a task fits and whether it puts its phase at risk. Returns { macroPhase, standard, concrete, metrics }. For the numbers alone use `get_task_metrics`.",
5239
5267
  toolset: "analytics",
5240
- outputZodSchema: Rn,
5241
- zodSchema: B({ taskId: F().describe("The task ID") }),
5268
+ outputZodSchema: zn,
5269
+ zodSchema: B({ taskId: I().describe("The task ID") }),
5242
5270
  annotations: { readOnlyHint: !0 },
5243
5271
  execute: async (e, t) => t.getTaskLadder(e.taskId)
5244
5272
  }),
@@ -5247,8 +5275,8 @@ var rr = $({
5247
5275
  title: "Get Task Metrics",
5248
5276
  description: "Is a task on track? Progress percentage, actual against estimated hours, schedule variance, overdue flags and earned value (CPI, SPI). Use it to diagnose a late or over-budget task. Returns { progress, realityDelta, evm, inferredActuals, progressHistory }.",
5249
5277
  toolset: "analytics",
5250
- outputZodSchema: Bn,
5251
- zodSchema: B({ taskId: F().describe("The task ID") }),
5278
+ outputZodSchema: Vn,
5279
+ zodSchema: B({ taskId: I().describe("The task ID") }),
5252
5280
  annotations: { readOnlyHint: !0 },
5253
5281
  execute: async (e, t) => t.getTaskMetrics(e.taskId)
5254
5282
  }),
@@ -5257,8 +5285,8 @@ var rr = $({
5257
5285
  title: "Get Task Progress History",
5258
5286
  description: "How a task's progress has moved over time: dated progress points and a curve shape (linear, s_curve, early_surge, late_rush, stalled). Use it to tell whether work is stalling or being rushed at the end. Returns { points, curveProfile }. `get_task_metrics` includes the same history alongside variance and earned value.",
5259
5287
  toolset: "analytics",
5260
- outputZodSchema: zn,
5261
- zodSchema: B({ taskId: F().describe("The task ID") }),
5288
+ outputZodSchema: Bn,
5289
+ zodSchema: B({ taskId: I().describe("The task ID") }),
5262
5290
  annotations: { readOnlyHint: !0 },
5263
5291
  execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
5264
5292
  }),
@@ -5267,11 +5295,11 @@ var rr = $({
5267
5295
  title: "Get Workload Distribution",
5268
5296
  description: "Hours of work per person, team, task type, priority or status in each day, week or month, with capacity and utilization. Use it for \"who is overloaded?\" and capacity planning; a utilizationRatio above 1 means more work than capacity. Omit projectId for the whole workspace. Returns { buckets, seriesKeys, seriesLabels, totalHours, averageUtilization }.",
5269
5297
  toolset: "scheduling",
5270
- outputZodSchema: Vn,
5298
+ outputZodSchema: Hn,
5271
5299
  zodSchema: B({
5272
- projectId: F().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
5273
- startDate: F().optional().describe("Start date ISO (YYYY-MM-DD)"),
5274
- endDate: F().optional().describe("End date ISO (YYYY-MM-DD)"),
5300
+ projectId: I().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
5301
+ startDate: I().optional().describe("Start date ISO (YYYY-MM-DD)"),
5302
+ endDate: I().optional().describe("End date ISO (YYYY-MM-DD)"),
5275
5303
  interval: H([
5276
5304
  "day",
5277
5305
  "week",
@@ -5290,7 +5318,7 @@ var rr = $({
5290
5318
  "remaining",
5291
5319
  "blended"
5292
5320
  ]).optional().describe("Effort metric mode"),
5293
- defaultWeeklyCapacityHours: I().optional().describe("Default weekly capacity hours per person (default 40)")
5321
+ defaultWeeklyCapacityHours: L().optional().describe("Default weekly capacity hours per person (default 40)")
5294
5322
  }),
5295
5323
  annotations: { readOnlyHint: !0 },
5296
5324
  execute: async (e, t, n) => {
@@ -5310,49 +5338,49 @@ var rr = $({
5310
5338
  title: "Get Skill",
5311
5339
  description: "Load a step-by-step playbook for a multi-step project management job, such as planning a project, triaging tasks, finding schedule risk, writing a status report, checking capacity or investigating a late task. Call it before starting such a job and follow its steps. Omit name to list the skills. Returns { name, description, content }, or { skills } without a name.",
5312
5340
  toolset: "guidance",
5313
- outputZodSchema: Hn,
5314
- zodSchema: B({ name: F().optional().describe("Skill name, e.g. \"plan-project\"; omit to list all skills") }),
5341
+ outputZodSchema: Un,
5342
+ zodSchema: B({ name: I().optional().describe("Skill name, e.g. \"plan-project\"; omit to list all skills") }),
5315
5343
  annotations: { readOnlyHint: !0 },
5316
5344
  execute: async (e) => {
5317
5345
  if (!e.name) return { skills: Q.map(({ name: e, description: t }) => ({
5318
5346
  name: e,
5319
5347
  description: t
5320
5348
  })) };
5321
- let t = Un(e.name);
5349
+ let t = Wn(e.name);
5322
5350
  if (!t) throw Error(`Skill "${e.name}" not found. Available skills: ${Q.map((e) => e.name).join(", ")}.`);
5323
5351
  return t;
5324
5352
  }
5325
5353
  })
5326
- ], hr = new Map(mr.map((e) => [e.name, e]));
5327
- function gr(e = {}) {
5328
- let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !hr.has(e));
5329
- if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${mr.map((e) => e.name).join(", ")}.`);
5330
- let a = (n ?? []).filter((e) => !(e in Wn));
5331
- if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Wn).join(", ")}.`);
5354
+ ], vr = new Map(_r.map((e) => [e.name, e]));
5355
+ function yr(e = {}) {
5356
+ let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !vr.has(e));
5357
+ if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${_r.map((e) => e.name).join(", ")}.`);
5358
+ let a = (n ?? []).filter((e) => !(e in Gn));
5359
+ if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Gn).join(", ")}.`);
5332
5360
  let o = !t && !n;
5333
- return mr.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
5361
+ return _r.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
5334
5362
  }
5335
- var _r = class extends Error {
5363
+ var br = class extends Error {
5336
5364
  constructor(e) {
5337
5365
  super(e), this.name = "ToolNotFoundError";
5338
5366
  }
5339
- }, vr = "Check the id: find valid project ids with `list_projects` and task ids with `list_tasks`. Ids are never guessable, and items you cannot read are reported as not found.";
5340
- async function yr(e, t, n, r) {
5367
+ }, xr = "Check the id: find valid project ids with `list_projects` and task ids with `list_tasks`. Ids are never guessable, and items you cannot read are reported as not found.";
5368
+ async function Sr(e, t, n, r) {
5341
5369
  try {
5342
- let i = await e.execute(qn(e, t), n, r);
5343
- if (i == null) throw new _r(`Nothing found for ${JSON.stringify(t ?? {})}.`);
5370
+ let i = await e.execute(Jn(e, t), n, r);
5371
+ if (i == null) throw new br(`Nothing found for ${JSON.stringify(t ?? {})}.`);
5344
5372
  return JSON.parse(JSON.stringify(i));
5345
5373
  } catch (t) {
5346
- throw Error(br(e, t));
5374
+ throw Error(Cr(e, t));
5347
5375
  }
5348
5376
  }
5349
- function br(e, t) {
5377
+ function Cr(e, t) {
5350
5378
  let n = t?.message || String(t);
5351
- return t instanceof Kn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof _r || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${vr}` : t?.name === "CircularDependencyError" || /circular/i.test(n) ? `${n} The tasks are already ordered the other way round. Check with \`get_task\` and includeDependencies, and ask the user which order is right rather than retrying.` : t?.name === "ForbiddenError" || t?.status === 403 ? `${n} You do not have permission for this; tell the user rather than retrying.` : n;
5379
+ return t instanceof qn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof br || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${xr}` : t?.name === "CircularDependencyError" || /circular/i.test(n) ? `${n} The tasks are already ordered the other way round. Check with \`get_task\` and includeDependencies, and ask the user which order is right rather than retrying.` : t?.name === "ForbiddenError" || t?.status === 403 ? `${n} You do not have permission for this; tell the user rather than retrying.` : n;
5352
5380
  }
5353
5381
  //#endregion
5354
5382
  //#region ../mcp/dist/tools/instructions.js
5355
- var xr = [
5383
+ var wr = [
5356
5384
  {
5357
5385
  when: "Find a project or task id",
5358
5386
  tools: ["list_projects", "list_tasks"]
@@ -5406,7 +5434,7 @@ var xr = [
5406
5434
  tools: ["get_workload_distribution"]
5407
5435
  }
5408
5436
  ];
5409
- function Sr(e, t = {}) {
5437
+ function Tr(e, t = {}) {
5410
5438
  let n = new Set(e.map((e) => e.name)), r = [
5411
5439
  "Critical Path is a project management backend. A project holds tasks and deliverables (outputs that group the tasks producing them). Tasks have a workflow status, priority, assignee, effort estimate, logged hours, optional subtasks (parentId) and dependencies, and comments. A task with `isMilestone: true` is a zero-duration checkpoint, and a `deadline` on any task is enforced by critical path analysis.",
5412
5440
  "",
@@ -5417,7 +5445,7 @@ function Sr(e, t = {}) {
5417
5445
  "- Confirm with the user before any tool marked destructive."
5418
5446
  ];
5419
5447
  t.projectId && r.push(`- The user is viewing project "${t.projectId}"; tools use it when you omit projectId.`);
5420
- let i = xr.map((e) => ({
5448
+ let i = wr.map((e) => ({
5421
5449
  ...e,
5422
5450
  tools: e.tools.filter((e) => n.has(e))
5423
5451
  })).filter((e) => e.tools.length > 0);
@@ -5433,7 +5461,7 @@ function Sr(e, t = {}) {
5433
5461
  }
5434
5462
  //#endregion
5435
5463
  //#region ../mcp/dist/web/index.js
5436
- function Cr(e = typeof document < "u" ? document : null) {
5464
+ function Er(e = typeof document < "u" ? document : null) {
5437
5465
  if (!e) return null;
5438
5466
  if (!e.modelContext) {
5439
5467
  let t = /* @__PURE__ */ new Map();
@@ -5458,14 +5486,14 @@ function Cr(e = typeof document < "u" ? document : null) {
5458
5486
  }
5459
5487
  return e.modelContext;
5460
5488
  }
5461
- function wr(e) {
5489
+ function Dr(e) {
5462
5490
  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;
5463
- t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = Cr(t) ?? void 0);
5464
- let a = gr({
5491
+ t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = Er(t) ?? void 0);
5492
+ let a = yr({
5465
5493
  tools: e.tools,
5466
5494
  toolsets: e.toolsets,
5467
5495
  readOnly: e.readOnly
5468
- }), o = Sr(a, { projectId: e.projectId }), s = [], c = new AbortController();
5496
+ }), o = Tr(a, { projectId: e.projectId }), s = [], c = new AbortController();
5469
5497
  if (e.signal?.aborted) return {
5470
5498
  unregister: () => {},
5471
5499
  getRegisteredTools: () => [],
@@ -5481,7 +5509,7 @@ function wr(e) {
5481
5509
  outputSchema: t.outputSchema,
5482
5510
  annotations: { ...t.annotations },
5483
5511
  execute: async (n) => {
5484
- let r = e.projectId ? { projectId: e.projectId } : void 0, i = await yr(t, n, e.client, r);
5512
+ let r = e.projectId ? { projectId: e.projectId } : void 0, i = await Sr(t, n, e.client, r);
5485
5513
  return e.onToolExecuted?.(t.name, n, i), i;
5486
5514
  }
5487
5515
  };
@@ -5511,7 +5539,7 @@ function wr(e) {
5511
5539
  }
5512
5540
  //#endregion
5513
5541
  //#region src/webmcp-state.svelte.ts
5514
- var Tr = class {
5542
+ var Or = class {
5515
5543
  client;
5516
5544
  options;
5517
5545
  #e = t.state(!1);
@@ -5558,7 +5586,7 @@ var Tr = class {
5558
5586
  if (!this.registered) {
5559
5587
  this.error = null;
5560
5588
  try {
5561
- this.abortController = new AbortController(), this.handle = wr({
5589
+ this.abortController = new AbortController(), this.handle = Dr({
5562
5590
  client: this.client,
5563
5591
  projectId: this.activeProjectId,
5564
5592
  tools: this.options.tools,
@@ -5584,15 +5612,15 @@ var Tr = class {
5584
5612
  this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
5585
5613
  }
5586
5614
  };
5587
- function Er(e, t) {
5588
- return new Tr(e, t);
5615
+ function kr(e, t) {
5616
+ return new Or(e, t);
5589
5617
  }
5590
5618
  //#endregion
5591
5619
  //#region src/critical-path-state.svelte.ts
5592
- var Dr = class {
5620
+ var Ar = class {
5593
5621
  client;
5594
5622
  projectId;
5595
- #e = new a();
5623
+ #e = new o();
5596
5624
  #t = t.state(null);
5597
5625
  get data() {
5598
5626
  return t.get(this.#t);
@@ -5633,15 +5661,15 @@ var Dr = class {
5633
5661
  this.#e.cancel();
5634
5662
  }
5635
5663
  };
5636
- function Or(e, t) {
5637
- return new Dr(e, t);
5664
+ function jr(e, t) {
5665
+ return new Ar(e, t);
5638
5666
  }
5639
5667
  //#endregion
5640
5668
  //#region src/timeline-ladder-state.svelte.ts
5641
- var kr = class {
5669
+ var Mr = class {
5642
5670
  client;
5643
5671
  projectId;
5644
- #e = new a();
5672
+ #e = new o();
5645
5673
  #t = t.state(null);
5646
5674
  get data() {
5647
5675
  return t.get(this.#t);
@@ -5716,17 +5744,17 @@ var kr = class {
5716
5744
  this.#e.cancel();
5717
5745
  }
5718
5746
  };
5719
- function Ar(e, t, n) {
5720
- return new kr(e, t, n);
5747
+ function Nr(e, t, n) {
5748
+ return new Mr(e, t, n);
5721
5749
  }
5722
5750
  //#endregion
5723
5751
  //#region src/task-metrics-state.svelte.ts
5724
- var jr = class {
5752
+ var Pr = class {
5725
5753
  client;
5726
5754
  taskId;
5727
- #e = new a();
5728
- #t = new a();
5729
- #n = new a();
5755
+ #e = new o();
5756
+ #t = new o();
5757
+ #n = new o();
5730
5758
  #r = t.state(null);
5731
5759
  get metrics() {
5732
5760
  return t.get(this.#r);
@@ -5840,16 +5868,16 @@ var jr = class {
5840
5868
  this.#e.cancel(), this.#t.cancel(), this.#n.cancel();
5841
5869
  }
5842
5870
  };
5843
- function Mr(e, t) {
5844
- return new jr(e, t);
5871
+ function Fr(e, t) {
5872
+ return new Pr(e, t);
5845
5873
  }
5846
5874
  //#endregion
5847
5875
  //#region src/workload-state.svelte.ts
5848
- var Nr = class {
5876
+ var Ir = class {
5849
5877
  client;
5850
5878
  projectId;
5851
5879
  initialOptions;
5852
- #e = new a();
5880
+ #e = new o();
5853
5881
  #t = t.state(null);
5854
5882
  get data() {
5855
5883
  return t.get(this.#t);
@@ -5968,13 +5996,13 @@ var Nr = class {
5968
5996
  this.#e.cancel();
5969
5997
  }
5970
5998
  };
5971
- function Pr(e, t, n) {
5972
- return new Nr(e, t, n);
5999
+ function Lr(e, t, n) {
6000
+ return new Ir(e, t, n);
5973
6001
  }
5974
6002
  //#endregion
5975
6003
  //#region src/index.ts
5976
- function Fr(t) {
6004
+ function Rr(t) {
5977
6005
  return new e(t);
5978
6006
  }
5979
6007
  //#endregion
5980
- export { ae as AttachmentState, re as CommentState, Dr as CriticalPathState, le as DeliverableState, de as DeliverableSummaryState, pe as KanbanState, o as ProjectState, se as TaskActivityState, jr as TaskMetricsState, c as TaskState, he as TaskTransitionsState, kr as TimelineLadderState, Tr as WebMcpState, te as WorkflowState, Nr as WorkloadState, oe as createAttachmentState, ie as createCommentState, Fr as createCriticalPathClient, Or as createCriticalPathState, ue as createDeliverableState, fe as createDeliverableSummaryState, me as createKanbanState, s as createProjectState, ce as createTaskActivityState, Mr as createTaskMetricsState, ee as createTaskState, ge as createTaskTransitionsState, Ar as createTimelineLadderState, Er as createWebMcpState, ne as createWorkflowState, Pr as createWorkloadState };
6008
+ export { oe as AttachmentState, ie as CommentState, Ar as CriticalPathState, ue as DeliverableState, fe as DeliverableSummaryState, me as KanbanState, s as ProjectState, ce as TaskActivityState, Pr as TaskMetricsState, ee as TaskState, ge as TaskTransitionsState, Mr as TimelineLadderState, Or as WebMcpState, ne as WorkflowState, Ir as WorkloadState, se as createAttachmentState, ae as createCommentState, Rr as createCriticalPathClient, jr as createCriticalPathState, de as createDeliverableState, pe as createDeliverableSummaryState, he as createKanbanState, c as createProjectState, le as createTaskActivityState, Fr as createTaskMetricsState, te as createTaskState, _e as createTaskTransitionsState, Nr as createTimelineLadderState, kr as createWebMcpState, re as createWorkflowState, Lr as createWorkloadState };