twenty-sdk 2.30.0 → 2.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/billing/index.cjs +20 -1
  2. package/dist/billing/index.cjs.map +1 -1
  3. package/dist/billing/index.mjs +2380 -18
  4. package/dist/billing/index.mjs.map +1 -1
  5. package/dist/{catalog-sync-WmgvkRw7.mjs → catalog-sync-Ch6nB5uf.mjs} +1 -1
  6. package/dist/catalog-sync-yH3B_al1.js +1 -0
  7. package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +1 -1
  8. package/dist/cli/utilities/build/common/front-component-build/front-components-watcher.d.ts +40 -0
  9. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/build-shared-dependencies-bundle.d.ts +8 -0
  10. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/create-shared-dependencies-shim-plugin.d.ts +3 -0
  11. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/types/shared-dependencies-build-context.type.d.ts +4 -0
  12. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/types/shared-dependencies-export-names.type.d.ts +4 -0
  13. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/enumerate-shared-dependencies-export-names.d.ts +5 -0
  14. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/get-shared-dependencies-entry-source.d.ts +1 -0
  15. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/get-shared-dependencies-namespace-collisions.d.ts +1 -0
  16. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/get-shared-dependencies-shim-source.d.ts +5 -0
  17. package/dist/cli/utilities/build/common/front-component-build/shared-dependencies-build/utils/to-shared-dependencies-namespace-identifier.d.ts +1 -0
  18. package/dist/cli/utilities/build/common/front-component-build/utils/get-front-component-build-plugins.d.ts +2 -0
  19. package/dist/cli/utilities/build/manifest/utils/extract-front-component-shared-dependencies.d.ts +5 -0
  20. package/dist/cli/utilities/build/manifest/utils/normalize-front-component-shared-dependencies.d.ts +1 -0
  21. package/dist/cli.cjs +36 -36
  22. package/dist/cli.mjs +2147 -2051
  23. package/dist/define/index.cjs +24 -24
  24. package/dist/define/index.cjs.map +1 -1
  25. package/dist/define/index.d.ts +328 -844
  26. package/dist/define/index.mjs +6645 -6513
  27. package/dist/define/index.mjs.map +1 -1
  28. package/dist/front-component/index.cjs +3 -3
  29. package/dist/front-component/index.cjs.map +1 -1
  30. package/dist/front-component/index.mjs +460 -460
  31. package/dist/front-component/index.mjs.map +1 -1
  32. package/dist/front-component-renderer/build.cjs +1 -1
  33. package/dist/front-component-renderer/build.mjs +1 -1
  34. package/dist/get-front-component-build-plugins-C-Webbfn.js +196 -0
  35. package/dist/get-front-component-build-plugins-DA62IZes.mjs +9849 -0
  36. package/dist/{get-function-input-schema-GNk3NRLJ-DkTcUzrb.mjs → get-function-input-schema-GNk3NRLJ-C5HXalke.mjs} +1 -1
  37. package/dist/get-function-input-schema-GNk3NRLJ-DwfXUGPz.js +1 -0
  38. package/dist/logic-function/index.cjs +26 -7
  39. package/dist/logic-function/index.cjs.map +1 -1
  40. package/dist/logic-function/index.mjs +2420 -56
  41. package/dist/logic-function/index.mjs.map +1 -1
  42. package/dist/{login-BnGCnmge.mjs → login-BHgUJK94.mjs} +5750 -15164
  43. package/dist/login-BzHQgxeV.js +343 -0
  44. package/dist/operations.cjs +1 -1
  45. package/dist/operations.mjs +1 -1
  46. package/dist/utils/index.cjs +20 -1
  47. package/dist/utils/index.cjs.map +1 -1
  48. package/dist/utils/index.mjs +2375 -13
  49. package/dist/utils/index.mjs.map +1 -1
  50. package/package.json +2 -2
  51. package/dist/catalog-sync-61JsVcDP.js +0 -1
  52. package/dist/get-front-component-build-plugins-B5IvUvSS.mjs +0 -133
  53. package/dist/get-front-component-build-plugins-TJrFS3_p.js +0 -172
  54. package/dist/get-function-input-schema-GNk3NRLJ-D8x7FINz.js +0 -1
  55. package/dist/isDefined-Dtu5EYqP-Dp026Ry1.js +0 -1
  56. package/dist/login-CM2Aug-k.js +0 -365
