@quidgest/chatbot 0.5.7 → 0.5.9
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/composables/useChatApi.d.ts +7 -1
- package/dist/composables/useSSE.d.ts +7 -0
- package/dist/index.js +18 -12
- package/dist/index.mjs +1261 -1216
- package/package.json +1 -1
- package/src/components/ChatBot/ChatBot.vue +44 -0
- package/src/composables/__tests__/useSSE.spec.ts +96 -0
- package/src/composables/useChatApi.ts +4 -0
- package/src/composables/useSSE.ts +13 -1
package/dist/index.mjs
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
1
|
+
import { getCurrentInstance as at, computed as w, inject as rt, ref as T, provide as Xt, defineComponent as O, openBlock as y, createElementBlock as A, normalizeClass as W, normalizeStyle as _e, unref as f, toRef as Se, withModifiers as Me, createVNode as S, createCommentVNode as G, createElementVNode as L, renderSlot as M, createTextVNode as je, toDisplayString as ae, createBlock as V, resolveDynamicComponent as At, h as Ye, mergeProps as de, useTemplateRef as xt, withCtx as C, normalizeProps as De, guardReactiveProps as Te, mergeModels as ve, useModel as Ee, watch as le, createSlots as It, withDirectives as St, vModelDynamic as Kt, useId as en, onMounted as Ce, onUnmounted as Dt, readonly as tn, customRef as nn, getCurrentScope as on, onScopeDispose as Et, shallowRef as Xe, nextTick as xe, toValue as it, reactive as Ke, onBeforeUnmount as an, Fragment as pe, Teleport as rn, Transition as dt, renderList as Be, toHandlers as ln, vModelText as sn, resolveComponent as cn, withKeys as un, onBeforeMount as dn } from "vue";
|
|
2
|
+
import Ct from "axios";
|
|
3
|
+
import pn from "markdown-it";
|
|
4
|
+
function et(e) {
|
|
5
5
|
return e == null ? !0 : typeof e == "string" || Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function pt(e) {
|
|
8
8
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function lt(e = {}, n = {}) {
|
|
11
11
|
const t = {}, o = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(n)]);
|
|
12
12
|
for (const r of o) {
|
|
13
13
|
if (r === "__proto__" || r === "constructor" || r === "prototype")
|
|
14
14
|
continue;
|
|
15
15
|
const a = e[r], i = n[r];
|
|
16
|
-
|
|
16
|
+
pt(a) && pt(i) ? t[r] = lt(
|
|
17
17
|
a,
|
|
18
18
|
i
|
|
19
19
|
) : t[r] = i !== void 0 ? i : a;
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const Bt = "q-defaults";
|
|
24
|
+
function fn() {
|
|
25
25
|
var e, n;
|
|
26
|
-
const t =
|
|
26
|
+
const t = at();
|
|
27
27
|
if (!t)
|
|
28
28
|
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
29
29
|
const o = t.type.name ?? t.type.__name;
|
|
30
30
|
if (!o) throw new Error("[Quidgest UI] Could not determine component name");
|
|
31
|
-
const r =
|
|
32
|
-
return w(() =>
|
|
31
|
+
const r = Rt(), a = (e = r.value) == null ? void 0 : e.Global, i = (n = r.value) == null ? void 0 : n[o];
|
|
32
|
+
return w(() => lt(a, i));
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
if (
|
|
36
|
-
const n =
|
|
37
|
-
|
|
34
|
+
function vn(e) {
|
|
35
|
+
if (et(e)) return;
|
|
36
|
+
const n = Rt(), t = T(e), o = w(() => et(t.value) ? n.value : lt(n.value, t.value));
|
|
37
|
+
Xt(Bt, o);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const e =
|
|
39
|
+
function Rt() {
|
|
40
|
+
const e = rt(Bt, void 0);
|
|
41
41
|
if (!e) throw new Error("[Quidgest UI] Could not find defaults instance");
|
|
42
42
|
return e;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const mn = ["id"], gn = /* @__PURE__ */ O({
|
|
45
45
|
__name: "QSpinnerLoader",
|
|
46
46
|
props: {
|
|
47
47
|
id: {},
|
|
@@ -52,75 +52,75 @@ const fn = ["id"], vn = /* @__PURE__ */ T({
|
|
|
52
52
|
const n = e, t = w(() => ({
|
|
53
53
|
"font-size": n.size !== 48 ? `${n.size}px` : void 0
|
|
54
54
|
}));
|
|
55
|
-
return (o, r) => (y(),
|
|
55
|
+
return (o, r) => (y(), A("div", {
|
|
56
56
|
id: n.id,
|
|
57
|
-
class:
|
|
58
|
-
style:
|
|
59
|
-
}, null, 14,
|
|
57
|
+
class: W(["q-spinner-loader", n.class]),
|
|
58
|
+
style: _e(t.value)
|
|
59
|
+
}, null, 14, mn));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
function
|
|
62
|
+
function bn(e) {
|
|
63
63
|
return e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([0-9])([a-zA-Z])/g, "$1 $2").replace(/([a-zA-Z])([0-9])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").trim().split(/\s+/);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function hn(e) {
|
|
66
|
+
return bn(e).join("-").toLowerCase();
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function yn(e, n) {
|
|
69
69
|
var t;
|
|
70
|
-
const o =
|
|
70
|
+
const o = hn(n);
|
|
71
71
|
return o ? typeof ((t = e.props) == null ? void 0 : t[o]) < "u" : !1;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function K(e) {
|
|
74
74
|
const n = e, t = n.setup;
|
|
75
75
|
return t && (n.setup = (o, r) => {
|
|
76
|
-
const a =
|
|
77
|
-
if (
|
|
78
|
-
const i =
|
|
76
|
+
const a = fn();
|
|
77
|
+
if (et(a.value)) return t(o, r);
|
|
78
|
+
const i = at();
|
|
79
79
|
if (i === null) return t(o, r);
|
|
80
80
|
const l = new Proxy(o, {
|
|
81
81
|
get(u, c) {
|
|
82
82
|
var p;
|
|
83
|
-
const s = Reflect.get(u, c),
|
|
84
|
-
return typeof c == "string" && !
|
|
83
|
+
const s = Reflect.get(u, c), m = (p = a.value) == null ? void 0 : p[c];
|
|
84
|
+
return typeof c == "string" && !yn(i.vnode, c) ? m ?? s : s;
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
return t(l, r);
|
|
88
88
|
}), e;
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
function
|
|
90
|
+
const wn = K(gn);
|
|
91
|
+
function _n(e, n = !1) {
|
|
92
92
|
return n ? /^#[a-fA-F0-9]{6}$/.test(e) : /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(e);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function kn(e) {
|
|
95
95
|
const n = e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
|
96
96
|
if (n) {
|
|
97
97
|
const t = parseInt(n[1], 10), o = parseInt(n[2], 10), r = parseInt(n[3], 10);
|
|
98
98
|
return { r: t, g: o, b: r };
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
if (
|
|
101
|
+
function $n(e) {
|
|
102
|
+
if (_n(e)) {
|
|
103
103
|
e.length === 4 && (e = "#" + e[1] + e[1] + e[2] + e[2] + e[3] + e[3]);
|
|
104
104
|
const n = parseInt(e.slice(1, 3), 16), t = parseInt(e.slice(3, 5), 16), o = parseInt(e.slice(5, 7), 16);
|
|
105
105
|
return { r: n, g: t, b: o };
|
|
106
106
|
} else {
|
|
107
|
-
const n =
|
|
107
|
+
const n = kn(e);
|
|
108
108
|
if (n) return n;
|
|
109
109
|
}
|
|
110
110
|
throw new Error("Invalid color format");
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
const t =
|
|
114
|
-
return t.l = t.l - o * t.l,
|
|
112
|
+
function An(e, n) {
|
|
113
|
+
const t = Lt(e), o = n / 100;
|
|
114
|
+
return t.l = t.l - o * t.l, In(t);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function xn(e) {
|
|
117
117
|
const n = e.r.toString(16).padStart(2, "0"), t = e.g.toString(16).padStart(2, "0"), o = e.b.toString(16).padStart(2, "0");
|
|
118
118
|
return `#${n}${t}${o}`;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function ft(e) {
|
|
121
121
|
return `${e.r} ${e.g} ${e.b}`;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Lt(e) {
|
|
124
124
|
const n = e.r / 255, t = e.g / 255, o = e.b / 255, r = Math.max(n, t, o), a = Math.min(n, t, o);
|
|
125
125
|
let i = 0, l;
|
|
126
126
|
const u = (r + a) / 2;
|
|
@@ -147,14 +147,14 @@ function Ct(e) {
|
|
|
147
147
|
l: Math.round(u * 100)
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function In(e) {
|
|
151
151
|
const n = e.h / 360, t = e.s / 100, o = e.l / 100;
|
|
152
152
|
let r, a, i;
|
|
153
153
|
if (t === 0)
|
|
154
154
|
r = a = i = o;
|
|
155
155
|
else {
|
|
156
156
|
const l = o < 0.5 ? o * (1 + t) : o + t - o * t, u = 2 * o - l;
|
|
157
|
-
r =
|
|
157
|
+
r = Ve(u, l, n + 1 / 3), a = Ve(u, l, n), i = Ve(u, l, n - 1 / 3);
|
|
158
158
|
}
|
|
159
159
|
return {
|
|
160
160
|
r: Math.round(r * 255),
|
|
@@ -162,57 +162,57 @@ function An(e) {
|
|
|
162
162
|
b: Math.round(i * 255)
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Ve(e, n, t) {
|
|
166
166
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? e + (n - e) * 6 * t : t < 1 / 2 ? n : t < 2 / 3 ? e + (n - e) * (2 / 3 - t) * 6 : e;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Sn(e) {
|
|
169
169
|
return e > 50 ? "#000" : "#fff";
|
|
170
170
|
}
|
|
171
|
-
const
|
|
172
|
-
function
|
|
173
|
-
const e =
|
|
171
|
+
const Dn = Symbol.for("q-theme");
|
|
172
|
+
function qt() {
|
|
173
|
+
const e = rt(Dn);
|
|
174
174
|
if (!e)
|
|
175
175
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
176
176
|
return e;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Mt(e) {
|
|
179
179
|
const n = w(() => f(e)), t = w(
|
|
180
|
-
() => n.value ? !
|
|
180
|
+
() => n.value ? !En(n.value) : !1
|
|
181
181
|
), o = w(() => {
|
|
182
182
|
const r = n.value;
|
|
183
183
|
if (!r) return;
|
|
184
184
|
let a = r;
|
|
185
|
-
const i =
|
|
185
|
+
const i = qt();
|
|
186
186
|
if (t.value) {
|
|
187
|
-
const
|
|
188
|
-
a = i.current.value.scheme[
|
|
187
|
+
const m = r;
|
|
188
|
+
a = i.current.value.scheme[m] ?? r;
|
|
189
189
|
}
|
|
190
190
|
let l;
|
|
191
191
|
try {
|
|
192
|
-
if (l =
|
|
193
|
-
} catch (
|
|
194
|
-
console.error("Failed to parse color:",
|
|
192
|
+
if (l = $n(a), !l) return;
|
|
193
|
+
} catch (m) {
|
|
194
|
+
console.error("Failed to parse color:", m);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
const u =
|
|
197
|
+
const u = Lt(l), c = Sn(u.l), p = An(l, 25), s = xn(p);
|
|
198
198
|
return {
|
|
199
199
|
mainColor: a,
|
|
200
|
-
mainColorRgb:
|
|
200
|
+
mainColorRgb: ft(l),
|
|
201
201
|
onMainColor: c,
|
|
202
202
|
hoverColor: s,
|
|
203
|
-
hoverColorRgb:
|
|
203
|
+
hoverColorRgb: ft(p),
|
|
204
204
|
onHoverColor: c
|
|
205
205
|
};
|
|
206
206
|
});
|
|
207
207
|
return { isUtilityColor: t, style: o };
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function En(e) {
|
|
210
210
|
return e.startsWith("#") || e.startsWith("rgb") || e.startsWith("hsl");
|
|
211
211
|
}
|
|
212
|
-
const
|
|
212
|
+
const Cn = ["id", "disabled"], Bn = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "q-button__spinner"
|
|
215
|
-
},
|
|
215
|
+
}, Rn = { class: "q-button__content" }, Ln = /* @__PURE__ */ O({
|
|
216
216
|
__name: "QButton",
|
|
217
217
|
props: {
|
|
218
218
|
id: {},
|
|
@@ -235,14 +235,14 @@ const Dn = ["id", "disabled"], En = {
|
|
|
235
235
|
function a(p) {
|
|
236
236
|
r.value || o("click", p);
|
|
237
237
|
}
|
|
238
|
-
const { isUtilityColor: i, style: l } =
|
|
239
|
-
const p = i.value ? `q-button--${t.color}` : void 0, s = t.size !== "regular" ? `q-button--${t.size}` : void 0,
|
|
238
|
+
const { isUtilityColor: i, style: l } = Mt(Se(t, "color")), u = w(() => {
|
|
239
|
+
const p = i.value ? `q-button--${t.color}` : void 0, s = t.size !== "regular" ? `q-button--${t.size}` : void 0, m = t.iconPos !== "start" ? `q-button--icon-${t.iconPos}` : void 0;
|
|
240
240
|
return [
|
|
241
241
|
"q-button",
|
|
242
242
|
`q-button--${t.variant}`,
|
|
243
243
|
p,
|
|
244
244
|
s,
|
|
245
|
-
|
|
245
|
+
m,
|
|
246
246
|
{
|
|
247
247
|
"q-button--borderless": t.borderless,
|
|
248
248
|
"q-button--elevated": t.elevated,
|
|
@@ -253,39 +253,39 @@ const Dn = ["id", "disabled"], En = {
|
|
|
253
253
|
t.class
|
|
254
254
|
];
|
|
255
255
|
}), c = w(() => {
|
|
256
|
-
var p, s,
|
|
256
|
+
var p, s, m, g, b, _;
|
|
257
257
|
if (!i.value)
|
|
258
258
|
return {
|
|
259
259
|
"--q-button-main-color": (p = l.value) == null ? void 0 : p.mainColor,
|
|
260
260
|
"--q-button-main-color-rgb": (s = l.value) == null ? void 0 : s.mainColorRgb,
|
|
261
|
-
"--q-button-on-main-color": (
|
|
262
|
-
"--q-button-hover-color": (
|
|
263
|
-
"--q-button-hover-color-rgb": (
|
|
261
|
+
"--q-button-on-main-color": (m = l.value) == null ? void 0 : m.onMainColor,
|
|
262
|
+
"--q-button-hover-color": (g = l.value) == null ? void 0 : g.hoverColor,
|
|
263
|
+
"--q-button-hover-color-rgb": (b = l.value) == null ? void 0 : b.hoverColorRgb,
|
|
264
264
|
"--q-button-on-hover-color": (_ = l.value) == null ? void 0 : _.onHoverColor
|
|
265
265
|
};
|
|
266
266
|
});
|
|
267
|
-
return (p, s) => (y(),
|
|
267
|
+
return (p, s) => (y(), A("button", {
|
|
268
268
|
id: t.id,
|
|
269
269
|
type: "button",
|
|
270
|
-
class:
|
|
270
|
+
class: W(u.value),
|
|
271
271
|
disabled: r.value,
|
|
272
|
-
style:
|
|
273
|
-
onClick:
|
|
272
|
+
style: _e(c.value),
|
|
273
|
+
onClick: Me(a, ["stop", "prevent"])
|
|
274
274
|
}, [
|
|
275
|
-
t.loading ? (y(),
|
|
276
|
-
|
|
277
|
-
])) :
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
" " +
|
|
275
|
+
t.loading ? (y(), A("div", Bn, [
|
|
276
|
+
S(f(wn))
|
|
277
|
+
])) : G("v-if", !0),
|
|
278
|
+
L("span", Rn, [
|
|
279
|
+
M(p.$slots, "default"),
|
|
280
|
+
je(
|
|
281
|
+
" " + ae(t.label),
|
|
282
282
|
1
|
|
283
283
|
/* TEXT */
|
|
284
284
|
)
|
|
285
285
|
])
|
|
286
|
-
], 14,
|
|
286
|
+
], 14, Cn));
|
|
287
287
|
}
|
|
288
|
-
}), re =
|
|
288
|
+
}), re = K(Ln), qn = /* @__PURE__ */ O({
|
|
289
289
|
__name: "QIcon",
|
|
290
290
|
props: {
|
|
291
291
|
id: {},
|
|
@@ -299,29 +299,29 @@ const Dn = ["id", "disabled"], En = {
|
|
|
299
299
|
const n = e, t = w(() => {
|
|
300
300
|
switch (n.type) {
|
|
301
301
|
case "svg":
|
|
302
|
-
return
|
|
302
|
+
return Vn;
|
|
303
303
|
case "font":
|
|
304
|
-
return
|
|
304
|
+
return jn;
|
|
305
305
|
case "img":
|
|
306
|
-
return
|
|
306
|
+
return zn;
|
|
307
307
|
default:
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
|
-
}), { style: o } =
|
|
310
|
+
}), { style: o } = Mt(Se(n, "color")), r = w(() => {
|
|
311
311
|
var a;
|
|
312
312
|
return {
|
|
313
313
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0,
|
|
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) => (y(),
|
|
317
|
+
return (a, i) => (y(), V(At(t.value), {
|
|
318
318
|
id: n.id,
|
|
319
|
-
class:
|
|
319
|
+
class: W(n.class),
|
|
320
320
|
icon: n.icon,
|
|
321
|
-
style:
|
|
321
|
+
style: _e(r.value)
|
|
322
322
|
}, null, 8, ["id", "class", "icon", "style"]));
|
|
323
323
|
}
|
|
324
|
-
}),
|
|
324
|
+
}), Mn = ["id"], Nn = /* @__PURE__ */ O({
|
|
325
325
|
__name: "QIconFont",
|
|
326
326
|
props: {
|
|
327
327
|
id: {},
|
|
@@ -332,12 +332,12 @@ const Dn = ["id", "disabled"], En = {
|
|
|
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 (r, a) => (y(),
|
|
335
|
+
return (r, a) => (y(), A("i", {
|
|
336
336
|
id: n.id,
|
|
337
|
-
class:
|
|
338
|
-
}, null, 10,
|
|
337
|
+
class: W(["q-icon", "q-icon__font", t.value, o.value, n.class])
|
|
338
|
+
}, null, 10, Mn));
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), Tn = ["id", "src"], Fn = /* @__PURE__ */ O({
|
|
341
341
|
__name: "QIconImg",
|
|
342
342
|
props: {
|
|
343
343
|
id: {},
|
|
@@ -346,13 +346,13 @@ const Dn = ["id", "disabled"], En = {
|
|
|
346
346
|
},
|
|
347
347
|
setup(e) {
|
|
348
348
|
const n = e;
|
|
349
|
-
return (t, o) => (y(),
|
|
349
|
+
return (t, o) => (y(), A("img", {
|
|
350
350
|
id: n.id,
|
|
351
351
|
src: n.icon,
|
|
352
|
-
class:
|
|
353
|
-
}, null, 10,
|
|
352
|
+
class: W(["q-icon", "q-icon__img", n.class])
|
|
353
|
+
}, null, 10, Tn));
|
|
354
354
|
}
|
|
355
|
-
}),
|
|
355
|
+
}), $e = {}, On = O({
|
|
356
356
|
name: "InlineSvg",
|
|
357
357
|
inheritAttrs: !1,
|
|
358
358
|
props: {
|
|
@@ -423,7 +423,7 @@ const Dn = ["id", "disabled"], En = {
|
|
|
423
423
|
o !== !1 && o !== null && o !== void 0 && (e[t] = o);
|
|
424
424
|
},
|
|
425
425
|
getSvgContent(e) {
|
|
426
|
-
return this.symbol && (e = e.getElementById(this.symbol), !e) ? null : (this.transformSource && (e = e.cloneNode(!0), e = this.transformSource(e)), this.title && (this.transformSource || (e = e.cloneNode(!0)),
|
|
426
|
+
return this.symbol && (e = e.getElementById(this.symbol), !e) ? null : (this.transformSource && (e = e.cloneNode(!0), e = this.transformSource(e)), this.title && (this.transformSource || (e = e.cloneNode(!0)), Un(e, this.title)), e);
|
|
427
427
|
},
|
|
428
428
|
/**
|
|
429
429
|
* Get svgElSource
|
|
@@ -431,11 +431,11 @@ const Dn = ["id", "disabled"], En = {
|
|
|
431
431
|
*/
|
|
432
432
|
async getSource(e) {
|
|
433
433
|
try {
|
|
434
|
-
|
|
435
|
-
const n = await
|
|
434
|
+
$e[e] || ($e[e] = Pn(this.download(e))), this.svgElSource && $e[e].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
435
|
+
const n = await $e[e];
|
|
436
436
|
this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
437
437
|
} catch (n) {
|
|
438
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete
|
|
438
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete $e[e], this.$emit("error", n);
|
|
439
439
|
}
|
|
440
440
|
},
|
|
441
441
|
/**
|
|
@@ -454,13 +454,13 @@ const Dn = ["id", "disabled"], En = {
|
|
|
454
454
|
render() {
|
|
455
455
|
if (!this.svgElSource) return null;
|
|
456
456
|
const e = this.getSvgContent(this.svgElSource);
|
|
457
|
-
if (!e) return
|
|
457
|
+
if (!e) return Ye("div", this.$attrs);
|
|
458
458
|
const n = {};
|
|
459
|
-
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, e), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = e.innerHTML,
|
|
459
|
+
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, e), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = e.innerHTML, Ye("svg", n);
|
|
460
460
|
},
|
|
461
461
|
expose: []
|
|
462
462
|
});
|
|
463
|
-
function
|
|
463
|
+
function Un(e, n) {
|
|
464
464
|
const t = e.getElementsByTagName("title");
|
|
465
465
|
if (t.length)
|
|
466
466
|
t[0].textContent = n;
|
|
@@ -469,7 +469,7 @@ function Tn(e, n) {
|
|
|
469
469
|
o.textContent = n, e.insertBefore(o, e.firstChild);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Pn(e) {
|
|
473
473
|
if (e.getIsPending) return e;
|
|
474
474
|
let n = !0;
|
|
475
475
|
const t = e.then(
|
|
@@ -480,7 +480,7 @@ function On(e) {
|
|
|
480
480
|
);
|
|
481
481
|
return t.getIsPending = () => n, t;
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const Gn = /* @__PURE__ */ O({
|
|
484
484
|
__name: "QIconSvg",
|
|
485
485
|
props: {
|
|
486
486
|
id: {},
|
|
@@ -497,21 +497,21 @@ const Un = /* @__PURE__ */ T({
|
|
|
497
497
|
function a() {
|
|
498
498
|
o("unloaded");
|
|
499
499
|
}
|
|
500
|
-
return (i, l) => (y(),
|
|
500
|
+
return (i, l) => (y(), V(f(On), {
|
|
501
501
|
id: t.id,
|
|
502
|
-
class:
|
|
502
|
+
class: W(["q-icon", "q-icon__svg", t.class]),
|
|
503
503
|
src: t.bundle,
|
|
504
504
|
symbol: t.icon,
|
|
505
505
|
onLoaded: r,
|
|
506
506
|
onUnloaded: a
|
|
507
507
|
}, null, 8, ["id", "class", "src", "symbol"]));
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
510
|
-
let
|
|
511
|
-
function
|
|
512
|
-
return f(e) || `uid-${++
|
|
509
|
+
}), X = K(qn), jn = K(Nn), zn = K(Fn), Vn = K(Gn);
|
|
510
|
+
let Hn = 0;
|
|
511
|
+
function st(e) {
|
|
512
|
+
return f(e) || `uid-${++Hn}`;
|
|
513
513
|
}
|
|
514
|
-
const
|
|
514
|
+
const Zn = ["id"], Jn = /* @__PURE__ */ O({
|
|
515
515
|
__name: "QButtonGroup",
|
|
516
516
|
props: {
|
|
517
517
|
id: {},
|
|
@@ -522,14 +522,14 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
522
522
|
},
|
|
523
523
|
setup(e) {
|
|
524
524
|
const n = e;
|
|
525
|
-
return
|
|
525
|
+
return vn({
|
|
526
526
|
QButton: {
|
|
527
|
-
disabled:
|
|
528
|
-
borderless:
|
|
527
|
+
disabled: Se(n, "disabled"),
|
|
528
|
+
borderless: Se(n, "borderless")
|
|
529
529
|
}
|
|
530
|
-
}), (t, o) => (y(),
|
|
530
|
+
}), (t, o) => (y(), A("div", {
|
|
531
531
|
id: n.id,
|
|
532
|
-
class:
|
|
532
|
+
class: W([
|
|
533
533
|
"q-button-group",
|
|
534
534
|
{
|
|
535
535
|
"q-button-group--elevated": n.elevated
|
|
@@ -538,10 +538,10 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
538
538
|
]),
|
|
539
539
|
role: "group"
|
|
540
540
|
}, [
|
|
541
|
-
|
|
542
|
-
], 10,
|
|
541
|
+
M(t.$slots, "default")
|
|
542
|
+
], 10, Zn));
|
|
543
543
|
}
|
|
544
|
-
}),
|
|
544
|
+
}), Nt = K(Jn), Qn = ["id"], Wn = ["for"], Yn = /* @__PURE__ */ O({
|
|
545
545
|
inheritAttrs: !1,
|
|
546
546
|
__name: "QLabel",
|
|
547
547
|
props: {
|
|
@@ -559,35 +559,35 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
559
559
|
},
|
|
560
560
|
n.class
|
|
561
561
|
]);
|
|
562
|
-
return (o, r) => (y(),
|
|
562
|
+
return (o, r) => (y(), A("div", {
|
|
563
563
|
id: n.id,
|
|
564
|
-
class:
|
|
564
|
+
class: W(t.value)
|
|
565
565
|
}, [
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
M(o.$slots, "prepend"),
|
|
567
|
+
L("label", de({
|
|
568
568
|
for: n.for
|
|
569
569
|
}, o.$attrs), [
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
M(o.$slots, "default", {}, () => [
|
|
571
|
+
je(
|
|
572
|
+
ae(n.label),
|
|
573
573
|
1
|
|
574
574
|
/* TEXT */
|
|
575
575
|
)
|
|
576
576
|
])
|
|
577
|
-
], 16,
|
|
578
|
-
|
|
579
|
-
], 10,
|
|
577
|
+
], 16, Wn),
|
|
578
|
+
M(o.$slots, "append")
|
|
579
|
+
], 10, Qn));
|
|
580
580
|
}
|
|
581
|
-
}),
|
|
581
|
+
}), Tt = K(Yn), Xn = ["id"], Kn = {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: "q-field__prepend"
|
|
584
|
-
},
|
|
584
|
+
}, eo = {
|
|
585
585
|
key: 1,
|
|
586
586
|
class: "q-field__append"
|
|
587
|
-
},
|
|
587
|
+
}, to = {
|
|
588
588
|
key: 1,
|
|
589
589
|
class: "q-field__extras"
|
|
590
|
-
},
|
|
590
|
+
}, no = /* @__PURE__ */ O({
|
|
591
591
|
inheritAttrs: !1,
|
|
592
592
|
__name: "QField",
|
|
593
593
|
props: {
|
|
@@ -602,7 +602,7 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
602
602
|
invalid: { type: Boolean }
|
|
603
603
|
},
|
|
604
604
|
setup(e, { expose: n }) {
|
|
605
|
-
const t = e, o =
|
|
605
|
+
const t = e, o = xt("field"), r = w(() => t.required && !t.readonly && !t.disabled), a = w(() => [
|
|
606
606
|
"q-field",
|
|
607
607
|
`q-field--${t.size}`,
|
|
608
608
|
{
|
|
@@ -615,64 +615,64 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
615
615
|
]);
|
|
616
616
|
return n({
|
|
617
617
|
fieldRef: o
|
|
618
|
-
}), (i, l) => (y(),
|
|
618
|
+
}), (i, l) => (y(), A("div", {
|
|
619
619
|
id: t.id,
|
|
620
|
-
class:
|
|
620
|
+
class: W(a.value)
|
|
621
621
|
}, [
|
|
622
|
-
t.label ? (y(),
|
|
622
|
+
t.label ? (y(), V(f(Tt), {
|
|
623
623
|
key: 0,
|
|
624
624
|
class: "q-field__label",
|
|
625
625
|
label: t.label,
|
|
626
626
|
for: t.for,
|
|
627
627
|
required: t.required
|
|
628
628
|
}, {
|
|
629
|
-
prepend:
|
|
630
|
-
|
|
629
|
+
prepend: C(() => [
|
|
630
|
+
M(i.$slots, "label.prepend")
|
|
631
631
|
]),
|
|
632
|
-
append:
|
|
633
|
-
|
|
632
|
+
append: C(() => [
|
|
633
|
+
M(i.$slots, "label.append")
|
|
634
634
|
]),
|
|
635
635
|
_: 3
|
|
636
636
|
/* FORWARDED */
|
|
637
|
-
}, 8, ["label", "for", "required"])) :
|
|
638
|
-
|
|
639
|
-
|
|
637
|
+
}, 8, ["label", "for", "required"])) : G("v-if", !0),
|
|
638
|
+
M(i.$slots, "control", {}, () => [
|
|
639
|
+
L(
|
|
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 ? (y(),
|
|
647
|
-
|
|
648
|
-
])) :
|
|
649
|
-
|
|
650
|
-
i.$slots.append ? (y(),
|
|
651
|
-
|
|
652
|
-
])) :
|
|
646
|
+
i.$slots.prepend ? (y(), A("div", Kn, [
|
|
647
|
+
M(i.$slots, "prepend")
|
|
648
|
+
])) : G("v-if", !0),
|
|
649
|
+
M(i.$slots, "default"),
|
|
650
|
+
i.$slots.append ? (y(), A("div", eo, [
|
|
651
|
+
M(i.$slots, "append")
|
|
652
|
+
])) : G("v-if", !0)
|
|
653
653
|
],
|
|
654
654
|
16
|
|
655
655
|
/* FULL_PROPS */
|
|
656
656
|
)
|
|
657
657
|
]),
|
|
658
|
-
i.$slots.extras ? (y(),
|
|
659
|
-
|
|
660
|
-
])) :
|
|
661
|
-
], 10,
|
|
658
|
+
i.$slots.extras ? (y(), A("div", to, [
|
|
659
|
+
M(i.$slots, "extras")
|
|
660
|
+
])) : G("v-if", !0)
|
|
661
|
+
], 10, Xn));
|
|
662
662
|
}
|
|
663
|
-
}),
|
|
663
|
+
}), Ft = K(no), oo = {
|
|
664
664
|
clearValue: "Clear value"
|
|
665
|
-
},
|
|
665
|
+
}, ao = {
|
|
666
666
|
clear: {
|
|
667
667
|
icon: "close"
|
|
668
668
|
}
|
|
669
|
-
},
|
|
669
|
+
}, ro = /* @__PURE__ */ O({
|
|
670
670
|
__name: "QClearButton",
|
|
671
671
|
props: {
|
|
672
672
|
id: {},
|
|
673
673
|
class: {},
|
|
674
|
-
icons: { default: () =>
|
|
675
|
-
texts: { default: () =>
|
|
674
|
+
icons: { default: () => ao },
|
|
675
|
+
texts: { default: () => oo }
|
|
676
676
|
},
|
|
677
677
|
emits: ["click"],
|
|
678
678
|
setup(e, { emit: n }) {
|
|
@@ -680,9 +680,9 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
680
680
|
function r(a) {
|
|
681
681
|
o("click", a);
|
|
682
682
|
}
|
|
683
|
-
return (a, i) => (y(),
|
|
683
|
+
return (a, i) => (y(), V(f(re), {
|
|
684
684
|
id: t.id,
|
|
685
|
-
class:
|
|
685
|
+
class: W(["q-clear-btn", t.class]),
|
|
686
686
|
"aria-label": t.texts.clearValue,
|
|
687
687
|
variant: "ghost",
|
|
688
688
|
color: "neutral",
|
|
@@ -690,10 +690,10 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
690
690
|
tabindex: "-1",
|
|
691
691
|
onClick: r
|
|
692
692
|
}, {
|
|
693
|
-
default:
|
|
694
|
-
|
|
695
|
-
f(
|
|
696
|
-
|
|
693
|
+
default: C(() => [
|
|
694
|
+
S(
|
|
695
|
+
f(X),
|
|
696
|
+
De(Te(t.icons.clear)),
|
|
697
697
|
null,
|
|
698
698
|
16
|
|
699
699
|
/* FULL_PROPS */
|
|
@@ -703,10 +703,10 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
703
703
|
/* STABLE */
|
|
704
704
|
}, 8, ["id", "class", "aria-label"]));
|
|
705
705
|
}
|
|
706
|
-
}),
|
|
706
|
+
}), io = K(ro), lo = ["id", "type", "maxlength", "required", "placeholder", "readonly", "disabled"], so = /* @__PURE__ */ O({
|
|
707
707
|
inheritAttrs: !1,
|
|
708
708
|
__name: "QTextField",
|
|
709
|
-
props: /* @__PURE__ */
|
|
709
|
+
props: /* @__PURE__ */ ve({
|
|
710
710
|
id: {},
|
|
711
711
|
class: {},
|
|
712
712
|
label: {},
|
|
@@ -725,32 +725,32 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
725
725
|
modelValue: {},
|
|
726
726
|
modelModifiers: {}
|
|
727
727
|
}),
|
|
728
|
-
emits: /* @__PURE__ */
|
|
728
|
+
emits: /* @__PURE__ */ ve(["click:clear"], ["update:modelValue"]),
|
|
729
729
|
setup(e, { expose: n, emit: t }) {
|
|
730
|
-
const o = e, r = t, a =
|
|
730
|
+
const o = e, r = t, a = Ee(e, "modelValue"), i = w({
|
|
731
731
|
get: () => a.value,
|
|
732
|
-
set: (
|
|
732
|
+
set: (b) => {
|
|
733
733
|
const _ = o.maxLength;
|
|
734
|
-
a.value = _ ?
|
|
734
|
+
a.value = _ ? b == null ? void 0 : b.slice(0, _) : b;
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
|
-
|
|
738
|
-
const l =
|
|
737
|
+
le(a, (b) => i.value = b, { immediate: !0 });
|
|
738
|
+
const l = st(o.id), u = T(null), c = T(null), p = w(
|
|
739
739
|
() => o.readonly || o.disabled ? void 0 : o.placeholder
|
|
740
|
-
), s = w(() => o.clearable && !o.readonly && !o.disabled),
|
|
741
|
-
function b
|
|
742
|
-
s.value && (a.value = "", r("click:clear",
|
|
740
|
+
), s = w(() => o.clearable && !o.readonly && !o.disabled), m = w(() => s.value && a.value);
|
|
741
|
+
function g(b) {
|
|
742
|
+
s.value && (a.value = "", r("click:clear", b));
|
|
743
743
|
}
|
|
744
744
|
return n({
|
|
745
745
|
fieldRef: w(() => {
|
|
746
|
-
var
|
|
747
|
-
return (
|
|
746
|
+
var b;
|
|
747
|
+
return (b = u.value) == null ? void 0 : b.fieldRef;
|
|
748
748
|
}),
|
|
749
749
|
inputRef: c
|
|
750
|
-
}), (
|
|
750
|
+
}), (b, _) => (y(), V(f(Ft), {
|
|
751
751
|
ref_key: "fieldRef",
|
|
752
752
|
ref: u,
|
|
753
|
-
class:
|
|
753
|
+
class: W(["q-text-field", o.class]),
|
|
754
754
|
for: f(l),
|
|
755
755
|
label: o.label,
|
|
756
756
|
size: o.size,
|
|
@@ -758,19 +758,19 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
758
758
|
disabled: o.disabled,
|
|
759
759
|
required: o.required,
|
|
760
760
|
invalid: o.invalid
|
|
761
|
-
},
|
|
762
|
-
"label.prepend":
|
|
763
|
-
|
|
761
|
+
}, It({
|
|
762
|
+
"label.prepend": C(() => [
|
|
763
|
+
M(b.$slots, "label.prepend")
|
|
764
764
|
]),
|
|
765
|
-
"label.append":
|
|
766
|
-
|
|
765
|
+
"label.append": C(() => [
|
|
766
|
+
M(b.$slots, "label.append")
|
|
767
767
|
]),
|
|
768
|
-
default:
|
|
769
|
-
|
|
768
|
+
default: C(() => [
|
|
769
|
+
St(L("input", de({
|
|
770
770
|
id: f(l),
|
|
771
771
|
ref_key: "inputRef",
|
|
772
772
|
ref: c,
|
|
773
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
773
|
+
"onUpdate:modelValue": _[0] || (_[0] = (E) => i.value = E),
|
|
774
774
|
class: "q-text-field__input",
|
|
775
775
|
type: o.type,
|
|
776
776
|
maxlength: o.maxLength,
|
|
@@ -778,45 +778,45 @@ const Vn = ["id"], Hn = /* @__PURE__ */ T({
|
|
|
778
778
|
placeholder: p.value,
|
|
779
779
|
readonly: o.readonly,
|
|
780
780
|
disabled: o.disabled
|
|
781
|
-
},
|
|
782
|
-
[
|
|
781
|
+
}, b.$attrs), null, 16, lo), [
|
|
782
|
+
[Kt, i.value]
|
|
783
783
|
])
|
|
784
784
|
]),
|
|
785
785
|
_: 2
|
|
786
786
|
/* DYNAMIC */
|
|
787
787
|
}, [
|
|
788
|
-
|
|
788
|
+
b.$slots.prepend ? {
|
|
789
789
|
name: "prepend",
|
|
790
|
-
fn:
|
|
791
|
-
|
|
790
|
+
fn: C(() => [
|
|
791
|
+
M(b.$slots, "prepend")
|
|
792
792
|
]),
|
|
793
793
|
key: "0"
|
|
794
794
|
} : void 0,
|
|
795
|
-
|
|
795
|
+
b.$slots.append || m.value ? {
|
|
796
796
|
name: "append",
|
|
797
|
-
fn:
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
fn: C(() => [
|
|
798
|
+
M(b.$slots, "append"),
|
|
799
|
+
m.value ? (y(), V(f(io), {
|
|
800
800
|
key: 0,
|
|
801
801
|
"data-testid": "q-text-field__clear-button",
|
|
802
802
|
texts: o.texts,
|
|
803
|
-
onClick:
|
|
804
|
-
}, null, 8, ["texts"])) :
|
|
803
|
+
onClick: g
|
|
804
|
+
}, null, 8, ["texts"])) : G("v-if", !0)
|
|
805
805
|
]),
|
|
806
806
|
key: "1"
|
|
807
807
|
} : void 0,
|
|
808
|
-
|
|
808
|
+
b.$slots.extras ? {
|
|
809
809
|
name: "extras",
|
|
810
|
-
fn:
|
|
811
|
-
|
|
810
|
+
fn: C(() => [
|
|
811
|
+
M(b.$slots, "extras")
|
|
812
812
|
]),
|
|
813
813
|
key: "2"
|
|
814
814
|
} : void 0
|
|
815
815
|
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required", "invalid"]));
|
|
816
816
|
}
|
|
817
|
-
}),
|
|
818
|
-
function
|
|
819
|
-
const n =
|
|
817
|
+
}), Ot = K(so), co = Symbol("DismissibleLayer");
|
|
818
|
+
function uo(e) {
|
|
819
|
+
const n = rt(co);
|
|
820
820
|
if (!n)
|
|
821
821
|
throw new Error(
|
|
822
822
|
"useDismissibleLayerStackItem must be used within a dismissible layer stack context."
|
|
@@ -827,37 +827,37 @@ function so(e) {
|
|
|
827
827
|
isTop: () => n.isTop(e)
|
|
828
828
|
};
|
|
829
829
|
}
|
|
830
|
-
const
|
|
830
|
+
const po = { ref: "layer" }, fo = /* @__PURE__ */ O({
|
|
831
831
|
__name: "QDismissibleLayer",
|
|
832
832
|
emits: ["escape-key-down", "pointer-down-outside", "focus-outside", "interact-outside", "dismiss"],
|
|
833
833
|
setup(e, { emit: n }) {
|
|
834
|
-
const t = n, o =
|
|
834
|
+
const t = n, o = xt("layer"), r = en(), a = uo(r);
|
|
835
835
|
let i = [];
|
|
836
836
|
function l(s) {
|
|
837
837
|
s.key === "Escape" && a != null && a.isTop() && (t("escape-key-down", s), s.defaultPrevented || t("dismiss", s));
|
|
838
838
|
}
|
|
839
839
|
function u(s) {
|
|
840
840
|
if (!o.value) return;
|
|
841
|
-
const
|
|
842
|
-
if (!o.value.contains(
|
|
843
|
-
const
|
|
841
|
+
const m = s.target;
|
|
842
|
+
if (!o.value.contains(m) && a != null && a.isTop()) {
|
|
843
|
+
const g = new CustomEvent("focus-outside", {
|
|
844
844
|
bubbles: !1,
|
|
845
845
|
cancelable: !0,
|
|
846
846
|
detail: { originalEvent: s }
|
|
847
847
|
});
|
|
848
|
-
t("focus-outside",
|
|
848
|
+
t("focus-outside", g), t("interact-outside", g), g.defaultPrevented || t("dismiss", g);
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
function c(s) {
|
|
852
852
|
if (!o.value || !(a != null && a.isTop())) return;
|
|
853
|
-
const
|
|
854
|
-
if (!o.value.contains(
|
|
855
|
-
const
|
|
853
|
+
const m = s.target;
|
|
854
|
+
if (!o.value.contains(m)) {
|
|
855
|
+
const g = new CustomEvent("pointer-down-outside", {
|
|
856
856
|
bubbles: !1,
|
|
857
857
|
cancelable: !0,
|
|
858
858
|
detail: { originalEvent: s }
|
|
859
859
|
});
|
|
860
|
-
t("pointer-down-outside",
|
|
860
|
+
t("pointer-down-outside", g), t("interact-outside", g), g.defaultPrevented || t("dismiss", g);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
function p() {
|
|
@@ -873,103 +873,103 @@ const co = { ref: "layer" }, uo = /* @__PURE__ */ T({
|
|
|
873
873
|
});
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
|
-
return
|
|
876
|
+
return Ce(() => {
|
|
877
877
|
a == null || a.register(), document.addEventListener("keydown", l), i.push(() => {
|
|
878
878
|
document.removeEventListener("keydown", l);
|
|
879
879
|
}), document.addEventListener("focusin", u), i.push(() => {
|
|
880
880
|
document.removeEventListener("focusin", u);
|
|
881
881
|
}), p();
|
|
882
|
-
}),
|
|
882
|
+
}), Dt(() => {
|
|
883
883
|
a == null || a.unregister(), i.forEach((s) => s()), i = [];
|
|
884
|
-
}), (s,
|
|
884
|
+
}), (s, m) => (y(), A(
|
|
885
885
|
"div",
|
|
886
|
-
|
|
886
|
+
po,
|
|
887
887
|
[
|
|
888
|
-
|
|
888
|
+
M(s.$slots, "default")
|
|
889
889
|
],
|
|
890
890
|
512
|
|
891
891
|
/* NEED_PATCH */
|
|
892
892
|
));
|
|
893
893
|
}
|
|
894
|
-
}),
|
|
895
|
-
function
|
|
896
|
-
return
|
|
894
|
+
}), vo = K(fo);
|
|
895
|
+
function mo(e) {
|
|
896
|
+
return on() ? (Et(e), !0) : !1;
|
|
897
897
|
}
|
|
898
|
-
const
|
|
898
|
+
const go = typeof window < "u" && typeof document < "u";
|
|
899
899
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
900
|
-
const
|
|
900
|
+
const bo = () => {
|
|
901
901
|
};
|
|
902
|
-
function
|
|
902
|
+
function vt(...e) {
|
|
903
903
|
if (e.length !== 1)
|
|
904
|
-
return
|
|
904
|
+
return Se(...e);
|
|
905
905
|
const n = e[0];
|
|
906
|
-
return typeof n == "function" ?
|
|
906
|
+
return typeof n == "function" ? tn(nn(() => ({ get: n, set: bo }))) : T(n);
|
|
907
907
|
}
|
|
908
|
-
const
|
|
909
|
-
function
|
|
908
|
+
const ct = go ? window : void 0;
|
|
909
|
+
function tt(e) {
|
|
910
910
|
var n;
|
|
911
|
-
const t =
|
|
911
|
+
const t = it(e);
|
|
912
912
|
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
913
913
|
}
|
|
914
|
-
function
|
|
915
|
-
const e =
|
|
916
|
-
return n &&
|
|
914
|
+
function ho() {
|
|
915
|
+
const e = Xe(!1), n = at();
|
|
916
|
+
return n && Ce(() => {
|
|
917
917
|
e.value = !0;
|
|
918
918
|
}, n), e;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
const n =
|
|
920
|
+
function yo(e) {
|
|
921
|
+
const n = ho();
|
|
922
922
|
return w(() => (n.value, !!e()));
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
const { window: o =
|
|
924
|
+
function wo(e, n, t = {}) {
|
|
925
|
+
const { window: o = ct, ...r } = t;
|
|
926
926
|
let a;
|
|
927
|
-
const i =
|
|
927
|
+
const i = yo(() => o && "ResizeObserver" in o), l = () => {
|
|
928
928
|
a && (a.disconnect(), a = void 0);
|
|
929
929
|
}, u = w(() => {
|
|
930
|
-
const s =
|
|
931
|
-
return Array.isArray(s) ? s.map((
|
|
932
|
-
}), c =
|
|
930
|
+
const s = it(e);
|
|
931
|
+
return Array.isArray(s) ? s.map((m) => tt(m)) : [tt(s)];
|
|
932
|
+
}), c = le(
|
|
933
933
|
u,
|
|
934
934
|
(s) => {
|
|
935
935
|
if (l(), i.value && o) {
|
|
936
936
|
a = new ResizeObserver(n);
|
|
937
|
-
for (const
|
|
938
|
-
|
|
937
|
+
for (const m of s)
|
|
938
|
+
m && a.observe(m, r);
|
|
939
939
|
}
|
|
940
940
|
},
|
|
941
941
|
{ immediate: !0, flush: "post" }
|
|
942
942
|
), p = () => {
|
|
943
943
|
l(), c();
|
|
944
944
|
};
|
|
945
|
-
return
|
|
945
|
+
return mo(p), {
|
|
946
946
|
isSupported: i,
|
|
947
947
|
stop: p
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function _o(e = ct, n) {
|
|
951
951
|
e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(n) : n();
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function ko(e = {}) {
|
|
954
954
|
var n, t;
|
|
955
|
-
const { window: o =
|
|
955
|
+
const { window: o = ct } = e, r = vt(e == null ? void 0 : e.element), a = vt((n = e == null ? void 0 : e.input) != null ? n : ""), i = (t = e == null ? void 0 : e.styleProp) != null ? t : "height", l = Xe(1), u = Xe(0);
|
|
956
956
|
function c() {
|
|
957
957
|
var p;
|
|
958
958
|
if (!r.value)
|
|
959
959
|
return;
|
|
960
960
|
let s = "";
|
|
961
961
|
r.value.style[i] = "1px", l.value = (p = r.value) == null ? void 0 : p.scrollHeight;
|
|
962
|
-
const
|
|
963
|
-
|
|
962
|
+
const m = it(e == null ? void 0 : e.styleTarget);
|
|
963
|
+
m ? m.style[i] = `${l.value}px` : s = `${l.value}px`, r.value.style[i] = s;
|
|
964
964
|
}
|
|
965
|
-
return
|
|
965
|
+
return le([a, r], () => xe(c), { immediate: !0 }), le(l, () => {
|
|
966
966
|
var p;
|
|
967
967
|
return (p = e == null ? void 0 : e.onResize) == null ? void 0 : p.call(e);
|
|
968
|
-
}),
|
|
969
|
-
u.value !== p.width &&
|
|
968
|
+
}), wo(r, ([{ contentRect: p }]) => {
|
|
969
|
+
u.value !== p.width && _o(o, () => {
|
|
970
970
|
u.value = p.width, c();
|
|
971
971
|
});
|
|
972
|
-
}), e != null && e.watch &&
|
|
972
|
+
}), e != null && e.watch && le(e.watch, c, { immediate: !0, deep: !0 }), {
|
|
973
973
|
textarea: r,
|
|
974
974
|
input: a,
|
|
975
975
|
triggerResize: c
|
|
@@ -979,29 +979,29 @@ function wo(e = {}) {
|
|
|
979
979
|
* tabbable 6.2.0
|
|
980
980
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
981
981
|
*/
|
|
982
|
-
var
|
|
983
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector,
|
|
982
|
+
var Ut = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Fe = /* @__PURE__ */ Ut.join(","), Pt = typeof Element > "u", be = Pt ? function() {
|
|
983
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Oe = !Pt && Element.prototype.getRootNode ? function(e) {
|
|
984
984
|
var n;
|
|
985
985
|
return e == null || (n = e.getRootNode) === null || n === void 0 ? void 0 : n.call(e);
|
|
986
986
|
} : function(e) {
|
|
987
987
|
return e == null ? void 0 : e.ownerDocument;
|
|
988
|
-
},
|
|
988
|
+
}, Ue = function e(n, t) {
|
|
989
989
|
var o;
|
|
990
990
|
t === void 0 && (t = !0);
|
|
991
991
|
var r = n == null || (o = n.getAttribute) === null || o === void 0 ? void 0 : o.call(n, "inert"), a = r === "" || r === "true", i = a || t && n && e(n.parentNode);
|
|
992
992
|
return i;
|
|
993
|
-
},
|
|
993
|
+
}, $o = function(e) {
|
|
994
994
|
var n, t = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "contenteditable");
|
|
995
995
|
return t === "" || t === "true";
|
|
996
|
-
},
|
|
997
|
-
if (
|
|
996
|
+
}, Gt = function(e, n, t) {
|
|
997
|
+
if (Ue(e))
|
|
998
998
|
return [];
|
|
999
999
|
var o = Array.prototype.slice.apply(e.querySelectorAll(Fe));
|
|
1000
|
-
return n &&
|
|
1001
|
-
},
|
|
1000
|
+
return n && be.call(e, Fe) && o.unshift(e), o = o.filter(t), o;
|
|
1001
|
+
}, jt = function e(n, t, o) {
|
|
1002
1002
|
for (var r = [], a = Array.from(n); a.length; ) {
|
|
1003
1003
|
var i = a.shift();
|
|
1004
|
-
if (!
|
|
1004
|
+
if (!Ue(i, !1))
|
|
1005
1005
|
if (i.tagName === "SLOT") {
|
|
1006
1006
|
var l = i.assignedElements(), u = l.length ? l : i.children, c = e(u, !0, o);
|
|
1007
1007
|
o.flatten ? r.push.apply(r, c) : r.push({
|
|
@@ -1009,49 +1009,49 @@ var Ft = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1009
1009
|
candidates: c
|
|
1010
1010
|
});
|
|
1011
1011
|
} else {
|
|
1012
|
-
var p =
|
|
1012
|
+
var p = be.call(i, Fe);
|
|
1013
1013
|
p && o.filter(i) && (t || !n.includes(i)) && r.push(i);
|
|
1014
1014
|
var s = i.shadowRoot || // check for an undisclosed shadow
|
|
1015
|
-
typeof o.getShadowRoot == "function" && o.getShadowRoot(i),
|
|
1016
|
-
if (s &&
|
|
1017
|
-
var
|
|
1018
|
-
o.flatten ? r.push.apply(r,
|
|
1015
|
+
typeof o.getShadowRoot == "function" && o.getShadowRoot(i), m = !Ue(s, !1) && (!o.shadowRootFilter || o.shadowRootFilter(i));
|
|
1016
|
+
if (s && m) {
|
|
1017
|
+
var g = e(s === !0 ? i.children : s.children, !0, o);
|
|
1018
|
+
o.flatten ? r.push.apply(r, g) : r.push({
|
|
1019
1019
|
scopeParent: i,
|
|
1020
|
-
candidates:
|
|
1020
|
+
candidates: g
|
|
1021
1021
|
});
|
|
1022
1022
|
} else
|
|
1023
1023
|
a.unshift.apply(a, i.children);
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
return r;
|
|
1027
|
-
},
|
|
1027
|
+
}, zt = function(e) {
|
|
1028
1028
|
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
1029
|
-
},
|
|
1029
|
+
}, ge = function(e) {
|
|
1030
1030
|
if (!e)
|
|
1031
1031
|
throw new Error("No node provided");
|
|
1032
|
-
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) ||
|
|
1033
|
-
},
|
|
1034
|
-
var t =
|
|
1035
|
-
return t < 0 && n && !
|
|
1036
|
-
},
|
|
1032
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || $o(e)) && !zt(e) ? 0 : e.tabIndex;
|
|
1033
|
+
}, Ao = function(e, n) {
|
|
1034
|
+
var t = ge(e);
|
|
1035
|
+
return t < 0 && n && !zt(e) ? 0 : t;
|
|
1036
|
+
}, xo = function(e, n) {
|
|
1037
1037
|
return e.tabIndex === n.tabIndex ? e.documentOrder - n.documentOrder : e.tabIndex - n.tabIndex;
|
|
1038
|
-
},
|
|
1038
|
+
}, Vt = function(e) {
|
|
1039
1039
|
return e.tagName === "INPUT";
|
|
1040
|
-
},
|
|
1041
|
-
return
|
|
1042
|
-
},
|
|
1040
|
+
}, Io = function(e) {
|
|
1041
|
+
return Vt(e) && e.type === "hidden";
|
|
1042
|
+
}, So = function(e) {
|
|
1043
1043
|
var n = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(t) {
|
|
1044
1044
|
return t.tagName === "SUMMARY";
|
|
1045
1045
|
});
|
|
1046
1046
|
return n;
|
|
1047
|
-
},
|
|
1047
|
+
}, Do = 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
|
+
}, Eo = function(e) {
|
|
1052
1052
|
if (!e.name)
|
|
1053
1053
|
return !0;
|
|
1054
|
-
var n = e.form ||
|
|
1054
|
+
var n = e.form || Oe(e), t = function(a) {
|
|
1055
1055
|
return n.querySelectorAll('input[type="radio"][name="' + a + '"]');
|
|
1056
1056
|
}, o;
|
|
1057
1057
|
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
@@ -1062,78 +1062,78 @@ var Ft = ["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 r =
|
|
1065
|
+
var r = Do(o, e.form);
|
|
1066
1066
|
return !r || r === e;
|
|
1067
|
-
}, Do = function(e) {
|
|
1068
|
-
return Gt(e) && e.type === "radio";
|
|
1069
|
-
}, Eo = function(e) {
|
|
1070
|
-
return Do(e) && !So(e);
|
|
1071
1067
|
}, Co = function(e) {
|
|
1072
|
-
|
|
1068
|
+
return Vt(e) && e.type === "radio";
|
|
1069
|
+
}, Bo = function(e) {
|
|
1070
|
+
return Co(e) && !Eo(e);
|
|
1071
|
+
}, Ro = function(e) {
|
|
1072
|
+
var n, t = e && Oe(e), o = (n = t) === null || n === void 0 ? void 0 : n.host, r = !1;
|
|
1073
1073
|
if (t && t !== e) {
|
|
1074
1074
|
var a, i, l;
|
|
1075
1075
|
for (r = !!((a = o) !== null && a !== void 0 && (i = a.ownerDocument) !== null && i !== void 0 && i.contains(o) || e != null && (l = e.ownerDocument) !== null && l !== void 0 && l.contains(e)); !r && o; ) {
|
|
1076
1076
|
var u, c, p;
|
|
1077
|
-
t =
|
|
1077
|
+
t = Oe(o), o = (u = t) === null || u === void 0 ? void 0 : u.host, r = !!((c = o) !== null && c !== void 0 && (p = c.ownerDocument) !== null && p !== void 0 && p.contains(o));
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
return r;
|
|
1081
|
-
},
|
|
1081
|
+
}, mt = function(e) {
|
|
1082
1082
|
var n = e.getBoundingClientRect(), t = n.width, o = n.height;
|
|
1083
1083
|
return t === 0 && o === 0;
|
|
1084
|
-
},
|
|
1084
|
+
}, Lo = function(e, n) {
|
|
1085
1085
|
var t = n.displayCheck, o = n.getShadowRoot;
|
|
1086
1086
|
if (getComputedStyle(e).visibility === "hidden")
|
|
1087
1087
|
return !0;
|
|
1088
|
-
var r =
|
|
1089
|
-
if (
|
|
1088
|
+
var r = be.call(e, "details>summary:first-of-type"), a = r ? e.parentElement : e;
|
|
1089
|
+
if (be.call(a, "details:not([open]) *"))
|
|
1090
1090
|
return !0;
|
|
1091
1091
|
if (!t || t === "full" || t === "legacy-full") {
|
|
1092
1092
|
if (typeof o == "function") {
|
|
1093
1093
|
for (var i = e; e; ) {
|
|
1094
|
-
var l = e.parentElement, u =
|
|
1094
|
+
var l = e.parentElement, u = Oe(e);
|
|
1095
1095
|
if (l && !l.shadowRoot && o(l) === !0)
|
|
1096
|
-
return
|
|
1096
|
+
return mt(e);
|
|
1097
1097
|
e.assignedSlot ? e = e.assignedSlot : !l && u !== e.ownerDocument ? e = u.host : e = l;
|
|
1098
1098
|
}
|
|
1099
1099
|
e = i;
|
|
1100
1100
|
}
|
|
1101
|
-
if (
|
|
1101
|
+
if (Ro(e))
|
|
1102
1102
|
return !e.getClientRects().length;
|
|
1103
1103
|
if (t !== "legacy-full")
|
|
1104
1104
|
return !0;
|
|
1105
1105
|
} else if (t === "non-zero-area")
|
|
1106
|
-
return
|
|
1106
|
+
return mt(e);
|
|
1107
1107
|
return !1;
|
|
1108
|
-
},
|
|
1108
|
+
}, qo = function(e) {
|
|
1109
1109
|
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
1110
1110
|
for (var n = e.parentElement; n; ) {
|
|
1111
1111
|
if (n.tagName === "FIELDSET" && n.disabled) {
|
|
1112
1112
|
for (var t = 0; t < n.children.length; t++) {
|
|
1113
1113
|
var o = n.children.item(t);
|
|
1114
1114
|
if (o.tagName === "LEGEND")
|
|
1115
|
-
return
|
|
1115
|
+
return be.call(n, "fieldset[disabled] *") ? !0 : !o.contains(e);
|
|
1116
1116
|
}
|
|
1117
1117
|
return !0;
|
|
1118
1118
|
}
|
|
1119
1119
|
n = n.parentElement;
|
|
1120
1120
|
}
|
|
1121
1121
|
return !1;
|
|
1122
|
-
},
|
|
1122
|
+
}, Pe = function(e, n) {
|
|
1123
1123
|
return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
|
|
1124
1124
|
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
1125
1125
|
// note related to `candidateSelectors`)
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
},
|
|
1129
|
-
return !(
|
|
1130
|
-
},
|
|
1126
|
+
Ue(n) || Io(n) || Lo(n, e) || // For a details element with a summary, the summary element gets the focus
|
|
1127
|
+
So(n) || qo(n));
|
|
1128
|
+
}, nt = function(e, n) {
|
|
1129
|
+
return !(Bo(n) || ge(n) < 0 || !Pe(e, n));
|
|
1130
|
+
}, Mo = function(e) {
|
|
1131
1131
|
var n = parseInt(e.getAttribute("tabindex"), 10);
|
|
1132
1132
|
return !!(isNaN(n) || n >= 0);
|
|
1133
|
-
},
|
|
1133
|
+
}, No = function e(n) {
|
|
1134
1134
|
var t = [], o = [];
|
|
1135
1135
|
return n.forEach(function(r, a) {
|
|
1136
|
-
var i = !!r.scopeParent, l = i ? r.scopeParent : r, u =
|
|
1136
|
+
var i = !!r.scopeParent, l = i ? r.scopeParent : r, u = Ao(l, i), c = i ? e(r.candidates) : l;
|
|
1137
1137
|
u === 0 ? i ? t.push.apply(t, c) : t.push(l) : o.push({
|
|
1138
1138
|
documentOrder: a,
|
|
1139
1139
|
tabIndex: u,
|
|
@@ -1141,63 +1141,63 @@ var Ft = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1141
1141
|
isScope: i,
|
|
1142
1142
|
content: c
|
|
1143
1143
|
});
|
|
1144
|
-
}), o.sort(
|
|
1144
|
+
}), o.sort(xo).reduce(function(r, a) {
|
|
1145
1145
|
return a.isScope ? r.push.apply(r, a.content) : r.push(a.content), r;
|
|
1146
1146
|
}, []).concat(t);
|
|
1147
|
-
},
|
|
1147
|
+
}, To = function(e, n) {
|
|
1148
1148
|
n = n || {};
|
|
1149
1149
|
var t;
|
|
1150
|
-
return n.getShadowRoot ? t =
|
|
1151
|
-
filter:
|
|
1150
|
+
return n.getShadowRoot ? t = jt([e], n.includeContainer, {
|
|
1151
|
+
filter: nt.bind(null, n),
|
|
1152
1152
|
flatten: !1,
|
|
1153
1153
|
getShadowRoot: n.getShadowRoot,
|
|
1154
|
-
shadowRootFilter:
|
|
1155
|
-
}) : t =
|
|
1156
|
-
},
|
|
1154
|
+
shadowRootFilter: Mo
|
|
1155
|
+
}) : t = Gt(e, n.includeContainer, nt.bind(null, n)), No(t);
|
|
1156
|
+
}, Fo = function(e, n) {
|
|
1157
1157
|
n = n || {};
|
|
1158
1158
|
var t;
|
|
1159
|
-
return n.getShadowRoot ? t =
|
|
1160
|
-
filter:
|
|
1159
|
+
return n.getShadowRoot ? t = jt([e], n.includeContainer, {
|
|
1160
|
+
filter: Pe.bind(null, n),
|
|
1161
1161
|
flatten: !0,
|
|
1162
1162
|
getShadowRoot: n.getShadowRoot
|
|
1163
|
-
}) : t =
|
|
1164
|
-
},
|
|
1163
|
+
}) : t = Gt(e, n.includeContainer, Pe.bind(null, n)), t;
|
|
1164
|
+
}, ye = function(e, n) {
|
|
1165
1165
|
if (n = n || {}, !e)
|
|
1166
1166
|
throw new Error("No node provided");
|
|
1167
|
-
return
|
|
1168
|
-
},
|
|
1167
|
+
return be.call(e, Fe) === !1 ? !1 : nt(n, e);
|
|
1168
|
+
}, Oo = /* @__PURE__ */ Ut.concat("iframe").join(","), He = function(e, n) {
|
|
1169
1169
|
if (n = n || {}, !e)
|
|
1170
1170
|
throw new Error("No node provided");
|
|
1171
|
-
return
|
|
1171
|
+
return be.call(e, Oo) === !1 ? !1 : Pe(n, e);
|
|
1172
1172
|
};
|
|
1173
1173
|
/*!
|
|
1174
1174
|
* focus-trap 7.6.4
|
|
1175
1175
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
1176
1176
|
*/
|
|
1177
|
-
function
|
|
1177
|
+
function ot(e, n) {
|
|
1178
1178
|
(n == null || n > e.length) && (n = e.length);
|
|
1179
1179
|
for (var t = 0, o = Array(n); t < n; t++) o[t] = e[t];
|
|
1180
1180
|
return o;
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1183
|
-
if (Array.isArray(e)) return
|
|
1182
|
+
function Uo(e) {
|
|
1183
|
+
if (Array.isArray(e)) return ot(e);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1186
|
-
return (n =
|
|
1185
|
+
function Po(e, n, t) {
|
|
1186
|
+
return (n = Ho(n)) in e ? Object.defineProperty(e, n, {
|
|
1187
1187
|
value: t,
|
|
1188
1188
|
enumerable: !0,
|
|
1189
1189
|
configurable: !0,
|
|
1190
1190
|
writable: !0
|
|
1191
1191
|
}) : e[n] = t, e;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Go(e) {
|
|
1194
1194
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function jo() {
|
|
1197
1197
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1198
1198
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function gt(e, n) {
|
|
1201
1201
|
var t = Object.keys(e);
|
|
1202
1202
|
if (Object.getOwnPropertySymbols) {
|
|
1203
1203
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -1207,21 +1207,21 @@ function ft(e, n) {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
return t;
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function bt(e) {
|
|
1211
1211
|
for (var n = 1; n < arguments.length; n++) {
|
|
1212
1212
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
1213
|
-
n % 2 ?
|
|
1214
|
-
|
|
1215
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
1213
|
+
n % 2 ? gt(Object(t), !0).forEach(function(o) {
|
|
1214
|
+
Po(e, o, t[o]);
|
|
1215
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : gt(Object(t)).forEach(function(o) {
|
|
1216
1216
|
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
1219
|
return e;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return
|
|
1221
|
+
function zo(e) {
|
|
1222
|
+
return Uo(e) || Go(e) || Zo(e) || jo();
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Vo(e, n) {
|
|
1225
1225
|
if (typeof e != "object" || !e) return e;
|
|
1226
1226
|
var t = e[Symbol.toPrimitive];
|
|
1227
1227
|
if (t !== void 0) {
|
|
@@ -1231,18 +1231,18 @@ function jo(e, n) {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
return (n === "string" ? String : Number)(e);
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1235
|
-
var n =
|
|
1234
|
+
function Ho(e) {
|
|
1235
|
+
var n = Vo(e, "string");
|
|
1236
1236
|
return typeof n == "symbol" ? n : n + "";
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function Zo(e, n) {
|
|
1239
1239
|
if (e) {
|
|
1240
|
-
if (typeof e == "string") return
|
|
1240
|
+
if (typeof e == "string") return ot(e, n);
|
|
1241
1241
|
var t = {}.toString.call(e).slice(8, -1);
|
|
1242
|
-
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ?
|
|
1242
|
+
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ot(e, n) : void 0;
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
|
-
var
|
|
1245
|
+
var ht = {
|
|
1246
1246
|
activateTrap: function(e, n) {
|
|
1247
1247
|
if (e.length > 0) {
|
|
1248
1248
|
var t = e[e.length - 1];
|
|
@@ -1255,31 +1255,31 @@ var mt = {
|
|
|
1255
1255
|
var t = e.indexOf(n);
|
|
1256
1256
|
t !== -1 && e.splice(t, 1), e.length > 0 && !e[e.length - 1]._isManuallyPaused() && e[e.length - 1]._setPausedState(!1);
|
|
1257
1257
|
}
|
|
1258
|
-
},
|
|
1258
|
+
}, Jo = function(e) {
|
|
1259
1259
|
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
1260
|
-
},
|
|
1260
|
+
}, Qo = function(e) {
|
|
1261
1261
|
return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
|
|
1262
|
-
},
|
|
1262
|
+
}, Ie = function(e) {
|
|
1263
1263
|
return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
|
|
1264
|
-
},
|
|
1265
|
-
return
|
|
1266
|
-
},
|
|
1267
|
-
return
|
|
1268
|
-
},
|
|
1264
|
+
}, Wo = function(e) {
|
|
1265
|
+
return Ie(e) && !e.shiftKey;
|
|
1266
|
+
}, Yo = function(e) {
|
|
1267
|
+
return Ie(e) && e.shiftKey;
|
|
1268
|
+
}, yt = function(e) {
|
|
1269
1269
|
return setTimeout(e, 0);
|
|
1270
|
-
},
|
|
1270
|
+
}, Ae = function(e) {
|
|
1271
1271
|
for (var n = arguments.length, t = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
1272
1272
|
t[o - 1] = arguments[o];
|
|
1273
1273
|
return typeof e == "function" ? e.apply(void 0, t) : e;
|
|
1274
|
-
},
|
|
1274
|
+
}, Re = function(e) {
|
|
1275
1275
|
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
1276
|
-
},
|
|
1277
|
-
var t = (n == null ? void 0 : n.document) || document, o = (n == null ? void 0 : n.trapStack) ||
|
|
1276
|
+
}, Xo = [], Ko = function(e, n) {
|
|
1277
|
+
var t = (n == null ? void 0 : n.document) || document, o = (n == null ? void 0 : n.trapStack) || Xo, r = bt({
|
|
1278
1278
|
returnFocusOnDeactivate: !0,
|
|
1279
1279
|
escapeDeactivates: !0,
|
|
1280
1280
|
delayInitialFocus: !0,
|
|
1281
|
-
isKeyForward:
|
|
1282
|
-
isKeyBackward:
|
|
1281
|
+
isKeyForward: Wo,
|
|
1282
|
+
isKeyBackward: Yo
|
|
1283
1283
|
}, n), a = {
|
|
1284
1284
|
// containers given to createFocusTrap()
|
|
1285
1285
|
// @type {Array<HTMLElement>}
|
|
@@ -1317,50 +1317,50 @@ var mt = {
|
|
|
1317
1317
|
delayInitialFocusTimer: void 0,
|
|
1318
1318
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
1319
1319
|
recentNavEvent: void 0
|
|
1320
|
-
}, i, l = function(d,
|
|
1321
|
-
return d && d[
|
|
1322
|
-
}, u = function(d,
|
|
1323
|
-
var
|
|
1320
|
+
}, i, l = function(d, v, $) {
|
|
1321
|
+
return d && d[v] !== void 0 ? d[v] : r[$ || v];
|
|
1322
|
+
}, u = function(d, v) {
|
|
1323
|
+
var $ = typeof (v == null ? void 0 : v.composedPath) == "function" ? v.composedPath() : void 0;
|
|
1324
1324
|
return a.containerGroups.findIndex(function(q) {
|
|
1325
|
-
var
|
|
1326
|
-
return
|
|
1325
|
+
var I = q.container, U = q.tabbableNodes;
|
|
1326
|
+
return I.contains(d) || // fall back to explicit tabbable search which will take into consideration any
|
|
1327
1327
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
1328
1328
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
1329
1329
|
// look inside web components even if open)
|
|
1330
|
-
(
|
|
1331
|
-
return
|
|
1330
|
+
($ == null ? void 0 : $.includes(I)) || U.find(function(R) {
|
|
1331
|
+
return R === d;
|
|
1332
1332
|
});
|
|
1333
1333
|
});
|
|
1334
1334
|
}, c = function(d) {
|
|
1335
|
-
var
|
|
1336
|
-
if (typeof
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1335
|
+
var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, $ = v.hasFallback, q = $ === void 0 ? !1 : $, I = v.params, U = I === void 0 ? [] : I, R = r[d];
|
|
1336
|
+
if (typeof R == "function" && (R = R.apply(void 0, zo(U))), R === !0 && (R = void 0), !R) {
|
|
1337
|
+
if (R === void 0 || R === !1)
|
|
1338
|
+
return R;
|
|
1339
1339
|
throw new Error("`".concat(d, "` was specified but was not a node, or did not return a node"));
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1342
|
-
if (typeof
|
|
1341
|
+
var H = R;
|
|
1342
|
+
if (typeof R == "string") {
|
|
1343
1343
|
try {
|
|
1344
|
-
|
|
1344
|
+
H = t.querySelector(R);
|
|
1345
1345
|
} catch (h) {
|
|
1346
1346
|
throw new Error("`".concat(d, '` appears to be an invalid selector; error="').concat(h.message, '"'));
|
|
1347
1347
|
}
|
|
1348
|
-
if (!
|
|
1348
|
+
if (!H && !q)
|
|
1349
1349
|
throw new Error("`".concat(d, "` as selector refers to no known node"));
|
|
1350
1350
|
}
|
|
1351
|
-
return
|
|
1351
|
+
return H;
|
|
1352
1352
|
}, p = function() {
|
|
1353
1353
|
var d = c("initialFocus", {
|
|
1354
1354
|
hasFallback: !0
|
|
1355
1355
|
});
|
|
1356
1356
|
if (d === !1)
|
|
1357
1357
|
return !1;
|
|
1358
|
-
if (d === void 0 || d && !
|
|
1358
|
+
if (d === void 0 || d && !He(d, r.tabbableOptions))
|
|
1359
1359
|
if (u(t.activeElement) >= 0)
|
|
1360
1360
|
d = t.activeElement;
|
|
1361
1361
|
else {
|
|
1362
|
-
var
|
|
1363
|
-
d =
|
|
1362
|
+
var v = a.tabbableGroups[0], $ = v && v.firstTabbableNode;
|
|
1363
|
+
d = $ || c("fallbackFocus");
|
|
1364
1364
|
}
|
|
1365
1365
|
else d === null && (d = c("fallbackFocus"));
|
|
1366
1366
|
if (!d)
|
|
@@ -1368,23 +1368,23 @@ var mt = {
|
|
|
1368
1368
|
return d;
|
|
1369
1369
|
}, s = function() {
|
|
1370
1370
|
if (a.containerGroups = a.containers.map(function(d) {
|
|
1371
|
-
var
|
|
1372
|
-
return
|
|
1373
|
-
}),
|
|
1374
|
-
return
|
|
1375
|
-
}),
|
|
1376
|
-
return
|
|
1371
|
+
var v = To(d, r.tabbableOptions), $ = Fo(d, r.tabbableOptions), q = v.length > 0 ? v[0] : void 0, I = v.length > 0 ? v[v.length - 1] : void 0, U = $.find(function(h) {
|
|
1372
|
+
return ye(h);
|
|
1373
|
+
}), R = $.slice().reverse().find(function(h) {
|
|
1374
|
+
return ye(h);
|
|
1375
|
+
}), H = !!v.find(function(h) {
|
|
1376
|
+
return ge(h) > 0;
|
|
1377
1377
|
});
|
|
1378
1378
|
return {
|
|
1379
1379
|
container: d,
|
|
1380
|
-
tabbableNodes:
|
|
1381
|
-
focusableNodes:
|
|
1380
|
+
tabbableNodes: v,
|
|
1381
|
+
focusableNodes: $,
|
|
1382
1382
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
1383
|
-
posTabIndexesFound:
|
|
1383
|
+
posTabIndexesFound: H,
|
|
1384
1384
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1385
1385
|
firstTabbableNode: q,
|
|
1386
1386
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1387
|
-
lastTabbableNode:
|
|
1387
|
+
lastTabbableNode: I,
|
|
1388
1388
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
1389
1389
|
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
1390
1390
|
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
@@ -1393,9 +1393,9 @@ var mt = {
|
|
|
1393
1393
|
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
1394
1394
|
// be avoided anyway...
|
|
1395
1395
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1396
|
-
firstDomTabbableNode:
|
|
1396
|
+
firstDomTabbableNode: U,
|
|
1397
1397
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1398
|
-
lastDomTabbableNode:
|
|
1398
|
+
lastDomTabbableNode: R,
|
|
1399
1399
|
/**
|
|
1400
1400
|
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
1401
1401
|
* in this container, if any.
|
|
@@ -1405,12 +1405,12 @@ var mt = {
|
|
|
1405
1405
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
1406
1406
|
*/
|
|
1407
1407
|
nextTabbableNode: function(h) {
|
|
1408
|
-
var
|
|
1409
|
-
return
|
|
1410
|
-
return
|
|
1411
|
-
}) :
|
|
1412
|
-
return
|
|
1413
|
-
}) :
|
|
1408
|
+
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, N = v.indexOf(h);
|
|
1409
|
+
return N < 0 ? x ? $.slice($.indexOf(h) + 1).find(function(F) {
|
|
1410
|
+
return ye(F);
|
|
1411
|
+
}) : $.slice(0, $.indexOf(h)).reverse().find(function(F) {
|
|
1412
|
+
return ye(F);
|
|
1413
|
+
}) : v[N + (x ? 1 : -1)];
|
|
1414
1414
|
}
|
|
1415
1415
|
};
|
|
1416
1416
|
}), a.tabbableGroups = a.containerGroups.filter(function(d) {
|
|
@@ -1421,59 +1421,59 @@ var mt = {
|
|
|
1421
1421
|
return d.posTabIndexesFound;
|
|
1422
1422
|
}) && a.containerGroups.length > 1)
|
|
1423
1423
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
1424
|
-
},
|
|
1425
|
-
var
|
|
1426
|
-
if (
|
|
1427
|
-
return
|
|
1428
|
-
},
|
|
1429
|
-
if (d !== !1 && d !==
|
|
1424
|
+
}, m = function(d) {
|
|
1425
|
+
var v = d.activeElement;
|
|
1426
|
+
if (v)
|
|
1427
|
+
return v.shadowRoot && v.shadowRoot.activeElement !== null ? m(v.shadowRoot) : v;
|
|
1428
|
+
}, g = function(d) {
|
|
1429
|
+
if (d !== !1 && d !== m(document)) {
|
|
1430
1430
|
if (!d || !d.focus) {
|
|
1431
|
-
|
|
1431
|
+
g(p());
|
|
1432
1432
|
return;
|
|
1433
1433
|
}
|
|
1434
1434
|
d.focus({
|
|
1435
1435
|
preventScroll: !!r.preventScroll
|
|
1436
|
-
}), a.mostRecentlyFocusedNode = d,
|
|
1436
|
+
}), a.mostRecentlyFocusedNode = d, Jo(d) && d.select();
|
|
1437
1437
|
}
|
|
1438
|
-
},
|
|
1439
|
-
var
|
|
1438
|
+
}, b = function(d) {
|
|
1439
|
+
var v = c("setReturnFocus", {
|
|
1440
1440
|
params: [d]
|
|
1441
1441
|
});
|
|
1442
|
-
return
|
|
1442
|
+
return v || (v === !1 ? !1 : d);
|
|
1443
1443
|
}, _ = function(d) {
|
|
1444
|
-
var
|
|
1445
|
-
|
|
1446
|
-
var
|
|
1444
|
+
var v = d.target, $ = d.event, q = d.isBackward, I = q === void 0 ? !1 : q;
|
|
1445
|
+
v = v || Re($), s();
|
|
1446
|
+
var U = null;
|
|
1447
1447
|
if (a.tabbableGroups.length > 0) {
|
|
1448
|
-
var
|
|
1449
|
-
if (
|
|
1450
|
-
|
|
1451
|
-
else if (
|
|
1452
|
-
var h = a.tabbableGroups.findIndex(function(
|
|
1453
|
-
var
|
|
1454
|
-
return
|
|
1448
|
+
var R = u(v, $), H = R >= 0 ? a.containerGroups[R] : void 0;
|
|
1449
|
+
if (R < 0)
|
|
1450
|
+
I ? U = a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : U = a.tabbableGroups[0].firstTabbableNode;
|
|
1451
|
+
else if (I) {
|
|
1452
|
+
var h = a.tabbableGroups.findIndex(function(fe) {
|
|
1453
|
+
var ie = fe.firstTabbableNode;
|
|
1454
|
+
return v === ie;
|
|
1455
1455
|
});
|
|
1456
|
-
if (h < 0 && (
|
|
1457
|
-
var
|
|
1458
|
-
|
|
1459
|
-
} else
|
|
1456
|
+
if (h < 0 && (H.container === v || He(v, r.tabbableOptions) && !ye(v, r.tabbableOptions) && !H.nextTabbableNode(v, !1)) && (h = R), h >= 0) {
|
|
1457
|
+
var x = h === 0 ? a.tabbableGroups.length - 1 : h - 1, N = a.tabbableGroups[x];
|
|
1458
|
+
U = ge(v) >= 0 ? N.lastTabbableNode : N.lastDomTabbableNode;
|
|
1459
|
+
} else Ie($) || (U = H.nextTabbableNode(v, !1));
|
|
1460
1460
|
} else {
|
|
1461
|
-
var F = a.tabbableGroups.findIndex(function(
|
|
1462
|
-
var
|
|
1463
|
-
return
|
|
1461
|
+
var F = a.tabbableGroups.findIndex(function(fe) {
|
|
1462
|
+
var ie = fe.lastTabbableNode;
|
|
1463
|
+
return v === ie;
|
|
1464
1464
|
});
|
|
1465
|
-
if (F < 0 && (
|
|
1466
|
-
var
|
|
1467
|
-
|
|
1468
|
-
} else
|
|
1465
|
+
if (F < 0 && (H.container === v || He(v, r.tabbableOptions) && !ye(v, r.tabbableOptions) && !H.nextTabbableNode(v)) && (F = R), F >= 0) {
|
|
1466
|
+
var J = F === a.tabbableGroups.length - 1 ? 0 : F + 1, se = a.tabbableGroups[J];
|
|
1467
|
+
U = ge(v) >= 0 ? se.firstTabbableNode : se.firstDomTabbableNode;
|
|
1468
|
+
} else Ie($) || (U = H.nextTabbableNode(v));
|
|
1469
1469
|
}
|
|
1470
1470
|
} else
|
|
1471
|
-
|
|
1472
|
-
return
|
|
1473
|
-
},
|
|
1474
|
-
var
|
|
1475
|
-
if (!(u(
|
|
1476
|
-
if (
|
|
1471
|
+
U = c("fallbackFocus");
|
|
1472
|
+
return U;
|
|
1473
|
+
}, E = function(d) {
|
|
1474
|
+
var v = Re(d);
|
|
1475
|
+
if (!(u(v, d) >= 0)) {
|
|
1476
|
+
if (Ae(r.clickOutsideDeactivates, d)) {
|
|
1477
1477
|
i.deactivate({
|
|
1478
1478
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
1479
1479
|
// which will result in the outside click setting focus to the node
|
|
@@ -1485,86 +1485,86 @@ var mt = {
|
|
|
1485
1485
|
});
|
|
1486
1486
|
return;
|
|
1487
1487
|
}
|
|
1488
|
-
|
|
1488
|
+
Ae(r.allowOutsideClick, d) || d.preventDefault();
|
|
1489
1489
|
}
|
|
1490
|
-
},
|
|
1491
|
-
var
|
|
1492
|
-
if (
|
|
1493
|
-
|
|
1490
|
+
}, Y = function(d) {
|
|
1491
|
+
var v = Re(d), $ = u(v, d) >= 0;
|
|
1492
|
+
if ($ || v instanceof Document)
|
|
1493
|
+
$ && (a.mostRecentlyFocusedNode = v);
|
|
1494
1494
|
else {
|
|
1495
1495
|
d.stopImmediatePropagation();
|
|
1496
|
-
var q,
|
|
1496
|
+
var q, I = !0;
|
|
1497
1497
|
if (a.mostRecentlyFocusedNode)
|
|
1498
|
-
if (
|
|
1499
|
-
var
|
|
1500
|
-
if (
|
|
1501
|
-
var
|
|
1498
|
+
if (ge(a.mostRecentlyFocusedNode) > 0) {
|
|
1499
|
+
var U = u(a.mostRecentlyFocusedNode), R = a.containerGroups[U].tabbableNodes;
|
|
1500
|
+
if (R.length > 0) {
|
|
1501
|
+
var H = R.findIndex(function(h) {
|
|
1502
1502
|
return h === a.mostRecentlyFocusedNode;
|
|
1503
1503
|
});
|
|
1504
|
-
|
|
1504
|
+
H >= 0 && (r.isKeyForward(a.recentNavEvent) ? H + 1 < R.length && (q = R[H + 1], I = !1) : H - 1 >= 0 && (q = R[H - 1], I = !1));
|
|
1505
1505
|
}
|
|
1506
1506
|
} else
|
|
1507
1507
|
a.containerGroups.some(function(h) {
|
|
1508
|
-
return h.tabbableNodes.some(function(
|
|
1509
|
-
return
|
|
1508
|
+
return h.tabbableNodes.some(function(x) {
|
|
1509
|
+
return ge(x) > 0;
|
|
1510
1510
|
});
|
|
1511
|
-
}) || (
|
|
1511
|
+
}) || (I = !1);
|
|
1512
1512
|
else
|
|
1513
|
-
|
|
1514
|
-
|
|
1513
|
+
I = !1;
|
|
1514
|
+
I && (q = _({
|
|
1515
1515
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
1516
1516
|
// outside the trap causing the focus escape we're trying to fix)
|
|
1517
1517
|
target: a.mostRecentlyFocusedNode,
|
|
1518
1518
|
isBackward: r.isKeyBackward(a.recentNavEvent)
|
|
1519
|
-
})),
|
|
1519
|
+
})), g(q || a.mostRecentlyFocusedNode || p());
|
|
1520
1520
|
}
|
|
1521
1521
|
a.recentNavEvent = void 0;
|
|
1522
|
-
},
|
|
1523
|
-
var
|
|
1522
|
+
}, z = function(d) {
|
|
1523
|
+
var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1524
1524
|
a.recentNavEvent = d;
|
|
1525
|
-
var
|
|
1525
|
+
var $ = _({
|
|
1526
1526
|
event: d,
|
|
1527
|
-
isBackward:
|
|
1527
|
+
isBackward: v
|
|
1528
1528
|
});
|
|
1529
|
-
|
|
1529
|
+
$ && (Ie(d) && d.preventDefault(), g($));
|
|
1530
1530
|
}, j = function(d) {
|
|
1531
|
-
(r.isKeyForward(d) || r.isKeyBackward(d)) &&
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1534
|
-
},
|
|
1535
|
-
var
|
|
1536
|
-
u(
|
|
1537
|
-
},
|
|
1531
|
+
(r.isKeyForward(d) || r.isKeyBackward(d)) && z(d, r.isKeyBackward(d));
|
|
1532
|
+
}, Q = function(d) {
|
|
1533
|
+
Qo(d) && Ae(r.escapeDeactivates, d) !== !1 && (d.preventDefault(), i.deactivate());
|
|
1534
|
+
}, Z = function(d) {
|
|
1535
|
+
var v = Re(d);
|
|
1536
|
+
u(v, d) >= 0 || Ae(r.clickOutsideDeactivates, d) || Ae(r.allowOutsideClick, d) || (d.preventDefault(), d.stopImmediatePropagation());
|
|
1537
|
+
}, B = function() {
|
|
1538
1538
|
if (a.active)
|
|
1539
|
-
return
|
|
1540
|
-
|
|
1541
|
-
}) :
|
|
1539
|
+
return ht.activateTrap(o, i), a.delayInitialFocusTimer = r.delayInitialFocus ? yt(function() {
|
|
1540
|
+
g(p());
|
|
1541
|
+
}) : g(p()), t.addEventListener("focusin", Y, !0), t.addEventListener("mousedown", E, {
|
|
1542
1542
|
capture: !0,
|
|
1543
1543
|
passive: !1
|
|
1544
|
-
}), t.addEventListener("touchstart",
|
|
1544
|
+
}), t.addEventListener("touchstart", E, {
|
|
1545
1545
|
capture: !0,
|
|
1546
1546
|
passive: !1
|
|
1547
|
-
}), t.addEventListener("click",
|
|
1547
|
+
}), t.addEventListener("click", Z, {
|
|
1548
1548
|
capture: !0,
|
|
1549
1549
|
passive: !1
|
|
1550
1550
|
}), t.addEventListener("keydown", j, {
|
|
1551
1551
|
capture: !0,
|
|
1552
1552
|
passive: !1
|
|
1553
|
-
}), t.addEventListener("keydown",
|
|
1554
|
-
},
|
|
1553
|
+
}), t.addEventListener("keydown", Q), i;
|
|
1554
|
+
}, P = function() {
|
|
1555
1555
|
if (a.active)
|
|
1556
|
-
return t.removeEventListener("focusin",
|
|
1557
|
-
},
|
|
1558
|
-
var
|
|
1559
|
-
var q = Array.from(
|
|
1560
|
-
return q.some(function(
|
|
1561
|
-
return
|
|
1556
|
+
return t.removeEventListener("focusin", Y, !0), t.removeEventListener("mousedown", E, !0), t.removeEventListener("touchstart", E, !0), t.removeEventListener("click", Z, !0), t.removeEventListener("keydown", j, !0), t.removeEventListener("keydown", Q), i;
|
|
1557
|
+
}, D = function(d) {
|
|
1558
|
+
var v = d.some(function($) {
|
|
1559
|
+
var q = Array.from($.removedNodes);
|
|
1560
|
+
return q.some(function(I) {
|
|
1561
|
+
return I === a.mostRecentlyFocusedNode;
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
|
-
|
|
1565
|
-
},
|
|
1566
|
-
|
|
1567
|
-
|
|
1564
|
+
v && g(p());
|
|
1565
|
+
}, te = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(D) : void 0, ne = function() {
|
|
1566
|
+
te && (te.disconnect(), a.active && !a.paused && a.containers.map(function(d) {
|
|
1567
|
+
te.observe(d, {
|
|
1568
1568
|
subtree: !0,
|
|
1569
1569
|
childList: !0
|
|
1570
1570
|
});
|
|
@@ -1580,30 +1580,30 @@ var mt = {
|
|
|
1580
1580
|
activate: function(d) {
|
|
1581
1581
|
if (a.active)
|
|
1582
1582
|
return this;
|
|
1583
|
-
var
|
|
1584
|
-
q || s(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = t.activeElement,
|
|
1585
|
-
var
|
|
1586
|
-
q && s(),
|
|
1583
|
+
var v = l(d, "onActivate"), $ = l(d, "onPostActivate"), q = l(d, "checkCanFocusTrap");
|
|
1584
|
+
q || s(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = t.activeElement, v == null || v();
|
|
1585
|
+
var I = function() {
|
|
1586
|
+
q && s(), B(), ne(), $ == null || $();
|
|
1587
1587
|
};
|
|
1588
|
-
return q ? (q(a.containers.concat()).then(
|
|
1588
|
+
return q ? (q(a.containers.concat()).then(I, I), this) : (I(), this);
|
|
1589
1589
|
},
|
|
1590
1590
|
deactivate: function(d) {
|
|
1591
1591
|
if (!a.active)
|
|
1592
1592
|
return this;
|
|
1593
|
-
var
|
|
1593
|
+
var v = bt({
|
|
1594
1594
|
onDeactivate: r.onDeactivate,
|
|
1595
1595
|
onPostDeactivate: r.onPostDeactivate,
|
|
1596
1596
|
checkCanReturnFocus: r.checkCanReturnFocus
|
|
1597
1597
|
}, d);
|
|
1598
|
-
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0,
|
|
1599
|
-
var
|
|
1600
|
-
|
|
1601
|
-
var
|
|
1602
|
-
|
|
1603
|
-
|
|
1598
|
+
clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, P(), a.active = !1, a.paused = !1, ne(), ht.deactivateTrap(o, i);
|
|
1599
|
+
var $ = l(v, "onDeactivate"), q = l(v, "onPostDeactivate"), I = l(v, "checkCanReturnFocus"), U = l(v, "returnFocus", "returnFocusOnDeactivate");
|
|
1600
|
+
$ == null || $();
|
|
1601
|
+
var R = function() {
|
|
1602
|
+
yt(function() {
|
|
1603
|
+
U && g(b(a.nodeFocusedBeforeActivation)), q == null || q();
|
|
1604
1604
|
});
|
|
1605
1605
|
};
|
|
1606
|
-
return
|
|
1606
|
+
return U && I ? (I(b(a.nodeFocusedBeforeActivation)).then(R, R), this) : (R(), this);
|
|
1607
1607
|
},
|
|
1608
1608
|
pause: function(d) {
|
|
1609
1609
|
return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, d)) : this;
|
|
@@ -1612,10 +1612,10 @@ var mt = {
|
|
|
1612
1612
|
return a.active ? (a.manuallyPaused = !1, o[o.length - 1] !== this ? this : this._setPausedState(!1, d)) : this;
|
|
1613
1613
|
},
|
|
1614
1614
|
updateContainerElements: function(d) {
|
|
1615
|
-
var
|
|
1616
|
-
return a.containers =
|
|
1617
|
-
return typeof
|
|
1618
|
-
}), a.active && s(),
|
|
1615
|
+
var v = [].concat(d).filter(Boolean);
|
|
1616
|
+
return a.containers = v.map(function($) {
|
|
1617
|
+
return typeof $ == "string" ? t.querySelector($) : $;
|
|
1618
|
+
}), a.active && s(), ne(), this;
|
|
1619
1619
|
}
|
|
1620
1620
|
}, Object.defineProperties(i, {
|
|
1621
1621
|
_isManuallyPaused: {
|
|
@@ -1624,41 +1624,41 @@ var mt = {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
},
|
|
1626
1626
|
_setPausedState: {
|
|
1627
|
-
value: function(d,
|
|
1627
|
+
value: function(d, v) {
|
|
1628
1628
|
if (a.paused === d)
|
|
1629
1629
|
return this;
|
|
1630
1630
|
if (a.paused = d, d) {
|
|
1631
|
-
var
|
|
1632
|
-
|
|
1631
|
+
var $ = l(v, "onPause"), q = l(v, "onPostPause");
|
|
1632
|
+
$ == null || $(), P(), ne(), q == null || q();
|
|
1633
1633
|
} else {
|
|
1634
|
-
var
|
|
1635
|
-
|
|
1634
|
+
var I = l(v, "onUnpause"), U = l(v, "onPostUnpause");
|
|
1635
|
+
I == null || I(), s(), B(), ne(), U == null || U();
|
|
1636
1636
|
}
|
|
1637
1637
|
return this;
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
}), i.updateContainerElements(e), i;
|
|
1641
1641
|
};
|
|
1642
|
-
const
|
|
1642
|
+
const ea = /* @__PURE__ */ O({
|
|
1643
1643
|
name: "UseFocusTrap",
|
|
1644
1644
|
props: ["as", "options"],
|
|
1645
1645
|
setup(e, { slots: n }) {
|
|
1646
1646
|
let t;
|
|
1647
|
-
const o =
|
|
1648
|
-
return
|
|
1649
|
-
() =>
|
|
1647
|
+
const o = T(), r = () => t && t.activate(), a = () => t && t.deactivate();
|
|
1648
|
+
return le(
|
|
1649
|
+
() => tt(o),
|
|
1650
1650
|
(i) => {
|
|
1651
|
-
i && (t =
|
|
1651
|
+
i && (t = Ko(i, e.options || {}), r());
|
|
1652
1652
|
},
|
|
1653
1653
|
{ flush: "post" }
|
|
1654
|
-
),
|
|
1654
|
+
), Et(() => a()), () => {
|
|
1655
1655
|
if (n.default)
|
|
1656
|
-
return
|
|
1656
|
+
return Ye(e.as || "div", { ref: o }, n.default());
|
|
1657
1657
|
};
|
|
1658
1658
|
}
|
|
1659
|
-
}),
|
|
1659
|
+
}), ta = /* @__PURE__ */ O({
|
|
1660
1660
|
__name: "QFocusTrap",
|
|
1661
|
-
props: /* @__PURE__ */
|
|
1661
|
+
props: /* @__PURE__ */ ve({
|
|
1662
1662
|
options: {},
|
|
1663
1663
|
as: {}
|
|
1664
1664
|
}, {
|
|
@@ -1667,13 +1667,13 @@ const Xo = /* @__PURE__ */ T({
|
|
|
1667
1667
|
}),
|
|
1668
1668
|
emits: ["update:disabled"],
|
|
1669
1669
|
setup(e) {
|
|
1670
|
-
const n = e, t =
|
|
1671
|
-
return (o, r) => t.value ?
|
|
1672
|
-
f(
|
|
1673
|
-
|
|
1670
|
+
const n = e, t = Ee(e, "disabled");
|
|
1671
|
+
return (o, r) => t.value ? M(o.$slots, "default", { key: 0 }) : (y(), V(
|
|
1672
|
+
f(ea),
|
|
1673
|
+
De(de({ key: 1 }, n)),
|
|
1674
1674
|
{
|
|
1675
|
-
default:
|
|
1676
|
-
|
|
1675
|
+
default: C(() => [
|
|
1676
|
+
M(o.$slots, "default")
|
|
1677
1677
|
]),
|
|
1678
1678
|
_: 3
|
|
1679
1679
|
/* FORWARDED */
|
|
@@ -1682,18 +1682,18 @@ const Xo = /* @__PURE__ */ T({
|
|
|
1682
1682
|
/* FULL_PROPS */
|
|
1683
1683
|
));
|
|
1684
1684
|
}
|
|
1685
|
-
}),
|
|
1685
|
+
}), na = K(ta), we = "data-scroll-locked", Ze = "right-scroll-bar-position", Je = "width-before-scroll-bar", oa = "with-scroll-bars-hidden", aa = "--removed-body-scroll-bar-size", ra = {
|
|
1686
1686
|
left: 0,
|
|
1687
1687
|
top: 0,
|
|
1688
1688
|
right: 0,
|
|
1689
1689
|
gap: 0
|
|
1690
|
-
},
|
|
1690
|
+
}, Qe = (e) => parseInt(e || "", 10) || 0, ia = (e) => {
|
|
1691
1691
|
const n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], r = n[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1692
|
-
return [
|
|
1693
|
-
},
|
|
1692
|
+
return [Qe(t), Qe(o), Qe(r)];
|
|
1693
|
+
}, la = (e = "margin") => {
|
|
1694
1694
|
if (typeof window > "u")
|
|
1695
|
-
return
|
|
1696
|
-
const n =
|
|
1695
|
+
return ra;
|
|
1696
|
+
const n = ia(e), t = document.documentElement.clientWidth, o = window.innerWidth;
|
|
1697
1697
|
return {
|
|
1698
1698
|
left: n[0],
|
|
1699
1699
|
top: n[1],
|
|
@@ -1701,27 +1701,27 @@ const Xo = /* @__PURE__ */ T({
|
|
|
1701
1701
|
gap: Math.max(0, o - t + n[2] - n[0])
|
|
1702
1702
|
};
|
|
1703
1703
|
};
|
|
1704
|
-
function
|
|
1704
|
+
function sa() {
|
|
1705
1705
|
return document ? document.createElement("style") : null;
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function ca(e, n) {
|
|
1708
1708
|
e.appendChild(document.createTextNode(n));
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function ua(e) {
|
|
1711
1711
|
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
|
|
1712
1712
|
}
|
|
1713
|
-
const
|
|
1713
|
+
const da = () => {
|
|
1714
1714
|
let e = 0, n = null;
|
|
1715
1715
|
return {
|
|
1716
1716
|
add: (t) => {
|
|
1717
|
-
e === 0 && (n =
|
|
1717
|
+
e === 0 && (n = sa()) && (ca(n, t), ua(n)), e++;
|
|
1718
1718
|
},
|
|
1719
1719
|
remove: () => {
|
|
1720
1720
|
var t;
|
|
1721
1721
|
e--, !e && n && ((t = n.parentNode) == null || t.removeChild(n), n = null);
|
|
1722
1722
|
}
|
|
1723
1723
|
};
|
|
1724
|
-
},
|
|
1724
|
+
}, pa = /* @__PURE__ */ O({
|
|
1725
1725
|
__name: "QRemoveScrollBar",
|
|
1726
1726
|
props: {
|
|
1727
1727
|
noRelative: { type: Boolean },
|
|
@@ -1729,15 +1729,15 @@ const ca = () => {
|
|
|
1729
1729
|
gapMode: { default: "margin" }
|
|
1730
1730
|
},
|
|
1731
1731
|
setup(e) {
|
|
1732
|
-
const n = e, t =
|
|
1733
|
-
const a = parseInt(document.body.getAttribute(
|
|
1732
|
+
const n = e, t = da(), o = () => {
|
|
1733
|
+
const a = parseInt(document.body.getAttribute(we) || "0", 10);
|
|
1734
1734
|
return isFinite(a) ? a : 0;
|
|
1735
1735
|
}, r = ({ left: a, top: i, right: l, gap: u }, c, p = "margin", s) => `
|
|
1736
|
-
.${
|
|
1736
|
+
.${oa} {
|
|
1737
1737
|
overflow: hidden ${s};
|
|
1738
1738
|
padding-right: ${u}px ${s};
|
|
1739
1739
|
}
|
|
1740
|
-
body[${
|
|
1740
|
+
body[${we}] {
|
|
1741
1741
|
overflow: hidden ${s};
|
|
1742
1742
|
overscroll-behavior: contain;
|
|
1743
1743
|
${[
|
|
@@ -1754,89 +1754,89 @@ const ca = () => {
|
|
|
1754
1754
|
].filter(Boolean).join("")}
|
|
1755
1755
|
}
|
|
1756
1756
|
|
|
1757
|
-
.${
|
|
1757
|
+
.${Ze} {
|
|
1758
1758
|
right: ${u}px ${s};
|
|
1759
1759
|
}
|
|
1760
1760
|
|
|
1761
|
-
.${
|
|
1761
|
+
.${Je} {
|
|
1762
1762
|
margin-right: ${u}px ${s};
|
|
1763
1763
|
}
|
|
1764
1764
|
|
|
1765
|
-
.${
|
|
1765
|
+
.${Ze} .${Ze} {
|
|
1766
1766
|
right: 0 ${s};
|
|
1767
1767
|
}
|
|
1768
1768
|
|
|
1769
|
-
.${
|
|
1769
|
+
.${Je} .${Je} {
|
|
1770
1770
|
margin-right: 0 ${s};
|
|
1771
1771
|
}
|
|
1772
1772
|
|
|
1773
|
-
body[${
|
|
1774
|
-
${
|
|
1773
|
+
body[${we}] {
|
|
1774
|
+
${aa}: ${u}px;
|
|
1775
1775
|
}
|
|
1776
1776
|
`;
|
|
1777
|
-
return
|
|
1778
|
-
document.body.setAttribute(
|
|
1779
|
-
const a =
|
|
1777
|
+
return Ce(() => {
|
|
1778
|
+
document.body.setAttribute(we, (o() + 1).toString());
|
|
1779
|
+
const a = la(n.gapMode);
|
|
1780
1780
|
t.add(
|
|
1781
1781
|
r(a, !n.noRelative, n.gapMode, n.noImportant ? "" : "!important")
|
|
1782
1782
|
);
|
|
1783
|
-
}),
|
|
1783
|
+
}), Dt(() => {
|
|
1784
1784
|
const a = o() - 1;
|
|
1785
|
-
a <= 0 ? document.body.removeAttribute(
|
|
1786
|
-
}), (a, i) =>
|
|
1785
|
+
a <= 0 ? document.body.removeAttribute(we) : document.body.setAttribute(we, a.toString()), t.remove();
|
|
1786
|
+
}), (a, i) => M(a.$slots, "default");
|
|
1787
1787
|
}
|
|
1788
|
-
}),
|
|
1789
|
-
function
|
|
1790
|
-
const r = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", l = e.getBoundingClientRect(), u = n.getBoundingClientRect(), c = t == null ? void 0 : t.getBoundingClientRect(), p =
|
|
1788
|
+
}), fa = K(pa);
|
|
1789
|
+
function va(e, n, t, o) {
|
|
1790
|
+
const r = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", l = e.getBoundingClientRect(), u = n.getBoundingClientRect(), c = t == null ? void 0 : t.getBoundingClientRect(), p = ma(l, u, i, r), s = wa(l, u, p), m = ba(s, p, r), g = ha(m, p, a), b = ga(g, u, p);
|
|
1791
1791
|
let _;
|
|
1792
1792
|
if (o != null && o.arrow) {
|
|
1793
1793
|
if (!c)
|
|
1794
1794
|
throw new Error("[Quidgest UI] The arrow element must exist to compute its position");
|
|
1795
|
-
_ =
|
|
1795
|
+
_ = ya(b, l, u, c, p);
|
|
1796
1796
|
}
|
|
1797
|
-
return { overlayCoords:
|
|
1797
|
+
return { overlayCoords: b, arrowCoords: _, placement: p };
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1800
|
-
const r =
|
|
1801
|
-
if (
|
|
1802
|
-
const a =
|
|
1799
|
+
function ma(e, n, t, o) {
|
|
1800
|
+
const r = wt(e, n, t, o);
|
|
1801
|
+
if (_t(r)) {
|
|
1802
|
+
const a = ke(t), i = {
|
|
1803
1803
|
top: "bottom",
|
|
1804
1804
|
bottom: "top",
|
|
1805
1805
|
left: "right",
|
|
1806
1806
|
right: "left"
|
|
1807
|
-
}[a], l =
|
|
1807
|
+
}[a], l = wt(
|
|
1808
1808
|
e,
|
|
1809
1809
|
n,
|
|
1810
1810
|
i,
|
|
1811
1811
|
o
|
|
1812
1812
|
);
|
|
1813
|
-
if (
|
|
1813
|
+
if (_t(l))
|
|
1814
1814
|
return t;
|
|
1815
|
-
const u =
|
|
1815
|
+
const u = $a(t);
|
|
1816
1816
|
return u ? `${i}-${u}` : i;
|
|
1817
1817
|
}
|
|
1818
1818
|
return t;
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1821
|
-
const o =
|
|
1820
|
+
function ga(e, n, t) {
|
|
1821
|
+
const o = Ge(t), r = (i, l, u) => Math.min(Math.max(i, l), u), a = { ...e };
|
|
1822
1822
|
return o === "x" ? a.x = r(e.x, 8, window.innerWidth - n.width - 8) : a.y = r(e.y, 8, window.innerHeight - n.height - 8), a;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
const o =
|
|
1824
|
+
function ba(e, n, t) {
|
|
1825
|
+
const o = ke(n);
|
|
1826
1826
|
return {
|
|
1827
1827
|
x: e.x + (o === "left" ? -t : o === "right" ? t : 0),
|
|
1828
1828
|
y: e.y + (o === "top" ? -t : o === "bottom" ? t : 0)
|
|
1829
1829
|
};
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
const o =
|
|
1831
|
+
function ha(e, n, t) {
|
|
1832
|
+
const o = ke(n);
|
|
1833
1833
|
return {
|
|
1834
1834
|
x: e.x + (o === "top" || o === "bottom" ? t : 0),
|
|
1835
1835
|
y: e.y + (o === "right" || o === "left" ? t : 0)
|
|
1836
1836
|
};
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1839
|
-
if (
|
|
1838
|
+
function ya(e, n, t, o, r) {
|
|
1839
|
+
if (Ge(r) === "y") {
|
|
1840
1840
|
const a = n.top + n.height / 2, i = e.y + t.height / 2, l = i - a, u = t.height / 2 - l - o.height / 2 + 2;
|
|
1841
1841
|
if (u > 0 && u < t.height - o.height)
|
|
1842
1842
|
return {
|
|
@@ -1850,7 +1850,7 @@ function ba(e, n, t, o, r) {
|
|
|
1850
1850
|
};
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function wa(e, n, t) {
|
|
1854
1854
|
const [o, r] = t.split("-"), a = e.x + e.width / 2 - n.width / 2, i = e.y + e.height / 2 - n.height / 2;
|
|
1855
1855
|
let l;
|
|
1856
1856
|
switch (o) {
|
|
@@ -1871,7 +1871,7 @@ function ha(e, n, t) {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
if (!r)
|
|
1873
1873
|
return l;
|
|
1874
|
-
const u =
|
|
1874
|
+
const u = Ge(t) === "y" ? "height" : "width", c = Ge(t), p = e[u] / 2 - n[u] / 2;
|
|
1875
1875
|
switch (r) {
|
|
1876
1876
|
case "start":
|
|
1877
1877
|
l[c] -= p;
|
|
@@ -1884,8 +1884,8 @@ function ha(e, n, t) {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
return l;
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1888
|
-
const r =
|
|
1887
|
+
function wt(e, n, t, o) {
|
|
1888
|
+
const r = ke(t);
|
|
1889
1889
|
let a = 0;
|
|
1890
1890
|
switch (r) {
|
|
1891
1891
|
case "top":
|
|
@@ -1905,34 +1905,34 @@ function bt(e, n, t, o) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
return a;
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function _a(e) {
|
|
1909
1909
|
return e === "x" ? "y" : "x";
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
const n =
|
|
1911
|
+
function ka(e) {
|
|
1912
|
+
const n = ke(e);
|
|
1913
1913
|
return ["left", "right"].includes(n) ? "x" : "y";
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1916
|
-
return
|
|
1915
|
+
function Ge(e) {
|
|
1916
|
+
return _a(ka(e));
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function ke(e) {
|
|
1919
1919
|
const [n] = e.split("-");
|
|
1920
1920
|
return n;
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1922
|
+
function $a(e) {
|
|
1923
1923
|
const [, n] = e.split("-");
|
|
1924
1924
|
return n;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function _t(e) {
|
|
1927
1927
|
return e < 0;
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function Aa(e) {
|
|
1930
1930
|
return typeof e == "string" ? document.querySelector(e) : e;
|
|
1931
1931
|
}
|
|
1932
|
-
const
|
|
1932
|
+
const xa = ["id"], Ia = ["role"], Sa = /* @__PURE__ */ O({
|
|
1933
1933
|
inheritAttrs: !1,
|
|
1934
1934
|
__name: "QOverlay",
|
|
1935
|
-
props: /* @__PURE__ */
|
|
1935
|
+
props: /* @__PURE__ */ ve({
|
|
1936
1936
|
id: {},
|
|
1937
1937
|
class: {},
|
|
1938
1938
|
anchor: {},
|
|
@@ -1959,11 +1959,11 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
1959
1959
|
modelValue: { type: Boolean },
|
|
1960
1960
|
modelModifiers: {}
|
|
1961
1961
|
}),
|
|
1962
|
-
emits: /* @__PURE__ */
|
|
1962
|
+
emits: /* @__PURE__ */ ve(["enter", "leave"], ["update:modelValue"]),
|
|
1963
1963
|
setup(e, { emit: n }) {
|
|
1964
|
-
const t = e, o = n, r =
|
|
1964
|
+
const t = e, o = n, r = Ee(e, "modelValue"), { class: a } = qt(), i = w(() => [
|
|
1965
1965
|
"q-overlay",
|
|
1966
|
-
`q-overlay--${
|
|
1966
|
+
`q-overlay--${ke(s.placement)}`,
|
|
1967
1967
|
a.value,
|
|
1968
1968
|
{
|
|
1969
1969
|
"q-overlay--independent": l.value,
|
|
@@ -1971,186 +1971,186 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
1971
1971
|
"q-overlay--center": t.centerVertically
|
|
1972
1972
|
},
|
|
1973
1973
|
t.class
|
|
1974
|
-
]), l = w(() => t.anchor === void 0), u = w(() => r.value && !t.nonModal), c = w(() => (r.value || s.animating) && t.scrollLock), p = w(() => !t.inline && (r.value || s.animating)), s =
|
|
1974
|
+
]), l = w(() => t.anchor === void 0), u = w(() => r.value && !t.nonModal), c = w(() => (r.value || s.animating) && t.scrollLock), p = w(() => !t.inline && (r.value || s.animating)), s = Ke({
|
|
1975
1975
|
animating: !1,
|
|
1976
1976
|
top: 0,
|
|
1977
1977
|
left: 0,
|
|
1978
1978
|
width: 0,
|
|
1979
1979
|
placement: t.placement
|
|
1980
|
-
}),
|
|
1980
|
+
}), m = Ke({
|
|
1981
1981
|
top: void 0,
|
|
1982
1982
|
left: void 0,
|
|
1983
1983
|
hidden: !0
|
|
1984
1984
|
});
|
|
1985
|
-
|
|
1986
|
-
const
|
|
1985
|
+
le(r, $);
|
|
1986
|
+
const g = w(() => {
|
|
1987
1987
|
if (l.value) return;
|
|
1988
|
-
const
|
|
1988
|
+
const k = I(), ce = t.width === "anchor", oe = ce ? k == null ? void 0 : k.getBoundingClientRect().width : void 0;
|
|
1989
1989
|
return {
|
|
1990
1990
|
top: `${s.top}px`,
|
|
1991
1991
|
left: `${s.left}px`,
|
|
1992
|
-
width:
|
|
1992
|
+
width: oe !== void 0 ? `${oe}px` : void 0
|
|
1993
1993
|
};
|
|
1994
|
-
}),
|
|
1994
|
+
}), b = w(() => {
|
|
1995
1995
|
if (t.arrow)
|
|
1996
1996
|
return {
|
|
1997
|
-
top:
|
|
1998
|
-
left:
|
|
1999
|
-
opacity:
|
|
1997
|
+
top: m.top !== void 0 ? `${m.top}px` : void 0,
|
|
1998
|
+
left: m.left !== void 0 ? `${m.left}px` : void 0,
|
|
1999
|
+
opacity: m.hidden ? 0 : 1
|
|
2000
2000
|
};
|
|
2001
|
-
}), _ =
|
|
2002
|
-
function
|
|
2003
|
-
const
|
|
2004
|
-
if (!
|
|
2001
|
+
}), _ = T(null), E = T(null), Y = T(null);
|
|
2002
|
+
function z() {
|
|
2003
|
+
const k = I();
|
|
2004
|
+
if (!k || !E.value)
|
|
2005
2005
|
return;
|
|
2006
|
-
const
|
|
2006
|
+
const ce = {
|
|
2007
2007
|
placement: t.placement,
|
|
2008
2008
|
width: t.width,
|
|
2009
2009
|
offset: t.offset,
|
|
2010
2010
|
crossOffset: t.crossOffset,
|
|
2011
2011
|
arrow: t.arrow
|
|
2012
|
-
},
|
|
2013
|
-
|
|
2014
|
-
|
|
2012
|
+
}, oe = va(
|
|
2013
|
+
k,
|
|
2014
|
+
E.value,
|
|
2015
2015
|
(_ == null ? void 0 : _.value) ?? void 0,
|
|
2016
|
-
|
|
2016
|
+
ce
|
|
2017
2017
|
);
|
|
2018
|
-
s.left =
|
|
2018
|
+
s.left = oe.overlayCoords.x, s.top = oe.overlayCoords.y, s.placement = oe.placement, m.hidden = oe.arrowCoords === void 0, oe.arrowCoords && (m.top = oe.arrowCoords.y, m.left = oe.arrowCoords.x);
|
|
2019
2019
|
}
|
|
2020
|
-
|
|
2020
|
+
le(
|
|
2021
2021
|
() => t.placement,
|
|
2022
|
-
() =>
|
|
2022
|
+
() => xe(z)
|
|
2023
2023
|
);
|
|
2024
2024
|
let j;
|
|
2025
|
-
function
|
|
2026
|
-
|
|
2025
|
+
function Q() {
|
|
2026
|
+
B(0);
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2029
|
-
|
|
2028
|
+
function Z() {
|
|
2029
|
+
B(t.delay);
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2032
|
-
j &&
|
|
2031
|
+
function B(k) {
|
|
2032
|
+
j && D(), j = window.setTimeout(() => {
|
|
2033
2033
|
r.value = !0;
|
|
2034
|
-
},
|
|
2034
|
+
}, k);
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2037
|
-
if (j &&
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2036
|
+
function P() {
|
|
2037
|
+
if (j && D(), r.value = !1, t.anchor && t.trigger === "click") {
|
|
2038
|
+
const k = I();
|
|
2039
|
+
xe(() => k == null ? void 0 : k.focus());
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function D() {
|
|
2043
2043
|
clearTimeout(j), j = void 0;
|
|
2044
2044
|
}
|
|
2045
|
-
function ee() {
|
|
2046
|
-
Ae(_e), o("enter");
|
|
2047
|
-
}
|
|
2048
2045
|
function te() {
|
|
2046
|
+
xe(ie), o("enter");
|
|
2047
|
+
}
|
|
2048
|
+
function ne() {
|
|
2049
2049
|
q();
|
|
2050
2050
|
}
|
|
2051
2051
|
function d() {
|
|
2052
2052
|
o("leave");
|
|
2053
2053
|
}
|
|
2054
|
-
function
|
|
2055
|
-
q(),
|
|
2054
|
+
function v() {
|
|
2055
|
+
q(), ze();
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function $() {
|
|
2058
2058
|
s.animating = !0;
|
|
2059
2059
|
}
|
|
2060
2060
|
function q() {
|
|
2061
2061
|
s.animating = !1;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2064
|
-
return t.anchor ?
|
|
2063
|
+
function I() {
|
|
2064
|
+
return t.anchor ? Aa(t.anchor) : null;
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2067
|
-
t.persistent &&
|
|
2066
|
+
function U(k) {
|
|
2067
|
+
t.persistent && k.preventDefault();
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2070
|
-
var
|
|
2069
|
+
function R(k) {
|
|
2070
|
+
var ce;
|
|
2071
2071
|
if (t.persistent) {
|
|
2072
|
-
|
|
2072
|
+
k.preventDefault();
|
|
2073
2073
|
return;
|
|
2074
2074
|
}
|
|
2075
|
-
let
|
|
2076
|
-
|
|
2077
|
-
const
|
|
2078
|
-
if ((
|
|
2079
|
-
|
|
2075
|
+
let oe = !1;
|
|
2076
|
+
k.defaultPrevented || k.detail.originalEvent.type === "pointerdown" && (oe = !0);
|
|
2077
|
+
const ue = k.detail.originalEvent.target;
|
|
2078
|
+
if ((ce = I()) != null && ce.contains(ue)) {
|
|
2079
|
+
k.preventDefault();
|
|
2080
2080
|
return;
|
|
2081
2081
|
}
|
|
2082
|
-
|
|
2082
|
+
k.detail.originalEvent.type === "focusin" && oe && k.preventDefault();
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2085
|
-
|
|
2084
|
+
function H() {
|
|
2085
|
+
P();
|
|
2086
2086
|
}
|
|
2087
2087
|
let h;
|
|
2088
|
-
function
|
|
2089
|
-
const
|
|
2090
|
-
if (
|
|
2091
|
-
switch (h = new MutationObserver(
|
|
2088
|
+
function x() {
|
|
2089
|
+
const k = I();
|
|
2090
|
+
if (k)
|
|
2091
|
+
switch (h = new MutationObserver(z), h.observe(k, {
|
|
2092
2092
|
attributes: !1,
|
|
2093
2093
|
childList: !0,
|
|
2094
2094
|
characterData: !0,
|
|
2095
2095
|
subtree: !0
|
|
2096
2096
|
}), t.trigger) {
|
|
2097
2097
|
case "click":
|
|
2098
|
-
|
|
2098
|
+
k.addEventListener("click", Q);
|
|
2099
2099
|
break;
|
|
2100
2100
|
case "hover":
|
|
2101
|
-
|
|
2101
|
+
k.addEventListener("mouseenter", Z), k.addEventListener("mouseleave", P), k.addEventListener("focusin", Q), k.addEventListener("focusout", P);
|
|
2102
2102
|
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2106
|
-
const
|
|
2107
|
-
if (
|
|
2105
|
+
function N() {
|
|
2106
|
+
const k = I();
|
|
2107
|
+
if (k)
|
|
2108
2108
|
switch (h == null || h.disconnect(), t.trigger) {
|
|
2109
2109
|
case "click":
|
|
2110
|
-
|
|
2110
|
+
k.removeEventListener("click", Q);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "hover":
|
|
2113
|
-
|
|
2113
|
+
k.removeEventListener("mouseenter", Z), k.removeEventListener("mouseleave", P), k.removeEventListener("focusin", Q), k.removeEventListener("focusout", P);
|
|
2114
2114
|
break;
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
2117
|
function F() {
|
|
2118
|
-
window.addEventListener("resize",
|
|
2118
|
+
window.addEventListener("resize", z), t.scrollLock || window.addEventListener("scroll", z);
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2121
|
-
window.removeEventListener("resize",
|
|
2120
|
+
function J() {
|
|
2121
|
+
window.removeEventListener("resize", z), t.scrollLock || window.removeEventListener("scroll", z);
|
|
2122
2122
|
}
|
|
2123
|
-
let
|
|
2124
|
-
function
|
|
2125
|
-
|
|
2123
|
+
let se;
|
|
2124
|
+
function fe() {
|
|
2125
|
+
I() ? (z(), se = window.setTimeout(fe, 100)) : P();
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2128
|
-
var
|
|
2129
|
-
l.value || (F(), t.spy ?
|
|
2127
|
+
function ie() {
|
|
2128
|
+
var k;
|
|
2129
|
+
l.value || (F(), t.spy ? fe() : z()), (l.value || t.trigger === "click") && ((k = E.value) == null || k.focus());
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2132
|
-
l.value ||
|
|
2131
|
+
function ze() {
|
|
2132
|
+
l.value || J(), t.spy && (clearTimeout(se), se = void 0);
|
|
2133
2133
|
}
|
|
2134
|
-
return
|
|
2135
|
-
|
|
2136
|
-
}),
|
|
2137
|
-
|
|
2134
|
+
return Ce(() => {
|
|
2135
|
+
xe(x);
|
|
2136
|
+
}), an(N), (k, ce) => (y(), A(
|
|
2137
|
+
pe,
|
|
2138
2138
|
null,
|
|
2139
2139
|
[
|
|
2140
|
-
(y(),
|
|
2140
|
+
(y(), V(rn, {
|
|
2141
2141
|
disabled: !p.value,
|
|
2142
2142
|
to: t.attach
|
|
2143
2143
|
}, [
|
|
2144
|
-
|
|
2144
|
+
S(dt, {
|
|
2145
2145
|
name: "fade",
|
|
2146
2146
|
appear: ""
|
|
2147
2147
|
}, {
|
|
2148
|
-
default:
|
|
2149
|
-
u.value ? (y(),
|
|
2148
|
+
default: C(() => [
|
|
2149
|
+
u.value ? (y(), A(
|
|
2150
2150
|
"div",
|
|
2151
2151
|
{
|
|
2152
2152
|
key: 0,
|
|
2153
|
-
class:
|
|
2153
|
+
class: W([
|
|
2154
2154
|
t.backdropClass,
|
|
2155
2155
|
"q-overlay__underlay",
|
|
2156
2156
|
{ "q-overlay__underlay--blur": t.backdropBlur }
|
|
@@ -2159,49 +2159,49 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2159
2159
|
null,
|
|
2160
2160
|
2
|
|
2161
2161
|
/* CLASS */
|
|
2162
|
-
)) :
|
|
2162
|
+
)) : G("v-if", !0)
|
|
2163
2163
|
]),
|
|
2164
2164
|
_: 1
|
|
2165
2165
|
/* STABLE */
|
|
2166
2166
|
}),
|
|
2167
|
-
|
|
2167
|
+
S(dt, {
|
|
2168
2168
|
name: t.transition,
|
|
2169
2169
|
appear: "",
|
|
2170
|
-
onEnter:
|
|
2171
|
-
onAfterEnter:
|
|
2170
|
+
onEnter: te,
|
|
2171
|
+
onAfterEnter: ne,
|
|
2172
2172
|
onLeave: d,
|
|
2173
|
-
onAfterLeave:
|
|
2173
|
+
onAfterLeave: v
|
|
2174
2174
|
}, {
|
|
2175
|
-
default:
|
|
2176
|
-
r.value ? (y(),
|
|
2175
|
+
default: C(() => [
|
|
2176
|
+
r.value ? (y(), A("div", {
|
|
2177
2177
|
key: 0,
|
|
2178
2178
|
id: t.id,
|
|
2179
2179
|
ref_key: "overlayContainerRef",
|
|
2180
|
-
ref:
|
|
2180
|
+
ref: Y,
|
|
2181
2181
|
tabindex: "-1",
|
|
2182
|
-
class:
|
|
2183
|
-
style:
|
|
2182
|
+
class: W(i.value),
|
|
2183
|
+
style: _e(g.value)
|
|
2184
2184
|
}, [
|
|
2185
|
-
|
|
2186
|
-
onDismiss:
|
|
2187
|
-
onInteractOutside:
|
|
2188
|
-
onPointerDownOutside:
|
|
2185
|
+
S(f(vo), {
|
|
2186
|
+
onDismiss: H,
|
|
2187
|
+
onInteractOutside: R,
|
|
2188
|
+
onPointerDownOutside: U
|
|
2189
2189
|
}, {
|
|
2190
|
-
default:
|
|
2191
|
-
|
|
2190
|
+
default: C(() => [
|
|
2191
|
+
Y.value ? (y(), V(f(na), {
|
|
2192
2192
|
key: 0,
|
|
2193
2193
|
disabled: t.nonModal || !r.value,
|
|
2194
|
-
options: { fallbackFocus:
|
|
2194
|
+
options: { fallbackFocus: Y.value }
|
|
2195
2195
|
}, {
|
|
2196
|
-
default:
|
|
2197
|
-
|
|
2196
|
+
default: C(() => [
|
|
2197
|
+
L("div", de({
|
|
2198
2198
|
ref_key: "overlayRef",
|
|
2199
|
-
ref:
|
|
2199
|
+
ref: E,
|
|
2200
2200
|
class: "q-overlay__content",
|
|
2201
2201
|
tabindex: "-1",
|
|
2202
2202
|
role: u.value ? "dialog" : void 0
|
|
2203
|
-
},
|
|
2204
|
-
t.arrow ? (y(),
|
|
2203
|
+
}, k.$attrs), [
|
|
2204
|
+
t.arrow ? (y(), A(
|
|
2205
2205
|
"div",
|
|
2206
2206
|
{
|
|
2207
2207
|
key: 0,
|
|
@@ -2209,35 +2209,35 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2209
2209
|
ref: _,
|
|
2210
2210
|
role: "presentation",
|
|
2211
2211
|
class: "q-overlay__arrow",
|
|
2212
|
-
style:
|
|
2212
|
+
style: _e(b.value)
|
|
2213
2213
|
},
|
|
2214
2214
|
null,
|
|
2215
2215
|
4
|
|
2216
2216
|
/* STYLE */
|
|
2217
|
-
)) :
|
|
2218
|
-
|
|
2219
|
-
], 16,
|
|
2217
|
+
)) : G("v-if", !0),
|
|
2218
|
+
M(k.$slots, "default")
|
|
2219
|
+
], 16, Ia)
|
|
2220
2220
|
]),
|
|
2221
2221
|
_: 3
|
|
2222
2222
|
/* FORWARDED */
|
|
2223
|
-
}, 8, ["disabled", "options"])) :
|
|
2223
|
+
}, 8, ["disabled", "options"])) : G("v-if", !0)
|
|
2224
2224
|
]),
|
|
2225
2225
|
_: 3
|
|
2226
2226
|
/* FORWARDED */
|
|
2227
2227
|
})
|
|
2228
|
-
], 14,
|
|
2228
|
+
], 14, xa)) : G("v-if", !0)
|
|
2229
2229
|
]),
|
|
2230
2230
|
_: 3
|
|
2231
2231
|
/* FORWARDED */
|
|
2232
2232
|
}, 8, ["name"])
|
|
2233
2233
|
], 8, ["disabled", "to"])),
|
|
2234
|
-
c.value ? (y(),
|
|
2234
|
+
c.value ? (y(), V(f(fa), { key: 0 })) : G("v-if", !0)
|
|
2235
2235
|
],
|
|
2236
2236
|
64
|
|
2237
2237
|
/* STABLE_FRAGMENT */
|
|
2238
2238
|
));
|
|
2239
2239
|
}
|
|
2240
|
-
}),
|
|
2240
|
+
}), Da = K(Sa), Ea = [
|
|
2241
2241
|
{
|
|
2242
2242
|
id: "button",
|
|
2243
2243
|
icon: {
|
|
@@ -2248,48 +2248,48 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2248
2248
|
label: "Ok"
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
|
-
],
|
|
2251
|
+
], Ca = {
|
|
2252
2252
|
icon: "check-circle-outline"
|
|
2253
|
-
},
|
|
2253
|
+
}, Ba = {
|
|
2254
2254
|
close: {
|
|
2255
2255
|
icon: "close"
|
|
2256
2256
|
}
|
|
2257
|
-
},
|
|
2257
|
+
}, Ra = {
|
|
2258
2258
|
key: 0,
|
|
2259
2259
|
class: "q-dialog__header"
|
|
2260
|
-
},
|
|
2260
|
+
}, La = {
|
|
2261
2261
|
key: 0,
|
|
2262
2262
|
class: "q-dialog__header-title"
|
|
2263
|
-
},
|
|
2263
|
+
}, qa = {
|
|
2264
2264
|
key: 1,
|
|
2265
2265
|
class: "q-dialog__body"
|
|
2266
|
-
},
|
|
2266
|
+
}, Ma = {
|
|
2267
2267
|
key: 0,
|
|
2268
2268
|
class: "q-dialog__body-icon"
|
|
2269
|
-
},
|
|
2269
|
+
}, Na = { class: "q-dialog__body-text" }, Ta = ["innerHTML"], Fa = { key: 1 }, Oa = {
|
|
2270
2270
|
key: 0,
|
|
2271
2271
|
class: "q-dialog__input"
|
|
2272
|
-
},
|
|
2272
|
+
}, Ua = {
|
|
2273
2273
|
key: 2,
|
|
2274
2274
|
class: "q-dialog__footer"
|
|
2275
|
-
},
|
|
2275
|
+
}, Pa = {
|
|
2276
2276
|
key: 0,
|
|
2277
2277
|
class: "q-dialog__footer-buttons"
|
|
2278
|
-
},
|
|
2278
|
+
}, Ga = /* @__PURE__ */ O({
|
|
2279
2279
|
__name: "QDialog",
|
|
2280
|
-
props: /* @__PURE__ */
|
|
2280
|
+
props: /* @__PURE__ */ ve({
|
|
2281
2281
|
id: {},
|
|
2282
2282
|
class: {},
|
|
2283
2283
|
title: {},
|
|
2284
2284
|
text: {},
|
|
2285
|
-
icon: { default: () =>
|
|
2286
|
-
buttons: { default: () =>
|
|
2285
|
+
icon: { default: () => Ca },
|
|
2286
|
+
buttons: { default: () => Ea },
|
|
2287
2287
|
attach: { default: "body" },
|
|
2288
2288
|
inline: { type: Boolean },
|
|
2289
2289
|
backdropBlur: { type: Boolean, default: !0 },
|
|
2290
2290
|
dismissible: { type: Boolean },
|
|
2291
2291
|
html: { type: Boolean, default: !0 },
|
|
2292
|
-
icons: { default: () =>
|
|
2292
|
+
icons: { default: () => Ba },
|
|
2293
2293
|
size: { default: "small" },
|
|
2294
2294
|
centerVertically: { type: Boolean },
|
|
2295
2295
|
input: {}
|
|
@@ -2297,31 +2297,31 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2297
2297
|
modelValue: { type: Boolean },
|
|
2298
2298
|
modelModifiers: {}
|
|
2299
2299
|
}),
|
|
2300
|
-
emits: /* @__PURE__ */
|
|
2300
|
+
emits: /* @__PURE__ */ ve(["enter", "leave"], ["update:modelValue"]),
|
|
2301
2301
|
setup(e, { emit: n }) {
|
|
2302
|
-
const t = e, o = n, r =
|
|
2302
|
+
const t = e, o = n, r = Ee(e, "modelValue"), a = T(""), i = T(""), l = w(() => ["q-dialog", t.class]), u = w(() => `q-overlay--${t.size}`);
|
|
2303
2303
|
function c() {
|
|
2304
2304
|
r.value = !1;
|
|
2305
2305
|
}
|
|
2306
|
-
function p(
|
|
2307
|
-
var
|
|
2308
|
-
if (
|
|
2309
|
-
if ((
|
|
2306
|
+
function p(g) {
|
|
2307
|
+
var b, _;
|
|
2308
|
+
if (g.action) {
|
|
2309
|
+
if ((b = t.input) != null && b.validator && (i.value = t.input.validator(f(a)), f(i)))
|
|
2310
2310
|
return;
|
|
2311
|
-
(_ =
|
|
2311
|
+
(_ = g.action) == null || _.call(g, f(a));
|
|
2312
2312
|
}
|
|
2313
2313
|
c();
|
|
2314
2314
|
}
|
|
2315
2315
|
function s() {
|
|
2316
2316
|
o("enter");
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function m() {
|
|
2319
2319
|
o("leave");
|
|
2320
2320
|
}
|
|
2321
|
-
return (
|
|
2321
|
+
return (g, b) => (y(), V(f(Da), {
|
|
2322
2322
|
id: t.id,
|
|
2323
2323
|
modelValue: r.value,
|
|
2324
|
-
"onUpdate:modelValue":
|
|
2324
|
+
"onUpdate:modelValue": b[1] || (b[1] = (_) => r.value = _),
|
|
2325
2325
|
"backdrop-class": "q-dialog__underlay",
|
|
2326
2326
|
"scroll-lock": "",
|
|
2327
2327
|
persistent: "",
|
|
@@ -2329,72 +2329,72 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2329
2329
|
attach: t.attach,
|
|
2330
2330
|
"backdrop-blur": t.backdropBlur,
|
|
2331
2331
|
"center-vertically": t.centerVertically,
|
|
2332
|
-
class:
|
|
2332
|
+
class: W(u.value),
|
|
2333
2333
|
onEnter: s,
|
|
2334
|
-
onLeave:
|
|
2334
|
+
onLeave: m
|
|
2335
2335
|
}, {
|
|
2336
|
-
default:
|
|
2337
|
-
|
|
2336
|
+
default: C(() => [
|
|
2337
|
+
L(
|
|
2338
2338
|
"div",
|
|
2339
2339
|
{
|
|
2340
|
-
class:
|
|
2340
|
+
class: W(l.value)
|
|
2341
2341
|
},
|
|
2342
2342
|
[
|
|
2343
|
-
t.title ||
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
t.title ? (y(),
|
|
2343
|
+
t.title || g.$slots.header || g.$slots["header.prepend"] || g.$slots["header.append"] ? (y(), A("div", Ra, [
|
|
2344
|
+
M(g.$slots, "header", {}, () => [
|
|
2345
|
+
M(g.$slots, "header.prepend"),
|
|
2346
|
+
t.title ? (y(), A(
|
|
2347
2347
|
"span",
|
|
2348
|
-
|
|
2349
|
-
|
|
2348
|
+
La,
|
|
2349
|
+
ae(t.title),
|
|
2350
2350
|
1
|
|
2351
2351
|
/* TEXT */
|
|
2352
|
-
)) :
|
|
2353
|
-
|
|
2352
|
+
)) : G("v-if", !0),
|
|
2353
|
+
M(g.$slots, "header.append")
|
|
2354
2354
|
])
|
|
2355
|
-
])) :
|
|
2356
|
-
t.icon || t.text ||
|
|
2357
|
-
|
|
2355
|
+
])) : G("v-if", !0),
|
|
2356
|
+
t.icon || t.text || g.$slots.body ? (y(), A("div", qa, [
|
|
2357
|
+
M(g.$slots, "body", {}, () => {
|
|
2358
2358
|
var _;
|
|
2359
2359
|
return [
|
|
2360
|
-
|
|
2361
|
-
t.icon ? (y(),
|
|
2362
|
-
|
|
2363
|
-
f(
|
|
2364
|
-
|
|
2360
|
+
M(g.$slots, "body.icon", {}, () => [
|
|
2361
|
+
t.icon ? (y(), A("span", Ma, [
|
|
2362
|
+
S(
|
|
2363
|
+
f(X),
|
|
2364
|
+
De(Te(t.icon)),
|
|
2365
2365
|
null,
|
|
2366
2366
|
16
|
|
2367
2367
|
/* FULL_PROPS */
|
|
2368
2368
|
)
|
|
2369
|
-
])) :
|
|
2369
|
+
])) : G("v-if", !0)
|
|
2370
2370
|
]),
|
|
2371
|
-
|
|
2372
|
-
t.html ? (y(),
|
|
2371
|
+
L("div", Na, [
|
|
2372
|
+
t.html ? (y(), A("div", {
|
|
2373
2373
|
key: 0,
|
|
2374
2374
|
innerHTML: t.text
|
|
2375
|
-
}, null, 8,
|
|
2375
|
+
}, null, 8, Ta)) : (y(), A(
|
|
2376
2376
|
"div",
|
|
2377
|
-
|
|
2378
|
-
|
|
2377
|
+
Fa,
|
|
2378
|
+
ae(t.text),
|
|
2379
2379
|
1
|
|
2380
2380
|
/* TEXT */
|
|
2381
2381
|
))
|
|
2382
2382
|
]),
|
|
2383
|
-
t.input ? (y(),
|
|
2384
|
-
|
|
2383
|
+
t.input ? (y(), A("div", Oa, [
|
|
2384
|
+
S(f(Ot), {
|
|
2385
2385
|
modelValue: a.value,
|
|
2386
|
-
"onUpdate:modelValue":
|
|
2386
|
+
"onUpdate:modelValue": b[0] || (b[0] = (E) => a.value = E),
|
|
2387
2387
|
invalid: !!i.value,
|
|
2388
2388
|
placeholder: (_ = t.input) == null ? void 0 : _.placeholder,
|
|
2389
2389
|
size: "block"
|
|
2390
2390
|
}, {
|
|
2391
|
-
extras:
|
|
2392
|
-
i.value ? (y(),
|
|
2391
|
+
extras: C(() => [
|
|
2392
|
+
i.value ? (y(), V(f(X), {
|
|
2393
2393
|
key: 0,
|
|
2394
2394
|
icon: "exclamation-sign"
|
|
2395
|
-
})) :
|
|
2396
|
-
|
|
2397
|
-
" " +
|
|
2395
|
+
})) : G("v-if", !0),
|
|
2396
|
+
je(
|
|
2397
|
+
" " + ae(i.value),
|
|
2398
2398
|
1
|
|
2399
2399
|
/* TEXT */
|
|
2400
2400
|
)
|
|
@@ -2402,31 +2402,31 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2402
2402
|
_: 1
|
|
2403
2403
|
/* STABLE */
|
|
2404
2404
|
}, 8, ["modelValue", "invalid", "placeholder"])
|
|
2405
|
-
])) :
|
|
2406
|
-
|
|
2405
|
+
])) : G("v-if", !0),
|
|
2406
|
+
M(g.$slots, "body.append")
|
|
2407
2407
|
];
|
|
2408
2408
|
})
|
|
2409
|
-
])) :
|
|
2410
|
-
t.buttons ||
|
|
2411
|
-
t.buttons ? (y(),
|
|
2412
|
-
(y(!0),
|
|
2413
|
-
|
|
2409
|
+
])) : G("v-if", !0),
|
|
2410
|
+
t.buttons || g.$slots["footer.append"] ? (y(), A("div", Ua, [
|
|
2411
|
+
t.buttons ? (y(), A("span", Pa, [
|
|
2412
|
+
(y(!0), A(
|
|
2413
|
+
pe,
|
|
2414
2414
|
null,
|
|
2415
|
-
|
|
2415
|
+
Be(t.buttons, (_) => (y(), V(f(re), de({ ref_for: !0 }, _.props, {
|
|
2416
2416
|
key: _.id,
|
|
2417
2417
|
onClick: () => p(_)
|
|
2418
2418
|
}), {
|
|
2419
|
-
default:
|
|
2420
|
-
_.icon ? (y(),
|
|
2421
|
-
f(
|
|
2422
|
-
|
|
2419
|
+
default: C(() => [
|
|
2420
|
+
_.icon ? (y(), V(
|
|
2421
|
+
f(X),
|
|
2422
|
+
de({
|
|
2423
2423
|
key: 0,
|
|
2424
2424
|
ref_for: !0
|
|
2425
2425
|
}, _.icon),
|
|
2426
2426
|
null,
|
|
2427
2427
|
16
|
|
2428
2428
|
/* FULL_PROPS */
|
|
2429
|
-
)) :
|
|
2429
|
+
)) : G("v-if", !0)
|
|
2430
2430
|
]),
|
|
2431
2431
|
_: 2
|
|
2432
2432
|
/* DYNAMIC */
|
|
@@ -2434,19 +2434,19 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2434
2434
|
128
|
|
2435
2435
|
/* KEYED_FRAGMENT */
|
|
2436
2436
|
))
|
|
2437
|
-
])) :
|
|
2438
|
-
|
|
2439
|
-
])) :
|
|
2440
|
-
t.dismissible ? (y(),
|
|
2437
|
+
])) : G("v-if", !0),
|
|
2438
|
+
M(g.$slots, "footer.append")
|
|
2439
|
+
])) : G("v-if", !0),
|
|
2440
|
+
t.dismissible ? (y(), V(f(re), {
|
|
2441
2441
|
key: 3,
|
|
2442
2442
|
class: "q-dialog__close",
|
|
2443
2443
|
variant: "text",
|
|
2444
2444
|
onClick: c
|
|
2445
2445
|
}, {
|
|
2446
|
-
default:
|
|
2447
|
-
|
|
2448
|
-
f(
|
|
2449
|
-
|
|
2446
|
+
default: C(() => [
|
|
2447
|
+
S(
|
|
2448
|
+
f(X),
|
|
2449
|
+
De(Te(t.icons.close)),
|
|
2450
2450
|
null,
|
|
2451
2451
|
16
|
|
2452
2452
|
/* FULL_PROPS */
|
|
@@ -2454,7 +2454,7 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2454
2454
|
]),
|
|
2455
2455
|
_: 1
|
|
2456
2456
|
/* STABLE */
|
|
2457
|
-
})) :
|
|
2457
|
+
})) : G("v-if", !0)
|
|
2458
2458
|
],
|
|
2459
2459
|
2
|
|
2460
2460
|
/* CLASS */
|
|
@@ -2464,23 +2464,23 @@ const $a = ["id"], Aa = ["role"], xa = /* @__PURE__ */ T({
|
|
|
2464
2464
|
/* FORWARDED */
|
|
2465
2465
|
}, 8, ["id", "modelValue", "inline", "attach", "backdrop-blur", "center-vertically", "class"]));
|
|
2466
2466
|
}
|
|
2467
|
-
}),
|
|
2468
|
-
function
|
|
2467
|
+
}), Le = Ke({ dialogs: [] });
|
|
2468
|
+
function ja() {
|
|
2469
2469
|
function e(t, o, r) {
|
|
2470
|
-
const a =
|
|
2471
|
-
return
|
|
2470
|
+
const a = st(o);
|
|
2471
|
+
return Le.dialogs.push({ id: a, props: t, options: r }), a;
|
|
2472
2472
|
}
|
|
2473
2473
|
function n(t) {
|
|
2474
|
-
const o =
|
|
2475
|
-
o !== -1 &&
|
|
2474
|
+
const o = Le.dialogs.findIndex((r) => r.id === t);
|
|
2475
|
+
o !== -1 && Le.dialogs.splice(o, 1);
|
|
2476
2476
|
}
|
|
2477
2477
|
return {
|
|
2478
|
-
...
|
|
2478
|
+
...Le,
|
|
2479
2479
|
addDialog: e,
|
|
2480
2480
|
removeDialog: n
|
|
2481
2481
|
};
|
|
2482
2482
|
}
|
|
2483
|
-
const
|
|
2483
|
+
const za = /* @__PURE__ */ O({
|
|
2484
2484
|
inheritAttrs: !1,
|
|
2485
2485
|
__name: "QDialogProvider",
|
|
2486
2486
|
props: {
|
|
@@ -2488,14 +2488,14 @@ const Ga = /* @__PURE__ */ T({
|
|
|
2488
2488
|
},
|
|
2489
2489
|
emits: ["leave"],
|
|
2490
2490
|
setup(e, { emit: n }) {
|
|
2491
|
-
const t = e, o = n, { dialogs: r, removeDialog: a } =
|
|
2491
|
+
const t = e, o = n, { dialogs: r, removeDialog: a } = ja();
|
|
2492
2492
|
function i(l) {
|
|
2493
2493
|
a(l), o("leave", l);
|
|
2494
2494
|
}
|
|
2495
|
-
return (l, u) => (y(!0),
|
|
2496
|
-
|
|
2495
|
+
return (l, u) => (y(!0), A(
|
|
2496
|
+
pe,
|
|
2497
2497
|
null,
|
|
2498
|
-
|
|
2498
|
+
Be(f(r), (c) => (y(), V(f(Ht), de({
|
|
2499
2499
|
key: c.id,
|
|
2500
2500
|
ref_for: !0
|
|
2501
2501
|
}, c.props, {
|
|
@@ -2507,12 +2507,12 @@ const Ga = /* @__PURE__ */ T({
|
|
|
2507
2507
|
/* KEYED_FRAGMENT */
|
|
2508
2508
|
));
|
|
2509
2509
|
}
|
|
2510
|
-
}),
|
|
2511
|
-
|
|
2512
|
-
const
|
|
2510
|
+
}), Ht = K(Ga);
|
|
2511
|
+
K(za);
|
|
2512
|
+
const Va = ["id", "required", "placeholder", "readonly", "disabled", "maxlength", "rows", "cols", "resize", "wrap"], Ha = /* @__PURE__ */ O({
|
|
2513
2513
|
inheritAttrs: !1,
|
|
2514
2514
|
__name: "QTextArea",
|
|
2515
|
-
props: /* @__PURE__ */
|
|
2515
|
+
props: /* @__PURE__ */ ve({
|
|
2516
2516
|
id: {},
|
|
2517
2517
|
class: {},
|
|
2518
2518
|
label: {},
|
|
@@ -2535,37 +2535,37 @@ const ja = ["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 = Ee(e, "modelValue"), o = w({
|
|
2539
2539
|
get: () => t.value,
|
|
2540
2540
|
set: (c) => {
|
|
2541
2541
|
const p = n.maxLength;
|
|
2542
2542
|
t.value = p ? c == null ? void 0 : c.slice(0, p) : c;
|
|
2543
2543
|
}
|
|
2544
2544
|
});
|
|
2545
|
-
|
|
2546
|
-
const r =
|
|
2545
|
+
le(t, (c) => o.value = c, { immediate: !0 });
|
|
2546
|
+
const r = st(n.id), a = w(
|
|
2547
2547
|
() => n.readonly || n.disabled ? void 0 : n.placeholder
|
|
2548
|
-
), i = w(() => ({ input: n.autosize ? u : null })), l =
|
|
2548
|
+
), i = w(() => ({ input: n.autosize ? u : null })), l = T(), { triggerResize: u } = ko({
|
|
2549
2549
|
element: w(() => n.autosize ? l.value : void 0),
|
|
2550
2550
|
styleProp: "minHeight"
|
|
2551
2551
|
});
|
|
2552
|
-
return (c, p) => (y(),
|
|
2553
|
-
class:
|
|
2552
|
+
return (c, p) => (y(), V(f(Ft), {
|
|
2553
|
+
class: W(["q-text-area", n.class]),
|
|
2554
2554
|
for: f(r),
|
|
2555
2555
|
label: n.label,
|
|
2556
2556
|
size: n.size,
|
|
2557
2557
|
readonly: n.readonly,
|
|
2558
2558
|
disabled: n.disabled,
|
|
2559
2559
|
required: n.required
|
|
2560
|
-
},
|
|
2561
|
-
"label.prepend":
|
|
2562
|
-
|
|
2560
|
+
}, It({
|
|
2561
|
+
"label.prepend": C(() => [
|
|
2562
|
+
M(c.$slots, "label.prepend")
|
|
2563
2563
|
]),
|
|
2564
|
-
"label.append":
|
|
2565
|
-
|
|
2564
|
+
"label.append": C(() => [
|
|
2565
|
+
M(c.$slots, "label.append")
|
|
2566
2566
|
]),
|
|
2567
|
-
default:
|
|
2568
|
-
|
|
2567
|
+
default: C(() => [
|
|
2568
|
+
St(L("textarea", de({
|
|
2569
2569
|
id: f(r),
|
|
2570
2570
|
ref_key: "textareaRef",
|
|
2571
2571
|
ref: l,
|
|
@@ -2580,8 +2580,8 @@ const ja = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2580
2580
|
cols: n.cols,
|
|
2581
2581
|
resize: n.resize,
|
|
2582
2582
|
wrap: n.wrap
|
|
2583
|
-
}, c.$attrs,
|
|
2584
|
-
[
|
|
2583
|
+
}, c.$attrs, ln(i.value, !0)), null, 16, Va), [
|
|
2584
|
+
[sn, o.value]
|
|
2585
2585
|
])
|
|
2586
2586
|
]),
|
|
2587
2587
|
_: 2
|
|
@@ -2589,29 +2589,29 @@ const ja = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
|
|
|
2589
2589
|
}, [
|
|
2590
2590
|
c.$slots.prepend ? {
|
|
2591
2591
|
name: "prepend",
|
|
2592
|
-
fn:
|
|
2593
|
-
|
|
2592
|
+
fn: C(() => [
|
|
2593
|
+
M(c.$slots, "prepend")
|
|
2594
2594
|
]),
|
|
2595
2595
|
key: "0"
|
|
2596
2596
|
} : void 0,
|
|
2597
2597
|
c.$slots.append ? {
|
|
2598
2598
|
name: "append",
|
|
2599
|
-
fn:
|
|
2600
|
-
|
|
2599
|
+
fn: C(() => [
|
|
2600
|
+
M(c.$slots, "append")
|
|
2601
2601
|
]),
|
|
2602
2602
|
key: "1"
|
|
2603
2603
|
} : void 0,
|
|
2604
2604
|
c.$slots.extras ? {
|
|
2605
2605
|
name: "extras",
|
|
2606
|
-
fn:
|
|
2607
|
-
|
|
2606
|
+
fn: C(() => [
|
|
2607
|
+
M(c.$slots, "extras")
|
|
2608
2608
|
]),
|
|
2609
2609
|
key: "2"
|
|
2610
2610
|
} : void 0
|
|
2611
2611
|
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
|
|
2612
2612
|
}
|
|
2613
|
-
}),
|
|
2614
|
-
function
|
|
2613
|
+
}), Za = K(Ha);
|
|
2614
|
+
function he() {
|
|
2615
2615
|
return {
|
|
2616
2616
|
copy: "Copy",
|
|
2617
2617
|
apply: "Apply",
|
|
@@ -2642,9 +2642,9 @@ function me() {
|
|
|
2642
2642
|
fileUpload: "Upload File"
|
|
2643
2643
|
};
|
|
2644
2644
|
}
|
|
2645
|
-
async function
|
|
2646
|
-
var
|
|
2647
|
-
const t = new AbortController(), o = t.signal, a = (await
|
|
2645
|
+
async function kt(e, n) {
|
|
2646
|
+
var c, p, s, m, g, b, _;
|
|
2647
|
+
const t = new AbortController(), o = t.signal, a = (await Ct({
|
|
2648
2648
|
...e,
|
|
2649
2649
|
headers: {
|
|
2650
2650
|
Accept: "text/event-stream"
|
|
@@ -2656,53 +2656,63 @@ async function yt(e, n) {
|
|
|
2656
2656
|
if (!a || !(a instanceof ReadableStream))
|
|
2657
2657
|
throw new Error("Invalid stream response");
|
|
2658
2658
|
const i = a.getReader(), l = new TextDecoder();
|
|
2659
|
+
let u = "";
|
|
2659
2660
|
for (; ; ) {
|
|
2660
|
-
const { done:
|
|
2661
|
-
if (
|
|
2662
|
-
(
|
|
2661
|
+
const { done: E, value: Y } = await i.read();
|
|
2662
|
+
if (E) {
|
|
2663
|
+
(c = n.onDone) == null || c.call(n);
|
|
2663
2664
|
break;
|
|
2664
2665
|
}
|
|
2665
|
-
const
|
|
2666
|
-
|
|
2667
|
-
|
|
2666
|
+
const z = l.decode(Y, { stream: !0 });
|
|
2667
|
+
u += z;
|
|
2668
|
+
const j = u.split(/\n\n+/);
|
|
2669
|
+
u = j.pop() || "";
|
|
2670
|
+
for (const Q of j) {
|
|
2671
|
+
const Z = Q.trim().split(`
|
|
2668
2672
|
`);
|
|
2669
|
-
let
|
|
2670
|
-
for (const
|
|
2671
|
-
|
|
2672
|
-
if (
|
|
2673
|
+
let B = "", P = "";
|
|
2674
|
+
for (const D of Z)
|
|
2675
|
+
D.startsWith("event:") ? B = D.replace("event:", "").trim() : D.startsWith("data:") && (P = D.replace("data:", "").trim());
|
|
2676
|
+
if (B || (B = "message"), !!P)
|
|
2673
2677
|
try {
|
|
2674
|
-
const
|
|
2675
|
-
switch (
|
|
2678
|
+
const D = JSON.parse(P);
|
|
2679
|
+
switch (B) {
|
|
2676
2680
|
case "message":
|
|
2677
|
-
(
|
|
2681
|
+
(p = n.onMessage) == null || p.call(n, D.value);
|
|
2682
|
+
break;
|
|
2683
|
+
case "tool-status":
|
|
2684
|
+
(s = n.onToolStatus) == null || s.call(
|
|
2685
|
+
n,
|
|
2686
|
+
D
|
|
2687
|
+
);
|
|
2678
2688
|
break;
|
|
2679
2689
|
case "error":
|
|
2680
|
-
(
|
|
2690
|
+
(m = n.onError) == null || m.call(n, new Error(D.value));
|
|
2681
2691
|
break;
|
|
2682
2692
|
case "field_metadata":
|
|
2683
|
-
(
|
|
2693
|
+
(g = n.onFieldMetadata) == null || g.call(n, D);
|
|
2684
2694
|
break;
|
|
2685
2695
|
case "done":
|
|
2686
|
-
(
|
|
2696
|
+
(b = n.onDone) == null || b.call(n);
|
|
2687
2697
|
break;
|
|
2688
2698
|
default:
|
|
2689
|
-
console.warn(`Unknown event type: ${
|
|
2699
|
+
console.warn(`Unknown event type: ${B}`);
|
|
2690
2700
|
}
|
|
2691
|
-
} catch (
|
|
2692
|
-
(
|
|
2701
|
+
} catch (D) {
|
|
2702
|
+
(_ = n.onError) == null || _.call(n, D), console.error("Error processing event:", D);
|
|
2693
2703
|
continue;
|
|
2694
2704
|
} finally {
|
|
2695
|
-
|
|
2705
|
+
E && (i.releaseLock(), t.abort());
|
|
2696
2706
|
}
|
|
2697
2707
|
}
|
|
2698
2708
|
}
|
|
2699
2709
|
}
|
|
2700
|
-
function
|
|
2701
|
-
const n =
|
|
2710
|
+
function Zt(e) {
|
|
2711
|
+
const n = T(!1), t = T(null);
|
|
2702
2712
|
async function o(c) {
|
|
2703
2713
|
n.value = !0, t.value = null;
|
|
2704
2714
|
try {
|
|
2705
|
-
return { data: (await
|
|
2715
|
+
return { data: (await Ct({
|
|
2706
2716
|
...c,
|
|
2707
2717
|
baseURL: e
|
|
2708
2718
|
})).data, error: null };
|
|
@@ -2714,7 +2724,7 @@ function zt(e) {
|
|
|
2714
2724
|
}
|
|
2715
2725
|
return { data: null, error: new Error("Unknown error occurred in baseRequest") };
|
|
2716
2726
|
}
|
|
2717
|
-
async function r(c, p, s,
|
|
2727
|
+
async function r(c, p, s, m) {
|
|
2718
2728
|
return await o({
|
|
2719
2729
|
method: "POST",
|
|
2720
2730
|
url: "/prompt/load",
|
|
@@ -2722,34 +2732,37 @@ function zt(e) {
|
|
|
2722
2732
|
username: c,
|
|
2723
2733
|
project: p,
|
|
2724
2734
|
agentID: s,
|
|
2725
|
-
formId:
|
|
2735
|
+
formId: m
|
|
2726
2736
|
}
|
|
2727
2737
|
});
|
|
2728
2738
|
}
|
|
2729
|
-
async function a(c, p, s) {
|
|
2739
|
+
async function a(c, p, s, m) {
|
|
2730
2740
|
n.value = !0;
|
|
2731
2741
|
try {
|
|
2732
|
-
return await
|
|
2742
|
+
return await kt(
|
|
2733
2743
|
{
|
|
2734
2744
|
method: "POST",
|
|
2735
2745
|
url: `${e}/prompt/submit`,
|
|
2736
2746
|
data: c
|
|
2737
2747
|
},
|
|
2738
2748
|
{
|
|
2739
|
-
onMessage: (
|
|
2740
|
-
p(
|
|
2749
|
+
onMessage: (g) => {
|
|
2750
|
+
p(g);
|
|
2751
|
+
},
|
|
2752
|
+
onToolStatus: (g) => {
|
|
2753
|
+
s == null || s(g);
|
|
2741
2754
|
},
|
|
2742
2755
|
onDone: () => n.value = !1
|
|
2743
2756
|
}
|
|
2744
2757
|
);
|
|
2745
|
-
} catch (
|
|
2746
|
-
throw n.value = !1,
|
|
2758
|
+
} catch (g) {
|
|
2759
|
+
throw n.value = !1, m == null || m(g), console.error("Error in sendPrompt:", g), g;
|
|
2747
2760
|
}
|
|
2748
2761
|
}
|
|
2749
|
-
async function i(c, p, s,
|
|
2762
|
+
async function i(c, p, s, m) {
|
|
2750
2763
|
n.value = !0;
|
|
2751
2764
|
try {
|
|
2752
|
-
return await
|
|
2765
|
+
return await kt(
|
|
2753
2766
|
{
|
|
2754
2767
|
method: "POST",
|
|
2755
2768
|
url: `${e}/get-job-result`,
|
|
@@ -2758,16 +2771,16 @@ function zt(e) {
|
|
|
2758
2771
|
}
|
|
2759
2772
|
},
|
|
2760
2773
|
{
|
|
2761
|
-
onMessage: (
|
|
2762
|
-
onFieldMetadata: (
|
|
2774
|
+
onMessage: (g) => p(g),
|
|
2775
|
+
onFieldMetadata: (g) => s(g),
|
|
2763
2776
|
onDone: () => n.value = !1
|
|
2764
2777
|
}
|
|
2765
2778
|
);
|
|
2766
|
-
} catch (
|
|
2767
|
-
t.value =
|
|
2779
|
+
} catch (g) {
|
|
2780
|
+
t.value = g, m == null || m(g), n.value = !1;
|
|
2768
2781
|
}
|
|
2769
2782
|
}
|
|
2770
|
-
async function l(c, p, s,
|
|
2783
|
+
async function l(c, p, s, m) {
|
|
2771
2784
|
return await o({
|
|
2772
2785
|
method: "POST",
|
|
2773
2786
|
url: "/prompt/clear",
|
|
@@ -2775,7 +2788,7 @@ function zt(e) {
|
|
|
2775
2788
|
username: c,
|
|
2776
2789
|
project: p,
|
|
2777
2790
|
agentID: s,
|
|
2778
|
-
formId:
|
|
2791
|
+
formId: m
|
|
2779
2792
|
}
|
|
2780
2793
|
});
|
|
2781
2794
|
}
|
|
@@ -2800,7 +2813,7 @@ function zt(e) {
|
|
|
2800
2813
|
handleFeedback: u
|
|
2801
2814
|
};
|
|
2802
2815
|
}
|
|
2803
|
-
const
|
|
2816
|
+
const Ja = ["innerHTML"], Ne = /* @__PURE__ */ O({
|
|
2804
2817
|
__name: "MarkdownRender",
|
|
2805
2818
|
props: {
|
|
2806
2819
|
source: {},
|
|
@@ -2808,8 +2821,8 @@ const Ha = ["innerHTML"], Me = /* @__PURE__ */ T({
|
|
|
2808
2821
|
plugins: {}
|
|
2809
2822
|
},
|
|
2810
2823
|
setup(e) {
|
|
2811
|
-
const n = e, t =
|
|
2812
|
-
new
|
|
2824
|
+
const n = e, t = T(
|
|
2825
|
+
new pn({
|
|
2813
2826
|
html: !0,
|
|
2814
2827
|
breaks: !0,
|
|
2815
2828
|
...n.options ?? {}
|
|
@@ -2817,13 +2830,13 @@ const Ha = ["innerHTML"], Me = /* @__PURE__ */ T({
|
|
|
2817
2830
|
);
|
|
2818
2831
|
n.plugins && n.plugins.forEach((r) => t.value.use(r));
|
|
2819
2832
|
const o = w(() => t.value.render(n.source));
|
|
2820
|
-
return (r, a) => (y(),
|
|
2833
|
+
return (r, a) => (y(), A("div", {
|
|
2821
2834
|
class: "markdown-renderer",
|
|
2822
2835
|
innerHTML: o.value
|
|
2823
|
-
}, null, 8,
|
|
2836
|
+
}, null, 8, Ja));
|
|
2824
2837
|
}
|
|
2825
2838
|
});
|
|
2826
|
-
function
|
|
2839
|
+
function Jt(e, n) {
|
|
2827
2840
|
switch (e) {
|
|
2828
2841
|
case "date":
|
|
2829
2842
|
return new Date(n).toLocaleDateString();
|
|
@@ -2835,10 +2848,10 @@ function Vt(e, n) {
|
|
|
2835
2848
|
return n.toString();
|
|
2836
2849
|
}
|
|
2837
2850
|
}
|
|
2838
|
-
function
|
|
2851
|
+
function Qa(e) {
|
|
2839
2852
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
2840
2853
|
}
|
|
2841
|
-
const
|
|
2854
|
+
const Wa = ["data-testid"], Ya = { class: "q-field-preview__toolbar" }, Xa = { class: "q-field-preview__footer" }, Ka = /* @__PURE__ */ O({
|
|
2842
2855
|
__name: "FieldPreview",
|
|
2843
2856
|
props: {
|
|
2844
2857
|
name: {},
|
|
@@ -2849,61 +2862,61 @@ const Ja = ["data-testid"], Qa = { class: "q-field-preview__toolbar" }, Wa = { c
|
|
|
2849
2862
|
},
|
|
2850
2863
|
emits: ["apply", "regenerate"],
|
|
2851
2864
|
setup(e, { emit: n }) {
|
|
2852
|
-
const t = e, o = n, r =
|
|
2853
|
-
const
|
|
2854
|
-
return c.value ===
|
|
2865
|
+
const t = e, o = n, r = he(), a = T(t.applied), i = T(!1), l = w(() => t.disabled || a.value), u = w(() => t.disabled || i.value), c = w(() => t.type === "text" || t.type === "multiline_text" ? Ne : "div"), p = w(() => {
|
|
2866
|
+
const b = {};
|
|
2867
|
+
return c.value === Ne ? b.source = t.text : b.innerHTML = t.text, b;
|
|
2855
2868
|
}), s = w(() => {
|
|
2856
|
-
const
|
|
2857
|
-
return c.value !==
|
|
2869
|
+
const b = ["q-field-preview__content"];
|
|
2870
|
+
return c.value !== Ne && b.push("preserve-whitespace"), b;
|
|
2858
2871
|
});
|
|
2859
|
-
function
|
|
2872
|
+
function m() {
|
|
2860
2873
|
if (a.value) return;
|
|
2861
2874
|
a.value = !0;
|
|
2862
|
-
const
|
|
2863
|
-
o("apply",
|
|
2875
|
+
const b = Jt(t.type, t.text);
|
|
2876
|
+
o("apply", b);
|
|
2864
2877
|
}
|
|
2865
|
-
function
|
|
2878
|
+
function g() {
|
|
2866
2879
|
i.value || (i.value = !0, o("regenerate", t.name));
|
|
2867
2880
|
}
|
|
2868
|
-
return (
|
|
2881
|
+
return (b, _) => (y(), A("div", {
|
|
2869
2882
|
class: "q-field-preview",
|
|
2870
|
-
"data-testid": f(
|
|
2883
|
+
"data-testid": f(Qa)(t.name)
|
|
2871
2884
|
}, [
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2885
|
+
L("div", Ya, [
|
|
2886
|
+
L("span", null, [
|
|
2887
|
+
je(ae(f(r).suggestionsForField) + " ", 1),
|
|
2888
|
+
L("b", null, ae(t.name), 1)
|
|
2876
2889
|
])
|
|
2877
2890
|
]),
|
|
2878
|
-
|
|
2879
|
-
class:
|
|
2891
|
+
L("div", {
|
|
2892
|
+
class: W(s.value)
|
|
2880
2893
|
}, [
|
|
2881
|
-
(y(),
|
|
2894
|
+
(y(), V(At(c.value), De(Te(p.value)), null, 16))
|
|
2882
2895
|
], 2),
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
default:
|
|
2886
|
-
|
|
2896
|
+
L("div", Xa, [
|
|
2897
|
+
S(f(Nt), { borderless: "" }, {
|
|
2898
|
+
default: C(() => [
|
|
2899
|
+
S(f(re), {
|
|
2887
2900
|
title: f(r).regenerateResponse,
|
|
2888
2901
|
disabled: u.value,
|
|
2889
2902
|
readonly: u.value,
|
|
2890
2903
|
borderless: "",
|
|
2891
|
-
onClick:
|
|
2904
|
+
onClick: g
|
|
2892
2905
|
}, {
|
|
2893
|
-
default:
|
|
2894
|
-
|
|
2906
|
+
default: C(() => [
|
|
2907
|
+
S(f(X), { icon: "reset" })
|
|
2895
2908
|
]),
|
|
2896
2909
|
_: 1
|
|
2897
2910
|
}, 8, ["title", "disabled", "readonly"]),
|
|
2898
|
-
|
|
2911
|
+
S(f(re), {
|
|
2899
2912
|
label: f(r).apply,
|
|
2900
2913
|
"data-testid": "apply-button",
|
|
2901
2914
|
disabled: l.value,
|
|
2902
2915
|
readonly: l.value,
|
|
2903
|
-
onClick:
|
|
2916
|
+
onClick: m
|
|
2904
2917
|
}, {
|
|
2905
|
-
default:
|
|
2906
|
-
|
|
2918
|
+
default: C(() => [
|
|
2919
|
+
S(f(X), { icon: "apply" })
|
|
2907
2920
|
]),
|
|
2908
2921
|
_: 1
|
|
2909
2922
|
}, 8, ["label", "disabled", "readonly"])
|
|
@@ -2911,33 +2924,33 @@ const Ja = ["data-testid"], Qa = { class: "q-field-preview__toolbar" }, Wa = { c
|
|
|
2911
2924
|
_: 1
|
|
2912
2925
|
})
|
|
2913
2926
|
])
|
|
2914
|
-
], 8,
|
|
2927
|
+
], 8, Wa));
|
|
2915
2928
|
}
|
|
2916
|
-
}),
|
|
2929
|
+
}), er = { class: "pulsing-dots" }, tr = { class: "generating-text" }, nr = { class: "dots-container" }, or = /* @__PURE__ */ O({
|
|
2917
2930
|
__name: "PulseDots",
|
|
2918
2931
|
setup(e) {
|
|
2919
|
-
const n = [1, 2, 3], t =
|
|
2920
|
-
return (o, r) => (y(),
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
(y(),
|
|
2932
|
+
const n = [1, 2, 3], t = he();
|
|
2933
|
+
return (o, r) => (y(), A("div", er, [
|
|
2934
|
+
L("span", tr, ae(f(t).generatingResponse), 1),
|
|
2935
|
+
L("div", nr, [
|
|
2936
|
+
(y(), A(pe, null, Be(n, (a, i) => L("span", {
|
|
2924
2937
|
key: i,
|
|
2925
2938
|
class: "dot",
|
|
2926
|
-
style:
|
|
2939
|
+
style: _e({ animationDelay: i * 0.2 + "s" })
|
|
2927
2940
|
}, " • ", 4)), 64))
|
|
2928
2941
|
])
|
|
2929
2942
|
]));
|
|
2930
2943
|
}
|
|
2931
|
-
}),
|
|
2944
|
+
}), ar = { class: "q-chatbot__message-container" }, rr = { class: "q-chatbot__message-wrapper" }, ir = {
|
|
2932
2945
|
key: 0,
|
|
2933
2946
|
class: "q-chatbot__image-preview"
|
|
2934
|
-
},
|
|
2947
|
+
}, lr = ["src", "alt"], sr = {
|
|
2935
2948
|
key: 1,
|
|
2936
2949
|
class: "q-chatbot__file-preview-container"
|
|
2937
|
-
},
|
|
2950
|
+
}, cr = { class: "q-chatbot__file-icon-container" }, ur = { class: "q-chatbot__file-info" }, dr = { class: "q-chatbot__file-name" }, pr = { class: "q-chatbot__file-extension" }, fr = { class: "q-chatbot__message" }, vr = {
|
|
2938
2951
|
key: 1,
|
|
2939
2952
|
class: "q-chatbot__text q-chatbot__user-text"
|
|
2940
|
-
},
|
|
2953
|
+
}, mr = /* @__PURE__ */ O({
|
|
2941
2954
|
__name: "ChatBotMessage",
|
|
2942
2955
|
props: {
|
|
2943
2956
|
sender: { default: "user" },
|
|
@@ -2955,149 +2968,149 @@ const Ja = ["data-testid"], Qa = { class: "q-field-preview__toolbar" }, Wa = { c
|
|
|
2955
2968
|
},
|
|
2956
2969
|
emits: ["apply-fields", "regenerate"],
|
|
2957
2970
|
setup(e, { emit: n }) {
|
|
2958
|
-
const t = e, o = n, r =
|
|
2959
|
-
var
|
|
2960
|
-
return ((
|
|
2971
|
+
const t = e, o = n, r = he(), { handleFeedback: a } = Zt(t.apiEndpoint), i = w(() => t.sender === "bot" && !Object.values(r || {}).includes(t.message || "") && !t.isWelcomeMessage), l = w(() => {
|
|
2972
|
+
var b;
|
|
2973
|
+
return ((b = t.file) == null ? void 0 : b.fileData.type.startsWith("image/")) ?? !1;
|
|
2961
2974
|
}), u = w(
|
|
2962
2975
|
() => t.sender === "bot" ? t.chatbotImage : t.userImage
|
|
2963
2976
|
), c = w(() => {
|
|
2964
|
-
var _,
|
|
2965
|
-
return (_ = t.file) != null && _.fileData ? ((
|
|
2977
|
+
var _, E;
|
|
2978
|
+
return (_ = t.file) != null && _.fileData ? ((E = t.file.fileData.name.split(".").pop()) == null ? void 0 : E.toUpperCase()) ?? "" : "";
|
|
2966
2979
|
});
|
|
2967
2980
|
function p() {
|
|
2968
2981
|
t.message && navigator.clipboard.writeText(t.message).then(() => {
|
|
2969
2982
|
console.log("Response copied to clipboard");
|
|
2970
|
-
}).catch((
|
|
2971
|
-
console.error("Failed to copy response: ",
|
|
2983
|
+
}).catch((b) => {
|
|
2984
|
+
console.error("Failed to copy response: ", b);
|
|
2972
2985
|
});
|
|
2973
2986
|
}
|
|
2974
|
-
function s(
|
|
2975
|
-
o("apply-fields", [{ id: _.id, text:
|
|
2987
|
+
function s(b, _) {
|
|
2988
|
+
o("apply-fields", [{ id: _.id, text: b }]);
|
|
2976
2989
|
}
|
|
2977
|
-
function
|
|
2990
|
+
function m() {
|
|
2978
2991
|
if (!t.fields || t.fields.length === 0) return;
|
|
2979
|
-
const
|
|
2992
|
+
const b = t.fields.map((_) => ({
|
|
2980
2993
|
id: _.id,
|
|
2981
|
-
text:
|
|
2994
|
+
text: Jt(_.type, _.text)
|
|
2982
2995
|
}));
|
|
2983
|
-
o("apply-fields",
|
|
2996
|
+
o("apply-fields", b);
|
|
2984
2997
|
}
|
|
2985
|
-
function b
|
|
2986
|
-
|
|
2998
|
+
function g(b, _) {
|
|
2999
|
+
b === null || _ === null || !t.sessionID || a(b, _, t.sessionID);
|
|
2987
3000
|
}
|
|
2988
|
-
return (
|
|
2989
|
-
var
|
|
2990
|
-
return y(),
|
|
2991
|
-
|
|
3001
|
+
return (b, _) => {
|
|
3002
|
+
var E, Y, z;
|
|
3003
|
+
return y(), A("div", ar, [
|
|
3004
|
+
S(f(X), {
|
|
2992
3005
|
type: "img",
|
|
2993
3006
|
icon: u.value,
|
|
2994
3007
|
alt: f(r).senderImage,
|
|
2995
3008
|
class: "q-chatbot__profile"
|
|
2996
3009
|
}, null, 8, ["icon", "alt"]),
|
|
2997
|
-
|
|
2998
|
-
l.value ? (y(),
|
|
2999
|
-
|
|
3000
|
-
src: (
|
|
3010
|
+
L("div", rr, [
|
|
3011
|
+
l.value ? (y(), A("div", ir, [
|
|
3012
|
+
L("img", {
|
|
3013
|
+
src: (E = t.file) == null ? void 0 : E.previewUrl,
|
|
3001
3014
|
alt: f(r).imagePreview
|
|
3002
|
-
}, null, 8,
|
|
3003
|
-
])) : (
|
|
3004
|
-
|
|
3005
|
-
|
|
3015
|
+
}, null, 8, lr)
|
|
3016
|
+
])) : (Y = t.file) != null && Y.fileData && !l.value ? (y(), A("div", sr, [
|
|
3017
|
+
L("div", cr, [
|
|
3018
|
+
S(f(X), {
|
|
3006
3019
|
icon: "file",
|
|
3007
3020
|
class: "q-chatbot__file-icon"
|
|
3008
3021
|
})
|
|
3009
3022
|
]),
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3023
|
+
L("div", ur, [
|
|
3024
|
+
L("span", dr, ae((z = t.file) == null ? void 0 : z.fileData.name), 1),
|
|
3025
|
+
L("span", pr, ae(c.value), 1)
|
|
3013
3026
|
])
|
|
3014
|
-
])) :
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
key:
|
|
3027
|
+
])) : G("", !0),
|
|
3028
|
+
L("div", fr, [
|
|
3029
|
+
b.loading ? (y(), V(or, { key: 0 })) : t.sender === "bot" && t.fields.length > 0 ? (y(!0), A(pe, { key: 1 }, Be(t.fields, (j, Q) => (y(), V(f(Ka), {
|
|
3030
|
+
key: Q,
|
|
3018
3031
|
class: "q-chatbot__text",
|
|
3019
3032
|
text: j.text || "",
|
|
3020
3033
|
name: j.name,
|
|
3021
3034
|
type: j.type,
|
|
3022
|
-
disabled:
|
|
3035
|
+
disabled: b.loading,
|
|
3023
3036
|
onRegenerate: () => o("regenerate", j.name),
|
|
3024
|
-
onApply: (
|
|
3025
|
-
}, null, 8, ["text", "name", "type", "disabled", "onRegenerate", "onApply"]))), 128)) : (y(),
|
|
3026
|
-
t.sender === "bot" ? (y(),
|
|
3037
|
+
onApply: (Z) => s(Z, j)
|
|
3038
|
+
}, null, 8, ["text", "name", "type", "disabled", "onRegenerate", "onApply"]))), 128)) : (y(), A(pe, { key: 2 }, [
|
|
3039
|
+
t.sender === "bot" ? (y(), V(f(Ne), {
|
|
3027
3040
|
key: 0,
|
|
3028
3041
|
class: "q-chatbot__text",
|
|
3029
3042
|
source: t.message || ""
|
|
3030
|
-
}, null, 8, ["source"])) : (y(),
|
|
3043
|
+
}, null, 8, ["source"])) : (y(), A("div", vr, ae(t.message), 1))
|
|
3031
3044
|
], 64))
|
|
3032
3045
|
])
|
|
3033
3046
|
]),
|
|
3034
|
-
|
|
3047
|
+
S(f($r), {
|
|
3035
3048
|
"show-buttons": i.value,
|
|
3036
3049
|
loading: t.loading,
|
|
3037
3050
|
"date-format": t.dateFormat,
|
|
3038
3051
|
onCopyResponse: p,
|
|
3039
|
-
onSubmitFeedback:
|
|
3040
|
-
onApplyAll:
|
|
3052
|
+
onSubmitFeedback: g,
|
|
3053
|
+
onApplyAll: m
|
|
3041
3054
|
}, null, 8, ["show-buttons", "loading", "date-format"])
|
|
3042
3055
|
]);
|
|
3043
3056
|
};
|
|
3044
3057
|
}
|
|
3045
|
-
}),
|
|
3058
|
+
}), ee = [];
|
|
3046
3059
|
for (let e = 0; e < 256; ++e)
|
|
3047
|
-
|
|
3048
|
-
function
|
|
3049
|
-
return (
|
|
3050
|
-
}
|
|
3051
|
-
let
|
|
3052
|
-
const
|
|
3053
|
-
function
|
|
3054
|
-
if (!
|
|
3060
|
+
ee.push((e + 256).toString(16).slice(1));
|
|
3061
|
+
function gr(e, n = 0) {
|
|
3062
|
+
return (ee[e[n + 0]] + ee[e[n + 1]] + ee[e[n + 2]] + ee[e[n + 3]] + "-" + ee[e[n + 4]] + ee[e[n + 5]] + "-" + ee[e[n + 6]] + ee[e[n + 7]] + "-" + ee[e[n + 8]] + ee[e[n + 9]] + "-" + ee[e[n + 10]] + ee[e[n + 11]] + ee[e[n + 12]] + ee[e[n + 13]] + ee[e[n + 14]] + ee[e[n + 15]]).toLowerCase();
|
|
3063
|
+
}
|
|
3064
|
+
let We;
|
|
3065
|
+
const br = new Uint8Array(16);
|
|
3066
|
+
function hr() {
|
|
3067
|
+
if (!We) {
|
|
3055
3068
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3056
3069
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3057
|
-
|
|
3070
|
+
We = crypto.getRandomValues.bind(crypto);
|
|
3058
3071
|
}
|
|
3059
|
-
return
|
|
3072
|
+
return We(br);
|
|
3060
3073
|
}
|
|
3061
|
-
const
|
|
3062
|
-
function
|
|
3074
|
+
const yr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), $t = { randomUUID: yr };
|
|
3075
|
+
function Qt(e, n, t) {
|
|
3063
3076
|
var r;
|
|
3064
|
-
if (
|
|
3065
|
-
return
|
|
3077
|
+
if ($t.randomUUID && !n && !e)
|
|
3078
|
+
return $t.randomUUID();
|
|
3066
3079
|
e = e || {};
|
|
3067
|
-
const o = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ??
|
|
3080
|
+
const o = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? hr();
|
|
3068
3081
|
if (o.length < 16)
|
|
3069
3082
|
throw new Error("Random bytes length must be >= 16");
|
|
3070
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128,
|
|
3083
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, gr(o);
|
|
3071
3084
|
}
|
|
3072
|
-
const
|
|
3073
|
-
function
|
|
3085
|
+
const me = T([]), qe = T(1);
|
|
3086
|
+
function Wt() {
|
|
3074
3087
|
function e(a, i, l, u, c) {
|
|
3075
3088
|
const p = {
|
|
3076
3089
|
id: qe.value++,
|
|
3077
3090
|
message: a,
|
|
3078
3091
|
date: /* @__PURE__ */ new Date(),
|
|
3079
3092
|
sender: i || "bot",
|
|
3080
|
-
sessionID: u ||
|
|
3093
|
+
sessionID: u || Qt(),
|
|
3081
3094
|
file: l,
|
|
3082
3095
|
isWelcomeMessage: c,
|
|
3083
3096
|
fields: []
|
|
3084
3097
|
};
|
|
3085
|
-
return
|
|
3098
|
+
return me.value.push(p), p;
|
|
3086
3099
|
}
|
|
3087
3100
|
function n() {
|
|
3088
|
-
return
|
|
3101
|
+
return me.value.find((a) => a.id === qe.value - 1);
|
|
3089
3102
|
}
|
|
3090
3103
|
function t() {
|
|
3091
|
-
|
|
3104
|
+
me.value = [], qe.value = 1;
|
|
3092
3105
|
}
|
|
3093
3106
|
function o(a) {
|
|
3094
|
-
|
|
3107
|
+
me.value = me.value.filter((i) => i.id !== a);
|
|
3095
3108
|
}
|
|
3096
3109
|
function r() {
|
|
3097
|
-
return
|
|
3110
|
+
return me.value;
|
|
3098
3111
|
}
|
|
3099
3112
|
return {
|
|
3100
|
-
messages:
|
|
3113
|
+
messages: me,
|
|
3101
3114
|
nextMessageId: qe,
|
|
3102
3115
|
addChatMessage: e,
|
|
3103
3116
|
getLastMessage: n,
|
|
@@ -3106,10 +3119,10 @@ function Zt() {
|
|
|
3106
3119
|
deleteMessageById: o
|
|
3107
3120
|
};
|
|
3108
3121
|
}
|
|
3109
|
-
const
|
|
3122
|
+
const wr = { class: "q-chatbot__dialog-title" }, _r = {
|
|
3110
3123
|
key: 0,
|
|
3111
3124
|
class: "q-chatbot__feedback-buttons"
|
|
3112
|
-
},
|
|
3125
|
+
}, kr = { class: "q-chatbot__sender" }, $r = /* @__PURE__ */ O({
|
|
3113
3126
|
__name: "ChatBotMessageButtons",
|
|
3114
3127
|
props: {
|
|
3115
3128
|
loading: { type: Boolean },
|
|
@@ -3119,10 +3132,10 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3119
3132
|
},
|
|
3120
3133
|
emits: ["submit-feedback", "copy-response", "apply-all"],
|
|
3121
3134
|
setup(e, { emit: n }) {
|
|
3122
|
-
const t = e, o = n, r =
|
|
3135
|
+
const t = e, o = n, r = he(), { getLastMessage: a } = Wt(), i = T(!1), l = T(""), u = T(null), c = T(!1), p = w(() => t.loading || c.value), s = t.date || /* @__PURE__ */ new Date(), m = a(), g = w(() => m ? m.fields && m.fields.length > 1 : !1), b = [
|
|
3123
3136
|
{
|
|
3124
3137
|
id: "confirm-btn",
|
|
3125
|
-
action:
|
|
3138
|
+
action: B,
|
|
3126
3139
|
props: {
|
|
3127
3140
|
label: r.submitButton,
|
|
3128
3141
|
class: "q-chatbot__dialog-confirm-button"
|
|
@@ -3141,41 +3154,41 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3141
3154
|
icon: "cancel"
|
|
3142
3155
|
}
|
|
3143
3156
|
}
|
|
3144
|
-
], _ = w(() => t.dateFormat ?
|
|
3145
|
-
function
|
|
3146
|
-
const
|
|
3147
|
-
return
|
|
3157
|
+
], _ = w(() => t.dateFormat ? Y(s, "HH:mm") : s.toLocaleString()), E = w(() => `${_.value}`);
|
|
3158
|
+
function Y(D, te) {
|
|
3159
|
+
const ne = D.getDate().toString().padStart(2, "0"), d = (D.getMonth() + 1).toString().padStart(2, "0"), v = D.getFullYear().toString().padStart(2, "0"), $ = D.getHours().toString().padStart(2, "0"), q = D.getMinutes().toString().padStart(2, "0"), I = D.getSeconds().toString().padStart(2, "0");
|
|
3160
|
+
return te.replace("dd", ne).replace("MM", d).replace("yyyy", v).replace("HH", $).replace("mm", q).replace("ss", I);
|
|
3148
3161
|
}
|
|
3149
|
-
function
|
|
3150
|
-
i.value = !0, l.value = "", u.value =
|
|
3162
|
+
function z(D) {
|
|
3163
|
+
i.value = !0, l.value = "", u.value = D;
|
|
3151
3164
|
}
|
|
3152
3165
|
function j() {
|
|
3153
|
-
|
|
3166
|
+
z(0);
|
|
3154
3167
|
}
|
|
3155
|
-
function
|
|
3156
|
-
|
|
3168
|
+
function Q() {
|
|
3169
|
+
z(1);
|
|
3157
3170
|
}
|
|
3158
|
-
function
|
|
3171
|
+
function Z() {
|
|
3159
3172
|
c.value || (c.value = !0, o("apply-all"));
|
|
3160
3173
|
}
|
|
3161
|
-
function
|
|
3174
|
+
function B() {
|
|
3162
3175
|
u.value && (o("submit-feedback", u.value, l.value), i.value = !1, l.value = "", u.value = null);
|
|
3163
3176
|
}
|
|
3164
|
-
function
|
|
3177
|
+
function P() {
|
|
3165
3178
|
o("copy-response");
|
|
3166
3179
|
}
|
|
3167
|
-
return (
|
|
3168
|
-
|
|
3180
|
+
return (D, te) => (y(), A(pe, null, [
|
|
3181
|
+
S(f(Ht), {
|
|
3169
3182
|
modelValue: i.value,
|
|
3170
|
-
"onUpdate:modelValue":
|
|
3183
|
+
"onUpdate:modelValue": te[1] || (te[1] = (ne) => i.value = ne),
|
|
3171
3184
|
inline: "",
|
|
3172
|
-
buttons:
|
|
3185
|
+
buttons: b
|
|
3173
3186
|
}, {
|
|
3174
|
-
body:
|
|
3175
|
-
|
|
3176
|
-
|
|
3187
|
+
body: C(() => [
|
|
3188
|
+
L("div", wr, ae(f(r).commentDialogTitle), 1),
|
|
3189
|
+
S(f(Ot), {
|
|
3177
3190
|
modelValue: l.value,
|
|
3178
|
-
"onUpdate:modelValue":
|
|
3191
|
+
"onUpdate:modelValue": te[0] || (te[0] = (ne) => l.value = ne),
|
|
3179
3192
|
class: "q-chatbot__dialog-comment-input",
|
|
3180
3193
|
"max-length": 150,
|
|
3181
3194
|
size: "large",
|
|
@@ -3184,46 +3197,46 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3184
3197
|
]),
|
|
3185
3198
|
_: 1
|
|
3186
3199
|
}, 8, ["modelValue"]),
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
default:
|
|
3190
|
-
|
|
3200
|
+
D.showButtons ? (y(), A("div", _r, [
|
|
3201
|
+
S(f(Nt), null, {
|
|
3202
|
+
default: C(() => [
|
|
3203
|
+
S(f(re), {
|
|
3191
3204
|
title: f(r).goodResponse,
|
|
3192
3205
|
class: "q-chatbot__good-response-button",
|
|
3193
3206
|
borderless: "",
|
|
3194
3207
|
disabled: t.loading,
|
|
3195
|
-
onClick:
|
|
3208
|
+
onClick: Q
|
|
3196
3209
|
}, {
|
|
3197
|
-
default:
|
|
3198
|
-
|
|
3210
|
+
default: C(() => [
|
|
3211
|
+
S(f(X), { icon: "thumb-up" })
|
|
3199
3212
|
]),
|
|
3200
3213
|
_: 1
|
|
3201
3214
|
}, 8, ["title", "disabled"]),
|
|
3202
|
-
|
|
3215
|
+
S(f(re), {
|
|
3203
3216
|
title: f(r).badResponse,
|
|
3204
3217
|
class: "q-chatbot__bad-response-button",
|
|
3205
3218
|
borderless: "",
|
|
3206
3219
|
disabled: t.loading,
|
|
3207
3220
|
onClick: j
|
|
3208
3221
|
}, {
|
|
3209
|
-
default:
|
|
3210
|
-
|
|
3222
|
+
default: C(() => [
|
|
3223
|
+
S(f(X), { icon: "thumb-down" })
|
|
3211
3224
|
]),
|
|
3212
3225
|
_: 1
|
|
3213
3226
|
}, 8, ["title", "disabled"]),
|
|
3214
|
-
|
|
3227
|
+
S(f(re), {
|
|
3215
3228
|
title: f(r).copyResponse,
|
|
3216
3229
|
class: "q-chatbot__copy-button",
|
|
3217
3230
|
borderless: "",
|
|
3218
3231
|
disabled: t.loading,
|
|
3219
|
-
onClick:
|
|
3232
|
+
onClick: P
|
|
3220
3233
|
}, {
|
|
3221
|
-
default:
|
|
3222
|
-
|
|
3234
|
+
default: C(() => [
|
|
3235
|
+
S(f(X), { icon: "copy-content" })
|
|
3223
3236
|
]),
|
|
3224
3237
|
_: 1
|
|
3225
3238
|
}, 8, ["title", "disabled"]),
|
|
3226
|
-
|
|
3239
|
+
g.value ? (y(), V(f(re), {
|
|
3227
3240
|
key: 0,
|
|
3228
3241
|
title: f(r).applyAll,
|
|
3229
3242
|
class: "q-chatbot__apply-all-button",
|
|
@@ -3231,21 +3244,21 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3231
3244
|
disabled: p.value,
|
|
3232
3245
|
readonly: p.value,
|
|
3233
3246
|
label: f(r).applyAll,
|
|
3234
|
-
onClick:
|
|
3247
|
+
onClick: Z
|
|
3235
3248
|
}, {
|
|
3236
|
-
default:
|
|
3237
|
-
|
|
3249
|
+
default: C(() => [
|
|
3250
|
+
S(f(X), { icon: "apply-all" })
|
|
3238
3251
|
]),
|
|
3239
3252
|
_: 1
|
|
3240
|
-
}, 8, ["title", "disabled", "readonly", "label"])) :
|
|
3253
|
+
}, 8, ["title", "disabled", "readonly", "label"])) : G("", !0)
|
|
3241
3254
|
]),
|
|
3242
3255
|
_: 1
|
|
3243
3256
|
})
|
|
3244
|
-
])) :
|
|
3245
|
-
|
|
3257
|
+
])) : G("", !0),
|
|
3258
|
+
L("div", kr, ae(E.value), 1)
|
|
3246
3259
|
], 64));
|
|
3247
3260
|
}
|
|
3248
|
-
}),
|
|
3261
|
+
}), Ar = { class: "q-chatbot__tools" }, xr = { class: "q-chatbot__tools__select" }, Ir = /* @__PURE__ */ O({
|
|
3249
3262
|
__name: "ChatToolBar",
|
|
3250
3263
|
props: {
|
|
3251
3264
|
disabled: { type: Boolean },
|
|
@@ -3254,23 +3267,23 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3254
3267
|
},
|
|
3255
3268
|
emits: ["clear", "change-chat"],
|
|
3256
3269
|
setup(e, { emit: n }) {
|
|
3257
|
-
const t = e, o = n, { clearChat: r } =
|
|
3270
|
+
const t = e, o = n, { clearChat: r } = he(), a = {
|
|
3258
3271
|
key: "",
|
|
3259
3272
|
value: "Default Chat",
|
|
3260
3273
|
formId: ""
|
|
3261
|
-
}, i = w(() => t.availableAgents && t.availableAgents.length > 0), l =
|
|
3262
|
-
|
|
3274
|
+
}, i = w(() => t.availableAgents && t.availableAgents.length > 0), l = T(t.selectedAgentKey || a.key);
|
|
3275
|
+
le(
|
|
3263
3276
|
() => t.selectedAgentKey,
|
|
3264
3277
|
(s) => {
|
|
3265
3278
|
l.value = s || a.key;
|
|
3266
3279
|
}
|
|
3267
3280
|
);
|
|
3268
3281
|
const u = w(() => {
|
|
3269
|
-
var
|
|
3270
|
-
const s = (
|
|
3271
|
-
key:
|
|
3272
|
-
value:
|
|
3273
|
-
formId:
|
|
3282
|
+
var m;
|
|
3283
|
+
const s = (m = t.availableAgents) == null ? void 0 : m.map((g) => ({
|
|
3284
|
+
key: g.key,
|
|
3285
|
+
value: g.value,
|
|
3286
|
+
formId: g.formId
|
|
3274
3287
|
}));
|
|
3275
3288
|
return s == null || s.push(a), s || [a];
|
|
3276
3289
|
});
|
|
@@ -3278,24 +3291,24 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3278
3291
|
o("clear");
|
|
3279
3292
|
}
|
|
3280
3293
|
function p(s) {
|
|
3281
|
-
const
|
|
3282
|
-
if (
|
|
3283
|
-
if (
|
|
3294
|
+
const m = u.value.find((g) => g.key === s);
|
|
3295
|
+
if (m) {
|
|
3296
|
+
if (m.key === a.key) {
|
|
3284
3297
|
o("change-chat", { key: "", formId: "" });
|
|
3285
3298
|
return;
|
|
3286
3299
|
}
|
|
3287
|
-
o("change-chat",
|
|
3300
|
+
o("change-chat", m);
|
|
3288
3301
|
}
|
|
3289
3302
|
}
|
|
3290
|
-
return (s,
|
|
3291
|
-
const
|
|
3292
|
-
return y(),
|
|
3293
|
-
|
|
3294
|
-
i.value ? (y(),
|
|
3303
|
+
return (s, m) => {
|
|
3304
|
+
const g = cn("q-select");
|
|
3305
|
+
return y(), A("div", Ar, [
|
|
3306
|
+
L("div", xr, [
|
|
3307
|
+
i.value ? (y(), V(g, {
|
|
3295
3308
|
key: 0,
|
|
3296
3309
|
modelValue: l.value,
|
|
3297
3310
|
"onUpdate:modelValue": [
|
|
3298
|
-
|
|
3311
|
+
m[0] || (m[0] = (b) => l.value = b),
|
|
3299
3312
|
p
|
|
3300
3313
|
],
|
|
3301
3314
|
inline: "",
|
|
@@ -3303,31 +3316,31 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3303
3316
|
class: "q-chatbot__tools-select-input",
|
|
3304
3317
|
size: "medium",
|
|
3305
3318
|
items: u.value
|
|
3306
|
-
}, null, 8, ["modelValue", "items"])) :
|
|
3319
|
+
}, null, 8, ["modelValue", "items"])) : G("", !0)
|
|
3307
3320
|
]),
|
|
3308
|
-
|
|
3321
|
+
S(f(re), {
|
|
3309
3322
|
title: f(r),
|
|
3310
3323
|
disabled: t.disabled,
|
|
3311
3324
|
class: "q-chatbot__tools-clear",
|
|
3312
3325
|
borderless: "",
|
|
3313
3326
|
onClick: c
|
|
3314
3327
|
}, {
|
|
3315
|
-
default:
|
|
3316
|
-
|
|
3328
|
+
default: C(() => [
|
|
3329
|
+
S(f(X), { icon: "bin" })
|
|
3317
3330
|
]),
|
|
3318
3331
|
_: 1
|
|
3319
3332
|
}, 8, ["title", "disabled"])
|
|
3320
3333
|
]);
|
|
3321
3334
|
};
|
|
3322
3335
|
}
|
|
3323
|
-
}),
|
|
3336
|
+
}), Sr = { class: "q-chatbot__input-wrapper" }, Dr = {
|
|
3324
3337
|
key: 0,
|
|
3325
3338
|
class: "q-chatbot__file-preview"
|
|
3326
|
-
},
|
|
3339
|
+
}, Er = ["src", "alt"], Cr = {
|
|
3327
3340
|
key: 1,
|
|
3328
3341
|
class: "q-chatbot__file-preview",
|
|
3329
3342
|
tabindex: "0"
|
|
3330
|
-
},
|
|
3343
|
+
}, Br = { class: "q-chatbot__file-name" }, Rr = { class: "q-chatbot__input" }, Lr = { class: "q-chatbot__send-container" }, qr = ["accept"], Mr = /* @__PURE__ */ O({
|
|
3331
3344
|
__name: "ChatBotInput",
|
|
3332
3345
|
props: {
|
|
3333
3346
|
disabled: { type: Boolean },
|
|
@@ -3337,34 +3350,34 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3337
3350
|
},
|
|
3338
3351
|
emits: ["send-message"],
|
|
3339
3352
|
setup(e, { emit: n }) {
|
|
3340
|
-
const t = e, o = n, r =
|
|
3341
|
-
function
|
|
3342
|
-
|
|
3353
|
+
const t = e, o = n, r = he(), a = T(null), i = T(null), l = T(""), u = T(!1), c = w(() => ".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"), p = w(() => i.value ? i.value.type.startsWith("image/") ?? !1 : !1), s = T(t.userPrompt ?? ""), m = w(() => t.disabled || t.loading || s.value.trim().length === 0);
|
|
3354
|
+
function g(B) {
|
|
3355
|
+
B.preventDefault(), t.disabled || (u.value = !0);
|
|
3343
3356
|
}
|
|
3344
|
-
const
|
|
3357
|
+
const b = w(() => ({
|
|
3345
3358
|
"q-chatbot__footer-disabled": t.disabled,
|
|
3346
3359
|
"drag-over": u.value && !i.value
|
|
3347
3360
|
}));
|
|
3348
|
-
function _(
|
|
3349
|
-
|
|
3361
|
+
function _(B) {
|
|
3362
|
+
B.preventDefault(), u.value = !1;
|
|
3350
3363
|
}
|
|
3351
|
-
function B
|
|
3352
|
-
var
|
|
3353
|
-
if (
|
|
3354
|
-
const
|
|
3355
|
-
|
|
3364
|
+
function E(B) {
|
|
3365
|
+
var D;
|
|
3366
|
+
if (B.preventDefault(), u.value = !1, t.disabled || i.value) return;
|
|
3367
|
+
const P = (D = B.dataTransfer) == null ? void 0 : D.files;
|
|
3368
|
+
P && Y(P[0]);
|
|
3356
3369
|
}
|
|
3357
|
-
function
|
|
3358
|
-
i.value =
|
|
3370
|
+
function Y(B) {
|
|
3371
|
+
i.value = B, B.type.startsWith("image/") ? l.value = URL.createObjectURL(B) : l.value = "";
|
|
3359
3372
|
}
|
|
3360
|
-
function
|
|
3373
|
+
function z() {
|
|
3361
3374
|
if (!(s.value.trim() === "" || t.loading || t.disabled)) {
|
|
3362
3375
|
if (i.value) {
|
|
3363
|
-
const
|
|
3376
|
+
const B = {
|
|
3364
3377
|
fileData: i.value,
|
|
3365
3378
|
previewUrl: l.value ?? ""
|
|
3366
3379
|
};
|
|
3367
|
-
o("send-message", s.value,
|
|
3380
|
+
o("send-message", s.value, B), j();
|
|
3368
3381
|
} else o("send-message", s.value);
|
|
3369
3382
|
s.value = "";
|
|
3370
3383
|
}
|
|
@@ -3372,97 +3385,97 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3372
3385
|
function j() {
|
|
3373
3386
|
i.value = null, l.value = "", a.value && (a.value.value = "", a.value.files = null);
|
|
3374
3387
|
}
|
|
3375
|
-
function
|
|
3376
|
-
var
|
|
3377
|
-
(
|
|
3388
|
+
function Q() {
|
|
3389
|
+
var B;
|
|
3390
|
+
(B = a.value) == null || B.click();
|
|
3378
3391
|
}
|
|
3379
|
-
function
|
|
3380
|
-
var
|
|
3381
|
-
const
|
|
3382
|
-
(
|
|
3392
|
+
function Z(B) {
|
|
3393
|
+
var D;
|
|
3394
|
+
const P = B.target;
|
|
3395
|
+
(D = P.files) != null && D[0] && Y(P.files[0]);
|
|
3383
3396
|
}
|
|
3384
|
-
return (
|
|
3385
|
-
|
|
3397
|
+
return (B, P) => (y(), A(pe, null, [
|
|
3398
|
+
S(f(Tt), {
|
|
3386
3399
|
label: f(r).inputLabel
|
|
3387
3400
|
}, null, 8, ["label"]),
|
|
3388
|
-
|
|
3389
|
-
class:
|
|
3390
|
-
onDragover:
|
|
3391
|
-
onDragleave:
|
|
3392
|
-
onDrop:
|
|
3401
|
+
L("div", {
|
|
3402
|
+
class: W(["q-chatbot__footer", b.value]),
|
|
3403
|
+
onDragover: Me(g, ["prevent"]),
|
|
3404
|
+
onDragleave: Me(_, ["prevent"]),
|
|
3405
|
+
onDrop: Me(E, ["prevent"])
|
|
3393
3406
|
}, [
|
|
3394
|
-
|
|
3395
|
-
i.value ? (y(),
|
|
3396
|
-
p.value ? (y(),
|
|
3407
|
+
L("div", Sr, [
|
|
3408
|
+
i.value ? (y(), A("div", Dr, [
|
|
3409
|
+
p.value ? (y(), A("img", {
|
|
3397
3410
|
key: 0,
|
|
3398
3411
|
class: "q-chatbot__image-preview",
|
|
3399
3412
|
src: l.value,
|
|
3400
3413
|
tabindex: "0",
|
|
3401
3414
|
alt: f(r).imagePreview
|
|
3402
|
-
}, null, 8,
|
|
3403
|
-
|
|
3415
|
+
}, null, 8, Er)) : (y(), A("div", Cr, [
|
|
3416
|
+
S(f(X), {
|
|
3404
3417
|
icon: "file",
|
|
3405
3418
|
class: "q-chatbot__file-icon"
|
|
3406
3419
|
}),
|
|
3407
|
-
|
|
3420
|
+
L("span", Br, ae(i.value.name), 1)
|
|
3408
3421
|
])),
|
|
3409
|
-
|
|
3422
|
+
S(f(re), {
|
|
3410
3423
|
class: "q-chatbot__remove-file",
|
|
3411
3424
|
tabindex: "0",
|
|
3412
3425
|
flat: "",
|
|
3413
3426
|
round: "",
|
|
3414
3427
|
onClick: j
|
|
3415
3428
|
}, {
|
|
3416
|
-
default:
|
|
3417
|
-
|
|
3429
|
+
default: C(() => [
|
|
3430
|
+
S(f(X), { icon: "remove" })
|
|
3418
3431
|
]),
|
|
3419
3432
|
_: 1
|
|
3420
3433
|
})
|
|
3421
|
-
])) :
|
|
3422
|
-
|
|
3423
|
-
|
|
3434
|
+
])) : G("", !0),
|
|
3435
|
+
L("div", Rr, [
|
|
3436
|
+
S(f(Za), {
|
|
3424
3437
|
id: "chatbot-input",
|
|
3425
3438
|
modelValue: s.value,
|
|
3426
|
-
"onUpdate:modelValue":
|
|
3439
|
+
"onUpdate:modelValue": P[0] || (P[0] = (D) => s.value = D),
|
|
3427
3440
|
size: "block",
|
|
3428
3441
|
autosize: "",
|
|
3429
3442
|
resize: "none",
|
|
3430
3443
|
rows: 2,
|
|
3431
3444
|
disabled: t.disabled,
|
|
3432
|
-
onKeyup:
|
|
3445
|
+
onKeyup: un(z, ["enter"])
|
|
3433
3446
|
}, null, 8, ["modelValue", "disabled"])
|
|
3434
3447
|
]),
|
|
3435
|
-
|
|
3436
|
-
|
|
3448
|
+
L("div", Lr, [
|
|
3449
|
+
S(f(re), {
|
|
3437
3450
|
title: f(r).imageUpload,
|
|
3438
3451
|
class: "q-chatbot__upload",
|
|
3439
3452
|
disabled: t.disabled || t.loading || !!i.value,
|
|
3440
|
-
onClick:
|
|
3453
|
+
onClick: Q
|
|
3441
3454
|
}, {
|
|
3442
|
-
default:
|
|
3443
|
-
|
|
3455
|
+
default: C(() => [
|
|
3456
|
+
S(f(X), { icon: "upload" })
|
|
3444
3457
|
]),
|
|
3445
3458
|
_: 1
|
|
3446
3459
|
}, 8, ["title", "disabled"]),
|
|
3447
|
-
|
|
3460
|
+
L("input", {
|
|
3448
3461
|
id: "file-upload",
|
|
3449
3462
|
ref_key: "fileInput",
|
|
3450
3463
|
ref: a,
|
|
3451
3464
|
type: "file",
|
|
3452
3465
|
accept: c.value,
|
|
3453
3466
|
class: "hidden-input",
|
|
3454
|
-
onChange:
|
|
3455
|
-
}, null, 40,
|
|
3456
|
-
|
|
3467
|
+
onChange: Z
|
|
3468
|
+
}, null, 40, qr),
|
|
3469
|
+
S(f(re), {
|
|
3457
3470
|
title: f(r).sendMessage,
|
|
3458
3471
|
variant: "bold",
|
|
3459
3472
|
class: "q-chatbot__send",
|
|
3460
|
-
disabled:
|
|
3461
|
-
readonly:
|
|
3462
|
-
onClick:
|
|
3473
|
+
disabled: m.value,
|
|
3474
|
+
readonly: m.value,
|
|
3475
|
+
onClick: z
|
|
3463
3476
|
}, {
|
|
3464
|
-
default:
|
|
3465
|
-
|
|
3477
|
+
default: C(() => [
|
|
3478
|
+
S(f(X), { icon: "send" })
|
|
3466
3479
|
]),
|
|
3467
3480
|
_: 1
|
|
3468
3481
|
}, 8, ["title", "disabled", "readonly"])
|
|
@@ -3471,7 +3484,7 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3471
3484
|
], 34)
|
|
3472
3485
|
], 64));
|
|
3473
3486
|
}
|
|
3474
|
-
}),
|
|
3487
|
+
}), Nr = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20126.25%20110.36'%3e%3cdefs%3e%3cradialGradient%20id='radial-gradient'%20cx='45.24'%20cy='38.05'%20fx='45.24'%20fy='38.05'%20r='59.09'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2331319e'/%3e%3cstop%20offset='.19'%20stop-color='%232e2e97'/%3e%3cstop%20offset='.45'%20stop-color='%23292985'/%3e%3cstop%20offset='.75'%20stop-color='%23202067'/%3e%3cstop%20offset='1'%20stop-color='%2317174a'/%3e%3c/radialGradient%3e%3clinearGradient%20id='linear-gradient'%20x1='82.65'%20y1='50.41'%20x2='82.65'%20y2='77.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.02'%20stop-color='%2366ebfe'/%3e%3cstop%20offset='.96'%20stop-color='%2300bfdb'/%3e%3c/linearGradient%3e%3clinearGradient%20id='linear-gradient-2'%20x1='44.6'%20y1='50.01'%20x2='44.6'%20y2='77.1'%20xlink:href='%23linear-gradient'/%3e%3c/defs%3e%3cg%20isolation='isolate'%3e%3cg%20id='Layer_1'%3e%3cpath%20d='M126.2,61.4c-.2-3.69-2.61-17.39-5.92-22.09-2.42-3.44-5.89-4.03-7.96-4.38-.13-.02-.27-.05-.41-.07-.16-.28-.32-.58-.45-.81-.63-1.14-1.03-1.87-1.44-2.44-6.96-9.88-14.91-16.51-24.85-20.69-.25-2.29-.84-5.24-3.37-7.44-2.93-2.55-7.58-2.9-11.68-3.21-.93-.07-1.82-.14-2.4-.22l-.33-.05h-8.61l-.36.05c-.65.1-1.61.17-2.63.24-3.75.27-8.01.57-10.98,2.85-2.94,2.26-3.58,5.55-3.79,7.84-9.71,3.94-17.86,10.71-24.85,20.62-.4.57-.81,1.3-1.43,2.44-.13.23-.29.53-.45.81-.14.02-.28.05-.4.07-2.07.35-5.54.94-7.96,4.39-2.25,3.19-3.84,9.89-4.58,13.59-.6,2.97-1.9,10.3-1.08,14.26.79,3.78,3.66,5.6,5.37,6.68.12.08.26.16.39.25,1.65,10.03,6.98,18.56,15.52,24.77,9.23,6.72,20.2,9.43,27.78,10.52,4.49.65,9.15.97,13.85.97,9.67,0,23.77-1.39,36-8.02,11.58-6.27,18.81-16,21.04-28.24,4.52-2.76,6.36-5.67,5.98-12.71Z'%20fill='%2317174a'/%3e%3cpath%20d='M67.15,4.69c2.98.42,9.31.31,11.62,2.31,1.99,1.73,1.65,4.82,2.06,7.22,10.77,3.89,18.73,10.59,25.39,20.04.64.91,2.13,3.95,2.58,4.33,1.71,1.46,5.54.35,7.67,3.37,2.29,3.25,4.83,15.41,5.06,19.59.31,5.82-.76,6.9-5.58,9.44-3.28,26.16-29.7,34.5-52.68,34.5-4.6,0-9.06-.33-13.17-.93-18.13-2.61-37.11-12.11-39.51-33.08-1.7-1.92-4.96-2.54-5.55-5.39-.95-4.56,2.21-20.32,4.89-24.14,2.13-3.02,5.96-1.91,7.67-3.37.46-.39,1.94-3.42,2.58-4.33,6.54-9.28,14.55-16.22,25.21-19.87.85-.87-.3-5.45,2.43-7.55,2.52-1.94,8.35-1.69,11.42-2.16h7.91'%20fill='%23fff'/%3e%3cpath%20d='M121.86,61.51c-.22-4.2-2.78-16.43-5.07-19.7-1.77-2.51-4.71-2.18-6.64-2.83.1,1.18.16,2.37.16,3.57,0,26.85-25.96,48.61-57.98,48.61-15.83,0-30.17-5.32-40.63-13.94,4.91,17.1,22.06,25.14,38.51,27.52,4.12.59,8.6.93,13.21.93,23.06,0,49.57-8.38,52.85-34.68,4.83-2.56,5.91-3.63,5.6-9.49Z'%20fill='%23d0d7e2'%20mix-blend-mode='multiply'%20opacity='.4'/%3e%3cpath%20d='M62.91,97.68c5.82,0,11.67-.53,16.72-1.56,13.1-2.67,22.09-8.06,26.72-16.03,4.43-7.63,4.75-17.33.96-28.84-4.28-13-13.22-22.77-24.7-27.89-.13,4.51-3.84,8.16-8.38,8.16h-20.89c-4.61,0-8.39-3.78-8.39-8.39v-.14c-5.36,2.25-10.29,5.49-14.5,9.61-8.23,8.06-13.16,19.02-13.9,30.84-.59,9.44,2.67,17.53,9.43,23.42,6.27,5.46,15.68,9.02,27.2,10.3,3.13.35,6.43.52,9.73.52'%20fill='url(%23radial-gradient)'/%3e%3crect%20x='74.34'%20y='50.41'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient)'/%3e%3crect%20x='36.29'%20y='50.01'%20width='16.62'%20height='27.09'%20rx='4.06'%20ry='4.06'%20fill='url(%23linear-gradient-2)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Tr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF2GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTExLTI5VDEwOjI0OjU3WiIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0xMS0yOVQxMDoyNDo1N1oiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTExLTI5VDEwOjI0OjU3WiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpiN2ViMDM0NC1hN2UzLTI3NGItODgwNi00ZjMxMzRiNDUwNDEiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo2ODJkMGU1OC1kZmQyLTZkNDEtOGIwNy01ZWUxNjU4MWY2ZWEiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0N2I2NzcxYy1kZmY0LTJkNGItYjJmNC00ZGJiNmQ3MjRmYzAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQ3YjY3NzFjLWRmZjQtMmQ0Yi1iMmY0LTRkYmI2ZDcyNGZjMCIgc3RFdnQ6d2hlbj0iMjAxOS0xMS0yOVQxMDoyNDo1N1oiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyMS4wIChXaW5kb3dzKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YjdlYjAzNDQtYTdlMy0yNzRiLTg4MDYtNGYzMTM0YjQ1MDQxIiBzdEV2dDp3aGVuPSIyMDE5LTExLTI5VDEwOjI0OjU3WiIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm5CcJ8AAAudSURBVHja7Z17sBTFFYe/WYiCYNZalKirgzImEuShFRgM11eiJSpEiC9UCEg0GEl8JGLUaGLUGIyJMcZnLExMJegFi1Ipc41EU5ThERp8oIAx0j4aF5WH60YJV0TIH93gBXZxZ3d2tmd3flVbdWvr7nbP+bZ7us+cPsehAeR6/v7AAOAQoDdwELAv0MO8ugO77/CxD4GNwFpgDfAOsBJYAfwHeEVJoeJuGyeGMLsARwFDgRZgEJCpUXNrgUXmNQdYoKRoTwCHD9UFRgLDgWOBLnXqSjswD5gFPBqHEe5YDLUnMBoYAwyxtJuLgGnANCXF2gRweWCPBy4ERgGfi8lMuNGM6nuUFP9IAO8MtTNwNjAZGBjzdc3zwG+AViXFpqYG7Hq+Y6bhnwMejSUJ3AD8RUmxuekAu55/EjAFOJzG1svAZCVFW1MAdj2/F3Ab8E2aS23AZUqKVxsSsLnPXg5cB3SlObXRTNu/jOr+7EQEtw/wgMXbnaj1LHCekmJprRvqFAHcC4DH0O7DRFr7A+enM9m1hXxucSxHsOv53YDfG0dFotKaDnxHSfFBbACbhdRjDbCnjUrLgRFKitfD/uJUDeC2ACKBG0h9gUWu5x9tNWDX878B/B3omTALrB7AU67nh7p97BQi3PHAg8BuCauqeJyZzmRXFvK5F6wB7Hr+hcDUWkz5TSgHGJnOZFeHscLuFALcMQauk7AJVcPTmaws5HMv1g2w6/lnmGk5Gbm10ah0Jru8kM8tj3ybZFbLT1G/6Ipytx+LgNeAVcAG835X42zoDQw2q1hb1Q6coKSYFxlg1/MPARYAe1tokCVoB8tMJcXqMq+nJ3A6OtDAxu3dOuBIJcWKmgN2Pb87sNDCX70ELgXalBRbKvzhOsApwO3Y93x6OTBESfFhzQAbA0wHzrTs4u8Hvh9WxKOJ3LwTON+y63wYGB3kBxxokZXOZCcBV1h20VcrKX5UyOdCe/xWyOc2FfK5WelM9iPgBIuu9TBgdSGfWxQ6YNfz+wIzgc4WXfAUJcX1tfryQj43N53J7g4cbdE1H5/OZB8p5HNryvnnVJlwO5vtkE0r5qeBayNo51rApkjJLsCDhkk4gLEv2rEd/Yit5sFspo0LTJu2aKBhUv0U7Xq+ZxZWNsUo36WkaI2qsUI+9346k90HONIiG7SkM9nWQj6Xr3YE34VdMVRb0EF7Ues207Yt6mrYVD5Fm9DWYZatmucoKd6MulHT5hzLbDHMMAoO2PX8FHAL9mlWk7ZdSrcYVoFH8Digv4UXNK9J2y6l/oZV+YBdz+8U0RakEr3UpG3vcitnmJU9gs/EzrNC79TzALZp+10L7eJRwn2cKjJ6HeAqS3+pa5I+lNRVht1njuBjsTcicrMFffjEUtsMNOw+E/BEEsVVE3cJ2PX8vdEPvhPFU6cbhiVH8LdIwl7jrN0Mw5KARyc2ir1GFwVsUhUlxzvjryGG5U4j+LTENg2j04oBPjmxS8Po5O0Au56/R7E9VKLY6ljDdNsI/io7J+tMFF/tbphuA9yS2KTh1JIAbiLAg2LSaRuiOuOSAmoQgGOSaedi0ul2YI9Kj6ZUKxM5sYH4ePuyKXSmdGI0guvZ3wHEy5U7IIU+QhknjbTBgRAT9U4Bbsw6fZHJwRX19Lwn+nhpnOSmgANj1ul9gV/Uod1fEb/sQQfGcQQDXOJ6/iURjt4fx3D0bhvB+8V0n3e76/mjIoB7BnBTTG20X4p4p/bdK4I2usfYPl1TQDcSNaq6JYCbAHDnxA4Nq85JArMGVwK4CQC3J2ZoWLWngPWJHRpW61PoNHmJGlPrEsBNAPjtxA4Nq7dTwBuJHRpWb6aA1xM7NKxeSwEr4thx4HvoBG211nT0uduXY2inV+MWdLcMXdxxppIi0pP2Jj3CMHR6i7icAsk6pvNrsDN7+1a9bMDOqGex5Q6wjwN+ZjnotUqKfba6Kp+ztJMSOAfop6RotQEugJJijpLiOOBrwHxLbfccfOqLti3B1zvAJKCPTWBLgG4BRqFT7tukeR0Bz7WkUwXgGsBTUtwTVRHlEEA/ho6Z/jaw0pJuzQVTs8EcNXyP+p0wbEfXSJiipHgvzvsS1/O7mtnnanQ9wnroIyCjpPif06FjTwInRtyRLcCfgJ8oKd5qpA2o6/l7AVcCP6jDwJmtpBjWcYoGaIu4E08DRygpJjQaXDNtv6+kuBroA8yIuPltLDuOYBeIIg/zcuAKJUUbTSTX84eik4r7ETTXS0mhthvB5o2FNWx0NXARMLDZ4Br7zkeXBBgL1HLGWrgV7o5TNMBDNVpA3QwcoqS4Ny4r4xpB3qKkmAZ8CbiOT2sphqntGDo7TCM9za8rrAIcM4ArlRRvkKjYtH0A+szT2SF95cfAAR1rNjpFGp1B9aXrlqBLzc1NMJZ9f76b6rP8PqykOKvjG8WiKu+pspE7gcEJ3MD358HGdtVoJ3ZOiV/UCxX+mlqVFOckyKoazQ9VOGUvUVIcvuObpeKiK6m2shn7ClfGUVdQWeLzosxSu1gcyYANLGpEh0Udpuu30FXLg0iWcqakSjSyCbgxYCP/TvCEpqC2vLHU9nNXR1f+TLBHYD0SLqEpiC2XG1YEAmyewQa5p45wPf+8hE3Vi6zzgBEBPjJ5V8/LnTIa/Cu6rn05Wg8MUlIk03VlcPsAiyn/zHabkmL4rv6hnNOFl6KfL5ajbsCj5lFZomBw9wIeDQD3I8OGqgArKVYAQcqoHwq0liq1lqgo3E5Aq7FdubresKHaEQzaX/psgMaHAXcXq8SVaCe4DtpNGaSM77OGCaEANkvwcQQ7SzwRmJIg/ExNIVgxsnZgXLlP5cqeRgv53Jp0Jrsu4ArvqHQmu6mQz/0z4Vh09F4D/DTgxy5WUjxR7j8Huk8W8rnF6Uy2L3BYgI99PZ3Jdi3kc08lSLeDe3MFcGcoKQIVDnUq6Fh34F8BIQPcB0yK+siJpQuquwleI3IZcKSS4sOaAjad7A0IgnuvZgNnKSkKTQo3jfYZB41eXQf4SorXgrZZUZYd09AogidwORFYYDb0zejEmF8B3HZgVCVwKwZsIM8FxhD80daXgcWu549tIrhj0R6qvgE/uhkYU03whBNC58cDD1T48QeBS5QU6xoUbA/gd8C5FX7FBCXFA9X0oWpvUyGfW5LOZFcDwyv4eH9gfDqTVYV8blmDwT0LeBxToKoCTVJSTK22H06IFzQBmFrFtP80cJmSYmnMwfYDfgscX+FXbAYuUFL8MYz+OCFf3AizSqw0B/UnwP3ATR2Dt2MC1kWfjDy/iplxg9llPB5Wv5waXOhQ4BGqq2/wMfAH4FYlxauWg/0icDn66Gg18eSrgdOUFKGe1XZqdNG9gFlUX+NoC/A34A7gSVsOgpsCWcOAi4GTQrDji8CpSorQz4Y5NTRCd+Bes5UKQ2+bVfdDwHP1qH7mev5X0CklziW8WhfTgO8G9VDVHXAHo0w0i44wa0PkzMh+ApirpHi3Rn3/AnAUuuDySUA2xK/fYBaV99XS/k5Ev/w+6IPetTo6+TraP74MnZHnFWClkuK/Zfbv8+j6UYcaR8xh6JOAB9eovwIYH0VoU2QP5F3P7wxMRj9BiarSSzuwCvjA/L3VtdrFvPYE9ie6qqYb0Omgfh3VKcvIIy5czz8YfQbnFJpLbegDeZGmjqxbSI3r+ScCtwL9GhzsS+jQ1tn1aLxuNRvMBR8OTCD4MZk4SJprO6JecOs6govcn88GfggcEXOwz5uZaboN2Qysi3p0Pf8Y40A4lfgUY96IduzcoaR4xqaOWRvW6nr+3sZJcg4wxNJuLjSOl2lKirU2djAWccvGkX+6cTYcE+G2pti26xnjZJkZhwcisQtMN6kCW4Ch5jUYyNSoufeMU2IBOtxmnpJiQ5zs1RAnD0xS837orHIHAb2MAyODDgzcs8j9fKNxgKwzIFehE8G9gT6fu1RJsSrutvk/GdqIAV0smzEAAAAASUVORK5CYII=", Fr = { class: "q-chatbot" }, Or = { class: "q-chatbot__content" }, Ur = { class: "q-chatbot__footer-container" }, zr = /* @__PURE__ */ O({
|
|
3475
3488
|
name: "ChatBot",
|
|
3476
3489
|
__name: "ChatBot",
|
|
3477
3490
|
props: {
|
|
@@ -3479,8 +3492,8 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3479
3492
|
controllerEndpoint: {},
|
|
3480
3493
|
username: {},
|
|
3481
3494
|
projectPath: {},
|
|
3482
|
-
userImage: { default:
|
|
3483
|
-
chatbotImage: { default:
|
|
3495
|
+
userImage: { default: Tr },
|
|
3496
|
+
chatbotImage: { default: Nr },
|
|
3484
3497
|
dateFormat: {},
|
|
3485
3498
|
agentData: { default: () => ({
|
|
3486
3499
|
id: "",
|
|
@@ -3491,192 +3504,224 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3491
3504
|
},
|
|
3492
3505
|
emits: ["apply-fields", "direct-agent-chat"],
|
|
3493
3506
|
setup(e, { emit: n }) {
|
|
3494
|
-
const t = e, o = n, r =
|
|
3507
|
+
const t = e, o = n, r = T(!0), a = T(null), i = T(!0), l = T(t.agentData.id), u = T(t.agentData.formId), c = he(), { isLoading: p, clearChatData: s, getChatData: m, getJobResultData: g, sendPrompt: b } = Zt(
|
|
3495
3508
|
t.apiEndpoint
|
|
3496
|
-
), { messages: _, addChatMessage:
|
|
3497
|
-
|
|
3509
|
+
), { messages: _, addChatMessage: E, clearMessages: Y, getLastMessage: z, deleteMessageById: j } = Wt(), Q = w(() => r.value || p.value);
|
|
3510
|
+
dn(() => {
|
|
3498
3511
|
var h;
|
|
3499
|
-
(h = a.value) == null || h.removeEventListener("scroll",
|
|
3500
|
-
}),
|
|
3501
|
-
|
|
3512
|
+
(h = a.value) == null || h.removeEventListener("scroll", ne);
|
|
3513
|
+
}), Ce(() => {
|
|
3514
|
+
B();
|
|
3502
3515
|
});
|
|
3503
|
-
function
|
|
3516
|
+
function Z(h) {
|
|
3504
3517
|
r.value = h;
|
|
3505
3518
|
}
|
|
3506
|
-
async function
|
|
3519
|
+
async function B() {
|
|
3507
3520
|
try {
|
|
3508
|
-
await
|
|
3521
|
+
await P();
|
|
3509
3522
|
} catch (h) {
|
|
3510
|
-
|
|
3523
|
+
E(c.loginError), console.error("Error logging in: " + h);
|
|
3511
3524
|
}
|
|
3512
3525
|
}
|
|
3513
|
-
async function
|
|
3514
|
-
|
|
3515
|
-
const { data: h, error:
|
|
3526
|
+
async function P() {
|
|
3527
|
+
Z(!0);
|
|
3528
|
+
const { data: h, error: x } = await m(
|
|
3516
3529
|
t.username,
|
|
3517
3530
|
t.projectPath,
|
|
3518
3531
|
l.value,
|
|
3519
3532
|
u.value
|
|
3520
3533
|
);
|
|
3521
|
-
if (
|
|
3522
|
-
|
|
3534
|
+
if (x || !h || !h.success) {
|
|
3535
|
+
Z(!0), E(c.botIsSick), console.log("Error loading chat data: " + x);
|
|
3523
3536
|
return;
|
|
3524
3537
|
}
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3538
|
+
Z(!1), D(), h.history.forEach(async (N) => {
|
|
3539
|
+
E(
|
|
3540
|
+
N.content,
|
|
3541
|
+
N.type === "ai" ? "bot" : "user",
|
|
3529
3542
|
void 0,
|
|
3530
3543
|
// At this point we don't have preview URLs for past messages
|
|
3531
|
-
|
|
3544
|
+
N.sessionID
|
|
3532
3545
|
);
|
|
3533
3546
|
});
|
|
3534
3547
|
}
|
|
3535
|
-
function
|
|
3548
|
+
function D() {
|
|
3536
3549
|
const h = c.initialMessage;
|
|
3537
|
-
|
|
3538
|
-
}
|
|
3539
|
-
function ee() {
|
|
3540
|
-
W(), V(!1), i.value = !0;
|
|
3550
|
+
E(h, "bot", void 0, void 0, !0);
|
|
3541
3551
|
}
|
|
3542
3552
|
function te() {
|
|
3553
|
+
Y(), Z(!1), i.value = !0;
|
|
3554
|
+
}
|
|
3555
|
+
function ne() {
|
|
3543
3556
|
if (a.value) {
|
|
3544
|
-
const { scrollTop:
|
|
3545
|
-
i.value =
|
|
3557
|
+
const { scrollTop: x, clientHeight: N, scrollHeight: F } = a.value;
|
|
3558
|
+
i.value = x + N >= F - 20;
|
|
3546
3559
|
}
|
|
3547
3560
|
}
|
|
3548
|
-
async function d(h,
|
|
3561
|
+
async function d(h, x) {
|
|
3549
3562
|
a.value && a.value.scrollTo({
|
|
3550
3563
|
top: a.value.scrollHeight,
|
|
3551
3564
|
behavior: "smooth"
|
|
3552
|
-
}),
|
|
3565
|
+
}), E(h, "user", x), $(h, x == null ? void 0 : x.fileData);
|
|
3553
3566
|
}
|
|
3554
|
-
async function
|
|
3567
|
+
async function v(h) {
|
|
3555
3568
|
a.value && a.value.scrollTo({
|
|
3556
3569
|
top: a.value.scrollHeight,
|
|
3557
3570
|
behavior: "smooth"
|
|
3558
|
-
}),
|
|
3559
|
-
const
|
|
3560
|
-
|
|
3571
|
+
}), E("", "bot");
|
|
3572
|
+
const x = z();
|
|
3573
|
+
x && await g(
|
|
3561
3574
|
h,
|
|
3562
|
-
(
|
|
3563
|
-
if (
|
|
3564
|
-
const F =
|
|
3565
|
-
F.text =
|
|
3575
|
+
(N) => {
|
|
3576
|
+
if (x.message += N, x.fields || (x.fields = []), x.fields.length > 0) {
|
|
3577
|
+
const F = x.fields[x.fields.length - 1];
|
|
3578
|
+
F.text = x.message;
|
|
3566
3579
|
}
|
|
3567
3580
|
},
|
|
3568
|
-
(
|
|
3569
|
-
var
|
|
3570
|
-
|
|
3571
|
-
const F =
|
|
3572
|
-
(
|
|
3581
|
+
(N) => {
|
|
3582
|
+
var J;
|
|
3583
|
+
x.message = "";
|
|
3584
|
+
const F = N;
|
|
3585
|
+
(J = x.fields) == null || J.push({
|
|
3573
3586
|
id: F.id,
|
|
3574
3587
|
type: F.type,
|
|
3575
3588
|
name: F.name,
|
|
3576
3589
|
text: F.text
|
|
3577
3590
|
});
|
|
3578
3591
|
},
|
|
3579
|
-
(
|
|
3580
|
-
|
|
3592
|
+
(N) => {
|
|
3593
|
+
Z(!0), E(c.botIsSick), console.error("Error getting job result: " + N), j(x.id);
|
|
3581
3594
|
}
|
|
3582
3595
|
);
|
|
3583
3596
|
}
|
|
3584
|
-
async function
|
|
3585
|
-
const
|
|
3586
|
-
if (
|
|
3597
|
+
async function $(h, x) {
|
|
3598
|
+
const N = Qt(), F = new FormData();
|
|
3599
|
+
if (x && F.append("file", x), F.append("message", h), F.append("project", t.projectPath), F.append("user", t.username), F.append("sessionID", N), l.value !== "")
|
|
3587
3600
|
o("direct-agent-chat", l.value, h);
|
|
3588
3601
|
else {
|
|
3589
|
-
|
|
3590
|
-
const
|
|
3591
|
-
if (!
|
|
3592
|
-
|
|
3602
|
+
E("", "bot");
|
|
3603
|
+
const J = z();
|
|
3604
|
+
if (!J) return;
|
|
3605
|
+
const se = /* @__PURE__ */ new Map(), fe = 1e3;
|
|
3606
|
+
await b(
|
|
3593
3607
|
F,
|
|
3594
|
-
(
|
|
3595
|
-
|
|
3608
|
+
(ie) => {
|
|
3609
|
+
J && (J.message += ie);
|
|
3610
|
+
},
|
|
3611
|
+
(ie) => {
|
|
3612
|
+
if (!J || !ie) return;
|
|
3613
|
+
const { event: ze, data: k } = ie;
|
|
3614
|
+
if (!k || !k.id) return;
|
|
3615
|
+
const ce = (ue) => {
|
|
3616
|
+
J.message && !J.message.endsWith(`
|
|
3617
|
+
|
|
3618
|
+
`) && (J.message += `
|
|
3619
|
+
|
|
3620
|
+
`), J.message += `${ue}
|
|
3621
|
+
|
|
3622
|
+
`;
|
|
3623
|
+
}, oe = (ue) => {
|
|
3624
|
+
J.message = J.message.replace(ue.html, k.html), se.delete(k.id);
|
|
3625
|
+
};
|
|
3626
|
+
switch (ze) {
|
|
3627
|
+
case "tool_start": {
|
|
3628
|
+
se.set(k.id, { html: k.html, startedAt: Date.now() }), ce(k.html);
|
|
3629
|
+
break;
|
|
3630
|
+
}
|
|
3631
|
+
case "tool_end": {
|
|
3632
|
+
const ue = se.get(k.id);
|
|
3633
|
+
if (ue) {
|
|
3634
|
+
const Yt = Date.now() - ue.startedAt, ut = Math.max(0, fe - Yt);
|
|
3635
|
+
ut > 0 ? setTimeout(() => oe(ue), ut) : oe(ue);
|
|
3636
|
+
} else
|
|
3637
|
+
ce(k.html);
|
|
3638
|
+
break;
|
|
3639
|
+
}
|
|
3640
|
+
}
|
|
3596
3641
|
},
|
|
3597
|
-
(
|
|
3598
|
-
|
|
3642
|
+
(ie) => {
|
|
3643
|
+
Z(!0), E(c.botIsSick), console.error("Error sending message: " + ie), j(J.id);
|
|
3599
3644
|
}
|
|
3600
3645
|
);
|
|
3601
3646
|
}
|
|
3602
3647
|
}
|
|
3603
3648
|
async function q() {
|
|
3604
|
-
const { data: h, error:
|
|
3649
|
+
const { data: h, error: x } = await s(
|
|
3605
3650
|
t.username,
|
|
3606
3651
|
t.projectPath,
|
|
3607
3652
|
l.value,
|
|
3608
3653
|
u.value
|
|
3609
3654
|
);
|
|
3610
|
-
if (
|
|
3611
|
-
|
|
3655
|
+
if (x || !h || !h.success) {
|
|
3656
|
+
Z(!0), E(c.loginError), console.log("Error clearing chat: " + x);
|
|
3612
3657
|
return;
|
|
3613
3658
|
}
|
|
3614
|
-
|
|
3659
|
+
te(), D();
|
|
3615
3660
|
}
|
|
3616
|
-
function
|
|
3617
|
-
const
|
|
3618
|
-
return h === "user" &&
|
|
3661
|
+
function I(h) {
|
|
3662
|
+
const x = ["q-chatbot__messages-wrapper"];
|
|
3663
|
+
return h === "user" && x.push("q-chatbot__messages-wrapper_right"), x;
|
|
3619
3664
|
}
|
|
3620
|
-
async function
|
|
3621
|
-
l.value = h.key, u.value = h.formId,
|
|
3665
|
+
async function U(h) {
|
|
3666
|
+
l.value = h.key, u.value = h.formId, te(), await B();
|
|
3622
3667
|
}
|
|
3623
|
-
function
|
|
3668
|
+
function R(h) {
|
|
3624
3669
|
!h || h.length === 0 || o("apply-fields", h);
|
|
3625
3670
|
}
|
|
3626
|
-
function
|
|
3627
|
-
const
|
|
3628
|
-
o("direct-agent-chat", l.value,
|
|
3671
|
+
function H(h) {
|
|
3672
|
+
const x = c.regenerateResponsePrompt.replace("{0}", h);
|
|
3673
|
+
o("direct-agent-chat", l.value, x);
|
|
3629
3674
|
}
|
|
3630
|
-
return
|
|
3675
|
+
return le(
|
|
3631
3676
|
() => t.availableAgents,
|
|
3632
|
-
(h,
|
|
3633
|
-
h.length === 0 &&
|
|
3677
|
+
(h, x) => {
|
|
3678
|
+
h.length === 0 && x.length > 0 && (l.value = "", u.value = "", te(), B());
|
|
3634
3679
|
}
|
|
3635
|
-
),
|
|
3680
|
+
), le(
|
|
3636
3681
|
() => t.agentData,
|
|
3637
|
-
async (h,
|
|
3638
|
-
if (
|
|
3639
|
-
const
|
|
3640
|
-
h.id !== l.value && await
|
|
3682
|
+
async (h, x) => {
|
|
3683
|
+
if (Q.value) return;
|
|
3684
|
+
const N = h.jobId, F = x.jobId, J = N !== F;
|
|
3685
|
+
h.id !== l.value && await U({ formId: h.formId, key: h.id }), N && J && await v(N);
|
|
3641
3686
|
},
|
|
3642
3687
|
{ deep: !0 }
|
|
3643
|
-
), (h,
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
disabled:
|
|
3688
|
+
), (h, x) => (y(), A("div", Fr, [
|
|
3689
|
+
L("div", Or, [
|
|
3690
|
+
S(f(Ir), {
|
|
3691
|
+
disabled: Q.value,
|
|
3647
3692
|
"available-agents": t.availableAgents,
|
|
3648
3693
|
"selected-agent-key": l.value,
|
|
3649
3694
|
onClear: q,
|
|
3650
|
-
onChangeChat:
|
|
3695
|
+
onChangeChat: U
|
|
3651
3696
|
}, null, 8, ["disabled", "available-agents", "selected-agent-key"]),
|
|
3652
|
-
|
|
3697
|
+
L("div", {
|
|
3653
3698
|
ref_key: "messagesContainer",
|
|
3654
3699
|
ref: a,
|
|
3655
3700
|
class: "q-chatbot__messages-container",
|
|
3656
|
-
onScroll:
|
|
3701
|
+
onScroll: ne
|
|
3657
3702
|
}, [
|
|
3658
|
-
(y(!0),
|
|
3659
|
-
key:
|
|
3660
|
-
class:
|
|
3703
|
+
(y(!0), A(pe, null, Be(f(_), (N) => (y(), A("div", {
|
|
3704
|
+
key: N.id,
|
|
3705
|
+
class: W(I(N.sender))
|
|
3661
3706
|
}, [
|
|
3662
|
-
|
|
3707
|
+
S(f(mr), de({ ref_for: !0 }, N, {
|
|
3663
3708
|
"date-format": t.dateFormat,
|
|
3664
3709
|
"user-image": t.userImage,
|
|
3665
3710
|
"chatbot-image": t.chatbotImage,
|
|
3666
|
-
loading: f(p) && !
|
|
3667
|
-
file:
|
|
3711
|
+
loading: f(p) && !N.message,
|
|
3712
|
+
file: N.file,
|
|
3668
3713
|
"api-endpoint": t.apiEndpoint,
|
|
3669
|
-
"session-i-d":
|
|
3670
|
-
fields:
|
|
3671
|
-
onRegenerate:
|
|
3672
|
-
onApplyFields:
|
|
3714
|
+
"session-i-d": N.sessionID,
|
|
3715
|
+
fields: N.fields,
|
|
3716
|
+
onRegenerate: H,
|
|
3717
|
+
onApplyFields: R
|
|
3673
3718
|
}), null, 16, ["date-format", "user-image", "chatbot-image", "loading", "file", "api-endpoint", "session-i-d", "fields"])
|
|
3674
3719
|
], 2))), 128))
|
|
3675
3720
|
], 544)
|
|
3676
3721
|
]),
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
disabled:
|
|
3722
|
+
L("div", Ur, [
|
|
3723
|
+
S(f(Mr), {
|
|
3724
|
+
disabled: Q.value,
|
|
3680
3725
|
loading: f(p),
|
|
3681
3726
|
onSendMessage: d
|
|
3682
3727
|
}, null, 8, ["disabled", "loading"])
|
|
@@ -3685,5 +3730,5 @@ const hr = { class: "q-chatbot__dialog-title" }, yr = {
|
|
|
3685
3730
|
}
|
|
3686
3731
|
});
|
|
3687
3732
|
export {
|
|
3688
|
-
|
|
3733
|
+
zr as default
|
|
3689
3734
|
};
|