gci-chatbot-ai 1.0.10 → 1.0.11

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.
@@ -1,6 +1,6 @@
1
- import { ref as he, h as rt, defineComponent as Bn, computed as Wn, watch as Yn, nextTick as qn, openBlock as B, createElementBlock as q, Fragment as Pe, createCommentVNode as we, createElementVNode as D, createTextVNode as Gn, toDisplayString as Ae, normalizeClass as Hn, createVNode as Et, unref as le, renderList as kt, withDirectives as Xn, vModelText as Qn, createBlock as zt } from "vue";
2
- const Kn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjMwIiB2aWV3Qm94PSIwIDAgMTIwIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiPg0KICA8Y2lyY2xlIGN4PSIxNSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjBzIj48L2FuaW1hdGU+DQogIDwvY2lyY2xlPg0KDQogIDxjaXJjbGUgY3g9IjQ1IiBjeT0iMTUiIHI9IjYiIGZpbGw9IiM1QjhDRkYiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMC4zOzE7MC4zIiBkdXI9IjEuNHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4ycyI+PC9hbmltYXRlPg0KICA8L2NpcmNsZT4NCg0KICA8Y2lyY2xlIGN4PSI3NSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuNHMiPjwvYW5pbWF0ZT4NCiAgPC9jaXJjbGU+DQo8L3N2Zz4NCg==";
3
- var vr = "vercel.ai.error", eo = Symbol.for(vr), St, Ot, K = class _r extends (Ot = Error, St = eo, Ot) {
1
+ import { ref as ue, h as rt, defineComponent as Bn, watch as Wn, nextTick as Yn, openBlock as B, createElementBlock as q, Fragment as Pe, createCommentVNode as we, createElementVNode as D, normalizeClass as qn, createVNode as Et, unref as de, toDisplayString as He, renderList as kt, withDirectives as Gn, vModelText as Hn, createBlock as zt } from "vue";
2
+ const Xn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjMwIiB2aWV3Qm94PSIwIDAgMTIwIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiPg0KICA8Y2lyY2xlIGN4PSIxNSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjBzIj48L2FuaW1hdGU+DQogIDwvY2lyY2xlPg0KDQogIDxjaXJjbGUgY3g9IjQ1IiBjeT0iMTUiIHI9IjYiIGZpbGw9IiM1QjhDRkYiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMC4zOzE7MC4zIiBkdXI9IjEuNHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4ycyI+PC9hbmltYXRlPg0KICA8L2NpcmNsZT4NCg0KICA8Y2lyY2xlIGN4PSI3NSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuNHMiPjwvYW5pbWF0ZT4NCiAgPC9jaXJjbGU+DQo8L3N2Zz4NCg==";
3
+ var vr = "vercel.ai.error", Qn = Symbol.for(vr), St, Ot, K = class _r extends (Ot = Error, St = Qn, Ot) {
4
4
  /**
5
5
  * Creates an AI SDK Error.
6
6
  *
@@ -32,7 +32,7 @@ var vr = "vercel.ai.error", eo = Symbol.for(vr), St, Ot, K = class _r extends (O
32
32
  function yr(e) {
33
33
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
34
34
  }
35
- var br = "AI_InvalidArgumentError", wr = `vercel.ai.error.${br}`, to = Symbol.for(wr), Zt, $t, ro = class extends ($t = K, Zt = to, $t) {
35
+ var br = "AI_InvalidArgumentError", wr = `vercel.ai.error.${br}`, Kn = Symbol.for(wr), Zt, $t, eo = class extends ($t = K, Zt = Kn, $t) {
36
36
  constructor({
37
37
  message: e,
38
38
  cause: t,
@@ -43,7 +43,7 @@ var br = "AI_InvalidArgumentError", wr = `vercel.ai.error.${br}`, to = Symbol.fo
43
43
  static isInstance(e) {
44
44
  return K.hasMarker(e, wr);
45
45
  }
46
- }, Ir = "AI_JSONParseError", Er = `vercel.ai.error.${Ir}`, no = Symbol.for(Er), Tt, Nt, Pt = class extends (Nt = K, Tt = no, Nt) {
46
+ }, Ir = "AI_JSONParseError", Er = `vercel.ai.error.${Ir}`, to = Symbol.for(Er), Tt, Nt, Pt = class extends (Nt = K, Tt = to, Nt) {
47
47
  constructor({ text: e, cause: t }) {
48
48
  super({
49
49
  name: Ir,
@@ -55,7 +55,7 @@ Error message: ${yr(t)}`,
55
55
  static isInstance(e) {
56
56
  return K.hasMarker(e, Er);
57
57
  }
58
- }, kr = "AI_TypeValidationError", zr = `vercel.ai.error.${kr}`, oo = Symbol.for(zr), At, Rt, ge = class nt extends (Rt = K, At = oo, Rt) {
58
+ }, kr = "AI_TypeValidationError", zr = `vercel.ai.error.${kr}`, ro = Symbol.for(zr), At, Rt, ge = class nt extends (Rt = K, At = ro, Rt) {
59
59
  constructor({ value: t, cause: r }) {
60
60
  super({
61
61
  name: kr,
@@ -98,8 +98,8 @@ function p(e, t, r) {
98
98
  a._zod.traits.add(e), t(a, c);
99
99
  const u = i.prototype, l = Object.keys(u);
100
100
  for (let d = 0; d < l.length; d++) {
101
- const _ = l[d];
102
- _ in a || (a[_] = u[_].bind(a));
101
+ const m = l[d];
102
+ m in a || (a[m] = u[m].bind(a));
103
103
  }
104
104
  }
105
105
  const o = (r == null ? void 0 : r.Parent) ?? Object;
@@ -142,7 +142,7 @@ function Or(e) {
142
142
  function st(e, t) {
143
143
  return typeof t == "bigint" ? t.toString() : t;
144
144
  }
145
- function Be(e) {
145
+ function Ve(e) {
146
146
  return {
147
147
  get value() {
148
148
  {
@@ -159,7 +159,7 @@ function ft(e) {
159
159
  const t = e.startsWith("^") ? 1 : 0, r = e.endsWith("$") ? e.length - 1 : e.length;
160
160
  return e.slice(t, r);
161
161
  }
162
- function so(e, t) {
162
+ function no(e, t) {
163
163
  const r = (e.toString().split(".")[1] || "").length, n = t.toString();
164
164
  let o = (n.split(".")[1] || "").length;
165
165
  if (o === 0 && /\d?e-\d?/.test(n)) {
@@ -186,7 +186,7 @@ function O(e, t, r) {
186
186
  configurable: !0
187
187
  });
188
188
  }
189
- function ce(e, t, r) {
189
+ function le(e, t, r) {
190
190
  Object.defineProperty(e, t, {
191
191
  value: r,
192
192
  writable: !0,
@@ -205,7 +205,7 @@ function oe(...e) {
205
205
  function jt(e) {
206
206
  return JSON.stringify(e);
207
207
  }
208
- function ao(e) {
208
+ function oo(e) {
209
209
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
210
210
  }
211
211
  const Zr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
@@ -213,7 +213,7 @@ const Zr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
213
213
  function ke(e) {
214
214
  return typeof e == "object" && e !== null && !Array.isArray(e);
215
215
  }
216
- const io = Be(() => {
216
+ const so = Ve(() => {
217
217
  var e;
218
218
  if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
219
219
  return !1;
@@ -236,7 +236,7 @@ function ve(e) {
236
236
  function $r(e) {
237
237
  return ve(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
238
238
  }
239
- const uo = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
239
+ const ao = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
240
240
  function _e(e) {
241
241
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
242
242
  }
@@ -244,7 +244,7 @@ function se(e, t, r) {
244
244
  const n = new e._zod.constr(t ?? e._zod.def);
245
245
  return (!t || r != null && r.parent) && (n._zod.parent = e), n;
246
246
  }
247
- function b(e) {
247
+ function y(e) {
248
248
  const t = e;
249
249
  if (!t)
250
250
  return {};
@@ -257,17 +257,17 @@ function b(e) {
257
257
  }
258
258
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
259
259
  }
260
- function co(e) {
260
+ function io(e) {
261
261
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
262
262
  }
263
- const lo = {
263
+ const uo = {
264
264
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
265
265
  int32: [-2147483648, 2147483647],
266
266
  uint32: [0, 4294967295],
267
267
  float32: [-34028234663852886e22, 34028234663852886e22],
268
268
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
269
269
  };
270
- function po(e, t) {
270
+ function co(e, t) {
271
271
  const r = e._zod.def, n = r.checks;
272
272
  if (n && n.length > 0)
273
273
  throw new Error(".pick() cannot be used on object schemas containing refinements");
@@ -279,13 +279,13 @@ function po(e, t) {
279
279
  throw new Error(`Unrecognized key: "${a}"`);
280
280
  t[a] && (i[a] = r.shape[a]);
281
281
  }
282
- return ce(this, "shape", i), i;
282
+ return le(this, "shape", i), i;
283
283
  },
284
284
  checks: []
285
285
  });
286
286
  return se(e, s);
287
287
  }
288
- function fo(e, t) {
288
+ function lo(e, t) {
289
289
  const r = e._zod.def, n = r.checks;
290
290
  if (n && n.length > 0)
291
291
  throw new Error(".omit() cannot be used on object schemas containing refinements");
@@ -297,13 +297,13 @@ function fo(e, t) {
297
297
  throw new Error(`Unrecognized key: "${a}"`);
298
298
  t[a] && delete i[a];
299
299
  }
300
- return ce(this, "shape", i), i;
300
+ return le(this, "shape", i), i;
301
301
  },
302
302
  checks: []
303
303
  });
304
304
  return se(e, s);
305
305
  }
306
- function ho(e, t) {
306
+ function po(e, t) {
307
307
  if (!ve(t))
308
308
  throw new Error("Invalid input to extend: expected a plain object");
309
309
  const r = e._zod.def.checks;
@@ -316,27 +316,27 @@ function ho(e, t) {
316
316
  const o = oe(e._zod.def, {
317
317
  get shape() {
318
318
  const s = { ...e._zod.def.shape, ...t };
319
- return ce(this, "shape", s), s;
319
+ return le(this, "shape", s), s;
320
320
  }
321
321
  });
322
322
  return se(e, o);
323
323
  }
324
- function mo(e, t) {
324
+ function fo(e, t) {
325
325
  if (!ve(t))
326
326
  throw new Error("Invalid input to safeExtend: expected a plain object");
327
327
  const r = oe(e._zod.def, {
328
328
  get shape() {
329
329
  const n = { ...e._zod.def.shape, ...t };
330
- return ce(this, "shape", n), n;
330
+ return le(this, "shape", n), n;
331
331
  }
332
332
  });
333
333
  return se(e, r);
334
334
  }
335
- function go(e, t) {
335
+ function ho(e, t) {
336
336
  const r = oe(e._zod.def, {
337
337
  get shape() {
338
338
  const n = { ...e._zod.def.shape, ...t._zod.def.shape };
339
- return ce(this, "shape", n), n;
339
+ return le(this, "shape", n), n;
340
340
  },
341
341
  get catchall() {
342
342
  return t._zod.def.catchall;
@@ -346,7 +346,7 @@ function go(e, t) {
346
346
  });
347
347
  return se(e, r);
348
348
  }
349
- function vo(e, t, r) {
349
+ function mo(e, t, r) {
350
350
  const o = t._zod.def.checks;
351
351
  if (o && o.length > 0)
352
352
  throw new Error(".partial() cannot be used on object schemas containing refinements");
@@ -368,13 +368,13 @@ function vo(e, t, r) {
368
368
  type: "optional",
369
369
  innerType: a[u]
370
370
  }) : a[u];
371
- return ce(this, "shape", c), c;
371
+ return le(this, "shape", c), c;
372
372
  },
373
373
  checks: []
374
374
  });
375
375
  return se(t, i);
376
376
  }
377
- function _o(e, t, r) {
377
+ function go(e, t, r) {
378
378
  const n = oe(t._zod.def, {
379
379
  get shape() {
380
380
  const o = t._zod.def.shape, s = { ...o };
@@ -393,12 +393,12 @@ function _o(e, t, r) {
393
393
  type: "nonoptional",
394
394
  innerType: o[i]
395
395
  });
396
- return ce(this, "shape", s), s;
396
+ return le(this, "shape", s), s;
397
397
  }
398
398
  });
399
399
  return se(t, n);
400
400
  }
401
- function pe(e, t = 0) {
401
+ function fe(e, t = 0) {
402
402
  var r;
403
403
  if (e.aborted === !0)
404
404
  return !0;
@@ -407,20 +407,20 @@ function pe(e, t = 0) {
407
407
  return !0;
408
408
  return !1;
409
409
  }
410
- function fe(e, t) {
410
+ function he(e, t) {
411
411
  return t.map((r) => {
412
412
  var n;
413
413
  return (n = r).path ?? (n.path = []), r.path.unshift(e), r;
414
414
  });
415
415
  }
416
- function Re(e) {
416
+ function Ae(e) {
417
417
  return typeof e == "string" ? e : e == null ? void 0 : e.message;
418
418
  }
419
419
  function ne(e, t, r) {
420
420
  var o, s, i, a, c, u;
421
421
  const n = { ...e, path: e.path ?? [] };
422
422
  if (!e.message) {
423
- const l = Re((i = (s = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : s.error) == null ? void 0 : i.call(s, e)) ?? Re((a = t == null ? void 0 : t.error) == null ? void 0 : a.call(t, e)) ?? Re((c = r.customError) == null ? void 0 : c.call(r, e)) ?? Re((u = r.localeError) == null ? void 0 : u.call(r, e)) ?? "Invalid input";
423
+ const l = Ae((i = (s = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : s.error) == null ? void 0 : i.call(s, e)) ?? Ae((a = t == null ? void 0 : t.error) == null ? void 0 : a.call(t, e)) ?? Ae((c = r.customError) == null ? void 0 : c.call(r, e)) ?? Ae((u = r.localeError) == null ? void 0 : u.call(r, e)) ?? "Invalid input";
424
424
  n.message = l;
425
425
  }
426
426
  return delete n.inst, delete n.continue, t != null && t.reportInput || delete n.input, n;
@@ -449,13 +449,13 @@ const Tr = (e, t) => {
449
449
  enumerable: !1
450
450
  });
451
451
  }, Nr = p("$ZodError", Tr), Pr = p("$ZodError", Tr, { Parent: Error });
452
- function yo(e, t = (r) => r.message) {
452
+ function vo(e, t = (r) => r.message) {
453
453
  const r = {}, n = [];
454
454
  for (const o of e.issues)
455
455
  o.path.length > 0 ? (r[o.path[0]] = r[o.path[0]] || [], r[o.path[0]].push(t(o))) : n.push(t(o));
456
456
  return { formErrors: n, fieldErrors: r };
457
457
  }
458
- function bo(e, t = (r) => r.message) {
458
+ function _o(e, t = (r) => r.message) {
459
459
  const r = { _errors: [] }, n = (o) => {
460
460
  for (const s of o.issues)
461
461
  if (s.code === "invalid_union" && s.errors.length)
@@ -493,7 +493,7 @@ const mt = (e) => (t, r, n, o) => {
493
493
  throw Zr(a, o == null ? void 0 : o.callee), a;
494
494
  }
495
495
  return i.value;
496
- }, We = (e) => (t, r, n) => {
496
+ }, Be = (e) => (t, r, n) => {
497
497
  const o = n ? { ...n, async: !1 } : { async: !1 }, s = t._zod.run({ value: r, issues: [] }, o);
498
498
  if (s instanceof Promise)
499
499
  throw new me();
@@ -501,47 +501,47 @@ const mt = (e) => (t, r, n, o) => {
501
501
  success: !1,
502
502
  error: new (e ?? Nr)(s.issues.map((i) => ne(i, o, re())))
503
503
  } : { success: !0, data: s.value };
504
- }, wo = /* @__PURE__ */ We(Pr), Ye = (e) => async (t, r, n) => {
504
+ }, yo = /* @__PURE__ */ Be(Pr), We = (e) => async (t, r, n) => {
505
505
  const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
506
506
  let s = t._zod.run({ value: r, issues: [] }, o);
507
507
  return s instanceof Promise && (s = await s), s.issues.length ? {
508
508
  success: !1,
509
509
  error: new e(s.issues.map((i) => ne(i, o, re())))
510
510
  } : { success: !0, data: s.value };
511
- }, Io = /* @__PURE__ */ Ye(Pr), Eo = (e) => (t, r, n) => {
511
+ }, bo = /* @__PURE__ */ We(Pr), wo = (e) => (t, r, n) => {
512
512
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
513
513
  return mt(e)(t, r, o);
514
- }, ko = (e) => (t, r, n) => mt(e)(t, r, n), zo = (e) => async (t, r, n) => {
514
+ }, Io = (e) => (t, r, n) => mt(e)(t, r, n), Eo = (e) => async (t, r, n) => {
515
515
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
516
516
  return gt(e)(t, r, o);
517
- }, So = (e) => async (t, r, n) => gt(e)(t, r, n), Oo = (e) => (t, r, n) => {
517
+ }, ko = (e) => async (t, r, n) => gt(e)(t, r, n), zo = (e) => (t, r, n) => {
518
518
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
519
- return We(e)(t, r, o);
520
- }, Zo = (e) => (t, r, n) => We(e)(t, r, n), $o = (e) => async (t, r, n) => {
519
+ return Be(e)(t, r, o);
520
+ }, So = (e) => (t, r, n) => Be(e)(t, r, n), Oo = (e) => async (t, r, n) => {
521
521
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
522
- return Ye(e)(t, r, o);
523
- }, To = (e) => async (t, r, n) => Ye(e)(t, r, n), No = /^[cC][^\s-]{8,}$/, Po = /^[0-9a-z]+$/, Ao = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ro = /^[0-9a-vA-V]{20}$/, xo = /^[A-Za-z0-9]{27}$/, jo = /^[a-zA-Z0-9_-]{21}$/, Co = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Mo = /^([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})$/, Ct = (e) => e ? new 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)$/, Do = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Uo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
524
- function Lo() {
525
- return new RegExp(Uo, "u");
522
+ return We(e)(t, r, o);
523
+ }, Zo = (e) => async (t, r, n) => We(e)(t, r, n), $o = /^[cC][^\s-]{8,}$/, To = /^[0-9a-z]+$/, No = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Po = /^[0-9a-vA-V]{20}$/, Ao = /^[A-Za-z0-9]{27}$/, Ro = /^[a-zA-Z0-9_-]{21}$/, xo = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, jo = /^([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})$/, Ct = (e) => e ? new 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)$/, Co = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Mo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
524
+ function Do() {
525
+ return new RegExp(Mo, "u");
526
526
  }
527
- const Jo = /^(?:(?: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])$/, Fo = /^(([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}|:))$/, Vo = /^((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])$/, Bo = /^(([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])$/, Wo = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Ar = /^[A-Za-z0-9_-]*$/, Yo = /^\+[1-9]\d{6,14}$/, Rr = "(?:(?:\\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])))", qo = /* @__PURE__ */ new RegExp(`^${Rr}$`);
527
+ const Uo = /^(?:(?: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])$/, Lo = /^(([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}|:))$/, Jo = /^((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])$/, Fo = /^(([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])$/, Vo = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Ar = /^[A-Za-z0-9_-]*$/, Bo = /^\+[1-9]\d{6,14}$/, Rr = "(?:(?:\\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])))", Wo = /* @__PURE__ */ new RegExp(`^${Rr}$`);
528
528
  function xr(e) {
529
529
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
530
530
  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+)?)?`;
531
531
  }
532
- function Go(e) {
532
+ function Yo(e) {
533
533
  return new RegExp(`^${xr(e)}$`);
534
534
  }
535
- function Ho(e) {
535
+ function qo(e) {
536
536
  const t = xr({ precision: e.precision }), r = ["Z"];
537
537
  e.local && r.push(""), e.offset && r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
538
538
  const n = `${t}(?:${r.join("|")})`;
539
539
  return new RegExp(`^${Rr}T(?:${n})$`);
540
540
  }
541
- const Xo = (e) => {
541
+ const Go = (e) => {
542
542
  const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
543
543
  return new RegExp(`^${t}$`);
544
- }, Qo = /^-?\d+$/, jr = /^-?\d+(?:\.\d+)?$/, Ko = /^(?:true|false)$/i, es = /^null$/i, ts = /^[^A-Z]*$/, rs = /^[^a-z]*$/, W = /* @__PURE__ */ p("$ZodCheck", (e, t) => {
544
+ }, Ho = /^-?\d+$/, jr = /^-?\d+(?:\.\d+)?$/, Xo = /^(?:true|false)$/i, Qo = /^null$/i, Ko = /^[^A-Z]*$/, es = /^[^a-z]*$/, W = /* @__PURE__ */ p("$ZodCheck", (e, t) => {
545
545
  var r;
546
546
  e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
547
547
  }), Cr = {
@@ -582,14 +582,14 @@ const Xo = (e) => {
582
582
  continue: !t.abort
583
583
  });
584
584
  };
585
- }), ns = /* @__PURE__ */ p("$ZodCheckMultipleOf", (e, t) => {
585
+ }), ts = /* @__PURE__ */ p("$ZodCheckMultipleOf", (e, t) => {
586
586
  W.init(e, t), e._zod.onattach.push((r) => {
587
587
  var n;
588
588
  (n = r._zod.bag).multipleOf ?? (n.multipleOf = t.value);
589
589
  }), e._zod.check = (r) => {
590
590
  if (typeof r.value != typeof t.value)
591
591
  throw new Error("Cannot mix number and bigint in multiple_of check.");
592
- (typeof r.value == "bigint" ? r.value % t.value === BigInt(0) : so(r.value, t.value) === 0) || r.issues.push({
592
+ (typeof r.value == "bigint" ? r.value % t.value === BigInt(0) : no(r.value, t.value) === 0) || r.issues.push({
593
593
  origin: typeof r.value,
594
594
  code: "not_multiple_of",
595
595
  divisor: t.value,
@@ -598,13 +598,13 @@ const Xo = (e) => {
598
598
  continue: !t.abort
599
599
  });
600
600
  };
601
- }), os = /* @__PURE__ */ p("$ZodCheckNumberFormat", (e, t) => {
601
+ }), rs = /* @__PURE__ */ p("$ZodCheckNumberFormat", (e, t) => {
602
602
  var i;
603
603
  W.init(e, t), t.format = t.format || "float64";
604
- const r = (i = t.format) == null ? void 0 : i.includes("int"), n = r ? "int" : "number", [o, s] = lo[t.format];
604
+ const r = (i = t.format) == null ? void 0 : i.includes("int"), n = r ? "int" : "number", [o, s] = uo[t.format];
605
605
  e._zod.onattach.push((a) => {
606
606
  const c = a._zod.bag;
607
- c.format = t.format, c.minimum = o, c.maximum = s, r && (c.pattern = Qo);
607
+ c.format = t.format, c.minimum = o, c.maximum = s, r && (c.pattern = Ho);
608
608
  }), e._zod.check = (a) => {
609
609
  const c = a.value;
610
610
  if (r) {
@@ -660,7 +660,7 @@ const Xo = (e) => {
660
660
  continue: !t.abort
661
661
  });
662
662
  };
663
- }), ss = /* @__PURE__ */ p("$ZodCheckMaxLength", (e, t) => {
663
+ }), ns = /* @__PURE__ */ p("$ZodCheckMaxLength", (e, t) => {
664
664
  var r;
665
665
  W.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
666
666
  const o = n.value;
@@ -683,7 +683,7 @@ const Xo = (e) => {
683
683
  continue: !t.abort
684
684
  });
685
685
  };
686
- }), as = /* @__PURE__ */ p("$ZodCheckMinLength", (e, t) => {
686
+ }), os = /* @__PURE__ */ p("$ZodCheckMinLength", (e, t) => {
687
687
  var r;
688
688
  W.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
689
689
  const o = n.value;
@@ -706,7 +706,7 @@ const Xo = (e) => {
706
706
  continue: !t.abort
707
707
  });
708
708
  };
709
- }), is = /* @__PURE__ */ p("$ZodCheckLengthEquals", (e, t) => {
709
+ }), ss = /* @__PURE__ */ p("$ZodCheckLengthEquals", (e, t) => {
710
710
  var r;
711
711
  W.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
712
712
  const o = n.value;
@@ -729,7 +729,7 @@ const Xo = (e) => {
729
729
  continue: !t.abort
730
730
  });
731
731
  };
732
- }), qe = /* @__PURE__ */ p("$ZodCheckStringFormat", (e, t) => {
732
+ }), Ye = /* @__PURE__ */ p("$ZodCheckStringFormat", (e, t) => {
733
733
  var r, n;
734
734
  W.init(e, t), e._zod.onattach.push((o) => {
735
735
  const s = o._zod.bag;
@@ -746,8 +746,8 @@ const Xo = (e) => {
746
746
  });
747
747
  }) : (n = e._zod).check ?? (n.check = () => {
748
748
  });
749
- }), us = /* @__PURE__ */ p("$ZodCheckRegex", (e, t) => {
750
- qe.init(e, t), e._zod.check = (r) => {
749
+ }), as = /* @__PURE__ */ p("$ZodCheckRegex", (e, t) => {
750
+ Ye.init(e, t), e._zod.check = (r) => {
751
751
  t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
752
752
  origin: "string",
753
753
  code: "invalid_format",
@@ -758,11 +758,11 @@ const Xo = (e) => {
758
758
  continue: !t.abort
759
759
  });
760
760
  };
761
- }), cs = /* @__PURE__ */ p("$ZodCheckLowerCase", (e, t) => {
762
- t.pattern ?? (t.pattern = ts), qe.init(e, t);
763
- }), ls = /* @__PURE__ */ p("$ZodCheckUpperCase", (e, t) => {
764
- t.pattern ?? (t.pattern = rs), qe.init(e, t);
765
- }), ds = /* @__PURE__ */ p("$ZodCheckIncludes", (e, t) => {
761
+ }), is = /* @__PURE__ */ p("$ZodCheckLowerCase", (e, t) => {
762
+ t.pattern ?? (t.pattern = Ko), Ye.init(e, t);
763
+ }), us = /* @__PURE__ */ p("$ZodCheckUpperCase", (e, t) => {
764
+ t.pattern ?? (t.pattern = es), Ye.init(e, t);
765
+ }), cs = /* @__PURE__ */ p("$ZodCheckIncludes", (e, t) => {
766
766
  W.init(e, t);
767
767
  const r = _e(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
768
768
  t.pattern = n, e._zod.onattach.push((o) => {
@@ -779,7 +779,7 @@ const Xo = (e) => {
779
779
  continue: !t.abort
780
780
  });
781
781
  };
782
- }), ps = /* @__PURE__ */ p("$ZodCheckStartsWith", (e, t) => {
782
+ }), ls = /* @__PURE__ */ p("$ZodCheckStartsWith", (e, t) => {
783
783
  W.init(e, t);
784
784
  const r = new RegExp(`^${_e(t.prefix)}.*`);
785
785
  t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
@@ -796,7 +796,7 @@ const Xo = (e) => {
796
796
  continue: !t.abort
797
797
  });
798
798
  };
799
- }), fs = /* @__PURE__ */ p("$ZodCheckEndsWith", (e, t) => {
799
+ }), ds = /* @__PURE__ */ p("$ZodCheckEndsWith", (e, t) => {
800
800
  W.init(e, t);
801
801
  const r = new RegExp(`.*${_e(t.suffix)}$`);
802
802
  t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
@@ -813,12 +813,12 @@ const Xo = (e) => {
813
813
  continue: !t.abort
814
814
  });
815
815
  };
816
- }), hs = /* @__PURE__ */ p("$ZodCheckOverwrite", (e, t) => {
816
+ }), ps = /* @__PURE__ */ p("$ZodCheckOverwrite", (e, t) => {
817
817
  W.init(e, t), e._zod.check = (r) => {
818
818
  r.value = t.tx(r.value);
819
819
  };
820
820
  });
821
- class ms {
821
+ class fs {
822
822
  constructor(t = []) {
823
823
  this.content = [], this.indent = 0, this && (this.args = t);
824
824
  }
@@ -841,14 +841,14 @@ class ms {
841
841
  `));
842
842
  }
843
843
  }
