@oomol-lab/open-flow 0.1.0-beta.30 → 0.1.0-beta.32
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-_y2xHaUA.js → createResourceDialog-DRB0OEtr.js} +2 -2
- package/dist/browser/{editorComponent-Dq4IKp5R.js → editorComponent-bXA-KosC.js} +2765 -1113
- package/dist/browser/flow-authoring-node.d.ts +5 -3
- package/dist/browser/flow-authoring.js +1575 -1472
- package/dist/browser/flow-change.d.ts +47 -20
- package/dist/browser/flow-change.js +1728 -1602
- package/dist/browser/flow-input-value.d.ts +6 -0
- package/dist/browser/flow-notifications.d.ts +5 -0
- package/dist/browser/flowChanges-FiZJreeB.js +9855 -0
- package/dist/browser/{flowRunInputEditorStore-CTORQcA2.js → flowRunInputEditorStore-Bgb5vSeS.js} +3 -3
- package/dist/browser/flowWorkspace-CBo6Ih_c.js +40987 -0
- package/dist/browser/{inputValues-DJfFraxG.js → inputValues-CUyjbECo.js} +2 -2
- package/dist/browser/licenses.md +0 -58
- package/dist/browser/{lite-BuKZ8joP.js → lite-BA96NG4M.js} +8 -4
- package/dist/browser/theme.css +2 -0
- package/dist/browser/ui.css +2 -1
- package/dist/browser/ui.d.ts +31 -3
- package/dist/browser/ui.js +3547 -772
- package/dist/browser/{value-DPg_9yXB.js → value-B_yE9ean.js} +22 -14
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -0
- package/dist/browser/workbench.js +3944 -1077
- package/dist/browser/{workbenchSelect-BDPIQxYK.js → workbenchSelect-DNteZJYP.js} +1698 -1470
- package/dist/common/control-api-conformance.d.ts +6 -0
- package/dist/common/control-api-conformance.js +510 -394
- package/dist/common/control-api-errors.d.ts +16 -0
- package/dist/common/control-api.d.ts +64 -7
- package/dist/common/control-api.js +1724 -1568
- package/dist/common/control-requests.d.ts +16 -0
- package/dist/common/control-requests.js +685 -651
- package/dist/common/event-sources.d.ts +0 -1
- package/dist/common/feishu-events.d.ts +0 -1
- package/dist/common/flow-encoding.js +1168 -1140
- package/dist/common/flow-graph.d.ts +16 -9
- package/dist/common/flow-notifications.d.ts +5 -0
- package/dist/common/flow-semantics.d.ts +2 -2
- package/dist/common/flow-semantics.js +2223 -1954
- package/dist/common/fr-ClB96SQY.js +298 -0
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/integration-trigger.js +7572 -88
- package/dist/common/ja-BJF-VrP2.js +298 -0
- package/dist/common/ko-Bght_VaB.js +298 -0
- package/dist/common/mcp.d.ts +1 -0
- package/dist/common/mcp.js +1727 -1574
- package/dist/common/poll-trigger.d.ts +3 -1
- package/dist/common/poll-trigger.js +7512 -28
- package/dist/common/provider-triggers.js +6806 -3525
- package/dist/common/ru-DrP4BRM5.js +298 -0
- package/dist/common/runtime-contract.d.ts +1 -1
- package/dist/common/runtime-contract.js +41 -27
- package/dist/common/scheduler.d.ts +7 -1
- package/dist/common/scheduler.js +981 -792
- package/dist/common/trigger-catalog.d.ts +3 -1
- package/dist/common/trigger-config.d.ts +7 -0
- package/dist/common/zh-CN-D2od3TNw.js +298 -0
- package/dist/common/zh-TW-CRmc3FMz.js +298 -0
- package/package.json +1 -1
- package/dist/browser/flowChanges-AdN0Iqma.js +0 -12304
- package/dist/browser/flowWorkspace-BrtzLKWB.js +0 -153066
- package/dist/common/fr-iv1541dF.js +0 -93
- package/dist/common/ja-Bq-ZDOD4.js +0 -93
- package/dist/common/ko-Z-k9R2c6.js +0 -93
- package/dist/common/ru-B4gFecYZ.js +0 -93
- package/dist/common/zh-CN-ByQ6nYam.js +0 -93
- package/dist/common/zh-TW-QjIarvX9.js +0 -93
|
@@ -68,29 +68,29 @@ function m(e) {
|
|
|
68
68
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
69
69
|
}
|
|
70
70
|
var ee = /* @__PURE__*/ r(() => {
|
|
71
|
-
if (
|
|
71
|
+
if (C.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
72
72
|
try {
|
|
73
73
|
return Function(""), !0;
|
|
74
74
|
} catch {
|
|
75
75
|
return !1;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
function
|
|
78
|
+
function h(e) {
|
|
79
79
|
if (m(e) === !1) return !1;
|
|
80
80
|
let t = e.constructor;
|
|
81
81
|
if (t === void 0 || typeof t != "function") return !0;
|
|
82
82
|
let n = t.prototype;
|
|
83
83
|
return m(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function te(e) {
|
|
86
|
+
return h(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
87
87
|
}
|
|
88
|
-
var
|
|
88
|
+
var ne = /* @__PURE__*/ new Set([
|
|
89
89
|
"string",
|
|
90
90
|
"number",
|
|
91
91
|
"symbol"
|
|
92
92
|
]);
|
|
93
|
-
function
|
|
93
|
+
function re(e) {
|
|
94
94
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
95
95
|
}
|
|
96
96
|
function g(e, t, n) {
|
|
@@ -154,7 +154,7 @@ function ce(e, t) {
|
|
|
154
154
|
}));
|
|
155
155
|
}
|
|
156
156
|
function le(e, t) {
|
|
157
|
-
if (!
|
|
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;
|
|
@@ -169,7 +169,7 @@ function le(e, t) {
|
|
|
169
169
|
} }));
|
|
170
170
|
}
|
|
171
171
|
function ue(e, t) {
|
|
172
|
-
if (!
|
|
172
|
+
if (!h(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
173
173
|
return g(e, u(e._zod.def, { get shape() {
|
|
174
174
|
let n = {
|
|
175
175
|
...e._zod.def.shape,
|
|
@@ -234,48 +234,48 @@ function pe(e, t, n) {
|
|
|
234
234
|
return l(this, "shape", i), i;
|
|
235
235
|
} }));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function me(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 he(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 v(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 ge(e) {
|
|
254
254
|
return typeof e == "string" ? e : e?.message;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function _e(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 y(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 : ge(e.inst?._zod.def?.error?.(e)) ?? ge(a?.(e)) ?? ge(t?.error?.(e)) ?? ge(n.customError?.(e)) ?? ge(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 ve = /[\uD800-\uDBFF]/;
|
|
268
|
+
function ye(e) {
|
|
269
269
|
let t = e.length;
|
|
270
|
-
if (!
|
|
270
|
+
if (!ve.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 be(e) {
|
|
276
276
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function xe(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 be(e) {
|
|
|
288
288
|
}
|
|
289
289
|
return t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Se(...e) {
|
|
292
292
|
let [t, n, r] = e;
|
|
293
293
|
return typeof t == "string" ? {
|
|
294
294
|
message: t,
|
|
@@ -297,16 +297,16 @@ function xe(...e) {
|
|
|
297
297
|
inst: r
|
|
298
298
|
} : { ...t };
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Ce(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
|
+
}) : Te(e, n, r.value);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function b(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 x(e, t, n, r = !0) {
|
|
|
314
314
|
value: n
|
|
315
315
|
}), n;
|
|
316
316
|
}
|
|
317
|
-
function Ce(e, t, n) {
|
|
318
|
-
return x(e, t, n, !1);
|
|
319
|
-
}
|
|
320
317
|
function we(e, t, n) {
|
|
318
|
+
return b(e, t, n, !1);
|
|
319
|
+
}
|
|
320
|
+
function Te(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 : b(this, t, n.bind(this));
|
|
325
325
|
},
|
|
326
326
|
set(e) {
|
|
327
|
-
|
|
327
|
+
b(this, t, e);
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Ee(e, t) {
|
|
332
332
|
let n = Object.getPrototypeOf(e);
|
|
333
333
|
return t in n ? void 0 : n;
|
|
334
334
|
}
|
|
335
|
-
var
|
|
335
|
+
var De, Oe = !1, ke = {
|
|
336
336
|
configurable: !0,
|
|
337
337
|
get() {
|
|
338
|
-
|
|
338
|
+
Oe = !0;
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
|
-
function
|
|
341
|
+
function x(e, t, n) {
|
|
342
342
|
let r = Object.getPrototypeOf(e._zod);
|
|
343
|
-
if (t in r &&
|
|
344
|
-
|
|
343
|
+
if (t in r && De !== e._zod) {
|
|
344
|
+
De = void 0;
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
De = 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, ke);
|
|
351
|
+
let e = Oe;
|
|
352
|
+
Oe = !1;
|
|
353
353
|
try {
|
|
354
354
|
let r = n(this);
|
|
355
|
-
return
|
|
355
|
+
return Oe ? delete this[t] : Object.defineProperty(this, t, {
|
|
356
356
|
configurable: !0,
|
|
357
357
|
writable: !0,
|
|
358
358
|
value: r
|
|
359
|
-
}),
|
|
359
|
+
}), Oe ||= e, r;
|
|
360
360
|
} catch (n) {
|
|
361
|
-
throw delete this[t],
|
|
361
|
+
throw delete this[t], Oe ||= e, n;
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
set(e) {
|
|
@@ -370,8 +370,8 @@ function S(e, t, n) {
|
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
let i =
|
|
373
|
+
function Ae(e, t, n, r) {
|
|
374
|
+
let i = Ee(e, t);
|
|
375
375
|
i && Object.defineProperty(i, t, {
|
|
376
376
|
configurable: !0,
|
|
377
377
|
get() {
|
|
@@ -393,26 +393,26 @@ function ke(e, t, n, r) {
|
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
function
|
|
396
|
+
var je = "~constantCatch";
|
|
397
|
+
function Me(e) {
|
|
398
398
|
let t = () => e;
|
|
399
|
-
return t[
|
|
399
|
+
return t[je] = !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 Ne, Pe = {
|
|
404
404
|
value: void 0,
|
|
405
405
|
enumerable: !1
|
|
406
|
-
},
|
|
407
|
-
function
|
|
408
|
-
let t =
|
|
406
|
+
}, Fe = "captureStackTrace" in Error ? Error : null;
|
|
407
|
+
function Ie(e) {
|
|
408
|
+
let t = Fe;
|
|
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 Fe = null, new e();
|
|
416
416
|
}
|
|
417
417
|
try {
|
|
418
418
|
return new e();
|
|
@@ -423,7 +423,7 @@ function Fe(e) {
|
|
|
423
423
|
}
|
|
424
424
|
return new e();
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function S(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 C(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
|
+
Pe.value = new a(r);
|
|
436
436
|
try {
|
|
437
|
-
Object.defineProperty(n, "_zod",
|
|
437
|
+
Object.defineProperty(n, "_zod", Pe);
|
|
438
438
|
} finally {
|
|
439
|
-
|
|
439
|
+
Pe.value = void 0;
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
if (n._zod.traits.has(e)) return;
|
|
@@ -444,7 +444,7 @@ function C(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), Ce(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 C(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 ? Ie(u) : this;
|
|
457
457
|
c(t, e);
|
|
458
458
|
let n = t._zod.deferred;
|
|
459
459
|
if (n) {
|
|
@@ -465,44 +465,44 @@ function C(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 Le = class extends Error {
|
|
469
469
|
constructor() {
|
|
470
470
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
471
471
|
}
|
|
472
|
-
},
|
|
472
|
+
}, Re = class extends Error {
|
|
473
473
|
constructor(e) {
|
|
474
474
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
|
-
(
|
|
478
|
-
var
|
|
479
|
-
function
|
|
480
|
-
return e && Object.assign(
|
|
477
|
+
(Ne = globalThis).__zod_globalConfig ?? (Ne.__zod_globalConfig = {});
|
|
478
|
+
var C = globalThis.__zod_globalConfig;
|
|
479
|
+
function w(e) {
|
|
480
|
+
return e && Object.assign(C, e), C;
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
483
483
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/errors.js
|
|
484
|
-
function
|
|
484
|
+
function ze() {
|
|
485
485
|
let e = this._zod;
|
|
486
486
|
return e.message ??= JSON.stringify(e.def, n, 2), e.message;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Be(e) {
|
|
489
489
|
this._zod.message = e;
|
|
490
490
|
}
|
|
491
|
-
var
|
|
492
|
-
get:
|
|
493
|
-
set:
|
|
491
|
+
var Ve = {
|
|
492
|
+
get: ze,
|
|
493
|
+
set: Be,
|
|
494
494
|
enumerable: !0,
|
|
495
495
|
configurable: !0
|
|
496
|
-
},
|
|
496
|
+
}, He = {
|
|
497
497
|
value: void 0,
|
|
498
498
|
enumerable: !1
|
|
499
|
-
},
|
|
499
|
+
}, Ue = {
|
|
500
500
|
value: void 0,
|
|
501
501
|
enumerable: !1
|
|
502
|
-
},
|
|
503
|
-
e.name = "$ZodError",
|
|
502
|
+
}, We = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), Ge = (e, t) => {
|
|
503
|
+
e.name = "$ZodError", He.value = e._zod, Object.defineProperty(e, "_zod", He), Ue.value = t, Object.defineProperty(e, "issues", Ue), He.value = void 0, Ue.value = void 0, Object.defineProperty(e, "message", Ve);
|
|
504
504
|
let n = Object.getPrototypeOf(e);
|
|
505
|
-
|
|
505
|
+
We.has(n) || (We.add(n), Object.defineProperty(n, "toString", {
|
|
506
506
|
configurable: !0,
|
|
507
507
|
enumerable: !1,
|
|
508
508
|
get() {
|
|
@@ -521,8 +521,8 @@ var Be = {
|
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
}));
|
|
524
|
-
},
|
|
525
|
-
function
|
|
524
|
+
}, Ke = S("$ZodError", Ge), qe = S("$ZodError", Ge, void 0, { Parent: Error });
|
|
525
|
+
function Je(e, t, n) {
|
|
526
526
|
return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
527
527
|
value: n(),
|
|
528
528
|
writable: !0,
|
|
@@ -530,15 +530,15 @@ function qe(e, t, n) {
|
|
|
530
530
|
configurable: !0
|
|
531
531
|
}) : e[t] = n()), e[t];
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Ye(e, t = (e) => e.message) {
|
|
534
534
|
let n = {}, r = [];
|
|
535
|
-
for (let i of e.issues) i.path.length > 0 ?
|
|
535
|
+
for (let i of e.issues) i.path.length > 0 ? Je(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
|
|
536
536
|
return {
|
|
537
537
|
formErrors: r,
|
|
538
538
|
fieldErrors: n
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Xe(e, t = (e) => e.message) {
|
|
542
542
|
let n = { _errors: [] }, r = (e, i = []) => {
|
|
543
543
|
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
544
544
|
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
@@ -570,13 +570,13 @@ function Ye(e, t = (e) => e.message) {
|
|
|
570
570
|
}
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/parse.js
|
|
573
|
-
function
|
|
573
|
+
function Ze(e, t) {
|
|
574
574
|
return {
|
|
575
575
|
callee: t?.callee ?? e,
|
|
576
576
|
Err: t?.Err
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
var
|
|
579
|
+
var Qe = (e) => {
|
|
580
580
|
let t = (n, r, i, a) => {
|
|
581
581
|
let o = i ? {
|
|
582
582
|
...i,
|
|
@@ -585,15 +585,15 @@ var Ze = (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 Le();
|
|
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) => y(e, o, w())));
|
|
591
591
|
throw p(n, a?.callee ?? t), n;
|
|
592
592
|
}
|
|
593
593
|
return s.value;
|
|
594
594
|
};
|
|
595
595
|
return t;
|
|
596
|
-
},
|
|
596
|
+
}, $e = (e) => {
|
|
597
597
|
let t = async (n, r, i, a) => {
|
|
598
598
|
let o = i ? {
|
|
599
599
|
...i,
|
|
@@ -603,13 +603,13 @@ var Ze = (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) => y(e, o, w())));
|
|
607
607
|
throw p(n, a?.callee ?? t), n;
|
|
608
608
|
}
|
|
609
609
|
return s.value;
|
|
610
610
|
};
|
|
611
611
|
return t;
|
|
612
|
-
},
|
|
612
|
+
}, et = (e) => (t, n, r) => {
|
|
613
613
|
let i = r ? {
|
|
614
614
|
...r,
|
|
615
615
|
async: !1
|
|
@@ -617,15 +617,15 @@ var Ze = (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 Le();
|
|
621
621
|
return a.issues.length ? {
|
|
622
622
|
success: !1,
|
|
623
|
-
error: new (e ??
|
|
623
|
+
error: new (e ?? Ke)(a.issues.map((e) => y(e, i, w())))
|
|
624
624
|
} : {
|
|
625
625
|
success: !0,
|
|
626
626
|
data: a.value
|
|
627
627
|
};
|
|
628
|
-
},
|
|
628
|
+
}, tt = /* @__PURE__*/ et(qe), nt = (e) => async (t, n, r) => {
|
|
629
629
|
let i = r ? {
|
|
630
630
|
...r,
|
|
631
631
|
async: !0
|
|
@@ -635,98 +635,98 @@ var Ze = (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) => y(e, i, w())))
|
|
639
639
|
} : {
|
|
640
640
|
success: !0,
|
|
641
641
|
data: a.value
|
|
642
642
|
};
|
|
643
|
-
},
|
|
644
|
-
let t =
|
|
643
|
+
}, rt = /* @__PURE__*/ nt(qe), it = (e) => {
|
|
644
|
+
let t = Qe(e), n = (e, r, i, a) => {
|
|
645
645
|
let o = i ? {
|
|
646
646
|
...i,
|
|
647
647
|
direction: "backward"
|
|
648
648
|
} : { direction: "backward" };
|
|
649
|
-
return t(e, r, o,
|
|
649
|
+
return t(e, r, o, Ze(n, a));
|
|
650
650
|
};
|
|
651
651
|
return n;
|
|
652
|
-
}, it = (e) => {
|
|
653
|
-
let t = Ze(e), n = (e, r, i, a) => t(e, r, i, Xe(n, a));
|
|
654
|
-
return n;
|
|
655
652
|
}, at = (e) => {
|
|
656
|
-
let t = Qe(e), n =
|
|
653
|
+
let t = Qe(e), n = (e, r, i, a) => t(e, r, i, Ze(n, a));
|
|
654
|
+
return n;
|
|
655
|
+
}, ot = (e) => {
|
|
656
|
+
let t = $e(e), n = async (e, r, i, a) => {
|
|
657
657
|
let o = i ? {
|
|
658
658
|
...i,
|
|
659
659
|
direction: "backward"
|
|
660
660
|
} : { direction: "backward" };
|
|
661
|
-
return await t(e, r, o,
|
|
661
|
+
return await t(e, r, o, Ze(n, a));
|
|
662
662
|
};
|
|
663
663
|
return n;
|
|
664
|
-
},
|
|
665
|
-
let t =
|
|
664
|
+
}, st = (e) => {
|
|
665
|
+
let t = $e(e), n = async (e, r, i, a) => await t(e, r, i, Ze(n, a));
|
|
666
666
|
return n;
|
|
667
|
-
},
|
|
667
|
+
}, ct = (e) => (t, n, r) => {
|
|
668
668
|
let i = r ? {
|
|
669
669
|
...r,
|
|
670
670
|
direction: "backward"
|
|
671
671
|
} : { direction: "backward" };
|
|
672
|
-
return
|
|
673
|
-
},
|
|
672
|
+
return et(e)(t, n, i);
|
|
673
|
+
}, lt = (e) => (t, n, r) => et(e)(t, n, r), ut = (e) => async (t, n, r) => {
|
|
674
674
|
let i = r ? {
|
|
675
675
|
...r,
|
|
676
676
|
direction: "backward"
|
|
677
677
|
} : { direction: "backward" };
|
|
678
|
-
return
|
|
679
|
-
},
|
|
680
|
-
function
|
|
678
|
+
return nt(e)(t, n, i);
|
|
679
|
+
}, dt = (e) => async (t, n, r) => nt(e)(t, n, r), ft = /^[cC][0-9a-z]{6,}$/, pt = /^[0-9a-z]+$/, mt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, ht = /^[0-9a-vA-V]{20}$/, gt = /^[A-Za-z0-9]{27}$/, _t = /^[a-zA-Z0-9_-]{21}$/;
|
|
680
|
+
function vt(e) {
|
|
681
681
|
return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
|
|
682
682
|
}
|
|
683
|
-
var
|
|
684
|
-
function
|
|
685
|
-
return new RegExp(
|
|
683
|
+
var yt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, bt = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, xt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, St = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Ct = "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
|
|
684
|
+
function wt() {
|
|
685
|
+
return new RegExp(Ct, "u");
|
|
686
686
|
}
|
|
687
|
-
var
|
|
688
|
-
function
|
|
687
|
+
var Tt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Et = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Dt = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Ot = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, kt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, At = /^[A-Za-z0-9_-]*$/, jt = /^https?$/, Mt = /^\+[1-9]\d{6,14}$/, Nt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";
|
|
688
|
+
function Pt(e) {
|
|
689
689
|
return RegExp(`^${e}$`);
|
|
690
690
|
}
|
|
691
|
-
var
|
|
692
|
-
function
|
|
691
|
+
var Ft = /*@__PURE__*/ Pt(Nt);
|
|
692
|
+
function It(e) {
|
|
693
693
|
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
694
694
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
695
695
|
}
|
|
696
|
-
function It(e) {
|
|
697
|
-
return RegExp(`^${Ft(e)}$`);
|
|
698
|
-
}
|
|
699
696
|
function Lt(e) {
|
|
697
|
+
return RegExp(`^${It(e)}$`);
|
|
698
|
+
}
|
|
699
|
+
function Rt(e) {
|
|
700
700
|
let t = ["Z"];
|
|
701
701
|
e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
702
|
-
let n = `${
|
|
702
|
+
let n = `${It({
|
|
703
703
|
precision: e.precision,
|
|
704
704
|
seconds: !0
|
|
705
|
-
})}(?:${t.join("|")})`, r = e.local ? `${n}|${
|
|
706
|
-
return RegExp(`^${
|
|
705
|
+
})}(?:${t.join("|")})`, r = e.local ? `${n}|${It({ precision: e.precision })}` : n;
|
|
706
|
+
return RegExp(`^${Nt}T(?:${r})$`);
|
|
707
707
|
}
|
|
708
|
-
var
|
|
708
|
+
var zt = (e) => {
|
|
709
709
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
710
710
|
return RegExp(`^${t}$`);
|
|
711
|
-
},
|
|
711
|
+
}, Bt = /^-?\d+$/, Vt = /^-?\d+(?:\.\d+)?$/, Ht = /^(?:true|false)$/i, Ut = /^null$/i, Wt = /^[^A-Z]*$/, Gt = /^[^a-z]*$/, T = /*@__PURE__*/ S("$ZodCheck", (e, t) => {
|
|
712
712
|
var n;
|
|
713
713
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
714
|
-
}),
|
|
714
|
+
}), Kt = (e) => {
|
|
715
715
|
let t = e.value;
|
|
716
716
|
return !i(t) && t.length !== void 0;
|
|
717
|
-
},
|
|
717
|
+
}, qt = {
|
|
718
718
|
number: "number",
|
|
719
719
|
bigint: "bigint",
|
|
720
720
|
object: "date"
|
|
721
|
-
},
|
|
722
|
-
|
|
723
|
-
let n =
|
|
721
|
+
}, Jt = /*@__PURE__*/ S("$ZodCheckLessThan", (e, t) => {
|
|
722
|
+
T.init(e, t);
|
|
723
|
+
let n = qt[typeof t.value];
|
|
724
724
|
e._zod.onattach.push((e) => {
|
|
725
725
|
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
726
726
|
t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
727
727
|
}), e._zod.check = (r) => {
|
|
728
728
|
(t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
|
|
729
|
-
origin:
|
|
729
|
+
origin: qt[typeof r.value] ?? n,
|
|
730
730
|
code: "too_big",
|
|
731
731
|
maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
732
732
|
input: r.value,
|
|
@@ -735,15 +735,15 @@ var Rt = (e) => {
|
|
|
735
735
|
continue: !t.abort
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
|
-
}),
|
|
739
|
-
|
|
740
|
-
let n =
|
|
738
|
+
}), Yt = /*@__PURE__*/ S("$ZodCheckGreaterThan", (e, t) => {
|
|
739
|
+
T.init(e, t);
|
|
740
|
+
let n = qt[typeof t.value];
|
|
741
741
|
e._zod.onattach.push((e) => {
|
|
742
742
|
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
743
743
|
t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
744
744
|
}), e._zod.check = (r) => {
|
|
745
745
|
(t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
|
|
746
|
-
origin:
|
|
746
|
+
origin: qt[typeof r.value] ?? n,
|
|
747
747
|
code: "too_small",
|
|
748
748
|
minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
749
749
|
input: r.value,
|
|
@@ -752,8 +752,8 @@ var Rt = (e) => {
|
|
|
752
752
|
continue: !t.abort
|
|
753
753
|
});
|
|
754
754
|
};
|
|
755
|
-
}),
|
|
756
|
-
|
|
755
|
+
}), Xt = /*@__PURE__*/ S("$ZodCheckMultipleOf", (e, t) => {
|
|
756
|
+
T.init(e, t), e._zod.onattach.push((e) => {
|
|
757
757
|
var n;
|
|
758
758
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
759
759
|
}), e._zod.check = (n) => {
|
|
@@ -767,12 +767,12 @@ var Rt = (e) => {
|
|
|
767
767
|
continue: !t.abort
|
|
768
768
|
});
|
|
769
769
|
};
|
|
770
|
-
}),
|
|
771
|
-
|
|
770
|
+
}), Zt = /*@__PURE__*/ S("$ZodCheckNumberFormat", (e, t) => {
|
|
771
|
+
T.init(e, t), t.format = t.format || "float64";
|
|
772
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
|
-
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern =
|
|
775
|
+
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Bt);
|
|
776
776
|
}), e._zod.check = (o) => {
|
|
777
777
|
let s = o.value;
|
|
778
778
|
if (n) {
|
|
@@ -828,15 +828,15 @@ var Rt = (e) => {
|
|
|
828
828
|
continue: !t.abort
|
|
829
829
|
});
|
|
830
830
|
};
|
|
831
|
-
}),
|
|
831
|
+
}), Qt = /*@__PURE__*/ S("$ZodCheckMaxLength", (e, t) => {
|
|
832
832
|
var n;
|
|
833
|
-
|
|
833
|
+
T.init(e, t), (n = e._zod.def).when ?? (n.when = Kt), 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 ? ye(r) : i) <= t.maximum) return;
|
|
839
|
+
let a = be(r);
|
|
840
840
|
n.issues.push({
|
|
841
841
|
origin: a,
|
|
842
842
|
code: "too_big",
|
|
@@ -847,15 +847,15 @@ var Rt = (e) => {
|
|
|
847
847
|
continue: !t.abort
|
|
848
848
|
});
|
|
849
849
|
};
|
|
850
|
-
}),
|
|
850
|
+
}), $t = /*@__PURE__*/ S("$ZodCheckMinLength", (e, t) => {
|
|
851
851
|
var n;
|
|
852
|
-
|
|
852
|
+
T.init(e, t), (n = e._zod.def).when ?? (n.when = Kt), 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 ? ye(r) : i) >= t.minimum) return;
|
|
858
|
+
let a = be(r);
|
|
859
859
|
n.issues.push({
|
|
860
860
|
origin: a,
|
|
861
861
|
code: "too_small",
|
|
@@ -866,15 +866,15 @@ var Rt = (e) => {
|
|
|
866
866
|
continue: !t.abort
|
|
867
867
|
});
|
|
868
868
|
};
|
|
869
|
-
}),
|
|
869
|
+
}), en = /*@__PURE__*/ S("$ZodCheckLengthEquals", (e, t) => {
|
|
870
870
|
var n;
|
|
871
|
-
|
|
871
|
+
T.init(e, t), (n = e._zod.def).when ?? (n.when = Kt), 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 ? ye(r) : i;
|
|
876
876
|
if (a === t.length) return;
|
|
877
|
-
let o =
|
|
877
|
+
let o = be(r), s = a > t.length;
|
|
878
878
|
n.issues.push({
|
|
879
879
|
origin: o,
|
|
880
880
|
...s ? {
|
|
@@ -891,9 +891,9 @@ var Rt = (e) => {
|
|
|
891
891
|
continue: !t.abort
|
|
892
892
|
});
|
|
893
893
|
};
|
|
894
|
-
}),
|
|
894
|
+
}), tn = /*@__PURE__*/ S("$ZodCheckStringFormat", (e, t) => {
|
|
895
895
|
var n, r;
|
|
896
|
-
|
|
896
|
+
T.init(e, t), e._zod.onattach.push((e) => {
|
|
897
897
|
let n = e._zod.bag;
|
|
898
898
|
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
899
899
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
@@ -907,8 +907,8 @@ var Rt = (e) => {
|
|
|
907
907
|
continue: !t.abort
|
|
908
908
|
});
|
|
909
909
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
910
|
-
}),
|
|
911
|
-
|
|
910
|
+
}), nn = /*@__PURE__*/ S("$ZodCheckRegex", (e, t) => {
|
|
911
|
+
tn.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",
|
|
914
914
|
code: "invalid_format",
|
|
@@ -919,13 +919,13 @@ var Rt = (e) => {
|
|
|
919
919
|
continue: !t.abort
|
|
920
920
|
});
|
|
921
921
|
};
|
|
922
|
-
}),
|
|
923
|
-
t.pattern ??=
|
|
924
|
-
}),
|
|
925
|
-
t.pattern ??=
|
|
926
|
-
}),
|
|
927
|
-
|
|
928
|
-
let n =
|
|
922
|
+
}), rn = /*@__PURE__*/ S("$ZodCheckLowerCase", (e, t) => {
|
|
923
|
+
t.pattern ??= Wt, tn.init(e, t);
|
|
924
|
+
}), an = /*@__PURE__*/ S("$ZodCheckUpperCase", (e, t) => {
|
|
925
|
+
t.pattern ??= Gt, tn.init(e, t);
|
|
926
|
+
}), on = /*@__PURE__*/ S("$ZodCheckIncludes", (e, t) => {
|
|
927
|
+
T.init(e, t);
|
|
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 Rt = (e) => {
|
|
|
940
940
|
continue: !t.abort
|
|
941
941
|
});
|
|
942
942
|
};
|
|
943
|
-
}),
|
|
944
|
-
|
|
945
|
-
let n = RegExp(`^${
|
|
943
|
+
}), sn = /*@__PURE__*/ S("$ZodCheckStartsWith", (e, t) => {
|
|
944
|
+
T.init(e, t);
|
|
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 Rt = (e) => {
|
|
|
957
957
|
continue: !t.abort
|
|
958
958
|
});
|
|
959
959
|
};
|
|
960
|
-
}),
|
|
961
|
-
|
|
962
|
-
let n = RegExp(`.*${
|
|
960
|
+
}), cn = /*@__PURE__*/ S("$ZodCheckEndsWith", (e, t) => {
|
|
961
|
+
T.init(e, t);
|
|
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,11 +974,11 @@ var Rt = (e) => {
|
|
|
974
974
|
continue: !t.abort
|
|
975
975
|
});
|
|
976
976
|
};
|
|
977
|
-
}),
|
|
978
|
-
|
|
977
|
+
}), ln = /*@__PURE__*/ S("$ZodCheckOverwrite", (e, t) => {
|
|
978
|
+
T.init(e, t), e._zod.check = (e) => {
|
|
979
979
|
e.value = t.tx(e.value);
|
|
980
980
|
};
|
|
981
|
-
}),
|
|
981
|
+
}), un = class {
|
|
982
982
|
constructor(e = [], t = {}) {
|
|
983
983
|
this.content = [], this.indent = 0, this.args = e, this.closed = t;
|
|
984
984
|
}
|
|
@@ -997,13 +997,13 @@ var Rt = (e) => {
|
|
|
997
997
|
let e = Function, t = this?.content ?? [""];
|
|
998
998
|
return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
|
|
999
999
|
}
|
|
1000
|
-
},
|
|
1000
|
+
}, dn = {
|
|
1001
1001
|
major: 4,
|
|
1002
1002
|
minor: 5,
|
|
1003
1003
|
patch: 4
|
|
1004
|
-
},
|
|
1004
|
+
}, E = /*@__PURE__*/ S("$ZodType", (e, t) => {
|
|
1005
1005
|
var n;
|
|
1006
|
-
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
1006
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = dn;
|
|
1007
1007
|
let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
1008
1008
|
for (let t of i) for (let n of t._zod.onattach) n(e);
|
|
1009
1009
|
if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
@@ -1012,27 +1012,27 @@ var Rt = (e) => {
|
|
|
1012
1012
|
else {
|
|
1013
1013
|
let t = (t, n, r) => {
|
|
1014
1014
|
if (t.memo) return t;
|
|
1015
|
-
let i =
|
|
1015
|
+
let i = me(t), a;
|
|
1016
1016
|
for (let o of n) {
|
|
1017
1017
|
if (o._zod.def.when) {
|
|
1018
|
-
if (
|
|
1018
|
+
if (he(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 Le();
|
|
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 && (_e(t.issues, n, e), i ||= me(t, n));
|
|
1024
1024
|
});
|
|
1025
1025
|
else {
|
|
1026
1026
|
if (t.issues.length === n) continue;
|
|
1027
|
-
|
|
1027
|
+
_e(t.issues, n, e), i ||= me(t, n);
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
return a ? a.then(() => t) : t;
|
|
1031
1031
|
}, n = (n, r, a) => {
|
|
1032
|
-
if (
|
|
1032
|
+
if (me(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 Le();
|
|
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 Rt = (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 Le();
|
|
1055
1055
|
return o.then((e) => t(e, i, a));
|
|
1056
1056
|
}
|
|
1057
1057
|
return t(o, i, a);
|
|
@@ -1059,27 +1059,27 @@ var Rt = (e) => {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}, {
|
|
1061
1061
|
get "~standard"() {
|
|
1062
|
-
return
|
|
1062
|
+
return we(this, "~standard", pn(this));
|
|
1063
1063
|
},
|
|
1064
1064
|
set "~standard"(e) {
|
|
1065
|
-
|
|
1065
|
+
b(this, "~standard", e);
|
|
1066
1066
|
}
|
|
1067
|
-
}),
|
|
1068
|
-
function
|
|
1067
|
+
}), fn = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
|
|
1068
|
+
function pn(e) {
|
|
1069
1069
|
return {
|
|
1070
1070
|
validate: (t) => {
|
|
1071
1071
|
try {
|
|
1072
|
-
return
|
|
1072
|
+
return fn(tt(e, t));
|
|
1073
1073
|
} catch {
|
|
1074
|
-
return
|
|
1074
|
+
return rt(e, t).then(fn);
|
|
1075
1075
|
}
|
|
1076
1076
|
},
|
|
1077
1077
|
vendor: "zod",
|
|
1078
1078
|
version: 1
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
|
-
var
|
|
1082
|
-
|
|
1081
|
+
var mn = /*@__PURE__*/ S("$ZodString", (e, t) => {
|
|
1082
|
+
E.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? zt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1083
1083
|
if (t.coerce) try {
|
|
1084
1084
|
n.value = String(n.value);
|
|
1085
1085
|
} catch {}
|
|
@@ -1090,11 +1090,11 @@ var pn = /*@__PURE__*/ C("$ZodString", (e, t) => {
|
|
|
1090
1090
|
inst: e
|
|
1091
1091
|
}), n;
|
|
1092
1092
|
};
|
|
1093
|
-
}),
|
|
1094
|
-
|
|
1095
|
-
}),
|
|
1096
|
-
t.pattern ??=
|
|
1097
|
-
}),
|
|
1093
|
+
}), D = /*@__PURE__*/ S("$ZodStringFormat", (e, t) => {
|
|
1094
|
+
tn.init(e, t), mn.init(e, t);
|
|
1095
|
+
}), hn = /*@__PURE__*/ S("$ZodGUID", (e, t) => {
|
|
1096
|
+
t.pattern ??= bt, D.init(e, t);
|
|
1097
|
+
}), gn = /*@__PURE__*/ S("$ZodUUID", (e, t) => {
|
|
1098
1098
|
if (t.version) {
|
|
1099
1099
|
let e = {
|
|
1100
1100
|
v1: 1,
|
|
@@ -1107,34 +1107,34 @@ var pn = /*@__PURE__*/ C("$ZodString", (e, t) => {
|
|
|
1107
1107
|
v8: 8
|
|
1108
1108
|
}[t.version];
|
|
1109
1109
|
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
1110
|
-
t.pattern ??=
|
|
1111
|
-
} else t.pattern ??=
|
|
1112
|
-
|
|
1113
|
-
}),
|
|
1114
|
-
t.pattern ??=
|
|
1110
|
+
t.pattern ??= xt(e);
|
|
1111
|
+
} else t.pattern ??= xt();
|
|
1112
|
+
D.init(e, t);
|
|
1113
|
+
}), _n = /*@__PURE__*/ S("$ZodEmail", (e, t) => {
|
|
1114
|
+
t.pattern ??= St, D.init(e, t);
|
|
1115
1115
|
});
|
|
1116
|
-
function
|
|
1117
|
-
if (!t.normalize && t.protocol?.source ===
|
|
1116
|
+
function vn(e, t) {
|
|
1117
|
+
if (!t.normalize && t.protocol?.source === jt.source && !/^https?:\/\//i.test(e)) return 1;
|
|
1118
1118
|
try {
|
|
1119
1119
|
return new URL(e);
|
|
1120
1120
|
} catch {
|
|
1121
1121
|
return 2;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
var
|
|
1125
|
-
function
|
|
1126
|
-
return e.replace(
|
|
1124
|
+
var yn = /[\t\n\r]/g;
|
|
1125
|
+
function bn(e) {
|
|
1126
|
+
return e.replace(yn, "");
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function xn(e, t) {
|
|
1129
1129
|
return t.lastIndex = 0, t.test(e.hostname);
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function Sn(e, t) {
|
|
1132
1132
|
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
1133
1133
|
}
|
|
1134
|
-
var
|
|
1135
|
-
|
|
1134
|
+
var Cn = /*@__PURE__*/ S("$ZodURL", (e, t) => {
|
|
1135
|
+
D.init(e, t), e._zod.check = (n) => {
|
|
1136
1136
|
try {
|
|
1137
|
-
let r = n.value.trim(), i =
|
|
1137
|
+
let r = n.value.trim(), i = vn(r, t);
|
|
1138
1138
|
if (i === 1) {
|
|
1139
1139
|
n.issues.push({
|
|
1140
1140
|
code: "invalid_format",
|
|
@@ -1156,7 +1156,7 @@ var Sn = /*@__PURE__*/ C("$ZodURL", (e, t) => {
|
|
|
1156
1156
|
});
|
|
1157
1157
|
return;
|
|
1158
1158
|
}
|
|
1159
|
-
t.hostname && !
|
|
1159
|
+
t.hostname && !xn(i, t.hostname) && n.issues.push({
|
|
1160
1160
|
code: "invalid_format",
|
|
1161
1161
|
format: "url",
|
|
1162
1162
|
note: "Invalid hostname",
|
|
@@ -1164,7 +1164,7 @@ var Sn = /*@__PURE__*/ C("$ZodURL", (e, t) => {
|
|
|
1164
1164
|
input: n.value,
|
|
1165
1165
|
inst: e,
|
|
1166
1166
|
continue: !t.abort
|
|
1167
|
-
}), t.protocol && !
|
|
1167
|
+
}), t.protocol && !Sn(i, t.protocol) && n.issues.push({
|
|
1168
1168
|
code: "invalid_format",
|
|
1169
1169
|
format: "url",
|
|
1170
1170
|
note: "Invalid protocol",
|
|
@@ -1172,7 +1172,7 @@ var Sn = /*@__PURE__*/ C("$ZodURL", (e, t) => {
|
|
|
1172
1172
|
input: n.value,
|
|
1173
1173
|
inst: e,
|
|
1174
1174
|
continue: !t.abort
|
|
1175
|
-
}), n.value = t.normalize ? i.href :
|
|
1175
|
+
}), n.value = t.normalize ? i.href : bn(r);
|
|
1176
1176
|
return;
|
|
1177
1177
|
} catch {
|
|
1178
1178
|
n.issues.push({
|
|
@@ -1184,45 +1184,45 @@ var Sn = /*@__PURE__*/ C("$ZodURL", (e, t) => {
|
|
|
1184
1184
|
});
|
|
1185
1185
|
}
|
|
1186
1186
|
};
|
|
1187
|
-
}),
|
|
1188
|
-
t.pattern ??=
|
|
1189
|
-
}),
|
|
1187
|
+
}), wn = /*@__PURE__*/ S("$ZodEmoji", (e, t) => {
|
|
1188
|
+
t.pattern ??= wt(), D.init(e, t);
|
|
1189
|
+
}), Tn = /*@__PURE__*/ S("$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
|
-
t.pattern ??= t.length === void 0 ?
|
|
1192
|
-
}),
|
|
1193
|
-
t.pattern ??=
|
|
1194
|
-
}),
|
|
1195
|
-
t.pattern ??=
|
|
1196
|
-
}),
|
|
1197
|
-
t.pattern ??=
|
|
1198
|
-
}),
|
|
1199
|
-
t.pattern ??=
|
|
1200
|
-
}),
|
|
1201
|
-
t.pattern ??=
|
|
1202
|
-
}),
|
|
1203
|
-
t.pattern ??=
|
|
1191
|
+
t.pattern ??= t.length === void 0 ? _t : vt(t.length), D.init(e, t);
|
|
1192
|
+
}), En = /*@__PURE__*/ S("$ZodCUID", (e, t) => {
|
|
1193
|
+
t.pattern ??= ft, D.init(e, t);
|
|
1194
|
+
}), Dn = /*@__PURE__*/ S("$ZodCUID2", (e, t) => {
|
|
1195
|
+
t.pattern ??= pt, D.init(e, t);
|
|
1196
|
+
}), On = /*@__PURE__*/ S("$ZodULID", (e, t) => {
|
|
1197
|
+
t.pattern ??= mt, D.init(e, t);
|
|
1198
|
+
}), kn = /*@__PURE__*/ S("$ZodXID", (e, t) => {
|
|
1199
|
+
t.pattern ??= ht, D.init(e, t);
|
|
1200
|
+
}), An = /*@__PURE__*/ S("$ZodKSUID", (e, t) => {
|
|
1201
|
+
t.pattern ??= gt, D.init(e, t);
|
|
1202
|
+
}), jn = /*@__PURE__*/ S("$ZodISODateTime", (e, t) => {
|
|
1203
|
+
t.pattern ??= Rt(t), D.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
|
-
}),
|
|
1207
|
-
t.pattern ??=
|
|
1208
|
-
}),
|
|
1209
|
-
t.pattern ??=
|
|
1210
|
-
}),
|
|
1211
|
-
t.pattern ??=
|
|
1212
|
-
}),
|
|
1213
|
-
t.pattern ??=
|
|
1214
|
-
}),
|
|
1215
|
-
function
|
|
1216
|
-
if (!
|
|
1206
|
+
}), Mn = /*@__PURE__*/ S("$ZodISODate", (e, t) => {
|
|
1207
|
+
t.pattern ??= Ft, D.init(e, t);
|
|
1208
|
+
}), Nn = /*@__PURE__*/ S("$ZodISOTime", (e, t) => {
|
|
1209
|
+
t.pattern ??= Lt(t), D.init(e, t);
|
|
1210
|
+
}), Pn = /*@__PURE__*/ S("$ZodISODuration", (e, t) => {
|
|
1211
|
+
t.pattern ??= yt, D.init(e, t);
|
|
1212
|
+
}), Fn = /*@__PURE__*/ S("$ZodIPv4", (e, t) => {
|
|
1213
|
+
t.pattern ??= Tt, D.init(e, t), e._zod.bag.format = "ipv4";
|
|
1214
|
+
}), In = /^[0-9a-fA-F:.]+$/;
|
|
1215
|
+
function Ln(e) {
|
|
1216
|
+
if (!In.test(e)) return !1;
|
|
1217
1217
|
try {
|
|
1218
1218
|
return new URL(`http://[${e}]`), !0;
|
|
1219
1219
|
} catch {
|
|
1220
1220
|
return !1;
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
var
|
|
1224
|
-
t.pattern ??=
|
|
1225
|
-
|
|
1223
|
+
var Rn = /*@__PURE__*/ S("$ZodIPv6", (e, t) => {
|
|
1224
|
+
t.pattern ??= Et, D.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1225
|
+
Ln(n.value) || n.issues.push({
|
|
1226
1226
|
code: "invalid_format",
|
|
1227
1227
|
format: "ipv6",
|
|
1228
1228
|
input: n.value,
|
|
@@ -1230,20 +1230,20 @@ var Ln = /*@__PURE__*/ C("$ZodIPv6", (e, t) => {
|
|
|
1230
1230
|
continue: !t.abort
|
|
1231
1231
|
});
|
|
1232
1232
|
};
|
|
1233
|
-
}),
|
|
1234
|
-
t.pattern ??=
|
|
1233
|
+
}), zn = /*@__PURE__*/ S("$ZodCIDRv4", (e, t) => {
|
|
1234
|
+
t.pattern ??= Dt, D.init(e, t);
|
|
1235
1235
|
});
|
|
1236
|
-
function
|
|
1236
|
+
function Bn(e) {
|
|
1237
1237
|
let t = e.split("/");
|
|
1238
1238
|
if (t.length !== 2) return !1;
|
|
1239
1239
|
let [n, r] = t;
|
|
1240
1240
|
if (!r) return !1;
|
|
1241
1241
|
let i = Number(r);
|
|
1242
|
-
return `${i}` !== r || i < 0 || i > 128 ? !1 :
|
|
1242
|
+
return `${i}` !== r || i < 0 || i > 128 ? !1 : Ln(n);
|
|
1243
1243
|
}
|
|
1244
|
-
var
|
|
1245
|
-
t.pattern ??=
|
|
1246
|
-
|
|
1244
|
+
var Vn = /*@__PURE__*/ S("$ZodCIDRv6", (e, t) => {
|
|
1245
|
+
t.pattern ??= Ot, D.init(e, t), e._zod.check = (n) => {
|
|
1246
|
+
Bn(n.value) || n.issues.push({
|
|
1247
1247
|
code: "invalid_format",
|
|
1248
1248
|
format: "cidrv6",
|
|
1249
1249
|
input: n.value,
|
|
@@ -1252,7 +1252,7 @@ var Bn = /*@__PURE__*/ C("$ZodCIDRv6", (e, t) => {
|
|
|
1252
1252
|
});
|
|
1253
1253
|
};
|
|
1254
1254
|
});
|
|
1255
|
-
function
|
|
1255
|
+
function Hn(e) {
|
|
1256
1256
|
if (e === "") return !0;
|
|
1257
1257
|
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
1258
1258
|
try {
|
|
@@ -1261,9 +1261,9 @@ function Vn(e) {
|
|
|
1261
1261
|
return !1;
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
var
|
|
1265
|
-
t.pattern ??=
|
|
1266
|
-
|
|
1264
|
+
var Un = /*@__PURE__*/ S("$ZodBase64", (e, t) => {
|
|
1265
|
+
t.pattern ??= kt, D.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1266
|
+
Hn(n.value) || n.issues.push({
|
|
1267
1267
|
code: "invalid_format",
|
|
1268
1268
|
format: "base64",
|
|
1269
1269
|
input: n.value,
|
|
@@ -1272,14 +1272,14 @@ var Hn = /*@__PURE__*/ C("$ZodBase64", (e, t) => {
|
|
|
1272
1272
|
});
|
|
1273
1273
|
};
|
|
1274
1274
|
});
|
|
1275
|
-
function
|
|
1276
|
-
if (!
|
|
1275
|
+
function Wn(e) {
|
|
1276
|
+
if (!At.test(e)) return !1;
|
|
1277
1277
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1278
|
-
return
|
|
1278
|
+
return Hn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1279
1279
|
}
|
|
1280
|
-
var
|
|
1281
|
-
t.pattern ??=
|
|
1282
|
-
|
|
1280
|
+
var Gn = /*@__PURE__*/ S("$ZodBase64URL", (e, t) => {
|
|
1281
|
+
t.pattern ??= At, D.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1282
|
+
Wn(n.value) || n.issues.push({
|
|
1283
1283
|
code: "invalid_format",
|
|
1284
1284
|
format: "base64url",
|
|
1285
1285
|
input: n.value,
|
|
@@ -1287,10 +1287,10 @@ var Wn = /*@__PURE__*/ C("$ZodBase64URL", (e, t) => {
|
|
|
1287
1287
|
continue: !t.abort
|
|
1288
1288
|
});
|
|
1289
1289
|
};
|
|
1290
|
-
}),
|
|
1291
|
-
t.pattern ??=
|
|
1290
|
+
}), Kn = /*@__PURE__*/ S("$ZodE164", (e, t) => {
|
|
1291
|
+
t.pattern ??= Mt, D.init(e, t);
|
|
1292
1292
|
});
|
|
1293
|
-
function
|
|
1293
|
+
function qn(e, t = null) {
|
|
1294
1294
|
try {
|
|
1295
1295
|
let n = e.split(".");
|
|
1296
1296
|
if (n.length !== 3) return !1;
|
|
@@ -1302,9 +1302,9 @@ function Kn(e, t = null) {
|
|
|
1302
1302
|
return !1;
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
var
|
|
1306
|
-
|
|
1307
|
-
|
|
1305
|
+
var Jn = /*@__PURE__*/ S("$ZodJWT", (e, t) => {
|
|
1306
|
+
D.init(e, t), e._zod.check = (n) => {
|
|
1307
|
+
qn(n.value, t.alg) || n.issues.push({
|
|
1308
1308
|
code: "invalid_format",
|
|
1309
1309
|
format: "jwt",
|
|
1310
1310
|
input: n.value,
|
|
@@ -1312,8 +1312,8 @@ var qn = /*@__PURE__*/ C("$ZodJWT", (e, t) => {
|
|
|
1312
1312
|
continue: !t.abort
|
|
1313
1313
|
});
|
|
1314
1314
|
};
|
|
1315
|
-
}),
|
|
1316
|
-
|
|
1315
|
+
}), Yn = /*@__PURE__*/ S("$ZodNumber", (e, t) => {
|
|
1316
|
+
E.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Vt, e._zod.parse = (n, r) => {
|
|
1317
1317
|
if (t.coerce) try {
|
|
1318
1318
|
n.value = Number(n.value);
|
|
1319
1319
|
} catch {}
|
|
@@ -1328,10 +1328,10 @@ var qn = /*@__PURE__*/ C("$ZodJWT", (e, t) => {
|
|
|
1328
1328
|
...a ? { received: a } : {}
|
|
1329
1329
|
}), n;
|
|
1330
1330
|
};
|
|
1331
|
-
}),
|
|
1332
|
-
|
|
1333
|
-
}),
|
|
1334
|
-
|
|
1331
|
+
}), Xn = /*@__PURE__*/ S("$ZodNumberFormat", (e, t) => {
|
|
1332
|
+
Zt.init(e, t), Yn.init(e, t);
|
|
1333
|
+
}), Zn = /*@__PURE__*/ S("$ZodBoolean", (e, t) => {
|
|
1334
|
+
E.init(e, t), e._zod.pattern = Ht, e._zod.parse = (n, r) => {
|
|
1335
1335
|
if (t.coerce) try {
|
|
1336
1336
|
n.value = !!n.value;
|
|
1337
1337
|
} catch {}
|
|
@@ -1343,8 +1343,8 @@ var qn = /*@__PURE__*/ C("$ZodJWT", (e, t) => {
|
|
|
1343
1343
|
inst: e
|
|
1344
1344
|
}), n;
|
|
1345
1345
|
};
|
|
1346
|
-
}),
|
|
1347
|
-
|
|
1346
|
+
}), Qn = /*@__PURE__*/ S("$ZodNull", (e, t) => {
|
|
1347
|
+
E.init(e, t), e._zod.pattern = Ut, 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({
|
|
1350
1350
|
expected: "null",
|
|
@@ -1353,22 +1353,22 @@ var qn = /*@__PURE__*/ C("$ZodJWT", (e, t) => {
|
|
|
1353
1353
|
inst: e
|
|
1354
1354
|
}), t;
|
|
1355
1355
|
};
|
|
1356
|
-
}),
|
|
1357
|
-
|
|
1358
|
-
}),
|
|
1359
|
-
|
|
1356
|
+
}), $n = /*@__PURE__*/ S("$ZodUnknown", (e, t) => {
|
|
1357
|
+
E.init(e, t), e._zod.parse = (e) => e;
|
|
1358
|
+
}), er = /*@__PURE__*/ S("$ZodNever", (e, t) => {
|
|
1359
|
+
E.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1360
1360
|
expected: "never",
|
|
1361
1361
|
code: "invalid_type",
|
|
1362
1362
|
input: t.value,
|
|
1363
1363
|
inst: e
|
|
1364
1364
|
}), t);
|
|
1365
1365
|
});
|
|
1366
|
-
function
|
|
1367
|
-
e.issues.length && t.issues.push(...
|
|
1366
|
+
function tr(e, t, n) {
|
|
1367
|
+
e.issues.length && t.issues.push(...v(n, e.issues)), t.value[n] = e.value;
|
|
1368
1368
|
}
|
|
1369
|
-
var
|
|
1370
|
-
|
|
1371
|
-
let n =
|
|
1369
|
+
var nr = /*@__PURE__*/ S("$ZodArray", (e, t) => {
|
|
1370
|
+
E.init(e, t);
|
|
1371
|
+
let n = C.memoizer;
|
|
1372
1372
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1373
1373
|
let a = r.value;
|
|
1374
1374
|
if (!Array.isArray(a)) return r.issues.push({
|
|
@@ -1384,17 +1384,17 @@ var tr = /*@__PURE__*/ C("$ZodArray", (e, t) => {
|
|
|
1384
1384
|
value: n,
|
|
1385
1385
|
issues: []
|
|
1386
1386
|
}, i);
|
|
1387
|
-
s instanceof Promise ? o.push(s.then((t) =>
|
|
1387
|
+
s instanceof Promise ? o.push(s.then((t) => tr(t, r, e))) : tr(s, r, e);
|
|
1388
1388
|
}
|
|
1389
1389
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1390
1390
|
};
|
|
1391
1391
|
});
|
|
1392
|
-
function
|
|
1392
|
+
function rr(e, t, n, r, i, a) {
|
|
1393
1393
|
let o = n in r, s = a === "optional";
|
|
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(...v(n, e.issues));
|
|
1398
1398
|
}
|
|
1399
1399
|
if (!o && i === void 0) {
|
|
1400
1400
|
e.issues.length || t.issues.push({
|
|
@@ -1408,9 +1408,9 @@ function nr(e, t, n, r, i, a) {
|
|
|
1408
1408
|
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
var
|
|
1412
|
-
function
|
|
1413
|
-
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n :
|
|
1411
|
+
var ir = [];
|
|
1412
|
+
function ar(e) {
|
|
1413
|
+
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : ir, 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
1415
|
let a = ae(e.shape);
|
|
1416
1416
|
return {
|
|
@@ -1422,7 +1422,7 @@ function ir(e) {
|
|
|
1422
1422
|
optionalKeys: new Set(a)
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1425
|
+
function or(e, t, n, r, i, a) {
|
|
1426
1426
|
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin, d = c.optout;
|
|
1427
1427
|
for (let i in t) {
|
|
1428
1428
|
if (s.has(i)) continue;
|
|
@@ -1438,7 +1438,7 @@ function ar(e, t, n, r, i, a) {
|
|
|
1438
1438
|
value: t[i],
|
|
1439
1439
|
issues: []
|
|
1440
1440
|
}, r);
|
|
1441
|
-
a instanceof Promise ? e.push(a.then((e) =>
|
|
1441
|
+
a instanceof Promise ? e.push(a.then((e) => rr(e, n, i, t, u, d))) : rr(a, n, i, t, u, d);
|
|
1442
1442
|
}
|
|
1443
1443
|
return o.length && n.issues.push({
|
|
1444
1444
|
code: "unrecognized_keys",
|
|
@@ -1448,16 +1448,16 @@ function ar(e, t, n, r, i, a) {
|
|
|
1448
1448
|
continue: !0
|
|
1449
1449
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1450
1450
|
}
|
|
1451
|
-
var
|
|
1452
|
-
if (
|
|
1451
|
+
var sr = /* @__PURE__ */ new WeakMap(), cr = /*@__PURE__*/ S("$ZodObject", (e, t) => {
|
|
1452
|
+
if (E.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1453
1453
|
let e = t.shape;
|
|
1454
|
-
|
|
1454
|
+
sr.set(t, e), Object.defineProperty(t, "shape", { get: () => {
|
|
1455
1455
|
let n = { ...e };
|
|
1456
|
-
return Object.defineProperty(t, "shape", { value: n }),
|
|
1456
|
+
return Object.defineProperty(t, "shape", { value: n }), sr.set(t, n), n;
|
|
1457
1457
|
} });
|
|
1458
1458
|
}
|
|
1459
|
-
let n = r(() =>
|
|
1460
|
-
|
|
1459
|
+
let n = r(() => ar(t));
|
|
1460
|
+
x(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;
|
|
@@ -1469,7 +1469,7 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ C("$ZodObject", (e, t
|
|
|
1469
1469
|
}
|
|
1470
1470
|
return n;
|
|
1471
1471
|
});
|
|
1472
|
-
let i = m, a = t.catchall, o, s =
|
|
1472
|
+
let i = m, a = t.catchall, o, s = C.memoizer;
|
|
1473
1473
|
s?.attach(e), e._zod.parse = (t, r) => {
|
|
1474
1474
|
o ??= n.value;
|
|
1475
1475
|
let c = t.value;
|
|
@@ -1487,14 +1487,14 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ C("$ZodObject", (e, t
|
|
|
1487
1487
|
value: c[e],
|
|
1488
1488
|
issues: []
|
|
1489
1489
|
}, r);
|
|
1490
|
-
o instanceof Promise ? l.push(o.then((n) =>
|
|
1490
|
+
o instanceof Promise ? l.push(o.then((n) => rr(n, t, e, c, i, a))) : rr(o, t, e, c, i, a);
|
|
1491
1491
|
}
|
|
1492
|
-
return a ?
|
|
1492
|
+
return a ? or(l, c, t, r, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
|
|
1493
1493
|
};
|
|
1494
|
-
}),
|
|
1495
|
-
|
|
1496
|
-
let n = e._zod.parse, i = r(() =>
|
|
1497
|
-
let n = i.value, r = n.symbolKeys, o = new
|
|
1494
|
+
}), lr = /*@__PURE__*/ S("$ZodObjectJIT", (e, t) => {
|
|
1495
|
+
cr.init(e, t);
|
|
1496
|
+
let n = e._zod.parse, i = r(() => ar(t)), a = C.memoizer, o = (t) => {
|
|
1497
|
+
let n = i.value, r = n.symbolKeys, o = new un(["payload", "ctx"], {
|
|
1498
1498
|
shape: t,
|
|
1499
1499
|
inst: e,
|
|
1500
1500
|
memo: a,
|
|
@@ -1558,11 +1558,11 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ C("$ZodObject", (e, t
|
|
|
1558
1558
|
`);
|
|
1559
1559
|
}
|
|
1560
1560
|
return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
|
|
1561
|
-
}, s, c = m, l = !
|
|
1561
|
+
}, s, c = m, l = !C.jitless, u = l && ee.value, f = t.catchall, p;
|
|
1562
1562
|
e._zod.parse = (r, a) => {
|
|
1563
1563
|
p ??= i.value;
|
|
1564
1564
|
let d = r.value;
|
|
1565
|
-
return c(d) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), r = s(r, a), f ?
|
|
1565
|
+
return c(d) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), r = s(r, a), f ? or([], d, r, a, p, e) : r) : n(r, a) : (r.issues.push({
|
|
1566
1566
|
expected: "object",
|
|
1567
1567
|
code: "invalid_type",
|
|
1568
1568
|
input: d,
|
|
@@ -1570,20 +1570,20 @@ var or = /* @__PURE__ */ new WeakMap(), sr = /*@__PURE__*/ C("$ZodObject", (e, t
|
|
|
1570
1570
|
}), r);
|
|
1571
1571
|
};
|
|
1572
1572
|
});
|
|
1573
|
-
function
|
|
1573
|
+
function ur(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) => !me(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) => y(e, r, w())))
|
|
1581
1581
|
}), t);
|
|
1582
1582
|
}
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1583
|
+
var dr = /*@__PURE__*/ S("$ZodUnion", (e, t) => {
|
|
1584
|
+
E.init(e, t), x(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), x(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), x(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
|
+
}), x(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("|")})$`);
|
|
@@ -1604,10 +1604,10 @@ var ur = /*@__PURE__*/ C("$ZodUnion", (e, t) => {
|
|
|
1604
1604
|
o.push(t);
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
return a ? Promise.all(o).then((t) =>
|
|
1607
|
+
return a ? Promise.all(o).then((t) => ur(t, r, e, i)) : ur(o, r, e, i);
|
|
1608
1608
|
};
|
|
1609
|
-
}),
|
|
1610
|
-
|
|
1609
|
+
}), fr = /*@__PURE__*/ S("$ZodIntersection", (e, t) => {
|
|
1610
|
+
E.init(e, t), e._zod.parse = (e, n) => {
|
|
1611
1611
|
let r = e.value, i = t.left._zod.run({
|
|
1612
1612
|
value: r,
|
|
1613
1613
|
issues: []
|
|
@@ -1615,15 +1615,15 @@ var ur = /*@__PURE__*/ C("$ZodUnion", (e, t) => {
|
|
|
1615
1615
|
value: r,
|
|
1616
1616
|
issues: []
|
|
1617
1617
|
}, n);
|
|
1618
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) =>
|
|
1618
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => mr(e, t, n)) : mr(e, i, a);
|
|
1619
1619
|
};
|
|
1620
1620
|
});
|
|
1621
|
-
function
|
|
1621
|
+
function pr(e, t) {
|
|
1622
1622
|
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1623
1623
|
valid: !0,
|
|
1624
1624
|
data: e
|
|
1625
1625
|
};
|
|
1626
|
-
if (
|
|
1626
|
+
if (h(e) && h(t)) {
|
|
1627
1627
|
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1628
1628
|
...e,
|
|
1629
1629
|
...t
|
|
@@ -1631,7 +1631,7 @@ function fr(e, t) {
|
|
|
1631
1631
|
Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
|
|
1632
1632
|
for (let n of r) {
|
|
1633
1633
|
if (n === "__proto__") continue;
|
|
1634
|
-
let r =
|
|
1634
|
+
let r = pr(e[n], t[n]);
|
|
1635
1635
|
if (!r.valid) return {
|
|
1636
1636
|
valid: !1,
|
|
1637
1637
|
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
@@ -1650,7 +1650,7 @@ function fr(e, t) {
|
|
|
1650
1650
|
};
|
|
1651
1651
|
let n = [];
|
|
1652
1652
|
for (let r = 0; r < e.length; r++) {
|
|
1653
|
-
let i = e[r], a = t[r], o =
|
|
1653
|
+
let i = e[r], a = t[r], o = pr(i, a);
|
|
1654
1654
|
if (!o.valid) return {
|
|
1655
1655
|
valid: !1,
|
|
1656
1656
|
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
@@ -1667,7 +1667,7 @@ function fr(e, t) {
|
|
|
1667
1667
|
mergeErrorPath: []
|
|
1668
1668
|
};
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function mr(e, t, n) {
|
|
1671
1671
|
let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
1672
1672
|
let n;
|
|
1673
1673
|
if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
|
|
@@ -1689,19 +1689,19 @@ function pr(e, t, n) {
|
|
|
1689
1689
|
});
|
|
1690
1690
|
for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
|
|
1691
1691
|
}
|
|
1692
|
-
let c =
|
|
1692
|
+
let c = pr(t.value, n.value);
|
|
1693
1693
|
if (!c.valid) {
|
|
1694
|
-
if (
|
|
1694
|
+
if (me(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
|
|
1700
|
-
|
|
1701
|
-
let n =
|
|
1699
|
+
var hr = /*@__PURE__*/ S("$ZodRecord", (e, t) => {
|
|
1700
|
+
E.init(e, t);
|
|
1701
|
+
let n = C.memoizer;
|
|
1702
1702
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1703
1703
|
let a = r.value;
|
|
1704
|
-
if (!
|
|
1704
|
+
if (!h(a)) return r.issues.push({
|
|
1705
1705
|
expected: "record",
|
|
1706
1706
|
code: "invalid_type",
|
|
1707
1707
|
input: a,
|
|
@@ -1722,7 +1722,7 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1722
1722
|
r.issues.push({
|
|
1723
1723
|
code: "invalid_key",
|
|
1724
1724
|
origin: "record",
|
|
1725
|
-
issues: s.issues.map((e) =>
|
|
1725
|
+
issues: s.issues.map((e) => y(e, i, w())),
|
|
1726
1726
|
input: n,
|
|
1727
1727
|
path: [n],
|
|
1728
1728
|
inst: e
|
|
@@ -1736,8 +1736,8 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1736
1736
|
issues: []
|
|
1737
1737
|
}, i);
|
|
1738
1738
|
u instanceof Promise ? o.push(u.then((e) => {
|
|
1739
|
-
e.issues.length && r.issues.push(...
|
|
1740
|
-
})) : (u.issues.length && r.issues.push(...
|
|
1739
|
+
e.issues.length && r.issues.push(...v(n, e.issues)), r.value[l] = e.value;
|
|
1740
|
+
})) : (u.issues.length && r.issues.push(...v(n, u.issues)), r.value[l] = u.value);
|
|
1741
1741
|
}
|
|
1742
1742
|
let l;
|
|
1743
1743
|
for (let e in a) if (!c.has(e)) {
|
|
@@ -1763,7 +1763,7 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1763
1763
|
issues: []
|
|
1764
1764
|
}, i);
|
|
1765
1765
|
if (l instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1766
|
-
if (typeof n == "string" &&
|
|
1766
|
+
if (typeof n == "string" && Vt.test(n) && l.issues.length) {
|
|
1767
1767
|
let e = t.keyType._zod.run({
|
|
1768
1768
|
value: Number(n),
|
|
1769
1769
|
issues: []
|
|
@@ -1775,7 +1775,7 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1775
1775
|
t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
|
|
1776
1776
|
code: "invalid_key",
|
|
1777
1777
|
origin: "record",
|
|
1778
|
-
issues: l.issues.map((e) =>
|
|
1778
|
+
issues: l.issues.map((e) => y(e, i, w())),
|
|
1779
1779
|
input: n,
|
|
1780
1780
|
path: [n],
|
|
1781
1781
|
inst: e
|
|
@@ -1789,8 +1789,8 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1789
1789
|
issues: []
|
|
1790
1790
|
}, i);
|
|
1791
1791
|
d instanceof Promise ? o.push(d.then((e) => {
|
|
1792
|
-
e.issues.length && r.issues.push(...
|
|
1793
|
-
})) : (d.issues.length && r.issues.push(...
|
|
1792
|
+
e.issues.length && r.issues.push(...v(n, e.issues)), r.value[u] = e.value;
|
|
1793
|
+
})) : (d.issues.length && r.issues.push(...v(n, d.issues)), r.value[u] = d.value);
|
|
1794
1794
|
}
|
|
1795
1795
|
c && c.length > 0 && r.issues.push({
|
|
1796
1796
|
code: "unrecognized_keys",
|
|
@@ -1802,12 +1802,12 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1802
1802
|
}
|
|
1803
1803
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1804
1804
|
};
|
|
1805
|
-
}),
|
|
1806
|
-
|
|
1805
|
+
}), gr = /*@__PURE__*/ S("$ZodEnum", (t, n) => {
|
|
1806
|
+
E.init(t, n);
|
|
1807
1807
|
let r = e(n.entries), i = new Set(r);
|
|
1808
1808
|
t._zod.values = i;
|
|
1809
|
-
let a = r.filter((e) =>
|
|
1810
|
-
t._zod.pattern = RegExp(a.length ? `^(${a.map((e) =>
|
|
1809
|
+
let a = r.filter((e) => ne.has(typeof e));
|
|
1810
|
+
t._zod.pattern = RegExp(a.length ? `^(${a.map((e) => re(e.toString())).join("|")})$` : "^[^\\s\\S]$"), t._zod.parse = (e, n) => {
|
|
1811
1811
|
let a = e.value;
|
|
1812
1812
|
return i.has(a) || e.issues.push({
|
|
1813
1813
|
code: "invalid_value",
|
|
@@ -1816,10 +1816,10 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1816
1816
|
inst: t
|
|
1817
1817
|
}), e;
|
|
1818
1818
|
};
|
|
1819
|
-
}),
|
|
1820
|
-
|
|
1819
|
+
}), _r = /*@__PURE__*/ S("$ZodLiteral", (e, t) => {
|
|
1820
|
+
E.init(e, t);
|
|
1821
1821
|
let n = new Set(t.values);
|
|
1822
|
-
e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ?
|
|
1822
|
+
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) => {
|
|
1823
1823
|
let a = r.value;
|
|
1824
1824
|
return n.has(a) || r.issues.push({
|
|
1825
1825
|
code: "invalid_value",
|
|
@@ -1828,23 +1828,23 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1828
1828
|
inst: e
|
|
1829
1829
|
}), r;
|
|
1830
1830
|
};
|
|
1831
|
-
}),
|
|
1832
|
-
|
|
1833
|
-
if (r.direction === "backward") throw new
|
|
1831
|
+
}), vr = /*@__PURE__*/ S("$ZodTransform", (e, t) => {
|
|
1832
|
+
E.init(e, t), e._zod.optin = "optional", C.memoizer?.guard(e), e._zod.parse = (n, r) => {
|
|
1833
|
+
if (r.direction === "backward") throw new Re(e.constructor.name);
|
|
1834
1834
|
let i = t.transform(n.value, n);
|
|
1835
1835
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1836
|
-
if (i instanceof Promise) throw new
|
|
1836
|
+
if (i instanceof Promise) throw new Le();
|
|
1837
1837
|
return n.value = i, n;
|
|
1838
1838
|
};
|
|
1839
1839
|
});
|
|
1840
|
-
function
|
|
1840
|
+
function yr(e, t) {
|
|
1841
1841
|
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
1842
1842
|
}
|
|
1843
|
-
var
|
|
1844
|
-
|
|
1843
|
+
var br = /*@__PURE__*/ S("$ZodOptional", (e, t) => {
|
|
1844
|
+
E.init(e, t), x(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", x(e, "values", (e) => {
|
|
1845
1845
|
let t = e.def.innerType._zod.values;
|
|
1846
1846
|
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
1847
|
-
}),
|
|
1847
|
+
}), x(e, "pattern", (e) => {
|
|
1848
1848
|
let t = e.def.innerType._zod.pattern;
|
|
1849
1849
|
return t ? RegExp(`^(${a(t.source)})?$`) : void 0;
|
|
1850
1850
|
}), e._zod.parse = (e, n) => {
|
|
@@ -1854,40 +1854,40 @@ var yr = /*@__PURE__*/ C("$ZodOptional", (e, t) => {
|
|
|
1854
1854
|
value: e.value,
|
|
1855
1855
|
issues: []
|
|
1856
1856
|
}, n);
|
|
1857
|
-
return r instanceof Promise ? r.then((t) =>
|
|
1857
|
+
return r instanceof Promise ? r.then((t) => yr(e, t)) : yr(e, r);
|
|
1858
1858
|
}
|
|
1859
1859
|
return t.innerType._zod.run(e, n);
|
|
1860
1860
|
};
|
|
1861
|
-
}),
|
|
1862
|
-
|
|
1863
|
-
}),
|
|
1864
|
-
|
|
1861
|
+
}), xr = /*@__PURE__*/ S("$ZodExactOptional", (e, t) => {
|
|
1862
|
+
br.init(e, t), x(e, "values", (e) => e.def.innerType._zod.values), x(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1863
|
+
}), Sr = /*@__PURE__*/ S("$ZodNullable", (e, t) => {
|
|
1864
|
+
E.init(e, t), x(e, "optin", (e) => e.def.innerType._zod.optin), x(e, "optout", (e) => e.def.innerType._zod.optout), x(e, "pattern", (e) => {
|
|
1865
1865
|
let t = e.def.innerType._zod.pattern;
|
|
1866
1866
|
return t ? RegExp(`^(${a(t.source)}|null)$`) : void 0;
|
|
1867
|
-
}),
|
|
1868
|
-
}),
|
|
1869
|
-
|
|
1867
|
+
}), x(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);
|
|
1868
|
+
}), Cr = /*@__PURE__*/ S("$ZodDefault", (e, t) => {
|
|
1869
|
+
E.init(e, t), e._zod.optin = "defaulted", x(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1870
1870
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1871
1871
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1872
1872
|
let r = t.innerType._zod.run(e, n);
|
|
1873
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1873
|
+
return r instanceof Promise ? r.then((e) => wr(e, t)) : wr(r, t);
|
|
1874
1874
|
};
|
|
1875
1875
|
});
|
|
1876
|
-
function
|
|
1876
|
+
function wr(e, t) {
|
|
1877
1877
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1878
1878
|
}
|
|
1879
|
-
var
|
|
1880
|
-
|
|
1881
|
-
}),
|
|
1882
|
-
|
|
1879
|
+
var Tr = /*@__PURE__*/ S("$ZodPrefault", (e, t) => {
|
|
1880
|
+
E.init(e, t), e._zod.optin = "defaulted", x(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));
|
|
1881
|
+
}), Er = /*@__PURE__*/ S("$ZodNonOptional", (e, t) => {
|
|
1882
|
+
E.init(e, t), x(e, "values", (e) => {
|
|
1883
1883
|
let t = e.def.innerType._zod.values;
|
|
1884
1884
|
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
1885
1885
|
}), e._zod.parse = (n, r) => {
|
|
1886
1886
|
let i = t.innerType._zod.run(n, r);
|
|
1887
|
-
return i instanceof Promise ? i.then((t) =>
|
|
1887
|
+
return i instanceof Promise ? i.then((t) => Dr(t, e)) : Dr(i, e);
|
|
1888
1888
|
};
|
|
1889
1889
|
});
|
|
1890
|
-
function
|
|
1890
|
+
function Dr(e, t) {
|
|
1891
1891
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1892
1892
|
code: "invalid_type",
|
|
1893
1893
|
expected: "nonoptional",
|
|
@@ -1895,62 +1895,62 @@ function Er(e, t) {
|
|
|
1895
1895
|
inst: t
|
|
1896
1896
|
}), e;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function Or(e, t, n, r) {
|
|
1899
1899
|
return t.issues.length ? (e.value = n.catchValue({
|
|
1900
1900
|
...t,
|
|
1901
1901
|
value: e.value,
|
|
1902
|
-
error: { issues: t.issues.map((e) =>
|
|
1902
|
+
error: { issues: t.issues.map((e) => y(e, r, w())) },
|
|
1903
1903
|
input: e.value
|
|
1904
1904
|
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
1905
1905
|
}
|
|
1906
|
-
var
|
|
1907
|
-
|
|
1906
|
+
var kr = /*@__PURE__*/ S("$ZodCatch", (e, t) => {
|
|
1907
|
+
E.init(e, t), x(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), x(e, "optout", (e) => e.def.innerType._zod.optout), x(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1908
1908
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1909
1909
|
let r = t.innerType._zod.run({
|
|
1910
1910
|
value: e.value,
|
|
1911
1911
|
issues: []
|
|
1912
1912
|
}, n);
|
|
1913
|
-
return r instanceof Promise ? r.then((r) =>
|
|
1913
|
+
return r instanceof Promise ? r.then((r) => Or(e, r, t, n)) : Or(e, r, t, n);
|
|
1914
1914
|
};
|
|
1915
|
-
}),
|
|
1916
|
-
|
|
1915
|
+
}), Ar = /*@__PURE__*/ S("$ZodPipe", (e, t) => {
|
|
1916
|
+
E.init(e, t), x(e, "values", (e) => e.def.in._zod.values), x(e, "optin", (e) => e.def.in._zod.optin), x(e, "optout", (e) => e.def.out._zod.optout), x(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1917
1917
|
if (n.direction === "backward") {
|
|
1918
1918
|
let r = t.out._zod.run(e, n);
|
|
1919
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1919
|
+
return r instanceof Promise ? r.then((e) => jr(e, t.in, n)) : jr(r, t.in, n);
|
|
1920
1920
|
}
|
|
1921
1921
|
let r = t.in._zod.run(e, n);
|
|
1922
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1922
|
+
return r instanceof Promise ? r.then((e) => jr(e, t.out, n)) : jr(r, t.out, n);
|
|
1923
1923
|
};
|
|
1924
1924
|
});
|
|
1925
|
-
function
|
|
1925
|
+
function jr(e, t, n) {
|
|
1926
1926
|
return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
|
|
1927
1927
|
value: e.value,
|
|
1928
1928
|
issues: e.issues
|
|
1929
1929
|
}, n);
|
|
1930
1930
|
}
|
|
1931
|
-
var
|
|
1932
|
-
|
|
1931
|
+
var Mr = /*@__PURE__*/ S("$ZodReadonly", (e, t) => {
|
|
1932
|
+
E.init(e, t), x(e, "propValues", (e) => e.def.innerType._zod.propValues), x(e, "values", (e) => e.def.innerType._zod.values), x(e, "optin", (e) => e.def.innerType?._zod?.optin), x(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1933
1933
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1934
1934
|
let r = t.innerType._zod.run(e, n);
|
|
1935
|
-
return r instanceof Promise ? r.then(
|
|
1935
|
+
return r instanceof Promise ? r.then(Nr) : Nr(r);
|
|
1936
1936
|
};
|
|
1937
1937
|
});
|
|
1938
|
-
function
|
|
1938
|
+
function Nr(e) {
|
|
1939
1939
|
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
1940
1940
|
}
|
|
1941
|
-
var
|
|
1942
|
-
|
|
1941
|
+
var Pr = /*@__PURE__*/ S("$ZodLazy", (e, t) => {
|
|
1942
|
+
E.init(e, t), c(e._zod, "innerType", () => {
|
|
1943
1943
|
let e = t;
|
|
1944
1944
|
return e._cachedInner ||= t.getter(), e._cachedInner;
|
|
1945
|
-
}),
|
|
1946
|
-
}),
|
|
1947
|
-
|
|
1945
|
+
}), x(e, "pattern", (e) => e.innerType?._zod?.pattern), x(e, "propValues", (e) => e.innerType?._zod?.propValues), x(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), x(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
|
|
1946
|
+
}), Fr = /*@__PURE__*/ S("$ZodCustom", (e, t) => {
|
|
1947
|
+
T.init(e, t), E.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1948
1948
|
let r = n.value, i = t.fn(r);
|
|
1949
|
-
if (i instanceof Promise) return i.then((t) =>
|
|
1950
|
-
|
|
1949
|
+
if (i instanceof Promise) return i.then((t) => Ir(t, n, r, e));
|
|
1950
|
+
Ir(i, n, r, e);
|
|
1951
1951
|
};
|
|
1952
1952
|
});
|
|
1953
|
-
function
|
|
1953
|
+
function Ir(e, t, n, r) {
|
|
1954
1954
|
if (!e) {
|
|
1955
1955
|
let e = {
|
|
1956
1956
|
code: "custom",
|
|
@@ -1959,30 +1959,30 @@ function Fr(e, t, n, r) {
|
|
|
1959
1959
|
path: [...r._zod.def.path ?? []],
|
|
1960
1960
|
continue: !r._zod.def.abort
|
|
1961
1961
|
};
|
|
1962
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(
|
|
1962
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Se(e));
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
1965
|
//#endregion
|
|
1966
1966
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
|
|
1967
|
-
var
|
|
1967
|
+
var Lr = class extends Error {
|
|
1968
1968
|
constructor() {
|
|
1969
1969
|
super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
|
|
1970
1970
|
}
|
|
1971
|
-
},
|
|
1972
|
-
function
|
|
1971
|
+
}, Rr = "~memo", zr = [];
|
|
1972
|
+
function Br(e) {
|
|
1973
1973
|
return e.map((e) => e.path ? {
|
|
1974
1974
|
...e,
|
|
1975
1975
|
path: e.path.slice()
|
|
1976
1976
|
} : { ...e });
|
|
1977
1977
|
}
|
|
1978
|
-
var
|
|
1979
|
-
function
|
|
1980
|
-
let n =
|
|
1978
|
+
var Vr = /*@__PURE__*/ new WeakMap();
|
|
1979
|
+
function Hr(e, t) {
|
|
1980
|
+
let n = Vr.get(e);
|
|
1981
1981
|
if (n !== void 0) return n;
|
|
1982
1982
|
if (t.has(e)) return !0;
|
|
1983
1983
|
t.add(e);
|
|
1984
1984
|
let r = !1, i = (e) => {
|
|
1985
|
-
!r && e?._zod &&
|
|
1985
|
+
!r && e?._zod && Hr(e, t) && (r = !0);
|
|
1986
1986
|
}, a = e._zod.def;
|
|
1987
1987
|
switch (a.type) {
|
|
1988
1988
|
case "object":
|
|
@@ -2059,28 +2059,28 @@ function Vr(e, t) {
|
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
|
-
return t.delete(e),
|
|
2062
|
+
return t.delete(e), Vr.set(e, r), r;
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function Ur(e, t) {
|
|
2065
2065
|
let n = e.buckets.get(t);
|
|
2066
2066
|
return n || (n = /* @__PURE__ */ new Map(), e.buckets.set(t, n)), n;
|
|
2067
2067
|
}
|
|
2068
|
-
var
|
|
2068
|
+
var Wr, Gr = [], Kr = {
|
|
2069
2069
|
alloc(e, t, n) {
|
|
2070
|
-
let r =
|
|
2070
|
+
let r = Wr;
|
|
2071
2071
|
if (!r) return n;
|
|
2072
|
-
|
|
2072
|
+
Wr = void 0;
|
|
2073
2073
|
let i = {
|
|
2074
2074
|
value: n,
|
|
2075
2075
|
issues: null
|
|
2076
2076
|
};
|
|
2077
|
-
return r.set(t.value, i),
|
|
2077
|
+
return r.set(t.value, i), Gr.push(i), n;
|
|
2078
2078
|
},
|
|
2079
2079
|
guard(e) {
|
|
2080
2080
|
var t;
|
|
2081
2081
|
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2082
2082
|
let t = e._zod.parse, n = (e, n) => {
|
|
2083
|
-
if (n.direction !== "backward" &&
|
|
2083
|
+
if (n.direction !== "backward" && Jr(n, e.value)) throw new Lr();
|
|
2084
2084
|
return t(e, n);
|
|
2085
2085
|
};
|
|
2086
2086
|
e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
|
|
@@ -2091,38 +2091,38 @@ var Ur, Wr = [], Gr = {
|
|
|
2091
2091
|
let n, r, i;
|
|
2092
2092
|
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2093
2093
|
let t = e._zod.parse, a = (o, s) => {
|
|
2094
|
-
if (n === void 0 && (n =
|
|
2094
|
+
if (n === void 0 && (n = Hr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
|
|
2095
2095
|
let c = o.value;
|
|
2096
2096
|
if (typeof c != "object" || !c) return t(o, s);
|
|
2097
|
-
let l = s[
|
|
2097
|
+
let l = s[Rr];
|
|
2098
2098
|
l || (l = {
|
|
2099
2099
|
buckets: /* @__PURE__ */ new Map(),
|
|
2100
2100
|
backEdges: void 0
|
|
2101
|
-
}, s[
|
|
2101
|
+
}, s[Rr] = l);
|
|
2102
2102
|
let u;
|
|
2103
|
-
r === s ? u = i : (u =
|
|
2103
|
+
r === s ? u = i : (u = Ur(l, e), r = s, i = u);
|
|
2104
2104
|
let d = u.get(c);
|
|
2105
|
-
if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...
|
|
2106
|
-
|
|
2107
|
-
let f =
|
|
2108
|
-
|
|
2109
|
-
let m =
|
|
2110
|
-
return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ?
|
|
2105
|
+
if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Br(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
|
|
2106
|
+
Wr = u;
|
|
2107
|
+
let f = Gr.length, p = t(o, s);
|
|
2108
|
+
Wr = void 0;
|
|
2109
|
+
let m = Gr.length > f ? Gr.pop() : void 0;
|
|
2110
|
+
return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Br(e.issues) : zr), e)) : (m && (m.issues = p.issues.length ? Br(p.issues) : zr), p);
|
|
2111
2111
|
};
|
|
2112
2112
|
e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
2115
|
};
|
|
2116
|
-
function
|
|
2117
|
-
return
|
|
2116
|
+
function qr() {
|
|
2117
|
+
return Kr;
|
|
2118
2118
|
}
|
|
2119
|
-
function
|
|
2120
|
-
let n = e[
|
|
2119
|
+
function Jr(e, t) {
|
|
2120
|
+
let n = e[Rr]?.backEdges;
|
|
2121
2121
|
return n !== void 0 && typeof t == "object" && !!t && n.has(t);
|
|
2122
2122
|
}
|
|
2123
2123
|
//#endregion
|
|
2124
2124
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
|
|
2125
|
-
var
|
|
2125
|
+
var Yr = () => {
|
|
2126
2126
|
let e = {
|
|
2127
2127
|
string: {
|
|
2128
2128
|
unit: "characters",
|
|
@@ -2185,7 +2185,7 @@ var Jr = () => {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
return (e) => {
|
|
2187
2187
|
switch (e.code) {
|
|
2188
|
-
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(
|
|
2188
|
+
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(xe(e.input), e.input)}`;
|
|
2189
2189
|
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ie(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
|
|
2190
2190
|
case "too_big": {
|
|
2191
2191
|
let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
|
|
@@ -2208,12 +2208,12 @@ var Jr = () => {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
};
|
|
2210
2210
|
};
|
|
2211
|
-
function
|
|
2212
|
-
return { localeError:
|
|
2211
|
+
function Xr() {
|
|
2212
|
+
return { localeError: Yr() };
|
|
2213
2213
|
}
|
|
2214
2214
|
//#endregion
|
|
2215
2215
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
|
|
2216
|
-
var
|
|
2216
|
+
var Zr, Qr = class {
|
|
2217
2217
|
constructor() {
|
|
2218
2218
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2219
2219
|
}
|
|
@@ -2245,22 +2245,22 @@ var Xr, Zr = class {
|
|
|
2245
2245
|
return this._map.has(e);
|
|
2246
2246
|
}
|
|
2247
2247
|
};
|
|
2248
|
-
function
|
|
2249
|
-
return new
|
|
2248
|
+
function $r() {
|
|
2249
|
+
return new Qr();
|
|
2250
2250
|
}
|
|
2251
|
-
(
|
|
2252
|
-
var
|
|
2251
|
+
(Zr = globalThis).__zod_globalRegistry ?? (Zr.__zod_globalRegistry = $r());
|
|
2252
|
+
var ei = globalThis.__zod_globalRegistry;
|
|
2253
2253
|
//#endregion
|
|
2254
2254
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
|
|
2255
2255
|
// @__NO_SIDE_EFFECTS__
|
|
2256
|
-
function
|
|
2256
|
+
function ti(e, t) {
|
|
2257
2257
|
return new e({
|
|
2258
2258
|
type: "string",
|
|
2259
2259
|
..._(t)
|
|
2260
2260
|
});
|
|
2261
2261
|
}
|
|
2262
2262
|
// @__NO_SIDE_EFFECTS__
|
|
2263
|
-
function
|
|
2263
|
+
function ni(e, t) {
|
|
2264
2264
|
return new e({
|
|
2265
2265
|
type: "string",
|
|
2266
2266
|
format: "email",
|
|
@@ -2270,7 +2270,7 @@ function ti(e, t) {
|
|
|
2270
2270
|
});
|
|
2271
2271
|
}
|
|
2272
2272
|
// @__NO_SIDE_EFFECTS__
|
|
2273
|
-
function
|
|
2273
|
+
function ri(e, t) {
|
|
2274
2274
|
return new e({
|
|
2275
2275
|
type: "string",
|
|
2276
2276
|
format: "guid",
|
|
@@ -2280,7 +2280,7 @@ function ni(e, t) {
|
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
2282
|
// @__NO_SIDE_EFFECTS__
|
|
2283
|
-
function
|
|
2283
|
+
function ii(e, t) {
|
|
2284
2284
|
return new e({
|
|
2285
2285
|
type: "string",
|
|
2286
2286
|
format: "uuid",
|
|
@@ -2290,7 +2290,7 @@ function ri(e, t) {
|
|
|
2290
2290
|
});
|
|
2291
2291
|
}
|
|
2292
2292
|
// @__NO_SIDE_EFFECTS__
|
|
2293
|
-
function
|
|
2293
|
+
function ai(e, t) {
|
|
2294
2294
|
return new e({
|
|
2295
2295
|
type: "string",
|
|
2296
2296
|
format: "uuid",
|
|
@@ -2301,7 +2301,7 @@ function ii(e, t) {
|
|
|
2301
2301
|
});
|
|
2302
2302
|
}
|
|
2303
2303
|
// @__NO_SIDE_EFFECTS__
|
|
2304
|
-
function
|
|
2304
|
+
function oi(e, t) {
|
|
2305
2305
|
return new e({
|
|
2306
2306
|
type: "string",
|
|
2307
2307
|
format: "uuid",
|
|
@@ -2312,7 +2312,7 @@ function ai(e, t) {
|
|
|
2312
2312
|
});
|
|
2313
2313
|
}
|
|
2314
2314
|
// @__NO_SIDE_EFFECTS__
|
|
2315
|
-
function
|
|
2315
|
+
function si(e, t) {
|
|
2316
2316
|
return new e({
|
|
2317
2317
|
type: "string",
|
|
2318
2318
|
format: "uuid",
|
|
@@ -2323,7 +2323,7 @@ function oi(e, t) {
|
|
|
2323
2323
|
});
|
|
2324
2324
|
}
|
|
2325
2325
|
// @__NO_SIDE_EFFECTS__
|
|
2326
|
-
function
|
|
2326
|
+
function ci(e, t) {
|
|
2327
2327
|
return new e({
|
|
2328
2328
|
type: "string",
|
|
2329
2329
|
format: "url",
|
|
@@ -2333,7 +2333,7 @@ function si(e, t) {
|
|
|
2333
2333
|
});
|
|
2334
2334
|
}
|
|
2335
2335
|
// @__NO_SIDE_EFFECTS__
|
|
2336
|
-
function
|
|
2336
|
+
function li(e, t) {
|
|
2337
2337
|
return new e({
|
|
2338
2338
|
type: "string",
|
|
2339
2339
|
format: "emoji",
|
|
@@ -2343,7 +2343,7 @@ function ci(e, t) {
|
|
|
2343
2343
|
});
|
|
2344
2344
|
}
|
|
2345
2345
|
// @__NO_SIDE_EFFECTS__
|
|
2346
|
-
function
|
|
2346
|
+
function ui(e, t) {
|
|
2347
2347
|
return new e({
|
|
2348
2348
|
type: "string",
|
|
2349
2349
|
format: "nanoid",
|
|
@@ -2353,7 +2353,7 @@ function li(e, t) {
|
|
|
2353
2353
|
});
|
|
2354
2354
|
}
|
|
2355
2355
|
// @__NO_SIDE_EFFECTS__
|
|
2356
|
-
function
|
|
2356
|
+
function di(e, t) {
|
|
2357
2357
|
return new e({
|
|
2358
2358
|
type: "string",
|
|
2359
2359
|
format: "cuid",
|
|
@@ -2363,7 +2363,7 @@ function ui(e, t) {
|
|
|
2363
2363
|
});
|
|
2364
2364
|
}
|
|
2365
2365
|
// @__NO_SIDE_EFFECTS__
|
|
2366
|
-
function
|
|
2366
|
+
function fi(e, t) {
|
|
2367
2367
|
return new e({
|
|
2368
2368
|
type: "string",
|
|
2369
2369
|
format: "cuid2",
|
|
@@ -2373,7 +2373,7 @@ function di(e, t) {
|
|
|
2373
2373
|
});
|
|
2374
2374
|
}
|
|
2375
2375
|
// @__NO_SIDE_EFFECTS__
|
|
2376
|
-
function
|
|
2376
|
+
function pi(e, t) {
|
|
2377
2377
|
return new e({
|
|
2378
2378
|
type: "string",
|
|
2379
2379
|
format: "ulid",
|
|
@@ -2383,7 +2383,7 @@ function fi(e, t) {
|
|
|
2383
2383
|
});
|
|
2384
2384
|
}
|
|
2385
2385
|
// @__NO_SIDE_EFFECTS__
|
|
2386
|
-
function
|
|
2386
|
+
function mi(e, t) {
|
|
2387
2387
|
return new e({
|
|
2388
2388
|
type: "string",
|
|
2389
2389
|
format: "xid",
|
|
@@ -2393,7 +2393,7 @@ function pi(e, t) {
|
|
|
2393
2393
|
});
|
|
2394
2394
|
}
|
|
2395
2395
|
// @__NO_SIDE_EFFECTS__
|
|
2396
|
-
function
|
|
2396
|
+
function hi(e, t) {
|
|
2397
2397
|
return new e({
|
|
2398
2398
|
type: "string",
|
|
2399
2399
|
format: "ksuid",
|
|
@@ -2403,7 +2403,7 @@ function mi(e, t) {
|
|
|
2403
2403
|
});
|
|
2404
2404
|
}
|
|
2405
2405
|
// @__NO_SIDE_EFFECTS__
|
|
2406
|
-
function
|
|
2406
|
+
function gi(e, t) {
|
|
2407
2407
|
return new e({
|
|
2408
2408
|
type: "string",
|
|
2409
2409
|
format: "ipv4",
|
|
@@ -2413,7 +2413,7 @@ function hi(e, t) {
|
|
|
2413
2413
|
});
|
|
2414
2414
|
}
|
|
2415
2415
|
// @__NO_SIDE_EFFECTS__
|
|
2416
|
-
function
|
|
2416
|
+
function _i(e, t) {
|
|
2417
2417
|
return new e({
|
|
2418
2418
|
type: "string",
|
|
2419
2419
|
format: "ipv6",
|
|
@@ -2423,7 +2423,7 @@ function gi(e, t) {
|
|
|
2423
2423
|
});
|
|
2424
2424
|
}
|
|
2425
2425
|
// @__NO_SIDE_EFFECTS__
|
|
2426
|
-
function
|
|
2426
|
+
function vi(e, t) {
|
|
2427
2427
|
return new e({
|
|
2428
2428
|
type: "string",
|
|
2429
2429
|
format: "cidrv4",
|
|
@@ -2433,7 +2433,7 @@ function _i(e, t) {
|
|
|
2433
2433
|
});
|
|
2434
2434
|
}
|
|
2435
2435
|
// @__NO_SIDE_EFFECTS__
|
|
2436
|
-
function
|
|
2436
|
+
function yi(e, t) {
|
|
2437
2437
|
return new e({
|
|
2438
2438
|
type: "string",
|
|
2439
2439
|
format: "cidrv6",
|
|
@@ -2443,7 +2443,7 @@ function vi(e, t) {
|
|
|
2443
2443
|
});
|
|
2444
2444
|
}
|
|
2445
2445
|
// @__NO_SIDE_EFFECTS__
|
|
2446
|
-
function
|
|
2446
|
+
function bi(e, t) {
|
|
2447
2447
|
return new e({
|
|
2448
2448
|
type: "string",
|
|
2449
2449
|
format: "base64",
|
|
@@ -2453,7 +2453,7 @@ function yi(e, t) {
|
|
|
2453
2453
|
});
|
|
2454
2454
|
}
|
|
2455
2455
|
// @__NO_SIDE_EFFECTS__
|
|
2456
|
-
function
|
|
2456
|
+
function xi(e, t) {
|
|
2457
2457
|
return new e({
|
|
2458
2458
|
type: "string",
|
|
2459
2459
|
format: "base64url",
|
|
@@ -2463,7 +2463,7 @@ function bi(e, t) {
|
|
|
2463
2463
|
});
|
|
2464
2464
|
}
|
|
2465
2465
|
// @__NO_SIDE_EFFECTS__
|
|
2466
|
-
function
|
|
2466
|
+
function Si(e, t) {
|
|
2467
2467
|
return new e({
|
|
2468
2468
|
type: "string",
|
|
2469
2469
|
format: "e164",
|
|
@@ -2473,7 +2473,7 @@ function xi(e, t) {
|
|
|
2473
2473
|
});
|
|
2474
2474
|
}
|
|
2475
2475
|
// @__NO_SIDE_EFFECTS__
|
|
2476
|
-
function
|
|
2476
|
+
function Ci(e, t) {
|
|
2477
2477
|
return new e({
|
|
2478
2478
|
type: "string",
|
|
2479
2479
|
format: "jwt",
|
|
@@ -2483,7 +2483,7 @@ function Si(e, t) {
|
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
2485
2485
|
// @__NO_SIDE_EFFECTS__
|
|
2486
|
-
function
|
|
2486
|
+
function wi(e, t) {
|
|
2487
2487
|
return new e({
|
|
2488
2488
|
type: "string",
|
|
2489
2489
|
format: "datetime",
|
|
@@ -2495,7 +2495,7 @@ function Ci(e, t) {
|
|
|
2495
2495
|
});
|
|
2496
2496
|
}
|
|
2497
2497
|
// @__NO_SIDE_EFFECTS__
|
|
2498
|
-
function
|
|
2498
|
+
function Ti(e, t) {
|
|
2499
2499
|
return new e({
|
|
2500
2500
|
type: "string",
|
|
2501
2501
|
format: "date",
|
|
@@ -2504,7 +2504,7 @@ function wi(e, t) {
|
|
|
2504
2504
|
});
|
|
2505
2505
|
}
|
|
2506
2506
|
// @__NO_SIDE_EFFECTS__
|
|
2507
|
-
function
|
|
2507
|
+
function Ei(e, t) {
|
|
2508
2508
|
return new e({
|
|
2509
2509
|
type: "string",
|
|
2510
2510
|
format: "time",
|
|
@@ -2514,7 +2514,7 @@ function Ti(e, t) {
|
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
2516
|
// @__NO_SIDE_EFFECTS__
|
|
2517
|
-
function
|
|
2517
|
+
function Di(e, t) {
|
|
2518
2518
|
return new e({
|
|
2519
2519
|
type: "string",
|
|
2520
2520
|
format: "duration",
|
|
@@ -2523,7 +2523,7 @@ function Ei(e, t) {
|
|
|
2523
2523
|
});
|
|
2524
2524
|
}
|
|
2525
2525
|
// @__NO_SIDE_EFFECTS__
|
|
2526
|
-
function
|
|
2526
|
+
function Oi(e, t) {
|
|
2527
2527
|
return new e({
|
|
2528
2528
|
type: "number",
|
|
2529
2529
|
checks: [],
|
|
@@ -2531,7 +2531,7 @@ function Di(e, t) {
|
|
|
2531
2531
|
});
|
|
2532
2532
|
}
|
|
2533
2533
|
// @__NO_SIDE_EFFECTS__
|
|
2534
|
-
function
|
|
2534
|
+
function ki(e, t) {
|
|
2535
2535
|
return new e({
|
|
2536
2536
|
type: "number",
|
|
2537
2537
|
check: "number_format",
|
|
@@ -2541,33 +2541,33 @@ function Oi(e, t) {
|
|
|
2541
2541
|
});
|
|
2542
2542
|
}
|
|
2543
2543
|
// @__NO_SIDE_EFFECTS__
|
|
2544
|
-
function
|
|
2544
|
+
function Ai(e, t) {
|
|
2545
2545
|
return new e({
|
|
2546
2546
|
type: "boolean",
|
|
2547
2547
|
..._(t)
|
|
2548
2548
|
});
|
|
2549
2549
|
}
|
|
2550
2550
|
// @__NO_SIDE_EFFECTS__
|
|
2551
|
-
function
|
|
2551
|
+
function ji(e, t) {
|
|
2552
2552
|
return new e({
|
|
2553
2553
|
type: "null",
|
|
2554
2554
|
..._(t)
|
|
2555
2555
|
});
|
|
2556
2556
|
}
|
|
2557
2557
|
// @__NO_SIDE_EFFECTS__
|
|
2558
|
-
function
|
|
2558
|
+
function Mi(e) {
|
|
2559
2559
|
return new e({ type: "unknown" });
|
|
2560
2560
|
}
|
|
2561
2561
|
// @__NO_SIDE_EFFECTS__
|
|
2562
|
-
function
|
|
2562
|
+
function Ni(e, t) {
|
|
2563
2563
|
return new e({
|
|
2564
2564
|
type: "never",
|
|
2565
2565
|
..._(t)
|
|
2566
2566
|
});
|
|
2567
2567
|
}
|
|
2568
2568
|
// @__NO_SIDE_EFFECTS__
|
|
2569
|
-
function
|
|
2570
|
-
return new
|
|
2569
|
+
function Pi(e, t) {
|
|
2570
|
+
return new Jt({
|
|
2571
2571
|
check: "less_than",
|
|
2572
2572
|
..._(t),
|
|
2573
2573
|
value: e,
|
|
@@ -2575,8 +2575,8 @@ function Ni(e, t) {
|
|
|
2575
2575
|
});
|
|
2576
2576
|
}
|
|
2577
2577
|
// @__NO_SIDE_EFFECTS__
|
|
2578
|
-
function
|
|
2579
|
-
return new
|
|
2578
|
+
function Fi(e, t) {
|
|
2579
|
+
return new Jt({
|
|
2580
2580
|
check: "less_than",
|
|
2581
2581
|
..._(t),
|
|
2582
2582
|
value: e,
|
|
@@ -2584,8 +2584,8 @@ function Pi(e, t) {
|
|
|
2584
2584
|
});
|
|
2585
2585
|
}
|
|
2586
2586
|
// @__NO_SIDE_EFFECTS__
|
|
2587
|
-
function
|
|
2588
|
-
return new
|
|
2587
|
+
function Ii(e, t) {
|
|
2588
|
+
return new Yt({
|
|
2589
2589
|
check: "greater_than",
|
|
2590
2590
|
..._(t),
|
|
2591
2591
|
value: e,
|
|
@@ -2593,8 +2593,8 @@ function Fi(e, t) {
|
|
|
2593
2593
|
});
|
|
2594
2594
|
}
|
|
2595
2595
|
// @__NO_SIDE_EFFECTS__
|
|
2596
|
-
function
|
|
2597
|
-
return new
|
|
2596
|
+
function Li(e, t) {
|
|
2597
|
+
return new Yt({
|
|
2598
2598
|
check: "greater_than",
|
|
2599
2599
|
..._(t),
|
|
2600
2600
|
value: e,
|
|
@@ -2602,40 +2602,40 @@ function Ii(e, t) {
|
|
|
2602
2602
|
});
|
|
2603
2603
|
}
|
|
2604
2604
|
// @__NO_SIDE_EFFECTS__
|
|
2605
|
-
function
|
|
2606
|
-
return new
|
|
2605
|
+
function Ri(e, t) {
|
|
2606
|
+
return new Xt({
|
|
2607
2607
|
check: "multiple_of",
|
|
2608
2608
|
..._(t),
|
|
2609
2609
|
value: e
|
|
2610
2610
|
});
|
|
2611
2611
|
}
|
|
2612
2612
|
// @__NO_SIDE_EFFECTS__
|
|
2613
|
-
function
|
|
2614
|
-
return new
|
|
2613
|
+
function zi(e, t) {
|
|
2614
|
+
return new Qt({
|
|
2615
2615
|
check: "max_length",
|
|
2616
2616
|
..._(t),
|
|
2617
2617
|
maximum: e
|
|
2618
2618
|
});
|
|
2619
2619
|
}
|
|
2620
2620
|
// @__NO_SIDE_EFFECTS__
|
|
2621
|
-
function
|
|
2622
|
-
return new
|
|
2621
|
+
function Bi(e, t) {
|
|
2622
|
+
return new $t({
|
|
2623
2623
|
check: "min_length",
|
|
2624
2624
|
..._(t),
|
|
2625
2625
|
minimum: e
|
|
2626
2626
|
});
|
|
2627
2627
|
}
|
|
2628
2628
|
// @__NO_SIDE_EFFECTS__
|
|
2629
|
-
function
|
|
2630
|
-
return new
|
|
2629
|
+
function Vi(e, t) {
|
|
2630
|
+
return new en({
|
|
2631
2631
|
check: "length_equals",
|
|
2632
2632
|
..._(t),
|
|
2633
2633
|
length: e
|
|
2634
2634
|
});
|
|
2635
2635
|
}
|
|
2636
2636
|
// @__NO_SIDE_EFFECTS__
|
|
2637
|
-
function
|
|
2638
|
-
return new
|
|
2637
|
+
function Hi(e, t) {
|
|
2638
|
+
return new nn({
|
|
2639
2639
|
check: "string_format",
|
|
2640
2640
|
format: "regex",
|
|
2641
2641
|
..._(t),
|
|
@@ -2643,24 +2643,24 @@ function Vi(e, t) {
|
|
|
2643
2643
|
});
|
|
2644
2644
|
}
|
|
2645
2645
|
// @__NO_SIDE_EFFECTS__
|
|
2646
|
-
function
|
|
2647
|
-
return new
|
|
2646
|
+
function Ui(e) {
|
|
2647
|
+
return new rn({
|
|
2648
2648
|
check: "string_format",
|
|
2649
2649
|
format: "lowercase",
|
|
2650
2650
|
..._(e)
|
|
2651
2651
|
});
|
|
2652
2652
|
}
|
|
2653
2653
|
// @__NO_SIDE_EFFECTS__
|
|
2654
|
-
function
|
|
2655
|
-
return new
|
|
2654
|
+
function Wi(e) {
|
|
2655
|
+
return new an({
|
|
2656
2656
|
check: "string_format",
|
|
2657
2657
|
format: "uppercase",
|
|
2658
2658
|
..._(e)
|
|
2659
2659
|
});
|
|
2660
2660
|
}
|
|
2661
2661
|
// @__NO_SIDE_EFFECTS__
|
|
2662
|
-
function
|
|
2663
|
-
return new
|
|
2662
|
+
function Gi(e, t) {
|
|
2663
|
+
return new on({
|
|
2664
2664
|
check: "string_format",
|
|
2665
2665
|
format: "includes",
|
|
2666
2666
|
..._(t),
|
|
@@ -2668,8 +2668,8 @@ function Wi(e, t) {
|
|
|
2668
2668
|
});
|
|
2669
2669
|
}
|
|
2670
2670
|
// @__NO_SIDE_EFFECTS__
|
|
2671
|
-
function
|
|
2672
|
-
return new
|
|
2671
|
+
function Ki(e, t) {
|
|
2672
|
+
return new sn({
|
|
2673
2673
|
check: "string_format",
|
|
2674
2674
|
format: "starts_with",
|
|
2675
2675
|
..._(t),
|
|
@@ -2677,8 +2677,8 @@ function Gi(e, t) {
|
|
|
2677
2677
|
});
|
|
2678
2678
|
}
|
|
2679
2679
|
// @__NO_SIDE_EFFECTS__
|
|
2680
|
-
function
|
|
2681
|
-
return new
|
|
2680
|
+
function qi(e, t) {
|
|
2681
|
+
return new cn({
|
|
2682
2682
|
check: "string_format",
|
|
2683
2683
|
format: "ends_with",
|
|
2684
2684
|
..._(t),
|
|
@@ -2686,31 +2686,31 @@ function Ki(e, t) {
|
|
|
2686
2686
|
});
|
|
2687
2687
|
}
|
|
2688
2688
|
// @__NO_SIDE_EFFECTS__
|
|
2689
|
-
function
|
|
2690
|
-
return new
|
|
2689
|
+
function O(e) {
|
|
2690
|
+
return new ln({
|
|
2691
2691
|
check: "overwrite",
|
|
2692
2692
|
tx: e
|
|
2693
2693
|
});
|
|
2694
2694
|
}
|
|
2695
2695
|
// @__NO_SIDE_EFFECTS__
|
|
2696
2696
|
function Ji(e) {
|
|
2697
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ O((t) => t.normalize(e));
|
|
2698
2698
|
}
|
|
2699
2699
|
// @__NO_SIDE_EFFECTS__
|
|
2700
2700
|
function Yi() {
|
|
2701
|
-
return /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ O((e) => e.trim());
|
|
2702
2702
|
}
|
|
2703
2703
|
// @__NO_SIDE_EFFECTS__
|
|
2704
2704
|
function Xi() {
|
|
2705
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ O((e) => e.toLowerCase());
|
|
2706
2706
|
}
|
|
2707
2707
|
// @__NO_SIDE_EFFECTS__
|
|
2708
2708
|
function Zi() {
|
|
2709
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ O((e) => e.toUpperCase());
|
|
2710
2710
|
}
|
|
2711
2711
|
// @__NO_SIDE_EFFECTS__
|
|
2712
2712
|
function Qi() {
|
|
2713
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ O((e) => f(e));
|
|
2714
2714
|
}
|
|
2715
2715
|
// @__NO_SIDE_EFFECTS__
|
|
2716
2716
|
function $i(e, t, n) {
|
|
@@ -2732,17 +2732,17 @@ function ea(e, t, n) {
|
|
|
2732
2732
|
// @__NO_SIDE_EFFECTS__
|
|
2733
2733
|
function ta(e, t) {
|
|
2734
2734
|
let n = /* @__PURE__ */ na((t) => (t.addIssue = (e) => {
|
|
2735
|
-
if (typeof e == "string") t.issues.push(
|
|
2735
|
+
if (typeof e == "string") t.issues.push(Se(e, t.value, n._zod.def));
|
|
2736
2736
|
else {
|
|
2737
2737
|
let r = e;
|
|
2738
|
-
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(
|
|
2738
|
+
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(Se(r));
|
|
2739
2739
|
}
|
|
2740
2740
|
}, e(t.value, t)), t);
|
|
2741
2741
|
return n;
|
|
2742
2742
|
}
|
|
2743
2743
|
// @__NO_SIDE_EFFECTS__
|
|
2744
2744
|
function na(e, t) {
|
|
2745
|
-
let n = new
|
|
2745
|
+
let n = new T({
|
|
2746
2746
|
check: "custom",
|
|
2747
2747
|
..._(t)
|
|
2748
2748
|
});
|
|
@@ -2758,7 +2758,7 @@ function ia(e) {
|
|
|
2758
2758
|
let t = e?.target ?? "draft-2020-12";
|
|
2759
2759
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2760
2760
|
processors: e.processors ?? {},
|
|
2761
|
-
metadataRegistry: e?.metadata ??
|
|
2761
|
+
metadataRegistry: e?.metadata ?? ei,
|
|
2762
2762
|
target: t,
|
|
2763
2763
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2764
2764
|
override: e?.override ?? (() => {}),
|
|
@@ -3222,7 +3222,7 @@ function ja(e, t, n) {
|
|
|
3222
3222
|
let r = Array.isArray(t.type) ? t.type : [t.type], i = !r.includes("string") && r.some((e) => e === "number" || e === "integer"), a = t.enum ?? (t.const === void 0 ? void 0 : [t.const]);
|
|
3223
3223
|
if (!i && !a?.some((e) => typeof e == "number")) return t;
|
|
3224
3224
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3225
|
-
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ?
|
|
3225
|
+
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Vt : Bt).source), p) : p;
|
|
3226
3226
|
}
|
|
3227
3227
|
var Ma = /* @__PURE__ */ new WeakMap();
|
|
3228
3228
|
function Na(e) {
|
|
@@ -3356,10 +3356,10 @@ function qa(e, t, n) {
|
|
|
3356
3356
|
}
|
|
3357
3357
|
});
|
|
3358
3358
|
}
|
|
3359
|
-
var M = /*@__PURE__*/
|
|
3360
|
-
|
|
3359
|
+
var M = /*@__PURE__*/ S("ZodError", (e, t) => {
|
|
3360
|
+
Ke.init(e, t), e.name = "ZodError";
|
|
3361
3361
|
let r = Object.getPrototypeOf(e);
|
|
3362
|
-
Ka.has(r) || (Ka.add(r), qa(r, "format", (e) => (t) =>
|
|
3362
|
+
Ka.has(r) || (Ka.add(r), qa(r, "format", (e) => (t) => Xe(e, t)), qa(r, "flatten", (e) => (t) => Ye(e, t)), qa(r, "addIssue", (e) => (t) => {
|
|
3363
3363
|
e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3364
3364
|
}), qa(r, "addIssues", (e) => (t) => {
|
|
3365
3365
|
e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
|
|
@@ -3370,16 +3370,16 @@ var M = /*@__PURE__*/ C("ZodError", (e, t) => {
|
|
|
3370
3370
|
return this.issues.length === 0;
|
|
3371
3371
|
}
|
|
3372
3372
|
}));
|
|
3373
|
-
}, void 0, { Parent: Error }), Ja = /* @__PURE__ */
|
|
3373
|
+
}, void 0, { Parent: Error }), Ja = /* @__PURE__ */ Qe(M), Ya = /* @__PURE__ */ $e(M), Xa = /* @__PURE__ */ et(M), Za = /* @__PURE__ */ nt(M), Qa = /* @__PURE__ */ it(M), $a = /* @__PURE__ */ at(M), eo = /* @__PURE__ */ ot(M), to = /* @__PURE__ */ st(M), no = /* @__PURE__ */ ct(M), ro = /* @__PURE__ */ lt(M), io = /* @__PURE__ */ ut(M), ao = /* @__PURE__ */ dt(M);
|
|
3374
3374
|
//#endregion
|
|
3375
3375
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3376
3376
|
function oo() {
|
|
3377
|
-
|
|
3377
|
+
C.localeError || w(Xr());
|
|
3378
3378
|
}
|
|
3379
3379
|
function so() {
|
|
3380
|
-
|
|
3380
|
+
C.memoizer || w({ memoizer: qr() });
|
|
3381
3381
|
}
|
|
3382
|
-
var N = /*@__PURE__*/
|
|
3382
|
+
var N = /*@__PURE__*/ S("ZodType", (e, t) => (oo(), E.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3383
3383
|
check(...e) {
|
|
3384
3384
|
let t = this.def;
|
|
3385
3385
|
return this.clone(u(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3401,64 +3401,64 @@ var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.t
|
|
|
3401
3401
|
return e.add(this, t), this;
|
|
3402
3402
|
},
|
|
3403
3403
|
refine(e, t) {
|
|
3404
|
-
return this.check(
|
|
3404
|
+
return this.check(bs(e, t));
|
|
3405
3405
|
},
|
|
3406
3406
|
superRefine(e, t) {
|
|
3407
|
-
return this.check(
|
|
3407
|
+
return this.check(xs(e, t));
|
|
3408
3408
|
},
|
|
3409
3409
|
overwrite(e) {
|
|
3410
|
-
return this.check(/* @__PURE__ */
|
|
3410
|
+
return this.check(/* @__PURE__ */ O(e));
|
|
3411
3411
|
},
|
|
3412
3412
|
optional() {
|
|
3413
|
-
return
|
|
3413
|
+
return es(this);
|
|
3414
3414
|
},
|
|
3415
3415
|
exactOptional() {
|
|
3416
|
-
return
|
|
3416
|
+
return ns(this);
|
|
3417
3417
|
},
|
|
3418
3418
|
nullable() {
|
|
3419
|
-
return
|
|
3419
|
+
return is(this);
|
|
3420
3420
|
},
|
|
3421
3421
|
nullish() {
|
|
3422
|
-
return
|
|
3422
|
+
return es(is(this));
|
|
3423
3423
|
},
|
|
3424
3424
|
nonoptional(e) {
|
|
3425
|
-
return
|
|
3425
|
+
return us(this, e);
|
|
3426
3426
|
},
|
|
3427
3427
|
array() {
|
|
3428
3428
|
return z(this);
|
|
3429
3429
|
},
|
|
3430
3430
|
or(e) {
|
|
3431
|
-
return
|
|
3431
|
+
return H([this, e]);
|
|
3432
3432
|
},
|
|
3433
3433
|
and(e) {
|
|
3434
|
-
return
|
|
3434
|
+
return qo(this, e);
|
|
3435
3435
|
},
|
|
3436
3436
|
transform(e) {
|
|
3437
|
-
return
|
|
3437
|
+
return ms(this, Qo(e));
|
|
3438
3438
|
},
|
|
3439
3439
|
default(e) {
|
|
3440
|
-
return
|
|
3440
|
+
return os(this, e);
|
|
3441
3441
|
},
|
|
3442
3442
|
prefault(e) {
|
|
3443
|
-
return
|
|
3443
|
+
return cs(this, e);
|
|
3444
3444
|
},
|
|
3445
3445
|
catch(e) {
|
|
3446
|
-
return
|
|
3446
|
+
return fs(this, e);
|
|
3447
3447
|
},
|
|
3448
3448
|
pipe(e) {
|
|
3449
|
-
return
|
|
3449
|
+
return ms(this, e);
|
|
3450
3450
|
},
|
|
3451
3451
|
readonly() {
|
|
3452
|
-
return
|
|
3452
|
+
return gs(this);
|
|
3453
3453
|
},
|
|
3454
3454
|
describe(e) {
|
|
3455
3455
|
let t = this.clone();
|
|
3456
|
-
return
|
|
3456
|
+
return ei.add(t, { description: e }), t;
|
|
3457
3457
|
},
|
|
3458
3458
|
meta(...e) {
|
|
3459
|
-
if (e.length === 0) return
|
|
3459
|
+
if (e.length === 0) return ei.get(this);
|
|
3460
3460
|
let t = this.clone();
|
|
3461
|
-
return
|
|
3461
|
+
return ei.add(t, e[0]), t;
|
|
3462
3462
|
},
|
|
3463
3463
|
isOptional() {
|
|
3464
3464
|
return this.safeParse(void 0).success;
|
|
@@ -3470,8 +3470,8 @@ var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.t
|
|
|
3470
3470
|
return t.length === 0 ? e(this) : e(this, ...t);
|
|
3471
3471
|
},
|
|
3472
3472
|
get "~standard"() {
|
|
3473
|
-
return
|
|
3474
|
-
...
|
|
3473
|
+
return we(this, "~standard", {
|
|
3474
|
+
...pn(this),
|
|
3475
3475
|
jsonSchema: {
|
|
3476
3476
|
input: ha(this, "input"),
|
|
3477
3477
|
output: ha(this, "output")
|
|
@@ -3479,7 +3479,7 @@ var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.t
|
|
|
3479
3479
|
});
|
|
3480
3480
|
},
|
|
3481
3481
|
set "~standard"(e) {
|
|
3482
|
-
|
|
3482
|
+
b(this, "~standard", e);
|
|
3483
3483
|
},
|
|
3484
3484
|
parse: function e(t, n) {
|
|
3485
3485
|
return Ja(this, t, n, { callee: e });
|
|
@@ -3497,7 +3497,7 @@ var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.t
|
|
|
3497
3497
|
return this?.safeParseAsync;
|
|
3498
3498
|
},
|
|
3499
3499
|
set spa(e) {
|
|
3500
|
-
|
|
3500
|
+
b(this, "spa", e);
|
|
3501
3501
|
},
|
|
3502
3502
|
encode: function e(t, n) {
|
|
3503
3503
|
return Qa(this, t, n, { callee: e });
|
|
@@ -3527,45 +3527,45 @@ var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.t
|
|
|
3527
3527
|
return ma(this, {})(e);
|
|
3528
3528
|
},
|
|
3529
3529
|
get description() {
|
|
3530
|
-
return
|
|
3530
|
+
return ei.get(this)?.description;
|
|
3531
3531
|
},
|
|
3532
3532
|
get _def() {
|
|
3533
3533
|
return this._zod.def;
|
|
3534
3534
|
}
|
|
3535
|
-
}), co = /*@__PURE__*/
|
|
3536
|
-
|
|
3535
|
+
}), co = /*@__PURE__*/ S("_ZodString", (e, t) => {
|
|
3536
|
+
mn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => _a(e, t, n, r);
|
|
3537
3537
|
let n = e._zod.bag;
|
|
3538
3538
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
3539
3539
|
}, {
|
|
3540
3540
|
regex(...e) {
|
|
3541
|
-
return this.check(/* @__PURE__ */
|
|
3541
|
+
return this.check(/* @__PURE__ */ Hi(...e));
|
|
3542
3542
|
},
|
|
3543
3543
|
includes(...e) {
|
|
3544
|
-
return this.check(/* @__PURE__ */
|
|
3544
|
+
return this.check(/* @__PURE__ */ Gi(...e));
|
|
3545
3545
|
},
|
|
3546
3546
|
startsWith(...e) {
|
|
3547
|
-
return this.check(/* @__PURE__ */
|
|
3547
|
+
return this.check(/* @__PURE__ */ Ki(...e));
|
|
3548
3548
|
},
|
|
3549
3549
|
endsWith(...e) {
|
|
3550
|
-
return this.check(/* @__PURE__ */
|
|
3550
|
+
return this.check(/* @__PURE__ */ qi(...e));
|
|
3551
3551
|
},
|
|
3552
3552
|
min(...e) {
|
|
3553
|
-
return this.check(/* @__PURE__ */
|
|
3553
|
+
return this.check(/* @__PURE__ */ Bi(...e));
|
|
3554
3554
|
},
|
|
3555
3555
|
max(...e) {
|
|
3556
|
-
return this.check(/* @__PURE__ */
|
|
3556
|
+
return this.check(/* @__PURE__ */ zi(...e));
|
|
3557
3557
|
},
|
|
3558
3558
|
length(...e) {
|
|
3559
|
-
return this.check(/* @__PURE__ */
|
|
3559
|
+
return this.check(/* @__PURE__ */ Vi(...e));
|
|
3560
3560
|
},
|
|
3561
3561
|
nonempty(...e) {
|
|
3562
|
-
return this.check(/* @__PURE__ */
|
|
3562
|
+
return this.check(/* @__PURE__ */ Bi(1, ...e));
|
|
3563
3563
|
},
|
|
3564
3564
|
lowercase(e) {
|
|
3565
|
-
return this.check(/* @__PURE__ */
|
|
3565
|
+
return this.check(/* @__PURE__ */ Ui(e));
|
|
3566
3566
|
},
|
|
3567
3567
|
uppercase(e) {
|
|
3568
|
-
return this.check(/* @__PURE__ */
|
|
3568
|
+
return this.check(/* @__PURE__ */ Wi(e));
|
|
3569
3569
|
},
|
|
3570
3570
|
trim() {
|
|
3571
3571
|
return this.check(/* @__PURE__ */ Yi());
|
|
@@ -3582,161 +3582,161 @@ var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.t
|
|
|
3582
3582
|
slugify() {
|
|
3583
3583
|
return this.check(/* @__PURE__ */ Qi());
|
|
3584
3584
|
}
|
|
3585
|
-
}), lo = /*@__PURE__*/
|
|
3586
|
-
|
|
3585
|
+
}), lo = /*@__PURE__*/ S("ZodString", (e, t) => {
|
|
3586
|
+
mn.init(e, t), co.init(e, t);
|
|
3587
3587
|
}, {
|
|
3588
3588
|
email(e) {
|
|
3589
|
-
return this.check(/* @__PURE__ */
|
|
3589
|
+
return this.check(/* @__PURE__ */ ni(ho, e));
|
|
3590
3590
|
},
|
|
3591
3591
|
url(e) {
|
|
3592
|
-
return this.check(/* @__PURE__ */
|
|
3592
|
+
return this.check(/* @__PURE__ */ ci(vo, e));
|
|
3593
3593
|
},
|
|
3594
3594
|
jwt(e) {
|
|
3595
|
-
return this.check(/* @__PURE__ */
|
|
3595
|
+
return this.check(/* @__PURE__ */ Ci(No, e));
|
|
3596
3596
|
},
|
|
3597
3597
|
emoji(e) {
|
|
3598
|
-
return this.check(/* @__PURE__ */
|
|
3598
|
+
return this.check(/* @__PURE__ */ li(yo, e));
|
|
3599
3599
|
},
|
|
3600
3600
|
guid(e) {
|
|
3601
|
-
return this.check(/* @__PURE__ */
|
|
3601
|
+
return this.check(/* @__PURE__ */ ri(go, e));
|
|
3602
3602
|
},
|
|
3603
3603
|
uuid(e) {
|
|
3604
|
-
return this.check(/* @__PURE__ */
|
|
3604
|
+
return this.check(/* @__PURE__ */ ii(_o, e));
|
|
3605
3605
|
},
|
|
3606
3606
|
uuidv4(e) {
|
|
3607
|
-
return this.check(/* @__PURE__ */
|
|
3607
|
+
return this.check(/* @__PURE__ */ ai(_o, e));
|
|
3608
3608
|
},
|
|
3609
3609
|
uuidv6(e) {
|
|
3610
|
-
return this.check(/* @__PURE__ */
|
|
3610
|
+
return this.check(/* @__PURE__ */ oi(_o, e));
|
|
3611
3611
|
},
|
|
3612
3612
|
uuidv7(e) {
|
|
3613
|
-
return this.check(/* @__PURE__ */
|
|
3613
|
+
return this.check(/* @__PURE__ */ si(_o, e));
|
|
3614
3614
|
},
|
|
3615
3615
|
nanoid(e) {
|
|
3616
|
-
return this.check(/* @__PURE__ */
|
|
3616
|
+
return this.check(/* @__PURE__ */ ui(bo, e));
|
|
3617
3617
|
},
|
|
3618
3618
|
cuid(e) {
|
|
3619
|
-
return this.check(/* @__PURE__ */
|
|
3619
|
+
return this.check(/* @__PURE__ */ di(xo, e));
|
|
3620
3620
|
},
|
|
3621
3621
|
cuid2(e) {
|
|
3622
|
-
return this.check(/* @__PURE__ */
|
|
3622
|
+
return this.check(/* @__PURE__ */ fi(So, e));
|
|
3623
3623
|
},
|
|
3624
3624
|
ulid(e) {
|
|
3625
|
-
return this.check(/* @__PURE__ */
|
|
3625
|
+
return this.check(/* @__PURE__ */ pi(Co, e));
|
|
3626
3626
|
},
|
|
3627
3627
|
base64(e) {
|
|
3628
|
-
return this.check(/* @__PURE__ */
|
|
3628
|
+
return this.check(/* @__PURE__ */ bi(Ao, e));
|
|
3629
3629
|
},
|
|
3630
3630
|
base64url(e) {
|
|
3631
|
-
return this.check(/* @__PURE__ */
|
|
3631
|
+
return this.check(/* @__PURE__ */ xi(jo, e));
|
|
3632
3632
|
},
|
|
3633
3633
|
xid(e) {
|
|
3634
|
-
return this.check(/* @__PURE__ */
|
|
3634
|
+
return this.check(/* @__PURE__ */ mi(wo, e));
|
|
3635
3635
|
},
|
|
3636
3636
|
ksuid(e) {
|
|
3637
|
-
return this.check(/* @__PURE__ */
|
|
3637
|
+
return this.check(/* @__PURE__ */ hi(To, e));
|
|
3638
3638
|
},
|
|
3639
3639
|
ipv4(e) {
|
|
3640
|
-
return this.check(/* @__PURE__ */
|
|
3640
|
+
return this.check(/* @__PURE__ */ gi(Eo, e));
|
|
3641
3641
|
},
|
|
3642
3642
|
ipv6(e) {
|
|
3643
|
-
return this.check(/* @__PURE__ */
|
|
3643
|
+
return this.check(/* @__PURE__ */ _i(Do, e));
|
|
3644
3644
|
},
|
|
3645
3645
|
cidrv4(e) {
|
|
3646
|
-
return this.check(/* @__PURE__ */
|
|
3646
|
+
return this.check(/* @__PURE__ */ vi(Oo, e));
|
|
3647
3647
|
},
|
|
3648
3648
|
cidrv6(e) {
|
|
3649
|
-
return this.check(/* @__PURE__ */
|
|
3649
|
+
return this.check(/* @__PURE__ */ yi(ko, e));
|
|
3650
3650
|
},
|
|
3651
3651
|
e164(e) {
|
|
3652
|
-
return this.check(/* @__PURE__ */
|
|
3652
|
+
return this.check(/* @__PURE__ */ Si(Mo, e));
|
|
3653
3653
|
},
|
|
3654
3654
|
datetime(e) {
|
|
3655
|
-
return this.check(/* @__PURE__ */
|
|
3655
|
+
return this.check(/* @__PURE__ */ wi(uo, e));
|
|
3656
3656
|
},
|
|
3657
3657
|
date(e) {
|
|
3658
|
-
return this.check(/* @__PURE__ */
|
|
3658
|
+
return this.check(/* @__PURE__ */ Ti(fo, e));
|
|
3659
3659
|
},
|
|
3660
3660
|
time(e) {
|
|
3661
|
-
return this.check(/* @__PURE__ */
|
|
3661
|
+
return this.check(/* @__PURE__ */ Ei(po, e));
|
|
3662
3662
|
},
|
|
3663
3663
|
duration(e) {
|
|
3664
|
-
return this.check(/* @__PURE__ */
|
|
3664
|
+
return this.check(/* @__PURE__ */ Di(mo, e));
|
|
3665
3665
|
}
|
|
3666
3666
|
});
|
|
3667
3667
|
function P(e) {
|
|
3668
|
-
return /* @__PURE__ */
|
|
3668
|
+
return /* @__PURE__ */ ti(lo, e);
|
|
3669
3669
|
}
|
|
3670
|
-
var F = /*@__PURE__*/
|
|
3671
|
-
|
|
3672
|
-
}), uo = /*@__PURE__*/
|
|
3673
|
-
An.init(e, t), F.init(e, t);
|
|
3674
|
-
}), fo = /*@__PURE__*/ C("ZodISODate", (e, t) => {
|
|
3670
|
+
var F = /*@__PURE__*/ S("ZodStringFormat", (e, t) => {
|
|
3671
|
+
D.init(e, t), co.init(e, t);
|
|
3672
|
+
}), uo = /*@__PURE__*/ S("ZodISODateTime", (e, t) => {
|
|
3675
3673
|
jn.init(e, t), F.init(e, t);
|
|
3676
|
-
}),
|
|
3674
|
+
}), fo = /*@__PURE__*/ S("ZodISODate", (e, t) => {
|
|
3677
3675
|
Mn.init(e, t), F.init(e, t);
|
|
3678
|
-
}),
|
|
3676
|
+
}), po = /*@__PURE__*/ S("ZodISOTime", (e, t) => {
|
|
3679
3677
|
Nn.init(e, t), F.init(e, t);
|
|
3680
|
-
}),
|
|
3681
|
-
|
|
3682
|
-
}),
|
|
3683
|
-
|
|
3684
|
-
}),
|
|
3678
|
+
}), mo = /*@__PURE__*/ S("ZodISODuration", (e, t) => {
|
|
3679
|
+
Pn.init(e, t), F.init(e, t);
|
|
3680
|
+
}), ho = /*@__PURE__*/ S("ZodEmail", (e, t) => {
|
|
3681
|
+
_n.init(e, t), F.init(e, t);
|
|
3682
|
+
}), go = /*@__PURE__*/ S("ZodGUID", (e, t) => {
|
|
3685
3683
|
hn.init(e, t), F.init(e, t);
|
|
3686
|
-
}),
|
|
3687
|
-
|
|
3688
|
-
}),
|
|
3684
|
+
}), _o = /*@__PURE__*/ S("ZodUUID", (e, t) => {
|
|
3685
|
+
gn.init(e, t), F.init(e, t);
|
|
3686
|
+
}), vo = /*@__PURE__*/ S("ZodURL", (e, t) => {
|
|
3689
3687
|
Cn.init(e, t), F.init(e, t);
|
|
3690
|
-
}),
|
|
3688
|
+
}), yo = /*@__PURE__*/ S("ZodEmoji", (e, t) => {
|
|
3691
3689
|
wn.init(e, t), F.init(e, t);
|
|
3692
|
-
}),
|
|
3690
|
+
}), bo = /*@__PURE__*/ S("ZodNanoID", (e, t) => {
|
|
3693
3691
|
Tn.init(e, t), F.init(e, t);
|
|
3694
|
-
}),
|
|
3692
|
+
}), xo = /*@__PURE__*/ S("ZodCUID", (e, t) => {
|
|
3695
3693
|
En.init(e, t), F.init(e, t);
|
|
3696
|
-
}),
|
|
3694
|
+
}), So = /*@__PURE__*/ S("ZodCUID2", (e, t) => {
|
|
3697
3695
|
Dn.init(e, t), F.init(e, t);
|
|
3698
|
-
}),
|
|
3696
|
+
}), Co = /*@__PURE__*/ S("ZodULID", (e, t) => {
|
|
3699
3697
|
On.init(e, t), F.init(e, t);
|
|
3700
|
-
}),
|
|
3698
|
+
}), wo = /*@__PURE__*/ S("ZodXID", (e, t) => {
|
|
3701
3699
|
kn.init(e, t), F.init(e, t);
|
|
3702
|
-
}),
|
|
3703
|
-
|
|
3704
|
-
}),
|
|
3705
|
-
|
|
3706
|
-
}),
|
|
3700
|
+
}), To = /*@__PURE__*/ S("ZodKSUID", (e, t) => {
|
|
3701
|
+
An.init(e, t), F.init(e, t);
|
|
3702
|
+
}), Eo = /*@__PURE__*/ S("ZodIPv4", (e, t) => {
|
|
3703
|
+
Fn.init(e, t), F.init(e, t);
|
|
3704
|
+
}), Do = /*@__PURE__*/ S("ZodIPv6", (e, t) => {
|
|
3707
3705
|
Rn.init(e, t), F.init(e, t);
|
|
3708
|
-
}),
|
|
3709
|
-
|
|
3710
|
-
}),
|
|
3711
|
-
|
|
3712
|
-
}),
|
|
3713
|
-
|
|
3714
|
-
}),
|
|
3706
|
+
}), Oo = /*@__PURE__*/ S("ZodCIDRv4", (e, t) => {
|
|
3707
|
+
zn.init(e, t), F.init(e, t);
|
|
3708
|
+
}), ko = /*@__PURE__*/ S("ZodCIDRv6", (e, t) => {
|
|
3709
|
+
Vn.init(e, t), F.init(e, t);
|
|
3710
|
+
}), Ao = /*@__PURE__*/ S("ZodBase64", (e, t) => {
|
|
3711
|
+
Un.init(e, t), F.init(e, t);
|
|
3712
|
+
}), jo = /*@__PURE__*/ S("ZodBase64URL", (e, t) => {
|
|
3715
3713
|
Gn.init(e, t), F.init(e, t);
|
|
3716
|
-
}),
|
|
3717
|
-
|
|
3718
|
-
}),
|
|
3719
|
-
Jn.init(e, t),
|
|
3714
|
+
}), Mo = /*@__PURE__*/ S("ZodE164", (e, t) => {
|
|
3715
|
+
Kn.init(e, t), F.init(e, t);
|
|
3716
|
+
}), No = /*@__PURE__*/ S("ZodJWT", (e, t) => {
|
|
3717
|
+
Jn.init(e, t), F.init(e, t);
|
|
3718
|
+
}), Po = /*@__PURE__*/ S("ZodNumber", (e, t) => {
|
|
3719
|
+
Yn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
|
|
3720
3720
|
let n = e._zod.bag;
|
|
3721
3721
|
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;
|
|
3722
3722
|
}, {
|
|
3723
3723
|
gt(e, t) {
|
|
3724
|
-
return this.check(/* @__PURE__ */
|
|
3724
|
+
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3725
3725
|
},
|
|
3726
3726
|
gte(e, t) {
|
|
3727
|
-
return this.check(/* @__PURE__ */
|
|
3727
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3728
3728
|
},
|
|
3729
3729
|
min(e, t) {
|
|
3730
|
-
return this.check(/* @__PURE__ */
|
|
3730
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3731
3731
|
},
|
|
3732
3732
|
lt(e, t) {
|
|
3733
|
-
return this.check(/* @__PURE__ */
|
|
3733
|
+
return this.check(/* @__PURE__ */ Pi(e, t));
|
|
3734
3734
|
},
|
|
3735
3735
|
lte(e, t) {
|
|
3736
|
-
return this.check(/* @__PURE__ */
|
|
3736
|
+
return this.check(/* @__PURE__ */ Fi(e, t));
|
|
3737
3737
|
},
|
|
3738
3738
|
max(e, t) {
|
|
3739
|
-
return this.check(/* @__PURE__ */
|
|
3739
|
+
return this.check(/* @__PURE__ */ Fi(e, t));
|
|
3740
3740
|
},
|
|
3741
3741
|
int(e) {
|
|
3742
3742
|
return this.check(Io(e));
|
|
@@ -3745,74 +3745,74 @@ var F = /*@__PURE__*/ C("ZodStringFormat", (e, t) => {
|
|
|
3745
3745
|
return this.check(Io(e));
|
|
3746
3746
|
},
|
|
3747
3747
|
positive(e) {
|
|
3748
|
-
return this.check(/* @__PURE__ */
|
|
3748
|
+
return this.check(/* @__PURE__ */ Ii(0, e));
|
|
3749
3749
|
},
|
|
3750
3750
|
nonnegative(e) {
|
|
3751
|
-
return this.check(/* @__PURE__ */
|
|
3751
|
+
return this.check(/* @__PURE__ */ Li(0, e));
|
|
3752
3752
|
},
|
|
3753
3753
|
negative(e) {
|
|
3754
|
-
return this.check(/* @__PURE__ */
|
|
3754
|
+
return this.check(/* @__PURE__ */ Pi(0, e));
|
|
3755
3755
|
},
|
|
3756
3756
|
nonpositive(e) {
|
|
3757
|
-
return this.check(/* @__PURE__ */
|
|
3757
|
+
return this.check(/* @__PURE__ */ Fi(0, e));
|
|
3758
3758
|
},
|
|
3759
3759
|
multipleOf(e, t) {
|
|
3760
|
-
return this.check(/* @__PURE__ */
|
|
3760
|
+
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3761
3761
|
},
|
|
3762
3762
|
step(e, t) {
|
|
3763
|
-
return this.check(/* @__PURE__ */
|
|
3763
|
+
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3764
3764
|
},
|
|
3765
3765
|
finite() {
|
|
3766
3766
|
return this;
|
|
3767
3767
|
}
|
|
3768
3768
|
});
|
|
3769
3769
|
function I(e) {
|
|
3770
|
-
return /* @__PURE__ */
|
|
3770
|
+
return /* @__PURE__ */ Oi(Po, e);
|
|
3771
3771
|
}
|
|
3772
|
-
var Fo = /*@__PURE__*/
|
|
3773
|
-
|
|
3772
|
+
var Fo = /*@__PURE__*/ S("ZodNumberFormat", (e, t) => {
|
|
3773
|
+
Xn.init(e, t), Po.init(e, t);
|
|
3774
3774
|
});
|
|
3775
3775
|
function Io(e) {
|
|
3776
|
-
return /* @__PURE__ */
|
|
3776
|
+
return /* @__PURE__ */ ki(Fo, e);
|
|
3777
3777
|
}
|
|
3778
|
-
var Lo = /*@__PURE__*/
|
|
3779
|
-
|
|
3778
|
+
var Lo = /*@__PURE__*/ S("ZodBoolean", (e, t) => {
|
|
3779
|
+
Zn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
|
|
3780
3780
|
});
|
|
3781
3781
|
function L(e) {
|
|
3782
|
-
return /* @__PURE__ */
|
|
3782
|
+
return /* @__PURE__ */ Ai(Lo, e);
|
|
3783
3783
|
}
|
|
3784
|
-
var Ro = /*@__PURE__*/
|
|
3785
|
-
|
|
3784
|
+
var Ro = /*@__PURE__*/ S("ZodNull", (e, t) => {
|
|
3785
|
+
Qn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
|
|
3786
3786
|
});
|
|
3787
3787
|
function zo(e) {
|
|
3788
|
-
return /* @__PURE__ */
|
|
3788
|
+
return /* @__PURE__ */ ji(Ro, e);
|
|
3789
3789
|
}
|
|
3790
|
-
var Bo = /*@__PURE__*/
|
|
3791
|
-
|
|
3790
|
+
var Bo = /*@__PURE__*/ S("ZodUnknown", (e, t) => {
|
|
3791
|
+
$n.init(e, t), N.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3792
3792
|
});
|
|
3793
3793
|
function R() {
|
|
3794
|
-
return /* @__PURE__ */
|
|
3794
|
+
return /* @__PURE__ */ Mi(Bo);
|
|
3795
3795
|
}
|
|
3796
|
-
var Vo = /*@__PURE__*/
|
|
3797
|
-
|
|
3796
|
+
var Vo = /*@__PURE__*/ S("ZodNever", (e, t) => {
|
|
3797
|
+
er.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3798
3798
|
});
|
|
3799
3799
|
function Ho(e) {
|
|
3800
|
-
return /* @__PURE__ */
|
|
3800
|
+
return /* @__PURE__ */ Ni(Vo, e);
|
|
3801
3801
|
}
|
|
3802
|
-
var Uo = /*@__PURE__*/
|
|
3803
|
-
so(),
|
|
3802
|
+
var Uo = /*@__PURE__*/ S("ZodArray", (e, t) => {
|
|
3803
|
+
so(), nr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r), e.element = t.element;
|
|
3804
3804
|
}, {
|
|
3805
3805
|
min(e, t) {
|
|
3806
|
-
return this.check(/* @__PURE__ */
|
|
3806
|
+
return this.check(/* @__PURE__ */ Bi(e, t));
|
|
3807
3807
|
},
|
|
3808
3808
|
nonempty(e) {
|
|
3809
|
-
return this.check(/* @__PURE__ */
|
|
3809
|
+
return this.check(/* @__PURE__ */ Bi(1, e));
|
|
3810
3810
|
},
|
|
3811
3811
|
max(e, t) {
|
|
3812
|
-
return this.check(/* @__PURE__ */
|
|
3812
|
+
return this.check(/* @__PURE__ */ zi(e, t));
|
|
3813
3813
|
},
|
|
3814
3814
|
length(e, t) {
|
|
3815
|
-
return this.check(/* @__PURE__ */
|
|
3815
|
+
return this.check(/* @__PURE__ */ Vi(e, t));
|
|
3816
3816
|
},
|
|
3817
3817
|
unwrap() {
|
|
3818
3818
|
return this.element;
|
|
@@ -3821,11 +3821,11 @@ var Uo = /*@__PURE__*/ C("ZodArray", (e, t) => {
|
|
|
3821
3821
|
function z(e, t) {
|
|
3822
3822
|
return /* @__PURE__ */ $i(Uo, e, t);
|
|
3823
3823
|
}
|
|
3824
|
-
var Wo = /*@__PURE__*/
|
|
3825
|
-
so(),
|
|
3824
|
+
var Wo = /*@__PURE__*/ S("ZodObject", (e, t) => {
|
|
3825
|
+
so(), lr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oa(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3826
3826
|
}, {
|
|
3827
3827
|
keyof() {
|
|
3828
|
-
return
|
|
3828
|
+
return W(Object.keys(this._zod.def.shape));
|
|
3829
3829
|
},
|
|
3830
3830
|
catchall(e) {
|
|
3831
3831
|
return this.clone({
|
|
@@ -3873,13 +3873,13 @@ var Wo = /*@__PURE__*/ C("ZodObject", (e, t) => {
|
|
|
3873
3873
|
return ce(this, e);
|
|
3874
3874
|
},
|
|
3875
3875
|
partial(...e) {
|
|
3876
|
-
return fe(
|
|
3876
|
+
return fe($o, this, e[0]);
|
|
3877
3877
|
},
|
|
3878
3878
|
exactPartial(...e) {
|
|
3879
|
-
return fe(
|
|
3879
|
+
return fe(ts, this, e[0], "exactPartial");
|
|
3880
3880
|
},
|
|
3881
3881
|
required(...e) {
|
|
3882
|
-
return pe(
|
|
3882
|
+
return pe(ls, this, e[0]);
|
|
3883
3883
|
}
|
|
3884
3884
|
});
|
|
3885
3885
|
function B(e, t) {
|
|
@@ -3889,7 +3889,7 @@ function B(e, t) {
|
|
|
3889
3889
|
..._(t)
|
|
3890
3890
|
});
|
|
3891
3891
|
}
|
|
3892
|
-
function
|
|
3892
|
+
function V(e, t) {
|
|
3893
3893
|
return new Wo({
|
|
3894
3894
|
type: "object",
|
|
3895
3895
|
shape: e,
|
|
@@ -3897,50 +3897,50 @@ function Go(e, t) {
|
|
|
3897
3897
|
..._(t)
|
|
3898
3898
|
});
|
|
3899
3899
|
}
|
|
3900
|
-
var
|
|
3901
|
-
|
|
3900
|
+
var Go = /*@__PURE__*/ S("ZodUnion", (e, t) => {
|
|
3901
|
+
dr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r), e.options = t.options;
|
|
3902
3902
|
});
|
|
3903
|
-
function
|
|
3904
|
-
return new
|
|
3903
|
+
function H(e, t) {
|
|
3904
|
+
return new Go({
|
|
3905
3905
|
type: "union",
|
|
3906
3906
|
options: e,
|
|
3907
3907
|
..._(t)
|
|
3908
3908
|
});
|
|
3909
3909
|
}
|
|
3910
|
-
var
|
|
3911
|
-
|
|
3910
|
+
var Ko = /*@__PURE__*/ S("ZodIntersection", (e, t) => {
|
|
3911
|
+
fr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r);
|
|
3912
3912
|
});
|
|
3913
|
-
function
|
|
3914
|
-
return new
|
|
3913
|
+
function qo(e, t) {
|
|
3914
|
+
return new Ko({
|
|
3915
3915
|
type: "intersection",
|
|
3916
3916
|
left: e,
|
|
3917
3917
|
right: t
|
|
3918
3918
|
});
|
|
3919
3919
|
}
|
|
3920
|
-
var
|
|
3921
|
-
so(),
|
|
3920
|
+
var Jo = /*@__PURE__*/ S("ZodRecord", (e, t) => {
|
|
3921
|
+
so(), hr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
3922
3922
|
});
|
|
3923
|
-
function
|
|
3924
|
-
return !t || !t._zod ? new
|
|
3923
|
+
function U(e, t, n) {
|
|
3924
|
+
return !t || !t._zod ? new Jo({
|
|
3925
3925
|
type: "record",
|
|
3926
3926
|
keyType: P(),
|
|
3927
3927
|
valueType: e,
|
|
3928
3928
|
..._(t)
|
|
3929
|
-
}) : new
|
|
3929
|
+
}) : new Jo({
|
|
3930
3930
|
type: "record",
|
|
3931
3931
|
keyType: e,
|
|
3932
3932
|
valueType: t,
|
|
3933
3933
|
..._(n)
|
|
3934
3934
|
});
|
|
3935
3935
|
}
|
|
3936
|
-
var
|
|
3937
|
-
|
|
3936
|
+
var Yo = /*@__PURE__*/ S("ZodEnum", (e, t) => {
|
|
3937
|
+
gr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3938
3938
|
let n = new Set(Object.keys(t.entries));
|
|
3939
3939
|
e.extract = (e, r) => {
|
|
3940
3940
|
let i = {};
|
|
3941
3941
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
3942
3942
|
else throw Error(`Key ${r} not found in enum`);
|
|
3943
|
-
return new
|
|
3943
|
+
return new Yo({
|
|
3944
3944
|
...t,
|
|
3945
3945
|
checks: [],
|
|
3946
3946
|
..._(r),
|
|
@@ -3950,7 +3950,7 @@ var Xo = /*@__PURE__*/ C("ZodEnum", (e, t) => {
|
|
|
3950
3950
|
let i = { ...t.entries };
|
|
3951
3951
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
3952
3952
|
else throw Error(`Key ${t} not found in enum`);
|
|
3953
|
-
return new
|
|
3953
|
+
return new Yo({
|
|
3954
3954
|
...t,
|
|
3955
3955
|
checks: [],
|
|
3956
3956
|
..._(r),
|
|
@@ -3958,181 +3958,181 @@ var Xo = /*@__PURE__*/ C("ZodEnum", (e, t) => {
|
|
|
3958
3958
|
});
|
|
3959
3959
|
};
|
|
3960
3960
|
});
|
|
3961
|
-
function
|
|
3962
|
-
return new
|
|
3961
|
+
function W(e, t) {
|
|
3962
|
+
return new Yo({
|
|
3963
3963
|
type: "enum",
|
|
3964
3964
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
3965
3965
|
..._(t)
|
|
3966
3966
|
});
|
|
3967
3967
|
}
|
|
3968
|
-
var
|
|
3969
|
-
|
|
3968
|
+
var Xo = /*@__PURE__*/ S("ZodLiteral", (e, t) => {
|
|
3969
|
+
_r.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
3970
3970
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3971
3971
|
return t.values[0];
|
|
3972
3972
|
} });
|
|
3973
3973
|
});
|
|
3974
|
-
function
|
|
3975
|
-
return new
|
|
3974
|
+
function G(e, t) {
|
|
3975
|
+
return new Xo({
|
|
3976
3976
|
type: "literal",
|
|
3977
3977
|
values: Array.isArray(e) ? e : [e],
|
|
3978
3978
|
..._(t)
|
|
3979
3979
|
});
|
|
3980
3980
|
}
|
|
3981
|
-
var
|
|
3982
|
-
so(),
|
|
3983
|
-
if (r.direction === "backward") throw new
|
|
3981
|
+
var Zo = /*@__PURE__*/ S("ZodTransform", (e, t) => {
|
|
3982
|
+
so(), vr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3983
|
+
if (r.direction === "backward") throw new Re(e.constructor.name);
|
|
3984
3984
|
n.addIssue = (r) => {
|
|
3985
|
-
if (typeof r == "string") n.issues.push(
|
|
3985
|
+
if (typeof r == "string") n.issues.push(Se(r, n.value, t));
|
|
3986
3986
|
else {
|
|
3987
3987
|
let t = r;
|
|
3988
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(
|
|
3988
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(Se(t));
|
|
3989
3989
|
}
|
|
3990
3990
|
};
|
|
3991
3991
|
let i = t.transform(n.value, n);
|
|
3992
3992
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
3993
3993
|
};
|
|
3994
3994
|
});
|
|
3995
|
-
function
|
|
3996
|
-
return new
|
|
3995
|
+
function Qo(e) {
|
|
3996
|
+
return new Zo({
|
|
3997
3997
|
type: "transform",
|
|
3998
3998
|
transform: e
|
|
3999
3999
|
});
|
|
4000
4000
|
}
|
|
4001
|
-
var
|
|
4002
|
-
|
|
4001
|
+
var $o = /*@__PURE__*/ S("ZodOptional", (e, t) => {
|
|
4002
|
+
br.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4003
4003
|
});
|
|
4004
|
-
function
|
|
4005
|
-
return new
|
|
4004
|
+
function es(e) {
|
|
4005
|
+
return new $o({
|
|
4006
4006
|
type: "optional",
|
|
4007
4007
|
innerType: e
|
|
4008
4008
|
});
|
|
4009
4009
|
}
|
|
4010
|
-
var
|
|
4011
|
-
|
|
4010
|
+
var ts = /*@__PURE__*/ S("ZodExactOptional", (e, t) => {
|
|
4011
|
+
xr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4012
4012
|
});
|
|
4013
|
-
function
|
|
4014
|
-
return new
|
|
4013
|
+
function ns(e) {
|
|
4014
|
+
return new ts({
|
|
4015
4015
|
type: "optional",
|
|
4016
4016
|
innerType: e
|
|
4017
4017
|
});
|
|
4018
4018
|
}
|
|
4019
|
-
var
|
|
4020
|
-
|
|
4019
|
+
var rs = /*@__PURE__*/ S("ZodNullable", (e, t) => {
|
|
4020
|
+
Sr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4021
4021
|
});
|
|
4022
|
-
function
|
|
4023
|
-
return new
|
|
4022
|
+
function is(e) {
|
|
4023
|
+
return new rs({
|
|
4024
4024
|
type: "nullable",
|
|
4025
4025
|
innerType: e
|
|
4026
4026
|
});
|
|
4027
4027
|
}
|
|
4028
|
-
var
|
|
4029
|
-
|
|
4028
|
+
var as = /*@__PURE__*/ S("ZodDefault", (e, t) => {
|
|
4029
|
+
Cr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4030
4030
|
});
|
|
4031
|
-
function
|
|
4032
|
-
return new
|
|
4031
|
+
function os(e, t) {
|
|
4032
|
+
return new as({
|
|
4033
4033
|
type: "default",
|
|
4034
4034
|
innerType: e,
|
|
4035
4035
|
get defaultValue() {
|
|
4036
|
-
return typeof t == "function" ? t() :
|
|
4036
|
+
return typeof t == "function" ? t() : te(t);
|
|
4037
4037
|
}
|
|
4038
4038
|
});
|
|
4039
4039
|
}
|
|
4040
|
-
var
|
|
4041
|
-
|
|
4040
|
+
var ss = /*@__PURE__*/ S("ZodPrefault", (e, t) => {
|
|
4041
|
+
Tr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4042
4042
|
});
|
|
4043
|
-
function
|
|
4044
|
-
return new
|
|
4043
|
+
function cs(e, t) {
|
|
4044
|
+
return new ss({
|
|
4045
4045
|
type: "prefault",
|
|
4046
4046
|
innerType: e,
|
|
4047
4047
|
get defaultValue() {
|
|
4048
|
-
return typeof t == "function" ? t() :
|
|
4048
|
+
return typeof t == "function" ? t() : te(t);
|
|
4049
4049
|
}
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
|
-
var
|
|
4053
|
-
|
|
4052
|
+
var ls = /*@__PURE__*/ S("ZodNonOptional", (e, t) => {
|
|
4053
|
+
Er.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4054
4054
|
});
|
|
4055
|
-
function
|
|
4056
|
-
return new
|
|
4055
|
+
function us(e, t) {
|
|
4056
|
+
return new ls({
|
|
4057
4057
|
type: "nonoptional",
|
|
4058
4058
|
innerType: e,
|
|
4059
4059
|
..._(t)
|
|
4060
4060
|
});
|
|
4061
4061
|
}
|
|
4062
|
-
var
|
|
4063
|
-
|
|
4062
|
+
var ds = /*@__PURE__*/ S("ZodCatch", (e, t) => {
|
|
4063
|
+
kr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4064
4064
|
});
|
|
4065
|
-
function
|
|
4066
|
-
return new
|
|
4065
|
+
function fs(e, t) {
|
|
4066
|
+
return new ds({
|
|
4067
4067
|
type: "catch",
|
|
4068
4068
|
innerType: e,
|
|
4069
|
-
catchValue: typeof t == "function" ? t :
|
|
4069
|
+
catchValue: typeof t == "function" ? t : Me(t)
|
|
4070
4070
|
});
|
|
4071
4071
|
}
|
|
4072
|
-
var
|
|
4073
|
-
|
|
4072
|
+
var ps = /*@__PURE__*/ S("ZodPipe", (e, t) => {
|
|
4073
|
+
Ar.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4074
4074
|
});
|
|
4075
|
-
function
|
|
4076
|
-
return new
|
|
4075
|
+
function ms(e, t) {
|
|
4076
|
+
return new ps({
|
|
4077
4077
|
type: "pipe",
|
|
4078
4078
|
in: e,
|
|
4079
4079
|
out: t
|
|
4080
4080
|
});
|
|
4081
4081
|
}
|
|
4082
|
-
var
|
|
4083
|
-
|
|
4082
|
+
var hs = /*@__PURE__*/ S("ZodReadonly", (e, t) => {
|
|
4083
|
+
Mr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4084
4084
|
});
|
|
4085
|
-
function
|
|
4086
|
-
return new
|
|
4085
|
+
function gs(e) {
|
|
4086
|
+
return new hs({
|
|
4087
4087
|
type: "readonly",
|
|
4088
4088
|
innerType: e
|
|
4089
4089
|
});
|
|
4090
4090
|
}
|
|
4091
|
-
var
|
|
4092
|
-
|
|
4091
|
+
var _s = /*@__PURE__*/ S("ZodLazy", (e, t) => {
|
|
4092
|
+
Pr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4093
4093
|
});
|
|
4094
|
-
function
|
|
4095
|
-
return new
|
|
4094
|
+
function vs(e) {
|
|
4095
|
+
return new _s({
|
|
4096
4096
|
type: "lazy",
|
|
4097
4097
|
getter: e
|
|
4098
4098
|
});
|
|
4099
4099
|
}
|
|
4100
|
-
var
|
|
4101
|
-
|
|
4100
|
+
var ys = /*@__PURE__*/ S("ZodCustom", (e, t) => {
|
|
4101
|
+
Fr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r);
|
|
4102
4102
|
});
|
|
4103
|
-
function
|
|
4104
|
-
return /* @__PURE__ */ ea(
|
|
4103
|
+
function bs(e, t = {}) {
|
|
4104
|
+
return /* @__PURE__ */ ea(ys, e, t);
|
|
4105
4105
|
}
|
|
4106
|
-
function
|
|
4106
|
+
function xs(e, t) {
|
|
4107
4107
|
return /* @__PURE__ */ ta(e, t);
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4110
|
-
let t =
|
|
4109
|
+
function Ss(e) {
|
|
4110
|
+
let t = vs(() => H([
|
|
4111
4111
|
P(e),
|
|
4112
4112
|
I(),
|
|
4113
4113
|
L(),
|
|
4114
4114
|
zo(),
|
|
4115
4115
|
z(t),
|
|
4116
|
-
|
|
4116
|
+
U(P(), t)
|
|
4117
4117
|
]));
|
|
4118
4118
|
return t;
|
|
4119
4119
|
}
|
|
4120
4120
|
//#endregion
|
|
4121
4121
|
//#region src/flow/common/json.ts
|
|
4122
|
-
var
|
|
4123
|
-
function
|
|
4122
|
+
var Cs = 64;
|
|
4123
|
+
function ws(e, t = 0) {
|
|
4124
4124
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4125
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4125
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) ws(n, t + 1);
|
|
4126
4126
|
}
|
|
4127
4127
|
//#endregion
|
|
4128
4128
|
//#region src/flow/common/triggerScheduleSchema.ts
|
|
4129
|
-
var
|
|
4130
|
-
type:
|
|
4129
|
+
var Ts = z(H([B({
|
|
4130
|
+
type: G("cron"),
|
|
4131
4131
|
expression: P(),
|
|
4132
4132
|
timezone: P()
|
|
4133
4133
|
}), B({
|
|
4134
|
-
type:
|
|
4135
|
-
unit:
|
|
4134
|
+
type: G("every"),
|
|
4135
|
+
unit: W([
|
|
4136
4136
|
"day",
|
|
4137
4137
|
"hour",
|
|
4138
4138
|
"minute",
|
|
@@ -4140,100 +4140,116 @@ var Es = z(V([B({
|
|
|
4140
4140
|
"week"
|
|
4141
4141
|
]),
|
|
4142
4142
|
value: I()
|
|
4143
|
-
})])),
|
|
4144
|
-
description:
|
|
4145
|
-
jsonSchema:
|
|
4143
|
+
})])), K = P(), Es = Ss(), Ds = z(K), Os = B({
|
|
4144
|
+
description: K.optional(),
|
|
4145
|
+
jsonSchema: Es,
|
|
4146
4146
|
nullable: L(),
|
|
4147
|
-
handle:
|
|
4148
|
-
}), q = Os.extend({ value:
|
|
4147
|
+
handle: K
|
|
4148
|
+
}), q = Os.extend({ value: Es.optional() }), ks = B({
|
|
4149
4149
|
collapsed: L().optional(),
|
|
4150
|
-
group:
|
|
4150
|
+
group: K
|
|
4151
4151
|
}), As = B({
|
|
4152
|
-
kind:
|
|
4153
|
-
nodeId:
|
|
4154
|
-
output:
|
|
4152
|
+
kind: G("node"),
|
|
4153
|
+
nodeId: K,
|
|
4154
|
+
output: K,
|
|
4155
|
+
field: K.optional()
|
|
4155
4156
|
}), js = B({
|
|
4156
|
-
kind:
|
|
4157
|
-
input:
|
|
4158
|
-
}), Ms =
|
|
4157
|
+
kind: G("flow"),
|
|
4158
|
+
input: K
|
|
4159
|
+
}), Ms = H([
|
|
4159
4160
|
As,
|
|
4160
4161
|
js,
|
|
4161
4162
|
B({
|
|
4162
|
-
kind:
|
|
4163
|
-
bindingId:
|
|
4163
|
+
kind: G("binding"),
|
|
4164
|
+
bindingId: K
|
|
4164
4165
|
})
|
|
4165
|
-
]), Ns =
|
|
4166
|
-
kind:
|
|
4167
|
-
value:
|
|
4168
|
-
}), B({
|
|
4169
|
-
kind:
|
|
4166
|
+
]), Ns = H([B({ kind: G("unset") }), B({
|
|
4167
|
+
kind: G("value"),
|
|
4168
|
+
value: Es
|
|
4169
|
+
})]), Ps = H([Ns, B({
|
|
4170
|
+
kind: G("sources"),
|
|
4170
4171
|
sources: z(Ms)
|
|
4171
|
-
})]),
|
|
4172
|
-
inputs: z(
|
|
4173
|
-
outputs: z(
|
|
4174
|
-
},
|
|
4175
|
-
kind:
|
|
4176
|
-
action:
|
|
4177
|
-
connectionId:
|
|
4178
|
-
connections: z(
|
|
4179
|
-
connectionId:
|
|
4180
|
-
alias:
|
|
4172
|
+
})]), Fs = U(K, Ps), Is = {
|
|
4173
|
+
inputs: z(H([q, ks])),
|
|
4174
|
+
outputs: z(H([Os, ks]))
|
|
4175
|
+
}, Ls = H([V({
|
|
4176
|
+
kind: G("connector"),
|
|
4177
|
+
action: K,
|
|
4178
|
+
connectionId: K.optional(),
|
|
4179
|
+
connections: z(V({
|
|
4180
|
+
connectionId: K,
|
|
4181
|
+
alias: K.optional()
|
|
4181
4182
|
}))
|
|
4182
|
-
}),
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4183
|
+
}), V({
|
|
4184
|
+
kind: G("connector"),
|
|
4185
|
+
actionHints: z(K).optional(),
|
|
4186
|
+
connectionHints: z(V({
|
|
4187
|
+
action: K,
|
|
4188
|
+
connectionId: K,
|
|
4189
|
+
alias: K.optional()
|
|
4190
|
+
})).optional()
|
|
4191
|
+
})]), Rs = B({
|
|
4192
|
+
...Is,
|
|
4193
|
+
name: K,
|
|
4194
|
+
moduleId: K,
|
|
4195
|
+
capabilities: z(Ls).optional()
|
|
4196
|
+
}), zs = H([B({
|
|
4197
|
+
kind: G("value"),
|
|
4198
|
+
value: Es
|
|
4190
4199
|
}), B({
|
|
4191
|
-
kind:
|
|
4192
|
-
input:
|
|
4193
|
-
})]),
|
|
4194
|
-
...
|
|
4195
|
-
name:
|
|
4196
|
-
executor:
|
|
4200
|
+
kind: G("input"),
|
|
4201
|
+
input: K
|
|
4202
|
+
})]), Bs = H([zs, B({ kind: G("model") })]), Vs = B({
|
|
4203
|
+
...Is,
|
|
4204
|
+
name: K,
|
|
4205
|
+
executor: H([
|
|
4197
4206
|
B({
|
|
4198
|
-
kind:
|
|
4199
|
-
action:
|
|
4200
|
-
connectionId:
|
|
4207
|
+
kind: G("connector"),
|
|
4208
|
+
action: K,
|
|
4209
|
+
connectionId: K.optional()
|
|
4201
4210
|
}),
|
|
4202
4211
|
B({
|
|
4203
|
-
kind:
|
|
4204
|
-
mode:
|
|
4212
|
+
kind: G("llm"),
|
|
4213
|
+
mode: W(["chat", "json"])
|
|
4205
4214
|
}),
|
|
4206
4215
|
B({
|
|
4207
|
-
kind:
|
|
4216
|
+
kind: G("agent"),
|
|
4208
4217
|
code: L().optional(),
|
|
4209
|
-
model:
|
|
4210
|
-
prompt:
|
|
4211
|
-
system:
|
|
4218
|
+
model: K,
|
|
4219
|
+
prompt: zs,
|
|
4220
|
+
system: K,
|
|
4212
4221
|
maxRounds: I(),
|
|
4213
4222
|
tools: z(B({
|
|
4214
|
-
id:
|
|
4215
|
-
name:
|
|
4216
|
-
description:
|
|
4217
|
-
action:
|
|
4218
|
-
connectionId:
|
|
4223
|
+
id: K,
|
|
4224
|
+
name: K,
|
|
4225
|
+
description: K,
|
|
4226
|
+
action: K,
|
|
4227
|
+
connectionId: K.optional(),
|
|
4219
4228
|
approval: L(),
|
|
4220
|
-
inputs: z(q.extend({ source:
|
|
4229
|
+
inputs: z(q.extend({ source: Bs }))
|
|
4221
4230
|
})),
|
|
4222
4231
|
notification: B({
|
|
4223
|
-
taskId:
|
|
4224
|
-
messageHandle:
|
|
4225
|
-
inputs:
|
|
4232
|
+
taskId: K,
|
|
4233
|
+
messageHandle: K,
|
|
4234
|
+
inputs: U(K, zs)
|
|
4226
4235
|
}).optional()
|
|
4227
4236
|
})
|
|
4228
4237
|
])
|
|
4229
|
-
}),
|
|
4230
|
-
|
|
4238
|
+
}), Hs = H([B({
|
|
4239
|
+
kind: G("value"),
|
|
4240
|
+
value: Es.optional(),
|
|
4241
|
+
jsonSchema: Es.optional()
|
|
4242
|
+
}), B({
|
|
4243
|
+
kind: G("source"),
|
|
4244
|
+
source: Ms
|
|
4245
|
+
})]), Us = {
|
|
4246
|
+
matchMode: W(["first", "all"]),
|
|
4231
4247
|
cases: z(B({
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
expressions: z(B({
|
|
4235
|
-
|
|
4236
|
-
operator:
|
|
4248
|
+
description: K.optional(),
|
|
4249
|
+
output: K,
|
|
4250
|
+
groups: z(B({ expressions: z(B({
|
|
4251
|
+
left: Hs,
|
|
4252
|
+
operator: W([
|
|
4237
4253
|
"!=",
|
|
4238
4254
|
"<",
|
|
4239
4255
|
"<=",
|
|
@@ -4255,41 +4271,43 @@ var Es = z(V([B({
|
|
|
4255
4271
|
"notHasValue",
|
|
4256
4272
|
"startsWith"
|
|
4257
4273
|
]),
|
|
4258
|
-
|
|
4259
|
-
}))
|
|
4260
|
-
}))
|
|
4261
|
-
|
|
4262
|
-
|
|
4274
|
+
right: Hs.optional()
|
|
4275
|
+
})) }))
|
|
4276
|
+
}))
|
|
4277
|
+
}, Ws = {
|
|
4278
|
+
inputDefinitions: z(q),
|
|
4279
|
+
prompt: K
|
|
4280
|
+
}, Gs = {
|
|
4263
4281
|
bodyFields: z(q),
|
|
4264
4282
|
options: B({
|
|
4265
4283
|
allowedMethods: Ds.optional(),
|
|
4266
4284
|
allowedOrigins: Ds.optional(),
|
|
4267
4285
|
noResponseBody: L().optional(),
|
|
4268
|
-
responseData:
|
|
4269
|
-
responseHeaders:
|
|
4286
|
+
responseData: K.optional(),
|
|
4287
|
+
responseHeaders: U(K, K).optional(),
|
|
4270
4288
|
responseStatusCode: I().optional()
|
|
4271
4289
|
}).optional()
|
|
4272
|
-
},
|
|
4273
|
-
|
|
4274
|
-
definitionVersion:
|
|
4275
|
-
description:
|
|
4276
|
-
displayName:
|
|
4277
|
-
key:
|
|
4278
|
-
name:
|
|
4290
|
+
}, Ks = {
|
|
4291
|
+
configInputs: Is.inputs,
|
|
4292
|
+
definitionVersion: G(2),
|
|
4293
|
+
description: K,
|
|
4294
|
+
displayName: K,
|
|
4295
|
+
key: K,
|
|
4296
|
+
name: K,
|
|
4279
4297
|
outputs: z(Os).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
|
|
4280
|
-
provider:
|
|
4281
|
-
},
|
|
4298
|
+
provider: K
|
|
4299
|
+
}, qs = B({
|
|
4282
4300
|
body: B({
|
|
4283
4301
|
allowArray: L(),
|
|
4284
4302
|
allowEmpty: L(),
|
|
4285
|
-
formats: z(
|
|
4303
|
+
formats: z(W([
|
|
4286
4304
|
"form",
|
|
4287
4305
|
"json",
|
|
4288
4306
|
"multipart",
|
|
4289
4307
|
"text"
|
|
4290
4308
|
]))
|
|
4291
4309
|
}),
|
|
4292
|
-
methods: z(
|
|
4310
|
+
methods: z(W([
|
|
4293
4311
|
"DELETE",
|
|
4294
4312
|
"GET",
|
|
4295
4313
|
"HEAD",
|
|
@@ -4298,135 +4316,134 @@ var Es = z(V([B({
|
|
|
4298
4316
|
"PUT"
|
|
4299
4317
|
])),
|
|
4300
4318
|
successStatus: I()
|
|
4301
|
-
}),
|
|
4302
|
-
name:
|
|
4303
|
-
description:
|
|
4304
|
-
icon:
|
|
4319
|
+
}), Js = {
|
|
4320
|
+
name: K,
|
|
4321
|
+
description: K.optional(),
|
|
4322
|
+
icon: K.optional()
|
|
4305
4323
|
}, J = {
|
|
4306
4324
|
maxExecutions: I().int().positive().max(2 ** 53 - 1).optional(),
|
|
4307
|
-
inputs:
|
|
4308
|
-
name:
|
|
4309
|
-
description:
|
|
4310
|
-
icon:
|
|
4325
|
+
inputs: Fs,
|
|
4326
|
+
name: K.optional(),
|
|
4327
|
+
description: K.optional(),
|
|
4328
|
+
icon: K.optional(),
|
|
4311
4329
|
timeoutMs: I().optional()
|
|
4312
|
-
},
|
|
4330
|
+
}, Ys = H([
|
|
4313
4331
|
B({
|
|
4314
4332
|
...J,
|
|
4315
|
-
|
|
4316
|
-
|
|
4333
|
+
inputs: U(K, Ho()),
|
|
4334
|
+
kind: G("condition"),
|
|
4335
|
+
...Us
|
|
4317
4336
|
}),
|
|
4318
4337
|
B({
|
|
4319
4338
|
...J,
|
|
4320
4339
|
inputs: R().transform(() => ({})).default({}),
|
|
4321
|
-
kind:
|
|
4340
|
+
kind: G("value"),
|
|
4322
4341
|
values: z(q)
|
|
4323
4342
|
}),
|
|
4324
4343
|
B({
|
|
4325
4344
|
...J,
|
|
4326
|
-
kind:
|
|
4327
|
-
subflowId:
|
|
4345
|
+
kind: G("subflow"),
|
|
4346
|
+
subflowId: K
|
|
4328
4347
|
}),
|
|
4329
4348
|
B({
|
|
4330
4349
|
...J,
|
|
4331
|
-
kind:
|
|
4332
|
-
task:
|
|
4350
|
+
kind: G("task"),
|
|
4351
|
+
task: Rs,
|
|
4333
4352
|
additionalInputs: z(q).optional()
|
|
4334
4353
|
}),
|
|
4335
4354
|
B({
|
|
4336
4355
|
...J,
|
|
4337
|
-
kind:
|
|
4338
|
-
taskId:
|
|
4356
|
+
kind: G("task"),
|
|
4357
|
+
taskId: K,
|
|
4339
4358
|
additionalInputs: z(q).optional()
|
|
4340
4359
|
}),
|
|
4341
|
-
|
|
4360
|
+
V({
|
|
4342
4361
|
...J,
|
|
4343
|
-
kind:
|
|
4344
|
-
|
|
4345
|
-
...Hs
|
|
4362
|
+
kind: G("approval"),
|
|
4363
|
+
...Ws
|
|
4346
4364
|
}).omit({ timeoutMs: !0 }),
|
|
4347
|
-
|
|
4365
|
+
V({
|
|
4348
4366
|
...J,
|
|
4349
|
-
kind:
|
|
4350
|
-
|
|
4351
|
-
...Hs
|
|
4367
|
+
kind: G("wait"),
|
|
4368
|
+
...Ws
|
|
4352
4369
|
}).omit({ timeoutMs: !0 }),
|
|
4353
4370
|
B({
|
|
4354
|
-
...
|
|
4355
|
-
kind:
|
|
4371
|
+
...Js,
|
|
4372
|
+
kind: G("manual")
|
|
4356
4373
|
}),
|
|
4357
4374
|
B({
|
|
4358
|
-
...
|
|
4359
|
-
kind:
|
|
4360
|
-
...
|
|
4375
|
+
...Js,
|
|
4376
|
+
kind: G("webhook"),
|
|
4377
|
+
...Gs
|
|
4361
4378
|
}),
|
|
4362
4379
|
B({
|
|
4363
|
-
...
|
|
4364
|
-
kind:
|
|
4365
|
-
cronTimes:
|
|
4380
|
+
...Js,
|
|
4381
|
+
kind: G("cron"),
|
|
4382
|
+
cronTimes: Ts
|
|
4366
4383
|
}),
|
|
4367
4384
|
B({
|
|
4368
|
-
...
|
|
4369
|
-
kind:
|
|
4370
|
-
bindingId:
|
|
4371
|
-
config:
|
|
4385
|
+
...Js,
|
|
4386
|
+
kind: G("poll"),
|
|
4387
|
+
bindingId: K,
|
|
4388
|
+
config: U(K, Ns),
|
|
4372
4389
|
definition: B({
|
|
4373
|
-
...
|
|
4374
|
-
type:
|
|
4390
|
+
...Ks,
|
|
4391
|
+
type: G("poll")
|
|
4375
4392
|
}),
|
|
4376
|
-
pollTimes:
|
|
4393
|
+
pollTimes: Ts
|
|
4377
4394
|
}),
|
|
4378
4395
|
B({
|
|
4379
|
-
...
|
|
4380
|
-
kind:
|
|
4381
|
-
bindingId:
|
|
4382
|
-
config:
|
|
4396
|
+
...Js,
|
|
4397
|
+
kind: G("integration"),
|
|
4398
|
+
bindingId: K,
|
|
4399
|
+
config: U(K, Ns),
|
|
4383
4400
|
definition: B({
|
|
4384
|
-
...
|
|
4385
|
-
type:
|
|
4386
|
-
endpoint:
|
|
4401
|
+
...Ks,
|
|
4402
|
+
type: G("integration"),
|
|
4403
|
+
endpoint: qs
|
|
4387
4404
|
})
|
|
4388
4405
|
})
|
|
4389
|
-
]),
|
|
4390
|
-
kind:
|
|
4391
|
-
id:
|
|
4392
|
-
})]),
|
|
4393
|
-
source:
|
|
4394
|
-
target:
|
|
4395
|
-
sourceHandle:
|
|
4406
|
+
]), Xs = H([B({ kind: G("flow") }), B({
|
|
4407
|
+
kind: G("subflow"),
|
|
4408
|
+
id: K
|
|
4409
|
+
})]), Zs = B({
|
|
4410
|
+
source: K,
|
|
4411
|
+
target: K,
|
|
4412
|
+
sourceHandle: K.optional()
|
|
4396
4413
|
}), Y = {
|
|
4397
|
-
nodeId:
|
|
4398
|
-
target:
|
|
4399
|
-
},
|
|
4400
|
-
name:
|
|
4414
|
+
nodeId: K,
|
|
4415
|
+
target: Xs
|
|
4416
|
+
}, Qs = B({
|
|
4417
|
+
name: K,
|
|
4401
4418
|
inputs: z(q),
|
|
4402
|
-
outputs: z(Os.extend({ sources: z(
|
|
4403
|
-
}), Zs = B({
|
|
4404
|
-
nodes: H(G, qs),
|
|
4405
|
-
edges: z(Ys).default([])
|
|
4406
|
-
}), Qs = B({
|
|
4407
|
-
kind: U(["connection", "variable"]),
|
|
4408
|
-
target: G
|
|
4419
|
+
outputs: z(Os.extend({ sources: z(H([As, js])) }))
|
|
4409
4420
|
}), $s = B({
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
source: G
|
|
4421
|
+
nodes: U(K, Ys),
|
|
4422
|
+
edges: z(Zs).default([])
|
|
4413
4423
|
}), ec = B({
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
subflows: H(G, Xs.extend({ graph: Zs })),
|
|
4417
|
-
tasks: H(G, Bs)
|
|
4424
|
+
kind: W(["connection", "variable"]),
|
|
4425
|
+
target: K
|
|
4418
4426
|
}), tc = B({
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
}), nc =
|
|
4423
|
-
|
|
4424
|
-
|
|
4427
|
+
name: K,
|
|
4428
|
+
imports: Ds,
|
|
4429
|
+
source: K
|
|
4430
|
+
}), nc = B({
|
|
4431
|
+
bindings: U(K, ec),
|
|
4432
|
+
graph: $s,
|
|
4433
|
+
subflows: U(K, Qs.extend({ graph: $s })),
|
|
4434
|
+
tasks: U(K, Vs)
|
|
4435
|
+
}), rc = B({
|
|
4436
|
+
modelVersion: H([G(2), G(3)]),
|
|
4437
|
+
document: nc,
|
|
4438
|
+
modules: U(K, tc)
|
|
4439
|
+
}), ic = rc.extend({
|
|
4440
|
+
kind: G("open-flow-flow-revision"),
|
|
4441
|
+
version: G(1)
|
|
4425
4442
|
});
|
|
4426
4443
|
function X(e) {
|
|
4427
4444
|
return typeof e == "object" && e && !Array.isArray(e) ? e : {};
|
|
4428
4445
|
}
|
|
4429
|
-
function
|
|
4446
|
+
function ac(e, t) {
|
|
4430
4447
|
return Array.isArray(e) ? e.map((e) => {
|
|
4431
4448
|
let n = X(e);
|
|
4432
4449
|
return n.kind == "node" && typeof n.nodeId == "string" && t.has(n.nodeId) && n.output == "notification" ? {
|
|
@@ -4435,16 +4452,16 @@ function ic(e, t) {
|
|
|
4435
4452
|
} : e;
|
|
4436
4453
|
}) : e;
|
|
4437
4454
|
}
|
|
4438
|
-
function
|
|
4455
|
+
function oc(e, t) {
|
|
4439
4456
|
return Object.fromEntries(Object.entries(X(e)).map(([e, n]) => {
|
|
4440
4457
|
let r = X(n);
|
|
4441
4458
|
return [e, r.kind == "sources" ? {
|
|
4442
4459
|
...r,
|
|
4443
|
-
sources:
|
|
4460
|
+
sources: ac(r.sources, t)
|
|
4444
4461
|
} : n];
|
|
4445
4462
|
}));
|
|
4446
4463
|
}
|
|
4447
|
-
function
|
|
4464
|
+
function sc(e) {
|
|
4448
4465
|
let t = X(e), n = /* @__PURE__ */ new Set(), r = Object.fromEntries(Object.entries(X(t.nodes)).map(([e, t]) => {
|
|
4449
4466
|
let r = X(t);
|
|
4450
4467
|
if (r.kind == "approval") throw TypeError("Legacy Flow models do not support Approval nodes.");
|
|
@@ -4454,9 +4471,10 @@ function oc(e) {
|
|
|
4454
4471
|
else if (Array.isArray(i) && i.length == 2 && i[0] == "approve" && i[1] == "reject") a = "approval";
|
|
4455
4472
|
else throw TypeError("Legacy Wait actions are invalid.");
|
|
4456
4473
|
n.add(e);
|
|
4457
|
-
let { actions: o,
|
|
4474
|
+
let { actions: o, input: s, ...c } = r;
|
|
4458
4475
|
return [e, {
|
|
4459
|
-
...
|
|
4476
|
+
...c,
|
|
4477
|
+
inputDefinitions: [s],
|
|
4460
4478
|
kind: a
|
|
4461
4479
|
}];
|
|
4462
4480
|
}));
|
|
@@ -4464,7 +4482,7 @@ function oc(e) {
|
|
|
4464
4482
|
let i = X(t);
|
|
4465
4483
|
i.inputs != null && (r[e] = {
|
|
4466
4484
|
...i,
|
|
4467
|
-
inputs:
|
|
4485
|
+
inputs: oc(i.inputs, n)
|
|
4468
4486
|
});
|
|
4469
4487
|
}
|
|
4470
4488
|
let i = Array.isArray(t.edges) ? t.edges.map((e) => {
|
|
@@ -4483,13 +4501,13 @@ function oc(e) {
|
|
|
4483
4501
|
resolutionIds: n
|
|
4484
4502
|
};
|
|
4485
4503
|
}
|
|
4486
|
-
function
|
|
4487
|
-
let t = X(e), n =
|
|
4488
|
-
let n = X(t), r =
|
|
4504
|
+
function cc(e) {
|
|
4505
|
+
let t = X(e), n = sc(t.graph), r = Object.fromEntries(Object.entries(X(t.subflows)).map(([e, t]) => {
|
|
4506
|
+
let n = X(t), r = sc(n.graph), i = Array.isArray(n.outputs) ? n.outputs.map((e) => {
|
|
4489
4507
|
let t = X(e);
|
|
4490
4508
|
return {
|
|
4491
4509
|
...t,
|
|
4492
|
-
sources:
|
|
4510
|
+
sources: ac(t.sources, r.resolutionIds)
|
|
4493
4511
|
};
|
|
4494
4512
|
}) : n.outputs;
|
|
4495
4513
|
return [e, {
|
|
@@ -4504,13 +4522,13 @@ function sc(e) {
|
|
|
4504
4522
|
subflows: r
|
|
4505
4523
|
};
|
|
4506
4524
|
}
|
|
4507
|
-
function
|
|
4525
|
+
function lc(e, t, n) {
|
|
4508
4526
|
return Object.fromEntries(Object.entries(X(e)).flatMap(([e, r]) => {
|
|
4509
4527
|
let i = t.safeParse(n?.(r) ?? r);
|
|
4510
4528
|
return i.success ? [[e, i.data]] : [];
|
|
4511
4529
|
}));
|
|
4512
4530
|
}
|
|
4513
|
-
function
|
|
4531
|
+
function uc(e) {
|
|
4514
4532
|
let t = X(e);
|
|
4515
4533
|
if (t.kind == "webhook" && t.bodyFields == null && t.inputsDef != null) return {
|
|
4516
4534
|
...t,
|
|
@@ -4535,113 +4553,113 @@ function lc(e) {
|
|
|
4535
4553
|
}
|
|
4536
4554
|
return t;
|
|
4537
4555
|
}
|
|
4538
|
-
function
|
|
4539
|
-
let t = X(e), n =
|
|
4556
|
+
function dc(e) {
|
|
4557
|
+
let t = X(e), n = lc(t.nodes, Ys, uc), r = new Set(Object.entries(n).flatMap(([e, t]) => t.kind == "webhook" ? [e] : []));
|
|
4540
4558
|
for (let e of Object.values(n)) if ("inputs" in e) {
|
|
4541
4559
|
for (let t of Object.values(e.inputs)) if (t.kind == "sources") for (let e of t.sources) e.kind == "node" && e.output == "payload" && r.has(e.nodeId) && (e.output = "body");
|
|
4542
4560
|
}
|
|
4543
4561
|
return {
|
|
4544
4562
|
nodes: n,
|
|
4545
|
-
edges: Array.isArray(t.edges) ? t.edges.flatMap((e) =>
|
|
4563
|
+
edges: Array.isArray(t.edges) ? t.edges.flatMap((e) => Zs.safeParse(e).data ?? []) : []
|
|
4546
4564
|
};
|
|
4547
4565
|
}
|
|
4548
|
-
function
|
|
4549
|
-
|
|
4566
|
+
function fc(e) {
|
|
4567
|
+
ws(e);
|
|
4550
4568
|
let t = X(e);
|
|
4551
4569
|
if (t.kind != "open-flow-flow-revision" || t.version != 1) throw TypeError("The value is not an Open Flow Revision envelope.");
|
|
4552
4570
|
if (typeof t.modelVersion == "number" && t.modelVersion > 3) throw TypeError("The Flow model is newer than this package.");
|
|
4553
|
-
let n = X(t.modelVersion == 1 || t.modelVersion == 2 ?
|
|
4554
|
-
let n = X(t), r =
|
|
4571
|
+
let n = X(t.modelVersion == 1 || t.modelVersion == 2 ? cc(t.document) : t.document), r = dc(n.graph), i = Object.fromEntries(Object.entries(X(n.subflows)).flatMap(([e, t]) => {
|
|
4572
|
+
let n = X(t), r = Qs.extend({ graph: $s }).safeParse({
|
|
4555
4573
|
...n,
|
|
4556
|
-
graph:
|
|
4574
|
+
graph: dc(n.graph)
|
|
4557
4575
|
});
|
|
4558
4576
|
return r.success ? [[e, r.data]] : [];
|
|
4559
4577
|
}));
|
|
4560
|
-
return
|
|
4578
|
+
return mc({
|
|
4561
4579
|
modelVersion: 3,
|
|
4562
4580
|
document: {
|
|
4563
|
-
bindings:
|
|
4581
|
+
bindings: lc(n.bindings, ec),
|
|
4564
4582
|
graph: r,
|
|
4565
4583
|
subflows: i,
|
|
4566
|
-
tasks:
|
|
4584
|
+
tasks: lc(n.tasks, Vs)
|
|
4567
4585
|
},
|
|
4568
|
-
modules:
|
|
4586
|
+
modules: lc(t.modules, tc)
|
|
4569
4587
|
});
|
|
4570
4588
|
}
|
|
4571
|
-
function fc(e) {
|
|
4572
|
-
return Ts(e), ec.parse(e);
|
|
4573
|
-
}
|
|
4574
4589
|
function pc(e) {
|
|
4575
|
-
return
|
|
4590
|
+
return ws(e), nc.parse(e);
|
|
4576
4591
|
}
|
|
4577
4592
|
function mc(e) {
|
|
4578
|
-
|
|
4593
|
+
return ws(e), rc.parse(e);
|
|
4594
|
+
}
|
|
4595
|
+
function hc(e) {
|
|
4596
|
+
ws(e);
|
|
4579
4597
|
let t = X(e), n = t.modelVersion == 2 ? {
|
|
4580
4598
|
...t,
|
|
4581
|
-
document:
|
|
4582
|
-
} : e, r =
|
|
4599
|
+
document: cc(t.document)
|
|
4600
|
+
} : e, r = ic.parse(n);
|
|
4583
4601
|
return {
|
|
4584
4602
|
modelVersion: r.modelVersion,
|
|
4585
4603
|
document: r.document,
|
|
4586
4604
|
modules: r.modules
|
|
4587
4605
|
};
|
|
4588
4606
|
}
|
|
4589
|
-
var
|
|
4607
|
+
var gc = {
|
|
4590
4608
|
"binding.create": {
|
|
4591
|
-
bindingId:
|
|
4592
|
-
binding:
|
|
4609
|
+
bindingId: K,
|
|
4610
|
+
binding: ec
|
|
4593
4611
|
},
|
|
4594
|
-
"binding.delete": { bindingId:
|
|
4612
|
+
"binding.delete": { bindingId: K },
|
|
4595
4613
|
"binding.target.set": {
|
|
4596
|
-
bindingId:
|
|
4597
|
-
before:
|
|
4598
|
-
value:
|
|
4614
|
+
bindingId: K,
|
|
4615
|
+
before: K,
|
|
4616
|
+
value: K
|
|
4599
4617
|
},
|
|
4600
4618
|
"graph.edge.connect": {
|
|
4601
|
-
target:
|
|
4602
|
-
edge:
|
|
4619
|
+
target: Xs,
|
|
4620
|
+
edge: Zs
|
|
4603
4621
|
},
|
|
4604
4622
|
"graph.edge.disconnect": {
|
|
4605
|
-
target:
|
|
4606
|
-
edge:
|
|
4623
|
+
target: Xs,
|
|
4624
|
+
edge: Zs
|
|
4607
4625
|
},
|
|
4608
4626
|
"graph.node.create": {
|
|
4609
4627
|
...Y,
|
|
4610
|
-
node:
|
|
4628
|
+
node: Ys
|
|
4611
4629
|
},
|
|
4612
4630
|
"graph.node.delete": Y,
|
|
4613
|
-
"graph.node.field.set":
|
|
4631
|
+
"graph.node.field.set": H([
|
|
4614
4632
|
B({
|
|
4615
4633
|
...Y,
|
|
4616
|
-
kind:
|
|
4617
|
-
field:
|
|
4634
|
+
kind: G("graph.node.field.set"),
|
|
4635
|
+
field: W([
|
|
4618
4636
|
"description",
|
|
4619
4637
|
"icon",
|
|
4620
4638
|
"name"
|
|
4621
4639
|
]),
|
|
4622
|
-
before:
|
|
4623
|
-
value:
|
|
4640
|
+
before: K.optional(),
|
|
4641
|
+
value: K.optional()
|
|
4624
4642
|
}),
|
|
4625
4643
|
B({
|
|
4626
4644
|
...Y,
|
|
4627
|
-
kind:
|
|
4628
|
-
field:
|
|
4645
|
+
kind: G("graph.node.field.set"),
|
|
4646
|
+
field: G("maxExecutions"),
|
|
4629
4647
|
before: I().int().positive().max(2 ** 53 - 1).optional(),
|
|
4630
4648
|
value: I().int().positive().max(2 ** 53 - 1).optional()
|
|
4631
4649
|
}),
|
|
4632
4650
|
B({
|
|
4633
4651
|
...Y,
|
|
4634
|
-
kind:
|
|
4635
|
-
field:
|
|
4652
|
+
kind: G("graph.node.field.set"),
|
|
4653
|
+
field: G("timeoutMs"),
|
|
4636
4654
|
before: I().optional(),
|
|
4637
4655
|
value: I().optional()
|
|
4638
4656
|
})
|
|
4639
4657
|
]),
|
|
4640
4658
|
"graph.node.input.set": {
|
|
4641
4659
|
...Y,
|
|
4642
|
-
handle:
|
|
4643
|
-
before:
|
|
4644
|
-
value:
|
|
4660
|
+
handle: K,
|
|
4661
|
+
before: Ps.optional(),
|
|
4662
|
+
value: Ps.optional()
|
|
4645
4663
|
},
|
|
4646
4664
|
"graph.node.additional-inputs.set": {
|
|
4647
4665
|
...Y,
|
|
@@ -4650,8 +4668,8 @@ var hc = {
|
|
|
4650
4668
|
},
|
|
4651
4669
|
"graph.node.condition.set": {
|
|
4652
4670
|
...Y,
|
|
4653
|
-
before: B(
|
|
4654
|
-
value: B(
|
|
4671
|
+
before: B(Us),
|
|
4672
|
+
value: B(Us)
|
|
4655
4673
|
},
|
|
4656
4674
|
"graph.node.values.set": {
|
|
4657
4675
|
...Y,
|
|
@@ -4660,106 +4678,106 @@ var hc = {
|
|
|
4660
4678
|
},
|
|
4661
4679
|
"graph.node.resolution.set": {
|
|
4662
4680
|
...Y,
|
|
4663
|
-
target: B({ kind:
|
|
4664
|
-
before: B(
|
|
4665
|
-
value: B(
|
|
4681
|
+
target: B({ kind: G("flow") }),
|
|
4682
|
+
before: B(Ws),
|
|
4683
|
+
value: B(Ws)
|
|
4666
4684
|
},
|
|
4667
4685
|
"graph.node.webhook.set": {
|
|
4668
4686
|
...Y,
|
|
4669
|
-
target: B({ kind:
|
|
4670
|
-
before: B(
|
|
4671
|
-
value: B(
|
|
4687
|
+
target: B({ kind: G("flow") }),
|
|
4688
|
+
before: B(Gs),
|
|
4689
|
+
value: B(Gs)
|
|
4672
4690
|
},
|
|
4673
4691
|
"graph.node.task.ports.set": {
|
|
4674
4692
|
...Y,
|
|
4675
|
-
before: B(
|
|
4676
|
-
value: B(
|
|
4693
|
+
before: B(Is),
|
|
4694
|
+
value: B(Is)
|
|
4677
4695
|
},
|
|
4678
4696
|
"graph.node.task.name.set": {
|
|
4679
4697
|
...Y,
|
|
4680
|
-
before:
|
|
4681
|
-
value:
|
|
4698
|
+
before: K,
|
|
4699
|
+
value: K
|
|
4682
4700
|
},
|
|
4683
4701
|
"graph.node.task.capabilities.set": {
|
|
4684
4702
|
...Y,
|
|
4685
|
-
before: z(
|
|
4686
|
-
value: z(
|
|
4703
|
+
before: z(Ls).optional(),
|
|
4704
|
+
value: z(Ls).optional()
|
|
4687
4705
|
},
|
|
4688
4706
|
"graph.trigger.config.set": {
|
|
4689
|
-
nodeId:
|
|
4690
|
-
name:
|
|
4691
|
-
before:
|
|
4692
|
-
value:
|
|
4707
|
+
nodeId: K,
|
|
4708
|
+
name: K,
|
|
4709
|
+
before: Ns.optional(),
|
|
4710
|
+
value: Ns.optional()
|
|
4693
4711
|
},
|
|
4694
4712
|
"graph.trigger.schedule.set": {
|
|
4695
|
-
nodeId:
|
|
4696
|
-
before:
|
|
4697
|
-
value:
|
|
4713
|
+
nodeId: K,
|
|
4714
|
+
before: Ts,
|
|
4715
|
+
value: Ts
|
|
4698
4716
|
},
|
|
4699
4717
|
"module.create": {
|
|
4700
|
-
moduleId:
|
|
4701
|
-
module:
|
|
4718
|
+
moduleId: K,
|
|
4719
|
+
module: tc
|
|
4702
4720
|
},
|
|
4703
|
-
"module.delete": { moduleId:
|
|
4721
|
+
"module.delete": { moduleId: K },
|
|
4704
4722
|
"module.rename": {
|
|
4705
|
-
moduleId:
|
|
4706
|
-
before:
|
|
4707
|
-
name:
|
|
4723
|
+
moduleId: K,
|
|
4724
|
+
before: K,
|
|
4725
|
+
name: K
|
|
4708
4726
|
},
|
|
4709
4727
|
"module.source.replace": {
|
|
4710
|
-
moduleId:
|
|
4728
|
+
moduleId: K,
|
|
4711
4729
|
beforeImports: Ds,
|
|
4712
|
-
beforeSource:
|
|
4730
|
+
beforeSource: K,
|
|
4713
4731
|
imports: Ds,
|
|
4714
|
-
source:
|
|
4732
|
+
source: K
|
|
4715
4733
|
},
|
|
4716
4734
|
"subflow.create": {
|
|
4717
|
-
subflowId:
|
|
4718
|
-
subflow:
|
|
4735
|
+
subflowId: K,
|
|
4736
|
+
subflow: Qs.extend({ graph: $s })
|
|
4719
4737
|
},
|
|
4720
4738
|
"subflow.definition.set": {
|
|
4721
|
-
subflowId:
|
|
4722
|
-
before:
|
|
4723
|
-
definition:
|
|
4739
|
+
subflowId: K,
|
|
4740
|
+
before: Qs,
|
|
4741
|
+
definition: Qs
|
|
4724
4742
|
},
|
|
4725
|
-
"subflow.delete": { subflowId:
|
|
4743
|
+
"subflow.delete": { subflowId: K },
|
|
4726
4744
|
"task.create": {
|
|
4727
|
-
taskId:
|
|
4728
|
-
task:
|
|
4745
|
+
taskId: K,
|
|
4746
|
+
task: Vs
|
|
4729
4747
|
},
|
|
4730
|
-
"task.delete": { taskId:
|
|
4748
|
+
"task.delete": { taskId: K },
|
|
4731
4749
|
"task.connector.connection.set": {
|
|
4732
|
-
taskId:
|
|
4733
|
-
before:
|
|
4734
|
-
value:
|
|
4750
|
+
taskId: K,
|
|
4751
|
+
before: K.optional(),
|
|
4752
|
+
value: K.optional()
|
|
4735
4753
|
},
|
|
4736
4754
|
"task.agent.set": {
|
|
4737
|
-
taskId:
|
|
4738
|
-
before:
|
|
4739
|
-
value:
|
|
4755
|
+
taskId: K,
|
|
4756
|
+
before: Vs,
|
|
4757
|
+
value: Vs
|
|
4740
4758
|
},
|
|
4741
4759
|
"task.llm.mode.set": {
|
|
4742
|
-
taskId:
|
|
4743
|
-
before:
|
|
4744
|
-
value:
|
|
4760
|
+
taskId: K,
|
|
4761
|
+
before: W(["chat", "json"]),
|
|
4762
|
+
value: W(["chat", "json"])
|
|
4745
4763
|
},
|
|
4746
4764
|
"task.name.set": {
|
|
4747
|
-
taskId:
|
|
4748
|
-
before:
|
|
4749
|
-
value:
|
|
4765
|
+
taskId: K,
|
|
4766
|
+
before: K,
|
|
4767
|
+
value: K
|
|
4750
4768
|
}
|
|
4751
4769
|
};
|
|
4752
|
-
z(
|
|
4753
|
-
kind:
|
|
4770
|
+
z(H([...new Map(Object.entries(gc).map(([e, t]) => [e, t instanceof N ? t : B({
|
|
4771
|
+
kind: G(e),
|
|
4754
4772
|
...t
|
|
4755
4773
|
})])).values()])).min(1);
|
|
4756
4774
|
//#endregion
|
|
4757
4775
|
//#region src/flow/common/change.ts
|
|
4758
|
-
function
|
|
4776
|
+
function _c(e) {
|
|
4759
4777
|
return e.trim().normalize("NFC");
|
|
4760
4778
|
}
|
|
4761
|
-
function
|
|
4762
|
-
let n =
|
|
4779
|
+
function vc(e, t) {
|
|
4780
|
+
let n = _c(e), r = new Set([...t].map(_c));
|
|
4763
4781
|
if (!r.has(n)) return n;
|
|
4764
4782
|
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;
|
|
4765
4783
|
for (; r.has(`${s} (${c})`);) c += 1;
|
|
@@ -4767,24 +4785,24 @@ function _c(e, t) {
|
|
|
4767
4785
|
}
|
|
4768
4786
|
//#endregion
|
|
4769
4787
|
//#region src/flow/common/encoding.ts
|
|
4770
|
-
var
|
|
4788
|
+
var yc = new TextEncoder();
|
|
4771
4789
|
function Z(e) {
|
|
4772
4790
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
4773
4791
|
if (Array.isArray(e)) return `[${e.map(Z).join(",")}]`;
|
|
4774
4792
|
let t = e;
|
|
4775
4793
|
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${Z(t[e])}`).join(",")}}`;
|
|
4776
4794
|
}
|
|
4777
|
-
function
|
|
4778
|
-
return
|
|
4795
|
+
function bc(e) {
|
|
4796
|
+
return yc.encode(Z(e));
|
|
4779
4797
|
}
|
|
4780
|
-
async function
|
|
4798
|
+
async function xc(e) {
|
|
4781
4799
|
let t = new Uint8Array(e.byteLength);
|
|
4782
4800
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
4783
4801
|
}
|
|
4784
4802
|
function Q(e) {
|
|
4785
4803
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
4786
4804
|
}
|
|
4787
|
-
function
|
|
4805
|
+
function Sc(e) {
|
|
4788
4806
|
return "handle" in e ? {
|
|
4789
4807
|
...e.description == null ? {} : { description: e.description },
|
|
4790
4808
|
handle: e.handle,
|
|
@@ -4797,10 +4815,11 @@ function xc(e) {
|
|
|
4797
4815
|
};
|
|
4798
4816
|
}
|
|
4799
4817
|
function $(e) {
|
|
4800
|
-
return e.map(
|
|
4818
|
+
return e.map(Sc);
|
|
4801
4819
|
}
|
|
4802
|
-
function
|
|
4820
|
+
function Cc(e) {
|
|
4803
4821
|
switch (e.kind) {
|
|
4822
|
+
case "unset": return { kind: "unset" };
|
|
4804
4823
|
case "sources": return {
|
|
4805
4824
|
kind: e.kind,
|
|
4806
4825
|
sources: e.sources.map((e) => ({ ...e }))
|
|
@@ -4811,10 +4830,10 @@ function Sc(e) {
|
|
|
4811
4830
|
};
|
|
4812
4831
|
}
|
|
4813
4832
|
}
|
|
4814
|
-
function Cc(e) {
|
|
4815
|
-
return Object.fromEntries(Q(e).map(([e, t]) => [e, Sc(t)]));
|
|
4816
|
-
}
|
|
4817
4833
|
function wc(e) {
|
|
4834
|
+
return Object.fromEntries(Q(e).map(([e, t]) => [e, Cc(t)]));
|
|
4835
|
+
}
|
|
4836
|
+
function Tc(e) {
|
|
4818
4837
|
return e.map((e) => ({
|
|
4819
4838
|
...e.description == null ? {} : { description: e.description },
|
|
4820
4839
|
handle: e.handle,
|
|
@@ -4823,12 +4842,22 @@ function wc(e) {
|
|
|
4823
4842
|
sources: e.sources.map((e) => ({ ...e }))
|
|
4824
4843
|
}));
|
|
4825
4844
|
}
|
|
4826
|
-
function
|
|
4827
|
-
|
|
4845
|
+
function Ec(e) {
|
|
4846
|
+
return e.kind === "source" ? {
|
|
4847
|
+
kind: "source",
|
|
4848
|
+
source: { ...e.source }
|
|
4849
|
+
} : {
|
|
4850
|
+
kind: "value",
|
|
4851
|
+
...e.value === void 0 ? {} : { value: e.value },
|
|
4852
|
+
...e.jsonSchema === void 0 ? {} : { jsonSchema: e.jsonSchema }
|
|
4853
|
+
};
|
|
4854
|
+
}
|
|
4855
|
+
function Dc(e) {
|
|
4856
|
+
if (!("inputs" in e)) return Vc(e);
|
|
4828
4857
|
let t = {
|
|
4829
4858
|
...e.description == null ? {} : { description: e.description },
|
|
4830
4859
|
...e.icon == null ? {} : { icon: e.icon },
|
|
4831
|
-
inputs:
|
|
4860
|
+
inputs: wc(e.inputs),
|
|
4832
4861
|
...e.name == null ? {} : { name: e.name },
|
|
4833
4862
|
...e.maxExecutions == null ? {} : { maxExecutions: e.maxExecutions },
|
|
4834
4863
|
...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
|
|
@@ -4837,19 +4866,15 @@ function Tc(e) {
|
|
|
4837
4866
|
case "condition": return {
|
|
4838
4867
|
...t,
|
|
4839
4868
|
cases: e.cases.map((e) => ({
|
|
4840
|
-
|
|
4841
|
-
input: e.input,
|
|
4842
|
-
operator: e.operator,
|
|
4843
|
-
...Object.hasOwn(e, "value") ? { value: e.value } : {}
|
|
4844
|
-
})),
|
|
4869
|
+
...e.description == null ? {} : { description: e.description },
|
|
4845
4870
|
output: e.output,
|
|
4846
|
-
|
|
4871
|
+
groups: e.groups.map((e) => ({ expressions: e.expressions.map((e) => ({
|
|
4872
|
+
left: Ec(e.left),
|
|
4873
|
+
operator: e.operator,
|
|
4874
|
+
...e.right == null ? {} : { right: Ec(e.right) }
|
|
4875
|
+
})) }))
|
|
4847
4876
|
})),
|
|
4848
|
-
|
|
4849
|
-
input: {
|
|
4850
|
-
handle: e.input.handle,
|
|
4851
|
-
...xc(e.input)
|
|
4852
|
-
},
|
|
4877
|
+
matchMode: e.matchMode,
|
|
4853
4878
|
kind: e.kind
|
|
4854
4879
|
};
|
|
4855
4880
|
case "subflow": return {
|
|
@@ -4863,7 +4888,7 @@ function Tc(e) {
|
|
|
4863
4888
|
taskId: e.taskId
|
|
4864
4889
|
}) : Object.assign({}, t, {
|
|
4865
4890
|
kind: e.kind,
|
|
4866
|
-
task:
|
|
4891
|
+
task: Lc(e.task)
|
|
4867
4892
|
});
|
|
4868
4893
|
return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
|
|
4869
4894
|
}
|
|
@@ -4875,46 +4900,43 @@ function Tc(e) {
|
|
|
4875
4900
|
case "approval":
|
|
4876
4901
|
case "wait": return {
|
|
4877
4902
|
...t,
|
|
4878
|
-
|
|
4879
|
-
handle: e.input.handle,
|
|
4880
|
-
...xc(e.input)
|
|
4881
|
-
},
|
|
4903
|
+
inputDefinitions: $(e.inputDefinitions),
|
|
4882
4904
|
kind: e.kind,
|
|
4883
4905
|
prompt: e.prompt
|
|
4884
4906
|
};
|
|
4885
4907
|
}
|
|
4886
4908
|
}
|
|
4887
|
-
function
|
|
4909
|
+
function Oc(e) {
|
|
4888
4910
|
return {
|
|
4889
4911
|
edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
|
|
4890
4912
|
let n = Z(e), r = Z(t);
|
|
4891
4913
|
return n < r ? -1 : +(n > r);
|
|
4892
4914
|
}),
|
|
4893
|
-
nodes: Object.fromEntries(Q(e.nodes).map(([e, t]) => [e,
|
|
4915
|
+
nodes: Object.fromEntries(Q(e.nodes).map(([e, t]) => [e, Dc(t)]))
|
|
4894
4916
|
};
|
|
4895
4917
|
}
|
|
4896
|
-
function
|
|
4918
|
+
function kc(e) {
|
|
4897
4919
|
return new Set(Object.entries(e.nodes).flatMap(([e, t]) => t.kind == "approval" || t.kind == "wait" ? [e] : []));
|
|
4898
4920
|
}
|
|
4899
|
-
function
|
|
4921
|
+
function Ac(e, t) {
|
|
4900
4922
|
let n = typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
|
|
4901
4923
|
return n?.kind == "node" && typeof n.nodeId == "string" && t.has(n.nodeId) && n.output == "pending" ? {
|
|
4902
4924
|
...n,
|
|
4903
4925
|
output: "notification"
|
|
4904
4926
|
} : e;
|
|
4905
4927
|
}
|
|
4906
|
-
function
|
|
4907
|
-
let n =
|
|
4928
|
+
function jc(e, t) {
|
|
4929
|
+
let n = wc(e);
|
|
4908
4930
|
return Object.fromEntries(Q(n).map(([e, n]) => {
|
|
4909
4931
|
let r = typeof n == "object" && n && !Array.isArray(n) ? n : void 0;
|
|
4910
4932
|
return r?.kind != "sources" || !Array.isArray(r.sources) ? [e, n] : [e, {
|
|
4911
4933
|
...r,
|
|
4912
|
-
sources: r.sources.map((e) =>
|
|
4934
|
+
sources: r.sources.map((e) => Ac(e, t))
|
|
4913
4935
|
}];
|
|
4914
4936
|
}));
|
|
4915
4937
|
}
|
|
4916
|
-
function
|
|
4917
|
-
let t =
|
|
4938
|
+
function Mc(e) {
|
|
4939
|
+
let t = kc(e);
|
|
4918
4940
|
return {
|
|
4919
4941
|
edges: e.edges.map((e) => t.has(e.source) && e.sourceHandle == "pending" ? {
|
|
4920
4942
|
...e,
|
|
@@ -4924,36 +4946,42 @@ function Ac(e) {
|
|
|
4924
4946
|
return n < r ? -1 : +(n > r);
|
|
4925
4947
|
}),
|
|
4926
4948
|
nodes: Object.fromEntries(Q(e.nodes).map(([e, n]) => {
|
|
4927
|
-
let r =
|
|
4928
|
-
|
|
4929
|
-
...r,
|
|
4930
|
-
inputs: kc(n.inputs, t)
|
|
4931
|
-
} : r] : [e, {
|
|
4949
|
+
let r = Dc(n);
|
|
4950
|
+
if (n.kind != "approval" && n.kind != "wait") return [e, "inputs" in n ? {
|
|
4932
4951
|
...r,
|
|
4952
|
+
inputs: jc(n.inputs, t)
|
|
4953
|
+
} : r];
|
|
4954
|
+
let { inputDefinitions: i, ...a } = r, o = n.inputDefinitions[0];
|
|
4955
|
+
return [e, {
|
|
4956
|
+
...a,
|
|
4933
4957
|
actions: n.kind == "wait" ? ["continue"] : ["approve", "reject"],
|
|
4934
|
-
|
|
4958
|
+
input: {
|
|
4959
|
+
handle: o.handle,
|
|
4960
|
+
...Sc(o)
|
|
4961
|
+
},
|
|
4962
|
+
inputs: jc(n.inputs, t),
|
|
4935
4963
|
kind: "wait"
|
|
4936
4964
|
}];
|
|
4937
4965
|
}))
|
|
4938
4966
|
};
|
|
4939
4967
|
}
|
|
4940
|
-
function
|
|
4941
|
-
let n =
|
|
4968
|
+
function Nc(e, t) {
|
|
4969
|
+
let n = kc(t);
|
|
4942
4970
|
return e.map((e) => ({
|
|
4943
4971
|
...e.description == null ? {} : { description: e.description },
|
|
4944
4972
|
handle: e.handle,
|
|
4945
4973
|
jsonSchema: e.jsonSchema,
|
|
4946
4974
|
nullable: e.nullable,
|
|
4947
|
-
sources: e.sources.map((e) =>
|
|
4975
|
+
sources: e.sources.map((e) => Ac(e, n))
|
|
4948
4976
|
}));
|
|
4949
4977
|
}
|
|
4950
|
-
function
|
|
4951
|
-
return e.modelVersion == 2 ?
|
|
4978
|
+
function Pc(e, t) {
|
|
4979
|
+
return e.modelVersion == 2 ? Mc(t) : Oc(t);
|
|
4952
4980
|
}
|
|
4953
|
-
function
|
|
4954
|
-
return e.modelVersion == 2 ?
|
|
4981
|
+
function Fc(e, t, n) {
|
|
4982
|
+
return e.modelVersion == 2 ? Nc(t, n) : Tc(t);
|
|
4955
4983
|
}
|
|
4956
|
-
function
|
|
4984
|
+
function Ic(e) {
|
|
4957
4985
|
return {
|
|
4958
4986
|
executor: e.executor,
|
|
4959
4987
|
inputs: $(e.inputs),
|
|
@@ -4961,7 +4989,7 @@ function Pc(e) {
|
|
|
4961
4989
|
outputs: $(e.outputs)
|
|
4962
4990
|
};
|
|
4963
4991
|
}
|
|
4964
|
-
function
|
|
4992
|
+
function Lc(e) {
|
|
4965
4993
|
return {
|
|
4966
4994
|
...e.capabilities == null ? {} : { capabilities: e.capabilities },
|
|
4967
4995
|
inputs: $(e.inputs),
|
|
@@ -4970,9 +4998,9 @@ function Fc(e) {
|
|
|
4970
4998
|
outputs: $(e.outputs)
|
|
4971
4999
|
};
|
|
4972
5000
|
}
|
|
4973
|
-
function
|
|
5001
|
+
function Rc(e) {
|
|
4974
5002
|
return {
|
|
4975
|
-
|
|
5003
|
+
configInputs: $(e.configInputs),
|
|
4976
5004
|
definitionVersion: e.definitionVersion,
|
|
4977
5005
|
description: e.description,
|
|
4978
5006
|
displayName: e.displayName,
|
|
@@ -4992,7 +5020,7 @@ function Ic(e) {
|
|
|
4992
5020
|
type: e.type
|
|
4993
5021
|
};
|
|
4994
5022
|
}
|
|
4995
|
-
function
|
|
5023
|
+
function zc(e) {
|
|
4996
5024
|
return {
|
|
4997
5025
|
...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
|
|
4998
5026
|
...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
|
|
@@ -5002,7 +5030,7 @@ function Lc(e) {
|
|
|
5002
5030
|
...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
|
|
5003
5031
|
};
|
|
5004
5032
|
}
|
|
5005
|
-
function
|
|
5033
|
+
function Bc(e) {
|
|
5006
5034
|
switch (e.type) {
|
|
5007
5035
|
case "cron": return {
|
|
5008
5036
|
expression: e.expression,
|
|
@@ -5016,7 +5044,7 @@ function Rc(e) {
|
|
|
5016
5044
|
};
|
|
5017
5045
|
}
|
|
5018
5046
|
}
|
|
5019
|
-
function
|
|
5047
|
+
function Vc(e) {
|
|
5020
5048
|
let t = (t) => ({
|
|
5021
5049
|
...e.description == null ? {} : { description: e.description },
|
|
5022
5050
|
...e.icon == null ? {} : { icon: e.icon },
|
|
@@ -5029,178 +5057,178 @@ function zc(e) {
|
|
|
5029
5057
|
...t(e.kind),
|
|
5030
5058
|
bodyFields: e.bodyFields.map((e) => ({
|
|
5031
5059
|
handle: e.handle,
|
|
5032
|
-
...
|
|
5060
|
+
...Sc(e)
|
|
5033
5061
|
})),
|
|
5034
|
-
...e.options == null ? {} : { options:
|
|
5062
|
+
...e.options == null ? {} : { options: zc(e.options) }
|
|
5035
5063
|
};
|
|
5036
5064
|
case "cron": return {
|
|
5037
5065
|
...t(e.kind),
|
|
5038
|
-
cronTimes: e.cronTimes.map(
|
|
5066
|
+
cronTimes: e.cronTimes.map(Bc)
|
|
5039
5067
|
};
|
|
5040
5068
|
case "poll": return {
|
|
5041
5069
|
...t(e.kind),
|
|
5042
5070
|
bindingId: e.bindingId,
|
|
5043
5071
|
config: e.config,
|
|
5044
|
-
definition:
|
|
5045
|
-
pollTimes: e.pollTimes.map(
|
|
5072
|
+
definition: Rc(e.definition),
|
|
5073
|
+
pollTimes: e.pollTimes.map(Bc)
|
|
5046
5074
|
};
|
|
5047
5075
|
case "integration": return {
|
|
5048
5076
|
...t(e.kind),
|
|
5049
5077
|
bindingId: e.bindingId,
|
|
5050
5078
|
config: e.config,
|
|
5051
|
-
definition:
|
|
5079
|
+
definition: Rc(e.definition)
|
|
5052
5080
|
};
|
|
5053
5081
|
}
|
|
5054
5082
|
}
|
|
5055
|
-
function
|
|
5083
|
+
function Hc(e) {
|
|
5056
5084
|
let { name: t, description: n, icon: r, ...i } = e;
|
|
5057
5085
|
return Z(i);
|
|
5058
5086
|
}
|
|
5059
|
-
function
|
|
5087
|
+
function Uc(e) {
|
|
5060
5088
|
return {
|
|
5061
5089
|
bindings: Object.fromEntries(Q(e.bindings)),
|
|
5062
|
-
graph:
|
|
5090
|
+
graph: Oc(e.graph),
|
|
5063
5091
|
subflows: Object.fromEntries(Q(e.subflows).map(([e, t]) => [e, {
|
|
5064
|
-
graph:
|
|
5092
|
+
graph: Oc(t.graph),
|
|
5065
5093
|
inputs: $(t.inputs),
|
|
5066
5094
|
name: t.name,
|
|
5067
|
-
outputs:
|
|
5095
|
+
outputs: Tc(t.outputs)
|
|
5068
5096
|
}])),
|
|
5069
|
-
tasks: Object.fromEntries(Q(e.tasks).map(([e, t]) => [e,
|
|
5097
|
+
tasks: Object.fromEntries(Q(e.tasks).map(([e, t]) => [e, Ic(t)]))
|
|
5070
5098
|
};
|
|
5071
5099
|
}
|
|
5072
|
-
function
|
|
5073
|
-
if (e.modelVersion != 2) return
|
|
5100
|
+
function Wc(e) {
|
|
5101
|
+
if (e.modelVersion != 2) return Uc(e.document);
|
|
5074
5102
|
let { document: t } = e;
|
|
5075
5103
|
return {
|
|
5076
5104
|
bindings: Object.fromEntries(Q(t.bindings)),
|
|
5077
|
-
graph:
|
|
5105
|
+
graph: Mc(t.graph),
|
|
5078
5106
|
subflows: Object.fromEntries(Q(t.subflows).map(([e, t]) => [e, {
|
|
5079
|
-
graph:
|
|
5107
|
+
graph: Mc(t.graph),
|
|
5080
5108
|
inputs: $(t.inputs),
|
|
5081
5109
|
name: t.name,
|
|
5082
|
-
outputs:
|
|
5110
|
+
outputs: Nc(t.outputs, t.graph)
|
|
5083
5111
|
}])),
|
|
5084
|
-
tasks: Object.fromEntries(Q(t.tasks).map(([e, t]) => [e,
|
|
5112
|
+
tasks: Object.fromEntries(Q(t.tasks).map(([e, t]) => [e, Ic(t)]))
|
|
5085
5113
|
};
|
|
5086
5114
|
}
|
|
5087
|
-
function
|
|
5115
|
+
function Gc(e) {
|
|
5088
5116
|
return {
|
|
5089
5117
|
imports: e.imports.toSorted(),
|
|
5090
5118
|
name: e.name,
|
|
5091
5119
|
source: e.source
|
|
5092
5120
|
};
|
|
5093
5121
|
}
|
|
5094
|
-
function
|
|
5122
|
+
function Kc(e) {
|
|
5095
5123
|
return {
|
|
5096
|
-
document:
|
|
5124
|
+
document: Wc(e),
|
|
5097
5125
|
kind: "open-flow-flow-revision",
|
|
5098
5126
|
modelVersion: e.modelVersion,
|
|
5099
|
-
modules: Object.fromEntries(Q(e.modules).map(([e, t]) => [e,
|
|
5127
|
+
modules: Object.fromEntries(Q(e.modules).map(([e, t]) => [e, Gc(t)])),
|
|
5100
5128
|
version: 1
|
|
5101
5129
|
};
|
|
5102
5130
|
}
|
|
5103
|
-
function
|
|
5104
|
-
return
|
|
5131
|
+
function qc(e) {
|
|
5132
|
+
return bc(Kc(e));
|
|
5105
5133
|
}
|
|
5106
|
-
function
|
|
5107
|
-
return
|
|
5134
|
+
function Jc(e) {
|
|
5135
|
+
return hc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
|
|
5108
5136
|
}
|
|
5109
|
-
function
|
|
5137
|
+
function Yc(e) {
|
|
5110
5138
|
return JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e));
|
|
5111
5139
|
}
|
|
5112
|
-
function
|
|
5140
|
+
function Xc(e) {
|
|
5113
5141
|
let t;
|
|
5114
5142
|
try {
|
|
5115
|
-
t =
|
|
5143
|
+
t = Yc(e), hc(t);
|
|
5116
5144
|
return;
|
|
5117
5145
|
} catch {}
|
|
5118
5146
|
try {
|
|
5119
|
-
|
|
5147
|
+
fc(t);
|
|
5120
5148
|
} catch {
|
|
5121
5149
|
return;
|
|
5122
5150
|
}
|
|
5123
5151
|
let n = t;
|
|
5124
5152
|
return typeof n.modelVersion == "number" && n.modelVersion < 3 ? "upgrade" : "repair";
|
|
5125
5153
|
}
|
|
5126
|
-
function
|
|
5127
|
-
return
|
|
5154
|
+
function Zc(e) {
|
|
5155
|
+
return fc(Yc(e));
|
|
5128
5156
|
}
|
|
5129
|
-
var
|
|
5157
|
+
var Qc = U(P(), R()), $c = B({
|
|
5130
5158
|
jsonSchema: R(),
|
|
5131
5159
|
nullable: L(),
|
|
5132
5160
|
value: R().optional(),
|
|
5133
5161
|
description: P().optional()
|
|
5134
|
-
}).strict(),
|
|
5135
|
-
kind:
|
|
5162
|
+
}).strict(), el = U(P(), $c), tl = H([B({
|
|
5163
|
+
kind: G("value"),
|
|
5136
5164
|
value: R()
|
|
5137
5165
|
}).strict(), B({
|
|
5138
|
-
kind:
|
|
5166
|
+
kind: G("sources"),
|
|
5139
5167
|
sources: z(B({
|
|
5140
|
-
kind:
|
|
5168
|
+
kind: G("node"),
|
|
5141
5169
|
nodeId: P(),
|
|
5142
5170
|
output: P()
|
|
5143
5171
|
}).strict())
|
|
5144
|
-
}).strict()]),
|
|
5172
|
+
}).strict()]), nl = {
|
|
5145
5173
|
name: P().optional(),
|
|
5146
5174
|
description: P().optional(),
|
|
5147
5175
|
icon: P().optional()
|
|
5148
|
-
},
|
|
5176
|
+
}, rl = H([
|
|
5149
5177
|
B({
|
|
5150
|
-
...
|
|
5151
|
-
kind:
|
|
5178
|
+
...nl,
|
|
5179
|
+
kind: G("cron"),
|
|
5152
5180
|
cronTimes: z(R())
|
|
5153
5181
|
}).strict(),
|
|
5154
5182
|
B({
|
|
5155
|
-
...
|
|
5156
|
-
kind:
|
|
5183
|
+
...nl,
|
|
5184
|
+
kind: G("manual")
|
|
5157
5185
|
}).strict(),
|
|
5158
5186
|
B({
|
|
5159
|
-
...
|
|
5160
|
-
kind:
|
|
5161
|
-
concurrency:
|
|
5162
|
-
inputs:
|
|
5187
|
+
...nl,
|
|
5188
|
+
kind: G("task"),
|
|
5189
|
+
concurrency: G(1).optional(),
|
|
5190
|
+
inputs: U(P(), tl),
|
|
5163
5191
|
task: B({
|
|
5164
5192
|
name: P(),
|
|
5165
5193
|
moduleId: P(),
|
|
5166
|
-
inputs:
|
|
5167
|
-
outputs:
|
|
5194
|
+
inputs: el,
|
|
5195
|
+
outputs: U(P(), $c.omit({ value: !0 }))
|
|
5168
5196
|
}).strict()
|
|
5169
5197
|
}).strict()
|
|
5170
|
-
]),
|
|
5198
|
+
]), il = B({
|
|
5171
5199
|
name: P(),
|
|
5172
|
-
graph: B({ nodes:
|
|
5173
|
-
}).strict(),
|
|
5174
|
-
kind:
|
|
5175
|
-
version:
|
|
5176
|
-
modelVersion:
|
|
5177
|
-
modules:
|
|
5200
|
+
graph: B({ nodes: U(P(), rl) }).strict()
|
|
5201
|
+
}).strict(), al = B({
|
|
5202
|
+
kind: G("open-flow-project-revision"),
|
|
5203
|
+
version: G(1),
|
|
5204
|
+
modelVersion: H([G(1), G(2)]),
|
|
5205
|
+
modules: U(P(), B({
|
|
5178
5206
|
name: P(),
|
|
5179
5207
|
source: P(),
|
|
5180
5208
|
imports: z(P())
|
|
5181
5209
|
}).strict()),
|
|
5182
5210
|
document: B({
|
|
5183
|
-
bindings:
|
|
5184
|
-
flows:
|
|
5185
|
-
subflows:
|
|
5186
|
-
tasks:
|
|
5211
|
+
bindings: Qc,
|
|
5212
|
+
flows: Qc,
|
|
5213
|
+
subflows: Qc,
|
|
5214
|
+
tasks: Qc
|
|
5187
5215
|
}).strict()
|
|
5188
5216
|
}).strict();
|
|
5189
|
-
function
|
|
5217
|
+
function ol(e) {
|
|
5190
5218
|
return Object.entries(e).map(([e, t]) => Object.assign({ handle: e }, t));
|
|
5191
5219
|
}
|
|
5192
|
-
function
|
|
5193
|
-
return Object.keys(
|
|
5220
|
+
function sl(e) {
|
|
5221
|
+
return Object.keys(al.parse(e).document.flows).toSorted();
|
|
5194
5222
|
}
|
|
5195
|
-
function
|
|
5196
|
-
let n =
|
|
5223
|
+
function cl(e, t) {
|
|
5224
|
+
let n = al.parse(e);
|
|
5197
5225
|
if ([
|
|
5198
5226
|
n.document.bindings,
|
|
5199
5227
|
n.document.subflows,
|
|
5200
5228
|
n.document.tasks
|
|
5201
5229
|
].some((e) => Object.keys(e).length != 0)) throw Error("Project bindings, managed tasks and subflows require an explicit semantic conversion.");
|
|
5202
|
-
let r =
|
|
5203
|
-
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r =
|
|
5230
|
+
let r = il.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
|
|
5231
|
+
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = vc(n, a);
|
|
5204
5232
|
if (a.add(r), r != n && i.push(`Renamed node ${e} to ${r}.`), t.kind != "task") return [e, {
|
|
5205
5233
|
...t,
|
|
5206
5234
|
name: r
|
|
@@ -5211,11 +5239,11 @@ function ol(e, t) {
|
|
|
5211
5239
|
name: r,
|
|
5212
5240
|
task: {
|
|
5213
5241
|
...t.task,
|
|
5214
|
-
inputs:
|
|
5215
|
-
outputs:
|
|
5242
|
+
inputs: ol(t.task.inputs),
|
|
5243
|
+
outputs: ol(t.task.outputs)
|
|
5216
5244
|
}
|
|
5217
5245
|
}];
|
|
5218
|
-
})), s =
|
|
5246
|
+
})), s = mc({
|
|
5219
5247
|
modelVersion: 3,
|
|
5220
5248
|
modules: n.modules,
|
|
5221
5249
|
document: {
|
|
@@ -5250,7 +5278,7 @@ function ol(e, t) {
|
|
|
5250
5278
|
let f = { ...s.document.graph.nodes };
|
|
5251
5279
|
return d != null && (f[d] = {
|
|
5252
5280
|
kind: "manual",
|
|
5253
|
-
name:
|
|
5281
|
+
name: vc("Start", a)
|
|
5254
5282
|
}), {
|
|
5255
5283
|
name: r.name,
|
|
5256
5284
|
adjustments: i,
|
|
@@ -5267,4 +5295,4 @@ function ol(e, t) {
|
|
|
5267
5295
|
};
|
|
5268
5296
|
}
|
|
5269
5297
|
//#endregion
|
|
5270
|
-
export {
|
|
5298
|
+
export { Uc as canonicalDocument, Oc as canonicalGraph, bc as canonicalJsonBytes, Gc as canonicalModule, Tc as canonicalOutputs, $ as canonicalPorts, Pc as canonicalRevisionGraph, Fc as canonicalRevisionOutputs, Ic as canonicalTask, cl as convertProjectFlow, pc as decodeFlowDocument, Jc as decodeRevision, mc as decodeRevisionContent, xc as digestBytes, qc as encodeRevision, sl as legacyProjectFlowIds, Cs as maxJsonDepth, Zc as repairRevision, Xc as revisionRepairKind, Hc as triggerRuntimeJson };
|