gci-chatbot-ai 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gci-chatbot-ai.js +293 -293
- package/dist/gci-chatbot-ai.umd.cjs +17 -17
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gci-chatbot-ai.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as ue, h as rt, defineComponent as Bn, watch as Wn, nextTick as Yn, openBlock as
|
|
1
|
+
import { ref as ue, h as rt, defineComponent as Bn, watch as Wn, nextTick as Yn, openBlock as W, createElementBlock as G, Fragment as we, createCommentVNode as Pe, 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
2
|
const Xn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjMwIiB2aWV3Qm94PSIwIDAgMTIwIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiPg0KICA8Y2lyY2xlIGN4PSIxNSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjBzIj48L2FuaW1hdGU+DQogIDwvY2lyY2xlPg0KDQogIDxjaXJjbGUgY3g9IjQ1IiBjeT0iMTUiIHI9IjYiIGZpbGw9IiM1QjhDRkYiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMC4zOzE7MC4zIiBkdXI9IjEuNHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4ycyI+PC9hbmltYXRlPg0KICA8L2NpcmNsZT4NCg0KICA8Y2lyY2xlIGN4PSI3NSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuNHMiPjwvYW5pbWF0ZT4NCiAgPC9jaXJjbGU+DQo8L3N2Zz4NCg==";
|
|
3
3
|
var vr = "vercel.ai.error", Qn = Symbol.for(vr), St, Ot, K = class _r extends (Ot = Error, St = Qn, Ot) {
|
|
4
4
|
/**
|
|
@@ -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
|
|
102
|
-
|
|
101
|
+
const h = l[d];
|
|
102
|
+
h in a || (a[h] = u[h].bind(a));
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
const o = (r == null ? void 0 : r.Parent) ?? Object;
|
|
@@ -121,7 +121,7 @@ function p(e, t, r) {
|
|
|
121
121
|
}
|
|
122
122
|
}), Object.defineProperty(i, "name", { value: e }), i;
|
|
123
123
|
}
|
|
124
|
-
class
|
|
124
|
+
class he extends Error {
|
|
125
125
|
constructor() {
|
|
126
126
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
127
127
|
}
|
|
@@ -332,7 +332,7 @@ function fo(e, t) {
|
|
|
332
332
|
});
|
|
333
333
|
return se(e, r);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function mo(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 };
|
|
@@ -346,7 +346,7 @@ function ho(e, t) {
|
|
|
346
346
|
});
|
|
347
347
|
return se(e, r);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function ho(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");
|
|
@@ -407,7 +407,7 @@ function fe(e, t = 0) {
|
|
|
407
407
|
return !0;
|
|
408
408
|
return !1;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function me(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;
|
|
@@ -425,7 +425,7 @@ function ne(e, t, r) {
|
|
|
425
425
|
}
|
|
426
426
|
return delete n.inst, delete n.continue, t != null && t.reportInput || delete n.input, n;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function mt(e) {
|
|
429
429
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
430
430
|
}
|
|
431
431
|
function ze(...e) {
|
|
@@ -476,10 +476,10 @@ function _o(e, t = (r) => r.message) {
|
|
|
476
476
|
};
|
|
477
477
|
return n(e), r;
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const ht = (e) => (t, r, n, o) => {
|
|
480
480
|
const s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: r, issues: [] }, s);
|
|
481
481
|
if (i instanceof Promise)
|
|
482
|
-
throw new
|
|
482
|
+
throw new he();
|
|
483
483
|
if (i.issues.length) {
|
|
484
484
|
const a = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((c) => ne(c, s, re())));
|
|
485
485
|
throw Zr(a, o == null ? void 0 : o.callee), a;
|
|
@@ -496,7 +496,7 @@ const mt = (e) => (t, r, n, o) => {
|
|
|
496
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
|
-
throw new
|
|
499
|
+
throw new he();
|
|
500
500
|
return s.issues.length ? {
|
|
501
501
|
success: !1,
|
|
502
502
|
error: new (e ?? Nr)(s.issues.map((i) => ne(i, o, re())))
|
|
@@ -510,8 +510,8 @@ const mt = (e) => (t, r, n, o) => {
|
|
|
510
510
|
} : { success: !0, data: s.value };
|
|
511
511
|
}, bo = /* @__PURE__ */ We(Pr), wo = (e) => (t, r, n) => {
|
|
512
512
|
const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
|
|
513
|
-
return
|
|
514
|
-
}, Io = (e) => (t, r, n) =>
|
|
513
|
+
return ht(e)(t, r, o);
|
|
514
|
+
}, Io = (e) => (t, r, n) => ht(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
517
|
}, ko = (e) => async (t, r, n) => gt(e)(t, r, n), zo = (e) => (t, r, n) => {
|
|
@@ -541,7 +541,7 @@ function qo(e) {
|
|
|
541
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
|
-
}, Ho = /^-?\d+$/, jr = /^-?\d+(?:\.\d+)?$/, Xo = /^(?:true|false)$/i, Qo = /^null$/i, Ko = /^[^A-Z]*$/, es = /^[^a-z]*$/,
|
|
544
|
+
}, Ho = /^-?\d+$/, jr = /^-?\d+(?:\.\d+)?$/, Xo = /^(?:true|false)$/i, Qo = /^null$/i, Ko = /^[^A-Z]*$/, es = /^[^a-z]*$/, B = /* @__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 = {
|
|
@@ -549,7 +549,7 @@ const Go = (e) => {
|
|
|
549
549
|
bigint: "bigint",
|
|
550
550
|
object: "date"
|
|
551
551
|
}, Mr = /* @__PURE__ */ p("$ZodCheckLessThan", (e, t) => {
|
|
552
|
-
|
|
552
|
+
B.init(e, t);
|
|
553
553
|
const r = Cr[typeof t.value];
|
|
554
554
|
e._zod.onattach.push((n) => {
|
|
555
555
|
const o = n._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -566,7 +566,7 @@ const Go = (e) => {
|
|
|
566
566
|
});
|
|
567
567
|
};
|
|
568
568
|
}), Dr = /* @__PURE__ */ p("$ZodCheckGreaterThan", (e, t) => {
|
|
569
|
-
|
|
569
|
+
B.init(e, t);
|
|
570
570
|
const r = Cr[typeof t.value];
|
|
571
571
|
e._zod.onattach.push((n) => {
|
|
572
572
|
const o = n._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -583,7 +583,7 @@ const Go = (e) => {
|
|
|
583
583
|
});
|
|
584
584
|
};
|
|
585
585
|
}), ts = /* @__PURE__ */ p("$ZodCheckMultipleOf", (e, t) => {
|
|
586
|
-
|
|
586
|
+
B.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) => {
|
|
@@ -600,7 +600,7 @@ const Go = (e) => {
|
|
|
600
600
|
};
|
|
601
601
|
}), rs = /* @__PURE__ */ p("$ZodCheckNumberFormat", (e, t) => {
|
|
602
602
|
var i;
|
|
603
|
-
|
|
603
|
+
B.init(e, t), t.format = t.format || "float64";
|
|
604
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;
|
|
@@ -662,7 +662,7 @@ const Go = (e) => {
|
|
|
662
662
|
};
|
|
663
663
|
}), ns = /* @__PURE__ */ p("$ZodCheckMaxLength", (e, t) => {
|
|
664
664
|
var r;
|
|
665
|
-
|
|
665
|
+
B.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
|
|
666
666
|
const o = n.value;
|
|
667
667
|
return !pt(o) && o.length !== void 0;
|
|
668
668
|
}), e._zod.onattach.push((n) => {
|
|
@@ -672,7 +672,7 @@ const Go = (e) => {
|
|
|
672
672
|
const o = n.value;
|
|
673
673
|
if (o.length <= t.maximum)
|
|
674
674
|
return;
|
|
675
|
-
const i =
|
|
675
|
+
const i = mt(o);
|
|
676
676
|
n.issues.push({
|
|
677
677
|
origin: i,
|
|
678
678
|
code: "too_big",
|
|
@@ -685,7 +685,7 @@ const Go = (e) => {
|
|
|
685
685
|
};
|
|
686
686
|
}), os = /* @__PURE__ */ p("$ZodCheckMinLength", (e, t) => {
|
|
687
687
|
var r;
|
|
688
|
-
|
|
688
|
+
B.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
|
|
689
689
|
const o = n.value;
|
|
690
690
|
return !pt(o) && o.length !== void 0;
|
|
691
691
|
}), e._zod.onattach.push((n) => {
|
|
@@ -695,7 +695,7 @@ const Go = (e) => {
|
|
|
695
695
|
const o = n.value;
|
|
696
696
|
if (o.length >= t.minimum)
|
|
697
697
|
return;
|
|
698
|
-
const i =
|
|
698
|
+
const i = mt(o);
|
|
699
699
|
n.issues.push({
|
|
700
700
|
origin: i,
|
|
701
701
|
code: "too_small",
|
|
@@ -708,7 +708,7 @@ const Go = (e) => {
|
|
|
708
708
|
};
|
|
709
709
|
}), ss = /* @__PURE__ */ p("$ZodCheckLengthEquals", (e, t) => {
|
|
710
710
|
var r;
|
|
711
|
-
|
|
711
|
+
B.init(e, t), (r = e._zod.def).when ?? (r.when = (n) => {
|
|
712
712
|
const o = n.value;
|
|
713
713
|
return !pt(o) && o.length !== void 0;
|
|
714
714
|
}), e._zod.onattach.push((n) => {
|
|
@@ -718,7 +718,7 @@ const Go = (e) => {
|
|
|
718
718
|
const o = n.value, s = o.length;
|
|
719
719
|
if (s === t.length)
|
|
720
720
|
return;
|
|
721
|
-
const i =
|
|
721
|
+
const i = mt(o), a = s > t.length;
|
|
722
722
|
n.issues.push({
|
|
723
723
|
origin: i,
|
|
724
724
|
...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -731,7 +731,7 @@ const Go = (e) => {
|
|
|
731
731
|
};
|
|
732
732
|
}), Ye = /* @__PURE__ */ p("$ZodCheckStringFormat", (e, t) => {
|
|
733
733
|
var r, n;
|
|
734
|
-
|
|
734
|
+
B.init(e, t), e._zod.onattach.push((o) => {
|
|
735
735
|
const s = o._zod.bag;
|
|
736
736
|
s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
|
|
737
737
|
}), t.pattern ? (r = e._zod).check ?? (r.check = (o) => {
|
|
@@ -763,7 +763,7 @@ const Go = (e) => {
|
|
|
763
763
|
}), us = /* @__PURE__ */ p("$ZodCheckUpperCase", (e, t) => {
|
|
764
764
|
t.pattern ?? (t.pattern = es), Ye.init(e, t);
|
|
765
765
|
}), cs = /* @__PURE__ */ p("$ZodCheckIncludes", (e, t) => {
|
|
766
|
-
|
|
766
|
+
B.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) => {
|
|
769
769
|
const s = o._zod.bag;
|
|
@@ -780,7 +780,7 @@ const Go = (e) => {
|
|
|
780
780
|
});
|
|
781
781
|
};
|
|
782
782
|
}), ls = /* @__PURE__ */ p("$ZodCheckStartsWith", (e, t) => {
|
|
783
|
-
|
|
783
|
+
B.init(e, t);
|
|
784
784
|
const r = new RegExp(`^${_e(t.prefix)}.*`);
|
|
785
785
|
t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
|
|
786
786
|
const o = n._zod.bag;
|
|
@@ -797,7 +797,7 @@ const Go = (e) => {
|
|
|
797
797
|
});
|
|
798
798
|
};
|
|
799
799
|
}), ds = /* @__PURE__ */ p("$ZodCheckEndsWith", (e, t) => {
|
|
800
|
-
|
|
800
|
+
B.init(e, t);
|
|
801
801
|
const r = new RegExp(`.*${_e(t.suffix)}$`);
|
|
802
802
|
t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
|
|
803
803
|
const o = n._zod.bag;
|
|
@@ -814,7 +814,7 @@ const Go = (e) => {
|
|
|
814
814
|
});
|
|
815
815
|
};
|
|
816
816
|
}), ps = /* @__PURE__ */ p("$ZodCheckOverwrite", (e, t) => {
|
|
817
|
-
|
|
817
|
+
B.init(e, t), e._zod.check = (r) => {
|
|
818
818
|
r.value = t.tx(r.value);
|
|
819
819
|
};
|
|
820
820
|
});
|
|
@@ -841,14 +841,14 @@ class fs {
|
|
|
841
841
|
`));
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const ms = {
|
|
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 =
|
|
851
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = ms;
|
|
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)
|
|
@@ -861,23 +861,23 @@ const hs = {
|
|
|
861
861
|
else {
|
|
862
862
|
const s = (a, c, u) => {
|
|
863
863
|
let l = fe(a), d;
|
|
864
|
-
for (const
|
|
865
|
-
if (
|
|
866
|
-
if (!
|
|
864
|
+
for (const h of c) {
|
|
865
|
+
if (h._zod.def.when) {
|
|
866
|
+
if (!h._zod.def.when(a))
|
|
867
867
|
continue;
|
|
868
868
|
} else if (l)
|
|
869
869
|
continue;
|
|
870
|
-
const
|
|
870
|
+
const m = a.issues.length, b = h._zod.check(a);
|
|
871
871
|
if (b instanceof Promise && (u == null ? void 0 : u.async) === !1)
|
|
872
|
-
throw new
|
|
872
|
+
throw new he();
|
|
873
873
|
if (d || b instanceof Promise)
|
|
874
874
|
d = (d ?? Promise.resolve()).then(async () => {
|
|
875
|
-
await b, a.issues.length !==
|
|
875
|
+
await b, a.issues.length !== m && (l || (l = fe(a, m)));
|
|
876
876
|
});
|
|
877
877
|
else {
|
|
878
|
-
if (a.issues.length ===
|
|
878
|
+
if (a.issues.length === m)
|
|
879
879
|
continue;
|
|
880
|
-
l || (l = fe(a,
|
|
880
|
+
l || (l = fe(a, m));
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
return d ? d.then(() => a) : a;
|
|
@@ -887,7 +887,7 @@ const hs = {
|
|
|
887
887
|
const l = s(c, n, u);
|
|
888
888
|
if (l instanceof Promise) {
|
|
889
889
|
if (u.async === !1)
|
|
890
|
-
throw new
|
|
890
|
+
throw new he();
|
|
891
891
|
return l.then((d) => e._zod.parse(d, u));
|
|
892
892
|
}
|
|
893
893
|
return e._zod.parse(l, u);
|
|
@@ -902,7 +902,7 @@ const hs = {
|
|
|
902
902
|
const u = e._zod.parse(a, c);
|
|
903
903
|
if (u instanceof Promise) {
|
|
904
904
|
if (c.async === !1)
|
|
905
|
-
throw new
|
|
905
|
+
throw new he();
|
|
906
906
|
return u.then((l) => s(l, n, c));
|
|
907
907
|
}
|
|
908
908
|
return s(u, n, c);
|
|
@@ -941,7 +941,7 @@ const hs = {
|
|
|
941
941
|
};
|
|
942
942
|
}), C = /* @__PURE__ */ p("$ZodStringFormat", (e, t) => {
|
|
943
943
|
Ye.init(e, t), vt.init(e, t);
|
|
944
|
-
}),
|
|
944
|
+
}), hs = /* @__PURE__ */ p("$ZodGUID", (e, t) => {
|
|
945
945
|
t.pattern ?? (t.pattern = jo), C.init(e, t);
|
|
946
946
|
}), gs = /* @__PURE__ */ p("$ZodUUID", (e, t) => {
|
|
947
947
|
if (t.version) {
|
|
@@ -1183,7 +1183,7 @@ const Ds = /* @__PURE__ */ p("$ZodJWT", (e, t) => {
|
|
|
1183
1183
|
}), r);
|
|
1184
1184
|
});
|
|
1185
1185
|
function Mt(e, t, r) {
|
|
1186
|
-
e.issues.length && t.issues.push(...
|
|
1186
|
+
e.issues.length && t.issues.push(...me(r, e.issues)), t.value[r] = e.value;
|
|
1187
1187
|
}
|
|
1188
1188
|
const Bs = /* @__PURE__ */ p("$ZodArray", (e, t) => {
|
|
1189
1189
|
x.init(e, t), e._zod.parse = (r, n) => {
|
|
@@ -1211,7 +1211,7 @@ 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(...
|
|
1214
|
+
t.issues.push(...me(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
|
}
|
|
@@ -1239,8 +1239,8 @@ function Fr(e, t, r, n, o, s) {
|
|
|
1239
1239
|
i.push(d);
|
|
1240
1240
|
continue;
|
|
1241
1241
|
}
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1242
|
+
const h = c.run({ value: t[d], issues: [] }, n);
|
|
1243
|
+
h instanceof Promise ? e.push(h.then((m) => je(m, r, d, t, l))) : je(h, r, d, t, l);
|
|
1244
1244
|
}
|
|
1245
1245
|
return i.length && r.issues.push({
|
|
1246
1246
|
code: "unrecognized_keys",
|
|
@@ -1290,29 +1290,29 @@ const Ws = /* @__PURE__ */ p("$ZodObject", (e, t) => {
|
|
|
1290
1290
|
}), a;
|
|
1291
1291
|
a.value = {};
|
|
1292
1292
|
const l = [], d = i.shape;
|
|
1293
|
-
for (const
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1293
|
+
for (const h of i.keys) {
|
|
1294
|
+
const m = d[h], b = m._zod.optout === "optional", v = m._zod.run({ value: u[h], issues: [] }, c);
|
|
1295
|
+
v instanceof Promise ? l.push(v.then((_) => je(_, a, h, u, b))) : je(v, a, h, 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
1299
|
}), Ys = /* @__PURE__ */ p("$ZodObjectJIT", (e, t) => {
|
|
1300
1300
|
Ws.init(e, t);
|
|
1301
|
-
const r = e._zod.parse, n = Ve(() => Jr(t)), o = (
|
|
1301
|
+
const r = e._zod.parse, n = Ve(() => Jr(t)), o = (h) => {
|
|
1302
1302
|
var f;
|
|
1303
|
-
const
|
|
1303
|
+
const m = new fs(["shape", "payload", "ctx"]), b = n.value, v = ($) => {
|
|
1304
1304
|
const Z = jt($);
|
|
1305
1305
|
return `shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`;
|
|
1306
1306
|
};
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1307
|
+
m.write("const input = payload.value;");
|
|
1308
|
+
const _ = /* @__PURE__ */ Object.create(null);
|
|
1309
1309
|
let I = 0;
|
|
1310
1310
|
for (const $ of b.keys)
|
|
1311
|
-
|
|
1312
|
-
|
|
1311
|
+
_[$] = `key_${I++}`;
|
|
1312
|
+
m.write("const newResult = {};");
|
|
1313
1313
|
for (const $ of b.keys) {
|
|
1314
|
-
const Z =
|
|
1315
|
-
|
|
1314
|
+
const Z = _[$], z = jt($), N = h[$], V = ((f = N == null ? void 0 : N._zod) == null ? void 0 : f.optout) === "optional";
|
|
1315
|
+
m.write(`const ${Z} = ${v($)};`), V ? m.write(`
|
|
1316
1316
|
if (${Z}.issues.length) {
|
|
1317
1317
|
if (${z} in input) {
|
|
1318
1318
|
payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
|
|
@@ -1330,7 +1330,7 @@ const Ws = /* @__PURE__ */ p("$ZodObject", (e, t) => {
|
|
|
1330
1330
|
newResult[${z}] = ${Z}.value;
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
|
-
`) :
|
|
1333
|
+
`) : m.write(`
|
|
1334
1334
|
if (${Z}.issues.length) {
|
|
1335
1335
|
payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
|
|
1336
1336
|
...iss,
|
|
@@ -1348,22 +1348,22 @@ const Ws = /* @__PURE__ */ p("$ZodObject", (e, t) => {
|
|
|
1348
1348
|
|
|
1349
1349
|
`);
|
|
1350
1350
|
}
|
|
1351
|
-
|
|
1352
|
-
const k =
|
|
1353
|
-
return ($, Z) => k(
|
|
1351
|
+
m.write("payload.value = newResult;"), m.write("return payload;");
|
|
1352
|
+
const k = m.compile();
|
|
1353
|
+
return ($, Z) => k(h, $, Z);
|
|
1354
1354
|
};
|
|
1355
1355
|
let s;
|
|
1356
1356
|
const i = ke, a = !ot.jitless, u = a && so.value, l = t.catchall;
|
|
1357
1357
|
let d;
|
|
1358
|
-
e._zod.parse = (
|
|
1358
|
+
e._zod.parse = (h, m) => {
|
|
1359
1359
|
d ?? (d = n.value);
|
|
1360
|
-
const b =
|
|
1361
|
-
return i(b) ? a && u && (
|
|
1360
|
+
const b = h.value;
|
|
1361
|
+
return i(b) ? a && u && (m == null ? void 0 : m.async) === !1 && m.jitless !== !0 ? (s || (s = o(t.shape)), h = s(h, m), l ? Fr([], b, h, m, d, e) : h) : r(h, m) : (h.issues.push({
|
|
1362
1362
|
expected: "object",
|
|
1363
1363
|
code: "invalid_type",
|
|
1364
1364
|
input: b,
|
|
1365
1365
|
inst: e
|
|
1366
|
-
}),
|
|
1366
|
+
}), h);
|
|
1367
1367
|
};
|
|
1368
1368
|
});
|
|
1369
1369
|
function Dt(e, t, r, n) {
|
|
@@ -1545,8 +1545,8 @@ const Hs = /* @__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(...
|
|
1549
|
-
})) : (l.issues.length && r.issues.push(...
|
|
1548
|
+
d.issues.length && r.issues.push(...me(u, d.issues)), r.value[u] = d.value;
|
|
1549
|
+
})) : (l.issues.length && r.issues.push(...me(u, l.issues)), r.value[u] = l.value);
|
|
1550
1550
|
}
|
|
1551
1551
|
let c;
|
|
1552
1552
|
for (const u in o)
|
|
@@ -1584,8 +1584,8 @@ const Hs = /* @__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(...
|
|
1588
|
-
})) : (l.issues.length && r.issues.push(...
|
|
1587
|
+
d.issues.length && r.issues.push(...me(a, d.issues)), r.value[c.value] = d.value;
|
|
1588
|
+
})) : (l.issues.length && r.issues.push(...me(a, l.issues)), r.value[c.value] = l.value);
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
return s.length ? Promise.all(s).then(() => r) : r;
|
|
@@ -1623,7 +1623,7 @@ const Hs = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
|
|
|
1623
1623
|
if (n.async)
|
|
1624
1624
|
return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (r.value = i, r));
|
|
1625
1625
|
if (o instanceof Promise)
|
|
1626
|
-
throw new
|
|
1626
|
+
throw new he();
|
|
1627
1627
|
return r.value = o, r;
|
|
1628
1628
|
};
|
|
1629
1629
|
});
|
|
@@ -1744,7 +1744,7 @@ const ua = /* @__PURE__ */ p("$ZodLazy", (e, t) => {
|
|
|
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
1746
|
}), ca = /* @__PURE__ */ p("$ZodCustom", (e, t) => {
|
|
1747
|
-
|
|
1747
|
+
B.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)
|
|
1750
1750
|
return o.then((s) => Bt(s, r, n, e));
|
|
@@ -1829,7 +1829,7 @@ function Yt(e, t) {
|
|
|
1829
1829
|
});
|
|
1830
1830
|
}
|
|
1831
1831
|
// @__NO_SIDE_EFFECTS__
|
|
1832
|
-
function
|
|
1832
|
+
function ma(e, t) {
|
|
1833
1833
|
return new e({
|
|
1834
1834
|
type: "string",
|
|
1835
1835
|
format: "uuid",
|
|
@@ -1839,7 +1839,7 @@ function ha(e, t) {
|
|
|
1839
1839
|
});
|
|
1840
1840
|
}
|
|
1841
1841
|
// @__NO_SIDE_EFFECTS__
|
|
1842
|
-
function
|
|
1842
|
+
function ha(e, t) {
|
|
1843
1843
|
return new e({
|
|
1844
1844
|
type: "string",
|
|
1845
1845
|
format: "uuid",
|
|
@@ -2307,7 +2307,7 @@ function oi(e) {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
// @__NO_SIDE_EFFECTS__
|
|
2309
2309
|
function si(e, t) {
|
|
2310
|
-
const r = new
|
|
2310
|
+
const r = new B({
|
|
2311
2311
|
check: "custom",
|
|
2312
2312
|
...y(t)
|
|
2313
2313
|
});
|
|
@@ -2342,21 +2342,21 @@ function A(e, t, r = { path: [], schemaPath: [] }) {
|
|
|
2342
2342
|
if (a)
|
|
2343
2343
|
i.schema = a;
|
|
2344
2344
|
else {
|
|
2345
|
-
const
|
|
2345
|
+
const h = {
|
|
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, h);
|
|
2352
2352
|
else {
|
|
2353
|
-
const b = i.schema,
|
|
2354
|
-
if (!
|
|
2353
|
+
const b = i.schema, v = t.processors[o.type];
|
|
2354
|
+
if (!v)
|
|
2355
2355
|
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
|
|
2356
|
-
|
|
2356
|
+
v(e, t, b, h);
|
|
2357
2357
|
}
|
|
2358
|
-
const
|
|
2359
|
-
|
|
2358
|
+
const m = e._zod.parent;
|
|
2359
|
+
m && (i.ref || (i.ref = m), A(m, t, h), t.seen.get(m).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;
|
|
@@ -2370,35 +2370,35 @@ function De(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
|
|
2374
|
-
if (
|
|
2373
|
+
const h = n.get(d);
|
|
2374
|
+
if (h && h !== 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
|
|
2380
|
+
var v;
|
|
2381
2381
|
const d = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
2382
2382
|
if (e.external) {
|
|
2383
|
-
const
|
|
2384
|
-
if (
|
|
2385
|
-
return { ref: I(
|
|
2383
|
+
const _ = (v = e.external.registry.get(l[0])) == null ? void 0 : v.id, I = e.external.uri ?? ((f) => f);
|
|
2384
|
+
if (_)
|
|
2385
|
+
return { ref: I(_) };
|
|
2386
2386
|
const k = l[1].defId ?? l[1].schema.id ?? `schema${e.counter++}`;
|
|
2387
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
|
|
2392
|
-
return { defId: b, ref:
|
|
2391
|
+
const m = `#/${d}/`, b = l[1].schema.id ?? `__schema${e.counter++}`;
|
|
2392
|
+
return { defId: b, ref: m + b };
|
|
2393
2393
|
}, s = (l) => {
|
|
2394
2394
|
if (l[1].schema.$ref)
|
|
2395
2395
|
return;
|
|
2396
|
-
const d = l[1], { ref:
|
|
2397
|
-
d.def = { ...d.schema },
|
|
2396
|
+
const d = l[1], { ref: h, defId: m } = o(l);
|
|
2397
|
+
d.def = { ...d.schema }, m && (d.defId = m);
|
|
2398
2398
|
const b = d.schema;
|
|
2399
|
-
for (const
|
|
2400
|
-
delete b[
|
|
2401
|
-
b.$ref =
|
|
2399
|
+
for (const v in b)
|
|
2400
|
+
delete b[v];
|
|
2401
|
+
b.$ref = h;
|
|
2402
2402
|
};
|
|
2403
2403
|
if (e.cycles === "throw")
|
|
2404
2404
|
for (const l of e.seen.entries()) {
|
|
@@ -2415,8 +2415,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2415
2415
|
continue;
|
|
2416
2416
|
}
|
|
2417
2417
|
if (e.external) {
|
|
2418
|
-
const
|
|
2419
|
-
if (t !== l[0] &&
|
|
2418
|
+
const m = (c = e.external.registry.get(l[0])) == null ? void 0 : c.id;
|
|
2419
|
+
if (t !== l[0] && m) {
|
|
2420
2420
|
s(l);
|
|
2421
2421
|
continue;
|
|
2422
2422
|
}
|
|
@@ -2444,24 +2444,24 @@ function Ue(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,
|
|
2448
|
-
if (l.ref = null,
|
|
2449
|
-
n(
|
|
2450
|
-
const
|
|
2451
|
-
if (
|
|
2447
|
+
const d = l.def ?? l.schema, h = { ...d }, m = l.ref;
|
|
2448
|
+
if (l.ref = null, m) {
|
|
2449
|
+
n(m);
|
|
2450
|
+
const v = e.seen.get(m), _ = v.schema;
|
|
2451
|
+
if (_.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (d.allOf = d.allOf ?? [], d.allOf.push(_)) : Object.assign(d, _), Object.assign(d, h), u._zod.parent === m)
|
|
2452
2452
|
for (const k in d)
|
|
2453
|
-
k === "$ref" || k === "allOf" || k in
|
|
2454
|
-
if (
|
|
2453
|
+
k === "$ref" || k === "allOf" || k in h || delete d[k];
|
|
2454
|
+
if (_.$ref)
|
|
2455
2455
|
for (const k in d)
|
|
2456
|
-
k === "$ref" || k === "allOf" || k in
|
|
2456
|
+
k === "$ref" || k === "allOf" || k in v.def && JSON.stringify(d[k]) === JSON.stringify(v.def[k]) && delete d[k];
|
|
2457
2457
|
}
|
|
2458
2458
|
const b = u._zod.parent;
|
|
2459
|
-
if (b && b !==
|
|
2459
|
+
if (b && b !== m) {
|
|
2460
2460
|
n(b);
|
|
2461
|
-
const
|
|
2462
|
-
if (
|
|
2463
|
-
for (const
|
|
2464
|
-
|
|
2461
|
+
const v = e.seen.get(b);
|
|
2462
|
+
if (v != null && v.schema.$ref && (d.$ref = v.schema.$ref, v.def))
|
|
2463
|
+
for (const _ in d)
|
|
2464
|
+
_ === "$ref" || _ === "allOf" || _ in v.def && JSON.stringify(d[_]) === JSON.stringify(v.def[_]) && delete d[_];
|
|
2465
2465
|
}
|
|
2466
2466
|
e.override({
|
|
2467
2467
|
zodSchema: u,
|
|
@@ -2617,10 +2617,10 @@ const ai = (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
|
-
},
|
|
2620
|
+
}, mi = (e, t, r, n) => {
|
|
2621
2621
|
if (t.unrepresentable === "throw")
|
|
2622
2622
|
throw new Error("NaN cannot be represented in JSON Schema");
|
|
2623
|
-
},
|
|
2623
|
+
}, hi = (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");
|
|
@@ -2691,9 +2691,9 @@ const ai = (e, t = {}) => (r) => {
|
|
|
2691
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((
|
|
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, m) => A(h, t, {
|
|
2695
2695
|
...n,
|
|
2696
|
-
path: [...n.path, i,
|
|
2696
|
+
path: [...n.path, i, m]
|
|
2697
2697
|
})), u = s.rest ? A(s.rest, t, {
|
|
2698
2698
|
...n,
|
|
2699
2699
|
path: [...n.path, a, ...t.target === "openapi-3.0" ? [s.items.length] : []]
|
|
@@ -2746,7 +2746,7 @@ const ai = (e, t = {}) => (r) => {
|
|
|
2746
2746
|
A(o.innerType, t, n);
|
|
2747
2747
|
const s = t.seen.get(e);
|
|
2748
2748
|
s.ref = o.innerType, t.io === "input" && (r._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
2749
|
-
},
|
|
2749
|
+
}, mn = (e, t, r, n) => {
|
|
2750
2750
|
const o = e._zod.def;
|
|
2751
2751
|
A(o.innerType, t, n);
|
|
2752
2752
|
const s = t.seen.get(e);
|
|
@@ -2758,7 +2758,7 @@ const ai = (e, t = {}) => (r) => {
|
|
|
2758
2758
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
2759
2759
|
}
|
|
2760
2760
|
r.default = i;
|
|
2761
|
-
},
|
|
2761
|
+
}, hn = (e, t, r, n) => {
|
|
2762
2762
|
const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
2763
2763
|
A(s, t, n);
|
|
2764
2764
|
const i = t.seen.get(e);
|
|
@@ -2798,8 +2798,8 @@ const ai = (e, t = {}) => (r) => {
|
|
|
2798
2798
|
date: fi,
|
|
2799
2799
|
enum: en,
|
|
2800
2800
|
literal: tn,
|
|
2801
|
-
nan:
|
|
2802
|
-
template_literal:
|
|
2801
|
+
nan: mi,
|
|
2802
|
+
template_literal: hi,
|
|
2803
2803
|
file: gi,
|
|
2804
2804
|
success: vi,
|
|
2805
2805
|
custom: rn,
|
|
@@ -2817,8 +2817,8 @@ const ai = (e, t = {}) => (r) => {
|
|
|
2817
2817
|
nonoptional: dn,
|
|
2818
2818
|
default: pn,
|
|
2819
2819
|
prefault: fn,
|
|
2820
|
-
catch:
|
|
2821
|
-
pipe:
|
|
2820
|
+
catch: mn,
|
|
2821
|
+
pipe: hn,
|
|
2822
2822
|
readonly: gn,
|
|
2823
2823
|
promise: Ii,
|
|
2824
2824
|
optional: _t,
|
|
@@ -2905,9 +2905,9 @@ const Pi = (e, t) => {
|
|
|
2905
2905
|
// enumerable: false,
|
|
2906
2906
|
}
|
|
2907
2907
|
});
|
|
2908
|
-
},
|
|
2908
|
+
}, q = p("ZodError", Pi, {
|
|
2909
2909
|
Parent: Error
|
|
2910
|
-
}), Ai = /* @__PURE__ */
|
|
2910
|
+
}), Ai = /* @__PURE__ */ ht(q), Ri = /* @__PURE__ */ gt(q), xi = /* @__PURE__ */ Be(q), _n = /* @__PURE__ */ We(q), ji = /* @__PURE__ */ wo(q), Ci = /* @__PURE__ */ Io(q), Mi = /* @__PURE__ */ Eo(q), Di = /* @__PURE__ */ ko(q), Ui = /* @__PURE__ */ zo(q), Li = /* @__PURE__ */ So(q), Ji = /* @__PURE__ */ Oo(q), Fi = /* @__PURE__ */ Zo(q), j = /* @__PURE__ */ p("ZodType", (e, t) => (x.init(e, t), Object.assign(e["~standard"], {
|
|
2911
2911
|
jsonSchema: {
|
|
2912
2912
|
input: Le(e, "input"),
|
|
2913
2913
|
output: Le(e, "output")
|
|
@@ -2938,7 +2938,7 @@ const Pi = (e, t) => {
|
|
|
2938
2938
|
const r = e._zod.bag;
|
|
2939
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
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__ */
|
|
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__ */ ma(xe, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ ha(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
2943
|
function g(e) {
|
|
2944
2944
|
return /* @__PURE__ */ pa(Vi, e);
|
|
@@ -2948,7 +2948,7 @@ const M = /* @__PURE__ */ p("ZodStringFormat", (e, t) => {
|
|
|
2948
2948
|
}), Bi = /* @__PURE__ */ p("ZodEmail", (e, t) => {
|
|
2949
2949
|
vs.init(e, t), M.init(e, t);
|
|
2950
2950
|
}), Qt = /* @__PURE__ */ p("ZodGUID", (e, t) => {
|
|
2951
|
-
|
|
2951
|
+
hs.init(e, t), M.init(e, t);
|
|
2952
2952
|
}), xe = /* @__PURE__ */ p("ZodUUID", (e, t) => {
|
|
2953
2953
|
gs.init(e, t), M.init(e, t);
|
|
2954
2954
|
}), Wi = /* @__PURE__ */ p("ZodURL", (e, t) => {
|
|
@@ -3015,20 +3015,20 @@ const fu = /* @__PURE__ */ p("ZodUnknown", (e, t) => {
|
|
|
3015
3015
|
function Q() {
|
|
3016
3016
|
return /* @__PURE__ */ Ja(fu);
|
|
3017
3017
|
}
|
|
3018
|
-
const
|
|
3018
|
+
const mu = /* @__PURE__ */ p("ZodNever", (e, t) => {
|
|
3019
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__ */ Fa(
|
|
3022
|
+
return /* @__PURE__ */ Fa(mu, e);
|
|
3023
3023
|
}
|
|
3024
|
-
const
|
|
3024
|
+
const hu = /* @__PURE__ */ p("ZodArray", (e, t) => {
|
|
3025
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__ */ ti(
|
|
3028
|
+
return /* @__PURE__ */ ti(hu, e, t);
|
|
3029
3029
|
}
|
|
3030
3030
|
const In = /* @__PURE__ */ p("ZodObject", (e, t) => {
|
|
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) =>
|
|
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) => mo(e, r), e.pick = (r) => co(e, r), e.omit = (r) => lo(e, r), e.partial = (...r) => ho(zn, e, r[0]), e.required = (...r) => go(Sn, e, r[0]);
|
|
3032
3032
|
});
|
|
3033
3033
|
function P(e, t) {
|
|
3034
3034
|
const r = {
|
|
@@ -3227,7 +3227,7 @@ function Nu(e, t) {
|
|
|
3227
3227
|
});
|
|
3228
3228
|
}
|
|
3229
3229
|
const Pu = /* @__PURE__ */ p("ZodCatch", (e, t) => {
|
|
3230
|
-
sa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) =>
|
|
3230
|
+
sa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => mn(e, r, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3231
3231
|
});
|
|
3232
3232
|
function Au(e, t) {
|
|
3233
3233
|
return new Pu({
|
|
@@ -3237,7 +3237,7 @@ function Au(e, t) {
|
|
|
3237
3237
|
});
|
|
3238
3238
|
}
|
|
3239
3239
|
const Ru = /* @__PURE__ */ p("ZodPipe", (e, t) => {
|
|
3240
|
-
aa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) =>
|
|
3240
|
+
aa.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, n, o) => hn(e, r, n, o), e.in = t.in, e.out = t.out;
|
|
3241
3241
|
});
|
|
3242
3242
|
function rr(e, t) {
|
|
3243
3243
|
return new Ru({
|
|
@@ -3466,46 +3466,46 @@ function Lu(e) {
|
|
|
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(
|
|
3470
|
-
const
|
|
3469
|
+
function l(v) {
|
|
3470
|
+
const _ = i ? v.replace(/^\xEF\xBB\xBF/, "") : v, [I, k] = Ju(`${s}${_}`);
|
|
3471
3471
|
for (const f of I)
|
|
3472
3472
|
d(f);
|
|
3473
3473
|
s = k, i = !1;
|
|
3474
3474
|
}
|
|
3475
|
-
function d(
|
|
3476
|
-
if (
|
|
3477
|
-
|
|
3475
|
+
function d(v) {
|
|
3476
|
+
if (v === "") {
|
|
3477
|
+
m();
|
|
3478
3478
|
return;
|
|
3479
3479
|
}
|
|
3480
|
-
if (
|
|
3481
|
-
o && o(
|
|
3480
|
+
if (v.startsWith(":")) {
|
|
3481
|
+
o && o(v.slice(v.startsWith(": ") ? 2 : 1));
|
|
3482
3482
|
return;
|
|
3483
3483
|
}
|
|
3484
|
-
const
|
|
3485
|
-
if (
|
|
3486
|
-
const I =
|
|
3487
|
-
|
|
3484
|
+
const _ = v.indexOf(":");
|
|
3485
|
+
if (_ !== -1) {
|
|
3486
|
+
const I = v.slice(0, _), k = v[_ + 1] === " " ? 2 : 1, f = v.slice(_ + k);
|
|
3487
|
+
h(I, f, v);
|
|
3488
3488
|
return;
|
|
3489
3489
|
}
|
|
3490
|
-
|
|
3490
|
+
h(v, "", v);
|
|
3491
3491
|
}
|
|
3492
|
-
function
|
|
3493
|
-
switch (
|
|
3492
|
+
function h(v, _, I) {
|
|
3493
|
+
switch (v) {
|
|
3494
3494
|
case "event":
|
|
3495
|
-
u =
|
|
3495
|
+
u = _;
|
|
3496
3496
|
break;
|
|
3497
3497
|
case "data":
|
|
3498
|
-
c = `${c}${
|
|
3498
|
+
c = `${c}${_}
|
|
3499
3499
|
`;
|
|
3500
3500
|
break;
|
|
3501
3501
|
case "id":
|
|
3502
|
-
a =
|
|
3502
|
+
a = _.includes("\0") ? void 0 : _;
|
|
3503
3503
|
break;
|
|
3504
3504
|
case "retry":
|
|
3505
|
-
/^\d+$/.test(
|
|
3506
|
-
new sr(`Invalid \`retry\` value: "${
|
|
3505
|
+
/^\d+$/.test(_) ? n(parseInt(_, 10)) : r(
|
|
3506
|
+
new sr(`Invalid \`retry\` value: "${_}"`, {
|
|
3507
3507
|
type: "invalid-retry",
|
|
3508
|
-
value:
|
|
3508
|
+
value: _,
|
|
3509
3509
|
line: I
|
|
3510
3510
|
})
|
|
3511
3511
|
);
|
|
@@ -3513,14 +3513,14 @@ function Lu(e) {
|
|
|
3513
3513
|
default:
|
|
3514
3514
|
r(
|
|
3515
3515
|
new sr(
|
|
3516
|
-
`Unknown field "${
|
|
3517
|
-
{ type: "unknown-field", field:
|
|
3516
|
+
`Unknown field "${v.length > 20 ? `${v.slice(0, 20)}…` : v}"`,
|
|
3517
|
+
{ type: "unknown-field", field: v, value: _, line: I }
|
|
3518
3518
|
)
|
|
3519
3519
|
);
|
|
3520
3520
|
break;
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
|
-
function
|
|
3523
|
+
function m() {
|
|
3524
3524
|
c.length > 0 && t({
|
|
3525
3525
|
id: a,
|
|
3526
3526
|
event: u || void 0,
|
|
@@ -3530,8 +3530,8 @@ function Lu(e) {
|
|
|
3530
3530
|
`) ? c.slice(0, -1) : c
|
|
3531
3531
|
}), a = void 0, c = "", u = "";
|
|
3532
3532
|
}
|
|
3533
|
-
function b(
|
|
3534
|
-
s &&
|
|
3533
|
+
function b(v = {}) {
|
|
3534
|
+
s && v.consume && d(s), i = !0, a = void 0, c = "", u = "", s = "";
|
|
3535
3535
|
}
|
|
3536
3536
|
return { feed: l, reset: b };
|
|
3537
3537
|
}
|
|
@@ -4172,7 +4172,7 @@ var ut = {
|
|
|
4172
4172
|
ZodBoolean: "boolean",
|
|
4173
4173
|
ZodNull: "null"
|
|
4174
4174
|
};
|
|
4175
|
-
function
|
|
4175
|
+
function mc(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 hc(e, t) {
|
|
|
4228
4228
|
[]
|
|
4229
4229
|
)
|
|
4230
4230
|
};
|
|
4231
|
-
return
|
|
4231
|
+
return hc(e, t);
|
|
4232
4232
|
}
|
|
4233
|
-
var
|
|
4233
|
+
var hc = (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,
|
|
@@ -4423,7 +4423,7 @@ var Zc = (e, t) => T(e.innerType._def, t), $c = (e, t, r) => {
|
|
|
4423
4423
|
return Xu(e, r);
|
|
4424
4424
|
case E.ZodUnion:
|
|
4425
4425
|
case E.ZodDiscriminatedUnion:
|
|
4426
|
-
return
|
|
4426
|
+
return mc(e, r);
|
|
4427
4427
|
case E.ZodIntersection:
|
|
4428
4428
|
return ac(e, r);
|
|
4429
4429
|
case E.ZodTuple:
|
|
@@ -4546,17 +4546,17 @@ var Nc = (e, t) => {
|
|
|
4546
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 h;
|
|
4550
4550
|
return {
|
|
4551
4551
|
...u,
|
|
4552
|
-
[l]: (
|
|
4552
|
+
[l]: (h = 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 ?
|
|
4559
|
+
)) != null ? h : Y()
|
|
4560
4560
|
};
|
|
4561
4561
|
},
|
|
4562
4562
|
{}
|
|
@@ -5735,8 +5735,8 @@ function fl({
|
|
|
5735
5735
|
new TransformStream({
|
|
5736
5736
|
async transform(a, c) {
|
|
5737
5737
|
await n(async ({ state: u, write: l }) => {
|
|
5738
|
-
var d,
|
|
5739
|
-
function
|
|
5738
|
+
var d, h, m, b;
|
|
5739
|
+
function v(f) {
|
|
5740
5740
|
const Z = u.message.parts.filter(dt).find(
|
|
5741
5741
|
(z) => z.toolCallId === f
|
|
5742
5742
|
);
|
|
@@ -5748,7 +5748,7 @@ function fl({
|
|
|
5748
5748
|
});
|
|
5749
5749
|
return Z;
|
|
5750
5750
|
}
|
|
5751
|
-
function
|
|
5751
|
+
function _(f) {
|
|
5752
5752
|
var $;
|
|
5753
5753
|
const Z = u.message.parts.find(
|
|
5754
5754
|
(V) => lt(V) && V.toolCallId === f.toolCallId
|
|
@@ -5825,7 +5825,7 @@ function fl({
|
|
|
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 = (
|
|
5828
|
+
f.state = "done", f.providerMetadata = (h = a.providerMetadata) != null ? h : f.providerMetadata, delete u.activeTextParts[a.id], l();
|
|
5829
5829
|
break;
|
|
5830
5830
|
}
|
|
5831
5831
|
case "reasoning-start": {
|
|
@@ -5846,7 +5846,7 @@ function fl({
|
|
|
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.`
|
|
5848
5848
|
});
|
|
5849
|
-
f.text += a.delta, f.providerMetadata = (
|
|
5849
|
+
f.text += a.delta, f.providerMetadata = (m = a.providerMetadata) != null ? m : f.providerMetadata, l();
|
|
5850
5850
|
break;
|
|
5851
5851
|
}
|
|
5852
5852
|
case "reasoning-end": {
|
|
@@ -5905,7 +5905,7 @@ function fl({
|
|
|
5905
5905
|
providerExecuted: a.providerExecuted,
|
|
5906
5906
|
title: a.title,
|
|
5907
5907
|
providerMetadata: a.providerMetadata
|
|
5908
|
-
}) :
|
|
5908
|
+
}) : _({
|
|
5909
5909
|
toolCallId: a.toolCallId,
|
|
5910
5910
|
toolName: a.toolName,
|
|
5911
5911
|
state: "input-streaming",
|
|
@@ -5934,7 +5934,7 @@ function fl({
|
|
|
5934
5934
|
state: "input-streaming",
|
|
5935
5935
|
input: $,
|
|
5936
5936
|
title: f.title
|
|
5937
|
-
}) :
|
|
5937
|
+
}) : _({
|
|
5938
5938
|
toolCallId: a.toolCallId,
|
|
5939
5939
|
toolName: f.toolName,
|
|
5940
5940
|
state: "input-streaming",
|
|
@@ -5952,7 +5952,7 @@ function fl({
|
|
|
5952
5952
|
providerExecuted: a.providerExecuted,
|
|
5953
5953
|
providerMetadata: a.providerMetadata,
|
|
5954
5954
|
title: a.title
|
|
5955
|
-
}) :
|
|
5955
|
+
}) : _({
|
|
5956
5956
|
toolCallId: a.toolCallId,
|
|
5957
5957
|
toolName: a.toolName,
|
|
5958
5958
|
state: "input-available",
|
|
@@ -5974,7 +5974,7 @@ function fl({
|
|
|
5974
5974
|
errorText: a.errorText,
|
|
5975
5975
|
providerExecuted: a.providerExecuted,
|
|
5976
5976
|
providerMetadata: a.providerMetadata
|
|
5977
|
-
}) :
|
|
5977
|
+
}) : _({
|
|
5978
5978
|
toolCallId: a.toolCallId,
|
|
5979
5979
|
toolName: a.toolName,
|
|
5980
5980
|
state: "output-error",
|
|
@@ -5987,17 +5987,17 @@ function fl({
|
|
|
5987
5987
|
break;
|
|
5988
5988
|
}
|
|
5989
5989
|
case "tool-approval-request": {
|
|
5990
|
-
const f =
|
|
5990
|
+
const f = v(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 =
|
|
5995
|
+
const f = v(a.toolCallId);
|
|
5996
5996
|
f.state = "output-denied", l();
|
|
5997
5997
|
break;
|
|
5998
5998
|
}
|
|
5999
5999
|
case "tool-output-available": {
|
|
6000
|
-
const f =
|
|
6000
|
+
const f = v(a.toolCallId);
|
|
6001
6001
|
f.type === "dynamic-tool" ? I({
|
|
6002
6002
|
toolCallId: a.toolCallId,
|
|
6003
6003
|
toolName: f.toolName,
|
|
@@ -6007,7 +6007,7 @@ function fl({
|
|
|
6007
6007
|
preliminary: a.preliminary,
|
|
6008
6008
|
providerExecuted: a.providerExecuted,
|
|
6009
6009
|
title: f.title
|
|
6010
|
-
}) :
|
|
6010
|
+
}) : _({
|
|
6011
6011
|
toolCallId: a.toolCallId,
|
|
6012
6012
|
toolName: fr(f),
|
|
6013
6013
|
state: "output-available",
|
|
@@ -6020,7 +6020,7 @@ function fl({
|
|
|
6020
6020
|
break;
|
|
6021
6021
|
}
|
|
6022
6022
|
case "tool-output-error": {
|
|
6023
|
-
const f =
|
|
6023
|
+
const f = v(a.toolCallId);
|
|
6024
6024
|
f.type === "dynamic-tool" ? I({
|
|
6025
6025
|
toolCallId: a.toolCallId,
|
|
6026
6026
|
toolName: f.toolName,
|
|
@@ -6029,7 +6029,7 @@ function fl({
|
|
|
6029
6029
|
errorText: a.errorText,
|
|
6030
6030
|
providerExecuted: a.providerExecuted,
|
|
6031
6031
|
title: f.title
|
|
6032
|
-
}) :
|
|
6032
|
+
}) : _({
|
|
6033
6033
|
toolCallId: a.toolCallId,
|
|
6034
6034
|
toolName: fr(f),
|
|
6035
6035
|
state: "output-error",
|
|
@@ -6088,7 +6088,7 @@ function fl({
|
|
|
6088
6088
|
})
|
|
6089
6089
|
);
|
|
6090
6090
|
}
|
|
6091
|
-
async function
|
|
6091
|
+
async function ml({
|
|
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
|
|
6113
|
+
var hl = class {
|
|
6114
6114
|
constructor() {
|
|
6115
6115
|
this.queue = [], this.isProcessing = !1;
|
|
6116
6116
|
}
|
|
@@ -6187,25 +6187,25 @@ var vl = class {
|
|
|
6187
6187
|
requestMetadata: t.metadata,
|
|
6188
6188
|
trigger: t.trigger,
|
|
6189
6189
|
messageId: t.messageId
|
|
6190
|
-
})),
|
|
6190
|
+
})), h = (n = d == null ? void 0 : d.api) != null ? n : this.api, m = (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
|
-
},
|
|
6197
|
+
}, v = (o = d == null ? void 0 : d.credentials) != null ? o : u, I = await ((s = this.fetch) != null ? s : globalThis.fetch)(h, {
|
|
6198
6198
|
method: "POST",
|
|
6199
6199
|
headers: ir(
|
|
6200
6200
|
{
|
|
6201
6201
|
"Content-Type": "application/json",
|
|
6202
|
-
...
|
|
6202
|
+
...m
|
|
6203
6203
|
},
|
|
6204
6204
|
`ai-sdk/${pr}`,
|
|
6205
6205
|
ar()
|
|
6206
6206
|
),
|
|
6207
6207
|
body: JSON.stringify(b),
|
|
6208
|
-
credentials:
|
|
6208
|
+
credentials: v,
|
|
6209
6209
|
signal: e
|
|
6210
6210
|
});
|
|
6211
6211
|
if (!I.ok)
|
|
@@ -6228,24 +6228,24 @@ var vl = 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`,
|
|
6231
|
+
})), d = (r = l == null ? void 0 : l.api) != null ? r : `${this.api}/${e.chatId}/stream`, h = (l == null ? void 0 : l.headers) !== void 0 ? ie(l.headers) : u, m = (n = l == null ? void 0 : l.credentials) != null ? n : c, v = await ((o = this.fetch) != null ? o : globalThis.fetch)(d, {
|
|
6232
6232
|
method: "GET",
|
|
6233
6233
|
headers: ir(
|
|
6234
|
-
|
|
6234
|
+
h,
|
|
6235
6235
|
`ai-sdk/${pr}`,
|
|
6236
6236
|
ar()
|
|
6237
6237
|
),
|
|
6238
|
-
credentials:
|
|
6238
|
+
credentials: m
|
|
6239
6239
|
});
|
|
6240
|
-
if (
|
|
6240
|
+
if (v.status === 204)
|
|
6241
6241
|
return null;
|
|
6242
|
-
if (!
|
|
6242
|
+
if (!v.ok)
|
|
6243
6243
|
throw new Error(
|
|
6244
|
-
(s = await
|
|
6244
|
+
(s = await v.text()) != null ? s : "Failed to fetch the chat response."
|
|
6245
6245
|
);
|
|
6246
|
-
if (!
|
|
6246
|
+
if (!v.body)
|
|
6247
6247
|
throw new Error("The response body is empty.");
|
|
6248
|
-
return this.processResponseStream(
|
|
6248
|
+
return this.processResponseStream(v.body);
|
|
6249
6249
|
}
|
|
6250
6250
|
}, Vn = class extends vl {
|
|
6251
6251
|
constructor(e = {}) {
|
|
@@ -6279,13 +6279,13 @@ var vl = class {
|
|
|
6279
6279
|
onData: u,
|
|
6280
6280
|
sendAutomaticallyWhen: l
|
|
6281
6281
|
}) {
|
|
6282
|
-
this.activeResponse = void 0, this.jobExecutor = new
|
|
6283
|
-
var
|
|
6282
|
+
this.activeResponse = void 0, this.jobExecutor = new hl(), this.sendMessage = async (d, h) => {
|
|
6283
|
+
var m, b, v, _;
|
|
6284
6284
|
if (d == null) {
|
|
6285
6285
|
await this.makeRequest({
|
|
6286
6286
|
trigger: "submit-message",
|
|
6287
|
-
messageId: (
|
|
6288
|
-
...
|
|
6287
|
+
messageId: (m = this.lastMessage) == null ? void 0 : m.id,
|
|
6288
|
+
...h
|
|
6289
6289
|
});
|
|
6290
6290
|
return;
|
|
6291
6291
|
}
|
|
@@ -6314,30 +6314,30 @@ var vl = class {
|
|
|
6314
6314
|
} else
|
|
6315
6315
|
this.state.pushMessage({
|
|
6316
6316
|
...I,
|
|
6317
|
-
id: (
|
|
6318
|
-
role: (
|
|
6317
|
+
id: (v = I.id) != null ? v : this.generateId(),
|
|
6318
|
+
role: (_ = I.role) != null ? _ : "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
|
+
...h
|
|
6325
6325
|
});
|
|
6326
6326
|
}, this.regenerate = async ({
|
|
6327
6327
|
messageId: d,
|
|
6328
|
-
...
|
|
6328
|
+
...h
|
|
6329
6329
|
} = {}) => {
|
|
6330
|
-
const
|
|
6331
|
-
if (
|
|
6330
|
+
const m = d == null ? this.state.messages.length - 1 : this.state.messages.findIndex((b) => b.id === d);
|
|
6331
|
+
if (m === -1)
|
|
6332
6332
|
throw new Error(`message ${d} not found`);
|
|
6333
6333
|
this.state.messages = this.state.messages.slice(
|
|
6334
6334
|
0,
|
|
6335
6335
|
// if the message is a user message, we need to include it in the request:
|
|
6336
|
-
this.messages[
|
|
6336
|
+
this.messages[m].role === "assistant" ? m : m + 1
|
|
6337
6337
|
), await this.makeRequest({
|
|
6338
6338
|
trigger: "regenerate-message",
|
|
6339
6339
|
messageId: d,
|
|
6340
|
-
...
|
|
6340
|
+
...h
|
|
6341
6341
|
});
|
|
6342
6342
|
}, this.resumeStream = async (d = {}) => {
|
|
6343
6343
|
await this.makeRequest({ trigger: "resume-stream", ...d });
|
|
@@ -6345,35 +6345,35 @@ var vl = 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:
|
|
6349
|
-
reason:
|
|
6348
|
+
approved: h,
|
|
6349
|
+
reason: m
|
|
6350
6350
|
}) => this.jobExecutor.run(async () => {
|
|
6351
|
-
var b,
|
|
6352
|
-
const
|
|
6351
|
+
var b, v;
|
|
6352
|
+
const _ = this.state.messages, I = _[_.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:
|
|
6355
|
+
approval: { id: d, approved: h, reason: m }
|
|
6356
6356
|
} : f;
|
|
6357
|
-
this.state.replaceMessage(
|
|
6357
|
+
this.state.replaceMessage(_.length - 1, {
|
|
6358
6358
|
...I,
|
|
6359
6359
|
parts: I.parts.map(k)
|
|
6360
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: (
|
|
6362
|
+
messageId: (v = this.lastMessage) == null ? void 0 : v.id
|
|
6363
6363
|
});
|
|
6364
6364
|
}), this.addToolOutput = async ({
|
|
6365
6365
|
state: d = "output-available",
|
|
6366
|
-
tool:
|
|
6367
|
-
toolCallId:
|
|
6366
|
+
tool: h,
|
|
6367
|
+
toolCallId: m,
|
|
6368
6368
|
output: b,
|
|
6369
|
-
errorText:
|
|
6369
|
+
errorText: v
|
|
6370
6370
|
}) => this.jobExecutor.run(async () => {
|
|
6371
|
-
var
|
|
6372
|
-
const k = this.state.messages, f = k[k.length - 1], $ = (Z) => dt(Z) && Z.toolCallId ===
|
|
6371
|
+
var _, I;
|
|
6372
|
+
const k = this.state.messages, f = k[k.length - 1], $ = (Z) => dt(Z) && Z.toolCallId === m ? { ...Z, state: d, output: b, errorText: v } : Z;
|
|
6373
6373
|
this.state.replaceMessage(k.length - 1, {
|
|
6374
6374
|
...f,
|
|
6375
6375
|
parts: f.parts.map($)
|
|
6376
|
-
}), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map($)), this.status !== "streaming" && this.status !== "submitted" && ((
|
|
6376
|
+
}), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map($)), this.status !== "streaming" && this.status !== "submitted" && ((_ = this.sendAutomaticallyWhen) != null && _.call(this, { messages: this.state.messages })) && this.makeRequest({
|
|
6377
6377
|
trigger: "submit-message",
|
|
6378
6378
|
messageId: (I = this.lastMessage) == null ? void 0 : I.id
|
|
6379
6379
|
});
|
|
@@ -6421,77 +6421,77 @@ var vl = 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,
|
|
6424
|
+
let l = !1, d = !1, h = !1;
|
|
6425
6425
|
try {
|
|
6426
|
-
const
|
|
6426
|
+
const m = {
|
|
6427
6427
|
state: pl({
|
|
6428
6428
|
lastMessage: this.state.snapshot(u),
|
|
6429
6429
|
messageId: this.generateId()
|
|
6430
6430
|
}),
|
|
6431
6431
|
abortController: new AbortController()
|
|
6432
6432
|
};
|
|
6433
|
-
|
|
6433
|
+
m.abortController.signal.addEventListener("abort", () => {
|
|
6434
6434
|
l = !0;
|
|
6435
|
-
}), this.activeResponse =
|
|
6435
|
+
}), this.activeResponse = m;
|
|
6436
6436
|
let b;
|
|
6437
6437
|
if (e === "resume-stream") {
|
|
6438
|
-
const
|
|
6438
|
+
const _ = await this.transport.reconnectToStream({
|
|
6439
6439
|
chatId: this.id,
|
|
6440
6440
|
metadata: t,
|
|
6441
6441
|
headers: r,
|
|
6442
6442
|
body: n
|
|
6443
6443
|
});
|
|
6444
|
-
if (
|
|
6444
|
+
if (_ == null) {
|
|
6445
6445
|
this.setStatus({ status: "ready" });
|
|
6446
6446
|
return;
|
|
6447
6447
|
}
|
|
6448
|
-
b =
|
|
6448
|
+
b = _;
|
|
6449
6449
|
} else
|
|
6450
6450
|
b = await this.transport.sendMessages({
|
|
6451
6451
|
chatId: this.id,
|
|
6452
6452
|
messages: this.state.messages,
|
|
6453
|
-
abortSignal:
|
|
6453
|
+
abortSignal: m.abortController.signal,
|
|
6454
6454
|
metadata: t,
|
|
6455
6455
|
headers: r,
|
|
6456
6456
|
body: n,
|
|
6457
6457
|
trigger: e,
|
|
6458
6458
|
messageId: o
|
|
6459
6459
|
});
|
|
6460
|
-
const
|
|
6460
|
+
const v = (_) => (
|
|
6461
6461
|
// serialize the job execution to avoid race conditions:
|
|
6462
6462
|
this.jobExecutor.run(
|
|
6463
|
-
() =>
|
|
6464
|
-
state:
|
|
6463
|
+
() => _({
|
|
6464
|
+
state: m.state,
|
|
6465
6465
|
write: () => {
|
|
6466
6466
|
var I;
|
|
6467
|
-
this.setStatus({ status: "streaming" }),
|
|
6467
|
+
this.setStatus({ status: "streaming" }), m.state.message.id === ((I = this.lastMessage) == null ? void 0 : I.id) ? this.state.replaceMessage(
|
|
6468
6468
|
this.state.messages.length - 1,
|
|
6469
|
-
|
|
6470
|
-
) : this.state.pushMessage(
|
|
6469
|
+
m.state.message
|
|
6470
|
+
) : this.state.pushMessage(m.state.message);
|
|
6471
6471
|
}
|
|
6472
6472
|
})
|
|
6473
6473
|
)
|
|
6474
6474
|
);
|
|
6475
|
-
await
|
|
6475
|
+
await ml({
|
|
6476
6476
|
stream: fl({
|
|
6477
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:
|
|
6483
|
-
onError: (
|
|
6484
|
-
throw
|
|
6482
|
+
runUpdateMessageJob: v,
|
|
6483
|
+
onError: (_) => {
|
|
6484
|
+
throw _;
|
|
6485
6485
|
}
|
|
6486
6486
|
}),
|
|
6487
|
-
onError: (
|
|
6488
|
-
throw
|
|
6487
|
+
onError: (_) => {
|
|
6488
|
+
throw _;
|
|
6489
6489
|
}
|
|
6490
6490
|
}), this.setStatus({ status: "ready" });
|
|
6491
|
-
} catch (
|
|
6492
|
-
if (l ||
|
|
6491
|
+
} catch (m) {
|
|
6492
|
+
if (l || m.name === "AbortError")
|
|
6493
6493
|
return l = !0, this.setStatus({ status: "ready" }), null;
|
|
6494
|
-
|
|
6494
|
+
h = !0, m instanceof TypeError && (m.message.toLowerCase().includes("fetch") || m.message.toLowerCase().includes("network")) && (d = !0), this.onError && m instanceof Error && this.onError(m), this.setStatus({ status: "error", error: m });
|
|
6495
6495
|
} finally {
|
|
6496
6496
|
try {
|
|
6497
6497
|
(i = this.onFinish) == null || i.call(this, {
|
|
@@ -6499,15 +6499,15 @@ var vl = class {
|
|
|
6499
6499
|
messages: this.state.messages,
|
|
6500
6500
|
isAbort: l,
|
|
6501
6501
|
isDisconnect: d,
|
|
6502
|
-
isError:
|
|
6502
|
+
isError: h,
|
|
6503
6503
|
finishReason: (s = this.activeResponse) == null ? void 0 : s.state.finishReason
|
|
6504
6504
|
});
|
|
6505
|
-
} catch (
|
|
6506
|
-
console.error(
|
|
6505
|
+
} catch (m) {
|
|
6506
|
+
console.error(m);
|
|
6507
6507
|
}
|
|
6508
6508
|
this.activeResponse = void 0;
|
|
6509
6509
|
}
|
|
6510
|
-
(a = this.sendAutomaticallyWhen) != null && a.call(this, { messages: this.state.messages }) && !
|
|
6510
|
+
(a = this.sendAutomaticallyWhen) != null && a.call(this, { messages: this.state.messages }) && !h && await this.makeRequest({
|
|
6511
6511
|
trigger: "submit-message",
|
|
6512
6512
|
messageId: (c = this.lastMessage) == null ? void 0 : c.id,
|
|
6513
6513
|
metadata: t,
|
|
@@ -6515,15 +6515,15 @@ var vl = class {
|
|
|
6515
6515
|
body: n
|
|
6516
6516
|
});
|
|
6517
6517
|
}
|
|
6518
|
-
},
|
|
6519
|
-
return
|
|
6518
|
+
}, mr = globalThis && globalThis.__assign || function() {
|
|
6519
|
+
return mr = Object.assign || function(e) {
|
|
6520
6520
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
6521
6521
|
t = arguments[r];
|
|
6522
6522
|
for (var o in t)
|
|
6523
6523
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
6524
6524
|
}
|
|
6525
6525
|
return e;
|
|
6526
|
-
},
|
|
6526
|
+
}, mr.apply(this, arguments);
|
|
6527
6527
|
};
|
|
6528
6528
|
globalThis && globalThis.__awaiter;
|
|
6529
6529
|
globalThis && globalThis.__generator;
|
|
@@ -6571,7 +6571,7 @@ var yl = 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
|
|
6574
|
+
const hr = (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
6577
|
), Il = (e) => {
|
|
@@ -6623,7 +6623,7 @@ const kl = ({
|
|
|
6623
6623
|
class: El(
|
|
6624
6624
|
"lucide",
|
|
6625
6625
|
c.class,
|
|
6626
|
-
...e ? [`lucide-${
|
|
6626
|
+
...e ? [`lucide-${hr(Il(e))}-icon`, `lucide-${hr(e)}`] : ["lucide-icon"]
|
|
6627
6627
|
)
|
|
6628
6628
|
},
|
|
6629
6629
|
[...t.map((l) => rt(...l)), ...u.default ? [u.default()] : []]
|
|
@@ -6689,19 +6689,19 @@ const Zl = Ge("x", [
|
|
|
6689
6689
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
6690
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
|
-
class: "
|
|
6693
|
-
}, Pl = { class: "
|
|
6692
|
+
class: "chat-empty-state"
|
|
6693
|
+
}, Pl = { class: "chat-empty-heading" }, Al = { class: "chat-empty-greeting" }, Rl = {
|
|
6694
6694
|
key: 0,
|
|
6695
6695
|
class: "flex justify-end"
|
|
6696
|
-
},
|
|
6696
|
+
}, xl = { class: "message-user" }, jl = {
|
|
6697
6697
|
key: 1,
|
|
6698
|
-
class: "
|
|
6699
|
-
}, Cl = {
|
|
6698
|
+
class: "message-assistant"
|
|
6699
|
+
}, Cl = {
|
|
6700
6700
|
key: 1,
|
|
6701
6701
|
src: Xn,
|
|
6702
6702
|
alt: "",
|
|
6703
6703
|
class: "w-16"
|
|
6704
|
-
},
|
|
6704
|
+
}, Ml = ["disabled"], Dl = { class: "mt-5" }, Ll = /* @__PURE__ */ Bn({
|
|
6705
6705
|
__name: "ChatbotComponent",
|
|
6706
6706
|
props: {
|
|
6707
6707
|
clientId: { type: String, default: "" },
|
|
@@ -6723,10 +6723,10 @@ const Zl = Ge("x", [
|
|
|
6723
6723
|
try {
|
|
6724
6724
|
if (!n.value.trim())
|
|
6725
6725
|
return;
|
|
6726
|
-
const
|
|
6727
|
-
n.value = "", i.value = !0, d.preventDefault(), await a.sendMessage({ text:
|
|
6728
|
-
} catch (
|
|
6729
|
-
console.error(
|
|
6726
|
+
const h = n.value.trim();
|
|
6727
|
+
n.value = "", i.value = !0, d.preventDefault(), await a.sendMessage({ text: h });
|
|
6728
|
+
} catch (h) {
|
|
6729
|
+
console.error(h);
|
|
6730
6730
|
} finally {
|
|
6731
6731
|
i.value = !1;
|
|
6732
6732
|
}
|
|
@@ -6745,20 +6745,20 @@ const Zl = Ge("x", [
|
|
|
6745
6745
|
});
|
|
6746
6746
|
},
|
|
6747
6747
|
{ deep: !0 }
|
|
6748
|
-
), (d,
|
|
6749
|
-
var
|
|
6750
|
-
return
|
|
6751
|
-
o.value ? (
|
|
6748
|
+
), (d, h) => {
|
|
6749
|
+
var m;
|
|
6750
|
+
return W(), G(we, null, [
|
|
6751
|
+
o.value ? (W(), G("div", {
|
|
6752
6752
|
key: 0,
|
|
6753
6753
|
class: "bg-[#ffffff00] absolute w-full h-full",
|
|
6754
|
-
onClick:
|
|
6755
|
-
})) :
|
|
6754
|
+
onClick: h[0] || (h[0] = (b) => o.value = !1)
|
|
6755
|
+
})) : Pe("", !0),
|
|
6756
6756
|
D("div", $l, [
|
|
6757
6757
|
D("div", {
|
|
6758
6758
|
class: qn(["ai-card chat-popup transition-all duration-7", { "opacity-0": !o.value, "opacity-100": o.value }])
|
|
6759
6759
|
}, [
|
|
6760
6760
|
D("div", Tl, [
|
|
6761
|
-
|
|
6761
|
+
h[2] || (h[2] = D("p", { class: "ai-hello" }, "Hi, I’m Boko AI", -1)),
|
|
6762
6762
|
D("button", {
|
|
6763
6763
|
class: "ai-close",
|
|
6764
6764
|
onClick: l
|
|
@@ -6771,33 +6771,33 @@ const Zl = Ge("x", [
|
|
|
6771
6771
|
ref: s,
|
|
6772
6772
|
class: "chat-popup-message"
|
|
6773
6773
|
}, [
|
|
6774
|
-
de(a).messages.length === 0 ? (
|
|
6775
|
-
D("div",
|
|
6776
|
-
D("p",
|
|
6777
|
-
|
|
6774
|
+
de(a).messages.length === 0 ? (W(), G("div", Nl, [
|
|
6775
|
+
D("div", Pl, [
|
|
6776
|
+
D("p", Al, " Hello " + He(e.clientId), 1),
|
|
6777
|
+
h[3] || (h[3] = D("p", { class: "chat-empty-title" }, " How Can I Help You Today ? ", -1))
|
|
6778
6778
|
]),
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
])) :
|
|
6782
|
-
(
|
|
6783
|
-
key: b.id ??
|
|
6779
|
+
h[4] || (h[4] = D("p", { class: "chat-empty-description" }, " I’m Boko, your friendly assistant. ", -1)),
|
|
6780
|
+
h[5] || (h[5] = D("p", { class: "chat-empty-description" }, " Here to help — anytime you’re ready! ", -1))
|
|
6781
|
+
])) : Pe("", !0),
|
|
6782
|
+
(W(!0), G(we, null, kt(de(a).messages, (b, v) => (W(), G("div", {
|
|
6783
|
+
key: b.id ?? v,
|
|
6784
6784
|
class: "mb-3"
|
|
6785
6785
|
}, [
|
|
6786
|
-
(
|
|
6787
|
-
key: `${b.id}-${
|
|
6786
|
+
(W(!0), G(we, null, kt(b == null ? void 0 : b.parts, (_, I) => (W(), G(we, {
|
|
6787
|
+
key: `${b.id}-${_.type}-${I}`
|
|
6788
6788
|
}, [
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
(
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
(
|
|
6796
|
-
])
|
|
6797
|
-
]))
|
|
6789
|
+
(_ == null ? void 0 : _.type) === "text" ? (W(), G(we, { key: 0 }, [
|
|
6790
|
+
b.role === "user" ? (W(), G("div", Rl, [
|
|
6791
|
+
D("div", xl, [
|
|
6792
|
+
D("div", null, He(_ == null ? void 0 : _.text), 1)
|
|
6793
|
+
])
|
|
6794
|
+
])) : (W(), G("div", jl, [
|
|
6795
|
+
D("div", null, He(_ == null ? void 0 : _.text), 1)
|
|
6796
|
+
]))
|
|
6797
|
+
], 64)) : Pe("", !0)
|
|
6798
6798
|
], 64))), 128))
|
|
6799
6799
|
]))), 128)),
|
|
6800
|
-
i.value ? (
|
|
6800
|
+
i.value ? (W(), G("img", Cl)) : Pe("", !0)
|
|
6801
6801
|
], 512),
|
|
6802
6802
|
D("form", {
|
|
6803
6803
|
onSubmit: c,
|
|
@@ -6805,28 +6805,28 @@ const Zl = Ge("x", [
|
|
|
6805
6805
|
}, [
|
|
6806
6806
|
Gn(D("input", {
|
|
6807
6807
|
class: "ai-input",
|
|
6808
|
-
"onUpdate:modelValue":
|
|
6808
|
+
"onUpdate:modelValue": h[1] || (h[1] = (b) => n.value = b),
|
|
6809
6809
|
placeholder: "Ask me anything…"
|
|
6810
6810
|
}, null, 512), [
|
|
6811
6811
|
[Hn, n.value]
|
|
6812
6812
|
]),
|
|
6813
6813
|
D("button", {
|
|
6814
6814
|
class: "ai-send",
|
|
6815
|
-
disabled: !n.value || ((
|
|
6815
|
+
disabled: !n.value || ((m = n.value) == null ? void 0 : m.length) == 0 || i.value
|
|
6816
6816
|
}, [
|
|
6817
6817
|
Et(de(zl), { class: "w-5 h-5 text-white" })
|
|
6818
|
-
], 8,
|
|
6818
|
+
], 8, Ml)
|
|
6819
6819
|
], 32)
|
|
6820
6820
|
], 2),
|
|
6821
|
-
D("div",
|
|
6821
|
+
D("div", Dl, [
|
|
6822
6822
|
D("button", {
|
|
6823
6823
|
class: "chat-button",
|
|
6824
6824
|
onClick: u
|
|
6825
6825
|
}, [
|
|
6826
|
-
o.value ? (
|
|
6826
|
+
o.value ? (W(), zt(de(Sl), {
|
|
6827
6827
|
key: 1,
|
|
6828
6828
|
class: "text-white"
|
|
6829
|
-
})) : (
|
|
6829
|
+
})) : (W(), zt(de(Ol), {
|
|
6830
6830
|
key: 0,
|
|
6831
6831
|
class: "text-white"
|
|
6832
6832
|
}))
|
|
@@ -6838,5 +6838,5 @@ const Zl = Ge("x", [
|
|
|
6838
6838
|
}
|
|
6839
6839
|
});
|
|
6840
6840
|
export {
|
|
6841
|
-
|
|
6841
|
+
Ll as ChatbotComponent
|
|
6842
6842
|
};
|