@quidgest/chatbot 0.6.1 → 0.6.2
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/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance as ut, computed as w, inject as dt, ref as q, provide as an, defineComponent as V, openBlock as
|
|
1
|
+
import { getCurrentInstance as ut, computed as w, inject as dt, ref as q, provide as an, defineComponent as V, openBlock as y, createElementBlock as x, normalizeClass as X, normalizeStyle as Ee, unref as f, toRef as Le, withModifiers as Ue, createVNode as D, createCommentVNode as U, createElementVNode as M, renderSlot as F, createTextVNode as Qe, toDisplayString as re, createBlock as Z, resolveDynamicComponent as Bt, h as at, mergeProps as de, useTemplateRef as Lt, withCtx as R, normalizeProps as Re, guardReactiveProps as je, mergeModels as be, useModel as Te, watch as se, createSlots as Rt, withDirectives as Tt, vModelDynamic as ln, useId as rn, onMounted as Me, onUnmounted as Mt, readonly as sn, customRef as cn, getCurrentScope as un, onScopeDispose as qt, shallowRef as lt, nextTick as De, toValue as pt, reactive as ze, onBeforeUnmount as dn, Fragment as ve, Teleport as pn, Transition as bt, renderList as qe, toHandlers as fn, vModelText as vn, resolveComponent as gn, withKeys as mn, onBeforeMount as bn } from "vue";
|
|
2
2
|
import Nt from "axios";
|
|
3
3
|
import hn from "markdown-it";
|
|
4
4
|
function it(e) {
|
|
@@ -52,7 +52,7 @@ const _n = ["id"], xn = /* @__PURE__ */ V({
|
|
|
52
52
|
const n = e, t = w(() => ({
|
|
53
53
|
"font-size": n.size !== 48 ? `${n.size}px` : void 0
|
|
54
54
|
}));
|
|
55
|
-
return (o, l) => (
|
|
55
|
+
return (o, l) => (y(), x("div", {
|
|
56
56
|
id: n.id,
|
|
57
57
|
class: X(["q-spinner-loader", n.class]),
|
|
58
58
|
style: Ee(t.value)
|
|
@@ -168,16 +168,16 @@ function Xe(e, n, t) {
|
|
|
168
168
|
function Rn(e) {
|
|
169
169
|
return e > 50 ? "#000" : "#fff";
|
|
170
170
|
}
|
|
171
|
-
const
|
|
171
|
+
const Tn = Symbol.for("q-theme");
|
|
172
172
|
function Ut() {
|
|
173
|
-
const e = dt(
|
|
173
|
+
const e = dt(Tn);
|
|
174
174
|
if (!e)
|
|
175
175
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
176
176
|
return e;
|
|
177
177
|
}
|
|
178
178
|
function Gt(e) {
|
|
179
179
|
const n = w(() => f(e)), t = w(
|
|
180
|
-
() => n.value ? !
|
|
180
|
+
() => n.value ? !Mn(n.value) : !1
|
|
181
181
|
), o = w(() => {
|
|
182
182
|
const l = n.value;
|
|
183
183
|
if (!l) return;
|
|
@@ -206,7 +206,7 @@ function Gt(e) {
|
|
|
206
206
|
});
|
|
207
207
|
return { isUtilityColor: t, style: o };
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Mn(e) {
|
|
210
210
|
return e.startsWith("#") || e.startsWith("rgb") || e.startsWith("hsl");
|
|
211
211
|
}
|
|
212
212
|
const qn = ["id", "disabled"], Nn = {
|
|
@@ -253,18 +253,18 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
253
253
|
t.class
|
|
254
254
|
];
|
|
255
255
|
}), d = w(() => {
|
|
256
|
-
var u, s, v, b,
|
|
256
|
+
var u, s, v, b, h, _;
|
|
257
257
|
if (!i.value)
|
|
258
258
|
return {
|
|
259
259
|
"--q-button-main-color": (u = r.value) == null ? void 0 : u.mainColor,
|
|
260
260
|
"--q-button-main-color-rgb": (s = r.value) == null ? void 0 : s.mainColorRgb,
|
|
261
261
|
"--q-button-on-main-color": (v = r.value) == null ? void 0 : v.onMainColor,
|
|
262
262
|
"--q-button-hover-color": (b = r.value) == null ? void 0 : b.hoverColor,
|
|
263
|
-
"--q-button-hover-color-rgb": (
|
|
263
|
+
"--q-button-hover-color-rgb": (h = r.value) == null ? void 0 : h.hoverColorRgb,
|
|
264
264
|
"--q-button-on-hover-color": (_ = r.value) == null ? void 0 : _.onHoverColor
|
|
265
265
|
};
|
|
266
266
|
});
|
|
267
|
-
return (u, s) => (
|
|
267
|
+
return (u, s) => (y(), x("button", {
|
|
268
268
|
id: t.id,
|
|
269
269
|
type: "button",
|
|
270
270
|
class: X(c.value),
|
|
@@ -272,10 +272,10 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
272
272
|
style: Ee(d.value),
|
|
273
273
|
onClick: Ue(a, ["stop", "prevent"])
|
|
274
274
|
}, [
|
|
275
|
-
t.loading ? (
|
|
275
|
+
t.loading ? (y(), x("div", Nn, [
|
|
276
276
|
D(f(En))
|
|
277
|
-
])) :
|
|
278
|
-
|
|
277
|
+
])) : U("v-if", !0),
|
|
278
|
+
M("span", Fn, [
|
|
279
279
|
F(u.$slots, "default"),
|
|
280
280
|
Qe(
|
|
281
281
|
" " + re(t.label),
|
|
@@ -314,7 +314,7 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
314
314
|
color: n.color !== void 0 && n.color !== "primary" ? (a = o.value) == null ? void 0 : a.mainColor : void 0
|
|
315
315
|
};
|
|
316
316
|
});
|
|
317
|
-
return (a, i) => (
|
|
317
|
+
return (a, i) => (y(), Z(Bt(t.value), {
|
|
318
318
|
id: n.id,
|
|
319
319
|
class: X(n.class),
|
|
320
320
|
icon: n.icon,
|
|
@@ -332,7 +332,7 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
332
332
|
},
|
|
333
333
|
setup(e) {
|
|
334
334
|
const n = e, t = w(() => n.variant ? `${n.library}-${n.variant}` : n.library), o = w(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon);
|
|
335
|
-
return (l, a) => (
|
|
335
|
+
return (l, a) => (y(), x("i", {
|
|
336
336
|
id: n.id,
|
|
337
337
|
class: X(["q-icon", "q-icon__font", t.value, o.value, n.class])
|
|
338
338
|
}, null, 10, Un));
|
|
@@ -346,7 +346,7 @@ const qn = ["id", "disabled"], Nn = {
|
|
|
346
346
|
},
|
|
347
347
|
setup(e) {
|
|
348
348
|
const n = e;
|
|
349
|
-
return (t, o) => (
|
|
349
|
+
return (t, o) => (y(), x("img", {
|
|
350
350
|
id: n.id,
|
|
351
351
|
src: n.icon,
|
|
352
352
|
class: X(["q-icon", "q-icon__img", n.class])
|
|
@@ -497,7 +497,7 @@ const Wn = /* @__PURE__ */ V({
|
|
|
497
497
|
function a() {
|
|
498
498
|
o("unloaded");
|
|
499
499
|
}
|
|
500
|
-
return (i, r) => (
|
|
500
|
+
return (i, r) => (y(), Z(f(Vn), {
|
|
501
501
|
id: t.id,
|
|
502
502
|
class: X(["q-icon", "q-icon__svg", t.class]),
|
|
503
503
|
src: t.bundle,
|
|
@@ -527,7 +527,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
527
527
|
disabled: Le(n, "disabled"),
|
|
528
528
|
borderless: Le(n, "borderless")
|
|
529
529
|
}
|
|
530
|
-
}), (t, o) => (
|
|
530
|
+
}), (t, o) => (y(), x("div", {
|
|
531
531
|
id: n.id,
|
|
532
532
|
class: X([
|
|
533
533
|
"q-button-group",
|
|
@@ -559,12 +559,12 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
559
559
|
},
|
|
560
560
|
n.class
|
|
561
561
|
]);
|
|
562
|
-
return (o, l) => (
|
|
562
|
+
return (o, l) => (y(), x("div", {
|
|
563
563
|
id: n.id,
|
|
564
564
|
class: X(t.value)
|
|
565
565
|
}, [
|
|
566
566
|
F(o.$slots, "prepend"),
|
|
567
|
-
|
|
567
|
+
M("label", de({
|
|
568
568
|
for: n.for
|
|
569
569
|
}, o.$attrs), [
|
|
570
570
|
F(o.$slots, "default", {}, () => [
|
|
@@ -615,11 +615,11 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
615
615
|
]);
|
|
616
616
|
return n({
|
|
617
617
|
fieldRef: o
|
|
618
|
-
}), (i, r) => (
|
|
618
|
+
}), (i, r) => (y(), x("div", {
|
|
619
619
|
id: t.id,
|
|
620
620
|
class: X(a.value)
|
|
621
621
|
}, [
|
|
622
|
-
t.label ? (
|
|
622
|
+
t.label ? (y(), Z(f(zt), {
|
|
623
623
|
key: 0,
|
|
624
624
|
class: "q-field__label",
|
|
625
625
|
label: t.label,
|
|
@@ -634,30 +634,30 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
634
634
|
]),
|
|
635
635
|
_: 3
|
|
636
636
|
/* FORWARDED */
|
|
637
|
-
}, 8, ["label", "for", "required"])) :
|
|
637
|
+
}, 8, ["label", "for", "required"])) : U("v-if", !0),
|
|
638
638
|
F(i.$slots, "control", {}, () => [
|
|
639
|
-
|
|
639
|
+
M(
|
|
640
640
|
"div",
|
|
641
641
|
de({
|
|
642
642
|
ref: "field",
|
|
643
643
|
class: "q-field__control"
|
|
644
644
|
}, i.$attrs),
|
|
645
645
|
[
|
|
646
|
-
i.$slots.prepend ? (
|
|
646
|
+
i.$slots.prepend ? (y(), x("div", lo, [
|
|
647
647
|
F(i.$slots, "prepend")
|
|
648
|
-
])) :
|
|
648
|
+
])) : U("v-if", !0),
|
|
649
649
|
F(i.$slots, "default"),
|
|
650
|
-
i.$slots.append ? (
|
|
650
|
+
i.$slots.append ? (y(), x("div", io, [
|
|
651
651
|
F(i.$slots, "append")
|
|
652
|
-
])) :
|
|
652
|
+
])) : U("v-if", !0)
|
|
653
653
|
],
|
|
654
654
|
16
|
|
655
655
|
/* FULL_PROPS */
|
|
656
656
|
)
|
|
657
657
|
]),
|
|
658
|
-
i.$slots.extras ? (
|
|
658
|
+
i.$slots.extras ? (y(), x("div", ro, [
|
|
659
659
|
F(i.$slots, "extras")
|
|
660
|
-
])) :
|
|
660
|
+
])) : U("v-if", !0)
|
|
661
661
|
], 10, ao));
|
|
662
662
|
}
|
|
663
663
|
}), Vt = K(so), co = {
|
|
@@ -680,7 +680,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
680
680
|
function l(a) {
|
|
681
681
|
o("click", a);
|
|
682
682
|
}
|
|
683
|
-
return (a, i) => (
|
|
683
|
+
return (a, i) => (y(), Z(f(oe), {
|
|
684
684
|
id: t.id,
|
|
685
685
|
class: X(["q-clear-btn", t.class]),
|
|
686
686
|
"aria-label": t.texts.clearValue,
|
|
@@ -727,27 +727,27 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
727
727
|
}),
|
|
728
728
|
emits: /* @__PURE__ */ be(["click:clear"], ["update:modelValue"]),
|
|
729
729
|
setup(e, { expose: n, emit: t }) {
|
|
730
|
-
const o = e, l = t, a =
|
|
730
|
+
const o = e, l = t, a = Te(e, "modelValue"), i = w({
|
|
731
731
|
get: () => a.value,
|
|
732
|
-
set: (
|
|
732
|
+
set: (h) => {
|
|
733
733
|
const _ = o.maxLength;
|
|
734
|
-
a.value = _ ?
|
|
734
|
+
a.value = _ ? h == null ? void 0 : h.slice(0, _) : h;
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
|
-
se(a, (
|
|
737
|
+
se(a, (h) => i.value = h, { immediate: !0 });
|
|
738
738
|
const r = vt(o.id), c = q(null), d = q(null), u = w(
|
|
739
739
|
() => o.readonly || o.disabled ? void 0 : o.placeholder
|
|
740
740
|
), s = w(() => o.clearable && !o.readonly && !o.disabled), v = w(() => s.value && a.value);
|
|
741
|
-
function b(
|
|
742
|
-
s.value && (a.value = "", l("click:clear",
|
|
741
|
+
function b(h) {
|
|
742
|
+
s.value && (a.value = "", l("click:clear", h));
|
|
743
743
|
}
|
|
744
744
|
return n({
|
|
745
745
|
fieldRef: w(() => {
|
|
746
|
-
var
|
|
747
|
-
return (
|
|
746
|
+
var h;
|
|
747
|
+
return (h = c.value) == null ? void 0 : h.fieldRef;
|
|
748
748
|
}),
|
|
749
749
|
inputRef: d
|
|
750
|
-
}), (
|
|
750
|
+
}), (h, _) => (y(), Z(f(Vt), {
|
|
751
751
|
ref_key: "fieldRef",
|
|
752
752
|
ref: c,
|
|
753
753
|
class: X(["q-text-field", o.class]),
|
|
@@ -760,13 +760,13 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
760
760
|
invalid: o.invalid
|
|
761
761
|
}, Rt({
|
|
762
762
|
"label.prepend": R(() => [
|
|
763
|
-
F(
|
|
763
|
+
F(h.$slots, "label.prepend")
|
|
764
764
|
]),
|
|
765
765
|
"label.append": R(() => [
|
|
766
|
-
F(
|
|
766
|
+
F(h.$slots, "label.append")
|
|
767
767
|
]),
|
|
768
768
|
default: R(() => [
|
|
769
|
-
|
|
769
|
+
Tt(M("input", de({
|
|
770
770
|
id: f(r),
|
|
771
771
|
ref_key: "inputRef",
|
|
772
772
|
ref: d,
|
|
@@ -778,37 +778,37 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
|
|
|
778
778
|
placeholder: u.value,
|
|
779
779
|
readonly: o.readonly,
|
|
780
780
|
disabled: o.disabled
|
|
781
|
-
},
|
|
781
|
+
}, h.$attrs), null, 16, vo), [
|
|
782
782
|
[ln, i.value]
|
|
783
783
|
])
|
|
784
784
|
]),
|
|
785
785
|
_: 2
|
|
786
786
|
/* DYNAMIC */
|
|
787
787
|
}, [
|
|
788
|
-
|
|
788
|
+
h.$slots.prepend ? {
|
|
789
789
|
name: "prepend",
|
|
790
790
|
fn: R(() => [
|
|
791
|
-
F(
|
|
791
|
+
F(h.$slots, "prepend")
|
|
792
792
|
]),
|
|
793
793
|
key: "0"
|
|
794
794
|
} : void 0,
|
|
795
|
-
|
|
795
|
+
h.$slots.append || v.value ? {
|
|
796
796
|
name: "append",
|
|
797
797
|
fn: R(() => [
|
|
798
|
-
F(
|
|
799
|
-
v.value ? (
|
|
798
|
+
F(h.$slots, "append"),
|
|
799
|
+
v.value ? (y(), Z(f(fo), {
|
|
800
800
|
key: 0,
|
|
801
801
|
"data-testid": "q-text-field__clear-button",
|
|
802
802
|
texts: o.texts,
|
|
803
803
|
onClick: b
|
|
804
|
-
}, null, 8, ["texts"])) :
|
|
804
|
+
}, null, 8, ["texts"])) : U("v-if", !0)
|
|
805
805
|
]),
|
|
806
806
|
key: "1"
|
|
807
807
|
} : void 0,
|
|
808
|
-
|
|
808
|
+
h.$slots.extras ? {
|
|
809
809
|
name: "extras",
|
|
810
810
|
fn: R(() => [
|
|
811
|
-
F(
|
|
811
|
+
F(h.$slots, "extras")
|
|
812
812
|
]),
|
|
813
813
|
key: "2"
|
|
814
814
|
} : void 0
|
|
@@ -873,15 +873,15 @@ const ho = { ref: "layer" }, yo = /* @__PURE__ */ V({
|
|
|
873
873
|
});
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
|
-
return
|
|
876
|
+
return Me(() => {
|
|
877
877
|
a == null || a.register(), document.addEventListener("keydown", r), i.push(() => {
|
|
878
878
|
document.removeEventListener("keydown", r);
|
|
879
879
|
}), document.addEventListener("focusin", c), i.push(() => {
|
|
880
880
|
document.removeEventListener("focusin", c);
|
|
881
881
|
}), u();
|
|
882
|
-
}),
|
|
882
|
+
}), Mt(() => {
|
|
883
883
|
a == null || a.unregister(), i.forEach((s) => s()), i = [];
|
|
884
|
-
}), (s, v) => (
|
|
884
|
+
}), (s, v) => (y(), x(
|
|
885
885
|
"div",
|
|
886
886
|
ho,
|
|
887
887
|
[
|
|
@@ -913,7 +913,7 @@ function rt(e) {
|
|
|
913
913
|
}
|
|
914
914
|
function $o() {
|
|
915
915
|
const e = lt(!1), n = ut();
|
|
916
|
-
return n &&
|
|
916
|
+
return n && Me(() => {
|
|
917
917
|
e.value = !0;
|
|
918
918
|
}, n), e;
|
|
919
919
|
}
|
|
@@ -1044,11 +1044,11 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1044
1044
|
return t.tagName === "SUMMARY";
|
|
1045
1045
|
});
|
|
1046
1046
|
return n;
|
|
1047
|
-
},
|
|
1047
|
+
}, To = function(e, n) {
|
|
1048
1048
|
for (var t = 0; t < e.length; t++)
|
|
1049
1049
|
if (e[t].checked && e[t].form === n)
|
|
1050
1050
|
return e[t];
|
|
1051
|
-
},
|
|
1051
|
+
}, Mo = function(e) {
|
|
1052
1052
|
if (!e.name)
|
|
1053
1053
|
return !0;
|
|
1054
1054
|
var n = e.form || He(e), t = function(a) {
|
|
@@ -1062,12 +1062,12 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1062
1062
|
} catch (a) {
|
|
1063
1063
|
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", a.message), !1;
|
|
1064
1064
|
}
|
|
1065
|
-
var l =
|
|
1065
|
+
var l = To(o, e.form);
|
|
1066
1066
|
return !l || l === e;
|
|
1067
1067
|
}, qo = function(e) {
|
|
1068
1068
|
return Xt(e) && e.type === "radio";
|
|
1069
1069
|
}, No = function(e) {
|
|
1070
|
-
return qo(e) && !
|
|
1070
|
+
return qo(e) && !Mo(e);
|
|
1071
1071
|
}, Fo = function(e) {
|
|
1072
1072
|
var n, t = e && He(e), o = (n = t) === null || n === void 0 ? void 0 : n.host, l = !1;
|
|
1073
1073
|
if (t && t !== e) {
|
|
@@ -1342,8 +1342,8 @@ var $t = {
|
|
|
1342
1342
|
if (typeof I == "string") {
|
|
1343
1343
|
try {
|
|
1344
1344
|
z = t.querySelector(I);
|
|
1345
|
-
} catch (
|
|
1346
|
-
throw new Error("`".concat(p, '` appears to be an invalid selector; error="').concat(
|
|
1345
|
+
} catch (G) {
|
|
1346
|
+
throw new Error("`".concat(p, '` appears to be an invalid selector; error="').concat(G.message, '"'));
|
|
1347
1347
|
}
|
|
1348
1348
|
if (!z && !N)
|
|
1349
1349
|
throw new Error("`".concat(p, "` as selector refers to no known node"));
|
|
@@ -1368,12 +1368,12 @@ var $t = {
|
|
|
1368
1368
|
return p;
|
|
1369
1369
|
}, s = function() {
|
|
1370
1370
|
if (a.containerGroups = a.containers.map(function(p) {
|
|
1371
|
-
var m = jo(p, l.tabbableOptions), k = zo(p, l.tabbableOptions), N = m.length > 0 ? m[0] : void 0, L = m.length > 0 ? m[m.length - 1] : void 0, C = k.find(function(
|
|
1372
|
-
return $e(
|
|
1373
|
-
}), I = k.slice().reverse().find(function(
|
|
1374
|
-
return $e(
|
|
1375
|
-
}), z = !!m.find(function(
|
|
1376
|
-
return _e(
|
|
1371
|
+
var m = jo(p, l.tabbableOptions), k = zo(p, l.tabbableOptions), N = m.length > 0 ? m[0] : void 0, L = m.length > 0 ? m[m.length - 1] : void 0, C = k.find(function(G) {
|
|
1372
|
+
return $e(G);
|
|
1373
|
+
}), I = k.slice().reverse().find(function(G) {
|
|
1374
|
+
return $e(G);
|
|
1375
|
+
}), z = !!m.find(function(G) {
|
|
1376
|
+
return _e(G) > 0;
|
|
1377
1377
|
});
|
|
1378
1378
|
return {
|
|
1379
1379
|
container: p,
|
|
@@ -1404,11 +1404,11 @@ var $t = {
|
|
|
1404
1404
|
* in reverse.
|
|
1405
1405
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
1406
1406
|
*/
|
|
1407
|
-
nextTabbableNode: function(
|
|
1408
|
-
var ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ce = m.indexOf(
|
|
1409
|
-
return ce < 0 ? ae ? k.slice(k.indexOf(
|
|
1407
|
+
nextTabbableNode: function(G) {
|
|
1408
|
+
var ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, ce = m.indexOf(G);
|
|
1409
|
+
return ce < 0 ? ae ? k.slice(k.indexOf(G) + 1).find(function(te) {
|
|
1410
1410
|
return $e(te);
|
|
1411
|
-
}) : k.slice(0, k.indexOf(
|
|
1411
|
+
}) : k.slice(0, k.indexOf(G)).reverse().find(function(te) {
|
|
1412
1412
|
return $e(te);
|
|
1413
1413
|
}) : m[ce + (ae ? 1 : -1)];
|
|
1414
1414
|
}
|
|
@@ -1435,7 +1435,7 @@ var $t = {
|
|
|
1435
1435
|
preventScroll: !!l.preventScroll
|
|
1436
1436
|
}), a.mostRecentlyFocusedNode = p, ea(p) && p.select();
|
|
1437
1437
|
}
|
|
1438
|
-
},
|
|
1438
|
+
}, h = function(p) {
|
|
1439
1439
|
var m = d("setReturnFocus", {
|
|
1440
1440
|
params: [p]
|
|
1441
1441
|
});
|
|
@@ -1449,12 +1449,12 @@ var $t = {
|
|
|
1449
1449
|
if (I < 0)
|
|
1450
1450
|
L ? C = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : C = a.tabbableGroups[0].firstTabbableNode;
|
|
1451
1451
|
else if (L) {
|
|
1452
|
-
var
|
|
1452
|
+
var G = a.tabbableGroups.findIndex(function(me) {
|
|
1453
1453
|
var ye = me.firstTabbableNode;
|
|
1454
1454
|
return m === ye;
|
|
1455
1455
|
});
|
|
1456
|
-
if (
|
|
1457
|
-
var ae =
|
|
1456
|
+
if (G < 0 && (z.container === m || Ke(m, l.tabbableOptions) && !$e(m, l.tabbableOptions) && !z.nextTabbableNode(m, !1)) && (G = I), G >= 0) {
|
|
1457
|
+
var ae = G === 0 ? a.tabbableGroups.length - 1 : G - 1, ce = a.tabbableGroups[ae];
|
|
1458
1458
|
C = _e(m) >= 0 ? ce.lastTabbableNode : ce.lastDomTabbableNode;
|
|
1459
1459
|
} else Be(k) || (C = z.nextTabbableNode(m, !1));
|
|
1460
1460
|
} else {
|
|
@@ -1498,14 +1498,14 @@ var $t = {
|
|
|
1498
1498
|
if (_e(a.mostRecentlyFocusedNode) > 0) {
|
|
1499
1499
|
var C = c(a.mostRecentlyFocusedNode), I = a.containerGroups[C].tabbableNodes;
|
|
1500
1500
|
if (I.length > 0) {
|
|
1501
|
-
var z = I.findIndex(function(
|
|
1502
|
-
return
|
|
1501
|
+
var z = I.findIndex(function(G) {
|
|
1502
|
+
return G === a.mostRecentlyFocusedNode;
|
|
1503
1503
|
});
|
|
1504
1504
|
z >= 0 && (l.isKeyForward(a.recentNavEvent) ? z + 1 < I.length && (N = I[z + 1], L = !1) : z - 1 >= 0 && (N = I[z - 1], L = !1));
|
|
1505
1505
|
}
|
|
1506
1506
|
} else
|
|
1507
|
-
a.containerGroups.some(function(
|
|
1508
|
-
return
|
|
1507
|
+
a.containerGroups.some(function(G) {
|
|
1508
|
+
return G.tabbableNodes.some(function(ae) {
|
|
1509
1509
|
return _e(ae) > 0;
|
|
1510
1510
|
});
|
|
1511
1511
|
}) || (L = !1);
|
|
@@ -1519,7 +1519,7 @@ var $t = {
|
|
|
1519
1519
|
})), b(N || a.mostRecentlyFocusedNode || u());
|
|
1520
1520
|
}
|
|
1521
1521
|
a.recentNavEvent = void 0;
|
|
1522
|
-
},
|
|
1522
|
+
}, J = function(p) {
|
|
1523
1523
|
var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1524
1524
|
a.recentNavEvent = p;
|
|
1525
1525
|
var k = _({
|
|
@@ -1527,11 +1527,11 @@ var $t = {
|
|
|
1527
1527
|
isBackward: m
|
|
1528
1528
|
});
|
|
1529
1529
|
k && (Be(p) && p.preventDefault(), b(k));
|
|
1530
|
-
},
|
|
1531
|
-
(l.isKeyForward(p) || l.isKeyBackward(p)) &&
|
|
1530
|
+
}, A = function(p) {
|
|
1531
|
+
(l.isKeyForward(p) || l.isKeyBackward(p)) && J(p, l.isKeyBackward(p));
|
|
1532
1532
|
}, P = function(p) {
|
|
1533
1533
|
ta(p) && Se(l.escapeDeactivates, p) !== !1 && (p.preventDefault(), i.deactivate());
|
|
1534
|
-
},
|
|
1534
|
+
}, Q = function(p) {
|
|
1535
1535
|
var m = Fe(p);
|
|
1536
1536
|
c(m, p) >= 0 || Se(l.clickOutsideDeactivates, p) || Se(l.allowOutsideClick, p) || (p.preventDefault(), p.stopImmediatePropagation());
|
|
1537
1537
|
}, B = function() {
|
|
@@ -1544,17 +1544,17 @@ var $t = {
|
|
|
1544
1544
|
}), t.addEventListener("touchstart", j, {
|
|
1545
1545
|
capture: !0,
|
|
1546
1546
|
passive: !1
|
|
1547
|
-
}), t.addEventListener("click",
|
|
1547
|
+
}), t.addEventListener("click", Q, {
|
|
1548
1548
|
capture: !0,
|
|
1549
1549
|
passive: !1
|
|
1550
|
-
}), t.addEventListener("keydown",
|
|
1550
|
+
}), t.addEventListener("keydown", A, {
|
|
1551
1551
|
capture: !0,
|
|
1552
1552
|
passive: !1
|
|
1553
1553
|
}), t.addEventListener("keydown", P), i;
|
|
1554
1554
|
}, $ = function() {
|
|
1555
1555
|
if (a.active)
|
|
1556
|
-
return t.removeEventListener("focusin", H, !0), t.removeEventListener("mousedown", j, !0), t.removeEventListener("touchstart", j, !0), t.removeEventListener("click",
|
|
1557
|
-
},
|
|
1556
|
+
return t.removeEventListener("focusin", H, !0), t.removeEventListener("mousedown", j, !0), t.removeEventListener("touchstart", j, !0), t.removeEventListener("click", Q, !0), t.removeEventListener("keydown", A, !0), t.removeEventListener("keydown", P), i;
|
|
1557
|
+
}, T = function(p) {
|
|
1558
1558
|
var m = p.some(function(k) {
|
|
1559
1559
|
var N = Array.from(k.removedNodes);
|
|
1560
1560
|
return N.some(function(L) {
|
|
@@ -1562,7 +1562,7 @@ var $t = {
|
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
m && b(u());
|
|
1565
|
-
}, ue = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(
|
|
1565
|
+
}, ue = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(T) : void 0, ie = function() {
|
|
1566
1566
|
ue && (ue.disconnect(), a.active && !a.paused && a.containers.map(function(p) {
|
|
1567
1567
|
ue.observe(p, {
|
|
1568
1568
|
subtree: !0,
|
|
@@ -1600,10 +1600,10 @@ var $t = {
|
|
|
1600
1600
|
k == null || k();
|
|
1601
1601
|
var I = function() {
|
|
1602
1602
|
At(function() {
|
|
1603
|
-
C && b(
|
|
1603
|
+
C && b(h(a.nodeFocusedBeforeActivation)), N == null || N();
|
|
1604
1604
|
});
|
|
1605
1605
|
};
|
|
1606
|
-
return C && L ? (L(
|
|
1606
|
+
return C && L ? (L(h(a.nodeFocusedBeforeActivation)).then(I, I), this) : (I(), this);
|
|
1607
1607
|
},
|
|
1608
1608
|
pause: function(p) {
|
|
1609
1609
|
return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, p)) : this;
|
|
@@ -1667,8 +1667,8 @@ const ia = /* @__PURE__ */ V({
|
|
|
1667
1667
|
}),
|
|
1668
1668
|
emits: ["update:disabled"],
|
|
1669
1669
|
setup(e) {
|
|
1670
|
-
const n = e, t =
|
|
1671
|
-
return (o, l) => t.value ? F(o.$slots, "default", { key: 0 }) : (
|
|
1670
|
+
const n = e, t = Te(e, "disabled");
|
|
1671
|
+
return (o, l) => t.value ? F(o.$slots, "default", { key: 0 }) : (y(), Z(
|
|
1672
1672
|
f(ia),
|
|
1673
1673
|
Re(de({ key: 1 }, n)),
|
|
1674
1674
|
{
|
|
@@ -1774,27 +1774,27 @@ const ba = () => {
|
|
|
1774
1774
|
${ua}: ${c}px;
|
|
1775
1775
|
}
|
|
1776
1776
|
`;
|
|
1777
|
-
return
|
|
1777
|
+
return Me(() => {
|
|
1778
1778
|
document.body.setAttribute(Ae, (o() + 1).toString());
|
|
1779
1779
|
const a = fa(n.gapMode);
|
|
1780
1780
|
t.add(
|
|
1781
1781
|
l(a, !n.noRelative, n.gapMode, n.noImportant ? "" : "!important")
|
|
1782
1782
|
);
|
|
1783
|
-
}),
|
|
1783
|
+
}), Mt(() => {
|
|
1784
1784
|
const a = o() - 1;
|
|
1785
1785
|
a <= 0 ? document.body.removeAttribute(Ae) : document.body.setAttribute(Ae, a.toString()), t.remove();
|
|
1786
1786
|
}), (a, i) => F(a.$slots, "default");
|
|
1787
1787
|
}
|
|
1788
1788
|
}), ya = K(ha);
|
|
1789
1789
|
function wa(e, n, t, o) {
|
|
1790
|
-
const l = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", r = e.getBoundingClientRect(), c = n.getBoundingClientRect(), d = t == null ? void 0 : t.getBoundingClientRect(), u = _a(r, c, i, l), s = Ea(r, c, u), v = ka(s, u, l), b = $a(v, u, a),
|
|
1790
|
+
const l = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", r = e.getBoundingClientRect(), c = n.getBoundingClientRect(), d = t == null ? void 0 : t.getBoundingClientRect(), u = _a(r, c, i, l), s = Ea(r, c, u), v = ka(s, u, l), b = $a(v, u, a), h = xa(b, c, u);
|
|
1791
1791
|
let _;
|
|
1792
1792
|
if (o != null && o.arrow) {
|
|
1793
1793
|
if (!d)
|
|
1794
1794
|
throw new Error("[Quidgest UI] The arrow element must exist to compute its position");
|
|
1795
|
-
_ = Aa(
|
|
1795
|
+
_ = Aa(h, r, c, d, u);
|
|
1796
1796
|
}
|
|
1797
|
-
return { overlayCoords:
|
|
1797
|
+
return { overlayCoords: h, arrowCoords: _, placement: u };
|
|
1798
1798
|
}
|
|
1799
1799
|
function _a(e, n, t, o) {
|
|
1800
1800
|
const l = Et(e, n, t, o);
|
|
@@ -1961,7 +1961,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
1961
1961
|
}),
|
|
1962
1962
|
emits: /* @__PURE__ */ be(["enter", "leave"], ["update:modelValue"]),
|
|
1963
1963
|
setup(e, { emit: n }) {
|
|
1964
|
-
const t = e, o = n, l =
|
|
1964
|
+
const t = e, o = n, l = Te(e, "modelValue"), { class: a } = Ut(), i = w(() => [
|
|
1965
1965
|
"q-overlay",
|
|
1966
1966
|
`q-overlay--${Ie(s.placement)}`,
|
|
1967
1967
|
a.value,
|
|
@@ -1991,7 +1991,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
1991
1991
|
left: `${s.left}px`,
|
|
1992
1992
|
width: g !== void 0 ? `${g}px` : void 0
|
|
1993
1993
|
};
|
|
1994
|
-
}),
|
|
1994
|
+
}), h = w(() => {
|
|
1995
1995
|
if (t.arrow)
|
|
1996
1996
|
return {
|
|
1997
1997
|
top: v.top !== void 0 ? `${v.top}px` : void 0,
|
|
@@ -1999,7 +1999,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
1999
1999
|
opacity: v.hidden ? 0 : 1
|
|
2000
2000
|
};
|
|
2001
2001
|
}), _ = q(null), j = q(null), H = q(null);
|
|
2002
|
-
function
|
|
2002
|
+
function J() {
|
|
2003
2003
|
const S = L();
|
|
2004
2004
|
if (!S || !j.value)
|
|
2005
2005
|
return;
|
|
@@ -2019,28 +2019,28 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2019
2019
|
}
|
|
2020
2020
|
se(
|
|
2021
2021
|
() => t.placement,
|
|
2022
|
-
() => De(
|
|
2022
|
+
() => De(J)
|
|
2023
2023
|
);
|
|
2024
|
-
let
|
|
2024
|
+
let A;
|
|
2025
2025
|
function P() {
|
|
2026
2026
|
B(0);
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function Q() {
|
|
2029
2029
|
B(t.delay);
|
|
2030
2030
|
}
|
|
2031
2031
|
function B(S) {
|
|
2032
|
-
|
|
2032
|
+
A && T(), A = window.setTimeout(() => {
|
|
2033
2033
|
l.value = !0;
|
|
2034
2034
|
}, S);
|
|
2035
2035
|
}
|
|
2036
2036
|
function $() {
|
|
2037
|
-
if (
|
|
2037
|
+
if (A && T(), l.value = !1, t.anchor && t.trigger === "click") {
|
|
2038
2038
|
const S = L();
|
|
2039
2039
|
De(() => S == null ? void 0 : S.focus());
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2043
|
-
clearTimeout(
|
|
2042
|
+
function T() {
|
|
2043
|
+
clearTimeout(A), A = void 0;
|
|
2044
2044
|
}
|
|
2045
2045
|
function ue() {
|
|
2046
2046
|
De(ye), o("enter");
|
|
@@ -2074,8 +2074,8 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2074
2074
|
}
|
|
2075
2075
|
let g = !1;
|
|
2076
2076
|
S.defaultPrevented || S.detail.originalEvent.type === "pointerdown" && (g = !0);
|
|
2077
|
-
const
|
|
2078
|
-
if ((pe = L()) != null && pe.contains(
|
|
2077
|
+
const E = S.detail.originalEvent.target;
|
|
2078
|
+
if ((pe = L()) != null && pe.contains(E)) {
|
|
2079
2079
|
S.preventDefault();
|
|
2080
2080
|
return;
|
|
2081
2081
|
}
|
|
@@ -2084,11 +2084,11 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2084
2084
|
function z() {
|
|
2085
2085
|
$();
|
|
2086
2086
|
}
|
|
2087
|
-
let
|
|
2087
|
+
let G;
|
|
2088
2088
|
function ae() {
|
|
2089
2089
|
const S = L();
|
|
2090
2090
|
if (S)
|
|
2091
|
-
switch (
|
|
2091
|
+
switch (G = new MutationObserver(J), G.observe(S, {
|
|
2092
2092
|
attributes: !1,
|
|
2093
2093
|
childList: !0,
|
|
2094
2094
|
characterData: !0,
|
|
@@ -2098,46 +2098,46 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2098
2098
|
S.addEventListener("click", P);
|
|
2099
2099
|
break;
|
|
2100
2100
|
case "hover":
|
|
2101
|
-
S.addEventListener("mouseenter",
|
|
2101
|
+
S.addEventListener("mouseenter", Q), S.addEventListener("mouseleave", $), S.addEventListener("focusin", P), S.addEventListener("focusout", $);
|
|
2102
2102
|
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
2105
|
function ce() {
|
|
2106
2106
|
const S = L();
|
|
2107
2107
|
if (S)
|
|
2108
|
-
switch (
|
|
2108
|
+
switch (G == null || G.disconnect(), t.trigger) {
|
|
2109
2109
|
case "click":
|
|
2110
2110
|
S.removeEventListener("click", P);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "hover":
|
|
2113
|
-
S.removeEventListener("mouseenter",
|
|
2113
|
+
S.removeEventListener("mouseenter", Q), S.removeEventListener("mouseleave", $), S.removeEventListener("focusin", P), S.removeEventListener("focusout", $);
|
|
2114
2114
|
break;
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
2117
|
function te() {
|
|
2118
|
-
window.addEventListener("resize",
|
|
2118
|
+
window.addEventListener("resize", J), t.scrollLock || window.addEventListener("scroll", J);
|
|
2119
2119
|
}
|
|
2120
2120
|
function he() {
|
|
2121
|
-
window.removeEventListener("resize",
|
|
2121
|
+
window.removeEventListener("resize", J), t.scrollLock || window.removeEventListener("scroll", J);
|
|
2122
2122
|
}
|
|
2123
2123
|
let ge;
|
|
2124
2124
|
function me() {
|
|
2125
|
-
L() ? (
|
|
2125
|
+
L() ? (J(), ge = window.setTimeout(me, 100)) : $();
|
|
2126
2126
|
}
|
|
2127
2127
|
function ye() {
|
|
2128
2128
|
var S;
|
|
2129
|
-
r.value || (te(), t.spy ? me() :
|
|
2129
|
+
r.value || (te(), t.spy ? me() : J()), (r.value || t.trigger === "click") && ((S = j.value) == null || S.focus());
|
|
2130
2130
|
}
|
|
2131
2131
|
function Ne() {
|
|
2132
2132
|
r.value || he(), t.spy && (clearTimeout(ge), ge = void 0);
|
|
2133
2133
|
}
|
|
2134
|
-
return
|
|
2134
|
+
return Me(() => {
|
|
2135
2135
|
De(ae);
|
|
2136
|
-
}), dn(ce), (S, pe) => (
|
|
2136
|
+
}), dn(ce), (S, pe) => (y(), x(
|
|
2137
2137
|
ve,
|
|
2138
2138
|
null,
|
|
2139
2139
|
[
|
|
2140
|
-
(
|
|
2140
|
+
(y(), Z(pn, {
|
|
2141
2141
|
disabled: !u.value,
|
|
2142
2142
|
to: t.attach
|
|
2143
2143
|
}, [
|
|
@@ -2146,7 +2146,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2146
2146
|
appear: ""
|
|
2147
2147
|
}, {
|
|
2148
2148
|
default: R(() => [
|
|
2149
|
-
c.value ? (
|
|
2149
|
+
c.value ? (y(), x(
|
|
2150
2150
|
"div",
|
|
2151
2151
|
{
|
|
2152
2152
|
key: 0,
|
|
@@ -2159,7 +2159,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2159
2159
|
null,
|
|
2160
2160
|
2
|
|
2161
2161
|
/* CLASS */
|
|
2162
|
-
)) :
|
|
2162
|
+
)) : U("v-if", !0)
|
|
2163
2163
|
]),
|
|
2164
2164
|
_: 1
|
|
2165
2165
|
/* STABLE */
|
|
@@ -2173,7 +2173,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2173
2173
|
onAfterLeave: m
|
|
2174
2174
|
}, {
|
|
2175
2175
|
default: R(() => [
|
|
2176
|
-
l.value ? (
|
|
2176
|
+
l.value ? (y(), x("div", {
|
|
2177
2177
|
key: 0,
|
|
2178
2178
|
id: t.id,
|
|
2179
2179
|
ref_key: "overlayContainerRef",
|
|
@@ -2188,20 +2188,20 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2188
2188
|
onPointerDownOutside: C
|
|
2189
2189
|
}, {
|
|
2190
2190
|
default: R(() => [
|
|
2191
|
-
H.value ? (
|
|
2191
|
+
H.value ? (y(), Z(f(sa), {
|
|
2192
2192
|
key: 0,
|
|
2193
2193
|
disabled: t.nonModal || !l.value,
|
|
2194
2194
|
options: { fallbackFocus: H.value }
|
|
2195
2195
|
}, {
|
|
2196
2196
|
default: R(() => [
|
|
2197
|
-
|
|
2197
|
+
M("div", de({
|
|
2198
2198
|
ref_key: "overlayRef",
|
|
2199
2199
|
ref: j,
|
|
2200
2200
|
class: "q-overlay__content",
|
|
2201
2201
|
tabindex: "-1",
|
|
2202
2202
|
role: c.value ? "dialog" : void 0
|
|
2203
2203
|
}, S.$attrs), [
|
|
2204
|
-
t.arrow ? (
|
|
2204
|
+
t.arrow ? (y(), x(
|
|
2205
2205
|
"div",
|
|
2206
2206
|
{
|
|
2207
2207
|
key: 0,
|
|
@@ -2209,35 +2209,35 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2209
2209
|
ref: _,
|
|
2210
2210
|
role: "presentation",
|
|
2211
2211
|
class: "q-overlay__arrow",
|
|
2212
|
-
style: Ee(
|
|
2212
|
+
style: Ee(h.value)
|
|
2213
2213
|
},
|
|
2214
2214
|
null,
|
|
2215
2215
|
4
|
|
2216
2216
|
/* STYLE */
|
|
2217
|
-
)) :
|
|
2217
|
+
)) : U("v-if", !0),
|
|
2218
2218
|
F(S.$slots, "default")
|
|
2219
2219
|
], 16, La)
|
|
2220
2220
|
]),
|
|
2221
2221
|
_: 3
|
|
2222
2222
|
/* FORWARDED */
|
|
2223
|
-
}, 8, ["disabled", "options"])) :
|
|
2223
|
+
}, 8, ["disabled", "options"])) : U("v-if", !0)
|
|
2224
2224
|
]),
|
|
2225
2225
|
_: 3
|
|
2226
2226
|
/* FORWARDED */
|
|
2227
2227
|
})
|
|
2228
|
-
], 14, Ba)) :
|
|
2228
|
+
], 14, Ba)) : U("v-if", !0)
|
|
2229
2229
|
]),
|
|
2230
2230
|
_: 3
|
|
2231
2231
|
/* FORWARDED */
|
|
2232
2232
|
}, 8, ["name"])
|
|
2233
2233
|
], 8, ["disabled", "to"])),
|
|
2234
|
-
d.value ? (
|
|
2234
|
+
d.value ? (y(), Z(f(ya), { key: 0 })) : U("v-if", !0)
|
|
2235
2235
|
],
|
|
2236
2236
|
64
|
|
2237
2237
|
/* STABLE_FRAGMENT */
|
|
2238
2238
|
));
|
|
2239
2239
|
}
|
|
2240
|
-
}),
|
|
2240
|
+
}), Ta = K(Ra), Ma = [
|
|
2241
2241
|
{
|
|
2242
2242
|
id: "button",
|
|
2243
2243
|
icon: {
|
|
@@ -2283,7 +2283,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2283
2283
|
title: {},
|
|
2284
2284
|
text: {},
|
|
2285
2285
|
icon: { default: () => qa },
|
|
2286
|
-
buttons: { default: () =>
|
|
2286
|
+
buttons: { default: () => Ma },
|
|
2287
2287
|
attach: { default: "body" },
|
|
2288
2288
|
inline: { type: Boolean },
|
|
2289
2289
|
backdropBlur: { type: Boolean, default: !0 },
|
|
@@ -2299,14 +2299,14 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2299
2299
|
}),
|
|
2300
2300
|
emits: /* @__PURE__ */ be(["enter", "leave"], ["update:modelValue"]),
|
|
2301
2301
|
setup(e, { emit: n }) {
|
|
2302
|
-
const t = e, o = n, l =
|
|
2302
|
+
const t = e, o = n, l = Te(e, "modelValue"), a = q(""), i = q(""), r = w(() => ["q-dialog", t.class]), c = w(() => `q-overlay--${t.size}`);
|
|
2303
2303
|
function d() {
|
|
2304
2304
|
l.value = !1;
|
|
2305
2305
|
}
|
|
2306
2306
|
function u(b) {
|
|
2307
|
-
var
|
|
2307
|
+
var h, _;
|
|
2308
2308
|
if (b.action) {
|
|
2309
|
-
if ((
|
|
2309
|
+
if ((h = t.input) != null && h.validator && (i.value = t.input.validator(f(a)), f(i)))
|
|
2310
2310
|
return;
|
|
2311
2311
|
(_ = b.action) == null || _.call(b, f(a));
|
|
2312
2312
|
}
|
|
@@ -2318,10 +2318,10 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2318
2318
|
function v() {
|
|
2319
2319
|
o("leave");
|
|
2320
2320
|
}
|
|
2321
|
-
return (b,
|
|
2321
|
+
return (b, h) => (y(), Z(f(Ta), {
|
|
2322
2322
|
id: t.id,
|
|
2323
2323
|
modelValue: l.value,
|
|
2324
|
-
"onUpdate:modelValue":
|
|
2324
|
+
"onUpdate:modelValue": h[1] || (h[1] = (_) => l.value = _),
|
|
2325
2325
|
"backdrop-class": "q-dialog__underlay",
|
|
2326
2326
|
"scroll-lock": "",
|
|
2327
2327
|
persistent: "",
|
|
@@ -2334,31 +2334,31 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2334
2334
|
onLeave: v
|
|
2335
2335
|
}, {
|
|
2336
2336
|
default: R(() => [
|
|
2337
|
-
|
|
2337
|
+
M(
|
|
2338
2338
|
"div",
|
|
2339
2339
|
{
|
|
2340
2340
|
class: X(r.value)
|
|
2341
2341
|
},
|
|
2342
2342
|
[
|
|
2343
|
-
t.title || b.$slots.header || b.$slots["header.prepend"] || b.$slots["header.append"] ? (
|
|
2343
|
+
t.title || b.$slots.header || b.$slots["header.prepend"] || b.$slots["header.append"] ? (y(), x("div", Fa, [
|
|
2344
2344
|
F(b.$slots, "header", {}, () => [
|
|
2345
2345
|
F(b.$slots, "header.prepend"),
|
|
2346
|
-
t.title ? (
|
|
2346
|
+
t.title ? (y(), x(
|
|
2347
2347
|
"span",
|
|
2348
2348
|
Pa,
|
|
2349
2349
|
re(t.title),
|
|
2350
2350
|
1
|
|
2351
2351
|
/* TEXT */
|
|
2352
|
-
)) :
|
|
2352
|
+
)) : U("v-if", !0),
|
|
2353
2353
|
F(b.$slots, "header.append")
|
|
2354
2354
|
])
|
|
2355
|
-
])) :
|
|
2356
|
-
t.icon || t.text || b.$slots.body ? (
|
|
2355
|
+
])) : U("v-if", !0),
|
|
2356
|
+
t.icon || t.text || b.$slots.body ? (y(), x("div", Oa, [
|
|
2357
2357
|
F(b.$slots, "body", {}, () => {
|
|
2358
2358
|
var _;
|
|
2359
2359
|
return [
|
|
2360
2360
|
F(b.$slots, "body.icon", {}, () => [
|
|
2361
|
-
t.icon ? (
|
|
2361
|
+
t.icon ? (y(), x("span", Ua, [
|
|
2362
2362
|
D(
|
|
2363
2363
|
f(Y),
|
|
2364
2364
|
Re(je(t.icon)),
|
|
@@ -2366,13 +2366,13 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2366
2366
|
16
|
|
2367
2367
|
/* FULL_PROPS */
|
|
2368
2368
|
)
|
|
2369
|
-
])) :
|
|
2369
|
+
])) : U("v-if", !0)
|
|
2370
2370
|
]),
|
|
2371
|
-
|
|
2372
|
-
t.html ? (
|
|
2371
|
+
M("div", Ga, [
|
|
2372
|
+
t.html ? (y(), x("div", {
|
|
2373
2373
|
key: 0,
|
|
2374
2374
|
innerHTML: t.text
|
|
2375
|
-
}, null, 8, ja)) : (
|
|
2375
|
+
}, null, 8, ja)) : (y(), x(
|
|
2376
2376
|
"div",
|
|
2377
2377
|
za,
|
|
2378
2378
|
re(t.text),
|
|
@@ -2380,19 +2380,19 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2380
2380
|
/* TEXT */
|
|
2381
2381
|
))
|
|
2382
2382
|
]),
|
|
2383
|
-
t.input ? (
|
|
2383
|
+
t.input ? (y(), x("div", Va, [
|
|
2384
2384
|
D(f(Ht), {
|
|
2385
2385
|
modelValue: a.value,
|
|
2386
|
-
"onUpdate:modelValue":
|
|
2386
|
+
"onUpdate:modelValue": h[0] || (h[0] = (j) => a.value = j),
|
|
2387
2387
|
invalid: !!i.value,
|
|
2388
2388
|
placeholder: (_ = t.input) == null ? void 0 : _.placeholder,
|
|
2389
2389
|
size: "block"
|
|
2390
2390
|
}, {
|
|
2391
2391
|
extras: R(() => [
|
|
2392
|
-
i.value ? (
|
|
2392
|
+
i.value ? (y(), Z(f(Y), {
|
|
2393
2393
|
key: 0,
|
|
2394
2394
|
icon: "exclamation-sign"
|
|
2395
|
-
})) :
|
|
2395
|
+
})) : U("v-if", !0),
|
|
2396
2396
|
Qe(
|
|
2397
2397
|
" " + re(i.value),
|
|
2398
2398
|
1
|
|
@@ -2402,22 +2402,22 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2402
2402
|
_: 1
|
|
2403
2403
|
/* STABLE */
|
|
2404
2404
|
}, 8, ["modelValue", "invalid", "placeholder"])
|
|
2405
|
-
])) :
|
|
2405
|
+
])) : U("v-if", !0),
|
|
2406
2406
|
F(b.$slots, "body.append")
|
|
2407
2407
|
];
|
|
2408
2408
|
})
|
|
2409
|
-
])) :
|
|
2410
|
-
t.buttons || b.$slots["footer.append"] ? (
|
|
2411
|
-
t.buttons ? (
|
|
2412
|
-
(
|
|
2409
|
+
])) : U("v-if", !0),
|
|
2410
|
+
t.buttons || b.$slots["footer.append"] ? (y(), x("div", Ha, [
|
|
2411
|
+
t.buttons ? (y(), x("span", Za, [
|
|
2412
|
+
(y(!0), x(
|
|
2413
2413
|
ve,
|
|
2414
2414
|
null,
|
|
2415
|
-
qe(t.buttons, (_) => (
|
|
2415
|
+
qe(t.buttons, (_) => (y(), Z(f(oe), de({ ref_for: !0 }, _.props, {
|
|
2416
2416
|
key: _.id,
|
|
2417
2417
|
onClick: () => u(_)
|
|
2418
2418
|
}), {
|
|
2419
2419
|
default: R(() => [
|
|
2420
|
-
_.icon ? (
|
|
2420
|
+
_.icon ? (y(), Z(
|
|
2421
2421
|
f(Y),
|
|
2422
2422
|
de({
|
|
2423
2423
|
key: 0,
|
|
@@ -2426,7 +2426,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2426
2426
|
null,
|
|
2427
2427
|
16
|
|
2428
2428
|
/* FULL_PROPS */
|
|
2429
|
-
)) :
|
|
2429
|
+
)) : U("v-if", !0)
|
|
2430
2430
|
]),
|
|
2431
2431
|
_: 2
|
|
2432
2432
|
/* DYNAMIC */
|
|
@@ -2434,10 +2434,10 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2434
2434
|
128
|
|
2435
2435
|
/* KEYED_FRAGMENT */
|
|
2436
2436
|
))
|
|
2437
|
-
])) :
|
|
2437
|
+
])) : U("v-if", !0),
|
|
2438
2438
|
F(b.$slots, "footer.append")
|
|
2439
|
-
])) :
|
|
2440
|
-
t.dismissible ? (
|
|
2439
|
+
])) : U("v-if", !0),
|
|
2440
|
+
t.dismissible ? (y(), Z(f(oe), {
|
|
2441
2441
|
key: 3,
|
|
2442
2442
|
class: "q-dialog__close",
|
|
2443
2443
|
variant: "text",
|
|
@@ -2454,7 +2454,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
|
|
|
2454
2454
|
]),
|
|
2455
2455
|
_: 1
|
|
2456
2456
|
/* STABLE */
|
|
2457
|
-
})) :
|
|
2457
|
+
})) : U("v-if", !0)
|
|
2458
2458
|
],
|
|
2459
2459
|
2
|
|
2460
2460
|
/* CLASS */
|
|
@@ -2492,10 +2492,10 @@ const Qa = /* @__PURE__ */ V({
|
|
|
2492
2492
|
function i(r) {
|
|
2493
2493
|
a(r), o("leave", r);
|
|
2494
2494
|
}
|
|
2495
|
-
return (r, c) => (
|
|
2495
|
+
return (r, c) => (y(!0), x(
|
|
2496
2496
|
ve,
|
|
2497
2497
|
null,
|
|
2498
|
-
qe(f(l), (d) => (
|
|
2498
|
+
qe(f(l), (d) => (y(), Z(f(Kt), de({
|
|
2499
2499
|
key: d.id,
|
|
2500
2500
|
ref_for: !0
|
|
2501
2501
|
}, d.props, {
|
|
@@ -2535,7 +2535,7 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2535
2535
|
}),
|
|
2536
2536
|
emits: ["update:modelValue"],
|
|
2537
2537
|
setup(e) {
|
|
2538
|
-
const n = e, t =
|
|
2538
|
+
const n = e, t = Te(e, "modelValue"), o = w({
|
|
2539
2539
|
get: () => t.value,
|
|
2540
2540
|
set: (d) => {
|
|
2541
2541
|
const u = n.maxLength;
|
|
@@ -2549,7 +2549,7 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2549
2549
|
element: w(() => n.autosize ? r.value : void 0),
|
|
2550
2550
|
styleProp: "minHeight"
|
|
2551
2551
|
});
|
|
2552
|
-
return (d, u) => (
|
|
2552
|
+
return (d, u) => (y(), Z(f(Vt), {
|
|
2553
2553
|
class: X(["q-text-area", n.class]),
|
|
2554
2554
|
for: f(l),
|
|
2555
2555
|
label: n.label,
|
|
@@ -2565,7 +2565,7 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2565
2565
|
F(d.$slots, "label.append")
|
|
2566
2566
|
]),
|
|
2567
2567
|
default: R(() => [
|
|
2568
|
-
|
|
2568
|
+
Tt(M("textarea", de({
|
|
2569
2569
|
id: f(l),
|
|
2570
2570
|
ref_key: "textareaRef",
|
|
2571
2571
|
ref: r,
|
|
@@ -2645,7 +2645,7 @@ function ke() {
|
|
|
2645
2645
|
};
|
|
2646
2646
|
}
|
|
2647
2647
|
async function Ct(e, n) {
|
|
2648
|
-
var d, u, s, v, b,
|
|
2648
|
+
var d, u, s, v, b, h, _;
|
|
2649
2649
|
const t = new AbortController(), o = t.signal, a = (await Nt({
|
|
2650
2650
|
...e,
|
|
2651
2651
|
headers: {
|
|
@@ -2665,43 +2665,43 @@ async function Ct(e, n) {
|
|
|
2665
2665
|
(d = n.onDone) == null || d.call(n);
|
|
2666
2666
|
break;
|
|
2667
2667
|
}
|
|
2668
|
-
const
|
|
2669
|
-
c +=
|
|
2670
|
-
const
|
|
2671
|
-
c =
|
|
2672
|
-
for (const P of
|
|
2673
|
-
const
|
|
2668
|
+
const J = r.decode(H, { stream: !0 });
|
|
2669
|
+
c += J;
|
|
2670
|
+
const A = c.split(/\n\n+/);
|
|
2671
|
+
c = A.pop() || "";
|
|
2672
|
+
for (const P of A) {
|
|
2673
|
+
const Q = P.trim().split(`
|
|
2674
2674
|
`);
|
|
2675
2675
|
let B = "", $ = "";
|
|
2676
|
-
for (const
|
|
2677
|
-
|
|
2676
|
+
for (const T of Q)
|
|
2677
|
+
T.startsWith("event:") ? B = T.replace("event:", "").trim() : T.startsWith("data:") && ($ = T.replace("data:", "").trim());
|
|
2678
2678
|
if (B || (B = "message"), !!$)
|
|
2679
2679
|
try {
|
|
2680
|
-
const
|
|
2680
|
+
const T = JSON.parse($);
|
|
2681
2681
|
switch (B) {
|
|
2682
2682
|
case "message":
|
|
2683
|
-
(u = n.onMessage) == null || u.call(n,
|
|
2683
|
+
(u = n.onMessage) == null || u.call(n, T.value);
|
|
2684
2684
|
break;
|
|
2685
2685
|
case "tool-status":
|
|
2686
2686
|
(s = n.onToolStatus) == null || s.call(
|
|
2687
2687
|
n,
|
|
2688
|
-
|
|
2688
|
+
T
|
|
2689
2689
|
);
|
|
2690
2690
|
break;
|
|
2691
2691
|
case "error":
|
|
2692
|
-
(v = n.onError) == null || v.call(n, new Error(
|
|
2692
|
+
(v = n.onError) == null || v.call(n, new Error(T.value));
|
|
2693
2693
|
break;
|
|
2694
2694
|
case "field_metadata":
|
|
2695
|
-
(b = n.onFieldMetadata) == null || b.call(n,
|
|
2695
|
+
(b = n.onFieldMetadata) == null || b.call(n, T);
|
|
2696
2696
|
break;
|
|
2697
2697
|
case "done":
|
|
2698
|
-
(
|
|
2698
|
+
(h = n.onDone) == null || h.call(n);
|
|
2699
2699
|
break;
|
|
2700
2700
|
default:
|
|
2701
2701
|
console.warn(`Unknown event type: ${B}`);
|
|
2702
2702
|
}
|
|
2703
|
-
} catch (
|
|
2704
|
-
(_ = n.onError) == null || _.call(n,
|
|
2703
|
+
} catch (T) {
|
|
2704
|
+
(_ = n.onError) == null || _.call(n, T), console.error("Error processing event:", T);
|
|
2705
2705
|
continue;
|
|
2706
2706
|
} finally {
|
|
2707
2707
|
j && (i.releaseLock(), t.abort());
|
|
@@ -2738,7 +2738,7 @@ function en(e) {
|
|
|
2738
2738
|
}
|
|
2739
2739
|
});
|
|
2740
2740
|
}
|
|
2741
|
-
async function a(u, s, v, b,
|
|
2741
|
+
async function a(u, s, v, b, h) {
|
|
2742
2742
|
n.value = !0;
|
|
2743
2743
|
try {
|
|
2744
2744
|
return await Ct(
|
|
@@ -2755,7 +2755,7 @@ function en(e) {
|
|
|
2755
2755
|
v == null || v(_);
|
|
2756
2756
|
},
|
|
2757
2757
|
onDone: () => {
|
|
2758
|
-
n.value = !1,
|
|
2758
|
+
n.value = !1, h == null || h();
|
|
2759
2759
|
}
|
|
2760
2760
|
}
|
|
2761
2761
|
);
|
|
@@ -2784,24 +2784,25 @@ function en(e) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
},
|
|
2786
2786
|
{
|
|
2787
|
-
onMessage: (
|
|
2788
|
-
onFieldMetadata: (
|
|
2787
|
+
onMessage: (h) => s(h),
|
|
2788
|
+
onFieldMetadata: (h) => v(h),
|
|
2789
2789
|
onDone: () => n.value = !1
|
|
2790
2790
|
}
|
|
2791
2791
|
);
|
|
2792
|
-
} catch (
|
|
2793
|
-
t.value =
|
|
2792
|
+
} catch (h) {
|
|
2793
|
+
t.value = h, b == null || b(h), n.value = !1;
|
|
2794
2794
|
}
|
|
2795
2795
|
}
|
|
2796
|
-
async function c(u, s, v, b) {
|
|
2796
|
+
async function c(u, s, v, b, h) {
|
|
2797
2797
|
return await o({
|
|
2798
2798
|
method: "POST",
|
|
2799
2799
|
url: "/prompt/clear",
|
|
2800
2800
|
data: {
|
|
2801
2801
|
username: u,
|
|
2802
2802
|
project: s,
|
|
2803
|
-
|
|
2804
|
-
formId: b
|
|
2803
|
+
agentId: v,
|
|
2804
|
+
formId: b,
|
|
2805
|
+
sessionId: h
|
|
2805
2806
|
}
|
|
2806
2807
|
});
|
|
2807
2808
|
}
|
|
@@ -2874,25 +2875,25 @@ const el = ["innerHTML"], tl = {
|
|
|
2874
2875
|
`);
|
|
2875
2876
|
return t.value.render(v);
|
|
2876
2877
|
});
|
|
2877
|
-
return (u, s) => !l.value && !r.value ? (
|
|
2878
|
+
return (u, s) => !l.value && !r.value ? (y(), x("div", {
|
|
2878
2879
|
key: 0,
|
|
2879
2880
|
class: "markdown-renderer",
|
|
2880
2881
|
innerHTML: o.value
|
|
2881
|
-
}, null, 8, el)) : l.value ? (
|
|
2882
|
-
|
|
2883
|
-
i.value ? (
|
|
2882
|
+
}, null, 8, el)) : l.value ? (y(), x("div", tl, [
|
|
2883
|
+
M("div", { innerHTML: a.value }, null, 8, nl),
|
|
2884
|
+
i.value ? (y(), x("div", {
|
|
2884
2885
|
key: 0,
|
|
2885
2886
|
class: "markdown-renderer__execution-plan-content",
|
|
2886
2887
|
innerHTML: i.value
|
|
2887
|
-
}, null, 8, ol)) :
|
|
2888
|
-
])) : r.value ? (
|
|
2889
|
-
|
|
2890
|
-
d.value ? (
|
|
2888
|
+
}, null, 8, ol)) : U("", !0)
|
|
2889
|
+
])) : r.value ? (y(), x("div", al, [
|
|
2890
|
+
M("div", { innerHTML: c.value }, null, 8, ll),
|
|
2891
|
+
d.value ? (y(), x("div", {
|
|
2891
2892
|
key: 0,
|
|
2892
2893
|
class: "markdown-renderer__execution-progress-content",
|
|
2893
2894
|
innerHTML: d.value
|
|
2894
|
-
}, null, 8, il)) :
|
|
2895
|
-
])) :
|
|
2895
|
+
}, null, 8, il)) : U("", !0)
|
|
2896
|
+
])) : U("", !0);
|
|
2896
2897
|
}
|
|
2897
2898
|
});
|
|
2898
2899
|
function tn(e, n) {
|
|
@@ -2922,37 +2923,37 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
2922
2923
|
emits: ["apply", "regenerate"],
|
|
2923
2924
|
setup(e, { emit: n }) {
|
|
2924
2925
|
const t = e, o = n, l = ke(), a = q(t.applied), i = q(!1), r = w(() => t.disabled || a.value), c = w(() => t.disabled || i.value), d = w(() => t.type === "text" || t.type === "multiline_text" ? Ge : "div"), u = w(() => {
|
|
2925
|
-
const
|
|
2926
|
-
return d.value === Ge ?
|
|
2926
|
+
const h = {};
|
|
2927
|
+
return d.value === Ge ? h.source = t.text : h.innerHTML = t.text, h;
|
|
2927
2928
|
}), s = w(() => {
|
|
2928
|
-
const
|
|
2929
|
-
return d.value !== Ge &&
|
|
2929
|
+
const h = ["q-field-preview__content"];
|
|
2930
|
+
return d.value !== Ge && h.push("preserve-whitespace"), h;
|
|
2930
2931
|
});
|
|
2931
2932
|
function v() {
|
|
2932
2933
|
if (a.value) return;
|
|
2933
2934
|
a.value = !0;
|
|
2934
|
-
const
|
|
2935
|
-
o("apply",
|
|
2935
|
+
const h = tn(t.type, t.text);
|
|
2936
|
+
o("apply", h);
|
|
2936
2937
|
}
|
|
2937
2938
|
function b() {
|
|
2938
2939
|
i.value || (i.value = !0, o("regenerate", t.name));
|
|
2939
2940
|
}
|
|
2940
|
-
return (
|
|
2941
|
+
return (h, _) => (y(), x("div", {
|
|
2941
2942
|
class: "q-field-preview",
|
|
2942
2943
|
"data-testid": f(rl)(t.name)
|
|
2943
2944
|
}, [
|
|
2944
|
-
|
|
2945
|
-
|
|
2945
|
+
M("div", cl, [
|
|
2946
|
+
M("span", null, [
|
|
2946
2947
|
Qe(re(f(l).suggestionsForField) + " ", 1),
|
|
2947
|
-
|
|
2948
|
+
M("b", null, re(t.name), 1)
|
|
2948
2949
|
])
|
|
2949
2950
|
]),
|
|
2950
|
-
|
|
2951
|
+
M("div", {
|
|
2951
2952
|
class: X(s.value)
|
|
2952
2953
|
}, [
|
|
2953
|
-
(
|
|
2954
|
+
(y(), Z(Bt(d.value), Re(je(u.value)), null, 16))
|
|
2954
2955
|
], 2),
|
|
2955
|
-
|
|
2956
|
+
M("div", ul, [
|
|
2956
2957
|
D(f(jt), { borderless: "" }, {
|
|
2957
2958
|
default: R(() => [
|
|
2958
2959
|
D(f(oe), {
|
|
@@ -2992,13 +2993,13 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
2992
2993
|
},
|
|
2993
2994
|
setup(e) {
|
|
2994
2995
|
const n = e, t = [1, 2, 3], o = ke(), l = w(() => n.text || o.generatingResponse);
|
|
2995
|
-
return (a, i) => (
|
|
2996
|
-
|
|
2996
|
+
return (a, i) => (y(), x("div", pl, [
|
|
2997
|
+
M("span", {
|
|
2997
2998
|
class: "generating-text",
|
|
2998
2999
|
innerHTML: l.value
|
|
2999
3000
|
}, null, 8, fl),
|
|
3000
|
-
|
|
3001
|
-
(
|
|
3001
|
+
M("div", vl, [
|
|
3002
|
+
(y(), x(ve, null, qe(t, (r, c) => M("span", {
|
|
3002
3003
|
key: c,
|
|
3003
3004
|
class: "dot",
|
|
3004
3005
|
style: Ee({ animationDelay: c * 0.2 + "s" })
|
|
@@ -3041,106 +3042,106 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
3041
3042
|
emits: ["apply-fields", "regenerate", "send-message", "cancel-execution"],
|
|
3042
3043
|
setup(e, { emit: n }) {
|
|
3043
3044
|
const t = e, o = n, l = ke(), { handleFeedback: a } = en(t.apiEndpoint), i = w(() => t.sender === "bot" && !Object.values(l || {}).includes(t.message || "") && !t.isWelcomeMessage), r = w(() => {
|
|
3044
|
-
var
|
|
3045
|
-
return ((
|
|
3045
|
+
var A;
|
|
3046
|
+
return ((A = t.file) == null ? void 0 : A.fileData.type.startsWith("image/")) ?? !1;
|
|
3046
3047
|
}), c = w(
|
|
3047
3048
|
() => t.sender === "bot" ? t.chatbotImage : t.userImage
|
|
3048
3049
|
), d = w(() => {
|
|
3049
3050
|
var P;
|
|
3050
|
-
const
|
|
3051
|
-
return
|
|
3051
|
+
const A = (P = t.message) == null ? void 0 : P.match(/<span data-type="tool-calling">(.*?)<\/span>/);
|
|
3052
|
+
return A ? A[1] : "";
|
|
3052
3053
|
}), u = w(
|
|
3053
3054
|
() => {
|
|
3054
|
-
var
|
|
3055
|
-
return ((
|
|
3055
|
+
var A;
|
|
3056
|
+
return ((A = t.message) == null ? void 0 : A.replace(/<span data-type="tool-calling">.*?<\/span>/, "")) ?? "";
|
|
3056
3057
|
}
|
|
3057
3058
|
), s = w(() => {
|
|
3058
|
-
var P,
|
|
3059
|
-
return (P = t.file) != null && P.fileData ? ((
|
|
3059
|
+
var P, Q;
|
|
3060
|
+
return (P = t.file) != null && P.fileData ? ((Q = t.file.fileData.name.split(".").pop()) == null ? void 0 : Q.toUpperCase()) ?? "" : "";
|
|
3060
3061
|
}), v = w(() => {
|
|
3061
|
-
var
|
|
3062
|
-
return ((
|
|
3062
|
+
var A;
|
|
3063
|
+
return ((A = t.message) == null ? void 0 : A.includes('data-type="execution-plan"')) ?? !1;
|
|
3063
3064
|
});
|
|
3064
3065
|
function b() {
|
|
3065
3066
|
o("send-message", l.approveProceedPlan);
|
|
3066
3067
|
}
|
|
3067
|
-
function
|
|
3068
|
+
function h() {
|
|
3068
3069
|
o("cancel-execution");
|
|
3069
3070
|
}
|
|
3070
3071
|
function _() {
|
|
3071
3072
|
t.message && navigator.clipboard.writeText(t.message).then(() => {
|
|
3072
3073
|
console.log("Response copied to clipboard");
|
|
3073
|
-
}).catch((
|
|
3074
|
-
console.error("Failed to copy response: ",
|
|
3074
|
+
}).catch((A) => {
|
|
3075
|
+
console.error("Failed to copy response: ", A);
|
|
3075
3076
|
});
|
|
3076
3077
|
}
|
|
3077
|
-
function j(
|
|
3078
|
-
o("apply-fields", [{ id: P.id, text:
|
|
3078
|
+
function j(A, P) {
|
|
3079
|
+
o("apply-fields", [{ id: P.id, text: A }]);
|
|
3079
3080
|
}
|
|
3080
3081
|
function H() {
|
|
3081
3082
|
if (!t.fields || t.fields.length === 0) return;
|
|
3082
|
-
const
|
|
3083
|
+
const A = t.fields.map((P) => ({
|
|
3083
3084
|
id: P.id,
|
|
3084
3085
|
text: tn(P.type, P.text)
|
|
3085
3086
|
}));
|
|
3086
|
-
o("apply-fields",
|
|
3087
|
+
o("apply-fields", A);
|
|
3087
3088
|
}
|
|
3088
|
-
function
|
|
3089
|
-
|
|
3089
|
+
function J(A, P) {
|
|
3090
|
+
A === null || P === null || !t.sessionID || a(A, P, t.sessionID);
|
|
3090
3091
|
}
|
|
3091
|
-
return (
|
|
3092
|
-
var
|
|
3093
|
-
return
|
|
3092
|
+
return (A, P) => {
|
|
3093
|
+
var Q, B, $;
|
|
3094
|
+
return y(), x("div", gl, [
|
|
3094
3095
|
D(f(Y), {
|
|
3095
3096
|
type: "img",
|
|
3096
3097
|
icon: c.value,
|
|
3097
3098
|
alt: f(l).senderImage,
|
|
3098
3099
|
class: "q-chatbot__profile"
|
|
3099
3100
|
}, null, 8, ["icon", "alt"]),
|
|
3100
|
-
|
|
3101
|
-
r.value ? (
|
|
3102
|
-
|
|
3103
|
-
src: (
|
|
3101
|
+
M("div", ml, [
|
|
3102
|
+
r.value ? (y(), x("div", bl, [
|
|
3103
|
+
M("img", {
|
|
3104
|
+
src: (Q = t.file) == null ? void 0 : Q.previewUrl,
|
|
3104
3105
|
alt: f(l).imagePreview
|
|
3105
3106
|
}, null, 8, hl)
|
|
3106
|
-
])) : (B = t.file) != null && B.fileData && !r.value ? (
|
|
3107
|
-
|
|
3107
|
+
])) : (B = t.file) != null && B.fileData && !r.value ? (y(), x("div", yl, [
|
|
3108
|
+
M("div", wl, [
|
|
3108
3109
|
D(f(Y), {
|
|
3109
3110
|
icon: "file",
|
|
3110
3111
|
class: "q-chatbot__file-icon"
|
|
3111
3112
|
})
|
|
3112
3113
|
]),
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3114
|
+
M("div", _l, [
|
|
3115
|
+
M("span", xl, re(($ = t.file) == null ? void 0 : $.fileData.name), 1),
|
|
3116
|
+
M("span", kl, re(s.value), 1)
|
|
3116
3117
|
])
|
|
3117
|
-
])) :
|
|
3118
|
-
|
|
3119
|
-
|
|
3118
|
+
])) : U("", !0),
|
|
3119
|
+
M("div", $l, [
|
|
3120
|
+
A.loading ? (y(), Z(St, { key: 0 })) : t.sender === "bot" && t.fields.length > 0 ? (y(!0), x(ve, { key: 1 }, qe(t.fields, (T, ue) => (y(), Z(f(dl), {
|
|
3120
3121
|
key: ue,
|
|
3121
3122
|
class: "q-chatbot__text",
|
|
3122
|
-
text:
|
|
3123
|
-
name:
|
|
3124
|
-
type:
|
|
3125
|
-
disabled:
|
|
3126
|
-
onRegenerate: () => o("regenerate",
|
|
3127
|
-
onApply: (ie) => j(ie,
|
|
3128
|
-
}, null, 8, ["text", "name", "type", "disabled", "onRegenerate", "onApply"]))), 128)) : (
|
|
3129
|
-
t.sender === "bot" ? (
|
|
3123
|
+
text: T.text || "",
|
|
3124
|
+
name: T.name,
|
|
3125
|
+
type: T.type,
|
|
3126
|
+
disabled: A.loading,
|
|
3127
|
+
onRegenerate: () => o("regenerate", T.name),
|
|
3128
|
+
onApply: (ie) => j(ie, T)
|
|
3129
|
+
}, null, 8, ["text", "name", "type", "disabled", "onRegenerate", "onApply"]))), 128)) : (y(), x(ve, { key: 2 }, [
|
|
3130
|
+
t.sender === "bot" ? (y(), Z(f(Ge), {
|
|
3130
3131
|
key: 0,
|
|
3131
3132
|
class: "q-chatbot__text",
|
|
3132
3133
|
source: u.value || ""
|
|
3133
|
-
}, null, 8, ["source"])) : (
|
|
3134
|
+
}, null, 8, ["source"])) : (y(), x("div", Al, re(t.message), 1))
|
|
3134
3135
|
], 64))
|
|
3135
3136
|
]),
|
|
3136
|
-
d.value ? (
|
|
3137
|
+
d.value ? (y(), x("div", El, [
|
|
3137
3138
|
D(St, {
|
|
3138
3139
|
class: "q-chatbot__text",
|
|
3139
3140
|
text: d.value
|
|
3140
3141
|
}, null, 8, ["text"])
|
|
3141
|
-
])) :
|
|
3142
|
+
])) : U("", !0)
|
|
3142
3143
|
]),
|
|
3143
|
-
D(f(
|
|
3144
|
+
D(f(Ml), {
|
|
3144
3145
|
"show-buttons": i.value,
|
|
3145
3146
|
loading: t.loading,
|
|
3146
3147
|
"date-format": t.dateFormat,
|
|
@@ -3150,10 +3151,10 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
|
|
|
3150
3151
|
"show-cancel-execution": t.showCancelExecution,
|
|
3151
3152
|
"cancel-execution-disabled": t.cancelExecutionDisabled,
|
|
3152
3153
|
onCopyResponse: _,
|
|
3153
|
-
onSubmitFeedback:
|
|
3154
|
+
onSubmitFeedback: J,
|
|
3154
3155
|
onApplyAll: H,
|
|
3155
3156
|
onApproveProceedPlan: b,
|
|
3156
|
-
onCancelExecution:
|
|
3157
|
+
onCancelExecution: h
|
|
3157
3158
|
}, null, 8, ["show-buttons", "loading", "date-format", "is-last-message", "is-execution-plan", "is-streaming", "show-cancel-execution", "cancel-execution-disabled"])
|
|
3158
3159
|
]);
|
|
3159
3160
|
};
|
|
@@ -3225,7 +3226,7 @@ function on() {
|
|
|
3225
3226
|
const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
3226
3227
|
key: 0,
|
|
3227
3228
|
class: "q-chatbot__feedback-buttons"
|
|
3228
|
-
},
|
|
3229
|
+
}, Tl = { class: "q-chatbot__sender" }, Ml = /* @__PURE__ */ V({
|
|
3229
3230
|
__name: "ChatBotMessageButtons",
|
|
3230
3231
|
props: {
|
|
3231
3232
|
loading: { type: Boolean },
|
|
@@ -3240,7 +3241,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3240
3241
|
},
|
|
3241
3242
|
emits: ["submit-feedback", "copy-response", "apply-all", "approve-proceed-plan", "cancel-execution"],
|
|
3242
3243
|
setup(e, { emit: n }) {
|
|
3243
|
-
const t = e, o = n, l = ke(), { getLastMessage: a } = on(), i = q(!1), r = q(""), c = q(null), d = q(!1), u = q(!1), s = q(!1), v = w(() => t.loading || d.value), b = w(() => u.value || !t.isLastMessage || t.loading || t.isStreaming),
|
|
3244
|
+
const t = e, o = n, l = ke(), { getLastMessage: a } = on(), i = q(!1), r = q(""), c = q(null), d = q(!1), u = q(!1), s = q(!1), v = w(() => t.loading || d.value), b = w(() => u.value || !t.isLastMessage || t.loading || t.isStreaming), h = w(() => s.value || t.cancelExecutionDisabled || !t.isLastMessage || t.loading), _ = t.date || /* @__PURE__ */ new Date(), j = a(), H = w(() => j ? j.fields && j.fields.length > 1 : !1), J = w(() => t.isExecutionPlan), A = w(() => t.showCancelExecution), P = [
|
|
3244
3245
|
{
|
|
3245
3246
|
id: "confirm-btn",
|
|
3246
3247
|
action: N,
|
|
@@ -3262,19 +3263,19 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3262
3263
|
icon: "cancel"
|
|
3263
3264
|
}
|
|
3264
3265
|
}
|
|
3265
|
-
],
|
|
3266
|
+
], Q = w(() => t.dateFormat ? $(_, "HH:mm") : _.toLocaleString()), B = w(() => `${Q.value}`);
|
|
3266
3267
|
function $(C, I) {
|
|
3267
|
-
const z = C.getDate().toString().padStart(2, "0"),
|
|
3268
|
-
return I.replace("dd", z).replace("MM",
|
|
3268
|
+
const z = C.getDate().toString().padStart(2, "0"), G = (C.getMonth() + 1).toString().padStart(2, "0"), ae = C.getFullYear().toString().padStart(2, "0"), ce = C.getHours().toString().padStart(2, "0"), te = C.getMinutes().toString().padStart(2, "0"), he = C.getSeconds().toString().padStart(2, "0");
|
|
3269
|
+
return I.replace("dd", z).replace("MM", G).replace("yyyy", ae).replace("HH", ce).replace("mm", te).replace("ss", he);
|
|
3269
3270
|
}
|
|
3270
|
-
function
|
|
3271
|
+
function T(C) {
|
|
3271
3272
|
i.value = !0, r.value = "", c.value = C;
|
|
3272
3273
|
}
|
|
3273
3274
|
function ue() {
|
|
3274
|
-
|
|
3275
|
+
T(0);
|
|
3275
3276
|
}
|
|
3276
3277
|
function ie() {
|
|
3277
|
-
|
|
3278
|
+
T(1);
|
|
3278
3279
|
}
|
|
3279
3280
|
function p() {
|
|
3280
3281
|
d.value || (d.value = !0, o("apply-all"));
|
|
@@ -3291,7 +3292,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3291
3292
|
function L() {
|
|
3292
3293
|
o("copy-response");
|
|
3293
3294
|
}
|
|
3294
|
-
return (C, I) => (
|
|
3295
|
+
return (C, I) => (y(), x(ve, null, [
|
|
3295
3296
|
D(f(Kt), {
|
|
3296
3297
|
modelValue: i.value,
|
|
3297
3298
|
"onUpdate:modelValue": I[1] || (I[1] = (z) => i.value = z),
|
|
@@ -3299,7 +3300,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3299
3300
|
buttons: P
|
|
3300
3301
|
}, {
|
|
3301
3302
|
body: R(() => [
|
|
3302
|
-
|
|
3303
|
+
M("div", Ll, re(f(l).commentDialogTitle), 1),
|
|
3303
3304
|
D(f(Ht), {
|
|
3304
3305
|
modelValue: r.value,
|
|
3305
3306
|
"onUpdate:modelValue": I[0] || (I[0] = (z) => r.value = z),
|
|
@@ -3311,7 +3312,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3311
3312
|
]),
|
|
3312
3313
|
_: 1
|
|
3313
3314
|
}, 8, ["modelValue"]),
|
|
3314
|
-
C.showButtons ? (
|
|
3315
|
+
C.showButtons ? (y(), x("div", Rl, [
|
|
3315
3316
|
D(f(jt), null, {
|
|
3316
3317
|
default: R(() => [
|
|
3317
3318
|
D(f(oe), {
|
|
@@ -3350,7 +3351,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3350
3351
|
]),
|
|
3351
3352
|
_: 1
|
|
3352
3353
|
}, 8, ["title", "disabled"]),
|
|
3353
|
-
H.value ? (
|
|
3354
|
+
H.value ? (y(), Z(f(oe), {
|
|
3354
3355
|
key: 0,
|
|
3355
3356
|
title: v.value ? void 0 : f(l).applyAll,
|
|
3356
3357
|
class: "q-chatbot__apply-all-button",
|
|
@@ -3365,8 +3366,8 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3365
3366
|
D(f(Y), { icon: "apply" })
|
|
3366
3367
|
]),
|
|
3367
3368
|
_: 1
|
|
3368
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3369
|
-
|
|
3369
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : U("", !0),
|
|
3370
|
+
J.value ? (y(), Z(f(oe), {
|
|
3370
3371
|
key: 1,
|
|
3371
3372
|
title: b.value ? void 0 : f(l).approveProceed,
|
|
3372
3373
|
class: "q-chatbot__approve-proceed-plan-button",
|
|
@@ -3381,14 +3382,14 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3381
3382
|
D(f(Y), { icon: "apply" })
|
|
3382
3383
|
]),
|
|
3383
3384
|
_: 1
|
|
3384
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3385
|
-
|
|
3385
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : U("", !0),
|
|
3386
|
+
A.value ? (y(), Z(f(oe), {
|
|
3386
3387
|
key: 2,
|
|
3387
|
-
title:
|
|
3388
|
+
title: h.value ? void 0 : f(l).cancelButton,
|
|
3388
3389
|
class: "q-chatbot__cancel-execution-button",
|
|
3389
3390
|
borderless: "",
|
|
3390
|
-
disabled:
|
|
3391
|
-
readonly:
|
|
3391
|
+
disabled: h.value,
|
|
3392
|
+
readonly: h.value,
|
|
3392
3393
|
label: f(l).cancelButton,
|
|
3393
3394
|
onClick: k
|
|
3394
3395
|
}, {
|
|
@@ -3396,12 +3397,12 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3396
3397
|
D(f(Y), { icon: "cancel" })
|
|
3397
3398
|
]),
|
|
3398
3399
|
_: 1
|
|
3399
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3400
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : U("", !0)
|
|
3400
3401
|
]),
|
|
3401
3402
|
_: 1
|
|
3402
3403
|
})
|
|
3403
|
-
])) :
|
|
3404
|
-
|
|
3404
|
+
])) : U("", !0),
|
|
3405
|
+
M("div", Tl, re(B.value), 1)
|
|
3405
3406
|
], 64));
|
|
3406
3407
|
}
|
|
3407
3408
|
}), ql = { class: "q-chatbot__tools" }, Nl = { class: "q-chatbot__tools__select" }, Fl = /* @__PURE__ */ V({
|
|
@@ -3448,13 +3449,13 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3448
3449
|
}
|
|
3449
3450
|
return (s, v) => {
|
|
3450
3451
|
const b = gn("q-select");
|
|
3451
|
-
return
|
|
3452
|
-
|
|
3453
|
-
i.value ? (
|
|
3452
|
+
return y(), x("div", ql, [
|
|
3453
|
+
M("div", Nl, [
|
|
3454
|
+
i.value ? (y(), Z(b, {
|
|
3454
3455
|
key: 0,
|
|
3455
3456
|
modelValue: r.value,
|
|
3456
3457
|
"onUpdate:modelValue": [
|
|
3457
|
-
v[0] || (v[0] = (
|
|
3458
|
+
v[0] || (v[0] = (h) => r.value = h),
|
|
3458
3459
|
u
|
|
3459
3460
|
],
|
|
3460
3461
|
inline: "",
|
|
@@ -3462,7 +3463,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3462
3463
|
class: "q-chatbot__tools-select-input",
|
|
3463
3464
|
size: "medium",
|
|
3464
3465
|
items: c.value
|
|
3465
|
-
}, null, 8, ["modelValue", "items"])) :
|
|
3466
|
+
}, null, 8, ["modelValue", "items"])) : U("", !0)
|
|
3466
3467
|
]),
|
|
3467
3468
|
D(f(oe), {
|
|
3468
3469
|
title: f(l),
|
|
@@ -3500,7 +3501,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3500
3501
|
function b(B) {
|
|
3501
3502
|
B.preventDefault(), t.disabled || (c.value = !0);
|
|
3502
3503
|
}
|
|
3503
|
-
const
|
|
3504
|
+
const h = w(() => ({
|
|
3504
3505
|
"q-chatbot__footer-disabled": t.disabled,
|
|
3505
3506
|
"drag-over": c.value && !i.value
|
|
3506
3507
|
}));
|
|
@@ -3508,90 +3509,90 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3508
3509
|
B.preventDefault(), c.value = !1;
|
|
3509
3510
|
}
|
|
3510
3511
|
function j(B) {
|
|
3511
|
-
var
|
|
3512
|
+
var T;
|
|
3512
3513
|
if (B.preventDefault(), c.value = !1, t.disabled || i.value) return;
|
|
3513
|
-
const $ = (
|
|
3514
|
+
const $ = (T = B.dataTransfer) == null ? void 0 : T.files;
|
|
3514
3515
|
$ && H($[0]);
|
|
3515
3516
|
}
|
|
3516
3517
|
function H(B) {
|
|
3517
3518
|
i.value = B, B.type.startsWith("image/") ? r.value = URL.createObjectURL(B) : r.value = "";
|
|
3518
3519
|
}
|
|
3519
|
-
function
|
|
3520
|
+
function J() {
|
|
3520
3521
|
if (!(s.value.trim() === "" || t.loading || t.disabled)) {
|
|
3521
3522
|
if (i.value) {
|
|
3522
3523
|
const B = {
|
|
3523
3524
|
fileData: i.value,
|
|
3524
3525
|
previewUrl: r.value ?? ""
|
|
3525
3526
|
};
|
|
3526
|
-
o("send-message", s.value, B),
|
|
3527
|
+
o("send-message", s.value, B), A();
|
|
3527
3528
|
} else o("send-message", s.value);
|
|
3528
3529
|
s.value = "";
|
|
3529
3530
|
}
|
|
3530
3531
|
}
|
|
3531
|
-
function
|
|
3532
|
+
function A() {
|
|
3532
3533
|
i.value = null, r.value = "", a.value && (a.value.value = "", a.value.files = null);
|
|
3533
3534
|
}
|
|
3534
3535
|
function P() {
|
|
3535
3536
|
var B;
|
|
3536
3537
|
(B = a.value) == null || B.click();
|
|
3537
3538
|
}
|
|
3538
|
-
function
|
|
3539
|
-
var
|
|
3539
|
+
function Q(B) {
|
|
3540
|
+
var T;
|
|
3540
3541
|
const $ = B.target;
|
|
3541
|
-
(
|
|
3542
|
+
(T = $.files) != null && T[0] && H($.files[0]);
|
|
3542
3543
|
}
|
|
3543
|
-
return (B, $) => (
|
|
3544
|
+
return (B, $) => (y(), x(ve, null, [
|
|
3544
3545
|
D(f(zt), {
|
|
3545
3546
|
label: f(l).inputLabel
|
|
3546
3547
|
}, null, 8, ["label"]),
|
|
3547
|
-
|
|
3548
|
-
class: X(["q-chatbot__footer",
|
|
3548
|
+
M("div", {
|
|
3549
|
+
class: X(["q-chatbot__footer", h.value]),
|
|
3549
3550
|
onDragover: Ue(b, ["prevent"]),
|
|
3550
3551
|
onDragleave: Ue(_, ["prevent"]),
|
|
3551
3552
|
onDrop: Ue(j, ["prevent"])
|
|
3552
3553
|
}, [
|
|
3553
|
-
|
|
3554
|
-
i.value ? (
|
|
3555
|
-
u.value ? (
|
|
3554
|
+
M("div", Pl, [
|
|
3555
|
+
i.value ? (y(), x("div", Ol, [
|
|
3556
|
+
u.value ? (y(), x("img", {
|
|
3556
3557
|
key: 0,
|
|
3557
3558
|
class: "q-chatbot__image-preview",
|
|
3558
3559
|
src: r.value,
|
|
3559
3560
|
tabindex: "0",
|
|
3560
3561
|
alt: f(l).imagePreview
|
|
3561
|
-
}, null, 8, Ul)) : (
|
|
3562
|
+
}, null, 8, Ul)) : (y(), x("div", Gl, [
|
|
3562
3563
|
D(f(Y), {
|
|
3563
3564
|
icon: "file",
|
|
3564
3565
|
class: "q-chatbot__file-icon"
|
|
3565
3566
|
}),
|
|
3566
|
-
|
|
3567
|
+
M("span", jl, re(i.value.name), 1)
|
|
3567
3568
|
])),
|
|
3568
3569
|
D(f(oe), {
|
|
3569
3570
|
class: "q-chatbot__remove-file",
|
|
3570
3571
|
tabindex: "0",
|
|
3571
3572
|
flat: "",
|
|
3572
3573
|
round: "",
|
|
3573
|
-
onClick:
|
|
3574
|
+
onClick: A
|
|
3574
3575
|
}, {
|
|
3575
3576
|
default: R(() => [
|
|
3576
3577
|
D(f(Y), { icon: "remove" })
|
|
3577
3578
|
]),
|
|
3578
3579
|
_: 1
|
|
3579
3580
|
})
|
|
3580
|
-
])) :
|
|
3581
|
-
|
|
3581
|
+
])) : U("", !0),
|
|
3582
|
+
M("div", zl, [
|
|
3582
3583
|
D(f(Ka), {
|
|
3583
3584
|
id: "chatbot-input",
|
|
3584
3585
|
modelValue: s.value,
|
|
3585
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
3586
|
+
"onUpdate:modelValue": $[0] || ($[0] = (T) => s.value = T),
|
|
3586
3587
|
size: "block",
|
|
3587
3588
|
autosize: "",
|
|
3588
3589
|
resize: "none",
|
|
3589
3590
|
rows: 2,
|
|
3590
3591
|
disabled: t.disabled,
|
|
3591
|
-
onKeyup: mn(
|
|
3592
|
+
onKeyup: mn(J, ["enter"])
|
|
3592
3593
|
}, null, 8, ["modelValue", "disabled"])
|
|
3593
3594
|
]),
|
|
3594
|
-
|
|
3595
|
+
M("div", Vl, [
|
|
3595
3596
|
D(f(oe), {
|
|
3596
3597
|
title: f(l).imageUpload,
|
|
3597
3598
|
class: "q-chatbot__upload",
|
|
@@ -3603,14 +3604,14 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3603
3604
|
]),
|
|
3604
3605
|
_: 1
|
|
3605
3606
|
}, 8, ["title", "disabled"]),
|
|
3606
|
-
|
|
3607
|
+
M("input", {
|
|
3607
3608
|
id: "file-upload",
|
|
3608
3609
|
ref_key: "fileInput",
|
|
3609
3610
|
ref: a,
|
|
3610
3611
|
type: "file",
|
|
3611
3612
|
accept: d.value,
|
|
3612
3613
|
class: "hidden-input",
|
|
3613
|
-
onChange:
|
|
3614
|
+
onChange: Q
|
|
3614
3615
|
}, null, 40, Hl),
|
|
3615
3616
|
D(f(oe), {
|
|
3616
3617
|
title: f(l).sendMessage,
|
|
@@ -3618,7 +3619,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3618
3619
|
class: "q-chatbot__send",
|
|
3619
3620
|
disabled: v.value,
|
|
3620
3621
|
readonly: v.value,
|
|
3621
|
-
onClick:
|
|
3622
|
+
onClick: J
|
|
3622
3623
|
}, {
|
|
3623
3624
|
default: R(() => [
|
|
3624
3625
|
D(f(Y), { icon: "send" })
|
|
@@ -3650,31 +3651,31 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3650
3651
|
},
|
|
3651
3652
|
emits: ["apply-fields", "direct-agent-chat"],
|
|
3652
3653
|
setup(e, { emit: n }) {
|
|
3653
|
-
const t = e, o = n, l = q(!0), a = q(null), i = q(!0), r = q(t.agentData.id), c = q(t.agentData.formId), d = ke(), { isLoading: u, clearChatData: s, getChatData: v, getJobResultData: b, sendPrompt:
|
|
3654
|
+
const t = e, o = n, l = q(!0), a = q(null), i = q(!0), r = q(t.agentData.id), c = q(t.agentData.formId), d = ke(), { isLoading: u, clearChatData: s, getChatData: v, getJobResultData: b, sendPrompt: h, cancelExecution: _ } = en(t.apiEndpoint), { messages: j, addChatMessage: H, clearMessages: J, getLastMessage: A, deleteMessageById: P } = on(), Q = w(() => l.value || u.value), B = /<span data-type="tool-calling">.*?<\/span>/, $ = ze({
|
|
3654
3655
|
active: !1,
|
|
3655
3656
|
sessionId: "",
|
|
3656
3657
|
cancelling: !1,
|
|
3657
3658
|
cancelled: !1,
|
|
3658
3659
|
callingTools: !1
|
|
3659
3660
|
});
|
|
3660
|
-
function
|
|
3661
|
+
function T(g) {
|
|
3661
3662
|
return g.includes('data-type="execution-progress"');
|
|
3662
3663
|
}
|
|
3663
3664
|
function ue(g) {
|
|
3664
|
-
return !
|
|
3665
|
+
return !T(g) || $.cancelling || $.cancelled || !$.active || !$.callingTools;
|
|
3665
3666
|
}
|
|
3666
3667
|
async function ie() {
|
|
3667
3668
|
if (!$.sessionId || $.cancelling) return;
|
|
3668
3669
|
$.cancelling = !0;
|
|
3669
|
-
const g =
|
|
3670
|
+
const g = A();
|
|
3670
3671
|
if (g) {
|
|
3671
|
-
const
|
|
3672
|
-
B.test(g.message) && (g.message = g.message.replace(B,
|
|
3672
|
+
const E = '<span data-type="tool-calling">Cancelling</span>';
|
|
3673
|
+
B.test(g.message) && (g.message = g.message.replace(B, E));
|
|
3673
3674
|
}
|
|
3674
3675
|
try {
|
|
3675
3676
|
await _($.sessionId), $.cancelled = !0;
|
|
3676
|
-
} catch (
|
|
3677
|
-
console.error("Error cancelling execution: ",
|
|
3677
|
+
} catch (E) {
|
|
3678
|
+
console.error("Error cancelling execution: ", E);
|
|
3678
3679
|
} finally {
|
|
3679
3680
|
$.cancelling = !1;
|
|
3680
3681
|
}
|
|
@@ -3685,17 +3686,17 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3685
3686
|
function m() {
|
|
3686
3687
|
$.active = !1, $.sessionId = "", $.cancelling = !1;
|
|
3687
3688
|
}
|
|
3688
|
-
function k(g,
|
|
3689
|
-
const
|
|
3689
|
+
function k(g, E) {
|
|
3690
|
+
const W = `<span data-type="tool-calling">${E.replace(/<br\s*\/?>/gi, "")}</span>`;
|
|
3690
3691
|
if (B.test(g.message))
|
|
3691
|
-
g.message = g.message.replace(B,
|
|
3692
|
+
g.message = g.message.replace(B, W);
|
|
3692
3693
|
else {
|
|
3693
3694
|
const ne = g.message.indexOf(Kl);
|
|
3694
|
-
ne !== -1 ? g.message = g.message.slice(0, ne) +
|
|
3695
|
+
ne !== -1 ? g.message = g.message.slice(0, ne) + W + g.message.slice(ne) : g.message = W + g.message;
|
|
3695
3696
|
}
|
|
3696
3697
|
}
|
|
3697
|
-
function N(g,
|
|
3698
|
-
g.message.endsWith("<br>") || (g.message += "<br>"), g.message += `${
|
|
3698
|
+
function N(g, E) {
|
|
3699
|
+
g.message.endsWith("<br>") || (g.message += "<br>"), g.message += `${E}<br>`;
|
|
3699
3700
|
}
|
|
3700
3701
|
function L(g) {
|
|
3701
3702
|
g.message = g.message.replace(B, "");
|
|
@@ -3703,7 +3704,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3703
3704
|
bn(() => {
|
|
3704
3705
|
var g;
|
|
3705
3706
|
(g = a.value) == null || g.removeEventListener("scroll", ce);
|
|
3706
|
-
}),
|
|
3707
|
+
}), Me(() => {
|
|
3707
3708
|
I();
|
|
3708
3709
|
});
|
|
3709
3710
|
function C(g) {
|
|
@@ -3718,87 +3719,87 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3718
3719
|
}
|
|
3719
3720
|
async function z() {
|
|
3720
3721
|
C(!0);
|
|
3721
|
-
const { data: g, error:
|
|
3722
|
+
const { data: g, error: E } = await v(
|
|
3722
3723
|
t.username,
|
|
3723
3724
|
t.projectPath,
|
|
3724
3725
|
r.value,
|
|
3725
3726
|
c.value
|
|
3726
3727
|
);
|
|
3727
|
-
if (
|
|
3728
|
-
C(!0), H(d.botIsSick), console.log("Error loading chat data: " +
|
|
3728
|
+
if (E || !g || !g.success) {
|
|
3729
|
+
C(!0), H(d.botIsSick), console.log("Error loading chat data: " + E);
|
|
3729
3730
|
return;
|
|
3730
3731
|
}
|
|
3731
|
-
C(!1),
|
|
3732
|
+
C(!1), G(), g.history.forEach(async (O) => {
|
|
3732
3733
|
H(
|
|
3733
|
-
|
|
3734
|
-
|
|
3734
|
+
O.content,
|
|
3735
|
+
O.type === "ai" ? "bot" : "user",
|
|
3735
3736
|
void 0,
|
|
3736
3737
|
// At this point we don't have preview URLs for past messages
|
|
3737
|
-
|
|
3738
|
+
O.sessionID
|
|
3738
3739
|
);
|
|
3739
3740
|
});
|
|
3740
3741
|
}
|
|
3741
|
-
function
|
|
3742
|
+
function G() {
|
|
3742
3743
|
const g = d.initialMessage;
|
|
3743
3744
|
H(g, "bot", void 0, void 0, !0);
|
|
3744
3745
|
}
|
|
3745
3746
|
function ae() {
|
|
3746
|
-
|
|
3747
|
+
J(), C(!1), i.value = !0, m();
|
|
3747
3748
|
}
|
|
3748
3749
|
function ce() {
|
|
3749
3750
|
if (a.value) {
|
|
3750
|
-
const { scrollTop:
|
|
3751
|
-
i.value =
|
|
3751
|
+
const { scrollTop: E, clientHeight: O, scrollHeight: W } = a.value;
|
|
3752
|
+
i.value = E + O >= W - 20;
|
|
3752
3753
|
}
|
|
3753
3754
|
}
|
|
3754
|
-
async function te(g,
|
|
3755
|
+
async function te(g, E) {
|
|
3755
3756
|
a.value && a.value.scrollTo({
|
|
3756
3757
|
top: a.value.scrollHeight,
|
|
3757
3758
|
behavior: "smooth"
|
|
3758
|
-
}), H(g, "user",
|
|
3759
|
+
}), H(g, "user", E), ge(g, E == null ? void 0 : E.fileData);
|
|
3759
3760
|
}
|
|
3760
3761
|
async function he(g) {
|
|
3761
3762
|
a.value && a.value.scrollTo({
|
|
3762
3763
|
top: a.value.scrollHeight,
|
|
3763
3764
|
behavior: "smooth"
|
|
3764
3765
|
}), H("", "bot");
|
|
3765
|
-
const
|
|
3766
|
-
|
|
3766
|
+
const E = A();
|
|
3767
|
+
E && await b(
|
|
3767
3768
|
g,
|
|
3768
|
-
(
|
|
3769
|
-
if (
|
|
3770
|
-
const
|
|
3771
|
-
|
|
3769
|
+
(O) => {
|
|
3770
|
+
if (E.message += O, E.fields || (E.fields = []), E.fields.length > 0) {
|
|
3771
|
+
const W = E.fields[E.fields.length - 1];
|
|
3772
|
+
W.text = E.message;
|
|
3772
3773
|
}
|
|
3773
3774
|
},
|
|
3774
|
-
(
|
|
3775
|
+
(O) => {
|
|
3775
3776
|
var ne;
|
|
3776
|
-
|
|
3777
|
-
const
|
|
3778
|
-
(ne =
|
|
3779
|
-
id:
|
|
3780
|
-
type:
|
|
3781
|
-
name:
|
|
3782
|
-
text:
|
|
3777
|
+
E.message = "";
|
|
3778
|
+
const W = O;
|
|
3779
|
+
(ne = E.fields) == null || ne.push({
|
|
3780
|
+
id: W.id,
|
|
3781
|
+
type: W.type,
|
|
3782
|
+
name: W.name,
|
|
3783
|
+
text: W.text
|
|
3783
3784
|
});
|
|
3784
3785
|
},
|
|
3785
|
-
(
|
|
3786
|
-
C(!0), H(d.botIsSick), console.error("Error getting job result: " +
|
|
3786
|
+
(O) => {
|
|
3787
|
+
C(!0), H(d.botIsSick), console.error("Error getting job result: " + O), P(E.id);
|
|
3787
3788
|
}
|
|
3788
3789
|
);
|
|
3789
3790
|
}
|
|
3790
|
-
async function ge(g,
|
|
3791
|
-
const
|
|
3792
|
-
if (
|
|
3791
|
+
async function ge(g, E) {
|
|
3792
|
+
const O = nn(), W = g.trim().toLowerCase() === d.approveProceedPlan.toLowerCase(), ne = new FormData();
|
|
3793
|
+
if (E && ne.append("file", E), ne.append("message", g), ne.append("project", t.projectPath), ne.append("user", t.username), ne.append("sessionID", O), r.value !== "")
|
|
3793
3794
|
o("direct-agent-chat", r.value, g);
|
|
3794
3795
|
else {
|
|
3795
3796
|
H("", "bot");
|
|
3796
|
-
const fe =
|
|
3797
|
+
const fe = A();
|
|
3797
3798
|
if (!fe) return;
|
|
3798
|
-
|
|
3799
|
+
W && p(O);
|
|
3799
3800
|
let Ye = null;
|
|
3800
3801
|
try {
|
|
3801
|
-
await
|
|
3802
|
+
await h(
|
|
3802
3803
|
ne,
|
|
3803
3804
|
(le) => {
|
|
3804
3805
|
fe && (Ye === "tools" && le.trim() && (L(fe), Ye = "text", $.callingTools = !1), fe.message += le);
|
|
@@ -3808,33 +3809,34 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3808
3809
|
(mt = le == null ? void 0 : le.data) != null && mt.html && (le.event === "tool_start" ? (k(fe, le.data.html), Ye = "tools", $.callingTools = !0) : le.event === "tool_end" && N(fe, le.data.html));
|
|
3809
3810
|
},
|
|
3810
3811
|
(le) => {
|
|
3811
|
-
C(!0), H(d.botIsSick), console.error("Error sending message: " + le), P(fe.id),
|
|
3812
|
+
C(!0), H(d.botIsSick), console.error("Error sending message: " + le), P(fe.id), W && m();
|
|
3812
3813
|
},
|
|
3813
3814
|
() => {
|
|
3814
|
-
L(fe),
|
|
3815
|
+
L(fe), W && m();
|
|
3815
3816
|
}
|
|
3816
3817
|
);
|
|
3817
3818
|
} catch (le) {
|
|
3818
|
-
|
|
3819
|
+
W && m(), console.error("Error sending prompt: ", le);
|
|
3819
3820
|
}
|
|
3820
3821
|
}
|
|
3821
3822
|
}
|
|
3822
3823
|
async function me() {
|
|
3823
|
-
const { data:
|
|
3824
|
+
const g = A(), E = g == null ? void 0 : g.sessionID, { data: O, error: W } = await s(
|
|
3824
3825
|
t.username,
|
|
3825
3826
|
t.projectPath,
|
|
3826
3827
|
r.value,
|
|
3827
|
-
c.value
|
|
3828
|
+
c.value,
|
|
3829
|
+
E
|
|
3828
3830
|
);
|
|
3829
|
-
if (
|
|
3830
|
-
C(!0), H(d.loginError), console.log("Error clearing chat: " +
|
|
3831
|
+
if (W || !O || !O.success) {
|
|
3832
|
+
C(!0), H(d.loginError), console.log("Error clearing chat: " + W);
|
|
3831
3833
|
return;
|
|
3832
3834
|
}
|
|
3833
|
-
ae(),
|
|
3835
|
+
ae(), G();
|
|
3834
3836
|
}
|
|
3835
3837
|
function ye(g) {
|
|
3836
|
-
const
|
|
3837
|
-
return g === "user" &&
|
|
3838
|
+
const E = ["q-chatbot__messages-wrapper"];
|
|
3839
|
+
return g === "user" && E.push("q-chatbot__messages-wrapper_right"), E;
|
|
3838
3840
|
}
|
|
3839
3841
|
async function Ne(g) {
|
|
3840
3842
|
r.value = g.key, c.value = g.formId, ae(), await I();
|
|
@@ -3843,20 +3845,20 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3843
3845
|
!g || g.length === 0 || o("apply-fields", g);
|
|
3844
3846
|
}
|
|
3845
3847
|
function pe(g) {
|
|
3846
|
-
const
|
|
3847
|
-
o("direct-agent-chat", r.value,
|
|
3848
|
+
const E = d.regenerateResponsePrompt.replace("{0}", g);
|
|
3849
|
+
o("direct-agent-chat", r.value, E);
|
|
3848
3850
|
}
|
|
3849
3851
|
return se(
|
|
3850
3852
|
() => t.availableAgents,
|
|
3851
|
-
(g,
|
|
3852
|
-
g.length === 0 &&
|
|
3853
|
+
(g, E) => {
|
|
3854
|
+
g.length === 0 && E.length > 0 && (r.value = "", c.value = "", ae(), I());
|
|
3853
3855
|
}
|
|
3854
3856
|
), se(
|
|
3855
3857
|
() => t.agentData,
|
|
3856
|
-
async (g,
|
|
3857
|
-
if (
|
|
3858
|
-
const
|
|
3859
|
-
g.id !== r.value && await Ne({ formId: g.formId, key: g.id }),
|
|
3858
|
+
async (g, E) => {
|
|
3859
|
+
if (Q.value) return;
|
|
3860
|
+
const O = g.jobId, W = E.jobId, ne = O !== W;
|
|
3861
|
+
g.id !== r.value && await Ne({ formId: g.formId, key: g.id }), O && ne && await he(O);
|
|
3860
3862
|
},
|
|
3861
3863
|
{ deep: !0 }
|
|
3862
3864
|
), se(
|
|
@@ -3865,38 +3867,38 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3865
3867
|
i.value && a.value && (await new Promise((g) => setTimeout(g, 0)), a.value.scrollTop = a.value.scrollHeight);
|
|
3866
3868
|
},
|
|
3867
3869
|
{ deep: !0, flush: "post" }
|
|
3868
|
-
), (g,
|
|
3869
|
-
|
|
3870
|
+
), (g, E) => (y(), x("div", Ql, [
|
|
3871
|
+
M("div", Yl, [
|
|
3870
3872
|
D(f(Fl), {
|
|
3871
|
-
disabled:
|
|
3873
|
+
disabled: Q.value,
|
|
3872
3874
|
"available-agents": t.availableAgents,
|
|
3873
3875
|
"selected-agent-key": r.value,
|
|
3874
3876
|
onClear: me,
|
|
3875
3877
|
onChangeChat: Ne
|
|
3876
3878
|
}, null, 8, ["disabled", "available-agents", "selected-agent-key"]),
|
|
3877
|
-
|
|
3879
|
+
M("div", {
|
|
3878
3880
|
ref_key: "messagesContainer",
|
|
3879
3881
|
ref: a,
|
|
3880
3882
|
class: "q-chatbot__messages-container",
|
|
3881
3883
|
onScroll: ce
|
|
3882
3884
|
}, [
|
|
3883
|
-
(
|
|
3884
|
-
key:
|
|
3885
|
-
class: X(ye(
|
|
3885
|
+
(y(!0), x(ve, null, qe(f(j), (O, W) => (y(), x("div", {
|
|
3886
|
+
key: O.id,
|
|
3887
|
+
class: X(ye(O.sender))
|
|
3886
3888
|
}, [
|
|
3887
|
-
D(f(Il), de({ ref_for: !0 },
|
|
3889
|
+
D(f(Il), de({ ref_for: !0 }, O, {
|
|
3888
3890
|
"date-format": t.dateFormat,
|
|
3889
3891
|
"user-image": t.userImage,
|
|
3890
3892
|
"chatbot-image": t.chatbotImage,
|
|
3891
|
-
loading: f(u) && !
|
|
3892
|
-
file:
|
|
3893
|
+
loading: f(u) && !O.message,
|
|
3894
|
+
file: O.file,
|
|
3893
3895
|
"api-endpoint": t.apiEndpoint,
|
|
3894
|
-
"session-i-d":
|
|
3895
|
-
fields:
|
|
3896
|
-
"is-last-message":
|
|
3896
|
+
"session-i-d": O.sessionID,
|
|
3897
|
+
fields: O.fields,
|
|
3898
|
+
"is-last-message": W === f(j).length - 1,
|
|
3897
3899
|
"is-streaming": f(u),
|
|
3898
|
-
"show-cancel-execution":
|
|
3899
|
-
"cancel-execution-disabled": ue(
|
|
3900
|
+
"show-cancel-execution": T(O.message),
|
|
3901
|
+
"cancel-execution-disabled": ue(O.message),
|
|
3900
3902
|
onRegenerate: pe,
|
|
3901
3903
|
onApplyFields: S,
|
|
3902
3904
|
onSendMessage: te,
|
|
@@ -3905,9 +3907,9 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
|
|
|
3905
3907
|
], 2))), 128))
|
|
3906
3908
|
], 544)
|
|
3907
3909
|
]),
|
|
3908
|
-
|
|
3910
|
+
M("div", Xl, [
|
|
3909
3911
|
D(f(Zl), {
|
|
3910
|
-
disabled:
|
|
3912
|
+
disabled: Q.value,
|
|
3911
3913
|
loading: f(u),
|
|
3912
3914
|
onSendMessage: te
|
|
3913
3915
|
}, null, 8, ["disabled", "loading"])
|