@oomol-lab/open-flow 0.1.0-beta.23 → 0.1.0-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{createResourceDialog-PKbMMpEk.js → createResourceDialog-BwI2JmPE.js} +7 -7
- package/dist/browser/flow-authoring.js +249 -250
- package/dist/browser/flow-change.d.ts +16 -7
- package/dist/browser/flow-change.js +824 -804
- package/dist/browser/{flowChanges-BUlMz4iC.js → flowChanges-BqPtWEI9.js} +2706 -2906
- package/dist/browser/{flowWorkspace-DLArN17T.js → flowWorkspace-CpMGzmfz.js} +37249 -35916
- package/dist/browser/{inputValues-CcGVt51C.js → inputValues-CeeJw_G8.js} +1 -1
- package/dist/browser/licenses.md +24 -0
- package/dist/browser/{lite-Cy6aeiL6.js → lite-BuKZ8joP.js} +50 -43
- package/dist/browser/{input-group-C2frNYAx.js → switch-CyZ96-UF.js} +1519 -612
- package/dist/browser/theme.css +30 -4
- package/dist/browser/ui-input.d.ts +3 -1
- package/dist/browser/ui.css +1 -1
- package/dist/browser/ui.js +10 -8
- package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +753 -714
- package/dist/browser/{workbenchSelect-CPRUXKbf.js → workbenchSelect-BUu7CjUA.js} +504 -490
- package/dist/common/control-api-conformance.js +18 -18
- package/dist/common/control-api.d.ts +43 -15
- package/dist/common/control-api.js +1803 -1755
- package/dist/common/control-requests.js +2 -7
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-encoding.js +587 -589
- package/dist/common/flow-graph.d.ts +31 -1
- package/dist/common/flow-schema.d.ts +11 -1
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +1542 -1457
- package/dist/common/mcp.d.ts +1 -0
- package/dist/common/mcp.js +308 -260
- package/dist/common/provider-triggers.js +934 -931
- package/dist/common/run-lifecycle.d.ts +1 -1
- package/dist/common/run-lifecycle.js +5 -5
- package/dist/common/runtime-contract.d.ts +2 -0
- package/dist/common/runtime-contract.js +96 -32
- package/dist/common/scheduler.d.ts +39 -21
- package/dist/common/scheduler.js +2358 -2339
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ function e(e) {
|
|
|
4
4
|
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
5
5
|
}
|
|
6
6
|
function t(e, t = "|") {
|
|
7
|
-
return e.map((e) =>
|
|
7
|
+
return e.map((e) => ie(e)).join(t);
|
|
8
8
|
}
|
|
9
9
|
function n(e, t) {
|
|
10
10
|
return typeof t == "bigint" ? t.toString() : t;
|
|
@@ -90,14 +90,14 @@ var ne = /* @__PURE__*/ new Set([
|
|
|
90
90
|
"number",
|
|
91
91
|
"symbol"
|
|
92
92
|
]);
|
|
93
|
-
function
|
|
93
|
+
function re(e) {
|
|
94
94
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function g(e, t, n) {
|
|
97
97
|
let r = new e._zod.constr(t ?? e._zod.def);
|
|
98
98
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function _(e) {
|
|
101
101
|
let t = e;
|
|
102
102
|
if (!t) return {};
|
|
103
103
|
if (typeof t == "string") return { error: () => t };
|
|
@@ -110,23 +110,23 @@ function v(e) {
|
|
|
110
110
|
error: () => t.error
|
|
111
111
|
} : t;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ie(e) {
|
|
114
114
|
return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ae(e) {
|
|
117
117
|
return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
|
|
118
118
|
}
|
|
119
|
-
var
|
|
119
|
+
var oe = {
|
|
120
120
|
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
121
121
|
int32: [-2147483648, 2147483647],
|
|
122
122
|
uint32: [0, 4294967295],
|
|
123
123
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
124
124
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function se(e, t) {
|
|
127
127
|
let n = e._zod.def, r = n.checks;
|
|
128
128
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
129
|
-
return
|
|
129
|
+
return g(e, u(e._zod.def, {
|
|
130
130
|
get shape() {
|
|
131
131
|
let e = {};
|
|
132
132
|
for (let r of Reflect.ownKeys(t)) {
|
|
@@ -138,10 +138,10 @@ function oe(e, t) {
|
|
|
138
138
|
checks: []
|
|
139
139
|
}));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function ce(e, t) {
|
|
142
142
|
let n = e._zod.def, r = n.checks;
|
|
143
143
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
144
|
-
return
|
|
144
|
+
return g(e, u(e._zod.def, {
|
|
145
145
|
get shape() {
|
|
146
146
|
let r = { ...e._zod.def.shape };
|
|
147
147
|
for (let e of Reflect.ownKeys(t)) {
|
|
@@ -153,14 +153,14 @@ function se(e, t) {
|
|
|
153
153
|
checks: []
|
|
154
154
|
}));
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function le(e, t) {
|
|
157
157
|
if (!h(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
158
158
|
let n = e._zod.def.checks;
|
|
159
159
|
if (n && n.length > 0) {
|
|
160
160
|
let n = e._zod.def.shape;
|
|
161
161
|
for (let e of Reflect.ownKeys(t)) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return g(e, u(e._zod.def, { get shape() {
|
|
164
164
|
let n = {
|
|
165
165
|
...e._zod.def.shape,
|
|
166
166
|
...t
|
|
@@ -168,9 +168,9 @@ function ce(e, t) {
|
|
|
168
168
|
return l(this, "shape", n), n;
|
|
169
169
|
} }));
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function ue(e, t) {
|
|
172
172
|
if (!h(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
173
|
-
return
|
|
173
|
+
return g(e, u(e._zod.def, { get shape() {
|
|
174
174
|
let n = {
|
|
175
175
|
...e._zod.def.shape,
|
|
176
176
|
...t
|
|
@@ -178,10 +178,10 @@ function le(e, t) {
|
|
|
178
178
|
return l(this, "shape", n), n;
|
|
179
179
|
} }));
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function de(e, t) {
|
|
182
182
|
if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
|
|
183
183
|
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
184
|
-
return
|
|
184
|
+
return g(e, u(e._zod.def, {
|
|
185
185
|
get shape() {
|
|
186
186
|
let n = {
|
|
187
187
|
...e._zod.def.shape,
|
|
@@ -195,10 +195,10 @@ function ue(e, t) {
|
|
|
195
195
|
checks: t._zod.def.checks ?? []
|
|
196
196
|
}));
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function fe(e, t, n, r = "partial") {
|
|
199
199
|
let i = t._zod.def.checks;
|
|
200
200
|
if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
|
|
201
|
-
return
|
|
201
|
+
return g(t, u(t._zod.def, {
|
|
202
202
|
get shape() {
|
|
203
203
|
let r = t._zod.def.shape, i = { ...r };
|
|
204
204
|
if (n) for (let t of Reflect.ownKeys(n)) {
|
|
@@ -217,8 +217,8 @@ function de(e, t, n, r = "partial") {
|
|
|
217
217
|
checks: []
|
|
218
218
|
}));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return
|
|
220
|
+
function pe(e, t, n) {
|
|
221
|
+
return g(t, u(t._zod.def, { get shape() {
|
|
222
222
|
let r = t._zod.def.shape, i = { ...r };
|
|
223
223
|
if (n) for (let t of Reflect.ownKeys(n)) {
|
|
224
224
|
if (!Object.prototype.hasOwnProperty.call(i, t)) throw Error(`Unrecognized key: "${String(t)}"`);
|
|
@@ -234,48 +234,48 @@ function fe(e, t, n) {
|
|
|
234
234
|
return l(this, "shape", i), i;
|
|
235
235
|
} }));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function v(e, t = 0) {
|
|
238
238
|
if (e.aborted === !0) return !0;
|
|
239
239
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
240
240
|
return !1;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function me(e, t = 0) {
|
|
243
243
|
if (e.aborted === !0) return !0;
|
|
244
244
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
245
245
|
return !1;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function y(e, t) {
|
|
248
248
|
return t.map((t) => {
|
|
249
249
|
var n;
|
|
250
250
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function he(e) {
|
|
254
254
|
return typeof e == "string" ? e : e?.message;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ge(e, t, n) {
|
|
257
257
|
var r;
|
|
258
258
|
for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function b(e, t, n) {
|
|
261
261
|
var r;
|
|
262
262
|
let i = e.inst?._zod?.traits;
|
|
263
263
|
i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
|
|
264
|
-
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message :
|
|
264
|
+
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : he(e.inst?._zod.def?.error?.(e)) ?? he(a?.(e)) ?? he(t?.error?.(e)) ?? he(n.customError?.(e)) ?? he(n.localeError?.(e)) ?? "Invalid input", { inst: s, schema: c, continue: l, input: u, ...d } = e;
|
|
265
265
|
return d.path ??= [], d.message = o, t?.reportInput && (d.input = u), d;
|
|
266
266
|
}
|
|
267
|
-
var
|
|
268
|
-
function
|
|
267
|
+
var _e = /[\uD800-\uDBFF]/;
|
|
268
|
+
function ve(e) {
|
|
269
269
|
let t = e.length;
|
|
270
|
-
if (!
|
|
270
|
+
if (!_e.test(e)) return t;
|
|
271
271
|
let n = t;
|
|
272
272
|
for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
|
|
273
273
|
return n;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function ye(e) {
|
|
276
276
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function be(e) {
|
|
279
279
|
let t = typeof e;
|
|
280
280
|
switch (t) {
|
|
281
281
|
case "number": return Number.isNaN(e) ? "nan" : "number";
|
|
@@ -288,7 +288,7 @@ function ye(e) {
|
|
|
288
288
|
}
|
|
289
289
|
return t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function xe(...e) {
|
|
292
292
|
let [t, n, r] = e;
|
|
293
293
|
return typeof t == "string" ? {
|
|
294
294
|
message: t,
|
|
@@ -297,16 +297,16 @@ function be(...e) {
|
|
|
297
297
|
inst: r
|
|
298
298
|
} : { ...t };
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Se(e, t) {
|
|
301
301
|
for (let n in t) {
|
|
302
302
|
let r = Object.getOwnPropertyDescriptor(t, n);
|
|
303
303
|
r.get ? Object.defineProperty(e, n, {
|
|
304
304
|
...r,
|
|
305
305
|
enumerable: !1
|
|
306
|
-
}) :
|
|
306
|
+
}) : we(e, n, r.value);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function x(e, t, n, r = !0) {
|
|
310
310
|
return Object.defineProperty(e, t, {
|
|
311
311
|
configurable: !0,
|
|
312
312
|
writable: !0,
|
|
@@ -314,51 +314,51 @@ function S(e, t, n, r = !0) {
|
|
|
314
314
|
value: n
|
|
315
315
|
}), n;
|
|
316
316
|
}
|
|
317
|
-
function Se(e, t, n) {
|
|
318
|
-
return S(e, t, n, !1);
|
|
319
|
-
}
|
|
320
317
|
function Ce(e, t, n) {
|
|
318
|
+
return x(e, t, n, !1);
|
|
319
|
+
}
|
|
320
|
+
function we(e, t, n) {
|
|
321
321
|
Object.defineProperty(e, t, {
|
|
322
322
|
configurable: !0,
|
|
323
323
|
get() {
|
|
324
|
-
return this == null ? n :
|
|
324
|
+
return this == null ? n : x(this, t, n.bind(this));
|
|
325
325
|
},
|
|
326
326
|
set(e) {
|
|
327
|
-
|
|
327
|
+
x(this, t, e);
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Te(e, t) {
|
|
332
332
|
let n = Object.getPrototypeOf(e);
|
|
333
333
|
return t in n ? void 0 : n;
|
|
334
334
|
}
|
|
335
|
-
var
|
|
335
|
+
var Ee, S = !1, De = {
|
|
336
336
|
configurable: !0,
|
|
337
337
|
get() {
|
|
338
|
-
|
|
338
|
+
S = !0;
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
|
-
function
|
|
341
|
+
function C(e, t, n) {
|
|
342
342
|
let r = Object.getPrototypeOf(e._zod);
|
|
343
|
-
if (t in r &&
|
|
344
|
-
|
|
343
|
+
if (t in r && Ee !== e._zod) {
|
|
344
|
+
Ee = void 0;
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
Ee = e._zod, Object.defineProperty(r, t, {
|
|
348
348
|
configurable: !0,
|
|
349
349
|
get() {
|
|
350
|
-
Object.defineProperty(this, t,
|
|
351
|
-
let e =
|
|
352
|
-
|
|
350
|
+
Object.defineProperty(this, t, De);
|
|
351
|
+
let e = S;
|
|
352
|
+
S = !1;
|
|
353
353
|
try {
|
|
354
354
|
let r = n(this);
|
|
355
|
-
return
|
|
355
|
+
return S ? delete this[t] : Object.defineProperty(this, t, {
|
|
356
356
|
configurable: !0,
|
|
357
357
|
writable: !0,
|
|
358
358
|
value: r
|
|
359
|
-
}),
|
|
359
|
+
}), S ||= e, r;
|
|
360
360
|
} catch (n) {
|
|
361
|
-
throw delete this[t],
|
|
361
|
+
throw delete this[t], S ||= e, n;
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
set(e) {
|
|
@@ -370,8 +370,8 @@ function w(e, t, n) {
|
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
let i =
|
|
373
|
+
function Oe(e, t, n, r) {
|
|
374
|
+
let i = Te(e, t);
|
|
375
375
|
i && Object.defineProperty(i, t, {
|
|
376
376
|
configurable: !0,
|
|
377
377
|
get() {
|
|
@@ -393,26 +393,26 @@ function De(e, t, n, r) {
|
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
function
|
|
396
|
+
var ke = "~constantCatch";
|
|
397
|
+
function Ae(e) {
|
|
398
398
|
let t = () => e;
|
|
399
|
-
return t[
|
|
399
|
+
return t[ke] = !0, t;
|
|
400
400
|
}
|
|
401
401
|
//#endregion
|
|
402
402
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/core.js
|
|
403
|
-
var
|
|
403
|
+
var je, Me = {
|
|
404
404
|
value: void 0,
|
|
405
405
|
enumerable: !1
|
|
406
|
-
},
|
|
407
|
-
function
|
|
408
|
-
let t =
|
|
406
|
+
}, Ne = "captureStackTrace" in Error ? Error : null;
|
|
407
|
+
function Pe(e) {
|
|
408
|
+
let t = Ne;
|
|
409
409
|
if (t) {
|
|
410
410
|
let n = t.stackTraceLimit;
|
|
411
411
|
if (typeof n == "number") {
|
|
412
412
|
try {
|
|
413
413
|
t.stackTraceLimit = 0;
|
|
414
414
|
} catch {
|
|
415
|
-
return
|
|
415
|
+
return Ne = null, new e();
|
|
416
416
|
}
|
|
417
417
|
try {
|
|
418
418
|
return new e();
|
|
@@ -423,7 +423,7 @@ function Ne(e) {
|
|
|
423
423
|
}
|
|
424
424
|
return new e();
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function w(e, t, n, r) {
|
|
427
427
|
let i = {};
|
|
428
428
|
function a(e) {
|
|
429
429
|
this.def = e, this.constr = d, this.traits = /* @__PURE__ */ new Set();
|
|
@@ -432,11 +432,11 @@ function T(e, t, n, r) {
|
|
|
432
432
|
let o = n, s = o && /* @__PURE__ */ new WeakSet();
|
|
433
433
|
function c(n, r) {
|
|
434
434
|
if (!n._zod) {
|
|
435
|
-
|
|
435
|
+
Me.value = new a(r);
|
|
436
436
|
try {
|
|
437
|
-
Object.defineProperty(n, "_zod",
|
|
437
|
+
Object.defineProperty(n, "_zod", Me);
|
|
438
438
|
} finally {
|
|
439
|
-
|
|
439
|
+
Me.value = void 0;
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
if (n._zod.traits.has(e)) return;
|
|
@@ -444,7 +444,7 @@ function T(e, t, n, r) {
|
|
|
444
444
|
let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
|
|
445
445
|
for (; r && r !== t;) r = Object.getPrototypeOf(r);
|
|
446
446
|
let i = r ?? e;
|
|
447
|
-
s.has(i) || (s.add(i),
|
|
447
|
+
s.has(i) || (s.add(i), Se(i, o));
|
|
448
448
|
}
|
|
449
449
|
let i = d.prototype;
|
|
450
450
|
for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
|
|
@@ -453,7 +453,7 @@ function T(e, t, n, r) {
|
|
|
453
453
|
class u extends l {}
|
|
454
454
|
Object.defineProperty(u, "name", { value: e });
|
|
455
455
|
function d(e) {
|
|
456
|
-
let t = r?.Parent ?
|
|
456
|
+
let t = r?.Parent ? Pe(u) : this;
|
|
457
457
|
c(t, e);
|
|
458
458
|
let n = t._zod.deferred;
|
|
459
459
|
if (n) {
|
|
@@ -465,7 +465,7 @@ function T(e, t, n, r) {
|
|
|
465
465
|
}
|
|
466
466
|
return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
|
|
467
467
|
}
|
|
468
|
-
var
|
|
468
|
+
var T = class extends Error {
|
|
469
469
|
constructor() {
|
|
470
470
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
471
471
|
}
|
|
@@ -474,7 +474,7 @@ var Pe = class extends Error {
|
|
|
474
474
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
|
-
(
|
|
477
|
+
(je = globalThis).__zod_globalConfig ?? (je.__zod_globalConfig = {});
|
|
478
478
|
var E = globalThis.__zod_globalConfig;
|
|
479
479
|
function D(e) {
|
|
480
480
|
return e && Object.assign(E, e), E;
|
|
@@ -521,7 +521,7 @@ var Re = {
|
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
}));
|
|
524
|
-
}, Ue =
|
|
524
|
+
}, Ue = w("$ZodError", He), We = w("$ZodError", He, void 0, { Parent: Error });
|
|
525
525
|
function Ge(e, t, n) {
|
|
526
526
|
return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
527
527
|
value: n(),
|
|
@@ -585,9 +585,9 @@ var Ye = (e) => {
|
|
|
585
585
|
value: r,
|
|
586
586
|
issues: []
|
|
587
587
|
}, o);
|
|
588
|
-
if (s instanceof Promise) throw new
|
|
588
|
+
if (s instanceof Promise) throw new T();
|
|
589
589
|
if (s.issues.length) {
|
|
590
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) =>
|
|
590
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, D())));
|
|
591
591
|
throw p(n, a?.callee ?? t), n;
|
|
592
592
|
}
|
|
593
593
|
return s.value;
|
|
@@ -603,7 +603,7 @@ var Ye = (e) => {
|
|
|
603
603
|
issues: []
|
|
604
604
|
}, o);
|
|
605
605
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
606
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) =>
|
|
606
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, D())));
|
|
607
607
|
throw p(n, a?.callee ?? t), n;
|
|
608
608
|
}
|
|
609
609
|
return s.value;
|
|
@@ -617,10 +617,10 @@ var Ye = (e) => {
|
|
|
617
617
|
value: n,
|
|
618
618
|
issues: []
|
|
619
619
|
}, i);
|
|
620
|
-
if (a instanceof Promise) throw new
|
|
620
|
+
if (a instanceof Promise) throw new T();
|
|
621
621
|
return a.issues.length ? {
|
|
622
622
|
success: !1,
|
|
623
|
-
error: new (e ?? Ue)(a.issues.map((e) =>
|
|
623
|
+
error: new (e ?? Ue)(a.issues.map((e) => b(e, i, D())))
|
|
624
624
|
} : {
|
|
625
625
|
success: !0,
|
|
626
626
|
data: a.value
|
|
@@ -635,7 +635,7 @@ var Ye = (e) => {
|
|
|
635
635
|
}, i);
|
|
636
636
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
637
637
|
success: !1,
|
|
638
|
-
error: new e(a.issues.map((e) =>
|
|
638
|
+
error: new e(a.issues.map((e) => b(e, i, D())))
|
|
639
639
|
} : {
|
|
640
640
|
success: !0,
|
|
641
641
|
data: a.value
|
|
@@ -708,7 +708,7 @@ function Ft(e) {
|
|
|
708
708
|
var It = (e) => {
|
|
709
709
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
710
710
|
return RegExp(`^${t}$`);
|
|
711
|
-
}, Lt = /^-?\d+$/, Rt = /^-?\d+(?:\.\d+)?$/, zt = /^(?:true|false)$/i, Bt = /^null$/i, Vt = /^[^A-Z]*$/, Ht = /^[^a-z]*$/, O = /*@__PURE__*/
|
|
711
|
+
}, Lt = /^-?\d+$/, Rt = /^-?\d+(?:\.\d+)?$/, zt = /^(?:true|false)$/i, Bt = /^null$/i, Vt = /^[^A-Z]*$/, Ht = /^[^a-z]*$/, O = /*@__PURE__*/ w("$ZodCheck", (e, t) => {
|
|
712
712
|
var n;
|
|
713
713
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
714
714
|
}), Ut = (e) => {
|
|
@@ -718,7 +718,7 @@ var It = (e) => {
|
|
|
718
718
|
number: "number",
|
|
719
719
|
bigint: "bigint",
|
|
720
720
|
object: "date"
|
|
721
|
-
}, Gt = /*@__PURE__*/
|
|
721
|
+
}, Gt = /*@__PURE__*/ w("$ZodCheckLessThan", (e, t) => {
|
|
722
722
|
O.init(e, t);
|
|
723
723
|
let n = Wt[typeof t.value];
|
|
724
724
|
e._zod.onattach.push((e) => {
|
|
@@ -735,7 +735,7 @@ var It = (e) => {
|
|
|
735
735
|
continue: !t.abort
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
|
-
}), Kt = /*@__PURE__*/
|
|
738
|
+
}), Kt = /*@__PURE__*/ w("$ZodCheckGreaterThan", (e, t) => {
|
|
739
739
|
O.init(e, t);
|
|
740
740
|
let n = Wt[typeof t.value];
|
|
741
741
|
e._zod.onattach.push((e) => {
|
|
@@ -752,7 +752,7 @@ var It = (e) => {
|
|
|
752
752
|
continue: !t.abort
|
|
753
753
|
});
|
|
754
754
|
};
|
|
755
|
-
}), qt = /*@__PURE__*/
|
|
755
|
+
}), qt = /*@__PURE__*/ w("$ZodCheckMultipleOf", (e, t) => {
|
|
756
756
|
O.init(e, t), e._zod.onattach.push((e) => {
|
|
757
757
|
var n;
|
|
758
758
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
@@ -767,9 +767,9 @@ var It = (e) => {
|
|
|
767
767
|
continue: !t.abort
|
|
768
768
|
});
|
|
769
769
|
};
|
|
770
|
-
}), Jt = /*@__PURE__*/
|
|
770
|
+
}), Jt = /*@__PURE__*/ w("$ZodCheckNumberFormat", (e, t) => {
|
|
771
771
|
O.init(e, t), t.format = t.format || "float64";
|
|
772
|
-
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] =
|
|
772
|
+
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = oe[t.format];
|
|
773
773
|
e._zod.onattach.push((e) => {
|
|
774
774
|
let r = e._zod.bag;
|
|
775
775
|
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Lt);
|
|
@@ -828,15 +828,15 @@ var It = (e) => {
|
|
|
828
828
|
continue: !t.abort
|
|
829
829
|
});
|
|
830
830
|
};
|
|
831
|
-
}), Yt = /*@__PURE__*/
|
|
831
|
+
}), Yt = /*@__PURE__*/ w("$ZodCheckMaxLength", (e, t) => {
|
|
832
832
|
var n;
|
|
833
833
|
O.init(e, t), (n = e._zod.def).when ?? (n.when = Ut), e._zod.onattach.push((e) => {
|
|
834
834
|
let n = e._zod.bag.maximum ?? Infinity;
|
|
835
835
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
836
836
|
}), e._zod.check = (n) => {
|
|
837
837
|
let r = n.value, i = r.length;
|
|
838
|
-
if ((typeof r == "string" && i > t.maximum ?
|
|
839
|
-
let a =
|
|
838
|
+
if ((typeof r == "string" && i > t.maximum ? ve(r) : i) <= t.maximum) return;
|
|
839
|
+
let a = ye(r);
|
|
840
840
|
n.issues.push({
|
|
841
841
|
origin: a,
|
|
842
842
|
code: "too_big",
|
|
@@ -847,15 +847,15 @@ var It = (e) => {
|
|
|
847
847
|
continue: !t.abort
|
|
848
848
|
});
|
|
849
849
|
};
|
|
850
|
-
}), Xt = /*@__PURE__*/
|
|
850
|
+
}), Xt = /*@__PURE__*/ w("$ZodCheckMinLength", (e, t) => {
|
|
851
851
|
var n;
|
|
852
852
|
O.init(e, t), (n = e._zod.def).when ?? (n.when = Ut), e._zod.onattach.push((e) => {
|
|
853
853
|
let n = e._zod.bag.minimum ?? -Infinity;
|
|
854
854
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
855
855
|
}), e._zod.check = (n) => {
|
|
856
856
|
let r = n.value, i = r.length;
|
|
857
|
-
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ?
|
|
858
|
-
let a =
|
|
857
|
+
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? ve(r) : i) >= t.minimum) return;
|
|
858
|
+
let a = ye(r);
|
|
859
859
|
n.issues.push({
|
|
860
860
|
origin: a,
|
|
861
861
|
code: "too_small",
|
|
@@ -866,15 +866,15 @@ var It = (e) => {
|
|
|
866
866
|
continue: !t.abort
|
|
867
867
|
});
|
|
868
868
|
};
|
|
869
|
-
}), Zt = /*@__PURE__*/
|
|
869
|
+
}), Zt = /*@__PURE__*/ w("$ZodCheckLengthEquals", (e, t) => {
|
|
870
870
|
var n;
|
|
871
871
|
O.init(e, t), (n = e._zod.def).when ?? (n.when = Ut), e._zod.onattach.push((e) => {
|
|
872
872
|
let n = e._zod.bag;
|
|
873
873
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
874
874
|
}), e._zod.check = (n) => {
|
|
875
|
-
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ?
|
|
875
|
+
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? ve(r) : i;
|
|
876
876
|
if (a === t.length) return;
|
|
877
|
-
let o =
|
|
877
|
+
let o = ye(r), s = a > t.length;
|
|
878
878
|
n.issues.push({
|
|
879
879
|
origin: o,
|
|
880
880
|
...s ? {
|
|
@@ -891,7 +891,7 @@ var It = (e) => {
|
|
|
891
891
|
continue: !t.abort
|
|
892
892
|
});
|
|
893
893
|
};
|
|
894
|
-
}), Qt = /*@__PURE__*/
|
|
894
|
+
}), Qt = /*@__PURE__*/ w("$ZodCheckStringFormat", (e, t) => {
|
|
895
895
|
var n, r;
|
|
896
896
|
O.init(e, t), e._zod.onattach.push((e) => {
|
|
897
897
|
let n = e._zod.bag;
|
|
@@ -907,7 +907,7 @@ var It = (e) => {
|
|
|
907
907
|
continue: !t.abort
|
|
908
908
|
});
|
|
909
909
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
910
|
-
}), $t = /*@__PURE__*/
|
|
910
|
+
}), $t = /*@__PURE__*/ w("$ZodCheckRegex", (e, t) => {
|
|
911
911
|
Qt.init(e, t), e._zod.check = (n) => {
|
|
912
912
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
913
913
|
origin: "string",
|
|
@@ -919,13 +919,13 @@ var It = (e) => {
|
|
|
919
919
|
continue: !t.abort
|
|
920
920
|
});
|
|
921
921
|
};
|
|
922
|
-
}), en = /*@__PURE__*/
|
|
922
|
+
}), en = /*@__PURE__*/ w("$ZodCheckLowerCase", (e, t) => {
|
|
923
923
|
t.pattern ??= Vt, Qt.init(e, t);
|
|
924
|
-
}), tn = /*@__PURE__*/
|
|
924
|
+
}), tn = /*@__PURE__*/ w("$ZodCheckUpperCase", (e, t) => {
|
|
925
925
|
t.pattern ??= Ht, Qt.init(e, t);
|
|
926
|
-
}), nn = /*@__PURE__*/
|
|
926
|
+
}), nn = /*@__PURE__*/ w("$ZodCheckIncludes", (e, t) => {
|
|
927
927
|
O.init(e, t);
|
|
928
|
-
let n =
|
|
928
|
+
let n = re(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
|
|
929
929
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
930
930
|
let t = e._zod.bag;
|
|
931
931
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
@@ -940,9 +940,9 @@ var It = (e) => {
|
|
|
940
940
|
continue: !t.abort
|
|
941
941
|
});
|
|
942
942
|
};
|
|
943
|
-
}), rn = /*@__PURE__*/
|
|
943
|
+
}), rn = /*@__PURE__*/ w("$ZodCheckStartsWith", (e, t) => {
|
|
944
944
|
O.init(e, t);
|
|
945
|
-
let n = RegExp(`^${
|
|
945
|
+
let n = RegExp(`^${re(t.prefix)}.*`);
|
|
946
946
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
947
947
|
let t = e._zod.bag;
|
|
948
948
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -957,9 +957,9 @@ var It = (e) => {
|
|
|
957
957
|
continue: !t.abort
|
|
958
958
|
});
|
|
959
959
|
};
|
|
960
|
-
}), an = /*@__PURE__*/
|
|
960
|
+
}), an = /*@__PURE__*/ w("$ZodCheckEndsWith", (e, t) => {
|
|
961
961
|
O.init(e, t);
|
|
962
|
-
let n = RegExp(`.*${
|
|
962
|
+
let n = RegExp(`.*${re(t.suffix)}$`);
|
|
963
963
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
964
964
|
let t = e._zod.bag;
|
|
965
965
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -974,7 +974,7 @@ var It = (e) => {
|
|
|
974
974
|
continue: !t.abort
|
|
975
975
|
});
|
|
976
976
|
};
|
|
977
|
-
}), on = /*@__PURE__*/
|
|
977
|
+
}), on = /*@__PURE__*/ w("$ZodCheckOverwrite", (e, t) => {
|
|
978
978
|
O.init(e, t), e._zod.check = (e) => {
|
|
979
979
|
e.value = t.tx(e.value);
|
|
980
980
|
};
|
|
@@ -1001,7 +1001,7 @@ var It = (e) => {
|
|
|
1001
1001
|
major: 4,
|
|
1002
1002
|
minor: 5,
|
|
1003
1003
|
patch: 4
|
|
1004
|
-
}, k = /*@__PURE__*/
|
|
1004
|
+
}, k = /*@__PURE__*/ w("$ZodType", (e, t) => {
|
|
1005
1005
|
var n;
|
|
1006
1006
|
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = cn;
|
|
1007
1007
|
let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
@@ -1012,27 +1012,27 @@ var It = (e) => {
|
|
|
1012
1012
|
else {
|
|
1013
1013
|
let t = (t, n, r) => {
|
|
1014
1014
|
if (t.memo) return t;
|
|
1015
|
-
let i =
|
|
1015
|
+
let i = v(t), a;
|
|
1016
1016
|
for (let o of n) {
|
|
1017
1017
|
if (o._zod.def.when) {
|
|
1018
|
-
if (
|
|
1018
|
+
if (me(t) || !o._zod.def.when(t)) continue;
|
|
1019
1019
|
} else if (i) continue;
|
|
1020
1020
|
let n = t.issues.length, s = o._zod.check(t);
|
|
1021
|
-
if (s instanceof Promise && r?.async === !1) throw new
|
|
1021
|
+
if (s instanceof Promise && r?.async === !1) throw new T();
|
|
1022
1022
|
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1023
|
-
await s, t.issues.length !== n && (
|
|
1023
|
+
await s, t.issues.length !== n && (ge(t.issues, n, e), i ||= v(t, n));
|
|
1024
1024
|
});
|
|
1025
1025
|
else {
|
|
1026
1026
|
if (t.issues.length === n) continue;
|
|
1027
|
-
|
|
1027
|
+
ge(t.issues, n, e), i ||= v(t, n);
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
return a ? a.then(() => t) : t;
|
|
1031
1031
|
}, n = (n, r, a) => {
|
|
1032
|
-
if (
|
|
1032
|
+
if (v(n)) return n.aborted = !0, n;
|
|
1033
1033
|
let o = t(r, i, a);
|
|
1034
1034
|
if (o instanceof Promise) {
|
|
1035
|
-
if (a.async === !1) throw new
|
|
1035
|
+
if (a.async === !1) throw new T();
|
|
1036
1036
|
return o.then((t) => e._zod.parse(t, a));
|
|
1037
1037
|
}
|
|
1038
1038
|
return e._zod.parse(o, a);
|
|
@@ -1051,7 +1051,7 @@ var It = (e) => {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
let o = e._zod.parse(r, a);
|
|
1053
1053
|
if (o instanceof Promise) {
|
|
1054
|
-
if (a.async === !1) throw new
|
|
1054
|
+
if (a.async === !1) throw new T();
|
|
1055
1055
|
return o.then((e) => t(e, i, a));
|
|
1056
1056
|
}
|
|
1057
1057
|
return t(o, i, a);
|
|
@@ -1059,10 +1059,10 @@ var It = (e) => {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}, {
|
|
1061
1061
|
get "~standard"() {
|
|
1062
|
-
return
|
|
1062
|
+
return Ce(this, "~standard", un(this));
|
|
1063
1063
|
},
|
|
1064
1064
|
set "~standard"(e) {
|
|
1065
|
-
|
|
1065
|
+
x(this, "~standard", e);
|
|
1066
1066
|
}
|
|
1067
1067
|
}), ln = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
|
|
1068
1068
|
function un(e) {
|
|
@@ -1078,7 +1078,7 @@ function un(e) {
|
|
|
1078
1078
|
version: 1
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
|
-
var dn = /*@__PURE__*/
|
|
1081
|
+
var dn = /*@__PURE__*/ w("$ZodString", (e, t) => {
|
|
1082
1082
|
k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? It(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1083
1083
|
if (t.coerce) try {
|
|
1084
1084
|
n.value = String(n.value);
|
|
@@ -1090,11 +1090,11 @@ var dn = /*@__PURE__*/ T("$ZodString", (e, t) => {
|
|
|
1090
1090
|
inst: e
|
|
1091
1091
|
}), n;
|
|
1092
1092
|
};
|
|
1093
|
-
}), A = /*@__PURE__*/
|
|
1093
|
+
}), A = /*@__PURE__*/ w("$ZodStringFormat", (e, t) => {
|
|
1094
1094
|
Qt.init(e, t), dn.init(e, t);
|
|
1095
|
-
}), fn = /*@__PURE__*/
|
|
1095
|
+
}), fn = /*@__PURE__*/ w("$ZodGUID", (e, t) => {
|
|
1096
1096
|
t.pattern ??= _t, A.init(e, t);
|
|
1097
|
-
}), pn = /*@__PURE__*/
|
|
1097
|
+
}), pn = /*@__PURE__*/ w("$ZodUUID", (e, t) => {
|
|
1098
1098
|
if (t.version) {
|
|
1099
1099
|
let e = {
|
|
1100
1100
|
v1: 1,
|
|
@@ -1110,7 +1110,7 @@ var dn = /*@__PURE__*/ T("$ZodString", (e, t) => {
|
|
|
1110
1110
|
t.pattern ??= vt(e);
|
|
1111
1111
|
} else t.pattern ??= vt();
|
|
1112
1112
|
A.init(e, t);
|
|
1113
|
-
}), mn = /*@__PURE__*/
|
|
1113
|
+
}), mn = /*@__PURE__*/ w("$ZodEmail", (e, t) => {
|
|
1114
1114
|
t.pattern ??= yt, A.init(e, t);
|
|
1115
1115
|
});
|
|
1116
1116
|
function hn(e, t) {
|
|
@@ -1131,7 +1131,7 @@ function vn(e, t) {
|
|
|
1131
1131
|
function yn(e, t) {
|
|
1132
1132
|
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
1133
1133
|
}
|
|
1134
|
-
var bn = /*@__PURE__*/
|
|
1134
|
+
var bn = /*@__PURE__*/ w("$ZodURL", (e, t) => {
|
|
1135
1135
|
A.init(e, t), e._zod.check = (n) => {
|
|
1136
1136
|
try {
|
|
1137
1137
|
let r = n.value.trim(), i = hn(r, t);
|
|
@@ -1184,32 +1184,32 @@ var bn = /*@__PURE__*/ T("$ZodURL", (e, t) => {
|
|
|
1184
1184
|
});
|
|
1185
1185
|
}
|
|
1186
1186
|
};
|
|
1187
|
-
}), xn = /*@__PURE__*/
|
|
1187
|
+
}), xn = /*@__PURE__*/ w("$ZodEmoji", (e, t) => {
|
|
1188
1188
|
t.pattern ??= xt(), A.init(e, t);
|
|
1189
|
-
}), Sn = /*@__PURE__*/
|
|
1189
|
+
}), Sn = /*@__PURE__*/ w("$ZodNanoID", (e, t) => {
|
|
1190
1190
|
if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
|
|
1191
1191
|
t.pattern ??= t.length === void 0 ? mt : ht(t.length), A.init(e, t);
|
|
1192
|
-
}), Cn = /*@__PURE__*/
|
|
1192
|
+
}), Cn = /*@__PURE__*/ w("$ZodCUID", (e, t) => {
|
|
1193
1193
|
t.pattern ??= lt, A.init(e, t);
|
|
1194
|
-
}), wn = /*@__PURE__*/
|
|
1194
|
+
}), wn = /*@__PURE__*/ w("$ZodCUID2", (e, t) => {
|
|
1195
1195
|
t.pattern ??= ut, A.init(e, t);
|
|
1196
|
-
}), Tn = /*@__PURE__*/
|
|
1196
|
+
}), Tn = /*@__PURE__*/ w("$ZodULID", (e, t) => {
|
|
1197
1197
|
t.pattern ??= dt, A.init(e, t);
|
|
1198
|
-
}), En = /*@__PURE__*/
|
|
1198
|
+
}), En = /*@__PURE__*/ w("$ZodXID", (e, t) => {
|
|
1199
1199
|
t.pattern ??= ft, A.init(e, t);
|
|
1200
|
-
}), Dn = /*@__PURE__*/
|
|
1200
|
+
}), Dn = /*@__PURE__*/ w("$ZodKSUID", (e, t) => {
|
|
1201
1201
|
t.pattern ??= pt, A.init(e, t);
|
|
1202
|
-
}), On = /*@__PURE__*/
|
|
1202
|
+
}), On = /*@__PURE__*/ w("$ZodISODateTime", (e, t) => {
|
|
1203
1203
|
t.pattern ??= Ft(t), A.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
|
|
1204
1204
|
e._zod.bag.laxFormat = !0;
|
|
1205
1205
|
}));
|
|
1206
|
-
}), kn = /*@__PURE__*/
|
|
1206
|
+
}), kn = /*@__PURE__*/ w("$ZodISODate", (e, t) => {
|
|
1207
1207
|
t.pattern ??= Mt, A.init(e, t);
|
|
1208
|
-
}), An = /*@__PURE__*/
|
|
1208
|
+
}), An = /*@__PURE__*/ w("$ZodISOTime", (e, t) => {
|
|
1209
1209
|
t.pattern ??= Pt(t), A.init(e, t);
|
|
1210
|
-
}), jn = /*@__PURE__*/
|
|
1210
|
+
}), jn = /*@__PURE__*/ w("$ZodISODuration", (e, t) => {
|
|
1211
1211
|
t.pattern ??= gt, A.init(e, t);
|
|
1212
|
-
}), Mn = /*@__PURE__*/
|
|
1212
|
+
}), Mn = /*@__PURE__*/ w("$ZodIPv4", (e, t) => {
|
|
1213
1213
|
t.pattern ??= St, A.init(e, t), e._zod.bag.format = "ipv4";
|
|
1214
1214
|
}), Nn = /^[0-9a-fA-F:.]+$/;
|
|
1215
1215
|
function Pn(e) {
|
|
@@ -1220,7 +1220,7 @@ function Pn(e) {
|
|
|
1220
1220
|
return !1;
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
var Fn = /*@__PURE__*/
|
|
1223
|
+
var Fn = /*@__PURE__*/ w("$ZodIPv6", (e, t) => {
|
|
1224
1224
|
t.pattern ??= Ct, A.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1225
1225
|
Pn(n.value) || n.issues.push({
|
|
1226
1226
|
code: "invalid_format",
|
|
@@ -1230,7 +1230,7 @@ var Fn = /*@__PURE__*/ T("$ZodIPv6", (e, t) => {
|
|
|
1230
1230
|
continue: !t.abort
|
|
1231
1231
|
});
|
|
1232
1232
|
};
|
|
1233
|
-
}), In = /*@__PURE__*/
|
|
1233
|
+
}), In = /*@__PURE__*/ w("$ZodCIDRv4", (e, t) => {
|
|
1234
1234
|
t.pattern ??= wt, A.init(e, t);
|
|
1235
1235
|
});
|
|
1236
1236
|
function Ln(e) {
|
|
@@ -1241,7 +1241,7 @@ function Ln(e) {
|
|
|
1241
1241
|
let i = Number(r);
|
|
1242
1242
|
return `${i}` !== r || i < 0 || i > 128 ? !1 : Pn(n);
|
|
1243
1243
|
}
|
|
1244
|
-
var Rn = /*@__PURE__*/
|
|
1244
|
+
var Rn = /*@__PURE__*/ w("$ZodCIDRv6", (e, t) => {
|
|
1245
1245
|
t.pattern ??= Tt, A.init(e, t), e._zod.check = (n) => {
|
|
1246
1246
|
Ln(n.value) || n.issues.push({
|
|
1247
1247
|
code: "invalid_format",
|
|
@@ -1261,7 +1261,7 @@ function zn(e) {
|
|
|
1261
1261
|
return !1;
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
var Bn = /*@__PURE__*/
|
|
1264
|
+
var Bn = /*@__PURE__*/ w("$ZodBase64", (e, t) => {
|
|
1265
1265
|
t.pattern ??= Et, A.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1266
1266
|
zn(n.value) || n.issues.push({
|
|
1267
1267
|
code: "invalid_format",
|
|
@@ -1277,7 +1277,7 @@ function Vn(e) {
|
|
|
1277
1277
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1278
1278
|
return zn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1279
1279
|
}
|
|
1280
|
-
var Hn = /*@__PURE__*/
|
|
1280
|
+
var Hn = /*@__PURE__*/ w("$ZodBase64URL", (e, t) => {
|
|
1281
1281
|
t.pattern ??= Dt, A.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1282
1282
|
Vn(n.value) || n.issues.push({
|
|
1283
1283
|
code: "invalid_format",
|
|
@@ -1287,7 +1287,7 @@ var Hn = /*@__PURE__*/ T("$ZodBase64URL", (e, t) => {
|
|
|
1287
1287
|
continue: !t.abort
|
|
1288
1288
|
});
|
|
1289
1289
|
};
|
|
1290
|
-
}), Un = /*@__PURE__*/
|
|
1290
|
+
}), Un = /*@__PURE__*/ w("$ZodE164", (e, t) => {
|
|
1291
1291
|
t.pattern ??= kt, A.init(e, t);
|
|
1292
1292
|
});
|
|
1293
1293
|
function Wn(e, t = null) {
|
|
@@ -1302,7 +1302,7 @@ function Wn(e, t = null) {
|
|
|
1302
1302
|
return !1;
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
var Gn = /*@__PURE__*/
|
|
1305
|
+
var Gn = /*@__PURE__*/ w("$ZodJWT", (e, t) => {
|
|
1306
1306
|
A.init(e, t), e._zod.check = (n) => {
|
|
1307
1307
|
Wn(n.value, t.alg) || n.issues.push({
|
|
1308
1308
|
code: "invalid_format",
|
|
@@ -1312,7 +1312,7 @@ var Gn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1312
1312
|
continue: !t.abort
|
|
1313
1313
|
});
|
|
1314
1314
|
};
|
|
1315
|
-
}), Kn = /*@__PURE__*/
|
|
1315
|
+
}), Kn = /*@__PURE__*/ w("$ZodNumber", (e, t) => {
|
|
1316
1316
|
k.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Rt, e._zod.parse = (n, r) => {
|
|
1317
1317
|
if (t.coerce) try {
|
|
1318
1318
|
n.value = Number(n.value);
|
|
@@ -1328,9 +1328,9 @@ var Gn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1328
1328
|
...a ? { received: a } : {}
|
|
1329
1329
|
}), n;
|
|
1330
1330
|
};
|
|
1331
|
-
}), qn = /*@__PURE__*/
|
|
1331
|
+
}), qn = /*@__PURE__*/ w("$ZodNumberFormat", (e, t) => {
|
|
1332
1332
|
Jt.init(e, t), Kn.init(e, t);
|
|
1333
|
-
}), Jn = /*@__PURE__*/
|
|
1333
|
+
}), Jn = /*@__PURE__*/ w("$ZodBoolean", (e, t) => {
|
|
1334
1334
|
k.init(e, t), e._zod.pattern = zt, e._zod.parse = (n, r) => {
|
|
1335
1335
|
if (t.coerce) try {
|
|
1336
1336
|
n.value = !!n.value;
|
|
@@ -1343,7 +1343,7 @@ var Gn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1343
1343
|
inst: e
|
|
1344
1344
|
}), n;
|
|
1345
1345
|
};
|
|
1346
|
-
}), Yn = /*@__PURE__*/
|
|
1346
|
+
}), Yn = /*@__PURE__*/ w("$ZodNull", (e, t) => {
|
|
1347
1347
|
k.init(e, t), e._zod.pattern = Bt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
|
|
1348
1348
|
let r = t.value;
|
|
1349
1349
|
return r === null || t.issues.push({
|
|
@@ -1353,9 +1353,9 @@ var Gn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1353
1353
|
inst: e
|
|
1354
1354
|
}), t;
|
|
1355
1355
|
};
|
|
1356
|
-
}), Xn = /*@__PURE__*/
|
|
1356
|
+
}), Xn = /*@__PURE__*/ w("$ZodUnknown", (e, t) => {
|
|
1357
1357
|
k.init(e, t), e._zod.parse = (e) => e;
|
|
1358
|
-
}), Zn = /*@__PURE__*/
|
|
1358
|
+
}), Zn = /*@__PURE__*/ w("$ZodNever", (e, t) => {
|
|
1359
1359
|
k.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1360
1360
|
expected: "never",
|
|
1361
1361
|
code: "invalid_type",
|
|
@@ -1364,9 +1364,9 @@ var Gn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1364
1364
|
}), t);
|
|
1365
1365
|
});
|
|
1366
1366
|
function Qn(e, t, n) {
|
|
1367
|
-
e.issues.length && t.issues.push(...
|
|
1367
|
+
e.issues.length && t.issues.push(...y(n, e.issues)), t.value[n] = e.value;
|
|
1368
1368
|
}
|
|
1369
|
-
var $n = /*@__PURE__*/
|
|
1369
|
+
var $n = /*@__PURE__*/ w("$ZodArray", (e, t) => {
|
|
1370
1370
|
k.init(e, t);
|
|
1371
1371
|
let n = E.memoizer;
|
|
1372
1372
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
@@ -1394,7 +1394,7 @@ function er(e, t, n, r, i, a) {
|
|
|
1394
1394
|
if (!(!o && s && i === "optional")) {
|
|
1395
1395
|
if (e.issues.length) {
|
|
1396
1396
|
if (i !== void 0 && s && !o) return;
|
|
1397
|
-
t.issues.push(...
|
|
1397
|
+
t.issues.push(...y(n, e.issues));
|
|
1398
1398
|
}
|
|
1399
1399
|
if (!o && i === void 0) {
|
|
1400
1400
|
e.issues.length || t.issues.push({
|
|
@@ -1412,7 +1412,7 @@ var tr = [];
|
|
|
1412
1412
|
function nr(e) {
|
|
1413
1413
|
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : tr, i = r.length ? [...t, ...r] : t;
|
|
1414
1414
|
for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
|
|
1415
|
-
let a =
|
|
1415
|
+
let a = ae(e.shape);
|
|
1416
1416
|
return {
|
|
1417
1417
|
...e,
|
|
1418
1418
|
allKeys: i,
|
|
@@ -1448,7 +1448,7 @@ function rr(e, t, n, r, i, a) {
|
|
|
1448
1448
|
continue: !0
|
|
1449
1449
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1450
1450
|
}
|
|
1451
|
-
var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/
|
|
1451
|
+
var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ w("$ZodObject", (e, t) => {
|
|
1452
1452
|
if (k.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1453
1453
|
let e = t.shape;
|
|
1454
1454
|
ir.set(t, e), Object.defineProperty(t, "shape", { get: () => {
|
|
@@ -1457,7 +1457,7 @@ var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1457
1457
|
} });
|
|
1458
1458
|
}
|
|
1459
1459
|
let n = r(() => nr(t));
|
|
1460
|
-
|
|
1460
|
+
C(e, "propValues", (e) => {
|
|
1461
1461
|
let t = e.def.shape, n = {};
|
|
1462
1462
|
for (let e in t) {
|
|
1463
1463
|
let r = t[e]._zod;
|
|
@@ -1491,7 +1491,7 @@ var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1491
1491
|
}
|
|
1492
1492
|
return a ? rr(l, c, t, r, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
|
|
1493
1493
|
};
|
|
1494
|
-
}), or = /*@__PURE__*/
|
|
1494
|
+
}), or = /*@__PURE__*/ w("$ZodObjectJIT", (e, t) => {
|
|
1495
1495
|
ar.init(e, t);
|
|
1496
1496
|
let n = e._zod.parse, i = r(() => nr(t)), a = E.memoizer, o = (t) => {
|
|
1497
1497
|
let n = i.value, r = n.symbolKeys, o = new sn(["payload", "ctx"], {
|
|
@@ -1572,18 +1572,18 @@ var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1572
1572
|
});
|
|
1573
1573
|
function sr(e, t, n, r) {
|
|
1574
1574
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1575
|
-
let i = e.filter((e) => !
|
|
1575
|
+
let i = e.filter((e) => !v(e));
|
|
1576
1576
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1577
1577
|
code: "invalid_union",
|
|
1578
1578
|
input: t.value,
|
|
1579
1579
|
inst: n,
|
|
1580
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1580
|
+
errors: e.map((e) => e.issues.map((e) => b(e, r, D())))
|
|
1581
1581
|
}), t);
|
|
1582
1582
|
}
|
|
1583
|
-
var cr = /*@__PURE__*/
|
|
1584
|
-
k.init(e, t),
|
|
1583
|
+
var cr = /*@__PURE__*/ w("$ZodUnion", (e, t) => {
|
|
1584
|
+
k.init(e, t), C(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), C(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), C(e, "values", (e) => {
|
|
1585
1585
|
if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1586
|
-
}),
|
|
1586
|
+
}), C(e, "pattern", (e) => {
|
|
1587
1587
|
if (e.def.options.every((e) => e._zod.pattern)) {
|
|
1588
1588
|
let t = e.def.options.map((e) => e._zod.pattern);
|
|
1589
1589
|
return RegExp(`^(${t.map((e) => a(e.source)).join("|")})$`);
|
|
@@ -1606,7 +1606,7 @@ var cr = /*@__PURE__*/ T("$ZodUnion", (e, t) => {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return a ? Promise.all(o).then((t) => sr(t, r, e, i)) : sr(o, r, e, i);
|
|
1608
1608
|
};
|
|
1609
|
-
}), lr = /*@__PURE__*/
|
|
1609
|
+
}), lr = /*@__PURE__*/ w("$ZodIntersection", (e, t) => {
|
|
1610
1610
|
k.init(e, t), e._zod.parse = (e, n) => {
|
|
1611
1611
|
let r = e.value, i = t.left._zod.run({
|
|
1612
1612
|
value: r,
|
|
@@ -1691,12 +1691,12 @@ function dr(e, t, n) {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
let c = ur(t.value, n.value);
|
|
1693
1693
|
if (!c.valid) {
|
|
1694
|
-
if (
|
|
1694
|
+
if (v(e)) return e;
|
|
1695
1695
|
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
1696
1696
|
}
|
|
1697
1697
|
return e.value = c.data, e;
|
|
1698
1698
|
}
|
|
1699
|
-
var fr = /*@__PURE__*/
|
|
1699
|
+
var fr = /*@__PURE__*/ w("$ZodTuple", (e, t) => {
|
|
1700
1700
|
k.init(e, t);
|
|
1701
1701
|
let n = t.items, r = E.memoizer;
|
|
1702
1702
|
r?.attach(e), e._zod.parse = (i, a) => {
|
|
@@ -1756,7 +1756,7 @@ function pr(e, t) {
|
|
|
1756
1756
|
return 0;
|
|
1757
1757
|
}
|
|
1758
1758
|
function mr(e, t, n) {
|
|
1759
|
-
e.issues.length && t.issues.push(...
|
|
1759
|
+
e.issues.length && t.issues.push(...y(n, e.issues)), t.value[n] = e.value;
|
|
1760
1760
|
}
|
|
1761
1761
|
function hr(e, t, n, r, i) {
|
|
1762
1762
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -1770,14 +1770,14 @@ function hr(e, t, n, r, i) {
|
|
|
1770
1770
|
t.value.length = a;
|
|
1771
1771
|
break;
|
|
1772
1772
|
}
|
|
1773
|
-
t.issues.push(...
|
|
1773
|
+
t.issues.push(...y(a, o.issues));
|
|
1774
1774
|
}
|
|
1775
1775
|
t.value[a] = o.value;
|
|
1776
1776
|
}
|
|
1777
1777
|
for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
|
|
1778
1778
|
return t;
|
|
1779
1779
|
}
|
|
1780
|
-
var gr = /*@__PURE__*/
|
|
1780
|
+
var gr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
1781
1781
|
k.init(e, t);
|
|
1782
1782
|
let n = E.memoizer;
|
|
1783
1783
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
@@ -1803,7 +1803,7 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1803
1803
|
r.issues.push({
|
|
1804
1804
|
code: "invalid_key",
|
|
1805
1805
|
origin: "record",
|
|
1806
|
-
issues: s.issues.map((e) =>
|
|
1806
|
+
issues: s.issues.map((e) => b(e, i, D())),
|
|
1807
1807
|
input: n,
|
|
1808
1808
|
path: [n],
|
|
1809
1809
|
inst: e
|
|
@@ -1817,8 +1817,8 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1817
1817
|
issues: []
|
|
1818
1818
|
}, i);
|
|
1819
1819
|
u instanceof Promise ? o.push(u.then((e) => {
|
|
1820
|
-
e.issues.length && r.issues.push(...
|
|
1821
|
-
})) : (u.issues.length && r.issues.push(...
|
|
1820
|
+
e.issues.length && r.issues.push(...y(n, e.issues)), r.value[l] = e.value;
|
|
1821
|
+
})) : (u.issues.length && r.issues.push(...y(n, u.issues)), r.value[l] = u.value);
|
|
1822
1822
|
}
|
|
1823
1823
|
let l;
|
|
1824
1824
|
for (let e in a) if (!c.has(e)) {
|
|
@@ -1856,7 +1856,7 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1856
1856
|
t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
|
|
1857
1857
|
code: "invalid_key",
|
|
1858
1858
|
origin: "record",
|
|
1859
|
-
issues: l.issues.map((e) =>
|
|
1859
|
+
issues: l.issues.map((e) => b(e, i, D())),
|
|
1860
1860
|
input: n,
|
|
1861
1861
|
path: [n],
|
|
1862
1862
|
inst: e
|
|
@@ -1870,8 +1870,8 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1870
1870
|
issues: []
|
|
1871
1871
|
}, i);
|
|
1872
1872
|
d instanceof Promise ? o.push(d.then((e) => {
|
|
1873
|
-
e.issues.length && r.issues.push(...
|
|
1874
|
-
})) : (d.issues.length && r.issues.push(...
|
|
1873
|
+
e.issues.length && r.issues.push(...y(n, e.issues)), r.value[u] = e.value;
|
|
1874
|
+
})) : (d.issues.length && r.issues.push(...y(n, d.issues)), r.value[u] = d.value);
|
|
1875
1875
|
}
|
|
1876
1876
|
c && c.length > 0 && r.issues.push({
|
|
1877
1877
|
code: "unrecognized_keys",
|
|
@@ -1883,12 +1883,12 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1885
1885
|
};
|
|
1886
|
-
}), _r = /*@__PURE__*/
|
|
1886
|
+
}), _r = /*@__PURE__*/ w("$ZodEnum", (t, n) => {
|
|
1887
1887
|
k.init(t, n);
|
|
1888
1888
|
let r = e(n.entries), i = new Set(r);
|
|
1889
1889
|
t._zod.values = i;
|
|
1890
1890
|
let a = r.filter((e) => ne.has(typeof e));
|
|
1891
|
-
t._zod.pattern = RegExp(a.length ? `^(${a.map((e) =>
|
|
1891
|
+
t._zod.pattern = RegExp(a.length ? `^(${a.map((e) => re(e.toString())).join("|")})$` : "^[^\\s\\S]$"), t._zod.parse = (e, n) => {
|
|
1892
1892
|
let a = e.value;
|
|
1893
1893
|
return i.has(a) || e.issues.push({
|
|
1894
1894
|
code: "invalid_value",
|
|
@@ -1897,10 +1897,10 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1897
1897
|
inst: t
|
|
1898
1898
|
}), e;
|
|
1899
1899
|
};
|
|
1900
|
-
}), vr = /*@__PURE__*/
|
|
1900
|
+
}), vr = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
|
|
1901
1901
|
k.init(e, t);
|
|
1902
1902
|
let n = new Set(t.values);
|
|
1903
|
-
e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ?
|
|
1903
|
+
e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? re(e) : e ? re(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
|
|
1904
1904
|
let a = r.value;
|
|
1905
1905
|
return n.has(a) || r.issues.push({
|
|
1906
1906
|
code: "invalid_value",
|
|
@@ -1909,23 +1909,23 @@ var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1909
1909
|
inst: e
|
|
1910
1910
|
}), r;
|
|
1911
1911
|
};
|
|
1912
|
-
}), yr = /*@__PURE__*/
|
|
1912
|
+
}), yr = /*@__PURE__*/ w("$ZodTransform", (e, t) => {
|
|
1913
1913
|
k.init(e, t), e._zod.optin = "optional", E.memoizer?.guard(e), e._zod.parse = (n, r) => {
|
|
1914
1914
|
if (r.direction === "backward") throw new Fe(e.constructor.name);
|
|
1915
1915
|
let i = t.transform(n.value, n);
|
|
1916
1916
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1917
|
-
if (i instanceof Promise) throw new
|
|
1917
|
+
if (i instanceof Promise) throw new T();
|
|
1918
1918
|
return n.value = i, n;
|
|
1919
1919
|
};
|
|
1920
1920
|
});
|
|
1921
1921
|
function br(e, t) {
|
|
1922
1922
|
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
1923
1923
|
}
|
|
1924
|
-
var xr = /*@__PURE__*/
|
|
1925
|
-
k.init(e, t),
|
|
1924
|
+
var xr = /*@__PURE__*/ w("$ZodOptional", (e, t) => {
|
|
1925
|
+
k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", C(e, "values", (e) => {
|
|
1926
1926
|
let t = e.def.innerType._zod.values;
|
|
1927
1927
|
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
1928
|
-
}),
|
|
1928
|
+
}), C(e, "pattern", (e) => {
|
|
1929
1929
|
let t = e.def.innerType._zod.pattern;
|
|
1930
1930
|
return t ? RegExp(`^(${a(t.source)})?$`) : void 0;
|
|
1931
1931
|
}), e._zod.parse = (e, n) => {
|
|
@@ -1939,15 +1939,15 @@ var xr = /*@__PURE__*/ T("$ZodOptional", (e, t) => {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
return t.innerType._zod.run(e, n);
|
|
1941
1941
|
};
|
|
1942
|
-
}), Sr = /*@__PURE__*/
|
|
1943
|
-
xr.init(e, t),
|
|
1944
|
-
}), Cr = /*@__PURE__*/
|
|
1945
|
-
k.init(e, t),
|
|
1942
|
+
}), Sr = /*@__PURE__*/ w("$ZodExactOptional", (e, t) => {
|
|
1943
|
+
xr.init(e, t), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1944
|
+
}), Cr = /*@__PURE__*/ w("$ZodNullable", (e, t) => {
|
|
1945
|
+
k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "pattern", (e) => {
|
|
1946
1946
|
let t = e.def.innerType._zod.pattern;
|
|
1947
1947
|
return t ? RegExp(`^(${a(t.source)}|null)$`) : void 0;
|
|
1948
|
-
}),
|
|
1949
|
-
}), wr = /*@__PURE__*/
|
|
1950
|
-
k.init(e, t), e._zod.optin = "defaulted",
|
|
1948
|
+
}), C(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1949
|
+
}), wr = /*@__PURE__*/ w("$ZodDefault", (e, t) => {
|
|
1950
|
+
k.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1951
1951
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1952
1952
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1953
1953
|
let r = t.innerType._zod.run(e, n);
|
|
@@ -1957,10 +1957,10 @@ var xr = /*@__PURE__*/ T("$ZodOptional", (e, t) => {
|
|
|
1957
1957
|
function Tr(e, t) {
|
|
1958
1958
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1959
1959
|
}
|
|
1960
|
-
var Er = /*@__PURE__*/
|
|
1961
|
-
k.init(e, t), e._zod.optin = "defaulted",
|
|
1962
|
-
}), Dr = /*@__PURE__*/
|
|
1963
|
-
k.init(e, t),
|
|
1960
|
+
var Er = /*@__PURE__*/ w("$ZodPrefault", (e, t) => {
|
|
1961
|
+
k.init(e, t), e._zod.optin = "defaulted", C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1962
|
+
}), Dr = /*@__PURE__*/ w("$ZodNonOptional", (e, t) => {
|
|
1963
|
+
k.init(e, t), C(e, "values", (e) => {
|
|
1964
1964
|
let t = e.def.innerType._zod.values;
|
|
1965
1965
|
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
1966
1966
|
}), e._zod.parse = (n, r) => {
|
|
@@ -1980,12 +1980,12 @@ function kr(e, t, n, r) {
|
|
|
1980
1980
|
return t.issues.length ? (e.value = n.catchValue({
|
|
1981
1981
|
...t,
|
|
1982
1982
|
value: e.value,
|
|
1983
|
-
error: { issues: t.issues.map((e) =>
|
|
1983
|
+
error: { issues: t.issues.map((e) => b(e, r, D())) },
|
|
1984
1984
|
input: e.value
|
|
1985
1985
|
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
1986
1986
|
}
|
|
1987
|
-
var Ar = /*@__PURE__*/
|
|
1988
|
-
k.init(e, t),
|
|
1987
|
+
var Ar = /*@__PURE__*/ w("$ZodCatch", (e, t) => {
|
|
1988
|
+
k.init(e, t), C(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), C(e, "optout", (e) => e.def.innerType._zod.optout), C(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1989
1989
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1990
1990
|
let r = t.innerType._zod.run({
|
|
1991
1991
|
value: e.value,
|
|
@@ -1993,8 +1993,8 @@ var Ar = /*@__PURE__*/ T("$ZodCatch", (e, t) => {
|
|
|
1993
1993
|
}, n);
|
|
1994
1994
|
return r instanceof Promise ? r.then((r) => kr(e, r, t, n)) : kr(e, r, t, n);
|
|
1995
1995
|
};
|
|
1996
|
-
}), jr = /*@__PURE__*/
|
|
1997
|
-
k.init(e, t),
|
|
1996
|
+
}), jr = /*@__PURE__*/ w("$ZodPipe", (e, t) => {
|
|
1997
|
+
k.init(e, t), C(e, "values", (e) => e.def.in._zod.values), C(e, "optin", (e) => e.def.in._zod.optin), C(e, "optout", (e) => e.def.out._zod.optout), C(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1998
1998
|
if (n.direction === "backward") {
|
|
1999
1999
|
let r = t.out._zod.run(e, n);
|
|
2000
2000
|
return r instanceof Promise ? r.then((e) => Mr(e, t.in, n)) : Mr(r, t.in, n);
|
|
@@ -2009,8 +2009,8 @@ function Mr(e, t, n) {
|
|
|
2009
2009
|
issues: e.issues
|
|
2010
2010
|
}, n);
|
|
2011
2011
|
}
|
|
2012
|
-
var Nr = /*@__PURE__*/
|
|
2013
|
-
k.init(e, t),
|
|
2012
|
+
var Nr = /*@__PURE__*/ w("$ZodReadonly", (e, t) => {
|
|
2013
|
+
k.init(e, t), C(e, "propValues", (e) => e.def.innerType._zod.propValues), C(e, "values", (e) => e.def.innerType._zod.values), C(e, "optin", (e) => e.def.innerType?._zod?.optin), C(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
2014
2014
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
2015
2015
|
let r = t.innerType._zod.run(e, n);
|
|
2016
2016
|
return r instanceof Promise ? r.then(Pr) : Pr(r);
|
|
@@ -2019,12 +2019,12 @@ var Nr = /*@__PURE__*/ T("$ZodReadonly", (e, t) => {
|
|
|
2019
2019
|
function Pr(e) {
|
|
2020
2020
|
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
2021
2021
|
}
|
|
2022
|
-
var Fr = /*@__PURE__*/
|
|
2022
|
+
var Fr = /*@__PURE__*/ w("$ZodLazy", (e, t) => {
|
|
2023
2023
|
k.init(e, t), c(e._zod, "innerType", () => {
|
|
2024
2024
|
let e = t;
|
|
2025
2025
|
return e._cachedInner ||= t.getter(), e._cachedInner;
|
|
2026
|
-
}),
|
|
2027
|
-
}), Ir = /*@__PURE__*/
|
|
2026
|
+
}), C(e, "pattern", (e) => e.innerType?._zod?.pattern), C(e, "propValues", (e) => e.innerType?._zod?.propValues), C(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), C(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
|
|
2027
|
+
}), Ir = /*@__PURE__*/ w("$ZodCustom", (e, t) => {
|
|
2028
2028
|
O.init(e, t), k.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
2029
2029
|
let r = n.value, i = t.fn(r);
|
|
2030
2030
|
if (i instanceof Promise) return i.then((t) => Lr(t, n, r, e));
|
|
@@ -2040,7 +2040,7 @@ function Lr(e, t, n, r) {
|
|
|
2040
2040
|
path: [...r._zod.def.path ?? []],
|
|
2041
2041
|
continue: !r._zod.def.abort
|
|
2042
2042
|
};
|
|
2043
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(
|
|
2043
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(xe(e));
|
|
2044
2044
|
}
|
|
2045
2045
|
}
|
|
2046
2046
|
//#endregion
|
|
@@ -2266,8 +2266,8 @@ var Xr = () => {
|
|
|
2266
2266
|
}
|
|
2267
2267
|
return (e) => {
|
|
2268
2268
|
switch (e.code) {
|
|
2269
|
-
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(
|
|
2270
|
-
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${
|
|
2269
|
+
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(be(e.input), e.input)}`;
|
|
2270
|
+
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ie(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
|
|
2271
2271
|
case "too_big": {
|
|
2272
2272
|
let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
|
|
2273
2273
|
return r ? `Too big: expected ${e.origin ?? "value"} to have ${t}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${t}${e.maximum.toString()}`;
|
|
@@ -2337,7 +2337,7 @@ var ti = globalThis.__zod_globalRegistry;
|
|
|
2337
2337
|
function ni(e, t) {
|
|
2338
2338
|
return new e({
|
|
2339
2339
|
type: "string",
|
|
2340
|
-
...
|
|
2340
|
+
..._(t)
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
2343
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2347,7 +2347,7 @@ function ri(e, t) {
|
|
|
2347
2347
|
format: "email",
|
|
2348
2348
|
check: "string_format",
|
|
2349
2349
|
abort: !1,
|
|
2350
|
-
...
|
|
2350
|
+
..._(t)
|
|
2351
2351
|
});
|
|
2352
2352
|
}
|
|
2353
2353
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2357,7 +2357,7 @@ function ii(e, t) {
|
|
|
2357
2357
|
format: "guid",
|
|
2358
2358
|
check: "string_format",
|
|
2359
2359
|
abort: !1,
|
|
2360
|
-
...
|
|
2360
|
+
..._(t)
|
|
2361
2361
|
});
|
|
2362
2362
|
}
|
|
2363
2363
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2367,7 +2367,7 @@ function ai(e, t) {
|
|
|
2367
2367
|
format: "uuid",
|
|
2368
2368
|
check: "string_format",
|
|
2369
2369
|
abort: !1,
|
|
2370
|
-
...
|
|
2370
|
+
..._(t)
|
|
2371
2371
|
});
|
|
2372
2372
|
}
|
|
2373
2373
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2378,7 +2378,7 @@ function oi(e, t) {
|
|
|
2378
2378
|
check: "string_format",
|
|
2379
2379
|
abort: !1,
|
|
2380
2380
|
version: "v4",
|
|
2381
|
-
...
|
|
2381
|
+
..._(t)
|
|
2382
2382
|
});
|
|
2383
2383
|
}
|
|
2384
2384
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2389,7 +2389,7 @@ function si(e, t) {
|
|
|
2389
2389
|
check: "string_format",
|
|
2390
2390
|
abort: !1,
|
|
2391
2391
|
version: "v6",
|
|
2392
|
-
...
|
|
2392
|
+
..._(t)
|
|
2393
2393
|
});
|
|
2394
2394
|
}
|
|
2395
2395
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2400,7 +2400,7 @@ function ci(e, t) {
|
|
|
2400
2400
|
check: "string_format",
|
|
2401
2401
|
abort: !1,
|
|
2402
2402
|
version: "v7",
|
|
2403
|
-
...
|
|
2403
|
+
..._(t)
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
2406
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2410,7 +2410,7 @@ function li(e, t) {
|
|
|
2410
2410
|
format: "url",
|
|
2411
2411
|
check: "string_format",
|
|
2412
2412
|
abort: !1,
|
|
2413
|
-
...
|
|
2413
|
+
..._(t)
|
|
2414
2414
|
});
|
|
2415
2415
|
}
|
|
2416
2416
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2420,7 +2420,7 @@ function ui(e, t) {
|
|
|
2420
2420
|
format: "emoji",
|
|
2421
2421
|
check: "string_format",
|
|
2422
2422
|
abort: !1,
|
|
2423
|
-
...
|
|
2423
|
+
..._(t)
|
|
2424
2424
|
});
|
|
2425
2425
|
}
|
|
2426
2426
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2430,7 +2430,7 @@ function di(e, t) {
|
|
|
2430
2430
|
format: "nanoid",
|
|
2431
2431
|
check: "string_format",
|
|
2432
2432
|
abort: !1,
|
|
2433
|
-
...
|
|
2433
|
+
..._(t)
|
|
2434
2434
|
});
|
|
2435
2435
|
}
|
|
2436
2436
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2440,7 +2440,7 @@ function fi(e, t) {
|
|
|
2440
2440
|
format: "cuid",
|
|
2441
2441
|
check: "string_format",
|
|
2442
2442
|
abort: !1,
|
|
2443
|
-
...
|
|
2443
|
+
..._(t)
|
|
2444
2444
|
});
|
|
2445
2445
|
}
|
|
2446
2446
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2450,7 +2450,7 @@ function pi(e, t) {
|
|
|
2450
2450
|
format: "cuid2",
|
|
2451
2451
|
check: "string_format",
|
|
2452
2452
|
abort: !1,
|
|
2453
|
-
...
|
|
2453
|
+
..._(t)
|
|
2454
2454
|
});
|
|
2455
2455
|
}
|
|
2456
2456
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2460,7 +2460,7 @@ function mi(e, t) {
|
|
|
2460
2460
|
format: "ulid",
|
|
2461
2461
|
check: "string_format",
|
|
2462
2462
|
abort: !1,
|
|
2463
|
-
...
|
|
2463
|
+
..._(t)
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
2466
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2470,7 +2470,7 @@ function hi(e, t) {
|
|
|
2470
2470
|
format: "xid",
|
|
2471
2471
|
check: "string_format",
|
|
2472
2472
|
abort: !1,
|
|
2473
|
-
...
|
|
2473
|
+
..._(t)
|
|
2474
2474
|
});
|
|
2475
2475
|
}
|
|
2476
2476
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2480,7 +2480,7 @@ function gi(e, t) {
|
|
|
2480
2480
|
format: "ksuid",
|
|
2481
2481
|
check: "string_format",
|
|
2482
2482
|
abort: !1,
|
|
2483
|
-
...
|
|
2483
|
+
..._(t)
|
|
2484
2484
|
});
|
|
2485
2485
|
}
|
|
2486
2486
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2490,7 +2490,7 @@ function _i(e, t) {
|
|
|
2490
2490
|
format: "ipv4",
|
|
2491
2491
|
check: "string_format",
|
|
2492
2492
|
abort: !1,
|
|
2493
|
-
...
|
|
2493
|
+
..._(t)
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
2496
2496
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2500,7 +2500,7 @@ function vi(e, t) {
|
|
|
2500
2500
|
format: "ipv6",
|
|
2501
2501
|
check: "string_format",
|
|
2502
2502
|
abort: !1,
|
|
2503
|
-
...
|
|
2503
|
+
..._(t)
|
|
2504
2504
|
});
|
|
2505
2505
|
}
|
|
2506
2506
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2510,7 +2510,7 @@ function yi(e, t) {
|
|
|
2510
2510
|
format: "cidrv4",
|
|
2511
2511
|
check: "string_format",
|
|
2512
2512
|
abort: !1,
|
|
2513
|
-
...
|
|
2513
|
+
..._(t)
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
2516
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2520,7 +2520,7 @@ function bi(e, t) {
|
|
|
2520
2520
|
format: "cidrv6",
|
|
2521
2521
|
check: "string_format",
|
|
2522
2522
|
abort: !1,
|
|
2523
|
-
...
|
|
2523
|
+
..._(t)
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
2526
2526
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2530,7 +2530,7 @@ function xi(e, t) {
|
|
|
2530
2530
|
format: "base64",
|
|
2531
2531
|
check: "string_format",
|
|
2532
2532
|
abort: !1,
|
|
2533
|
-
...
|
|
2533
|
+
..._(t)
|
|
2534
2534
|
});
|
|
2535
2535
|
}
|
|
2536
2536
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2540,7 +2540,7 @@ function Si(e, t) {
|
|
|
2540
2540
|
format: "base64url",
|
|
2541
2541
|
check: "string_format",
|
|
2542
2542
|
abort: !1,
|
|
2543
|
-
...
|
|
2543
|
+
..._(t)
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
2546
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2550,7 +2550,7 @@ function Ci(e, t) {
|
|
|
2550
2550
|
format: "e164",
|
|
2551
2551
|
check: "string_format",
|
|
2552
2552
|
abort: !1,
|
|
2553
|
-
...
|
|
2553
|
+
..._(t)
|
|
2554
2554
|
});
|
|
2555
2555
|
}
|
|
2556
2556
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2560,7 +2560,7 @@ function wi(e, t) {
|
|
|
2560
2560
|
format: "jwt",
|
|
2561
2561
|
check: "string_format",
|
|
2562
2562
|
abort: !1,
|
|
2563
|
-
...
|
|
2563
|
+
..._(t)
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
2566
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2572,7 +2572,7 @@ function Ti(e, t) {
|
|
|
2572
2572
|
offset: !1,
|
|
2573
2573
|
local: !1,
|
|
2574
2574
|
precision: null,
|
|
2575
|
-
...
|
|
2575
|
+
..._(t)
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
2578
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2581,7 +2581,7 @@ function Ei(e, t) {
|
|
|
2581
2581
|
type: "string",
|
|
2582
2582
|
format: "date",
|
|
2583
2583
|
check: "string_format",
|
|
2584
|
-
...
|
|
2584
|
+
..._(t)
|
|
2585
2585
|
});
|
|
2586
2586
|
}
|
|
2587
2587
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2591,7 +2591,7 @@ function Di(e, t) {
|
|
|
2591
2591
|
format: "time",
|
|
2592
2592
|
check: "string_format",
|
|
2593
2593
|
precision: null,
|
|
2594
|
-
...
|
|
2594
|
+
..._(t)
|
|
2595
2595
|
});
|
|
2596
2596
|
}
|
|
2597
2597
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2600,7 +2600,7 @@ function Oi(e, t) {
|
|
|
2600
2600
|
type: "string",
|
|
2601
2601
|
format: "duration",
|
|
2602
2602
|
check: "string_format",
|
|
2603
|
-
...
|
|
2603
|
+
..._(t)
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2608,7 +2608,7 @@ function ki(e, t) {
|
|
|
2608
2608
|
return new e({
|
|
2609
2609
|
type: "number",
|
|
2610
2610
|
checks: [],
|
|
2611
|
-
...
|
|
2611
|
+
..._(t)
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
2614
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2618,21 +2618,21 @@ function Ai(e, t) {
|
|
|
2618
2618
|
check: "number_format",
|
|
2619
2619
|
abort: !1,
|
|
2620
2620
|
format: "safeint",
|
|
2621
|
-
...
|
|
2621
|
+
..._(t)
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
// @__NO_SIDE_EFFECTS__
|
|
2625
2625
|
function ji(e, t) {
|
|
2626
2626
|
return new e({
|
|
2627
2627
|
type: "boolean",
|
|
2628
|
-
...
|
|
2628
|
+
..._(t)
|
|
2629
2629
|
});
|
|
2630
2630
|
}
|
|
2631
2631
|
// @__NO_SIDE_EFFECTS__
|
|
2632
2632
|
function Mi(e, t) {
|
|
2633
2633
|
return new e({
|
|
2634
2634
|
type: "null",
|
|
2635
|
-
...
|
|
2635
|
+
..._(t)
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
2638
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2643,14 +2643,14 @@ function Ni(e) {
|
|
|
2643
2643
|
function Pi(e, t) {
|
|
2644
2644
|
return new e({
|
|
2645
2645
|
type: "never",
|
|
2646
|
-
...
|
|
2646
|
+
..._(t)
|
|
2647
2647
|
});
|
|
2648
2648
|
}
|
|
2649
2649
|
// @__NO_SIDE_EFFECTS__
|
|
2650
2650
|
function Fi(e, t) {
|
|
2651
2651
|
return new Gt({
|
|
2652
2652
|
check: "less_than",
|
|
2653
|
-
...
|
|
2653
|
+
..._(t),
|
|
2654
2654
|
value: e,
|
|
2655
2655
|
inclusive: !1
|
|
2656
2656
|
});
|
|
@@ -2659,7 +2659,7 @@ function Fi(e, t) {
|
|
|
2659
2659
|
function Ii(e, t) {
|
|
2660
2660
|
return new Gt({
|
|
2661
2661
|
check: "less_than",
|
|
2662
|
-
...
|
|
2662
|
+
..._(t),
|
|
2663
2663
|
value: e,
|
|
2664
2664
|
inclusive: !0
|
|
2665
2665
|
});
|
|
@@ -2668,7 +2668,7 @@ function Ii(e, t) {
|
|
|
2668
2668
|
function Li(e, t) {
|
|
2669
2669
|
return new Kt({
|
|
2670
2670
|
check: "greater_than",
|
|
2671
|
-
...
|
|
2671
|
+
..._(t),
|
|
2672
2672
|
value: e,
|
|
2673
2673
|
inclusive: !1
|
|
2674
2674
|
});
|
|
@@ -2677,7 +2677,7 @@ function Li(e, t) {
|
|
|
2677
2677
|
function Ri(e, t) {
|
|
2678
2678
|
return new Kt({
|
|
2679
2679
|
check: "greater_than",
|
|
2680
|
-
...
|
|
2680
|
+
..._(t),
|
|
2681
2681
|
value: e,
|
|
2682
2682
|
inclusive: !0
|
|
2683
2683
|
});
|
|
@@ -2686,7 +2686,7 @@ function Ri(e, t) {
|
|
|
2686
2686
|
function zi(e, t) {
|
|
2687
2687
|
return new qt({
|
|
2688
2688
|
check: "multiple_of",
|
|
2689
|
-
...
|
|
2689
|
+
..._(t),
|
|
2690
2690
|
value: e
|
|
2691
2691
|
});
|
|
2692
2692
|
}
|
|
@@ -2694,7 +2694,7 @@ function zi(e, t) {
|
|
|
2694
2694
|
function Bi(e, t) {
|
|
2695
2695
|
return new Yt({
|
|
2696
2696
|
check: "max_length",
|
|
2697
|
-
...
|
|
2697
|
+
..._(t),
|
|
2698
2698
|
maximum: e
|
|
2699
2699
|
});
|
|
2700
2700
|
}
|
|
@@ -2702,7 +2702,7 @@ function Bi(e, t) {
|
|
|
2702
2702
|
function Vi(e, t) {
|
|
2703
2703
|
return new Xt({
|
|
2704
2704
|
check: "min_length",
|
|
2705
|
-
...
|
|
2705
|
+
..._(t),
|
|
2706
2706
|
minimum: e
|
|
2707
2707
|
});
|
|
2708
2708
|
}
|
|
@@ -2710,7 +2710,7 @@ function Vi(e, t) {
|
|
|
2710
2710
|
function Hi(e, t) {
|
|
2711
2711
|
return new Zt({
|
|
2712
2712
|
check: "length_equals",
|
|
2713
|
-
...
|
|
2713
|
+
..._(t),
|
|
2714
2714
|
length: e
|
|
2715
2715
|
});
|
|
2716
2716
|
}
|
|
@@ -2719,7 +2719,7 @@ function Ui(e, t) {
|
|
|
2719
2719
|
return new $t({
|
|
2720
2720
|
check: "string_format",
|
|
2721
2721
|
format: "regex",
|
|
2722
|
-
...
|
|
2722
|
+
..._(t),
|
|
2723
2723
|
pattern: e
|
|
2724
2724
|
});
|
|
2725
2725
|
}
|
|
@@ -2728,7 +2728,7 @@ function Wi(e) {
|
|
|
2728
2728
|
return new en({
|
|
2729
2729
|
check: "string_format",
|
|
2730
2730
|
format: "lowercase",
|
|
2731
|
-
...
|
|
2731
|
+
..._(e)
|
|
2732
2732
|
});
|
|
2733
2733
|
}
|
|
2734
2734
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2736,7 +2736,7 @@ function Gi(e) {
|
|
|
2736
2736
|
return new tn({
|
|
2737
2737
|
check: "string_format",
|
|
2738
2738
|
format: "uppercase",
|
|
2739
|
-
...
|
|
2739
|
+
..._(e)
|
|
2740
2740
|
});
|
|
2741
2741
|
}
|
|
2742
2742
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2744,7 +2744,7 @@ function Ki(e, t) {
|
|
|
2744
2744
|
return new nn({
|
|
2745
2745
|
check: "string_format",
|
|
2746
2746
|
format: "includes",
|
|
2747
|
-
...
|
|
2747
|
+
..._(t),
|
|
2748
2748
|
includes: e
|
|
2749
2749
|
});
|
|
2750
2750
|
}
|
|
@@ -2753,7 +2753,7 @@ function qi(e, t) {
|
|
|
2753
2753
|
return new rn({
|
|
2754
2754
|
check: "string_format",
|
|
2755
2755
|
format: "starts_with",
|
|
2756
|
-
...
|
|
2756
|
+
..._(t),
|
|
2757
2757
|
prefix: e
|
|
2758
2758
|
});
|
|
2759
2759
|
}
|
|
@@ -2762,7 +2762,7 @@ function Ji(e, t) {
|
|
|
2762
2762
|
return new an({
|
|
2763
2763
|
check: "string_format",
|
|
2764
2764
|
format: "ends_with",
|
|
2765
|
-
...
|
|
2765
|
+
..._(t),
|
|
2766
2766
|
suffix: e
|
|
2767
2767
|
});
|
|
2768
2768
|
}
|
|
@@ -2798,7 +2798,7 @@ function ea(e, t, n) {
|
|
|
2798
2798
|
return new e({
|
|
2799
2799
|
type: "array",
|
|
2800
2800
|
element: t,
|
|
2801
|
-
...
|
|
2801
|
+
..._(n)
|
|
2802
2802
|
});
|
|
2803
2803
|
}
|
|
2804
2804
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2807,16 +2807,16 @@ function ta(e, t, n) {
|
|
|
2807
2807
|
type: "custom",
|
|
2808
2808
|
check: "custom",
|
|
2809
2809
|
fn: t,
|
|
2810
|
-
...
|
|
2810
|
+
..._(n)
|
|
2811
2811
|
});
|
|
2812
2812
|
}
|
|
2813
2813
|
// @__NO_SIDE_EFFECTS__
|
|
2814
2814
|
function na(e, t) {
|
|
2815
2815
|
let n = /* @__PURE__ */ ra((t) => (t.addIssue = (e) => {
|
|
2816
|
-
if (typeof e == "string") t.issues.push(
|
|
2816
|
+
if (typeof e == "string") t.issues.push(xe(e, t.value, n._zod.def));
|
|
2817
2817
|
else {
|
|
2818
2818
|
let r = e;
|
|
2819
|
-
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(
|
|
2819
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(xe(r));
|
|
2820
2820
|
}
|
|
2821
2821
|
}, e(t.value, t)), t);
|
|
2822
2822
|
return n;
|
|
@@ -2825,7 +2825,7 @@ function na(e, t) {
|
|
|
2825
2825
|
function ra(e, t) {
|
|
2826
2826
|
let n = new O({
|
|
2827
2827
|
check: "custom",
|
|
2828
|
-
...
|
|
2828
|
+
..._(t)
|
|
2829
2829
|
});
|
|
2830
2830
|
return n._zod.check = e, n;
|
|
2831
2831
|
}
|
|
@@ -3464,7 +3464,7 @@ function Ya(e, t, n) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
});
|
|
3466
3466
|
}
|
|
3467
|
-
var F = /*@__PURE__*/
|
|
3467
|
+
var F = /*@__PURE__*/ w("ZodError", (e, t) => {
|
|
3468
3468
|
Ue.init(e, t), e.name = "ZodError";
|
|
3469
3469
|
let r = Object.getPrototypeOf(e);
|
|
3470
3470
|
Ja.has(r) || (Ja.add(r), Ya(r, "format", (e) => (t) => qe(e, t)), Ya(r, "flatten", (e) => (t) => Ke(e, t)), Ya(r, "addIssue", (e) => (t) => {
|
|
@@ -3487,7 +3487,7 @@ function co() {
|
|
|
3487
3487
|
function lo() {
|
|
3488
3488
|
E.memoizer || D({ memoizer: Jr() });
|
|
3489
3489
|
}
|
|
3490
|
-
var I = /*@__PURE__*/
|
|
3490
|
+
var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3491
3491
|
check(...e) {
|
|
3492
3492
|
let t = this.def;
|
|
3493
3493
|
return this.clone(u(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3500,7 +3500,7 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3500
3500
|
return this.check(...e);
|
|
3501
3501
|
},
|
|
3502
3502
|
clone(e, t) {
|
|
3503
|
-
return
|
|
3503
|
+
return g(this, e, t);
|
|
3504
3504
|
},
|
|
3505
3505
|
brand() {
|
|
3506
3506
|
return this;
|
|
@@ -3509,28 +3509,28 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3509
3509
|
return e.add(this, t), this;
|
|
3510
3510
|
},
|
|
3511
3511
|
refine(e, t) {
|
|
3512
|
-
return this.check(
|
|
3512
|
+
return this.check(Ts(e, t));
|
|
3513
3513
|
},
|
|
3514
3514
|
superRefine(e, t) {
|
|
3515
|
-
return this.check(
|
|
3515
|
+
return this.check(Es(e, t));
|
|
3516
3516
|
},
|
|
3517
3517
|
overwrite(e) {
|
|
3518
3518
|
return this.check(/* @__PURE__ */ j(e));
|
|
3519
3519
|
},
|
|
3520
3520
|
optional() {
|
|
3521
|
-
return
|
|
3521
|
+
return as(this);
|
|
3522
3522
|
},
|
|
3523
3523
|
exactOptional() {
|
|
3524
|
-
return
|
|
3524
|
+
return ss(this);
|
|
3525
3525
|
},
|
|
3526
3526
|
nullable() {
|
|
3527
|
-
return
|
|
3527
|
+
return ls(this);
|
|
3528
3528
|
},
|
|
3529
3529
|
nullish() {
|
|
3530
|
-
return
|
|
3530
|
+
return as(ls(this));
|
|
3531
3531
|
},
|
|
3532
3532
|
nonoptional(e) {
|
|
3533
|
-
return
|
|
3533
|
+
return hs(this, e);
|
|
3534
3534
|
},
|
|
3535
3535
|
array() {
|
|
3536
3536
|
return H(this);
|
|
@@ -3539,25 +3539,25 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3539
3539
|
return W([this, e]);
|
|
3540
3540
|
},
|
|
3541
3541
|
and(e) {
|
|
3542
|
-
return
|
|
3542
|
+
return Xo(this, e);
|
|
3543
3543
|
},
|
|
3544
3544
|
transform(e) {
|
|
3545
|
-
return
|
|
3545
|
+
return ys(this, rs(e));
|
|
3546
3546
|
},
|
|
3547
3547
|
default(e) {
|
|
3548
|
-
return
|
|
3548
|
+
return ds(this, e);
|
|
3549
3549
|
},
|
|
3550
3550
|
prefault(e) {
|
|
3551
|
-
return
|
|
3551
|
+
return ps(this, e);
|
|
3552
3552
|
},
|
|
3553
3553
|
catch(e) {
|
|
3554
|
-
return
|
|
3554
|
+
return _s(this, e);
|
|
3555
3555
|
},
|
|
3556
3556
|
pipe(e) {
|
|
3557
|
-
return
|
|
3557
|
+
return ys(this, e);
|
|
3558
3558
|
},
|
|
3559
3559
|
readonly() {
|
|
3560
|
-
return
|
|
3560
|
+
return xs(this);
|
|
3561
3561
|
},
|
|
3562
3562
|
describe(e) {
|
|
3563
3563
|
let t = this.clone();
|
|
@@ -3578,7 +3578,7 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3578
3578
|
return t.length === 0 ? e(this) : e(this, ...t);
|
|
3579
3579
|
},
|
|
3580
3580
|
get "~standard"() {
|
|
3581
|
-
return
|
|
3581
|
+
return Ce(this, "~standard", {
|
|
3582
3582
|
...un(this),
|
|
3583
3583
|
jsonSchema: {
|
|
3584
3584
|
input: ga(this, "input"),
|
|
@@ -3587,7 +3587,7 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3587
3587
|
});
|
|
3588
3588
|
},
|
|
3589
3589
|
set "~standard"(e) {
|
|
3590
|
-
|
|
3590
|
+
x(this, "~standard", e);
|
|
3591
3591
|
},
|
|
3592
3592
|
parse: function e(t, n) {
|
|
3593
3593
|
return Xa(this, t, n, { callee: e });
|
|
@@ -3605,7 +3605,7 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3605
3605
|
return this?.safeParseAsync;
|
|
3606
3606
|
},
|
|
3607
3607
|
set spa(e) {
|
|
3608
|
-
|
|
3608
|
+
x(this, "spa", e);
|
|
3609
3609
|
},
|
|
3610
3610
|
encode: function e(t, n) {
|
|
3611
3611
|
return eo(this, t, n, { callee: e });
|
|
@@ -3640,7 +3640,7 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3640
3640
|
get _def() {
|
|
3641
3641
|
return this._zod.def;
|
|
3642
3642
|
}
|
|
3643
|
-
}), uo = /*@__PURE__*/
|
|
3643
|
+
}), uo = /*@__PURE__*/ w("_ZodString", (e, t) => {
|
|
3644
3644
|
dn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
|
|
3645
3645
|
let n = e._zod.bag;
|
|
3646
3646
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
@@ -3690,7 +3690,7 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3690
3690
|
slugify() {
|
|
3691
3691
|
return this.check(/* @__PURE__ */ $i());
|
|
3692
3692
|
}
|
|
3693
|
-
}), fo = /*@__PURE__*/
|
|
3693
|
+
}), fo = /*@__PURE__*/ w("ZodString", (e, t) => {
|
|
3694
3694
|
dn.init(e, t), uo.init(e, t);
|
|
3695
3695
|
}, {
|
|
3696
3696
|
email(e) {
|
|
@@ -3775,55 +3775,55 @@ var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3775
3775
|
function L(e) {
|
|
3776
3776
|
return /* @__PURE__ */ ni(fo, e);
|
|
3777
3777
|
}
|
|
3778
|
-
var R = /*@__PURE__*/
|
|
3778
|
+
var R = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
3779
3779
|
A.init(e, t), uo.init(e, t);
|
|
3780
|
-
}), po = /*@__PURE__*/
|
|
3780
|
+
}), po = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
|
|
3781
3781
|
On.init(e, t), R.init(e, t);
|
|
3782
|
-
}), mo = /*@__PURE__*/
|
|
3782
|
+
}), mo = /*@__PURE__*/ w("ZodISODate", (e, t) => {
|
|
3783
3783
|
kn.init(e, t), R.init(e, t);
|
|
3784
|
-
}), ho = /*@__PURE__*/
|
|
3784
|
+
}), ho = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
|
|
3785
3785
|
An.init(e, t), R.init(e, t);
|
|
3786
|
-
}), go = /*@__PURE__*/
|
|
3786
|
+
}), go = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
|
|
3787
3787
|
jn.init(e, t), R.init(e, t);
|
|
3788
|
-
}), _o = /*@__PURE__*/
|
|
3788
|
+
}), _o = /*@__PURE__*/ w("ZodEmail", (e, t) => {
|
|
3789
3789
|
mn.init(e, t), R.init(e, t);
|
|
3790
|
-
}), vo = /*@__PURE__*/
|
|
3790
|
+
}), vo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
|
|
3791
3791
|
fn.init(e, t), R.init(e, t);
|
|
3792
|
-
}), yo = /*@__PURE__*/
|
|
3792
|
+
}), yo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
|
|
3793
3793
|
pn.init(e, t), R.init(e, t);
|
|
3794
|
-
}), bo = /*@__PURE__*/
|
|
3794
|
+
}), bo = /*@__PURE__*/ w("ZodURL", (e, t) => {
|
|
3795
3795
|
bn.init(e, t), R.init(e, t);
|
|
3796
|
-
}), xo = /*@__PURE__*/
|
|
3796
|
+
}), xo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
|
|
3797
3797
|
xn.init(e, t), R.init(e, t);
|
|
3798
|
-
}), So = /*@__PURE__*/
|
|
3798
|
+
}), So = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
|
|
3799
3799
|
Sn.init(e, t), R.init(e, t);
|
|
3800
|
-
}), Co = /*@__PURE__*/
|
|
3800
|
+
}), Co = /*@__PURE__*/ w("ZodCUID", (e, t) => {
|
|
3801
3801
|
Cn.init(e, t), R.init(e, t);
|
|
3802
|
-
}), wo = /*@__PURE__*/
|
|
3802
|
+
}), wo = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
|
|
3803
3803
|
wn.init(e, t), R.init(e, t);
|
|
3804
|
-
}), To = /*@__PURE__*/
|
|
3804
|
+
}), To = /*@__PURE__*/ w("ZodULID", (e, t) => {
|
|
3805
3805
|
Tn.init(e, t), R.init(e, t);
|
|
3806
|
-
}), Eo = /*@__PURE__*/
|
|
3806
|
+
}), Eo = /*@__PURE__*/ w("ZodXID", (e, t) => {
|
|
3807
3807
|
En.init(e, t), R.init(e, t);
|
|
3808
|
-
}), Do = /*@__PURE__*/
|
|
3808
|
+
}), Do = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
|
|
3809
3809
|
Dn.init(e, t), R.init(e, t);
|
|
3810
|
-
}), Oo = /*@__PURE__*/
|
|
3810
|
+
}), Oo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
|
|
3811
3811
|
Mn.init(e, t), R.init(e, t);
|
|
3812
|
-
}), ko = /*@__PURE__*/
|
|
3812
|
+
}), ko = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
|
|
3813
3813
|
Fn.init(e, t), R.init(e, t);
|
|
3814
|
-
}), Ao = /*@__PURE__*/
|
|
3814
|
+
}), Ao = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
|
|
3815
3815
|
In.init(e, t), R.init(e, t);
|
|
3816
|
-
}), jo = /*@__PURE__*/
|
|
3816
|
+
}), jo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
|
|
3817
3817
|
Rn.init(e, t), R.init(e, t);
|
|
3818
|
-
}), Mo = /*@__PURE__*/
|
|
3818
|
+
}), Mo = /*@__PURE__*/ w("ZodBase64", (e, t) => {
|
|
3819
3819
|
Bn.init(e, t), R.init(e, t);
|
|
3820
|
-
}), No = /*@__PURE__*/
|
|
3820
|
+
}), No = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
|
|
3821
3821
|
Hn.init(e, t), R.init(e, t);
|
|
3822
|
-
}), Po = /*@__PURE__*/
|
|
3822
|
+
}), Po = /*@__PURE__*/ w("ZodE164", (e, t) => {
|
|
3823
3823
|
Un.init(e, t), R.init(e, t);
|
|
3824
|
-
}), Fo = /*@__PURE__*/
|
|
3824
|
+
}), Fo = /*@__PURE__*/ w("ZodJWT", (e, t) => {
|
|
3825
3825
|
Gn.init(e, t), R.init(e, t);
|
|
3826
|
-
}), Io = /*@__PURE__*/
|
|
3826
|
+
}), Io = /*@__PURE__*/ w("ZodNumber", (e, t) => {
|
|
3827
3827
|
Kn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
|
|
3828
3828
|
let n = e._zod.bag;
|
|
3829
3829
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
@@ -3877,37 +3877,37 @@ var R = /*@__PURE__*/ T("ZodStringFormat", (e, t) => {
|
|
|
3877
3877
|
function z(e) {
|
|
3878
3878
|
return /* @__PURE__ */ ki(Io, e);
|
|
3879
3879
|
}
|
|
3880
|
-
var Lo = /*@__PURE__*/
|
|
3880
|
+
var Lo = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
|
|
3881
3881
|
qn.init(e, t), Io.init(e, t);
|
|
3882
3882
|
});
|
|
3883
3883
|
function Ro(e) {
|
|
3884
3884
|
return /* @__PURE__ */ Ai(Lo, e);
|
|
3885
3885
|
}
|
|
3886
|
-
var zo = /*@__PURE__*/
|
|
3886
|
+
var zo = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
|
|
3887
3887
|
Jn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
|
|
3888
3888
|
});
|
|
3889
3889
|
function B(e) {
|
|
3890
3890
|
return /* @__PURE__ */ ji(zo, e);
|
|
3891
3891
|
}
|
|
3892
|
-
var Bo = /*@__PURE__*/
|
|
3892
|
+
var Bo = /*@__PURE__*/ w("ZodNull", (e, t) => {
|
|
3893
3893
|
Yn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3894
3894
|
});
|
|
3895
3895
|
function Vo(e) {
|
|
3896
3896
|
return /* @__PURE__ */ Mi(Bo, e);
|
|
3897
3897
|
}
|
|
3898
|
-
var Ho = /*@__PURE__*/
|
|
3898
|
+
var Ho = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
|
|
3899
3899
|
Xn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3900
3900
|
});
|
|
3901
3901
|
function V() {
|
|
3902
3902
|
return /* @__PURE__ */ Ni(Ho);
|
|
3903
3903
|
}
|
|
3904
|
-
var Uo = /*@__PURE__*/
|
|
3904
|
+
var Uo = /*@__PURE__*/ w("ZodNever", (e, t) => {
|
|
3905
3905
|
Zn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
|
|
3906
3906
|
});
|
|
3907
3907
|
function Wo(e) {
|
|
3908
3908
|
return /* @__PURE__ */ Pi(Uo, e);
|
|
3909
3909
|
}
|
|
3910
|
-
var Go = /*@__PURE__*/
|
|
3910
|
+
var Go = /*@__PURE__*/ w("ZodArray", (e, t) => {
|
|
3911
3911
|
lo(), $n.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Da(e, t, n, r), e.element = t.element;
|
|
3912
3912
|
}, {
|
|
3913
3913
|
min(e, t) {
|
|
@@ -3929,8 +3929,8 @@ var Go = /*@__PURE__*/ T("ZodArray", (e, t) => {
|
|
|
3929
3929
|
function H(e, t) {
|
|
3930
3930
|
return /* @__PURE__ */ ea(Go, e, t);
|
|
3931
3931
|
}
|
|
3932
|
-
var Ko = /*@__PURE__*/
|
|
3933
|
-
lo(), or.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r),
|
|
3932
|
+
var Ko = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
3933
|
+
lo(), or.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r), Oe(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3934
3934
|
}, {
|
|
3935
3935
|
keyof() {
|
|
3936
3936
|
return K(Object.keys(this._zod.def.shape));
|
|
@@ -3966,58 +3966,66 @@ var Ko = /*@__PURE__*/ T("ZodObject", (e, t) => {
|
|
|
3966
3966
|
});
|
|
3967
3967
|
},
|
|
3968
3968
|
extend(e) {
|
|
3969
|
-
return
|
|
3969
|
+
return le(this, e);
|
|
3970
3970
|
},
|
|
3971
3971
|
safeExtend(e) {
|
|
3972
|
-
return
|
|
3972
|
+
return ue(this, e);
|
|
3973
3973
|
},
|
|
3974
3974
|
merge(e) {
|
|
3975
|
-
return
|
|
3975
|
+
return de(this, e);
|
|
3976
3976
|
},
|
|
3977
3977
|
pick(e) {
|
|
3978
|
-
return
|
|
3978
|
+
return se(this, e);
|
|
3979
3979
|
},
|
|
3980
3980
|
omit(e) {
|
|
3981
|
-
return
|
|
3981
|
+
return ce(this, e);
|
|
3982
3982
|
},
|
|
3983
3983
|
partial(...e) {
|
|
3984
|
-
return
|
|
3984
|
+
return fe(is, this, e[0]);
|
|
3985
3985
|
},
|
|
3986
3986
|
exactPartial(...e) {
|
|
3987
|
-
return
|
|
3987
|
+
return fe(os, this, e[0], "exactPartial");
|
|
3988
3988
|
},
|
|
3989
3989
|
required(...e) {
|
|
3990
|
-
return
|
|
3990
|
+
return pe(ms, this, e[0]);
|
|
3991
3991
|
}
|
|
3992
3992
|
});
|
|
3993
3993
|
function U(e, t) {
|
|
3994
3994
|
return new Ko({
|
|
3995
3995
|
type: "object",
|
|
3996
3996
|
shape: e ?? {},
|
|
3997
|
-
...
|
|
3997
|
+
..._(t)
|
|
3998
|
+
});
|
|
3999
|
+
}
|
|
4000
|
+
function qo(e, t) {
|
|
4001
|
+
return new Ko({
|
|
4002
|
+
type: "object",
|
|
4003
|
+
shape: e,
|
|
4004
|
+
catchall: Wo(),
|
|
4005
|
+
..._(t)
|
|
3998
4006
|
});
|
|
3999
4007
|
}
|
|
4000
|
-
var
|
|
4008
|
+
var Jo = /*@__PURE__*/ w("ZodUnion", (e, t) => {
|
|
4001
4009
|
cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.options = t.options;
|
|
4002
4010
|
});
|
|
4003
4011
|
function W(e, t) {
|
|
4004
|
-
return new
|
|
4012
|
+
return new Jo({
|
|
4005
4013
|
type: "union",
|
|
4006
4014
|
options: e,
|
|
4007
|
-
...
|
|
4015
|
+
..._(t)
|
|
4008
4016
|
});
|
|
4009
4017
|
}
|
|
4010
|
-
var
|
|
4018
|
+
var Yo = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
|
|
4011
4019
|
lr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r);
|
|
4012
4020
|
});
|
|
4013
|
-
function
|
|
4014
|
-
return new
|
|
4021
|
+
function Xo(e, t) {
|
|
4022
|
+
return new Yo({
|
|
4015
4023
|
type: "intersection",
|
|
4016
4024
|
left: e,
|
|
4017
4025
|
right: t
|
|
4018
4026
|
});
|
|
4019
4027
|
}
|
|
4020
|
-
var
|
|
4028
|
+
var Zo = /*@__PURE__*/ w("ZodTuple", (e, t) => {
|
|
4021
4029
|
lo(), fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
|
|
4022
4030
|
}, {
|
|
4023
4031
|
rest(e) {
|
|
@@ -4031,135 +4039,135 @@ var Xo = /*@__PURE__*/ T("ZodTuple", (e, t) => {
|
|
|
4031
4039
|
if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
4032
4040
|
return this.clone({
|
|
4033
4041
|
...e,
|
|
4034
|
-
items: e.items.map((e) => new
|
|
4042
|
+
items: e.items.map((e) => new is({
|
|
4035
4043
|
type: "optional",
|
|
4036
4044
|
innerType: e
|
|
4037
4045
|
}))
|
|
4038
4046
|
});
|
|
4039
4047
|
}
|
|
4040
4048
|
});
|
|
4041
|
-
function
|
|
4049
|
+
function Qo(e, t, n) {
|
|
4042
4050
|
let r = t instanceof k;
|
|
4043
|
-
return new
|
|
4051
|
+
return new Zo({
|
|
4044
4052
|
type: "tuple",
|
|
4045
4053
|
items: e,
|
|
4046
4054
|
rest: r ? t : null,
|
|
4047
|
-
...
|
|
4055
|
+
..._(r ? n : t)
|
|
4048
4056
|
});
|
|
4049
4057
|
}
|
|
4050
|
-
var
|
|
4058
|
+
var $o = /*@__PURE__*/ w("ZodRecord", (e, t) => {
|
|
4051
4059
|
lo(), gr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4052
4060
|
});
|
|
4053
4061
|
function G(e, t, n) {
|
|
4054
|
-
return !t || !t._zod ? new
|
|
4062
|
+
return !t || !t._zod ? new $o({
|
|
4055
4063
|
type: "record",
|
|
4056
4064
|
keyType: L(),
|
|
4057
4065
|
valueType: e,
|
|
4058
|
-
...
|
|
4059
|
-
}) : new
|
|
4066
|
+
..._(t)
|
|
4067
|
+
}) : new $o({
|
|
4060
4068
|
type: "record",
|
|
4061
4069
|
keyType: e,
|
|
4062
4070
|
valueType: t,
|
|
4063
|
-
...
|
|
4071
|
+
..._(n)
|
|
4064
4072
|
});
|
|
4065
4073
|
}
|
|
4066
|
-
var
|
|
4074
|
+
var es = /*@__PURE__*/ w("ZodEnum", (e, t) => {
|
|
4067
4075
|
_r.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4068
4076
|
let n = new Set(Object.keys(t.entries));
|
|
4069
4077
|
e.extract = (e, r) => {
|
|
4070
4078
|
let i = {};
|
|
4071
4079
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
4072
4080
|
else throw Error(`Key ${r} not found in enum`);
|
|
4073
|
-
return new
|
|
4081
|
+
return new es({
|
|
4074
4082
|
...t,
|
|
4075
4083
|
checks: [],
|
|
4076
|
-
...
|
|
4084
|
+
..._(r),
|
|
4077
4085
|
entries: i
|
|
4078
4086
|
});
|
|
4079
4087
|
}, e.exclude = (e, r) => {
|
|
4080
4088
|
let i = { ...t.entries };
|
|
4081
4089
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
4082
4090
|
else throw Error(`Key ${t} not found in enum`);
|
|
4083
|
-
return new
|
|
4091
|
+
return new es({
|
|
4084
4092
|
...t,
|
|
4085
4093
|
checks: [],
|
|
4086
|
-
...
|
|
4094
|
+
..._(r),
|
|
4087
4095
|
entries: i
|
|
4088
4096
|
});
|
|
4089
4097
|
};
|
|
4090
4098
|
});
|
|
4091
4099
|
function K(e, t) {
|
|
4092
|
-
return new
|
|
4100
|
+
return new es({
|
|
4093
4101
|
type: "enum",
|
|
4094
4102
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
4095
|
-
...
|
|
4103
|
+
..._(t)
|
|
4096
4104
|
});
|
|
4097
4105
|
}
|
|
4098
|
-
var
|
|
4106
|
+
var ts = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
|
|
4099
4107
|
vr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4100
4108
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4101
4109
|
return t.values[0];
|
|
4102
4110
|
} });
|
|
4103
4111
|
});
|
|
4104
4112
|
function q(e, t) {
|
|
4105
|
-
return new
|
|
4113
|
+
return new ts({
|
|
4106
4114
|
type: "literal",
|
|
4107
4115
|
values: Array.isArray(e) ? e : [e],
|
|
4108
|
-
...
|
|
4116
|
+
..._(t)
|
|
4109
4117
|
});
|
|
4110
4118
|
}
|
|
4111
|
-
var
|
|
4119
|
+
var ns = /*@__PURE__*/ w("ZodTransform", (e, t) => {
|
|
4112
4120
|
lo(), yr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4113
4121
|
if (r.direction === "backward") throw new Fe(e.constructor.name);
|
|
4114
4122
|
n.addIssue = (r) => {
|
|
4115
|
-
if (typeof r == "string") n.issues.push(
|
|
4123
|
+
if (typeof r == "string") n.issues.push(xe(r, n.value, t));
|
|
4116
4124
|
else {
|
|
4117
4125
|
let t = r;
|
|
4118
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(
|
|
4126
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(xe(t));
|
|
4119
4127
|
}
|
|
4120
4128
|
};
|
|
4121
4129
|
let i = t.transform(n.value, n);
|
|
4122
4130
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
4123
4131
|
};
|
|
4124
4132
|
});
|
|
4125
|
-
function
|
|
4126
|
-
return new
|
|
4133
|
+
function rs(e) {
|
|
4134
|
+
return new ns({
|
|
4127
4135
|
type: "transform",
|
|
4128
4136
|
transform: e
|
|
4129
4137
|
});
|
|
4130
4138
|
}
|
|
4131
|
-
var
|
|
4139
|
+
var is = /*@__PURE__*/ w("ZodOptional", (e, t) => {
|
|
4132
4140
|
xr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4133
4141
|
});
|
|
4134
|
-
function
|
|
4135
|
-
return new
|
|
4142
|
+
function as(e) {
|
|
4143
|
+
return new is({
|
|
4136
4144
|
type: "optional",
|
|
4137
4145
|
innerType: e
|
|
4138
4146
|
});
|
|
4139
4147
|
}
|
|
4140
|
-
var
|
|
4148
|
+
var os = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
|
|
4141
4149
|
Sr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4142
4150
|
});
|
|
4143
|
-
function
|
|
4144
|
-
return new
|
|
4151
|
+
function ss(e) {
|
|
4152
|
+
return new os({
|
|
4145
4153
|
type: "optional",
|
|
4146
4154
|
innerType: e
|
|
4147
4155
|
});
|
|
4148
4156
|
}
|
|
4149
|
-
var
|
|
4157
|
+
var cs = /*@__PURE__*/ w("ZodNullable", (e, t) => {
|
|
4150
4158
|
Cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4151
4159
|
});
|
|
4152
|
-
function
|
|
4153
|
-
return new
|
|
4160
|
+
function ls(e) {
|
|
4161
|
+
return new cs({
|
|
4154
4162
|
type: "nullable",
|
|
4155
4163
|
innerType: e
|
|
4156
4164
|
});
|
|
4157
4165
|
}
|
|
4158
|
-
var
|
|
4166
|
+
var us = /*@__PURE__*/ w("ZodDefault", (e, t) => {
|
|
4159
4167
|
wr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4160
4168
|
});
|
|
4161
|
-
function
|
|
4162
|
-
return new
|
|
4169
|
+
function ds(e, t) {
|
|
4170
|
+
return new us({
|
|
4163
4171
|
type: "default",
|
|
4164
4172
|
innerType: e,
|
|
4165
4173
|
get defaultValue() {
|
|
@@ -4167,11 +4175,11 @@ function us(e, t) {
|
|
|
4167
4175
|
}
|
|
4168
4176
|
});
|
|
4169
4177
|
}
|
|
4170
|
-
var
|
|
4178
|
+
var fs = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
|
|
4171
4179
|
Er.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4172
4180
|
});
|
|
4173
|
-
function
|
|
4174
|
-
return new
|
|
4181
|
+
function ps(e, t) {
|
|
4182
|
+
return new fs({
|
|
4175
4183
|
type: "prefault",
|
|
4176
4184
|
innerType: e,
|
|
4177
4185
|
get defaultValue() {
|
|
@@ -4179,65 +4187,65 @@ function fs(e, t) {
|
|
|
4179
4187
|
}
|
|
4180
4188
|
});
|
|
4181
4189
|
}
|
|
4182
|
-
var
|
|
4190
|
+
var ms = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
|
|
4183
4191
|
Dr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4184
4192
|
});
|
|
4185
|
-
function
|
|
4186
|
-
return new
|
|
4193
|
+
function hs(e, t) {
|
|
4194
|
+
return new ms({
|
|
4187
4195
|
type: "nonoptional",
|
|
4188
4196
|
innerType: e,
|
|
4189
|
-
...
|
|
4197
|
+
..._(t)
|
|
4190
4198
|
});
|
|
4191
4199
|
}
|
|
4192
|
-
var
|
|
4200
|
+
var gs = /*@__PURE__*/ w("ZodCatch", (e, t) => {
|
|
4193
4201
|
Ar.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4194
4202
|
});
|
|
4195
|
-
function
|
|
4196
|
-
return new
|
|
4203
|
+
function _s(e, t) {
|
|
4204
|
+
return new gs({
|
|
4197
4205
|
type: "catch",
|
|
4198
4206
|
innerType: e,
|
|
4199
|
-
catchValue: typeof t == "function" ? t :
|
|
4207
|
+
catchValue: typeof t == "function" ? t : Ae(t)
|
|
4200
4208
|
});
|
|
4201
4209
|
}
|
|
4202
|
-
var
|
|
4210
|
+
var vs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
|
|
4203
4211
|
jr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4204
4212
|
});
|
|
4205
|
-
function
|
|
4206
|
-
return new
|
|
4213
|
+
function ys(e, t) {
|
|
4214
|
+
return new vs({
|
|
4207
4215
|
type: "pipe",
|
|
4208
4216
|
in: e,
|
|
4209
4217
|
out: t
|
|
4210
4218
|
});
|
|
4211
4219
|
}
|
|
4212
|
-
var
|
|
4220
|
+
var bs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
|
|
4213
4221
|
Nr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4214
4222
|
});
|
|
4215
|
-
function
|
|
4216
|
-
return new
|
|
4223
|
+
function xs(e) {
|
|
4224
|
+
return new bs({
|
|
4217
4225
|
type: "readonly",
|
|
4218
4226
|
innerType: e
|
|
4219
4227
|
});
|
|
4220
4228
|
}
|
|
4221
|
-
var
|
|
4229
|
+
var Ss = /*@__PURE__*/ w("ZodLazy", (e, t) => {
|
|
4222
4230
|
Fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4223
4231
|
});
|
|
4224
|
-
function
|
|
4225
|
-
return new
|
|
4232
|
+
function Cs(e) {
|
|
4233
|
+
return new Ss({
|
|
4226
4234
|
type: "lazy",
|
|
4227
4235
|
getter: e
|
|
4228
4236
|
});
|
|
4229
4237
|
}
|
|
4230
|
-
var
|
|
4238
|
+
var ws = /*@__PURE__*/ w("ZodCustom", (e, t) => {
|
|
4231
4239
|
Ir.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r);
|
|
4232
4240
|
});
|
|
4233
|
-
function
|
|
4234
|
-
return /* @__PURE__ */ ta(
|
|
4241
|
+
function Ts(e, t = {}) {
|
|
4242
|
+
return /* @__PURE__ */ ta(ws, e, t);
|
|
4235
4243
|
}
|
|
4236
|
-
function
|
|
4244
|
+
function Es(e, t) {
|
|
4237
4245
|
return /* @__PURE__ */ na(e, t);
|
|
4238
4246
|
}
|
|
4239
|
-
function
|
|
4240
|
-
let t =
|
|
4247
|
+
function Ds(e) {
|
|
4248
|
+
let t = Cs(() => W([
|
|
4241
4249
|
L(e),
|
|
4242
4250
|
z(),
|
|
4243
4251
|
B(),
|
|
@@ -4249,45 +4257,45 @@ function Es(e) {
|
|
|
4249
4257
|
}
|
|
4250
4258
|
//#endregion
|
|
4251
4259
|
//#region src/flow/common/json.ts
|
|
4252
|
-
var
|
|
4253
|
-
function
|
|
4260
|
+
var Os = 64;
|
|
4261
|
+
function ks(e, t = 0) {
|
|
4254
4262
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4255
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4263
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) ks(n, t + 1);
|
|
4256
4264
|
}
|
|
4257
4265
|
//#endregion
|
|
4258
4266
|
//#region src/flow/common/changeSchema.ts
|
|
4259
|
-
var J = L(), Y =
|
|
4267
|
+
var J = L(), Y = Ds(), As = H(J), js = U({
|
|
4260
4268
|
description: J.optional(),
|
|
4261
4269
|
jsonSchema: Y,
|
|
4262
4270
|
nullable: B(),
|
|
4263
4271
|
handle: J
|
|
4264
|
-
}), X =
|
|
4272
|
+
}), X = js.extend({ value: Y.optional() }), Ms = U({
|
|
4265
4273
|
collapsed: B().optional(),
|
|
4266
4274
|
group: J
|
|
4267
|
-
}),
|
|
4275
|
+
}), Ns = U({
|
|
4268
4276
|
kind: q("node"),
|
|
4269
4277
|
nodeId: J,
|
|
4270
4278
|
output: J
|
|
4271
|
-
}),
|
|
4279
|
+
}), Ps = U({
|
|
4272
4280
|
kind: q("flow"),
|
|
4273
4281
|
input: J
|
|
4274
|
-
}),
|
|
4275
|
-
Ms,
|
|
4282
|
+
}), Fs = W([
|
|
4276
4283
|
Ns,
|
|
4284
|
+
Ps,
|
|
4277
4285
|
U({
|
|
4278
4286
|
kind: q("binding"),
|
|
4279
4287
|
bindingId: J
|
|
4280
4288
|
})
|
|
4281
|
-
]),
|
|
4289
|
+
]), Is = W([U({
|
|
4282
4290
|
kind: q("value"),
|
|
4283
4291
|
value: Y
|
|
4284
4292
|
}), U({
|
|
4285
4293
|
kind: q("sources"),
|
|
4286
|
-
sources: H(
|
|
4287
|
-
})]),
|
|
4288
|
-
inputs: H(W([X,
|
|
4289
|
-
outputs: H(W([
|
|
4290
|
-
},
|
|
4294
|
+
sources: H(Fs)
|
|
4295
|
+
})]), Ls = G(J, Is), Rs = {
|
|
4296
|
+
inputs: H(W([X, Ms])),
|
|
4297
|
+
outputs: H(W([js, Ms]))
|
|
4298
|
+
}, zs = U({
|
|
4291
4299
|
kind: q("connector"),
|
|
4292
4300
|
action: J,
|
|
4293
4301
|
connectionId: J.optional(),
|
|
@@ -4295,19 +4303,19 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4295
4303
|
connectionId: J,
|
|
4296
4304
|
alias: J.optional()
|
|
4297
4305
|
}))
|
|
4298
|
-
}),
|
|
4299
|
-
...
|
|
4306
|
+
}), Bs = U({
|
|
4307
|
+
...Rs,
|
|
4300
4308
|
name: J,
|
|
4301
4309
|
moduleId: J,
|
|
4302
|
-
capabilities: H(
|
|
4303
|
-
}),
|
|
4310
|
+
capabilities: H(zs).optional()
|
|
4311
|
+
}), Vs = W([U({
|
|
4304
4312
|
kind: q("value"),
|
|
4305
4313
|
value: Y
|
|
4306
4314
|
}), U({
|
|
4307
4315
|
kind: q("input"),
|
|
4308
4316
|
input: J
|
|
4309
|
-
})]),
|
|
4310
|
-
...
|
|
4317
|
+
})]), Hs = W([Vs, U({ kind: q("model") })]), Us = U({
|
|
4318
|
+
...Rs,
|
|
4311
4319
|
name: J,
|
|
4312
4320
|
executor: W([
|
|
4313
4321
|
U({
|
|
@@ -4323,7 +4331,7 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4323
4331
|
kind: q("agent"),
|
|
4324
4332
|
code: B().optional(),
|
|
4325
4333
|
model: J,
|
|
4326
|
-
prompt:
|
|
4334
|
+
prompt: Vs,
|
|
4327
4335
|
system: J,
|
|
4328
4336
|
maxRounds: z(),
|
|
4329
4337
|
tools: H(U({
|
|
@@ -4333,16 +4341,16 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4333
4341
|
action: J,
|
|
4334
4342
|
connectionId: J.optional(),
|
|
4335
4343
|
approval: B(),
|
|
4336
|
-
inputs: H(X.extend({ source:
|
|
4344
|
+
inputs: H(X.extend({ source: Hs }))
|
|
4337
4345
|
})),
|
|
4338
4346
|
notification: U({
|
|
4339
4347
|
taskId: J,
|
|
4340
4348
|
messageHandle: J,
|
|
4341
|
-
inputs: G(J,
|
|
4349
|
+
inputs: G(J, Vs)
|
|
4342
4350
|
}).optional()
|
|
4343
4351
|
})
|
|
4344
4352
|
])
|
|
4345
|
-
}),
|
|
4353
|
+
}), Ws = {
|
|
4346
4354
|
input: X,
|
|
4347
4355
|
cases: H(U({
|
|
4348
4356
|
output: J,
|
|
@@ -4375,25 +4383,20 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4375
4383
|
}))
|
|
4376
4384
|
})),
|
|
4377
4385
|
defaultOutput: J.optional()
|
|
4378
|
-
}, Ws = {
|
|
4379
|
-
actions: W([Zo([q("continue")]), Zo([q("approve"), q("reject")])]),
|
|
4380
|
-
prompt: J,
|
|
4381
|
-
notification: U({
|
|
4382
|
-
inputs: Is,
|
|
4383
|
-
messageHandle: J,
|
|
4384
|
-
taskId: J
|
|
4385
|
-
}).optional()
|
|
4386
4386
|
}, Gs = {
|
|
4387
|
+
actions: W([Qo([q("continue")]), Qo([q("approve"), q("reject")])]),
|
|
4388
|
+
prompt: J
|
|
4389
|
+
}, Ks = {
|
|
4387
4390
|
inputsDef: H(X),
|
|
4388
4391
|
options: U({
|
|
4389
|
-
allowedMethods:
|
|
4390
|
-
allowedOrigins:
|
|
4392
|
+
allowedMethods: As.optional(),
|
|
4393
|
+
allowedOrigins: As.optional(),
|
|
4391
4394
|
noResponseBody: B().optional(),
|
|
4392
4395
|
responseData: J.optional(),
|
|
4393
4396
|
responseHeaders: G(J, J).optional(),
|
|
4394
4397
|
responseStatusCode: z().optional()
|
|
4395
4398
|
}).optional()
|
|
4396
|
-
},
|
|
4399
|
+
}, qs = H(W([U({
|
|
4397
4400
|
type: q("cron"),
|
|
4398
4401
|
expression: J,
|
|
4399
4402
|
timezone: J
|
|
@@ -4407,7 +4410,7 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4407
4410
|
"week"
|
|
4408
4411
|
]),
|
|
4409
4412
|
value: z()
|
|
4410
|
-
})])),
|
|
4413
|
+
})])), Js = {
|
|
4411
4414
|
configSchema: Y,
|
|
4412
4415
|
definitionVersion: z(),
|
|
4413
4416
|
description: J,
|
|
@@ -4416,7 +4419,7 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4416
4419
|
name: J,
|
|
4417
4420
|
payloadSchema: Y,
|
|
4418
4421
|
provider: J
|
|
4419
|
-
},
|
|
4422
|
+
}, Ys = U({
|
|
4420
4423
|
body: U({
|
|
4421
4424
|
allowArray: B(),
|
|
4422
4425
|
allowEmpty: B(),
|
|
@@ -4436,21 +4439,21 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4436
4439
|
"PUT"
|
|
4437
4440
|
])),
|
|
4438
4441
|
successStatus: z()
|
|
4439
|
-
}),
|
|
4442
|
+
}), Xs = {
|
|
4440
4443
|
name: J,
|
|
4441
4444
|
description: J.optional(),
|
|
4442
4445
|
icon: J.optional()
|
|
4443
4446
|
}, Z = {
|
|
4444
|
-
inputs:
|
|
4447
|
+
inputs: Ls,
|
|
4445
4448
|
name: J.optional(),
|
|
4446
4449
|
description: J.optional(),
|
|
4447
4450
|
icon: J.optional(),
|
|
4448
4451
|
timeoutMs: z().optional()
|
|
4449
|
-
},
|
|
4452
|
+
}, Zs = W([
|
|
4450
4453
|
U({
|
|
4451
4454
|
...Z,
|
|
4452
4455
|
kind: q("condition"),
|
|
4453
|
-
...
|
|
4456
|
+
...Ws
|
|
4454
4457
|
}),
|
|
4455
4458
|
U({
|
|
4456
4459
|
...Z,
|
|
@@ -4466,7 +4469,7 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4466
4469
|
U({
|
|
4467
4470
|
...Z,
|
|
4468
4471
|
kind: q("task"),
|
|
4469
|
-
task:
|
|
4472
|
+
task: Bs,
|
|
4470
4473
|
additionalInputs: H(X).optional()
|
|
4471
4474
|
}),
|
|
4472
4475
|
U({
|
|
@@ -4475,104 +4478,104 @@ var J = L(), Y = Es(), ks = H(J), As = U({
|
|
|
4475
4478
|
taskId: J,
|
|
4476
4479
|
additionalInputs: H(X).optional()
|
|
4477
4480
|
}),
|
|
4478
|
-
|
|
4481
|
+
qo({
|
|
4479
4482
|
...Z,
|
|
4480
4483
|
kind: q("wait"),
|
|
4481
4484
|
input: X,
|
|
4482
|
-
...
|
|
4485
|
+
...Gs
|
|
4483
4486
|
}).omit({ timeoutMs: !0 }),
|
|
4484
4487
|
U({
|
|
4485
|
-
...
|
|
4488
|
+
...Xs,
|
|
4486
4489
|
kind: q("manual")
|
|
4487
4490
|
}),
|
|
4488
4491
|
U({
|
|
4489
|
-
...
|
|
4492
|
+
...Xs,
|
|
4490
4493
|
kind: q("webhook"),
|
|
4491
|
-
...
|
|
4494
|
+
...Ks
|
|
4492
4495
|
}),
|
|
4493
4496
|
U({
|
|
4494
|
-
...
|
|
4497
|
+
...Xs,
|
|
4495
4498
|
kind: q("cron"),
|
|
4496
|
-
cronTimes:
|
|
4499
|
+
cronTimes: qs
|
|
4497
4500
|
}),
|
|
4498
4501
|
U({
|
|
4499
|
-
...
|
|
4502
|
+
...Xs,
|
|
4500
4503
|
kind: q("poll"),
|
|
4501
4504
|
bindingId: J,
|
|
4502
4505
|
config: G(J, Y),
|
|
4503
4506
|
definition: U({
|
|
4504
|
-
...
|
|
4507
|
+
...Js,
|
|
4505
4508
|
type: q("poll")
|
|
4506
4509
|
}),
|
|
4507
|
-
pollTimes:
|
|
4510
|
+
pollTimes: qs
|
|
4508
4511
|
}),
|
|
4509
4512
|
U({
|
|
4510
|
-
...
|
|
4513
|
+
...Xs,
|
|
4511
4514
|
kind: q("integration"),
|
|
4512
4515
|
bindingId: J,
|
|
4513
4516
|
config: G(J, Y),
|
|
4514
4517
|
definition: U({
|
|
4515
|
-
...
|
|
4518
|
+
...Js,
|
|
4516
4519
|
type: q("integration"),
|
|
4517
|
-
endpoint:
|
|
4520
|
+
endpoint: Ys
|
|
4518
4521
|
})
|
|
4519
4522
|
})
|
|
4520
|
-
]),
|
|
4523
|
+
]), Qs = W([U({ kind: q("flow") }), U({
|
|
4521
4524
|
kind: q("subflow"),
|
|
4522
4525
|
id: J
|
|
4523
|
-
})]),
|
|
4526
|
+
})]), $s = U({
|
|
4524
4527
|
source: J,
|
|
4525
4528
|
target: J,
|
|
4526
4529
|
sourceHandle: J.optional()
|
|
4527
4530
|
}), Q = {
|
|
4528
4531
|
nodeId: J,
|
|
4529
|
-
target:
|
|
4530
|
-
},
|
|
4532
|
+
target: Qs
|
|
4533
|
+
}, ec = U({
|
|
4531
4534
|
name: J,
|
|
4532
4535
|
inputs: H(X),
|
|
4533
|
-
outputs: H(
|
|
4534
|
-
}), ec = U({
|
|
4535
|
-
nodes: G(J, Xs),
|
|
4536
|
-
edges: H(Qs).default([])
|
|
4536
|
+
outputs: H(js.extend({ sources: H(W([Ns, Ps])) }))
|
|
4537
4537
|
}), tc = U({
|
|
4538
|
+
nodes: G(J, Zs),
|
|
4539
|
+
edges: H($s).default([])
|
|
4540
|
+
}), nc = U({
|
|
4538
4541
|
kind: K(["connection", "variable"]),
|
|
4539
4542
|
target: J
|
|
4540
|
-
}),
|
|
4543
|
+
}), rc = U({
|
|
4541
4544
|
name: J,
|
|
4542
|
-
imports:
|
|
4545
|
+
imports: As,
|
|
4543
4546
|
source: J
|
|
4544
|
-
}), rc = U({
|
|
4545
|
-
bindings: G(J, tc),
|
|
4546
|
-
graph: ec,
|
|
4547
|
-
subflows: G(J, $s.extend({ graph: ec })),
|
|
4548
|
-
tasks: G(J, Hs)
|
|
4549
4547
|
}), ic = U({
|
|
4548
|
+
bindings: G(J, nc),
|
|
4549
|
+
graph: tc,
|
|
4550
|
+
subflows: G(J, ec.extend({ graph: tc })),
|
|
4551
|
+
tasks: G(J, Us)
|
|
4552
|
+
}), ac = U({
|
|
4550
4553
|
modelVersion: q(1),
|
|
4551
|
-
document:
|
|
4552
|
-
modules: G(J,
|
|
4553
|
-
}),
|
|
4554
|
+
document: ic,
|
|
4555
|
+
modules: G(J, rc)
|
|
4556
|
+
}), oc = ac.extend({
|
|
4554
4557
|
kind: q("open-flow-flow-revision"),
|
|
4555
4558
|
version: q(1)
|
|
4556
4559
|
});
|
|
4557
|
-
function oc(e) {
|
|
4558
|
-
return Os(e), rc.parse(e);
|
|
4559
|
-
}
|
|
4560
4560
|
function sc(e) {
|
|
4561
|
-
return
|
|
4561
|
+
return ks(e), ic.parse(e);
|
|
4562
4562
|
}
|
|
4563
4563
|
function cc(e) {
|
|
4564
|
-
|
|
4565
|
-
|
|
4564
|
+
return ks(e), ac.parse(e);
|
|
4565
|
+
}
|
|
4566
|
+
function lc(e) {
|
|
4567
|
+
ks(e);
|
|
4568
|
+
let t = oc.parse(e);
|
|
4566
4569
|
return {
|
|
4567
4570
|
modelVersion: t.modelVersion,
|
|
4568
4571
|
document: t.document,
|
|
4569
4572
|
modules: t.modules
|
|
4570
4573
|
};
|
|
4571
4574
|
}
|
|
4572
|
-
var
|
|
4575
|
+
var uc = {
|
|
4573
4576
|
"binding.create": {
|
|
4574
4577
|
bindingId: J,
|
|
4575
|
-
binding:
|
|
4578
|
+
binding: nc
|
|
4576
4579
|
},
|
|
4577
4580
|
"binding.delete": { bindingId: J },
|
|
4578
4581
|
"binding.target.set": {
|
|
@@ -4581,16 +4584,16 @@ var lc = {
|
|
|
4581
4584
|
value: J
|
|
4582
4585
|
},
|
|
4583
4586
|
"graph.edge.connect": {
|
|
4584
|
-
target:
|
|
4585
|
-
edge:
|
|
4587
|
+
target: Qs,
|
|
4588
|
+
edge: $s
|
|
4586
4589
|
},
|
|
4587
4590
|
"graph.edge.disconnect": {
|
|
4588
|
-
target:
|
|
4589
|
-
edge:
|
|
4591
|
+
target: Qs,
|
|
4592
|
+
edge: $s
|
|
4590
4593
|
},
|
|
4591
4594
|
"graph.node.create": {
|
|
4592
4595
|
...Q,
|
|
4593
|
-
node:
|
|
4596
|
+
node: Zs
|
|
4594
4597
|
},
|
|
4595
4598
|
"graph.node.delete": Q,
|
|
4596
4599
|
"graph.node.field.set": W([U({
|
|
@@ -4613,8 +4616,8 @@ var lc = {
|
|
|
4613
4616
|
"graph.node.input.set": {
|
|
4614
4617
|
...Q,
|
|
4615
4618
|
handle: J,
|
|
4616
|
-
before:
|
|
4617
|
-
value:
|
|
4619
|
+
before: Is.optional(),
|
|
4620
|
+
value: Is.optional()
|
|
4618
4621
|
},
|
|
4619
4622
|
"graph.node.additional-inputs.set": {
|
|
4620
4623
|
...Q,
|
|
@@ -4623,8 +4626,8 @@ var lc = {
|
|
|
4623
4626
|
},
|
|
4624
4627
|
"graph.node.condition.set": {
|
|
4625
4628
|
...Q,
|
|
4626
|
-
before: U(
|
|
4627
|
-
value: U(
|
|
4629
|
+
before: U(Ws),
|
|
4630
|
+
value: U(Ws)
|
|
4628
4631
|
},
|
|
4629
4632
|
"graph.node.values.set": {
|
|
4630
4633
|
...Q,
|
|
@@ -4634,19 +4637,19 @@ var lc = {
|
|
|
4634
4637
|
"graph.node.wait.set": {
|
|
4635
4638
|
...Q,
|
|
4636
4639
|
target: U({ kind: q("flow") }),
|
|
4637
|
-
before: U(
|
|
4638
|
-
value: U(
|
|
4640
|
+
before: U(Gs),
|
|
4641
|
+
value: U(Gs)
|
|
4639
4642
|
},
|
|
4640
4643
|
"graph.node.webhook.set": {
|
|
4641
4644
|
...Q,
|
|
4642
4645
|
target: U({ kind: q("flow") }),
|
|
4643
|
-
before: U(
|
|
4644
|
-
value: U(
|
|
4646
|
+
before: U(Ks),
|
|
4647
|
+
value: U(Ks)
|
|
4645
4648
|
},
|
|
4646
4649
|
"graph.node.task.ports.set": {
|
|
4647
4650
|
...Q,
|
|
4648
|
-
before: U(
|
|
4649
|
-
value: U(
|
|
4651
|
+
before: U(Rs),
|
|
4652
|
+
value: U(Rs)
|
|
4650
4653
|
},
|
|
4651
4654
|
"graph.node.task.name.set": {
|
|
4652
4655
|
...Q,
|
|
@@ -4655,8 +4658,8 @@ var lc = {
|
|
|
4655
4658
|
},
|
|
4656
4659
|
"graph.node.task.capabilities.set": {
|
|
4657
4660
|
...Q,
|
|
4658
|
-
before: H(
|
|
4659
|
-
value: H(
|
|
4661
|
+
before: H(zs).optional(),
|
|
4662
|
+
value: H(zs).optional()
|
|
4660
4663
|
},
|
|
4661
4664
|
"graph.trigger.config.set": {
|
|
4662
4665
|
nodeId: J,
|
|
@@ -4666,12 +4669,12 @@ var lc = {
|
|
|
4666
4669
|
},
|
|
4667
4670
|
"graph.trigger.schedule.set": {
|
|
4668
4671
|
nodeId: J,
|
|
4669
|
-
before:
|
|
4670
|
-
value:
|
|
4672
|
+
before: qs,
|
|
4673
|
+
value: qs
|
|
4671
4674
|
},
|
|
4672
4675
|
"module.create": {
|
|
4673
4676
|
moduleId: J,
|
|
4674
|
-
module:
|
|
4677
|
+
module: rc
|
|
4675
4678
|
},
|
|
4676
4679
|
"module.delete": { moduleId: J },
|
|
4677
4680
|
"module.rename": {
|
|
@@ -4681,24 +4684,24 @@ var lc = {
|
|
|
4681
4684
|
},
|
|
4682
4685
|
"module.source.replace": {
|
|
4683
4686
|
moduleId: J,
|
|
4684
|
-
beforeImports:
|
|
4687
|
+
beforeImports: As,
|
|
4685
4688
|
beforeSource: J,
|
|
4686
|
-
imports:
|
|
4689
|
+
imports: As,
|
|
4687
4690
|
source: J
|
|
4688
4691
|
},
|
|
4689
4692
|
"subflow.create": {
|
|
4690
4693
|
subflowId: J,
|
|
4691
|
-
subflow:
|
|
4694
|
+
subflow: ec.extend({ graph: tc })
|
|
4692
4695
|
},
|
|
4693
4696
|
"subflow.definition.set": {
|
|
4694
4697
|
subflowId: J,
|
|
4695
|
-
before:
|
|
4696
|
-
definition:
|
|
4698
|
+
before: ec,
|
|
4699
|
+
definition: ec
|
|
4697
4700
|
},
|
|
4698
4701
|
"subflow.delete": { subflowId: J },
|
|
4699
4702
|
"task.create": {
|
|
4700
4703
|
taskId: J,
|
|
4701
|
-
task:
|
|
4704
|
+
task: Us
|
|
4702
4705
|
},
|
|
4703
4706
|
"task.delete": { taskId: J },
|
|
4704
4707
|
"task.connector.connection.set": {
|
|
@@ -4708,8 +4711,8 @@ var lc = {
|
|
|
4708
4711
|
},
|
|
4709
4712
|
"task.agent.set": {
|
|
4710
4713
|
taskId: J,
|
|
4711
|
-
before:
|
|
4712
|
-
value:
|
|
4714
|
+
before: Us,
|
|
4715
|
+
value: Us
|
|
4713
4716
|
},
|
|
4714
4717
|
"task.llm.mode.set": {
|
|
4715
4718
|
taskId: J,
|
|
@@ -4722,17 +4725,17 @@ var lc = {
|
|
|
4722
4725
|
value: J
|
|
4723
4726
|
}
|
|
4724
4727
|
};
|
|
4725
|
-
H(W([...new Map(Object.entries(
|
|
4728
|
+
H(W([...new Map(Object.entries(uc).map(([e, t]) => [e, t instanceof I ? t : U({
|
|
4726
4729
|
kind: q(e),
|
|
4727
4730
|
...t
|
|
4728
4731
|
})])).values()])).min(1);
|
|
4729
4732
|
//#endregion
|
|
4730
4733
|
//#region src/flow/common/change.ts
|
|
4731
|
-
function
|
|
4734
|
+
function dc(e) {
|
|
4732
4735
|
return e.trim().normalize("NFC");
|
|
4733
4736
|
}
|
|
4734
|
-
function
|
|
4735
|
-
let n =
|
|
4737
|
+
function fc(e, t) {
|
|
4738
|
+
let n = dc(e), r = new Set([...t].map(dc));
|
|
4736
4739
|
if (!r.has(n)) return n;
|
|
4737
4740
|
let i = /^(.*) \((\d+)\)$/.exec(n), a = i?.[2], o = a != null && Number(a) >= 2 ? Number(a) : void 0, s = o == null ? n : i?.[1] ?? n, c = o == null ? 2 : o + 1;
|
|
4738
4741
|
for (; r.has(`${s} (${c})`);) c += 1;
|
|
@@ -4740,24 +4743,24 @@ function dc(e, t) {
|
|
|
4740
4743
|
}
|
|
4741
4744
|
//#endregion
|
|
4742
4745
|
//#region src/flow/common/encoding.ts
|
|
4743
|
-
var
|
|
4744
|
-
function
|
|
4746
|
+
var pc = new TextEncoder();
|
|
4747
|
+
function mc(e) {
|
|
4745
4748
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
4746
|
-
if (Array.isArray(e)) return `[${e.map(
|
|
4749
|
+
if (Array.isArray(e)) return `[${e.map(mc).join(",")}]`;
|
|
4747
4750
|
let t = e;
|
|
4748
|
-
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${
|
|
4751
|
+
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${mc(t[e])}`).join(",")}}`;
|
|
4749
4752
|
}
|
|
4750
|
-
function
|
|
4751
|
-
return
|
|
4753
|
+
function hc(e) {
|
|
4754
|
+
return pc.encode(mc(e));
|
|
4752
4755
|
}
|
|
4753
|
-
async function
|
|
4756
|
+
async function gc(e) {
|
|
4754
4757
|
let t = new Uint8Array(e.byteLength);
|
|
4755
4758
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
4756
4759
|
}
|
|
4757
|
-
function
|
|
4760
|
+
function _c(e) {
|
|
4758
4761
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
4759
4762
|
}
|
|
4760
|
-
function
|
|
4763
|
+
function vc(e) {
|
|
4761
4764
|
return "handle" in e ? {
|
|
4762
4765
|
...e.description == null ? {} : { description: e.description },
|
|
4763
4766
|
handle: e.handle,
|
|
@@ -4770,9 +4773,9 @@ function _c(e) {
|
|
|
4770
4773
|
};
|
|
4771
4774
|
}
|
|
4772
4775
|
function $(e) {
|
|
4773
|
-
return e.map(
|
|
4776
|
+
return e.map(vc);
|
|
4774
4777
|
}
|
|
4775
|
-
function
|
|
4778
|
+
function yc(e) {
|
|
4776
4779
|
switch (e.kind) {
|
|
4777
4780
|
case "sources": return {
|
|
4778
4781
|
kind: e.kind,
|
|
@@ -4784,10 +4787,10 @@ function vc(e) {
|
|
|
4784
4787
|
};
|
|
4785
4788
|
}
|
|
4786
4789
|
}
|
|
4787
|
-
function yc(e) {
|
|
4788
|
-
return Object.fromEntries(gc(e).map(([e, t]) => [e, vc(t)]));
|
|
4789
|
-
}
|
|
4790
4790
|
function bc(e) {
|
|
4791
|
+
return Object.fromEntries(_c(e).map(([e, t]) => [e, yc(t)]));
|
|
4792
|
+
}
|
|
4793
|
+
function xc(e) {
|
|
4791
4794
|
return e.map((e) => ({
|
|
4792
4795
|
...e.description == null ? {} : { description: e.description },
|
|
4793
4796
|
handle: e.handle,
|
|
@@ -4796,12 +4799,12 @@ function bc(e) {
|
|
|
4796
4799
|
sources: e.sources.map((e) => ({ ...e }))
|
|
4797
4800
|
}));
|
|
4798
4801
|
}
|
|
4799
|
-
function
|
|
4800
|
-
if (!("inputs" in e)) return
|
|
4802
|
+
function Sc(e) {
|
|
4803
|
+
if (!("inputs" in e)) return kc(e);
|
|
4801
4804
|
let t = {
|
|
4802
4805
|
...e.description == null ? {} : { description: e.description },
|
|
4803
4806
|
...e.icon == null ? {} : { icon: e.icon },
|
|
4804
|
-
inputs:
|
|
4807
|
+
inputs: bc(e.inputs),
|
|
4805
4808
|
...e.name == null ? {} : { name: e.name },
|
|
4806
4809
|
...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
|
|
4807
4810
|
};
|
|
@@ -4820,7 +4823,7 @@ function xc(e) {
|
|
|
4820
4823
|
...e.defaultOutput == null ? {} : { defaultOutput: e.defaultOutput },
|
|
4821
4824
|
input: {
|
|
4822
4825
|
handle: e.input.handle,
|
|
4823
|
-
...
|
|
4826
|
+
...vc(e.input)
|
|
4824
4827
|
},
|
|
4825
4828
|
kind: e.kind
|
|
4826
4829
|
};
|
|
@@ -4835,7 +4838,7 @@ function xc(e) {
|
|
|
4835
4838
|
taskId: e.taskId
|
|
4836
4839
|
}) : Object.assign({}, t, {
|
|
4837
4840
|
kind: e.kind,
|
|
4838
|
-
task:
|
|
4841
|
+
task: Tc(e.task)
|
|
4839
4842
|
});
|
|
4840
4843
|
return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
|
|
4841
4844
|
}
|
|
@@ -4849,28 +4852,23 @@ function xc(e) {
|
|
|
4849
4852
|
actions: e.actions,
|
|
4850
4853
|
input: {
|
|
4851
4854
|
handle: e.input.handle,
|
|
4852
|
-
...
|
|
4855
|
+
...vc(e.input)
|
|
4853
4856
|
},
|
|
4854
4857
|
kind: e.kind,
|
|
4855
|
-
...e.notification == null ? {} : { notification: {
|
|
4856
|
-
inputs: yc(e.notification.inputs),
|
|
4857
|
-
messageHandle: e.notification.messageHandle,
|
|
4858
|
-
taskId: e.notification.taskId
|
|
4859
|
-
} },
|
|
4860
4858
|
prompt: e.prompt
|
|
4861
4859
|
};
|
|
4862
4860
|
}
|
|
4863
4861
|
}
|
|
4864
|
-
function
|
|
4862
|
+
function Cc(e) {
|
|
4865
4863
|
return {
|
|
4866
4864
|
edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
|
|
4867
|
-
let n =
|
|
4865
|
+
let n = mc(e), r = mc(t);
|
|
4868
4866
|
return n < r ? -1 : +(n > r);
|
|
4869
4867
|
}),
|
|
4870
|
-
nodes: Object.fromEntries(
|
|
4868
|
+
nodes: Object.fromEntries(_c(e.nodes).map(([e, t]) => [e, Sc(t)]))
|
|
4871
4869
|
};
|
|
4872
4870
|
}
|
|
4873
|
-
function
|
|
4871
|
+
function wc(e) {
|
|
4874
4872
|
return {
|
|
4875
4873
|
executor: e.executor,
|
|
4876
4874
|
inputs: $(e.inputs),
|
|
@@ -4878,7 +4876,7 @@ function Cc(e) {
|
|
|
4878
4876
|
outputs: $(e.outputs)
|
|
4879
4877
|
};
|
|
4880
4878
|
}
|
|
4881
|
-
function
|
|
4879
|
+
function Tc(e) {
|
|
4882
4880
|
return {
|
|
4883
4881
|
...e.capabilities == null ? {} : { capabilities: e.capabilities },
|
|
4884
4882
|
inputs: $(e.inputs),
|
|
@@ -4887,7 +4885,7 @@ function wc(e) {
|
|
|
4887
4885
|
outputs: $(e.outputs)
|
|
4888
4886
|
};
|
|
4889
4887
|
}
|
|
4890
|
-
function
|
|
4888
|
+
function Ec(e) {
|
|
4891
4889
|
return {
|
|
4892
4890
|
configSchema: e.configSchema,
|
|
4893
4891
|
definitionVersion: e.definitionVersion,
|
|
@@ -4909,7 +4907,7 @@ function Tc(e) {
|
|
|
4909
4907
|
type: e.type
|
|
4910
4908
|
};
|
|
4911
4909
|
}
|
|
4912
|
-
function
|
|
4910
|
+
function Dc(e) {
|
|
4913
4911
|
return {
|
|
4914
4912
|
...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
|
|
4915
4913
|
...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
|
|
@@ -4919,7 +4917,7 @@ function Ec(e) {
|
|
|
4919
4917
|
...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
|
|
4920
4918
|
};
|
|
4921
4919
|
}
|
|
4922
|
-
function
|
|
4920
|
+
function Oc(e) {
|
|
4923
4921
|
switch (e.type) {
|
|
4924
4922
|
case "cron": return {
|
|
4925
4923
|
expression: e.expression,
|
|
@@ -4933,7 +4931,7 @@ function Dc(e) {
|
|
|
4933
4931
|
};
|
|
4934
4932
|
}
|
|
4935
4933
|
}
|
|
4936
|
-
function
|
|
4934
|
+
function kc(e) {
|
|
4937
4935
|
let t = (t) => ({
|
|
4938
4936
|
...e.description == null ? {} : { description: e.description },
|
|
4939
4937
|
...e.icon == null ? {} : { icon: e.icon },
|
|
@@ -4946,74 +4944,74 @@ function Oc(e) {
|
|
|
4946
4944
|
...t(e.kind),
|
|
4947
4945
|
inputsDef: e.inputsDef.map((e) => ({
|
|
4948
4946
|
handle: e.handle,
|
|
4949
|
-
...
|
|
4947
|
+
...vc(e)
|
|
4950
4948
|
})),
|
|
4951
|
-
...e.options == null ? {} : { options:
|
|
4949
|
+
...e.options == null ? {} : { options: Dc(e.options) }
|
|
4952
4950
|
};
|
|
4953
4951
|
case "cron": return {
|
|
4954
4952
|
...t(e.kind),
|
|
4955
|
-
cronTimes: e.cronTimes.map(
|
|
4953
|
+
cronTimes: e.cronTimes.map(Oc)
|
|
4956
4954
|
};
|
|
4957
4955
|
case "poll": return {
|
|
4958
4956
|
...t(e.kind),
|
|
4959
4957
|
bindingId: e.bindingId,
|
|
4960
4958
|
config: e.config,
|
|
4961
|
-
definition:
|
|
4962
|
-
pollTimes: e.pollTimes.map(
|
|
4959
|
+
definition: Ec(e.definition),
|
|
4960
|
+
pollTimes: e.pollTimes.map(Oc)
|
|
4963
4961
|
};
|
|
4964
4962
|
case "integration": return {
|
|
4965
4963
|
...t(e.kind),
|
|
4966
4964
|
bindingId: e.bindingId,
|
|
4967
4965
|
config: e.config,
|
|
4968
|
-
definition:
|
|
4966
|
+
definition: Ec(e.definition)
|
|
4969
4967
|
};
|
|
4970
4968
|
}
|
|
4971
4969
|
}
|
|
4972
|
-
function
|
|
4970
|
+
function Ac(e) {
|
|
4973
4971
|
let { name: t, description: n, icon: r, ...i } = e;
|
|
4974
|
-
return
|
|
4972
|
+
return mc(i);
|
|
4975
4973
|
}
|
|
4976
|
-
function
|
|
4974
|
+
function jc(e) {
|
|
4977
4975
|
return {
|
|
4978
|
-
bindings: Object.fromEntries(
|
|
4979
|
-
graph:
|
|
4980
|
-
subflows: Object.fromEntries(
|
|
4981
|
-
graph:
|
|
4976
|
+
bindings: Object.fromEntries(_c(e.bindings)),
|
|
4977
|
+
graph: Cc(e.graph),
|
|
4978
|
+
subflows: Object.fromEntries(_c(e.subflows).map(([e, t]) => [e, {
|
|
4979
|
+
graph: Cc(t.graph),
|
|
4982
4980
|
inputs: $(t.inputs),
|
|
4983
4981
|
name: t.name,
|
|
4984
|
-
outputs:
|
|
4982
|
+
outputs: xc(t.outputs)
|
|
4985
4983
|
}])),
|
|
4986
|
-
tasks: Object.fromEntries(
|
|
4984
|
+
tasks: Object.fromEntries(_c(e.tasks).map(([e, t]) => [e, wc(t)]))
|
|
4987
4985
|
};
|
|
4988
4986
|
}
|
|
4989
|
-
function
|
|
4987
|
+
function Mc(e) {
|
|
4990
4988
|
return {
|
|
4991
4989
|
imports: e.imports.toSorted(),
|
|
4992
4990
|
name: e.name,
|
|
4993
4991
|
source: e.source
|
|
4994
4992
|
};
|
|
4995
4993
|
}
|
|
4996
|
-
function
|
|
4994
|
+
function Nc(e) {
|
|
4997
4995
|
return {
|
|
4998
|
-
document:
|
|
4996
|
+
document: jc(e.document),
|
|
4999
4997
|
kind: "open-flow-flow-revision",
|
|
5000
4998
|
modelVersion: e.modelVersion,
|
|
5001
|
-
modules: Object.fromEntries(
|
|
4999
|
+
modules: Object.fromEntries(_c(e.modules).map(([e, t]) => [e, Mc(t)])),
|
|
5002
5000
|
version: 1
|
|
5003
5001
|
};
|
|
5004
5002
|
}
|
|
5005
|
-
function Nc(e) {
|
|
5006
|
-
return mc(Mc(e));
|
|
5007
|
-
}
|
|
5008
5003
|
function Pc(e) {
|
|
5009
|
-
return
|
|
5004
|
+
return hc(Nc(e));
|
|
5010
5005
|
}
|
|
5011
|
-
|
|
5006
|
+
function Fc(e) {
|
|
5007
|
+
return lc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
|
|
5008
|
+
}
|
|
5009
|
+
var Ic = G(L(), V()), Lc = U({
|
|
5012
5010
|
jsonSchema: V(),
|
|
5013
5011
|
nullable: B(),
|
|
5014
5012
|
value: V().optional(),
|
|
5015
5013
|
description: L().optional()
|
|
5016
|
-
}).strict(),
|
|
5014
|
+
}).strict(), Rc = G(L(), Lc), zc = W([U({
|
|
5017
5015
|
kind: q("value"),
|
|
5018
5016
|
value: V()
|
|
5019
5017
|
}).strict(), U({
|
|
@@ -5023,36 +5021,36 @@ var Fc = G(L(), V()), Ic = U({
|
|
|
5023
5021
|
nodeId: L(),
|
|
5024
5022
|
output: L()
|
|
5025
5023
|
}).strict())
|
|
5026
|
-
}).strict()]),
|
|
5024
|
+
}).strict()]), Bc = {
|
|
5027
5025
|
name: L().optional(),
|
|
5028
5026
|
description: L().optional(),
|
|
5029
5027
|
icon: L().optional()
|
|
5030
|
-
},
|
|
5028
|
+
}, Vc = W([
|
|
5031
5029
|
U({
|
|
5032
|
-
...
|
|
5030
|
+
...Bc,
|
|
5033
5031
|
kind: q("cron"),
|
|
5034
5032
|
cronTimes: H(V())
|
|
5035
5033
|
}).strict(),
|
|
5036
5034
|
U({
|
|
5037
|
-
...
|
|
5035
|
+
...Bc,
|
|
5038
5036
|
kind: q("manual")
|
|
5039
5037
|
}).strict(),
|
|
5040
5038
|
U({
|
|
5041
|
-
...
|
|
5039
|
+
...Bc,
|
|
5042
5040
|
kind: q("task"),
|
|
5043
5041
|
concurrency: q(1).optional(),
|
|
5044
|
-
inputs: G(L(),
|
|
5042
|
+
inputs: G(L(), zc),
|
|
5045
5043
|
task: U({
|
|
5046
5044
|
name: L(),
|
|
5047
5045
|
moduleId: L(),
|
|
5048
|
-
inputs:
|
|
5049
|
-
outputs: G(L(),
|
|
5046
|
+
inputs: Rc,
|
|
5047
|
+
outputs: G(L(), Lc.omit({ value: !0 }))
|
|
5050
5048
|
}).strict()
|
|
5051
5049
|
}).strict()
|
|
5052
|
-
]),
|
|
5050
|
+
]), Hc = U({
|
|
5053
5051
|
name: L(),
|
|
5054
|
-
graph: U({ nodes: G(L(),
|
|
5055
|
-
}).strict(),
|
|
5052
|
+
graph: U({ nodes: G(L(), Vc) }).strict()
|
|
5053
|
+
}).strict(), Uc = U({
|
|
5056
5054
|
kind: q("open-flow-project-revision"),
|
|
5057
5055
|
version: q(1),
|
|
5058
5056
|
modelVersion: q(1),
|
|
@@ -5062,27 +5060,27 @@ var Fc = G(L(), V()), Ic = U({
|
|
|
5062
5060
|
imports: H(L())
|
|
5063
5061
|
}).strict()),
|
|
5064
5062
|
document: U({
|
|
5065
|
-
bindings:
|
|
5066
|
-
flows:
|
|
5067
|
-
subflows:
|
|
5068
|
-
tasks:
|
|
5063
|
+
bindings: Ic,
|
|
5064
|
+
flows: Ic,
|
|
5065
|
+
subflows: Ic,
|
|
5066
|
+
tasks: Ic
|
|
5069
5067
|
}).strict()
|
|
5070
5068
|
}).strict();
|
|
5071
|
-
function
|
|
5069
|
+
function Wc(e) {
|
|
5072
5070
|
return Object.entries(e).map(([e, t]) => Object.assign({ handle: e }, t));
|
|
5073
5071
|
}
|
|
5074
|
-
function
|
|
5075
|
-
return Object.keys(
|
|
5072
|
+
function Gc(e) {
|
|
5073
|
+
return Object.keys(Uc.parse(e).document.flows).toSorted();
|
|
5076
5074
|
}
|
|
5077
|
-
function
|
|
5078
|
-
let n =
|
|
5075
|
+
function Kc(e, t) {
|
|
5076
|
+
let n = Uc.parse(e);
|
|
5079
5077
|
if ([
|
|
5080
5078
|
n.document.bindings,
|
|
5081
5079
|
n.document.subflows,
|
|
5082
5080
|
n.document.tasks
|
|
5083
5081
|
].some((e) => Object.keys(e).length != 0)) throw Error("Project bindings, managed tasks and subflows require an explicit semantic conversion.");
|
|
5084
|
-
let r =
|
|
5085
|
-
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r =
|
|
5082
|
+
let r = Hc.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
|
|
5083
|
+
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = fc(n, a);
|
|
5086
5084
|
if (a.add(r), r != n && i.push(`Renamed node ${e} to ${r}.`), t.kind != "task") return [e, {
|
|
5087
5085
|
...t,
|
|
5088
5086
|
name: r
|
|
@@ -5093,11 +5091,11 @@ function Gc(e, t) {
|
|
|
5093
5091
|
name: r,
|
|
5094
5092
|
task: {
|
|
5095
5093
|
...t.task,
|
|
5096
|
-
inputs:
|
|
5097
|
-
outputs:
|
|
5094
|
+
inputs: Wc(t.task.inputs),
|
|
5095
|
+
outputs: Wc(t.task.outputs)
|
|
5098
5096
|
}
|
|
5099
5097
|
}];
|
|
5100
|
-
})), s =
|
|
5098
|
+
})), s = cc({
|
|
5101
5099
|
modelVersion: 1,
|
|
5102
5100
|
modules: n.modules,
|
|
5103
5101
|
document: {
|
|
@@ -5132,7 +5130,7 @@ function Gc(e, t) {
|
|
|
5132
5130
|
let f = { ...s.document.graph.nodes };
|
|
5133
5131
|
return d != null && (f[d] = {
|
|
5134
5132
|
kind: "manual",
|
|
5135
|
-
name:
|
|
5133
|
+
name: fc("Start", a)
|
|
5136
5134
|
}), {
|
|
5137
5135
|
name: r.name,
|
|
5138
5136
|
adjustments: i,
|
|
@@ -5149,4 +5147,4 @@ function Gc(e, t) {
|
|
|
5149
5147
|
};
|
|
5150
5148
|
}
|
|
5151
5149
|
//#endregion
|
|
5152
|
-
export {
|
|
5150
|
+
export { jc as canonicalDocument, Cc as canonicalGraph, hc as canonicalJsonBytes, Mc as canonicalModule, xc as canonicalOutputs, $ as canonicalPorts, wc as canonicalTask, Kc as convertProjectFlow, sc as decodeFlowDocument, Fc as decodeRevision, cc as decodeRevisionContent, gc as digestBytes, Pc as encodeRevision, Gc as legacyProjectFlowIds, Os as maxJsonDepth, Ac as triggerRuntimeJson };
|