@@ -1,25 +1,2387 @@
1
- import "uuid";
2
- import { isNull as e, isUndefined as t } from "@sniptt/guards";
3
- //#region ../twenty-shared/dist/FieldMetadataType-PppCGM82.mjs
4
- var n = /* @__PURE__ */ function(e) {
1
+ import { v4 as e } from "uuid";
2
+ import { isNull as t, isUndefined as n } from "@sniptt/guards";
3
+ Object.freeze({ status: "aborted" });
4
+ function r(e, t, n) {
5
+ function r(n, r) {
6
+ var i;
7
+ Object.defineProperty(n, "_zod", {
8
+ value: n._zod ?? {},
9
+ enumerable: !1
10
+ }), (i = n._zod).traits ?? (i.traits = /* @__PURE__ */ new Set()), n._zod.traits.add(e), t(n, r);
11
+ for (let e in o.prototype) e in n || Object.defineProperty(n, e, { value: o.prototype[e].bind(n) });
12
+ n._zod.constr = o, n._zod.def = r;
13
+ }
14
+ let i = n?.Parent ?? Object;
15
+ class a extends i {}
16
+ Object.defineProperty(a, "name", { value: e });
17
+ function o(e) {
18
+ var t;
19
+ let i = n?.Parent ? new a() : this;
20
+ r(i, e), (t = i._zod).deferred ?? (t.deferred = []);
21
+ for (let e of i._zod.deferred) e();
22
+ return i;
23
+ }
24
+ return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
25
+ }
26
+ var i = class extends Error {
27
+ constructor() {
28
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
29
+ }
30
+ }, a = class extends Error {
31
+ constructor(e) {
32
+ super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
33
+ }
34
+ }, o = {};
35
+ function s(e) {
36
+ return e && Object.assign(o, e), o;
37
+ }
38
+ //#endregion
39
+ //#region ../../node_modules/zod/v4/core/util.js
40
+ function c(e) {
41
+ let t = Object.values(e).filter((e) => typeof e == "number");
42
+ return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
43
+ }
44
+ function l(e, t) {
45
+ return typeof t == "bigint" ? t.toString() : t;
46
+ }
47
+ function u(e) {
48
+ return { get value() {
49
+ {
50
+ let t = e();
51
+ return Object.defineProperty(this, "value", { value: t }), t;
52
+ }
53
+ throw Error("cached value already set");
54
+ } };
55
+ }
56
+ function d(e) {
57
+ return e == null;
58
+ }
59
+ function f(e) {
60
+ let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
61
+ return e.slice(t, n);
62
+ }
63
+ var p = Symbol("evaluating");
64
+ function m(e, t, n) {
65
+ let r;
66
+ Object.defineProperty(e, t, {
67
+ get() {
68
+ if (r !== p) return r === void 0 && (r = p, r = n()), r;
69
+ },
70
+ set(n) {
71
+ Object.defineProperty(e, t, { value: n });
72
+ },
73
+ configurable: !0
74
+ });
75
+ }
76
+ function h(e, t, n) {
77
+ Object.defineProperty(e, t, {
78
+ value: n,
79
+ writable: !0,
80
+ enumerable: !0,
81
+ configurable: !0
82
+ });
83
+ }
84
+ function g(...e) {
85
+ let t = {};
86
+ for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
87
+ return Object.defineProperties({}, t);
88
+ }
89
+ function ee(e) {
90
+ return JSON.stringify(e);
91
+ }
92
+ var te = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
93
+ function _(e) {
94
+ return typeof e == "object" && !!e && !Array.isArray(e);
95
+ }
96
+ var ne = u(() => {
97
+ if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
98
+ try {
99
+ return Function(""), !0;
100
+ } catch {
101
+ return !1;
102
+ }
103
+ });
104
+ function v(e) {
105
+ if (_(e) === !1) return !1;
106
+ let t = e.constructor;
107
+ if (t === void 0) return !0;
108
+ let n = t.prototype;
109
+ return !(_(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
110
+ }
111
+ function re(e) {
112
+ return v(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
113
+ }
114
+ var ie = new Set([
115
+ "string",
116
+ "number",
117
+ "symbol"
118
+ ]);
119
+ function y(e) {
120
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
121
+ }
122
+ function b(e, t, n) {
123
+ let r = new e._zod.constr(t ?? e._zod.def);
124
+ return (!t || n?.parent) && (r._zod.parent = e), r;
125
+ }
126
+ function x(e) {
127
+ let t = e;
128
+ if (!t) return {};
129
+ if (typeof t == "string") return { error: () => t };
130
+ if (t?.message !== void 0) {
131
+ if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
132
+ t.error = t.message;
133
+ }
134
+ return delete t.message, typeof t.error == "string" ? {
135
+ ...t,
136
+ error: () => t.error
137
+ } : t;
138
+ }
139
+ function ae(e) {
140
+ return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
141
+ }
142
+ -Number.MAX_VALUE, Number.MAX_VALUE;
143
+ function oe(e, t) {
144
+ let n = e._zod.def;
145
+ return b(e, g(e._zod.def, {
146
+ get shape() {
147
+ let e = {};
148
+ for (let r in t) {
149
+ if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
150
+ t[r] && (e[r] = n.shape[r]);
151
+ }
152
+ return h(this, "shape", e), e;
153
+ },
154
+ checks: []
155
+ }));
156
+ }
157
+ function se(e, t) {
158
+ let n = e._zod.def;
159
+ return b(e, g(e._zod.def, {
160
+ get shape() {
161
+ let r = { ...e._zod.def.shape };
162
+ for (let e in t) {
163
+ if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
164
+ t[e] && delete r[e];
165
+ }
166
+ return h(this, "shape", r), r;
167
+ },
168
+ checks: []
169
+ }));
170
+ }
171
+ function ce(e, t) {
172
+ if (!v(t)) throw Error("Invalid input to extend: expected a plain object");
173
+ let n = e._zod.def.checks;
174
+ if (n && n.length > 0) throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
175
+ return b(e, g(e._zod.def, {
176
+ get shape() {
177
+ let n = {
178
+ ...e._zod.def.shape,
179
+ ...t
180
+ };
181
+ return h(this, "shape", n), n;
182
+ },
183
+ checks: []
184
+ }));
185
+ }
186
+ function le(e, t) {
187
+ if (!v(t)) throw Error("Invalid input to safeExtend: expected a plain object");
188
+ return b(e, {
189
+ ...e._zod.def,
190
+ get shape() {
191
+ let n = {
192
+ ...e._zod.def.shape,
193
+ ...t
194
+ };
195
+ return h(this, "shape", n), n;
196
+ },
197
+ checks: e._zod.def.checks
198
+ });
199
+ }
200
+ function ue(e, t) {
201
+ return b(e, g(e._zod.def, {
202
+ get shape() {
203
+ let n = {
204
+ ...e._zod.def.shape,
205
+ ...t._zod.def.shape
206
+ };
207
+ return h(this, "shape", n), n;
208
+ },
209
+ get catchall() {
210
+ return t._zod.def.catchall;
211
+ },
212
+ checks: []
213
+ }));
214
+ }
215
+ function de(e, t, n) {
216
+ return b(t, g(t._zod.def, {
217
+ get shape() {
218
+ let r = t._zod.def.shape, i = { ...r };
219
+ if (n) for (let t in n) {
220
+ if (!(t in r)) throw Error(`Unrecognized key: "${t}"`);
221
+ n[t] && (i[t] = e ? new e({
222
+ type: "optional",
223
+ innerType: r[t]
224
+ }) : r[t]);
225
+ }
226
+ else for (let t in r) i[t] = e ? new e({
227
+ type: "optional",
228
+ innerType: r[t]
229
+ }) : r[t];
230
+ return h(this, "shape", i), i;
231
+ },
232
+ checks: []
233
+ }));
234
+ }
235
+ function fe(e, t, n) {
236
+ return b(t, g(t._zod.def, {
237
+ get shape() {
238
+ let r = t._zod.def.shape, i = { ...r };
239
+ if (n) for (let t in n) {
240
+ if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
241
+ n[t] && (i[t] = new e({
242
+ type: "nonoptional",
243
+ innerType: r[t]
244
+ }));
245
+ }
246
+ else for (let t in r) i[t] = new e({
247
+ type: "nonoptional",
248
+ innerType: r[t]
249
+ });
250
+ return h(this, "shape", i), i;
251
+ },
252
+ checks: []
253
+ }));
254
+ }
255
+ function S(e, t = 0) {
256
+ if (e.aborted === !0) return !0;
257
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
258
+ return !1;
259
+ }
260
+ function C(e, t) {
261
+ return t.map((t) => {
262
+ var n;
263
+ return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
264
+ });
265
+ }
266
+ function w(e) {
267
+ return typeof e == "string" ? e : e?.message;
268
+ }
269
+ function T(e, t, n) {
270
+ let r = {
271
+ ...e,
272
+ path: e.path ?? []
273
+ };
274
+ return e.message || (r.message = w(e.inst?._zod.def?.error?.(e)) ?? w(t?.error?.(e)) ?? w(n.customError?.(e)) ?? w(n.localeError?.(e)) ?? "Invalid input"), delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
275
+ }
276
+ function E(e) {
277
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
278
+ }
279
+ function D(...e) {
280
+ let [t, n, r] = e;
281
+ return typeof t == "string" ? {
282
+ message: t,
283
+ code: "custom",
284
+ input: n,
285
+ inst: r
286
+ } : { ...t };
287
+ }
288
+ //#endregion
289
+ //#region ../../node_modules/zod/v4/core/errors.js
290
+ var pe = (e, t) => {
291
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
292
+ value: e._zod,
293
+ enumerable: !1
294
+ }), Object.defineProperty(e, "issues", {
295
+ value: t,
296
+ enumerable: !1
297
+ }), e.message = JSON.stringify(t, l, 2), Object.defineProperty(e, "toString", {
298
+ value: () => e.message,
299
+ enumerable: !1
300
+ });
301
+ }, me = r("$ZodError", pe), he = r("$ZodError", pe, { Parent: Error });
302
+ function ge(e, t = (e) => e.message) {
303
+ let n = {}, r = [];
304
+ for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
305
+ return {
306
+ formErrors: r,
307
+ fieldErrors: n
308
+ };
309
+ }
310
+ function _e(e, t) {
311
+ let n = t || function(e) {
312
+ return e.message;
313
+ }, r = { _errors: [] }, i = (e) => {
314
+ for (let t of e.issues) if (t.code === "invalid_union" && t.errors.length) t.errors.map((e) => i({ issues: e }));
315
+ else if (t.code === "invalid_key") i({ issues: t.issues });
316
+ else if (t.code === "invalid_element") i({ issues: t.issues });
317
+ else if (t.path.length === 0) r._errors.push(n(t));
318
+ else {
319
+ let e = r, i = 0;
320
+ for (; i < t.path.length;) {
321
+ let r = t.path[i];
322
+ i === t.path.length - 1 ? (e[r] = e[r] || { _errors: [] }, e[r]._errors.push(n(t))) : e[r] = e[r] || { _errors: [] }, e = e[r], i++;
323
+ }
324
+ }
325
+ };
326
+ return i(e), r;
327
+ }
328
+ //#endregion
329
+ //#region ../../node_modules/zod/v4/core/parse.js
330
+ var O = (e) => (t, n, r, a) => {
331
+ let o = r ? Object.assign(r, { async: !1 }) : { async: !1 }, c = t._zod.run({
332
+ value: n,
333
+ issues: []
334
+ }, o);
335
+ if (c instanceof Promise) throw new i();
336
+ if (c.issues.length) {
337
+ let t = new (a?.Err ?? e)(c.issues.map((e) => T(e, o, s())));
338
+ throw te(t, a?.callee), t;
339
+ }
340
+ return c.value;
341
+ }, k = (e) => async (t, n, r, i) => {
342
+ let a = r ? Object.assign(r, { async: !0 }) : { async: !0 }, o = t._zod.run({
343
+ value: n,
344
+ issues: []
345
+ }, a);
346
+ if (o instanceof Promise && (o = await o), o.issues.length) {
347
+ let t = new (i?.Err ?? e)(o.issues.map((e) => T(e, a, s())));
348
+ throw te(t, i?.callee), t;
349
+ }
350
+ return o.value;
351
+ }, A = (e) => (t, n, r) => {
352
+ let a = r ? {
353
+ ...r,
354
+ async: !1
355
+ } : { async: !1 }, o = t._zod.run({
356
+ value: n,
357
+ issues: []
358
+ }, a);
359
+ if (o instanceof Promise) throw new i();
360
+ return o.issues.length ? {
361
+ success: !1,
362
+ error: new (e ?? me)(o.issues.map((e) => T(e, a, s())))
363
+ } : {
364
+ success: !0,
365
+ data: o.value
366
+ };
367
+ }, ve = /* @__PURE__*/ A(he), j = (e) => async (t, n, r) => {
368
+ let i = r ? Object.assign(r, { async: !0 }) : { async: !0 }, a = t._zod.run({
369
+ value: n,
370
+ issues: []
371
+ }, i);
372
+ return a instanceof Promise && (a = await a), a.issues.length ? {
373
+ success: !1,
374
+ error: new e(a.issues.map((e) => T(e, i, s())))
375
+ } : {
376
+ success: !0,
377
+ data: a.value
378
+ };
379
+ }, ye = /* @__PURE__*/ j(he), be = (e) => (t, n, r) => {
380
+ let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
381
+ return O(e)(t, n, i);
382
+ }, xe = (e) => (t, n, r) => O(e)(t, n, r), Se = (e) => async (t, n, r) => {
383
+ let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
384
+ return k(e)(t, n, i);
385
+ }, Ce = (e) => async (t, n, r) => k(e)(t, n, r), we = (e) => (t, n, r) => {
386
+ let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
387
+ return A(e)(t, n, i);
388
+ }, Te = (e) => (t, n, r) => A(e)(t, n, r), Ee = (e) => async (t, n, r) => {
389
+ let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
390
+ return j(e)(t, n, i);
391
+ }, De = (e) => async (t, n, r) => j(e)(t, n, r), Oe = /^[cC][^\s-]{8,}$/, ke = /^[0-9a-z]+$/, Ae = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, je = /^[0-9a-vA-V]{20}$/, Me = /^[A-Za-z0-9]{27}$/, Ne = /^[a-zA-Z0-9_-]{21}$/, Pe = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Fe = /^([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})$/, Ie = (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)$/, Le = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Re = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
392
+ function ze() {
393
+ return new RegExp(Re, "u");
394
+ }
395
+ var Be = /^(?:(?: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])$/, Ve = /^(([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}|:))$/, He = /^((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])$/, Ue = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, We = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Ge = /^[A-Za-z0-9_-]*$/, Ke = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, qe = /^\+(?:[0-9]){6,14}[0-9]$/, Je = "(?:(?:\\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])))", Ye = /*@__PURE__*/ RegExp(`^${Je}$`);
396
+ function Xe(e) {
397
+ let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
398
+ return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
399
+ }
400
+ function Ze(e) {
401
+ return RegExp(`^${Xe(e)}$`);
402
+ }
403
+ function Qe(e) {
404
+ let t = Xe({ precision: e.precision }), n = ["Z"];
405
+ e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
406
+ let r = `${t}(?:${n.join("|")})`;
407
+ return RegExp(`^${Je}T(?:${r})$`);
408
+ }
409
+ var $e = (e) => {
410
+ let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
411
+ return RegExp(`^${t}$`);
412
+ }, et = /^[^A-Z]*$/, tt = /^[^a-z]*$/, M = /*@__PURE__*/ r("$ZodCheck", (e, t) => {
413
+ var n;
414
+ e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
415
+ }), nt = /*@__PURE__*/ r("$ZodCheckMaxLength", (e, t) => {
416
+ var n;
417
+ M.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
418
+ let t = e.value;
419
+ return !d(t) && t.length !== void 0;
420
+ }), e._zod.onattach.push((e) => {
421
+ let n = e._zod.bag.maximum ?? Infinity;
422
+ t.maximum < n && (e._zod.bag.maximum = t.maximum);
423
+ }), e._zod.check = (n) => {
424
+ let r = n.value;
425
+ if (r.length <= t.maximum) return;
426
+ let i = E(r);
427
+ n.issues.push({
428
+ origin: i,
429
+ code: "too_big",
430
+ maximum: t.maximum,
431
+ inclusive: !0,
432
+ input: r,
433
+ inst: e,
434
+ continue: !t.abort
435
+ });
436
+ };
437
+ }), rt = /*@__PURE__*/ r("$ZodCheckMinLength", (e, t) => {
438
+ var n;
439
+ M.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
440
+ let t = e.value;
441
+ return !d(t) && t.length !== void 0;
442
+ }), e._zod.onattach.push((e) => {
443
+ let n = e._zod.bag.minimum ?? -Infinity;
444
+ t.minimum > n && (e._zod.bag.minimum = t.minimum);
445
+ }), e._zod.check = (n) => {
446
+ let r = n.value;
447
+ if (r.length >= t.minimum) return;
448
+ let i = E(r);
449
+ n.issues.push({
450
+ origin: i,
451
+ code: "too_small",
452
+ minimum: t.minimum,
453
+ inclusive: !0,
454
+ input: r,
455
+ inst: e,
456
+ continue: !t.abort
457
+ });
458
+ };
459
+ }), it = /*@__PURE__*/ r("$ZodCheckLengthEquals", (e, t) => {
460
+ var n;
461
+ M.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
462
+ let t = e.value;
463
+ return !d(t) && t.length !== void 0;
464
+ }), e._zod.onattach.push((e) => {
465
+ let n = e._zod.bag;
466
+ n.minimum = t.length, n.maximum = t.length, n.length = t.length;
467
+ }), e._zod.check = (n) => {
468
+ let r = n.value, i = r.length;
469
+ if (i === t.length) return;
470
+ let a = E(r), o = i > t.length;
471
+ n.issues.push({
472
+ origin: a,
473
+ ...o ? {
474
+ code: "too_big",
475
+ maximum: t.length
476
+ } : {
477
+ code: "too_small",
478
+ minimum: t.length
479
+ },
480
+ inclusive: !0,
481
+ exact: !0,
482
+ input: n.value,
483
+ inst: e,
484
+ continue: !t.abort
485
+ });
486
+ };
487
+ }), N = /*@__PURE__*/ r("$ZodCheckStringFormat", (e, t) => {
488
+ var n, r;
489
+ M.init(e, t), e._zod.onattach.push((e) => {
490
+ let n = e._zod.bag;
491
+ n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
492
+ }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
493
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
494
+ origin: "string",
495
+ code: "invalid_format",
496
+ format: t.format,
497
+ input: n.value,
498
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
499
+ inst: e,
500
+ continue: !t.abort
501
+ });
502
+ }) : (r = e._zod).check ?? (r.check = () => {});
503
+ }), at = /*@__PURE__*/ r("$ZodCheckRegex", (e, t) => {
504
+ N.init(e, t), e._zod.check = (n) => {
505
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
506
+ origin: "string",
507
+ code: "invalid_format",
508
+ format: "regex",
509
+ input: n.value,
510
+ pattern: t.pattern.toString(),
511
+ inst: e,
512
+ continue: !t.abort
513
+ });
514
+ };
515
+ }), ot = /*@__PURE__*/ r("$ZodCheckLowerCase", (e, t) => {
516
+ t.pattern ??= et, N.init(e, t);
517
+ }), st = /*@__PURE__*/ r("$ZodCheckUpperCase", (e, t) => {
518
+ t.pattern ??= tt, N.init(e, t);
519
+ }), ct = /*@__PURE__*/ r("$ZodCheckIncludes", (e, t) => {
520
+ M.init(e, t);
521
+ let n = y(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
522
+ t.pattern = r, e._zod.onattach.push((e) => {
523
+ let t = e._zod.bag;
524
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
525
+ }), e._zod.check = (n) => {
526
+ n.value.includes(t.includes, t.position) || n.issues.push({
527
+ origin: "string",
528
+ code: "invalid_format",
529
+ format: "includes",
530
+ includes: t.includes,
531
+ input: n.value,
532
+ inst: e,
533
+ continue: !t.abort
534
+ });
535
+ };
536
+ }), lt = /*@__PURE__*/ r("$ZodCheckStartsWith", (e, t) => {
537
+ M.init(e, t);
538
+ let n = RegExp(`^${y(t.prefix)}.*`);
539
+ t.pattern ??= n, e._zod.onattach.push((e) => {
540
+ let t = e._zod.bag;
541
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
542
+ }), e._zod.check = (n) => {
543
+ n.value.startsWith(t.prefix) || n.issues.push({
544
+ origin: "string",
545
+ code: "invalid_format",
546
+ format: "starts_with",
547
+ prefix: t.prefix,
548
+ input: n.value,
549
+ inst: e,
550
+ continue: !t.abort
551
+ });
552
+ };
553
+ }), ut = /*@__PURE__*/ r("$ZodCheckEndsWith", (e, t) => {
554
+ M.init(e, t);
555
+ let n = RegExp(`.*${y(t.suffix)}$`);
556
+ t.pattern ??= n, e._zod.onattach.push((e) => {
557
+ let t = e._zod.bag;
558
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
559
+ }), e._zod.check = (n) => {
560
+ n.value.endsWith(t.suffix) || n.issues.push({
561
+ origin: "string",
562
+ code: "invalid_format",
563
+ format: "ends_with",
564
+ suffix: t.suffix,
565
+ input: n.value,
566
+ inst: e,
567
+ continue: !t.abort
568
+ });
569
+ };
570
+ }), dt = /*@__PURE__*/ r("$ZodCheckOverwrite", (e, t) => {
571
+ M.init(e, t), e._zod.check = (e) => {
572
+ e.value = t.tx(e.value);
573
+ };
574
+ }), ft = class {
575
+ constructor(e = []) {
576
+ this.content = [], this.indent = 0, this && (this.args = e);
577
+ }
578
+ indented(e) {
579
+ this.indent += 1, e(this), --this.indent;
580
+ }
581
+ write(e) {
582
+ if (typeof e == "function") {
583
+ e(this, { execution: "sync" }), e(this, { execution: "async" });
584
+ return;
585
+ }
586
+ let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
587
+ for (let e of r) this.content.push(e);
588
+ }
589
+ compile() {
590
+ let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
591
+ return new e(...t, n.join("\n"));
592
+ }
593
+ }, pt = {
594
+ major: 4,
595
+ minor: 1,
596
+ patch: 11
597
+ }, P = /*@__PURE__*/ r("$ZodType", (e, t) => {
598
+ var n;
599
+ e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = pt;
600
+ let r = [...e._zod.def.checks ?? []];
601
+ e._zod.traits.has("$ZodCheck") && r.unshift(e);
602
+ for (let t of r) for (let n of t._zod.onattach) n(e);
603
+ if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
604
+ e._zod.run = e._zod.parse;
605
+ });
606
+ else {
607
+ let t = (e, t, n) => {
608
+ let r = S(e), a;
609
+ for (let o of t) {
610
+ if (o._zod.def.when) {
611
+ if (!o._zod.def.when(e)) continue;
612
+ } else if (r) continue;
613
+ let t = e.issues.length, s = o._zod.check(e);
614
+ if (s instanceof Promise && n?.async === !1) throw new i();
615
+ if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
616
+ await s, e.issues.length !== t && (r ||= S(e, t));
617
+ });
618
+ else {
619
+ if (e.issues.length === t) continue;
620
+ r ||= S(e, t);
621
+ }
622
+ }
623
+ return a ? a.then(() => e) : e;
624
+ }, n = (n, a, o) => {
625
+ if (S(n)) return n.aborted = !0, n;
626
+ let s = t(a, r, o);
627
+ if (s instanceof Promise) {
628
+ if (o.async === !1) throw new i();
629
+ return s.then((t) => e._zod.parse(t, o));
630
+ }
631
+ return e._zod.parse(s, o);
632
+ };
633
+ e._zod.run = (a, o) => {
634
+ if (o.skipChecks) return e._zod.parse(a, o);
635
+ if (o.direction === "backward") {
636
+ let t = e._zod.parse({
637
+ value: a.value,
638
+ issues: []
639
+ }, {
640
+ ...o,
641
+ skipChecks: !0
642
+ });
643
+ return t instanceof Promise ? t.then((e) => n(e, a, o)) : n(t, a, o);
644
+ }
645
+ let s = e._zod.parse(a, o);
646
+ if (s instanceof Promise) {
647
+ if (o.async === !1) throw new i();
648
+ return s.then((e) => t(e, r, o));
649
+ }
650
+ return t(s, r, o);
651
+ };
652
+ }
653
+ e["~standard"] = {
654
+ validate: (t) => {
655
+ try {
656
+ let n = ve(e, t);
657
+ return n.success ? { value: n.data } : { issues: n.error?.issues };
658
+ } catch {
659
+ return ye(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
660
+ }
661
+ },
662
+ vendor: "zod",
663
+ version: 1
664
+ };
665
+ }), F = /*@__PURE__*/ r("$ZodString", (e, t) => {
666
+ P.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? $e(e._zod.bag), e._zod.parse = (n, r) => {
667
+ if (t.coerce) try {
668
+ n.value = String(n.value);
669
+ } catch {}
670
+ return typeof n.value == "string" || n.issues.push({
671
+ expected: "string",
672
+ code: "invalid_type",
673
+ input: n.value,
674
+ inst: e
675
+ }), n;
676
+ };
677
+ }), I = /*@__PURE__*/ r("$ZodStringFormat", (e, t) => {
678
+ N.init(e, t), F.init(e, t);
679
+ }), mt = /*@__PURE__*/ r("$ZodGUID", (e, t) => {
680
+ t.pattern ??= Fe, I.init(e, t);
681
+ }), ht = /*@__PURE__*/ r("$ZodUUID", (e, t) => {
682
+ if (t.version) {
683
+ let e = {
684
+ v1: 1,
685
+ v2: 2,
686
+ v3: 3,
687
+ v4: 4,
688
+ v5: 5,
689
+ v6: 6,
690
+ v7: 7,
691
+ v8: 8
692
+ }[t.version];
693
+ if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
694
+ t.pattern ??= Ie(e);
695
+ } else t.pattern ??= Ie();
696
+ I.init(e, t);
697
+ }), gt = /*@__PURE__*/ r("$ZodEmail", (e, t) => {
698
+ t.pattern ??= Le, I.init(e, t);
699
+ }), _t = /*@__PURE__*/ r("$ZodURL", (e, t) => {
700
+ I.init(e, t), e._zod.check = (n) => {
701
+ try {
702
+ let r = n.value.trim(), i = new URL(r);
703
+ t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
704
+ code: "invalid_format",
705
+ format: "url",
706
+ note: "Invalid hostname",
707
+ pattern: Ke.source,
708
+ input: n.value,
709
+ inst: e,
710
+ continue: !t.abort
711
+ })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(":") ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({
712
+ code: "invalid_format",
713
+ format: "url",
714
+ note: "Invalid protocol",
715
+ pattern: t.protocol.source,
716
+ input: n.value,
717
+ inst: e,
718
+ continue: !t.abort
719
+ })), t.normalize ? n.value = i.href : n.value = r;
720
+ return;
721
+ } catch {
722
+ n.issues.push({
723
+ code: "invalid_format",
724
+ format: "url",
725
+ input: n.value,
726
+ inst: e,
727
+ continue: !t.abort
728
+ });
729
+ }
730
+ };
731
+ }), vt = /*@__PURE__*/ r("$ZodEmoji", (e, t) => {
732
+ t.pattern ??= ze(), I.init(e, t);
733
+ }), yt = /*@__PURE__*/ r("$ZodNanoID", (e, t) => {
734
+ t.pattern ??= Ne, I.init(e, t);
735
+ }), bt = /*@__PURE__*/ r("$ZodCUID", (e, t) => {
736
+ t.pattern ??= Oe, I.init(e, t);
737
+ }), xt = /*@__PURE__*/ r("$ZodCUID2", (e, t) => {
738
+ t.pattern ??= ke, I.init(e, t);
739
+ }), St = /*@__PURE__*/ r("$ZodULID", (e, t) => {
740
+ t.pattern ??= Ae, I.init(e, t);
741
+ }), Ct = /*@__PURE__*/ r("$ZodXID", (e, t) => {
742
+ t.pattern ??= je, I.init(e, t);
743
+ }), wt = /*@__PURE__*/ r("$ZodKSUID", (e, t) => {
744
+ t.pattern ??= Me, I.init(e, t);
745
+ }), Tt = /*@__PURE__*/ r("$ZodISODateTime", (e, t) => {
746
+ t.pattern ??= Qe(t), I.init(e, t);
747
+ }), Et = /*@__PURE__*/ r("$ZodISODate", (e, t) => {
748
+ t.pattern ??= Ye, I.init(e, t);
749
+ }), Dt = /*@__PURE__*/ r("$ZodISOTime", (e, t) => {
750
+ t.pattern ??= Ze(t), I.init(e, t);
751
+ }), Ot = /*@__PURE__*/ r("$ZodISODuration", (e, t) => {
752
+ t.pattern ??= Pe, I.init(e, t);
753
+ }), kt = /*@__PURE__*/ r("$ZodIPv4", (e, t) => {
754
+ t.pattern ??= Be, I.init(e, t), e._zod.onattach.push((e) => {
755
+ let t = e._zod.bag;
756
+ t.format = "ipv4";
757
+ });
758
+ }), At = /*@__PURE__*/ r("$ZodIPv6", (e, t) => {
759
+ t.pattern ??= Ve, I.init(e, t), e._zod.onattach.push((e) => {
760
+ let t = e._zod.bag;
761
+ t.format = "ipv6";
762
+ }), e._zod.check = (n) => {
763
+ try {
764
+ new URL(`http://[${n.value}]`);
765
+ } catch {
766
+ n.issues.push({
767
+ code: "invalid_format",
768
+ format: "ipv6",
769
+ input: n.value,
770
+ inst: e,
771
+ continue: !t.abort
772
+ });
773
+ }
774
+ };
775
+ }), jt = /*@__PURE__*/ r("$ZodCIDRv4", (e, t) => {
776
+ t.pattern ??= He, I.init(e, t);
777
+ }), Mt = /*@__PURE__*/ r("$ZodCIDRv6", (e, t) => {
778
+ t.pattern ??= Ue, I.init(e, t), e._zod.check = (n) => {
779
+ let r = n.value.split("/");
780
+ try {
781
+ if (r.length !== 2) throw Error();
782
+ let [e, t] = r;
783
+ if (!t) throw Error();
784
+ let n = Number(t);
785
+ if (`${n}` !== t || n < 0 || n > 128) throw Error();
786
+ new URL(`http://[${e}]`);
787
+ } catch {
788
+ n.issues.push({
789
+ code: "invalid_format",
790
+ format: "cidrv6",
791
+ input: n.value,
792
+ inst: e,
793
+ continue: !t.abort
794
+ });
795
+ }
796
+ };
797
+ });
798
+ function Nt(e) {
799
+ if (e === "") return !0;
800
+ if (e.length % 4 != 0) return !1;
801
+ try {
802
+ return atob(e), !0;
803
+ } catch {
804
+ return !1;
805
+ }
806
+ }
807
+ var Pt = /*@__PURE__*/ r("$ZodBase64", (e, t) => {
808
+ t.pattern ??= We, I.init(e, t), e._zod.onattach.push((e) => {
809
+ e._zod.bag.contentEncoding = "base64";
810
+ }), e._zod.check = (n) => {
811
+ Nt(n.value) || n.issues.push({
812
+ code: "invalid_format",
813
+ format: "base64",
814
+ input: n.value,
815
+ inst: e,
816
+ continue: !t.abort
817
+ });
818
+ };
819
+ });
820
+ function Ft(e) {
821
+ if (!Ge.test(e)) return !1;
822
+ let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
823
+ return Nt(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
824
+ }
825
+ var It = /*@__PURE__*/ r("$ZodBase64URL", (e, t) => {
826
+ t.pattern ??= Ge, I.init(e, t), e._zod.onattach.push((e) => {
827
+ e._zod.bag.contentEncoding = "base64url";
828
+ }), e._zod.check = (n) => {
829
+ Ft(n.value) || n.issues.push({
830
+ code: "invalid_format",
831
+ format: "base64url",
832
+ input: n.value,
833
+ inst: e,
834
+ continue: !t.abort
835
+ });
836
+ };
837
+ }), Lt = /*@__PURE__*/ r("$ZodE164", (e, t) => {
838
+ t.pattern ??= qe, I.init(e, t);
839
+ });
840
+ function Rt(e, t = null) {
841
+ try {
842
+ let n = e.split(".");
843
+ if (n.length !== 3) return !1;
844
+ let [r] = n;
845
+ if (!r) return !1;
846
+ let i = JSON.parse(atob(r));
847
+ return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
848
+ } catch {
849
+ return !1;
850
+ }
851
+ }
852
+ var zt = /*@__PURE__*/ r("$ZodJWT", (e, t) => {
853
+ I.init(e, t), e._zod.check = (n) => {
854
+ Rt(n.value, t.alg) || n.issues.push({
855
+ code: "invalid_format",
856
+ format: "jwt",
857
+ input: n.value,
858
+ inst: e,
859
+ continue: !t.abort
860
+ });
861
+ };
862
+ }), Bt = /*@__PURE__*/ r("$ZodUnknown", (e, t) => {
863
+ P.init(e, t), e._zod.parse = (e) => e;
864
+ }), Vt = /*@__PURE__*/ r("$ZodNever", (e, t) => {
865
+ P.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
866
+ expected: "never",
867
+ code: "invalid_type",
868
+ input: t.value,
869
+ inst: e
870
+ }), t);
871
+ });
872
+ function Ht(e, t, n) {
873
+ e.issues.length && t.issues.push(...C(n, e.issues)), t.value[n] = e.value;
874
+ }
875
+ var Ut = /*@__PURE__*/ r("$ZodArray", (e, t) => {
876
+ P.init(e, t), e._zod.parse = (n, r) => {
877
+ let i = n.value;
878
+ if (!Array.isArray(i)) return n.issues.push({
879
+ expected: "array",
880
+ code: "invalid_type",
881
+ input: i,
882
+ inst: e
883
+ }), n;
884
+ n.value = Array(i.length);
885
+ let a = [];
886
+ for (let e = 0; e < i.length; e++) {
887
+ let o = i[e], s = t.element._zod.run({
888
+ value: o,
889
+ issues: []
890
+ }, r);
891
+ s instanceof Promise ? a.push(s.then((t) => Ht(t, n, e))) : Ht(s, n, e);
892
+ }
893
+ return a.length ? Promise.all(a).then(() => n) : n;
894
+ };
895
+ });
896
+ function L(e, t, n, r) {
897
+ e.issues.length && t.issues.push(...C(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
898
+ }
899
+ function Wt(e) {
900
+ let t = Object.keys(e.shape);
901
+ for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
902
+ let n = ae(e.shape);
903
+ return {
904
+ ...e,
905
+ keys: t,
906
+ keySet: new Set(t),
907
+ numKeys: t.length,
908
+ optionalKeys: new Set(n)
909
+ };
910
+ }
911
+ function Gt(e, t, n, r, i, a) {
912
+ let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type;
913
+ for (let i of Object.keys(t)) {
914
+ if (s.has(i)) continue;
915
+ if (l === "never") {
916
+ o.push(i);
917
+ continue;
918
+ }
919
+ let a = c.run({
920
+ value: t[i],
921
+ issues: []
922
+ }, r);
923
+ a instanceof Promise ? e.push(a.then((e) => L(e, n, i, t))) : L(a, n, i, t);
924
+ }
925
+ return o.length && n.issues.push({
926
+ code: "unrecognized_keys",
927
+ keys: o,
928
+ input: t,
929
+ inst: a
930
+ }), e.length ? Promise.all(e).then(() => n) : n;
931
+ }
932
+ var Kt = /*@__PURE__*/ r("$ZodObject", (e, t) => {
933
+ if (P.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
934
+ let e = t.shape;
935
+ Object.defineProperty(t, "shape", { get: () => {
936
+ let n = { ...e };
937
+ return Object.defineProperty(t, "shape", { value: n }), n;
938
+ } });
939
+ }
940
+ let n = u(() => Wt(t));
941
+ m(e._zod, "propValues", () => {
942
+ let e = t.shape, n = {};
943
+ for (let t in e) {
944
+ let r = e[t]._zod;
945
+ if (r.values) {
946
+ n[t] ?? (n[t] = /* @__PURE__ */ new Set());
947
+ for (let e of r.values) n[t].add(e);
948
+ }
949
+ }
950
+ return n;
951
+ });
952
+ let r = _, i = t.catchall, a;
953
+ e._zod.parse = (t, o) => {
954
+ a ??= n.value;
955
+ let s = t.value;
956
+ if (!r(s)) return t.issues.push({
957
+ expected: "object",
958
+ code: "invalid_type",
959
+ input: s,
960
+ inst: e
961
+ }), t;
962
+ t.value = {};
963
+ let c = [], l = a.shape;
964
+ for (let e of a.keys) {
965
+ let n = l[e]._zod.run({
966
+ value: s[e],
967
+ issues: []
968
+ }, o);
969
+ n instanceof Promise ? c.push(n.then((n) => L(n, t, e, s))) : L(n, t, e, s);
970
+ }
971
+ return i ? Gt(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
972
+ };
973
+ }), qt = /*@__PURE__*/ r("$ZodObjectJIT", (e, t) => {
974
+ Kt.init(e, t);
975
+ let n = e._zod.parse, r = u(() => Wt(t)), i = (e) => {
976
+ let t = new ft([
977
+ "shape",
978
+ "payload",
979
+ "ctx"
980
+ ]), n = r.value, i = (e) => {
981
+ let t = ee(e);
982
+ return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
983
+ };
984
+ t.write("const input = payload.value;");
985
+ let a = Object.create(null), o = 0;
986
+ for (let e of n.keys) a[e] = `key_${o++}`;
987
+ t.write("const newResult = {};");
988
+ for (let e of n.keys) {
989
+ let n = a[e], r = ee(e);
990
+ t.write(`const ${n} = ${i(e)};`), t.write(`
991
+ if (${n}.issues.length) {
992
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
993
+ ...iss,
994
+ path: iss.path ? [${r}, ...iss.path] : [${r}]
995
+ })));
996
+ }
997
+
998
+
999
+ if (${n}.value === undefined) {
1000
+ if (${r} in input) {
1001
+ newResult[${r}] = undefined;
1002
+ }
1003
+ } else {
1004
+ newResult[${r}] = ${n}.value;
1005
+ }
1006
+
1007
+ `);
1008
+ }
1009
+ t.write("payload.value = newResult;"), t.write("return payload;");
1010
+ let s = t.compile();
1011
+ return (t, n) => s(e, t, n);
1012
+ }, a, s = _, c = !o.jitless, l = c && ne.value, d = t.catchall, f;
1013
+ e._zod.parse = (o, u) => {
1014
+ f ??= r.value;
1015
+ let p = o.value;
1016
+ return s(p) ? c && l && u?.async === !1 && u.jitless !== !0 ? (a ||= i(t.shape), o = a(o, u), d ? Gt([], p, o, u, f, e) : o) : n(o, u) : (o.issues.push({
1017
+ expected: "object",
1018
+ code: "invalid_type",
1019
+ input: p,
1020
+ inst: e
1021
+ }), o);
1022
+ };
1023
+ });
1024
+ function R(e, t, n, r) {
1025
+ for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1026
+ let i = e.filter((e) => !S(e));
1027
+ return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1028
+ code: "invalid_union",
1029
+ input: t.value,
1030
+ inst: n,
1031
+ errors: e.map((e) => e.issues.map((e) => T(e, r, s())))
1032
+ }), t);
1033
+ }
1034
+ var Jt = /*@__PURE__*/ r("$ZodUnion", (e, t) => {
1035
+ P.init(e, t), m(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), m(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), m(e._zod, "values", () => {
1036
+ if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
1037
+ }), m(e._zod, "pattern", () => {
1038
+ if (t.options.every((e) => e._zod.pattern)) {
1039
+ let e = t.options.map((e) => e._zod.pattern);
1040
+ return RegExp(`^(${e.map((e) => f(e.source)).join("|")})$`);
1041
+ }
1042
+ });
1043
+ let n = t.options.length === 1, r = t.options[0]._zod.run;
1044
+ e._zod.parse = (i, a) => {
1045
+ if (n) return r(i, a);
1046
+ let o = !1, s = [];
1047
+ for (let e of t.options) {
1048
+ let t = e._zod.run({
1049
+ value: i.value,
1050
+ issues: []
1051
+ }, a);
1052
+ if (t instanceof Promise) s.push(t), o = !0;
1053
+ else {
1054
+ if (t.issues.length === 0) return t;
1055
+ s.push(t);
1056
+ }
1057
+ }
1058
+ return o ? Promise.all(s).then((t) => R(t, i, e, a)) : R(s, i, e, a);
1059
+ };
1060
+ }), Yt = /*@__PURE__*/ r("$ZodIntersection", (e, t) => {
1061
+ P.init(e, t), e._zod.parse = (e, n) => {
1062
+ let r = e.value, i = t.left._zod.run({
1063
+ value: r,
1064
+ issues: []
1065
+ }, n), a = t.right._zod.run({
1066
+ value: r,
1067
+ issues: []
1068
+ }, n);
1069
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => B(e, t, n)) : B(e, i, a);
1070
+ };
1071
+ });
1072
+ function z(e, t) {
1073
+ if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
1074
+ valid: !0,
1075
+ data: e
1076
+ };
1077
+ if (v(e) && v(t)) {
1078
+ let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1079
+ ...e,
1080
+ ...t
1081
+ };
1082
+ for (let n of r) {
1083
+ let r = z(e[n], t[n]);
1084
+ if (!r.valid) return {
1085
+ valid: !1,
1086
+ mergeErrorPath: [n, ...r.mergeErrorPath]
1087
+ };
1088
+ i[n] = r.data;
1089
+ }
1090
+ return {
1091
+ valid: !0,
1092
+ data: i
1093
+ };
1094
+ }
1095
+ if (Array.isArray(e) && Array.isArray(t)) {
1096
+ if (e.length !== t.length) return {
1097
+ valid: !1,
1098
+ mergeErrorPath: []
1099
+ };
1100
+ let n = [];
1101
+ for (let r = 0; r < e.length; r++) {
1102
+ let i = e[r], a = t[r], o = z(i, a);
1103
+ if (!o.valid) return {
1104
+ valid: !1,
1105
+ mergeErrorPath: [r, ...o.mergeErrorPath]
1106
+ };
1107
+ n.push(o.data);
1108
+ }
1109
+ return {
1110
+ valid: !0,
1111
+ data: n
1112
+ };
1113
+ }
1114
+ return {
1115
+ valid: !1,
1116
+ mergeErrorPath: []
1117
+ };
1118
+ }
1119
+ function B(e, t, n) {
1120
+ if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), S(e)) return e;
1121
+ let r = z(t.value, n.value);
1122
+ if (!r.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1123
+ return e.value = r.data, e;
1124
+ }
1125
+ var Xt = /*@__PURE__*/ r("$ZodEnum", (e, t) => {
1126
+ P.init(e, t);
1127
+ let n = c(t.entries), r = new Set(n);
1128
+ e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ie.has(typeof e)).map((e) => typeof e == "string" ? y(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
1129
+ let a = t.value;
1130
+ return r.has(a) || t.issues.push({
1131
+ code: "invalid_value",
1132
+ values: n,
1133
+ input: a,
1134
+ inst: e
1135
+ }), t;
1136
+ };
1137
+ }), Zt = /*@__PURE__*/ r("$ZodTransform", (e, t) => {
1138
+ P.init(e, t), e._zod.parse = (n, r) => {
1139
+ if (r.direction === "backward") throw new a(e.constructor.name);
1140
+ let o = t.transform(n.value, n);
1141
+ if (r.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((e) => (n.value = e, n));
1142
+ if (o instanceof Promise) throw new i();
1143
+ return n.value = o, n;
1144
+ };
1145
+ });
1146
+ function V(e, t) {
1147
+ return e.issues.length && t === void 0 ? {
1148
+ issues: [],
1149
+ value: void 0
1150
+ } : e;
1151
+ }
1152
+ var Qt = /*@__PURE__*/ r("$ZodOptional", (e, t) => {
1153
+ P.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", m(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), m(e._zod, "pattern", () => {
1154
+ let e = t.innerType._zod.pattern;
1155
+ return e ? RegExp(`^(${f(e.source)})?$`) : void 0;
1156
+ }), e._zod.parse = (e, n) => {
1157
+ if (t.innerType._zod.optin === "optional") {
1158
+ let r = t.innerType._zod.run(e, n);
1159
+ return r instanceof Promise ? r.then((t) => V(t, e.value)) : V(r, e.value);
1160
+ }
1161
+ return e.value === void 0 ? e : t.innerType._zod.run(e, n);
1162
+ };
1163
+ }), $t = /*@__PURE__*/ r("$ZodNullable", (e, t) => {
1164
+ P.init(e, t), m(e._zod, "optin", () => t.innerType._zod.optin), m(e._zod, "optout", () => t.innerType._zod.optout), m(e._zod, "pattern", () => {
1165
+ let e = t.innerType._zod.pattern;
1166
+ return e ? RegExp(`^(${f(e.source)}|null)$`) : void 0;
1167
+ }), m(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1168
+ }), en = /*@__PURE__*/ r("$ZodDefault", (e, t) => {
1169
+ P.init(e, t), e._zod.optin = "optional", m(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1170
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1171
+ if (e.value === void 0) return e.value = t.defaultValue, e;
1172
+ let r = t.innerType._zod.run(e, n);
1173
+ return r instanceof Promise ? r.then((e) => tn(e, t)) : tn(r, t);
1174
+ };
1175
+ });
1176
+ function tn(e, t) {
1177
+ return e.value === void 0 && (e.value = t.defaultValue), e;
1178
+ }
1179
+ var nn = /*@__PURE__*/ r("$ZodPrefault", (e, t) => {
1180
+ P.init(e, t), e._zod.optin = "optional", m(e._zod, "values", () => t.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));
1181
+ }), rn = /*@__PURE__*/ r("$ZodNonOptional", (e, t) => {
1182
+ P.init(e, t), m(e._zod, "values", () => {
1183
+ let e = t.innerType._zod.values;
1184
+ return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
1185
+ }), e._zod.parse = (n, r) => {
1186
+ let i = t.innerType._zod.run(n, r);
1187
+ return i instanceof Promise ? i.then((t) => an(t, e)) : an(i, e);
1188
+ };
1189
+ });
1190
+ function an(e, t) {
1191
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1192
+ code: "invalid_type",
1193
+ expected: "nonoptional",
1194
+ input: e.value,
1195
+ inst: t
1196
+ }), e;
1197
+ }
1198
+ var on = /*@__PURE__*/ r("$ZodCatch", (e, t) => {
1199
+ P.init(e, t), m(e._zod, "optin", () => t.innerType._zod.optin), m(e._zod, "optout", () => t.innerType._zod.optout), m(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1200
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1201
+ let r = t.innerType._zod.run(e, n);
1202
+ return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1203
+ ...e,
1204
+ error: { issues: r.issues.map((e) => T(e, n, s())) },
1205
+ input: e.value
1206
+ }), e.issues = []), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1207
+ ...e,
1208
+ error: { issues: r.issues.map((e) => T(e, n, s())) },
1209
+ input: e.value
1210
+ }), e.issues = []), e);
1211
+ };
1212
+ }), sn = /*@__PURE__*/ r("$ZodPipe", (e, t) => {
1213
+ P.init(e, t), m(e._zod, "values", () => t.in._zod.values), m(e._zod, "optin", () => t.in._zod.optin), m(e._zod, "optout", () => t.out._zod.optout), m(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
1214
+ if (n.direction === "backward") {
1215
+ let r = t.out._zod.run(e, n);
1216
+ return r instanceof Promise ? r.then((e) => H(e, t.in, n)) : H(r, t.in, n);
1217
+ }
1218
+ let r = t.in._zod.run(e, n);
1219
+ return r instanceof Promise ? r.then((e) => H(e, t.out, n)) : H(r, t.out, n);
1220
+ };
1221
+ });
1222
+ function H(e, t, n) {
1223
+ return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
1224
+ value: e.value,
1225
+ issues: e.issues
1226
+ }, n);
1227
+ }
1228
+ var cn = /*@__PURE__*/ r("$ZodReadonly", (e, t) => {
1229
+ P.init(e, t), m(e._zod, "propValues", () => t.innerType._zod.propValues), m(e._zod, "values", () => t.innerType._zod.values), m(e._zod, "optin", () => t.innerType._zod.optin), m(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (e, n) => {
1230
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1231
+ let r = t.innerType._zod.run(e, n);
1232
+ return r instanceof Promise ? r.then(ln) : ln(r);
1233
+ };
1234
+ });
1235
+ function ln(e) {
1236
+ return e.value = Object.freeze(e.value), e;
1237
+ }
1238
+ var un = /*@__PURE__*/ r("$ZodCustom", (e, t) => {
1239
+ M.init(e, t), P.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
1240
+ let r = n.value, i = t.fn(r);
1241
+ if (i instanceof Promise) return i.then((t) => dn(t, n, r, e));
1242
+ dn(i, n, r, e);
1243
+ };
1244
+ });
1245
+ function dn(e, t, n, r) {
1246
+ if (!e) {
1247
+ let e = {
1248
+ code: "custom",
1249
+ input: n,
1250
+ inst: r,
1251
+ path: [...r._zod.def.path ?? []],
1252
+ continue: !r._zod.def.abort
1253
+ };
1254
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(D(e));
1255
+ }
1256
+ }
1257
+ //#endregion
1258
+ //#region ../../node_modules/zod/v4/core/registries.js
1259
+ var fn = class {
1260
+ constructor() {
1261
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1262
+ }
1263
+ add(e, ...t) {
1264
+ let n = t[0];
1265
+ if (this._map.set(e, n), n && typeof n == "object" && "id" in n) {
1266
+ if (this._idmap.has(n.id)) throw Error(`ID ${n.id} already exists in the registry`);
1267
+ this._idmap.set(n.id, e);
1268
+ }
1269
+ return this;
1270
+ }
1271
+ clear() {
1272
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1273
+ }
1274
+ remove(e) {
1275
+ let t = this._map.get(e);
1276
+ return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
1277
+ }
1278
+ get(e) {
1279
+ let t = e._zod.parent;
1280
+ if (t) {
1281
+ let n = { ...this.get(t) ?? {} };
1282
+ delete n.id;
1283
+ let r = {
1284
+ ...n,
1285
+ ...this._map.get(e)
1286
+ };
1287
+ return Object.keys(r).length ? r : void 0;
1288
+ }
1289
+ return this._map.get(e);
1290
+ }
1291
+ has(e) {
1292
+ return this._map.has(e);
1293
+ }
1294
+ };
1295
+ function pn() {
1296
+ return new fn();
1297
+ }
1298
+ var U = /*@__PURE__*/ pn();
1299
+ //#endregion
1300
+ //#region ../../node_modules/zod/v4/core/api.js
1301
+ function mn(e, t) {
1302
+ return new e({
1303
+ type: "string",
1304
+ ...x(t)
1305
+ });
1306
+ }
1307
+ function hn(e, t) {
1308
+ return new e({
1309
+ type: "string",
1310
+ format: "email",
1311
+ check: "string_format",
1312
+ abort: !1,
1313
+ ...x(t)
1314
+ });
1315
+ }
1316
+ function gn(e, t) {
1317
+ return new e({
1318
+ type: "string",
1319
+ format: "guid",
1320
+ check: "string_format",
1321
+ abort: !1,
1322
+ ...x(t)
1323
+ });
1324
+ }
1325
+ function _n(e, t) {
1326
+ return new e({
1327
+ type: "string",
1328
+ format: "uuid",
1329
+ check: "string_format",
1330
+ abort: !1,
1331
+ ...x(t)
1332
+ });
1333
+ }
1334
+ function vn(e, t) {
1335
+ return new e({
1336
+ type: "string",
1337
+ format: "uuid",
1338
+ check: "string_format",
1339
+ abort: !1,
1340
+ version: "v4",
1341
+ ...x(t)
1342
+ });
1343
+ }
1344
+ function yn(e, t) {
1345
+ return new e({
1346
+ type: "string",
1347
+ format: "uuid",
1348
+ check: "string_format",
1349
+ abort: !1,
1350
+ version: "v6",
1351
+ ...x(t)
1352
+ });
1353
+ }
1354
+ function bn(e, t) {
1355
+ return new e({
1356
+ type: "string",
1357
+ format: "uuid",
1358
+ check: "string_format",
1359
+ abort: !1,
1360
+ version: "v7",
1361
+ ...x(t)
1362
+ });
1363
+ }
1364
+ function xn(e, t) {
1365
+ return new e({
1366
+ type: "string",
1367
+ format: "url",
1368
+ check: "string_format",
1369
+ abort: !1,
1370
+ ...x(t)
1371
+ });
1372
+ }
1373
+ function Sn(e, t) {
1374
+ return new e({
1375
+ type: "string",
1376
+ format: "emoji",
1377
+ check: "string_format",
1378
+ abort: !1,
1379
+ ...x(t)
1380
+ });
1381
+ }
1382
+ function Cn(e, t) {
1383
+ return new e({
1384
+ type: "string",
1385
+ format: "nanoid",
1386
+ check: "string_format",
1387
+ abort: !1,
1388
+ ...x(t)
1389
+ });
1390
+ }
1391
+ function wn(e, t) {
1392
+ return new e({
1393
+ type: "string",
1394
+ format: "cuid",
1395
+ check: "string_format",
1396
+ abort: !1,
1397
+ ...x(t)
1398
+ });
1399
+ }
1400
+ function Tn(e, t) {
1401
+ return new e({
1402
+ type: "string",
1403
+ format: "cuid2",
1404
+ check: "string_format",
1405
+ abort: !1,
1406
+ ...x(t)
1407
+ });
1408
+ }
1409
+ function En(e, t) {
1410
+ return new e({
1411
+ type: "string",
1412
+ format: "ulid",
1413
+ check: "string_format",
1414
+ abort: !1,
1415
+ ...x(t)
1416
+ });
1417
+ }
1418
+ function Dn(e, t) {
1419
+ return new e({
1420
+ type: "string",
1421
+ format: "xid",
1422
+ check: "string_format",
1423
+ abort: !1,
1424
+ ...x(t)
1425
+ });
1426
+ }
1427
+ function On(e, t) {
1428
+ return new e({
1429
+ type: "string",
1430
+ format: "ksuid",
1431
+ check: "string_format",
1432
+ abort: !1,
1433
+ ...x(t)
1434
+ });
1435
+ }
1436
+ function kn(e, t) {
1437
+ return new e({
1438
+ type: "string",
1439
+ format: "ipv4",
1440
+ check: "string_format",
1441
+ abort: !1,
1442
+ ...x(t)
1443
+ });
1444
+ }
1445
+ function An(e, t) {
1446
+ return new e({
1447
+ type: "string",
1448
+ format: "ipv6",
1449
+ check: "string_format",
1450
+ abort: !1,
1451
+ ...x(t)
1452
+ });
1453
+ }
1454
+ function jn(e, t) {
1455
+ return new e({
1456
+ type: "string",
1457
+ format: "cidrv4",
1458
+ check: "string_format",
1459
+ abort: !1,
1460
+ ...x(t)
1461
+ });
1462
+ }
1463
+ function Mn(e, t) {
1464
+ return new e({
1465
+ type: "string",
1466
+ format: "cidrv6",
1467
+ check: "string_format",
1468
+ abort: !1,
1469
+ ...x(t)
1470
+ });
1471
+ }
1472
+ function Nn(e, t) {
1473
+ return new e({
1474
+ type: "string",
1475
+ format: "base64",
1476
+ check: "string_format",
1477
+ abort: !1,
1478
+ ...x(t)
1479
+ });
1480
+ }
1481
+ function Pn(e, t) {
1482
+ return new e({
1483
+ type: "string",
1484
+ format: "base64url",
1485
+ check: "string_format",
1486
+ abort: !1,
1487
+ ...x(t)
1488
+ });
1489
+ }
1490
+ function Fn(e, t) {
1491
+ return new e({
1492
+ type: "string",
1493
+ format: "e164",
1494
+ check: "string_format",
1495
+ abort: !1,
1496
+ ...x(t)
1497
+ });
1498
+ }
1499
+ function In(e, t) {
1500
+ return new e({
1501
+ type: "string",
1502
+ format: "jwt",
1503
+ check: "string_format",
1504
+ abort: !1,
1505
+ ...x(t)
1506
+ });
1507
+ }
1508
+ function Ln(e, t) {
1509
+ return new e({
1510
+ type: "string",
1511
+ format: "datetime",
1512
+ check: "string_format",
1513
+ offset: !1,
1514
+ local: !1,
1515
+ precision: null,
1516
+ ...x(t)
1517
+ });
1518
+ }
1519
+ function Rn(e, t) {
1520
+ return new e({
1521
+ type: "string",
1522
+ format: "date",
1523
+ check: "string_format",
1524
+ ...x(t)
1525
+ });
1526
+ }
1527
+ function zn(e, t) {
1528
+ return new e({
1529
+ type: "string",
1530
+ format: "time",
1531
+ check: "string_format",
1532
+ precision: null,
1533
+ ...x(t)
1534
+ });
1535
+ }
1536
+ function Bn(e, t) {
1537
+ return new e({
1538
+ type: "string",
1539
+ format: "duration",
1540
+ check: "string_format",
1541
+ ...x(t)
1542
+ });
1543
+ }
1544
+ function Vn(e) {
1545
+ return new e({ type: "unknown" });
1546
+ }
1547
+ function Hn(e, t) {
1548
+ return new e({
1549
+ type: "never",
1550
+ ...x(t)
1551
+ });
1552
+ }
1553
+ function Un(e, t) {
1554
+ return new nt({
1555
+ check: "max_length",
1556
+ ...x(t),
1557
+ maximum: e
1558
+ });
1559
+ }
1560
+ function W(e, t) {
1561
+ return new rt({
1562
+ check: "min_length",
1563
+ ...x(t),
1564
+ minimum: e
1565
+ });
1566
+ }
1567
+ function Wn(e, t) {
1568
+ return new it({
1569
+ check: "length_equals",
1570
+ ...x(t),
1571
+ length: e
1572
+ });
1573
+ }
1574
+ function Gn(e, t) {
1575
+ return new at({
1576
+ check: "string_format",
1577
+ format: "regex",
1578
+ ...x(t),
1579
+ pattern: e
1580
+ });
1581
+ }
1582
+ function Kn(e) {
1583
+ return new ot({
1584
+ check: "string_format",
1585
+ format: "lowercase",
1586
+ ...x(e)
1587
+ });
1588
+ }
1589
+ function qn(e) {
1590
+ return new st({
1591
+ check: "string_format",
1592
+ format: "uppercase",
1593
+ ...x(e)
1594
+ });
1595
+ }
1596
+ function Jn(e, t) {
1597
+ return new ct({
1598
+ check: "string_format",
1599
+ format: "includes",
1600
+ ...x(t),
1601
+ includes: e
1602
+ });
1603
+ }
1604
+ function Yn(e, t) {
1605
+ return new lt({
1606
+ check: "string_format",
1607
+ format: "starts_with",
1608
+ ...x(t),
1609
+ prefix: e
1610
+ });
1611
+ }
1612
+ function Xn(e, t) {
1613
+ return new ut({
1614
+ check: "string_format",
1615
+ format: "ends_with",
1616
+ ...x(t),
1617
+ suffix: e
1618
+ });
1619
+ }
1620
+ function G(e) {
1621
+ return new dt({
1622
+ check: "overwrite",
1623
+ tx: e
1624
+ });
1625
+ }
1626
+ function Zn(e) {
1627
+ return G((t) => t.normalize(e));
1628
+ }
1629
+ function Qn() {
1630
+ return G((e) => e.trim());
1631
+ }
1632
+ function $n() {
1633
+ return G((e) => e.toLowerCase());
1634
+ }
1635
+ function er() {
1636
+ return G((e) => e.toUpperCase());
1637
+ }
1638
+ function tr(e, t, n) {
1639
+ return new e({
1640
+ type: "array",
1641
+ element: t,
1642
+ ...x(n)
1643
+ });
1644
+ }
1645
+ function nr(e, t, n) {
1646
+ return new e({
1647
+ type: "custom",
1648
+ check: "custom",
1649
+ fn: t,
1650
+ ...x(n)
1651
+ });
1652
+ }
1653
+ function rr(e) {
1654
+ let t = ir((n) => (n.addIssue = (e) => {
1655
+ if (typeof e == "string") n.issues.push(D(e, n.value, t._zod.def));
1656
+ else {
1657
+ let r = e;
1658
+ r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= n.value, r.inst ??= t, r.continue ??= !t._zod.def.abort, n.issues.push(D(r));
1659
+ }
1660
+ }, e(n.value, n)));
1661
+ return t;
1662
+ }
1663
+ function ir(e, t) {
1664
+ let n = new M({
1665
+ check: "custom",
1666
+ ...x(t)
1667
+ });
1668
+ return n._zod.check = e, n;
1669
+ }
1670
+ //#endregion
1671
+ //#region ../../node_modules/zod/v4/classic/iso.js
1672
+ var ar = /*@__PURE__*/ r("ZodISODateTime", (e, t) => {
1673
+ Tt.init(e, t), J.init(e, t);
1674
+ });
1675
+ function or(e) {
1676
+ return Ln(ar, e);
1677
+ }
1678
+ var sr = /*@__PURE__*/ r("ZodISODate", (e, t) => {
1679
+ Et.init(e, t), J.init(e, t);
1680
+ });
1681
+ function cr(e) {
1682
+ return Rn(sr, e);
1683
+ }
1684
+ var lr = /*@__PURE__*/ r("ZodISOTime", (e, t) => {
1685
+ Dt.init(e, t), J.init(e, t);
1686
+ });
1687
+ function ur(e) {
1688
+ return zn(lr, e);
1689
+ }
1690
+ var dr = /*@__PURE__*/ r("ZodISODuration", (e, t) => {
1691
+ Ot.init(e, t), J.init(e, t);
1692
+ });
1693
+ function fr(e) {
1694
+ return Bn(dr, e);
1695
+ }
1696
+ //#endregion
1697
+ //#region ../../node_modules/zod/v4/classic/errors.js
1698
+ var pr = (e, t) => {
1699
+ me.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
1700
+ format: { value: (t) => _e(e, t) },
1701
+ flatten: { value: (t) => ge(e, t) },
1702
+ addIssue: { value: (t) => {
1703
+ e.issues.push(t), e.message = JSON.stringify(e.issues, l, 2);
1704
+ } },
1705
+ addIssues: { value: (t) => {
1706
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, l, 2);
1707
+ } },
1708
+ isEmpty: { get() {
1709
+ return e.issues.length === 0;
1710
+ } }
1711
+ });
1712
+ };
1713
+ r("ZodError", pr);
1714
+ var K = r("ZodError", pr, { Parent: Error }), mr = /* @__PURE__ */ O(K), hr = /* @__PURE__ */ k(K), gr = /* @__PURE__ */ A(K), _r = /* @__PURE__ */ j(K), vr = /* @__PURE__ */ be(K), yr = /* @__PURE__ */ xe(K), br = /* @__PURE__ */ Se(K), xr = /* @__PURE__ */ Ce(K), Sr = /* @__PURE__ */ we(K), Cr = /* @__PURE__ */ Te(K), wr = /* @__PURE__ */ Ee(K), Tr = /* @__PURE__ */ De(K), q = /*@__PURE__*/ r("ZodType", (e, t) => (P.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(g(t, { checks: [...t.checks ?? [], ...n.map((e) => typeof e == "function" ? { _zod: {
1715
+ check: e,
1716
+ def: { check: "custom" },
1717
+ onattach: []
1718
+ } } : e)] })), e.clone = (t, n) => b(e, t, n), e.brand = () => e, e.register = ((t, n) => (t.add(e, n), e)), e.parse = (t, n) => mr(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => gr(e, t, n), e.parseAsync = async (t, n) => hr(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => _r(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => vr(e, t, n), e.decode = (t, n) => yr(e, t, n), e.encodeAsync = async (t, n) => br(e, t, n), e.decodeAsync = async (t, n) => xr(e, t, n), e.safeEncode = (t, n) => Sr(e, t, n), e.safeDecode = (t, n) => Cr(e, t, n), e.safeEncodeAsync = async (t, n) => wr(e, t, n), e.safeDecodeAsync = async (t, n) => Tr(e, t, n), e.refine = (t, n) => e.check(wi(t, n)), e.superRefine = (t) => e.check(Ti(t)), e.overwrite = (t) => e.check(G(t)), e.optional = () => ci(e), e.nullable = () => ui(e), e.nullish = () => ci(ui(e)), e.nonoptional = (t) => gi(e, t), e.array = () => Zr(e), e.or = (t) => ti([e, t]), e.and = (t) => ri(e, t), e.transform = (t) => bi(e, oi(t)), e.default = (t) => fi(e, t), e.prefault = (t) => mi(e, t), e.catch = (t) => vi(e, t), e.pipe = (t) => bi(e, t), e.readonly = () => Si(e), e.describe = (t) => {
1719
+ let n = e.clone();
1720
+ return U.add(n, { description: t }), n;
1721
+ }, Object.defineProperty(e, "description", {
1722
+ get() {
1723
+ return U.get(e)?.description;
1724
+ },
1725
+ configurable: !0
1726
+ }), e.meta = (...t) => {
1727
+ if (t.length === 0) return U.get(e);
1728
+ let n = e.clone();
1729
+ return U.add(n, t[0]), n;
1730
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Er = /*@__PURE__*/ r("_ZodString", (e, t) => {
1731
+ F.init(e, t), q.init(e, t);
1732
+ let n = e._zod.bag;
1733
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...t) => e.check(Gn(...t)), e.includes = (...t) => e.check(Jn(...t)), e.startsWith = (...t) => e.check(Yn(...t)), e.endsWith = (...t) => e.check(Xn(...t)), e.min = (...t) => e.check(W(...t)), e.max = (...t) => e.check(Un(...t)), e.length = (...t) => e.check(Wn(...t)), e.nonempty = (...t) => e.check(W(1, ...t)), e.lowercase = (t) => e.check(Kn(t)), e.uppercase = (t) => e.check(qn(t)), e.trim = () => e.check(Qn()), e.normalize = (...t) => e.check(Zn(...t)), e.toLowerCase = () => e.check($n()), e.toUpperCase = () => e.check(er());
1734
+ }), Dr = /*@__PURE__*/ r("ZodString", (e, t) => {
1735
+ F.init(e, t), Er.init(e, t), e.email = (t) => e.check(hn(kr, t)), e.url = (t) => e.check(xn(jr, t)), e.jwt = (t) => e.check(In(Kr, t)), e.emoji = (t) => e.check(Sn(Mr, t)), e.guid = (t) => e.check(gn(Ar, t)), e.uuid = (t) => e.check(_n(Y, t)), e.uuidv4 = (t) => e.check(vn(Y, t)), e.uuidv6 = (t) => e.check(yn(Y, t)), e.uuidv7 = (t) => e.check(bn(Y, t)), e.nanoid = (t) => e.check(Cn(Nr, t)), e.guid = (t) => e.check(gn(Ar, t)), e.cuid = (t) => e.check(wn(Pr, t)), e.cuid2 = (t) => e.check(Tn(Fr, t)), e.ulid = (t) => e.check(En(Ir, t)), e.base64 = (t) => e.check(Nn(Ur, t)), e.base64url = (t) => e.check(Pn(Wr, t)), e.xid = (t) => e.check(Dn(Lr, t)), e.ksuid = (t) => e.check(On(Rr, t)), e.ipv4 = (t) => e.check(kn(zr, t)), e.ipv6 = (t) => e.check(An(Br, t)), e.cidrv4 = (t) => e.check(jn(Vr, t)), e.cidrv6 = (t) => e.check(Mn(Hr, t)), e.e164 = (t) => e.check(Fn(Gr, t)), e.datetime = (t) => e.check(or(t)), e.date = (t) => e.check(cr(t)), e.time = (t) => e.check(ur(t)), e.duration = (t) => e.check(fr(t));
1736
+ });
1737
+ function Or(e) {
1738
+ return mn(Dr, e);
1739
+ }
1740
+ var J = /*@__PURE__*/ r("ZodStringFormat", (e, t) => {
1741
+ I.init(e, t), Er.init(e, t);
1742
+ }), kr = /*@__PURE__*/ r("ZodEmail", (e, t) => {
1743
+ gt.init(e, t), J.init(e, t);
1744
+ }), Ar = /*@__PURE__*/ r("ZodGUID", (e, t) => {
1745
+ mt.init(e, t), J.init(e, t);
1746
+ }), Y = /*@__PURE__*/ r("ZodUUID", (e, t) => {
1747
+ ht.init(e, t), J.init(e, t);
1748
+ }), jr = /*@__PURE__*/ r("ZodURL", (e, t) => {
1749
+ _t.init(e, t), J.init(e, t);
1750
+ }), Mr = /*@__PURE__*/ r("ZodEmoji", (e, t) => {
1751
+ vt.init(e, t), J.init(e, t);
1752
+ }), Nr = /*@__PURE__*/ r("ZodNanoID", (e, t) => {
1753
+ yt.init(e, t), J.init(e, t);
1754
+ }), Pr = /*@__PURE__*/ r("ZodCUID", (e, t) => {
1755
+ bt.init(e, t), J.init(e, t);
1756
+ }), Fr = /*@__PURE__*/ r("ZodCUID2", (e, t) => {
1757
+ xt.init(e, t), J.init(e, t);
1758
+ }), Ir = /*@__PURE__*/ r("ZodULID", (e, t) => {
1759
+ St.init(e, t), J.init(e, t);
1760
+ }), Lr = /*@__PURE__*/ r("ZodXID", (e, t) => {
1761
+ Ct.init(e, t), J.init(e, t);
1762
+ }), Rr = /*@__PURE__*/ r("ZodKSUID", (e, t) => {
1763
+ wt.init(e, t), J.init(e, t);
1764
+ }), zr = /*@__PURE__*/ r("ZodIPv4", (e, t) => {
1765
+ kt.init(e, t), J.init(e, t);
1766
+ }), Br = /*@__PURE__*/ r("ZodIPv6", (e, t) => {
1767
+ At.init(e, t), J.init(e, t);
1768
+ }), Vr = /*@__PURE__*/ r("ZodCIDRv4", (e, t) => {
1769
+ jt.init(e, t), J.init(e, t);
1770
+ }), Hr = /*@__PURE__*/ r("ZodCIDRv6", (e, t) => {
1771
+ Mt.init(e, t), J.init(e, t);
1772
+ }), Ur = /*@__PURE__*/ r("ZodBase64", (e, t) => {
1773
+ Pt.init(e, t), J.init(e, t);
1774
+ }), Wr = /*@__PURE__*/ r("ZodBase64URL", (e, t) => {
1775
+ It.init(e, t), J.init(e, t);
1776
+ }), Gr = /*@__PURE__*/ r("ZodE164", (e, t) => {
1777
+ Lt.init(e, t), J.init(e, t);
1778
+ }), Kr = /*@__PURE__*/ r("ZodJWT", (e, t) => {
1779
+ zt.init(e, t), J.init(e, t);
1780
+ }), qr = /*@__PURE__*/ r("ZodUnknown", (e, t) => {
1781
+ Bt.init(e, t), q.init(e, t);
1782
+ });
1783
+ function X() {
1784
+ return Vn(qr);
1785
+ }
1786
+ var Jr = /*@__PURE__*/ r("ZodNever", (e, t) => {
1787
+ Vt.init(e, t), q.init(e, t);
1788
+ });
1789
+ function Yr(e) {
1790
+ return Hn(Jr, e);
1791
+ }
1792
+ var Xr = /*@__PURE__*/ r("ZodArray", (e, t) => {
1793
+ Ut.init(e, t), q.init(e, t), e.element = t.element, e.min = (t, n) => e.check(W(t, n)), e.nonempty = (t) => e.check(W(1, t)), e.max = (t, n) => e.check(Un(t, n)), e.length = (t, n) => e.check(Wn(t, n)), e.unwrap = () => e.element;
1794
+ });
1795
+ function Zr(e, t) {
1796
+ return tr(Xr, e, t);
1797
+ }
1798
+ var Qr = /*@__PURE__*/ r("ZodObject", (e, t) => {
1799
+ qt.init(e, t), q.init(e, t), m(e, "shape", () => t.shape), e.keyof = () => ii(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({
1800
+ ...e._zod.def,
1801
+ catchall: t
1802
+ }), e.passthrough = () => e.clone({
1803
+ ...e._zod.def,
1804
+ catchall: X()
1805
+ }), e.loose = () => e.clone({
1806
+ ...e._zod.def,
1807
+ catchall: X()
1808
+ }), e.strict = () => e.clone({
1809
+ ...e._zod.def,
1810
+ catchall: Yr()
1811
+ }), e.strip = () => e.clone({
1812
+ ...e._zod.def,
1813
+ catchall: void 0
1814
+ }), e.extend = (t) => ce(e, t), e.safeExtend = (t) => le(e, t), e.merge = (t) => ue(e, t), e.pick = (t) => oe(e, t), e.omit = (t) => se(e, t), e.partial = (...t) => de(si, e, t[0]), e.required = (...t) => fe(hi, e, t[0]);
1815
+ });
1816
+ function $r(e, t) {
1817
+ return new Qr({
1818
+ type: "object",
1819
+ shape: e ?? {},
1820
+ ...x(t)
1821
+ });
1822
+ }
1823
+ var ei = /*@__PURE__*/ r("ZodUnion", (e, t) => {
1824
+ Jt.init(e, t), q.init(e, t), e.options = t.options;
1825
+ });
1826
+ function ti(e, t) {
1827
+ return new ei({
1828
+ type: "union",
1829
+ options: e,
1830
+ ...x(t)
1831
+ });
1832
+ }
1833
+ var ni = /*@__PURE__*/ r("ZodIntersection", (e, t) => {
1834
+ Yt.init(e, t), q.init(e, t);
1835
+ });
1836
+ function ri(e, t) {
1837
+ return new ni({
1838
+ type: "intersection",
1839
+ left: e,
1840
+ right: t
1841
+ });
1842
+ }
1843
+ var Z = /*@__PURE__*/ r("ZodEnum", (e, t) => {
1844
+ Xt.init(e, t), q.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
1845
+ let n = new Set(Object.keys(t.entries));
1846
+ e.extract = (e, r) => {
1847
+ let i = {};
1848
+ for (let r of e) if (n.has(r)) i[r] = t.entries[r];
1849
+ else throw Error(`Key ${r} not found in enum`);
1850
+ return new Z({
1851
+ ...t,
1852
+ checks: [],
1853
+ ...x(r),
1854
+ entries: i
1855
+ });
1856
+ }, e.exclude = (e, r) => {
1857
+ let i = { ...t.entries };
1858
+ for (let t of e) if (n.has(t)) delete i[t];
1859
+ else throw Error(`Key ${t} not found in enum`);
1860
+ return new Z({
1861
+ ...t,
1862
+ checks: [],
1863
+ ...x(r),
1864
+ entries: i
1865
+ });
1866
+ };
1867
+ });
1868
+ function ii(e, t) {
1869
+ return new Z({
1870
+ type: "enum",
1871
+ entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
1872
+ ...x(t)
1873
+ });
1874
+ }
1875
+ var ai = /*@__PURE__*/ r("ZodTransform", (e, t) => {
1876
+ Zt.init(e, t), q.init(e, t), e._zod.parse = (n, r) => {
1877
+ if (r.direction === "backward") throw new a(e.constructor.name);
1878
+ n.addIssue = (r) => {
1879
+ if (typeof r == "string") n.issues.push(D(r, n.value, t));
1880
+ else {
1881
+ let t = r;
1882
+ t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(D(t));
1883
+ }
1884
+ };
1885
+ let i = t.transform(n.value, n);
1886
+ return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
1887
+ };
1888
+ });
1889
+ function oi(e) {
1890
+ return new ai({
1891
+ type: "transform",
1892
+ transform: e
1893
+ });
1894
+ }
1895
+ var si = /*@__PURE__*/ r("ZodOptional", (e, t) => {
1896
+ Qt.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType;
1897
+ });
1898
+ function ci(e) {
1899
+ return new si({
1900
+ type: "optional",
1901
+ innerType: e
1902
+ });
1903
+ }
1904
+ var li = /*@__PURE__*/ r("ZodNullable", (e, t) => {
1905
+ $t.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType;
1906
+ });
1907
+ function ui(e) {
1908
+ return new li({
1909
+ type: "nullable",
1910
+ innerType: e
1911
+ });
1912
+ }
1913
+ var di = /*@__PURE__*/ r("ZodDefault", (e, t) => {
1914
+ en.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
1915
+ });
1916
+ function fi(e, t) {
1917
+ return new di({
1918
+ type: "default",
1919
+ innerType: e,
1920
+ get defaultValue() {
1921
+ return typeof t == "function" ? t() : re(t);
1922
+ }
1923
+ });
1924
+ }
1925
+ var pi = /*@__PURE__*/ r("ZodPrefault", (e, t) => {
1926
+ nn.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType;
1927
+ });
1928
+ function mi(e, t) {
1929
+ return new pi({
1930
+ type: "prefault",
1931
+ innerType: e,
1932
+ get defaultValue() {
1933
+ return typeof t == "function" ? t() : re(t);
1934
+ }
1935
+ });
1936
+ }
1937
+ var hi = /*@__PURE__*/ r("ZodNonOptional", (e, t) => {
1938
+ rn.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType;
1939
+ });
1940
+ function gi(e, t) {
1941
+ return new hi({
1942
+ type: "nonoptional",
1943
+ innerType: e,
1944
+ ...x(t)
1945
+ });
1946
+ }
1947
+ var _i = /*@__PURE__*/ r("ZodCatch", (e, t) => {
1948
+ on.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
1949
+ });
1950
+ function vi(e, t) {
1951
+ return new _i({
1952
+ type: "catch",
1953
+ innerType: e,
1954
+ catchValue: typeof t == "function" ? t : () => t
1955
+ });
1956
+ }
1957
+ var yi = /*@__PURE__*/ r("ZodPipe", (e, t) => {
1958
+ sn.init(e, t), q.init(e, t), e.in = t.in, e.out = t.out;
1959
+ });
1960
+ function bi(e, t) {
1961
+ return new yi({
1962
+ type: "pipe",
1963
+ in: e,
1964
+ out: t
1965
+ });
1966
+ }
1967
+ var xi = /*@__PURE__*/ r("ZodReadonly", (e, t) => {
1968
+ cn.init(e, t), q.init(e, t), e.unwrap = () => e._zod.def.innerType;
1969
+ });
1970
+ function Si(e) {
1971
+ return new xi({
1972
+ type: "readonly",
1973
+ innerType: e
1974
+ });
1975
+ }
1976
+ var Ci = /*@__PURE__*/ r("ZodCustom", (e, t) => {
1977
+ un.init(e, t), q.init(e, t);
1978
+ });
1979
+ function wi(e, t = {}) {
1980
+ return nr(Ci, e, t);
1981
+ }
1982
+ function Ti(e) {
1983
+ return rr(e);
1984
+ }
1985
+ //#endregion
1986
+ //#region ../twenty-shared/node_modules/class-validator/esm5/metadata/ValidationMetadata.js
1987
+ var Ei = function() {
1988
+ function e(e) {
1989
+ this.groups = [], this.each = !1, this.context = void 0, this.type = e.type, this.name = e.name, this.target = e.target, this.propertyName = e.propertyName, this.constraints = e?.constraints, this.constraintCls = e.constraintCls, this.validationTypeOptions = e.validationTypeOptions, e.validationOptions && (this.message = e.validationOptions.message, this.groups = e.validationOptions.groups, this.always = e.validationOptions.always, this.each = e.validationOptions.each, this.context = e.validationOptions.context);
1990
+ }
1991
+ return e;
1992
+ }(), Di = function() {
1993
+ function e() {}
1994
+ return e.prototype.transform = function(e) {
1995
+ var t = [];
1996
+ return Object.keys(e.properties).forEach(function(n) {
1997
+ e.properties[n].forEach(function(r) {
1998
+ var i = {
1999
+ message: r.message,
2000
+ groups: r.groups,
2001
+ always: r.always,
2002
+ each: r.each
2003
+ }, a = {
2004
+ type: r.type,
2005
+ name: r.name,
2006
+ target: e.name,
2007
+ propertyName: n,
2008
+ constraints: r.constraints,
2009
+ validationTypeOptions: r.options,
2010
+ validationOptions: i
2011
+ };
2012
+ t.push(new Ei(a));
2013
+ });
2014
+ }), t;
2015
+ }, e;
2016
+ }(), Oi = function(e) {
2017
+ var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
2018
+ if (n) return n.call(e);
2019
+ if (e && typeof e.length == "number") return { next: function() {
2020
+ return e && r >= e.length && (e = void 0), {
2021
+ value: e && e[r++],
2022
+ done: !e
2023
+ };
2024
+ } };
2025
+ throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
2026
+ }, ki = function(e, t) {
2027
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
2028
+ if (!n) return e;
2029
+ var r = n.call(e), i, a = [], o;
2030
+ try {
2031
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
2032
+ } catch (e) {
2033
+ o = { error: e };
2034
+ } finally {
2035
+ try {
2036
+ i && !i.done && (n = r.return) && n.call(r);
2037
+ } finally {
2038
+ if (o) throw o.error;
2039
+ }
2040
+ }
2041
+ return a;
2042
+ }, Ai = function(e, t, n) {
2043
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
2044
+ return e.concat(a || Array.prototype.slice.call(t));
2045
+ };
2046
+ (function() {
2047
+ function e() {
2048
+ this.validationMetadatas = /* @__PURE__ */ new Map(), this.constraintMetadatas = /* @__PURE__ */ new Map();
2049
+ }
2050
+ return Object.defineProperty(e.prototype, "hasValidationMetaData", {
2051
+ get: function() {
2052
+ return !!this.validationMetadatas.size;
2053
+ },
2054
+ enumerable: !1,
2055
+ configurable: !0
2056
+ }), e.prototype.addValidationSchema = function(e) {
2057
+ var t = this;
2058
+ new Di().transform(e).forEach(function(e) {
2059
+ return t.addValidationMetadata(e);
2060
+ });
2061
+ }, e.prototype.addValidationMetadata = function(e) {
2062
+ var t = this.validationMetadatas.get(e.target);
2063
+ t ? t.push(e) : this.validationMetadatas.set(e.target, [e]);
2064
+ }, e.prototype.addConstraintMetadata = function(e) {
2065
+ var t = this.constraintMetadatas.get(e.target);
2066
+ t ? t.push(e) : this.constraintMetadatas.set(e.target, [e]);
2067
+ }, e.prototype.groupByPropertyName = function(e) {
2068
+ var t = {};
2069
+ return e.forEach(function(e) {
2070
+ t[e.propertyName] || (t[e.propertyName] = []), t[e.propertyName].push(e);
2071
+ }), t;
2072
+ }, e.prototype.getTargetValidationMetadatas = function(e, t, n, r, i) {
2073
+ var a, o, s = function(e) {
2074
+ return e.always === void 0 ? e.groups && e.groups.length ? !1 : n : e.always;
2075
+ }, c = function(e) {
2076
+ return !!(r && (!i || !i.length) && e.groups && e.groups.length);
2077
+ }, l = (this.validationMetadatas.get(e) || []).filter(function(n) {
2078
+ return n.target !== e && n.target !== t ? !1 : s(n) ? !0 : c(n) ? !1 : i && i.length > 0 ? n.groups && !!n.groups.find(function(e) {
2079
+ return i.indexOf(e) !== -1;
2080
+ }) : !0;
2081
+ }), u = [];
2082
+ try {
2083
+ for (var d = Oi(this.validationMetadatas.entries()), f = d.next(); !f.done; f = d.next()) {
2084
+ var p = ki(f.value, 2), m = p[0], h = p[1];
2085
+ e.prototype instanceof m && u.push.apply(u, Ai([], ki(h), !1));
2086
+ }
2087
+ } catch (e) {
2088
+ a = { error: e };
2089
+ } finally {
2090
+ try {
2091
+ f && !f.done && (o = d.return) && o.call(d);
2092
+ } finally {
2093
+ if (a) throw a.error;
2094
+ }
2095
+ }
2096
+ var g = u.filter(function(t) {
2097
+ return typeof t.target == "string" || t.target === e || t.target instanceof Function && !(e.prototype instanceof t.target) ? !1 : s(t) ? !0 : c(t) ? !1 : i && i.length > 0 ? t.groups && !!t.groups.find(function(e) {
2098
+ return i.indexOf(e) !== -1;
2099
+ }) : !0;
2100
+ }).filter(function(e) {
2101
+ return !l.find(function(t) {
2102
+ return t.propertyName === e.propertyName && t.type === e.type;
2103
+ });
2104
+ });
2105
+ return l.concat(g);
2106
+ }, e.prototype.getTargetValidatorConstraints = function(e) {
2107
+ return this.constraintMetadatas.get(e) || [];
2108
+ }, e;
2109
+ })(), function() {
2110
+ function e() {}
2111
+ return e.isValid = function(e) {
2112
+ var t = this;
2113
+ return e !== "isValid" && e !== "getMessage" && Object.keys(this).map(function(e) {
2114
+ return t[e];
2115
+ }).indexOf(e) !== -1;
2116
+ }, e.CUSTOM_VALIDATION = "customValidation", e.NESTED_VALIDATION = "nestedValidation", e.PROMISE_VALIDATION = "promiseValidation", e.CONDITIONAL_VALIDATION = "conditionalValidation", e.WHITELIST = "whitelistValidation", e.IS_DEFINED = "isDefined", e;
2117
+ }();
2118
+ //#endregion
2119
+ //#region ../twenty-shared/node_modules/class-validator/esm5/validation/ValidationTypes.js
2120
+ var ji = new (function() {
2121
+ function e() {
2122
+ this.instances = [];
2123
+ }
2124
+ return e.prototype.get = function(e) {
2125
+ var t = this.instances.find(function(t) {
2126
+ return t.type === e;
2127
+ });
2128
+ return t || (t = {
2129
+ type: e,
2130
+ object: new e()
2131
+ }, this.instances.push(t)), t.object;
2132
+ }, e;
2133
+ }())(), Mi, Q;
2134
+ function Ni(e) {
2135
+ if (Mi) try {
2136
+ var t = Mi.get(e);
2137
+ if (t || !Q || !Q.fallback) return t;
2138
+ } catch (e) {
2139
+ if (!Q || !Q.fallbackOnErrors) throw e;
2140
+ }
2141
+ return ji.get(e);
2142
+ }
2143
+ (function() {
2144
+ function e(e, t, n) {
2145
+ n === void 0 && (n = !1), this.target = e, this.name = t, this.async = n;
2146
+ }
2147
+ return Object.defineProperty(e.prototype, "instance", {
2148
+ get: function() {
2149
+ return Ni(this.target);
2150
+ },
2151
+ enumerable: !1,
2152
+ configurable: !0
2153
+ }), e;
2154
+ })();
2155
+ //#endregion
2156
+ //#region ../twenty-shared/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js
2157
+ var $ = /* @__PURE__ */ function(e) {
5
2158
  return e.ACTOR = "ACTOR", e.ADDRESS = "ADDRESS", e.ARRAY = "ARRAY", e.BOOLEAN = "BOOLEAN", e.CURRENCY = "CURRENCY", e.DATE = "DATE", e.DATE_TIME = "DATE_TIME", e.EMAILS = "EMAILS", e.FILES = "FILES", e.FULL_NAME = "FULL_NAME", e.LINKS = "LINKS", e.MORPH_RELATION = "MORPH_RELATION", e.MULTI_SELECT = "MULTI_SELECT", e.NUMBER = "NUMBER", e.NUMERIC = "NUMERIC", e.PHONES = "PHONES", e.POSITION = "POSITION", e.RATING = "RATING", e.RAW_JSON = "RAW_JSON", e.RELATION = "RELATION", e.RICH_TEXT = "RICH_TEXT", e.SELECT = "SELECT", e.TEXT = "TEXT", e.TS_VECTOR = "TS_VECTOR", e.UUID = "UUID", e;
6
- }({});
7
- n.TEXT, n.ARRAY, n.BOOLEAN, n.DATE, n.DATE_TIME, n.NUMBER, n.NUMERIC, n.RAW_JSON, n.RICH_TEXT, n.SELECT, n.MULTI_SELECT;
2159
+ }({}), Pi = /* @__PURE__ */ function(e) {
2160
+ return e.EMAIL = "EMAIL", e.CALENDAR = "CALENDAR", e.WORKFLOW = "WORKFLOW", e.AGENT = "AGENT", e.API = "API", e.IMPORT = "IMPORT", e.MANUAL = "MANUAL", e.SYSTEM = "SYSTEM", e.WEBHOOK = "WEBHOOK", e.APPLICATION = "APPLICATION", e;
2161
+ }({}), Fi = {
2162
+ type: $.ACTOR,
2163
+ properties: [
2164
+ {
2165
+ name: "source",
2166
+ type: $.SELECT,
2167
+ hidden: !1,
2168
+ isRequired: !0,
2169
+ options: Object.keys(Pi).map((t, n) => ({
2170
+ id: e(),
2171
+ label: `${Pi[t].toLowerCase()}`,
2172
+ value: t,
2173
+ position: n
2174
+ }))
2175
+ },
2176
+ {
2177
+ name: "workspaceMemberId",
2178
+ type: $.UUID,
2179
+ hidden: "input",
2180
+ isRequired: !1
2181
+ },
2182
+ {
2183
+ name: "name",
2184
+ type: $.TEXT,
2185
+ hidden: "input",
2186
+ isRequired: !0
2187
+ },
2188
+ {
2189
+ name: "context",
2190
+ type: $.RAW_JSON,
2191
+ hidden: !1,
2192
+ isRequired: !1
2193
+ }
2194
+ ]
2195
+ }, Ii = {
2196
+ type: $.ADDRESS,
2197
+ properties: [
2198
+ {
2199
+ name: "addressStreet1",
2200
+ type: $.TEXT,
2201
+ hidden: !1,
2202
+ isRequired: !1
2203
+ },
2204
+ {
2205
+ name: "addressStreet2",
2206
+ type: $.TEXT,
2207
+ hidden: !1,
2208
+ isRequired: !1
2209
+ },
2210
+ {
2211
+ name: "addressCity",
2212
+ type: $.TEXT,
2213
+ hidden: !1,
2214
+ isRequired: !1
2215
+ },
2216
+ {
2217
+ name: "addressPostcode",
2218
+ type: $.TEXT,
2219
+ hidden: !1,
2220
+ isRequired: !1
2221
+ },
2222
+ {
2223
+ name: "addressState",
2224
+ type: $.TEXT,
2225
+ hidden: !1,
2226
+ isRequired: !1
2227
+ },
2228
+ {
2229
+ name: "addressCountry",
2230
+ type: $.TEXT,
2231
+ hidden: !1,
2232
+ isRequired: !1
2233
+ },
2234
+ {
2235
+ name: "addressLat",
2236
+ type: $.NUMERIC,
2237
+ hidden: !1,
2238
+ isRequired: !1
2239
+ },
2240
+ {
2241
+ name: "addressLng",
2242
+ type: $.NUMERIC,
2243
+ hidden: !1,
2244
+ isRequired: !1
2245
+ }
2246
+ ]
2247
+ }, Li = {
2248
+ type: $.CURRENCY,
2249
+ properties: [{
2250
+ name: "amountMicros",
2251
+ type: $.NUMERIC,
2252
+ hidden: !1,
2253
+ isRequired: !1
2254
+ }, {
2255
+ name: "currencyCode",
2256
+ type: $.TEXT,
2257
+ hidden: !1,
2258
+ isRequired: !1
2259
+ }]
2260
+ }, Ri = {
2261
+ type: $.EMAILS,
2262
+ properties: [{
2263
+ name: "primaryEmail",
2264
+ type: $.TEXT,
2265
+ hidden: !1,
2266
+ isRequired: !1,
2267
+ isIncludedInUniqueConstraint: !0
2268
+ }, {
2269
+ name: "additionalEmails",
2270
+ type: $.RAW_JSON,
2271
+ hidden: !1,
2272
+ isRequired: !1
2273
+ }]
2274
+ }, zi = {
2275
+ type: $.FULL_NAME,
2276
+ properties: [{
2277
+ name: "firstName",
2278
+ type: $.TEXT,
2279
+ hidden: !1,
2280
+ isRequired: !1,
2281
+ isIncludedInUniqueConstraint: !1
2282
+ }, {
2283
+ name: "lastName",
2284
+ type: $.TEXT,
2285
+ hidden: !1,
2286
+ isRequired: !1,
2287
+ isIncludedInUniqueConstraint: !1
2288
+ }]
2289
+ }, Bi = {
2290
+ type: $.LINKS,
2291
+ properties: [
2292
+ {
2293
+ name: "primaryLinkLabel",
2294
+ type: $.TEXT,
2295
+ hidden: !1,
2296
+ isRequired: !1
2297
+ },
2298
+ {
2299
+ name: "primaryLinkUrl",
2300
+ type: $.TEXT,
2301
+ hidden: !1,
2302
+ isRequired: !1,
2303
+ isIncludedInUniqueConstraint: !0
2304
+ },
2305
+ {
2306
+ name: "secondaryLinks",
2307
+ type: $.RAW_JSON,
2308
+ hidden: !1,
2309
+ isRequired: !1
2310
+ }
2311
+ ]
2312
+ }, Vi = {
2313
+ type: $.PHONES,
2314
+ properties: [
2315
+ {
2316
+ name: "primaryPhoneNumber",
2317
+ type: $.TEXT,
2318
+ hidden: !1,
2319
+ isRequired: !1,
2320
+ isIncludedInUniqueConstraint: !0
2321
+ },
2322
+ {
2323
+ name: "primaryPhoneCountryCode",
2324
+ type: $.TEXT,
2325
+ hidden: !1,
2326
+ isRequired: !1,
2327
+ isIncludedInUniqueConstraint: !0
2328
+ },
2329
+ {
2330
+ name: "primaryPhoneCallingCode",
2331
+ type: $.TEXT,
2332
+ hidden: !1,
2333
+ isRequired: !1,
2334
+ isIncludedInUniqueConstraint: !0
2335
+ },
2336
+ {
2337
+ name: "additionalPhones",
2338
+ type: $.RAW_JSON,
2339
+ hidden: !1,
2340
+ isRequired: !1
2341
+ }
2342
+ ]
2343
+ }, Hi = {
2344
+ type: $.RICH_TEXT,
2345
+ properties: [{
2346
+ name: "blocknote",
2347
+ type: $.TEXT,
2348
+ hidden: !1,
2349
+ isRequired: !1
2350
+ }, {
2351
+ name: "markdown",
2352
+ type: $.TEXT,
2353
+ hidden: !1,
2354
+ isRequired: !1
2355
+ }]
2356
+ };
2357
+ $r({
2358
+ blocknote: Or().nullable().optional(),
2359
+ markdown: Or().nullable()
2360
+ }), new Map([
2361
+ [$.LINKS, Bi],
2362
+ [$.CURRENCY, Li],
2363
+ [$.FULL_NAME, zi],
2364
+ [$.ADDRESS, Ii],
2365
+ [$.ACTOR, Fi],
2366
+ [$.EMAILS, Ri],
2367
+ [$.PHONES, Vi],
2368
+ [$.RICH_TEXT, Hi]
2369
+ ]), $.RELATION, $.MORPH_RELATION, $.FILES, $.TS_VECTOR, $.TEXT, $.ARRAY, $.BOOLEAN, $.DATE, $.DATE_TIME, $.NUMBER, $.NUMERIC, $.RAW_JSON, $.RICH_TEXT, $.SELECT, $.MULTI_SELECT;
8
2370
  //#endregion
9
2371
  //#region ../twenty-shared/dist/application.mjs
10
- var r = "TWENTY_API_URL", i = "TWENTY_APP_ACCESS_TOKEN", a = (e) => {
2372
+ var Ui = "TWENTY_API_URL", Wi = "TWENTY_APP_ACCESS_TOKEN", Gi = (e) => {
11
2373
  let t = JSON.parse(atob(e.split(".")[1]));
12
2374
  return {
13
2375
  workspaceId: t.workspaceId,
14
2376
  applicationId: t.applicationId
15
2377
  };
16
- }, o = (e) => {
17
- let t = process.env[r], n = process.env[i];
2378
+ }, Ki = (e) => {
2379
+ let t = process.env[Ui], n = process.env[Wi];
18
2380
  if (!t || !n) throw Error("getPublicAssetUrl can only be called from within a logic function or front component");
19
- let { workspaceId: o, applicationId: s } = a(n), c = e.startsWith("/") ? e.slice(1) : e;
20
- return `${t}/public-assets/${o}/${s}/${(c.startsWith("public/") ? c : `public/${c}`).split("/").map(encodeURIComponent).join("/")}`;
21
- }, s = (n) => !t(n) && !e(n);
2381
+ let { workspaceId: r, applicationId: i } = Gi(n), a = e.startsWith("/") ? e.slice(1) : e;
2382
+ return `${t}/public-assets/${r}/${i}/${(a.startsWith("public/") ? a : `public/${a}`).split("/").map(encodeURIComponent).join("/")}`;
2383
+ }, qi = (e) => !n(e) && !t(e);
22
2384
  //#endregion
23
- export { o as getPublicAssetUrl, s as isDefined };
2385
+ export { Ki as getPublicAssetUrl, qi as isDefined };
24
2386
 
25
2387
  //# sourceMappingURL=index.mjs.map