844
- const gs = {
844
+ const hs = {
845
845
  major: 4,
846
846
  minor: 3,
847
847
  patch: 5
848
848
  }, x = /* @__PURE__ */ p("$ZodType", (e, t) => {
849
849
  var o;
850
850
  var r;
851
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = gs;
851
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = hs;
852
852
  const n = [...e._zod.def.checks ?? []];
853
853
  e._zod.traits.has("$ZodCheck") && n.unshift(e);
854
854
  for (const s of n)
@@ -860,29 +860,29 @@ const gs = {
860
860
  });
861
861
  else {
862
862
  const s = (a, c, u) => {
863
- let l = pe(a), d;
864
- for (const _ of c) {
865
- if (_._zod.def.when) {
866
- if (!_._zod.def.when(a))
863
+ let l = fe(a), d;
864
+ for (const m of c) {
865
+ if (m._zod.def.when) {
866
+ if (!m._zod.def.when(a))
867
867
  continue;
868
868
  } else if (l)
869
869
  continue;
870
- const h = a.issues.length, y = _._zod.check(a);
871
- if (y instanceof Promise && (u == null ? void 0 : u.async) === !1)
870
+ const h = a.issues.length, b = m._zod.check(a);
871
+ if (b instanceof Promise && (u == null ? void 0 : u.async) === !1)
872
872
  throw new me();
873
- if (d || y instanceof Promise)
873
+ if (d || b instanceof Promise)
874
874
  d = (d ?? Promise.resolve()).then(async () => {
875
- await y, a.issues.length !== h && (l || (l = pe(a, h)));
875
+ await b, a.issues.length !== h && (l || (l = fe(a, h)));
876
876
  });
877
877
  else {
878
878
  if (a.issues.length === h)
879
879
  continue;
880
- l || (l = pe(a, h));
880
+ l || (l = fe(a, h));
881
881
  }
882
882
  }
883
883
  return d ? d.then(() => a) : a;
884
884
  }, i = (a, c, u) => {
885
- if (pe(a))
885
+ if (fe(a))
886
886
  return a.aborted = !0, a;
887
887
  const l = s(c, n, u);
888
888
  if (l instanceof Promise) {
@@ -912,10 +912,10 @@ const gs = {
912
912
  validate: (s) => {
913
913
  var i;
914
914
  try {
915
- const a = wo(e, s);
915
+ const a = yo(e, s);
916
916
  return a.success ? { value: a.data } : { issues: (i = a.error) == null ? void 0 : i.issues };
917
917
  } catch {
918
- return Io(e, s).then((c) => {
918
+ return bo(e, s).then((c) => {
919
919
  var u;
920
920
  return c.success ? { value: c.data } : { issues: (u = c.error) == null ? void 0 : u.issues };
921
921
  });
@@ -926,7 +926,7 @@ const gs = {
926
926
  }));
927
927
  }), vt = /* @__PURE__ */ p("$ZodString", (e, t) => {
928
928
  var r;
929
- x.init(e, t), e._zod.pattern = [...((r = e == null ? void 0 : e._zod.bag) == null ? void 0 : r.patterns) ?? []].pop() ?? Xo(e._zod.bag), e._zod.parse = (n, o) => {
929
+ x.init(e, t), e._zod.pattern = [...((r = e == null ? void 0 : e._zod.bag) == null ? void 0 : r.patterns) ?? []].pop() ?? Go(e._zod.bag), e._zod.parse = (n, o) => {
930
930
  if (t.coerce)
931
931
  try {
932
932
  n.value = String(n.value);
@@ -940,10 +940,10 @@ const gs = {
940
940
  }), n;
941
941
  };
942
942
  }), C = /* @__PURE__ */ p("$ZodStringFormat", (e, t) => {
943
- qe.init(e, t), vt.init(e, t);
944
- }), vs = /* @__PURE__ */ p("$ZodGUID", (e, t) => {
945
- t.pattern ?? (t.pattern = Mo), C.init(e, t);
946
- }), _s = /* @__PURE__ */ p("$ZodUUID", (e, t) => {
943
+ Ye.init(e, t), vt.init(e, t);
944
+ }), ms = /* @__PURE__ */ p("$ZodGUID", (e, t) => {
945
+ t.pattern ?? (t.pattern = jo), C.init(e, t);
946
+ }), gs = /* @__PURE__ */ p("$ZodUUID", (e, t) => {
947
947
  if (t.version) {
948
948
  const n = {
949
949
  v1: 1,
@@ -961,9 +961,9 @@ const gs = {
961
961
  } else
962
962
  t.pattern ?? (t.pattern = Ct());
963
963
  C.init(e, t);
964
- }), ys = /* @__PURE__ */ p("$ZodEmail", (e, t) => {
965
- t.pattern ?? (t.pattern = Do), C.init(e, t);
966
- }), bs = /* @__PURE__ */ p("$ZodURL", (e, t) => {
964
+ }), vs = /* @__PURE__ */ p("$ZodEmail", (e, t) => {
965
+ t.pattern ?? (t.pattern = Co), C.init(e, t);
966
+ }), _s = /* @__PURE__ */ p("$ZodURL", (e, t) => {
967
967
  C.init(e, t), e._zod.check = (r) => {
968
968
  try {
969
969
  const n = r.value.trim(), o = new URL(n);
@@ -995,32 +995,32 @@ const gs = {
995
995
  });
996
996
  }
997
997
  };
998
- }), ws = /* @__PURE__ */ p("$ZodEmoji", (e, t) => {
999
- t.pattern ?? (t.pattern = Lo()), C.init(e, t);
1000
- }), Is = /* @__PURE__ */ p("$ZodNanoID", (e, t) => {
1001
- t.pattern ?? (t.pattern = jo), C.init(e, t);
1002
- }), Es = /* @__PURE__ */ p("$ZodCUID", (e, t) => {
998
+ }), ys = /* @__PURE__ */ p("$ZodEmoji", (e, t) => {
999
+ t.pattern ?? (t.pattern = Do()), C.init(e, t);
1000
+ }), bs = /* @__PURE__ */ p("$ZodNanoID", (e, t) => {
1001
+ t.pattern ?? (t.pattern = Ro), C.init(e, t);
1002
+ }), ws = /* @__PURE__ */ p("$ZodCUID", (e, t) => {
1003
+ t.pattern ?? (t.pattern = $o), C.init(e, t);
1004
+ }), Is = /* @__PURE__ */ p("$ZodCUID2", (e, t) => {
1005
+ t.pattern ?? (t.pattern = To), C.init(e, t);
1006
+ }), Es = /* @__PURE__ */ p("$ZodULID", (e, t) => {
1003
1007
  t.pattern ?? (t.pattern = No), C.init(e, t);
1004
- }), ks = /* @__PURE__ */ p("$ZodCUID2", (e, t) => {
1008
+ }), ks = /* @__PURE__ */ p("$ZodXID", (e, t) => {
1005
1009
  t.pattern ?? (t.pattern = Po), C.init(e, t);
1006
- }), zs = /* @__PURE__ */ p("$ZodULID", (e, t) => {
1010
+ }), zs = /* @__PURE__ */ p("$ZodKSUID", (e, t) => {
1007
1011
  t.pattern ?? (t.pattern = Ao), C.init(e, t);
1008
- }), Ss = /* @__PURE__ */ p("$ZodXID", (e, t) => {
1009
- t.pattern ?? (t.pattern = Ro), C.init(e, t);
1010
- }), Os = /* @__PURE__ */ p("$ZodKSUID", (e, t) => {
1012
+ }), Ss = /* @__PURE__ */ p("$ZodISODateTime", (e, t) => {
1013
+ t.pattern ?? (t.pattern = qo(t)), C.init(e, t);
1014
+ }), Os = /* @__PURE__ */ p("$ZodISODate", (e, t) => {
1015
+ t.pattern ?? (t.pattern = Wo), C.init(e, t);
1016
+ }), Zs = /* @__PURE__ */ p("$ZodISOTime", (e, t) => {
1017
+ t.pattern ?? (t.pattern = Yo(t)), C.init(e, t);
1018
+ }), $s = /* @__PURE__ */ p("$ZodISODuration", (e, t) => {
1011
1019
  t.pattern ?? (t.pattern = xo), C.init(e, t);
1012
- }), Zs = /* @__PURE__ */ p("$ZodISODateTime", (e, t) => {
1013
- t.pattern ?? (t.pattern = Ho(t)), C.init(e, t);
1014
- }), $s = /* @__PURE__ */ p("$ZodISODate", (e, t) => {
1015
- t.pattern ?? (t.pattern = qo), C.init(e, t);
1016
- }), Ts = /* @__PURE__ */ p("$ZodISOTime", (e, t) => {
1017
- t.pattern ?? (t.pattern = Go(t)), C.init(e, t);
1018
- }), Ns = /* @__PURE__ */ p("$ZodISODuration", (e, t) => {
1019
- t.pattern ?? (t.pattern = Co), C.init(e, t);
1020
- }), Ps = /* @__PURE__ */ p("$ZodIPv4", (e, t) => {
1021
- t.pattern ?? (t.pattern = Jo), C.init(e, t), e._zod.bag.format = "ipv4";
1022
- }), As = /* @__PURE__ */ p("$ZodIPv6", (e, t) => {
1023
- t.pattern ?? (t.pattern = Fo), C.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
1020
+ }), Ts = /* @__PURE__ */ p("$ZodIPv4", (e, t) => {
1021
+ t.pattern ?? (t.pattern = Uo), C.init(e, t), e._zod.bag.format = "ipv4";
1022
+ }), Ns = /* @__PURE__ */ p("$ZodIPv6", (e, t) => {
1023
+ t.pattern ?? (t.pattern = Lo), C.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
1024
1024
  try {
1025
1025
  new URL(`http://[${r.value}]`);
1026
1026
  } catch {
@@ -1033,10 +1033,10 @@ const gs = {
1033
1033
  });
1034
1034
  }
1035
1035
  };
1036
- }), Rs = /* @__PURE__ */ p("$ZodCIDRv4", (e, t) => {
1037
- t.pattern ?? (t.pattern = Vo), C.init(e, t);
1038
- }), xs = /* @__PURE__ */ p("$ZodCIDRv6", (e, t) => {
1039
- t.pattern ?? (t.pattern = Bo), C.init(e, t), e._zod.check = (r) => {
1036
+ }), Ps = /* @__PURE__ */ p("$ZodCIDRv4", (e, t) => {
1037
+ t.pattern ?? (t.pattern = Jo), C.init(e, t);
1038
+ }), As = /* @__PURE__ */ p("$ZodCIDRv6", (e, t) => {
1039
+ t.pattern ?? (t.pattern = Fo), C.init(e, t), e._zod.check = (r) => {
1040
1040
  const n = r.value.split("/");
1041
1041
  try {
1042
1042
  if (n.length !== 2)
@@ -1072,8 +1072,8 @@ function Ur(e) {
1072
1072
  return !1;
1073
1073
  }
1074
1074
  }
1075
- const js = /* @__PURE__ */ p("$ZodBase64", (e, t) => {
1076
- t.pattern ?? (t.pattern = Wo), C.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
1075
+ const Rs = /* @__PURE__ */ p("$ZodBase64", (e, t) => {
1076
+ t.pattern ?? (t.pattern = Vo), C.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
1077
1077
  Ur(r.value) || r.issues.push({
1078
1078
  code: "invalid_format",
1079
1079
  format: "base64",
@@ -1083,15 +1083,15 @@ const js = /* @__PURE__ */ p("$ZodBase64", (e, t) => {
1083
1083
  });
1084
1084
  };
1085
1085
  });
1086
- function Cs(e) {
1086
+ function xs(e) {
1087
1087
  if (!Ar.test(e))
1088
1088
  return !1;
1089
1089
  const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1090
1090
  return Ur(r);
1091
1091
  }
1092
- const Ms = /* @__PURE__ */ p("$ZodBase64URL", (e, t) => {
1092
+ const js = /* @__PURE__ */ p("$ZodBase64URL", (e, t) => {
1093
1093
  t.pattern ?? (t.pattern = Ar), C.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
1094
- Cs(r.value) || r.issues.push({
1094
+ xs(r.value) || r.issues.push({
1095
1095
  code: "invalid_format",
1096
1096
  format: "base64url",
1097
1097
  input: r.value,
@@ -1099,10 +1099,10 @@ const Ms = /* @__PURE__ */ p("$ZodBase64URL", (e, t) => {
1099
1099
  continue: !t.abort
1100
1100
  });
1101
1101
  };
1102
- }), Ds = /* @__PURE__ */ p("$ZodE164", (e, t) => {
1103
- t.pattern ?? (t.pattern = Yo), C.init(e, t);
1102
+ }), Cs = /* @__PURE__ */ p("$ZodE164", (e, t) => {
1103
+ t.pattern ?? (t.pattern = Bo), C.init(e, t);
1104
1104
  });
1105
- function Us(e, t = null) {
1105
+ function Ms(e, t = null) {
1106
1106
  try {
1107
1107
  const r = e.split(".");
1108
1108
  if (r.length !== 3)
@@ -1116,9 +1116,9 @@ function Us(e, t = null) {
1116
1116
  return !1;
1117
1117
  }
1118
1118
  }
1119
- const Ls = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
1119
+ const Ds = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
1120
1120
  C.init(e, t), e._zod.check = (r) => {
1121
- Us(r.value, t.alg) || r.issues.push({
1121
+ Ms(r.value, t.alg) || r.issues.push({
1122
1122
  code: "invalid_format",
1123
1123
  format: "jwt",
1124
1124
  input: r.value,
@@ -1145,10 +1145,10 @@ const Ls = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
1145
1145
  ...s ? { received: s } : {}
1146
1146
  }), r;
1147
1147
  };
1148
- }), Js = /* @__PURE__ */ p("$ZodNumberFormat", (e, t) => {
1149
- os.init(e, t), Lr.init(e, t);
1150
- }), Fs = /* @__PURE__ */ p("$ZodBoolean", (e, t) => {
1151
- x.init(e, t), e._zod.pattern = Ko, e._zod.parse = (r, n) => {
1148
+ }), Us = /* @__PURE__ */ p("$ZodNumberFormat", (e, t) => {
1149
+ rs.init(e, t), Lr.init(e, t);
1150
+ }), Ls = /* @__PURE__ */ p("$ZodBoolean", (e, t) => {
1151
+ x.init(e, t), e._zod.pattern = Xo, e._zod.parse = (r, n) => {
1152
1152
  if (t.coerce)
1153
1153
  try {
1154
1154
  r.value = !!r.value;
@@ -1162,8 +1162,8 @@ const Ls = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
1162
1162
  inst: e
1163
1163
  }), r;
1164
1164
  };
1165
- }), Vs = /* @__PURE__ */ p("$ZodNull", (e, t) => {
1166
- x.init(e, t), e._zod.pattern = es, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (r, n) => {
1165
+ }), Js = /* @__PURE__ */ p("$ZodNull", (e, t) => {
1166
+ x.init(e, t), e._zod.pattern = Qo, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (r, n) => {
1167
1167
  const o = r.value;
1168
1168
  return o === null || r.issues.push({
1169
1169
  expected: "null",
@@ -1172,9 +1172,9 @@ const Ls = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
1172
1172
  inst: e
1173
1173
  }), r;
1174
1174
  };
1175
- }), Bs = /* @__PURE__ */ p("$ZodUnknown", (e, t) => {
1175
+ }), Fs = /* @__PURE__ */ p("$ZodUnknown", (e, t) => {
1176
1176
  x.init(e, t), e._zod.parse = (r) => r;
1177
- }), Ws = /* @__PURE__ */ p("$ZodNever", (e, t) => {
1177
+ }), Vs = /* @__PURE__ */ p("$ZodNever", (e, t) => {
1178
1178
  x.init(e, t), e._zod.parse = (r, n) => (r.issues.push({
1179
1179
  expected: "never",
1180
1180
  code: "invalid_type",
@@ -1183,9 +1183,9 @@ const Ls = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
1183
1183
  }), r);
1184
1184
  });
1185
1185
  function Mt(e, t, r) {
1186
- e.issues.length && t.issues.push(...fe(r, e.issues)), t.value[r] = e.value;
1186
+ e.issues.length && t.issues.push(...he(r, e.issues)), t.value[r] = e.value;
1187
1187
  }
1188
- const Ys = /* @__PURE__ */ p("$ZodArray", (e, t) => {
1188
+ const Bs = /* @__PURE__ */ p("$ZodArray", (e, t) => {
1189
1189
  x.init(e, t), e._zod.parse = (r, n) => {
1190
1190
  const o = r.value;
1191
1191
  if (!Array.isArray(o))
@@ -1207,11 +1207,11 @@ const Ys = /* @__PURE__ */ p("$ZodArray", (e, t) => {
1207
1207
  return s.length ? Promise.all(s).then(() => r) : r;
1208
1208
  };
1209
1209
  });
1210
- function Ce(e, t, r, n, o) {
1210
+ function je(e, t, r, n, o) {
1211
1211
  if (e.issues.length) {
1212
1212
  if (o && !(r in n))
1213
1213
  return;
1214
- t.issues.push(...fe(r, e.issues));
1214
+ t.issues.push(...he(r, e.issues));
1215
1215
  }
1216
1216
  e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1217
1217
  }
@@ -1221,7 +1221,7 @@ function Jr(e) {
1221
1221
  for (const a of t)
1222
1222
  if (!((i = (s = (o = (n = e.shape) == null ? void 0 : n[a]) == null ? void 0 : o._zod) == null ? void 0 : s.traits) != null && i.has("$ZodType")))
1223
1223
  throw new Error(`Invalid element at key "${a}": expected a Zod schema`);
1224
- const r = co(e.shape);
1224
+ const r = io(e.shape);
1225
1225
  return {
1226
1226
  ...e,
1227
1227
  keys: t,
@@ -1239,8 +1239,8 @@ function Fr(e, t, r, n, o, s) {
1239
1239
  i.push(d);
1240
1240
  continue;
1241
1241
  }
1242
- const _ = c.run({ value: t[d], issues: [] }, n);
1243
- _ instanceof Promise ? e.push(_.then((h) => Ce(h, r, d, t, l))) : Ce(_, r, d, t, l);
1242
+ const m = c.run({ value: t[d], issues: [] }, n);
1243
+ m instanceof Promise ? e.push(m.then((h) => je(h, r, d, t, l))) : je(m, r, d, t, l);
1244
1244
  }
1245
1245
  return i.length && r.issues.push({
1246
1246
  code: "unrecognized_keys",
@@ -1249,7 +1249,7 @@ function Fr(e, t, r, n, o, s) {
1249
1249
  inst: s
1250
1250
  }), e.length ? Promise.all(e).then(() => r) : r;
1251
1251
  }
1252
- const qs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1252
+ const Ws = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1253
1253
  x.init(e, t);
1254
1254
  const r = Object.getOwnPropertyDescriptor(t, "shape");
1255
1255
  if (!(r != null && r.get)) {
@@ -1263,7 +1263,7 @@ const qs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1263
1263
  }
1264
1264
  });
1265
1265
  }
1266
- const n = Be(() => Jr(t));
1266
+ const n = Ve(() => Jr(t));
1267
1267
  O(e._zod, "propValues", () => {
1268
1268
  const a = t.shape, c = {};
1269
1269
  for (const u in a) {
@@ -1290,29 +1290,29 @@ const qs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1290
1290
  }), a;
1291
1291
  a.value = {};
1292
1292
  const l = [], d = i.shape;
1293
- for (const _ of i.keys) {
1294
- const h = d[_], y = h._zod.optout === "optional", g = h._zod.run({ value: u[_], issues: [] }, c);
1295
- g instanceof Promise ? l.push(g.then((v) => Ce(v, a, _, u, y))) : Ce(g, a, _, u, y);
1293
+ for (const m of i.keys) {
1294
+ const h = d[m], b = h._zod.optout === "optional", _ = h._zod.run({ value: u[m], issues: [] }, c);
1295
+ _ instanceof Promise ? l.push(_.then((v) => je(v, a, m, u, b))) : je(_, a, m, u, b);
1296
1296
  }
1297
1297
  return s ? Fr(l, u, a, c, n.value, e) : l.length ? Promise.all(l).then(() => a) : a;
1298
1298
  };
1299
- }), Gs = /* @__PURE__ */ p("$ZodObjectJIT", (e, t) => {
1300
- qs.init(e, t);
1301
- const r = e._zod.parse, n = Be(() => Jr(t)), o = (_) => {
1299
+ }), Ys = /* @__PURE__ */ p("$ZodObjectJIT", (e, t) => {
1300
+ Ws.init(e, t);
1301
+ const r = e._zod.parse, n = Ve(() => Jr(t)), o = (m) => {
1302
1302
  var f;
1303
- const h = new ms(["shape", "payload", "ctx"]), y = n.value, g = ($) => {
1303
+ const h = new fs(["shape", "payload", "ctx"]), b = n.value, _ = ($) => {
1304
1304
  const Z = jt($);
1305
1305
  return `shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`;
1306
1306
  };
1307
1307
  h.write("const input = payload.value;");
1308
1308
  const v = /* @__PURE__ */ Object.create(null);
1309
- let E = 0;
1310
- for (const $ of y.keys)
1311
- v[$] = `key_${E++}`;
1309
+ let I = 0;
1310
+ for (const $ of b.keys)
1311
+ v[$] = `key_${I++}`;
1312
1312
  h.write("const newResult = {};");
1313
- for (const $ of y.keys) {
1314
- const Z = v[$], z = jt($), N = _[$], V = ((f = N == null ? void 0 : N._zod) == null ? void 0 : f.optout) === "optional";
1315
- h.write(`const ${Z} = ${g($)};`), V ? h.write(`
1313
+ for (const $ of b.keys) {
1314
+ const Z = v[$], z = jt($), N = m[$], V = ((f = N == null ? void 0 : N._zod) == null ? void 0 : f.optout) === "optional";
1315
+ h.write(`const ${Z} = ${_($)};`), V ? h.write(`
1316
1316
  if (${Z}.issues.length) {
1317
1317
  if (${z} in input) {
1318
1318
  payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
@@ -1349,28 +1349,28 @@ const qs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1349
1349
  `);
1350
1350
  }
1351
1351
  h.write("payload.value = newResult;"), h.write("return payload;");
1352
- const w = h.compile();
1353
- return ($, Z) => w(_, $, Z);
1352
+ const k = h.compile();
1353
+ return ($, Z) => k(m, $, Z);
1354
1354
  };
1355
1355
  let s;
1356
- const i = ke, a = !ot.jitless, u = a && io.value, l = t.catchall;
1356
+ const i = ke, a = !ot.jitless, u = a && so.value, l = t.catchall;
1357
1357
  let d;
1358
- e._zod.parse = (_, h) => {
1358
+ e._zod.parse = (m, h) => {
1359
1359
  d ?? (d = n.value);
1360
- const y = _.value;
1361
- return i(y) ? a && u && (h == null ? void 0 : h.async) === !1 && h.jitless !== !0 ? (s || (s = o(t.shape)), _ = s(_, h), l ? Fr([], y, _, h, d, e) : _) : r(_, h) : (_.issues.push({
1360
+ const b = m.value;
1361
+ return i(b) ? a && u && (h == null ? void 0 : h.async) === !1 && h.jitless !== !0 ? (s || (s = o(t.shape)), m = s(m, h), l ? Fr([], b, m, h, d, e) : m) : r(m, h) : (m.issues.push({
1362
1362
  expected: "object",
1363
1363
  code: "invalid_type",
1364
- input: y,
1364
+ input: b,
1365
1365
  inst: e
1366
- }), _);
1366
+ }), m);
1367
1367
  };
1368
1368
  });
1369
1369
  function Dt(e, t, r, n) {
1370
1370
  for (const s of e)
1371
1371
  if (s.issues.length === 0)
1372
1372
  return t.value = s.value, t;
1373
- const o = e.filter((s) => !pe(s));
1373
+ const o = e.filter((s) => !fe(s));
1374
1374
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1375
1375
  code: "invalid_union",
1376
1376
  input: t.value,
@@ -1409,7 +1409,7 @@ const Vr = /* @__PURE__ */ p("$ZodUnion", (e, t) => {
1409
1409
  }
1410
1410
  return i ? Promise.all(a).then((c) => Dt(c, o, e, s)) : Dt(a, o, e, s);
1411
1411
  };
1412
- }), Hs = /* @__PURE__ */ p("$ZodDiscriminatedUnion", (e, t) => {
1412
+ }), qs = /* @__PURE__ */ p("$ZodDiscriminatedUnion", (e, t) => {
1413
1413
  t.inclusive = !1, Vr.init(e, t);
1414
1414
  const r = e._zod.parse;
1415
1415
  O(e._zod, "propValues", () => {
@@ -1426,7 +1426,7 @@ const Vr = /* @__PURE__ */ p("$ZodUnion", (e, t) => {
1426
1426
  }
1427
1427
  return o;
1428
1428
  });
1429
- const n = Be(() => {
1429
+ const n = Ve(() => {
1430
1430
  var i;
1431
1431
  const o = t.options, s = /* @__PURE__ */ new Map();
1432
1432
  for (const a of o) {
@@ -1461,7 +1461,7 @@ const Vr = /* @__PURE__ */ p("$ZodUnion", (e, t) => {
1461
1461
  inst: e
1462
1462
  }), o);
1463
1463
  };
1464
- }), Xs = /* @__PURE__ */ p("$ZodIntersection", (e, t) => {
1464
+ }), Gs = /* @__PURE__ */ p("$ZodIntersection", (e, t) => {
1465
1465
  x.init(e, t), e._zod.parse = (r, n) => {
1466
1466
  const o = r.value, s = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
1467
1467
  return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, u]) => Ut(r, c, u)) : Ut(r, s, i);
@@ -1519,14 +1519,14 @@ function Ut(e, t, r) {
1519
1519
  else
1520
1520
  e.issues.push(a);
1521
1521
  const s = [...n].filter(([, a]) => a.l && a.r).map(([a]) => a);
1522
- if (s.length && o && e.issues.push({ ...o, keys: s }), pe(e))
1522
+ if (s.length && o && e.issues.push({ ...o, keys: s }), fe(e))
1523
1523
  return e;
1524
1524
  const i = at(t.value, r.value);
1525
1525
  if (!i.valid)
1526
1526
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1527
1527
  return e.value = i.data, e;
1528
1528
  }
1529
- const Qs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1529
+ const Hs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1530
1530
  x.init(e, t), e._zod.parse = (r, n) => {
1531
1531
  const o = r.value;
1532
1532
  if (!ve(o))
@@ -1545,8 +1545,8 @@ const Qs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1545
1545
  a.add(typeof u == "number" ? u.toString() : u);
1546
1546
  const l = t.valueType._zod.run({ value: o[u], issues: [] }, n);
1547
1547
  l instanceof Promise ? s.push(l.then((d) => {
1548
- d.issues.length && r.issues.push(...fe(u, d.issues)), r.value[u] = d.value;
1549
- })) : (l.issues.length && r.issues.push(...fe(u, l.issues)), r.value[u] = l.value);
1548
+ d.issues.length && r.issues.push(...he(u, d.issues)), r.value[u] = d.value;
1549
+ })) : (l.issues.length && r.issues.push(...he(u, l.issues)), r.value[u] = l.value);
1550
1550
  }
1551
1551
  let c;
1552
1552
  for (const u in o)
@@ -1584,16 +1584,16 @@ const Qs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1584
1584
  }
1585
1585
  const l = t.valueType._zod.run({ value: o[a], issues: [] }, n);
1586
1586
  l instanceof Promise ? s.push(l.then((d) => {
1587
- d.issues.length && r.issues.push(...fe(a, d.issues)), r.value[c.value] = d.value;
1588
- })) : (l.issues.length && r.issues.push(...fe(a, l.issues)), r.value[c.value] = l.value);
1587
+ d.issues.length && r.issues.push(...he(a, d.issues)), r.value[c.value] = d.value;
1588
+ })) : (l.issues.length && r.issues.push(...he(a, l.issues)), r.value[c.value] = l.value);
1589
1589
  }
1590
1590
  }
1591
1591
  return s.length ? Promise.all(s).then(() => r) : r;
1592
1592
  };
1593
- }), Ks = /* @__PURE__ */ p("$ZodEnum", (e, t) => {
1593
+ }), Xs = /* @__PURE__ */ p("$ZodEnum", (e, t) => {
1594
1594
  x.init(e, t);
1595
1595
  const r = Or(t.entries), n = new Set(r);
1596
- e._zod.values = n, e._zod.pattern = new RegExp(`^(${r.filter((o) => uo.has(typeof o)).map((o) => typeof o == "string" ? _e(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1596
+ e._zod.values = n, e._zod.pattern = new RegExp(`^(${r.filter((o) => ao.has(typeof o)).map((o) => typeof o == "string" ? _e(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1597
1597
  const i = o.value;
1598
1598
  return n.has(i) || o.issues.push({
1599
1599
  code: "invalid_value",
@@ -1602,7 +1602,7 @@ const Qs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1602
1602
  inst: e
1603
1603
  }), o;
1604
1604
  };
1605
- }), ea = /* @__PURE__ */ p("$ZodLiteral", (e, t) => {
1605
+ }), Qs = /* @__PURE__ */ p("$ZodLiteral", (e, t) => {
1606
1606
  if (x.init(e, t), t.values.length === 0)
1607
1607
  throw new Error("Cannot create literal schema with no valid values");
1608
1608
  const r = new Set(t.values);
@@ -1615,7 +1615,7 @@ const Qs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1615
1615
  inst: e
1616
1616
  }), n;
1617
1617
  };
1618
- }), ta = /* @__PURE__ */ p("$ZodTransform", (e, t) => {
1618
+ }), Ks = /* @__PURE__ */ p("$ZodTransform", (e, t) => {
1619
1619
  x.init(e, t), e._zod.parse = (r, n) => {
1620
1620
  if (n.direction === "backward")
1621
1621
  throw new Sr(e.constructor.name);
@@ -1641,14 +1641,14 @@ const Br = /* @__PURE__ */ p("$ZodOptional", (e, t) => {
1641
1641
  }
1642
1642
  return r.value === void 0 ? r : t.innerType._zod.run(r, n);
1643
1643
  };
1644
- }), ra = /* @__PURE__ */ p("$ZodExactOptional", (e, t) => {
1644
+ }), ea = /* @__PURE__ */ p("$ZodExactOptional", (e, t) => {
1645
1645
  Br.init(e, t), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1646
- }), na = /* @__PURE__ */ p("$ZodNullable", (e, t) => {
1646
+ }), ta = /* @__PURE__ */ p("$ZodNullable", (e, t) => {
1647
1647
  x.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "pattern", () => {
1648
1648
  const r = t.innerType._zod.pattern;
1649
1649
  return r ? new RegExp(`^(${ft(r.source)}|null)$`) : void 0;
1650
1650
  }), O(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1651
- }), oa = /* @__PURE__ */ p("$ZodDefault", (e, t) => {
1651
+ }), ra = /* @__PURE__ */ p("$ZodDefault", (e, t) => {
1652
1652
  x.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1653
1653
  if (n.direction === "backward")
1654
1654
  return t.innerType._zod.run(r, n);
@@ -1661,9 +1661,9 @@ const Br = /* @__PURE__ */ p("$ZodOptional", (e, t) => {
1661
1661
  function Jt(e, t) {
1662
1662
  return e.value === void 0 && (e.value = t.defaultValue), e;
1663
1663
  }
1664
- const sa = /* @__PURE__ */ p("$ZodPrefault", (e, t) => {
1664
+ const na = /* @__PURE__ */ p("$ZodPrefault", (e, t) => {
1665
1665
  x.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (n.direction === "backward" || r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
1666
- }), aa = /* @__PURE__ */ p("$ZodNonOptional", (e, t) => {
1666
+ }), oa = /* @__PURE__ */ p("$ZodNonOptional", (e, t) => {
1667
1667
  x.init(e, t), O(e._zod, "values", () => {
1668
1668
  const r = t.innerType._zod.values;
1669
1669
  return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
@@ -1680,7 +1680,7 @@ function Ft(e, t) {
1680
1680
  inst: t
1681
1681
  }), e;
1682
1682
  }
1683
- const ia = /* @__PURE__ */ p("$ZodCatch", (e, t) => {
1683
+ const sa = /* @__PURE__ */ p("$ZodCatch", (e, t) => {
1684
1684
  x.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1685
1685
  if (n.direction === "backward")
1686
1686
  return t.innerType._zod.run(r, n);
@@ -1699,20 +1699,20 @@ const ia = /* @__PURE__ */ p("$ZodCatch", (e, t) => {
1699
1699
  input: r.value
1700
1700
  }), r.issues = []), r);
1701
1701
  };
1702
- }), ua = /* @__PURE__ */ p("$ZodPipe", (e, t) => {
1702
+ }), aa = /* @__PURE__ */ p("$ZodPipe", (e, t) => {
1703
1703
  x.init(e, t), O(e._zod, "values", () => t.in._zod.values), O(e._zod, "optin", () => t.in._zod.optin), O(e._zod, "optout", () => t.out._zod.optout), O(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (r, n) => {
1704
1704
  if (n.direction === "backward") {
1705
1705
  const s = t.out._zod.run(r, n);
1706
- return s instanceof Promise ? s.then((i) => xe(i, t.in, n)) : xe(s, t.in, n);
1706
+ return s instanceof Promise ? s.then((i) => Re(i, t.in, n)) : Re(s, t.in, n);
1707
1707
  }
1708
1708
  const o = t.in._zod.run(r, n);
1709
- return o instanceof Promise ? o.then((s) => xe(s, t.out, n)) : xe(o, t.out, n);
1709
+ return o instanceof Promise ? o.then((s) => Re(s, t.out, n)) : Re(o, t.out, n);
1710
1710
  };
1711
1711
  });
1712
- function xe(e, t, r) {
1712
+ function Re(e, t, r) {
1713
1713
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, r);
1714
1714
  }
1715
- const ca = /* @__PURE__ */ p("$ZodReadonly", (e, t) => {
1715
+ const ia = /* @__PURE__ */ p("$ZodReadonly", (e, t) => {
1716
1716
  x.init(e, t), O(e._zod, "propValues", () => t.innerType._zod.propValues), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "optin", () => {
1717
1717
  var r, n;
1718
1718
  return (n = (r = t.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.optin;
@@ -1729,7 +1729,7 @@ const ca = /* @__PURE__ */ p("$ZodReadonly", (e, t) => {
1729
1729
  function Vt(e) {
1730
1730
  return e.value = Object.freeze(e.value), e;
1731
1731
  }
1732
- const la = /* @__PURE__ */ p("$ZodLazy", (e, t) => {
1732
+ const ua = /* @__PURE__ */ p("$ZodLazy", (e, t) => {
1733
1733
  x.init(e, t), O(e._zod, "innerType", () => t.getter()), O(e._zod, "pattern", () => {
1734
1734
  var r, n;
1735
1735
  return (n = (r = e._zod.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.pattern;
@@ -1743,7 +1743,7 @@ const la = /* @__PURE__ */ p("$ZodLazy", (e, t) => {
1743
1743
  var r, n;
1744
1744
  return ((n = (r = e._zod.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.optout) ?? void 0;
1745
1745
  }), e._zod.parse = (r, n) => e._zod.innerType._zod.run(r, n);
1746
- }), da = /* @__PURE__ */ p("$ZodCustom", (e, t) => {
1746
+ }), ca = /* @__PURE__ */ p("$ZodCustom", (e, t) => {
1747
1747
  W.init(e, t), x.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
1748
1748
  const n = r.value, o = t.fn(n);
1749
1749
  if (o instanceof Promise)
@@ -1767,7 +1767,7 @@ function Bt(e, t, r, n) {
1767
1767
  }
1768
1768
  }
1769
1769
  var Wt;
1770
- class pa {
1770
+ class la {
1771
1771
  constructor() {
1772
1772
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1773
1773
  }
@@ -1796,26 +1796,26 @@ class pa {
1796
1796
  return this._map.has(t);
1797
1797
  }
1798
1798
  }
1799
- function fa() {
1800
- return new pa();
1799
+ function da() {
1800
+ return new la();
1801
1801
  }
1802
- (Wt = globalThis).__zod_globalRegistry ?? (Wt.__zod_globalRegistry = fa());
1802
+ (Wt = globalThis).__zod_globalRegistry ?? (Wt.__zod_globalRegistry = da());
1803
1803
  const Ee = globalThis.__zod_globalRegistry;
1804
1804
  // @__NO_SIDE_EFFECTS__
1805
- function ha(e, t) {
1805
+ function pa(e, t) {
1806
1806
  return new e({
1807
1807
  type: "string",
1808
- ...b(t)
1808
+ ...y(t)
1809
1809
  });
1810
1810
  }
1811
1811
  // @__NO_SIDE_EFFECTS__
1812
- function ma(e, t) {
1812
+ function fa(e, t) {
1813
1813
  return new e({
1814
1814
  type: "string",
1815
1815
  format: "email",
1816
1816
  check: "string_format",
1817
1817
  abort: !1,
1818
- ...b(t)
1818
+ ...y(t)
1819
1819
  });
1820
1820
  }
1821
1821
  // @__NO_SIDE_EFFECTS__
@@ -1825,214 +1825,214 @@ function Yt(e, t) {
1825
1825
  format: "guid",
1826
1826
  check: "string_format",
1827
1827
  abort: !1,
1828
- ...b(t)
1828
+ ...y(t)
1829
1829
  });
1830
1830
  }
1831
1831
  // @__NO_SIDE_EFFECTS__
1832
- function ga(e, t) {
1832
+ function ha(e, t) {
1833
1833
  return new e({
1834
1834
  type: "string",
1835
1835
  format: "uuid",
1836
1836
  check: "string_format",
1837
1837
  abort: !1,
1838
- ...b(t)
1838
+ ...y(t)
1839
1839
  });
1840
1840
  }
1841
1841
  // @__NO_SIDE_EFFECTS__
1842
- function va(e, t) {
1842
+ function ma(e, t) {
1843
1843
  return new e({
1844
1844
  type: "string",
1845
1845
  format: "uuid",
1846
1846
  check: "string_format",
1847
1847
  abort: !1,
1848
1848
  version: "v4",
1849
- ...b(t)
1849
+ ...y(t)
1850
1850
  });
1851
1851
  }
1852
1852
  // @__NO_SIDE_EFFECTS__
1853
- function _a(e, t) {
1853
+ function ga(e, t) {
1854
1854
  return new e({
1855
1855
  type: "string",
1856
1856
  format: "uuid",
1857
1857
  check: "string_format",
1858
1858
  abort: !1,
1859
1859
  version: "v6",
1860
- ...b(t)
1860
+ ...y(t)
1861
1861
  });
1862
1862
  }
1863
1863
  // @__NO_SIDE_EFFECTS__
1864
- function ya(e, t) {
1864
+ function va(e, t) {
1865
1865
  return new e({
1866
1866
  type: "string",
1867
1867
  format: "uuid",
1868
1868
  check: "string_format",
1869
1869
  abort: !1,
1870
1870
  version: "v7",
1871
- ...b(t)
1871
+ ...y(t)
1872
1872
  });
1873
1873
  }
1874
1874
  // @__NO_SIDE_EFFECTS__
1875
- function ba(e, t) {
1875
+ function _a(e, t) {
1876
1876
  return new e({
1877
1877
  type: "string",
1878
1878
  format: "url",
1879
1879
  check: "string_format",
1880
1880
  abort: !1,
1881
- ...b(t)
1881
+ ...y(t)
1882
1882
  });
1883
1883
  }
1884
1884
  // @__NO_SIDE_EFFECTS__
1885
- function wa(e, t) {
1885
+ function ya(e, t) {
1886
1886
  return new e({
1887
1887
  type: "string",
1888
1888
  format: "emoji",
1889
1889
  check: "string_format",
1890
1890
  abort: !1,
1891
- ...b(t)
1891
+ ...y(t)
1892
1892
  });
1893
1893
  }
1894
1894
  // @__NO_SIDE_EFFECTS__
1895
- function Ia(e, t) {
1895
+ function ba(e, t) {
1896
1896
  return new e({
1897
1897
  type: "string",
1898
1898
  format: "nanoid",
1899
1899
  check: "string_format",
1900
1900
  abort: !1,
1901
- ...b(t)
1901
+ ...y(t)
1902
1902
  });
1903
1903
  }
1904
1904
  // @__NO_SIDE_EFFECTS__
1905
- function Ea(e, t) {
1905
+ function wa(e, t) {
1906
1906
  return new e({
1907
1907
  type: "string",
1908
1908
  format: "cuid",
1909
1909
  check: "string_format",
1910
1910
  abort: !1,
1911
- ...b(t)
1911
+ ...y(t)
1912
1912
  });
1913
1913
  }
1914
1914
  // @__NO_SIDE_EFFECTS__
1915
- function ka(e, t) {
1915
+ function Ia(e, t) {
1916
1916
  return new e({
1917
1917
  type: "string",
1918
1918
  format: "cuid2",
1919
1919
  check: "string_format",
1920
1920
  abort: !1,
1921
- ...b(t)
1921
+ ...y(t)
1922
1922
  });
1923
1923
  }
1924
1924
  // @__NO_SIDE_EFFECTS__
1925
- function za(e, t) {
1925
+ function Ea(e, t) {
1926
1926
  return new e({
1927
1927
  type: "string",
1928
1928
  format: "ulid",
1929
1929
  check: "string_format",
1930
1930
  abort: !1,
1931
- ...b(t)
1931
+ ...y(t)
1932
1932
  });
1933
1933
  }
1934
1934
  // @__NO_SIDE_EFFECTS__
1935
- function Sa(e, t) {
1935
+ function ka(e, t) {
1936
1936
  return new e({
1937
1937
  type: "string",
1938
1938
  format: "xid",
1939
1939
  check: "string_format",
1940
1940
  abort: !1,
1941
- ...b(t)
1941
+ ...y(t)
1942
1942
  });
1943
1943
  }
1944
1944
  // @__NO_SIDE_EFFECTS__
1945
- function Oa(e, t) {
1945
+ function za(e, t) {
1946
1946
  return new e({
1947
1947
  type: "string",
1948
1948
  format: "ksuid",
1949
1949
  check: "string_format",
1950
1950
  abort: !1,
1951
- ...b(t)
1951
+ ...y(t)
1952
1952
  });
1953
1953
  }
1954
1954
  // @__NO_SIDE_EFFECTS__
1955
- function Za(e, t) {
1955
+ function Sa(e, t) {
1956
1956
  return new e({
1957
1957
  type: "string",
1958
1958
  format: "ipv4",
1959
1959
  check: "string_format",
1960
1960
  abort: !1,
1961
- ...b(t)
1961
+ ...y(t)
1962
1962
  });
1963
1963
  }
1964
1964
  // @__NO_SIDE_EFFECTS__
1965
- function $a(e, t) {
1965
+ function Oa(e, t) {
1966
1966
  return new e({
1967
1967
  type: "string",
1968
1968
  format: "ipv6",
1969
1969
  check: "string_format",
1970
1970
  abort: !1,
1971
- ...b(t)
1971
+ ...y(t)
1972
1972
  });
1973
1973
  }
1974
1974
  // @__NO_SIDE_EFFECTS__
1975
- function Ta(e, t) {
1975
+ function Za(e, t) {
1976
1976
  return new e({
1977
1977
  type: "string",
1978
1978
  format: "cidrv4",
1979
1979
  check: "string_format",
1980
1980
  abort: !1,
1981
- ...b(t)
1981
+ ...y(t)
1982
1982
  });
1983
1983
  }
1984
1984
  // @__NO_SIDE_EFFECTS__
1985
- function Na(e, t) {
1985
+ function $a(e, t) {
1986
1986
  return new e({
1987
1987
  type: "string",
1988
1988
  format: "cidrv6",
1989
1989
  check: "string_format",
1990
1990
  abort: !1,
1991
- ...b(t)
1991
+ ...y(t)
1992
1992
  });
1993
1993
  }
1994
1994
  // @__NO_SIDE_EFFECTS__
1995
- function Pa(e, t) {
1995
+ function Ta(e, t) {
1996
1996
  return new e({
1997
1997
  type: "string",
1998
1998
  format: "base64",
1999
1999
  check: "string_format",
2000
2000
  abort: !1,
2001
- ...b(t)
2001
+ ...y(t)
2002
2002
  });
2003
2003
  }
2004
2004
  // @__NO_SIDE_EFFECTS__
2005
- function Aa(e, t) {
2005
+ function Na(e, t) {
2006
2006
  return new e({
2007
2007
  type: "string",
2008
2008
  format: "base64url",
2009
2009
  check: "string_format",
2010
2010
  abort: !1,
2011
- ...b(t)
2011
+ ...y(t)
2012
2012
  });
2013
2013
  }
2014
2014
  // @__NO_SIDE_EFFECTS__
2015
- function Ra(e, t) {
2015
+ function Pa(e, t) {
2016
2016
  return new e({
2017
2017
  type: "string",
2018
2018
  format: "e164",
2019
2019
  check: "string_format",
2020
2020
  abort: !1,
2021
- ...b(t)
2021
+ ...y(t)
2022
2022
  });
2023
2023
  }
2024
2024
  // @__NO_SIDE_EFFECTS__
2025
- function xa(e, t) {
2025
+ function Aa(e, t) {
2026
2026
  return new e({
2027
2027
  type: "string",
2028
2028
  format: "jwt",
2029
2029
  check: "string_format",
2030
2030
  abort: !1,
2031
- ...b(t)
2031
+ ...y(t)
2032
2032
  });
2033
2033
  }
2034
2034
  // @__NO_SIDE_EFFECTS__
2035
- function ja(e, t) {
2035
+ function Ra(e, t) {
2036
2036
  return new e({
2037
2037
  type: "string",
2038
2038
  format: "datetime",
@@ -2040,87 +2040,87 @@ function ja(e, t) {
2040
2040
  offset: !1,
2041
2041
  local: !1,
2042
2042
  precision: null,
2043
- ...b(t)
2043
+ ...y(t)
2044
2044
  });
2045
2045
  }
2046
2046
  // @__NO_SIDE_EFFECTS__
2047
- function Ca(e, t) {
2047
+ function xa(e, t) {
2048
2048
  return new e({
2049
2049
  type: "string",
2050
2050
  format: "date",
2051
2051
  check: "string_format",
2052
- ...b(t)
2052
+ ...y(t)
2053
2053
  });
2054
2054
  }
2055
2055
  // @__NO_SIDE_EFFECTS__
2056
- function Ma(e, t) {
2056
+ function ja(e, t) {
2057
2057
  return new e({
2058
2058
  type: "string",
2059
2059
  format: "time",
2060
2060
  check: "string_format",
2061
2061
  precision: null,
2062
- ...b(t)
2062
+ ...y(t)
2063
2063
  });
2064
2064
  }
2065
2065
  // @__NO_SIDE_EFFECTS__
2066
- function Da(e, t) {
2066
+ function Ca(e, t) {
2067
2067
  return new e({
2068
2068
  type: "string",
2069
2069
  format: "duration",
2070
2070
  check: "string_format",
2071
- ...b(t)
2071
+ ...y(t)
2072
2072
  });
2073
2073
  }
2074
2074
  // @__NO_SIDE_EFFECTS__
2075
- function Ua(e, t) {
2075
+ function Ma(e, t) {
2076
2076
  return new e({
2077
2077
  type: "number",
2078
2078
  checks: [],
2079
- ...b(t)
2079
+ ...y(t)
2080
2080
  });
2081
2081
  }
2082
2082
  // @__NO_SIDE_EFFECTS__
2083
- function La(e, t) {
2083
+ function Da(e, t) {
2084
2084
  return new e({
2085
2085
  type: "number",
2086
2086
  check: "number_format",
2087
2087
  abort: !1,
2088
2088
  format: "safeint",
2089
- ...b(t)
2089
+ ...y(t)
2090
2090
  });
2091
2091
  }
2092
2092
  // @__NO_SIDE_EFFECTS__
2093
- function Ja(e, t) {
2093
+ function Ua(e, t) {
2094
2094
  return new e({
2095
2095
  type: "boolean",
2096
- ...b(t)
2096
+ ...y(t)
2097
2097
  });
2098
2098
  }
2099
2099
  // @__NO_SIDE_EFFECTS__
2100
- function Fa(e, t) {
2100
+ function La(e, t) {
2101
2101
  return new e({
2102
2102
  type: "null",
2103
- ...b(t)
2103
+ ...y(t)
2104
2104
  });
2105
2105
  }
2106
2106
  // @__NO_SIDE_EFFECTS__
2107
- function Va(e) {
2107
+ function Ja(e) {
2108
2108
  return new e({
2109
2109
  type: "unknown"
2110
2110
  });
2111
2111
  }
2112
2112
  // @__NO_SIDE_EFFECTS__
2113
- function Ba(e, t) {
2113
+ function Fa(e, t) {
2114
2114
  return new e({
2115
2115
  type: "never",
2116
- ...b(t)
2116
+ ...y(t)
2117
2117
  });
2118
2118
  }
2119
2119
  // @__NO_SIDE_EFFECTS__
2120
2120
  function qt(e, t) {
2121
2121
  return new Mr({
2122
2122
  check: "less_than",
2123
- ...b(t),
2123
+ ...y(t),
2124
2124
  value: e,
2125
2125
  inclusive: !1
2126
2126
  });
@@ -2129,7 +2129,7 @@ function qt(e, t) {
2129
2129
  function Xe(e, t) {
2130
2130
  return new Mr({
2131
2131
  check: "less_than",
2132
- ...b(t),
2132
+ ...y(t),
2133
2133
  value: e,
2134
2134
  inclusive: !0
2135
2135
  });
@@ -2138,7 +2138,7 @@ function Xe(e, t) {
2138
2138
  function Gt(e, t) {
2139
2139
  return new Dr({
2140
2140
  check: "greater_than",
2141
- ...b(t),
2141
+ ...y(t),
2142
2142
  value: e,
2143
2143
  inclusive: !1
2144
2144
  });
@@ -2147,136 +2147,136 @@ function Gt(e, t) {
2147
2147
  function Qe(e, t) {
2148
2148
  return new Dr({
2149
2149
  check: "greater_than",
2150
- ...b(t),
2150
+ ...y(t),
2151
2151
  value: e,
2152
2152
  inclusive: !0
2153
2153
  });
2154
2154
  }
2155
2155
  // @__NO_SIDE_EFFECTS__
2156
2156
  function Ht(e, t) {
2157
- return new ns({
2157
+ return new ts({
2158
2158
  check: "multiple_of",
2159
- ...b(t),
2159
+ ...y(t),
2160
2160
  value: e
2161
2161
  });
2162
2162
  }
2163
2163
  // @__NO_SIDE_EFFECTS__
2164
2164
  function Wr(e, t) {
2165
- return new ss({
2165
+ return new ns({
2166
2166
  check: "max_length",
2167
- ...b(t),
2167
+ ...y(t),
2168
2168
  maximum: e
2169
2169
  });
2170
2170
  }
2171
2171
  // @__NO_SIDE_EFFECTS__
2172
- function Me(e, t) {
2173
- return new as({
2172
+ function Ce(e, t) {
2173
+ return new os({
2174
2174
  check: "min_length",
2175
- ...b(t),
2175
+ ...y(t),
2176
2176
  minimum: e
2177
2177
  });
2178
2178
  }
2179
2179
  // @__NO_SIDE_EFFECTS__
2180
2180
  function Yr(e, t) {
2181
- return new is({
2181
+ return new ss({
2182
2182
  check: "length_equals",
2183
- ...b(t),
2183
+ ...y(t),
2184
2184
  length: e
2185
2185
  });
2186
2186
  }
2187
2187
  // @__NO_SIDE_EFFECTS__
2188
- function Wa(e, t) {
2189
- return new us({
2188
+ function Va(e, t) {
2189
+ return new as({
2190
2190
  check: "string_format",
2191
2191
  format: "regex",
2192
- ...b(t),
2192
+ ...y(t),
2193
2193
  pattern: e
2194
2194
  });
2195
2195
  }
2196
2196
  // @__NO_SIDE_EFFECTS__
2197
- function Ya(e) {
2198
- return new cs({
2197
+ function Ba(e) {
2198
+ return new is({
2199
2199
  check: "string_format",
2200
2200
  format: "lowercase",
2201
- ...b(e)
2201
+ ...y(e)
2202
2202
  });
2203
2203
  }
2204
2204
  // @__NO_SIDE_EFFECTS__
2205
- function qa(e) {
2206
- return new ls({
2205
+ function Wa(e) {
2206
+ return new us({
2207
2207
  check: "string_format",
2208
2208
  format: "uppercase",
2209
- ...b(e)
2209
+ ...y(e)
2210
2210
  });
2211
2211
  }
2212
2212
  // @__NO_SIDE_EFFECTS__
2213
- function Ga(e, t) {
2214
- return new ds({
2213
+ function Ya(e, t) {
2214
+ return new cs({
2215
2215
  check: "string_format",
2216
2216
  format: "includes",
2217
- ...b(t),
2217
+ ...y(t),
2218
2218
  includes: e
2219
2219
  });
2220
2220
  }
2221
2221
  // @__NO_SIDE_EFFECTS__
2222
- function Ha(e, t) {
2223
- return new ps({
2222
+ function qa(e, t) {
2223
+ return new ls({
2224
2224
  check: "string_format",
2225
2225
  format: "starts_with",
2226
- ...b(t),
2226
+ ...y(t),
2227
2227
  prefix: e
2228
2228
  });
2229
2229
  }
2230
2230
  // @__NO_SIDE_EFFECTS__
2231
- function Xa(e, t) {
2232
- return new fs({
2231
+ function Ga(e, t) {
2232
+ return new ds({
2233
2233
  check: "string_format",
2234
2234
  format: "ends_with",
2235
- ...b(t),
2235
+ ...y(t),
2236
2236
  suffix: e
2237
2237
  });
2238
2238
  }
2239
2239
  // @__NO_SIDE_EFFECTS__
2240
2240
  function ye(e) {
2241
- return new hs({
2241
+ return new ps({
2242
2242
  check: "overwrite",
2243
2243
  tx: e
2244
2244
  });
2245
2245
  }
2246
2246
  // @__NO_SIDE_EFFECTS__
2247
- function Qa(e) {
2247
+ function Ha(e) {
2248
2248
  return /* @__PURE__ */ ye((t) => t.normalize(e));
2249
2249
  }
2250
2250
  // @__NO_SIDE_EFFECTS__
2251
- function Ka() {
2251
+ function Xa() {
2252
2252
  return /* @__PURE__ */ ye((e) => e.trim());
2253
2253
  }
2254
2254
  // @__NO_SIDE_EFFECTS__
2255
- function ei() {
2255
+ function Qa() {
2256
2256
  return /* @__PURE__ */ ye((e) => e.toLowerCase());
2257
2257
  }
2258
2258
  // @__NO_SIDE_EFFECTS__
2259
- function ti() {
2259
+ function Ka() {
2260
2260
  return /* @__PURE__ */ ye((e) => e.toUpperCase());
2261
2261
  }
2262
2262
  // @__NO_SIDE_EFFECTS__
2263
- function ri() {
2264
- return /* @__PURE__ */ ye((e) => ao(e));
2263
+ function ei() {
2264
+ return /* @__PURE__ */ ye((e) => oo(e));
2265
2265
  }
2266
2266
  // @__NO_SIDE_EFFECTS__
2267
- function ni(e, t, r) {
2267
+ function ti(e, t, r) {
2268
2268
  return new e({
2269
2269
  type: "array",
2270
2270
  element: t,
2271
2271
  // get element() {
2272
2272
  // return element;
2273
2273
  // },
2274
- ...b(r)
2274
+ ...y(r)
2275
2275
  });
2276
2276
  }
2277
2277
  // @__NO_SIDE_EFFECTS__
2278
- function oi(e, t, r) {
2279
- const n = b(r);
2278
+ function ri(e, t, r) {
2279
+ const n = y(r);
2280
2280
  return n.abort ?? (n.abort = !0), new e({
2281
2281
  type: "custom",
2282
2282
  check: "custom",
@@ -2285,17 +2285,17 @@ function oi(e, t, r) {
2285
2285
  });
2286
2286
  }
2287
2287
  // @__NO_SIDE_EFFECTS__
2288
- function si(e, t, r) {
2288
+ function ni(e, t, r) {
2289
2289
  return new e({
2290
2290
  type: "custom",
2291
2291
  check: "custom",
2292
2292
  fn: t,
2293
- ...b(r)
2293
+ ...y(r)
2294
2294
  });
2295
2295
  }
2296
2296
  // @__NO_SIDE_EFFECTS__
2297
- function ai(e) {
2298
- const t = /* @__PURE__ */ ii((r) => (r.addIssue = (n) => {
2297
+ function oi(e) {
2298
+ const t = /* @__PURE__ */ si((r) => (r.addIssue = (n) => {
2299
2299
  if (typeof n == "string")
2300
2300
  r.issues.push(ze(n, r.value, t._zod.def));
2301
2301
  else {
@@ -2306,14 +2306,14 @@ function ai(e) {
2306
2306
  return t;
2307
2307
  }
2308
2308
  // @__NO_SIDE_EFFECTS__
2309
- function ii(e, t) {
2309
+ function si(e, t) {
2310
2310
  const r = new W({
2311
2311
  check: "custom",
2312
- ...b(t)
2312
+ ...y(t)
2313
2313
  });
2314
2314
  return r._zod.check = e, r;
2315
2315
  }
2316
- function De(e) {
2316
+ function Me(e) {
2317
2317
  let t = (e == null ? void 0 : e.target) ?? "draft-2020-12";
2318
2318
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2319
2319
  processors: e.processors ?? {},
@@ -2342,26 +2342,26 @@ function A(e, t, r = { path: [], schemaPath: [] }) {
2342
2342
  if (a)
2343
2343
  i.schema = a;
2344
2344
  else {
2345
- const _ = {
2345
+ const m = {
2346
2346
  ...r,
2347
2347
  schemaPath: [...r.schemaPath, e],
2348
2348
  path: r.path
2349
2349
  };
2350
2350
  if (e._zod.processJSONSchema)
2351
- e._zod.processJSONSchema(t, i.schema, _);
2351
+ e._zod.processJSONSchema(t, i.schema, m);
2352
2352
  else {
2353
- const y = i.schema, g = t.processors[o.type];
2354
- if (!g)
2353
+ const b = i.schema, _ = t.processors[o.type];
2354
+ if (!_)
2355
2355
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2356
- g(e, t, y, _);
2356
+ _(e, t, b, m);
2357
2357
  }
2358
2358
  const h = e._zod.parent;
2359
- h && (i.ref || (i.ref = h), A(h, t, _), t.seen.get(h).isParent = !0);
2359
+ h && (i.ref || (i.ref = h), A(h, t, m), t.seen.get(h).isParent = !0);
2360
2360
  }
2361
2361
  const c = t.metadataRegistry.get(e);
2362
2362
  return c && Object.assign(i.schema, c), t.io === "input" && L(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((n = i.schema).default ?? (n.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2363
2363
  }
2364
- function Ue(e, t) {
2364
+ function De(e, t) {
2365
2365
  var i, a, c, u;
2366
2366
  const r = e.seen.get(t);
2367
2367
  if (!r)
@@ -2370,35 +2370,35 @@ function Ue(e, t) {
2370
2370
  for (const l of e.seen.entries()) {
2371
2371
  const d = (i = e.metadataRegistry.get(l[0])) == null ? void 0 : i.id;
2372
2372
  if (d) {
2373
- const _ = n.get(d);
2374
- if (_ && _ !== l[0])
2373
+ const m = n.get(d);
2374
+ if (m && m !== l[0])
2375
2375
  throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2376
2376
  n.set(d, l[0]);
2377
2377
  }
2378
2378
  }
2379
2379
  const o = (l) => {
2380
- var g;
2380
+ var _;
2381
2381
  const d = e.target === "draft-2020-12" ? "$defs" : "definitions";
2382
2382
  if (e.external) {
2383
- const v = (g = e.external.registry.get(l[0])) == null ? void 0 : g.id, E = e.external.uri ?? ((f) => f);
2383
+ const v = (_ = e.external.registry.get(l[0])) == null ? void 0 : _.id, I = e.external.uri ?? ((f) => f);
2384
2384
  if (v)
2385
- return { ref: E(v) };
2386
- const w = l[1].defId ?? l[1].schema.id ?? `schema${e.counter++}`;
2387
- return l[1].defId = w, { defId: w, ref: `${E("__shared")}#/${d}/${w}` };
2385
+ return { ref: I(v) };
2386
+ const k = l[1].defId ?? l[1].schema.id ?? `schema${e.counter++}`;
2387
+ return l[1].defId = k, { defId: k, ref: `${I("__shared")}#/${d}/${k}` };
2388
2388
  }
2389
2389
  if (l[1] === r)
2390
2390
  return { ref: "#" };
2391
- const h = `#/${d}/`, y = l[1].schema.id ?? `__schema${e.counter++}`;
2392
- return { defId: y, ref: h + y };
2391
+ const h = `#/${d}/`, b = l[1].schema.id ?? `__schema${e.counter++}`;
2392
+ return { defId: b, ref: h + b };
2393
2393
  }, s = (l) => {
2394
2394
  if (l[1].schema.$ref)
2395
2395
  return;
2396
- const d = l[1], { ref: _, defId: h } = o(l);
2396
+ const d = l[1], { ref: m, defId: h } = o(l);
2397
2397
  d.def = { ...d.schema }, h && (d.defId = h);
2398
- const y = d.schema;
2399
- for (const g in y)
2400
- delete y[g];
2401
- y.$ref = _;
2398
+ const b = d.schema;
2399
+ for (const _ in b)
2400
+ delete b[_];
2401
+ b.$ref = m;
2402
2402
  };
2403
2403
  if (e.cycles === "throw")
2404
2404
  for (const l of e.seen.entries()) {
@@ -2435,7 +2435,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2435
2435
  }
2436
2436
  }
2437
2437
  }
2438
- function Le(e, t) {
2438
+ function Ue(e, t) {
2439
2439
  var i, a, c;
2440
2440
  const r = e.seen.get(t);
2441
2441
  if (!r)
@@ -2444,24 +2444,24 @@ function Le(e, t) {
2444
2444
  const l = e.seen.get(u);
2445
2445
  if (l.ref === null)
2446
2446
  return;
2447
- const d = l.def ?? l.schema, _ = { ...d }, h = l.ref;
2447
+ const d = l.def ?? l.schema, m = { ...d }, h = l.ref;
2448
2448
  if (l.ref = null, h) {
2449
2449
  n(h);
2450
- const g = e.seen.get(h), v = g.schema;
2451
- if (v.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (d.allOf = d.allOf ?? [], d.allOf.push(v)) : Object.assign(d, v), Object.assign(d, _), u._zod.parent === h)
2452
- for (const w in d)
2453
- w === "$ref" || w === "allOf" || w in _ || delete d[w];
2450
+ const _ = e.seen.get(h), v = _.schema;
2451
+ if (v.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (d.allOf = d.allOf ?? [], d.allOf.push(v)) : Object.assign(d, v), Object.assign(d, m), u._zod.parent === h)
2452
+ for (const k in d)
2453
+ k === "$ref" || k === "allOf" || k in m || delete d[k];
2454
2454
  if (v.$ref)
2455
- for (const w in d)
2456
- w === "$ref" || w === "allOf" || w in g.def && JSON.stringify(d[w]) === JSON.stringify(g.def[w]) && delete d[w];
2455
+ for (const k in d)
2456
+ k === "$ref" || k === "allOf" || k in _.def && JSON.stringify(d[k]) === JSON.stringify(_.def[k]) && delete d[k];
2457
2457
  }
2458
- const y = u._zod.parent;
2459
- if (y && y !== h) {
2460
- n(y);
2461
- const g = e.seen.get(y);
2462
- if (g != null && g.schema.$ref && (d.$ref = g.schema.$ref, g.def))
2458
+ const b = u._zod.parent;
2459
+ if (b && b !== h) {
2460
+ n(b);
2461
+ const _ = e.seen.get(b);
2462
+ if (_ != null && _.schema.$ref && (d.$ref = _.schema.$ref, _.def))
2463
2463
  for (const v in d)
2464
- v === "$ref" || v === "allOf" || v in g.def && JSON.stringify(d[v]) === JSON.stringify(g.def[v]) && delete d[v];
2464
+ v === "$ref" || v === "allOf" || v in _.def && JSON.stringify(d[v]) === JSON.stringify(_.def[v]) && delete d[v];
2465
2465
  }
2466
2466
  e.override({
2467
2467
  zodSchema: u,
@@ -2491,8 +2491,8 @@ function Le(e, t) {
2491
2491
  value: {
2492
2492
  ...t["~standard"],
2493
2493
  jsonSchema: {
2494
- input: Je(t, "input", e.processors),
2495
- output: Je(t, "output", e.processors)
2494
+ input: Le(t, "input", e.processors),
2495
+ output: Le(t, "output", e.processors)
2496
2496
  }
2497
2497
  },
2498
2498
  enumerable: !1,
@@ -2544,13 +2544,13 @@ function L(e, t) {
2544
2544
  }
2545
2545
  return !1;
2546
2546
  }
2547
- const ui = (e, t = {}) => (r) => {
2548
- const n = De({ ...r, processors: t });
2549
- return A(e, n), Ue(n, e), Le(n, e);
2550
- }, Je = (e, t, r = {}) => (n) => {
2551
- const { libraryOptions: o, target: s } = n ?? {}, i = De({ ...o ?? {}, target: s, io: t, processors: r });
2552
- return A(e, i), Ue(i, e), Le(i, e);
2553
- }, ci = {
2547
+ const ai = (e, t = {}) => (r) => {
2548
+ const n = Me({ ...r, processors: t });
2549
+ return A(e, n), De(n, e), Ue(n, e);
2550
+ }, Le = (e, t, r = {}) => (n) => {
2551
+ const { libraryOptions: o, target: s } = n ?? {}, i = Me({ ...o ?? {}, target: s, io: t, processors: r });
2552
+ return A(e, i), De(i, e), Ue(i, e);
2553
+ }, ii = {
2554
2554
  guid: "uuid",
2555
2555
  url: "uri",
2556
2556
  datetime: "date-time",
@@ -2561,7 +2561,7 @@ const ui = (e, t = {}) => (r) => {
2561
2561
  const o = r;
2562
2562
  o.type = "string";
2563
2563
  const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
2564
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = ci[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
2564
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = ii[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
2565
2565
  const l = [...c];
2566
2566
  l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
2567
2567
  ...l.map((d) => ({
@@ -2575,25 +2575,25 @@ const ui = (e, t = {}) => (r) => {
2575
2575
  typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof s == "number" && (o.minimum = s, typeof l == "number" && t.target !== "draft-04" && (l >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof i == "number" && (o.maximum = i, typeof u == "number" && t.target !== "draft-04" && (u <= i ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
2576
2576
  }, Hr = (e, t, r, n) => {
2577
2577
  r.type = "boolean";
2578
- }, li = (e, t, r, n) => {
2578
+ }, ui = (e, t, r, n) => {
2579
2579
  if (t.unrepresentable === "throw")
2580
2580
  throw new Error("BigInt cannot be represented in JSON Schema");
2581
- }, di = (e, t, r, n) => {
2581
+ }, ci = (e, t, r, n) => {
2582
2582
  if (t.unrepresentable === "throw")
2583
2583
  throw new Error("Symbols cannot be represented in JSON Schema");
2584
2584
  }, Xr = (e, t, r, n) => {
2585
2585
  t.target === "openapi-3.0" ? (r.type = "string", r.nullable = !0, r.enum = [null]) : r.type = "null";
2586
- }, pi = (e, t, r, n) => {
2586
+ }, li = (e, t, r, n) => {
2587
2587
  if (t.unrepresentable === "throw")
2588
2588
  throw new Error("Undefined cannot be represented in JSON Schema");
2589
- }, fi = (e, t, r, n) => {
2589
+ }, di = (e, t, r, n) => {
2590
2590
  if (t.unrepresentable === "throw")
2591
2591
  throw new Error("Void cannot be represented in JSON Schema");
2592
2592
  }, Qr = (e, t, r, n) => {
2593
2593
  r.not = {};
2594
- }, hi = (e, t, r, n) => {
2594
+ }, pi = (e, t, r, n) => {
2595
2595
  }, Kr = (e, t, r, n) => {
2596
- }, mi = (e, t, r, n) => {
2596
+ }, fi = (e, t, r, n) => {
2597
2597
  if (t.unrepresentable === "throw")
2598
2598
  throw new Error("Date cannot be represented in JSON Schema");
2599
2599
  }, en = (e, t, r, n) => {
@@ -2617,36 +2617,36 @@ const ui = (e, t = {}) => (r) => {
2617
2617
  r.type = i === null ? "null" : typeof i, t.target === "draft-04" || t.target === "openapi-3.0" ? r.enum = [i] : r.const = i;
2618
2618
  } else
2619
2619
  s.every((i) => typeof i == "number") && (r.type = "number"), s.every((i) => typeof i == "string") && (r.type = "string"), s.every((i) => typeof i == "boolean") && (r.type = "boolean"), s.every((i) => i === null) && (r.type = "null"), r.enum = s;
2620
- }, gi = (e, t, r, n) => {
2620
+ }, hi = (e, t, r, n) => {
2621
2621
  if (t.unrepresentable === "throw")
2622
2622
  throw new Error("NaN cannot be represented in JSON Schema");
2623
- }, vi = (e, t, r, n) => {
2623
+ }, mi = (e, t, r, n) => {
2624
2624
  const o = r, s = e._zod.pattern;
2625
2625
  if (!s)
2626
2626
  throw new Error("Pattern not found in template literal");
2627
2627
  o.type = "string", o.pattern = s.source;
2628
- }, _i = (e, t, r, n) => {
2628
+ }, gi = (e, t, r, n) => {
2629
2629
  const o = r, s = {
2630
2630
  type: "string",
2631
2631
  format: "binary",
2632
2632
  contentEncoding: "binary"
2633
2633
  }, { minimum: i, maximum: a, mime: c } = e._zod.bag;
2634
2634
  i !== void 0 && (s.minLength = i), a !== void 0 && (s.maxLength = a), c ? c.length === 1 ? (s.contentMediaType = c[0], Object.assign(o, s)) : (Object.assign(o, s), o.anyOf = c.map((u) => ({ contentMediaType: u }))) : Object.assign(o, s);
2635
- }, yi = (e, t, r, n) => {
2635
+ }, vi = (e, t, r, n) => {
2636
2636
  r.type = "boolean";
2637
2637
  }, rn = (e, t, r, n) => {
2638
2638
  if (t.unrepresentable === "throw")
2639
2639
  throw new Error("Custom types cannot be represented in JSON Schema");
2640
- }, bi = (e, t, r, n) => {
2640
+ }, _i = (e, t, r, n) => {
2641
2641
  if (t.unrepresentable === "throw")
2642
2642
  throw new Error("Function types cannot be represented in JSON Schema");
2643
2643
  }, nn = (e, t, r, n) => {
2644
2644
  if (t.unrepresentable === "throw")
2645
2645
  throw new Error("Transforms cannot be represented in JSON Schema");
2646
- }, wi = (e, t, r, n) => {
2646
+ }, yi = (e, t, r, n) => {
2647
2647
  if (t.unrepresentable === "throw")
2648
2648
  throw new Error("Map cannot be represented in JSON Schema");
2649
- }, Ii = (e, t, r, n) => {
2649
+ }, bi = (e, t, r, n) => {
2650
2650
  if (t.unrepresentable === "throw")
2651
2651
  throw new Error("Set cannot be represented in JSON Schema");
2652
2652
  }, on = (e, t, r, n) => {
@@ -2688,10 +2688,10 @@ const ui = (e, t = {}) => (r) => {
2688
2688
  ...a(i) ? i.allOf : [i]
2689
2689
  ];
2690
2690
  r.allOf = c;
2691
- }, Ei = (e, t, r, n) => {
2691
+ }, wi = (e, t, r, n) => {
2692
2692
  const o = r, s = e._zod.def;
2693
2693
  o.type = "array";
2694
- const i = t.target === "draft-2020-12" ? "prefixItems" : "items", a = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = s.items.map((_, h) => A(_, t, {
2694
+ const i = t.target === "draft-2020-12" ? "prefixItems" : "items", a = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = s.items.map((m, h) => A(m, t, {
2695
2695
  ...n,
2696
2696
  path: [...n.path, i, h]
2697
2697
  })), u = s.rest ? A(s.rest, t, {
@@ -2768,7 +2768,7 @@ const ui = (e, t = {}) => (r) => {
2768
2768
  A(o.innerType, t, n);
2769
2769
  const s = t.seen.get(e);
2770
2770
  s.ref = o.innerType, r.readOnly = !0;
2771
- }, ki = (e, t, r, n) => {
2771
+ }, Ii = (e, t, r, n) => {
2772
2772
  const o = e._zod.def;
2773
2773
  A(o.innerType, t, n);
2774
2774
  const s = t.seen.get(e);
@@ -2787,31 +2787,31 @@ const ui = (e, t = {}) => (r) => {
2787
2787
  string: qr,
2788
2788
  number: Gr,
2789
2789
  boolean: Hr,
2790
- bigint: li,
2791
- symbol: di,
2790
+ bigint: ui,
2791
+ symbol: ci,
2792
2792
  null: Xr,
2793
- undefined: pi,
2794
- void: fi,
2793
+ undefined: li,
2794
+ void: di,
2795
2795
  never: Qr,
2796
- any: hi,
2796
+ any: pi,
2797
2797
  unknown: Kr,
2798
- date: mi,
2798
+ date: fi,
2799
2799
  enum: en,
2800
2800
  literal: tn,
2801
- nan: gi,
2802
- template_literal: vi,
2803
- file: _i,
2804
- success: yi,
2801
+ nan: hi,
2802
+ template_literal: mi,
2803
+ file: gi,
2804
+ success: vi,
2805
2805
  custom: rn,
2806
- function: bi,
2806
+ function: _i,
2807
2807
  transform: nn,
2808
- map: wi,
2809
- set: Ii,
2808
+ map: yi,
2809
+ set: bi,
2810
2810
  array: on,
2811
2811
  object: sn,
2812
2812
  union: an,
2813
2813
  intersection: un,
2814
- tuple: Ei,
2814
+ tuple: wi,
2815
2815
  record: cn,
2816
2816
  nullable: ln,
2817
2817
  nonoptional: dn,
@@ -2820,13 +2820,13 @@ const ui = (e, t = {}) => (r) => {
2820
2820
  catch: hn,
2821
2821
  pipe: mn,
2822
2822
  readonly: gn,
2823
- promise: ki,
2823
+ promise: Ii,
2824
2824
  optional: _t,
2825
2825
  lazy: vn
2826
2826
  };
2827
- function zi(e, t) {
2827
+ function Ei(e, t) {
2828
2828
  if ("_idmap" in e) {
2829
- const n = e, o = De({ ...t, processors: Xt }), s = {};
2829
+ const n = e, o = Me({ ...t, processors: Xt }), s = {};
2830
2830
  for (const c of n._idmap.entries()) {
2831
2831
  const [u, l] = c;
2832
2832
  A(l, o);
@@ -2839,7 +2839,7 @@ function zi(e, t) {
2839
2839
  o.external = a;
2840
2840
  for (const c of n._idmap.entries()) {
2841
2841
  const [u, l] = c;
2842
- Ue(o, l), i[u] = Le(o, l);
2842
+ De(o, l), i[u] = Ue(o, l);
2843
2843
  }
2844
2844
  if (Object.keys(s).length > 0) {
2845
2845
  const c = o.target === "draft-2020-12" ? "$defs" : "definitions";
@@ -2849,41 +2849,41 @@ function zi(e, t) {
2849
2849
  }
2850
2850
  return { schemas: i };
2851
2851
  }
2852
- const r = De({ ...t, processors: Xt });
2853
- return A(e, r), Ue(r, e), Le(r, e);
2852
+ const r = Me({ ...t, processors: Xt });
2853
+ return A(e, r), De(r, e), Ue(r, e);
2854
2854
  }
2855
- const Si = /* @__PURE__ */ p("ZodISODateTime", (e, t) => {
2856
- Zs.init(e, t), M.init(e, t);
2855
+ const ki = /* @__PURE__ */ p("ZodISODateTime", (e, t) => {
2856
+ Ss.init(e, t), M.init(e, t);
2857
+ });
2858
+ function zi(e) {
2859
+ return /* @__PURE__ */ Ra(ki, e);
2860
+ }
2861
+ const Si = /* @__PURE__ */ p("ZodISODate", (e, t) => {
2862
+ Os.init(e, t), M.init(e, t);
2857
2863
  });
2858
2864
  function Oi(e) {
2859
- return /* @__PURE__ */ ja(Si, e);
2865
+ return /* @__PURE__ */ xa(Si, e);
2860
2866
  }
2861
- const Zi = /* @__PURE__ */ p("ZodISODate", (e, t) => {
2862
- $s.init(e, t), M.init(e, t);
2867
+ const Zi = /* @__PURE__ */ p("ZodISOTime", (e, t) => {
2868
+ Zs.init(e, t), M.init(e, t);
2863
2869
  });
2864
2870
  function $i(e) {
2865
- return /* @__PURE__ */ Ca(Zi, e);
2871
+ return /* @__PURE__ */ ja(Zi, e);
2866
2872
  }
2867
- const Ti = /* @__PURE__ */ p("ZodISOTime", (e, t) => {
2868
- Ts.init(e, t), M.init(e, t);
2873
+ const Ti = /* @__PURE__ */ p("ZodISODuration", (e, t) => {
2874
+ $s.init(e, t), M.init(e, t);
2869
2875
  });
2870
2876
  function Ni(e) {
2871
- return /* @__PURE__ */ Ma(Ti, e);
2877
+ return /* @__PURE__ */ Ca(Ti, e);
2872
2878
  }
2873
- const Pi = /* @__PURE__ */ p("ZodISODuration", (e, t) => {
2874
- Ns.init(e, t), M.init(e, t);
2875
- });
2876
- function Ai(e) {
2877
- return /* @__PURE__ */ Da(Pi, e);
2878
- }
2879
- const Ri = (e, t) => {
2879
+ const Pi = (e, t) => {
2880
2880
  Nr.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2881
2881
  format: {
2882
- value: (r) => bo(e, r)
2882
+ value: (r) => _o(e, r)
2883
2883
  // enumerable: false,
2884
2884
  },
2885
2885
  flatten: {
2886
- value: (r) => yo(e, r)
2886
+ value: (r) => vo(e, r)
2887
2887
  // enumerable: false,
2888
2888
  },
2889
2889
  addIssue: {
@@ -2905,21 +2905,21 @@ const Ri = (e, t) => {
2905
2905
  // enumerable: false,
2906
2906
  }
2907
2907
  });
2908
- }, G = p("ZodError", Ri, {
2908
+ }, G = p("ZodError", Pi, {
2909
2909
  Parent: Error
2910
- }), xi = /* @__PURE__ */ mt(G), ji = /* @__PURE__ */ gt(G), Ci = /* @__PURE__ */ We(G), _n = /* @__PURE__ */ Ye(G), Mi = /* @__PURE__ */ Eo(G), Di = /* @__PURE__ */ ko(G), Ui = /* @__PURE__ */ zo(G), Li = /* @__PURE__ */ So(G), Ji = /* @__PURE__ */ Oo(G), Fi = /* @__PURE__ */ Zo(G), Vi = /* @__PURE__ */ $o(G), Bi = /* @__PURE__ */ To(G), j = /* @__PURE__ */ p("ZodType", (e, t) => (x.init(e, t), Object.assign(e["~standard"], {
2910
+ }), Ai = /* @__PURE__ */ mt(G), Ri = /* @__PURE__ */ gt(G), xi = /* @__PURE__ */ Be(G), _n = /* @__PURE__ */ We(G), ji = /* @__PURE__ */ wo(G), Ci = /* @__PURE__ */ Io(G), Mi = /* @__PURE__ */ Eo(G), Di = /* @__PURE__ */ ko(G), Ui = /* @__PURE__ */ zo(G), Li = /* @__PURE__ */ So(G), Ji = /* @__PURE__ */ Oo(G), Fi = /* @__PURE__ */ Zo(G), j = /* @__PURE__ */ p("ZodType", (e, t) => (x.init(e, t), Object.assign(e["~standard"], {
2911
2911
  jsonSchema: {
2912
- input: Je(e, "input"),
2913
- output: Je(e, "output")
2912
+ input: Le(e, "input"),
2913
+ output: Le(e, "output")
2914
2914
  }
2915
- }), e.toJSONSchema = ui(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(oe(t, {
2915
+ }), e.toJSONSchema = ai(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(oe(t, {
2916
2916
  checks: [
2917
2917
  ...t.checks ?? [],
2918
2918
  ...r.map((n) => typeof n == "function" ? { _zod: { check: n, def: { check: "custom" }, onattach: [] } } : n)
2919
2919
  ]
2920
2920
  }), {
2921
2921
  parent: !0
2922
- }), e.with = e.check, e.clone = (r, n) => se(e, r, n), e.brand = () => e, e.register = (r, n) => (r.add(e, n), e), e.parse = (r, n) => xi(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => Ci(e, r, n), e.parseAsync = async (r, n) => ji(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => _n(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => Mi(e, r, n), e.decode = (r, n) => Di(e, r, n), e.encodeAsync = async (r, n) => Ui(e, r, n), e.decodeAsync = async (r, n) => Li(e, r, n), e.safeEncode = (r, n) => Ji(e, r, n), e.safeDecode = (r, n) => Fi(e, r, n), e.safeEncodeAsync = async (r, n) => Vi(e, r, n), e.safeDecodeAsync = async (r, n) => Bi(e, r, n), e.refine = (r, n) => e.check(Lu(r, n)), e.superRefine = (r) => e.check(Ju(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ ye(r)), e.optional = () => er(e), e.exactOptional = () => Ou(e), e.nullable = () => tr(e), e.nullish = () => er(tr(e)), e.nonoptional = (r) => Au(e, r), e.array = () => be(e), e.or = (r) => F([e, r]), e.and = (r) => wu(e, r), e.transform = (r) => rr(e, zu(r)), e.default = (r) => Tu(e, r), e.prefault = (r) => Pu(e, r), e.catch = (r) => xu(e, r), e.pipe = (r) => rr(e, r), e.readonly = () => Mu(e), e.describe = (r) => {
2922
+ }), e.with = e.check, e.clone = (r, n) => se(e, r, n), e.brand = () => e, e.register = (r, n) => (r.add(e, n), e), e.parse = (r, n) => Ai(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => xi(e, r, n), e.parseAsync = async (r, n) => Ri(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => _n(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => ji(e, r, n), e.decode = (r, n) => Ci(e, r, n), e.encodeAsync = async (r, n) => Mi(e, r, n), e.decodeAsync = async (r, n) => Di(e, r, n), e.safeEncode = (r, n) => Ui(e, r, n), e.safeDecode = (r, n) => Li(e, r, n), e.safeEncodeAsync = async (r, n) => Ji(e, r, n), e.safeDecodeAsync = async (r, n) => Fi(e, r, n), e.refine = (r, n) => e.check(Du(r, n)), e.superRefine = (r) => e.check(Uu(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ ye(r)), e.optional = () => er(e), e.exactOptional = () => zu(e), e.nullable = () => tr(e), e.nullish = () => er(tr(e)), e.nonoptional = (r) => Nu(e, r), e.array = () => be(e), e.or = (r) => F([e, r]), e.and = (r) => yu(e, r), e.transform = (r) => rr(e, Eu(r)), e.default = (r) => Zu(e, r), e.prefault = (r) => Tu(e, r), e.catch = (r) => Au(e, r), e.pipe = (r) => rr(e, r), e.readonly = () => ju(e), e.describe = (r) => {
2923
2923
  const n = e.clone();
2924
2924
  return Ee.add(n, { description: r }), n;
2925
2925
  }, Object.defineProperty(e, "description", {
@@ -2936,105 +2936,105 @@ const Ri = (e, t) => {
2936
2936
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), yn = /* @__PURE__ */ p("_ZodString", (e, t) => {
2937
2937
  vt.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, o, s) => qr(e, n, o);
2938
2938
  const r = e._zod.bag;
2939
- e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ Wa(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ Ga(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ Ha(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ Xa(...n)), e.min = (...n) => e.check(/* @__PURE__ */ Me(...n)), e.max = (...n) => e.check(/* @__PURE__ */ Wr(...n)), e.length = (...n) => e.check(/* @__PURE__ */ Yr(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ Me(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ Ya(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ qa(n)), e.trim = () => e.check(/* @__PURE__ */ Ka()), e.normalize = (...n) => e.check(/* @__PURE__ */ Qa(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ ei()), e.toUpperCase = () => e.check(/* @__PURE__ */ ti()), e.slugify = () => e.check(/* @__PURE__ */ ri());
2940
- }), Wi = /* @__PURE__ */ p("ZodString", (e, t) => {
2941
- vt.init(e, t), yn.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ ma(Yi, r)), e.url = (r) => e.check(/* @__PURE__ */ ba(qi, r)), e.jwt = (r) => e.check(/* @__PURE__ */ xa(cu, r)), e.emoji = (r) => e.check(/* @__PURE__ */ wa(Gi, r)), e.guid = (r) => e.check(/* @__PURE__ */ Yt(Qt, r)), e.uuid = (r) => e.check(/* @__PURE__ */ ga(je, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ va(je, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ _a(je, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ ya(je, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ Ia(Hi, r)), e.guid = (r) => e.check(/* @__PURE__ */ Yt(Qt, r)), e.cuid = (r) => e.check(/* @__PURE__ */ Ea(Xi, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ ka(Qi, r)), e.ulid = (r) => e.check(/* @__PURE__ */ za(Ki, r)), e.base64 = (r) => e.check(/* @__PURE__ */ Pa(au, r)), e.base64url = (r) => e.check(/* @__PURE__ */ Aa(iu, r)), e.xid = (r) => e.check(/* @__PURE__ */ Sa(eu, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ Oa(tu, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ Za(ru, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ $a(nu, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ Ta(ou, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ Na(su, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Ra(uu, r)), e.datetime = (r) => e.check(Oi(r)), e.date = (r) => e.check($i(r)), e.time = (r) => e.check(Ni(r)), e.duration = (r) => e.check(Ai(r));
2939
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ Va(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ Ya(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ qa(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ Ga(...n)), e.min = (...n) => e.check(/* @__PURE__ */ Ce(...n)), e.max = (...n) => e.check(/* @__PURE__ */ Wr(...n)), e.length = (...n) => e.check(/* @__PURE__ */ Yr(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ Ce(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ Ba(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ Wa(n)), e.trim = () => e.check(/* @__PURE__ */ Xa()), e.normalize = (...n) => e.check(/* @__PURE__ */ Ha(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ Qa()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ka()), e.slugify = () => e.check(/* @__PURE__ */ ei());
2940
+ }), Vi = /* @__PURE__ */ p("ZodString", (e, t) => {
2941
+ vt.init(e, t), yn.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ fa(Bi, r)), e.url = (r) => e.check(/* @__PURE__ */ _a(Wi, r)), e.jwt = (r) => e.check(/* @__PURE__ */ Aa(iu, r)), e.emoji = (r) => e.check(/* @__PURE__ */ ya(Yi, r)), e.guid = (r) => e.check(/* @__PURE__ */ Yt(Qt, r)), e.uuid = (r) => e.check(/* @__PURE__ */ ha(xe, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ ma(xe, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ ga(xe, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ va(xe, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ ba(qi, r)), e.guid = (r) => e.check(/* @__PURE__ */ Yt(Qt, r)), e.cuid = (r) => e.check(/* @__PURE__ */ wa(Gi, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ Ia(Hi, r)), e.ulid = (r) => e.check(/* @__PURE__ */ Ea(Xi, r)), e.base64 = (r) => e.check(/* @__PURE__ */ Ta(ou, r)), e.base64url = (r) => e.check(/* @__PURE__ */ Na(su, r)), e.xid = (r) => e.check(/* @__PURE__ */ ka(Qi, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ za(Ki, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ Sa(eu, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ Oa(tu, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ Za(ru, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ $a(nu, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Pa(au, r)), e.datetime = (r) => e.check(zi(r)), e.date = (r) => e.check(Oi(r)), e.time = (r) => e.check($i(r)), e.duration = (r) => e.check(Ni(r));
2942
2942
  });
2943
- function m(e) {
2944
- return /* @__PURE__ */ ha(Wi, e);
2943
+ function g(e) {
2944
+ return /* @__PURE__ */ pa(Vi, e);
2945
2945
  }
2946
2946
  const M = /* @__PURE__ */ p("ZodStringFormat", (e, t) => {
2947
2947
  C.init(e, t), yn.init(e, t);
2948
- }), Yi = /* @__PURE__ */ p("ZodEmail", (e, t) => {
2949
- ys.init(e, t), M.init(e, t);
2950
- }), Qt = /* @__PURE__ */ p("ZodGUID", (e, t) => {
2948
+ }), Bi = /* @__PURE__ */ p("ZodEmail", (e, t) => {
2951
2949
  vs.init(e, t), M.init(e, t);
2952
- }), je = /* @__PURE__ */ p("ZodUUID", (e, t) => {
2950
+ }), Qt = /* @__PURE__ */ p("ZodGUID", (e, t) => {
2951
+ ms.init(e, t), M.init(e, t);
2952
+ }), xe = /* @__PURE__ */ p("ZodUUID", (e, t) => {
2953
+ gs.init(e, t), M.init(e, t);
2954
+ }), Wi = /* @__PURE__ */ p("ZodURL", (e, t) => {
2953
2955
  _s.init(e, t), M.init(e, t);
2954
- }), qi = /* @__PURE__ */ p("ZodURL", (e, t) => {
2956
+ }), Yi = /* @__PURE__ */ p("ZodEmoji", (e, t) => {
2957
+ ys.init(e, t), M.init(e, t);
2958
+ }), qi = /* @__PURE__ */ p("ZodNanoID", (e, t) => {
2955
2959
  bs.init(e, t), M.init(e, t);
2956
- }), Gi = /* @__PURE__ */ p("ZodEmoji", (e, t) => {
2960
+ }), Gi = /* @__PURE__ */ p("ZodCUID", (e, t) => {
2957
2961
  ws.init(e, t), M.init(e, t);
2958
- }), Hi = /* @__PURE__ */ p("ZodNanoID", (e, t) => {
2962
+ }), Hi = /* @__PURE__ */ p("ZodCUID2", (e, t) => {
2959
2963
  Is.init(e, t), M.init(e, t);
2960
- }), Xi = /* @__PURE__ */ p("ZodCUID", (e, t) => {
2964
+ }), Xi = /* @__PURE__ */ p("ZodULID", (e, t) => {
2961
2965
  Es.init(e, t), M.init(e, t);
2962
- }), Qi = /* @__PURE__ */ p("ZodCUID2", (e, t) => {
2966
+ }), Qi = /* @__PURE__ */ p("ZodXID", (e, t) => {
2963
2967
  ks.init(e, t), M.init(e, t);
2964
- }), Ki = /* @__PURE__ */ p("ZodULID", (e, t) => {
2968
+ }), Ki = /* @__PURE__ */ p("ZodKSUID", (e, t) => {
2965
2969
  zs.init(e, t), M.init(e, t);
2966
- }), eu = /* @__PURE__ */ p("ZodXID", (e, t) => {
2967
- Ss.init(e, t), M.init(e, t);
2968
- }), tu = /* @__PURE__ */ p("ZodKSUID", (e, t) => {
2969
- Os.init(e, t), M.init(e, t);
2970
- }), ru = /* @__PURE__ */ p("ZodIPv4", (e, t) => {
2970
+ }), eu = /* @__PURE__ */ p("ZodIPv4", (e, t) => {
2971
+ Ts.init(e, t), M.init(e, t);
2972
+ }), tu = /* @__PURE__ */ p("ZodIPv6", (e, t) => {
2973
+ Ns.init(e, t), M.init(e, t);
2974
+ }), ru = /* @__PURE__ */ p("ZodCIDRv4", (e, t) => {
2971
2975
  Ps.init(e, t), M.init(e, t);
2972
- }), nu = /* @__PURE__ */ p("ZodIPv6", (e, t) => {
2976
+ }), nu = /* @__PURE__ */ p("ZodCIDRv6", (e, t) => {
2973
2977
  As.init(e, t), M.init(e, t);
2974
- }), ou = /* @__PURE__ */ p("ZodCIDRv4", (e, t) => {
2978
+ }), ou = /* @__PURE__ */ p("ZodBase64", (e, t) => {
2975
2979
  Rs.init(e, t), M.init(e, t);
2976
- }), su = /* @__PURE__ */ p("ZodCIDRv6", (e, t) => {
2977
- xs.init(e, t), M.init(e, t);
2978
- }), au = /* @__PURE__ */ p("ZodBase64", (e, t) => {
2980
+ }), su = /* @__PURE__ */ p("ZodBase64URL", (e, t) => {
2979
2981
  js.init(e, t), M.init(e, t);
2980
- }), iu = /* @__PURE__ */ p("ZodBase64URL", (e, t) => {
2981
- Ms.init(e, t), M.init(e, t);
2982
- }), uu = /* @__PURE__ */ p("ZodE164", (e, t) => {
2982
+ }), au = /* @__PURE__ */ p("ZodE164", (e, t) => {
2983
+ Cs.init(e, t), M.init(e, t);
2984
+ }), iu = /* @__PURE__ */ p("ZodJWT", (e, t) => {
2983
2985
  Ds.init(e, t), M.init(e, t);
2984
- }), cu = /* @__PURE__ */ p("ZodJWT", (e, t) => {
2985
- Ls.init(e, t), M.init(e, t);
2986
2986
  }), bn = /* @__PURE__ */ p("ZodNumber", (e, t) => {
2987
2987
  Lr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, o, s) => Gr(e, n, o), e.gt = (n, o) => e.check(/* @__PURE__ */ Gt(n, o)), e.gte = (n, o) => e.check(/* @__PURE__ */ Qe(n, o)), e.min = (n, o) => e.check(/* @__PURE__ */ Qe(n, o)), e.lt = (n, o) => e.check(/* @__PURE__ */ qt(n, o)), e.lte = (n, o) => e.check(/* @__PURE__ */ Xe(n, o)), e.max = (n, o) => e.check(/* @__PURE__ */ Xe(n, o)), e.int = (n) => e.check(Kt(n)), e.safe = (n) => e.check(Kt(n)), e.positive = (n) => e.check(/* @__PURE__ */ Gt(0, n)), e.nonnegative = (n) => e.check(/* @__PURE__ */ Qe(0, n)), e.negative = (n) => e.check(/* @__PURE__ */ qt(0, n)), e.nonpositive = (n) => e.check(/* @__PURE__ */ Xe(0, n)), e.multipleOf = (n, o) => e.check(/* @__PURE__ */ Ht(n, o)), e.step = (n, o) => e.check(/* @__PURE__ */ Ht(n, o)), e.finite = () => e;
2988
2988
  const r = e._zod.bag;
2989
2989
  e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
2990
2990
  });
2991
- function lu(e) {
2992
- return /* @__PURE__ */ Ua(bn, e);
2991
+ function uu(e) {
2992
+ return /* @__PURE__ */ Ma(bn, e);
2993
2993
  }
2994
- const du = /* @__PURE__ */ p("ZodNumberFormat", (e, t) => {
2995
- Js.init(e, t), bn.init(e, t);
2994
+ const cu = /* @__PURE__ */ p("ZodNumberFormat", (e, t) => {
2995
+ Us.init(e, t), bn.init(e, t);
2996
2996
  });
2997
2997
  function Kt(e) {
2998
- return /* @__PURE__ */ La(du, e);
2998
+ return /* @__PURE__ */ Da(cu, e);
2999
2999
  }
3000
- const pu = /* @__PURE__ */ p("ZodBoolean", (e, t) => {
3001
- Fs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Hr(e, r, n);
3000
+ const lu = /* @__PURE__ */ p("ZodBoolean", (e, t) => {
3001
+ Ls.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Hr(e, r, n);
3002
3002
  });
3003
3003
  function J(e) {
3004
- return /* @__PURE__ */ Ja(pu, e);
3004
+ return /* @__PURE__ */ Ua(lu, e);
3005
3005
  }
3006
- const fu = /* @__PURE__ */ p("ZodNull", (e, t) => {
3007
- Vs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Xr(e, r, n);
3006
+ const du = /* @__PURE__ */ p("ZodNull", (e, t) => {
3007
+ Js.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Xr(e, r, n);
3008
3008
  });
3009
- function hu(e) {
3010
- return /* @__PURE__ */ Fa(fu, e);
3009
+ function pu(e) {
3010
+ return /* @__PURE__ */ La(du, e);
3011
3011
  }
3012
- const mu = /* @__PURE__ */ p("ZodUnknown", (e, t) => {
3013
- Bs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Kr();
3012
+ const fu = /* @__PURE__ */ p("ZodUnknown", (e, t) => {
3013
+ Fs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Kr();
3014
3014
  });
3015
3015
  function Q() {
3016
- return /* @__PURE__ */ Va(mu);
3016
+ return /* @__PURE__ */ Ja(fu);
3017
3017
  }
3018
- const gu = /* @__PURE__ */ p("ZodNever", (e, t) => {
3019
- Ws.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Qr(e, r, n);
3018
+ const hu = /* @__PURE__ */ p("ZodNever", (e, t) => {
3019
+ Vs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => Qr(e, r, n);
3020
3020
  });
3021
3021
  function wn(e) {
3022
- return /* @__PURE__ */ Ba(gu, e);
3022
+ return /* @__PURE__ */ Fa(hu, e);
3023
3023
  }
3024
- const vu = /* @__PURE__ */ p("ZodArray", (e, t) => {
3025
- Ys.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => on(e, r, n, o), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ Me(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ Me(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ Wr(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ Yr(r, n)), e.unwrap = () => e.element;
3024
+ const mu = /* @__PURE__ */ p("ZodArray", (e, t) => {
3025
+ Bs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => on(e, r, n, o), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ Ce(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ Ce(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ Wr(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ Yr(r, n)), e.unwrap = () => e.element;
3026
3026
  });
3027
3027
  function be(e, t) {
3028
- return /* @__PURE__ */ ni(vu, e, t);
3028
+ return /* @__PURE__ */ ti(mu, e, t);
3029
3029
  }
3030
3030
  const In = /* @__PURE__ */ p("ZodObject", (e, t) => {
3031
- Gs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => sn(e, r, n, o), O(e, "shape", () => t.shape), e.keyof = () => kn(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Q() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Q() }), e.strict = () => e.clone({ ...e._zod.def, catchall: wn() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => ho(e, r), e.safeExtend = (r) => mo(e, r), e.merge = (r) => go(e, r), e.pick = (r) => po(e, r), e.omit = (r) => fo(e, r), e.partial = (...r) => vo(zn, e, r[0]), e.required = (...r) => _o(Sn, e, r[0]);
3031
+ Ys.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => sn(e, r, n, o), O(e, "shape", () => t.shape), e.keyof = () => kn(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Q() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Q() }), e.strict = () => e.clone({ ...e._zod.def, catchall: wn() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => po(e, r), e.safeExtend = (r) => fo(e, r), e.merge = (r) => ho(e, r), e.pick = (r) => co(e, r), e.omit = (r) => lo(e, r), e.partial = (...r) => mo(zn, e, r[0]), e.required = (...r) => go(Sn, e, r[0]);
3032
3032
  });
3033
3033
  function P(e, t) {
3034
3034
  const r = {
3035
3035
  type: "object",
3036
3036
  shape: e ?? {},
3037
- ...b(t)
3037
+ ...y(t)
3038
3038
  };
3039
3039
  return new In(r);
3040
3040
  }
@@ -3043,7 +3043,7 @@ function R(e, t) {
3043
3043
  type: "object",
3044
3044
  shape: e,
3045
3045
  catchall: wn(),
3046
- ...b(t)
3046
+ ...y(t)
3047
3047
  });
3048
3048
  }
3049
3049
  const En = /* @__PURE__ */ p("ZodUnion", (e, t) => {
@@ -3053,43 +3053,43 @@ function F(e, t) {
3053
3053
  return new En({
3054
3054
  type: "union",
3055
3055
  options: e,
3056
- ...b(t)
3056
+ ...y(t)
3057
3057
  });
3058
3058
  }
3059
- const _u = /* @__PURE__ */ p("ZodDiscriminatedUnion", (e, t) => {
3060
- En.init(e, t), Hs.init(e, t);
3059
+ const gu = /* @__PURE__ */ p("ZodDiscriminatedUnion", (e, t) => {
3060
+ En.init(e, t), qs.init(e, t);
3061
3061
  });
3062
- function yu(e, t, r) {
3063
- return new _u({
3062
+ function vu(e, t, r) {
3063
+ return new gu({
3064
3064
  type: "union",
3065
3065
  options: t,
3066
3066
  discriminator: e,
3067
- ...b(r)
3067
+ ...y(r)
3068
3068
  });
3069
3069
  }
3070
- const bu = /* @__PURE__ */ p("ZodIntersection", (e, t) => {
3071
- Xs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => un(e, r, n, o);
3070
+ const _u = /* @__PURE__ */ p("ZodIntersection", (e, t) => {
3071
+ Gs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => un(e, r, n, o);
3072
3072
  });
3073
- function wu(e, t) {
3074
- return new bu({
3073
+ function yu(e, t) {
3074
+ return new _u({
3075
3075
  type: "intersection",
3076
3076
  left: e,
3077
3077
  right: t
3078
3078
  });
3079
3079
  }
3080
- const Iu = /* @__PURE__ */ p("ZodRecord", (e, t) => {
3081
- Qs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => cn(e, r, n, o), e.keyType = t.keyType, e.valueType = t.valueType;
3080
+ const bu = /* @__PURE__ */ p("ZodRecord", (e, t) => {
3081
+ Hs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => cn(e, r, n, o), e.keyType = t.keyType, e.valueType = t.valueType;
3082
3082
  });
3083
3083
  function Se(e, t, r) {
3084
- return new Iu({
3084
+ return new bu({
3085
3085
  type: "record",
3086
3086
  keyType: e,
3087
3087
  valueType: t,
3088
- ...b(r)
3088
+ ...y(r)
3089
3089
  });
3090
3090
  }
3091
3091
  const it = /* @__PURE__ */ p("ZodEnum", (e, t) => {
3092
- Ks.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, o, s) => en(e, n, o), e.enum = t.entries, e.options = Object.values(t.entries);
3092
+ Xs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, o, s) => en(e, n, o), e.enum = t.entries, e.options = Object.values(t.entries);
3093
3093
  const r = new Set(Object.keys(t.entries));
3094
3094
  e.extract = (n, o) => {
3095
3095
  const s = {};
@@ -3101,7 +3101,7 @@ const it = /* @__PURE__ */ p("ZodEnum", (e, t) => {
3101
3101
  return new it({
3102
3102
  ...t,
3103
3103
  checks: [],
3104
- ...b(o),
3104
+ ...y(o),
3105
3105
  entries: s
3106
3106
  });
3107
3107
  }, e.exclude = (n, o) => {
@@ -3114,7 +3114,7 @@ const it = /* @__PURE__ */ p("ZodEnum", (e, t) => {
3114
3114
  return new it({
3115
3115
  ...t,
3116
3116
  checks: [],
3117
- ...b(o),
3117
+ ...y(o),
3118
3118
  entries: s
3119
3119
  });
3120
3120
  };
@@ -3124,11 +3124,11 @@ function kn(e, t) {
3124
3124
  return new it({
3125
3125
  type: "enum",
3126
3126
  entries: r,
3127
- ...b(t)
3127
+ ...y(t)
3128
3128
  });
3129
3129
  }
3130
- const Eu = /* @__PURE__ */ p("ZodLiteral", (e, t) => {
3131
- ea.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => tn(e, r, n), e.values = new Set(t.values), Object.defineProperty(e, "value", {
3130
+ const wu = /* @__PURE__ */ p("ZodLiteral", (e, t) => {
3131
+ Qs.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => tn(e, r, n), e.values = new Set(t.values), Object.defineProperty(e, "value", {
3132
3132
  get() {
3133
3133
  if (t.values.length > 1)
3134
3134
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -3136,15 +3136,15 @@ const Eu = /* @__PURE__ */ p("ZodLiteral", (e, t) => {
3136
3136
  }
3137
3137
  });
3138
3138
  });
3139
- function I(e, t) {
3140
- return new Eu({
3139
+ function w(e, t) {
3140
+ return new wu({
3141
3141
  type: "literal",
3142
3142
  values: Array.isArray(e) ? e : [e],
3143
- ...b(t)
3143
+ ...y(t)
3144
3144
  });
3145
3145
  }
3146
- const ku = /* @__PURE__ */ p("ZodTransform", (e, t) => {
3147
- ta.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => nn(e, r), e._zod.parse = (r, n) => {
3146
+ const Iu = /* @__PURE__ */ p("ZodTransform", (e, t) => {
3147
+ Ks.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => nn(e, r), e._zod.parse = (r, n) => {
3148
3148
  if (n.direction === "backward")
3149
3149
  throw new Sr(e.constructor.name);
3150
3150
  r.addIssue = (s) => {
@@ -3159,8 +3159,8 @@ const ku = /* @__PURE__ */ p("ZodTransform", (e, t) => {
3159
3159
  return o instanceof Promise ? o.then((s) => (r.value = s, r)) : (r.value = o, r);
3160
3160
  };
3161
3161
  });
3162
- function zu(e) {
3163
- return new ku({
3162
+ function Eu(e) {
3163
+ return new Iu({
3164
3164
  type: "transform",
3165
3165
  transform: e
3166
3166
  });
@@ -3174,29 +3174,29 @@ function er(e) {
3174
3174
  innerType: e
3175
3175
  });
3176
3176
  }
3177
- const Su = /* @__PURE__ */ p("ZodExactOptional", (e, t) => {
3178
- ra.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => _t(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3177
+ const ku = /* @__PURE__ */ p("ZodExactOptional", (e, t) => {
3178
+ ea.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => _t(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3179
3179
  });
3180
- function Ou(e) {
3181
- return new Su({
3180
+ function zu(e) {
3181
+ return new ku({
3182
3182
  type: "optional",
3183
3183
  innerType: e
3184
3184
  });
3185
3185
  }
3186
- const Zu = /* @__PURE__ */ p("ZodNullable", (e, t) => {
3187
- na.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => ln(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3186
+ const Su = /* @__PURE__ */ p("ZodNullable", (e, t) => {
3187
+ ta.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => ln(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3188
3188
  });
3189
3189
  function tr(e) {
3190
- return new Zu({
3190
+ return new Su({
3191
3191
  type: "nullable",
3192
3192
  innerType: e
3193
3193
  });
3194
3194
  }
3195
- const $u = /* @__PURE__ */ p("ZodDefault", (e, t) => {
3196
- oa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => pn(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3195
+ const Ou = /* @__PURE__ */ p("ZodDefault", (e, t) => {
3196
+ ra.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => pn(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3197
3197
  });
3198
- function Tu(e, t) {
3199
- return new $u({
3198
+ function Zu(e, t) {
3199
+ return new Ou({
3200
3200
  type: "default",
3201
3201
  innerType: e,
3202
3202
  get defaultValue() {
@@ -3204,11 +3204,11 @@ function Tu(e, t) {
3204
3204
  }
3205
3205
  });
3206
3206
  }
3207
- const Nu = /* @__PURE__ */ p("ZodPrefault", (e, t) => {
3208
- sa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => fn(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3207
+ const $u = /* @__PURE__ */ p("ZodPrefault", (e, t) => {
3208
+ na.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => fn(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3209
3209
  });
3210
- function Pu(e, t) {
3211
- return new Nu({
3210
+ function Tu(e, t) {
3211
+ return new $u({
3212
3212
  type: "prefault",
3213
3213
  innerType: e,
3214
3214
  get defaultValue() {
@@ -3217,73 +3217,73 @@ function Pu(e, t) {
3217
3217
  });
3218
3218
  }
3219
3219
  const Sn = /* @__PURE__ */ p("ZodNonOptional", (e, t) => {
3220
- aa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => dn(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3220
+ oa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => dn(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3221
3221
  });
3222
- function Au(e, t) {
3222
+ function Nu(e, t) {
3223
3223
  return new Sn({
3224
3224
  type: "nonoptional",
3225
3225
  innerType: e,
3226
- ...b(t)
3226
+ ...y(t)
3227
3227
  });
3228
3228
  }
3229
- const Ru = /* @__PURE__ */ p("ZodCatch", (e, t) => {
3230
- ia.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => hn(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3229
+ const Pu = /* @__PURE__ */ p("ZodCatch", (e, t) => {
3230
+ sa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => hn(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3231
3231
  });
3232
- function xu(e, t) {
3233
- return new Ru({
3232
+ function Au(e, t) {
3233
+ return new Pu({
3234
3234
  type: "catch",
3235
3235
  innerType: e,
3236
3236
  catchValue: typeof t == "function" ? t : () => t
3237
3237
  });
3238
3238
  }
3239
- const ju = /* @__PURE__ */ p("ZodPipe", (e, t) => {
3240
- ua.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => mn(e, r, n, o), e.in = t.in, e.out = t.out;
3239
+ const Ru = /* @__PURE__ */ p("ZodPipe", (e, t) => {
3240
+ aa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => mn(e, r, n, o), e.in = t.in, e.out = t.out;
3241
3241
  });
3242
3242
  function rr(e, t) {
3243
- return new ju({
3243
+ return new Ru({
3244
3244
  type: "pipe",
3245
3245
  in: e,
3246
3246
  out: t
3247
3247
  // ...util.normalizeParams(params),
3248
3248
  });
3249
3249
  }
3250
- const Cu = /* @__PURE__ */ p("ZodReadonly", (e, t) => {
3251
- ca.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => gn(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3250
+ const xu = /* @__PURE__ */ p("ZodReadonly", (e, t) => {
3251
+ ia.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => gn(e, r, n, o), e.unwrap = () => e._zod.def.innerType;
3252
3252
  });
3253
- function Mu(e) {
3254
- return new Cu({
3253
+ function ju(e) {
3254
+ return new xu({
3255
3255
  type: "readonly",
3256
3256
  innerType: e
3257
3257
  });
3258
3258
  }
3259
- const Du = /* @__PURE__ */ p("ZodLazy", (e, t) => {
3260
- la.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => vn(e, r, n, o), e.unwrap = () => e._zod.def.getter();
3259
+ const Cu = /* @__PURE__ */ p("ZodLazy", (e, t) => {
3260
+ ua.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => vn(e, r, n, o), e.unwrap = () => e._zod.def.getter();
3261
3261
  });
3262
- function Uu(e) {
3263
- return new Du({
3262
+ function Mu(e) {
3263
+ return new Cu({
3264
3264
  type: "lazy",
3265
3265
  getter: e
3266
3266
  });
3267
3267
  }
3268
3268
  const yt = /* @__PURE__ */ p("ZodCustom", (e, t) => {
3269
- da.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => rn(e, r);
3269
+ ca.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => rn(e, r);
3270
3270
  });
3271
3271
  function On(e, t) {
3272
- return /* @__PURE__ */ oi(yt, e ?? (() => !0), t);
3272
+ return /* @__PURE__ */ ri(yt, e ?? (() => !0), t);
3273
3273
  }
3274
- function Lu(e, t = {}) {
3275
- return /* @__PURE__ */ si(yt, e, t);
3274
+ function Du(e, t = {}) {
3275
+ return /* @__PURE__ */ ni(yt, e, t);
3276
3276
  }
3277
- function Ju(e) {
3278
- return /* @__PURE__ */ ai(e);
3277
+ function Uu(e) {
3278
+ return /* @__PURE__ */ oi(e);
3279
3279
  }
3280
- function Fe(e, t = {}) {
3280
+ function Je(e, t = {}) {
3281
3281
  const r = new yt({
3282
3282
  type: "custom",
3283
3283
  check: "custom",
3284
3284
  fn: (n) => n instanceof e,
3285
3285
  abort: !0,
3286
- ...b(t)
3286
+ ...y(t)
3287
3287
  });
3288
3288
  return r._zod.bag.Class = e, r._zod.check = (n) => {
3289
3289
  n.value instanceof e || n.issues.push({
@@ -3380,7 +3380,7 @@ Oe.arrayToEnum([
3380
3380
  "not_multiple_of",
3381
3381
  "not_finite"
3382
3382
  ]);
3383
- class Ve extends Error {
3383
+ class Fe extends Error {
3384
3384
  get errors() {
3385
3385
  return this.issues;
3386
3386
  }
@@ -3417,7 +3417,7 @@ class Ve extends Error {
3417
3417
  return o(this), n;
3418
3418
  }
3419
3419
  static assert(t) {
3420
- if (!(t instanceof Ve))
3420
+ if (!(t instanceof Fe))
3421
3421
  throw new Error(`Not a ZodError: ${t}`);
3422
3422
  }
3423
3423
  toString() {
@@ -3443,15 +3443,15 @@ class Ve extends Error {
3443
3443
  return this.flatten();
3444
3444
  }
3445
3445
  }
3446
- Ve.create = (e) => new Ve(e);
3446
+ Fe.create = (e) => new Fe(e);
3447
3447
  var or;
3448
3448
  (function(e) {
3449
3449
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
3450
3450
  })(or || (or = {}));
3451
- var k;
3451
+ var E;
3452
3452
  (function(e) {
3453
3453
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
3454
- })(k || (k = {}));
3454
+ })(E || (E = {}));
3455
3455
  class sr extends Error {
3456
3456
  constructor(t, r) {
3457
3457
  super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
@@ -3459,38 +3459,38 @@ class sr extends Error {
3459
3459
  }
3460
3460
  function Ke(e) {
3461
3461
  }
3462
- function Fu(e) {
3462
+ function Lu(e) {
3463
3463
  if (typeof e == "function")
3464
3464
  throw new TypeError(
3465
3465
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
3466
3466
  );
3467
3467
  const { onEvent: t = Ke, onError: r = Ke, onRetry: n = Ke, onComment: o } = e;
3468
3468
  let s = "", i = !0, a, c = "", u = "";
3469
- function l(g) {
3470
- const v = i ? g.replace(/^\xEF\xBB\xBF/, "") : g, [E, w] = Vu(`${s}${v}`);
3471
- for (const f of E)
3469
+ function l(_) {
3470
+ const v = i ? _.replace(/^\xEF\xBB\xBF/, "") : _, [I, k] = Ju(`${s}${v}`);
3471
+ for (const f of I)
3472
3472
  d(f);
3473
- s = w, i = !1;
3473
+ s = k, i = !1;
3474
3474
  }
3475
- function d(g) {
3476
- if (g === "") {
3475
+ function d(_) {
3476
+ if (_ === "") {
3477
3477
  h();
3478
3478
  return;
3479
3479
  }
3480
- if (g.startsWith(":")) {
3481
- o && o(g.slice(g.startsWith(": ") ? 2 : 1));
3480
+ if (_.startsWith(":")) {
3481
+ o && o(_.slice(_.startsWith(": ") ? 2 : 1));
3482
3482
  return;
3483
3483
  }
3484
- const v = g.indexOf(":");
3484
+ const v = _.indexOf(":");
3485
3485
  if (v !== -1) {
3486
- const E = g.slice(0, v), w = g[v + 1] === " " ? 2 : 1, f = g.slice(v + w);
3487
- _(E, f, g);
3486
+ const I = _.slice(0, v), k = _[v + 1] === " " ? 2 : 1, f = _.slice(v + k);
3487
+ m(I, f, _);
3488
3488
  return;
3489
3489
  }
3490
- _(g, "", g);
3490
+ m(_, "", _);
3491
3491
  }
3492
- function _(g, v, E) {
3493
- switch (g) {
3492
+ function m(_, v, I) {
3493
+ switch (_) {
3494
3494
  case "event":
3495
3495
  u = v;
3496
3496
  break;
@@ -3506,15 +3506,15 @@ function Fu(e) {
3506
3506
  new sr(`Invalid \`retry\` value: "${v}"`, {
3507
3507
  type: "invalid-retry",
3508
3508
  value: v,
3509
- line: E
3509
+ line: I
3510
3510
  })
3511
3511
  );
3512
3512
  break;
3513
3513
  default:
3514
3514
  r(
3515
3515
  new sr(
3516
- `Unknown field "${g.length > 20 ? `${g.slice(0, 20)}…` : g}"`,
3517
- { type: "unknown-field", field: g, value: v, line: E }
3516
+ `Unknown field "${_.length > 20 ? `${_.slice(0, 20)}…` : _}"`,
3517
+ { type: "unknown-field", field: _, value: v, line: I }
3518
3518
  )
3519
3519
  );
3520
3520
  break;
@@ -3530,12 +3530,12 @@ function Fu(e) {
3530
3530
  `) ? c.slice(0, -1) : c
3531
3531
  }), a = void 0, c = "", u = "";
3532
3532
  }
3533
- function y(g = {}) {
3534
- s && g.consume && d(s), i = !0, a = void 0, c = "", u = "", s = "";
3533
+ function b(_ = {}) {
3534
+ s && _.consume && d(s), i = !0, a = void 0, c = "", u = "", s = "";
3535
3535
  }
3536
- return { feed: l, reset: y };
3536
+ return { feed: l, reset: b };
3537
3537
  }
3538
- function Vu(e) {
3538
+ function Ju(e) {
3539
3539
  const t = [];
3540
3540
  let r = "", n = 0;
3541
3541
  for (; n < e.length; ) {
@@ -3553,12 +3553,12 @@ function Vu(e) {
3553
3553
  }
3554
3554
  return [t, r];
3555
3555
  }
3556
- class Bu extends TransformStream {
3556
+ class Fu extends TransformStream {
3557
3557
  constructor({ onError: t, onRetry: r, onComment: n } = {}) {
3558
3558
  let o;
3559
3559
  super({
3560
3560
  start(s) {
3561
- o = Fu({
3561
+ o = Lu({
3562
3562
  onEvent: (i) => {
3563
3563
  s.enqueue(i);
3564
3564
  },
@@ -3590,12 +3590,12 @@ var Te = ({
3590
3590
  if (e == null)
3591
3591
  return o;
3592
3592
  if (r.includes(n))
3593
- throw new ro({
3593
+ throw new eo({
3594
3594
  argument: "separator",
3595
3595
  message: `The separator "${n}" must not be part of the alphabet "${r}".`
3596
3596
  });
3597
3597
  return () => `${e}${n}${o()}`;
3598
- }, Wu = Te();
3598
+ }, Vu = Te();
3599
3599
  function ar(e = globalThis) {
3600
3600
  var t, r, n;
3601
3601
  return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (n = (r = e.process) == null ? void 0 : r.versions) != null && n.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
@@ -3622,12 +3622,12 @@ function ir(e, ...t) {
3622
3622
  [n, ...t].filter(Boolean).join(" ")
3623
3623
  ), Object.fromEntries(r.entries());
3624
3624
  }
3625
- var Yu = /"__proto__"\s*:/, qu = /"constructor"\s*:/;
3625
+ var Bu = /"__proto__"\s*:/, Wu = /"constructor"\s*:/;
3626
3626
  function ur(e) {
3627
3627
  const t = JSON.parse(e);
3628
- return t === null || typeof t != "object" || Yu.test(e) === !1 && qu.test(e) === !1 ? t : Gu(t);
3628
+ return t === null || typeof t != "object" || Bu.test(e) === !1 && Wu.test(e) === !1 ? t : Yu(t);
3629
3629
  }
3630
- function Gu(e) {
3630
+ function Yu(e) {
3631
3631
  let t = [e];
3632
3632
  for (; t.length; ) {
3633
3633
  const r = t;
@@ -3645,7 +3645,7 @@ function Gu(e) {
3645
3645
  }
3646
3646
  return e;
3647
3647
  }
3648
- function Hu(e) {
3648
+ function qu(e) {
3649
3649
  const { stackTraceLimit: t } = Error;
3650
3650
  try {
3651
3651
  Error.stackTraceLimit = 0;
@@ -3676,7 +3676,7 @@ function bt(e) {
3676
3676
  function ae(e) {
3677
3677
  return typeof e == "boolean" ? e : bt(e);
3678
3678
  }
3679
- var Xu = Symbol(
3679
+ var Gu = Symbol(
3680
3680
  "Let zodToJsonSchema decide on which parser to use"
3681
3681
  ), cr = {
3682
3682
  name: void 0,
@@ -3698,7 +3698,7 @@ var Xu = Symbol(
3698
3698
  emailStrategy: "format:email",
3699
3699
  base64Strategy: "contentEncoding:base64",
3700
3700
  nameStrategy: "ref"
3701
- }, Qu = (e) => typeof e == "string" ? {
3701
+ }, Hu = (e) => typeof e == "string" ? {
3702
3702
  ...cr,
3703
3703
  name: e
3704
3704
  } : {
@@ -3708,17 +3708,17 @@ var Xu = Symbol(
3708
3708
  function Y() {
3709
3709
  return {};
3710
3710
  }
3711
- function Ku(e, t) {
3711
+ function Xu(e, t) {
3712
3712
  var r, n, o;
3713
3713
  const s = {
3714
3714
  type: "array"
3715
3715
  };
3716
- return (r = e.type) != null && r._def && ((o = (n = e.type) == null ? void 0 : n._def) == null ? void 0 : o.typeName) !== k.ZodAny && (s.items = T(e.type._def, {
3716
+ return (r = e.type) != null && r._def && ((o = (n = e.type) == null ? void 0 : n._def) == null ? void 0 : o.typeName) !== E.ZodAny && (s.items = T(e.type._def, {
3717
3717
  ...t,
3718
3718
  currentPath: [...t.currentPath, "items"]
3719
3719
  })), e.minLength && (s.minItems = e.minLength.value), e.maxLength && (s.maxItems = e.maxLength.value), e.exactLength && (s.minItems = e.exactLength.value, s.maxItems = e.exactLength.value), s;
3720
3720
  }
3721
- function ec(e) {
3721
+ function Qu(e) {
3722
3722
  const t = {
3723
3723
  type: "integer",
3724
3724
  format: "int64"
@@ -3739,13 +3739,13 @@ function ec(e) {
3739
3739
  }
3740
3740
  return t;
3741
3741
  }
3742
- function tc() {
3742
+ function Ku() {
3743
3743
  return { type: "boolean" };
3744
3744
  }
3745
3745
  function Zn(e, t) {
3746
3746
  return T(e.type._def, t);
3747
3747
  }
3748
- var rc = (e, t) => T(e.innerType._def, t);
3748
+ var ec = (e, t) => T(e.innerType._def, t);
3749
3749
  function $n(e, t, r) {
3750
3750
  const n = r ?? t.dateStrategy;
3751
3751
  if (Array.isArray(n))
@@ -3765,10 +3765,10 @@ function $n(e, t, r) {
3765
3765
  format: "date"
3766
3766
  };
3767
3767
  case "integer":
3768
- return nc(e);
3768
+ return tc(e);
3769
3769
  }
3770
3770
  }
3771
- var nc = (e) => {
3771
+ var tc = (e) => {
3772
3772
  const t = {
3773
3773
  type: "integer",
3774
3774
  format: "unix-time"
@@ -3784,23 +3784,23 @@ var nc = (e) => {
3784
3784
  }
3785
3785
  return t;
3786
3786
  };
3787
- function oc(e, t) {
3787
+ function rc(e, t) {
3788
3788
  return {
3789
3789
  ...T(e.innerType._def, t),
3790
3790
  default: e.defaultValue()
3791
3791
  };
3792
3792
  }
3793
- function sc(e, t) {
3793
+ function nc(e, t) {
3794
3794
  return t.effectStrategy === "input" ? T(e.schema._def, t) : Y();
3795
3795
  }
3796
- function ac(e) {
3796
+ function oc(e) {
3797
3797
  return {
3798
3798
  type: "string",
3799
3799
  enum: Array.from(e.values)
3800
3800
  };
3801
3801
  }
3802
- var ic = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3803
- function uc(e, t) {
3802
+ var sc = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3803
+ function ac(e, t) {
3804
3804
  const r = [
3805
3805
  T(e.left._def, {
3806
3806
  ...t,
@@ -3812,7 +3812,7 @@ function uc(e, t) {
3812
3812
  })
3813
3813
  ].filter((o) => !!o), n = [];
3814
3814
  return r.forEach((o) => {
3815
- if (ic(o))
3815
+ if (sc(o))
3816
3816
  n.push(...o.allOf);
3817
3817
  else {
3818
3818
  let s = o;
@@ -3824,7 +3824,7 @@ function uc(e, t) {
3824
3824
  }
3825
3825
  }), n.length ? { allOf: n } : void 0;
3826
3826
  }
3827
- function cc(e) {
3827
+ function ic(e) {
3828
3828
  const t = typeof e.value;
3829
3829
  return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? {
3830
3830
  type: Array.isArray(e.value) ? "array" : "object"
@@ -4003,15 +4003,15 @@ function Tn(e, t) {
4003
4003
  return r;
4004
4004
  }
4005
4005
  function tt(e, t) {
4006
- return t.patternStrategy === "escape" ? dc(e) : e;
4006
+ return t.patternStrategy === "escape" ? cc(e) : e;
4007
4007
  }
4008
- var lc = new Set(
4008
+ var uc = new Set(
4009
4009
  "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"
4010
4010
  );
4011
- function dc(e) {
4011
+ function cc(e) {
4012
4012
  let t = "";
4013
4013
  for (let r = 0; r < e.length; r++)
4014
- lc.has(e[r]) || (t += "\\"), t += e[r];
4014
+ uc.has(e[r]) || (t += "\\"), t += e[r];
4015
4015
  return t;
4016
4016
  }
4017
4017
  function X(e, t, r, n) {
@@ -4100,21 +4100,21 @@ function Nn(e, t) {
4100
4100
  currentPath: [...t.currentPath, "additionalProperties"]
4101
4101
  })) != null ? r : t.allowedAdditionalProperties
4102
4102
  };
4103
- if (((n = e.keyType) == null ? void 0 : n._def.typeName) === k.ZodString && ((o = e.keyType._def.checks) != null && o.length)) {
4103
+ if (((n = e.keyType) == null ? void 0 : n._def.typeName) === E.ZodString && ((o = e.keyType._def.checks) != null && o.length)) {
4104
4104
  const { type: u, ...l } = Tn(e.keyType._def, t);
4105
4105
  return {
4106
4106
  ...c,
4107
4107
  propertyNames: l
4108
4108
  };
4109
4109
  } else {
4110
- if (((s = e.keyType) == null ? void 0 : s._def.typeName) === k.ZodEnum)
4110
+ if (((s = e.keyType) == null ? void 0 : s._def.typeName) === E.ZodEnum)
4111
4111
  return {
4112
4112
  ...c,
4113
4113
  propertyNames: {
4114
4114
  enum: e.keyType._def.values
4115
4115
  }
4116
4116
  };
4117
- if (((i = e.keyType) == null ? void 0 : i._def.typeName) === k.ZodBranded && e.keyType._def.type._def.typeName === k.ZodString && ((a = e.keyType._def.type._def.checks) != null && a.length)) {
4117
+ if (((i = e.keyType) == null ? void 0 : i._def.typeName) === E.ZodBranded && e.keyType._def.type._def.typeName === E.ZodString && ((a = e.keyType._def.type._def.checks) != null && a.length)) {
4118
4118
  const { type: u, ...l } = Zn(
4119
4119
  e.keyType._def,
4120
4120
  t
@@ -4127,7 +4127,7 @@ function Nn(e, t) {
4127
4127
  }
4128
4128
  return c;
4129
4129
  }
4130
- function pc(e, t) {
4130
+ function lc(e, t) {
4131
4131
  if (t.mapStrategy === "record")
4132
4132
  return Nn(e, t);
4133
4133
  const r = T(e.keyType._def, {
@@ -4148,7 +4148,7 @@ function pc(e, t) {
4148
4148
  }
4149
4149
  };
4150
4150
  }
4151
- function fc(e) {
4151
+ function dc(e) {
4152
4152
  const t = e.values, n = Object.keys(e.values).filter((s) => typeof t[t[s]] != "number").map((s) => t[s]), o = Array.from(
4153
4153
  new Set(n.map((s) => typeof s))
4154
4154
  );
@@ -4157,10 +4157,10 @@ function fc(e) {
4157
4157
  enum: n
4158
4158
  };
4159
4159
  }
4160
- function hc() {
4160
+ function pc() {
4161
4161
  return { not: Y() };
4162
4162
  }
4163
- function mc() {
4163
+ function fc() {
4164
4164
  return {
4165
4165
  type: "null"
4166
4166
  };
@@ -4172,7 +4172,7 @@ var ut = {
4172
4172
  ZodBoolean: "boolean",
4173
4173
  ZodNull: "null"
4174
4174
  };
4175
- function gc(e, t) {
4175
+ function hc(e, t) {
4176
4176
  const r = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
4177
4177
  if (r.every(
4178
4178
  (n) => n._def.typeName in ut && (!n._def.checks || !n._def.checks.length)
@@ -4228,9 +4228,9 @@ function gc(e, t) {
4228
4228
  []
4229
4229
  )
4230
4230
  };
4231
- return vc(e, t);
4231
+ return mc(e, t);
4232
4232
  }
4233
- var vc = (e, t) => {
4233
+ var mc = (e, t) => {
4234
4234
  const r = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map(
4235
4235
  (n, o) => T(n._def, {
4236
4236
  ...t,
@@ -4241,7 +4241,7 @@ var vc = (e, t) => {
4241
4241
  );
4242
4242
  return r.length ? { anyOf: r } : void 0;
4243
4243
  };
4244
- function _c(e, t) {
4244
+ function gc(e, t) {
4245
4245
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(
4246
4246
  e.innerType._def.typeName
4247
4247
  ) && (!e.innerType._def.checks || !e.innerType._def.checks.length))
@@ -4257,7 +4257,7 @@ function _c(e, t) {
4257
4257
  });
4258
4258
  return r && { anyOf: [r, { type: "null" }] };
4259
4259
  }
4260
- function yc(e) {
4260
+ function vc(e) {
4261
4261
  const t = {
4262
4262
  type: "number"
4263
4263
  };
@@ -4280,7 +4280,7 @@ function yc(e) {
4280
4280
  }
4281
4281
  return t;
4282
4282
  }
4283
- function bc(e, t) {
4283
+ function _c(e, t) {
4284
4284
  const r = {
4285
4285
  type: "object",
4286
4286
  properties: {}
@@ -4289,7 +4289,7 @@ function bc(e, t) {
4289
4289
  let a = o[i];
4290
4290
  if (a === void 0 || a._def === void 0)
4291
4291
  continue;
4292
- const c = Ic(a), u = T(a._def, {
4292
+ const c = bc(a), u = T(a._def, {
4293
4293
  ...t,
4294
4294
  currentPath: [...t.currentPath, "properties", i],
4295
4295
  propertyPath: [...t.currentPath, "properties", i]
@@ -4297,10 +4297,10 @@ function bc(e, t) {
4297
4297
  u !== void 0 && (r.properties[i] = u, c || n.push(i));
4298
4298
  }
4299
4299
  n.length && (r.required = n);
4300
- const s = wc(e, t);
4300
+ const s = yc(e, t);
4301
4301
  return s !== void 0 && (r.additionalProperties = s), r;
4302
4302
  }
4303
- function wc(e, t) {
4303
+ function yc(e, t) {
4304
4304
  if (e.catchall._def.typeName !== "ZodNever")
4305
4305
  return T(e.catchall._def, {
4306
4306
  ...t,
@@ -4315,14 +4315,14 @@ function wc(e, t) {
4315
4315
  return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
4316
4316
  }
4317
4317
  }
4318
- function Ic(e) {
4318
+ function bc(e) {
4319
4319
  try {
4320
4320
  return e.isOptional();
4321
4321
  } catch {
4322
4322
  return !0;
4323
4323
  }
4324
4324
  }
4325
- var Ec = (e, t) => {
4325
+ var wc = (e, t) => {
4326
4326
  var r;
4327
4327
  if (t.currentPath.toString() === ((r = t.propertyPath) == null ? void 0 : r.toString()))
4328
4328
  return T(e.innerType._def, t);
@@ -4331,7 +4331,7 @@ var Ec = (e, t) => {
4331
4331
  currentPath: [...t.currentPath, "anyOf", "1"]
4332
4332
  });
4333
4333
  return n ? { anyOf: [{ not: Y() }, n] } : Y();
4334
- }, kc = (e, t) => {
4334
+ }, Ic = (e, t) => {
4335
4335
  if (t.pipeStrategy === "input")
4336
4336
  return T(e.in._def, t);
4337
4337
  if (t.pipeStrategy === "output")
@@ -4347,10 +4347,10 @@ var Ec = (e, t) => {
4347
4347
  allOf: [r, n].filter((o) => o !== void 0)
4348
4348
  };
4349
4349
  };
4350
- function zc(e, t) {
4350
+ function Ec(e, t) {
4351
4351
  return T(e.type._def, t);
4352
4352
  }
4353
- function Sc(e, t) {
4353
+ function kc(e, t) {
4354
4354
  const n = {
4355
4355
  type: "array",
4356
4356
  uniqueItems: !0,
@@ -4361,7 +4361,7 @@ function Sc(e, t) {
4361
4361
  };
4362
4362
  return e.minSize && (n.minItems = e.minSize.value), e.maxSize && (n.maxItems = e.maxSize.value), n;
4363
4363
  }
4364
- function Oc(e, t) {
4364
+ function zc(e, t) {
4365
4365
  return e.rest ? {
4366
4366
  type: "array",
4367
4367
  minItems: e.items.length,
@@ -4393,89 +4393,89 @@ function Oc(e, t) {
4393
4393
  )
4394
4394
  };
4395
4395
  }
4396
- function Zc() {
4396
+ function Sc() {
4397
4397
  return {
4398
4398
  not: Y()
4399
4399
  };
4400
4400
  }
4401
- function $c() {
4401
+ function Oc() {
4402
4402
  return Y();
4403
4403
  }
4404
- var Tc = (e, t) => T(e.innerType._def, t), Nc = (e, t, r) => {
4404
+ var Zc = (e, t) => T(e.innerType._def, t), $c = (e, t, r) => {
4405
4405
  switch (t) {
4406
- case k.ZodString:
4406
+ case E.ZodString:
4407
4407
  return Tn(e, r);
4408
- case k.ZodNumber:
4409
- return yc(e);
4410
- case k.ZodObject:
4411
- return bc(e, r);
4412
- case k.ZodBigInt:
4413
- return ec(e);
4414
- case k.ZodBoolean:
4415
- return tc();
4416
- case k.ZodDate:
4408
+ case E.ZodNumber:
4409
+ return vc(e);
4410
+ case E.ZodObject:
4411
+ return _c(e, r);
4412
+ case E.ZodBigInt:
4413
+ return Qu(e);
4414
+ case E.ZodBoolean:
4415
+ return Ku();
4416
+ case E.ZodDate:
4417
4417
  return $n(e, r);
4418
- case k.ZodUndefined:
4419
- return Zc();
4420
- case k.ZodNull:
4421
- return mc();
4422
- case k.ZodArray:
4423
- return Ku(e, r);
4424
- case k.ZodUnion:
4425
- case k.ZodDiscriminatedUnion:
4426
- return gc(e, r);
4427
- case k.ZodIntersection:
4428
- return uc(e, r);
4429
- case k.ZodTuple:
4430
- return Oc(e, r);
4431
- case k.ZodRecord:
4418
+ case E.ZodUndefined:
4419
+ return Sc();
4420
+ case E.ZodNull:
4421
+ return fc();
4422
+ case E.ZodArray:
4423
+ return Xu(e, r);
4424
+ case E.ZodUnion:
4425
+ case E.ZodDiscriminatedUnion:
4426
+ return hc(e, r);
4427
+ case E.ZodIntersection:
4428
+ return ac(e, r);
4429
+ case E.ZodTuple:
4430
+ return zc(e, r);
4431
+ case E.ZodRecord:
4432
4432
  return Nn(e, r);
4433
- case k.ZodLiteral:
4434
- return cc(e);
4435
- case k.ZodEnum:
4436
- return ac(e);
4437
- case k.ZodNativeEnum:
4438
- return fc(e);
4439
- case k.ZodNullable:
4440
- return _c(e, r);
4441
- case k.ZodOptional:
4442
- return Ec(e, r);
4443
- case k.ZodMap:
4444
- return pc(e, r);
4445
- case k.ZodSet:
4446
- return Sc(e, r);
4447
- case k.ZodLazy:
4433
+ case E.ZodLiteral:
4434
+ return ic(e);
4435
+ case E.ZodEnum:
4436
+ return oc(e);
4437
+ case E.ZodNativeEnum:
4438
+ return dc(e);
4439
+ case E.ZodNullable:
4440
+ return gc(e, r);
4441
+ case E.ZodOptional:
4442
+ return wc(e, r);
4443
+ case E.ZodMap:
4444
+ return lc(e, r);
4445
+ case E.ZodSet:
4446
+ return kc(e, r);
4447
+ case E.ZodLazy:
4448
4448
  return () => e.getter()._def;
4449
- case k.ZodPromise:
4450
- return zc(e, r);
4451
- case k.ZodNaN:
4452
- case k.ZodNever:
4453
- return hc();
4454
- case k.ZodEffects:
4455
- return sc(e, r);
4456
- case k.ZodAny:
4449
+ case E.ZodPromise:
4450
+ return Ec(e, r);
4451
+ case E.ZodNaN:
4452
+ case E.ZodNever:
4453
+ return pc();
4454
+ case E.ZodEffects:
4455
+ return nc(e, r);
4456
+ case E.ZodAny:
4457
4457
  return Y();
4458
- case k.ZodUnknown:
4459
- return $c();
4460
- case k.ZodDefault:
4461
- return oc(e, r);
4462
- case k.ZodBranded:
4463
- return Zn(e, r);
4464
- case k.ZodReadonly:
4465
- return Tc(e, r);
4466
- case k.ZodCatch:
4458
+ case E.ZodUnknown:
4459
+ return Oc();
4460
+ case E.ZodDefault:
4467
4461
  return rc(e, r);
4468
- case k.ZodPipeline:
4469
- return kc(e, r);
4470
- case k.ZodFunction:
4471
- case k.ZodVoid:
4472
- case k.ZodSymbol:
4462
+ case E.ZodBranded:
4463
+ return Zn(e, r);
4464
+ case E.ZodReadonly:
4465
+ return Zc(e, r);
4466
+ case E.ZodCatch:
4467
+ return ec(e, r);
4468
+ case E.ZodPipeline:
4469
+ return Ic(e, r);
4470
+ case E.ZodFunction:
4471
+ case E.ZodVoid:
4472
+ case E.ZodSymbol:
4473
4473
  return;
4474
4474
  default:
4475
4475
  return /* @__PURE__ */ ((n) => {
4476
4476
  })();
4477
4477
  }
4478
- }, Pc = (e, t) => {
4478
+ }, Tc = (e, t) => {
4479
4479
  let r = 0;
4480
4480
  for (; r < e.length && r < t.length && e[r] === t[r]; r++)
4481
4481
  ;
@@ -4492,29 +4492,29 @@ function T(e, t, r = !1) {
4492
4492
  o,
4493
4493
  r
4494
4494
  );
4495
- if (c !== Xu)
4495
+ if (c !== Gu)
4496
4496
  return c;
4497
4497
  }
4498
4498
  if (o && !r) {
4499
- const c = Ac(o, t);
4499
+ const c = Nc(o, t);
4500
4500
  if (c !== void 0)
4501
4501
  return c;
4502
4502
  }
4503
4503
  const s = { def: e, path: t.currentPath, jsonSchema: void 0 };
4504
4504
  t.seen.set(e, s);
4505
- const i = Nc(e, e.typeName, t), a = typeof i == "function" ? T(i(), t) : i;
4506
- if (a && Rc(e, t, a), t.postProcess) {
4505
+ const i = $c(e, e.typeName, t), a = typeof i == "function" ? T(i(), t) : i;
4506
+ if (a && Pc(e, t, a), t.postProcess) {
4507
4507
  const c = t.postProcess(a, e, t);
4508
4508
  return s.jsonSchema = a, c;
4509
4509
  }
4510
4510
  return s.jsonSchema = a, a;
4511
4511
  }
4512
- var Ac = (e, t) => {
4512
+ var Nc = (e, t) => {
4513
4513
  switch (t.$refStrategy) {
4514
4514
  case "root":
4515
4515
  return { $ref: e.path.join("/") };
4516
4516
  case "relative":
4517
- return { $ref: Pc(t.currentPath, e.path) };
4517
+ return { $ref: Tc(t.currentPath, e.path) };
4518
4518
  case "none":
4519
4519
  case "seen":
4520
4520
  return e.path.length < t.currentPath.length && e.path.every((r, n) => t.currentPath[n] === r) ? (console.warn(
@@ -4523,8 +4523,8 @@ var Ac = (e, t) => {
4523
4523
  )}! Defaulting to any`
4524
4524
  ), Y()) : t.$refStrategy === "seen" ? Y() : void 0;
4525
4525
  }
4526
- }, Rc = (e, t, r) => (e.description && (r.description = e.description), r), xc = (e) => {
4527
- const t = Qu(e), r = t.name !== void 0 ? [...t.basePath, t.definitionPath, t.name] : t.basePath;
4526
+ }, Pc = (e, t, r) => (e.description && (r.description = e.description), r), Ac = (e) => {
4527
+ const t = Hu(e), r = t.name !== void 0 ? [...t.basePath, t.definitionPath, t.name] : t.basePath;
4528
4528
  return {
4529
4529
  ...t,
4530
4530
  currentPath: r,
@@ -4541,22 +4541,22 @@ var Ac = (e, t) => {
4541
4541
  ])
4542
4542
  )
4543
4543
  };
4544
- }, jc = (e, t) => {
4544
+ }, Rc = (e, t) => {
4545
4545
  var r;
4546
- const n = xc(t);
4546
+ const n = Ac(t);
4547
4547
  let o = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce(
4548
4548
  (u, [l, d]) => {
4549
- var _;
4549
+ var m;
4550
4550
  return {
4551
4551
  ...u,
4552
- [l]: (_ = T(
4552
+ [l]: (m = T(
4553
4553
  d._def,
4554
4554
  {
4555
4555
  ...n,
4556
4556
  currentPath: [...n.basePath, n.definitionPath, l]
4557
4557
  },
4558
4558
  !0
4559
- )) != null ? _ : Y()
4559
+ )) != null ? m : Y()
4560
4560
  };
4561
4561
  },
4562
4562
  {}
@@ -4586,11 +4586,11 @@ var Ac = (e, t) => {
4586
4586
  };
4587
4587
  return c.$schema = "http://json-schema.org/draft-07/schema#", c;
4588
4588
  }, ct = Symbol.for("vercel.ai.schema");
4589
- function Cc(e) {
4589
+ function xc(e) {
4590
4590
  let t;
4591
4591
  return () => (t == null && (t = e()), t);
4592
4592
  }
4593
- function Ge(e, {
4593
+ function qe(e, {
4594
4594
  validate: t
4595
4595
  } = {}) {
4596
4596
  return {
@@ -4603,14 +4603,14 @@ function Ge(e, {
4603
4603
  validate: t
4604
4604
  };
4605
4605
  }
4606
- function Mc(e) {
4606
+ function jc(e) {
4607
4607
  return typeof e == "object" && e !== null && ct in e && e[ct] === !0 && "jsonSchema" in e && "validate" in e;
4608
4608
  }
4609
4609
  function wt(e) {
4610
- return e == null ? Ge({ properties: {}, additionalProperties: !1 }) : Mc(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Pn(e) : Dc(e) : e();
4610
+ return e == null ? qe({ properties: {}, additionalProperties: !1 }) : jc(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Pn(e) : Cc(e) : e();
4611
4611
  }
4612
- function Dc(e) {
4613
- return Ge(
4612
+ function Cc(e) {
4613
+ return qe(
4614
4614
  () => bt(
4615
4615
  e["~standard"].jsonSchema.input({
4616
4616
  target: "draft-07"
@@ -4630,12 +4630,12 @@ function Dc(e) {
4630
4630
  }
4631
4631
  );
4632
4632
  }
4633
- function Uc(e, t) {
4633
+ function Mc(e, t) {
4634
4634
  var r;
4635
4635
  const n = (r = t == null ? void 0 : t.useReferences) != null ? r : !1;
4636
- return Ge(
4636
+ return qe(
4637
4637
  // defer json schema creation to avoid unnecessary computation when only validation is needed
4638
- () => jc(e, {
4638
+ () => Rc(e, {
4639
4639
  $refStrategy: n ? "root" : "none"
4640
4640
  }),
4641
4641
  {
@@ -4646,13 +4646,13 @@ function Uc(e, t) {
4646
4646
  }
4647
4647
  );
4648
4648
  }
4649
- function Lc(e, t) {
4649
+ function Dc(e, t) {
4650
4650
  var r;
4651
4651
  const n = (r = t == null ? void 0 : t.useReferences) != null ? r : !1;
4652
- return Ge(
4652
+ return qe(
4653
4653
  // defer json schema creation to avoid unnecessary computation when only validation is needed
4654
4654
  () => bt(
4655
- zi(e, {
4655
+ Ei(e, {
4656
4656
  target: "draft-7",
4657
4657
  io: "input",
4658
4658
  reused: n ? "ref" : "inline"
@@ -4666,11 +4666,11 @@ function Lc(e, t) {
4666
4666
  }
4667
4667
  );
4668
4668
  }
4669
- function Jc(e) {
4669
+ function Uc(e) {
4670
4670
  return "_zod" in e;
4671
4671
  }
4672
4672
  function Pn(e, t) {
4673
- return Jc(e) ? Lc(e, t) : Uc(e, t);
4673
+ return Uc(e) ? Dc(e, t) : Mc(e, t);
4674
4674
  }
4675
4675
  async function dr({
4676
4676
  value: e,
@@ -4703,12 +4703,12 @@ async function Ze({
4703
4703
  };
4704
4704
  }
4705
4705
  }
4706
- async function ue({
4706
+ async function ce({
4707
4707
  text: e,
4708
4708
  schema: t
4709
4709
  }) {
4710
4710
  try {
4711
- const r = Hu(e);
4711
+ const r = qu(e);
4712
4712
  return t == null ? { success: !0, value: r, rawValue: r } : await Ze({ value: r, schema: t });
4713
4713
  } catch (r) {
4714
4714
  return {
@@ -4718,14 +4718,14 @@ async function ue({
4718
4718
  };
4719
4719
  }
4720
4720
  }
4721
- function Fc({
4721
+ function Lc({
4722
4722
  stream: e,
4723
4723
  schema: t
4724
4724
  }) {
4725
- return e.pipeThrough(new TextDecoderStream()).pipeThrough(new Bu()).pipeThrough(
4725
+ return e.pipeThrough(new TextDecoderStream()).pipeThrough(new Fu()).pipeThrough(
4726
4726
  new TransformStream({
4727
4727
  async transform({ data: r }, n) {
4728
- r !== "[DONE]" && n.enqueue(await ue({ text: r, schema: t }));
4728
+ r !== "[DONE]" && n.enqueue(await ce({ text: r, schema: t }));
4729
4729
  }
4730
4730
  })
4731
4731
  );
@@ -4733,10 +4733,10 @@ function Fc({
4733
4733
  async function ee(e) {
4734
4734
  return typeof e == "function" && (e = e()), Promise.resolve(e);
4735
4735
  }
4736
- var Vc = Object.defineProperty, Bc = (e, t) => {
4736
+ var Jc = Object.defineProperty, Fc = (e, t) => {
4737
4737
  for (var r in t)
4738
- Vc(e, r, { get: t[r], enumerable: !0 });
4739
- }, An = "AI_NoObjectGeneratedError", Rn = `vercel.ai.error.${An}`, Wc = Symbol.for(Rn), xn, te = class extends K {
4738
+ Jc(e, r, { get: t[r], enumerable: !0 });
4739
+ }, An = "AI_NoObjectGeneratedError", Rn = `vercel.ai.error.${An}`, Vc = Symbol.for(Rn), xn, te = class extends K {
4740
4740
  constructor({
4741
4741
  message: e = "No object generated.",
4742
4742
  cause: t,
@@ -4751,8 +4751,8 @@ var Vc = Object.defineProperty, Bc = (e, t) => {
4751
4751
  return K.hasMarker(e, Rn);
4752
4752
  }
4753
4753
  };
4754
- xn = Wc;
4755
- var jn = "AI_UIMessageStreamError", Cn = `vercel.ai.error.${jn}`, Yc = Symbol.for(Cn), Mn, de = class extends K {
4754
+ xn = Vc;
4755
+ var jn = "AI_UIMessageStreamError", Cn = `vercel.ai.error.${jn}`, Bc = Symbol.for(Cn), Mn, pe = class extends K {
4756
4756
  constructor({
4757
4757
  chunkType: e,
4758
4758
  chunkId: t,
@@ -4764,11 +4764,11 @@ var jn = "AI_UIMessageStreamError", Cn = `vercel.ai.error.${jn}`, Yc = Symbol.fo
4764
4764
  return K.hasMarker(e, Cn);
4765
4765
  }
4766
4766
  };
4767
- Mn = Yc;
4767
+ Mn = Bc;
4768
4768
  var pr = "6.0.42", Dn = F([
4769
- m(),
4770
- Fe(Uint8Array),
4771
- Fe(ArrayBuffer),
4769
+ g(),
4770
+ Je(Uint8Array),
4771
+ Je(ArrayBuffer),
4772
4772
  On(
4773
4773
  // Buffer might not be available in some environments such as CloudFlare:
4774
4774
  (e) => {
@@ -4777,121 +4777,121 @@ var pr = "6.0.42", Dn = F([
4777
4777
  },
4778
4778
  { message: "Must be a Buffer" }
4779
4779
  )
4780
- ]), $e = Uu(
4780
+ ]), $e = Mu(
4781
4781
  () => F([
4782
- hu(),
4783
- m(),
4784
- lu(),
4782
+ pu(),
4783
+ g(),
4784
+ uu(),
4785
4785
  J(),
4786
- Se(m(), $e.optional()),
4786
+ Se(g(), $e.optional()),
4787
4787
  be($e)
4788
4788
  ])
4789
4789
  ), S = Se(
4790
- m(),
4791
- Se(m(), $e.optional())
4790
+ g(),
4791
+ Se(g(), $e.optional())
4792
4792
  ), Un = P({
4793
- type: I("text"),
4794
- text: m(),
4793
+ type: w("text"),
4794
+ text: g(),
4795
4795
  providerOptions: S.optional()
4796
- }), qc = P({
4797
- type: I("image"),
4798
- image: F([Dn, Fe(URL)]),
4799
- mediaType: m().optional(),
4796
+ }), Wc = P({
4797
+ type: w("image"),
4798
+ image: F([Dn, Je(URL)]),
4799
+ mediaType: g().optional(),
4800
4800
  providerOptions: S.optional()
4801
4801
  }), Ln = P({
4802
- type: I("file"),
4803
- data: F([Dn, Fe(URL)]),
4804
- filename: m().optional(),
4805
- mediaType: m(),
4802
+ type: w("file"),
4803
+ data: F([Dn, Je(URL)]),
4804
+ filename: g().optional(),
4805
+ mediaType: g(),
4806
4806
  providerOptions: S.optional()
4807
- }), Gc = P({
4808
- type: I("reasoning"),
4809
- text: m(),
4807
+ }), Yc = P({
4808
+ type: w("reasoning"),
4809
+ text: g(),
4810
4810
  providerOptions: S.optional()
4811
- }), Hc = P({
4812
- type: I("tool-call"),
4813
- toolCallId: m(),
4814
- toolName: m(),
4811
+ }), qc = P({
4812
+ type: w("tool-call"),
4813
+ toolCallId: g(),
4814
+ toolName: g(),
4815
4815
  input: Q(),
4816
4816
  providerOptions: S.optional(),
4817
4817
  providerExecuted: J().optional()
4818
- }), Xc = yu(
4818
+ }), Gc = vu(
4819
4819
  "type",
4820
4820
  [
4821
4821
  P({
4822
- type: I("text"),
4823
- value: m(),
4822
+ type: w("text"),
4823
+ value: g(),
4824
4824
  providerOptions: S.optional()
4825
4825
  }),
4826
4826
  P({
4827
- type: I("json"),
4827
+ type: w("json"),
4828
4828
  value: $e,
4829
4829
  providerOptions: S.optional()
4830
4830
  }),
4831
4831
  P({
4832
- type: I("execution-denied"),
4833
- reason: m().optional(),
4832
+ type: w("execution-denied"),
4833
+ reason: g().optional(),
4834
4834
  providerOptions: S.optional()
4835
4835
  }),
4836
4836
  P({
4837
- type: I("error-text"),
4838
- value: m(),
4837
+ type: w("error-text"),
4838
+ value: g(),
4839
4839
  providerOptions: S.optional()
4840
4840
  }),
4841
4841
  P({
4842
- type: I("error-json"),
4842
+ type: w("error-json"),
4843
4843
  value: $e,
4844
4844
  providerOptions: S.optional()
4845
4845
  }),
4846
4846
  P({
4847
- type: I("content"),
4847
+ type: w("content"),
4848
4848
  value: be(
4849
4849
  F([
4850
4850
  P({
4851
- type: I("text"),
4852
- text: m(),
4851
+ type: w("text"),
4852
+ text: g(),
4853
4853
  providerOptions: S.optional()
4854
4854
  }),
4855
4855
  P({
4856
- type: I("media"),
4857
- data: m(),
4858
- mediaType: m()
4856
+ type: w("media"),
4857
+ data: g(),
4858
+ mediaType: g()
4859
4859
  }),
4860
4860
  P({
4861
- type: I("file-data"),
4862
- data: m(),
4863
- mediaType: m(),
4864
- filename: m().optional(),
4861
+ type: w("file-data"),
4862
+ data: g(),
4863
+ mediaType: g(),
4864
+ filename: g().optional(),
4865
4865
  providerOptions: S.optional()
4866
4866
  }),
4867
4867
  P({
4868
- type: I("file-url"),
4869
- url: m(),
4868
+ type: w("file-url"),
4869
+ url: g(),
4870
4870
  providerOptions: S.optional()
4871
4871
  }),
4872
4872
  P({
4873
- type: I("file-id"),
4874
- fileId: F([m(), Se(m(), m())]),
4873
+ type: w("file-id"),
4874
+ fileId: F([g(), Se(g(), g())]),
4875
4875
  providerOptions: S.optional()
4876
4876
  }),
4877
4877
  P({
4878
- type: I("image-data"),
4879
- data: m(),
4880
- mediaType: m(),
4878
+ type: w("image-data"),
4879
+ data: g(),
4880
+ mediaType: g(),
4881
4881
  providerOptions: S.optional()
4882
4882
  }),
4883
4883
  P({
4884
- type: I("image-url"),
4885
- url: m(),
4884
+ type: w("image-url"),
4885
+ url: g(),
4886
4886
  providerOptions: S.optional()
4887
4887
  }),
4888
4888
  P({
4889
- type: I("image-file-id"),
4890
- fileId: F([m(), Se(m(), m())]),
4889
+ type: w("image-file-id"),
4890
+ fileId: F([g(), Se(g(), g())]),
4891
4891
  providerOptions: S.optional()
4892
4892
  }),
4893
4893
  P({
4894
- type: I("custom"),
4894
+ type: w("custom"),
4895
4895
  providerOptions: S.optional()
4896
4896
  })
4897
4897
  ])
@@ -4899,59 +4899,59 @@ var pr = "6.0.42", Dn = F([
4899
4899
  })
4900
4900
  ]
4901
4901
  ), Jn = P({
4902
- type: I("tool-result"),
4903
- toolCallId: m(),
4904
- toolName: m(),
4905
- output: Xc,
4902
+ type: w("tool-result"),
4903
+ toolCallId: g(),
4904
+ toolName: g(),
4905
+ output: Gc,
4906
4906
  providerOptions: S.optional()
4907
- }), Qc = P({
4908
- type: I("tool-approval-request"),
4909
- approvalId: m(),
4910
- toolCallId: m()
4911
- }), Kc = P({
4912
- type: I("tool-approval-response"),
4913
- approvalId: m(),
4907
+ }), Hc = P({
4908
+ type: w("tool-approval-request"),
4909
+ approvalId: g(),
4910
+ toolCallId: g()
4911
+ }), Xc = P({
4912
+ type: w("tool-approval-response"),
4913
+ approvalId: g(),
4914
4914
  approved: J(),
4915
- reason: m().optional()
4916
- }), el = P(
4915
+ reason: g().optional()
4916
+ }), Qc = P(
4917
4917
  {
4918
- role: I("system"),
4919
- content: m(),
4918
+ role: w("system"),
4919
+ content: g(),
4920
4920
  providerOptions: S.optional()
4921
4921
  }
4922
- ), tl = P({
4923
- role: I("user"),
4922
+ ), Kc = P({
4923
+ role: w("user"),
4924
4924
  content: F([
4925
- m(),
4926
- be(F([Un, qc, Ln]))
4925
+ g(),
4926
+ be(F([Un, Wc, Ln]))
4927
4927
  ]),
4928
4928
  providerOptions: S.optional()
4929
- }), rl = P({
4930
- role: I("assistant"),
4929
+ }), el = P({
4930
+ role: w("assistant"),
4931
4931
  content: F([
4932
- m(),
4932
+ g(),
4933
4933
  be(
4934
4934
  F([
4935
4935
  Un,
4936
4936
  Ln,
4937
- Gc,
4938
- Hc,
4937
+ Yc,
4938
+ qc,
4939
4939
  Jn,
4940
- Qc
4940
+ Hc
4941
4941
  ])
4942
4942
  )
4943
4943
  ]),
4944
4944
  providerOptions: S.optional()
4945
- }), nl = P({
4946
- role: I("tool"),
4947
- content: be(F([Jn, Kc])),
4945
+ }), tl = P({
4946
+ role: w("tool"),
4947
+ content: be(F([Jn, Xc])),
4948
4948
  providerOptions: S.optional()
4949
4949
  });
4950
4950
  F([
4951
+ Qc,
4952
+ Kc,
4951
4953
  el,
4952
- tl,
4953
- rl,
4954
- nl
4954
+ tl
4955
4955
  ]);
4956
4956
  function Fn(e, t) {
4957
4957
  if (e === void 0 && t === void 0)
@@ -4974,15 +4974,15 @@ function Fn(e, t) {
4974
4974
  }
4975
4975
  return r;
4976
4976
  }
4977
- var ol = {};
4978
- Bc(ol, {
4979
- array: () => ul,
4980
- choice: () => cl,
4981
- json: () => ll,
4982
- object: () => il,
4983
- text: () => al
4977
+ var rl = {};
4978
+ Fc(rl, {
4979
+ array: () => al,
4980
+ choice: () => il,
4981
+ json: () => ul,
4982
+ object: () => sl,
4983
+ text: () => ol
4984
4984
  });
4985
- function sl(e) {
4985
+ function nl(e) {
4986
4986
  const t = ["ROOT"];
4987
4987
  let r = -1, n = null;
4988
4988
  function o(c, u, l) {
@@ -5233,10 +5233,10 @@ function sl(e) {
5233
5233
  async function Ne(e) {
5234
5234
  if (e === void 0)
5235
5235
  return { value: void 0, state: "undefined-input" };
5236
- let t = await ue({ text: e });
5237
- return t.success ? { value: t.value, state: "successful-parse" } : (t = await ue({ text: sl(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
5236
+ let t = await ce({ text: e });
5237
+ return t.success ? { value: t.value, state: "successful-parse" } : (t = await ce({ text: nl(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
5238
5238
  }
5239
- var al = () => ({
5239
+ var ol = () => ({
5240
5240
  name: "text",
5241
5241
  responseFormat: Promise.resolve({ type: "text" }),
5242
5242
  async parseCompleteOutput({ text: e }) {
@@ -5247,7 +5247,7 @@ var al = () => ({
5247
5247
  },
5248
5248
  createElementStreamTransform() {
5249
5249
  }
5250
- }), il = ({
5250
+ }), sl = ({
5251
5251
  schema: e,
5252
5252
  name: t,
5253
5253
  description: r
@@ -5262,7 +5262,7 @@ var al = () => ({
5262
5262
  ...r != null && { description: r }
5263
5263
  })),
5264
5264
  async parseCompleteOutput({ text: o }, s) {
5265
- const i = await ue({ text: o });
5265
+ const i = await ce({ text: o });
5266
5266
  if (!i.success)
5267
5267
  throw new te({
5268
5268
  message: "No object generated: could not parse the response.",
@@ -5304,7 +5304,7 @@ var al = () => ({
5304
5304
  createElementStreamTransform() {
5305
5305
  }
5306
5306
  };
5307
- }, ul = ({
5307
+ }, al = ({
5308
5308
  element: e,
5309
5309
  name: t,
5310
5310
  description: r
@@ -5331,7 +5331,7 @@ var al = () => ({
5331
5331
  };
5332
5332
  }),
5333
5333
  async parseCompleteOutput({ text: o }, s) {
5334
- const i = await ue({ text: o });
5334
+ const i = await ce({ text: o });
5335
5335
  if (!i.success)
5336
5336
  throw new te({
5337
5337
  message: "No object generated: could not parse the response.",
@@ -5405,7 +5405,7 @@ var al = () => ({
5405
5405
  });
5406
5406
  }
5407
5407
  };
5408
- }, cl = ({
5408
+ }, il = ({
5409
5409
  options: e,
5410
5410
  name: t,
5411
5411
  description: r
@@ -5427,7 +5427,7 @@ var al = () => ({
5427
5427
  ...r != null && { description: r }
5428
5428
  }),
5429
5429
  async parseCompleteOutput({ text: n }, o) {
5430
- const s = await ue({ text: n });
5430
+ const s = await ce({ text: n });
5431
5431
  if (!s.success)
5432
5432
  throw new te({
5433
5433
  message: "No object generated: could not parse the response.",
@@ -5472,7 +5472,7 @@ var al = () => ({
5472
5472
  },
5473
5473
  createElementStreamTransform() {
5474
5474
  }
5475
- }), ll = ({
5475
+ }), ul = ({
5476
5476
  name: e,
5477
5477
  description: t
5478
5478
  } = {}) => ({
@@ -5483,7 +5483,7 @@ var al = () => ({
5483
5483
  ...t != null && { description: t }
5484
5484
  }),
5485
5485
  async parseCompleteOutput({ text: r }, n) {
5486
- const o = await ue({ text: r });
5486
+ const o = await ce({ text: r });
5487
5487
  if (!o.success)
5488
5488
  throw new te({
5489
5489
  message: "No object generated: could not parse the response.",
@@ -5529,123 +5529,123 @@ Te({
5529
5529
  });
5530
5530
  }
5531
5531
  });
5532
- var dl = Cc(
5532
+ var cl = xc(
5533
5533
  () => Pn(
5534
5534
  F([
5535
5535
  R({
5536
- type: I("text-start"),
5537
- id: m(),
5536
+ type: w("text-start"),
5537
+ id: g(),
5538
5538
  providerMetadata: S.optional()
5539
5539
  }),
5540
5540
  R({
5541
- type: I("text-delta"),
5542
- id: m(),
5543
- delta: m(),
5541
+ type: w("text-delta"),
5542
+ id: g(),
5543
+ delta: g(),
5544
5544
  providerMetadata: S.optional()
5545
5545
  }),
5546
5546
  R({
5547
- type: I("text-end"),
5548
- id: m(),
5547
+ type: w("text-end"),
5548
+ id: g(),
5549
5549
  providerMetadata: S.optional()
5550
5550
  }),
5551
5551
  R({
5552
- type: I("error"),
5553
- errorText: m()
5552
+ type: w("error"),
5553
+ errorText: g()
5554
5554
  }),
5555
5555
  R({
5556
- type: I("tool-input-start"),
5557
- toolCallId: m(),
5558
- toolName: m(),
5556
+ type: w("tool-input-start"),
5557
+ toolCallId: g(),
5558
+ toolName: g(),
5559
5559
  providerExecuted: J().optional(),
5560
5560
  providerMetadata: S.optional(),
5561
5561
  dynamic: J().optional(),
5562
- title: m().optional()
5562
+ title: g().optional()
5563
5563
  }),
5564
5564
  R({
5565
- type: I("tool-input-delta"),
5566
- toolCallId: m(),
5567
- inputTextDelta: m()
5565
+ type: w("tool-input-delta"),
5566
+ toolCallId: g(),
5567
+ inputTextDelta: g()
5568
5568
  }),
5569
5569
  R({
5570
- type: I("tool-input-available"),
5571
- toolCallId: m(),
5572
- toolName: m(),
5570
+ type: w("tool-input-available"),
5571
+ toolCallId: g(),
5572
+ toolName: g(),
5573
5573
  input: Q(),
5574
5574
  providerExecuted: J().optional(),
5575
5575
  providerMetadata: S.optional(),
5576
5576
  dynamic: J().optional(),
5577
- title: m().optional()
5577
+ title: g().optional()
5578
5578
  }),
5579
5579
  R({
5580
- type: I("tool-input-error"),
5581
- toolCallId: m(),
5582
- toolName: m(),
5580
+ type: w("tool-input-error"),
5581
+ toolCallId: g(),
5582
+ toolName: g(),
5583
5583
  input: Q(),
5584
5584
  providerExecuted: J().optional(),
5585
5585
  providerMetadata: S.optional(),
5586
5586
  dynamic: J().optional(),
5587
- errorText: m(),
5588
- title: m().optional()
5587
+ errorText: g(),
5588
+ title: g().optional()
5589
5589
  }),
5590
5590
  R({
5591
- type: I("tool-approval-request"),
5592
- approvalId: m(),
5593
- toolCallId: m()
5591
+ type: w("tool-approval-request"),
5592
+ approvalId: g(),
5593
+ toolCallId: g()
5594
5594
  }),
5595
5595
  R({
5596
- type: I("tool-output-available"),
5597
- toolCallId: m(),
5596
+ type: w("tool-output-available"),
5597
+ toolCallId: g(),
5598
5598
  output: Q(),
5599
5599
  providerExecuted: J().optional(),
5600
5600
  dynamic: J().optional(),
5601
5601
  preliminary: J().optional()
5602
5602
  }),
5603
5603
  R({
5604
- type: I("tool-output-error"),
5605
- toolCallId: m(),
5606
- errorText: m(),
5604
+ type: w("tool-output-error"),
5605
+ toolCallId: g(),
5606
+ errorText: g(),
5607
5607
  providerExecuted: J().optional(),
5608
5608
  dynamic: J().optional()
5609
5609
  }),
5610
5610
  R({
5611
- type: I("tool-output-denied"),
5612
- toolCallId: m()
5611
+ type: w("tool-output-denied"),
5612
+ toolCallId: g()
5613
5613
  }),
5614
5614
  R({
5615
- type: I("reasoning-start"),
5616
- id: m(),
5615
+ type: w("reasoning-start"),
5616
+ id: g(),
5617
5617
  providerMetadata: S.optional()
5618
5618
  }),
5619
5619
  R({
5620
- type: I("reasoning-delta"),
5621
- id: m(),
5622
- delta: m(),
5620
+ type: w("reasoning-delta"),
5621
+ id: g(),
5622
+ delta: g(),
5623
5623
  providerMetadata: S.optional()
5624
5624
  }),
5625
5625
  R({
5626
- type: I("reasoning-end"),
5627
- id: m(),
5626
+ type: w("reasoning-end"),
5627
+ id: g(),
5628
5628
  providerMetadata: S.optional()
5629
5629
  }),
5630
5630
  R({
5631
- type: I("source-url"),
5632
- sourceId: m(),
5633
- url: m(),
5634
- title: m().optional(),
5631
+ type: w("source-url"),
5632
+ sourceId: g(),
5633
+ url: g(),
5634
+ title: g().optional(),
5635
5635
  providerMetadata: S.optional()
5636
5636
  }),
5637
5637
  R({
5638
- type: I("source-document"),
5639
- sourceId: m(),
5640
- mediaType: m(),
5641
- title: m(),
5642
- filename: m().optional(),
5638
+ type: w("source-document"),
5639
+ sourceId: g(),
5640
+ mediaType: g(),
5641
+ title: g(),
5642
+ filename: g().optional(),
5643
5643
  providerMetadata: S.optional()
5644
5644
  }),
5645
5645
  R({
5646
- type: I("file"),
5647
- url: m(),
5648
- mediaType: m(),
5646
+ type: w("file"),
5647
+ url: g(),
5648
+ mediaType: g(),
5649
5649
  providerMetadata: S.optional()
5650
5650
  }),
5651
5651
  R({
@@ -5653,23 +5653,23 @@ var dl = Cc(
5653
5653
  (e) => typeof e == "string" && e.startsWith("data-"),
5654
5654
  { message: 'Type must start with "data-"' }
5655
5655
  ),
5656
- id: m().optional(),
5656
+ id: g().optional(),
5657
5657
  data: Q(),
5658
5658
  transient: J().optional()
5659
5659
  }),
5660
5660
  R({
5661
- type: I("start-step")
5661
+ type: w("start-step")
5662
5662
  }),
5663
5663
  R({
5664
- type: I("finish-step")
5664
+ type: w("finish-step")
5665
5665
  }),
5666
5666
  R({
5667
- type: I("start"),
5668
- messageId: m().optional(),
5667
+ type: w("start"),
5668
+ messageId: g().optional(),
5669
5669
  messageMetadata: Q().optional()
5670
5670
  }),
5671
5671
  R({
5672
- type: I("finish"),
5672
+ type: w("finish"),
5673
5673
  finishReason: kn([
5674
5674
  "stop",
5675
5675
  "length",
@@ -5681,32 +5681,32 @@ var dl = Cc(
5681
5681
  messageMetadata: Q().optional()
5682
5682
  }),
5683
5683
  R({
5684
- type: I("abort"),
5685
- reason: m().optional()
5684
+ type: w("abort"),
5685
+ reason: g().optional()
5686
5686
  }),
5687
5687
  R({
5688
- type: I("message-metadata"),
5688
+ type: w("message-metadata"),
5689
5689
  messageMetadata: Q()
5690
5690
  })
5691
5691
  ])
5692
5692
  )
5693
5693
  );
5694
- function pl(e) {
5694
+ function ll(e) {
5695
5695
  return e.type.startsWith("data-");
5696
5696
  }
5697
5697
  function lt(e) {
5698
5698
  return e.type.startsWith("tool-");
5699
5699
  }
5700
- function fl(e) {
5700
+ function dl(e) {
5701
5701
  return e.type === "dynamic-tool";
5702
5702
  }
5703
5703
  function dt(e) {
5704
- return lt(e) || fl(e);
5704
+ return lt(e) || dl(e);
5705
5705
  }
5706
5706
  function fr(e) {
5707
5707
  return e.type.split("-").slice(1).join("-");
5708
5708
  }
5709
- function hl({
5709
+ function pl({
5710
5710
  lastMessage: e,
5711
5711
  messageId: t
5712
5712
  }) {
@@ -5722,7 +5722,7 @@ function hl({
5722
5722
  partialToolCalls: {}
5723
5723
  };
5724
5724
  }
5725
- function ml({
5725
+ function fl({
5726
5726
  stream: e,
5727
5727
  messageMetadataSchema: t,
5728
5728
  dataPartSchemas: r,
@@ -5735,13 +5735,13 @@ function ml({
5735
5735
  new TransformStream({
5736
5736
  async transform(a, c) {
5737
5737
  await n(async ({ state: u, write: l }) => {
5738
- var d, _, h, y;
5739
- function g(f) {
5738
+ var d, m, h, b;
5739
+ function _(f) {
5740
5740
  const Z = u.message.parts.filter(dt).find(
5741
5741
  (z) => z.toolCallId === f
5742
5742
  );
5743
5743
  if (Z == null)
5744
- throw new de({
5744
+ throw new pe({
5745
5745
  chunkType: "tool-invocation",
5746
5746
  chunkId: f,
5747
5747
  message: `No tool invocation found for tool call ID "${f}".`
@@ -5767,7 +5767,7 @@ function ml({
5767
5767
  ...z.providerMetadata != null ? { callProviderMetadata: z.providerMetadata } : {}
5768
5768
  });
5769
5769
  }
5770
- function E(f) {
5770
+ function I(f) {
5771
5771
  var $, Z;
5772
5772
  const z = u.message.parts.find(
5773
5773
  (It) => It.type === "dynamic-tool" && It.toolCallId === f.toolCallId
@@ -5786,7 +5786,7 @@ function ml({
5786
5786
  ...N.providerMetadata != null ? { callProviderMetadata: N.providerMetadata } : {}
5787
5787
  });
5788
5788
  }
5789
- async function w(f) {
5789
+ async function k(f) {
5790
5790
  if (f != null) {
5791
5791
  const $ = u.message.metadata != null ? Fn(u.message.metadata, f) : f;
5792
5792
  t != null && await dr({
@@ -5809,7 +5809,7 @@ function ml({
5809
5809
  case "text-delta": {
5810
5810
  const f = u.activeTextParts[a.id];
5811
5811
  if (f == null)
5812
- throw new de({
5812
+ throw new pe({
5813
5813
  chunkType: "text-delta",
5814
5814
  chunkId: a.id,
5815
5815
  message: `Received text-delta for missing text part with ID "${a.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`
@@ -5820,12 +5820,12 @@ function ml({
5820
5820
  case "text-end": {
5821
5821
  const f = u.activeTextParts[a.id];
5822
5822
  if (f == null)
5823
- throw new de({
5823
+ throw new pe({
5824
5824
  chunkType: "text-end",
5825
5825
  chunkId: a.id,
5826
5826
  message: `Received text-end for missing text part with ID "${a.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`
5827
5827
  });
5828
- f.state = "done", f.providerMetadata = (_ = a.providerMetadata) != null ? _ : f.providerMetadata, delete u.activeTextParts[a.id], l();
5828
+ f.state = "done", f.providerMetadata = (m = a.providerMetadata) != null ? m : f.providerMetadata, delete u.activeTextParts[a.id], l();
5829
5829
  break;
5830
5830
  }
5831
5831
  case "reasoning-start": {
@@ -5841,7 +5841,7 @@ function ml({
5841
5841
  case "reasoning-delta": {
5842
5842
  const f = u.activeReasoningParts[a.id];
5843
5843
  if (f == null)
5844
- throw new de({
5844
+ throw new pe({
5845
5845
  chunkType: "reasoning-delta",
5846
5846
  chunkId: a.id,
5847
5847
  message: `Received reasoning-delta for missing reasoning part with ID "${a.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`
@@ -5852,12 +5852,12 @@ function ml({
5852
5852
  case "reasoning-end": {
5853
5853
  const f = u.activeReasoningParts[a.id];
5854
5854
  if (f == null)
5855
- throw new de({
5855
+ throw new pe({
5856
5856
  chunkType: "reasoning-end",
5857
5857
  chunkId: a.id,
5858
5858
  message: `Received reasoning-end for missing reasoning part with ID "${a.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`
5859
5859
  });
5860
- f.providerMetadata = (y = a.providerMetadata) != null ? y : f.providerMetadata, f.state = "done", delete u.activeReasoningParts[a.id], l();
5860
+ f.providerMetadata = (b = a.providerMetadata) != null ? b : f.providerMetadata, f.state = "done", delete u.activeReasoningParts[a.id], l();
5861
5861
  break;
5862
5862
  }
5863
5863
  case "file": {
@@ -5897,7 +5897,7 @@ function ml({
5897
5897
  index: f.length,
5898
5898
  dynamic: a.dynamic,
5899
5899
  title: a.title
5900
- }, a.dynamic ? E({
5900
+ }, a.dynamic ? I({
5901
5901
  toolCallId: a.toolCallId,
5902
5902
  toolName: a.toolName,
5903
5903
  state: "input-streaming",
@@ -5919,7 +5919,7 @@ function ml({
5919
5919
  case "tool-input-delta": {
5920
5920
  const f = u.partialToolCalls[a.toolCallId];
5921
5921
  if (f == null)
5922
- throw new de({
5922
+ throw new pe({
5923
5923
  chunkType: "tool-input-delta",
5924
5924
  chunkId: a.toolCallId,
5925
5925
  message: `Received tool-input-delta for missing tool call with ID "${a.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`
@@ -5928,7 +5928,7 @@ function ml({
5928
5928
  const { value: $ } = await Ne(
5929
5929
  f.text
5930
5930
  );
5931
- f.dynamic ? E({
5931
+ f.dynamic ? I({
5932
5932
  toolCallId: a.toolCallId,
5933
5933
  toolName: f.toolName,
5934
5934
  state: "input-streaming",
@@ -5944,7 +5944,7 @@ function ml({
5944
5944
  break;
5945
5945
  }
5946
5946
  case "tool-input-available": {
5947
- a.dynamic ? E({
5947
+ a.dynamic ? I({
5948
5948
  toolCallId: a.toolCallId,
5949
5949
  toolName: a.toolName,
5950
5950
  state: "input-available",
@@ -5966,7 +5966,7 @@ function ml({
5966
5966
  break;
5967
5967
  }
5968
5968
  case "tool-input-error": {
5969
- a.dynamic ? E({
5969
+ a.dynamic ? I({
5970
5970
  toolCallId: a.toolCallId,
5971
5971
  toolName: a.toolName,
5972
5972
  state: "output-error",
@@ -5987,18 +5987,18 @@ function ml({
5987
5987
  break;
5988
5988
  }
5989
5989
  case "tool-approval-request": {
5990
- const f = g(a.toolCallId);
5990
+ const f = _(a.toolCallId);
5991
5991
  f.state = "approval-requested", f.approval = { id: a.approvalId }, l();
5992
5992
  break;
5993
5993
  }
5994
5994
  case "tool-output-denied": {
5995
- const f = g(a.toolCallId);
5995
+ const f = _(a.toolCallId);
5996
5996
  f.state = "output-denied", l();
5997
5997
  break;
5998
5998
  }
5999
5999
  case "tool-output-available": {
6000
- const f = g(a.toolCallId);
6001
- f.type === "dynamic-tool" ? E({
6000
+ const f = _(a.toolCallId);
6001
+ f.type === "dynamic-tool" ? I({
6002
6002
  toolCallId: a.toolCallId,
6003
6003
  toolName: f.toolName,
6004
6004
  state: "output-available",
@@ -6020,8 +6020,8 @@ function ml({
6020
6020
  break;
6021
6021
  }
6022
6022
  case "tool-output-error": {
6023
- const f = g(a.toolCallId);
6024
- f.type === "dynamic-tool" ? E({
6023
+ const f = _(a.toolCallId);
6024
+ f.type === "dynamic-tool" ? I({
6025
6025
  toolCallId: a.toolCallId,
6026
6026
  toolName: f.toolName,
6027
6027
  state: "output-error",
@@ -6050,15 +6050,15 @@ function ml({
6050
6050
  break;
6051
6051
  }
6052
6052
  case "start": {
6053
- a.messageId != null && (u.message.id = a.messageId), await w(a.messageMetadata), (a.messageId != null || a.messageMetadata != null) && l();
6053
+ a.messageId != null && (u.message.id = a.messageId), await k(a.messageMetadata), (a.messageId != null || a.messageMetadata != null) && l();
6054
6054
  break;
6055
6055
  }
6056
6056
  case "finish": {
6057
- a.finishReason != null && (u.finishReason = a.finishReason), await w(a.messageMetadata), a.messageMetadata != null && l();
6057
+ a.finishReason != null && (u.finishReason = a.finishReason), await k(a.messageMetadata), a.messageMetadata != null && l();
6058
6058
  break;
6059
6059
  }
6060
6060
  case "message-metadata": {
6061
- await w(a.messageMetadata), a.messageMetadata != null && l();
6061
+ await k(a.messageMetadata), a.messageMetadata != null && l();
6062
6062
  break;
6063
6063
  }
6064
6064
  case "error": {
@@ -6066,7 +6066,7 @@ function ml({
6066
6066
  break;
6067
6067
  }
6068
6068
  default:
6069
- if (pl(a)) {
6069
+ if (ll(a)) {
6070
6070
  (r == null ? void 0 : r[a.type]) != null && await dr({
6071
6071
  value: a.data,
6072
6072
  schema: r[a.type]
@@ -6088,7 +6088,7 @@ function ml({
6088
6088
  })
6089
6089
  );
6090
6090
  }
6091
- async function gl({
6091
+ async function hl({
6092
6092
  stream: e,
6093
6093
  onError: t
6094
6094
  }) {
@@ -6110,7 +6110,7 @@ Te({
6110
6110
  size: 24
6111
6111
  });
6112
6112
  Te({ prefix: "aiobj", size: 24 });
6113
- var vl = class {
6113
+ var ml = class {
6114
6114
  constructor() {
6115
6115
  this.queue = [], this.isProcessing = !1;
6116
6116
  }
@@ -6134,7 +6134,7 @@ var vl = class {
6134
6134
  }
6135
6135
  };
6136
6136
  Te({ prefix: "aiobj", size: 24 });
6137
- async function _l(e) {
6137
+ async function gl(e) {
6138
6138
  if (e == null)
6139
6139
  return [];
6140
6140
  if (!globalThis.FileList || !(e instanceof globalThis.FileList))
@@ -6157,7 +6157,7 @@ async function _l(e) {
6157
6157
  })
6158
6158
  );
6159
6159
  }
6160
- var yl = class {
6160
+ var vl = class {
6161
6161
  constructor({
6162
6162
  api: e = "/api/chat",
6163
6163
  credentials: t,
@@ -6187,14 +6187,14 @@ var yl = class {
6187
6187
  requestMetadata: t.metadata,
6188
6188
  trigger: t.trigger,
6189
6189
  messageId: t.messageId
6190
- })), _ = (n = d == null ? void 0 : d.api) != null ? n : this.api, h = (d == null ? void 0 : d.headers) !== void 0 ? ie(d.headers) : l, y = (d == null ? void 0 : d.body) !== void 0 ? d.body : {
6190
+ })), m = (n = d == null ? void 0 : d.api) != null ? n : this.api, h = (d == null ? void 0 : d.headers) !== void 0 ? ie(d.headers) : l, b = (d == null ? void 0 : d.body) !== void 0 ? d.body : {
6191
6191
  ...a,
6192
6192
  ...t.body,
6193
6193
  id: t.chatId,
6194
6194
  messages: t.messages,
6195
6195
  trigger: t.trigger,
6196
6196
  messageId: t.messageId
6197
- }, g = (o = d == null ? void 0 : d.credentials) != null ? o : u, E = await ((s = this.fetch) != null ? s : globalThis.fetch)(_, {
6197
+ }, _ = (o = d == null ? void 0 : d.credentials) != null ? o : u, I = await ((s = this.fetch) != null ? s : globalThis.fetch)(m, {
6198
6198
  method: "POST",
6199
6199
  headers: ir(
6200
6200
  {
@@ -6204,17 +6204,17 @@ var yl = class {
6204
6204
  `ai-sdk/${pr}`,
6205
6205
  ar()
6206
6206
  ),
6207
- body: JSON.stringify(y),
6208
- credentials: g,
6207
+ body: JSON.stringify(b),
6208
+ credentials: _,
6209
6209
  signal: e
6210
6210
  });
6211
- if (!E.ok)
6211
+ if (!I.ok)
6212
6212
  throw new Error(
6213
- (i = await E.text()) != null ? i : "Failed to fetch the chat response."
6213
+ (i = await I.text()) != null ? i : "Failed to fetch the chat response."
6214
6214
  );
6215
- if (!E.body)
6215
+ if (!I.body)
6216
6216
  throw new Error("The response body is empty.");
6217
- return this.processResponseStream(E.body);
6217
+ return this.processResponseStream(I.body);
6218
6218
  }
6219
6219
  async reconnectToStream(e) {
6220
6220
  var t, r, n, o, s;
@@ -6228,33 +6228,33 @@ var yl = class {
6228
6228
  headers: u,
6229
6229
  credentials: c,
6230
6230
  requestMetadata: e.metadata
6231
- })), d = (r = l == null ? void 0 : l.api) != null ? r : `${this.api}/${e.chatId}/stream`, _ = (l == null ? void 0 : l.headers) !== void 0 ? ie(l.headers) : u, h = (n = l == null ? void 0 : l.credentials) != null ? n : c, g = await ((o = this.fetch) != null ? o : globalThis.fetch)(d, {
6231
+ })), d = (r = l == null ? void 0 : l.api) != null ? r : `${this.api}/${e.chatId}/stream`, m = (l == null ? void 0 : l.headers) !== void 0 ? ie(l.headers) : u, h = (n = l == null ? void 0 : l.credentials) != null ? n : c, _ = await ((o = this.fetch) != null ? o : globalThis.fetch)(d, {
6232
6232
  method: "GET",
6233
6233
  headers: ir(
6234
- _,
6234
+ m,
6235
6235
  `ai-sdk/${pr}`,
6236
6236
  ar()
6237
6237
  ),
6238
6238
  credentials: h
6239
6239
  });
6240
- if (g.status === 204)
6240
+ if (_.status === 204)
6241
6241
  return null;
6242
- if (!g.ok)
6242
+ if (!_.ok)
6243
6243
  throw new Error(
6244
- (s = await g.text()) != null ? s : "Failed to fetch the chat response."
6244
+ (s = await _.text()) != null ? s : "Failed to fetch the chat response."
6245
6245
  );
6246
- if (!g.body)
6246
+ if (!_.body)
6247
6247
  throw new Error("The response body is empty.");
6248
- return this.processResponseStream(g.body);
6248
+ return this.processResponseStream(_.body);
6249
6249
  }
6250
- }, Vn = class extends yl {
6250
+ }, Vn = class extends vl {
6251
6251
  constructor(e = {}) {
6252
6252
  super(e);
6253
6253
  }
6254
6254
  processResponseStream(e) {
6255
- return Fc({
6255
+ return Lc({
6256
6256
  stream: e,
6257
- schema: dl
6257
+ schema: cl
6258
6258
  }).pipeThrough(
6259
6259
  new TransformStream({
6260
6260
  async transform(t, r) {
@@ -6265,9 +6265,9 @@ var yl = class {
6265
6265
  })
6266
6266
  );
6267
6267
  }
6268
- }, bl = class {
6268
+ }, _l = class {
6269
6269
  constructor({
6270
- generateId: e = Wu,
6270
+ generateId: e = Vu,
6271
6271
  id: t = e(),
6272
6272
  transport: r = new Vn(),
6273
6273
  messageMetadataSchema: n,
@@ -6279,55 +6279,55 @@ var yl = class {
6279
6279
  onData: u,
6280
6280
  sendAutomaticallyWhen: l
6281
6281
  }) {
6282
- this.activeResponse = void 0, this.jobExecutor = new vl(), this.sendMessage = async (d, _) => {
6283
- var h, y, g, v;
6282
+ this.activeResponse = void 0, this.jobExecutor = new ml(), this.sendMessage = async (d, m) => {
6283
+ var h, b, _, v;
6284
6284
  if (d == null) {
6285
6285
  await this.makeRequest({
6286
6286
  trigger: "submit-message",
6287
6287
  messageId: (h = this.lastMessage) == null ? void 0 : h.id,
6288
- ..._
6288
+ ...m
6289
6289
  });
6290
6290
  return;
6291
6291
  }
6292
- let E;
6293
- if ("text" in d || "files" in d ? E = {
6292
+ let I;
6293
+ if ("text" in d || "files" in d ? I = {
6294
6294
  parts: [
6295
- ...Array.isArray(d.files) ? d.files : await _l(d.files),
6295
+ ...Array.isArray(d.files) ? d.files : await gl(d.files),
6296
6296
  ..."text" in d && d.text != null ? [{ type: "text", text: d.text }] : []
6297
6297
  ]
6298
- } : E = d, d.messageId != null) {
6299
- const w = this.state.messages.findIndex(
6298
+ } : I = d, d.messageId != null) {
6299
+ const k = this.state.messages.findIndex(
6300
6300
  (f) => f.id === d.messageId
6301
6301
  );
6302
- if (w === -1)
6302
+ if (k === -1)
6303
6303
  throw new Error(`message with id ${d.messageId} not found`);
6304
- if (this.state.messages[w].role !== "user")
6304
+ if (this.state.messages[k].role !== "user")
6305
6305
  throw new Error(
6306
6306
  `message with id ${d.messageId} is not a user message`
6307
6307
  );
6308
- this.state.messages = this.state.messages.slice(0, w + 1), this.state.replaceMessage(w, {
6309
- ...E,
6308
+ this.state.messages = this.state.messages.slice(0, k + 1), this.state.replaceMessage(k, {
6309
+ ...I,
6310
6310
  id: d.messageId,
6311
- role: (y = E.role) != null ? y : "user",
6311
+ role: (b = I.role) != null ? b : "user",
6312
6312
  metadata: d.metadata
6313
6313
  });
6314
6314
  } else
6315
6315
  this.state.pushMessage({
6316
- ...E,
6317
- id: (g = E.id) != null ? g : this.generateId(),
6318
- role: (v = E.role) != null ? v : "user",
6316
+ ...I,
6317
+ id: (_ = I.id) != null ? _ : this.generateId(),
6318
+ role: (v = I.role) != null ? v : "user",
6319
6319
  metadata: d.metadata
6320
6320
  });
6321
6321
  await this.makeRequest({
6322
6322
  trigger: "submit-message",
6323
6323
  messageId: d.messageId,
6324
- ..._
6324
+ ...m
6325
6325
  });
6326
6326
  }, this.regenerate = async ({
6327
6327
  messageId: d,
6328
- ..._
6328
+ ...m
6329
6329
  } = {}) => {
6330
- const h = d == null ? this.state.messages.length - 1 : this.state.messages.findIndex((y) => y.id === d);
6330
+ const h = d == null ? this.state.messages.length - 1 : this.state.messages.findIndex((b) => b.id === d);
6331
6331
  if (h === -1)
6332
6332
  throw new Error(`message ${d} not found`);
6333
6333
  this.state.messages = this.state.messages.slice(
@@ -6337,7 +6337,7 @@ var yl = class {
6337
6337
  ), await this.makeRequest({
6338
6338
  trigger: "regenerate-message",
6339
6339
  messageId: d,
6340
- ..._
6340
+ ...m
6341
6341
  });
6342
6342
  }, this.resumeStream = async (d = {}) => {
6343
6343
  await this.makeRequest({ trigger: "resume-stream", ...d });
@@ -6345,37 +6345,37 @@ var yl = class {
6345
6345
  this.status === "error" && (this.state.error = void 0, this.setStatus({ status: "ready" }));
6346
6346
  }, this.addToolApprovalResponse = async ({
6347
6347
  id: d,
6348
- approved: _,
6348
+ approved: m,
6349
6349
  reason: h
6350
6350
  }) => this.jobExecutor.run(async () => {
6351
- var y, g;
6352
- const v = this.state.messages, E = v[v.length - 1], w = (f) => dt(f) && f.state === "approval-requested" && f.approval.id === d ? {
6351
+ var b, _;
6352
+ const v = this.state.messages, I = v[v.length - 1], k = (f) => dt(f) && f.state === "approval-requested" && f.approval.id === d ? {
6353
6353
  ...f,
6354
6354
  state: "approval-responded",
6355
- approval: { id: d, approved: _, reason: h }
6355
+ approval: { id: d, approved: m, reason: h }
6356
6356
  } : f;
6357
6357
  this.state.replaceMessage(v.length - 1, {
6358
- ...E,
6359
- parts: E.parts.map(w)
6360
- }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(w)), this.status !== "streaming" && this.status !== "submitted" && ((y = this.sendAutomaticallyWhen) != null && y.call(this, { messages: this.state.messages })) && this.makeRequest({
6358
+ ...I,
6359
+ parts: I.parts.map(k)
6360
+ }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(k)), this.status !== "streaming" && this.status !== "submitted" && ((b = this.sendAutomaticallyWhen) != null && b.call(this, { messages: this.state.messages })) && this.makeRequest({
6361
6361
  trigger: "submit-message",
6362
- messageId: (g = this.lastMessage) == null ? void 0 : g.id
6362
+ messageId: (_ = this.lastMessage) == null ? void 0 : _.id
6363
6363
  });
6364
6364
  }), this.addToolOutput = async ({
6365
6365
  state: d = "output-available",
6366
- tool: _,
6366
+ tool: m,
6367
6367
  toolCallId: h,
6368
- output: y,
6369
- errorText: g
6368
+ output: b,
6369
+ errorText: _
6370
6370
  }) => this.jobExecutor.run(async () => {
6371
- var v, E;
6372
- const w = this.state.messages, f = w[w.length - 1], $ = (Z) => dt(Z) && Z.toolCallId === h ? { ...Z, state: d, output: y, errorText: g } : Z;
6373
- this.state.replaceMessage(w.length - 1, {
6371
+ var v, I;
6372
+ const k = this.state.messages, f = k[k.length - 1], $ = (Z) => dt(Z) && Z.toolCallId === h ? { ...Z, state: d, output: b, errorText: _ } : Z;
6373
+ this.state.replaceMessage(k.length - 1, {
6374
6374
  ...f,
6375
6375
  parts: f.parts.map($)
6376
6376
  }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map($)), this.status !== "streaming" && this.status !== "submitted" && ((v = this.sendAutomaticallyWhen) != null && v.call(this, { messages: this.state.messages })) && this.makeRequest({
6377
6377
  trigger: "submit-message",
6378
- messageId: (E = this.lastMessage) == null ? void 0 : E.id
6378
+ messageId: (I = this.lastMessage) == null ? void 0 : I.id
6379
6379
  });
6380
6380
  }), this.addToolResult = this.addToolOutput, this.stop = async () => {
6381
6381
  var d;
@@ -6421,10 +6421,10 @@ var yl = class {
6421
6421
  var s, i, a, c;
6422
6422
  this.setStatus({ status: "submitted", error: void 0 });
6423
6423
  const u = this.lastMessage;
6424
- let l = !1, d = !1, _ = !1;
6424
+ let l = !1, d = !1, m = !1;
6425
6425
  try {
6426
6426
  const h = {
6427
- state: hl({
6427
+ state: pl({
6428
6428
  lastMessage: this.state.snapshot(u),
6429
6429
  messageId: this.generateId()
6430
6430
  }),
@@ -6433,7 +6433,7 @@ var yl = class {
6433
6433
  h.abortController.signal.addEventListener("abort", () => {
6434
6434
  l = !0;
6435
6435
  }), this.activeResponse = h;
6436
- let y;
6436
+ let b;
6437
6437
  if (e === "resume-stream") {
6438
6438
  const v = await this.transport.reconnectToStream({
6439
6439
  chatId: this.id,
@@ -6445,9 +6445,9 @@ var yl = class {
6445
6445
  this.setStatus({ status: "ready" });
6446
6446
  return;
6447
6447
  }
6448
- y = v;
6448
+ b = v;
6449
6449
  } else
6450
- y = await this.transport.sendMessages({
6450
+ b = await this.transport.sendMessages({
6451
6451
  chatId: this.id,
6452
6452
  messages: this.state.messages,
6453
6453
  abortSignal: h.abortController.signal,
@@ -6457,14 +6457,14 @@ var yl = class {
6457
6457
  trigger: e,
6458
6458
  messageId: o
6459
6459
  });
6460
- const g = (v) => (
6460
+ const _ = (v) => (
6461
6461
  // serialize the job execution to avoid race conditions:
6462
6462
  this.jobExecutor.run(
6463
6463
  () => v({
6464
6464
  state: h.state,
6465
6465
  write: () => {
6466
- var E;
6467
- this.setStatus({ status: "streaming" }), h.state.message.id === ((E = this.lastMessage) == null ? void 0 : E.id) ? this.state.replaceMessage(
6466
+ var I;
6467
+ this.setStatus({ status: "streaming" }), h.state.message.id === ((I = this.lastMessage) == null ? void 0 : I.id) ? this.state.replaceMessage(
6468
6468
  this.state.messages.length - 1,
6469
6469
  h.state.message
6470
6470
  ) : this.state.pushMessage(h.state.message);
@@ -6472,14 +6472,14 @@ var yl = class {
6472
6472
  })
6473
6473
  )
6474
6474
  );
6475
- await gl({
6476
- stream: ml({
6477
- stream: y,
6475
+ await hl({
6476
+ stream: fl({
6477
+ stream: b,
6478
6478
  onToolCall: this.onToolCall,
6479
6479
  onData: this.onData,
6480
6480
  messageMetadataSchema: this.messageMetadataSchema,
6481
6481
  dataPartSchemas: this.dataPartSchemas,
6482
- runUpdateMessageJob: g,
6482
+ runUpdateMessageJob: _,
6483
6483
  onError: (v) => {
6484
6484
  throw v;
6485
6485
  }
@@ -6491,7 +6491,7 @@ var yl = class {
6491
6491
  } catch (h) {
6492
6492
  if (l || h.name === "AbortError")
6493
6493
  return l = !0, this.setStatus({ status: "ready" }), null;
6494
- _ = !0, h instanceof TypeError && (h.message.toLowerCase().includes("fetch") || h.message.toLowerCase().includes("network")) && (d = !0), this.onError && h instanceof Error && this.onError(h), this.setStatus({ status: "error", error: h });
6494
+ m = !0, h instanceof TypeError && (h.message.toLowerCase().includes("fetch") || h.message.toLowerCase().includes("network")) && (d = !0), this.onError && h instanceof Error && this.onError(h), this.setStatus({ status: "error", error: h });
6495
6495
  } finally {
6496
6496
  try {
6497
6497
  (i = this.onFinish) == null || i.call(this, {
@@ -6499,7 +6499,7 @@ var yl = class {
6499
6499
  messages: this.state.messages,
6500
6500
  isAbort: l,
6501
6501
  isDisconnect: d,
6502
- isError: _,
6502
+ isError: m,
6503
6503
  finishReason: (s = this.activeResponse) == null ? void 0 : s.state.finishReason
6504
6504
  });
6505
6505
  } catch (h) {
@@ -6507,7 +6507,7 @@ var yl = class {
6507
6507
  }
6508
6508
  this.activeResponse = void 0;
6509
6509
  }
6510
- (a = this.sendAutomaticallyWhen) != null && a.call(this, { messages: this.state.messages }) && !_ && await this.makeRequest({
6510
+ (a = this.sendAutomaticallyWhen) != null && a.call(this, { messages: this.state.messages }) && !m && await this.makeRequest({
6511
6511
  trigger: "submit-message",
6512
6512
  messageId: (c = this.lastMessage) == null ? void 0 : c.id,
6513
6513
  metadata: t,
@@ -6529,15 +6529,15 @@ globalThis && globalThis.__awaiter;
6529
6529
  globalThis && globalThis.__generator;
6530
6530
  globalThis && globalThis.__read;
6531
6531
  globalThis && globalThis.__spreadArray;
6532
- var wl = class {
6532
+ var yl = class {
6533
6533
  constructor(e) {
6534
- this.statusRef = he("ready"), this.errorRef = he(void 0), this.pushMessage = (t) => {
6534
+ this.statusRef = ue("ready"), this.errorRef = ue(void 0), this.pushMessage = (t) => {
6535
6535
  this.messagesRef.value = [...this.messagesRef.value, t];
6536
6536
  }, this.popMessage = () => {
6537
6537
  this.messagesRef.value = this.messagesRef.value.slice(0, -1);
6538
6538
  }, this.replaceMessage = (t, r) => {
6539
6539
  this.messagesRef.value[t] = { ...r };
6540
- }, this.snapshot = (t) => t, this.messagesRef = he(e ?? []);
6540
+ }, this.snapshot = (t) => t, this.messagesRef = ue(e ?? []);
6541
6541
  }
6542
6542
  get messages() {
6543
6543
  return this.messagesRef.value;
@@ -6557,11 +6557,11 @@ var wl = class {
6557
6557
  set error(e) {
6558
6558
  this.errorRef.value = e;
6559
6559
  }
6560
- }, Il = class extends bl {
6560
+ }, bl = class extends _l {
6561
6561
  constructor({ messages: e, ...t }) {
6562
6562
  super({
6563
6563
  ...t,
6564
- state: new wl(e)
6564
+ state: new yl(e)
6565
6565
  });
6566
6566
  }
6567
6567
  };
@@ -6571,13 +6571,13 @@ var wl = class {
6571
6571
  * This source code is licensed under the ISC license.
6572
6572
  * See the LICENSE file in the root directory of this source tree.
6573
6573
  */
6574
- const mr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), El = (e) => e.replace(
6574
+ const mr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), wl = (e) => e.replace(
6575
6575
  /^([A-Z])|[\s-_]+(\w)/g,
6576
6576
  (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
6577
- ), kl = (e) => {
6578
- const t = El(e);
6577
+ ), Il = (e) => {
6578
+ const t = wl(e);
6579
6579
  return t.charAt(0).toUpperCase() + t.slice(1);
6580
- }, zl = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), gr = (e) => e === "";
6580
+ }, El = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), gr = (e) => e === "";
6581
6581
  /**
6582
6582
  * @license lucide-vue-next v0.562.0 - ISC
6583
6583
  *
@@ -6601,7 +6601,7 @@ var Ie = {
6601
6601
  * This source code is licensed under the ISC license.
6602
6602
  * See the LICENSE file in the root directory of this source tree.
6603
6603
  */
6604
- const Sl = ({
6604
+ const kl = ({
6605
6605
  name: e,
6606
6606
  iconNode: t,
6607
6607
  absoluteStrokeWidth: r,
@@ -6620,10 +6620,10 @@ const Sl = ({
6620
6620
  height: i,
6621
6621
  stroke: a,
6622
6622
  "stroke-width": gr(r) || gr(n) || r === !0 || n === !0 ? Number(o || s || Ie["stroke-width"]) * 24 / Number(i) : o || s || Ie["stroke-width"],
6623
- class: zl(
6623
+ class: El(
6624
6624
  "lucide",
6625
6625
  c.class,
6626
- ...e ? [`lucide-${mr(kl(e))}-icon`, `lucide-${mr(e)}`] : ["lucide-icon"]
6626
+ ...e ? [`lucide-${mr(Il(e))}-icon`, `lucide-${mr(e)}`] : ["lucide-icon"]
6627
6627
  )
6628
6628
  },
6629
6629
  [...t.map((l) => rt(...l)), ...u.default ? [u.default()] : []]
@@ -6634,8 +6634,8 @@ const Sl = ({
6634
6634
  * This source code is licensed under the ISC license.
6635
6635
  * See the LICENSE file in the root directory of this source tree.
6636
6636
  */
6637
- const He = (e, t) => (r, { slots: n, attrs: o }) => rt(
6638
- Sl,
6637
+ const Ge = (e, t) => (r, { slots: n, attrs: o }) => rt(
6638
+ kl,
6639
6639
  {
6640
6640
  ...o,
6641
6641
  ...r,
@@ -6650,7 +6650,7 @@ const He = (e, t) => (r, { slots: n, attrs: o }) => rt(
6650
6650
  * This source code is licensed under the ISC license.
6651
6651
  * See the LICENSE file in the root directory of this source tree.
6652
6652
  */
6653
- const Ol = He("arrow-right", [
6653
+ const zl = Ge("arrow-right", [
6654
6654
  ["path", { d: "M5 12h14", key: "1ays0h" }],
6655
6655
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
6656
6656
  ]);
@@ -6660,7 +6660,7 @@ const Ol = He("arrow-right", [
6660
6660
  * This source code is licensed under the ISC license.
6661
6661
  * See the LICENSE file in the root directory of this source tree.
6662
6662
  */
6663
- const Zl = He("chevron-down", [
6663
+ const Sl = Ge("chevron-down", [
6664
6664
  ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
6665
6665
  ]);
6666
6666
  /**
@@ -6669,7 +6669,7 @@ const Zl = He("chevron-down", [
6669
6669
  * This source code is licensed under the ISC license.
6670
6670
  * See the LICENSE file in the root directory of this source tree.
6671
6671
  */
6672
- const $l = He("message-circle", [
6672
+ const Ol = Ge("message-circle", [
6673
6673
  [
6674
6674
  "path",
6675
6675
  {
@@ -6684,24 +6684,24 @@ const $l = He("message-circle", [
6684
6684
  * This source code is licensed under the ISC license.
6685
6685
  * See the LICENSE file in the root directory of this source tree.
6686
6686
  */
6687
- const Tl = He("x", [
6687
+ const Zl = Ge("x", [
6688
6688
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
6689
6689
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
6690
- ]), Nl = { class: "z-[1000] w-fit flex flex-col items-end gap-y-5 relative" }, Pl = { class: "flex items-center justify-between" }, Al = {
6690
+ ]), $l = { class: "z-[1000] w-fit flex flex-col items-end relative" }, Tl = { class: "flex items-center justify-between" }, Nl = {
6691
6691
  key: 0,
6692
6692
  class: "h-full flex flex-col justify-center text-xl title-hello"
6693
- }, Rl = { class: "gradient-text text-5xl leading-[80px]" }, xl = {
6693
+ }, Pl = { class: "gradient-text text-5xl leading-[80px]" }, Al = {
6694
6694
  key: 0,
6695
6695
  class: "flex justify-end"
6696
- }, jl = { class: "bg-[#bedeff] px-3 py-2.5 rounded-lg max-w-[90%] overflow-wrap-anywhere" }, Cl = { key: 0 }, Ml = {
6696
+ }, Rl = { class: "bg-[#bedeff] px-3 py-2.5 rounded-lg max-w-[90%] overflow-wrap-anywhere" }, xl = { key: 0 }, jl = {
6697
6697
  key: 1,
6698
6698
  class: "flex justify-start"
6699
- }, Dl = { class: "px-3 py-2.5 rounded-lg whitespace-pre-wrap overflow-wrap-anywhere" }, Ul = { key: 0 }, Ll = {
6699
+ }, Cl = { class: "px-3 py-2.5 rounded-lg whitespace-pre-wrap overflow-wrap-anywhere" }, Ml = { key: 0 }, Dl = {
6700
6700
  key: 1,
6701
- src: Kn,
6701
+ src: Xn,
6702
6702
  alt: "",
6703
6703
  class: "w-16"
6704
- }, Jl = ["disabled"], Fl = { class: "chat-button" }, Vl = /* @__PURE__ */ Bn({
6704
+ }, Ul = ["disabled"], Ll = { class: "mt-5" }, Fl = /* @__PURE__ */ Bn({
6705
6705
  __name: "ChatbotComponent",
6706
6706
  props: {
6707
6707
  clientId: { type: String, default: "" },
@@ -6711,10 +6711,7 @@ const Tl = He("x", [
6711
6711
  },
6712
6712
  emits: ["update:modelValue"],
6713
6713
  setup(e, { emit: t }) {
6714
- const r = e, n = t, o = he(""), s = he(null), i = he(!1), a = Wn({
6715
- get: () => r.modelValue,
6716
- set: (h) => (console.log(h, "vvvvvvv"), n("update:modelValue", h))
6717
- }), c = new Il({
6714
+ const r = e, n = ue(""), o = ue(!1), s = ue(null), i = ue(!1), a = new bl({
6718
6715
  transport: new Vn({
6719
6716
  api: "https://ai-chat-backend.dev02.dtsmart.dev/api/chat",
6720
6717
  body: {
@@ -6722,118 +6719,116 @@ const Tl = He("x", [
6722
6719
  mcp_token: r.token
6723
6720
  }
6724
6721
  })
6725
- }), u = async (h) => {
6722
+ }), c = async (d) => {
6726
6723
  try {
6727
- if (!o.value.trim())
6724
+ if (!n.value.trim())
6728
6725
  return;
6729
- const y = o.value.trim();
6730
- o.value = "", i.value = !0, h.preventDefault(), await c.sendMessage({ text: y });
6731
- } catch (y) {
6732
- console.error(y);
6726
+ const m = n.value.trim();
6727
+ n.value = "", i.value = !0, d.preventDefault(), await a.sendMessage({ text: m });
6728
+ } catch (m) {
6729
+ console.error(m);
6733
6730
  } finally {
6734
6731
  i.value = !1;
6735
6732
  }
6733
+ }, u = () => {
6734
+ console.log("handleOpenToggle nha"), o.value = !o.value, console.log(o.value, "visible aaa");
6736
6735
  }, l = () => {
6737
- console.log("handleOpenToggle nha"), a.value = !0, console.log(a.value, "visible aaa");
6738
- }, d = () => {
6739
- console.log("handleCloseToggle nha"), a.value = !1, console.log(a.value, "visible bbb");
6740
- }, _ = () => {
6741
- a.value = !1, c.messages = [];
6736
+ o.value = !1, a.messages = [];
6742
6737
  };
6743
- return Yn(
6744
- () => c.messages,
6738
+ return Wn(
6739
+ () => a.messages,
6745
6740
  async () => {
6746
- var h;
6747
- await qn(), (h = s.value) == null || h.scrollTo({
6741
+ var d;
6742
+ await Yn(), (d = s.value) == null || d.scrollTo({
6748
6743
  top: s.value.scrollHeight,
6749
6744
  behavior: "smooth"
6750
6745
  });
6751
6746
  },
6752
6747
  { deep: !0 }
6753
- ), (h, y) => {
6754
- var g;
6748
+ ), (d, m) => {
6749
+ var h;
6755
6750
  return B(), q(Pe, null, [
6756
- a.value ? (B(), q("div", {
6751
+ o.value ? (B(), q("div", {
6757
6752
  key: 0,
6758
6753
  class: "bg-[#ffffff00] absolute w-full h-full",
6759
- onClick: y[0] || (y[0] = (v) => a.value = !1)
6754
+ onClick: m[0] || (m[0] = (b) => o.value = !1)
6760
6755
  })) : we("", !0),
6761
- D("div", Nl, [
6762
- Gn(Ae(a.value + "aaa") + " ", 1),
6756
+ D("div", $l, [
6763
6757
  D("div", {
6764
- class: Hn(["ai-card chat-popup transition-all duration-7 gap-y-5", { "opacity-0": !a.value, "opacity-100": a.value }])
6758
+ class: qn(["ai-card chat-popup transition-all duration-7", { "opacity-0": !o.value, "opacity-100": o.value }])
6765
6759
  }, [
6766
- D("div", Pl, [
6767
- y[2] || (y[2] = D("p", { class: "ai-hello" }, "Hi, I’m Boko AI", -1)),
6760
+ D("div", Tl, [
6761
+ m[2] || (m[2] = D("p", { class: "ai-hello" }, "Hi, I’m Boko AI", -1)),
6768
6762
  D("button", {
6769
6763
  class: "ai-close",
6770
- onClick: _
6764
+ onClick: l
6771
6765
  }, [
6772
- Et(le(Tl))
6766
+ Et(de(Zl))
6773
6767
  ])
6774
6768
  ]),
6775
6769
  D("div", {
6776
6770
  ref_key: "scrollRef",
6777
6771
  ref: s,
6778
- class: "grow h-[440px] overflow-y-auto"
6772
+ class: "chat-popup-message"
6779
6773
  }, [
6780
- le(c).messages.length === 0 ? (B(), q("div", Al, [
6774
+ de(a).messages.length === 0 ? (B(), q("div", Nl, [
6781
6775
  D("div", null, [
6782
- D("p", Rl, " Hello " + Ae(e.clientId), 1),
6783
- y[3] || (y[3] = D("p", { class: "text-5xl text-[#2a2f3c] leading-[80px]" }, " How Can I Help You Today ? ", -1))
6776
+ D("p", Pl, " Hello " + He(e.clientId), 1),
6777
+ m[3] || (m[3] = D("p", { class: "text-5xl text-[#2a2f3c] leading-[80px]" }, " How Can I Help You Today ? ", -1))
6784
6778
  ]),
6785
- y[4] || (y[4] = D("p", { class: "text-base text-[#545e7f]" }, " I’m Boko, your friendly assistant. ", -1)),
6786
- y[5] || (y[5] = D("p", { class: "text-base text-[#545e7f]" }, " Here to help — anytime you’re ready! ", -1))
6779
+ m[4] || (m[4] = D("p", { class: "text-base text-[#545e7f]" }, " I’m Boko, your friendly assistant. ", -1)),
6780
+ m[5] || (m[5] = D("p", { class: "text-base text-[#545e7f]" }, " Here to help — anytime you’re ready! ", -1))
6787
6781
  ])) : we("", !0),
6788
- (B(!0), q(Pe, null, kt(le(c).messages, (v, E) => (B(), q("div", {
6789
- key: v.id ?? E,
6782
+ (B(!0), q(Pe, null, kt(de(a).messages, (b, _) => (B(), q("div", {
6783
+ key: b.id ?? _,
6790
6784
  class: "mb-3"
6791
6785
  }, [
6792
- (B(!0), q(Pe, null, kt(v == null ? void 0 : v.parts, (w, f) => (B(), q(Pe, {
6793
- key: `${v.id}-${w.type}-${f}`
6786
+ (B(!0), q(Pe, null, kt(b == null ? void 0 : b.parts, (v, I) => (B(), q(Pe, {
6787
+ key: `${b.id}-${v.type}-${I}`
6794
6788
  }, [
6795
- v.role === "user" ? (B(), q("div", xl, [
6796
- D("div", jl, [
6797
- (w == null ? void 0 : w.type) === "text" ? (B(), q("div", Cl, Ae(w == null ? void 0 : w.text), 1)) : we("", !0)
6789
+ b.role === "user" ? (B(), q("div", Al, [
6790
+ D("div", Rl, [
6791
+ (v == null ? void 0 : v.type) === "text" ? (B(), q("div", xl, He(v == null ? void 0 : v.text), 1)) : we("", !0)
6798
6792
  ])
6799
- ])) : (B(), q("div", Ml, [
6800
- D("div", Dl, [
6801
- (w == null ? void 0 : w.type) === "text" ? (B(), q("div", Ul, Ae(w == null ? void 0 : w.text), 1)) : we("", !0)
6793
+ ])) : (B(), q("div", jl, [
6794
+ D("div", Cl, [
6795
+ (v == null ? void 0 : v.type) === "text" ? (B(), q("div", Ml, He(v == null ? void 0 : v.text), 1)) : we("", !0)
6802
6796
  ])
6803
6797
  ]))
6804
6798
  ], 64))), 128))
6805
6799
  ]))), 128)),
6806
- i.value ? (B(), q("img", Ll)) : we("", !0)
6800
+ i.value ? (B(), q("img", Dl)) : we("", !0)
6807
6801
  ], 512),
6808
6802
  D("form", {
6809
- onSubmit: u,
6803
+ onSubmit: c,
6810
6804
  class: "ai-input-wrap"
6811
6805
  }, [
6812
- Xn(D("input", {
6806
+ Gn(D("input", {
6813
6807
  class: "ai-input",
6814
- "onUpdate:modelValue": y[1] || (y[1] = (v) => o.value = v),
6808
+ "onUpdate:modelValue": m[1] || (m[1] = (b) => n.value = b),
6815
6809
  placeholder: "Ask me anything…"
6816
6810
  }, null, 512), [
6817
- [Qn, o.value]
6811
+ [Hn, n.value]
6818
6812
  ]),
6819
6813
  D("button", {
6820
6814
  class: "ai-send",
6821
- disabled: !o.value || ((g = o.value) == null ? void 0 : g.length) == 0 || i.value
6815
+ disabled: !n.value || ((h = n.value) == null ? void 0 : h.length) == 0 || i.value
6822
6816
  }, [
6823
- Et(le(Ol), { class: "w-5 h-5 text-white" })
6824
- ], 8, Jl)
6817
+ Et(de(zl), { class: "w-5 h-5 text-white" })
6818
+ ], 8, Ul)
6825
6819
  ], 32)
6826
6820
  ], 2),
6827
- D("div", null, [
6828
- D("button", Fl, [
6829
- a.value ? (B(), zt(le(Zl), {
6821
+ D("div", Ll, [
6822
+ D("button", {
6823
+ class: "chat-button",
6824
+ onClick: u
6825
+ }, [
6826
+ o.value ? (B(), zt(de(Sl), {
6830
6827
  key: 1,
6831
- class: "text-white",
6832
- onClick: d
6833
- })) : (B(), zt(le($l), {
6828
+ class: "text-white"
6829
+ })) : (B(), zt(de(Ol), {
6834
6830
  key: 0,
6835
- class: "text-white",
6836
- onClick: l
6831
+ class: "text-white"
6837
6832
  }))
6838
6833
  ])
6839
6834
  ])
@@ -6842,12 +6837,6 @@ const Tl = He("x", [
6842
6837
  };
6843
6838
  }
6844
6839
  });
6845
- const Bl = (e, t) => {
6846
- const r = e.__vccOpts || e;
6847
- for (const [n, o] of t)
6848
- r[n] = o;
6849
- return r;
6850
- }, Yl = /* @__PURE__ */ Bl(Vl, [["__scopeId", "data-v-cf9d75ae"]]);
6851
6840
  export {
6852
- Yl as ChatbotComponent
6841
+ Fl as ChatbotComponent
6853
6842
  };