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