@pagelines/sdk 1.0.913 → 1.0.915
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/BotProvider.js +115 -115
- package/dist/BotProvider.js.map +1 -1
- package/dist/BotWidgetModal.js +30 -185
- package/dist/BotWidgetModal.js.map +1 -1
- package/dist/BotWrap.js +1369 -1040
- package/dist/BotWrap.js.map +1 -1
- package/dist/bot/BotController.d.ts +24 -2
- package/dist/bot/index.d.ts +3 -2
- package/dist/bot/ui/ShareReplyDialog.vue.d.ts +14 -0
- package/dist/bot/ui/VoiceMode.vue.d.ts +3 -2
- package/dist/bot/voice/provider.d.ts +2 -2
- package/dist/bot/voice/providers/livekit/provider.d.ts +6 -0
- package/dist/bot/voice/voice-end-copy.d.ts +8 -0
- package/dist/bot/voice/voice-session-client.d.ts +4 -1
- package/dist/bot.js +9 -9
- package/dist/bot.js.map +1 -1
- package/dist/provider.js.map +1 -1
- package/dist/provider2.js +1165 -1162
- package/dist/provider2.js.map +1 -1
- package/dist/sdk.css +1 -1
- package/dist/widget.js +49 -49
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/BotProvider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./rolldown-runtime.js";
|
|
2
2
|
import { SOCIAL_PLATFORMS as e } from "./constants.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as t, d as n, f as r, l as i, m as a, n as o, o as s, p as c, s as l, t as u } from "./BotWrap.js";
|
|
4
4
|
import { Bot as d, getColorSchemeOklch as ee } from "@pagelines/core";
|
|
5
5
|
import { Fragment as f, Transition as p, TransitionGroup as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as w, mergeProps as T, normalizeClass as E, normalizeProps as D, normalizeStyle as O, onMounted as k, onUnmounted as te, openBlock as A, ref as j, renderList as M, renderSlot as N, shallowRef as ne, toDisplayString as P, unref as F, watch as I, withCtx as L, withKeys as R, withModifiers as z } from "vue";
|
|
6
6
|
//#region bot/schema.ts
|
|
@@ -53,23 +53,23 @@ var B = [
|
|
|
53
53
|
__name: "ElAuthGate",
|
|
54
54
|
props: { sdk: {} },
|
|
55
55
|
setup(e) {
|
|
56
|
-
let
|
|
56
|
+
let n = j({
|
|
57
57
|
email: "",
|
|
58
58
|
code: ""
|
|
59
|
-
}), r = j("email"),
|
|
59
|
+
}), r = j("email"), a = j(!1), o = {
|
|
60
60
|
email: {
|
|
61
61
|
title: "Enter Your Email",
|
|
62
62
|
button: {
|
|
63
63
|
label: "Continue",
|
|
64
|
-
disabled: () => !
|
|
64
|
+
disabled: () => !n.value.email || a.value
|
|
65
65
|
},
|
|
66
66
|
action: async () => {
|
|
67
|
-
if (!
|
|
68
|
-
|
|
67
|
+
if (!a.value) {
|
|
68
|
+
a.value = !0;
|
|
69
69
|
try {
|
|
70
|
-
await e.sdk.auth.requestAuthCode({ email:
|
|
70
|
+
await e.sdk.auth.requestAuthCode({ email: n.value.email }) && (r.value = "code");
|
|
71
71
|
} finally {
|
|
72
|
-
|
|
72
|
+
a.value = !1;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -78,26 +78,26 @@ var B = [
|
|
|
78
78
|
title: "Enter Verification Code",
|
|
79
79
|
button: {
|
|
80
80
|
label: "Verify",
|
|
81
|
-
disabled: () =>
|
|
81
|
+
disabled: () => n.value.code.length !== 6 || a.value
|
|
82
82
|
},
|
|
83
83
|
action: async () => {
|
|
84
|
-
if (!
|
|
85
|
-
|
|
84
|
+
if (!a.value) {
|
|
85
|
+
a.value = !0;
|
|
86
86
|
try {
|
|
87
87
|
await e.sdk.auth.loginWithCode({
|
|
88
|
-
email:
|
|
89
|
-
code:
|
|
88
|
+
email: n.value.email,
|
|
89
|
+
code: n.value.code
|
|
90
90
|
});
|
|
91
91
|
} finally {
|
|
92
|
-
|
|
92
|
+
a.value = !1;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
}, s = h(() =>
|
|
97
|
+
}, s = h(() => o[r.value]);
|
|
98
98
|
return I(() => e.sdk.activeUser.value, (e) => {
|
|
99
99
|
e && r.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: e.email });
|
|
100
|
-
}), (
|
|
100
|
+
}), (a, o) => (A(), v("div", {
|
|
101
101
|
"data-test": "auth-form",
|
|
102
102
|
"data-test-mode": r.value,
|
|
103
103
|
class: "flex flex-col items-center justify-center h-full p-6"
|
|
@@ -105,14 +105,14 @@ var B = [
|
|
|
105
105
|
e.sdk.error.value ? (A(), v("p", W, P(e.sdk.error.value), 1)) : _("", !0),
|
|
106
106
|
y("h3", G, P(s.value.title), 1),
|
|
107
107
|
y("div", K, [S(V, null, {
|
|
108
|
-
default: L(() => [r.value === "email" ? (A(), v("div", q, [S(
|
|
109
|
-
modelValue:
|
|
110
|
-
"onUpdate:modelValue":
|
|
108
|
+
default: L(() => [r.value === "email" ? (A(), v("div", q, [S(t, {
|
|
109
|
+
modelValue: n.value.email,
|
|
110
|
+
"onUpdate:modelValue": o[0] || (o[0] = (e) => n.value.email = e),
|
|
111
111
|
"data-test": "auth-email-input",
|
|
112
112
|
onKeyup: R(s.value.action, ["enter"])
|
|
113
|
-
}, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", re, [S(
|
|
114
|
-
modelValue:
|
|
115
|
-
"onUpdate:modelValue":
|
|
113
|
+
}, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", re, [S(l, {
|
|
114
|
+
modelValue: n.value.code,
|
|
115
|
+
"onUpdate:modelValue": o[1] || (o[1] = (e) => n.value.code = e),
|
|
116
116
|
length: 6,
|
|
117
117
|
"focus-first": !0,
|
|
118
118
|
"data-test": "auth-code-input",
|
|
@@ -120,7 +120,7 @@ var B = [
|
|
|
120
120
|
}, null, 8, ["modelValue", "onAutoSubmit"])])), (A(), v("div", {
|
|
121
121
|
key: s.value.button.label,
|
|
122
122
|
class: "space-y-4 w-full"
|
|
123
|
-
}, [S(
|
|
123
|
+
}, [S(i, {
|
|
124
124
|
theme: "primary",
|
|
125
125
|
size: "md",
|
|
126
126
|
class: "w-full",
|
|
@@ -138,7 +138,7 @@ var B = [
|
|
|
138
138
|
]), r.value === "code" ? (A(), v("button", {
|
|
139
139
|
key: 0,
|
|
140
140
|
class: "w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",
|
|
141
|
-
onClick:
|
|
141
|
+
onClick: o[2] || (o[2] = (e) => r.value = "email")
|
|
142
142
|
}, " Change Email ")) : _("", !0)]))]),
|
|
143
143
|
_: 1
|
|
144
144
|
})])
|
|
@@ -162,19 +162,19 @@ var B = [
|
|
|
162
162
|
default: !1
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
|
-
setup(
|
|
166
|
-
return (
|
|
167
|
-
bot:
|
|
168
|
-
"is-online":
|
|
165
|
+
setup(t) {
|
|
166
|
+
return (n, r) => (A(), v("div", Y, [S(s, {
|
|
167
|
+
bot: t.bot,
|
|
168
|
+
"is-online": t.isOnline
|
|
169
169
|
}, null, 8, ["bot", "is-online"]), y("div", X, [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
href: `mailto:${
|
|
170
|
+
t.bot.summary.value ? (A(), v("div", ie, [r[0] || (r[0] = y("h3", { class: "font-medium text-white/50" }, " About ", -1)), y("p", ae, P(t.bot.summary.value), 1)])) : _("", !0),
|
|
171
|
+
t.bot.email.value ? (A(), v("div", oe, [r[2] || (r[2] = y("h3", { class: "text-sm font-medium text-white/90" }, " Contact ", -1)), y("a", {
|
|
172
|
+
href: `mailto:${t.bot.email.value}`,
|
|
173
173
|
target: "_blank",
|
|
174
174
|
rel: "noopener noreferrer",
|
|
175
175
|
class: "relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/5 hover:bg-white/10 border border-white/10 text-white/80 text-sm justify-start h-10 w-full"
|
|
176
|
-
}, [...
|
|
177
|
-
|
|
176
|
+
}, [...r[1] || (r[1] = [y("span", { class: "i-heroicons-envelope flex items-center size-[1.1em] mt-[-.07em]" }, null, -1), x(" Email ", -1)])], 8, se)])) : _("", !0),
|
|
177
|
+
t.bot.accounts.value && t.bot.accounts.value.length > 0 ? (A(), v("div", ce, [r[3] || (r[3] = y("h3", { class: "text-sm font-medium text-white/90" }, " Links ", -1)), y("div", le, [(A(!0), v(f, null, M(t.bot.accounts.value, (t) => (A(), v("a", {
|
|
178
178
|
key: `${t.platform}-${t.handle}`,
|
|
179
179
|
href: F(e)[t.platform].getUrl(t.handle),
|
|
180
180
|
target: "_blank",
|
|
@@ -196,15 +196,15 @@ var B = [
|
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
setup(e) {
|
|
199
|
-
return (t,
|
|
199
|
+
return (t, r) => (A(), v("div", fe, [y("div", pe, [y("div", me, [y("img", {
|
|
200
200
|
src: e.bot.avatarUrl.value,
|
|
201
201
|
alt: e.bot.displayName.value,
|
|
202
202
|
class: "w-full h-full object-cover",
|
|
203
|
-
onError:
|
|
204
|
-
}, null, 40, he)]), y("div", ge, [e.isOnline ? (A(), v(f, { key: 0 }, [
|
|
203
|
+
onError: r[0] || (r[0] = (...e) => F(n) && F(n)(...e))
|
|
204
|
+
}, null, 40, he)]), y("div", ge, [e.isOnline ? (A(), v(f, { key: 0 }, [r[1] || (r[1] = y("div", {
|
|
205
205
|
class: "size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
206
206
|
style: { "animation-duration": "3s" }
|
|
207
|
-
}, null, -1)),
|
|
207
|
+
}, null, -1)), r[2] || (r[2] = y("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (A(), v("div", _e))])]), y("div", ve, [y("h1", ye, P(e.bot.displayName.value), 1), y("p", be, P(e.bot.title.value), 1)])]));
|
|
208
208
|
}
|
|
209
209
|
}), Se = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, Ce = /* @__PURE__ */ C({
|
|
210
210
|
name: "SelfSidebarClose",
|
|
@@ -508,17 +508,17 @@ var B = [
|
|
|
508
508
|
"turnStarted",
|
|
509
509
|
"turnCompleted"
|
|
510
510
|
],
|
|
511
|
-
setup(
|
|
512
|
-
let l =
|
|
511
|
+
setup(t, { emit: n }) {
|
|
512
|
+
let l = n, u = ne(), d = j(!1), p = j(!1), m = j(), C = j(), T = h(() => u.value?.botMode?.value ?? "self"), R = h(() => u.value?.textState.value.isConnected ?? !1), V = h(() => t.sdk.activeUser.value !== void 0), H = h(() => B.find((e) => e.mode === T.value));
|
|
513
513
|
function createChatController() {
|
|
514
514
|
u.value && u.value.destroy();
|
|
515
515
|
try {
|
|
516
|
-
u.value = new
|
|
517
|
-
sdk:
|
|
518
|
-
bot:
|
|
519
|
-
context:
|
|
520
|
-
firstMessage:
|
|
521
|
-
...
|
|
516
|
+
u.value = new c({
|
|
517
|
+
sdk: t.sdk,
|
|
518
|
+
bot: t.bot,
|
|
519
|
+
context: t.context,
|
|
520
|
+
firstMessage: t.firstMessage,
|
|
521
|
+
...t.createVoiceClientFn ? { createVoiceClientFn: t.createVoiceClientFn } : {},
|
|
522
522
|
onTurnStarted: () => l("turnStarted"),
|
|
523
523
|
onTurnCompleted: (e) => l("turnCompleted", e)
|
|
524
524
|
});
|
|
@@ -541,19 +541,19 @@ var B = [
|
|
|
541
541
|
}
|
|
542
542
|
k(() => {
|
|
543
543
|
try {
|
|
544
|
-
applyTheme(
|
|
544
|
+
applyTheme(t.theme), t.chatOnly && u.value && u.value.setMode("chat");
|
|
545
545
|
} catch (e) {
|
|
546
546
|
let t = e instanceof Error ? e.message : "Couldn't initialize your assistant";
|
|
547
547
|
m.value = t, l("error", t);
|
|
548
548
|
}
|
|
549
549
|
}), te(() => {
|
|
550
550
|
u.value && u.value.destroy();
|
|
551
|
-
}), I(() =>
|
|
551
|
+
}), I(() => t.theme, (e) => {
|
|
552
552
|
applyTheme(e);
|
|
553
|
-
}), I(() =>
|
|
553
|
+
}), I(() => t.sdk.activeUser.value, (e, t) => {
|
|
554
554
|
t && !e && u.value && u.value.setMode("self");
|
|
555
555
|
});
|
|
556
|
-
let U = h(() => !!(
|
|
556
|
+
let U = h(() => !!(t.bot.cover.value?.src && t.bot.cover.value?.quality === "low") || !!(t.bot.avatar.value?.src && t.bot.avatar.value?.quality === "low")), W = h(() => {
|
|
557
557
|
let e = [U.value ? "backdrop-blur-sm" : ""];
|
|
558
558
|
return U.value && T.value === "self" ? e.push("from-black/80 via-black/60 to-black/80") : T.value === "self" ? e.push("from-black/70 via-black/50 to-black/80") : e.push("from-black/90 via-black/90 to-black/100"), e.join(" ");
|
|
559
559
|
}), G = {
|
|
@@ -563,71 +563,71 @@ var B = [
|
|
|
563
563
|
message: "i-heroicons-chat-bubble-left-right",
|
|
564
564
|
sparkles: "i-heroicons-sparkles"
|
|
565
565
|
}, K = h(() => r({
|
|
566
|
-
template:
|
|
567
|
-
bot:
|
|
568
|
-
})), q = h(() => G[
|
|
569
|
-
return (
|
|
566
|
+
template: t.buttonText || "Talk to {name}",
|
|
567
|
+
bot: t.bot.toData()
|
|
568
|
+
})), q = h(() => G[t.buttonIcon || "phone"] || G.phone);
|
|
569
|
+
return (n, r) => (A(), v("div", {
|
|
570
570
|
ref_key: "rootElement",
|
|
571
571
|
ref: C,
|
|
572
|
-
key:
|
|
572
|
+
key: t.bot.avatarUrl.value,
|
|
573
573
|
class: "pagelines-sdk @container/bot pagelines-bot w-full h-full overflow-hidden relative",
|
|
574
574
|
"data-test": "bot-chat"
|
|
575
575
|
}, [
|
|
576
|
-
|
|
576
|
+
t.loading ? (A(), v("div", Pe, [S(a, { class: "text-white size-8" })])) : t.bot && !m.value ? (A(), v("div", {
|
|
577
577
|
key: 1,
|
|
578
|
-
class: E(["absolute inset-0",
|
|
579
|
-
style: O(
|
|
580
|
-
"data-quality":
|
|
581
|
-
}, [
|
|
578
|
+
class: E(["absolute inset-0", t.bare ? "" : "bg-cover bg-center bg-no-repeat"]),
|
|
579
|
+
style: O(t.bare ? void 0 : { backgroundImage: `url(${t.bot.avatarUrl.value})` }),
|
|
580
|
+
"data-quality": t.bot.avatar.value?.quality || "none"
|
|
581
|
+
}, [t.bare ? _("", !0) : (A(), v("div", {
|
|
582
582
|
key: 0,
|
|
583
583
|
class: E(["absolute inset-0 bg-gradient-to-br z-0", W.value])
|
|
584
|
-
}, null, 2)), y("div", { class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform",
|
|
584
|
+
}, null, 2)), y("div", { class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", t.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"]) }, [!t.bare || t.hasClose ? (A(), v("div", {
|
|
585
585
|
key: 0,
|
|
586
|
-
class: E(["relative z-30 p-2", !
|
|
587
|
-
}, [
|
|
586
|
+
class: E(["relative z-30 p-2", !t.bare && T.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
587
|
+
}, [t.chatOnly ? (A(), v("div", {
|
|
588
588
|
key: 0,
|
|
589
|
-
class: E(["flex items-center",
|
|
590
|
-
}, [
|
|
591
|
-
src:
|
|
592
|
-
alt:
|
|
589
|
+
class: E(["flex items-center", t.bare ? "justify-end" : ""])
|
|
590
|
+
}, [t.bare ? _("", !0) : (A(), v("div", Ie, [y("img", {
|
|
591
|
+
src: t.bot.avatarUrl.value,
|
|
592
|
+
alt: t.bot.displayName.value,
|
|
593
593
|
class: "size-8 rounded-full object-cover"
|
|
594
|
-
}, null, 8, Le), y("span", Re, P(
|
|
595
|
-
class: E(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors",
|
|
596
|
-
onClick:
|
|
597
|
-
}, [...
|
|
594
|
+
}, null, 8, Le), y("span", Re, P(t.bot.displayName.value), 1)])), t.hasClose ? (A(), v("div", ze, [y("button", {
|
|
595
|
+
class: E(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors", t.bare ? "text-theme-500 hover:bg-theme-50" : "text-white/70 hover:bg-white/10"]),
|
|
596
|
+
onClick: r[0] || (r[0] = z((e) => l("close", "button"), ["stop"]))
|
|
597
|
+
}, [...r[7] || (r[7] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])], 2)])) : _("", !0)], 2)) : (A(), v("div", {
|
|
598
598
|
key: 1,
|
|
599
|
-
class: E(["flex items-center",
|
|
599
|
+
class: E(["flex items-center", t.hasClose ? "" : "justify-between"])
|
|
600
600
|
}, [
|
|
601
|
-
y("div", { class: E(
|
|
601
|
+
y("div", { class: E(t.hasClose ? "flex-1 basis-0" : "") }, [y("button", {
|
|
602
602
|
class: "cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",
|
|
603
|
-
onClick:
|
|
604
|
-
}, [...
|
|
603
|
+
onClick: r[1] || (r[1] = (e) => d.value = !0)
|
|
604
|
+
}, [...r[8] || (r[8] = [y("i", { class: "i-tabler-menu size-7" }, null, -1)])])], 2),
|
|
605
605
|
y("button", {
|
|
606
606
|
class: E(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0", { "bg-white/10": p.value }]),
|
|
607
|
-
onClick:
|
|
607
|
+
onClick: r[2] || (r[2] = (e) => p.value = !0)
|
|
608
608
|
}, [
|
|
609
609
|
y("i", { class: E([H.value?.icon, "size-4 opacity-60"]) }, null, 2),
|
|
610
610
|
y("span", Be, P(H.value?.label), 1),
|
|
611
|
-
|
|
611
|
+
r[9] || (r[9] = y("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
612
612
|
], 2),
|
|
613
|
-
|
|
613
|
+
t.hasClose ? (A(), v("div", Ve, [y("button", {
|
|
614
614
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
615
|
-
onClick:
|
|
616
|
-
}, [...
|
|
617
|
-
], 2))], 2)) : _("", !0),
|
|
615
|
+
onClick: r[3] || (r[3] = z((e) => l("close", "button"), ["stop"]))
|
|
616
|
+
}, [...r[10] || (r[10] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])])])) : _("", !0)
|
|
617
|
+
], 2))], 2)) : _("", !0), t.chatOnly ? (A(), v("div", {
|
|
618
618
|
key: 1,
|
|
619
|
-
class: E(["relative z-20 flex min-h-0 w-full flex-1 flex-col",
|
|
620
|
-
}, [y("div", { class: E(["min-h-0 w-full flex-1",
|
|
619
|
+
class: E(["relative z-20 flex min-h-0 w-full flex-1 flex-col", t.bare ? "" : "px-4"])
|
|
620
|
+
}, [y("div", { class: E(["min-h-0 w-full flex-1", t.bare ? "" : "mx-auto max-w-md"]) }, [S(o, {
|
|
621
621
|
"chat-controller": u.value,
|
|
622
|
-
bot:
|
|
622
|
+
bot: t.bot,
|
|
623
623
|
scope: V.value ? "private" : "public",
|
|
624
|
-
"empty-state-message":
|
|
625
|
-
variant:
|
|
626
|
-
"show-header": !
|
|
627
|
-
centered:
|
|
628
|
-
}, b({ _: 2 }, [
|
|
624
|
+
"empty-state-message": t.emptyStateMessage,
|
|
625
|
+
variant: t.bare ? "light" : "dark",
|
|
626
|
+
"show-header": !t.bare,
|
|
627
|
+
centered: t.bare
|
|
628
|
+
}, b({ _: 2 }, [n.$slots["empty-heading"] ? {
|
|
629
629
|
name: "empty-heading",
|
|
630
|
-
fn: L((e) => [N(
|
|
630
|
+
fn: L((e) => [N(n.$slots, "empty-heading", D(w(e)))]),
|
|
631
631
|
key: "0"
|
|
632
632
|
} : void 0]), 1032, [
|
|
633
633
|
"chat-controller",
|
|
@@ -638,60 +638,60 @@ var B = [
|
|
|
638
638
|
"show-header",
|
|
639
639
|
"centered"
|
|
640
640
|
])], 2)], 2)) : (A(), v(f, { key: 2 }, [T.value === "self" ? (A(), v("div", He, [
|
|
641
|
-
|
|
641
|
+
r[11] || (r[11] = y("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
|
|
642
642
|
S(xe, {
|
|
643
|
-
bot:
|
|
643
|
+
bot: t.bot,
|
|
644
644
|
"is-online": R.value
|
|
645
645
|
}, null, 8, ["bot", "is-online"]),
|
|
646
|
-
y("div", Q, [S(
|
|
646
|
+
y("div", Q, [S(i, {
|
|
647
647
|
theme: "primary",
|
|
648
648
|
size: "lg",
|
|
649
649
|
class: "w-full",
|
|
650
650
|
icon: q.value,
|
|
651
651
|
"data-test": "voice-button",
|
|
652
|
-
onClick:
|
|
652
|
+
onClick: r[4] || (r[4] = (e) => u.value?.setMode("talk"))
|
|
653
653
|
}, {
|
|
654
654
|
default: L(() => [x(P(K.value), 1)]),
|
|
655
655
|
_: 1
|
|
656
|
-
}, 8, ["icon"]),
|
|
656
|
+
}, 8, ["icon"]), t.bot.accounts.value && t.bot.accounts.value.length > 0 ? (A(), v("div", Ue, [(A(!0), v(f, null, M((t.bot.accounts.value || []).filter((t) => F(e)[t.platform]), (t) => (A(), v("a", {
|
|
657
657
|
key: `${t.platform}-${t.handle}`,
|
|
658
658
|
href: F(e)[t.platform].getUrl(t.handle),
|
|
659
659
|
target: "_blank",
|
|
660
660
|
class: "size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"
|
|
661
661
|
}, [y("i", { class: E([F(e)[t.platform].icon, "size-5"]) }, null, 2)], 8, We))), 128))])) : _("", !0)])
|
|
662
|
-
])) : T.value === "talk" ? (A(), v("div", Ge, [
|
|
662
|
+
])) : T.value === "talk" ? (A(), v("div", Ge, [t.requireAuth && !V.value ? (A(), g(J, {
|
|
663
663
|
key: 0,
|
|
664
|
-
sdk:
|
|
665
|
-
}, null, 8, ["sdk"])) : (A(), v(f, { key: 1 }, [y("div", null, [y("div", Ke, [S(
|
|
666
|
-
bot:
|
|
664
|
+
sdk: t.sdk
|
|
665
|
+
}, null, 8, ["sdk"])) : (A(), v(f, { key: 1 }, [y("div", null, [y("div", Ke, [S(s, {
|
|
666
|
+
bot: t.bot,
|
|
667
667
|
"is-online": R.value
|
|
668
|
-
}, null, 8, ["bot", "is-online"])])]), S(
|
|
668
|
+
}, null, 8, ["bot", "is-online"])])]), S(o, {
|
|
669
669
|
"chat-controller": u.value,
|
|
670
|
-
bot:
|
|
671
|
-
}, null, 8, ["chat-controller", "bot"])], 64))])) : (A(), v("div", qe, [y("div", Je, [T.value === "chat" ? (A(), v(f, { key: 0 }, [
|
|
670
|
+
bot: t.bot
|
|
671
|
+
}, null, 8, ["chat-controller", "bot"])], 64))])) : (A(), v("div", qe, [y("div", Je, [T.value === "chat" ? (A(), v(f, { key: 0 }, [t.requireAuth && !V.value ? (A(), g(J, {
|
|
672
672
|
key: 0,
|
|
673
|
-
sdk:
|
|
674
|
-
}, null, 8, ["sdk"])) : (A(), g(
|
|
673
|
+
sdk: t.sdk
|
|
674
|
+
}, null, 8, ["sdk"])) : (A(), g(o, {
|
|
675
675
|
key: 1,
|
|
676
676
|
"chat-controller": u.value,
|
|
677
|
-
bot:
|
|
677
|
+
bot: t.bot,
|
|
678
678
|
"show-header": ""
|
|
679
679
|
}, null, 8, ["chat-controller", "bot"]))], 64)) : T.value === "info" ? (A(), g(de, {
|
|
680
680
|
key: 1,
|
|
681
|
-
bot:
|
|
681
|
+
bot: t.bot,
|
|
682
682
|
"is-online": R.value
|
|
683
683
|
}, null, 8, ["bot", "is-online"])) : _("", !0)])]))], 64))], 2)], 14, Fe)) : m.value ? (A(), v("div", Ye, [y("div", Xe, [
|
|
684
|
-
|
|
685
|
-
|
|
684
|
+
r[12] || (r[12] = y("div", { class: "flex justify-center" }, [y("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [y("i", { class: "i-tabler-alert-circle size-6 text-red-400" })])], -1)),
|
|
685
|
+
r[13] || (r[13] = y("h3", { class: "text-lg font-medium" }, " Bot Error ", -1)),
|
|
686
686
|
y("p", Ze, P(m.value), 1)
|
|
687
687
|
])])) : (A(), v("div", Qe, " Couldn't load your assistant. Please try again later. ")),
|
|
688
|
-
|
|
688
|
+
t.chatOnly ? _("", !0) : (A(), g(Ne, {
|
|
689
689
|
key: 4,
|
|
690
690
|
modelValue: d.value,
|
|
691
|
-
"onUpdate:modelValue":
|
|
692
|
-
bot:
|
|
693
|
-
sdk:
|
|
694
|
-
title:
|
|
691
|
+
"onUpdate:modelValue": r[5] || (r[5] = (e) => d.value = e),
|
|
692
|
+
bot: t.bot,
|
|
693
|
+
sdk: t.sdk,
|
|
694
|
+
title: t.bot.displayName.value,
|
|
695
695
|
"data-test": "bot-sidebar"
|
|
696
696
|
}, null, 8, [
|
|
697
697
|
"modelValue",
|
|
@@ -699,10 +699,10 @@ var B = [
|
|
|
699
699
|
"sdk",
|
|
700
700
|
"title"
|
|
701
701
|
])),
|
|
702
|
-
|
|
702
|
+
t.chatOnly ? _("", !0) : (A(), g(Me, {
|
|
703
703
|
key: 5,
|
|
704
704
|
modelValue: p.value,
|
|
705
|
-
"onUpdate:modelValue":
|
|
705
|
+
"onUpdate:modelValue": r[6] || (r[6] = (e) => p.value = e),
|
|
706
706
|
"chat-controller": u.value,
|
|
707
707
|
"data-test": "bot-mode-sidebar"
|
|
708
708
|
}, null, 8, ["modelValue", "chat-controller"]))
|
|
@@ -733,7 +733,7 @@ var B = [
|
|
|
733
733
|
],
|
|
734
734
|
setup(e, { emit: t }) {
|
|
735
735
|
let n = e, r = t;
|
|
736
|
-
return (e, t) => (A(), g(
|
|
736
|
+
return (e, t) => (A(), g(u, T(n, { class: "bot-provider size-full relative" }), {
|
|
737
737
|
default: L((i) => [S($, {
|
|
738
738
|
sdk: i.sdk,
|
|
739
739
|
bot: i.bot,
|