@8wave/ai-elements 0.124.0-beta.4 → 0.124.0-beta.5
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-CsSvagZw.js → Agent-BBWFD4nI.js} +7 -1
- package/dist/_chunks/{Agent-CsSvagZw.js.map → Agent-BBWFD4nI.js.map} +1 -1
- package/dist/_chunks/{PkFilePreview-C21RR0l6.js → PkFilePreview-CC2W-RXG.js} +195 -195
- package/dist/_chunks/{PkFilePreview-C21RR0l6.js.map → PkFilePreview-CC2W-RXG.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-C5Ex7Rf5.js → PkFilePreviewDialog-DYU2CUZS.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-C5Ex7Rf5.js.map → PkFilePreviewDialog-DYU2CUZS.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-PQ3X83Fq.js → PkStreamingMarkdown-CeWyL_2B.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-PQ3X83Fq.js.map → PkStreamingMarkdown-CeWyL_2B.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-CYxqugvO.js → PkToolChatFile-BMj7-urz.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-CYxqugvO.js.map → PkToolChatFile-BMj7-urz.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-CSAMqLyV.js → PkToolRequestGeolocation-D98zUqNQ.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-CSAMqLyV.js.map → PkToolRequestGeolocation-D98zUqNQ.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ST3-OlS4.js → PkToolRequestOAuthConnection-DwcRnUcd.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ST3-OlS4.js.map → PkToolRequestOAuthConnection-DwcRnUcd.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BIpD-GkV.js → PkToolShowArtifact-BoJC-NtV.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BIpD-GkV.js.map → PkToolShowArtifact-BoJC-NtV.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-2_YDqjeM.js → PkToolShowContactForm-CErVBzjl.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-2_YDqjeM.js.map → PkToolShowContactForm-CErVBzjl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-Bu4igmQL.js → PkToolShowForm-B7Q79XAb.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-Bu4igmQL.js.map → PkToolShowForm-B7Q79XAb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-BMP-xuYr.js → PkToolShowImageGallery-CxeQcE6A.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-BMP-xuYr.js.map → PkToolShowImageGallery-CxeQcE6A.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-AkLG4dBV.js → PkToolShowProductList-DDqYsHNq.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-AkLG4dBV.js.map → PkToolShowProductList-DDqYsHNq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DKtdU_Bq.js → PkToolShowSources-CTc2s510.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-DKtdU_Bq.js.map → PkToolShowSources-CTc2s510.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DVr8ps6g.js → PkToolShowSuggestedReply-vui8vph1.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DVr8ps6g.js.map → PkToolShowSuggestedReply-vui8vph1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C5jqPYXw.js → PkToolShowVideo-C2kh6pVN.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-C5jqPYXw.js.map → PkToolShowVideo-C2kh6pVN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BqL9PjpM.js → PkToolShowWebPages-By7zBIVa.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BqL9PjpM.js.map → PkToolShowWebPages-By7zBIVa.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-ZiVuD6nX.js → chatImagePolicy-C4jFnVQl.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-ZiVuD6nX.js.map → chatImagePolicy-C4jFnVQl.js.map} +1 -1
- package/dist/_chunks/{markdown-CUaXq5OY.js → markdown-DDYeZICP.js} +2 -2
- package/dist/_chunks/{markdown-CUaXq5OY.js.map → markdown-DDYeZICP.js.map} +1 -1
- package/dist/_chunks/{utils-Bz1Gb3iO.js → utils-DAQfsk2H.js} +109 -70
- package/dist/_chunks/utils-DAQfsk2H.js.map +1 -0
- package/dist/ai-elements.es.js +2529 -2509
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.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-D3US-D1x.js → Agent-DQl-tv4S.js} +154 -148
- package/dist-vue/_chunks/{Agent-D3US-D1x.js.map → Agent-DQl-tv4S.js.map} +1 -1
- package/dist-vue/_chunks/{Document-D5FVOcP9.js → Document-DXDifFZE.js} +2 -2
- package/dist-vue/_chunks/{Document-D5FVOcP9.js.map → Document-DXDifFZE.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-BA2tk9ix.js → PkChatbot-DQssgXm3.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-BA2tk9ix.js.map → PkChatbot-DQssgXm3.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-qKpfIuvI.js → PkChatbotEmptyState-B6qxJAPT.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-qKpfIuvI.js.map → PkChatbotEmptyState-B6qxJAPT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DSH5IrO6.js → PkChatbotInput-Bk8OS1xU.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DSH5IrO6.js.map → PkChatbotInput-Bk8OS1xU.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-D4LJZxv7.js +1041 -0
- package/dist-vue/_chunks/{PkChatbotMessages-pWNZCmM2.js.map → PkChatbotMessages-D4LJZxv7.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-BT-Xg18D.js → PkChatbotStepPayload-_0WRbSR6.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BT-Xg18D.js.map → PkChatbotStepPayload-_0WRbSR6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-Cs322RDk.js → PkChatbotStepToolDetail-DiaervF2.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-Cs322RDk.js.map → PkChatbotStepToolDetail-DiaervF2.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BqL-ClgI.js +189 -0
- package/dist-vue/_chunks/{PkChatbotSteps-Dd62GEXJ.js.map → PkChatbotSteps-BqL-ClgI.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-C8-fUyQh.js → PkChatbotViewChat-BfVLCU_j.js} +337 -317
- package/dist-vue/_chunks/PkChatbotViewChat-BfVLCU_j.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-CIv5g2xZ.js → PkChatbotViewConversations-C32O6SsT.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-CIv5g2xZ.js.map → PkChatbotViewConversations-C32O6SsT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DjYF-UoB.js → PkChatbotViewFiles-Du5AAS4v.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-DjYF-UoB.js.map → PkChatbotViewFiles-Du5AAS4v.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-D3d-hG14.js → PkChatbotViewProfile-UZrZdOyM.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-D3d-hG14.js.map → PkChatbotViewProfile-UZrZdOyM.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-DfRbMUCD.js → PkFilePreview-jeqvHDm7.js} +29 -29
- package/dist-vue/_chunks/{PkFilePreview-DfRbMUCD.js.map → PkFilePreview-jeqvHDm7.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-Cap9D7s8.js → PkFilePreviewDialog-BSvgiM9A.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-Cap9D7s8.js.map → PkFilePreviewDialog-BSvgiM9A.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-QDsT-4jC.js → PkStreamingMarkdown-Dk3iXhTm.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-QDsT-4jC.js.map → PkStreamingMarkdown-Dk3iXhTm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-UZeUytvT.js → PkToolChatFile-Bnj-YFLh.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-UZeUytvT.js.map → PkToolChatFile-Bnj-YFLh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-gEDbmudT.js → PkToolRequestGeolocation-SDzM1-Wl.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-gEDbmudT.js.map → PkToolRequestGeolocation-SDzM1-Wl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C9_w8V0T.js → PkToolRequestOAuthConnection-DNrlGxMX.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C9_w8V0T.js.map → PkToolRequestOAuthConnection-DNrlGxMX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-ldnH-U3h.js → PkToolShowArtifact-BtCGilTJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-ldnH-U3h.js.map → PkToolShowArtifact-BtCGilTJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-4hISKYqb.js → PkToolShowContactForm-BZNIeJpf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-4hISKYqb.js.map → PkToolShowContactForm-BZNIeJpf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-uHFCQ0FJ.js → PkToolShowDiagram-KD4MfVkP.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-uHFCQ0FJ.js.map → PkToolShowDiagram-KD4MfVkP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DiUz5_Ct.js → PkToolShowForm-Dtfpi58S.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DiUz5_Ct.js.map → PkToolShowForm-Dtfpi58S.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-CEzeXupr.js → PkToolShowImageGallery-DnS04nTs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-CEzeXupr.js.map → PkToolShowImageGallery-DnS04nTs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-h4Dqvk1V.js → PkToolShowProductList-BlFKAtqQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-h4Dqvk1V.js.map → PkToolShowProductList-BlFKAtqQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BJd4zYAY.js → PkToolShowSources-DM177ZlR.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-BJd4zYAY.js.map → PkToolShowSources-DM177ZlR.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bb7Inxa4.js → PkToolShowSuggestedReply-BlcEfMx8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Bb7Inxa4.js.map → PkToolShowSuggestedReply-BlcEfMx8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-DgkpZriW.js → PkToolShowVideo-DQdVpaWT.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-DgkpZriW.js.map → PkToolShowVideo-DQdVpaWT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DQr3SEGC.js → PkToolShowWebPages-Cx2Ft_wN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DQr3SEGC.js.map → PkToolShowWebPages-Cx2Ft_wN.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CFKeOgEA.js → createChatbotApiClient-Bukf58dz.js} +2 -2
- package/dist-vue/_chunks/{createChatbotApiClient-CFKeOgEA.js.map → createChatbotApiClient-Bukf58dz.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore--PcS9kGN.js → useChatbotStore-DcvdWkgq.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore--PcS9kGN.js.map → useChatbotStore-DcvdWkgq.js.map} +1 -1
- package/dist-vue/_chunks/{utils-DmBnucJs.js → utils-BuxgMuKv.js} +125 -76
- package/dist-vue/_chunks/utils-BuxgMuKv.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +4 -0
- package/dist-vue/composables.js +8 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5620 -5554
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +18 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +8 -2
- package/dist-vue/packages/components/src/chat/PkAuroraCanvas.d.ts +10 -3
- package/dist-vue/packages/components/src/chat/utils.d.ts +29 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +12 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +48 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +12 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +12 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/utils-Bz1Gb3iO.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-pWNZCmM2.js +0 -1041
- package/dist-vue/_chunks/PkChatbotSteps-Dd62GEXJ.js +0 -189
- package/dist-vue/_chunks/PkChatbotViewChat-C8-fUyQh.js.map +0 -1
- package/dist-vue/_chunks/utils-DmBnucJs.js.map +0 -1
|
@@ -1,84 +1,91 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-D4LJZxv7.js";
|
|
2
2
|
import { o as t } from "./Media-DylqhvaF.js";
|
|
3
|
-
import { a as n, n as r, t as i } from "./useChatbotStore
|
|
3
|
+
import { a as n, n as r, t as i } from "./useChatbotStore-DcvdWkgq.js";
|
|
4
4
|
import { n as a } from "./src-nb8MU1sh.js";
|
|
5
5
|
import { s as o, t as s } from "./message-DuibQyHy.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { n as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { VvIcon as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { useDropZone as
|
|
17
|
-
import { storeToRefs as
|
|
6
|
+
import { I as c, c as l, d as u, n as d, v as f } from "./utils-BuxgMuKv.js";
|
|
7
|
+
import { t as p } from "./useLocalizedString-Dmn92nix.js";
|
|
8
|
+
import { t as m } from "./PkAvatar-DwtZWSW4.js";
|
|
9
|
+
import { n as h, t as g } from "./PkChatbotInput-Bk8OS1xU.js";
|
|
10
|
+
import { t as _ } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
11
|
+
import { t as v } from "./PkChatbotEmptyState-B6qxJAPT.js";
|
|
12
|
+
import { t as ee } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
13
|
+
import { VvIcon as te } from "@volverjs/ui-vue/components";
|
|
14
|
+
import { Fragment as y, Teleport as ne, Transition as b, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createSlots as re, createTextVNode as ie, createVNode as E, defineAsyncComponent as D, defineComponent as O, inject as ae, isRef as oe, nextTick as se, normalizeClass as k, normalizeStyle as ce, onBeforeUnmount as le, onMounted as ue, onScopeDispose as A, onUnmounted as de, openBlock as j, provide as fe, ref as M, renderList as pe, shallowRef as me, toDisplayString as N, toValue as P, unref as F, useTemplateRef as he, watch as I, withCtx as L } from "vue";
|
|
15
|
+
import { useI18n as ge } from "vue-i18n";
|
|
16
|
+
import { useDropZone as _e, useResizeObserver as ve } from "@vueuse/core";
|
|
17
|
+
import { storeToRefs as ye } from "pinia";
|
|
18
18
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
19
|
-
function ye(e, t) {
|
|
20
|
-
let { locale: n, t: r, te: i } = he({ useScope: "global" });
|
|
21
|
-
return S(() => be(pe(e)?.greeting?.[0]?.[n.value] ?? "", pe(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
22
|
-
}
|
|
23
19
|
function be(e, t) {
|
|
20
|
+
let { locale: n, t: r, te: i } = ge({ useScope: "global" });
|
|
21
|
+
return x(() => xe(P(e)?.greeting?.[0]?.[n.value] ?? "", P(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
22
|
+
}
|
|
23
|
+
function xe(e, t) {
|
|
24
24
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
25
25
|
}
|
|
26
26
|
// ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
28
|
-
class: "pk-aurora",
|
|
29
|
-
"aria-hidden": "true"
|
|
30
|
-
}, xe = {
|
|
27
|
+
var R = {
|
|
31
28
|
key: 1,
|
|
32
29
|
class: "pk-aurora__fallback"
|
|
33
|
-
},
|
|
30
|
+
}, z = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Se = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\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 // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Ce = /* @__PURE__ */ O({
|
|
34
31
|
__name: "PkAuroraCanvas",
|
|
35
|
-
props: {
|
|
32
|
+
props: {
|
|
33
|
+
sourceSelector: {},
|
|
34
|
+
mainColor: {},
|
|
35
|
+
tones: {},
|
|
36
|
+
secondColor: {}
|
|
37
|
+
},
|
|
36
38
|
setup(e) {
|
|
37
|
-
let t = e, n =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
let t = e, n = he("rootEl"), r = he("canvasEl"), i = M(!1), a = M(null), o = x(() => a.value ? {
|
|
40
|
+
"--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
|
|
41
|
+
"--pk-aurora-tint-2": `rgb(${(a.value.duo ? a.value.second : a.value.first).join(" ")})`
|
|
42
|
+
} : void 0), s = null, l = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null, ee = performance.now(), te = (e, t) => {
|
|
43
|
+
if (!s) return null;
|
|
44
|
+
let n = s.createShader(e);
|
|
45
|
+
return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
|
|
46
|
+
}, y = (e) => e.map((e) => e / 255), ne = () => {
|
|
47
|
+
n.value && (a.value = c(n.value, {
|
|
48
|
+
mainColor: t.mainColor,
|
|
49
|
+
tones: t.tones,
|
|
50
|
+
secondColor: t.secondColor
|
|
51
|
+
}), s && !i.value && a.value && (s.uniform3f(g, ...y(a.value.first)), s.uniform3f(_, ...y(a.value.second)), s.uniform1f(v, +!!a.value.duo), C(S() ? 10 : void 0)));
|
|
52
|
+
};
|
|
53
|
+
I([
|
|
54
|
+
() => t.mainColor,
|
|
55
|
+
() => t.tones,
|
|
56
|
+
() => t.secondColor
|
|
57
|
+
], ne);
|
|
58
|
+
let b = () => {
|
|
59
|
+
if (!s || !r.value) return;
|
|
60
|
+
let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: n, clientHeight: i } = r.value;
|
|
61
|
+
r.value.width = Math.max(1, Math.round(n * e)), r.value.height = Math.max(1, Math.round(i * e)), s.viewport(0, 0, r.value.width, r.value.height);
|
|
62
|
+
let a = r.value.parentElement?.offsetParent, o = (t.sourceSelector ? a?.querySelector(t.sourceSelector) : a) ?? a, c = r.value.getBoundingClientRect(), l = o?.getBoundingClientRect();
|
|
63
|
+
if (l && c.width > 0) {
|
|
64
|
+
let e = r.value.width / c.width, t = r.value.height / c.height, n = (l.left + l.width / 2 - c.left) * e, i = (c.bottom - (l.top + l.height / 2)) * t, a = l.width / 2 * e, o = l.height / 2 * t;
|
|
65
|
+
s.uniform2f(p, n, i), s.uniform2f(m, a, o);
|
|
66
|
+
let u = Number.parseFloat(getComputedStyle(r.value).getPropertyValue("--aurora-spread"));
|
|
67
|
+
s.uniform1f(h, Number.isNaN(u) ? 1 : u);
|
|
59
68
|
}
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
69
|
+
C(S() ? 10 : void 0);
|
|
70
|
+
}, S = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, C = (e) => {
|
|
71
|
+
s && r.value && (s.uniform1f(d, e ?? (performance.now() - ee) / 1e3), s.uniform2f(f, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
|
|
72
|
+
}, T = () => {
|
|
73
|
+
C(), l = requestAnimationFrame(T);
|
|
65
74
|
};
|
|
66
|
-
return
|
|
67
|
-
let e =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (!e || !i || !t) {
|
|
71
|
-
r.value = !0;
|
|
75
|
+
return ue(() => {
|
|
76
|
+
let e = r.value;
|
|
77
|
+
if (ne(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
|
|
78
|
+
i.value = !0;
|
|
72
79
|
return;
|
|
73
80
|
}
|
|
74
|
-
let
|
|
75
|
-
if (!
|
|
76
|
-
|
|
81
|
+
let t = te(s.VERTEX_SHADER, z), n = te(s.FRAGMENT_SHADER, Se), o = s.createProgram();
|
|
82
|
+
if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
|
|
83
|
+
i.value = !0;
|
|
77
84
|
return;
|
|
78
85
|
}
|
|
79
|
-
|
|
80
|
-
let
|
|
81
|
-
|
|
86
|
+
s.useProgram(o);
|
|
87
|
+
let c = s.createBuffer();
|
|
88
|
+
s.bindBuffer(s.ARRAY_BUFFER, c), s.bufferData(s.ARRAY_BUFFER, new Float32Array([
|
|
82
89
|
-1,
|
|
83
90
|
-1,
|
|
84
91
|
1,
|
|
@@ -87,24 +94,30 @@ var L = {
|
|
|
87
94
|
1,
|
|
88
95
|
1,
|
|
89
96
|
1
|
|
90
|
-
]),
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
}), oe(() => {
|
|
94
|
-
cancelAnimationFrame(a), o?.disconnect();
|
|
97
|
+
]), s.STATIC_DRAW);
|
|
98
|
+
let l = s.getAttribLocation(o, "a_position");
|
|
99
|
+
s.enableVertexAttribArray(l), s.vertexAttribPointer(l, 2, s.FLOAT, !1, 0, 0), d = s.getUniformLocation(o, "u_time"), f = s.getUniformLocation(o, "u_resolution"), p = s.getUniformLocation(o, "u_center"), m = s.getUniformLocation(o, "u_half"), h = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"), ne(), u = new ResizeObserver(b), u.observe(e), b(), se(b), S() ? C(10) : T();
|
|
95
100
|
}), le(() => {
|
|
96
|
-
|
|
97
|
-
|
|
101
|
+
cancelAnimationFrame(l), u?.disconnect();
|
|
102
|
+
}), de(() => {
|
|
103
|
+
let e = s;
|
|
104
|
+
s = null, setTimeout(() => {
|
|
98
105
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
99
106
|
}, 150);
|
|
100
|
-
}), (e, t) => (j(),
|
|
107
|
+
}), (e, t) => (j(), w("div", {
|
|
108
|
+
ref_key: "rootEl",
|
|
109
|
+
ref: n,
|
|
110
|
+
class: "pk-aurora",
|
|
111
|
+
"aria-hidden": "true",
|
|
112
|
+
style: ce(o.value)
|
|
113
|
+
}, [i.value ? (j(), w("div", R)) : (j(), w("canvas", {
|
|
101
114
|
key: 0,
|
|
102
115
|
ref_key: "canvasEl",
|
|
103
|
-
ref:
|
|
116
|
+
ref: r,
|
|
104
117
|
class: "pk-aurora__canvas"
|
|
105
|
-
}, null, 512))]));
|
|
118
|
+
}, null, 512))], 4));
|
|
106
119
|
}
|
|
107
|
-
}), B = .18,
|
|
120
|
+
}), B = .18, we = .35, Te = /* @__PURE__ */ O({
|
|
108
121
|
__name: "PkVoiceOrb",
|
|
109
122
|
props: {
|
|
110
123
|
sample: {},
|
|
@@ -116,7 +129,7 @@ var L = {
|
|
|
116
129
|
bars: { default: 5 }
|
|
117
130
|
},
|
|
118
131
|
setup(e) {
|
|
119
|
-
let t = e, n =
|
|
132
|
+
let t = e, n = he("barsEl"), r = Array.from({ length: t.bars }, () => B), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
120
133
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
121
134
|
if (!n?.length) {
|
|
122
135
|
let t = Date.now() / 260;
|
|
@@ -138,36 +151,36 @@ var L = {
|
|
|
138
151
|
});
|
|
139
152
|
}, c = () => {
|
|
140
153
|
let e = o();
|
|
141
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(B, e[n] ?? B)) - t) *
|
|
154
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(B, e[n] ?? B)) - t) * we), s(), i = requestAnimationFrame(c);
|
|
142
155
|
}, l = () => {
|
|
143
156
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
144
157
|
};
|
|
145
|
-
return
|
|
146
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => B * 1.6), await
|
|
147
|
-
}, { immediate: !0 }),
|
|
148
|
-
class:
|
|
158
|
+
return I(() => t.state, async (e) => {
|
|
159
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => B * 1.6), await se(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
160
|
+
}, { immediate: !0 }), le(l), (t, r) => (j(), w("div", {
|
|
161
|
+
class: k(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
149
162
|
"aria-hidden": "true"
|
|
150
|
-
}, [
|
|
163
|
+
}, [T("div", {
|
|
151
164
|
ref_key: "barsEl",
|
|
152
165
|
ref: n,
|
|
153
166
|
class: "pk-voice-orb__bars"
|
|
154
|
-
}, [(j(!0),
|
|
167
|
+
}, [(j(!0), w(y, null, pe(e.bars, (e) => (j(), w("span", {
|
|
155
168
|
key: e,
|
|
156
169
|
class: "pk-voice-orb__bar"
|
|
157
170
|
}))), 128))], 512)], 2));
|
|
158
171
|
}
|
|
159
|
-
}),
|
|
172
|
+
}), Ee = {
|
|
160
173
|
key: 0,
|
|
161
174
|
class: "pk-voice-session__badge",
|
|
162
175
|
"aria-hidden": "true"
|
|
163
|
-
},
|
|
176
|
+
}, V = {
|
|
164
177
|
class: "pk-voice-session__status",
|
|
165
178
|
role: "status"
|
|
166
|
-
},
|
|
179
|
+
}, H = {
|
|
167
180
|
key: 0,
|
|
168
181
|
class: "pk-voice-session__live-dot",
|
|
169
182
|
"aria-hidden": "true"
|
|
170
|
-
},
|
|
183
|
+
}, De = ["title"], Oe = ["title"], ke = { class: "pk-voice-session__actions" }, Ae = /* @__PURE__ */ O({
|
|
171
184
|
__name: "PkVoiceSession",
|
|
172
185
|
props: {
|
|
173
186
|
state: {},
|
|
@@ -186,17 +199,17 @@ var L = {
|
|
|
186
199
|
"dismiss"
|
|
187
200
|
],
|
|
188
201
|
setup(e, { emit: t }) {
|
|
189
|
-
let n = e, r = t, { t: i } =
|
|
202
|
+
let n = e, r = t, { t: i } = ge({ useScope: "global" }), a = x(() => 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 = x(() => {
|
|
190
203
|
if (n.remainingSeconds === void 0) return;
|
|
191
204
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
192
205
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
193
|
-
}), s =
|
|
206
|
+
}), s = x(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = x(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = x(() => {
|
|
194
207
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
195
208
|
});
|
|
196
209
|
return (t, n) => {
|
|
197
|
-
let u =
|
|
198
|
-
return j(),
|
|
199
|
-
e.error ? (j(),
|
|
210
|
+
let u = te;
|
|
211
|
+
return j(), w("div", { class: k(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
212
|
+
e.error ? (j(), w("span", Ee, [E(u, { name: "ri:error-warning-line" })])) : (j(), S(Te, {
|
|
200
213
|
key: 1,
|
|
201
214
|
state: e.state,
|
|
202
215
|
sample: e.sample,
|
|
@@ -206,37 +219,37 @@ var L = {
|
|
|
206
219
|
"sample",
|
|
207
220
|
"spectrum"
|
|
208
221
|
])),
|
|
209
|
-
|
|
222
|
+
T("div", V, [T("span", { class: k(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (j(), w("span", H)) : C("", !0), ie(" " + N(a.value), 1)], 2), e.error ? (j(), w("p", {
|
|
210
223
|
key: 0,
|
|
211
224
|
class: "pk-voice-session__detail",
|
|
212
225
|
title: e.rawError ?? e.error
|
|
213
|
-
}, N(e.error), 9,
|
|
214
|
-
o.value ? (j(),
|
|
226
|
+
}, N(e.error), 9, De)) : C("", !0)]),
|
|
227
|
+
o.value ? (j(), w("span", {
|
|
215
228
|
key: 2,
|
|
216
|
-
class:
|
|
217
|
-
title:
|
|
229
|
+
class: k(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
230
|
+
title: F(i)("hint.voiceRemaining"),
|
|
218
231
|
"aria-hidden": "true"
|
|
219
|
-
}, N(o.value), 11,
|
|
220
|
-
|
|
232
|
+
}, N(o.value), 11, Oe)) : C("", !0),
|
|
233
|
+
T("div", ke, [e.error ? (j(), w(y, { key: 0 }, [E(h, {
|
|
221
234
|
icon: "ri:refresh-line",
|
|
222
|
-
label:
|
|
235
|
+
label: F(i)("action.retry"),
|
|
223
236
|
onClick: n[0] ||= (e) => r("retry")
|
|
224
|
-
}, null, 8, ["label"]), e.live ? (j(),
|
|
237
|
+
}, null, 8, ["label"]), e.live ? (j(), S(h, {
|
|
225
238
|
key: 0,
|
|
226
239
|
icon: "ri:stop-circle-line",
|
|
227
240
|
modifiers: "danger",
|
|
228
|
-
title:
|
|
229
|
-
"aria-label":
|
|
241
|
+
title: F(i)("action.hangUp"),
|
|
242
|
+
"aria-label": F(i)("action.hangUp"),
|
|
230
243
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
231
|
-
}, null, 8, ["title", "aria-label"])) : (j(),
|
|
244
|
+
}, null, 8, ["title", "aria-label"])) : (j(), S(h, {
|
|
232
245
|
key: 1,
|
|
233
246
|
icon: "ri:close-line",
|
|
234
|
-
label:
|
|
247
|
+
label: F(i)("action.close"),
|
|
235
248
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
236
|
-
}, null, 8, ["label"]))], 64)) : (j(),
|
|
249
|
+
}, null, 8, ["label"]))], 64)) : (j(), w(y, { key: 1 }, [E(h, {
|
|
237
250
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
238
|
-
title: e.muted ?
|
|
239
|
-
"aria-label": e.muted ?
|
|
251
|
+
title: e.muted ? F(i)("action.unmute") : F(i)("action.mute"),
|
|
252
|
+
"aria-label": e.muted ? F(i)("action.unmute") : F(i)("action.mute"),
|
|
240
253
|
"aria-pressed": e.muted,
|
|
241
254
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
242
255
|
}, null, 8, [
|
|
@@ -244,18 +257,18 @@ var L = {
|
|
|
244
257
|
"title",
|
|
245
258
|
"aria-label",
|
|
246
259
|
"aria-pressed"
|
|
247
|
-
]),
|
|
260
|
+
]), E(h, {
|
|
248
261
|
icon: "ri:stop-circle-line",
|
|
249
262
|
modifiers: "danger",
|
|
250
|
-
title:
|
|
251
|
-
"aria-label":
|
|
263
|
+
title: F(i)("action.hangUp"),
|
|
264
|
+
"aria-label": F(i)("action.hangUp"),
|
|
252
265
|
onClick: n[4] ||= (e) => r("hang-up")
|
|
253
266
|
}, null, 8, ["title", "aria-label"])], 64))])
|
|
254
267
|
], 2);
|
|
255
268
|
};
|
|
256
269
|
}
|
|
257
|
-
}),
|
|
258
|
-
let t =
|
|
270
|
+
}), je = (e) => {
|
|
271
|
+
let t = me(), n = M("disconnected"), r = M("listening"), i = M(), o = M([]), s = M(), c = M(), l, u, d = 0, f = !1, p = () => {
|
|
259
272
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
260
273
|
}, m = (e) => {
|
|
261
274
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -327,9 +340,9 @@ var L = {
|
|
|
327
340
|
}
|
|
328
341
|
}, v = () => {
|
|
329
342
|
i.value = void 0;
|
|
330
|
-
},
|
|
343
|
+
}, ee = (e) => {
|
|
331
344
|
t.value?.setMicMuted(e);
|
|
332
|
-
},
|
|
345
|
+
}, te = (e) => {
|
|
333
346
|
let n = t.value;
|
|
334
347
|
if (!n || !e.trim()) return !1;
|
|
335
348
|
try {
|
|
@@ -337,7 +350,7 @@ var L = {
|
|
|
337
350
|
} catch (e) {
|
|
338
351
|
return a.warn("The spoken answer could not be sent", e), !1;
|
|
339
352
|
}
|
|
340
|
-
},
|
|
353
|
+
}, y = (e) => {
|
|
341
354
|
let n = t.value;
|
|
342
355
|
if (!n) return 0;
|
|
343
356
|
try {
|
|
@@ -345,21 +358,21 @@ var L = {
|
|
|
345
358
|
} catch {
|
|
346
359
|
return 0;
|
|
347
360
|
}
|
|
348
|
-
},
|
|
361
|
+
}, ne = (e) => {
|
|
349
362
|
let n = t.value;
|
|
350
363
|
if (n) try {
|
|
351
364
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
352
365
|
} catch {
|
|
353
366
|
return;
|
|
354
367
|
}
|
|
355
|
-
},
|
|
368
|
+
}, b = () => {
|
|
356
369
|
let e = l;
|
|
357
370
|
l = void 0, d += 1, p(), h(e);
|
|
358
371
|
let r = t.value;
|
|
359
372
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
360
373
|
};
|
|
361
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
362
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
374
|
+
return typeof window < "u" && window.addEventListener("pagehide", b), A(() => {
|
|
375
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", b), g();
|
|
363
376
|
}), {
|
|
364
377
|
status: n,
|
|
365
378
|
mode: r,
|
|
@@ -367,31 +380,31 @@ var L = {
|
|
|
367
380
|
transcript: o,
|
|
368
381
|
remainingSeconds: s,
|
|
369
382
|
chatId: c,
|
|
370
|
-
isActive:
|
|
371
|
-
isConnecting:
|
|
372
|
-
isSpeaking:
|
|
373
|
-
isListening:
|
|
383
|
+
isActive: x(() => n.value === "connected" || n.value === "connecting"),
|
|
384
|
+
isConnecting: x(() => n.value === "connecting"),
|
|
385
|
+
isSpeaking: x(() => n.value === "connected" && r.value === "speaking"),
|
|
386
|
+
isListening: x(() => n.value === "connected" && r.value === "listening"),
|
|
374
387
|
start: _,
|
|
375
388
|
stop: g,
|
|
376
389
|
dismissError: v,
|
|
377
|
-
setMuted:
|
|
378
|
-
sendUserMessage:
|
|
379
|
-
readLevel:
|
|
380
|
-
readSpectrum:
|
|
390
|
+
setMuted: ee,
|
|
391
|
+
sendUserMessage: te,
|
|
392
|
+
readLevel: y,
|
|
393
|
+
readSpectrum: ne
|
|
381
394
|
};
|
|
382
|
-
},
|
|
383
|
-
function
|
|
384
|
-
|
|
395
|
+
}, Me = Symbol("ChatFilePreviewDock");
|
|
396
|
+
function Ne(e) {
|
|
397
|
+
fe(Me, e);
|
|
385
398
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
399
|
+
function Pe() {
|
|
400
|
+
return ae(Me, void 0);
|
|
388
401
|
}
|
|
389
402
|
// ../../packages/components/src/chat/useWakeupWatch.ts
|
|
390
|
-
var
|
|
403
|
+
var Fe = 4e3, Ie = [
|
|
391
404
|
3e3,
|
|
392
405
|
5e3,
|
|
393
406
|
1e4
|
|
394
|
-
],
|
|
407
|
+
], Le = 12e4, U = 3e4;
|
|
395
408
|
function Re(e) {
|
|
396
409
|
let t = M(null), n = M(!1), r, i = !1, a = () => {
|
|
397
410
|
clearTimeout(r), r = void 0;
|
|
@@ -410,12 +423,12 @@ function Re(e) {
|
|
|
410
423
|
}
|
|
411
424
|
let r = t.value;
|
|
412
425
|
if (r) {
|
|
413
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
414
|
-
o(Math.max(
|
|
426
|
+
let e = Date.parse(r.dueAt) - Date.now() + Fe;
|
|
427
|
+
o(Math.max(Fe, e), () => l(r.wakeId, Date.now(), 0));
|
|
415
428
|
}
|
|
416
429
|
}
|
|
417
430
|
async function l(t, n, r) {
|
|
418
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
431
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Le ? await c() : o(Ie[Math.min(r, Ie.length - 1)], () => l(t, n, r + 1)));
|
|
419
432
|
}
|
|
420
433
|
async function u() {
|
|
421
434
|
n.value = !0;
|
|
@@ -439,23 +452,23 @@ function Re(e) {
|
|
|
439
452
|
function h() {
|
|
440
453
|
f = void 0;
|
|
441
454
|
}
|
|
442
|
-
let g =
|
|
443
|
-
|
|
455
|
+
let g = x(() => e.messages().some((e) => e.role === "user"));
|
|
456
|
+
I([e.chatId, g], ([, t]) => {
|
|
444
457
|
d();
|
|
445
458
|
let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
|
|
446
459
|
t && !r && c();
|
|
447
|
-
}, { immediate: !0 }),
|
|
460
|
+
}, { immediate: !0 }), I(e.status, (e, t) => {
|
|
448
461
|
e === "ready" && t !== "ready" && g.value && c();
|
|
449
462
|
});
|
|
450
463
|
let _;
|
|
451
464
|
function v() {
|
|
452
465
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
453
466
|
}
|
|
454
|
-
let
|
|
455
|
-
return document.addEventListener("visibilitychange",
|
|
456
|
-
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v,
|
|
457
|
-
}),
|
|
458
|
-
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange",
|
|
467
|
+
let ee = () => v();
|
|
468
|
+
return document.addEventListener("visibilitychange", ee), I(() => t.value?.wakeId, (e) => {
|
|
469
|
+
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, U));
|
|
470
|
+
}), le(() => {
|
|
471
|
+
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", ee);
|
|
459
472
|
}), {
|
|
460
473
|
pendingWakeup: t,
|
|
461
474
|
isStopping: n,
|
|
@@ -509,7 +522,7 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
509
522
|
}, We = {
|
|
510
523
|
key: 0,
|
|
511
524
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
512
|
-
}, Ge = 1e3, Ke = 3e3, qe = 6e4, Je = 3e5, Ye = 6e5,
|
|
525
|
+
}, Ge = 1e3, Ke = 3e3, qe = 6e4, Je = 3e5, Ye = 6e5, Xe = /* @__PURE__ */ O({
|
|
513
526
|
__name: "PkChatbotViewChat",
|
|
514
527
|
props: {
|
|
515
528
|
agentId: {},
|
|
@@ -517,37 +530,37 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
517
530
|
userName: {}
|
|
518
531
|
},
|
|
519
532
|
emits: ["show-info", "revise"],
|
|
520
|
-
setup(a, { emit:
|
|
521
|
-
let
|
|
522
|
-
|
|
523
|
-
let mt =
|
|
524
|
-
|
|
533
|
+
setup(a, { emit: c }) {
|
|
534
|
+
let h = D(() => import("./PkToolShowForm-Dtfpi58S.js").then((e) => e.n)), y = D(() => import("./PkToolShowContactForm-BZNIeJpf.js").then((e) => e.n)), ie = D(() => import("./PkToolShowSuggestedReply-BlcEfMx8.js").then((e) => e.n)), O = D(() => import("./PkToolShowSources-DM177ZlR.js").then((e) => e.n)), ae = D(() => import("./PkToolRequestGeolocation-SDzM1-Wl.js").then((e) => e.n)), se = D(() => import("./PkToolRequestOAuthConnection-DNrlGxMX.js")), ce = D(() => import("./PkToolShowLocation-DAQEuCuQ.js").then((e) => e.n)), ue = D(() => import("./PkToolShowDiagram-KD4MfVkP.js")), A = D(() => import("./PkToolChatFile-Bnj-YFLh.js").then((e) => e.n)), de = D(() => import("./PkToolShareDocument-CsS5OTDj.js").then((e) => e.n)), pe = D(() => import("./PkFilePreview-jeqvHDm7.js").then((e) => e.n)), me = D(() => import("./PkFilePreviewDialog-BSvgiM9A.js").then((e) => e.n)), P = a, xe = c, R = r(P.agentId), { agentInterface: z, agentFileUpload: Se, agentType: B, agentVoice: we, actions: Te, revisedAnswers: Ee, messages: V, chat: H, messageFeedbacks: De, feedbackDialogMessage: Oe, isFeedbackSubmitting: ke, isFeedbackSubmitted: Me, feedbackSubmitError: Ne, isLeadSubmitted: Fe, isLoadingSubmitLead: Ie, submitLeadError: Le, input: U, inputMessagePlaceholder: Xe, isConversationBlocked: Ze, baseUrl: Qe, pendingAttachments: $e, isAttachmentLimitReached: et, fileLimitError: tt, apiClient: W, isDark: nt, hostToolsPending: rt, pageNoticeLevel: it, hostConfirmation: at, agentPageAccess: ot, hostStepTitles: st, canQueue: ct, queuedMessages: lt, backgroundAnswers: ut, inputFocusRequest: dt, pagePointer: G, pagePointerAvailable: ft, pagePointing: pt } = ye(R);
|
|
535
|
+
fe(d, st);
|
|
536
|
+
let mt = he("inputEl");
|
|
537
|
+
I(dt, () => {
|
|
525
538
|
mt.value?.focus();
|
|
526
|
-
}),
|
|
539
|
+
}), I(G, (e) => {
|
|
527
540
|
e && mt.value?.focus();
|
|
528
541
|
});
|
|
529
|
-
let ht =
|
|
542
|
+
let ht = x(() => G.value ? {
|
|
530
543
|
kind: G.value.kind,
|
|
531
544
|
label: G.value.label
|
|
532
|
-
} : void 0), K =
|
|
545
|
+
} : void 0), K = x(() => B.value === "reasoning" ? void 0 : Se.value), q = (e) => W.value.getMediaDownloadUrl(P.agentId, R.localChatId, e), { handleSubmit: gt, stopGeneration: _t, regenerate: vt, onUpvote: yt, onDownvote: bt, onFeedback: xt, onFeedbackSubmit: St, onLeadSubmit: Ct, startNewChat: wt, addToolOutput: Tt, addToolApprovalResponse: Et, handleFileSelect: Dt, clearFileLimitError: Ot, refreshMessages: kt, appendMessage: At, closePageNotice: jt, respondHostConfirmation: Mt, editQueuedMessage: Nt, removeQueuedMessage: Pt, openBackgroundAnswer: Ft, dismissBackgroundAnswer: It } = R, { t: J } = ge({ useScope: "global" }), Lt = x(() => rt.value > 0), Rt = x(() => Lt.value && H.value.status === "ready" ? "streaming" : H.value.status), zt = p(() => ot.value?.notice), Bt = x(() => it.value ? zt.value || J(`message.pageAccessNotice.${it.value}`) : void 0), Vt = x(() => {
|
|
533
546
|
let e = tt.value;
|
|
534
547
|
if (e) return e.reason === "per-chat" ? J("message.fileLimitPerChat", { max: e.max }) : J("message.fileLimitPerMessage", { max: e.max });
|
|
535
|
-
}), Ht =
|
|
548
|
+
}), Ht = x(() => ut.value.map(({ chatId: e, title: t }) => ({
|
|
536
549
|
id: e,
|
|
537
550
|
text: t ? J("message.backgroundAnswerReady", { title: t }) : J("message.backgroundAnswerReadyUntitled")
|
|
538
|
-
}))), Ut =
|
|
539
|
-
|
|
551
|
+
}))), Ut = p(() => z.value?.dismissableNotice), Wt = x(() => V.value.some((e) => e.role === "user")), Gt = x(() => P.modifier === "fullscreen" && !Wt.value), Kt = be(z, () => P.userName), qt = he("chatViewEl"), Jt = Pe(), Yt = x(() => !!Jt?.value), Xt = x(() => Jt?.value ?? "body"), Zt = M(0), Qt = M(0);
|
|
552
|
+
ve([qt, x(() => Jt?.value ?? void 0)], (e) => {
|
|
540
553
|
for (let t of e) {
|
|
541
554
|
let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
|
|
542
555
|
t.target === qt.value ? Zt.value = e : Qt.value = e;
|
|
543
556
|
}
|
|
544
557
|
}, { box: "border-box" });
|
|
545
|
-
let $t =
|
|
558
|
+
let $t = x(() => Zt.value + (Yt.value ? Qt.value : 0) >= Ge), en = x(() => Zt.value > 0 && Zt.value < 576), { target: Y, preview: tn, loading: nn, error: rn, open: an, close: on, reset: sn } = ze((e) => W.value.getChatFilePreview(P.agentId, R.localChatId, e)), X = M({}), cn = (e) => {
|
|
546
559
|
let t = (e) => e?.fileId ?? e?.storedFileName;
|
|
547
560
|
return t(e) !== t(Y.value) && (X.value = {}), an(e);
|
|
548
|
-
}, ln = M(!1), un =
|
|
561
|
+
}, ln = M(!1), un = x(() => !!Y.value && $t.value && !ln.value), dn = () => {
|
|
549
562
|
on(), ln.value = !1;
|
|
550
|
-
}, fn =
|
|
563
|
+
}, fn = x(() => {
|
|
551
564
|
let e = /* @__PURE__ */ new Map();
|
|
552
565
|
for (let t of V.value) for (let n of t.parts) {
|
|
553
566
|
let { type: t, state: r, output: i } = n;
|
|
@@ -558,14 +571,14 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
558
571
|
}
|
|
559
572
|
for (let [t, n] of e) n.has(1) || n.set(1, t);
|
|
560
573
|
return e;
|
|
561
|
-
}), pn =
|
|
574
|
+
}), pn = x(() => [...fn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), mn = (e) => {
|
|
562
575
|
let t = Y.value, n = fn.value.get(t?.fileId ?? "")?.get(e);
|
|
563
576
|
t && n && cn({
|
|
564
577
|
...t,
|
|
565
578
|
version: e,
|
|
566
579
|
storedFileName: n
|
|
567
580
|
});
|
|
568
|
-
}, hn =
|
|
581
|
+
}, hn = x(() => {
|
|
569
582
|
let e = Y.value, t = pn.value;
|
|
570
583
|
return !!$.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
|
|
571
584
|
}), gn = () => {
|
|
@@ -576,11 +589,11 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
576
589
|
filename: e.filename
|
|
577
590
|
}), dn());
|
|
578
591
|
};
|
|
579
|
-
|
|
580
|
-
let _n = async (e) => (await W.value.expandSourceContext(
|
|
581
|
-
let t = await W.value.downloadSourceDocument(
|
|
592
|
+
I(() => R.localChatId, sn);
|
|
593
|
+
let _n = async (e) => (await W.value.expandSourceContext(P.agentId, e.documentId, e.chunkIndex)).content, vn = async (e) => {
|
|
594
|
+
let t = await W.value.downloadSourceDocument(P.agentId, e);
|
|
582
595
|
window.open(t.downloadUrl, "_blank");
|
|
583
|
-
}, { isOverDropZone: yn } =
|
|
596
|
+
}, { isOverDropZone: yn } = _e(qt, {
|
|
584
597
|
dataTypes: (e) => t(e, K.value?.allowedMimeTypes ?? []),
|
|
585
598
|
onDrop: (e) => {
|
|
586
599
|
if (K.value?.enabled && e) for (let t of e) Dt(t);
|
|
@@ -623,17 +636,17 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
623
636
|
}
|
|
624
637
|
let jn = (e = 1200) => {
|
|
625
638
|
kn(e);
|
|
626
|
-
}, Mn, Q =
|
|
639
|
+
}, Mn, Q = je({
|
|
627
640
|
fetchGrant: async () => {
|
|
628
641
|
Mn = R.voicePageTools();
|
|
629
|
-
let e = await W.value.createVoiceSession(
|
|
642
|
+
let e = await W.value.createVoiceSession(P.agentId, R.localChatId, {
|
|
630
643
|
deviceContext: R.buildDeviceContext(),
|
|
631
644
|
externalContext: R.externalContext,
|
|
632
645
|
pageTools: Mn?.declaration
|
|
633
646
|
});
|
|
634
647
|
return e.chatId !== R.localChatId && (R.localChatId = e.chatId), e;
|
|
635
648
|
},
|
|
636
|
-
closeGrant: (e) => W.value.closeVoiceSession(
|
|
649
|
+
closeGrant: (e) => W.value.closeVoiceSession(P.agentId, e),
|
|
637
650
|
clientTools: () => Mn?.clientTools,
|
|
638
651
|
onTranscript: (e) => {
|
|
639
652
|
e.role === "user" ? (Z.value = !0, or(), At({
|
|
@@ -649,15 +662,15 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
649
662
|
jn();
|
|
650
663
|
}
|
|
651
664
|
});
|
|
652
|
-
|
|
665
|
+
I(() => Q.isActive.value, (e) => {
|
|
653
666
|
e || R.cancelVoicePageCalls();
|
|
654
|
-
}),
|
|
667
|
+
}), I(() => Q.error.value, (e) => {
|
|
655
668
|
e && (Z.value = !1);
|
|
656
669
|
});
|
|
657
|
-
let Nn =
|
|
670
|
+
let Nn = x(() => we.value?.enabled === !0), Pn = x(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Fn = x(() => {
|
|
658
671
|
let e = Q.error.value;
|
|
659
672
|
if (e) return /took too long/i.test(e) ? J("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? J("message.voiceNoAnswer") : J("message.voiceInterrupted");
|
|
660
|
-
}), In =
|
|
673
|
+
}), In = x(() => Q.isSpeaking.value ? "output" : "input"), Ln = () => Q.readLevel(In.value), Rn = () => Q.readSpectrum(In.value), zn = async () => {
|
|
661
674
|
bn.value = !1, await Q.start(), Q.isActive.value && (On(), kn(Ke));
|
|
662
675
|
}, Bn = async () => {
|
|
663
676
|
Z.value = !1, await Q.stop(), !xn && jn(0);
|
|
@@ -666,7 +679,7 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
666
679
|
}, Hn = async () => {
|
|
667
680
|
Q.dismissError(), await Q.stop(), await zn();
|
|
668
681
|
}, Un = (e) => e?.toolCallId ?? "", Wn = M(/* @__PURE__ */ new Set()), Gn = (e) => Wn.value.has(Un(e)), Kn = M(/* @__PURE__ */ new Map()), qn = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (Wn.value = new Set(Wn.value).add(Un(e)), jn()), !0) : !1, Jn = (e, t, n) => {
|
|
669
|
-
qn(t,
|
|
682
|
+
qn(t, u(t, n)) || Tt({
|
|
670
683
|
tool: e,
|
|
671
684
|
toolCallId: Un(t),
|
|
672
685
|
output: n
|
|
@@ -683,14 +696,14 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
683
696
|
"tool-editWordDocument",
|
|
684
697
|
"tool-createSpreadsheet",
|
|
685
698
|
"tool-createWordDocument"
|
|
686
|
-
]), Zn =
|
|
699
|
+
]), Zn = x(() => {
|
|
687
700
|
let e = /* @__PURE__ */ new Map();
|
|
688
701
|
for (let t of V.value) for (let n of t.parts) {
|
|
689
702
|
let { type: t, state: r, output: i } = n;
|
|
690
703
|
Xn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
|
|
691
704
|
}
|
|
692
705
|
return e;
|
|
693
|
-
}), Qn =
|
|
706
|
+
}), Qn = x(() => {
|
|
694
707
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
695
708
|
if (t && n) {
|
|
696
709
|
let r = t.toLowerCase();
|
|
@@ -703,10 +716,10 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
703
716
|
continue;
|
|
704
717
|
}
|
|
705
718
|
let { type: e, state: r, output: i } = n;
|
|
706
|
-
Xn.has(e) && r === "output-available" && i?.filename && t(
|
|
719
|
+
Xn.has(e) && r === "output-available" && i?.filename && t(l(i.filename, i.version), i.fileId);
|
|
707
720
|
}
|
|
708
721
|
return e;
|
|
709
|
-
}), $ =
|
|
722
|
+
}), $ = x(() => Ze.value ? void 0 : (e) => {
|
|
710
723
|
let t = (Qn.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
|
|
711
724
|
U.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), gt();
|
|
712
725
|
}), $n = (e, t) => {
|
|
@@ -730,11 +743,11 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
730
743
|
}, nr = () => {
|
|
731
744
|
bn.value = !bn.value, Q.setMuted(bn.value);
|
|
732
745
|
};
|
|
733
|
-
|
|
746
|
+
le(() => {
|
|
734
747
|
xn = !0, On();
|
|
735
748
|
});
|
|
736
749
|
let { pendingWakeup: rr, isStopping: ir, stop: ar, spokenTurnStarted: or, spokenTurnsWritten: sr, forgetSpokenTurns: cr } = Re({
|
|
737
|
-
agentId: () =>
|
|
750
|
+
agentId: () => P.agentId,
|
|
738
751
|
chatId: () => R.localChatId,
|
|
739
752
|
apiClient: () => W.value,
|
|
740
753
|
messages: () => V.value,
|
|
@@ -742,75 +755,75 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
742
755
|
status: () => H.value.status
|
|
743
756
|
});
|
|
744
757
|
return (t, n) => {
|
|
745
|
-
let r =
|
|
746
|
-
return j(),
|
|
758
|
+
let r = te;
|
|
759
|
+
return j(), w("div", {
|
|
747
760
|
ref_key: "chatViewEl",
|
|
748
761
|
ref: qt,
|
|
749
|
-
class:
|
|
750
|
-
"pk-chatbot-view-chat--dragover":
|
|
762
|
+
class: k(["pk-chatbot-view-chat", {
|
|
763
|
+
"pk-chatbot-view-chat--dragover": F(yn) && K.value?.enabled,
|
|
751
764
|
"pk-chatbot-view-chat--empty": Gt.value,
|
|
752
765
|
"pk-chatbot-view-chat--with-preview": un.value && !Yt.value
|
|
753
766
|
}])
|
|
754
767
|
}, [
|
|
755
|
-
|
|
768
|
+
E(b, {
|
|
756
769
|
name: "pk-chatbot-view-chat-fade",
|
|
757
770
|
mode: "out-in"
|
|
758
771
|
}, {
|
|
759
|
-
default:
|
|
772
|
+
default: L(() => [Gt.value ? (j(), S(v, {
|
|
760
773
|
key: 0,
|
|
761
|
-
greeting:
|
|
762
|
-
logo:
|
|
763
|
-
name:
|
|
774
|
+
greeting: F(Kt),
|
|
775
|
+
logo: F(z)?.logo,
|
|
776
|
+
name: F(R).name
|
|
764
777
|
}, null, 8, [
|
|
765
778
|
"greeting",
|
|
766
779
|
"logo",
|
|
767
780
|
"name"
|
|
768
|
-
])) : (j(),
|
|
781
|
+
])) : (j(), S(e, {
|
|
769
782
|
key: 1,
|
|
770
783
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
771
784
|
interactive: "",
|
|
772
|
-
messages:
|
|
785
|
+
messages: F(V),
|
|
773
786
|
"confirm-verdicts-on-call": Kn.value,
|
|
774
|
-
status:
|
|
775
|
-
error:
|
|
776
|
-
"main-color":
|
|
777
|
-
"text-color":
|
|
778
|
-
"revised-answers":
|
|
779
|
-
actions:
|
|
780
|
-
"message-feedbacks":
|
|
781
|
-
"feedback-message-id":
|
|
782
|
-
"feedback-loading":
|
|
783
|
-
"feedback-submitted":
|
|
784
|
-
"feedback-error":
|
|
785
|
-
"show-extended-steps":
|
|
786
|
-
"hide-reasoning":
|
|
787
|
+
status: F(H).status,
|
|
788
|
+
error: F(H).error,
|
|
789
|
+
"main-color": F(z)?.mainColor,
|
|
790
|
+
"text-color": F(z)?.textColor,
|
|
791
|
+
"revised-answers": F(Ee),
|
|
792
|
+
actions: F(Te),
|
|
793
|
+
"message-feedbacks": F(De),
|
|
794
|
+
"feedback-message-id": F(Oe)?.id,
|
|
795
|
+
"feedback-loading": F(ke),
|
|
796
|
+
"feedback-submitted": F(Me),
|
|
797
|
+
"feedback-error": F(Ne),
|
|
798
|
+
"show-extended-steps": F(z)?.showExtendedSteps,
|
|
799
|
+
"hide-reasoning": F(z)?.showReasoning === !1,
|
|
787
800
|
"awaiting-spoken-answer": Z.value,
|
|
788
801
|
"host-working": Lt.value,
|
|
789
|
-
"host-confirmation":
|
|
790
|
-
"is-dark":
|
|
802
|
+
"host-confirmation": F(at),
|
|
803
|
+
"is-dark": F(nt),
|
|
791
804
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
792
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
805
|
+
onFeedbackSubmit: n[0] ||= (e) => F(St)(e),
|
|
793
806
|
onFeedbackClose: n[1] ||= (e) => Oe.value = void 0,
|
|
794
|
-
onRegenerate:
|
|
795
|
-
onAutoRetry:
|
|
796
|
-
onResetChat:
|
|
807
|
+
onRegenerate: F(vt),
|
|
808
|
+
onAutoRetry: F(vt),
|
|
809
|
+
onResetChat: F(wt),
|
|
797
810
|
onShowInfo: n[2] ||= (e) => xe("show-info", e),
|
|
798
811
|
onRevise: n[3] ||= (e) => xe("revise", e),
|
|
799
|
-
onUpvote:
|
|
800
|
-
onDownvote:
|
|
801
|
-
onFeedback:
|
|
802
|
-
onApprovalRespond:
|
|
812
|
+
onUpvote: F(yt),
|
|
813
|
+
onDownvote: F(bt),
|
|
814
|
+
onFeedback: F(xt),
|
|
815
|
+
onApprovalRespond: F(Et),
|
|
803
816
|
onConfirmRespond: Yn,
|
|
804
|
-
onHostConfirmRespond:
|
|
817
|
+
onHostConfirmRespond: F(Mt)
|
|
805
818
|
}, {
|
|
806
|
-
"tool-showContactForm":
|
|
819
|
+
"tool-showContactForm": L(({ part: e }) => [E(F(y), {
|
|
807
820
|
part: e,
|
|
808
|
-
readonly: !
|
|
809
|
-
submitted:
|
|
810
|
-
loading:
|
|
811
|
-
error:
|
|
812
|
-
"privacy-policy-notice":
|
|
813
|
-
onSubmit:
|
|
821
|
+
readonly: !F(Qe),
|
|
822
|
+
submitted: F(Fe),
|
|
823
|
+
loading: F(Ie),
|
|
824
|
+
error: F(Le),
|
|
825
|
+
"privacy-policy-notice": F(z)?.privacyPolicyNotice,
|
|
826
|
+
onSubmit: F(Ct)
|
|
814
827
|
}, null, 8, [
|
|
815
828
|
"part",
|
|
816
829
|
"readonly",
|
|
@@ -820,17 +833,17 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
820
833
|
"privacy-policy-notice",
|
|
821
834
|
"onSubmit"
|
|
822
835
|
])]),
|
|
823
|
-
"tool-showSuggestedReply":
|
|
836
|
+
"tool-showSuggestedReply": L(({ part: e }) => [E(F(ie), {
|
|
824
837
|
part: e,
|
|
825
838
|
onSelect: (t) => $n(e, t)
|
|
826
839
|
}, null, 8, ["part", "onSelect"])]),
|
|
827
|
-
"tool-showSources":
|
|
840
|
+
"tool-showSources": L(({ part: e }) => [E(F(O), {
|
|
828
841
|
part: e,
|
|
829
842
|
"on-expand-context": _n,
|
|
830
843
|
"on-download": vn
|
|
831
844
|
}, null, 8, ["part"])]),
|
|
832
|
-
"tool-showForm":
|
|
833
|
-
default:
|
|
845
|
+
"tool-showForm": L(({ part: e }) => [E(b, { mode: "out-in" }, {
|
|
846
|
+
default: L(() => [E(F(h), {
|
|
834
847
|
part: e,
|
|
835
848
|
answered: Gn(e),
|
|
836
849
|
onSelect: (t) => Jn("showForm", e, t)
|
|
@@ -841,8 +854,8 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
841
854
|
])]),
|
|
842
855
|
_: 2
|
|
843
856
|
}, 1024)]),
|
|
844
|
-
"tool-showMultipleChoice":
|
|
845
|
-
default:
|
|
857
|
+
"tool-showMultipleChoice": L(({ part: e }) => [E(b, { mode: "out-in" }, {
|
|
858
|
+
default: L(() => [E(F(h), {
|
|
846
859
|
part: e,
|
|
847
860
|
"allow-custom-answer": "",
|
|
848
861
|
answered: Gn(e),
|
|
@@ -854,11 +867,11 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
854
867
|
])]),
|
|
855
868
|
_: 2
|
|
856
869
|
}, 1024)]),
|
|
857
|
-
"tool-requestOAuthConnection":
|
|
870
|
+
"tool-requestOAuthConnection": L(({ part: e }) => [E(F(se), {
|
|
858
871
|
part: e,
|
|
859
|
-
"backend-url":
|
|
860
|
-
"resolve-connection": (e) =>
|
|
861
|
-
"check-connection": (e) =>
|
|
872
|
+
"backend-url": F(Qe),
|
|
873
|
+
"resolve-connection": (e) => F(W).getOAuthAuthorizeUrl(P.agentId, e),
|
|
874
|
+
"check-connection": (e) => F(W).getOAuthConnectionStatus(P.agentId, e),
|
|
862
875
|
onConnected: (t) => tr(e, t)
|
|
863
876
|
}, null, 8, [
|
|
864
877
|
"part",
|
|
@@ -867,10 +880,10 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
867
880
|
"check-connection",
|
|
868
881
|
"onConnected"
|
|
869
882
|
])]),
|
|
870
|
-
"tool-requestGeolocation":
|
|
883
|
+
"tool-requestGeolocation": L(({ part: e }) => [E(F(ae), {
|
|
871
884
|
part: e,
|
|
872
|
-
"call-live":
|
|
873
|
-
"reverse-geocode": (e, t) =>
|
|
885
|
+
"call-live": F(Q).isActive.value,
|
|
886
|
+
"reverse-geocode": (e, t) => F(W).reverseGeocode(e, t),
|
|
874
887
|
onResult: (t) => er(e, t)
|
|
875
888
|
}, null, 8, [
|
|
876
889
|
"part",
|
|
@@ -878,23 +891,23 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
878
891
|
"reverse-geocode",
|
|
879
892
|
"onResult"
|
|
880
893
|
])]),
|
|
881
|
-
"tool-showLocation":
|
|
894
|
+
"tool-showLocation": L(({ part: e }) => [E(F(ce), {
|
|
882
895
|
part: e,
|
|
883
|
-
"is-dark":
|
|
884
|
-
"main-color":
|
|
885
|
-
"forward-geocode": (e, t) =>
|
|
896
|
+
"is-dark": F(nt),
|
|
897
|
+
"main-color": F(z)?.mainColor,
|
|
898
|
+
"forward-geocode": (e, t) => F(W).forwardGeocode(e, t)
|
|
886
899
|
}, null, 8, [
|
|
887
900
|
"part",
|
|
888
901
|
"is-dark",
|
|
889
902
|
"main-color",
|
|
890
903
|
"forward-geocode"
|
|
891
904
|
])]),
|
|
892
|
-
"tool-showDiagram":
|
|
905
|
+
"tool-showDiagram": L(({ part: e }) => [E(F(ue), {
|
|
893
906
|
part: e,
|
|
894
|
-
"is-dark":
|
|
907
|
+
"is-dark": F(nt)
|
|
895
908
|
}, null, 8, ["part", "is-dark"])]),
|
|
896
|
-
"tool-editSpreadsheet":
|
|
897
|
-
key:
|
|
909
|
+
"tool-editSpreadsheet": L(({ part: e }) => [(j(), S(F(A), {
|
|
910
|
+
key: F(f)(e),
|
|
898
911
|
part: e,
|
|
899
912
|
"file-url": q,
|
|
900
913
|
preview: cn,
|
|
@@ -905,8 +918,8 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
905
918
|
"latest-versions",
|
|
906
919
|
"restore"
|
|
907
920
|
]))]),
|
|
908
|
-
"tool-editWordDocument":
|
|
909
|
-
key:
|
|
921
|
+
"tool-editWordDocument": L(({ part: e }) => [(j(), S(F(A), {
|
|
922
|
+
key: F(f)(e),
|
|
910
923
|
part: e,
|
|
911
924
|
"file-url": q,
|
|
912
925
|
preview: cn,
|
|
@@ -917,8 +930,8 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
917
930
|
"latest-versions",
|
|
918
931
|
"restore"
|
|
919
932
|
]))]),
|
|
920
|
-
"tool-createSpreadsheet":
|
|
921
|
-
key:
|
|
933
|
+
"tool-createSpreadsheet": L(({ part: e }) => [(j(), S(F(A), {
|
|
934
|
+
key: F(f)(e),
|
|
922
935
|
part: e,
|
|
923
936
|
"file-url": q,
|
|
924
937
|
preview: cn,
|
|
@@ -929,8 +942,8 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
929
942
|
"latest-versions",
|
|
930
943
|
"restore"
|
|
931
944
|
]))]),
|
|
932
|
-
"tool-createWordDocument":
|
|
933
|
-
key:
|
|
945
|
+
"tool-createWordDocument": L(({ part: e }) => [(j(), S(F(A), {
|
|
946
|
+
key: F(f)(e),
|
|
934
947
|
part: e,
|
|
935
948
|
"file-url": q,
|
|
936
949
|
preview: cn,
|
|
@@ -941,8 +954,8 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
941
954
|
"latest-versions",
|
|
942
955
|
"restore"
|
|
943
956
|
]))]),
|
|
944
|
-
"tool-shareDocument":
|
|
945
|
-
key:
|
|
957
|
+
"tool-shareDocument": L(({ part: e }) => [(j(), S(F(de), {
|
|
958
|
+
key: F(f)(e),
|
|
946
959
|
part: e,
|
|
947
960
|
"on-download": vn
|
|
948
961
|
}, null, 8, ["part"]))]),
|
|
@@ -950,74 +963,81 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
950
963
|
}, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.hide-reasoning.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
951
964
|
_: 1
|
|
952
965
|
}),
|
|
953
|
-
|
|
966
|
+
F(lt).length ? (j(), S(_, {
|
|
954
967
|
key: 0,
|
|
955
|
-
messages:
|
|
956
|
-
onEdit:
|
|
957
|
-
onRemove:
|
|
968
|
+
messages: F(lt),
|
|
969
|
+
onEdit: F(Nt),
|
|
970
|
+
onRemove: F(Pt)
|
|
958
971
|
}, null, 8, [
|
|
959
972
|
"messages",
|
|
960
973
|
"onEdit",
|
|
961
974
|
"onRemove"
|
|
962
|
-
])) :
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
default:
|
|
975
|
+
])) : C("", !0),
|
|
976
|
+
T("div", Be, [
|
|
977
|
+
E(b, { name: "pk-chatbot-view-chat-fade" }, {
|
|
978
|
+
default: L(() => [Gt.value ? (j(), S(Ce, {
|
|
966
979
|
key: 0,
|
|
967
980
|
class: "pk-chatbot-view-chat__aurora",
|
|
968
|
-
"source-selector": ".pk-chatbot-input__form"
|
|
969
|
-
|
|
981
|
+
"source-selector": ".pk-chatbot-input__form",
|
|
982
|
+
"main-color": F(z)?.mainColor,
|
|
983
|
+
tones: F(z)?.glowTones,
|
|
984
|
+
"second-color": F(z)?.glowSecondColor
|
|
985
|
+
}, null, 8, [
|
|
986
|
+
"main-color",
|
|
987
|
+
"tones",
|
|
988
|
+
"second-color"
|
|
989
|
+
])) : C("", !0)]),
|
|
970
990
|
_: 1
|
|
971
991
|
}),
|
|
972
|
-
|
|
992
|
+
F(rr) && !F(Ze) ? (j(), S(ee, {
|
|
973
993
|
key: 0,
|
|
974
|
-
pending:
|
|
975
|
-
stopping:
|
|
976
|
-
onStop:
|
|
994
|
+
pending: F(rr),
|
|
995
|
+
stopping: F(ir),
|
|
996
|
+
onStop: F(ar)
|
|
977
997
|
}, null, 8, [
|
|
978
998
|
"pending",
|
|
979
999
|
"stopping",
|
|
980
1000
|
"onStop"
|
|
981
|
-
])) :
|
|
982
|
-
|
|
1001
|
+
])) : C("", !0),
|
|
1002
|
+
F(Ze) ? (j(), w("div", Ve, N(F(J)("message.chatErrorConversationBlocked")), 1)) : Pn.value === "idle" ? (j(), S(g, {
|
|
983
1003
|
key: 3,
|
|
984
1004
|
ref_key: "inputEl",
|
|
985
1005
|
ref: mt,
|
|
986
|
-
modelValue:
|
|
987
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
988
|
-
"pending-attachments":
|
|
989
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
990
|
-
placeholder:
|
|
991
|
-
"dismissable-notice":
|
|
1006
|
+
modelValue: F(U),
|
|
1007
|
+
"onUpdate:modelValue": n[4] ||= (e) => oe(U) ? U.value = e : null,
|
|
1008
|
+
"pending-attachments": F($e),
|
|
1009
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => oe($e) ? $e.value = e : null,
|
|
1010
|
+
placeholder: F(Xe),
|
|
1011
|
+
"dismissable-notice": F(Ut) && F(H).messages.length <= 1 ? F(Ut) : void 0,
|
|
992
1012
|
"page-notice": Bt.value,
|
|
993
1013
|
status: Rt.value,
|
|
994
|
-
"max-message-length":
|
|
1014
|
+
"max-message-length": F(z)?.maxMessageLength,
|
|
995
1015
|
"file-upload": K.value,
|
|
996
|
-
"attachment-limit-reached":
|
|
1016
|
+
"attachment-limit-reached": F(et),
|
|
997
1017
|
"attachment-notice": Vt.value,
|
|
998
1018
|
"voice-enabled": Nn.value,
|
|
999
|
-
"queue-enabled":
|
|
1019
|
+
"queue-enabled": F(ct),
|
|
1000
1020
|
"answer-notices": Ht.value,
|
|
1001
|
-
"pointer-available":
|
|
1002
|
-
pointing:
|
|
1021
|
+
"pointer-available": F(ft),
|
|
1022
|
+
pointing: F(pt),
|
|
1003
1023
|
pointer: ht.value,
|
|
1004
|
-
onPoint: n[6] ||= (e) =>
|
|
1024
|
+
onPoint: n[6] ||= (e) => F(R).pagePointerStart?.(),
|
|
1005
1025
|
onRemovePointer: n[7] ||= (e) => G.value = void 0,
|
|
1006
|
-
onStopGeneration:
|
|
1007
|
-
onSubmit:
|
|
1008
|
-
onFileSelect:
|
|
1009
|
-
onDismissAttachmentNotice:
|
|
1010
|
-
onDismissPageNotice:
|
|
1011
|
-
onOpenAnswerNotice:
|
|
1012
|
-
onDismissAnswerNotice:
|
|
1026
|
+
onStopGeneration: F(_t),
|
|
1027
|
+
onSubmit: F(gt),
|
|
1028
|
+
onFileSelect: F(Dt),
|
|
1029
|
+
onDismissAttachmentNotice: F(Ot),
|
|
1030
|
+
onDismissPageNotice: F(jt),
|
|
1031
|
+
onOpenAnswerNotice: F(Ft),
|
|
1032
|
+
onDismissAnswerNotice: F(It),
|
|
1013
1033
|
onVoiceStart: zn
|
|
1014
|
-
},
|
|
1034
|
+
}, re({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
1015
1035
|
name: "prepend",
|
|
1016
|
-
fn:
|
|
1036
|
+
fn: L(() => [T("span", He, [E(m, {
|
|
1017
1037
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
1018
|
-
"img-src":
|
|
1019
|
-
name:
|
|
1020
|
-
}, null, 8, ["img-src", "name"]),
|
|
1038
|
+
"img-src": F(z)?.logo,
|
|
1039
|
+
name: F(R).name
|
|
1040
|
+
}, null, 8, ["img-src", "name"]), F(R).name ? (j(), w("strong", Ue, N(F(R).name), 1)) : C("", !0)])]),
|
|
1021
1041
|
key: "0"
|
|
1022
1042
|
} : void 0]), 1032, [
|
|
1023
1043
|
"modelValue",
|
|
@@ -1043,16 +1063,16 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1043
1063
|
"onDismissPageNotice",
|
|
1044
1064
|
"onOpenAnswerNotice",
|
|
1045
1065
|
"onDismissAnswerNotice"
|
|
1046
|
-
])) : (j(),
|
|
1066
|
+
])) : (j(), S(Ae, {
|
|
1047
1067
|
key: 2,
|
|
1048
1068
|
state: Pn.value,
|
|
1049
1069
|
sample: Ln,
|
|
1050
1070
|
spectrum: Rn,
|
|
1051
|
-
"remaining-seconds":
|
|
1071
|
+
"remaining-seconds": F(Q).remainingSeconds.value,
|
|
1052
1072
|
muted: bn.value,
|
|
1053
1073
|
error: Fn.value,
|
|
1054
|
-
"raw-error":
|
|
1055
|
-
live:
|
|
1074
|
+
"raw-error": F(Q).error.value,
|
|
1075
|
+
live: F(Q).isActive.value,
|
|
1056
1076
|
class: "pk-chatbot-view-chat__voice",
|
|
1057
1077
|
onToggleMute: nr,
|
|
1058
1078
|
onHangUp: Bn,
|
|
@@ -1067,18 +1087,18 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1067
1087
|
"live"
|
|
1068
1088
|
]))
|
|
1069
1089
|
]),
|
|
1070
|
-
|
|
1071
|
-
default:
|
|
1090
|
+
E(b, null, {
|
|
1091
|
+
default: L(() => [F(yn) && K.value?.enabled ? (j(), w("div", We, [E(r, {
|
|
1072
1092
|
name: "ri:upload-cloud-2-line",
|
|
1073
1093
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
1074
|
-
}),
|
|
1094
|
+
}), T("span", null, N(F(J)("action.dropFile")), 1)])) : C("", !0)]),
|
|
1075
1095
|
_: 1
|
|
1076
1096
|
}),
|
|
1077
|
-
un.value ? (j(),
|
|
1097
|
+
un.value ? (j(), S(ne, {
|
|
1078
1098
|
key: 1,
|
|
1079
1099
|
to: Xt.value,
|
|
1080
1100
|
disabled: !Yt.value
|
|
1081
|
-
}, [
|
|
1101
|
+
}, [T("aside", { class: k(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": Yt.value }]) }, [F(Y) ? (j(), S(F(pe), {
|
|
1082
1102
|
key: 0,
|
|
1083
1103
|
mode: X.value.mode,
|
|
1084
1104
|
"onUpdate:mode": n[8] ||= (e) => X.value.mode = e,
|
|
@@ -1088,14 +1108,14 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1088
1108
|
"onUpdate:zoom": n[10] ||= (e) => X.value.zoom = e,
|
|
1089
1109
|
fit: X.value.fit,
|
|
1090
1110
|
"onUpdate:fit": n[11] ||= (e) => X.value.fit = e,
|
|
1091
|
-
kind:
|
|
1092
|
-
filename:
|
|
1093
|
-
version:
|
|
1111
|
+
kind: F(Y).kind,
|
|
1112
|
+
filename: F(Y).filename,
|
|
1113
|
+
version: F(Y).version,
|
|
1094
1114
|
versions: pn.value,
|
|
1095
|
-
"download-url": q(
|
|
1096
|
-
preview:
|
|
1097
|
-
loading:
|
|
1098
|
-
error:
|
|
1115
|
+
"download-url": q(F(Y).storedFileName),
|
|
1116
|
+
preview: F(tn),
|
|
1117
|
+
loading: F(nn),
|
|
1118
|
+
error: F(rn),
|
|
1099
1119
|
restorable: hn.value,
|
|
1100
1120
|
resize: "expand",
|
|
1101
1121
|
onVersion: mn,
|
|
@@ -1116,8 +1136,8 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1116
1136
|
"loading",
|
|
1117
1137
|
"error",
|
|
1118
1138
|
"restorable"
|
|
1119
|
-
])) :
|
|
1120
|
-
|
|
1139
|
+
])) : C("", !0)], 2)], 8, ["to", "disabled"])) : C("", !0),
|
|
1140
|
+
F(Y) && !un.value ? (j(), S(F(me), {
|
|
1121
1141
|
key: 2,
|
|
1122
1142
|
mode: X.value.mode,
|
|
1123
1143
|
"onUpdate:mode": n[13] ||= (e) => X.value.mode = e,
|
|
@@ -1127,12 +1147,12 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1127
1147
|
"onUpdate:zoom": n[15] ||= (e) => X.value.zoom = e,
|
|
1128
1148
|
fit: X.value.fit,
|
|
1129
1149
|
"onUpdate:fit": n[16] ||= (e) => X.value.fit = e,
|
|
1130
|
-
target:
|
|
1150
|
+
target: F(Y),
|
|
1131
1151
|
versions: pn.value,
|
|
1132
|
-
"download-url": q(
|
|
1133
|
-
preview:
|
|
1134
|
-
loading:
|
|
1135
|
-
error:
|
|
1152
|
+
"download-url": q(F(Y).storedFileName),
|
|
1153
|
+
preview: F(tn),
|
|
1154
|
+
loading: F(nn),
|
|
1155
|
+
error: F(rn),
|
|
1136
1156
|
restorable: hn.value,
|
|
1137
1157
|
resize: $t.value ? "shrink" : void 0,
|
|
1138
1158
|
fullscreen: en.value,
|
|
@@ -1154,11 +1174,11 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1154
1174
|
"restorable",
|
|
1155
1175
|
"resize",
|
|
1156
1176
|
"fullscreen"
|
|
1157
|
-
])) :
|
|
1177
|
+
])) : C("", !0)
|
|
1158
1178
|
], 2);
|
|
1159
1179
|
};
|
|
1160
1180
|
}
|
|
1161
1181
|
});
|
|
1162
|
-
export {
|
|
1182
|
+
export { Te as a, Ae as i, ze as n, Ce as o, Ne as r, Xe as t };
|
|
1163
1183
|
|
|
1164
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
1184
|
+
//# sourceMappingURL=PkChatbotViewChat-BfVLCU_j.js.map
|