@pagelines/sdk 1.0.812 → 1.0.813
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/AgentProvider.js +2 -8
- package/dist/AgentProvider.js.map +1 -1
- package/dist/AgentWrap.js +444 -498
- package/dist/AgentWrap.js.map +1 -1
- package/dist/agent/AgentController.d.ts +0 -1
- package/dist/agent/ui/AgentChat.vue.d.ts +1 -2
- package/dist/agent/ui/AgentProvider.vue.d.ts +0 -2
- package/dist/agent/ui/ElAgentChat.vue.d.ts +9 -5
- package/dist/agent/ui/ElCreateAgent.vue.d.ts +2 -2
- package/dist/contract.js +4 -2
- package/dist/contract.js.map +1 -1
- package/dist/demo/index.d.ts +1 -1
- package/dist/widget/composables/useWidgetState.d.ts +3 -3
- package/dist/widget.js +1 -1
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./rolldown-runtime.js";
|
|
2
2
|
import { s as e, t } from "./sdkClient.js";
|
|
3
3
|
import { Agent as n, CHAT_ISSUE_COPY as r, CUSTOMER_AGENT_STATE_LABEL as i, SettingsObject as a, createLogger as o, customerAgentState as s, getDefaultAvatarUrl as c, isAssistantSilenceControl as u, parseChatCardFencePayload as f, parseChatVisualFencePayload as p } from "@pagelines/core";
|
|
4
|
-
import { Fragment as m, computed as h, createBlock as _, createCommentVNode as v, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as T, nextTick as te, normalizeClass as k, normalizeStyle as A, onBeforeUnmount as ne, onMounted as re, onUnmounted as j, openBlock as M, ref as P, renderList as F, renderSlot as I, resolveDynamicComponent as ie, shallowRef as
|
|
4
|
+
import { Fragment as m, computed as h, createBlock as _, createCommentVNode as v, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, defineComponent as T, nextTick as te, normalizeClass as k, normalizeStyle as A, onBeforeUnmount as ne, onMounted as re, onUnmounted as j, openBlock as M, ref as P, renderList as F, renderSlot as I, resolveDynamicComponent as ie, shallowRef as R, toDisplayString as B, unref as ae, vModelText as H, watch as oe, withCtx as se, withDirectives as ce, withKeys as ue, withModifiers as U } from "vue";
|
|
5
5
|
//#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var de = { class: "spinner max-w-sm" }, pe = {
|
|
7
7
|
class: "ring-circular h-full w-full origin-center",
|
|
8
8
|
viewBox: "25 25 50 50"
|
|
9
9
|
}, he = /* @__PURE__ */ T({
|
|
@@ -19,7 +19,7 @@ var U = { class: "spinner max-w-sm" }, pe = {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
setup(e) {
|
|
22
|
-
return (t, n) => (M(), b("div",
|
|
22
|
+
return (t, n) => (M(), b("div", de, [(M(), b("svg", pe, [x("circle", {
|
|
23
23
|
class: k([e.colorMode, "ring-path"]),
|
|
24
24
|
cx: "50",
|
|
25
25
|
cy: "50",
|
|
@@ -356,7 +356,7 @@ var K = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), be = /* @__PUR
|
|
|
356
356
|
...K,
|
|
357
357
|
"EMPTY_STREAM",
|
|
358
358
|
"RATE_LIMIT"
|
|
359
|
-
]), Se = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]),
|
|
359
|
+
]), Se = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Ce = {
|
|
360
360
|
CREDIT_LIMIT: "billing_budget_reached",
|
|
361
361
|
OVERAGE_CAP: "billing_runaway_cap"
|
|
362
362
|
};
|
|
@@ -393,7 +393,7 @@ function presentChatStreamError(e) {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
function transcriptMessageForChatStreamError(e) {
|
|
396
|
-
let t =
|
|
396
|
+
let t = Ce[e.code];
|
|
397
397
|
return t ? r[t].oneLine : e.error;
|
|
398
398
|
}
|
|
399
399
|
var AgentChatController = class extends a {
|
|
@@ -424,7 +424,7 @@ var AgentChatController = class extends a {
|
|
|
424
424
|
super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
|
|
425
425
|
hash: "",
|
|
426
426
|
time: 0
|
|
427
|
-
}), e(this, "isConnecting", !1), e(this, "turnEpoch", 0), e(this, "nextStreamToken", 0), e(this, "runningStreamToken", void 0), e(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), e(this, "
|
|
427
|
+
}), e(this, "isConnecting", !1), e(this, "turnEpoch", 0), e(this, "nextStreamToken", 0), e(this, "runningStreamToken", void 0), e(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), e(this, "queuedMessageIdSet", P(/* @__PURE__ */ new Set())), e(this, "queuedMessageIds", h(() => this.queuedMessageIdSet.value)), e(this, "boundaryTimer", void 0), e(this, "nowMs", R(Date.now())), e(this, "toolActivityTiming", R({})), e(this, "lastVisibleProgressAtMs", R()), e(this, "liveSegments", R([])), e(this, "liveStreamMessageId", R(void 0)), e(this, "conversationId", void 0), e(this, "textState", P({
|
|
428
428
|
isActive: !1,
|
|
429
429
|
isConnected: !1,
|
|
430
430
|
isThinking: !1,
|
|
@@ -555,15 +555,6 @@ var AgentChatController = class extends a {
|
|
|
555
555
|
if (!this.canSend.value) return;
|
|
556
556
|
let e = this.composerState.value.text, t = this.composerState.value.pendingAttachments.length > 0 ? [...this.composerState.value.pendingAttachments] : void 0;
|
|
557
557
|
if (!this.chatEnabled) {
|
|
558
|
-
if (this._agent.state.value.lifecycle === "starting") {
|
|
559
|
-
if (this.pendingStartupSend) return;
|
|
560
|
-
this.composerState.value = {
|
|
561
|
-
...this.composerState.value,
|
|
562
|
-
text: "",
|
|
563
|
-
pendingAttachments: []
|
|
564
|
-
}, await this.sendChatMessage(e, t);
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
558
|
this.addOfflineSystemReply();
|
|
568
559
|
return;
|
|
569
560
|
}
|
|
@@ -622,7 +613,7 @@ Current User:
|
|
|
622
613
|
});
|
|
623
614
|
}
|
|
624
615
|
setupBoundaryWatcher() {
|
|
625
|
-
|
|
616
|
+
oe(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
|
|
626
617
|
this.scheduleBoundary(e);
|
|
627
618
|
});
|
|
628
619
|
}
|
|
@@ -684,12 +675,12 @@ Current User:
|
|
|
684
675
|
});
|
|
685
676
|
}
|
|
686
677
|
setupModeWatcher() {
|
|
687
|
-
|
|
678
|
+
oe(this.agentMode, async (e, t) => {
|
|
688
679
|
this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
|
|
689
680
|
});
|
|
690
681
|
}
|
|
691
682
|
setupAvailabilityWatcher() {
|
|
692
|
-
|
|
683
|
+
oe(() => [this.chatEnabled, this._agent.state.value.lifecycle], ([e]) => {
|
|
693
684
|
if (!(!this.isTextMode || this.isConnecting)) {
|
|
694
685
|
if (e) {
|
|
695
686
|
this.textState.value.isConnected || this.updateState(this.textState, {
|
|
@@ -697,18 +688,8 @@ Current User:
|
|
|
697
688
|
connectionStatus: "connected",
|
|
698
689
|
error: void 0
|
|
699
690
|
});
|
|
700
|
-
let e = this.pendingStartupSend;
|
|
701
|
-
e && (this.pendingStartupSend = void 0, this.sendChatMessage(e.message, e.attachments));
|
|
702
691
|
return;
|
|
703
692
|
}
|
|
704
|
-
if (this.pendingStartupSend && t !== "starting") {
|
|
705
|
-
let e = this.pendingStartupSend;
|
|
706
|
-
this.pendingStartupSend = void 0, this.composerState.value.text || (this.composerState.value = {
|
|
707
|
-
...this.composerState.value,
|
|
708
|
-
text: e.message,
|
|
709
|
-
pendingAttachments: e.attachments ?? []
|
|
710
|
-
}), this.addOfflineSystemReply();
|
|
711
|
-
}
|
|
712
693
|
this.textState.value.isConnected && this.updateState(this.textState, {
|
|
713
694
|
isConnected: !1,
|
|
714
695
|
connectionStatus: "disconnected",
|
|
@@ -758,7 +739,7 @@ Current User:
|
|
|
758
739
|
}
|
|
759
740
|
}
|
|
760
741
|
async endConversation() {
|
|
761
|
-
if (this.turnEpoch += 1, this.
|
|
742
|
+
if (this.turnEpoch += 1, this.runningStreamToken = void 0, this.suppressedStreamTokens.clear(), this.queuedMessageIdSet.value = /* @__PURE__ */ new Set(), !this.isTextMode) {
|
|
762
743
|
this.resetState();
|
|
763
744
|
return;
|
|
764
745
|
}
|
|
@@ -771,13 +752,6 @@ Current User:
|
|
|
771
752
|
async sendChatMessage(e, t) {
|
|
772
753
|
if (!this.isTextMode) return;
|
|
773
754
|
let { chatStreamFn: n } = this.settings;
|
|
774
|
-
if (!this.chatEnabled && this._agent.state.value.lifecycle === "starting") {
|
|
775
|
-
this.pendingStartupSend || (this.pendingStartupSend = {
|
|
776
|
-
message: e,
|
|
777
|
-
attachments: t
|
|
778
|
-
}, this.notify(`${this._agent.displayName.value || "Your assistant"} is starting. Your message will send when ready.`));
|
|
779
|
-
return;
|
|
780
|
-
}
|
|
781
755
|
if (!this.chatEnabled) {
|
|
782
756
|
this.addOfflineSystemReply();
|
|
783
757
|
return;
|
|
@@ -1015,10 +989,10 @@ function parseButtonTemplate(e) {
|
|
|
1015
989
|
}
|
|
1016
990
|
//#endregion
|
|
1017
991
|
//#region agent/ui/ElAgentButton.vue?vue&type=script&setup=true&lang.ts
|
|
1018
|
-
var
|
|
992
|
+
var we = {
|
|
1019
993
|
key: 0,
|
|
1020
994
|
class: "absolute inset-0 flex items-center justify-center"
|
|
1021
|
-
},
|
|
995
|
+
}, Te = /* @__PURE__ */ T({
|
|
1022
996
|
__name: "ElAgentButton",
|
|
1023
997
|
props: {
|
|
1024
998
|
theme: { default: "primary" },
|
|
@@ -1046,7 +1020,7 @@ var Ce = {
|
|
|
1046
1020
|
md: "size-4",
|
|
1047
1021
|
lg: "size-5"
|
|
1048
1022
|
})[e.size]);
|
|
1049
|
-
return (i, a) => (M(), b("button", { class: k(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, n.value]]) }, [e.loading ? (M(), b("div",
|
|
1023
|
+
return (i, a) => (M(), b("button", { class: k(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, n.value]]) }, [e.loading ? (M(), b("div", we, [...a[0] || (a[0] = [x("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : v("", !0), x("span", { class: k(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
|
|
1050
1024
|
e.icon ? (M(), b("i", {
|
|
1051
1025
|
key: 0,
|
|
1052
1026
|
class: k([e.icon, r.value])
|
|
@@ -1058,7 +1032,7 @@ var Ce = {
|
|
|
1058
1032
|
}, null, 2)) : v("", !0)
|
|
1059
1033
|
], 2)], 2));
|
|
1060
1034
|
}
|
|
1061
|
-
}),
|
|
1035
|
+
}), Ee = ["value"], De = /* @__PURE__ */ T({
|
|
1062
1036
|
__name: "AgentInputEmail",
|
|
1063
1037
|
props: { modelValue: { default: "" } },
|
|
1064
1038
|
emits: ["update:modelValue"],
|
|
@@ -1077,9 +1051,9 @@ var Ce = {
|
|
|
1077
1051
|
class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
|
|
1078
1052
|
style: { "font-size": "16px" },
|
|
1079
1053
|
onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
|
|
1080
|
-
}, null, 40,
|
|
1054
|
+
}, null, 40, Ee));
|
|
1081
1055
|
}
|
|
1082
|
-
}),
|
|
1056
|
+
}), Oe = ["placeholder", "value"], ke = /* @__PURE__ */ T({
|
|
1083
1057
|
__name: "AgentInputOneTimeCode",
|
|
1084
1058
|
props: {
|
|
1085
1059
|
modelValue: {},
|
|
@@ -1112,12 +1086,12 @@ var Ce = {
|
|
|
1112
1086
|
class: "w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
|
|
1113
1087
|
style: { "font-size": "16px" },
|
|
1114
1088
|
onInput
|
|
1115
|
-
}, null, 40,
|
|
1089
|
+
}, null, 40, Oe));
|
|
1116
1090
|
}
|
|
1117
|
-
}),
|
|
1091
|
+
}), Ae = { class: "relative flex-shrink-0" }, je = ["src", "alt"], Me = { class: "absolute top-1 right-1" }, Ne = {
|
|
1118
1092
|
key: 1,
|
|
1119
1093
|
class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
|
|
1120
|
-
},
|
|
1094
|
+
}, Pe = { class: "min-w-0" }, Fe = /* @__PURE__ */ T({
|
|
1121
1095
|
__name: "ElModeHeader",
|
|
1122
1096
|
props: {
|
|
1123
1097
|
agent: {},
|
|
@@ -1129,17 +1103,17 @@ var Ce = {
|
|
|
1129
1103
|
layout: { default: "centered" }
|
|
1130
1104
|
},
|
|
1131
1105
|
setup(e) {
|
|
1132
|
-
return (t, n) => (M(), b("div", { class: k(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [x("div",
|
|
1106
|
+
return (t, n) => (M(), b("div", { class: k(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [x("div", Ae, [x("div", { class: k(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [x("img", {
|
|
1133
1107
|
src: e.agent.avatarUrl.value,
|
|
1134
1108
|
alt: e.agent.displayName.value,
|
|
1135
1109
|
class: "w-full h-full object-cover",
|
|
1136
|
-
onError: n[0] || (n[0] = (...e) =>
|
|
1137
|
-
}, null, 40,
|
|
1110
|
+
onError: n[0] || (n[0] = (...e) => ae(handleImageError) && ae(handleImageError)(...e))
|
|
1111
|
+
}, null, 40, je)], 2), x("div", Me, [e.isOnline ? (M(), b(m, { key: 0 }, [n[1] || (n[1] = x("div", {
|
|
1138
1112
|
class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
1139
1113
|
style: { "animation-duration": "3s" }
|
|
1140
|
-
}, null, -1)), n[2] || (n[2] = x("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (M(), b("div",
|
|
1114
|
+
}, null, -1)), n[2] || (n[2] = x("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (M(), b("div", Ne))])]), x("div", Pe, [x("h1", { class: k(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, B(e.agent.displayName.value), 3), x("p", { class: k(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, B(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
|
|
1141
1115
|
}
|
|
1142
|
-
}),
|
|
1116
|
+
}), Ie = { class: "relative shrink-0 rounded-full" }, Le = ["src", "alt"], Re = ["src", "alt"], ze = ["aria-label"], Be = /* @__PURE__ */ T({
|
|
1143
1117
|
__name: "AgentAvatar",
|
|
1144
1118
|
props: {
|
|
1145
1119
|
agent: {},
|
|
@@ -1171,25 +1145,25 @@ var Ce = {
|
|
|
1171
1145
|
top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
|
|
1172
1146
|
right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
|
|
1173
1147
|
}, i = h(() => e.isLight ? "ring-white" : "ring-theme-900");
|
|
1174
|
-
return (t, a) => (M(), b("div",
|
|
1148
|
+
return (t, a) => (M(), b("div", Ie, [
|
|
1175
1149
|
x("img", {
|
|
1176
1150
|
src: e.agent.avatarUrl.value,
|
|
1177
1151
|
alt: e.agent.displayName.value,
|
|
1178
1152
|
class: k(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
|
|
1179
|
-
}, null, 10,
|
|
1153
|
+
}, null, 10, Le),
|
|
1180
1154
|
e.showOwnerMark && e.agent.ownerMarkUrl.value ? (M(), b("img", {
|
|
1181
1155
|
key: 0,
|
|
1182
1156
|
src: e.agent.ownerMarkUrl.value,
|
|
1183
1157
|
alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
|
|
1184
1158
|
class: k(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
|
|
1185
|
-
}, null, 10,
|
|
1159
|
+
}, null, 10, Re)) : v("", !0),
|
|
1186
1160
|
n.value ? (M(), b("span", {
|
|
1187
1161
|
key: 1,
|
|
1188
1162
|
role: "status",
|
|
1189
1163
|
"aria-label": e.agent.state.value.tooltip,
|
|
1190
1164
|
class: k(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
|
|
1191
1165
|
style: r
|
|
1192
|
-
}, null, 10,
|
|
1166
|
+
}, null, 10, ze)) : v("", !0),
|
|
1193
1167
|
n.value && e.agent.state.value.lifecycle === "running" ? (M(), b("span", {
|
|
1194
1168
|
key: 2,
|
|
1195
1169
|
"aria-hidden": "true",
|
|
@@ -1198,28 +1172,28 @@ var Ce = {
|
|
|
1198
1172
|
}, null, 2)) : v("", !0)
|
|
1199
1173
|
]));
|
|
1200
1174
|
}
|
|
1201
|
-
}),
|
|
1175
|
+
}), Ve = {
|
|
1202
1176
|
key: 0,
|
|
1203
1177
|
class: "sr-only",
|
|
1204
1178
|
role: "status",
|
|
1205
1179
|
"aria-live": "polite"
|
|
1206
|
-
},
|
|
1180
|
+
}, He = ["aria-expanded", "disabled"], Ue = ["aria-expanded"], We = {
|
|
1207
1181
|
class: "flex w-5 shrink-0 justify-center self-stretch",
|
|
1208
1182
|
"aria-hidden": "true"
|
|
1209
|
-
},
|
|
1183
|
+
}, Ge = ["data-journal-row"], Ke = {
|
|
1210
1184
|
class: "flex w-5 shrink-0 flex-col items-center self-stretch",
|
|
1211
1185
|
"aria-hidden": "true"
|
|
1212
|
-
},
|
|
1186
|
+
}, qe = { class: "flex h-[17px] shrink-0 items-center" }, Je = {
|
|
1213
1187
|
key: 0,
|
|
1214
1188
|
class: "sr-only"
|
|
1215
|
-
},
|
|
1189
|
+
}, Ye = /* @__PURE__ */ T({
|
|
1216
1190
|
__name: "AgentToolActivityGroup",
|
|
1217
1191
|
props: {
|
|
1218
1192
|
model: {},
|
|
1219
1193
|
isLight: { type: Boolean }
|
|
1220
1194
|
},
|
|
1221
1195
|
setup(e) {
|
|
1222
|
-
let t = e, n =
|
|
1196
|
+
let t = e, n = R(!1);
|
|
1223
1197
|
function toggle() {
|
|
1224
1198
|
n.value = !n.value;
|
|
1225
1199
|
}
|
|
@@ -1290,7 +1264,7 @@ var Ce = {
|
|
|
1290
1264
|
};
|
|
1291
1265
|
});
|
|
1292
1266
|
return (t, u) => (M(), b("div", { class: k(["w-full py-0.5", s.value.muted]) }, [
|
|
1293
|
-
a.value ? (M(), b("span",
|
|
1267
|
+
a.value ? (M(), b("span", Ve, B(a.value), 1)) : v("", !0),
|
|
1294
1268
|
r.value ? (M(), b("button", {
|
|
1295
1269
|
key: 1,
|
|
1296
1270
|
type: "button",
|
|
@@ -1306,13 +1280,13 @@ var Ce = {
|
|
|
1306
1280
|
class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
|
|
1307
1281
|
"aria-hidden": "true"
|
|
1308
1282
|
}, null, -1)),
|
|
1309
|
-
x("span", { class: k(["text-[12.5px] font-medium leading-none", s.value.muted]) },
|
|
1283
|
+
x("span", { class: k(["text-[12.5px] font-medium leading-none", s.value.muted]) }, B(e.model.terminal?.label), 3),
|
|
1310
1284
|
i.value ? (M(), b("i", {
|
|
1311
1285
|
key: 0,
|
|
1312
1286
|
class: k(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
|
|
1313
1287
|
"aria-hidden": "true"
|
|
1314
1288
|
}, null, 2)) : v("", !0)
|
|
1315
|
-
], 10,
|
|
1289
|
+
], 10, He)) : i.value ? (M(), b("button", {
|
|
1316
1290
|
key: 2,
|
|
1317
1291
|
type: "button",
|
|
1318
1292
|
"data-test": "messaging-tool-activity-summary",
|
|
@@ -1320,33 +1294,33 @@ var Ce = {
|
|
|
1320
1294
|
"aria-expanded": n.value,
|
|
1321
1295
|
class: k(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
|
|
1322
1296
|
onClick: toggle
|
|
1323
|
-
}, [x("span",
|
|
1297
|
+
}, [x("span", We, [x("span", {
|
|
1324
1298
|
"data-journal-spine": "dashed",
|
|
1325
1299
|
class: k(["w-0 border-l border-dashed", s.value.dashed])
|
|
1326
|
-
}, null, 2)]), x("span", { class: k(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [S(
|
|
1300
|
+
}, null, 2)]), x("span", { class: k(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [S(B(i.value) + " earlier updates ", 1), x("i", {
|
|
1327
1301
|
class: k(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
|
|
1328
1302
|
"aria-hidden": "true"
|
|
1329
|
-
}, null, 2)], 2)], 10,
|
|
1303
|
+
}, null, 2)], 2)], 10, Ue)) : v("", !0),
|
|
1330
1304
|
(M(!0), b(m, null, F(o.value, (e, t) => (M(), b("div", {
|
|
1331
1305
|
key: e.id,
|
|
1332
1306
|
"data-test": "messaging-tool-activity-row",
|
|
1333
1307
|
"data-journal-row": e.tone,
|
|
1334
1308
|
class: k([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
|
|
1335
|
-
}, [x("div",
|
|
1309
|
+
}, [x("div", Ke, [x("span", qe, [(M(), _(ie(c.value[e.tone].station.tag), {
|
|
1336
1310
|
"data-journal-station": e.tone,
|
|
1337
1311
|
class: k(c.value[e.tone].station.class)
|
|
1338
1312
|
}, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? v("", !0) : (M(), b("span", {
|
|
1339
1313
|
key: 0,
|
|
1340
1314
|
class: k(["w-px flex-1", s.value.spine])
|
|
1341
|
-
}, null, 2))]), x("div", { class: k(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [x("span", { class: k(["relative block leading-snug", c.value[e.tone].label]) }, [S(
|
|
1315
|
+
}, null, 2))]), x("div", { class: k(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [x("span", { class: k(["relative block leading-snug", c.value[e.tone].label]) }, [S(B(e.label), 1), c.value[e.tone].statusWord ? (M(), b("span", Je, ", " + B(c.value[e.tone].statusWord), 1)) : v("", !0)], 2), e.note ? (M(), b("p", {
|
|
1342
1316
|
key: 0,
|
|
1343
1317
|
class: k(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
|
|
1344
|
-
},
|
|
1318
|
+
}, B(e.note), 3)) : v("", !0)], 2)], 10, Ge))), 128)),
|
|
1345
1319
|
!r.value && e.model.hint ? (M(), b("p", {
|
|
1346
1320
|
key: 3,
|
|
1347
1321
|
"data-test": "messaging-tool-activity-hint",
|
|
1348
1322
|
class: k(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
|
|
1349
|
-
},
|
|
1323
|
+
}, B(e.model.hint), 3)) : v("", !0)
|
|
1350
1324
|
], 2));
|
|
1351
1325
|
}
|
|
1352
1326
|
});
|
|
@@ -1391,86 +1365,86 @@ function _unsupportedIterableToArray(e, t) {
|
|
|
1391
1365
|
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
|
|
1392
1366
|
}
|
|
1393
1367
|
}
|
|
1394
|
-
var
|
|
1395
|
-
|
|
1368
|
+
var Xe = Object.entries, Ze = Object.setPrototypeOf, Qe = Object.isFrozen, q = Object.getPrototypeOf, $e = Object.getOwnPropertyDescriptor, J = Object.freeze, et = Object.seal, tt = Object.create, nt = typeof Reflect < "u" && Reflect, rt = nt.apply, it = nt.construct;
|
|
1369
|
+
J || (J = function freeze(e) {
|
|
1396
1370
|
return e;
|
|
1397
|
-
}),
|
|
1371
|
+
}), et || (et = function seal(e) {
|
|
1398
1372
|
return e;
|
|
1399
|
-
}),
|
|
1373
|
+
}), rt || (rt = function apply(e, t) {
|
|
1400
1374
|
var n = [...arguments].slice(2);
|
|
1401
1375
|
return e.apply(t, n);
|
|
1402
|
-
}),
|
|
1376
|
+
}), it || (it = function construct(e) {
|
|
1403
1377
|
return new e(...[...arguments].slice(1));
|
|
1404
1378
|
});
|
|
1405
|
-
var
|
|
1379
|
+
var at = unapply(Array.prototype.forEach), st = unapply(Array.prototype.lastIndexOf), ct = unapply(Array.prototype.pop), lt = unapply(Array.prototype.push), ut = unapply(Array.prototype.splice), dt = Array.isArray, ft = unapply(String.prototype.toLowerCase), pt = unapply(String.prototype.toString), mt = unapply(String.prototype.match), ht = unapply(String.prototype.replace), gt = unapply(String.prototype.indexOf), _t = unapply(String.prototype.trim), vt = unapply(Number.prototype.toString), yt = unapply(Boolean.prototype.toString), bt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), xt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), X = unapply(Object.prototype.hasOwnProperty), St = unapply(Object.prototype.toString), Z = unapply(RegExp.prototype.test), Ct = unconstruct(TypeError);
|
|
1406
1380
|
function unapply(e) {
|
|
1407
1381
|
return function(t) {
|
|
1408
1382
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
1409
1383
|
var n = [...arguments].slice(1);
|
|
1410
|
-
return
|
|
1384
|
+
return rt(e, t, n);
|
|
1411
1385
|
};
|
|
1412
1386
|
}
|
|
1413
1387
|
function unconstruct(e) {
|
|
1414
1388
|
return function() {
|
|
1415
|
-
return
|
|
1389
|
+
return it(e, [...arguments]);
|
|
1416
1390
|
};
|
|
1417
1391
|
}
|
|
1418
1392
|
function addToSet(e, t) {
|
|
1419
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1420
|
-
if (
|
|
1393
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ft;
|
|
1394
|
+
if (Ze && Ze(e, null), !dt(t)) return e;
|
|
1421
1395
|
let r = t.length;
|
|
1422
1396
|
for (; r--;) {
|
|
1423
1397
|
let i = t[r];
|
|
1424
1398
|
if (typeof i == "string") {
|
|
1425
1399
|
let e = n(i);
|
|
1426
|
-
e !== i && (
|
|
1400
|
+
e !== i && (Qe(t) || (t[r] = e), i = e);
|
|
1427
1401
|
}
|
|
1428
1402
|
e[i] = !0;
|
|
1429
1403
|
}
|
|
1430
1404
|
return e;
|
|
1431
1405
|
}
|
|
1432
1406
|
function cleanArray(e) {
|
|
1433
|
-
for (let t = 0; t < e.length; t++)
|
|
1407
|
+
for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
|
|
1434
1408
|
return e;
|
|
1435
1409
|
}
|
|
1436
1410
|
function clone(e) {
|
|
1437
|
-
let t =
|
|
1438
|
-
for (let r of
|
|
1411
|
+
let t = tt(null);
|
|
1412
|
+
for (let r of Xe(e)) {
|
|
1439
1413
|
var n = _slicedToArray(r, 2);
|
|
1440
1414
|
let i = n[0], a = n[1];
|
|
1441
|
-
|
|
1415
|
+
X(e, i) && (dt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
|
|
1442
1416
|
}
|
|
1443
1417
|
return t;
|
|
1444
1418
|
}
|
|
1445
1419
|
function stringifyValue(e) {
|
|
1446
1420
|
switch (typeof e) {
|
|
1447
1421
|
case "string": return e;
|
|
1448
|
-
case "number": return
|
|
1449
|
-
case "boolean": return
|
|
1450
|
-
case "bigint": return
|
|
1451
|
-
case "symbol": return
|
|
1452
|
-
case "undefined": return
|
|
1422
|
+
case "number": return vt(e);
|
|
1423
|
+
case "boolean": return yt(e);
|
|
1424
|
+
case "bigint": return bt ? bt(e) : "0";
|
|
1425
|
+
case "symbol": return xt ? xt(e) : "Symbol()";
|
|
1426
|
+
case "undefined": return St(e);
|
|
1453
1427
|
case "function":
|
|
1454
1428
|
case "object": {
|
|
1455
|
-
if (e === null) return
|
|
1429
|
+
if (e === null) return St(e);
|
|
1456
1430
|
let t = e, n = lookupGetter(t, "toString");
|
|
1457
1431
|
if (typeof n == "function") {
|
|
1458
1432
|
let e = n(t);
|
|
1459
|
-
return typeof e == "string" ? e :
|
|
1433
|
+
return typeof e == "string" ? e : St(e);
|
|
1460
1434
|
}
|
|
1461
|
-
return
|
|
1435
|
+
return St(e);
|
|
1462
1436
|
}
|
|
1463
|
-
default: return
|
|
1437
|
+
default: return St(e);
|
|
1464
1438
|
}
|
|
1465
1439
|
}
|
|
1466
1440
|
function lookupGetter(e, t) {
|
|
1467
1441
|
for (; e !== null;) {
|
|
1468
|
-
let n =
|
|
1442
|
+
let n = $e(e, t);
|
|
1469
1443
|
if (n) {
|
|
1470
1444
|
if (n.get) return unapply(n.get);
|
|
1471
1445
|
if (typeof n.value == "function") return unapply(n.value);
|
|
1472
1446
|
}
|
|
1473
|
-
e =
|
|
1447
|
+
e = q(e);
|
|
1474
1448
|
}
|
|
1475
1449
|
function fallbackValue() {
|
|
1476
1450
|
return null;
|
|
@@ -1479,12 +1453,12 @@ function lookupGetter(e, t) {
|
|
|
1479
1453
|
}
|
|
1480
1454
|
function isRegex(e) {
|
|
1481
1455
|
try {
|
|
1482
|
-
return
|
|
1456
|
+
return Z(e, ""), !0;
|
|
1483
1457
|
} catch {
|
|
1484
1458
|
return !1;
|
|
1485
1459
|
}
|
|
1486
1460
|
}
|
|
1487
|
-
var wt =
|
|
1461
|
+
var wt = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Tt = J(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Et = J([
|
|
1488
1462
|
"feBlend",
|
|
1489
1463
|
"feColorMatrix",
|
|
1490
1464
|
"feComponentTransfer",
|
|
@@ -1510,7 +1484,7 @@ var wt = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1510
1484
|
"feSpotLight",
|
|
1511
1485
|
"feTile",
|
|
1512
1486
|
"feTurbulence"
|
|
1513
|
-
]), Dt =
|
|
1487
|
+
]), Dt = J([
|
|
1514
1488
|
"animate",
|
|
1515
1489
|
"color-profile",
|
|
1516
1490
|
"cursor",
|
|
@@ -1533,7 +1507,7 @@ var wt = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1533
1507
|
"solidcolor",
|
|
1534
1508
|
"unknown",
|
|
1535
1509
|
"use"
|
|
1536
|
-
]), Ot =
|
|
1510
|
+
]), Ot = J(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), kt = J([
|
|
1537
1511
|
"maction",
|
|
1538
1512
|
"maligngroup",
|
|
1539
1513
|
"malignmark",
|
|
@@ -1549,13 +1523,13 @@ var wt = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1549
1523
|
"annotation-xml",
|
|
1550
1524
|
"mprescripts",
|
|
1551
1525
|
"none"
|
|
1552
|
-
]), At =
|
|
1526
|
+
]), At = J(["#text"]), jt = J(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Mt = J(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Nt = J(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Pt = J([
|
|
1553
1527
|
"xlink:href",
|
|
1554
1528
|
"xml:id",
|
|
1555
1529
|
"xlink:title",
|
|
1556
1530
|
"xml:space",
|
|
1557
1531
|
"xmlns:xlink"
|
|
1558
|
-
]), Ft =
|
|
1532
|
+
]), Ft = et(/{{[\w\W]*|^[\w\W]*}}/g), It = et(/<%[\w\W]*|^[\w\W]*%>/g), Lt = et(/\${[\w\W]*/g), Rt = et(/^data-[\-\w.\u00B7-\uFFFF]+$/), zt = et(/^aria-[\-\w]+$/), Bt = et(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Vt = et(/^(?:\w+script|data):/i), Ht = et(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ut = et(/^html$/i), Wt = et(/^[a-z][.\w]*(-[.\w]+)+$/i), Gt = et(/<[/\w!]/g), Kt = et(/<[/\w]/g), qt = et(/<\/no(script|embed|frames)/i), Jt = et(/\/>/i), Yt = {
|
|
1559
1533
|
element: 1,
|
|
1560
1534
|
attribute: 2,
|
|
1561
1535
|
text: 3,
|
|
@@ -1600,7 +1574,7 @@ var wt = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1600
1574
|
uponSanitizeShadowNode: []
|
|
1601
1575
|
};
|
|
1602
1576
|
}, $t = function _resolveSetOption(e, t, n, r) {
|
|
1603
|
-
return
|
|
1577
|
+
return X(e, t) && dt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
|
|
1604
1578
|
};
|
|
1605
1579
|
function createDOMPurify() {
|
|
1606
1580
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Xt(), DOMPurify = (e) => createDOMPurify(e);
|
|
@@ -1632,9 +1606,9 @@ function createDOMPurify() {
|
|
|
1632
1606
|
}
|
|
1633
1607
|
}, P = function _getDefaultTrustedTypesPolicy() {
|
|
1634
1608
|
return A || (k = Zt(u, r), A = !0), k;
|
|
1635
|
-
}, F = t, I = F.implementation, ie = F.createNodeIterator,
|
|
1636
|
-
DOMPurify.isSupported = typeof
|
|
1637
|
-
let
|
|
1609
|
+
}, F = t, I = F.implementation, ie = F.createNodeIterator, R = F.createDocumentFragment, B = F.getElementsByTagName, ae = n.importNode, H = Qt();
|
|
1610
|
+
DOMPurify.isSupported = typeof Xe == "function" && typeof v == "function" && I && I.createHTMLDocument !== void 0;
|
|
1611
|
+
let oe = Ft, se = It, ce = Lt, ue = Rt, U = zt, de = Vt, pe = Ht, he = Wt, _e = Bt, W = null, ve = addToSet({}, [
|
|
1638
1612
|
...wt,
|
|
1639
1613
|
...Tt,
|
|
1640
1614
|
...Et,
|
|
@@ -1645,7 +1619,7 @@ function createDOMPurify() {
|
|
|
1645
1619
|
...Mt,
|
|
1646
1620
|
...Nt,
|
|
1647
1621
|
...Pt
|
|
1648
|
-
]), K = Object.seal(
|
|
1622
|
+
]), K = Object.seal(tt(null, {
|
|
1649
1623
|
tagNameCheck: {
|
|
1650
1624
|
writable: !0,
|
|
1651
1625
|
configurable: !1,
|
|
@@ -1664,7 +1638,7 @@ function createDOMPurify() {
|
|
|
1664
1638
|
enumerable: !0,
|
|
1665
1639
|
value: !1
|
|
1666
1640
|
}
|
|
1667
|
-
})), be = null, Se = null,
|
|
1641
|
+
})), be = null, Se = null, Ce = Object.seal(tt(null, {
|
|
1668
1642
|
tagCheck: {
|
|
1669
1643
|
writable: !0,
|
|
1670
1644
|
configurable: !1,
|
|
@@ -1677,14 +1651,14 @@ function createDOMPurify() {
|
|
|
1677
1651
|
enumerable: !0,
|
|
1678
1652
|
value: null
|
|
1679
1653
|
}
|
|
1680
|
-
})),
|
|
1654
|
+
})), we = !0, Te = !0, Ee = !1, De = !0, Oe = !1, ke = !0, Ae = !1, je = !1, Me = null, Ne = null, Pe = !1, Fe = !1, Ie = !1, Le = !1, Re = !0, ze = !1, Be = "user-content-", Ve = !0, He = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
|
|
1681
1655
|
"audio",
|
|
1682
1656
|
"video",
|
|
1683
1657
|
"img",
|
|
1684
1658
|
"source",
|
|
1685
1659
|
"image",
|
|
1686
1660
|
"track"
|
|
1687
|
-
]),
|
|
1661
|
+
]), Je = null, Ye = addToSet({}, [
|
|
1688
1662
|
"alt",
|
|
1689
1663
|
"class",
|
|
1690
1664
|
"for",
|
|
@@ -1699,17 +1673,17 @@ function createDOMPurify() {
|
|
|
1699
1673
|
"value",
|
|
1700
1674
|
"style",
|
|
1701
1675
|
"xmlns"
|
|
1702
|
-
]),
|
|
1703
|
-
Xe,
|
|
1676
|
+
]), Ze = "http://www.w3.org/1998/Math/MathML", Qe = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xhtml", $e = q, nt = !1, rt = null, it = addToSet({}, [
|
|
1704
1677
|
Ze,
|
|
1705
|
-
|
|
1706
|
-
|
|
1678
|
+
Qe,
|
|
1679
|
+
q
|
|
1680
|
+
], pt), vt = J([
|
|
1707
1681
|
"mi",
|
|
1708
1682
|
"mo",
|
|
1709
1683
|
"mn",
|
|
1710
1684
|
"ms",
|
|
1711
1685
|
"mtext"
|
|
1712
|
-
]),
|
|
1686
|
+
]), yt = addToSet({}, vt), bt = J(["annotation-xml"]), xt = addToSet({}, bt), St = addToSet({}, [
|
|
1713
1687
|
"title",
|
|
1714
1688
|
"style",
|
|
1715
1689
|
"font",
|
|
@@ -1720,15 +1694,15 @@ function createDOMPurify() {
|
|
|
1720
1694
|
}, on = function _parseConfig() {
|
|
1721
1695
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1722
1696
|
if (nn && nn === e) return;
|
|
1723
|
-
(!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ?
|
|
1697
|
+
(!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? pt : ft, W = $t(e, "ALLOWED_TAGS", ve, { transform: Q }), G = $t(e, "ALLOWED_ATTR", ye, { transform: Q }), rt = $t(e, "ALLOWED_NAMESPACES", it, { transform: pt }), Je = $t(e, "ADD_URI_SAFE_ATTR", Ye, {
|
|
1724
1698
|
transform: Q,
|
|
1725
|
-
base:
|
|
1726
|
-
}),
|
|
1699
|
+
base: Ye
|
|
1700
|
+
}), Ke = $t(e, "ADD_DATA_URI_TAGS", qe, {
|
|
1727
1701
|
transform: Q,
|
|
1728
|
-
base:
|
|
1729
|
-
}),
|
|
1730
|
-
let t =
|
|
1731
|
-
if (K =
|
|
1702
|
+
base: qe
|
|
1703
|
+
}), We = $t(e, "FORBID_CONTENTS", Ge, { transform: Q }), be = $t(e, "FORBID_TAGS", clone({}), { transform: Q }), Se = $t(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, we = e.ALLOW_ARIA_ATTR !== !1, Te = e.ALLOW_DATA_ATTR !== !1, Ee = e.ALLOW_UNKNOWN_PROTOCOLS || !1, De = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Oe = e.SAFE_FOR_TEMPLATES || !1, ke = e.SAFE_FOR_XML !== !1, Ae = e.WHOLE_DOCUMENT || !1, Fe = e.RETURN_DOM || !1, Ie = e.RETURN_DOM_FRAGMENT || !1, Le = e.RETURN_TRUSTED_TYPE || !1, Pe = e.FORCE_BODY || !1, Re = e.SANITIZE_DOM !== !1, ze = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, _e = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Bt, $e = typeof e.NAMESPACE == "string" ? e.NAMESPACE : q, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), xt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
|
|
1704
|
+
let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : tt(null);
|
|
1705
|
+
if (K = tt(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), et(K), Oe && (Te = !1), Ie && (Fe = !0), Ue && (W = addToSet({}, At), G = tt(null), Ue.html === !0 && (addToSet(W, wt), addToSet(G, jt)), Ue.svg === !0 && (addToSet(W, Tt), addToSet(G, Mt), addToSet(G, Pt)), Ue.svgFilters === !0 && (addToSet(W, Et), addToSet(G, Mt), addToSet(G, Pt)), Ue.mathMl === !0 && (addToSet(W, Ot), addToSet(G, Nt), addToSet(G, Pt))), Ce.tagCheck = null, Ce.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ce.tagCheck = e.ADD_TAGS : dt(e.ADD_TAGS) && (W === ve && (W = clone(W)), addToSet(W, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ce.attributeCheck = e.ADD_ATTR : dt(e.ADD_ATTR) && (G === ye && (G = clone(G)), addToSet(G, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && dt(e.ADD_URI_SAFE_ATTR) && addToSet(Je, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && dt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && dt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), Ve && (W["#text"] = !0), Ae && addToSet(W, [
|
|
1732
1706
|
"html",
|
|
1733
1707
|
"head",
|
|
1734
1708
|
"body"
|
|
@@ -1743,27 +1717,27 @@ function createDOMPurify() {
|
|
|
1743
1717
|
throw T = t, e;
|
|
1744
1718
|
}
|
|
1745
1719
|
} else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, te = "") : (T === void 0 && (T = P()), T && typeof te == "string" && (te = j("")));
|
|
1746
|
-
|
|
1720
|
+
J && J(e), nn = e;
|
|
1747
1721
|
}, sn = addToSet({}, [
|
|
1748
1722
|
...Tt,
|
|
1749
1723
|
...Et,
|
|
1750
1724
|
...Dt
|
|
1751
1725
|
]), cn = addToSet({}, [...Ot, ...kt]), ln = function _checkSvgNamespace(e, t, n) {
|
|
1752
|
-
return t.namespaceURI ===
|
|
1726
|
+
return t.namespaceURI === q ? e === "svg" : t.namespaceURI === Ze ? e === "svg" && (n === "annotation-xml" || yt[n]) : !!sn[e];
|
|
1753
1727
|
}, un = function _checkMathMlNamespace(e, t, n) {
|
|
1754
|
-
return t.namespaceURI ===
|
|
1728
|
+
return t.namespaceURI === q ? e === "math" : t.namespaceURI === Qe ? e === "math" && xt[n] : !!cn[e];
|
|
1755
1729
|
}, dn = function _checkHtmlNamespace(e, t, n) {
|
|
1756
|
-
return t.namespaceURI ===
|
|
1730
|
+
return t.namespaceURI === Qe && !xt[n] || t.namespaceURI === Ze && !yt[n] ? !1 : !cn[e] && (St[e] || !sn[e]);
|
|
1757
1731
|
}, fn = function _checkValidNamespace(e) {
|
|
1758
1732
|
let t = v(e);
|
|
1759
1733
|
(!t || !t.tagName) && (t = {
|
|
1760
|
-
namespaceURI:
|
|
1734
|
+
namespaceURI: $e,
|
|
1761
1735
|
tagName: "template"
|
|
1762
1736
|
});
|
|
1763
|
-
let n =
|
|
1764
|
-
return
|
|
1737
|
+
let n = ft(e.tagName), r = ft(t.tagName);
|
|
1738
|
+
return rt[e.namespaceURI] ? e.namespaceURI === Qe ? ln(n, t, r) : e.namespaceURI === Ze ? un(n, t, r) : e.namespaceURI === q ? dn(n, t, r) : !!(en === "application/xhtml+xml" && rt[e.namespaceURI]) : !1;
|
|
1765
1739
|
}, pn = function _forceRemove(e) {
|
|
1766
|
-
|
|
1740
|
+
lt(DOMPurify.removed, { element: e });
|
|
1767
1741
|
try {
|
|
1768
1742
|
v(e).removeChild(e);
|
|
1769
1743
|
} catch {
|
|
@@ -1774,9 +1748,9 @@ function createDOMPurify() {
|
|
|
1774
1748
|
let t = _(e);
|
|
1775
1749
|
if (t) {
|
|
1776
1750
|
let e = [];
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
}),
|
|
1751
|
+
at(t, (t) => {
|
|
1752
|
+
lt(e, t);
|
|
1753
|
+
}), at(e, (e) => {
|
|
1780
1754
|
try {
|
|
1781
1755
|
m(e);
|
|
1782
1756
|
} catch {}
|
|
@@ -1791,17 +1765,17 @@ function createDOMPurify() {
|
|
|
1791
1765
|
}
|
|
1792
1766
|
}, hn = function _removeAttribute(e, t) {
|
|
1793
1767
|
try {
|
|
1794
|
-
|
|
1768
|
+
lt(DOMPurify.removed, {
|
|
1795
1769
|
attribute: t.getAttributeNode(e),
|
|
1796
1770
|
from: t
|
|
1797
1771
|
});
|
|
1798
1772
|
} catch {
|
|
1799
|
-
|
|
1773
|
+
lt(DOMPurify.removed, {
|
|
1800
1774
|
attribute: null,
|
|
1801
1775
|
from: t
|
|
1802
1776
|
});
|
|
1803
1777
|
}
|
|
1804
|
-
if (t.removeAttribute(e), e === "is") if (
|
|
1778
|
+
if (t.removeAttribute(e), e === "is") if (Fe || Ie) try {
|
|
1805
1779
|
pn(t);
|
|
1806
1780
|
} catch {}
|
|
1807
1781
|
else try {
|
|
@@ -1824,11 +1798,11 @@ function createDOMPurify() {
|
|
|
1824
1798
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
1825
1799
|
}
|
|
1826
1800
|
}, vn = function _neutralizePatchLinkage(e) {
|
|
1827
|
-
if (!
|
|
1801
|
+
if (!ke) return;
|
|
1828
1802
|
let t = [e];
|
|
1829
1803
|
for (; t.length > 0;) {
|
|
1830
1804
|
let e = t.pop(), n = S ? S(e) : e.nodeType;
|
|
1831
|
-
if (n === Yt.processingInstruction || n === Yt.comment &&
|
|
1805
|
+
if (n === Yt.processingInstruction || n === Yt.comment && Z(Kt, e.data)) {
|
|
1832
1806
|
try {
|
|
1833
1807
|
m(e);
|
|
1834
1808
|
} catch {}
|
|
@@ -1845,34 +1819,34 @@ function createDOMPurify() {
|
|
|
1845
1819
|
}
|
|
1846
1820
|
}, yn = function _initDocument(e) {
|
|
1847
1821
|
let n = null, r = null;
|
|
1848
|
-
if (
|
|
1822
|
+
if (Pe) e = "<remove></remove>" + e;
|
|
1849
1823
|
else {
|
|
1850
|
-
let t =
|
|
1824
|
+
let t = mt(e, /^[\r\n\t ]+/);
|
|
1851
1825
|
r = t && t[0];
|
|
1852
1826
|
}
|
|
1853
|
-
en === "application/xhtml+xml" &&
|
|
1827
|
+
en === "application/xhtml+xml" && $e === q && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
1854
1828
|
let i = T ? j(e) : e;
|
|
1855
|
-
if (
|
|
1829
|
+
if ($e === q) try {
|
|
1856
1830
|
n = new c().parseFromString(i, en);
|
|
1857
1831
|
} catch {}
|
|
1858
1832
|
if (!n || !n.documentElement) {
|
|
1859
|
-
n = I.createDocument(
|
|
1833
|
+
n = I.createDocument($e, "template", null);
|
|
1860
1834
|
try {
|
|
1861
|
-
n.documentElement.innerHTML =
|
|
1835
|
+
n.documentElement.innerHTML = nt ? te : i;
|
|
1862
1836
|
} catch {}
|
|
1863
1837
|
}
|
|
1864
1838
|
let a = n.body || n.documentElement;
|
|
1865
|
-
return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null),
|
|
1839
|
+
return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), $e === q ? B.call(n, Ae ? "html" : "body")[0] : Ae ? n.documentElement : a;
|
|
1866
1840
|
}, bn = function _createNodeIterator(e) {
|
|
1867
1841
|
return ie.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
|
|
1868
1842
|
}, xn = function _stripTemplateExpressions(e) {
|
|
1869
|
-
return e =
|
|
1843
|
+
return e = ht(e, oe, " "), e = ht(e, se, " "), e = ht(e, ce, " "), e;
|
|
1870
1844
|
}, Sn = function _scrubTemplateExpressions(e) {
|
|
1871
1845
|
e.normalize();
|
|
1872
1846
|
let t = ie.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
|
|
1873
1847
|
for (; n;) n.data = xn(n.data), n = t.nextNode();
|
|
1874
1848
|
let r = e.querySelectorAll?.call(e, "template");
|
|
1875
|
-
r &&
|
|
1849
|
+
r && at(r, (e) => {
|
|
1876
1850
|
wn(e.content) && Sn(e.content);
|
|
1877
1851
|
});
|
|
1878
1852
|
}, Cn = function _isClobbered(e) {
|
|
@@ -1894,51 +1868,51 @@ function createDOMPurify() {
|
|
|
1894
1868
|
}
|
|
1895
1869
|
};
|
|
1896
1870
|
function _executeHooks(e, t, n) {
|
|
1897
|
-
e.length !== 0 &&
|
|
1871
|
+
e.length !== 0 && at(e, (e) => {
|
|
1898
1872
|
e.call(DOMPurify, t, n, nn);
|
|
1899
1873
|
});
|
|
1900
1874
|
}
|
|
1901
1875
|
let En = function _isUnsafeNode(e, t) {
|
|
1902
|
-
return !!(
|
|
1876
|
+
return !!(ke && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Gt, e.textContent) && Z(Gt, e.innerHTML) || ke && e.namespaceURI === q && t === "style" && Tn(e.firstElementChild) || e.nodeType === Yt.processingInstruction || ke && e.nodeType === Yt.comment && Z(Kt, e.data));
|
|
1903
1877
|
}, Dn = function _sanitizeDisallowedNode(e, t) {
|
|
1904
|
-
if (!be[t] && jn(t) && (K.tagNameCheck instanceof RegExp &&
|
|
1905
|
-
if (
|
|
1878
|
+
if (!be[t] && jn(t) && (K.tagNameCheck instanceof RegExp && Z(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
|
|
1879
|
+
if (Ve && !We[t]) {
|
|
1906
1880
|
let t = v(e), n = _(e);
|
|
1907
1881
|
if (n && t) {
|
|
1908
1882
|
let r = n.length;
|
|
1909
1883
|
for (let i = r - 1; i >= 0; --i) {
|
|
1910
|
-
let r =
|
|
1884
|
+
let r = He ? n[i] : p(n[i], !0);
|
|
1911
1885
|
t.insertBefore(r, h(e));
|
|
1912
1886
|
}
|
|
1913
1887
|
}
|
|
1914
1888
|
}
|
|
1915
1889
|
return pn(e), !0;
|
|
1916
1890
|
}, On = function _sanitizeElements(e, t) {
|
|
1917
|
-
if (_executeHooks(
|
|
1891
|
+
if (_executeHooks(H.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
|
|
1918
1892
|
if (Cn(e)) return pn(e), !0;
|
|
1919
1893
|
let n = Q(C ? C(e) : e.nodeName);
|
|
1920
|
-
if (_executeHooks(
|
|
1894
|
+
if (_executeHooks(H.uponSanitizeElement, e, {
|
|
1921
1895
|
tagName: n,
|
|
1922
1896
|
allowedTags: W
|
|
1923
1897
|
}), e !== t && v(e) === null) return !0;
|
|
1924
1898
|
if (En(e, n)) return pn(e), !0;
|
|
1925
|
-
if (be[n] || !(
|
|
1899
|
+
if (be[n] || !(Ce.tagCheck instanceof Function && Ce.tagCheck(n)) && !W[n]) {
|
|
1926
1900
|
let t = Dn(e, n);
|
|
1927
|
-
return t === !1 && _executeHooks(
|
|
1901
|
+
return t === !1 && _executeHooks(H.afterSanitizeElements, e, null), t;
|
|
1928
1902
|
}
|
|
1929
|
-
if ((S ? S(e) : e.nodeType) === Yt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") &&
|
|
1930
|
-
if (
|
|
1903
|
+
if ((S ? S(e) : e.nodeType) === Yt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(qt, e.innerHTML)) return pn(e), !0;
|
|
1904
|
+
if (Oe && e.nodeType === Yt.text) {
|
|
1931
1905
|
let t = xn(e.textContent);
|
|
1932
|
-
e.textContent !== t && (
|
|
1906
|
+
e.textContent !== t && (lt(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
|
|
1933
1907
|
}
|
|
1934
|
-
return _executeHooks(
|
|
1908
|
+
return _executeHooks(H.afterSanitizeElements, e, null), !1;
|
|
1935
1909
|
}, kn = function _isValidAttribute(e, n, r) {
|
|
1936
|
-
if (Se[n] ||
|
|
1937
|
-
let i = G[n] ||
|
|
1938
|
-
if (!(
|
|
1910
|
+
if (Se[n] || ke && n === "patchsrc" || ke && n === "for" && e !== "label" && e !== "output" || Re && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
|
|
1911
|
+
let i = G[n] || Ce.attributeCheck instanceof Function && Ce.attributeCheck(n, e);
|
|
1912
|
+
if (!(Te && Z(ue, n)) && !(we && Z(U, n))) {
|
|
1939
1913
|
if (!i) {
|
|
1940
|
-
if (!(jn(e) && (K.tagNameCheck instanceof RegExp &&
|
|
1941
|
-
} else if (!
|
|
1914
|
+
if (!(jn(e) && (K.tagNameCheck instanceof RegExp && Z(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && Z(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Z(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
|
|
1915
|
+
} else if (!Je[n] && !Z(_e, ht(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && gt(r, "data:") === 0 && Ke[e]) && !(Ee && !Z(de, ht(r, pe, ""))) && r) return !1;
|
|
1942
1916
|
}
|
|
1943
1917
|
return !0;
|
|
1944
1918
|
}, An = addToSet({}, [
|
|
@@ -1951,7 +1925,7 @@ function createDOMPurify() {
|
|
|
1951
1925
|
"font-face-uri",
|
|
1952
1926
|
"missing-glyph"
|
|
1953
1927
|
]), jn = function _isBasicCustomElement(e) {
|
|
1954
|
-
return !An[
|
|
1928
|
+
return !An[ft(e)] && Z(he, e);
|
|
1955
1929
|
}, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
|
|
1956
1930
|
if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
1957
1931
|
case "TrustedHTML": return j(r);
|
|
@@ -1960,12 +1934,12 @@ function createDOMPurify() {
|
|
|
1960
1934
|
return r;
|
|
1961
1935
|
}, Nn = function _setAttributeValue(e, t, n, r) {
|
|
1962
1936
|
try {
|
|
1963
|
-
n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) :
|
|
1937
|
+
n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : ct(DOMPurify.removed);
|
|
1964
1938
|
} catch {
|
|
1965
1939
|
hn(t, e);
|
|
1966
1940
|
}
|
|
1967
1941
|
}, Pn = function _sanitizeAttributes(e) {
|
|
1968
|
-
_executeHooks(
|
|
1942
|
+
_executeHooks(H.beforeSanitizeAttributes, e, null);
|
|
1969
1943
|
let t = e.attributes;
|
|
1970
1944
|
if (!t || Cn(e)) return;
|
|
1971
1945
|
let n = {
|
|
@@ -1976,12 +1950,12 @@ function createDOMPurify() {
|
|
|
1976
1950
|
forceKeepAttr: void 0
|
|
1977
1951
|
}, r = t.length, i = Q(e.nodeName);
|
|
1978
1952
|
for (; r--;) {
|
|
1979
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f :
|
|
1980
|
-
if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(
|
|
1953
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : _t(f);
|
|
1954
|
+
if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(H.uponSanitizeAttribute, e, n), p = n.attrValue, ze && (u === "id" || u === "name") && gt(p, Be) !== 0 && (hn(o, e), p = Be + p), ke && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
|
|
1981
1955
|
hn(o, e);
|
|
1982
1956
|
continue;
|
|
1983
1957
|
}
|
|
1984
|
-
if (u === "attributename" &&
|
|
1958
|
+
if (u === "attributename" && mt(p, "href")) {
|
|
1985
1959
|
hn(o, e);
|
|
1986
1960
|
continue;
|
|
1987
1961
|
}
|
|
@@ -1990,25 +1964,25 @@ function createDOMPurify() {
|
|
|
1990
1964
|
hn(o, e);
|
|
1991
1965
|
continue;
|
|
1992
1966
|
}
|
|
1993
|
-
if (!
|
|
1967
|
+
if (!De && Z(Jt, p)) {
|
|
1994
1968
|
hn(o, e);
|
|
1995
1969
|
continue;
|
|
1996
1970
|
}
|
|
1997
|
-
if (
|
|
1971
|
+
if (Oe && (p = xn(p)), !kn(i, u, p)) {
|
|
1998
1972
|
hn(o, e);
|
|
1999
1973
|
continue;
|
|
2000
1974
|
}
|
|
2001
1975
|
p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
|
|
2002
1976
|
}
|
|
2003
1977
|
}
|
|
2004
|
-
_executeHooks(
|
|
1978
|
+
_executeHooks(H.afterSanitizeAttributes, e, null);
|
|
2005
1979
|
}, Fn = function _sanitizeShadowDOM(e) {
|
|
2006
1980
|
let t = null, n = bn(e);
|
|
2007
|
-
for (_executeHooks(
|
|
1981
|
+
for (_executeHooks(H.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(H.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === Yt.element) {
|
|
2008
1982
|
let e = b(t);
|
|
2009
1983
|
wn(e) && (In(e), Fn(e));
|
|
2010
1984
|
}
|
|
2011
|
-
_executeHooks(
|
|
1985
|
+
_executeHooks(H.afterSanitizeShadowDOM, e, null);
|
|
2012
1986
|
}, In = function _sanitizeAttachedShadowRoots(e) {
|
|
2013
1987
|
let t = [{
|
|
2014
1988
|
node: e,
|
|
@@ -2049,10 +2023,10 @@ function createDOMPurify() {
|
|
|
2049
2023
|
};
|
|
2050
2024
|
return DOMPurify.sanitize = function(e) {
|
|
2051
2025
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
|
|
2052
|
-
if (
|
|
2026
|
+
if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Ct("dirty is not a string, aborting");
|
|
2053
2027
|
if (!DOMPurify.isSupported) return e;
|
|
2054
|
-
|
|
2055
|
-
let s =
|
|
2028
|
+
je ? (W = Me, G = Ne) : on(t), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (W = clone(W)), H.uponSanitizeAttribute.length > 0 && (G = clone(G)), DOMPurify.removed = [];
|
|
2029
|
+
let s = He && typeof e != "string" && Tn(e);
|
|
2056
2030
|
if (s) {
|
|
2057
2031
|
vn(e);
|
|
2058
2032
|
let t = C ? C(e) : e.nodeName;
|
|
@@ -2068,51 +2042,51 @@ function createDOMPurify() {
|
|
|
2068
2042
|
}
|
|
2069
2043
|
} else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === Yt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
|
|
2070
2044
|
else {
|
|
2071
|
-
if (!
|
|
2072
|
-
if (r = yn(e), !r) return
|
|
2045
|
+
if (!Fe && !Oe && !Ae && e.indexOf("<") === -1) return T && Le ? j(e) : e;
|
|
2046
|
+
if (r = yn(e), !r) return Fe ? null : Le ? te : "";
|
|
2073
2047
|
}
|
|
2074
|
-
r &&
|
|
2048
|
+
r && Pe && pn(r.firstChild);
|
|
2075
2049
|
let c = s ? e : r, u = bn(c);
|
|
2076
2050
|
try {
|
|
2077
2051
|
for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
|
|
2078
2052
|
} catch (t) {
|
|
2079
|
-
throw s && (mn(e),
|
|
2053
|
+
throw s && (mn(e), at(DOMPurify.removed, (e) => {
|
|
2080
2054
|
e.element && _n(e.element);
|
|
2081
2055
|
})), t;
|
|
2082
2056
|
}
|
|
2083
|
-
if (s) return
|
|
2057
|
+
if (s) return at(DOMPurify.removed, (e) => {
|
|
2084
2058
|
e.element && _n(e.element);
|
|
2085
|
-
}),
|
|
2086
|
-
if (
|
|
2087
|
-
if (
|
|
2059
|
+
}), Oe && Sn(e), e;
|
|
2060
|
+
if (Fe) {
|
|
2061
|
+
if (Oe && Sn(r), Ie) for (o = R.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
|
|
2088
2062
|
else o = r;
|
|
2089
|
-
return (G.shadowroot || G.shadowrootmode) && (o =
|
|
2063
|
+
return (G.shadowroot || G.shadowrootmode) && (o = ae.call(n, o, !0)), o;
|
|
2090
2064
|
}
|
|
2091
|
-
let f =
|
|
2092
|
-
return
|
|
2065
|
+
let f = Ae ? r.outerHTML : r.innerHTML;
|
|
2066
|
+
return Ae && W["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Ut, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Oe && (f = xn(f)), T && Le ? j(f) : f;
|
|
2093
2067
|
}, DOMPurify.setConfig = function() {
|
|
2094
2068
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2095
|
-
on(e),
|
|
2069
|
+
on(e), je = !0, Me = W, Ne = G;
|
|
2096
2070
|
}, DOMPurify.clearConfig = function() {
|
|
2097
|
-
nn = null,
|
|
2071
|
+
nn = null, je = !1, Me = null, Ne = null, T = k, te = "";
|
|
2098
2072
|
}, DOMPurify.isValidAttribute = function(e, t, n) {
|
|
2099
2073
|
nn || on({});
|
|
2100
2074
|
let r = Q(e), i = Q(t);
|
|
2101
2075
|
return kn(r, i, n);
|
|
2102
2076
|
}, DOMPurify.addHook = function(e, t) {
|
|
2103
|
-
typeof t == "function" &&
|
|
2077
|
+
typeof t == "function" && X(H, e) && lt(H[e], t);
|
|
2104
2078
|
}, DOMPurify.removeHook = function(e, t) {
|
|
2105
|
-
if (
|
|
2079
|
+
if (X(H, e)) {
|
|
2106
2080
|
if (t !== void 0) {
|
|
2107
|
-
let n =
|
|
2108
|
-
return n === -1 ? void 0 :
|
|
2081
|
+
let n = st(H[e], t);
|
|
2082
|
+
return n === -1 ? void 0 : ut(H[e], n, 1)[0];
|
|
2109
2083
|
}
|
|
2110
|
-
return
|
|
2084
|
+
return ct(H[e]);
|
|
2111
2085
|
}
|
|
2112
2086
|
}, DOMPurify.removeHooks = function(e) {
|
|
2113
|
-
|
|
2087
|
+
X(H, e) && (H[e] = []);
|
|
2114
2088
|
}, DOMPurify.removeAllHooks = function() {
|
|
2115
|
-
|
|
2089
|
+
H = Qt();
|
|
2116
2090
|
}, DOMPurify;
|
|
2117
2091
|
}
|
|
2118
2092
|
var en = createDOMPurify(), _Class;
|
|
@@ -3576,7 +3550,7 @@ var gr = ["aria-label"], _r = { class: "px-4 pb-2 pt-4" }, vr = ["innerHTML"], y
|
|
|
3576
3550
|
x("div", _r, [x("div", {
|
|
3577
3551
|
class: "text-[14px] font-semibold leading-tight",
|
|
3578
3552
|
style: A({ color: s.value })
|
|
3579
|
-
},
|
|
3553
|
+
}, B(e.spec.title), 5)]),
|
|
3580
3554
|
i.value ? (M(), b("div", {
|
|
3581
3555
|
key: 0,
|
|
3582
3556
|
class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
|
|
@@ -3594,7 +3568,7 @@ var gr = ["aria-label"], _r = { class: "px-4 pb-2 pt-4" }, vr = ["innerHTML"], y
|
|
|
3594
3568
|
class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
|
|
3595
3569
|
style: A(actionStyle(e.style)),
|
|
3596
3570
|
onClick: (t) => r("action", e.reply)
|
|
3597
|
-
},
|
|
3571
|
+
}, B(e.label), 13, yr))), 128))], 4)) : v("", !0)
|
|
3598
3572
|
], 12, gr));
|
|
3599
3573
|
}
|
|
3600
3574
|
}), xr = 112, Sr = 52, Cr = 14, wr = 54, Tr = 34, Er = 260;
|
|
@@ -3829,7 +3803,7 @@ var jr = [
|
|
|
3829
3803
|
inverted: { type: Boolean }
|
|
3830
3804
|
},
|
|
3831
3805
|
setup(e) {
|
|
3832
|
-
let t = e, n = P(), r =
|
|
3806
|
+
let t = e, n = P(), r = R(360), i;
|
|
3833
3807
|
re(() => {
|
|
3834
3808
|
typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
|
|
3835
3809
|
let t = e[0]?.contentRect.width;
|
|
@@ -4012,7 +3986,7 @@ var jr = [
|
|
|
4012
3986
|
dataKey: e.dataKey
|
|
4013
3987
|
};
|
|
4014
3988
|
}));
|
|
4015
|
-
}),
|
|
3989
|
+
}), H = h(() => {
|
|
4016
3990
|
let e = f.value;
|
|
4017
3991
|
if (!e) return [];
|
|
4018
3992
|
let t = e.data;
|
|
@@ -4025,7 +3999,7 @@ var jr = [
|
|
|
4025
3999
|
anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
|
|
4026
4000
|
angled: i
|
|
4027
4001
|
})).filter((e) => e.label);
|
|
4028
|
-
}),
|
|
4002
|
+
}), oe = h(() => {
|
|
4029
4003
|
let e = f.value;
|
|
4030
4004
|
if (!e || e.chartType !== "bar" || e.series.length !== 1 || S.value) return [];
|
|
4031
4005
|
let t = e.series[0], n = e.data.map((n, r) => {
|
|
@@ -4048,7 +4022,7 @@ var jr = [
|
|
|
4048
4022
|
width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
|
|
4049
4023
|
seriesIndex: 0
|
|
4050
4024
|
}));
|
|
4051
|
-
}),
|
|
4025
|
+
}), se = h(() => {
|
|
4052
4026
|
let e = f.value;
|
|
4053
4027
|
if (!e?.data.length) return [];
|
|
4054
4028
|
let t = e.data[e.data.length - 1];
|
|
@@ -4064,7 +4038,7 @@ var jr = [
|
|
|
4064
4038
|
seriesIndex: n
|
|
4065
4039
|
};
|
|
4066
4040
|
});
|
|
4067
|
-
}),
|
|
4041
|
+
}), ce = h(() => {
|
|
4068
4042
|
let e = f.value;
|
|
4069
4043
|
if (!e?.data.length || e.chartType !== "line") return [];
|
|
4070
4044
|
let t = e.data.length - 1, n = e.data[t];
|
|
@@ -4077,7 +4051,7 @@ var jr = [
|
|
|
4077
4051
|
seriesIndex: i
|
|
4078
4052
|
};
|
|
4079
4053
|
}).filter((e) => e !== null);
|
|
4080
|
-
}),
|
|
4054
|
+
}), ue = h(() => {
|
|
4081
4055
|
let e = _.value;
|
|
4082
4056
|
if (!e) return [];
|
|
4083
4057
|
let t = e.data.map((t) => ({
|
|
@@ -4093,7 +4067,7 @@ var jr = [
|
|
|
4093
4067
|
series: r
|
|
4094
4068
|
})
|
|
4095
4069
|
}));
|
|
4096
|
-
}),
|
|
4070
|
+
}), U = h(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), de = [
|
|
4097
4071
|
"var(--color-theme-900)",
|
|
4098
4072
|
"var(--color-primary-500)",
|
|
4099
4073
|
"color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
|
|
@@ -4103,7 +4077,7 @@ var jr = [
|
|
|
4103
4077
|
"rgba(255, 255, 255, 0.55)"
|
|
4104
4078
|
];
|
|
4105
4079
|
function seriesColor(e) {
|
|
4106
|
-
let n = t.inverted ? pe :
|
|
4080
|
+
let n = t.inverted ? pe : de;
|
|
4107
4081
|
return n[e % n.length];
|
|
4108
4082
|
}
|
|
4109
4083
|
function diagramNodeFill(e) {
|
|
@@ -4112,7 +4086,7 @@ var jr = [
|
|
|
4112
4086
|
function diagramNodeStroke(e) {
|
|
4113
4087
|
return t.inverted ? "rgba(255, 255, 255, 0.22)" : ye.value;
|
|
4114
4088
|
}
|
|
4115
|
-
let he = h(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), _e = h(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), W = h(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = h(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = h(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ye = h(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), K = h(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), be = h(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Se = h(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"),
|
|
4089
|
+
let he = h(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), _e = h(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), W = h(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = h(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = h(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ye = h(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), K = h(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), be = h(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Se = h(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Ce = h(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
|
|
4116
4090
|
return (e, r) => o.value ? (M(), b("section", {
|
|
4117
4091
|
key: 0,
|
|
4118
4092
|
"data-test": "chat-visual",
|
|
@@ -4130,11 +4104,11 @@ var jr = [
|
|
|
4130
4104
|
x("header", Mr, [x("h4", {
|
|
4131
4105
|
class: "text-[13px] font-semibold leading-tight",
|
|
4132
4106
|
style: A({ color: he.value })
|
|
4133
|
-
},
|
|
4107
|
+
}, B(o.value.meta.title), 5), o.value.meta.description ? (M(), b("p", {
|
|
4134
4108
|
key: 0,
|
|
4135
4109
|
class: "mt-0.5 text-[12px] leading-snug",
|
|
4136
4110
|
style: A({ color: _e.value })
|
|
4137
|
-
},
|
|
4111
|
+
}, B(o.value.meta.description), 5)) : v("", !0)]),
|
|
4138
4112
|
x("div", {
|
|
4139
4113
|
ref_key: "bodyEl",
|
|
4140
4114
|
ref: n
|
|
@@ -4142,19 +4116,19 @@ var jr = [
|
|
|
4142
4116
|
key: 0,
|
|
4143
4117
|
role: "img",
|
|
4144
4118
|
"aria-label": o.value.meta.title
|
|
4145
|
-
}, [
|
|
4119
|
+
}, [oe.value.length ? (M(), b("div", Pr, [(M(!0), b(m, null, F(oe.value, (e) => (M(), b("div", {
|
|
4146
4120
|
key: e.key,
|
|
4147
4121
|
"data-test": "chat-visual-horizontal-bar",
|
|
4148
4122
|
class: "min-w-0"
|
|
4149
4123
|
}, [x("div", Fr, [x("span", {
|
|
4150
4124
|
class: "line-clamp-2 min-w-0 font-medium leading-snug",
|
|
4151
4125
|
style: A({ color: he.value })
|
|
4152
|
-
},
|
|
4126
|
+
}, B(e.label), 5), x("span", {
|
|
4153
4127
|
class: "shrink-0 font-semibold tabular-nums",
|
|
4154
4128
|
style: A({ color: he.value })
|
|
4155
|
-
},
|
|
4129
|
+
}, B(e.value), 5)]), x("div", {
|
|
4156
4130
|
class: "h-2 w-full overflow-hidden rounded-full",
|
|
4157
|
-
style: A({ background:
|
|
4131
|
+
style: A({ background: Ce.value })
|
|
4158
4132
|
}, [x("div", {
|
|
4159
4133
|
class: "h-full rounded-full",
|
|
4160
4134
|
style: A({
|
|
@@ -4186,7 +4160,7 @@ var jr = [
|
|
|
4186
4160
|
"text-anchor": "end",
|
|
4187
4161
|
"font-size": "9.5",
|
|
4188
4162
|
style: A({ fill: W.value })
|
|
4189
|
-
},
|
|
4163
|
+
}, B(ae(formatChatVisualTick)({
|
|
4190
4164
|
value: e,
|
|
4191
4165
|
shared: te.value
|
|
4192
4166
|
})), 13, Rr))), 128))]),
|
|
@@ -4232,7 +4206,7 @@ var jr = [
|
|
|
4232
4206
|
r: "2.6",
|
|
4233
4207
|
style: A({ fill: seriesColor(t) })
|
|
4234
4208
|
}, null, 12, Hr)) : v("", !0)], 64))), 128))]))), 128)),
|
|
4235
|
-
(M(!0), b(m, null, F(
|
|
4209
|
+
(M(!0), b(m, null, F(ce.value, (e) => (M(), b("circle", {
|
|
4236
4210
|
key: `marker-${e.key}`,
|
|
4237
4211
|
cx: e.cx,
|
|
4238
4212
|
cy: e.cy,
|
|
@@ -4240,16 +4214,16 @@ var jr = [
|
|
|
4240
4214
|
style: A({ fill: seriesColor(e.seriesIndex) })
|
|
4241
4215
|
}, null, 12, Ur))), 128))
|
|
4242
4216
|
], 64)),
|
|
4243
|
-
(M(!0), b(m, null, F(
|
|
4217
|
+
(M(!0), b(m, null, F(H.value, (e) => (M(), b("text", {
|
|
4244
4218
|
key: e.key,
|
|
4245
4219
|
x: e.x,
|
|
4246
4220
|
y: e.angled ? j.value.height - j.value.bottom + 12 : j.value.height - 6,
|
|
4247
4221
|
"text-anchor": e.anchor,
|
|
4248
4222
|
"font-size": "9.5",
|
|
4249
|
-
transform: e.angled ? `rotate(${
|
|
4223
|
+
transform: e.angled ? `rotate(${ae(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
|
|
4250
4224
|
style: A({ fill: W.value })
|
|
4251
|
-
},
|
|
4252
|
-
], 12, Ir)),
|
|
4225
|
+
}, B(e.label), 13, Wr))), 128))
|
|
4226
|
+
], 12, Ir)), se.value.length > 1 || f.value.chartType !== "bar" ? (M(), b("div", Gr, [(M(!0), b(m, null, F(se.value, (e) => (M(), b("div", {
|
|
4253
4227
|
key: e.key,
|
|
4254
4228
|
class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
|
|
4255
4229
|
}, [
|
|
@@ -4257,41 +4231,41 @@ var jr = [
|
|
|
4257
4231
|
class: "size-2.5 shrink-0 rounded-full",
|
|
4258
4232
|
style: A({ background: seriesColor(e.seriesIndex) })
|
|
4259
4233
|
}, null, 4),
|
|
4260
|
-
x("span", { style: A({ color: _e.value }) },
|
|
4234
|
+
x("span", { style: A({ color: _e.value }) }, B(e.label), 5),
|
|
4261
4235
|
x("span", {
|
|
4262
4236
|
class: "font-semibold tabular-nums",
|
|
4263
4237
|
style: A({ color: he.value })
|
|
4264
|
-
},
|
|
4265
|
-
]))), 128))])) : v("", !0)], 8, Nr)) : _.value ? (M(), b("div", Kr, [(M(!0), b(m, null, F(
|
|
4238
|
+
}, B(e.value), 5)
|
|
4239
|
+
]))), 128))])) : v("", !0)], 8, Nr)) : _.value ? (M(), b("div", Kr, [(M(!0), b(m, null, F(ue.value, (e, t) => (M(), b("div", { key: e.key }, [x("div", qr, [x("span", {
|
|
4266
4240
|
class: "truncate font-medium",
|
|
4267
4241
|
style: A({ color: he.value })
|
|
4268
|
-
},
|
|
4242
|
+
}, B(e.name), 5), x("span", Jr, [x("span", {
|
|
4269
4243
|
class: "font-semibold",
|
|
4270
4244
|
style: A({ color: he.value })
|
|
4271
|
-
},
|
|
4245
|
+
}, B(e.display), 5), x("span", {
|
|
4272
4246
|
class: "ml-1.5",
|
|
4273
4247
|
style: A({ color: _e.value })
|
|
4274
|
-
},
|
|
4248
|
+
}, B(Math.round(e.percent * 100)) + "%", 5)])]), x("div", {
|
|
4275
4249
|
class: "h-1.5 w-full overflow-hidden rounded-full",
|
|
4276
|
-
style: A({ background:
|
|
4250
|
+
style: A({ background: Ce.value })
|
|
4277
4251
|
}, [x("div", {
|
|
4278
4252
|
class: "h-full rounded-full",
|
|
4279
4253
|
style: A({
|
|
4280
4254
|
width: `${Math.max(2, e.percent * 100)}%`,
|
|
4281
4255
|
background: seriesColor(t)
|
|
4282
4256
|
})
|
|
4283
|
-
}, null, 4)], 4)]))), 128))])) : c.value &&
|
|
4257
|
+
}, null, 4)], 4)]))), 128))])) : c.value && U.value ? (M(), b("div", Yr, [(M(), b("svg", {
|
|
4284
4258
|
"data-test": "chat-visual-diagram-svg",
|
|
4285
4259
|
class: "block h-auto overflow-visible",
|
|
4286
|
-
viewBox: `0 0 ${
|
|
4260
|
+
viewBox: `0 0 ${U.value.width} ${U.value.height}`,
|
|
4287
4261
|
style: A({
|
|
4288
|
-
width: `${
|
|
4289
|
-
aspectRatio: `${
|
|
4262
|
+
width: `${U.value.width}px`,
|
|
4263
|
+
aspectRatio: `${U.value.width} / ${U.value.height}`
|
|
4290
4264
|
}),
|
|
4291
4265
|
role: "img",
|
|
4292
4266
|
"aria-label": o.value.meta.title
|
|
4293
4267
|
}, [
|
|
4294
|
-
(M(!0), b(m, null, F(
|
|
4268
|
+
(M(!0), b(m, null, F(U.value.edges, (e) => (M(), b("line", {
|
|
4295
4269
|
key: e.key,
|
|
4296
4270
|
"data-test": "chat-visual-diagram-edge",
|
|
4297
4271
|
"data-from": e.from,
|
|
@@ -4305,14 +4279,14 @@ var jr = [
|
|
|
4305
4279
|
"vector-effect": "non-scaling-stroke",
|
|
4306
4280
|
style: A({ stroke: Se.value })
|
|
4307
4281
|
}, null, 12, Zr))), 128)),
|
|
4308
|
-
(M(!0), b(m, null, F(
|
|
4282
|
+
(M(!0), b(m, null, F(U.value.edges, (e) => (M(), b("circle", {
|
|
4309
4283
|
key: `${e.key}-dot`,
|
|
4310
4284
|
cx: e.x2,
|
|
4311
4285
|
cy: e.y2,
|
|
4312
4286
|
r: "2.4",
|
|
4313
4287
|
style: A({ fill: Se.value })
|
|
4314
4288
|
}, null, 12, Qr))), 128)),
|
|
4315
|
-
(M(!0), b(m, null, F(
|
|
4289
|
+
(M(!0), b(m, null, F(U.value.edges.filter((e) => e.label), (e) => (M(), b("foreignObject", {
|
|
4316
4290
|
key: `${e.key}-label`,
|
|
4317
4291
|
x: e.labelX - 55,
|
|
4318
4292
|
y: e.labelY - 12,
|
|
@@ -4325,8 +4299,8 @@ var jr = [
|
|
|
4325
4299
|
color: _e.value,
|
|
4326
4300
|
background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
|
|
4327
4301
|
})
|
|
4328
|
-
},
|
|
4329
|
-
(M(!0), b(m, null, F(
|
|
4302
|
+
}, B(e.label), 5)], 8, $r))), 128)),
|
|
4303
|
+
(M(!0), b(m, null, F(U.value.nodes, (e) => (M(), b("g", {
|
|
4330
4304
|
key: e.id,
|
|
4331
4305
|
"data-test": "chat-visual-diagram-node",
|
|
4332
4306
|
"data-node-id": e.id,
|
|
@@ -4360,17 +4334,17 @@ var jr = [
|
|
|
4360
4334
|
}, [x("div", ii, [x("div", {
|
|
4361
4335
|
class: "line-clamp-2 text-[13px] font-medium leading-snug",
|
|
4362
4336
|
style: A({ color: he.value })
|
|
4363
|
-
},
|
|
4337
|
+
}, B(e.label), 5), e.detail ? (M(), b("div", {
|
|
4364
4338
|
key: 0,
|
|
4365
4339
|
class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
|
|
4366
4340
|
style: A({ color: _e.value })
|
|
4367
|
-
},
|
|
4341
|
+
}, B(e.detail), 5)) : v("", !0)])], 8, ri))], 8, ei))), 128))
|
|
4368
4342
|
], 12, Xr))])) : v("", !0)], 512),
|
|
4369
4343
|
o.value.meta.footer ? (M(), b("footer", {
|
|
4370
4344
|
key: 0,
|
|
4371
4345
|
class: "mt-3 text-[11px] leading-snug",
|
|
4372
4346
|
style: A({ color: W.value })
|
|
4373
|
-
},
|
|
4347
|
+
}, B(o.value.meta.footer), 5)) : v("", !0)
|
|
4374
4348
|
], 12, jr)) : v("", !0);
|
|
4375
4349
|
}
|
|
4376
4350
|
}), oi = ["innerHTML"], si = /* @__PURE__ */ T({
|
|
@@ -4382,8 +4356,8 @@ var jr = [
|
|
|
4382
4356
|
},
|
|
4383
4357
|
emits: ["action"],
|
|
4384
4358
|
setup(e, { emit: t }) {
|
|
4385
|
-
let n = e, r = t, i =
|
|
4386
|
-
|
|
4359
|
+
let n = e, r = t, i = R(n.text), a;
|
|
4360
|
+
oe([() => n.text, () => n.streaming], ([e, t]) => {
|
|
4387
4361
|
if (!t) {
|
|
4388
4362
|
a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
|
|
4389
4363
|
return;
|
|
@@ -4655,7 +4629,7 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4655
4629
|
},
|
|
4656
4630
|
emits: ["end"],
|
|
4657
4631
|
setup(e, { expose: t, emit: n }) {
|
|
4658
|
-
let r = n, i = P(0), a = P("mic"), o = P("idle"), s = P(!1), c =
|
|
4632
|
+
let r = n, i = P(0), a = P("mic"), o = P("idle"), s = P(!1), c = R(), u = !1, f, p = h(() => s.value ? "error" : o.value === "live" ? a.value === "playback" && i.value > .01 ? "speaking" : "listening" : "connecting"), _ = [
|
|
4659
4633
|
0,
|
|
4660
4634
|
2,
|
|
4661
4635
|
4,
|
|
@@ -4690,12 +4664,12 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4690
4664
|
}
|
|
4691
4665
|
I || (ie = performance.now(), I = ne(easeFrame));
|
|
4692
4666
|
}
|
|
4693
|
-
let
|
|
4667
|
+
let ae = h(() => T.value.map((e) => Math.round((2 + Math.sqrt(Math.min(1, Math.max(0, e))) * 14) * 10) / 10)), H = h(() => p.value === "error" ? "bg-red-500" : p.value === "connecting" ? "bg-amber-500" : p.value === "speaking" ? "bg-primary-500" : "bg-green-500"), oe = {
|
|
4694
4668
|
connecting: "Connecting",
|
|
4695
4669
|
listening: "Listening",
|
|
4696
4670
|
speaking: "Speaking",
|
|
4697
4671
|
error: "Connection problem"
|
|
4698
|
-
},
|
|
4672
|
+
}, se = h(() => oe[p.value]);
|
|
4699
4673
|
function emitEnd() {
|
|
4700
4674
|
u || (u = !0, r("end"));
|
|
4701
4675
|
}
|
|
@@ -4730,23 +4704,23 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4730
4704
|
"data-voice-activity": p.value,
|
|
4731
4705
|
class: "relative flex min-h-0 flex-1 flex-col px-4 pt-8 pb-5"
|
|
4732
4706
|
}, [x("div", mi, [
|
|
4733
|
-
x("div", hi, [C(
|
|
4707
|
+
x("div", hi, [C(Be, {
|
|
4734
4708
|
agent: e.agent,
|
|
4735
4709
|
"show-status": !1,
|
|
4736
4710
|
"show-owner-mark": !1,
|
|
4737
4711
|
"is-light": e.isLight,
|
|
4738
4712
|
class: "size-28"
|
|
4739
4713
|
}, null, 8, ["agent", "is-light"])]),
|
|
4740
|
-
x("div", gi, [(M(!0), b(m, null, F(
|
|
4714
|
+
x("div", gi, [(M(!0), b(m, null, F(ae.value, (e, t) => (M(), b("span", {
|
|
4741
4715
|
key: t,
|
|
4742
4716
|
"data-test": "voice-histogram-bar",
|
|
4743
|
-
class: k(["w-[2.5px] rounded-full transition-colors duration-150", [
|
|
4717
|
+
class: k(["w-[2.5px] rounded-full transition-colors duration-150", [H.value, p.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
|
|
4744
4718
|
style: A({
|
|
4745
4719
|
height: `${e}px`,
|
|
4746
4720
|
...p.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
|
|
4747
4721
|
})
|
|
4748
4722
|
}, null, 6))), 128))]),
|
|
4749
|
-
x("div", _i,
|
|
4723
|
+
x("div", _i, B(se.value), 1)
|
|
4750
4724
|
])], 8, pi));
|
|
4751
4725
|
}
|
|
4752
4726
|
}), Si = {
|
|
@@ -4811,46 +4785,42 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4811
4785
|
}, Ki = ["data-journal-outcome"], qi = ["data-test", "data-working-description"], Ji = {
|
|
4812
4786
|
class: "flex items-center gap-[5px]",
|
|
4813
4787
|
"aria-hidden": "true"
|
|
4814
|
-
}, Yi = { class: "truncate" }, Xi = ["data-issue-code"], Zi = ["href"], Qi = ["src", "alt"],
|
|
4788
|
+
}, Yi = { class: "truncate" }, Xi = ["data-issue-code"], Zi = ["href"], Qi = ["data-seat-state"], $i = ["src", "alt"], ea = { class: "max-w-20 truncate" }, ta = ["onClick"], na = {
|
|
4815
4789
|
key: 0,
|
|
4816
4790
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
4817
|
-
},
|
|
4791
|
+
}, ra = ["data-composer-action"], ia = ["placeholder", "disabled"], aa = { class: "font-mono text-sm tabular-nums" }, oa = { class: "mt-2.5 flex items-center" }, sa = [
|
|
4818
4792
|
"disabled",
|
|
4819
4793
|
"aria-label",
|
|
4820
4794
|
"title"
|
|
4821
|
-
],
|
|
4795
|
+
], ca = {
|
|
4822
4796
|
key: 0,
|
|
4823
4797
|
class: "i-svg-spinners-ring-resize size-5"
|
|
4824
|
-
},
|
|
4798
|
+
}, la = {
|
|
4825
4799
|
key: 1,
|
|
4826
4800
|
class: "i-tabler-plus size-5"
|
|
4827
|
-
},
|
|
4801
|
+
}, ua = { class: "sr-only" }, da = { class: "flex items-center gap-2" }, fa = ["aria-label", "title"], pa = { class: "sr-only" }, ma = [
|
|
4828
4802
|
"disabled",
|
|
4829
4803
|
"aria-label",
|
|
4830
4804
|
"title"
|
|
4831
|
-
],
|
|
4805
|
+
], ha = {
|
|
4832
4806
|
class: "flex h-4 items-center gap-[2px]",
|
|
4833
4807
|
"aria-hidden": "true"
|
|
4834
|
-
},
|
|
4808
|
+
}, ga = [
|
|
4835
4809
|
"data-composer-action",
|
|
4836
4810
|
"disabled",
|
|
4837
4811
|
"aria-label",
|
|
4838
4812
|
"title"
|
|
4839
|
-
],
|
|
4813
|
+
], _a = {
|
|
4840
4814
|
key: 0,
|
|
4841
4815
|
class: "i-tabler-player-stop-filled size-3.5"
|
|
4842
|
-
},
|
|
4816
|
+
}, va = {
|
|
4843
4817
|
key: 1,
|
|
4844
4818
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4845
|
-
},
|
|
4846
|
-
key:
|
|
4819
|
+
}, ya = { class: "sr-only" }, ba = {
|
|
4820
|
+
key: 2,
|
|
4847
4821
|
"data-test": "messaging-ai-notice",
|
|
4848
4822
|
class: "mx-auto max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"
|
|
4849
|
-
},
|
|
4850
|
-
key: 4,
|
|
4851
|
-
"data-test": "messaging-suggested-prompts",
|
|
4852
|
-
class: "mt-3 w-full sm:mx-auto sm:mt-5 sm:max-w-[720px]"
|
|
4853
|
-
}, xa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, Sa = ["disabled", "onClick"], Ca = ["aria-expanded"], wa = /* @__PURE__ */ T({
|
|
4823
|
+
}, xa = /* @__PURE__ */ T({
|
|
4854
4824
|
__name: "ElAgentChat",
|
|
4855
4825
|
props: {
|
|
4856
4826
|
chatController: {},
|
|
@@ -4868,8 +4838,7 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4868
4838
|
centered: {
|
|
4869
4839
|
type: Boolean,
|
|
4870
4840
|
default: !1
|
|
4871
|
-
}
|
|
4872
|
-
suggestedPrompts: { default: () => [] }
|
|
4841
|
+
}
|
|
4873
4842
|
},
|
|
4874
4843
|
setup(e) {
|
|
4875
4844
|
let t = {
|
|
@@ -4896,29 +4865,29 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4896
4865
|
return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
|
|
4897
4866
|
}
|
|
4898
4867
|
function isSystemExplainerMessage(e) {
|
|
4899
|
-
return e.sender === "system" && (!!e.issue || e.id ===
|
|
4868
|
+
return e.sender === "system" && (!!e.issue || e.id === ve.value);
|
|
4900
4869
|
}
|
|
4901
4870
|
function isGroupEnd(e, t) {
|
|
4902
4871
|
let n = e[t], r = e[t + 1];
|
|
4903
4872
|
return !r || r.sender !== n.sender;
|
|
4904
4873
|
}
|
|
4905
|
-
let c = h(() => e.chatController?.textState.value), u = h(() => c.value?.isConnected ?? !1), f = h(() => c.value?.isThinking ?? !1), p = h(() => c.value?.connectionStatus
|
|
4906
|
-
for (let e =
|
|
4907
|
-
let t =
|
|
4874
|
+
let c = h(() => e.chatController?.textState.value), u = h(() => c.value?.isConnected ?? !1), f = h(() => c.value?.isThinking ?? !1), p = h(() => c.value?.connectionStatus !== "connected" && !c.value?.error), T = h(() => e.chatController?.liveTurnBlocks?.value ?? []), ne = h(() => {
|
|
4875
|
+
for (let e = T.value.length - 1; e >= 0; e--) {
|
|
4876
|
+
let t = T.value[e];
|
|
4908
4877
|
if (t?.kind === "text") return t.id;
|
|
4909
4878
|
}
|
|
4910
|
-
}),
|
|
4879
|
+
}), ie = h(() => e.chatController?.liveStreamMessageId?.value), R = h(() => {
|
|
4911
4880
|
let t = e.chatController?.sharedMessages.value ?? [];
|
|
4912
|
-
return
|
|
4913
|
-
}),
|
|
4881
|
+
return T.value.length && ie.value ? t.filter((e) => e.id !== ie.value) : t;
|
|
4882
|
+
}), ae = h(() => {
|
|
4914
4883
|
if (!e.chatController?.workJournal?.value) return c.value?.workingDescription?.trim() || void 0;
|
|
4915
|
-
}),
|
|
4916
|
-
if (!
|
|
4917
|
-
let e =
|
|
4884
|
+
}), de = h(() => e.chatController?.workJournal?.value), pe = h(() => {
|
|
4885
|
+
if (!de.value && !T.value.length) return;
|
|
4886
|
+
let e = R.value, t = e[e.length - 1];
|
|
4918
4887
|
if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
|
|
4919
|
-
}),
|
|
4888
|
+
}), _e = h(() => {
|
|
4920
4889
|
let t = {};
|
|
4921
|
-
for (let n of
|
|
4890
|
+
for (let n of R.value) {
|
|
4922
4891
|
if (n.sender === "user" || !n.toolActivities?.length) continue;
|
|
4923
4892
|
let r = e.chatController?.workJournalFor?.({
|
|
4924
4893
|
activities: n.toolActivities,
|
|
@@ -4930,7 +4899,7 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4930
4899
|
return t;
|
|
4931
4900
|
});
|
|
4932
4901
|
function messageWorkJournal(e) {
|
|
4933
|
-
return
|
|
4902
|
+
return _e.value[e.id];
|
|
4934
4903
|
}
|
|
4935
4904
|
function inlineOffset(e, t) {
|
|
4936
4905
|
return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
|
|
@@ -4978,38 +4947,34 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
4978
4947
|
text: t.slice(i)
|
|
4979
4948
|
}), r;
|
|
4980
4949
|
}
|
|
4981
|
-
let
|
|
4950
|
+
let W = h(() => c.value?.transientIssue), ve = h(() => {
|
|
4982
4951
|
if (!f.value) return;
|
|
4983
|
-
let e =
|
|
4952
|
+
let e = R.value, t = e[e.length - 1];
|
|
4984
4953
|
return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
|
|
4985
|
-
}),
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
return n === "asleep" || n === "stuck" ? `${t} is ${i[n].toLowerCase()}` : `Message ${t}`;
|
|
4991
|
-
}
|
|
4992
|
-
return T.value ? "Connecting..." : Se.value === "agent_deleted" ? "This assistant was deleted" : `Message ${t}`;
|
|
4993
|
-
}), we = h(() => e.chatController?.composerState?.value ?? {
|
|
4954
|
+
}), G = h(() => !f.value || ae.value || de.value || T.value.length ? !1 : ve.value === void 0), ye = h(() => ae.value ?? (G.value ? "Thinking…" : void 0)), K = h(() => c.value?.sendBlockedReason), be = h(() => K.value === "agent_deleted"), Se = h(() => p.value ? "Connecting..." : K.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), Ce = h(() => s(e.agent.state.value)), we = h(() => {
|
|
4955
|
+
if (Ge.value || !Ce.value || Ce.value === "awake") return;
|
|
4956
|
+
let t = e.agent.displayName.value || e.agent.name.value || "Your assistant";
|
|
4957
|
+
return Ce.value === "changing" ? `${t} will be right back…` : `${t} is ${i[Ce.value].toLowerCase()}.`;
|
|
4958
|
+
}), Te = h(() => e.chatController?.composerState?.value ?? {
|
|
4994
4959
|
text: "",
|
|
4995
4960
|
pendingAttachments: [],
|
|
4996
4961
|
isUploading: !1
|
|
4997
|
-
}),
|
|
4998
|
-
get: () =>
|
|
4962
|
+
}), Ee = h({
|
|
4963
|
+
get: () => Te.value.text,
|
|
4999
4964
|
set: (t) => e.chatController?.setComposerText?.({ text: t })
|
|
5000
|
-
}),
|
|
4965
|
+
}), De = h(() => Te.value.pendingAttachments), Oe = h(() => Te.value.isUploading), ke = h(() => e.chatController?.voiceRecorder), Ae = h(() => ke.value?.isBusy.value ?? !1), je = h(() => e.chatController?.canAttachFile?.value ?? !1), Me = h(() => e.chatController?.canRecordAudio?.value ?? !1), Ne = h(() => e.chatController?.composerAction?.value ?? "idle"), Pe = h(() => Ne.value !== "idle"), Ie = h(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Le = h(() => e.chatController?.queuedMessageIds?.value);
|
|
5001
4966
|
function isQueuedMessage(e) {
|
|
5002
|
-
return
|
|
4967
|
+
return Le.value?.has(e) ?? !1;
|
|
5003
4968
|
}
|
|
5004
|
-
let
|
|
4969
|
+
let Re = h(() => Ne.value === "stop" ? "Stop reply" : Ie.value ? "Send — answered after current work" : "Send message"), ze = h(() => Me.value && !Ae.value && !!ke.value?.canUseBrowserRecording), Ve = h(() => ke.value?.isActive.value ?? !1), He = h(() => ke.value?.elapsedLabel.value ?? "0:00"), Ue = h(() => ke.value?.statusText.value ?? "Release to send"), We = h(() => ke.value?.state.value.phase === "sending" ? "Sending voice message" : Ve.value ? "Release to send voice message" : "Hold to record voice message"), Ge = P(!1), Ke = P(), qe = h(() => e.chatController?.canStartVoice?.value ?? !1), Je = h(() => qe.value && !Ge.value && !Ve.value && Ne.value === "idle"), Xe = h(() => !u.value), Ze = h(() => Xe.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
|
|
5005
4970
|
function startVoiceConversation() {
|
|
5006
|
-
!
|
|
4971
|
+
!Je.value || Xe.value || (Ge.value = !0);
|
|
5007
4972
|
}
|
|
5008
|
-
let
|
|
4973
|
+
let Qe = h(() => Ge.value && Te.value.text.trim().length > 0);
|
|
5009
4974
|
async function sendVoiceUserMessage() {
|
|
5010
|
-
let t =
|
|
4975
|
+
let t = Te.value.text.trim();
|
|
5011
4976
|
if (t) {
|
|
5012
|
-
if (
|
|
4977
|
+
if (Ke.value?.sendUserMessage(t)) {
|
|
5013
4978
|
e.chatController?.setComposerText?.({ text: "" }), a.value?.focus();
|
|
5014
4979
|
return;
|
|
5015
4980
|
}
|
|
@@ -5017,31 +4982,25 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5017
4982
|
}
|
|
5018
4983
|
}
|
|
5019
4984
|
async function endVoiceConversation() {
|
|
5020
|
-
if (!
|
|
5021
|
-
let t =
|
|
5022
|
-
|
|
4985
|
+
if (!Ge.value) return;
|
|
4986
|
+
let t = Ke.value?.end();
|
|
4987
|
+
Ge.value = !1, await te(), await t, a.value?.focus(), await e.chatController?.refreshMessages();
|
|
5023
4988
|
}
|
|
5024
|
-
let
|
|
4989
|
+
let q = h(() => e.variant === "light"), $e = h(() => q.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), J = h(() => q.value ? "text-theme-300" : "text-white/30");
|
|
5025
4990
|
re(async () => {
|
|
5026
4991
|
e.chatController && !u.value && await e.chatController.startTextConversation();
|
|
5027
4992
|
}), j(() => {
|
|
5028
4993
|
e.chatController?.voiceRecorder?.teardown();
|
|
5029
4994
|
});
|
|
5030
4995
|
async function sendMessage() {
|
|
5031
|
-
|
|
5032
|
-
a.value && (a.value.style.height = "auto", a.value.focus()), r.value?.pin();
|
|
5033
|
-
let t = e.chatController.sendComposerMessage();
|
|
5034
|
-
window.matchMedia("(pointer: coarse)").matches && a.value?.blur(), await t;
|
|
4996
|
+
!e.chatController || Ne.value !== "send" || (a.value && (a.value.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? a.value.blur() : a.value.focus()), r.value?.pin(), await e.chatController.sendComposerMessage());
|
|
5035
4997
|
}
|
|
5036
4998
|
async function handleCardAction(t) {
|
|
5037
|
-
!e.chatController ||
|
|
5038
|
-
}
|
|
5039
|
-
async function sendSuggestedPrompt(t) {
|
|
5040
|
-
!e.chatController || q.value || (r.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
|
|
4999
|
+
!e.chatController || be.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
|
|
5041
5000
|
}
|
|
5042
5001
|
async function handleComposerAction() {
|
|
5043
5002
|
if (e.chatController) {
|
|
5044
|
-
if (
|
|
5003
|
+
if (Ne.value === "send") {
|
|
5045
5004
|
await sendMessage();
|
|
5046
5005
|
return;
|
|
5047
5006
|
}
|
|
@@ -5049,30 +5008,30 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5049
5008
|
}
|
|
5050
5009
|
}
|
|
5051
5010
|
async function handleKeydown(e) {
|
|
5052
|
-
e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await (
|
|
5011
|
+
e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await (Qe.value ? sendVoiceUserMessage() : sendMessage()));
|
|
5053
5012
|
}
|
|
5054
5013
|
function focusComposer(e) {
|
|
5055
|
-
|
|
5014
|
+
Ve.value || be.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
|
|
5056
5015
|
}
|
|
5057
5016
|
function adjustTextareaHeight() {
|
|
5058
5017
|
a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
|
|
5059
5018
|
}
|
|
5060
|
-
|
|
5019
|
+
oe(Ee, () => te(() => adjustTextareaHeight()));
|
|
5061
5020
|
function triggerFileInput() {
|
|
5062
5021
|
o.value?.click();
|
|
5063
5022
|
}
|
|
5064
5023
|
async function handleFileSelect(t) {
|
|
5065
5024
|
let n = t.target, r = n.files?.[0];
|
|
5066
|
-
!r || !e.chatController ||
|
|
5025
|
+
!r || !e.chatController || Ae.value || (await e.chatController.attachFile({ file: r }), n.value = "");
|
|
5067
5026
|
}
|
|
5068
5027
|
function removeAttachment(t) {
|
|
5069
5028
|
e.chatController?.removeAttachment({ index: t });
|
|
5070
5029
|
}
|
|
5071
5030
|
function startRecording() {
|
|
5072
|
-
|
|
5031
|
+
ke.value?.start();
|
|
5073
5032
|
}
|
|
5074
5033
|
function finishRecording(e) {
|
|
5075
|
-
|
|
5034
|
+
ke.value?.finish(e);
|
|
5076
5035
|
}
|
|
5077
5036
|
function shouldShowTimeDivider(e, t) {
|
|
5078
5037
|
if (t === 0) {
|
|
@@ -5103,69 +5062,69 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5103
5062
|
}
|
|
5104
5063
|
return (t, i) => (M(), b("div", {
|
|
5105
5064
|
"data-test": "messaging-root",
|
|
5106
|
-
class: k(["@container/chat relative flex h-full flex-col",
|
|
5065
|
+
class: k(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
|
|
5107
5066
|
}, [
|
|
5108
|
-
e.showHeader && !
|
|
5067
|
+
e.showHeader && !q.value ? (M(), b("div", Si, [C(Fe, {
|
|
5109
5068
|
agent: e.agent,
|
|
5110
5069
|
"is-online": u.value
|
|
5111
5070
|
}, null, 8, ["agent", "is-online"])])) : e.showHeader ? (M(), b("div", Ci, [x("div", { class: k(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
|
|
5112
|
-
C(
|
|
5071
|
+
C(Be, {
|
|
5113
5072
|
agent: e.agent,
|
|
5114
|
-
"is-light":
|
|
5073
|
+
"is-light": q.value,
|
|
5115
5074
|
class: "size-10"
|
|
5116
5075
|
}, null, 8, ["agent", "is-light"]),
|
|
5117
|
-
x("div", wi, [x("div", Ti,
|
|
5118
|
-
e.headerMeta ? (M(), b("span", Di,
|
|
5076
|
+
x("div", wi, [x("div", Ti, B(e.agent.displayName.value), 1), x("div", Ei, B(e.agent.title.value || "Assistant"), 1)]),
|
|
5077
|
+
e.headerMeta ? (M(), b("span", Di, B(e.headerMeta), 1)) : v("", !0)
|
|
5119
5078
|
], 2)])) : v("", !0),
|
|
5120
|
-
|
|
5079
|
+
Ge.value ? (M(), _(xi, {
|
|
5121
5080
|
key: 2,
|
|
5122
5081
|
ref_key: "voiceMode",
|
|
5123
|
-
ref:
|
|
5082
|
+
ref: Ke,
|
|
5124
5083
|
agent: e.agent,
|
|
5125
5084
|
"chat-controller": e.chatController,
|
|
5126
|
-
"is-light":
|
|
5085
|
+
"is-light": q.value,
|
|
5127
5086
|
onEnd: endVoiceConversation
|
|
5128
5087
|
}, null, 8, [
|
|
5129
5088
|
"agent",
|
|
5130
5089
|
"chat-controller",
|
|
5131
5090
|
"is-light"
|
|
5132
|
-
])) : (M(), b(m, { key: 3 }, [
|
|
5091
|
+
])) : (M(), b(m, { key: 3 }, [p.value ? (M(), b("div", {
|
|
5133
5092
|
key: 0,
|
|
5134
|
-
class: k(["py-16 flex flex-col items-center justify-center gap-2 text-sm",
|
|
5093
|
+
class: k(["py-16 flex flex-col items-center justify-center gap-2 text-sm", q.value ? "text-theme-400" : "text-theme-600"])
|
|
5135
5094
|
}, [C(he, { class: "size-4" })], 2)) : e.setupHint ? (M(), b("div", {
|
|
5136
5095
|
key: 1,
|
|
5137
|
-
class: k(["flex items-center justify-center gap-1.5 py-2 text-[11px]",
|
|
5138
|
-
}, [i[
|
|
5096
|
+
class: k(["flex items-center justify-center gap-1.5 py-2 text-[11px]", J.value])
|
|
5097
|
+
}, [i[21] || (i[21] = x("i", { class: "i-tabler-tool size-3" }, null, -1)), x("span", null, B(e.setupHint), 1)], 2)) : v("", !0), C(ui, {
|
|
5139
5098
|
ref_key: "chatScroller",
|
|
5140
5099
|
ref: r,
|
|
5141
|
-
class: k(
|
|
5100
|
+
class: k(R.value.length === 0 ? "flex-none" : "flex-1")
|
|
5142
5101
|
}, {
|
|
5143
|
-
default:
|
|
5144
|
-
|
|
5102
|
+
default: se(() => [x("div", { class: k([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
|
|
5103
|
+
R.value.length === 0 && !p.value ? (M(), b("div", Oi, [I(t.$slots, "empty-heading", {
|
|
5145
5104
|
agent: e.agent,
|
|
5146
|
-
isLight:
|
|
5147
|
-
}, () => [C(
|
|
5105
|
+
isLight: q.value
|
|
5106
|
+
}, () => [C(Be, {
|
|
5148
5107
|
agent: e.agent,
|
|
5149
|
-
"is-light":
|
|
5108
|
+
"is-light": q.value,
|
|
5150
5109
|
class: "mb-4 size-20 @sm/chat:size-24"
|
|
5151
|
-
}, null, 8, ["agent", "is-light"]), x("div", { class: k(["text-base @sm/chat:text-lg font-semibold",
|
|
5152
|
-
class: k(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]",
|
|
5110
|
+
}, null, 8, ["agent", "is-light"]), x("div", { class: k(["text-base @sm/chat:text-lg font-semibold", q.value ? "text-theme-900" : "text-white"]) }, B(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? v("", !0) : (M(), b(m, { key: 0 }, [x("p", { class: k(["mt-1 text-center text-xs @sm/chat:text-sm", J.value]) }, B(e.emptyStateMessage || "Type your message to get started."), 3), x("div", {
|
|
5111
|
+
class: k(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", q.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
|
|
5153
5112
|
title: n.value.tooltip
|
|
5154
|
-
}, [x("i", { class: k([n.value.icon, "size-3"]) }, null, 2), x("span", null,
|
|
5155
|
-
(M(!0), b(m, null, F(
|
|
5156
|
-
shouldShowTimeDivider(
|
|
5157
|
-
x("div", { class: k(["flex-1 h-px",
|
|
5158
|
-
x("span", { class: k(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase",
|
|
5159
|
-
x("div", { class: k(["flex-1 h-px",
|
|
5113
|
+
}, [x("i", { class: k([n.value.icon, "size-3"]) }, null, 2), x("span", null, B(n.value.label), 1)], 10, ki)], 64))])) : v("", !0),
|
|
5114
|
+
(M(!0), b(m, null, F(R.value, (e, t) => (M(), b(m, { key: e.id }, [
|
|
5115
|
+
shouldShowTimeDivider(R.value, t) ? (M(), b("div", Ai, [
|
|
5116
|
+
x("div", { class: k(["flex-1 h-px", $e.value]) }, null, 2),
|
|
5117
|
+
x("span", { class: k(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", J.value]) }, B(shouldShowTimeDivider(R.value, t)), 3),
|
|
5118
|
+
x("div", { class: k(["flex-1 h-px", $e.value]) }, null, 2)
|
|
5160
5119
|
])) : v("", !0),
|
|
5161
5120
|
messageWorkJournal(e) ? (M(), b("div", {
|
|
5162
5121
|
key: 1,
|
|
5163
5122
|
"data-test": "messaging-message-tool-activity",
|
|
5164
5123
|
"data-journal-outcome": messageWorkJournal(e)?.outcome,
|
|
5165
5124
|
class: "mb-4 w-full"
|
|
5166
|
-
}, [C(
|
|
5125
|
+
}, [C(Ye, {
|
|
5167
5126
|
model: messageWorkJournal(e),
|
|
5168
|
-
"is-light":
|
|
5127
|
+
"is-light": q.value
|
|
5169
5128
|
}, null, 8, ["model", "is-light"])], 8, ji)) : v("", !0),
|
|
5170
5129
|
isSystemExplainerMessage(e) ? (M(), b("div", {
|
|
5171
5130
|
key: 2,
|
|
@@ -5179,14 +5138,14 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5179
5138
|
"data-issue-bucket": e.issue?.bucket,
|
|
5180
5139
|
"data-issue-action-label": e.issue?.actionLabel,
|
|
5181
5140
|
"data-issue-action-url": e.issue?.actionUrl,
|
|
5182
|
-
"data-streaming": e.id ===
|
|
5141
|
+
"data-streaming": e.id === ve.value ? "true" : void 0,
|
|
5183
5142
|
class: "flex gap-2 items-end justify-start mb-4"
|
|
5184
|
-
}, [x("div", Ni, [x("div", { class: k(["mb-1 pl-1 text-[11px] font-medium",
|
|
5143
|
+
}, [x("div", Ni, [x("div", { class: k(["mb-1 pl-1 text-[11px] font-medium", q.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), x("div", { class: k(["pl-1", q.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (M(), _(si, {
|
|
5185
5144
|
key: 0,
|
|
5186
5145
|
text: e.text,
|
|
5187
|
-
inverted: !
|
|
5188
|
-
streaming: e.id ===
|
|
5189
|
-
onClick: i[0] || (i[0] =
|
|
5146
|
+
inverted: !q.value,
|
|
5147
|
+
streaming: e.id === ve.value,
|
|
5148
|
+
onClick: i[0] || (i[0] = U(() => {}, ["stop"])),
|
|
5190
5149
|
onAction: handleCardAction
|
|
5191
5150
|
}, null, 8, [
|
|
5192
5151
|
"text",
|
|
@@ -5195,14 +5154,14 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5195
5154
|
])) : e.issue?.help ? (M(), _(si, {
|
|
5196
5155
|
key: 1,
|
|
5197
5156
|
text: e.issue.help,
|
|
5198
|
-
inverted: !
|
|
5157
|
+
inverted: !q.value
|
|
5199
5158
|
}, null, 8, ["text", "inverted"])) : v("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (M(), b("a", {
|
|
5200
5159
|
key: 2,
|
|
5201
5160
|
href: e.issue.actionUrl,
|
|
5202
5161
|
"data-test": "messaging-system-msg-action",
|
|
5203
|
-
class: k(["mt-2 text-[12px] font-medium inline-flex items-center gap-1",
|
|
5204
|
-
onClick: i[1] || (i[1] =
|
|
5205
|
-
}, [S(
|
|
5162
|
+
class: k(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", q.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
|
|
5163
|
+
onClick: i[1] || (i[1] = U(() => {}, ["stop"]))
|
|
5164
|
+
}, [S(B(e.issue.actionLabel) + " ", 1), i[22] || (i[22] = x("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Pi)) : v("", !0)], 2)])], 8, Mi)) : e.sender === "system" ? (M(), b("div", {
|
|
5206
5165
|
key: 3,
|
|
5207
5166
|
"data-test": "messaging-system-status-msg",
|
|
5208
5167
|
"data-message-id": e.id,
|
|
@@ -5212,15 +5171,15 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5212
5171
|
"data-system-kind": e.systemKind,
|
|
5213
5172
|
"data-issue-code": e.issue?.code,
|
|
5214
5173
|
"data-issue-bucket": e.issue?.bucket,
|
|
5215
|
-
"data-streaming": e.id ===
|
|
5216
|
-
class: k(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1",
|
|
5217
|
-
}, [i[
|
|
5174
|
+
"data-streaming": e.id === ve.value ? "true" : void 0,
|
|
5175
|
+
class: k(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", q.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
|
|
5176
|
+
}, [i[23] || (i[23] = x("i", {
|
|
5218
5177
|
class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
|
|
5219
5178
|
"aria-hidden": "true"
|
|
5220
5179
|
}, null, -1)), C(si, {
|
|
5221
5180
|
text: e.text,
|
|
5222
|
-
inverted: !
|
|
5223
|
-
onClick: i[2] || (i[2] =
|
|
5181
|
+
inverted: !q.value,
|
|
5182
|
+
onClick: i[2] || (i[2] = U(() => {}, ["stop"]))
|
|
5224
5183
|
}, null, 8, ["text", "inverted"])], 10, Fi)) : (M(), b("div", {
|
|
5225
5184
|
key: 4,
|
|
5226
5185
|
"data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
|
|
@@ -5229,13 +5188,13 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5229
5188
|
"data-conversation-id": e.conversationId,
|
|
5230
5189
|
"data-message-sequence": e.sequence,
|
|
5231
5190
|
"data-system-kind": e.systemKind,
|
|
5232
|
-
"data-streaming": e.id ===
|
|
5191
|
+
"data-streaming": e.id === ve.value ? "true" : void 0,
|
|
5233
5192
|
"data-queued": isQueuedMessage(e.id) ? "true" : void 0,
|
|
5234
5193
|
"aria-label": isQueuedMessage(e.id) ? "Sent — will be answered after the current work finishes" : void 0,
|
|
5235
5194
|
class: k(["flex gap-2 items-end", {
|
|
5236
5195
|
"justify-end": e.sender === "user",
|
|
5237
5196
|
"justify-start": e.sender === "agent",
|
|
5238
|
-
"mb-6": isGroupEnd(
|
|
5197
|
+
"mb-6": isGroupEnd(R.value, t),
|
|
5239
5198
|
"opacity-70": isQueuedMessage(e.id)
|
|
5240
5199
|
}])
|
|
5241
5200
|
}, [x("div", {
|
|
@@ -5265,16 +5224,16 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5265
5224
|
rel: "noopener",
|
|
5266
5225
|
"data-test": "messaging-attachment",
|
|
5267
5226
|
"data-attachment-placement": "block",
|
|
5268
|
-
class: k(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",
|
|
5269
|
-
}, [i[
|
|
5227
|
+
class: k(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", q.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5228
|
+
}, [i[24] || (i[24] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), S(" " + B(e.filename), 1)], 10, zi))], 64))), 128))], 2)) : v("", !0), messageRenderParts(e).length ? (M(), b("div", {
|
|
5270
5229
|
key: 1,
|
|
5271
5230
|
"data-test": "messaging-message-content",
|
|
5272
|
-
class: k(e.sender === "user" ?
|
|
5231
|
+
class: k(e.sender === "user" ? q.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : q.value ? "text-theme-800" : "text-white/95")
|
|
5273
5232
|
}, [(M(!0), b(m, null, F(messageRenderParts(e), (t) => (M(), b(m, { key: t.key }, [t.kind === "text" && t.text ? (M(), b("div", Bi, [C(si, {
|
|
5274
5233
|
text: t.text,
|
|
5275
|
-
inverted: e.sender === "user" || !
|
|
5276
|
-
streaming: e.id ===
|
|
5277
|
-
onClick: i[3] || (i[3] =
|
|
5234
|
+
inverted: e.sender === "user" || !q.value,
|
|
5235
|
+
streaming: e.id === ve.value,
|
|
5236
|
+
onClick: i[3] || (i[3] = U(() => {}, ["stop"])),
|
|
5278
5237
|
onAction: handleCardAction
|
|
5279
5238
|
}, null, 8, [
|
|
5280
5239
|
"text",
|
|
@@ -5301,107 +5260,109 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5301
5260
|
rel: "noopener",
|
|
5302
5261
|
"data-test": "messaging-attachment",
|
|
5303
5262
|
"data-attachment-placement": t.placement,
|
|
5304
|
-
class: k(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",
|
|
5305
|
-
}, [i[
|
|
5306
|
-
e.id ===
|
|
5263
|
+
class: k(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", q.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5264
|
+
}, [i[25] || (i[25] = x("i", { class: "i-tabler-file size-3.5" }, null, -1)), S(" " + B(t.attachment.filename), 1)], 10, Ui)) : v("", !0)], 64))), 128))], 2)) : v("", !0)], 2)], 10, Ii)),
|
|
5265
|
+
e.id === pe.value ? (M(), b(m, { key: 5 }, [T.value.length ? (M(!0), b(m, { key: 0 }, F(T.value, (e) => (M(), b(m, { key: e.id }, [e.kind === "work" ? (M(), b("div", {
|
|
5307
5266
|
key: 0,
|
|
5308
5267
|
"data-test": "messaging-tool-activity",
|
|
5309
5268
|
"data-journal-outcome": e.journal.outcome,
|
|
5310
5269
|
class: "mb-4 w-full"
|
|
5311
|
-
}, [C(
|
|
5270
|
+
}, [C(Ye, {
|
|
5312
5271
|
model: e.journal,
|
|
5313
|
-
"is-light":
|
|
5272
|
+
"is-light": q.value
|
|
5314
5273
|
}, null, 8, ["model", "is-light"])], 8, Wi)) : e.kind === "text" && e.content ? (M(), b("div", {
|
|
5315
5274
|
key: 1,
|
|
5316
5275
|
"data-test": "messaging-live-text-block",
|
|
5317
|
-
class: k(["mb-4",
|
|
5276
|
+
class: k(["mb-4", q.value ? "text-theme-800" : "text-white/95"])
|
|
5318
5277
|
}, [C(si, {
|
|
5319
5278
|
text: e.content,
|
|
5320
|
-
inverted: !
|
|
5321
|
-
streaming: e.id ===
|
|
5322
|
-
onClick: i[4] || (i[4] =
|
|
5279
|
+
inverted: !q.value,
|
|
5280
|
+
streaming: e.id === ne.value,
|
|
5281
|
+
onClick: i[4] || (i[4] = U(() => {}, ["stop"])),
|
|
5323
5282
|
onAction: handleCardAction
|
|
5324
5283
|
}, null, 8, [
|
|
5325
5284
|
"text",
|
|
5326
5285
|
"inverted",
|
|
5327
5286
|
"streaming"
|
|
5328
|
-
])], 2)) : (M(), b("div", Gi, [C(he, { class: k(["size-3.5",
|
|
5287
|
+
])], 2)) : (M(), b("div", Gi, [C(he, { class: k(["size-3.5", q.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : de.value ? (M(), b("div", {
|
|
5329
5288
|
key: 1,
|
|
5330
5289
|
"data-test": "messaging-tool-activity",
|
|
5331
|
-
"data-journal-outcome":
|
|
5290
|
+
"data-journal-outcome": de.value.outcome,
|
|
5332
5291
|
class: "mb-4 w-full"
|
|
5333
|
-
}, [C(
|
|
5334
|
-
model:
|
|
5335
|
-
"is-light":
|
|
5292
|
+
}, [C(Ye, {
|
|
5293
|
+
model: de.value,
|
|
5294
|
+
"is-light": q.value
|
|
5336
5295
|
}, null, 8, ["model", "is-light"])], 8, Ki)) : v("", !0)], 64)) : v("", !0)
|
|
5337
5296
|
], 64))), 128)),
|
|
5338
|
-
|
|
5297
|
+
ye.value ? (M(), b("div", {
|
|
5339
5298
|
key: 1,
|
|
5340
|
-
"data-test":
|
|
5341
|
-
"data-working-description":
|
|
5299
|
+
"data-test": ae.value ? "messaging-working-state" : "messaging-thinking-indicator",
|
|
5300
|
+
"data-working-description": ae.value,
|
|
5342
5301
|
role: "status",
|
|
5343
5302
|
"aria-live": "polite",
|
|
5344
|
-
class: k(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug",
|
|
5303
|
+
class: k(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", q.value ? "text-theme-500" : "text-white/50"])
|
|
5345
5304
|
}, [x("span", Ji, [(M(), b(m, null, F(3, (e) => x("span", {
|
|
5346
5305
|
key: e,
|
|
5347
5306
|
"data-test": "messaging-thinking-dot",
|
|
5348
5307
|
class: "chat-working-dot size-1.5 rounded-full bg-current",
|
|
5349
5308
|
style: A({ animationDelay: `${(e - 1) * .18}s` })
|
|
5350
|
-
}, null, 4)), 64))]), x("span", Yi,
|
|
5351
|
-
|
|
5309
|
+
}, null, 4)), 64))]), x("span", Yi, B(ye.value), 1)], 10, qi)) : v("", !0),
|
|
5310
|
+
W.value ? (M(), b("div", {
|
|
5352
5311
|
key: 2,
|
|
5353
5312
|
"data-test": "messaging-transient-issue",
|
|
5354
|
-
"data-issue-code":
|
|
5355
|
-
class: k(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug",
|
|
5313
|
+
"data-issue-code": W.value.code,
|
|
5314
|
+
class: k(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", q.value ? "text-theme-600" : "text-white/60"])
|
|
5356
5315
|
}, [
|
|
5357
|
-
i[
|
|
5316
|
+
i[26] || (i[26] = x("i", {
|
|
5358
5317
|
class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
|
|
5359
5318
|
"aria-hidden": "true"
|
|
5360
5319
|
}, null, -1)),
|
|
5361
|
-
x("span", null, [S(
|
|
5362
|
-
|
|
5320
|
+
x("span", null, [S(B(W.value.message), 1), W.value.help ? (M(), b(m, { key: 0 }, [S(B(W.value.help), 1)], 64)) : v("", !0)]),
|
|
5321
|
+
W.value.actionUrl && W.value.actionLabel ? (M(), b("a", {
|
|
5363
5322
|
key: 0,
|
|
5364
|
-
href:
|
|
5323
|
+
href: W.value.actionUrl,
|
|
5365
5324
|
class: "shrink-0 underline underline-offset-2",
|
|
5366
|
-
onClick: i[5] || (i[5] =
|
|
5367
|
-
},
|
|
5325
|
+
onClick: i[5] || (i[5] = U(() => {}, ["stop"]))
|
|
5326
|
+
}, B(W.value.actionLabel), 9, Zi)) : v("", !0)
|
|
5368
5327
|
], 10, Xi)) : v("", !0)
|
|
5369
5328
|
], 2)]),
|
|
5370
5329
|
_: 3
|
|
5371
5330
|
}, 8, ["class"])], 64)),
|
|
5372
5331
|
x("div", {
|
|
5373
5332
|
"data-test": "messaging-composer-footer",
|
|
5374
|
-
class: k(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
|
|
5375
|
-
|
|
5376
|
-
e.centered &&
|
|
5377
|
-
|
|
5333
|
+
class: k(["left-0 right-0 z-30 px-3 @lg/chat:px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
|
|
5334
|
+
R.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
|
|
5335
|
+
e.centered && R.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
|
|
5336
|
+
q.value ? e.centered ? "bg-theme-0" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
|
|
5378
5337
|
]])
|
|
5379
|
-
}, [
|
|
5380
|
-
|
|
5338
|
+
}, [I(t.$slots, "composer", {}, () => [we.value ? (M(), b("div", {
|
|
5339
|
+
key: 0,
|
|
5340
|
+
"data-test": "messaging-seat",
|
|
5341
|
+
"data-seat-state": Ce.value,
|
|
5342
|
+
role: "status",
|
|
5343
|
+
"aria-live": "polite",
|
|
5344
|
+
class: k(["py-3 text-center text-[14px]", q.value ? "text-theme-500" : "text-white/70"])
|
|
5345
|
+
}, B(we.value), 11, Qi)) : (M(), b(m, { key: 1 }, [
|
|
5346
|
+
De.value.length > 0 ? (M(), b("div", {
|
|
5381
5347
|
key: 0,
|
|
5382
|
-
"data-test": "messaging-above-composer",
|
|
5383
|
-
class: k(["pb-2.5", e.centered ? "max-w-[720px] mx-auto" : ""])
|
|
5384
|
-
}, [I(t.$slots, "above-composer")], 2)) : v("", !0),
|
|
5385
|
-
Ee.value.length > 0 ? (M(), b("div", {
|
|
5386
|
-
key: 1,
|
|
5387
5348
|
class: k(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
|
|
5388
|
-
}, [(M(!0), b(m, null, F(
|
|
5349
|
+
}, [(M(!0), b(m, null, F(De.value, (e, t) => (M(), b("div", {
|
|
5389
5350
|
key: t,
|
|
5390
5351
|
class: "relative shrink-0 group"
|
|
5391
5352
|
}, [e.type === "image" ? (M(), b("img", {
|
|
5392
5353
|
key: 0,
|
|
5393
5354
|
src: e.src,
|
|
5394
5355
|
alt: e.filename,
|
|
5395
|
-
class: k(["size-14 rounded-xl object-cover border",
|
|
5396
|
-
}, null, 10,
|
|
5356
|
+
class: k(["size-14 rounded-xl object-cover border", q.value ? "border-black/10" : "border-white/20"])
|
|
5357
|
+
}, null, 10, $i)) : (M(), b("div", {
|
|
5397
5358
|
key: 1,
|
|
5398
|
-
class: k(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border",
|
|
5399
|
-
}, [i[
|
|
5359
|
+
class: k(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", q.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
5360
|
+
}, [i[27] || (i[27] = x("i", { class: "i-tabler-file size-4" }, null, -1)), x("span", ea, B(e.filename), 1)], 2)), x("button", {
|
|
5400
5361
|
class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
|
|
5401
5362
|
onClick: (e) => removeAttachment(t)
|
|
5402
|
-
}, [...i[
|
|
5403
|
-
|
|
5404
|
-
key:
|
|
5363
|
+
}, [...i[28] || (i[28] = [x("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, ta)]))), 128)), Oe.value ? (M(), b("div", na, [C(he, { class: "size-5" })])) : v("", !0)], 2)) : v("", !0),
|
|
5364
|
+
je.value ? (M(), b("input", {
|
|
5365
|
+
key: 1,
|
|
5405
5366
|
ref_key: "fileInput",
|
|
5406
5367
|
ref: o,
|
|
5407
5368
|
type: "file",
|
|
@@ -5411,22 +5372,22 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5411
5372
|
}, null, 544)) : v("", !0),
|
|
5412
5373
|
x("div", {
|
|
5413
5374
|
"data-test": "messaging-composer",
|
|
5414
|
-
"data-composer-action":
|
|
5415
|
-
class: k(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ?
|
|
5375
|
+
"data-composer-action": Ne.value,
|
|
5376
|
+
class: k(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? R.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", q.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
|
|
5416
5377
|
onClick: focusComposer
|
|
5417
|
-
}, [
|
|
5378
|
+
}, [Ve.value ? (M(), b("div", {
|
|
5418
5379
|
key: 1,
|
|
5419
5380
|
"data-test": "messaging-recording-state",
|
|
5420
|
-
class: k(["flex min-w-0 items-center gap-2 py-1",
|
|
5381
|
+
class: k(["flex min-w-0 items-center gap-2 py-1", q.value ? "text-theme-700" : "text-white/80"])
|
|
5421
5382
|
}, [
|
|
5422
|
-
i[
|
|
5423
|
-
x("span",
|
|
5424
|
-
x("span", { class: k(["min-w-0 truncate text-sm",
|
|
5425
|
-
], 2)) :
|
|
5383
|
+
i[29] || (i[29] = x("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5384
|
+
x("span", aa, B(He.value), 1),
|
|
5385
|
+
x("span", { class: k(["min-w-0 truncate text-sm", q.value ? "text-theme-400" : "text-white/45"]) }, B(Ue.value), 3)
|
|
5386
|
+
], 2)) : ce((M(), b("textarea", {
|
|
5426
5387
|
key: 0,
|
|
5427
5388
|
ref_key: "textarea",
|
|
5428
5389
|
ref: a,
|
|
5429
|
-
"onUpdate:modelValue": i[6] || (i[6] = (e) =>
|
|
5390
|
+
"onUpdate:modelValue": i[6] || (i[6] = (e) => Ee.value = e),
|
|
5430
5391
|
"data-test": "messaging-input",
|
|
5431
5392
|
rows: "1",
|
|
5432
5393
|
enterkeyhint: "send",
|
|
@@ -5435,71 +5396,71 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5435
5396
|
autocapitalize: "sentences",
|
|
5436
5397
|
autocorrect: "on",
|
|
5437
5398
|
spellcheck: "true",
|
|
5438
|
-
placeholder:
|
|
5439
|
-
disabled:
|
|
5399
|
+
placeholder: Se.value,
|
|
5400
|
+
disabled: be.value,
|
|
5440
5401
|
style: {
|
|
5441
5402
|
fontSize: "16px",
|
|
5442
5403
|
resize: "none"
|
|
5443
5404
|
},
|
|
5444
|
-
class: k(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
5405
|
+
class: k(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", q.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
|
|
5445
5406
|
onKeydown: handleKeydown
|
|
5446
|
-
}, null, 42,
|
|
5407
|
+
}, null, 42, ia)), [[H, Ee.value]]), x("div", oa, [
|
|
5447
5408
|
x("button", {
|
|
5448
5409
|
class: k(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5410
|
+
je.value ? "cursor-pointer" : "cursor-default",
|
|
5411
|
+
q.value ? "text-theme-500" : "text-white/50",
|
|
5412
|
+
Oe.value || Ae.value ? "opacity-50 pointer-events-none" : ""
|
|
5452
5413
|
]]),
|
|
5453
|
-
disabled:
|
|
5454
|
-
"aria-label":
|
|
5455
|
-
title:
|
|
5456
|
-
onClick: i[7] || (i[7] = (e) =>
|
|
5457
|
-
}, [
|
|
5458
|
-
i[
|
|
5459
|
-
x("div",
|
|
5414
|
+
disabled: be.value || Oe.value || Ae.value || !je.value,
|
|
5415
|
+
"aria-label": je.value ? "Attach file" : "File attachments unavailable",
|
|
5416
|
+
title: je.value ? "Attach file" : "File attachments unavailable",
|
|
5417
|
+
onClick: i[7] || (i[7] = (e) => je.value && triggerFileInput())
|
|
5418
|
+
}, [Oe.value ? (M(), b("i", ca)) : (M(), b("i", la)), x("span", ua, B(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, sa),
|
|
5419
|
+
i[34] || (i[34] = x("div", { class: "flex-1" }, null, -1)),
|
|
5420
|
+
x("div", da, [(ze.value || Ve.value) && !Ge.value ? (M(), b("button", {
|
|
5460
5421
|
key: 0,
|
|
5461
5422
|
"data-test": "messaging-record-audio-btn",
|
|
5462
|
-
class: k(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11",
|
|
5463
|
-
"aria-label":
|
|
5464
|
-
title:
|
|
5465
|
-
onPointerdown: i[8] || (i[8] =
|
|
5466
|
-
onPointerup: i[9] || (i[9] =
|
|
5467
|
-
onPointercancel: i[10] || (i[10] =
|
|
5423
|
+
class: k(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Ve.value ? q.value ? "text-theme-900 scale-110" : "text-white scale-110" : q.value ? "text-theme-500" : "text-white/60"]),
|
|
5424
|
+
"aria-label": We.value,
|
|
5425
|
+
title: We.value,
|
|
5426
|
+
onPointerdown: i[8] || (i[8] = U((e) => startRecording(), ["prevent"])),
|
|
5427
|
+
onPointerup: i[9] || (i[9] = U((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
|
|
5428
|
+
onPointercancel: i[10] || (i[10] = U((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
|
|
5468
5429
|
onKeydown: [
|
|
5469
|
-
i[11] || (i[11] =
|
|
5470
|
-
i[13] || (i[13] =
|
|
5471
|
-
i[15] || (i[15] =
|
|
5430
|
+
i[11] || (i[11] = ue(U((e) => startRecording(), ["prevent"]), ["enter"])),
|
|
5431
|
+
i[13] || (i[13] = ue(U((e) => startRecording(), ["prevent"]), ["space"])),
|
|
5432
|
+
i[15] || (i[15] = ue(U((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5472
5433
|
],
|
|
5473
|
-
onKeyup: [i[12] || (i[12] =
|
|
5474
|
-
}, [x("i", { class: k([
|
|
5434
|
+
onKeyup: [i[12] || (i[12] = ue(U((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), i[14] || (i[14] = ue(U((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
|
|
5435
|
+
}, [x("i", { class: k([Ve.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), x("span", pa, B(We.value), 1)], 42, fa)) : v("", !0), Ge.value && !Qe.value ? (M(), b("button", {
|
|
5475
5436
|
key: 1,
|
|
5476
5437
|
"data-test": "messaging-voice-end-btn",
|
|
5477
|
-
class: k(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",
|
|
5438
|
+
class: k(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
|
|
5478
5439
|
"aria-label": "End voice conversation",
|
|
5479
5440
|
title: "End voice conversation",
|
|
5480
5441
|
onClick: i[16] || (i[16] = (e) => endVoiceConversation())
|
|
5481
|
-
}, [...i[
|
|
5442
|
+
}, [...i[30] || (i[30] = [x("i", {
|
|
5482
5443
|
class: "i-tabler-x size-[18px]",
|
|
5483
5444
|
"aria-hidden": "true"
|
|
5484
|
-
}, null, -1), x("span", { class: "sr-only" }, "End voice conversation", -1)])], 2)) :
|
|
5445
|
+
}, null, -1), x("span", { class: "sr-only" }, "End voice conversation", -1)])], 2)) : Qe.value ? (M(), b("button", {
|
|
5485
5446
|
key: 2,
|
|
5486
5447
|
"data-test": "messaging-voice-send-btn",
|
|
5487
|
-
class: k(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",
|
|
5448
|
+
class: k(["flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
|
|
5488
5449
|
"aria-label": "Send to the call",
|
|
5489
5450
|
title: "Send to the call",
|
|
5490
5451
|
onClick: i[17] || (i[17] = (e) => sendVoiceUserMessage())
|
|
5491
|
-
}, [...i[
|
|
5452
|
+
}, [...i[31] || (i[31] = [x("i", {
|
|
5492
5453
|
class: "i-tabler-arrow-up size-[17px]",
|
|
5493
5454
|
"aria-hidden": "true"
|
|
5494
|
-
}, null, -1), x("span", { class: "sr-only" }, "Send to the call", -1)])], 2)) :
|
|
5455
|
+
}, null, -1), x("span", { class: "sr-only" }, "Send to the call", -1)])], 2)) : Je.value ? (M(), b("button", {
|
|
5495
5456
|
key: 3,
|
|
5496
5457
|
"data-test": "messaging-voice-start-btn",
|
|
5497
|
-
class: k(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [
|
|
5498
|
-
disabled:
|
|
5499
|
-
"aria-label":
|
|
5500
|
-
title:
|
|
5458
|
+
class: k(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", Xe.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
|
|
5459
|
+
disabled: Xe.value,
|
|
5460
|
+
"aria-label": Ze.value,
|
|
5461
|
+
title: Ze.value,
|
|
5501
5462
|
onClick: i[18] || (i[18] = (e) => startVoiceConversation())
|
|
5502
|
-
}, [x("span",
|
|
5463
|
+
}, [x("span", ha, [(M(), b(m, null, F([
|
|
5503
5464
|
7,
|
|
5504
5465
|
13,
|
|
5505
5466
|
16,
|
|
@@ -5509,55 +5470,40 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5509
5470
|
key: e,
|
|
5510
5471
|
class: "w-[2px] rounded-full bg-current",
|
|
5511
5472
|
style: A({ height: `${e}px` })
|
|
5512
|
-
}, null, 4)), 64))]), i[
|
|
5473
|
+
}, null, 4)), 64))]), i[32] || (i[32] = x("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, ma)) : Ve.value ? v("", !0) : (M(), b(m, { key: 4 }, [Ie.value ? (M(), b("button", {
|
|
5513
5474
|
key: 0,
|
|
5514
5475
|
"data-test": "messaging-secondary-stop-btn",
|
|
5515
|
-
class: k(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",
|
|
5476
|
+
class: k(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", q.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
|
|
5516
5477
|
"aria-label": "Stop work",
|
|
5517
5478
|
title: "Stop work",
|
|
5518
5479
|
onClick: i[19] || (i[19] = (t) => e.chatController?.stopChatTurn())
|
|
5519
|
-
}, [...i[
|
|
5480
|
+
}, [...i[33] || (i[33] = [x("i", {
|
|
5520
5481
|
class: "i-tabler-player-stop-filled size-3.5",
|
|
5521
5482
|
"aria-hidden": "true"
|
|
5522
5483
|
}, null, -1), x("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : v("", !0), x("button", {
|
|
5523
5484
|
"data-test": "messaging-send-btn",
|
|
5524
|
-
"data-composer-action":
|
|
5525
|
-
class: k(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",
|
|
5526
|
-
disabled: !
|
|
5527
|
-
"aria-label":
|
|
5528
|
-
title:
|
|
5485
|
+
"data-composer-action": Ne.value,
|
|
5486
|
+
class: k(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Pe.value ? q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : q.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
|
|
5487
|
+
disabled: !Pe.value,
|
|
5488
|
+
"aria-label": Re.value,
|
|
5489
|
+
title: Re.value,
|
|
5529
5490
|
onClick: i[20] || (i[20] = (e) => handleComposerAction())
|
|
5530
|
-
}, [
|
|
5531
|
-
])], 10,
|
|
5532
|
-
e.centered &&
|
|
5533
|
-
|
|
5534
|
-
key: e.id,
|
|
5535
|
-
type: "button",
|
|
5536
|
-
disabled: q.value,
|
|
5537
|
-
"data-test": "messaging-suggested-prompt",
|
|
5538
|
-
class: k(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [q.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !ne.value && t >= 3 ? "max-sm:hidden" : ""]]),
|
|
5539
|
-
onClick: (t) => sendSuggestedPrompt(e)
|
|
5540
|
-
}, R(e.label), 11, Sa))), 128)), e.suggestedPrompts.length > 3 ? (M(), b("button", {
|
|
5541
|
-
key: 0,
|
|
5542
|
-
type: "button",
|
|
5543
|
-
"data-test": "messaging-suggested-prompts-more",
|
|
5544
|
-
"aria-expanded": ne.value,
|
|
5545
|
-
class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
|
|
5546
|
-
onClick: i[21] || (i[21] = (e) => ne.value = !ne.value)
|
|
5547
|
-
}, [S(R(ne.value ? "See less" : "See more") + " ", 1), x("i", { class: k(["i-tabler-chevron-down size-4 transition-transform", ne.value ? "rotate-180" : ""]) }, null, 2)], 8, Ca)) : v("", !0)])])) : v("", !0)
|
|
5548
|
-
], 2)
|
|
5491
|
+
}, [Ne.value === "stop" ? (M(), b("i", _a)) : (M(), b("i", va)), x("span", ya, B(Re.value), 1)], 10, ga)], 64))])
|
|
5492
|
+
])], 10, ra),
|
|
5493
|
+
e.centered && R.value.length > 0 ? (M(), b("p", ba, B(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : v("", !0)
|
|
5494
|
+
], 64))])], 2)
|
|
5549
5495
|
], 2));
|
|
5550
5496
|
}
|
|
5551
|
-
}),
|
|
5497
|
+
}), Sa = { class: "agent-wrap" }, Ca = {
|
|
5552
5498
|
key: 0,
|
|
5553
5499
|
class: "flex items-center justify-center h-full"
|
|
5554
|
-
},
|
|
5500
|
+
}, wa = {
|
|
5555
5501
|
key: 2,
|
|
5556
5502
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5557
5503
|
role: "status",
|
|
5558
5504
|
"aria-live": "polite",
|
|
5559
5505
|
"data-test": "agent-unavailable"
|
|
5560
|
-
},
|
|
5506
|
+
}, Ta = /* @__PURE__ */ T({
|
|
5561
5507
|
__name: "AgentWrap",
|
|
5562
5508
|
props: {
|
|
5563
5509
|
sdk: {},
|
|
@@ -5577,7 +5523,7 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5577
5523
|
let r = o("AgentWrap"), i = e, a = i.sdk || t.getInstance({
|
|
5578
5524
|
isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
|
|
5579
5525
|
...i.apiBase && { apiBase: i.apiBase }
|
|
5580
|
-
}), s =
|
|
5526
|
+
}), s = R(!i.agent), c = R(i.agent ? new n({ config: i.agent }) : void 0), u = R();
|
|
5581
5527
|
async function loadAgent() {
|
|
5582
5528
|
if (i.agent) {
|
|
5583
5529
|
r.debug("Agent provided via props, skipping fetch", {
|
|
@@ -5653,15 +5599,15 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5653
5599
|
});
|
|
5654
5600
|
}
|
|
5655
5601
|
}
|
|
5656
|
-
return re(loadAgent), (t, n) => (M(), b("div",
|
|
5657
|
-
sdk:
|
|
5602
|
+
return re(loadAgent), (t, n) => (M(), b("div", Sa, [s.value ? (M(), b("div", Ca, [x("div", { class: k(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? I(t.$slots, "default", {
|
|
5603
|
+
sdk: ae(a),
|
|
5658
5604
|
agent: c.value,
|
|
5659
5605
|
context: e.clientContext ?? e.context,
|
|
5660
5606
|
firstMessage: e.firstMessage,
|
|
5661
5607
|
buttonText: e.buttonText,
|
|
5662
5608
|
buttonIcon: e.buttonIcon,
|
|
5663
5609
|
loading: s.value
|
|
5664
|
-
}, void 0, void 0, 1) : u.value ? (M(), b("div",
|
|
5610
|
+
}, void 0, void 0, 1) : u.value ? (M(), b("div", wa, [n[0] || (n[0] = x("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), x("button", {
|
|
5665
5611
|
type: "button",
|
|
5666
5612
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5667
5613
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5670,6 +5616,6 @@ var pi = ["data-voice-state", "data-voice-activity"], mi = { class: "flex flex-1
|
|
|
5670
5616
|
}
|
|
5671
5617
|
});
|
|
5672
5618
|
//#endregion
|
|
5673
|
-
export {
|
|
5619
|
+
export { Fe as a, Te as c, parseButtonTemplate as d, AgentChatController as f, he as h, si as i, getAgentAvatarUrl as l, n as m, xa as n, ke as o, _e as p, xi as r, De as s, Ta as t, handleImageError as u };
|
|
5674
5620
|
|
|
5675
5621
|
//# sourceMappingURL=AgentWrap.js.map
|