@critical-path/svelte 0.19.0 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.js +457 -437
  3. package/package.json +5 -5
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, resolveStatusDefinition as r } from "@critical-path/core";
3
+ import { isTempTaskId as n, precedenceOf as r, resolveStatusDefinition as i } from "@critical-path/core";
4
4
  //#region src/latest-request.ts
5
- var i = class {
5
+ var a = class {
6
6
  controller;
7
7
  begin(e) {
8
8
  this.controller?.abort(), this.controller = new AbortController();
@@ -15,9 +15,9 @@ var i = class {
15
15
  cancel() {
16
16
  this.controller?.abort(), this.controller = void 0;
17
17
  }
18
- }, a = class {
18
+ }, o = class {
19
19
  client;
20
- #e = new i();
20
+ #e = new a();
21
21
  #t = t.state(t.proxy([]));
22
22
  get data() {
23
23
  return t.get(this.#t);
@@ -75,15 +75,15 @@ var i = class {
75
75
  this.#e.cancel();
76
76
  }
77
77
  };
78
- function o(e) {
79
- return new a(e);
78
+ function s(e) {
79
+ return new o(e);
80
80
  }
81
81
  //#endregion
82
82
  //#region src/task-state.svelte.ts
83
- var s = class {
83
+ var c = class {
84
84
  client;
85
85
  projectId;
86
- #e = new i();
86
+ #e = new a();
87
87
  #t = t.state(t.proxy([]));
88
88
  get data() {
89
89
  return t.get(this.#t);
@@ -218,14 +218,14 @@ var s = class {
218
218
  this.#e.cancel();
219
219
  }
220
220
  };
221
- function c(e, t) {
222
- return new s(e, t);
221
+ function ee(e, t) {
222
+ return new c(e, t);
223
223
  }
224
224
  //#endregion
225
225
  //#region src/workflow-state.svelte.ts
226
- var ee = class {
226
+ var te = class {
227
227
  client;
228
- #e = new i();
228
+ #e = new a();
229
229
  #t = t.state(t.proxy([]));
230
230
  get data() {
231
231
  return t.get(this.#t);
@@ -292,15 +292,15 @@ var ee = class {
292
292
  this.#e.cancel();
293
293
  }
294
294
  };
295
- function te(e) {
296
- return new ee(e);
295
+ function ne(e) {
296
+ return new te(e);
297
297
  }
298
298
  //#endregion
299
299
  //#region src/comment-state.svelte.ts
300
- var ne = class {
300
+ var re = class {
301
301
  client;
302
302
  taskId;
303
- #e = new i();
303
+ #e = new a();
304
304
  #t = t.state(t.proxy([]));
305
305
  get data() {
306
306
  return t.get(this.#t);
@@ -413,15 +413,15 @@ var ne = class {
413
413
  this.#e.cancel();
414
414
  }
415
415
  };
416
- function re(e, t) {
417
- return new ne(e, t);
416
+ function ie(e, t) {
417
+ return new re(e, t);
418
418
  }
419
419
  //#endregion
420
420
  //#region src/attachment-state.svelte.ts
421
- var ie = class {
421
+ var ae = class {
422
422
  client;
423
423
  filter;
424
- #e = new i();
424
+ #e = new a();
425
425
  #t = t.state(t.proxy([]));
426
426
  get data() {
427
427
  return t.get(this.#t);
@@ -482,15 +482,15 @@ var ie = class {
482
482
  this.#e.cancel();
483
483
  }
484
484
  };
485
- function ae(e, t) {
486
- return new ie(e, t);
485
+ function oe(e, t) {
486
+ return new ae(e, t);
487
487
  }
488
488
  //#endregion
489
489
  //#region src/activity-state.svelte.ts
490
- var oe = class {
490
+ var se = class {
491
491
  client;
492
492
  taskId;
493
- #e = new i();
493
+ #e = new a();
494
494
  #t = t.state(t.proxy([]));
495
495
  get comments() {
496
496
  return t.get(this.#t);
@@ -643,15 +643,15 @@ var oe = class {
643
643
  this.#e.cancel();
644
644
  }
645
645
  };
646
- function se(e, t) {
647
- return new oe(e, t);
646
+ function ce(e, t) {
647
+ return new se(e, t);
648
648
  }
649
649
  //#endregion
650
650
  //#region src/deliverable-state.svelte.ts
651
- var ce = class {
651
+ var le = class {
652
652
  client;
653
653
  projectId;
654
- #e = new i();
654
+ #e = new a();
655
655
  #t = t.state(t.proxy([]));
656
656
  get data() {
657
657
  return t.get(this.#t);
@@ -732,15 +732,15 @@ var ce = class {
732
732
  this.#e.cancel();
733
733
  }
734
734
  };
735
- function le(e, t) {
736
- return new ce(e, t);
735
+ function ue(e, t) {
736
+ return new le(e, t);
737
737
  }
738
738
  //#endregion
739
739
  //#region src/deliverable-summary-state.svelte.ts
740
- var ue = class {
740
+ var de = class {
741
741
  client;
742
742
  deliverableId;
743
- #e = new i();
743
+ #e = new a();
744
744
  #t = t.state(null);
745
745
  get summary() {
746
746
  return t.get(this.#t);
@@ -787,12 +787,12 @@ var ue = class {
787
787
  this.#e.cancel();
788
788
  }
789
789
  };
790
- function de(e, t) {
791
- return new ue(e, t);
790
+ function fe(e, t) {
791
+ return new de(e, t);
792
792
  }
793
793
  //#endregion
794
794
  //#region src/kanban-state.svelte.ts
795
- var fe = class {
795
+ var pe = class {
796
796
  projectId;
797
797
  options;
798
798
  taskState;
@@ -818,7 +818,7 @@ var fe = class {
818
818
  canceled: []
819
819
  };
820
820
  for (let n of e) {
821
- let e = n.semanticStatus || r(n.status, this.options?.customDefinitions).category;
821
+ let e = n.semanticStatus || i(n.status, this.options?.customDefinitions).category;
822
822
  t[e] ? t[e].push(n) : t.not_started.push(n);
823
823
  }
824
824
  return t;
@@ -836,7 +836,7 @@ var fe = class {
836
836
  t.set(this.#e, e);
837
837
  }
838
838
  constructor(e, t, n = {}) {
839
- this.projectId = t, this.options = n, this.taskState = new s(e, t);
839
+ this.projectId = t, this.options = n, this.taskState = new c(e, t);
840
840
  }
841
841
  async fetch() {
842
842
  return this.taskState.fetch();
@@ -854,15 +854,15 @@ var fe = class {
854
854
  return this.taskState.deleteTask(e);
855
855
  }
856
856
  };
857
- function pe(e, t, n) {
858
- return new fe(e, t, n);
857
+ function me(e, t, n) {
858
+ return new pe(e, t, n);
859
859
  }
860
860
  //#endregion
861
861
  //#region src/task-transitions-state.svelte.ts
862
- var me = class {
862
+ var he = class {
863
863
  client;
864
864
  taskId;
865
- #e = new i();
865
+ #e = new a();
866
866
  #t = t.state(t.proxy([]));
867
867
  get allowedTransitions() {
868
868
  return t.get(this.#t);
@@ -906,8 +906,8 @@ var me = class {
906
906
  this.#e.cancel();
907
907
  }
908
908
  };
909
- function he(e, t) {
910
- return new me(e, t);
909
+ function ge(e, t) {
910
+ return new he(e, t);
911
911
  }
912
912
  //#endregion
913
913
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
@@ -941,13 +941,13 @@ var l;
941
941
  }
942
942
  e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
943
943
  })(l ||= {});
944
- var ge;
944
+ var _e;
945
945
  (function(e) {
946
946
  e.mergeShapes = (e, t) => ({
947
947
  ...e,
948
948
  ...t
949
949
  });
950
- })(ge ||= {});
950
+ })(_e ||= {});
951
951
  var u = l.arrayToEnum([
952
952
  "string",
953
953
  "nan",
@@ -1113,13 +1113,13 @@ var m = (e, t) => {
1113
1113
  default: n = t.defaultError, l.assertNever(e);
1114
1114
  }
1115
1115
  return { message: n };
1116
- }, _e = m;
1117
- function ve() {
1118
- return _e;
1116
+ }, ve = m;
1117
+ function ye() {
1118
+ return ve;
1119
1119
  }
1120
1120
  //#endregion
1121
1121
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
1122
- var ye = (e) => {
1122
+ var be = (e) => {
1123
1123
  let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
1124
1124
  ...i,
1125
1125
  path: a
@@ -1141,7 +1141,7 @@ var ye = (e) => {
1141
1141
  };
1142
1142
  };
1143
1143
  function h(e, t) {
1144
- let n = ve(), r = ye({
1144
+ let n = ye(), r = be({
1145
1145
  issueData: t,
1146
1146
  data: e.data,
1147
1147
  path: e.path,
@@ -1198,13 +1198,13 @@ var g = class e {
1198
1198
  value: n
1199
1199
  };
1200
1200
  }
1201
- }, _ = Object.freeze({ status: "aborted" }), be = (e) => ({
1201
+ }, _ = Object.freeze({ status: "aborted" }), xe = (e) => ({
1202
1202
  status: "dirty",
1203
1203
  value: e
1204
1204
  }), v = (e) => ({
1205
1205
  status: "valid",
1206
1206
  value: e
1207
- }), xe = (e) => e.status === "aborted", Se = (e) => e.status === "dirty", y = (e) => e.status === "valid", Ce = (e) => typeof Promise < "u" && e instanceof Promise, b;
1207
+ }), Se = (e) => e.status === "aborted", Ce = (e) => e.status === "dirty", y = (e) => e.status === "valid", we = (e) => typeof Promise < "u" && e instanceof Promise, b;
1208
1208
  (function(e) {
1209
1209
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
1210
1210
  })(b ||= {});
@@ -1217,7 +1217,7 @@ var x = class {
1217
1217
  get path() {
1218
1218
  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
1219
  }
1220
- }, we = (e, t) => {
1220
+ }, Te = (e, t) => {
1221
1221
  if (y(t)) return {
1222
1222
  success: !0,
1223
1223
  data: t.value
@@ -1279,7 +1279,7 @@ var C = class {
1279
1279
  }
1280
1280
  _parseSync(e) {
1281
1281
  let t = this._parse(e);
1282
- if (Ce(t)) throw Error("Synchronous parse encountered promise.");
1282
+ if (we(t)) throw Error("Synchronous parse encountered promise.");
1283
1283
  return t;
1284
1284
  }
1285
1285
  _parseAsync(e) {
@@ -1304,7 +1304,7 @@ var C = class {
1304
1304
  data: e,
1305
1305
  parsedType: d(e)
1306
1306
  };
1307
- return we(n, this._parseSync({
1307
+ return Te(n, this._parseSync({
1308
1308
  data: e,
1309
1309
  path: n.path,
1310
1310
  parent: n
@@ -1363,7 +1363,7 @@ var C = class {
1363
1363
  path: n.path,
1364
1364
  parent: n
1365
1365
  });
1366
- return we(n, await (Ce(r) ? r : Promise.resolve(r)));
1366
+ return Te(n, await (we(r) ? r : Promise.resolve(r)));
1367
1367
  }
1368
1368
  refine(e, t) {
1369
1369
  let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
@@ -1414,10 +1414,10 @@ var C = class {
1414
1414
  return j.create(this, this._def);
1415
1415
  }
1416
1416
  or(e) {
1417
- return ot.create([this, e], this._def);
1417
+ return st.create([this, e], this._def);
1418
1418
  }
1419
1419
  and(e) {
1420
- return lt.create(this, e, this._def);
1420
+ return ut.create(this, e, this._def);
1421
1421
  }
1422
1422
  transform(e) {
1423
1423
  return new M({
@@ -1432,7 +1432,7 @@ var C = class {
1432
1432
  }
1433
1433
  default(e) {
1434
1434
  let t = typeof e == "function" ? e : () => e;
1435
- return new yt({
1435
+ return new bt({
1436
1436
  ...S(this._def),
1437
1437
  innerType: this,
1438
1438
  defaultValue: t,
@@ -1440,7 +1440,7 @@ var C = class {
1440
1440
  });
1441
1441
  }
1442
1442
  brand() {
1443
- return new St({
1443
+ return new Ct({
1444
1444
  typeName: F.ZodBranded,
1445
1445
  type: this,
1446
1446
  ...S(this._def)
@@ -1448,7 +1448,7 @@ var C = class {
1448
1448
  }
1449
1449
  catch(e) {
1450
1450
  let t = typeof e == "function" ? e : () => e;
1451
- return new bt({
1451
+ return new xt({
1452
1452
  ...S(this._def),
1453
1453
  innerType: this,
1454
1454
  catchValue: t,
@@ -1463,10 +1463,10 @@ var C = class {
1463
1463
  });
1464
1464
  }
1465
1465
  pipe(e) {
1466
- return Ct.create(this, e);
1466
+ return wt.create(this, e);
1467
1467
  }
1468
1468
  readonly() {
1469
- return wt.create(this);
1469
+ return Tt.create(this);
1470
1470
  }
1471
1471
  isOptional() {
1472
1472
  return this.safeParse(void 0).success;
@@ -1474,25 +1474,25 @@ var C = class {
1474
1474
  isNullable() {
1475
1475
  return this.safeParse(null).success;
1476
1476
  }
1477
- }, Te = /^c[^\s-]{8,}$/i, Ee = /^[0-9a-z]+$/, De = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Oe = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ke = /^[a-z0-9_-]{21}$/i, Ae = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, je = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Me = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ne = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Pe, Fe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ie = /^(?:(?: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])$/, Le = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Re = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ze = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Be = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ve = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", He = RegExp(`^${Ve}$`);
1478
- function Ue(e) {
1477
+ }, Ee = /^c[^\s-]{8,}$/i, De = /^[0-9a-z]+$/, Oe = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ke = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Ae = /^[a-z0-9_-]{21}$/i, je = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Me = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ne = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Pe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Fe, Ie = /^(?:(?: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])$/, Le = /^(?:(?: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])$/, Re = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, ze = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Be = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ve = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, He = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ue = RegExp(`^${He}$`);
1478
+ function We(e) {
1479
1479
  let t = "[0-5]\\d";
1480
1480
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
1481
1481
  let n = e.precision ? "+" : "?";
1482
1482
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
1483
1483
  }
1484
- function We(e) {
1485
- return RegExp(`^${Ue(e)}$`);
1486
- }
1487
1484
  function Ge(e) {
1488
- let t = `${Ve}T${Ue(e)}`, n = [];
1489
- return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
1485
+ return RegExp(`^${We(e)}$`);
1490
1486
  }
1491
- function Ke(e, t) {
1492
- return !((t !== "v4" && t || !Fe.test(e)) && (t !== "v6" && t || !Le.test(e)));
1487
+ function Ke(e) {
1488
+ let t = `${He}T${We(e)}`, n = [];
1489
+ return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
1493
1490
  }
1494
1491
  function qe(e, t) {
1495
- if (!Ae.test(e)) return !1;
1492
+ return !((t !== "v4" && t || !Ie.test(e)) && (t !== "v6" && t || !Re.test(e)));
1493
+ }
1494
+ function Je(e, t) {
1495
+ if (!je.test(e)) return !1;
1496
1496
  try {
1497
1497
  let [n] = e.split(".");
1498
1498
  if (!n) return !1;
@@ -1502,10 +1502,10 @@ function qe(e, t) {
1502
1502
  return !1;
1503
1503
  }
1504
1504
  }
1505
- function Je(e, t) {
1506
- return !((t !== "v4" && t || !Ie.test(e)) && (t !== "v6" && t || !Re.test(e)));
1505
+ function Ye(e, t) {
1506
+ return !((t !== "v4" && t || !Le.test(e)) && (t !== "v6" && t || !ze.test(e)));
1507
1507
  }
1508
- var Ye = class e extends C {
1508
+ var Xe = class e extends C {
1509
1509
  _parse(e) {
1510
1510
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
1511
1511
  let t = this._getOrReturnCtx(e);
@@ -1549,37 +1549,37 @@ var Ye = class e extends C {
1549
1549
  exact: !0,
1550
1550
  message: r.message
1551
1551
  }), t.dirty());
1552
- } else if (r.kind === "email") Me.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1552
+ } else if (r.kind === "email") Ne.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1553
1553
  validation: "email",
1554
1554
  code: f.invalid_string,
1555
1555
  message: r.message
1556
1556
  }), t.dirty());
1557
- else if (r.kind === "emoji") Pe ||= new RegExp(Ne, "u"), Pe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1557
+ else if (r.kind === "emoji") Fe ||= new RegExp(Pe, "u"), Fe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1558
1558
  validation: "emoji",
1559
1559
  code: f.invalid_string,
1560
1560
  message: r.message
1561
1561
  }), t.dirty());
1562
- else if (r.kind === "uuid") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1562
+ else if (r.kind === "uuid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1563
1563
  validation: "uuid",
1564
1564
  code: f.invalid_string,
1565
1565
  message: r.message
1566
1566
  }), t.dirty());
1567
- else if (r.kind === "nanoid") ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1567
+ else if (r.kind === "nanoid") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1568
1568
  validation: "nanoid",
1569
1569
  code: f.invalid_string,
1570
1570
  message: r.message
1571
1571
  }), t.dirty());
1572
- else if (r.kind === "cuid") Te.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1572
+ else if (r.kind === "cuid") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1573
1573
  validation: "cuid",
1574
1574
  code: f.invalid_string,
1575
1575
  message: r.message
1576
1576
  }), t.dirty());
1577
- else if (r.kind === "cuid2") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1577
+ else if (r.kind === "cuid2") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1578
1578
  validation: "cuid2",
1579
1579
  code: f.invalid_string,
1580
1580
  message: r.message
1581
1581
  }), t.dirty());
1582
- else if (r.kind === "ulid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1582
+ else if (r.kind === "ulid") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1583
1583
  validation: "ulid",
1584
1584
  code: f.invalid_string,
1585
1585
  message: r.message
@@ -1612,39 +1612,39 @@ var Ye = class e extends C {
1612
1612
  code: f.invalid_string,
1613
1613
  validation: { endsWith: r.value },
1614
1614
  message: r.message
1615
- }), t.dirty()) : r.kind === "datetime" ? Ge(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1615
+ }), t.dirty()) : r.kind === "datetime" ? Ke(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1616
1616
  code: f.invalid_string,
1617
1617
  validation: "datetime",
1618
1618
  message: r.message
1619
- }), t.dirty()) : r.kind === "date" ? He.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1619
+ }), t.dirty()) : r.kind === "date" ? Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1620
1620
  code: f.invalid_string,
1621
1621
  validation: "date",
1622
1622
  message: r.message
1623
- }), t.dirty()) : r.kind === "time" ? We(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1623
+ }), t.dirty()) : r.kind === "time" ? Ge(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1624
1624
  code: f.invalid_string,
1625
1625
  validation: "time",
1626
1626
  message: r.message
1627
- }), t.dirty()) : r.kind === "duration" ? je.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1627
+ }), t.dirty()) : r.kind === "duration" ? Me.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1628
1628
  validation: "duration",
1629
1629
  code: f.invalid_string,
1630
1630
  message: r.message
1631
- }), t.dirty()) : r.kind === "ip" ? Ke(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1631
+ }), t.dirty()) : r.kind === "ip" ? qe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1632
1632
  validation: "ip",
1633
1633
  code: f.invalid_string,
1634
1634
  message: r.message
1635
- }), t.dirty()) : r.kind === "jwt" ? qe(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
1635
+ }), t.dirty()) : r.kind === "jwt" ? Je(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
1636
1636
  validation: "jwt",
1637
1637
  code: f.invalid_string,
1638
1638
  message: r.message
1639
- }), t.dirty()) : r.kind === "cidr" ? Je(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1639
+ }), t.dirty()) : r.kind === "cidr" ? Ye(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
1640
1640
  validation: "cidr",
1641
1641
  code: f.invalid_string,
1642
1642
  message: r.message
1643
- }), t.dirty()) : r.kind === "base64" ? ze.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1643
+ }), t.dirty()) : r.kind === "base64" ? Be.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1644
1644
  validation: "base64",
1645
1645
  code: f.invalid_string,
1646
1646
  message: r.message
1647
- }), t.dirty()) : r.kind === "base64url" ? Be.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1647
+ }), t.dirty()) : r.kind === "base64url" ? Ve.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
1648
1648
  validation: "base64url",
1649
1649
  code: f.invalid_string,
1650
1650
  message: r.message
@@ -1913,17 +1913,17 @@ var Ye = class e extends C {
1913
1913
  return e;
1914
1914
  }
1915
1915
  };
1916
- Ye.create = (e) => new Ye({
1916
+ Xe.create = (e) => new Xe({
1917
1917
  checks: [],
1918
1918
  typeName: F.ZodString,
1919
1919
  coerce: e?.coerce ?? !1,
1920
1920
  ...S(e)
1921
1921
  });
1922
- function Xe(e, t) {
1922
+ function Ze(e, t) {
1923
1923
  let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
1924
1924
  return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
1925
1925
  }
1926
- var Ze = class e extends C {
1926
+ var Qe = class e extends C {
1927
1927
  constructor() {
1928
1928
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1929
1929
  }
@@ -1956,7 +1956,7 @@ var Ze = class e extends C {
1956
1956
  inclusive: r.inclusive,
1957
1957
  exact: !1,
1958
1958
  message: r.message
1959
- }), n.dirty()) : r.kind === "multipleOf" ? Xe(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
1959
+ }), n.dirty()) : r.kind === "multipleOf" ? Ze(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
1960
1960
  code: f.not_multiple_of,
1961
1961
  multipleOf: r.value,
1962
1962
  message: r.message
@@ -2082,13 +2082,13 @@ var Ze = class e extends C {
2082
2082
  return Number.isFinite(t) && Number.isFinite(e);
2083
2083
  }
2084
2084
  };
2085
- Ze.create = (e) => new Ze({
2085
+ Qe.create = (e) => new Qe({
2086
2086
  checks: [],
2087
2087
  typeName: F.ZodNumber,
2088
2088
  coerce: e?.coerce || !1,
2089
2089
  ...S(e)
2090
2090
  });
2091
- var Qe = class e extends C {
2091
+ var $e = class e extends C {
2092
2092
  constructor() {
2093
2093
  super(...arguments), this.min = this.gte, this.max = this.lte;
2094
2094
  }
@@ -2209,13 +2209,13 @@ var Qe = class e extends C {
2209
2209
  return e;
2210
2210
  }
2211
2211
  };
2212
- Qe.create = (e) => new Qe({
2212
+ $e.create = (e) => new $e({
2213
2213
  checks: [],
2214
2214
  typeName: F.ZodBigInt,
2215
2215
  coerce: e?.coerce ?? !1,
2216
2216
  ...S(e)
2217
2217
  });
2218
- var $e = class extends C {
2218
+ var et = class extends C {
2219
2219
  _parse(e) {
2220
2220
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
2221
2221
  let t = this._getOrReturnCtx(e);
@@ -2228,12 +2228,12 @@ var $e = class extends C {
2228
2228
  return v(e.data);
2229
2229
  }
2230
2230
  };
2231
- $e.create = (e) => new $e({
2231
+ et.create = (e) => new et({
2232
2232
  typeName: F.ZodBoolean,
2233
2233
  coerce: e?.coerce || !1,
2234
2234
  ...S(e)
2235
2235
  });
2236
- var et = class e extends C {
2236
+ var tt = class e extends C {
2237
2237
  _parse(e) {
2238
2238
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
2239
2239
  let t = this._getOrReturnCtx(e);
@@ -2296,13 +2296,13 @@ var et = class e extends C {
2296
2296
  return e == null ? null : new Date(e);
2297
2297
  }
2298
2298
  };
2299
- et.create = (e) => new et({
2299
+ tt.create = (e) => new tt({
2300
2300
  checks: [],
2301
2301
  coerce: e?.coerce || !1,
2302
2302
  typeName: F.ZodDate,
2303
2303
  ...S(e)
2304
2304
  });
2305
- var tt = class extends C {
2305
+ var nt = class extends C {
2306
2306
  _parse(e) {
2307
2307
  if (this._getType(e) !== u.symbol) {
2308
2308
  let t = this._getOrReturnCtx(e);
@@ -2315,11 +2315,11 @@ var tt = class extends C {
2315
2315
  return v(e.data);
2316
2316
  }
2317
2317
  };
2318
- tt.create = (e) => new tt({
2318
+ nt.create = (e) => new nt({
2319
2319
  typeName: F.ZodSymbol,
2320
2320
  ...S(e)
2321
2321
  });
2322
- var nt = class extends C {
2322
+ var rt = class extends C {
2323
2323
  _parse(e) {
2324
2324
  if (this._getType(e) !== u.undefined) {
2325
2325
  let t = this._getOrReturnCtx(e);
@@ -2332,11 +2332,11 @@ var nt = class extends C {
2332
2332
  return v(e.data);
2333
2333
  }
2334
2334
  };
2335
- nt.create = (e) => new nt({
2335
+ rt.create = (e) => new rt({
2336
2336
  typeName: F.ZodUndefined,
2337
2337
  ...S(e)
2338
2338
  });
2339
- var rt = class extends C {
2339
+ var it = class extends C {
2340
2340
  _parse(e) {
2341
2341
  if (this._getType(e) !== u.null) {
2342
2342
  let t = this._getOrReturnCtx(e);
@@ -2349,11 +2349,11 @@ var rt = class extends C {
2349
2349
  return v(e.data);
2350
2350
  }
2351
2351
  };
2352
- rt.create = (e) => new rt({
2352
+ it.create = (e) => new it({
2353
2353
  typeName: F.ZodNull,
2354
2354
  ...S(e)
2355
2355
  });
2356
- var it = class extends C {
2356
+ var at = class extends C {
2357
2357
  constructor() {
2358
2358
  super(...arguments), this._any = !0;
2359
2359
  }
@@ -2361,7 +2361,7 @@ var it = class extends C {
2361
2361
  return v(e.data);
2362
2362
  }
2363
2363
  };
2364
- it.create = (e) => new it({
2364
+ at.create = (e) => new at({
2365
2365
  typeName: F.ZodAny,
2366
2366
  ...S(e)
2367
2367
  });
@@ -2391,7 +2391,7 @@ T.create = (e) => new T({
2391
2391
  typeName: F.ZodNever,
2392
2392
  ...S(e)
2393
2393
  });
2394
- var at = class extends C {
2394
+ var ot = class extends C {
2395
2395
  _parse(e) {
2396
2396
  if (this._getType(e) !== u.undefined) {
2397
2397
  let t = this._getOrReturnCtx(e);
@@ -2404,7 +2404,7 @@ var at = class extends C {
2404
2404
  return v(e.data);
2405
2405
  }
2406
2406
  };
2407
- at.create = (e) => new at({
2407
+ ot.create = (e) => new ot({
2408
2408
  typeName: F.ZodVoid,
2409
2409
  ...S(e)
2410
2410
  });
@@ -2682,7 +2682,7 @@ var O = class e extends C {
2682
2682
  });
2683
2683
  }
2684
2684
  keyof() {
2685
- return gt(l.objectKeys(this.shape));
2685
+ return _t(l.objectKeys(this.shape));
2686
2686
  }
2687
2687
  };
2688
2688
  O.create = (e, t) => new O({
@@ -2704,7 +2704,7 @@ O.create = (e, t) => new O({
2704
2704
  typeName: F.ZodObject,
2705
2705
  ...S(t)
2706
2706
  });
2707
- var ot = class extends C {
2707
+ var st = class extends C {
2708
2708
  _parse(e) {
2709
2709
  let { ctx: t } = this._processInputParams(e), n = this._def.options;
2710
2710
  function r(e) {
@@ -2767,12 +2767,12 @@ var ot = class extends C {
2767
2767
  return this._def.options;
2768
2768
  }
2769
2769
  };
2770
- ot.create = (e, t) => new ot({
2770
+ st.create = (e, t) => new st({
2771
2771
  options: e,
2772
2772
  typeName: F.ZodUnion,
2773
2773
  ...S(t)
2774
2774
  });
2775
- var k = (e) => e instanceof mt ? k(e.schema) : e instanceof M ? k(e.innerType()) : e instanceof ht ? [e.value] : e instanceof _t ? e.options : e instanceof vt ? l.objectValues(e.enum) : e instanceof yt ? k(e._def.innerType) : e instanceof nt ? [void 0] : e instanceof rt ? [null] : e instanceof N ? [void 0, ...k(e.unwrap())] : e instanceof P ? [null, ...k(e.unwrap())] : e instanceof St || e instanceof wt ? k(e.unwrap()) : e instanceof bt ? k(e._def.innerType) : [], st = class e extends C {
2775
+ var k = (e) => e instanceof ht ? k(e.schema) : e instanceof M ? k(e.innerType()) : e instanceof gt ? [e.value] : e instanceof vt ? e.options : e instanceof yt ? l.objectValues(e.enum) : e instanceof bt ? k(e._def.innerType) : e instanceof rt ? [void 0] : e instanceof it ? [null] : e instanceof N ? [void 0, ...k(e.unwrap())] : e instanceof P ? [null, ...k(e.unwrap())] : e instanceof Ct || e instanceof Tt ? k(e.unwrap()) : e instanceof xt ? k(e._def.innerType) : [], ct = class e extends C {
2776
2776
  _parse(e) {
2777
2777
  let { ctx: t } = this._processInputParams(e);
2778
2778
  if (t.parsedType !== u.object) return h(t, {
@@ -2823,7 +2823,7 @@ var k = (e) => e instanceof mt ? k(e.schema) : e instanceof M ? k(e.innerType())
2823
2823
  });
2824
2824
  }
2825
2825
  };
2826
- function ct(e, t) {
2826
+ function lt(e, t) {
2827
2827
  let n = d(e), r = d(t);
2828
2828
  if (e === t) return {
2829
2829
  valid: !0,
@@ -2835,7 +2835,7 @@ function ct(e, t) {
2835
2835
  ...t
2836
2836
  };
2837
2837
  for (let n of r) {
2838
- let r = ct(e[n], t[n]);
2838
+ let r = lt(e[n], t[n]);
2839
2839
  if (!r.valid) return { valid: !1 };
2840
2840
  i[n] = r.data;
2841
2841
  }
@@ -2848,7 +2848,7 @@ function ct(e, t) {
2848
2848
  if (e.length !== t.length) return { valid: !1 };
2849
2849
  let n = [];
2850
2850
  for (let r = 0; r < e.length; r++) {
2851
- let i = e[r], a = t[r], o = ct(i, a);
2851
+ let i = e[r], a = t[r], o = lt(i, a);
2852
2852
  if (!o.valid) return { valid: !1 };
2853
2853
  n.push(o.data);
2854
2854
  }
@@ -2862,12 +2862,12 @@ function ct(e, t) {
2862
2862
  data: e
2863
2863
  } : { valid: !1 };
2864
2864
  }
2865
- var lt = class extends C {
2865
+ var ut = class extends C {
2866
2866
  _parse(e) {
2867
2867
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
2868
- if (xe(e) || xe(r)) return _;
2869
- let i = ct(e.value, r.value);
2870
- return i.valid ? ((Se(e) || Se(r)) && t.dirty(), {
2868
+ if (Se(e) || Se(r)) return _;
2869
+ let i = lt(e.value, r.value);
2870
+ return i.valid ? ((Ce(e) || Ce(r)) && t.dirty(), {
2871
2871
  status: t.value,
2872
2872
  value: i.data
2873
2873
  }) : (h(n, { code: f.invalid_intersection_types }), _);
@@ -2891,7 +2891,7 @@ var lt = class extends C {
2891
2891
  }));
2892
2892
  }
2893
2893
  };
2894
- lt.create = (e, t, n) => new lt({
2894
+ ut.create = (e, t, n) => new ut({
2895
2895
  left: e,
2896
2896
  right: t,
2897
2897
  typeName: F.ZodIntersection,
@@ -2944,7 +2944,7 @@ A.create = (e, t) => {
2944
2944
  ...S(t)
2945
2945
  });
2946
2946
  };
2947
- var ut = class e extends C {
2947
+ var dt = class e extends C {
2948
2948
  get keySchema() {
2949
2949
  return this._def.keyType;
2950
2950
  }
@@ -2976,13 +2976,13 @@ var ut = class e extends C {
2976
2976
  typeName: F.ZodRecord,
2977
2977
  ...S(r)
2978
2978
  }) : new e({
2979
- keyType: Ye.create(),
2979
+ keyType: Xe.create(),
2980
2980
  valueType: t,
2981
2981
  typeName: F.ZodRecord,
2982
2982
  ...S(n)
2983
2983
  });
2984
2984
  }
2985
- }, dt = class extends C {
2985
+ }, ft = class extends C {
2986
2986
  get keySchema() {
2987
2987
  return this._def.keyType;
2988
2988
  }
@@ -3028,13 +3028,13 @@ var ut = class e extends C {
3028
3028
  }
3029
3029
  }
3030
3030
  };
3031
- dt.create = (e, t, n) => new dt({
3031
+ ft.create = (e, t, n) => new ft({
3032
3032
  valueType: t,
3033
3033
  keyType: e,
3034
3034
  typeName: F.ZodMap,
3035
3035
  ...S(n)
3036
3036
  });
3037
- var ft = class e extends C {
3037
+ var pt = class e extends C {
3038
3038
  _parse(e) {
3039
3039
  let { status: t, ctx: n } = this._processInputParams(e);
3040
3040
  if (n.parsedType !== u.set) return h(n, {
@@ -3098,14 +3098,14 @@ var ft = class e extends C {
3098
3098
  return this.min(1, e);
3099
3099
  }
3100
3100
  };
3101
- ft.create = (e, t) => new ft({
3101
+ pt.create = (e, t) => new pt({
3102
3102
  valueType: e,
3103
3103
  minSize: null,
3104
3104
  maxSize: null,
3105
3105
  typeName: F.ZodSet,
3106
3106
  ...S(t)
3107
3107
  });
3108
- var pt = class e extends C {
3108
+ var mt = class e extends C {
3109
3109
  constructor() {
3110
3110
  super(...arguments), this.validate = this.implement;
3111
3111
  }
@@ -3117,13 +3117,13 @@ var pt = class e extends C {
3117
3117
  received: t.parsedType
3118
3118
  }), _;
3119
3119
  function n(e, n) {
3120
- return ye({
3120
+ return be({
3121
3121
  data: e,
3122
3122
  path: t.path,
3123
3123
  errorMaps: [
3124
3124
  t.common.contextualErrorMap,
3125
3125
  t.schemaErrorMap,
3126
- ve(),
3126
+ ye(),
3127
3127
  m
3128
3128
  ].filter((e) => !!e),
3129
3129
  issueData: {
@@ -3133,13 +3133,13 @@ var pt = class e extends C {
3133
3133
  });
3134
3134
  }
3135
3135
  function r(e, n) {
3136
- return ye({
3136
+ return be({
3137
3137
  data: e,
3138
3138
  path: t.path,
3139
3139
  errorMaps: [
3140
3140
  t.common.contextualErrorMap,
3141
3141
  t.schemaErrorMap,
3142
- ve(),
3142
+ ye(),
3143
3143
  m
3144
3144
  ].filter((e) => !!e),
3145
3145
  issueData: {
@@ -3203,7 +3203,7 @@ var pt = class e extends C {
3203
3203
  ...S(r)
3204
3204
  });
3205
3205
  }
3206
- }, mt = class extends C {
3206
+ }, ht = class extends C {
3207
3207
  get schema() {
3208
3208
  return this._def.getter();
3209
3209
  }
@@ -3216,12 +3216,12 @@ var pt = class e extends C {
3216
3216
  });
3217
3217
  }
3218
3218
  };
3219
- mt.create = (e, t) => new mt({
3219
+ ht.create = (e, t) => new ht({
3220
3220
  getter: e,
3221
3221
  typeName: F.ZodLazy,
3222
3222
  ...S(t)
3223
3223
  });
3224
- var ht = class extends C {
3224
+ var gt = class extends C {
3225
3225
  _parse(e) {
3226
3226
  if (e.data !== this._def.value) {
3227
3227
  let t = this._getOrReturnCtx(e);
@@ -3240,19 +3240,19 @@ var ht = class extends C {
3240
3240
  return this._def.value;
3241
3241
  }
3242
3242
  };
3243
- ht.create = (e, t) => new ht({
3243
+ gt.create = (e, t) => new gt({
3244
3244
  value: e,
3245
3245
  typeName: F.ZodLiteral,
3246
3246
  ...S(t)
3247
3247
  });
3248
- function gt(e, t) {
3249
- return new _t({
3248
+ function _t(e, t) {
3249
+ return new vt({
3250
3250
  values: e,
3251
3251
  typeName: F.ZodEnum,
3252
3252
  ...S(t)
3253
3253
  });
3254
3254
  }
3255
- var _t = class e extends C {
3255
+ var vt = class e extends C {
3256
3256
  _parse(e) {
3257
3257
  if (typeof e.data != "string") {
3258
3258
  let t = this._getOrReturnCtx(e), n = this._def.values;
@@ -3303,8 +3303,8 @@ var _t = class e extends C {
3303
3303
  });
3304
3304
  }
3305
3305
  };
3306
- _t.create = gt;
3307
- var vt = class extends C {
3306
+ vt.create = _t;
3307
+ var yt = class extends C {
3308
3308
  _parse(e) {
3309
3309
  let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
3310
3310
  if (n.parsedType !== u.string && n.parsedType !== u.number) {
@@ -3329,7 +3329,7 @@ var vt = class extends C {
3329
3329
  return this._def.values;
3330
3330
  }
3331
3331
  };
3332
- vt.create = (e, t) => new vt({
3332
+ yt.create = (e, t) => new yt({
3333
3333
  values: e,
3334
3334
  typeName: F.ZodNativeEnum,
3335
3335
  ...S(t)
@@ -3380,7 +3380,7 @@ var M = class extends C {
3380
3380
  path: n.path,
3381
3381
  parent: n
3382
3382
  });
3383
- return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? be(r.value) : r;
3383
+ return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? xe(r.value) : r;
3384
3384
  });
3385
3385
  {
3386
3386
  if (t.value === "aborted") return _;
@@ -3389,7 +3389,7 @@ var M = class extends C {
3389
3389
  path: n.path,
3390
3390
  parent: n
3391
3391
  });
3392
- return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? be(r.value) : r;
3392
+ return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? xe(r.value) : r;
3393
3393
  }
3394
3394
  }
3395
3395
  if (r.type === "refinement") {
@@ -3486,7 +3486,7 @@ P.create = (e, t) => new P({
3486
3486
  typeName: F.ZodNullable,
3487
3487
  ...S(t)
3488
3488
  });
3489
- var yt = class extends C {
3489
+ var bt = class extends C {
3490
3490
  _parse(e) {
3491
3491
  let { ctx: t } = this._processInputParams(e), n = t.data;
3492
3492
  return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
@@ -3499,13 +3499,13 @@ var yt = class extends C {
3499
3499
  return this._def.innerType;
3500
3500
  }
3501
3501
  };
3502
- yt.create = (e, t) => new yt({
3502
+ bt.create = (e, t) => new bt({
3503
3503
  innerType: e,
3504
3504
  typeName: F.ZodDefault,
3505
3505
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
3506
3506
  ...S(t)
3507
3507
  });
3508
- var bt = class extends C {
3508
+ var xt = class extends C {
3509
3509
  _parse(e) {
3510
3510
  let { ctx: t } = this._processInputParams(e), n = {
3511
3511
  ...t,
@@ -3518,7 +3518,7 @@ var bt = class extends C {
3518
3518
  path: n.path,
3519
3519
  parent: { ...n }
3520
3520
  });
3521
- return Ce(r) ? r.then((e) => ({
3521
+ return we(r) ? r.then((e) => ({
3522
3522
  status: "valid",
3523
3523
  value: e.status === "valid" ? e.value : this._def.catchValue({
3524
3524
  get error() {
@@ -3540,13 +3540,13 @@ var bt = class extends C {
3540
3540
  return this._def.innerType;
3541
3541
  }
3542
3542
  };
3543
- bt.create = (e, t) => new bt({
3543
+ xt.create = (e, t) => new xt({
3544
3544
  innerType: e,
3545
3545
  typeName: F.ZodCatch,
3546
3546
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
3547
3547
  ...S(t)
3548
3548
  });
3549
- var xt = class extends C {
3549
+ var St = class extends C {
3550
3550
  _parse(e) {
3551
3551
  if (this._getType(e) !== u.nan) {
3552
3552
  let t = this._getOrReturnCtx(e);
@@ -3562,11 +3562,11 @@ var xt = class extends C {
3562
3562
  };
3563
3563
  }
3564
3564
  };
3565
- xt.create = (e) => new xt({
3565
+ St.create = (e) => new St({
3566
3566
  typeName: F.ZodNaN,
3567
3567
  ...S(e)
3568
3568
  });
3569
- var St = class extends C {
3569
+ var Ct = class extends C {
3570
3570
  _parse(e) {
3571
3571
  let { ctx: t } = this._processInputParams(e), n = t.data;
3572
3572
  return this._def.type._parse({
@@ -3578,7 +3578,7 @@ var St = class extends C {
3578
3578
  unwrap() {
3579
3579
  return this._def.type;
3580
3580
  }
3581
- }, Ct = class e extends C {
3581
+ }, wt = class e extends C {
3582
3582
  _parse(e) {
3583
3583
  let { status: t, ctx: n } = this._processInputParams(e);
3584
3584
  if (n.common.async) return (async () => {
@@ -3587,7 +3587,7 @@ var St = class extends C {
3587
3587
  path: n.path,
3588
3588
  parent: n
3589
3589
  });
3590
- return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), be(e.value)) : this._def.out._parseAsync({
3590
+ return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), xe(e.value)) : this._def.out._parseAsync({
3591
3591
  data: e.value,
3592
3592
  path: n.path,
3593
3593
  parent: n
@@ -3616,16 +3616,16 @@ var St = class extends C {
3616
3616
  typeName: F.ZodPipeline
3617
3617
  });
3618
3618
  }
3619
- }, wt = class extends C {
3619
+ }, Tt = class extends C {
3620
3620
  _parse(e) {
3621
3621
  let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
3622
- return Ce(t) ? t.then((e) => n(e)) : n(t);
3622
+ return we(t) ? t.then((e) => n(e)) : n(t);
3623
3623
  }
3624
3624
  unwrap() {
3625
3625
  return this._def.innerType;
3626
3626
  }
3627
3627
  };
3628
- wt.create = (e, t) => new wt({
3628
+ Tt.create = (e, t) => new Tt({
3629
3629
  innerType: e,
3630
3630
  typeName: F.ZodReadonly,
3631
3631
  ...S(t)
@@ -3634,21 +3634,21 @@ var F;
3634
3634
  (function(e) {
3635
3635
  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
3636
  })(F ||= {});
3637
- var I = Ye.create, L = Ze.create;
3638
- xt.create, Qe.create;
3639
- var R = $e.create;
3640
- et.create, tt.create, nt.create, rt.create, it.create;
3641
- var Tt = w.create;
3642
- T.create, at.create;
3637
+ var I = Xe.create, L = Qe.create;
3638
+ St.create, $e.create;
3639
+ var R = et.create;
3640
+ tt.create, nt.create, rt.create, it.create, at.create;
3641
+ var Et = w.create;
3642
+ T.create, ot.create;
3643
3643
  var z = E.create, B = O.create;
3644
- O.strictCreate, ot.create, st.create, lt.create, A.create;
3645
- var V = ut.create;
3646
- dt.create, ft.create, pt.create, mt.create, ht.create;
3647
- var H = _t.create;
3648
- vt.create, j.create, M.create, N.create, P.create, M.createWithPreprocess, Ct.create;
3644
+ O.strictCreate, st.create, ct.create, ut.create, A.create;
3645
+ var V = dt.create;
3646
+ ft.create, pt.create, mt.create, ht.create, gt.create;
3647
+ var H = vt.create;
3648
+ yt.create, j.create, M.create, N.create, P.create, M.createWithPreprocess, wt.create;
3649
3649
  //#endregion
3650
3650
  //#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 Et = Symbol("Let zodToJsonSchema decide on which parser to use"), Dt = {
3651
+ var Dt = Symbol("Let zodToJsonSchema decide on which parser to use"), Ot = {
3652
3652
  name: void 0,
3653
3653
  $refStrategy: "root",
3654
3654
  basePath: ["#"],
@@ -3671,14 +3671,14 @@ var Et = Symbol("Let zodToJsonSchema decide on which parser to use"), Dt = {
3671
3671
  base64Strategy: "contentEncoding:base64",
3672
3672
  nameStrategy: "ref",
3673
3673
  openAiAnyTypeName: "OpenAiAnyType"
3674
- }, Ot = (e) => typeof e == "string" ? {
3675
- ...Dt,
3674
+ }, kt = (e) => typeof e == "string" ? {
3675
+ ...Ot,
3676
3676
  name: e
3677
3677
  } : {
3678
- ...Dt,
3678
+ ...Ot,
3679
3679
  ...e
3680
- }, kt = (e) => {
3681
- let t = Ot(e), n = t.name === void 0 ? t.basePath : [
3680
+ }, At = (e) => {
3681
+ let t = kt(e), n = t.name === void 0 ? t.basePath : [
3682
3682
  ...t.basePath,
3683
3683
  t.definitionPath,
3684
3684
  t.name
@@ -3701,18 +3701,18 @@ var Et = Symbol("Let zodToJsonSchema decide on which parser to use"), Dt = {
3701
3701
  };
3702
3702
  //#endregion
3703
3703
  //#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 At(e, t, n, r) {
3704
+ function jt(e, t, n, r) {
3705
3705
  r?.errorMessages && n && (e.errorMessage = {
3706
3706
  ...e.errorMessage,
3707
3707
  [t]: n
3708
3708
  });
3709
3709
  }
3710
3710
  function U(e, t, n, r, i) {
3711
- e[t] = n, At(e, t, r, i);
3711
+ e[t] = n, jt(e, t, r, i);
3712
3712
  }
3713
3713
  //#endregion
3714
3714
  //#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 jt = (e, t) => {
3715
+ var Mt = (e, t) => {
3716
3716
  let n = 0;
3717
3717
  for (; n < e.length && n < t.length && e[n] === t[n]; n++);
3718
3718
  return [(e.length - n).toString(), ...t.slice(n)].join("/");
@@ -3726,11 +3726,11 @@ function W(e) {
3726
3726
  e.definitionPath,
3727
3727
  e.openAiAnyTypeName
3728
3728
  ];
3729
- return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? jt(t, e.currentPath) : t.join("/") };
3729
+ return e.flags.hasReferencedOpenAiAnyType = !0, { $ref: e.$refStrategy === "relative" ? Mt(t, e.currentPath) : t.join("/") };
3730
3730
  }
3731
3731
  //#endregion
3732
3732
  //#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 Mt(e, t) {
3733
+ function Nt(e, t) {
3734
3734
  let n = { type: "array" };
3735
3735
  return e.type?._def && e.type?._def?.typeName !== F.ZodAny && (n.items = J(e.type._def, {
3736
3736
  ...t,
@@ -3739,7 +3739,7 @@ function Mt(e, t) {
3739
3739
  }
3740
3740
  //#endregion
3741
3741
  //#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 Nt(e, t) {
3742
+ function Pt(e, t) {
3743
3743
  let n = {
3744
3744
  type: "integer",
3745
3745
  format: "int64"
@@ -3758,22 +3758,22 @@ function Nt(e, t) {
3758
3758
  }
3759
3759
  //#endregion
3760
3760
  //#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 Pt() {
3761
+ function Ft() {
3762
3762
  return { type: "boolean" };
3763
3763
  }
3764
3764
  //#endregion
3765
3765
  //#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 Ft(e, t) {
3766
+ function It(e, t) {
3767
3767
  return J(e.type._def, t);
3768
3768
  }
3769
3769
  //#endregion
3770
3770
  //#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 It = (e, t) => J(e.innerType._def, t);
3771
+ var Lt = (e, t) => J(e.innerType._def, t);
3772
3772
  //#endregion
3773
3773
  //#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 Lt(e, t, n) {
3774
+ function Rt(e, t, n) {
3775
3775
  let r = n ?? t.dateStrategy;
3776
- if (Array.isArray(r)) return { anyOf: r.map((n, r) => Lt(e, t, n)) };
3776
+ if (Array.isArray(r)) return { anyOf: r.map((n, r) => Rt(e, t, n)) };
3777
3777
  switch (r) {
3778
3778
  case "string":
3779
3779
  case "format:date-time": return {
@@ -3784,10 +3784,10 @@ function Lt(e, t, n) {
3784
3784
  type: "string",
3785
3785
  format: "date"
3786
3786
  };
3787
- case "integer": return Rt(e, t);
3787
+ case "integer": return zt(e, t);
3788
3788
  }
3789
3789
  }
3790
- var Rt = (e, t) => {
3790
+ var zt = (e, t) => {
3791
3791
  let n = {
3792
3792
  type: "integer",
3793
3793
  format: "unix-time"
@@ -3803,7 +3803,7 @@ var Rt = (e, t) => {
3803
3803
  };
3804
3804
  //#endregion
3805
3805
  //#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 zt(e, t) {
3806
+ function Bt(e, t) {
3807
3807
  return {
3808
3808
  ...J(e.innerType._def, t),
3809
3809
  default: e.defaultValue()
@@ -3811,12 +3811,12 @@ function zt(e, t) {
3811
3811
  }
3812
3812
  //#endregion
3813
3813
  //#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 Bt(e, t) {
3814
+ function Vt(e, t) {
3815
3815
  return t.effectStrategy === "input" ? J(e.schema._def, t) : W(t);
3816
3816
  }
3817
3817
  //#endregion
3818
3818
  //#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 Vt(e) {
3819
+ function Ht(e) {
3820
3820
  return {
3821
3821
  type: "string",
3822
3822
  enum: Array.from(e.values)
@@ -3824,8 +3824,8 @@ function Vt(e) {
3824
3824
  }
3825
3825
  //#endregion
3826
3826
  //#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 Ht = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3828
- function Ut(e, t) {
3827
+ var Ut = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3828
+ function Wt(e, t) {
3829
3829
  let n = [J(e.left._def, {
3830
3830
  ...t,
3831
3831
  currentPath: [
@@ -3842,7 +3842,7 @@ function Ut(e, t) {
3842
3842
  ]
3843
3843
  })].filter((e) => !!e), r = t.target === "jsonSchema2019-09" ? { unevaluatedProperties: !1 } : void 0, i = [];
3844
3844
  return n.forEach((e) => {
3845
- if (Ht(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
3845
+ if (Ut(e)) i.push(...e.allOf), e.unevaluatedProperties === void 0 && (r = void 0);
3846
3846
  else {
3847
3847
  let t = e;
3848
3848
  if ("additionalProperties" in e && e.additionalProperties === !1) {
@@ -3858,7 +3858,7 @@ function Ut(e, t) {
3858
3858
  }
3859
3859
  //#endregion
3860
3860
  //#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 Wt(e, t) {
3861
+ function Gt(e, t) {
3862
3862
  let n = typeof e.value;
3863
3863
  return n !== "bigint" && n !== "number" && n !== "boolean" && n !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : t.target === "openApi3" ? {
3864
3864
  type: n === "bigint" ? "integer" : n,
@@ -3870,12 +3870,12 @@ function Wt(e, t) {
3870
3870
  }
3871
3871
  //#endregion
3872
3872
  //#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 Gt = void 0, G = {
3873
+ var Kt = void 0, G = {
3874
3874
  cuid: /^[cC][^\s-]{8,}$/,
3875
3875
  cuid2: /^[0-9a-z]+$/,
3876
3876
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
3877
3877
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
3878
- emoji: () => (Gt === void 0 && (Gt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Gt),
3878
+ emoji: () => (Kt === void 0 && (Kt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Kt),
3879
3879
  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
3880
  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
3881
  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 +3886,7 @@ var Gt = void 0, G = {
3886
3886
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
3887
3887
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
3888
3888
  };
3889
- function Kt(e, t) {
3889
+ function qt(e, t) {
3890
3890
  let n = { type: "string" };
3891
3891
  if (e.checks) for (let r of e.checks) switch (r.kind) {
3892
3892
  case "min":
@@ -3922,10 +3922,10 @@ function Kt(e, t) {
3922
3922
  q(n, G.cuid2, r.message, t);
3923
3923
  break;
3924
3924
  case "startsWith":
3925
- q(n, RegExp(`^${qt(r.value, t)}`), r.message, t);
3925
+ q(n, RegExp(`^${Jt(r.value, t)}`), r.message, t);
3926
3926
  break;
3927
3927
  case "endsWith":
3928
- q(n, RegExp(`${qt(r.value, t)}$`), r.message, t);
3928
+ q(n, RegExp(`${Jt(r.value, t)}$`), r.message, t);
3929
3929
  break;
3930
3930
  case "datetime":
3931
3931
  K(n, "date-time", r.message, t);
@@ -3943,7 +3943,7 @@ function Kt(e, t) {
3943
3943
  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
3944
  break;
3945
3945
  case "includes":
3946
- q(n, RegExp(qt(r.value, t)), r.message, t);
3946
+ q(n, RegExp(Jt(r.value, t)), r.message, t);
3947
3947
  break;
3948
3948
  case "ip":
3949
3949
  r.version !== "v6" && K(n, "ipv4", r.message, t), r.version !== "v4" && K(n, "ipv6", r.message, t);
@@ -3978,13 +3978,13 @@ function Kt(e, t) {
3978
3978
  }
3979
3979
  return n;
3980
3980
  }
3981
- function qt(e, t) {
3982
- return t.patternStrategy === "escape" ? Yt(e) : e;
3981
+ function Jt(e, t) {
3982
+ return t.patternStrategy === "escape" ? Xt(e) : e;
3983
3983
  }
3984
- var Jt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3985
- function Yt(e) {
3984
+ var Yt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3985
+ function Xt(e) {
3986
3986
  let t = "";
3987
- for (let n = 0; n < e.length; n++) Jt.has(e[n]) || (t += "\\"), t += e[n];
3987
+ for (let n = 0; n < e.length; n++) Yt.has(e[n]) || (t += "\\"), t += e[n];
3988
3988
  return t;
3989
3989
  }
3990
3990
  function K(e, t, n, r) {
@@ -4001,11 +4001,11 @@ function q(e, t, n, r) {
4001
4001
  pattern: e.pattern,
4002
4002
  ...e.errorMessage && r.errorMessages && { errorMessage: { pattern: e.errorMessage.pattern } }
4003
4003
  }), delete e.pattern, e.errorMessage && (delete e.errorMessage.pattern, Object.keys(e.errorMessage).length === 0 && delete e.errorMessage)), e.allOf.push({
4004
- pattern: Xt(t, r),
4004
+ pattern: Zt(t, r),
4005
4005
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
4006
- })) : U(e, "pattern", Xt(t, r), n, r);
4006
+ })) : U(e, "pattern", Zt(t, r), n, r);
4007
4007
  }
4008
- function Xt(e, t) {
4008
+ function Zt(e, t) {
4009
4009
  if (!t.applyRegexFlags || !e.flags) return e.source;
4010
4010
  let n = {
4011
4011
  i: e.flags.includes("i"),
@@ -4046,7 +4046,7 @@ function Xt(e, t) {
4046
4046
  }
4047
4047
  //#endregion
4048
4048
  //#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 Zt(e, t) {
4049
+ function Qt(e, t) {
4050
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 === F.ZodEnum) return {
4051
4051
  type: "object",
4052
4052
  required: e.keyType._def.values,
@@ -4072,7 +4072,7 @@ function Zt(e, t) {
4072
4072
  };
4073
4073
  if (t.target === "openApi3") return n;
4074
4074
  if (e.keyType?._def.typeName === F.ZodString && e.keyType._def.checks?.length) {
4075
- let { type: r, ...i } = Kt(e.keyType._def, t);
4075
+ let { type: r, ...i } = qt(e.keyType._def, t);
4076
4076
  return {
4077
4077
  ...n,
4078
4078
  propertyNames: i
@@ -4083,7 +4083,7 @@ function Zt(e, t) {
4083
4083
  propertyNames: { enum: e.keyType._def.values }
4084
4084
  };
4085
4085
  if (e.keyType?._def.typeName === F.ZodBranded && e.keyType._def.type._def.typeName === F.ZodString && e.keyType._def.type._def.checks?.length) {
4086
- let { type: r, ...i } = Ft(e.keyType._def, t);
4086
+ let { type: r, ...i } = It(e.keyType._def, t);
4087
4087
  return {
4088
4088
  ...n,
4089
4089
  propertyNames: i
@@ -4093,8 +4093,8 @@ function Zt(e, t) {
4093
4093
  }
4094
4094
  //#endregion
4095
4095
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
4096
- function Qt(e, t) {
4097
- return t.mapStrategy === "record" ? Zt(e, t) : {
4096
+ function $t(e, t) {
4097
+ return t.mapStrategy === "record" ? Qt(e, t) : {
4098
4098
  type: "array",
4099
4099
  maxItems: 125,
4100
4100
  items: {
@@ -4123,7 +4123,7 @@ function Qt(e, t) {
4123
4123
  }
4124
4124
  //#endregion
4125
4125
  //#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 $t(e) {
4126
+ function en(e) {
4127
4127
  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
4128
  return {
4129
4129
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
@@ -4132,7 +4132,7 @@ function $t(e) {
4132
4132
  }
4133
4133
  //#endregion
4134
4134
  //#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 en(e) {
4135
+ function tn(e) {
4136
4136
  return e.target === "openAi" ? void 0 : { not: W({
4137
4137
  ...e,
4138
4138
  currentPath: [...e.currentPath, "not"]
@@ -4140,7 +4140,7 @@ function en(e) {
4140
4140
  }
4141
4141
  //#endregion
4142
4142
  //#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 tn(e) {
4143
+ function nn(e) {
4144
4144
  return e.target === "openApi3" ? {
4145
4145
  enum: ["null"],
4146
4146
  nullable: !0
@@ -4148,19 +4148,19 @@ function tn(e) {
4148
4148
  }
4149
4149
  //#endregion
4150
4150
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
4151
- var nn = {
4151
+ var rn = {
4152
4152
  ZodString: "string",
4153
4153
  ZodNumber: "number",
4154
4154
  ZodBigInt: "integer",
4155
4155
  ZodBoolean: "boolean",
4156
4156
  ZodNull: "null"
4157
4157
  };
4158
- function rn(e, t) {
4159
- if (t.target === "openApi3") return an(e, t);
4158
+ function an(e, t) {
4159
+ if (t.target === "openApi3") return on(e, t);
4160
4160
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
4161
- if (n.every((e) => e._def.typeName in nn && (!e._def.checks || !e._def.checks.length))) {
4161
+ if (n.every((e) => e._def.typeName in rn && (!e._def.checks || !e._def.checks.length))) {
4162
4162
  let e = n.reduce((e, t) => {
4163
- let n = nn[t._def.typeName];
4163
+ let n = rn[t._def.typeName];
4164
4164
  return n && !e.includes(n) ? [...e, n] : e;
4165
4165
  }, []);
4166
4166
  return { type: e.length > 1 ? e : e[0] };
@@ -4188,9 +4188,9 @@ function rn(e, t) {
4188
4188
  type: "string",
4189
4189
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
4190
4190
  };
4191
- return an(e, t);
4191
+ return on(e, t);
4192
4192
  }
4193
- var an = (e, t) => {
4193
+ var on = (e, t) => {
4194
4194
  let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => J(e._def, {
4195
4195
  ...t,
4196
4196
  currentPath: [
@@ -4203,7 +4203,7 @@ var an = (e, t) => {
4203
4203
  };
4204
4204
  //#endregion
4205
4205
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
4206
- function on(e, t) {
4206
+ function sn(e, t) {
4207
4207
  if ([
4208
4208
  "ZodString",
4209
4209
  "ZodNumber",
@@ -4211,9 +4211,9 @@ function on(e, t) {
4211
4211
  "ZodBoolean",
4212
4212
  "ZodNull"
4213
4213
  ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return t.target === "openApi3" ? {
4214
- type: nn[e.innerType._def.typeName],
4214
+ type: rn[e.innerType._def.typeName],
4215
4215
  nullable: !0
4216
- } : { type: [nn[e.innerType._def.typeName], "null"] };
4216
+ } : { type: [rn[e.innerType._def.typeName], "null"] };
4217
4217
  if (t.target === "openApi3") {
4218
4218
  let n = J(e.innerType._def, {
4219
4219
  ...t,
@@ -4239,12 +4239,12 @@ function on(e, t) {
4239
4239
  }
4240
4240
  //#endregion
4241
4241
  //#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 sn(e, t) {
4242
+ function cn(e, t) {
4243
4243
  let n = { type: "number" };
4244
4244
  if (!e.checks) return n;
4245
4245
  for (let r of e.checks) switch (r.kind) {
4246
4246
  case "int":
4247
- n.type = "integer", At(n, "type", r.message, t);
4247
+ n.type = "integer", jt(n, "type", r.message, t);
4248
4248
  break;
4249
4249
  case "min":
4250
4250
  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 +4258,7 @@ function sn(e, t) {
4258
4258
  }
4259
4259
  //#endregion
4260
4260
  //#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 cn(e, t) {
4261
+ function ln(e, t) {
4262
4262
  let n = t.target === "openAi", r = {
4263
4263
  type: "object",
4264
4264
  properties: {}
@@ -4266,7 +4266,7 @@ function cn(e, t) {
4266
4266
  for (let e in a) {
4267
4267
  let o = a[e];
4268
4268
  if (o === void 0 || o._def === void 0) continue;
4269
- let s = un(o);
4269
+ let s = dn(o);
4270
4270
  s && n && (o._def.typeName === "ZodOptional" && (o = o._def.innerType), o.isNullable() || (o = o.nullable()), s = !1);
4271
4271
  let c = J(o._def, {
4272
4272
  ...t,
@@ -4284,10 +4284,10 @@ function cn(e, t) {
4284
4284
  c !== void 0 && (r.properties[e] = c, s || i.push(e));
4285
4285
  }
4286
4286
  i.length && (r.required = i);
4287
- let o = ln(e, t);
4287
+ let o = un(e, t);
4288
4288
  return o !== void 0 && (r.additionalProperties = o), r;
4289
4289
  }
4290
- function ln(e, t) {
4290
+ function un(e, t) {
4291
4291
  if (e.catchall._def.typeName !== "ZodNever") return J(e.catchall._def, {
4292
4292
  ...t,
4293
4293
  currentPath: [...t.currentPath, "additionalProperties"]
@@ -4298,7 +4298,7 @@ function ln(e, t) {
4298
4298
  case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
4299
4299
  }
4300
4300
  }
4301
- function un(e) {
4301
+ function dn(e) {
4302
4302
  try {
4303
4303
  return e.isOptional();
4304
4304
  } catch {
@@ -4307,7 +4307,7 @@ function un(e) {
4307
4307
  }
4308
4308
  //#endregion
4309
4309
  //#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 dn = (e, t) => {
4310
+ var fn = (e, t) => {
4311
4311
  if (t.currentPath.toString() === t.propertyPath?.toString()) return J(e.innerType._def, t);
4312
4312
  let n = J(e.innerType._def, {
4313
4313
  ...t,
@@ -4318,7 +4318,7 @@ var dn = (e, t) => {
4318
4318
  ]
4319
4319
  });
4320
4320
  return n ? { anyOf: [{ not: W(t) }, n] } : W(t);
4321
- }, fn = (e, t) => {
4321
+ }, pn = (e, t) => {
4322
4322
  if (t.pipeStrategy === "input") return J(e.in._def, t);
4323
4323
  if (t.pipeStrategy === "output") return J(e.out._def, t);
4324
4324
  let n = J(e.in._def, {
@@ -4340,12 +4340,12 @@ var dn = (e, t) => {
4340
4340
  };
4341
4341
  //#endregion
4342
4342
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
4343
- function pn(e, t) {
4343
+ function mn(e, t) {
4344
4344
  return J(e.type._def, t);
4345
4345
  }
4346
4346
  //#endregion
4347
4347
  //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
4348
- function mn(e, t) {
4348
+ function hn(e, t) {
4349
4349
  let n = {
4350
4350
  type: "array",
4351
4351
  uniqueItems: !0,
@@ -4358,7 +4358,7 @@ function mn(e, t) {
4358
4358
  }
4359
4359
  //#endregion
4360
4360
  //#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 hn(e, t) {
4361
+ function gn(e, t) {
4362
4362
  return e.rest ? {
4363
4363
  type: "array",
4364
4364
  minItems: e.items.length,
@@ -4390,51 +4390,51 @@ function hn(e, t) {
4390
4390
  }
4391
4391
  //#endregion
4392
4392
  //#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 gn(e) {
4393
+ function _n(e) {
4394
4394
  return { not: W(e) };
4395
4395
  }
4396
4396
  //#endregion
4397
4397
  //#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 _n(e) {
4398
+ function vn(e) {
4399
4399
  return W(e);
4400
4400
  }
4401
4401
  //#endregion
4402
4402
  //#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 vn = (e, t) => J(e.innerType._def, t), yn = (e, t, n) => {
4403
+ var yn = (e, t) => J(e.innerType._def, t), bn = (e, t, n) => {
4404
4404
  switch (t) {
4405
- case F.ZodString: return Kt(e, n);
4406
- case F.ZodNumber: return sn(e, n);
4407
- case F.ZodObject: return cn(e, n);
4408
- case F.ZodBigInt: return Nt(e, n);
4409
- case F.ZodBoolean: return Pt();
4410
- case F.ZodDate: return Lt(e, n);
4411
- case F.ZodUndefined: return gn(n);
4412
- case F.ZodNull: return tn(n);
4413
- case F.ZodArray: return Mt(e, n);
4405
+ case F.ZodString: return qt(e, n);
4406
+ case F.ZodNumber: return cn(e, n);
4407
+ case F.ZodObject: return ln(e, n);
4408
+ case F.ZodBigInt: return Pt(e, n);
4409
+ case F.ZodBoolean: return Ft();
4410
+ case F.ZodDate: return Rt(e, n);
4411
+ case F.ZodUndefined: return _n(n);
4412
+ case F.ZodNull: return nn(n);
4413
+ case F.ZodArray: return Nt(e, n);
4414
4414
  case F.ZodUnion:
4415
- case F.ZodDiscriminatedUnion: return rn(e, n);
4416
- case F.ZodIntersection: return Ut(e, n);
4417
- case F.ZodTuple: return hn(e, n);
4418
- case F.ZodRecord: return Zt(e, n);
4419
- case F.ZodLiteral: return Wt(e, n);
4420
- case F.ZodEnum: return Vt(e);
4421
- case F.ZodNativeEnum: return $t(e);
4422
- case F.ZodNullable: return on(e, n);
4423
- case F.ZodOptional: return dn(e, n);
4424
- case F.ZodMap: return Qt(e, n);
4425
- case F.ZodSet: return mn(e, n);
4415
+ case F.ZodDiscriminatedUnion: return an(e, n);
4416
+ case F.ZodIntersection: return Wt(e, n);
4417
+ case F.ZodTuple: return gn(e, n);
4418
+ case F.ZodRecord: return Qt(e, n);
4419
+ case F.ZodLiteral: return Gt(e, n);
4420
+ case F.ZodEnum: return Ht(e);
4421
+ case F.ZodNativeEnum: return en(e);
4422
+ case F.ZodNullable: return sn(e, n);
4423
+ case F.ZodOptional: return fn(e, n);
4424
+ case F.ZodMap: return $t(e, n);
4425
+ case F.ZodSet: return hn(e, n);
4426
4426
  case F.ZodLazy: return () => e.getter()._def;
4427
- case F.ZodPromise: return pn(e, n);
4427
+ case F.ZodPromise: return mn(e, n);
4428
4428
  case F.ZodNaN:
4429
- case F.ZodNever: return en(n);
4430
- case F.ZodEffects: return Bt(e, n);
4429
+ case F.ZodNever: return tn(n);
4430
+ case F.ZodEffects: return Vt(e, n);
4431
4431
  case F.ZodAny: return W(n);
4432
- case F.ZodUnknown: return _n(n);
4433
- case F.ZodDefault: return zt(e, n);
4434
- case F.ZodBranded: return Ft(e, n);
4435
- case F.ZodReadonly: return vn(e, n);
4436
- case F.ZodCatch: return It(e, n);
4437
- case F.ZodPipeline: return fn(e, n);
4432
+ case F.ZodUnknown: return vn(n);
4433
+ case F.ZodDefault: return Bt(e, n);
4434
+ case F.ZodBranded: return It(e, n);
4435
+ case F.ZodReadonly: return yn(e, n);
4436
+ case F.ZodCatch: return Lt(e, n);
4437
+ case F.ZodPipeline: return pn(e, n);
4438
4438
  case F.ZodFunction:
4439
4439
  case F.ZodVoid:
4440
4440
  case F.ZodSymbol: return;
@@ -4447,10 +4447,10 @@ function J(e, t, n = !1) {
4447
4447
  let r = t.seen.get(e);
4448
4448
  if (t.override) {
4449
4449
  let i = t.override?.(e, t, r, n);
4450
- if (i !== Et) return i;
4450
+ if (i !== Dt) return i;
4451
4451
  }
4452
4452
  if (r && !n) {
4453
- let e = bn(r, t);
4453
+ let e = xn(r, t);
4454
4454
  if (e !== void 0) return e;
4455
4455
  }
4456
4456
  let i = {
@@ -4459,22 +4459,22 @@ function J(e, t, n = !1) {
4459
4459
  jsonSchema: void 0
4460
4460
  };
4461
4461
  t.seen.set(e, i);
4462
- let a = yn(e, e.typeName, t), o = typeof a == "function" ? J(a(), t) : a;
4463
- if (o && xn(e, t, o), t.postProcess) {
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) {
4464
4464
  let n = t.postProcess(o, e, t);
4465
4465
  return i.jsonSchema = o, n;
4466
4466
  }
4467
4467
  return i.jsonSchema = o, o;
4468
4468
  }
4469
- var bn = (e, t) => {
4469
+ var xn = (e, t) => {
4470
4470
  switch (t.$refStrategy) {
4471
4471
  case "root": return { $ref: e.path.join("/") };
4472
- case "relative": return { $ref: jt(t.currentPath, e.path) };
4472
+ case "relative": return { $ref: Mt(t.currentPath, e.path) };
4473
4473
  case "none":
4474
4474
  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
4475
  }
4476
- }, xn = (e, t, n) => (e.description && (n.description = e.description, t.markdownDescription && (n.markdownDescription = e.description)), n), Sn = (e, t) => {
4477
- let n = kt(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
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]) => ({
4478
4478
  ...e,
4479
4479
  [t]: J(r._def, {
4480
4480
  ...n,
@@ -4522,12 +4522,12 @@ var bn = (e, t) => {
4522
4522
  }
4523
4523
  };
4524
4524
  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(), Cn = Y({
4525
+ }, Y = (e) => B(e).passthrough(), X = (e) => e.nullable().optional(), Z = B({}).passthrough(), wn = Y({
4526
4526
  id: I().describe("Project id; pass as projectId to other tools"),
4527
4527
  name: I(),
4528
4528
  key: X(I()).describe("Short prefix, e.g. \"PROJ\""),
4529
4529
  description: X(I())
4530
- }).describe("A project"), wn = Y({
4530
+ }).describe("A project"), Tn = Y({
4531
4531
  id: I().describe("Task id; pass as id or taskId to other tools"),
4532
4532
  projectId: I(),
4533
4533
  title: I(),
@@ -4535,34 +4535,36 @@ var bn = (e, t) => {
4535
4535
  priority: I().describe("urgent, high, medium, low or none"),
4536
4536
  assigneeId: X(I()),
4537
4537
  dueDate: X(I()),
4538
+ deadline: X(I()).describe("Latest acceptable finish, enforced by critical path analysis"),
4539
+ isMilestone: X(R()).describe("A zero-duration checkpoint"),
4538
4540
  estimatedHours: X(L()),
4539
4541
  loggedHours: X(L()),
4540
4542
  isBlocked: X(R())
4541
- }).describe("A task"), Tn = Y({
4543
+ }).describe("A task"), En = Y({
4542
4544
  dependencyId: I().describe("Id of the dependency record"),
4543
4545
  taskId: I().describe("The other task"),
4544
4546
  title: I(),
4545
4547
  status: I(),
4546
4548
  type: I().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
4547
- }), En = wn.extend({ dependencies: X(Y({
4548
- dependsOn: z(Tn).describe("Tasks this task waits for (upstream)"),
4549
- dependents: z(Tn).describe("Tasks waiting for this task (downstream)")
4550
- })).describe("Present when includeDependencies is true") }).describe("A task"), Dn = Y({
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({
4551
4553
  id: I(),
4552
4554
  taskId: I().describe("The task that waits"),
4553
4555
  dependsOnTaskId: I().describe("The task it waits for"),
4554
4556
  type: I().describe("blocking or relates_to")
4555
- }).describe("A dependency between two tasks"), On = Y({
4557
+ }).describe("A dependency between two tasks"), kn = Y({
4556
4558
  id: I(),
4557
4559
  projectId: I(),
4558
4560
  title: I(),
4559
4561
  dueDate: X(I())
4560
- }).describe("A deliverable (milestone)"), kn = Y({
4562
+ }).describe("A deliverable"), An = Y({
4561
4563
  id: I(),
4562
4564
  taskId: I(),
4563
4565
  content: I(),
4564
4566
  authorId: X(I())
4565
- }).describe("A task comment"), An = Y({
4567
+ }).describe("A task comment"), jn = Y({
4566
4568
  assigneeId: X(I()),
4567
4569
  teamId: X(I()),
4568
4570
  capacity: L().describe("1 for a person, headcount for a team pool"),
@@ -4570,33 +4572,37 @@ var bn = (e, t) => {
4570
4572
  start: I(),
4571
4573
  end: I(),
4572
4574
  taskIds: z(I())
4573
- }), jn = Y({
4575
+ }), Mn = Y({
4574
4576
  taskId: I(),
4575
4577
  isCritical: R().describe("True when any delay to this task delays the project end"),
4576
- totalSlack: L().describe("Slack in hours; 0 means critical"),
4578
+ totalSlack: L().describe("Slack in hours; 0 means critical, negative means a deadline is missed by that much"),
4577
4579
  slackWorkingHours: X(L()).describe("Slack in working hours on the task calendar"),
4578
4580
  earlyStartDate: X(I()),
4579
4581
  earlyFinishDate: X(I()),
4580
4582
  lateStartDate: X(I()),
4581
4583
  lateFinishDate: X(I()),
4582
4584
  levelingDelayHours: X(L()).describe("With levelling: hours spent waiting for the assignee"),
4583
- waitingOn: X(I()).describe("With levelling: the task this one waited for")
4584
- }), Mn = Y({
4585
+ waitingOn: X(I()).describe("With levelling: the task this one waited for"),
4586
+ isMilestone: X(R()).describe("True for a milestone"),
4587
+ deadlineDate: X(I()).describe("The task's deadline as an instant"),
4588
+ deadlineVarianceHours: X(L()).describe("Working hours from forecast finish to deadline; negative means it will be missed")
4589
+ }), Nn = Y({
4585
4590
  projectId: I(),
4586
4591
  projectStartDate: X(I()),
4587
4592
  projectEndDate: X(I()).describe("Forecast finish date"),
4588
4593
  totalDurationHours: L(),
4589
- criticalTaskIds: z(I()).describe("Tasks with zero slack, in schedule order"),
4590
- tasks: z(jn),
4594
+ criticalTaskIds: z(I()).describe("Tasks with zero or negative slack, in schedule order"),
4595
+ missedDeadlineTaskIds: X(z(I())).describe("Tasks forecast to finish after their deadline"),
4596
+ tasks: z(Mn),
4591
4597
  leveled: X(R()),
4592
4598
  unleveledProjectEndDate: X(I()).describe("With levelling: the end date before levelling"),
4593
- overallocations: X(z(An)).describe("Assignee mode: periods where someone is booked above capacity")
4594
- }), Nn = Y({
4595
- projects: z(Mn).describe("One analysis per project"),
4599
+ overallocations: X(z(jn)).describe("Assignee mode: periods where someone is booked above capacity")
4600
+ }), Pn = Y({
4601
+ projects: z(Nn).describe("One analysis per project"),
4596
4602
  projectEndDate: X(I()).describe("The latest project end"),
4597
4603
  leveled: X(R()),
4598
- overallocations: z(An)
4599
- }), Pn = Y({
4604
+ overallocations: z(jn)
4605
+ }), Fn = Y({
4600
4606
  id: I(),
4601
4607
  type: I().describe("container, iteration, deliverable or phase"),
4602
4608
  name: I(),
@@ -4605,7 +4611,7 @@ var bn = (e, t) => {
4605
4611
  isCritical: R(),
4606
4612
  blockedTasks: L(),
4607
4613
  taskIds: z(I())
4608
- }), Fn = Y({
4614
+ }), In = Y({
4609
4615
  projectId: I(),
4610
4616
  level: I(),
4611
4617
  macro: X(Y({
@@ -4615,17 +4621,17 @@ var bn = (e, t) => {
4615
4621
  totalTasks: L(),
4616
4622
  completedTasks: L(),
4617
4623
  blockedTasks: L(),
4618
- phases: z(Pn)
4624
+ phases: z(Fn)
4619
4625
  })).describe("Phase-level summary"),
4620
4626
  standard: X(Z).describe("Task timeline: { tasks, criticalPathTaskIds, dependencies, totalDurationHours }"),
4621
4627
  concrete: X(V(Z)).describe("Work evidence (time entries, attachments) by task id")
4622
- }), In = Y({
4628
+ }), Ln = Y({
4623
4629
  taskId: I(),
4624
- macroPhase: X(Pn).describe("The phase this task belongs to"),
4630
+ macroPhase: X(Fn).describe("The phase this task belongs to"),
4625
4631
  standard: Z.describe("The task with cpm (isCritical, slackWorkingHours, dates), blockingTaskIds and dependentTaskIds"),
4626
4632
  concrete: Z.describe("Evidence of work on the task"),
4627
4633
  metrics: X(Z).describe("Same as get_task_metrics")
4628
- }), Ln = Y({
4634
+ }), Rn = Y({
4629
4635
  taskId: I(),
4630
4636
  points: z(Y({
4631
4637
  timestamp: I(),
@@ -4633,7 +4639,7 @@ var bn = (e, t) => {
4633
4639
  status: I()
4634
4640
  })),
4635
4641
  curveProfile: I().describe("linear, s_curve, early_surge, late_rush, stalled or insufficient_data")
4636
- }), Rn = Y({
4642
+ }), zn = Y({
4637
4643
  taskId: I(),
4638
4644
  progress: Y({
4639
4645
  progressPercentage: L().describe("0-100"),
@@ -4655,8 +4661,8 @@ var bn = (e, t) => {
4655
4661
  schedulePerformanceIndex: L().describe("SPI = EV / PV; below 1 is behind schedule")
4656
4662
  }),
4657
4663
  inferredActuals: Z.describe("Actual start/end dates and active working time"),
4658
- progressHistory: Ln
4659
- }), zn = Y({
4664
+ progressHistory: Rn
4665
+ }), Bn = Y({
4660
4666
  startDate: I(),
4661
4667
  endDate: I(),
4662
4668
  interval: I(),
@@ -4674,7 +4680,7 @@ var bn = (e, t) => {
4674
4680
  totalHours: L(),
4675
4681
  totalCapacity: X(L()),
4676
4682
  averageUtilization: X(L())
4677
- }), Bn = Y({
4683
+ }), Vn = Y({
4678
4684
  skills: X(z(Y({
4679
4685
  name: I(),
4680
4686
  description: I()
@@ -4686,7 +4692,7 @@ var bn = (e, t) => {
4686
4692
  {
4687
4693
  name: "analyze-schedule",
4688
4694
  description: "Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.",
4689
- content: "---\nname: analyze-schedule\ndescription: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.\n---\n\n# Analyze the schedule\n\n## 1. Run the schedule\n\n1. Get the `projectId` (`list_projects`).\n2. Call `calculate_critical_path` with `calendars: \"assignee\"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.\n3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.\n4. For in-flight projects, pass `effort: \"remaining\"` so finished hours are not scheduled again.\n\n## 2. Read the result\n\n- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.\n- `criticalTaskIds` are the tasks with zero slack. Any delay to one of them moves the end date.\n- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.\n- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.\n- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.\n\nLook up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.\n\n## 3. Recommend\n\nRank fixes by how much they pull the end date in:\n\n1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.\n2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.\n3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.\n4. **Split long critical tasks** so parts can run in parallel.\n5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.\n\nShow the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.\n\n## Report format\n\n- Forecast finish date, and against any deadline the user gave.\n- Critical path: task titles in order, with assignee.\n- Top risks: near-critical tasks, blocked critical tasks, over-allocations.\n- Recommended actions, each with its expected effect.\n"
4695
+ content: "---\nname: analyze-schedule\ndescription: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for \"when will we finish?\", \"what is critical?\" or deadline-risk questions.\n---\n\n# Analyze the schedule\n\n## 1. Run the schedule\n\n1. Get the `projectId` (`list_projects`).\n2. Call `calculate_critical_path` with `calendars: \"assignee\"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.\n3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.\n4. For in-flight projects, pass `effort: \"remaining\"` so finished hours are not scheduled again.\n\n## 2. Read the result\n\n- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.\n- `criticalTaskIds` are the tasks with zero or negative slack. Any delay to one of them moves the end date or misses a deadline.\n- `missedDeadlineTaskIds` lists tasks forecast to finish after their `deadline`. Their `deadlineVarianceHours` says by how much (negative working hours), and the negative `totalSlack` on the tasks before them shows which work drives the miss. Entries with `isMilestone: true` are checkpoints such as releases or sign-offs.\n- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.\n- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.\n- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.\n\nLook up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.\n\n## 3. Recommend\n\nRank fixes by how much they pull the end date in:\n\n1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.\n2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.\n3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.\n4. **Split long critical tasks** so parts can run in parallel.\n5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.\n\nShow the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.\n\n## Report format\n\n- Forecast finish date, and against any deadline the user gave. If the user gives a date that is not yet on a task, offer to record it as a `deadline` (on a milestone task with `isMilestone: true` if it is a checkpoint) so later runs track it.\n- Each milestone: forecast date against its deadline.\n- Critical path: task titles in order, with assignee.\n- Top risks: near-critical tasks, blocked critical tasks, over-allocations.\n- Recommended actions, each with its expected effect.\n"
4690
4696
  },
4691
4697
  {
4692
4698
  name: "investigate-task",
@@ -4701,7 +4707,7 @@ var bn = (e, t) => {
4701
4707
  {
4702
4708
  name: "plan-project",
4703
4709
  description: "Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.",
4704
- content: "---\nname: plan-project\ndescription: Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.\n---\n\n# Plan a project\n\nTurn a goal into deliverables (dated outcomes), tasks (estimated units of work) and dependencies (which task waits for which) the scheduler can use.\n\n## 1. Find or create the project\n\n1. Call `list_projects`. If a project already matches the goal, use it and read it with `get_project` to learn its workflow status keys and custom fields.\n2. Only if none fits, and the user wants a new one, call `create_project` with a `name` and a short `key`.\n3. Call `list_tasks` with the `projectId` and `list_deliverables` to see what already exists. Do not recreate it.\n\n## 2. Draft the plan before writing anything\n\nBreak the goal down in your reply first and show it to the user:\n\n- **Deliverables**: 2-6 outcomes someone could accept or reject, each with a due date if the user gave one.\n- **Tasks** under each deliverable. Each task:\n - starts with a verb and is small enough for one person (about 2-24 hours);\n - has `estimatedHours` (effort, not elapsed time);\n - has a `priority`: `urgent` only for work that blocks others now, `high` for the critical outcome, `medium` by default, `low` for nice-to-haves;\n - lists the tasks it must wait for (its dependencies). Only add a dependency when the work truly cannot start earlier; every extra one lengthens the schedule.\n- Note anything you assumed (team size, dates, scope) as a question.\n\nAsk the user to confirm or adjust before creating anything. A plan is cheap to change in chat and tedious to change once created.\n\n## 3. Create it\n\n1. Create tasks with `create_task` (`projectId`, `title`, `description` with acceptance criteria, `estimatedHours`, `priority`, `assigneeId` if known). Leave `status` out so tasks start in the workflow's default status.\n2. Create each deliverable with `create_deliverable`, passing the ids of its tasks in `taskIds`.\n3. Add each dependency from your plan with `add_dependency`: `taskId` is the task that waits, `dependsOnTaskId` the task that must finish first. Use the ids `create_task` returned. If one is refused as circular, your plan has a loop: fix the order with the user instead of retrying.\n4. If the project already had tasks, check what they wait for with `get_task` and `includeDependencies: true` before linking new work to them.\n\n## 4. Check the result\n\n1. Call `calculate_critical_path` for the project and report the forecast `projectEndDate` and the `criticalTaskIds` (by title). If every task is critical or the end date looks too early, a dependency is probably missing or reversed.\n2. If the end date misses a deliverable's due date, say so and suggest what to cut, split or reassign. The `analyze-schedule` skill covers this in depth.\n\n## Guardrails\n\n- Never invent user ids for `assigneeId`. Leave tasks unassigned unless the user named the person and you have their id.\n- Keep the plan to what the user asked for; propose extra work as suggestions, not tasks.\n"
4710
+ content: "---\nname: plan-project\ndescription: Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.\n---\n\n# Plan a project\n\nTurn a goal into deliverables (dated outcomes), tasks (estimated units of work) and dependencies (which task waits for which) the scheduler can use.\n\n## 1. Find or create the project\n\n1. Call `list_projects`. If a project already matches the goal, use it and read it with `get_project` to learn its workflow status keys and custom fields.\n2. Only if none fits, and the user wants a new one, call `create_project` with a `name` and a short `key`.\n3. Call `list_tasks` with the `projectId` and `list_deliverables` to see what already exists. Do not recreate it.\n\n## 2. Draft the plan before writing anything\n\nBreak the goal down in your reply first and show it to the user:\n\n- **Deliverables**: 2-6 outcomes someone could accept or reject, each with a due date if the user gave one.\n- **Milestones** for dated checkpoints (a release, a sign-off, a review): a task with `isMilestone: true`, a `deadline` if the date is fixed, and dependencies on the tasks that must finish first. The schedule then reports whether each date will be met.\n- **Tasks** under each deliverable. Each task:\n - starts with a verb and is small enough for one person (about 2-24 hours);\n - has `estimatedHours` (effort, not elapsed time);\n - has a `priority`: `urgent` only for work that blocks others now, `high` for the critical outcome, `medium` by default, `low` for nice-to-haves;\n - lists the tasks it must wait for (its dependencies). Only add a dependency when the work truly cannot start earlier; every extra one lengthens the schedule.\n- Note anything you assumed (team size, dates, scope) as a question.\n\nAsk the user to confirm or adjust before creating anything. A plan is cheap to change in chat and tedious to change once created.\n\n## 3. Create it\n\n1. Create tasks with `create_task` (`projectId`, `title`, `description` with acceptance criteria, `estimatedHours`, `priority`, `assigneeId` if known). Leave `status` out so tasks start in the workflow's default status.\n2. Create each deliverable with `create_deliverable`, passing the ids of its tasks in `taskIds`.\n3. Add each dependency from your plan with `add_dependency`: `taskId` is the task that waits, `dependsOnTaskId` the task that must finish first. Use the ids `create_task` returned. If one is refused as circular, your plan has a loop: fix the order with the user instead of retrying.\n4. If the project already had tasks, check what they wait for with `get_task` and `includeDependencies: true` before linking new work to them.\n\n## 4. Check the result\n\n1. Call `calculate_critical_path` for the project and report the forecast `projectEndDate` and the `criticalTaskIds` (by title). If every task is critical or the end date looks too early, a dependency is probably missing or reversed.\n2. If the end date misses a deliverable's due date, or `missedDeadlineTaskIds` is not empty, say so and suggest what to cut, split or reassign. The `analyze-schedule` skill covers this in depth.\n\n## Guardrails\n\n- Never invent user ids for `assigneeId`. Leave tasks unassigned unless the user named the person and you have their id.\n- Keep the plan to what the user asked for; propose extra work as suggestions, not tasks.\n"
4705
4711
  },
4706
4712
  {
4707
4713
  name: "report-status",
@@ -4714,28 +4720,28 @@ var bn = (e, t) => {
4714
4720
  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"
4715
4721
  }
4716
4722
  ];
4717
- function Vn(e) {
4723
+ function Hn(e) {
4718
4724
  return Q.find((t) => t.name === e);
4719
4725
  }
4720
4726
  //#endregion
4721
4727
  //#region ../mcp/dist/tools/definitions.js
4722
- var Hn = {
4728
+ var Un = {
4723
4729
  core: "Projects, tasks and task dependencies: find, read, create, update and delete",
4724
- collaboration: "Deliverables (milestones) and task comments",
4730
+ collaboration: "Deliverables and task comments",
4725
4731
  scheduling: "Critical path, portfolio scheduling and workload/capacity",
4726
4732
  analytics: "Project status ladder, task metrics, earned value and progress history",
4727
4733
  guidance: "Skills: step-by-step playbooks for multi-step jobs"
4728
4734
  };
4729
- function Un(e) {
4730
- let { $schema: t, ...n } = Sn(e, { $refStrategy: "none" });
4735
+ function Wn(e) {
4736
+ let { $schema: t, ...n } = Cn(e, { $refStrategy: "none" });
4731
4737
  return n;
4732
4738
  }
4733
4739
  function $(e) {
4734
4740
  let t = e.annotations?.readOnlyHint ?? !1;
4735
4741
  return {
4736
4742
  ...e,
4737
- inputSchema: Un(e.zodSchema),
4738
- outputSchema: Un(e.outputZodSchema),
4743
+ inputSchema: Wn(e.zodSchema),
4744
+ outputSchema: Wn(e.outputZodSchema),
4739
4745
  annotations: {
4740
4746
  readOnlyHint: t,
4741
4747
  destructiveHint: e.annotations?.destructiveHint ?? !1,
@@ -4744,60 +4750,60 @@ function $(e) {
4744
4750
  }
4745
4751
  };
4746
4752
  }
4747
- var Wn = class extends Error {
4753
+ var Gn = class extends Error {
4748
4754
  constructor(e, t) {
4749
4755
  super(`Invalid arguments for tool "${e}": ${t}`), this.name = "ToolArgumentError";
4750
4756
  }
4751
4757
  };
4752
- function Gn(e, t) {
4758
+ function Kn(e, t) {
4753
4759
  let n = e.zodSchema.strict().safeParse(t ?? {});
4754
4760
  if (!n.success) {
4755
4761
  let t = n.error.issues.map((e) => `${e.path.join(".") || "(root)"}: ${e.message}`).join("; ");
4756
- throw new Wn(e.name, t);
4762
+ throw new Gn(e.name, t);
4757
4763
  }
4758
4764
  return n.data;
4759
4765
  }
4760
- async function Kn(e) {
4766
+ async function qn(e) {
4761
4767
  return { isEngine: "store" in e && typeof e.store == "object" };
4762
4768
  }
4763
- var qn = $({
4769
+ var Jn = $({
4764
4770
  name: "list_projects",
4765
4771
  title: "List Projects",
4766
4772
  description: "List every project you can read, with its id, name and key. Start here to find a projectId; never guess ids. Returns { projects }.",
4767
4773
  toolset: "core",
4768
- outputZodSchema: B({ projects: z(Cn) }),
4774
+ outputZodSchema: B({ projects: z(wn) }),
4769
4775
  zodSchema: B({}),
4770
4776
  annotations: { readOnlyHint: !0 },
4771
4777
  execute: async (e, t) => ({ projects: await t.getProjects() })
4772
- }), Jn = $({
4778
+ }), Yn = $({
4773
4779
  name: "get_project",
4774
4780
  title: "Get Project",
4775
4781
  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`.",
4776
4782
  toolset: "core",
4777
- outputZodSchema: Cn,
4783
+ outputZodSchema: wn,
4778
4784
  zodSchema: B({ id: I().describe("The project ID") }),
4779
4785
  annotations: { readOnlyHint: !0 },
4780
4786
  execute: async (e, t) => t.getProject(e.id)
4781
- }), Yn = $({
4787
+ }), Xn = $({
4782
4788
  name: "create_project",
4783
4789
  title: "Create Project",
4784
4790
  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.",
4785
4791
  toolset: "core",
4786
- outputZodSchema: Cn,
4792
+ outputZodSchema: wn,
4787
4793
  zodSchema: B({
4788
4794
  name: I().describe("Name of the project"),
4789
4795
  description: I().optional().describe("Description of the project"),
4790
4796
  key: I().optional().describe("Short project key/prefix (e.g. \"PROJ\")"),
4791
- customFields: V(Tt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4797
+ customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4792
4798
  }),
4793
4799
  execute: async (e, t) => t.createProject(e)
4794
- }), Xn = $({
4800
+ }), Zn = $({
4795
4801
  name: "list_tasks",
4796
4802
  title: "List Tasks",
4797
4803
  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`.",
4798
4804
  toolset: "core",
4799
4805
  outputZodSchema: B({
4800
- tasks: z(wn),
4806
+ tasks: z(Tn),
4801
4807
  nextCursor: I().nullable().optional()
4802
4808
  }),
4803
4809
  zodSchema: B({
@@ -4837,12 +4843,12 @@ var qn = $({
4837
4843
  nextCursor: r.nextCursor
4838
4844
  };
4839
4845
  }
4840
- }), Zn = $({
4846
+ }), Qn = $({
4841
4847
  name: "get_task",
4842
4848
  title: "Get Task",
4843
4849
  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`.",
4844
4850
  toolset: "core",
4845
- outputZodSchema: En,
4851
+ outputZodSchema: Dn,
4846
4852
  zodSchema: B({
4847
4853
  id: I().describe("The task ID"),
4848
4854
  includeDependencies: R().optional().describe("Also return the tasks this one waits for (dependsOn) and the tasks waiting for it (dependents)")
@@ -4851,16 +4857,23 @@ var qn = $({
4851
4857
  execute: async (e, t) => {
4852
4858
  let n = await t.getTask(e.id);
4853
4859
  if (!n || !e.includeDependencies) return n;
4854
- let r = await er(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e])), a = [], o = [];
4860
+ let r = await tr(t, e.id), i = new Map([...r.upstreamTasks, ...r.downstreamTasks].map((e) => [e.id, e]));
4861
+ for (let n of r.dependencies) {
4862
+ let r = n.taskId === e.id ? n.dependsOnTaskId : n.taskId;
4863
+ if (i.has(r) || r === e.id) continue;
4864
+ let a = await t.getTask(r).catch(() => null);
4865
+ a && i.set(r, a);
4866
+ }
4867
+ let a = [], o = [];
4855
4868
  for (let t of r.dependencies) {
4856
- let { waiting: n, waitedFor: r } = Qn(t), s = n === e.id ? r : n, c = i.get(s);
4869
+ let { waiting: n, waitedFor: r } = $n(t), s = n === e.id ? r : n, c = i.get(s);
4857
4870
  if (!c || s === e.id) continue;
4858
4871
  let ee = {
4859
4872
  dependencyId: t.id,
4860
4873
  taskId: c.id,
4861
4874
  title: c.title,
4862
4875
  status: c.status,
4863
- type: $n(t)
4876
+ type: er(t)
4864
4877
  };
4865
4878
  (n === e.id ? a : o).push(ee);
4866
4879
  }
@@ -4873,26 +4886,27 @@ var qn = $({
4873
4886
  };
4874
4887
  }
4875
4888
  });
4876
- function Qn(e) {
4877
- return e.type === "blocked_by" ? {
4878
- waiting: e.dependsOnTaskId,
4879
- waitedFor: e.taskId
4889
+ function $n(e) {
4890
+ let t = r(e);
4891
+ return t ? {
4892
+ waiting: t.after,
4893
+ waitedFor: t.before
4880
4894
  } : {
4881
4895
  waiting: e.taskId,
4882
4896
  waitedFor: e.dependsOnTaskId
4883
4897
  };
4884
4898
  }
4885
- var $n = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
4886
- async function er(e, t) {
4887
- let { isEngine: n } = await Kn(e);
4899
+ var er = (e) => e.type === "relates_to" ? "relates_to" : "blocking";
4900
+ async function tr(e, t) {
4901
+ let { isEngine: n } = await qn(e);
4888
4902
  return n ? e.getTaskDependencyGraph(t) : e.getTaskDependencies(t);
4889
4903
  }
4890
- var tr = $({
4904
+ var nr = $({
4891
4905
  name: "create_task",
4892
4906
  title: "Create Task",
4893
4907
  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.",
4894
4908
  toolset: "core",
4895
- outputZodSchema: wn,
4909
+ outputZodSchema: Tn,
4896
4910
  zodSchema: B({
4897
4911
  projectId: I().optional().describe("Project ID (inferred from active view in browser if omitted)"),
4898
4912
  title: I().describe("Title of the task"),
@@ -4907,12 +4921,14 @@ var tr = $({
4907
4921
  ]).optional().default("none").describe("Task priority"),
4908
4922
  assigneeId: I().optional().describe("User ID to assign task to"),
4909
4923
  dueDate: I().optional().describe("Due date (ISO string)"),
4924
+ 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"),
4925
+ isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4910
4926
  tags: z(I()).optional().describe("Tags for categorization"),
4911
4927
  estimatedHours: L().optional().describe("Estimated hours to complete"),
4912
4928
  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"),
4913
4929
  isBlocked: R().optional().describe("Whether the task is blocked"),
4914
4930
  blockedReason: I().optional().describe("Reason why the task is blocked"),
4915
- customFields: V(Tt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4931
+ customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4916
4932
  }),
4917
4933
  execute: async (e, t, n) => {
4918
4934
  let r = e.projectId || n?.projectId;
@@ -4925,6 +4941,8 @@ var tr = $({
4925
4941
  priority: e.priority || "none",
4926
4942
  assigneeId: e.assigneeId,
4927
4943
  dueDate: e.dueDate,
4944
+ deadline: e.deadline,
4945
+ isMilestone: e.isMilestone,
4928
4946
  tags: e.tags || [],
4929
4947
  estimatedHours: e.estimatedHours,
4930
4948
  customFields: e.customFields,
@@ -4934,12 +4952,12 @@ var tr = $({
4934
4952
  };
4935
4953
  return t.createTask(i);
4936
4954
  }
4937
- }), nr = $({
4955
+ }), rr = $({
4938
4956
  name: "update_task",
4939
4957
  title: "Update Task",
4940
- description: "Change an existing task: title, description, status, priority, assignee, due date, estimate, logged hours, 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.",
4958
+ description: "Change an existing task: title, description, status, priority, assignee, due date, deadline, milestone flag, estimate, logged hours, 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.",
4941
4959
  toolset: "core",
4942
- outputZodSchema: wn,
4960
+ outputZodSchema: Tn,
4943
4961
  zodSchema: B({
4944
4962
  id: I().describe("The task ID"),
4945
4963
  title: I().optional().describe("New title"),
@@ -4954,20 +4972,22 @@ var tr = $({
4954
4972
  ]).optional().describe("New priority"),
4955
4973
  assigneeId: I().optional().describe("User ID to assign the task to"),
4956
4974
  dueDate: I().optional().describe("Due date (ISO string)"),
4975
+ 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"),
4976
+ isMilestone: R().optional().describe("Mark the task as a milestone: a zero-duration checkpoint (release, sign-off) fed by dependencies; its estimate is ignored"),
4957
4977
  tags: z(I()).optional().describe("Replaces all tags"),
4958
4978
  estimatedHours: L().optional().describe("Estimated effort in hours"),
4959
4979
  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"),
4960
4980
  loggedHours: L().optional().describe("Total hours worked so far"),
4961
4981
  isBlocked: R().optional().describe("Whether the task is blocked"),
4962
4982
  blockedReason: I().optional().describe("Reason why the task is blocked"),
4963
- customFields: V(Tt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4983
+ customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
4964
4984
  }),
4965
4985
  annotations: { idempotentHint: !0 },
4966
4986
  execute: async (e, t) => {
4967
4987
  let { id: n, ...r } = e;
4968
4988
  return t.updateTask(n, r);
4969
4989
  }
4970
- }), rr = $({
4990
+ }), ir = $({
4971
4991
  name: "delete_task",
4972
4992
  title: "Delete Task",
4973
4993
  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 }.",
@@ -4979,12 +4999,12 @@ var tr = $({
4979
4999
  idempotentHint: !0
4980
5000
  },
4981
5001
  execute: async (e, t) => ({ success: await t.deleteTask(e.id) })
4982
- }), ir = $({
5002
+ }), ar = $({
4983
5003
  name: "add_dependency",
4984
5004
  title: "Add Dependency",
4985
5005
  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`.",
4986
5006
  toolset: "core",
4987
- outputZodSchema: Dn,
5007
+ outputZodSchema: On,
4988
5008
  zodSchema: B({
4989
5009
  taskId: I().describe("The task that waits"),
4990
5010
  dependsOnTaskId: I().describe("The task that must finish first"),
@@ -4992,7 +5012,7 @@ var tr = $({
4992
5012
  }),
4993
5013
  annotations: { idempotentHint: !0 },
4994
5014
  execute: async (e, t) => {
4995
- let n = e.type ?? "blocking", { isEngine: r } = await Kn(t);
5015
+ let n = e.type ?? "blocking", { isEngine: r } = await qn(t);
4996
5016
  return r ? t.addDependency({
4997
5017
  taskId: e.taskId,
4998
5018
  dependsOnTaskId: e.dependsOnTaskId,
@@ -5002,7 +5022,7 @@ var tr = $({
5002
5022
  type: n
5003
5023
  });
5004
5024
  }
5005
- }), ar = $({
5025
+ }), or = $({
5006
5026
  name: "remove_dependency",
5007
5027
  title: "Remove Dependency",
5008
5028
  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.",
@@ -5018,22 +5038,22 @@ var tr = $({
5018
5038
  }),
5019
5039
  annotations: { idempotentHint: !0 },
5020
5040
  execute: async (e, t) => {
5021
- let n = (await er(t, e.taskId)).dependencies.filter((t) => {
5022
- let { waiting: n, waitedFor: r } = Qn(t);
5023
- return n === e.taskId && r === e.dependsOnTaskId && (!e.type || $n(t) === e.type);
5024
- }), { isEngine: r } = await Kn(t), i = [];
5041
+ let n = (await tr(t, e.taskId)).dependencies.filter((t) => {
5042
+ let { waiting: n, waitedFor: r } = $n(t);
5043
+ return n === e.taskId && r === e.dependsOnTaskId && (!e.type || er(t) === e.type);
5044
+ }), { isEngine: r } = await qn(t), i = [];
5025
5045
  for (let e of n) (r ? await t.removeDependency(e.id) : await t.removeDependency(e.taskId, e.id)) && i.push(e.id);
5026
5046
  return {
5027
5047
  removed: i.length,
5028
5048
  dependencyIds: i
5029
5049
  };
5030
5050
  }
5031
- }), or = $({
5051
+ }), sr = $({
5032
5052
  name: "list_deliverables",
5033
5053
  title: "List Deliverables",
5034
- description: "List a project's deliverables: milestones that group tasks toward a dated outcome. Use it to see what is due and which tasks feed each milestone. Returns { deliverables }.",
5054
+ 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 }.",
5035
5055
  toolset: "collaboration",
5036
- outputZodSchema: B({ deliverables: z(On) }),
5056
+ outputZodSchema: B({ deliverables: z(kn) }),
5037
5057
  zodSchema: B({ projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)") }),
5038
5058
  annotations: { readOnlyHint: !0 },
5039
5059
  execute: async (e, t, n) => {
@@ -5041,19 +5061,19 @@ var tr = $({
5041
5061
  if (!r) throw Error("projectId is required to list deliverables. Find one with `list_projects`.");
5042
5062
  return "getDeliverables" in t && typeof t.getDeliverables == "function" ? { deliverables: await t.getDeliverables(r) } : { deliverables: [] };
5043
5063
  }
5044
- }), sr = $({
5064
+ }), cr = $({
5045
5065
  name: "create_deliverable",
5046
5066
  title: "Create Deliverable",
5047
- description: "Create a deliverable (milestone) in a project, optionally linking existing tasks by id. Use it when planning a dated outcome that several tasks build toward. Returns the created deliverable.",
5067
+ 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.",
5048
5068
  toolset: "collaboration",
5049
- outputZodSchema: On,
5069
+ outputZodSchema: kn,
5050
5070
  zodSchema: B({
5051
5071
  projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5052
5072
  title: I().describe("Name of the deliverable"),
5053
5073
  description: I().optional().describe("What the deliverable is and how it is accepted"),
5054
5074
  dueDate: I().optional().describe("Due date (ISO string)"),
5055
5075
  taskIds: z(I()).optional().describe("IDs of existing tasks that feed this deliverable"),
5056
- customFields: V(Tt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5076
+ customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5057
5077
  }),
5058
5078
  execute: async (e, t, n) => {
5059
5079
  let r = e.projectId || n?.projectId;
@@ -5064,37 +5084,37 @@ var tr = $({
5064
5084
  });
5065
5085
  throw Error("createDeliverable is not supported by this backend target.");
5066
5086
  }
5067
- }), cr = $({
5087
+ }), lr = $({
5068
5088
  name: "list_comments",
5069
5089
  title: "List Comments",
5070
5090
  description: "List the comments on a task. Use it to read the discussion, decisions or blockers recorded there. Returns { comments }.",
5071
5091
  toolset: "collaboration",
5072
- outputZodSchema: B({ comments: z(kn) }),
5092
+ outputZodSchema: B({ comments: z(An) }),
5073
5093
  zodSchema: B({ taskId: I().describe("The task ID") }),
5074
5094
  annotations: { readOnlyHint: !0 },
5075
5095
  execute: async (e, t) => "getComments" in t && typeof t.getComments == "function" ? { comments: await t.getComments(e.taskId) } : { comments: [] }
5076
- }), lr = $({
5096
+ }), ur = $({
5077
5097
  name: "add_comment",
5078
5098
  title: "Add Comment",
5079
5099
  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.",
5080
5100
  toolset: "collaboration",
5081
- outputZodSchema: kn,
5101
+ outputZodSchema: An,
5082
5102
  zodSchema: B({
5083
5103
  taskId: I().describe("The task ID"),
5084
5104
  content: I().describe("Comment body/markdown"),
5085
- customFields: V(Tt()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5105
+ customFields: V(Et()).optional().describe("Custom field values as a JSON object (validated against the project's field definitions for tasks)")
5086
5106
  }),
5087
5107
  execute: async (e, t) => t.addComment({
5088
5108
  taskId: e.taskId,
5089
5109
  content: e.content,
5090
5110
  customFields: e.customFields
5091
5111
  })
5092
- }), ur = $({
5112
+ }), dr = $({
5093
5113
  name: "calculate_portfolio_critical_path",
5094
5114
  title: "Calculate Portfolio Critical Path",
5095
5115
  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`.",
5096
5116
  toolset: "scheduling",
5097
- outputZodSchema: Nn,
5117
+ outputZodSchema: Pn,
5098
5118
  zodSchema: B({
5099
5119
  projectIds: z(I()).optional().describe("Projects to include (default: every project you can read)"),
5100
5120
  projectOrder: z(I()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
@@ -5111,13 +5131,12 @@ var tr = $({
5111
5131
  }),
5112
5132
  annotations: { readOnlyHint: !0 },
5113
5133
  execute: async (e, t) => t.calculatePortfolioCriticalPath(e)
5114
- }), dr = [
5115
- qn,
5134
+ }), fr = [
5116
5135
  Jn,
5117
5136
  Yn,
5118
5137
  Xn,
5119
5138
  Zn,
5120
- tr,
5139
+ Qn,
5121
5140
  nr,
5122
5141
  rr,
5123
5142
  ir,
@@ -5126,12 +5145,13 @@ var tr = $({
5126
5145
  sr,
5127
5146
  cr,
5128
5147
  lr,
5148
+ ur,
5129
5149
  $({
5130
5150
  name: "calculate_critical_path",
5131
5151
  title: "Calculate Critical Path",
5132
5152
  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`.",
5133
5153
  toolset: "scheduling",
5134
- outputZodSchema: Mn,
5154
+ outputZodSchema: Nn,
5135
5155
  zodSchema: B({
5136
5156
  projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5137
5157
  calendars: H(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's working calendar; default uses the project calendar"),
@@ -5157,13 +5177,13 @@ var tr = $({
5157
5177
  });
5158
5178
  }
5159
5179
  }),
5160
- ur,
5180
+ dr,
5161
5181
  $({
5162
5182
  name: "get_timeline_ladder",
5163
5183
  title: "Get Timeline Ladder of Abstraction",
5164
5184
  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`.",
5165
5185
  toolset: "analytics",
5166
- outputZodSchema: Fn,
5186
+ outputZodSchema: In,
5167
5187
  zodSchema: B({
5168
5188
  projectId: I().optional().describe("Project ID (falls back to ambient context if omitted)"),
5169
5189
  level: H([
@@ -5191,7 +5211,7 @@ var tr = $({
5191
5211
  title: "Get Task Ladder View",
5192
5212
  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`.",
5193
5213
  toolset: "analytics",
5194
- outputZodSchema: In,
5214
+ outputZodSchema: Ln,
5195
5215
  zodSchema: B({ taskId: I().describe("The task ID") }),
5196
5216
  annotations: { readOnlyHint: !0 },
5197
5217
  execute: async (e, t) => t.getTaskLadder(e.taskId)
@@ -5201,7 +5221,7 @@ var tr = $({
5201
5221
  title: "Get Task Metrics",
5202
5222
  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 }.",
5203
5223
  toolset: "analytics",
5204
- outputZodSchema: Rn,
5224
+ outputZodSchema: zn,
5205
5225
  zodSchema: B({ taskId: I().describe("The task ID") }),
5206
5226
  annotations: { readOnlyHint: !0 },
5207
5227
  execute: async (e, t) => t.getTaskMetrics(e.taskId)
@@ -5211,7 +5231,7 @@ var tr = $({
5211
5231
  title: "Get Task Progress History",
5212
5232
  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.",
5213
5233
  toolset: "analytics",
5214
- outputZodSchema: Ln,
5234
+ outputZodSchema: Rn,
5215
5235
  zodSchema: B({ taskId: I().describe("The task ID") }),
5216
5236
  annotations: { readOnlyHint: !0 },
5217
5237
  execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
@@ -5221,7 +5241,7 @@ var tr = $({
5221
5241
  title: "Get Workload Distribution",
5222
5242
  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 }.",
5223
5243
  toolset: "scheduling",
5224
- outputZodSchema: zn,
5244
+ outputZodSchema: Bn,
5225
5245
  zodSchema: B({
5226
5246
  projectId: I().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
5227
5247
  startDate: I().optional().describe("Start date ISO (YYYY-MM-DD)"),
@@ -5264,7 +5284,7 @@ var tr = $({
5264
5284
  title: "Get Skill",
5265
5285
  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.",
5266
5286
  toolset: "guidance",
5267
- outputZodSchema: Bn,
5287
+ outputZodSchema: Vn,
5268
5288
  zodSchema: B({ name: I().optional().describe("Skill name, e.g. \"plan-project\"; omit to list all skills") }),
5269
5289
  annotations: { readOnlyHint: !0 },
5270
5290
  execute: async (e) => {
@@ -5272,41 +5292,41 @@ var tr = $({
5272
5292
  name: e,
5273
5293
  description: t
5274
5294
  })) };
5275
- let t = Vn(e.name);
5295
+ let t = Hn(e.name);
5276
5296
  if (!t) throw Error(`Skill "${e.name}" not found. Available skills: ${Q.map((e) => e.name).join(", ")}.`);
5277
5297
  return t;
5278
5298
  }
5279
5299
  })
5280
- ], fr = new Map(dr.map((e) => [e.name, e]));
5281
- function pr(e = {}) {
5282
- let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !fr.has(e));
5283
- if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${dr.map((e) => e.name).join(", ")}.`);
5284
- let a = (n ?? []).filter((e) => !(e in Hn));
5285
- if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Hn).join(", ")}.`);
5300
+ ], pr = new Map(fr.map((e) => [e.name, e]));
5301
+ function mr(e = {}) {
5302
+ let { tools: t, toolsets: n, readOnly: r } = e, i = (t ?? []).filter((e) => !pr.has(e));
5303
+ if (i.length > 0) throw Error(`Unknown Critical Path tool(s): ${i.join(", ")}. Known tools: ${fr.map((e) => e.name).join(", ")}.`);
5304
+ let a = (n ?? []).filter((e) => !(e in Un));
5305
+ if (a.length > 0) throw Error(`Unknown Critical Path toolset(s): ${a.join(", ")}. Known toolsets: ${Object.keys(Un).join(", ")}.`);
5286
5306
  let o = !t && !n;
5287
- return dr.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
5307
+ return fr.filter((e) => (o || t?.includes(e.name) || n?.includes(e.toolset)) && (!r || e.annotations.readOnlyHint));
5288
5308
  }
5289
- var mr = class extends Error {
5309
+ var hr = class extends Error {
5290
5310
  constructor(e) {
5291
5311
  super(e), this.name = "ToolNotFoundError";
5292
5312
  }
5293
- }, hr = "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.";
5294
- async function gr(e, t, n, r) {
5313
+ }, gr = "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.";
5314
+ async function _r(e, t, n, r) {
5295
5315
  try {
5296
- let i = await e.execute(Gn(e, t), n, r);
5297
- if (i == null) throw new mr(`Nothing found for ${JSON.stringify(t ?? {})}.`);
5316
+ let i = await e.execute(Kn(e, t), n, r);
5317
+ if (i == null) throw new hr(`Nothing found for ${JSON.stringify(t ?? {})}.`);
5298
5318
  return JSON.parse(JSON.stringify(i));
5299
5319
  } catch (t) {
5300
- throw Error(_r(e, t));
5320
+ throw Error(vr(e, t));
5301
5321
  }
5302
5322
  }
5303
- function _r(e, t) {
5323
+ function vr(e, t) {
5304
5324
  let n = t?.message || String(t);
5305
- return t instanceof Wn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof mr || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${hr}` : 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;
5325
+ return t instanceof Gn ? `${n}. Fix the arguments to match the input schema of "${e.name}" and call it again.` : t instanceof hr || t?.name === "NotFoundError" || t?.status === 404 || /not found/i.test(n) ? `${n} ${gr}` : 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;
5306
5326
  }
5307
5327
  //#endregion
5308
5328
  //#region ../mcp/dist/tools/instructions.js
5309
- var vr = [
5329
+ var yr = [
5310
5330
  {
5311
5331
  when: "Find a project or task id",
5312
5332
  tools: ["list_projects", "list_tasks"]
@@ -5360,9 +5380,9 @@ var vr = [
5360
5380
  tools: ["get_workload_distribution"]
5361
5381
  }
5362
5382
  ];
5363
- function yr(e, t = {}) {
5383
+ function br(e, t = {}) {
5364
5384
  let n = new Set(e.map((e) => e.name)), r = [
5365
- "Critical Path is a project management backend. A project holds tasks and deliverables (milestones that group tasks). Tasks have a workflow status, priority, assignee, effort estimate, logged hours, optional subtasks (parentId) and dependencies, and comments.",
5385
+ "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.",
5366
5386
  "",
5367
5387
  "Working rules:",
5368
5388
  "- Never guess ids. Get them from list or create results.",
@@ -5371,7 +5391,7 @@ function yr(e, t = {}) {
5371
5391
  "- Confirm with the user before any tool marked destructive."
5372
5392
  ];
5373
5393
  t.projectId && r.push(`- The user is viewing project "${t.projectId}"; tools use it when you omit projectId.`);
5374
- let i = vr.map((e) => ({
5394
+ let i = yr.map((e) => ({
5375
5395
  ...e,
5376
5396
  tools: e.tools.filter((e) => n.has(e))
5377
5397
  })).filter((e) => e.tools.length > 0);
@@ -5387,7 +5407,7 @@ function yr(e, t = {}) {
5387
5407
  }
5388
5408
  //#endregion
5389
5409
  //#region ../mcp/dist/web/index.js
5390
- function br(e = typeof document < "u" ? document : null) {
5410
+ function xr(e = typeof document < "u" ? document : null) {
5391
5411
  if (!e) return null;
5392
5412
  if (!e.modelContext) {
5393
5413
  let t = /* @__PURE__ */ new Map();
@@ -5412,14 +5432,14 @@ function br(e = typeof document < "u" ? document : null) {
5412
5432
  }
5413
5433
  return e.modelContext;
5414
5434
  }
5415
- function xr(e) {
5435
+ function Sr(e) {
5416
5436
  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;
5417
- t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = br(t) ?? void 0);
5418
- let a = pr({
5437
+ t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = xr(t) ?? void 0);
5438
+ let a = mr({
5419
5439
  tools: e.tools,
5420
5440
  toolsets: e.toolsets,
5421
5441
  readOnly: e.readOnly
5422
- }), o = yr(a, { projectId: e.projectId }), s = [], c = new AbortController();
5442
+ }), o = br(a, { projectId: e.projectId }), s = [], c = new AbortController();
5423
5443
  if (e.signal?.aborted) return {
5424
5444
  unregister: () => {},
5425
5445
  getRegisteredTools: () => [],
@@ -5435,7 +5455,7 @@ function xr(e) {
5435
5455
  outputSchema: t.outputSchema,
5436
5456
  annotations: { ...t.annotations },
5437
5457
  execute: async (n) => {
5438
- let r = e.projectId ? { projectId: e.projectId } : void 0, i = await gr(t, n, e.client, r);
5458
+ let r = e.projectId ? { projectId: e.projectId } : void 0, i = await _r(t, n, e.client, r);
5439
5459
  return e.onToolExecuted?.(t.name, n, i), i;
5440
5460
  }
5441
5461
  };
@@ -5465,7 +5485,7 @@ function xr(e) {
5465
5485
  }
5466
5486
  //#endregion
5467
5487
  //#region src/webmcp-state.svelte.ts
5468
- var Sr = class {
5488
+ var Cr = class {
5469
5489
  client;
5470
5490
  options;
5471
5491
  #e = t.state(!1);
@@ -5512,7 +5532,7 @@ var Sr = class {
5512
5532
  if (!this.registered) {
5513
5533
  this.error = null;
5514
5534
  try {
5515
- this.abortController = new AbortController(), this.handle = xr({
5535
+ this.abortController = new AbortController(), this.handle = Sr({
5516
5536
  client: this.client,
5517
5537
  projectId: this.activeProjectId,
5518
5538
  tools: this.options.tools,
@@ -5538,15 +5558,15 @@ var Sr = class {
5538
5558
  this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
5539
5559
  }
5540
5560
  };
5541
- function Cr(e, t) {
5542
- return new Sr(e, t);
5561
+ function wr(e, t) {
5562
+ return new Cr(e, t);
5543
5563
  }
5544
5564
  //#endregion
5545
5565
  //#region src/critical-path-state.svelte.ts
5546
- var wr = class {
5566
+ var Tr = class {
5547
5567
  client;
5548
5568
  projectId;
5549
- #e = new i();
5569
+ #e = new a();
5550
5570
  #t = t.state(null);
5551
5571
  get data() {
5552
5572
  return t.get(this.#t);
@@ -5587,15 +5607,15 @@ var wr = class {
5587
5607
  this.#e.cancel();
5588
5608
  }
5589
5609
  };
5590
- function Tr(e, t) {
5591
- return new wr(e, t);
5610
+ function Er(e, t) {
5611
+ return new Tr(e, t);
5592
5612
  }
5593
5613
  //#endregion
5594
5614
  //#region src/timeline-ladder-state.svelte.ts
5595
- var Er = class {
5615
+ var Dr = class {
5596
5616
  client;
5597
5617
  projectId;
5598
- #e = new i();
5618
+ #e = new a();
5599
5619
  #t = t.state(null);
5600
5620
  get data() {
5601
5621
  return t.get(this.#t);
@@ -5670,17 +5690,17 @@ var Er = class {
5670
5690
  this.#e.cancel();
5671
5691
  }
5672
5692
  };
5673
- function Dr(e, t, n) {
5674
- return new Er(e, t, n);
5693
+ function Or(e, t, n) {
5694
+ return new Dr(e, t, n);
5675
5695
  }
5676
5696
  //#endregion
5677
5697
  //#region src/task-metrics-state.svelte.ts
5678
- var Or = class {
5698
+ var kr = class {
5679
5699
  client;
5680
5700
  taskId;
5681
- #e = new i();
5682
- #t = new i();
5683
- #n = new i();
5701
+ #e = new a();
5702
+ #t = new a();
5703
+ #n = new a();
5684
5704
  #r = t.state(null);
5685
5705
  get metrics() {
5686
5706
  return t.get(this.#r);
@@ -5794,16 +5814,16 @@ var Or = class {
5794
5814
  this.#e.cancel(), this.#t.cancel(), this.#n.cancel();
5795
5815
  }
5796
5816
  };
5797
- function kr(e, t) {
5798
- return new Or(e, t);
5817
+ function Ar(e, t) {
5818
+ return new kr(e, t);
5799
5819
  }
5800
5820
  //#endregion
5801
5821
  //#region src/workload-state.svelte.ts
5802
- var Ar = class {
5822
+ var jr = class {
5803
5823
  client;
5804
5824
  projectId;
5805
5825
  initialOptions;
5806
- #e = new i();
5826
+ #e = new a();
5807
5827
  #t = t.state(null);
5808
5828
  get data() {
5809
5829
  return t.get(this.#t);
@@ -5922,13 +5942,13 @@ var Ar = class {
5922
5942
  this.#e.cancel();
5923
5943
  }
5924
5944
  };
5925
- function jr(e, t, n) {
5926
- return new Ar(e, t, n);
5945
+ function Mr(e, t, n) {
5946
+ return new jr(e, t, n);
5927
5947
  }
5928
5948
  //#endregion
5929
5949
  //#region src/index.ts
5930
- function Mr(t) {
5950
+ function Nr(t) {
5931
5951
  return new e(t);
5932
5952
  }
5933
5953
  //#endregion
5934
- export { ie as AttachmentState, ne as CommentState, wr as CriticalPathState, ce as DeliverableState, ue as DeliverableSummaryState, fe as KanbanState, a as ProjectState, oe as TaskActivityState, Or as TaskMetricsState, s as TaskState, me as TaskTransitionsState, Er as TimelineLadderState, Sr as WebMcpState, ee as WorkflowState, Ar as WorkloadState, ae as createAttachmentState, re as createCommentState, Mr as createCriticalPathClient, Tr as createCriticalPathState, le as createDeliverableState, de as createDeliverableSummaryState, pe as createKanbanState, o as createProjectState, se as createTaskActivityState, kr as createTaskMetricsState, c as createTaskState, he as createTaskTransitionsState, Dr as createTimelineLadderState, Cr as createWebMcpState, te as createWorkflowState, jr as createWorkloadState };
5954
+ export { ae as AttachmentState, re as CommentState, Tr as CriticalPathState, le as DeliverableState, de as DeliverableSummaryState, pe as KanbanState, o as ProjectState, se as TaskActivityState, kr as TaskMetricsState, c as TaskState, he as TaskTransitionsState, Dr as TimelineLadderState, Cr as WebMcpState, te as WorkflowState, jr as WorkloadState, oe as createAttachmentState, ie as createCommentState, Nr as createCriticalPathClient, Er as createCriticalPathState, ue as createDeliverableState, fe as createDeliverableSummaryState, me as createKanbanState, s as createProjectState, ce as createTaskActivityState, Ar as createTaskMetricsState, ee as createTaskState, ge as createTaskTransitionsState, Or as createTimelineLadderState, wr as createWebMcpState, ne as createWorkflowState, Mr as createWorkloadState };