@8wave/ai-elements 0.119.0-beta.33 → 0.119.0-beta.48
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/_chunks/{Agent-Gdgpd3LA.js → Agent-DU38SnNd.js} +411 -247
- package/dist/_chunks/Agent-DU38SnNd.js.map +1 -0
- package/dist/_chunks/{PkChatbotFilePreview-3i9jZIdS.js → PkChatbotFilePreview-Bdi4_IFu.js} +2 -2
- package/dist/_chunks/PkChatbotFilePreview-Bdi4_IFu.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-B1t1tBvW.js → PkStreamingMarkdown-xnhBbPf5.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-B1t1tBvW.js.map → PkStreamingMarkdown-xnhBbPf5.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-Xzum_9NH.js → PkToolEditSpreadsheet-Ct9pdQJ1.js} +3 -3
- package/dist/_chunks/{PkToolEditSpreadsheet-Xzum_9NH.js.map → PkToolEditSpreadsheet-Ct9pdQJ1.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-PxhQxMP1.js → PkToolRequestGeolocation-DzhrY8bg.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-PxhQxMP1.js.map → PkToolRequestGeolocation-DzhrY8bg.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-W3ilzpr7.js → PkToolRequestOAuthConnection-CzRKRGoG.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-W3ilzpr7.js.map → PkToolRequestOAuthConnection-CzRKRGoG.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-DGGEb2LF.js → PkToolShowArtifact-DPt1qDUk.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-DGGEb2LF.js.map → PkToolShowArtifact-DPt1qDUk.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Dn6CEXF_.js → PkToolShowContactForm-OdC7bsXd.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Dn6CEXF_.js.map → PkToolShowContactForm-OdC7bsXd.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CbuToc8O.js → PkToolShowForm-uFmaQoI1.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-CbuToc8O.js.map → PkToolShowForm-uFmaQoI1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-Dh0v2Df8.js → PkToolShowImageGallery-KmMO4UuQ.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-Dh0v2Df8.js.map → PkToolShowImageGallery-KmMO4UuQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-bAis8u1t.js → PkToolShowProductList-cld-FOFb.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-bAis8u1t.js.map → PkToolShowProductList-cld-FOFb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-D532Worv.js → PkToolShowSources-BlpCKc4N.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-D532Worv.js.map → PkToolShowSources-BlpCKc4N.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-BISQY1ce.js → PkToolShowSuggestedReply-xUBuqStM.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BISQY1ce.js.map → PkToolShowSuggestedReply-xUBuqStM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DcMzLibC.js → PkToolShowVideo-KDNxItWl.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DcMzLibC.js.map → PkToolShowVideo-KDNxItWl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-RuwkZDMH.js → PkToolShowWebPages-D35B7GzS.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-RuwkZDMH.js.map → PkToolShowWebPages-D35B7GzS.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-BL4O14e9.js → chatImagePolicy-B_6Xg-r7.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-BL4O14e9.js.map → chatImagePolicy-B_6Xg-r7.js.map} +1 -1
- package/dist/_chunks/{markdown-BbaLt57-.js → markdown-BKLfFJPr.js} +96 -90
- package/dist/_chunks/markdown-BKLfFJPr.js.map +1 -0
- package/dist/ai-elements.es.js +1898 -1893
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-DU1WWaHR.js → Agent-DDm9cCaN.js} +103 -102
- package/dist-vue/_chunks/Agent-DDm9cCaN.js.map +1 -0
- package/dist-vue/_chunks/{Document-Cto-Qws0.js → Document-CZemm1AR.js} +17 -13
- package/dist-vue/_chunks/Document-CZemm1AR.js.map +1 -0
- package/dist-vue/_chunks/Media-D-UGzdcW.js +301 -0
- package/dist-vue/_chunks/Media-D-UGzdcW.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-wODOAtOD.js → PkChatbot-DXwMfwN4.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-wODOAtOD.js.map → PkChatbot-DXwMfwN4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-BVZzjbK9.js → PkChatbotAuth-CHoEXxmg.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotAuth-BVZzjbK9.js.map → PkChatbotAuth-CHoEXxmg.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-Dx4mTkTX.js → PkChatbotEmptyState-Dve5Ci2Y.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-Dx4mTkTX.js.map → PkChatbotEmptyState-Dve5Ci2Y.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFilePreview-Lxgu89Hg.js → PkChatbotFilePreview-D8XyjDPJ.js} +2 -2
- package/dist-vue/_chunks/PkChatbotFilePreview-D8XyjDPJ.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotInput-DiCxEime.js +392 -0
- package/dist-vue/_chunks/PkChatbotInput-DiCxEime.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotMessages-CTp0NkY2.js +881 -0
- package/dist-vue/_chunks/PkChatbotMessages-CTp0NkY2.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-f2mYAVpu.js → PkChatbotStepPayload-B1o2DbQz.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-f2mYAVpu.js.map → PkChatbotStepPayload-B1o2DbQz.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BcYheOnU.js → PkChatbotStepToolDetail-DpYV0KLn.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BcYheOnU.js.map → PkChatbotStepToolDetail-DpYV0KLn.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BPon4zjv.js +189 -0
- package/dist-vue/_chunks/PkChatbotSteps-BPon4zjv.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-DZqXDwzk.js → PkChatbotViewChat-dJE2iHPN.js} +237 -236
- package/dist-vue/_chunks/PkChatbotViewChat-dJE2iHPN.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-CXcToApC.js → PkChatbotViewConversations-DcEcJgwV.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-CXcToApC.js.map → PkChatbotViewConversations-DcEcJgwV.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-O8lhbXAX.js → PkChatbotViewFiles-DDEJqXct.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-O8lhbXAX.js.map → PkChatbotViewFiles-DDEJqXct.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-kryFJi0l.js → PkChatbotViewProfile-B79UynQ8.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-kryFJi0l.js.map → PkChatbotViewProfile-B79UynQ8.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CywawRVj.js → PkStreamingMarkdown-CqT_orLj.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-CywawRVj.js.map → PkStreamingMarkdown-CqT_orLj.js.map} +1 -1
- package/dist-vue/_chunks/{PkSvgViewer-DU8K_gAD.js → PkSvgViewer-CZASatr4.js} +2 -2
- package/dist-vue/_chunks/{PkSvgViewer-DU8K_gAD.js.map → PkSvgViewer-CZASatr4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-BT4HueLs.js → PkToolEditSpreadsheet-Dcp3VFzY.js} +3 -3
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-BT4HueLs.js.map → PkToolEditSpreadsheet-Dcp3VFzY.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-JZYgc-2X.js → PkToolRequestGeolocation-DG4-qKRq.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-JZYgc-2X.js.map → PkToolRequestGeolocation-DG4-qKRq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-Ck2tRuls.js → PkToolRequestOAuthConnection-CZhNEM-o.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-Ck2tRuls.js.map → PkToolRequestOAuthConnection-CZhNEM-o.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-BiFJoOTT.js → PkToolShowArtifact-Qfkz64NY.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-BiFJoOTT.js.map → PkToolShowArtifact-Qfkz64NY.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-B7DvA6O1.js → PkToolShowContactForm-CRLEkYSE.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-B7DvA6O1.js.map → PkToolShowContactForm-CRLEkYSE.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-DGMwlxqB.js → PkToolShowDiagram-j4FJ34Ta.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowDiagram-DGMwlxqB.js.map → PkToolShowDiagram-j4FJ34Ta.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BZmAnMSD.js → PkToolShowForm-DdFBwLMf.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-BZmAnMSD.js.map → PkToolShowForm-DdFBwLMf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BsYTRg_W.js → PkToolShowImageGallery-CxlOwuTJ.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowImageGallery-BsYTRg_W.js.map → PkToolShowImageGallery-CxlOwuTJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-D1_v79Xm.js → PkToolShowProductList-dfd3vmhl.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-D1_v79Xm.js.map → PkToolShowProductList-dfd3vmhl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-Czu2IiGq.js → PkToolShowSources-B8Euk3rp.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-Czu2IiGq.js.map → PkToolShowSources-B8Euk3rp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-I6FBos-F.js → PkToolShowSuggestedReply-Cl3Pswi4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-I6FBos-F.js.map → PkToolShowSuggestedReply-Cl3Pswi4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-D3D2sTAP.js → PkToolShowVideo-C84UrvZ7.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-D3D2sTAP.js.map → PkToolShowVideo-C84UrvZ7.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DTq0811l.js → PkToolShowWebPages-CzzuVQqL.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DTq0811l.js.map → PkToolShowWebPages-CzzuVQqL.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BlJ952Kb.js → createChatbotApiClient-DrUsRvCw.js} +3 -3
- package/dist-vue/_chunks/createChatbotApiClient-DrUsRvCw.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-CueyhDPB.js → useChatbotStore-DHmjHPR5.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-CueyhDPB.js.map → useChatbotStore-DHmjHPR5.js.map} +1 -1
- package/dist-vue/_chunks/{utils-DmRXPCqa.js → utils-7oPvmwwu.js} +2 -2
- package/dist-vue/_chunks/{utils-DmRXPCqa.js.map → utils-7oPvmwwu.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +5 -5
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5190 -5185
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +2 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Branding.d.ts +5 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +8 -0
- package/dist-vue/packages/models/src/schema/Media.d.ts +34 -0
- package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +12 -1
- package/dist-vue/packages/models/src/schema/constants.d.ts +26 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-Gdgpd3LA.js.map +0 -1
- package/dist/_chunks/PkChatbotFilePreview-3i9jZIdS.js.map +0 -1
- package/dist/_chunks/markdown-BbaLt57-.js.map +0 -1
- package/dist-vue/_chunks/Agent-DU1WWaHR.js.map +0 -1
- package/dist-vue/_chunks/Document-Cto-Qws0.js.map +0 -1
- package/dist-vue/_chunks/Media-C6RS-s98.js +0 -139
- package/dist-vue/_chunks/Media-C6RS-s98.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotFilePreview-Lxgu89Hg.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-jj3qQl_f.js +0 -388
- package/dist-vue/_chunks/PkChatbotInput-jj3qQl_f.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-5wPl7-j-.js +0 -876
- package/dist-vue/_chunks/PkChatbotMessages-5wPl7-j-.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-DKyF0ykL.js +0 -191
- package/dist-vue/_chunks/PkChatbotSteps-DKyF0ykL.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-DZqXDwzk.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BlJ952Kb.js.map +0 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
2
|
-
import {
|
|
3
|
-
import { n as i } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as c } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { t as d } from "./
|
|
9
|
-
import { t as f } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-CTp0NkY2.js";
|
|
2
|
+
import { o as t } from "./Media-D-UGzdcW.js";
|
|
3
|
+
import { a as n, n as r, t as i } from "./useChatbotStore-DHmjHPR5.js";
|
|
4
|
+
import { n as a } from "./src-BZRiAJsH.js";
|
|
5
|
+
import { p as o, s } from "./utils-7oPvmwwu.js";
|
|
6
|
+
import { t as c } from "./useLocalizedString-PfaKjIQY.js";
|
|
7
|
+
import { t as l } from "./PkAvatar-BTqu8tn9.js";
|
|
8
|
+
import { n as u, t as d } from "./PkChatbotInput-DiCxEime.js";
|
|
9
|
+
import { t as f } from "./PkChatbotEmptyState-Dve5Ci2Y.js";
|
|
10
|
+
import { t as p } from "./PkChatbotWakeupBar-Cjgarxnw.js";
|
|
11
|
+
import { VvIcon as m } from "@volverjs/ui-vue/components";
|
|
12
|
+
import { Fragment as h, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as ee, createTextVNode as te, createVNode as S, defineAsyncComponent as C, defineComponent as w, isRef as ne, nextTick as re, normalizeClass as T, onBeforeUnmount as E, onMounted as ie, onScopeDispose as ae, onUnmounted as oe, openBlock as D, ref as O, renderList as se, shallowRef as ce, toDisplayString as k, toValue as A, unref as j, useTemplateRef as le, watch as M, withCtx as N } from "vue";
|
|
13
|
+
import { useI18n as ue } from "vue-i18n";
|
|
14
|
+
import { useDropZone as de } from "@vueuse/core";
|
|
15
|
+
import { storeToRefs as fe } from "pinia";
|
|
15
16
|
//#region ../../packages/composable/src/chatbot/useGreeting.ts
|
|
16
|
-
function
|
|
17
|
-
let { locale: n, t: r, te: i } =
|
|
18
|
-
return
|
|
17
|
+
function pe(e, t) {
|
|
18
|
+
let { locale: n, t: r, te: i } = ue({ useScope: "global" });
|
|
19
|
+
return _(() => {
|
|
19
20
|
let a = A(e);
|
|
20
|
-
return
|
|
21
|
+
return me(a?.greeting?.[0]?.[n.value] || a?.initialMessage?.[n.value] || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""), A(t));
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function me(e, t) {
|
|
24
25
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
25
26
|
}
|
|
26
27
|
//#endregion
|
|
@@ -31,11 +32,11 @@ var P = {
|
|
|
31
32
|
}, F = {
|
|
32
33
|
key: 1,
|
|
33
34
|
class: "pk-aurora__fallback"
|
|
34
|
-
}, I = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}",
|
|
35
|
+
}, I = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", he = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", ge = /* @__PURE__ */ w({
|
|
35
36
|
__name: "PkAuroraCanvas",
|
|
36
37
|
props: { sourceSelector: {} },
|
|
37
38
|
setup(e) {
|
|
38
|
-
let t = e, n =
|
|
39
|
+
let t = e, n = le("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
|
|
39
40
|
if (!i) return null;
|
|
40
41
|
let n = i.createShader(e);
|
|
41
42
|
return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
|
|
@@ -64,7 +65,7 @@ var P = {
|
|
|
64
65
|
}, v = () => {
|
|
65
66
|
_(), a = requestAnimationFrame(v);
|
|
66
67
|
};
|
|
67
|
-
return
|
|
68
|
+
return ie(() => {
|
|
68
69
|
let e = n.value;
|
|
69
70
|
i = e?.getContext("webgl", { alpha: !0 }) ?? null;
|
|
70
71
|
let t = m();
|
|
@@ -72,7 +73,7 @@ var P = {
|
|
|
72
73
|
r.value = !0;
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
|
-
let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER,
|
|
76
|
+
let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER, he), y = i.createProgram();
|
|
76
77
|
if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
|
|
77
78
|
r.value = !0;
|
|
78
79
|
return;
|
|
@@ -90,22 +91,22 @@ var P = {
|
|
|
90
91
|
1
|
|
91
92
|
]), i.STATIC_DRAW);
|
|
92
93
|
let x = i.getAttribLocation(y, "a_position");
|
|
93
|
-
i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(),
|
|
94
|
+
i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), re(h), g() ? _(10) : v();
|
|
94
95
|
}), E(() => {
|
|
95
96
|
cancelAnimationFrame(a), o?.disconnect();
|
|
96
|
-
}),
|
|
97
|
+
}), oe(() => {
|
|
97
98
|
let e = i;
|
|
98
99
|
i = null, setTimeout(() => {
|
|
99
100
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
100
101
|
}, 150);
|
|
101
|
-
}), (e, t) => (D(),
|
|
102
|
+
}), (e, t) => (D(), b("div", P, [r.value ? (D(), b("div", F)) : (D(), b("canvas", {
|
|
102
103
|
key: 0,
|
|
103
104
|
ref_key: "canvasEl",
|
|
104
105
|
ref: n,
|
|
105
106
|
class: "pk-aurora__canvas"
|
|
106
107
|
}, null, 512))]));
|
|
107
108
|
}
|
|
108
|
-
}), L = .18,
|
|
109
|
+
}), L = .18, _e = .35, R = /* @__PURE__ */ w({
|
|
109
110
|
__name: "PkVoiceOrb",
|
|
110
111
|
props: {
|
|
111
112
|
sample: {},
|
|
@@ -117,7 +118,7 @@ var P = {
|
|
|
117
118
|
bars: { default: 5 }
|
|
118
119
|
},
|
|
119
120
|
setup(e) {
|
|
120
|
-
let t = e, n =
|
|
121
|
+
let t = e, n = le("barsEl"), r = Array.from({ length: t.bars }, () => L), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
121
122
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
122
123
|
if (!n?.length) {
|
|
123
124
|
let t = Date.now() / 260;
|
|
@@ -139,20 +140,20 @@ var P = {
|
|
|
139
140
|
});
|
|
140
141
|
}, c = () => {
|
|
141
142
|
let e = o();
|
|
142
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) *
|
|
143
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) * _e), s(), i = requestAnimationFrame(c);
|
|
143
144
|
}, l = () => {
|
|
144
145
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
145
146
|
};
|
|
146
147
|
return M(() => t.state, async (e) => {
|
|
147
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await
|
|
148
|
-
}, { immediate: !0 }), E(l), (t, r) => (D(),
|
|
148
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await re(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
149
|
+
}, { immediate: !0 }), E(l), (t, r) => (D(), b("div", {
|
|
149
150
|
class: T(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
150
151
|
"aria-hidden": "true"
|
|
151
|
-
}, [
|
|
152
|
+
}, [x("div", {
|
|
152
153
|
ref_key: "barsEl",
|
|
153
154
|
ref: n,
|
|
154
155
|
class: "pk-voice-orb__bars"
|
|
155
|
-
}, [(D(!0),
|
|
156
|
+
}, [(D(!0), b(h, null, se(e.bars, (e) => (D(), b("span", {
|
|
156
157
|
key: e,
|
|
157
158
|
class: "pk-voice-orb__bar"
|
|
158
159
|
}))), 128))], 512)], 2));
|
|
@@ -161,14 +162,14 @@ var P = {
|
|
|
161
162
|
key: 0,
|
|
162
163
|
class: "pk-voice-session__badge",
|
|
163
164
|
"aria-hidden": "true"
|
|
164
|
-
},
|
|
165
|
+
}, ve = {
|
|
165
166
|
class: "pk-voice-session__status",
|
|
166
167
|
role: "status"
|
|
167
|
-
},
|
|
168
|
+
}, ye = {
|
|
168
169
|
key: 0,
|
|
169
170
|
class: "pk-voice-session__live-dot",
|
|
170
171
|
"aria-hidden": "true"
|
|
171
|
-
},
|
|
172
|
+
}, be = ["title"], xe = ["title"], Se = { class: "pk-voice-session__actions" }, Ce = /* @__PURE__ */ w({
|
|
172
173
|
__name: "PkVoiceSession",
|
|
173
174
|
props: {
|
|
174
175
|
state: {},
|
|
@@ -187,17 +188,17 @@ var P = {
|
|
|
187
188
|
"dismiss"
|
|
188
189
|
],
|
|
189
190
|
setup(e, { emit: t }) {
|
|
190
|
-
let n = e, r = t, { t: i } =
|
|
191
|
+
let n = e, r = t, { t: i } = ue({ useScope: "global" }), a = _(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = _(() => {
|
|
191
192
|
if (n.remainingSeconds === void 0) return;
|
|
192
193
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
193
194
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
194
|
-
}), s =
|
|
195
|
+
}), s = _(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = _(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = _(() => {
|
|
195
196
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
196
197
|
});
|
|
197
198
|
return (t, n) => {
|
|
198
|
-
let d =
|
|
199
|
-
return D(),
|
|
200
|
-
e.error ? (D(),
|
|
199
|
+
let d = m;
|
|
200
|
+
return D(), b("div", { class: T(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
201
|
+
e.error ? (D(), b("span", z, [S(d, { name: "ri:error-warning-line" })])) : (D(), v(R, {
|
|
201
202
|
key: 1,
|
|
202
203
|
state: e.state,
|
|
203
204
|
sample: e.sample,
|
|
@@ -207,34 +208,34 @@ var P = {
|
|
|
207
208
|
"sample",
|
|
208
209
|
"spectrum"
|
|
209
210
|
])),
|
|
210
|
-
|
|
211
|
+
x("div", ve, [x("span", { class: T(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), b("span", ye)) : y("", !0), te(" " + k(a.value), 1)], 2), e.error ? (D(), b("p", {
|
|
211
212
|
key: 0,
|
|
212
213
|
class: "pk-voice-session__detail",
|
|
213
214
|
title: e.rawError ?? e.error
|
|
214
|
-
}, k(e.error), 9,
|
|
215
|
-
o.value ? (D(),
|
|
215
|
+
}, k(e.error), 9, be)) : y("", !0)]),
|
|
216
|
+
o.value ? (D(), b("span", {
|
|
216
217
|
key: 2,
|
|
217
218
|
class: T(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
218
219
|
title: j(i)("hint.voiceRemaining"),
|
|
219
220
|
"aria-hidden": "true"
|
|
220
|
-
}, k(o.value), 11,
|
|
221
|
-
|
|
221
|
+
}, k(o.value), 11, xe)) : y("", !0),
|
|
222
|
+
x("div", Se, [e.error ? (D(), b(h, { key: 0 }, [S(u, {
|
|
222
223
|
icon: "ri:refresh-line",
|
|
223
224
|
label: j(i)("action.retry"),
|
|
224
225
|
onClick: n[0] ||= (e) => r("retry")
|
|
225
|
-
}, null, 8, ["label"]), e.live ? (D(),
|
|
226
|
+
}, null, 8, ["label"]), e.live ? (D(), v(u, {
|
|
226
227
|
key: 0,
|
|
227
228
|
icon: "ri:stop-circle-line",
|
|
228
229
|
modifiers: "danger",
|
|
229
230
|
title: j(i)("action.hangUp"),
|
|
230
231
|
"aria-label": j(i)("action.hangUp"),
|
|
231
232
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
232
|
-
}, null, 8, ["title", "aria-label"])) : (D(),
|
|
233
|
+
}, null, 8, ["title", "aria-label"])) : (D(), v(u, {
|
|
233
234
|
key: 1,
|
|
234
235
|
icon: "ri:close-line",
|
|
235
236
|
label: j(i)("action.close"),
|
|
236
237
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
237
|
-
}, null, 8, ["label"]))], 64)) : (D(),
|
|
238
|
+
}, null, 8, ["label"]))], 64)) : (D(), b(h, { key: 1 }, [S(u, {
|
|
238
239
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
239
240
|
title: e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
|
|
240
241
|
"aria-label": e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
|
|
@@ -245,7 +246,7 @@ var P = {
|
|
|
245
246
|
"title",
|
|
246
247
|
"aria-label",
|
|
247
248
|
"aria-pressed"
|
|
248
|
-
]), S(
|
|
249
|
+
]), S(u, {
|
|
249
250
|
icon: "ri:stop-circle-line",
|
|
250
251
|
modifiers: "danger",
|
|
251
252
|
title: j(i)("action.hangUp"),
|
|
@@ -255,18 +256,18 @@ var P = {
|
|
|
255
256
|
], 2);
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
|
-
}),
|
|
259
|
-
let t =
|
|
259
|
+
}), we = (e) => {
|
|
260
|
+
let t = ce(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
|
|
260
261
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
261
262
|
}, m = (e) => {
|
|
262
263
|
let t = Date.now() + e * 1e3, n = () => {
|
|
263
264
|
let e = Math.max(0, Math.ceil((t - Date.now()) / 1e3));
|
|
264
|
-
s.value = e, e === 0 &&
|
|
265
|
+
s.value = e, e === 0 && g();
|
|
265
266
|
};
|
|
266
267
|
n(), u = setInterval(n, 1e3);
|
|
267
268
|
}, h = async (t) => {
|
|
268
269
|
t && (l === t && (l = void 0), await e.closeGrant?.(t).catch(() => void 0));
|
|
269
|
-
},
|
|
270
|
+
}, g = async () => {
|
|
270
271
|
d += 1, p();
|
|
271
272
|
let e = l;
|
|
272
273
|
l = void 0;
|
|
@@ -274,18 +275,18 @@ var P = {
|
|
|
274
275
|
t.value = void 0, await i?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", r.value = "listening";
|
|
275
276
|
}, v = async () => {
|
|
276
277
|
if (f || t.value || n.value === "connecting") return;
|
|
277
|
-
|
|
278
|
-
let
|
|
278
|
+
i.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
|
|
279
|
+
let a = d, s = () => a === d && !f, u;
|
|
279
280
|
try {
|
|
280
|
-
let
|
|
281
|
-
|
|
281
|
+
let a = import("./web-BD9VqBSK.js");
|
|
282
|
+
a.catch(() => void 0);
|
|
282
283
|
let d = await e.fetchGrant();
|
|
283
284
|
if (!s()) {
|
|
284
285
|
await e.closeGrant?.(d.sessionId).catch(() => void 0);
|
|
285
286
|
return;
|
|
286
287
|
}
|
|
287
288
|
l = d.sessionId, u = d.sessionId, c.value = d.chatId;
|
|
288
|
-
let { VoiceConversation: f } = await
|
|
289
|
+
let { VoiceConversation: f } = await a;
|
|
289
290
|
if (!s()) {
|
|
290
291
|
await h(d.sessionId);
|
|
291
292
|
return;
|
|
@@ -310,10 +311,10 @@ var P = {
|
|
|
310
311
|
o.value = [...o.value, r], e.onTranscript?.(r);
|
|
311
312
|
},
|
|
312
313
|
onError: (e) => {
|
|
313
|
-
s() && (
|
|
314
|
+
s() && (i.value = e);
|
|
314
315
|
},
|
|
315
|
-
onDisconnect: (
|
|
316
|
-
s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening",
|
|
316
|
+
onDisconnect: (a) => {
|
|
317
|
+
s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", a.reason === "error" && (i.value = a.message), h(d.sessionId), e.onTurnEnd?.());
|
|
317
318
|
}
|
|
318
319
|
});
|
|
319
320
|
if (!s()) {
|
|
@@ -323,10 +324,10 @@ var P = {
|
|
|
323
324
|
t.value = g, m(d.maxSessionSeconds);
|
|
324
325
|
} catch (e) {
|
|
325
326
|
if (await h(u), !s()) return;
|
|
326
|
-
t.value = void 0, p(), n.value = "disconnected",
|
|
327
|
+
t.value = void 0, p(), n.value = "disconnected", i.value = e instanceof Error ? e.message : String(e);
|
|
327
328
|
}
|
|
328
329
|
}, y = () => {
|
|
329
|
-
|
|
330
|
+
i.value = void 0;
|
|
330
331
|
}, b = (e) => {
|
|
331
332
|
t.value?.setMicMuted(e);
|
|
332
333
|
}, x = (e) => {
|
|
@@ -335,7 +336,7 @@ var P = {
|
|
|
335
336
|
try {
|
|
336
337
|
return n.sendUserMessage(e), !0;
|
|
337
338
|
} catch (e) {
|
|
338
|
-
return
|
|
339
|
+
return a.warn("The spoken answer could not be sent", e), !1;
|
|
339
340
|
}
|
|
340
341
|
}, ee = (e) => {
|
|
341
342
|
let n = t.value;
|
|
@@ -345,46 +346,46 @@ var P = {
|
|
|
345
346
|
} catch {
|
|
346
347
|
return 0;
|
|
347
348
|
}
|
|
348
|
-
},
|
|
349
|
+
}, te = (e) => {
|
|
349
350
|
let n = t.value;
|
|
350
351
|
if (n) try {
|
|
351
352
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
352
353
|
} catch {
|
|
353
354
|
return;
|
|
354
355
|
}
|
|
355
|
-
},
|
|
356
|
+
}, S = () => {
|
|
356
357
|
let e = l;
|
|
357
358
|
l = void 0, d += 1, p(), h(e);
|
|
358
359
|
let r = t.value;
|
|
359
360
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
360
361
|
};
|
|
361
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
362
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
362
|
+
return typeof window < "u" && window.addEventListener("pagehide", S), ae(() => {
|
|
363
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", S), g();
|
|
363
364
|
}), {
|
|
364
365
|
status: n,
|
|
365
366
|
mode: r,
|
|
366
|
-
error:
|
|
367
|
+
error: i,
|
|
367
368
|
transcript: o,
|
|
368
369
|
remainingSeconds: s,
|
|
369
370
|
chatId: c,
|
|
370
|
-
isActive:
|
|
371
|
-
isConnecting:
|
|
372
|
-
isSpeaking:
|
|
373
|
-
isListening:
|
|
371
|
+
isActive: _(() => n.value === "connected" || n.value === "connecting"),
|
|
372
|
+
isConnecting: _(() => n.value === "connecting"),
|
|
373
|
+
isSpeaking: _(() => n.value === "connected" && r.value === "speaking"),
|
|
374
|
+
isListening: _(() => n.value === "connected" && r.value === "listening"),
|
|
374
375
|
start: v,
|
|
375
|
-
stop:
|
|
376
|
+
stop: g,
|
|
376
377
|
dismissError: y,
|
|
377
378
|
setMuted: b,
|
|
378
379
|
sendUserMessage: x,
|
|
379
380
|
readLevel: ee,
|
|
380
|
-
readSpectrum:
|
|
381
|
+
readSpectrum: te
|
|
381
382
|
};
|
|
382
|
-
},
|
|
383
|
+
}, Te = 4e3, Ee = [
|
|
383
384
|
3e3,
|
|
384
385
|
5e3,
|
|
385
386
|
1e4
|
|
386
|
-
],
|
|
387
|
-
function
|
|
387
|
+
], De = 12e4, B = 3e4;
|
|
388
|
+
function Oe(e) {
|
|
388
389
|
let t = O(null), n = O(!1), r, i = !1, a = () => {
|
|
389
390
|
clearTimeout(r), r = void 0;
|
|
390
391
|
}, o = (e, t) => {
|
|
@@ -402,12 +403,12 @@ function De(e) {
|
|
|
402
403
|
}
|
|
403
404
|
let r = t.value;
|
|
404
405
|
if (r) {
|
|
405
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
406
|
-
o(Math.max(
|
|
406
|
+
let e = Date.parse(r.dueAt) - Date.now() + Te;
|
|
407
|
+
o(Math.max(Te, e), () => l(r.wakeId, Date.now(), 0));
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
410
|
async function l(t, n, r) {
|
|
410
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
411
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= De ? await c() : o(Ee[Math.min(r, Ee.length - 1)], () => l(t, n, r + 1)));
|
|
411
412
|
}
|
|
412
413
|
async function u() {
|
|
413
414
|
n.value = !0;
|
|
@@ -440,16 +441,16 @@ function De(e) {
|
|
|
440
441
|
}
|
|
441
442
|
//#endregion
|
|
442
443
|
//#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
443
|
-
var
|
|
444
|
+
var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
444
445
|
key: 1,
|
|
445
446
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
446
|
-
},
|
|
447
|
+
}, je = { class: "pk-chatbot-view-chat__agent-chip" }, Me = {
|
|
447
448
|
key: 0,
|
|
448
449
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
449
|
-
},
|
|
450
|
+
}, Ne = {
|
|
450
451
|
key: 0,
|
|
451
452
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
452
|
-
},
|
|
453
|
+
}, Pe = 3e3, Fe = 6e4, Ie = 3e5, Le = 6e5, Re = /* @__PURE__ */ w({
|
|
453
454
|
__name: "PkChatbotViewChat",
|
|
454
455
|
props: {
|
|
455
456
|
agentId: {},
|
|
@@ -457,57 +458,57 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
457
458
|
userName: {}
|
|
458
459
|
},
|
|
459
460
|
emits: ["show-info", "revise"],
|
|
460
|
-
setup(
|
|
461
|
-
let
|
|
462
|
-
let e =
|
|
461
|
+
setup(a, { emit: u }) {
|
|
462
|
+
let h = C(() => import("./PkToolShowForm-DdFBwLMf.js").then((e) => e.n)), te = C(() => import("./PkToolShowContactForm-CRLEkYSE.js").then((e) => e.n)), w = C(() => import("./PkToolShowSuggestedReply-Cl3Pswi4.js").then((e) => e.n)), re = C(() => import("./PkToolShowSources-B8Euk3rp.js").then((e) => e.n)), ie = C(() => import("./PkToolRequestGeolocation-DG4-qKRq.js")), ae = C(() => import("./PkToolRequestOAuthConnection-CZhNEM-o.js")), oe = C(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), se = C(() => import("./PkToolShowDiagram-j4FJ34Ta.js")), ce = C(() => import("./PkToolEditSpreadsheet-Dcp3VFzY.js")), A = a, me = u, P = r(A.agentId), { agentInterface: F, agentFileUpload: I, agentVoice: he, actions: L, revisedAnswers: _e, messages: R, chat: z, messageFeedbacks: ve, feedbackDialogMessage: ye, isFeedbackSubmitting: be, isFeedbackSubmitted: xe, feedbackSubmitError: Se, isLeadSubmitted: Te, isLoadingSubmitLead: Ee, submitLeadError: De, input: B, inputMessagePlaceholder: Re, isConversationBlocked: ze, baseUrl: Be, pendingAttachments: Ve, isAttachmentLimitReached: He, fileLimitError: Ue, apiClient: V, isDark: We } = fe(P), Ge = (e) => V.value.getMediaDownloadUrl(A.agentId, P.localChatId, e), { handleSubmit: Ke, stopGeneration: qe, regenerate: Je, onUpvote: Ye, onDownvote: Xe, onFeedback: Ze, onFeedbackSubmit: Qe, onLeadSubmit: $e, startNewChat: et, addToolOutput: H, addToolApprovalResponse: tt, handleFileSelect: nt, clearFileLimitError: rt, refreshMessages: it, appendMessage: at } = P, { t: U } = ue({ useScope: "global" }), ot = _(() => {
|
|
463
|
+
let e = Ue.value;
|
|
463
464
|
if (e) return e.reason === "per-chat" ? U("message.fileLimitPerChat", { max: e.max }) : U("message.fileLimitPerMessage", { max: e.max });
|
|
464
|
-
}),
|
|
465
|
+
}), st = c(() => F.value?.dismissableNotice), ct = _(() => R.value.some((e) => e.role === "user")), lt = _(() => A.modifier === "fullscreen" && !ct.value), ut = pe(F, () => A.userName), dt = le("chatViewEl"), ft = async (e) => (await V.value.expandSourceContext(A.agentId, e.documentId, e.chunkIndex)).content, pt = async (e) => {
|
|
465
466
|
let t = await V.value.downloadSourceDocument(A.agentId, e);
|
|
466
467
|
window.open(t.downloadUrl, "_blank");
|
|
467
|
-
}, { isOverDropZone:
|
|
468
|
-
dataTypes:
|
|
468
|
+
}, { isOverDropZone: mt } = de(dt, {
|
|
469
|
+
dataTypes: (e) => t(e, I.value?.allowedMimeTypes ?? []),
|
|
469
470
|
onDrop: (e) => {
|
|
470
|
-
if (I.value?.enabled && e) for (let t of e)
|
|
471
|
+
if (I.value?.enabled && e) for (let t of e) nt(t);
|
|
471
472
|
}
|
|
472
|
-
}), W = O(!1), G = !1, K = O(!1),
|
|
473
|
+
}), W = O(!1), G = !1, K = O(!1), ht = [
|
|
473
474
|
3e3,
|
|
474
475
|
5e3,
|
|
475
476
|
1e4
|
|
476
|
-
], q, J, Y = !1, X = 0,
|
|
477
|
-
function
|
|
477
|
+
], q, J, Y = !1, X = 0, gt = !1;
|
|
478
|
+
function _t() {
|
|
478
479
|
clearTimeout(q), q = void 0, J = void 0, Y = !1, X = 0, K.value = !1;
|
|
479
480
|
}
|
|
480
|
-
function
|
|
481
|
+
function vt(e) {
|
|
481
482
|
G || (clearTimeout(q), q = setTimeout(() => {
|
|
482
|
-
|
|
483
|
+
yt();
|
|
483
484
|
}, e));
|
|
484
485
|
}
|
|
485
|
-
async function
|
|
486
|
-
if (G ||
|
|
487
|
-
|
|
486
|
+
async function yt() {
|
|
487
|
+
if (G || gt) return;
|
|
488
|
+
gt = !0;
|
|
488
489
|
let e;
|
|
489
490
|
try {
|
|
490
|
-
e = await
|
|
491
|
+
e = await it();
|
|
491
492
|
} finally {
|
|
492
|
-
|
|
493
|
+
gt = !1;
|
|
493
494
|
}
|
|
494
495
|
if (G) return;
|
|
495
496
|
if (e === "caught-up" && (K.value = !1), Z.isActive.value) {
|
|
496
|
-
J = void 0, Y = !1, X = 0,
|
|
497
|
+
J = void 0, Y = !1, X = 0, vt(Pe);
|
|
497
498
|
return;
|
|
498
499
|
}
|
|
499
500
|
J === void 0 && (J = Date.now(), Y = !!Z.error.value);
|
|
500
501
|
let t = Date.now() - J;
|
|
501
|
-
if (e === "caught-up" && t >= (Y ?
|
|
502
|
-
|
|
502
|
+
if (e === "caught-up" && t >= (Y ? Ie : Fe) || t >= Le) {
|
|
503
|
+
_t();
|
|
503
504
|
return;
|
|
504
505
|
}
|
|
505
|
-
let n =
|
|
506
|
-
X += 1,
|
|
506
|
+
let n = ht[Math.min(X, ht.length - 1)];
|
|
507
|
+
X += 1, vt(n);
|
|
507
508
|
}
|
|
508
|
-
let
|
|
509
|
-
|
|
510
|
-
}, Z =
|
|
509
|
+
let bt = (e = 1200) => {
|
|
510
|
+
vt(e);
|
|
511
|
+
}, Z = we({
|
|
511
512
|
fetchGrant: async () => {
|
|
512
513
|
let e = await V.value.createVoiceSession(A.agentId, P.localChatId, {
|
|
513
514
|
deviceContext: P.buildDeviceContext(),
|
|
@@ -517,8 +518,8 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
517
518
|
},
|
|
518
519
|
closeGrant: (e) => V.value.closeVoiceSession(A.agentId, e),
|
|
519
520
|
onTranscript: (e) => {
|
|
520
|
-
e.role === "user" ? (K.value = !0,
|
|
521
|
-
id: `${
|
|
521
|
+
e.role === "user" ? (K.value = !0, at({
|
|
522
|
+
id: `${i}user-${n()}`,
|
|
522
523
|
role: "user",
|
|
523
524
|
parts: [{
|
|
524
525
|
type: "text",
|
|
@@ -527,46 +528,46 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
527
528
|
})) : K.value = !1;
|
|
528
529
|
},
|
|
529
530
|
onTurnEnd: () => {
|
|
530
|
-
|
|
531
|
+
bt();
|
|
531
532
|
}
|
|
532
533
|
});
|
|
533
534
|
M(() => Z.error.value, (e) => {
|
|
534
535
|
e && (K.value = !1);
|
|
535
536
|
});
|
|
536
|
-
let
|
|
537
|
+
let xt = _(() => he.value?.enabled === !0), St = _(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Ct = _(() => {
|
|
537
538
|
let e = Z.error.value;
|
|
538
539
|
if (e) return /took too long/i.test(e) ? U("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? U("message.voiceNoAnswer") : U("message.voiceInterrupted");
|
|
539
|
-
}),
|
|
540
|
-
W.value = !1, await Z.start(), Z.isActive.value && (
|
|
541
|
-
},
|
|
542
|
-
K.value = !1, await Z.stop(), !G &&
|
|
543
|
-
},
|
|
540
|
+
}), wt = _(() => Z.isSpeaking.value ? "output" : "input"), Tt = () => Z.readLevel(wt.value), Et = () => Z.readSpectrum(wt.value), Dt = async () => {
|
|
541
|
+
W.value = !1, await Z.start(), Z.isActive.value && (_t(), vt(Pe));
|
|
542
|
+
}, Ot = async () => {
|
|
543
|
+
K.value = !1, await Z.stop(), !G && bt(0);
|
|
544
|
+
}, kt = () => {
|
|
544
545
|
Z.dismissError();
|
|
545
|
-
},
|
|
546
|
-
Z.dismissError(), await Z.stop(), await
|
|
547
|
-
}, Q = (e) => e?.toolCallId ?? "",
|
|
548
|
-
$(t,
|
|
546
|
+
}, At = async () => {
|
|
547
|
+
Z.dismissError(), await Z.stop(), await Dt();
|
|
548
|
+
}, Q = (e) => e?.toolCallId ?? "", jt = O(/* @__PURE__ */ new Set()), Mt = (e) => jt.value.has(Q(e)), Nt = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (jt.value = new Set(jt.value).add(Q(e)), bt()), !0) : !1, Pt = (e, t, n) => {
|
|
549
|
+
$(t, s(t, n)) || H({
|
|
549
550
|
tool: e,
|
|
550
551
|
toolCallId: Q(t),
|
|
551
552
|
output: n
|
|
552
553
|
});
|
|
553
|
-
},
|
|
554
|
+
}, Ft = (e) => {
|
|
554
555
|
let t = e.confirmed ? U("message.voiceConfirmed") : U("message.voiceCancelled");
|
|
555
|
-
$({ toolCallId: e.toolCallId }, t) ?
|
|
556
|
+
$({ toolCallId: e.toolCallId }, t) ? jt.value.has(e.toolCallId) && (Nt.value = new Map(Nt.value).set(e.toolCallId, e.confirmed)) : H({
|
|
556
557
|
tool: "requestConfirm",
|
|
557
558
|
toolCallId: e.toolCallId,
|
|
558
559
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
559
560
|
});
|
|
560
|
-
}, Ft = (e, t) => {
|
|
561
|
-
$(e, t) || (B.value = t, Ge());
|
|
562
561
|
}, It = (e, t) => {
|
|
562
|
+
$(e, t) || (B.value = t, Ke());
|
|
563
|
+
}, Lt = (e, t) => {
|
|
563
564
|
let n = t.error ? U("message.voiceLocationRefused") : U("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
564
565
|
$(e, n) || H({
|
|
565
566
|
tool: "requestGeolocation",
|
|
566
567
|
toolCallId: Q(e),
|
|
567
568
|
output: t
|
|
568
569
|
});
|
|
569
|
-
},
|
|
570
|
+
}, Rt = (e, t) => {
|
|
570
571
|
$(e, U("message.voiceConnectionDone")) || H({
|
|
571
572
|
tool: "requestOAuthConnection",
|
|
572
573
|
toolCallId: Q(e),
|
|
@@ -575,88 +576,88 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
575
576
|
mcpServerId: t
|
|
576
577
|
}
|
|
577
578
|
});
|
|
578
|
-
},
|
|
579
|
+
}, zt = () => {
|
|
579
580
|
W.value = !W.value, Z.setMuted(W.value);
|
|
580
581
|
};
|
|
581
582
|
E(() => {
|
|
582
|
-
G = !0,
|
|
583
|
+
G = !0, _t();
|
|
583
584
|
});
|
|
584
|
-
let { pendingWakeup:
|
|
585
|
+
let { pendingWakeup: Bt, isStopping: Vt, check: Ht, reset: Ut, stop: Wt } = Oe({
|
|
585
586
|
agentId: () => A.agentId,
|
|
586
587
|
chatId: () => P.localChatId,
|
|
587
588
|
apiClient: () => V.value,
|
|
588
589
|
messages: () => R.value,
|
|
589
|
-
refreshMessages:
|
|
590
|
+
refreshMessages: it
|
|
590
591
|
});
|
|
591
|
-
return M([() => P.localChatId,
|
|
592
|
-
|
|
592
|
+
return M([() => P.localChatId, ct], ([, e]) => {
|
|
593
|
+
Ut(), e && Ht();
|
|
593
594
|
}, { immediate: !0 }), M(() => z.value.status, (e, t) => {
|
|
594
|
-
e === "ready" && t !== "ready" &&
|
|
595
|
+
e === "ready" && t !== "ready" && ct.value && Ht();
|
|
595
596
|
}), (t, n) => {
|
|
596
|
-
let r =
|
|
597
|
-
return D(),
|
|
597
|
+
let r = m;
|
|
598
|
+
return D(), b("div", {
|
|
598
599
|
ref_key: "chatViewEl",
|
|
599
|
-
ref:
|
|
600
|
+
ref: dt,
|
|
600
601
|
class: T(["pk-chatbot-view-chat", {
|
|
601
|
-
"pk-chatbot-view-chat--dragover": j(
|
|
602
|
-
"pk-chatbot-view-chat--empty":
|
|
602
|
+
"pk-chatbot-view-chat--dragover": j(mt) && j(I)?.enabled,
|
|
603
|
+
"pk-chatbot-view-chat--empty": lt.value
|
|
603
604
|
}])
|
|
604
605
|
}, [
|
|
605
|
-
S(
|
|
606
|
+
S(g, {
|
|
606
607
|
name: "pk-chatbot-view-chat-fade",
|
|
607
608
|
mode: "out-in"
|
|
608
609
|
}, {
|
|
609
|
-
default: N(() => [
|
|
610
|
+
default: N(() => [lt.value ? (D(), v(f, {
|
|
610
611
|
key: 0,
|
|
611
|
-
greeting: j(
|
|
612
|
+
greeting: j(ut),
|
|
612
613
|
logo: j(F)?.logo,
|
|
613
614
|
name: j(P).name
|
|
614
615
|
}, null, 8, [
|
|
615
616
|
"greeting",
|
|
616
617
|
"logo",
|
|
617
618
|
"name"
|
|
618
|
-
])) : (D(),
|
|
619
|
+
])) : (D(), v(e, {
|
|
619
620
|
key: 1,
|
|
620
621
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
621
622
|
interactive: "",
|
|
622
623
|
messages: j(R),
|
|
623
|
-
"confirm-verdicts-on-call":
|
|
624
|
+
"confirm-verdicts-on-call": Nt.value,
|
|
624
625
|
status: j(z).status,
|
|
625
626
|
error: j(z).error,
|
|
626
627
|
"main-color": j(F)?.mainColor,
|
|
627
628
|
"text-color": j(F)?.textColor,
|
|
628
|
-
"revised-answers": j(
|
|
629
|
+
"revised-answers": j(_e),
|
|
629
630
|
actions: j(L),
|
|
630
|
-
"message-feedbacks": j(
|
|
631
|
-
"feedback-message-id": j(
|
|
632
|
-
"feedback-loading": j(
|
|
633
|
-
"feedback-submitted": j(
|
|
634
|
-
"feedback-error": j(
|
|
631
|
+
"message-feedbacks": j(ve),
|
|
632
|
+
"feedback-message-id": j(ye)?.id,
|
|
633
|
+
"feedback-loading": j(be),
|
|
634
|
+
"feedback-submitted": j(xe),
|
|
635
|
+
"feedback-error": j(Se),
|
|
635
636
|
"show-extended-steps": j(F)?.showExtendedSteps,
|
|
636
637
|
"awaiting-spoken-answer": K.value,
|
|
637
|
-
"is-dark": j(
|
|
638
|
-
"show-scroll-to-bottom":
|
|
639
|
-
onFeedbackSubmit: n[0] ||= (e) => j(
|
|
640
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
641
|
-
onRegenerate: j(
|
|
642
|
-
onAutoRetry: j(
|
|
643
|
-
onResetChat: j(
|
|
644
|
-
onShowInfo: n[2] ||= (e) =>
|
|
645
|
-
onRevise: n[3] ||= (e) =>
|
|
646
|
-
onUpvote: j(
|
|
647
|
-
onDownvote: j(
|
|
648
|
-
onFeedback: j(
|
|
649
|
-
onApprovalRespond: j(
|
|
650
|
-
onConfirmRespond:
|
|
638
|
+
"is-dark": j(We),
|
|
639
|
+
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
640
|
+
onFeedbackSubmit: n[0] ||= (e) => j(Qe)(e),
|
|
641
|
+
onFeedbackClose: n[1] ||= (e) => ye.value = void 0,
|
|
642
|
+
onRegenerate: j(Je),
|
|
643
|
+
onAutoRetry: j(Je),
|
|
644
|
+
onResetChat: j(et),
|
|
645
|
+
onShowInfo: n[2] ||= (e) => me("show-info", e),
|
|
646
|
+
onRevise: n[3] ||= (e) => me("revise", e),
|
|
647
|
+
onUpvote: j(Ye),
|
|
648
|
+
onDownvote: j(Xe),
|
|
649
|
+
onFeedback: j(Ze),
|
|
650
|
+
onApprovalRespond: j(tt),
|
|
651
|
+
onConfirmRespond: Ft
|
|
651
652
|
}, {
|
|
652
|
-
"tool-showContactForm": N(({ part: e }) => [S(j(
|
|
653
|
+
"tool-showContactForm": N(({ part: e }) => [S(j(te), {
|
|
653
654
|
part: e,
|
|
654
|
-
readonly: !j(
|
|
655
|
-
submitted: j(
|
|
656
|
-
loading: j(
|
|
657
|
-
error: j(
|
|
655
|
+
readonly: !j(Be),
|
|
656
|
+
submitted: j(Te),
|
|
657
|
+
loading: j(Ee),
|
|
658
|
+
error: j(De),
|
|
658
659
|
"privacy-policy-notice": j(F)?.privacyPolicyNotice,
|
|
659
|
-
onSubmit: j(
|
|
660
|
+
onSubmit: j($e)
|
|
660
661
|
}, null, 8, [
|
|
661
662
|
"part",
|
|
662
663
|
"readonly",
|
|
@@ -668,18 +669,18 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
668
669
|
])]),
|
|
669
670
|
"tool-showSuggestedReply": N(({ part: e }) => [S(j(w), {
|
|
670
671
|
part: e,
|
|
671
|
-
onSelect: (t) =>
|
|
672
|
+
onSelect: (t) => It(e, t)
|
|
672
673
|
}, null, 8, ["part", "onSelect"])]),
|
|
673
|
-
"tool-showSources": N(({ part: e }) => [S(j(
|
|
674
|
+
"tool-showSources": N(({ part: e }) => [S(j(re), {
|
|
674
675
|
part: e,
|
|
675
|
-
"on-expand-context":
|
|
676
|
-
"on-download":
|
|
676
|
+
"on-expand-context": ft,
|
|
677
|
+
"on-download": pt
|
|
677
678
|
}, null, 8, ["part"])]),
|
|
678
|
-
"tool-showForm": N(({ part: e }) => [S(
|
|
679
|
-
default: N(() => [S(j(
|
|
679
|
+
"tool-showForm": N(({ part: e }) => [S(g, { mode: "out-in" }, {
|
|
680
|
+
default: N(() => [S(j(h), {
|
|
680
681
|
part: e,
|
|
681
|
-
answered:
|
|
682
|
-
onSelect: (t) =>
|
|
682
|
+
answered: Mt(e),
|
|
683
|
+
onSelect: (t) => Pt("showForm", e, t)
|
|
683
684
|
}, null, 8, [
|
|
684
685
|
"part",
|
|
685
686
|
"answered",
|
|
@@ -687,12 +688,12 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
687
688
|
])]),
|
|
688
689
|
_: 2
|
|
689
690
|
}, 1024)]),
|
|
690
|
-
"tool-showMultipleChoice": N(({ part: e }) => [S(
|
|
691
|
-
default: N(() => [S(j(
|
|
691
|
+
"tool-showMultipleChoice": N(({ part: e }) => [S(g, { mode: "out-in" }, {
|
|
692
|
+
default: N(() => [S(j(h), {
|
|
692
693
|
part: e,
|
|
693
694
|
"allow-custom-answer": "",
|
|
694
|
-
answered:
|
|
695
|
-
onSelect: (t) =>
|
|
695
|
+
answered: Mt(e),
|
|
696
|
+
onSelect: (t) => Pt("showMultipleChoice", e, t)
|
|
696
697
|
}, null, 8, [
|
|
697
698
|
"part",
|
|
698
699
|
"answered",
|
|
@@ -700,12 +701,12 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
700
701
|
])]),
|
|
701
702
|
_: 2
|
|
702
703
|
}, 1024)]),
|
|
703
|
-
"tool-requestOAuthConnection": N(({ part: e }) => [S(j(
|
|
704
|
+
"tool-requestOAuthConnection": N(({ part: e }) => [S(j(ae), {
|
|
704
705
|
part: e,
|
|
705
|
-
"backend-url": j(
|
|
706
|
+
"backend-url": j(Be),
|
|
706
707
|
"resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(A.agentId, e),
|
|
707
708
|
"check-connection": (e) => j(V).getOAuthConnectionStatus(A.agentId, e),
|
|
708
|
-
onConnected: (t) =>
|
|
709
|
+
onConnected: (t) => Rt(e, t)
|
|
709
710
|
}, null, 8, [
|
|
710
711
|
"part",
|
|
711
712
|
"backend-url",
|
|
@@ -713,20 +714,20 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
713
714
|
"check-connection",
|
|
714
715
|
"onConnected"
|
|
715
716
|
])]),
|
|
716
|
-
"tool-requestGeolocation": N(({ part: e }) => [S(j(
|
|
717
|
+
"tool-requestGeolocation": N(({ part: e }) => [S(j(ie), {
|
|
717
718
|
part: e,
|
|
718
719
|
"call-live": j(Z).isActive.value,
|
|
719
720
|
"reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
|
|
720
|
-
onResult: (t) =>
|
|
721
|
+
onResult: (t) => Lt(e, t)
|
|
721
722
|
}, null, 8, [
|
|
722
723
|
"part",
|
|
723
724
|
"call-live",
|
|
724
725
|
"reverse-geocode",
|
|
725
726
|
"onResult"
|
|
726
727
|
])]),
|
|
727
|
-
"tool-showLocation": N(({ part: e }) => [S(j(
|
|
728
|
+
"tool-showLocation": N(({ part: e }) => [S(j(oe), {
|
|
728
729
|
part: e,
|
|
729
|
-
"is-dark": j(
|
|
730
|
+
"is-dark": j(We),
|
|
730
731
|
"main-color": j(F)?.mainColor,
|
|
731
732
|
"forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
|
|
732
733
|
}, null, 8, [
|
|
@@ -735,14 +736,14 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
735
736
|
"main-color",
|
|
736
737
|
"forward-geocode"
|
|
737
738
|
])]),
|
|
738
|
-
"tool-showDiagram": N(({ part: e }) => [S(j(
|
|
739
|
+
"tool-showDiagram": N(({ part: e }) => [S(j(se), {
|
|
739
740
|
part: e,
|
|
740
|
-
"is-dark": j(
|
|
741
|
+
"is-dark": j(We)
|
|
741
742
|
}, null, 8, ["part", "is-dark"])]),
|
|
742
|
-
"tool-editSpreadsheet": N(({ part: e }) => [(D(),
|
|
743
|
-
key: j(
|
|
743
|
+
"tool-editSpreadsheet": N(({ part: e }) => [(D(), v(j(ce), {
|
|
744
|
+
key: j(o)(e),
|
|
744
745
|
part: e,
|
|
745
|
-
"file-url":
|
|
746
|
+
"file-url": Ge
|
|
746
747
|
}, null, 8, ["part"]))]),
|
|
747
748
|
_: 1
|
|
748
749
|
}, 8, [
|
|
@@ -773,52 +774,52 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
773
774
|
]))]),
|
|
774
775
|
_: 1
|
|
775
776
|
}),
|
|
776
|
-
|
|
777
|
-
S(
|
|
778
|
-
default: N(() => [
|
|
777
|
+
x("div", ke, [
|
|
778
|
+
S(g, { name: "pk-chatbot-view-chat-fade" }, {
|
|
779
|
+
default: N(() => [lt.value ? (D(), v(ge, {
|
|
779
780
|
key: 0,
|
|
780
781
|
class: "pk-chatbot-view-chat__aurora",
|
|
781
782
|
"source-selector": ".pk-chatbot-input__form"
|
|
782
|
-
})) :
|
|
783
|
+
})) : y("", !0)]),
|
|
783
784
|
_: 1
|
|
784
785
|
}),
|
|
785
|
-
j(
|
|
786
|
+
j(Bt) && !j(ze) ? (D(), v(p, {
|
|
786
787
|
key: 0,
|
|
787
|
-
pending: j(
|
|
788
|
-
stopping: j(
|
|
789
|
-
onStop: j(
|
|
788
|
+
pending: j(Bt),
|
|
789
|
+
stopping: j(Vt),
|
|
790
|
+
onStop: j(Wt)
|
|
790
791
|
}, null, 8, [
|
|
791
792
|
"pending",
|
|
792
793
|
"stopping",
|
|
793
794
|
"onStop"
|
|
794
|
-
])) :
|
|
795
|
-
j(
|
|
795
|
+
])) : y("", !0),
|
|
796
|
+
j(ze) ? (D(), b("div", Ae, k(j(U)("message.chatErrorConversationBlocked")), 1)) : St.value === "idle" ? (D(), v(d, {
|
|
796
797
|
key: 3,
|
|
797
798
|
modelValue: j(B),
|
|
798
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
799
|
-
"pending-attachments": j(
|
|
800
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
801
|
-
placeholder: j(
|
|
802
|
-
"dismissable-notice": j(
|
|
799
|
+
"onUpdate:modelValue": n[4] ||= (e) => ne(B) ? B.value = e : null,
|
|
800
|
+
"pending-attachments": j(Ve),
|
|
801
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => ne(Ve) ? Ve.value = e : null,
|
|
802
|
+
placeholder: j(Re),
|
|
803
|
+
"dismissable-notice": j(st) && j(z).messages.length <= 1 ? j(st) : void 0,
|
|
803
804
|
status: j(z).status,
|
|
804
805
|
"max-message-length": j(F)?.maxMessageLength,
|
|
805
806
|
"file-upload": j(I),
|
|
806
|
-
"attachment-limit-reached": j(
|
|
807
|
-
"attachment-notice":
|
|
808
|
-
"voice-enabled":
|
|
809
|
-
onStopGeneration: j(
|
|
810
|
-
onSubmit: j(
|
|
811
|
-
onFileSelect: j(
|
|
812
|
-
onDismissAttachmentNotice: j(
|
|
813
|
-
onVoiceStart:
|
|
814
|
-
},
|
|
807
|
+
"attachment-limit-reached": j(He),
|
|
808
|
+
"attachment-notice": ot.value,
|
|
809
|
+
"voice-enabled": xt.value,
|
|
810
|
+
onStopGeneration: j(qe),
|
|
811
|
+
onSubmit: j(Ke),
|
|
812
|
+
onFileSelect: j(nt),
|
|
813
|
+
onDismissAttachmentNotice: j(rt),
|
|
814
|
+
onVoiceStart: Dt
|
|
815
|
+
}, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
815
816
|
name: "prepend",
|
|
816
|
-
fn: N(() => [
|
|
817
|
+
fn: N(() => [x("span", je, [S(l, {
|
|
817
818
|
modifiers: "surface",
|
|
818
819
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
819
820
|
"img-src": j(F)?.logo,
|
|
820
821
|
name: j(P).name
|
|
821
|
-
}, null, 8, ["img-src", "name"]), j(P).name ? (D(),
|
|
822
|
+
}, null, 8, ["img-src", "name"]), j(P).name ? (D(), b("strong", Me, k(j(P).name), 1)) : y("", !0)])]),
|
|
822
823
|
key: "0"
|
|
823
824
|
} : void 0]), 1032, [
|
|
824
825
|
"modelValue",
|
|
@@ -835,21 +836,21 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
835
836
|
"onSubmit",
|
|
836
837
|
"onFileSelect",
|
|
837
838
|
"onDismissAttachmentNotice"
|
|
838
|
-
])) : (D(),
|
|
839
|
+
])) : (D(), v(Ce, {
|
|
839
840
|
key: 2,
|
|
840
|
-
state:
|
|
841
|
-
sample:
|
|
842
|
-
spectrum:
|
|
841
|
+
state: St.value,
|
|
842
|
+
sample: Tt,
|
|
843
|
+
spectrum: Et,
|
|
843
844
|
"remaining-seconds": j(Z).remainingSeconds.value,
|
|
844
845
|
muted: W.value,
|
|
845
|
-
error:
|
|
846
|
+
error: Ct.value,
|
|
846
847
|
"raw-error": j(Z).error.value,
|
|
847
848
|
live: j(Z).isActive.value,
|
|
848
849
|
class: "pk-chatbot-view-chat__voice",
|
|
849
|
-
onToggleMute:
|
|
850
|
-
onHangUp:
|
|
851
|
-
onRetry:
|
|
852
|
-
onDismiss:
|
|
850
|
+
onToggleMute: zt,
|
|
851
|
+
onHangUp: Ot,
|
|
852
|
+
onRetry: At,
|
|
853
|
+
onDismiss: kt
|
|
853
854
|
}, null, 8, [
|
|
854
855
|
"state",
|
|
855
856
|
"remaining-seconds",
|
|
@@ -859,11 +860,11 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
859
860
|
"live"
|
|
860
861
|
]))
|
|
861
862
|
]),
|
|
862
|
-
S(
|
|
863
|
-
default: N(() => [j(
|
|
863
|
+
S(g, null, {
|
|
864
|
+
default: N(() => [j(mt) && j(I)?.enabled ? (D(), b("div", Ne, [S(r, {
|
|
864
865
|
name: "ri:upload-cloud-2-line",
|
|
865
866
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
866
|
-
}),
|
|
867
|
+
}), x("span", null, k(j(U)("action.dropFile")), 1)])) : y("", !0)]),
|
|
867
868
|
_: 1
|
|
868
869
|
})
|
|
869
870
|
], 2);
|
|
@@ -871,6 +872,6 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
|
871
872
|
}
|
|
872
873
|
});
|
|
873
874
|
//#endregion
|
|
874
|
-
export {
|
|
875
|
+
export { ge as i, Ce as n, R as r, Re as t };
|
|
875
876
|
|
|
876
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
877
|
+
//# sourceMappingURL=PkChatbotViewChat-dJE2iHPN.js.map
|