@8wave/ai-elements 0.121.0-beta.53 → 0.121.0-beta.54
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/{PkStreamingMarkdown-CR-xBRG2.js → PkStreamingMarkdown-Bev81_Lp.js} +7 -4
- package/dist/_chunks/PkStreamingMarkdown-Bev81_Lp.js.map +1 -0
- package/dist/_chunks/{PkToolEditedFile-DAMPjKIn.js → PkToolChatFile-a37ez2k5.js} +17 -17
- package/dist/_chunks/PkToolChatFile-a37ez2k5.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-B1J7a3o0.js → PkToolShowArtifact-CecXXZSh.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-B1J7a3o0.js.map → PkToolShowArtifact-CecXXZSh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DcNMM-j0.js → PkToolShowContactForm-3BGkXgD9.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DcNMM-j0.js.map → PkToolShowContactForm-3BGkXgD9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CRa9HLZo.js → PkToolShowForm-BXOmY4ce.js} +2 -2
- package/dist/_chunks/{PkToolShowForm-CRa9HLZo.js.map → PkToolShowForm-BXOmY4ce.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-LQ0DMKM1.js → PkToolShowSources-Cv8UguNA.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-LQ0DMKM1.js.map → PkToolShowSources-Cv8UguNA.js.map} +1 -1
- package/dist/ai-elements.es.js +33 -11
- 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/_chunks/{PkChatbot-DKBnpYB0.js → PkChatbot-BFAcqm6m.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-DKBnpYB0.js.map → PkChatbot-BFAcqm6m.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CFCbJSjm.js → PkChatbotEmptyState-fADhr37n.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CFCbJSjm.js.map → PkChatbotEmptyState-fADhr37n.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-fte_uZHV.js → PkChatbotInput-CUOcwWDz.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-fte_uZHV.js.map → PkChatbotInput-CUOcwWDz.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BVzOnfjU.js → PkChatbotMessages-CcTQozaF.js} +14 -14
- package/dist-vue/_chunks/{PkChatbotMessages-BVzOnfjU.js.map → PkChatbotMessages-CcTQozaF.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-CgwZs9AM.js → PkChatbotStepPayload-CQD8lb4l.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CgwZs9AM.js.map → PkChatbotStepPayload-CQD8lb4l.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BOylJhFM.js → PkChatbotStepToolDetail-Bj1ZBPMz.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BOylJhFM.js.map → PkChatbotStepToolDetail-Bj1ZBPMz.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-Cmi5TBZM.js → PkChatbotSteps-DhIEYst5.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-Cmi5TBZM.js.map → PkChatbotSteps-DhIEYst5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-DuHSW8TF.js → PkChatbotViewChat-CW4SxAtr.js} +256 -246
- package/dist-vue/_chunks/PkChatbotViewChat-CW4SxAtr.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-Bf9oJIdi.js → PkChatbotViewConversations-BXxXUgso.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-Bf9oJIdi.js.map → PkChatbotViewConversations-BXxXUgso.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-B6R1ixAl.js → PkChatbotViewFiles-i_OUsdlU.js} +3 -3
- package/dist-vue/_chunks/PkChatbotViewFiles-i_OUsdlU.js.map +1 -0
- package/dist-vue/_chunks/{PkStreamingMarkdown-BrBeaJes.js → PkStreamingMarkdown-qZLlI83D.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-BrBeaJes.js.map → PkStreamingMarkdown-qZLlI83D.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditedFile-BKyMjgs0.js → PkToolChatFile-DPkLqqDt.js} +17 -17
- package/dist-vue/_chunks/PkToolChatFile-DPkLqqDt.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-BvvVHrP-.js → PkToolShowArtifact-BDZjRnfs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-BvvVHrP-.js.map → PkToolShowArtifact-BDZjRnfs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-Dz_IiYr1.js → PkToolShowContactForm-CcIF7fNS.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-Dz_IiYr1.js.map → PkToolShowContactForm-CcIF7fNS.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-DCSfCzrN.js → PkToolShowDiagram-CD70YQgq.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-DCSfCzrN.js.map → PkToolShowDiagram-CD70YQgq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-qMBAEKxf.js → PkToolShowForm-edPn56Ka.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-qMBAEKxf.js.map → PkToolShowForm-edPn56Ka.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-DWwUnIDq.js → PkToolShowImageGallery-82BzTTbf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-DWwUnIDq.js.map → PkToolShowImageGallery-82BzTTbf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-DreWhhfK.js → PkToolShowProductList-CKPDiMkx.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-DreWhhfK.js.map → PkToolShowProductList-CKPDiMkx.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DR-uaXeX.js → PkToolShowSources-CHH2vKVG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-DR-uaXeX.js.map → PkToolShowSources-CHH2vKVG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-Xogv8wVt.js → PkToolShowVideo-C5TKoW1f.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-Xogv8wVt.js.map → PkToolShowVideo-C5TKoW1f.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-BHTyFyDI.js → PkToolShowWebPages-CuwLXH1I.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-BHTyFyDI.js.map → PkToolShowWebPages-CuwLXH1I.js.map} +1 -1
- package/dist-vue/_chunks/createChatbotApiClient-B3U31J_K.js.map +1 -1
- package/dist-vue/_chunks/{utils-Df_SeBdX.js → utils-C8jnMPj0.js} +7 -4
- package/dist-vue/_chunks/utils-C8jnMPj0.js.map +1 -0
- package/dist-vue/composables.js +15 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +515 -474
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +70 -10
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +13 -2
- package/dist-vue/packages/components/src/chat/{PkToolEditedFile.d.ts → PkToolChatFile.d.ts} +5 -4
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +6 -0
- package/dist-vue/packages/composable/src/useFileRow.d.ts +5 -3
- package/package.json +1 -1
- package/dist/_chunks/PkStreamingMarkdown-CR-xBRG2.js.map +0 -1
- package/dist/_chunks/PkToolEditedFile-DAMPjKIn.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-DuHSW8TF.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewFiles-B6R1ixAl.js.map +0 -1
- package/dist-vue/_chunks/PkToolEditedFile-BKyMjgs0.js.map +0 -1
- package/dist-vue/_chunks/utils-Df_SeBdX.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-CcTQozaF.js";
|
|
2
2
|
import { o as t } from "./Media-DylqhvaF.js";
|
|
3
3
|
import { a as n, n as r, t as i } from "./useChatbotStore-D2L4m3iJ.js";
|
|
4
4
|
import { n as a } from "./src-B-ZKEhTU.js";
|
|
5
|
-
import { c as o, h as s, n as c } from "./utils-
|
|
5
|
+
import { c as o, h as s, n as c } from "./utils-C8jnMPj0.js";
|
|
6
6
|
import { t as l } from "./useLocalizedString-Dmn92nix.js";
|
|
7
7
|
import { t as u } from "./PkAvatar-uVRs_DD9.js";
|
|
8
|
-
import { n as d, t as f } from "./PkChatbotInput-
|
|
8
|
+
import { n as d, t as f } from "./PkChatbotInput-CUOcwWDz.js";
|
|
9
9
|
import { t as p } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { VvIcon as
|
|
13
|
-
import { Fragment as
|
|
10
|
+
import { t as ee } from "./PkChatbotEmptyState-fADhr37n.js";
|
|
11
|
+
import { t as m } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
12
|
+
import { VvIcon as h } from "@volverjs/ui-vue/components";
|
|
13
|
+
import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as te, createTextVNode as ne, createVNode as C, defineAsyncComponent as w, defineComponent as T, isRef as re, nextTick as ie, normalizeClass as E, onBeforeUnmount as D, onMounted as ae, onScopeDispose as oe, onUnmounted as se, openBlock as O, provide as ce, ref as k, renderList as le, shallowRef as A, toDisplayString as j, toValue as ue, unref as M, useTemplateRef as de, watch as N, withCtx as P } from "vue";
|
|
14
14
|
import { useI18n as fe } from "vue-i18n";
|
|
15
15
|
import { useDropZone as pe } from "@vueuse/core";
|
|
16
16
|
import { storeToRefs as me } from "pinia";
|
|
17
17
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
18
18
|
function he(e, t) {
|
|
19
19
|
let { locale: n, t: r, te: i } = fe({ useScope: "global" });
|
|
20
|
-
return
|
|
20
|
+
return v(() => F(ue(e)?.greeting?.[0]?.[n.value] ?? "", ue(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
21
21
|
}
|
|
22
22
|
function F(e, t) {
|
|
23
23
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
@@ -29,15 +29,15 @@ var ge = {
|
|
|
29
29
|
}, I = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "pk-aurora__fallback"
|
|
32
|
-
}, L = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", _e = "\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}", ve = /* @__PURE__ */
|
|
32
|
+
}, L = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", _e = "\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}", ve = /* @__PURE__ */ T({
|
|
33
33
|
__name: "PkAuroraCanvas",
|
|
34
34
|
props: { sourceSelector: {} },
|
|
35
35
|
setup(e) {
|
|
36
|
-
let t = e, n = de("canvasEl"), r =
|
|
36
|
+
let t = e, n = de("canvasEl"), r = k(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
|
|
37
37
|
if (!i) return null;
|
|
38
38
|
let n = i.createShader(e);
|
|
39
39
|
return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
|
|
40
|
-
},
|
|
40
|
+
}, ee = () => {
|
|
41
41
|
if (!n.value) return null;
|
|
42
42
|
let e = getComputedStyle(n.value).color.match(/rgba?\(([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/);
|
|
43
43
|
return e ? [
|
|
@@ -45,7 +45,7 @@ var ge = {
|
|
|
45
45
|
Number(e[2]) / 255,
|
|
46
46
|
Number(e[3]) / 255
|
|
47
47
|
] : null;
|
|
48
|
-
},
|
|
48
|
+
}, m = () => {
|
|
49
49
|
if (!i || !n.value) return;
|
|
50
50
|
let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: r, clientHeight: a } = n.value;
|
|
51
51
|
n.value.width = Math.max(1, Math.round(r * e)), n.value.height = Math.max(1, Math.round(a * e)), i.viewport(0, 0, n.value.width, n.value.height);
|
|
@@ -56,28 +56,28 @@ var ge = {
|
|
|
56
56
|
let p = Number.parseFloat(getComputedStyle(n.value).getPropertyValue("--aurora-spread"));
|
|
57
57
|
i.uniform1f(d, Number.isNaN(p) ? 1 : p);
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
},
|
|
59
|
+
g(h() ? 10 : void 0);
|
|
60
|
+
}, h = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, g = (e) => {
|
|
61
61
|
i && n.value && (i.uniform1f(s, e ?? (performance.now() - f) / 1e3), i.uniform2f(c, n.value.width, n.value.height), i.drawArrays(i.TRIANGLE_STRIP, 0, 4));
|
|
62
|
-
},
|
|
63
|
-
|
|
62
|
+
}, _ = () => {
|
|
63
|
+
g(), a = requestAnimationFrame(_);
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return ae(() => {
|
|
66
66
|
let e = n.value;
|
|
67
67
|
i = e?.getContext("webgl", { alpha: !0 }) ?? null;
|
|
68
|
-
let t =
|
|
68
|
+
let t = ee();
|
|
69
69
|
if (!e || !i || !t) {
|
|
70
70
|
r.value = !0;
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
let a = p(i.VERTEX_SHADER, L), f = p(i.FRAGMENT_SHADER, _e),
|
|
74
|
-
if (!a || !f || !
|
|
73
|
+
let a = p(i.VERTEX_SHADER, L), f = p(i.FRAGMENT_SHADER, _e), v = i.createProgram();
|
|
74
|
+
if (!a || !f || !v || (i.attachShader(v, a), i.attachShader(v, f), i.linkProgram(v), !i.getProgramParameter(v, i.LINK_STATUS))) {
|
|
75
75
|
r.value = !0;
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
i.useProgram(
|
|
79
|
-
let
|
|
80
|
-
i.bindBuffer(i.ARRAY_BUFFER,
|
|
78
|
+
i.useProgram(v);
|
|
79
|
+
let y = i.createBuffer();
|
|
80
|
+
i.bindBuffer(i.ARRAY_BUFFER, y), i.bufferData(i.ARRAY_BUFFER, new Float32Array([
|
|
81
81
|
-1,
|
|
82
82
|
-1,
|
|
83
83
|
1,
|
|
@@ -87,23 +87,23 @@ var ge = {
|
|
|
87
87
|
1,
|
|
88
88
|
1
|
|
89
89
|
]), i.STATIC_DRAW);
|
|
90
|
-
let
|
|
91
|
-
i.enableVertexAttribArray(
|
|
92
|
-
}),
|
|
90
|
+
let b = i.getAttribLocation(v, "a_position");
|
|
91
|
+
i.enableVertexAttribArray(b), i.vertexAttribPointer(b, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(v, "u_time"), c = i.getUniformLocation(v, "u_resolution"), l = i.getUniformLocation(v, "u_center"), u = i.getUniformLocation(v, "u_half"), d = i.getUniformLocation(v, "u_spread"), i.uniform3f(i.getUniformLocation(v, "u_color"), ...t), o = new ResizeObserver(m), o.observe(e), m(), ie(m), h() ? g(10) : _();
|
|
92
|
+
}), D(() => {
|
|
93
93
|
cancelAnimationFrame(a), o?.disconnect();
|
|
94
|
-
}),
|
|
94
|
+
}), se(() => {
|
|
95
95
|
let e = i;
|
|
96
96
|
i = null, setTimeout(() => {
|
|
97
97
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
98
98
|
}, 150);
|
|
99
|
-
}), (e, t) => (
|
|
99
|
+
}), (e, t) => (O(), x("div", ge, [r.value ? (O(), x("div", I)) : (O(), x("canvas", {
|
|
100
100
|
key: 0,
|
|
101
101
|
ref_key: "canvasEl",
|
|
102
102
|
ref: n,
|
|
103
103
|
class: "pk-aurora__canvas"
|
|
104
104
|
}, null, 512))]));
|
|
105
105
|
}
|
|
106
|
-
}), R = .18, ye = .35, be = /* @__PURE__ */
|
|
106
|
+
}), R = .18, ye = .35, be = /* @__PURE__ */ T({
|
|
107
107
|
__name: "PkVoiceOrb",
|
|
108
108
|
props: {
|
|
109
109
|
sample: {},
|
|
@@ -142,15 +142,15 @@ var ge = {
|
|
|
142
142
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
143
143
|
};
|
|
144
144
|
return N(() => t.state, async (e) => {
|
|
145
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await
|
|
146
|
-
}, { immediate: !0 }),
|
|
147
|
-
class:
|
|
145
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await ie(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
146
|
+
}, { immediate: !0 }), D(l), (t, r) => (O(), x("div", {
|
|
147
|
+
class: E(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
148
148
|
"aria-hidden": "true"
|
|
149
|
-
}, [
|
|
149
|
+
}, [S("div", {
|
|
150
150
|
ref_key: "barsEl",
|
|
151
151
|
ref: n,
|
|
152
152
|
class: "pk-voice-orb__bars"
|
|
153
|
-
}, [(
|
|
153
|
+
}, [(O(!0), x(g, null, le(e.bars, (e) => (O(), x("span", {
|
|
154
154
|
key: e,
|
|
155
155
|
class: "pk-voice-orb__bar"
|
|
156
156
|
}))), 128))], 512)], 2));
|
|
@@ -166,7 +166,7 @@ var ge = {
|
|
|
166
166
|
key: 0,
|
|
167
167
|
class: "pk-voice-session__live-dot",
|
|
168
168
|
"aria-hidden": "true"
|
|
169
|
-
}, Se = ["title"], Ce = ["title"], we = { class: "pk-voice-session__actions" }, Te = /* @__PURE__ */
|
|
169
|
+
}, Se = ["title"], Ce = ["title"], we = { class: "pk-voice-session__actions" }, Te = /* @__PURE__ */ T({
|
|
170
170
|
__name: "PkVoiceSession",
|
|
171
171
|
props: {
|
|
172
172
|
state: {},
|
|
@@ -185,17 +185,17 @@ var ge = {
|
|
|
185
185
|
"dismiss"
|
|
186
186
|
],
|
|
187
187
|
setup(e, { emit: t }) {
|
|
188
|
-
let n = e, r = t, { t: i } = fe({ useScope: "global" }), a =
|
|
188
|
+
let n = e, r = t, { t: i } = fe({ useScope: "global" }), a = v(() => 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 = v(() => {
|
|
189
189
|
if (n.remainingSeconds === void 0) return;
|
|
190
190
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
191
191
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
192
|
-
}), s =
|
|
192
|
+
}), s = v(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = v(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = v(() => {
|
|
193
193
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
194
194
|
});
|
|
195
195
|
return (t, n) => {
|
|
196
|
-
let u =
|
|
197
|
-
return
|
|
198
|
-
e.error ? (
|
|
196
|
+
let u = h;
|
|
197
|
+
return O(), x("div", { class: E(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
198
|
+
e.error ? (O(), x("span", xe, [C(u, { name: "ri:error-warning-line" })])) : (O(), y(be, {
|
|
199
199
|
key: 1,
|
|
200
200
|
state: e.state,
|
|
201
201
|
sample: e.sample,
|
|
@@ -205,34 +205,34 @@ var ge = {
|
|
|
205
205
|
"sample",
|
|
206
206
|
"spectrum"
|
|
207
207
|
])),
|
|
208
|
-
|
|
208
|
+
S("div", z, [S("span", { class: E(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (O(), x("span", B)) : b("", !0), ne(" " + j(a.value), 1)], 2), e.error ? (O(), x("p", {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: "pk-voice-session__detail",
|
|
211
211
|
title: e.rawError ?? e.error
|
|
212
|
-
}, j(e.error), 9, Se)) :
|
|
213
|
-
o.value ? (
|
|
212
|
+
}, j(e.error), 9, Se)) : b("", !0)]),
|
|
213
|
+
o.value ? (O(), x("span", {
|
|
214
214
|
key: 2,
|
|
215
|
-
class:
|
|
215
|
+
class: E(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
216
216
|
title: M(i)("hint.voiceRemaining"),
|
|
217
217
|
"aria-hidden": "true"
|
|
218
|
-
}, j(o.value), 11, Ce)) :
|
|
219
|
-
|
|
218
|
+
}, j(o.value), 11, Ce)) : b("", !0),
|
|
219
|
+
S("div", we, [e.error ? (O(), x(g, { key: 0 }, [C(d, {
|
|
220
220
|
icon: "ri:refresh-line",
|
|
221
221
|
label: M(i)("action.retry"),
|
|
222
222
|
onClick: n[0] ||= (e) => r("retry")
|
|
223
|
-
}, null, 8, ["label"]), e.live ? (
|
|
223
|
+
}, null, 8, ["label"]), e.live ? (O(), y(d, {
|
|
224
224
|
key: 0,
|
|
225
225
|
icon: "ri:stop-circle-line",
|
|
226
226
|
modifiers: "danger",
|
|
227
227
|
title: M(i)("action.hangUp"),
|
|
228
228
|
"aria-label": M(i)("action.hangUp"),
|
|
229
229
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
230
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
230
|
+
}, null, 8, ["title", "aria-label"])) : (O(), y(d, {
|
|
231
231
|
key: 1,
|
|
232
232
|
icon: "ri:close-line",
|
|
233
233
|
label: M(i)("action.close"),
|
|
234
234
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
235
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
235
|
+
}, null, 8, ["label"]))], 64)) : (O(), x(g, { key: 1 }, [C(d, {
|
|
236
236
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
237
237
|
title: e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
|
|
238
238
|
"aria-label": e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
|
|
@@ -243,7 +243,7 @@ var ge = {
|
|
|
243
243
|
"title",
|
|
244
244
|
"aria-label",
|
|
245
245
|
"aria-pressed"
|
|
246
|
-
]),
|
|
246
|
+
]), C(d, {
|
|
247
247
|
icon: "ri:stop-circle-line",
|
|
248
248
|
modifiers: "danger",
|
|
249
249
|
title: M(i)("action.hangUp"),
|
|
@@ -254,23 +254,23 @@ var ge = {
|
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
}), Ee = (e) => {
|
|
257
|
-
let t =
|
|
257
|
+
let t = A(), n = k("disconnected"), r = k("listening"), i = k(), o = k([]), s = k(), c = k(), l, u, d = 0, f = !1, p = () => {
|
|
258
258
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
259
|
-
},
|
|
259
|
+
}, ee = (e) => {
|
|
260
260
|
let t = Date.now() + e * 1e3, n = () => {
|
|
261
261
|
let e = Math.max(0, Math.ceil((t - Date.now()) / 1e3));
|
|
262
|
-
s.value = e, e === 0 &&
|
|
262
|
+
s.value = e, e === 0 && h();
|
|
263
263
|
};
|
|
264
264
|
n(), u = setInterval(n, 1e3);
|
|
265
|
-
},
|
|
265
|
+
}, m = async (t) => {
|
|
266
266
|
t && (l === t && (l = void 0), await e.closeGrant?.(t).catch(() => void 0));
|
|
267
|
-
},
|
|
267
|
+
}, h = async () => {
|
|
268
268
|
d += 1, p();
|
|
269
269
|
let e = l;
|
|
270
270
|
l = void 0;
|
|
271
271
|
let i = t.value;
|
|
272
|
-
t.value = void 0, await i?.endSession().catch(() => void 0), await
|
|
273
|
-
},
|
|
272
|
+
t.value = void 0, await i?.endSession().catch(() => void 0), await m(e), n.value = "disconnected", r.value = "listening";
|
|
273
|
+
}, g = async () => {
|
|
274
274
|
if (f || t.value || n.value === "connecting") return;
|
|
275
275
|
i.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
|
|
276
276
|
let a = d, s = () => a === d && !f, u;
|
|
@@ -285,10 +285,10 @@ var ge = {
|
|
|
285
285
|
l = d.sessionId, u = d.sessionId, c.value = d.chatId;
|
|
286
286
|
let { VoiceConversation: f } = await a;
|
|
287
287
|
if (!s()) {
|
|
288
|
-
await
|
|
288
|
+
await m(d.sessionId);
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
let
|
|
291
|
+
let h = await f.startSession({
|
|
292
292
|
signedUrl: d.signedUrl,
|
|
293
293
|
customLlmExtraBody: { voice_session_id: d.sessionId },
|
|
294
294
|
onStatusChange: ({ status: e }) => {
|
|
@@ -311,23 +311,23 @@ var ge = {
|
|
|
311
311
|
s() && (i.value = e);
|
|
312
312
|
},
|
|
313
313
|
onDisconnect: (a) => {
|
|
314
|
-
s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", a.reason === "error" && (i.value = a.message),
|
|
314
|
+
s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", a.reason === "error" && (i.value = a.message), m(d.sessionId), e.onTurnEnd?.());
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
317
|
if (!s()) {
|
|
318
|
-
await
|
|
318
|
+
await h.endSession().catch(() => void 0), await m(d.sessionId);
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
t.value =
|
|
321
|
+
t.value = h, ee(d.maxSessionSeconds);
|
|
322
322
|
} catch (e) {
|
|
323
|
-
if (await
|
|
323
|
+
if (await m(u), !s()) return;
|
|
324
324
|
t.value = void 0, p(), n.value = "disconnected", i.value = e instanceof Error ? e.message : String(e);
|
|
325
325
|
}
|
|
326
|
-
},
|
|
326
|
+
}, _ = () => {
|
|
327
327
|
i.value = void 0;
|
|
328
|
-
},
|
|
328
|
+
}, y = (e) => {
|
|
329
329
|
t.value?.setMicMuted(e);
|
|
330
|
-
},
|
|
330
|
+
}, b = (e) => {
|
|
331
331
|
let n = t.value;
|
|
332
332
|
if (!n || !e.trim()) return !1;
|
|
333
333
|
try {
|
|
@@ -335,7 +335,7 @@ var ge = {
|
|
|
335
335
|
} catch (e) {
|
|
336
336
|
return a.warn("The spoken answer could not be sent", e), !1;
|
|
337
337
|
}
|
|
338
|
-
},
|
|
338
|
+
}, x = (e) => {
|
|
339
339
|
let n = t.value;
|
|
340
340
|
if (!n) return 0;
|
|
341
341
|
try {
|
|
@@ -343,21 +343,21 @@ var ge = {
|
|
|
343
343
|
} catch {
|
|
344
344
|
return 0;
|
|
345
345
|
}
|
|
346
|
-
},
|
|
346
|
+
}, S = (e) => {
|
|
347
347
|
let n = t.value;
|
|
348
348
|
if (n) try {
|
|
349
349
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
350
350
|
} catch {
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, te = () => {
|
|
354
354
|
let e = l;
|
|
355
|
-
l = void 0, d += 1, p(),
|
|
355
|
+
l = void 0, d += 1, p(), m(e);
|
|
356
356
|
let r = t.value;
|
|
357
357
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
358
358
|
};
|
|
359
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
360
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
359
|
+
return typeof window < "u" && window.addEventListener("pagehide", te), oe(() => {
|
|
360
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", te), h();
|
|
361
361
|
}), {
|
|
362
362
|
status: n,
|
|
363
363
|
mode: r,
|
|
@@ -365,17 +365,17 @@ var ge = {
|
|
|
365
365
|
transcript: o,
|
|
366
366
|
remainingSeconds: s,
|
|
367
367
|
chatId: c,
|
|
368
|
-
isActive:
|
|
369
|
-
isConnecting:
|
|
370
|
-
isSpeaking:
|
|
371
|
-
isListening:
|
|
372
|
-
start:
|
|
373
|
-
stop:
|
|
374
|
-
dismissError:
|
|
375
|
-
setMuted:
|
|
376
|
-
sendUserMessage:
|
|
377
|
-
readLevel:
|
|
378
|
-
readSpectrum:
|
|
368
|
+
isActive: v(() => n.value === "connected" || n.value === "connecting"),
|
|
369
|
+
isConnecting: v(() => n.value === "connecting"),
|
|
370
|
+
isSpeaking: v(() => n.value === "connected" && r.value === "speaking"),
|
|
371
|
+
isListening: v(() => n.value === "connected" && r.value === "listening"),
|
|
372
|
+
start: g,
|
|
373
|
+
stop: h,
|
|
374
|
+
dismissError: _,
|
|
375
|
+
setMuted: y,
|
|
376
|
+
sendUserMessage: b,
|
|
377
|
+
readLevel: x,
|
|
378
|
+
readSpectrum: S
|
|
379
379
|
};
|
|
380
380
|
}, De = 4e3, Oe = [
|
|
381
381
|
3e3,
|
|
@@ -383,7 +383,7 @@ var ge = {
|
|
|
383
383
|
1e4
|
|
384
384
|
], ke = 12e4, Ae = 3e4;
|
|
385
385
|
function je(e) {
|
|
386
|
-
let t =
|
|
386
|
+
let t = k(null), n = k(!1), r, i = !1, a = () => {
|
|
387
387
|
clearTimeout(r), r = void 0;
|
|
388
388
|
}, o = (e, t) => {
|
|
389
389
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -423,29 +423,29 @@ function je(e) {
|
|
|
423
423
|
function p() {
|
|
424
424
|
f = e.chatId();
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function ee() {
|
|
427
427
|
f === e.chatId() && (f = void 0, c());
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function m() {
|
|
430
430
|
f = void 0;
|
|
431
431
|
}
|
|
432
|
-
let
|
|
433
|
-
N([e.chatId,
|
|
432
|
+
let h = v(() => e.messages().some((e) => e.role === "user"));
|
|
433
|
+
N([e.chatId, h], ([, t]) => {
|
|
434
434
|
d();
|
|
435
435
|
let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
|
|
436
436
|
t && !r && c();
|
|
437
437
|
}, { immediate: !0 }), N(e.status, (e, t) => {
|
|
438
|
-
e === "ready" && t !== "ready" &&
|
|
438
|
+
e === "ready" && t !== "ready" && h.value && c();
|
|
439
439
|
});
|
|
440
|
-
let
|
|
441
|
-
function
|
|
440
|
+
let g;
|
|
441
|
+
function _() {
|
|
442
442
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
443
443
|
}
|
|
444
|
-
let
|
|
445
|
-
return document.addEventListener("visibilitychange",
|
|
446
|
-
clearInterval(
|
|
447
|
-
}),
|
|
448
|
-
i = !0, a(), clearInterval(
|
|
444
|
+
let y = () => _();
|
|
445
|
+
return document.addEventListener("visibilitychange", y), N(() => t.value?.wakeId, (e) => {
|
|
446
|
+
clearInterval(g), g = void 0, e && !i && (_(), g = setInterval(_, Ae));
|
|
447
|
+
}), D(() => {
|
|
448
|
+
i = !0, a(), clearInterval(g), document.removeEventListener("visibilitychange", y);
|
|
449
449
|
}), {
|
|
450
450
|
pendingWakeup: t,
|
|
451
451
|
isStopping: n,
|
|
@@ -453,8 +453,8 @@ function je(e) {
|
|
|
453
453
|
reset: d,
|
|
454
454
|
stop: u,
|
|
455
455
|
spokenTurnStarted: p,
|
|
456
|
-
spokenTurnsWritten:
|
|
457
|
-
forgetSpokenTurns:
|
|
456
|
+
spokenTurnsWritten: ee,
|
|
457
|
+
forgetSpokenTurns: m
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
460
|
// ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -467,7 +467,7 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
467
467
|
}, Ie = {
|
|
468
468
|
key: 0,
|
|
469
469
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
470
|
-
}, Le = 3e3, Re = 6e4, ze = 3e5, Be = 6e5, Ve = /* @__PURE__ */
|
|
470
|
+
}, Le = 3e3, Re = 6e4, ze = 3e5, Be = 6e5, Ve = /* @__PURE__ */ T({
|
|
471
471
|
__name: "PkChatbotViewChat",
|
|
472
472
|
props: {
|
|
473
473
|
agentId: {},
|
|
@@ -476,121 +476,121 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
476
476
|
},
|
|
477
477
|
emits: ["show-info", "revise"],
|
|
478
478
|
setup(a, { emit: d }) {
|
|
479
|
-
let
|
|
480
|
-
|
|
481
|
-
let
|
|
482
|
-
let e =
|
|
483
|
-
if (e) return e.reason === "per-chat" ?
|
|
484
|
-
}),
|
|
479
|
+
let g = w(() => import("./PkToolShowForm-edPn56Ka.js").then((e) => e.n)), ne = w(() => import("./PkToolShowContactForm-CcIF7fNS.js").then((e) => e.n)), T = w(() => import("./PkToolShowSuggestedReply-CThFJVUq.js").then((e) => e.n)), ie = w(() => import("./PkToolShowSources-CHH2vKVG.js").then((e) => e.n)), ae = w(() => import("./PkToolRequestGeolocation-CY-NC6Rc.js")), oe = w(() => import("./PkToolRequestOAuthConnection-RkbnKSde.js")), se = w(() => import("./PkToolShowLocation-Cq0IXye1.js").then((e) => e.n)), le = w(() => import("./PkToolShowDiagram-CD70YQgq.js")), A = w(() => import("./PkToolChatFile-DPkLqqDt.js")), ue = w(() => import("./PkToolShareDocument-CRghPfep.js").then((e) => e.n)), F = a, ge = d, I = r(F.agentId), { agentInterface: L, agentFileUpload: _e, agentType: R, agentVoice: ye, actions: be, revisedAnswers: xe, messages: z, chat: B, messageFeedbacks: Se, feedbackDialogMessage: Ce, isFeedbackSubmitting: we, isFeedbackSubmitted: De, feedbackSubmitError: Oe, isLeadSubmitted: ke, isLoadingSubmitLead: Ae, submitLeadError: Ve, input: V, inputMessagePlaceholder: He, isConversationBlocked: Ue, baseUrl: We, pendingAttachments: Ge, isAttachmentLimitReached: Ke, fileLimitError: qe, apiClient: H, isDark: Je, hostToolsPending: Ye, pageNoticeLevel: Xe, hostConfirmation: Ze, agentPageAccess: Qe, hostStepTitles: $e, canQueue: et, queuedMessages: tt, backgroundAnswers: nt } = me(I);
|
|
480
|
+
ce(c, $e);
|
|
481
|
+
let U = v(() => R.value === "reasoning" ? void 0 : _e.value), W = (e) => H.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: rt, stopGeneration: it, regenerate: at, onUpvote: ot, onDownvote: st, onFeedback: ct, onFeedbackSubmit: lt, onLeadSubmit: ut, startNewChat: dt, addToolOutput: G, addToolApprovalResponse: ft, handleFileSelect: pt, clearFileLimitError: mt, refreshMessages: ht, appendMessage: gt, closePageNotice: _t, respondHostConfirmation: vt, editQueuedMessage: yt, removeQueuedMessage: bt, openBackgroundAnswer: xt, dismissBackgroundAnswer: St } = I, { t: K } = fe({ useScope: "global" }), Ct = v(() => Ye.value > 0), wt = v(() => Ct.value && B.value.status === "ready" ? "streaming" : B.value.status), Tt = l(() => Qe.value?.notice), Et = v(() => Xe.value ? Tt.value || K(`message.pageAccessNotice.${Xe.value}`) : void 0), Dt = v(() => {
|
|
482
|
+
let e = qe.value;
|
|
483
|
+
if (e) return e.reason === "per-chat" ? K("message.fileLimitPerChat", { max: e.max }) : K("message.fileLimitPerMessage", { max: e.max });
|
|
484
|
+
}), Ot = v(() => nt.value.map(({ chatId: e, title: t }) => ({
|
|
485
485
|
id: e,
|
|
486
|
-
text: t ?
|
|
487
|
-
}))),
|
|
488
|
-
let t = await
|
|
486
|
+
text: t ? K("message.backgroundAnswerReady", { title: t }) : K("message.backgroundAnswerReadyUntitled")
|
|
487
|
+
}))), kt = l(() => L.value?.dismissableNotice), At = v(() => z.value.some((e) => e.role === "user")), jt = v(() => F.modifier === "fullscreen" && !At.value), Mt = he(L, () => F.userName), Nt = de("chatViewEl"), Pt = async (e) => (await H.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Ft = async (e) => {
|
|
488
|
+
let t = await H.value.downloadSourceDocument(F.agentId, e);
|
|
489
489
|
window.open(t.downloadUrl, "_blank");
|
|
490
|
-
}, { isOverDropZone:
|
|
491
|
-
dataTypes: (e) => t(e,
|
|
490
|
+
}, { isOverDropZone: It } = pe(Nt, {
|
|
491
|
+
dataTypes: (e) => t(e, U.value?.allowedMimeTypes ?? []),
|
|
492
492
|
onDrop: (e) => {
|
|
493
|
-
if (
|
|
493
|
+
if (U.value?.enabled && e) for (let t of e) pt(t);
|
|
494
494
|
}
|
|
495
|
-
}),
|
|
495
|
+
}), q = k(!1), J = !1, Y = k(!1), Lt = [
|
|
496
496
|
3e3,
|
|
497
497
|
5e3,
|
|
498
498
|
1e4
|
|
499
|
-
],
|
|
500
|
-
function
|
|
501
|
-
clearTimeout(
|
|
499
|
+
], Rt, X, zt = !1, Bt = 0, Vt = !1;
|
|
500
|
+
function Ht() {
|
|
501
|
+
clearTimeout(Rt), Rt = void 0, X = void 0, zt = !1, Bt = 0, Y.value = !1;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
|
|
503
|
+
function Ut(e) {
|
|
504
|
+
J || (clearTimeout(Rt), Rt = setTimeout(() => {
|
|
505
505
|
Wt();
|
|
506
506
|
}, e));
|
|
507
507
|
}
|
|
508
508
|
async function Wt() {
|
|
509
|
-
if (
|
|
510
|
-
|
|
509
|
+
if (J || Vt) return;
|
|
510
|
+
Vt = !0;
|
|
511
511
|
let e;
|
|
512
512
|
try {
|
|
513
|
-
e = await
|
|
513
|
+
e = await ht();
|
|
514
514
|
} finally {
|
|
515
|
-
|
|
515
|
+
Vt = !1;
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
518
|
-
if (e === "caught-up" && (
|
|
519
|
-
|
|
517
|
+
if (J) return;
|
|
518
|
+
if (e === "caught-up" && (Y.value = !1, gn()), Z.isActive.value) {
|
|
519
|
+
X = void 0, zt = !1, Bt = 0, Ut(Le);
|
|
520
520
|
return;
|
|
521
521
|
}
|
|
522
|
-
|
|
523
|
-
let t = Date.now() -
|
|
524
|
-
if (e === "caught-up" && t >= (
|
|
525
|
-
|
|
522
|
+
X === void 0 && (X = Date.now(), zt = !!Z.error.value);
|
|
523
|
+
let t = Date.now() - X;
|
|
524
|
+
if (e === "caught-up" && t >= (zt ? ze : Re) || t >= Be) {
|
|
525
|
+
Ht(), _n();
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
|
-
let n =
|
|
529
|
-
|
|
528
|
+
let n = Lt[Math.min(Bt, Lt.length - 1)];
|
|
529
|
+
Bt += 1, Ut(n);
|
|
530
530
|
}
|
|
531
531
|
let Gt = (e = 1200) => {
|
|
532
|
-
|
|
532
|
+
Ut(e);
|
|
533
533
|
}, Z = Ee({
|
|
534
534
|
fetchGrant: async () => {
|
|
535
|
-
let e = await
|
|
535
|
+
let e = await H.value.createVoiceSession(F.agentId, I.localChatId, {
|
|
536
536
|
deviceContext: I.buildDeviceContext(),
|
|
537
537
|
externalContext: I.externalContext
|
|
538
538
|
});
|
|
539
539
|
return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
|
|
540
540
|
},
|
|
541
|
-
closeGrant: (e) =>
|
|
541
|
+
closeGrant: (e) => H.value.closeVoiceSession(F.agentId, e),
|
|
542
542
|
onTranscript: (e) => {
|
|
543
|
-
e.role === "user" ? (
|
|
543
|
+
e.role === "user" ? (Y.value = !0, hn(), gt({
|
|
544
544
|
id: `${i}user-${n()}`,
|
|
545
545
|
role: "user",
|
|
546
546
|
parts: [{
|
|
547
547
|
type: "text",
|
|
548
548
|
text: e.text
|
|
549
549
|
}]
|
|
550
|
-
})) :
|
|
550
|
+
})) : Y.value = !1;
|
|
551
551
|
},
|
|
552
552
|
onTurnEnd: () => {
|
|
553
553
|
Gt();
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
N(() => Z.error.value, (e) => {
|
|
557
|
-
e && (
|
|
557
|
+
e && (Y.value = !1);
|
|
558
558
|
});
|
|
559
|
-
let Kt =
|
|
559
|
+
let Kt = v(() => ye.value?.enabled === !0), qt = v(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Jt = v(() => {
|
|
560
560
|
let e = Z.error.value;
|
|
561
|
-
if (e) return /took too long/i.test(e) ?
|
|
562
|
-
}), Yt =
|
|
563
|
-
|
|
561
|
+
if (e) return /took too long/i.test(e) ? K("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? K("message.voiceNoAnswer") : K("message.voiceInterrupted");
|
|
562
|
+
}), Yt = v(() => Z.isSpeaking.value ? "output" : "input"), Xt = () => Z.readLevel(Yt.value), Zt = () => Z.readSpectrum(Yt.value), Qt = async () => {
|
|
563
|
+
q.value = !1, await Z.start(), Z.isActive.value && (Ht(), Ut(Le));
|
|
564
564
|
}, $t = async () => {
|
|
565
|
-
|
|
565
|
+
Y.value = !1, await Z.stop(), !J && Gt(0);
|
|
566
566
|
}, en = () => {
|
|
567
567
|
Z.dismissError();
|
|
568
568
|
}, tn = async () => {
|
|
569
569
|
Z.dismissError(), await Z.stop(), await Qt();
|
|
570
|
-
}, Q = (e) => e?.toolCallId ?? "", nn =
|
|
571
|
-
$(t, o(t, n)) ||
|
|
570
|
+
}, Q = (e) => e?.toolCallId ?? "", nn = k(/* @__PURE__ */ new Set()), rn = (e) => nn.value.has(Q(e)), an = k(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (nn.value = new Set(nn.value).add(Q(e)), Gt()), !0) : !1, on = (e, t, n) => {
|
|
571
|
+
$(t, o(t, n)) || G({
|
|
572
572
|
tool: e,
|
|
573
573
|
toolCallId: Q(t),
|
|
574
574
|
output: n
|
|
575
575
|
});
|
|
576
576
|
}, sn = (e) => {
|
|
577
|
-
let t = e.confirmed ?
|
|
578
|
-
$({ toolCallId: e.toolCallId }, t) ? nn.value.has(e.toolCallId) && (an.value = new Map(an.value).set(e.toolCallId, e.confirmed)) :
|
|
577
|
+
let t = e.confirmed ? K("message.voiceConfirmed") : K("message.voiceCancelled");
|
|
578
|
+
$({ toolCallId: e.toolCallId }, t) ? nn.value.has(e.toolCallId) && (an.value = new Map(an.value).set(e.toolCallId, e.confirmed)) : G({
|
|
579
579
|
tool: "requestConfirm",
|
|
580
580
|
toolCallId: e.toolCallId,
|
|
581
581
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
582
582
|
});
|
|
583
583
|
}, cn = (e, t) => {
|
|
584
|
-
$(e, t) || (
|
|
584
|
+
$(e, t) || (V.value = t, rt());
|
|
585
585
|
}, ln = (e, t) => {
|
|
586
|
-
let n = t.error ?
|
|
587
|
-
$(e, n) ||
|
|
586
|
+
let n = t.error ? K("message.voiceLocationRefused") : K("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
587
|
+
$(e, n) || G({
|
|
588
588
|
tool: "requestGeolocation",
|
|
589
589
|
toolCallId: Q(e),
|
|
590
590
|
output: t
|
|
591
591
|
});
|
|
592
592
|
}, un = (e, t) => {
|
|
593
|
-
$(e,
|
|
593
|
+
$(e, K("message.voiceConnectionDone")) || G({
|
|
594
594
|
tool: "requestOAuthConnection",
|
|
595
595
|
toolCallId: Q(e),
|
|
596
596
|
output: {
|
|
@@ -599,43 +599,43 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
601
|
}, dn = () => {
|
|
602
|
-
|
|
602
|
+
q.value = !q.value, Z.setMuted(q.value);
|
|
603
603
|
};
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
D(() => {
|
|
605
|
+
J = !0, Ht();
|
|
606
606
|
});
|
|
607
607
|
let { pendingWakeup: fn, isStopping: pn, stop: mn, spokenTurnStarted: hn, spokenTurnsWritten: gn, forgetSpokenTurns: _n } = je({
|
|
608
608
|
agentId: () => F.agentId,
|
|
609
609
|
chatId: () => I.localChatId,
|
|
610
|
-
apiClient: () =>
|
|
610
|
+
apiClient: () => H.value,
|
|
611
611
|
messages: () => z.value,
|
|
612
|
-
refreshMessages:
|
|
612
|
+
refreshMessages: ht,
|
|
613
613
|
status: () => B.value.status
|
|
614
614
|
});
|
|
615
615
|
return (t, n) => {
|
|
616
|
-
let r =
|
|
617
|
-
return
|
|
616
|
+
let r = h;
|
|
617
|
+
return O(), x("div", {
|
|
618
618
|
ref_key: "chatViewEl",
|
|
619
|
-
ref:
|
|
620
|
-
class:
|
|
621
|
-
"pk-chatbot-view-chat--dragover": M(
|
|
622
|
-
"pk-chatbot-view-chat--empty":
|
|
619
|
+
ref: Nt,
|
|
620
|
+
class: E(["pk-chatbot-view-chat", {
|
|
621
|
+
"pk-chatbot-view-chat--dragover": M(It) && U.value?.enabled,
|
|
622
|
+
"pk-chatbot-view-chat--empty": jt.value
|
|
623
623
|
}])
|
|
624
624
|
}, [
|
|
625
|
-
|
|
625
|
+
C(_, {
|
|
626
626
|
name: "pk-chatbot-view-chat-fade",
|
|
627
627
|
mode: "out-in"
|
|
628
628
|
}, {
|
|
629
|
-
default: P(() => [
|
|
629
|
+
default: P(() => [jt.value ? (O(), y(ee, {
|
|
630
630
|
key: 0,
|
|
631
|
-
greeting: M(
|
|
631
|
+
greeting: M(Mt),
|
|
632
632
|
logo: M(L)?.logo,
|
|
633
633
|
name: M(I).name
|
|
634
634
|
}, null, 8, [
|
|
635
635
|
"greeting",
|
|
636
636
|
"logo",
|
|
637
637
|
"name"
|
|
638
|
-
])) : (
|
|
638
|
+
])) : (O(), y(e, {
|
|
639
639
|
key: 1,
|
|
640
640
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
641
641
|
interactive: "",
|
|
@@ -653,33 +653,33 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
653
653
|
"feedback-submitted": M(De),
|
|
654
654
|
"feedback-error": M(Oe),
|
|
655
655
|
"show-extended-steps": M(L)?.showExtendedSteps,
|
|
656
|
-
"awaiting-spoken-answer":
|
|
657
|
-
"host-working":
|
|
658
|
-
"host-confirmation": M(
|
|
659
|
-
"is-dark": M(
|
|
656
|
+
"awaiting-spoken-answer": Y.value,
|
|
657
|
+
"host-working": Ct.value,
|
|
658
|
+
"host-confirmation": M(Ze),
|
|
659
|
+
"is-dark": M(Je),
|
|
660
660
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
661
|
-
onFeedbackSubmit: n[0] ||= (e) => M(
|
|
661
|
+
onFeedbackSubmit: n[0] ||= (e) => M(lt)(e),
|
|
662
662
|
onFeedbackClose: n[1] ||= (e) => Ce.value = void 0,
|
|
663
|
-
onRegenerate: M(
|
|
664
|
-
onAutoRetry: M(
|
|
665
|
-
onResetChat: M(
|
|
663
|
+
onRegenerate: M(at),
|
|
664
|
+
onAutoRetry: M(at),
|
|
665
|
+
onResetChat: M(dt),
|
|
666
666
|
onShowInfo: n[2] ||= (e) => ge("show-info", e),
|
|
667
667
|
onRevise: n[3] ||= (e) => ge("revise", e),
|
|
668
|
-
onUpvote: M(
|
|
669
|
-
onDownvote: M(
|
|
670
|
-
onFeedback: M(
|
|
671
|
-
onApprovalRespond: M(
|
|
668
|
+
onUpvote: M(ot),
|
|
669
|
+
onDownvote: M(st),
|
|
670
|
+
onFeedback: M(ct),
|
|
671
|
+
onApprovalRespond: M(ft),
|
|
672
672
|
onConfirmRespond: sn,
|
|
673
|
-
onHostConfirmRespond: M(
|
|
673
|
+
onHostConfirmRespond: M(vt)
|
|
674
674
|
}, {
|
|
675
|
-
"tool-showContactForm": P(({ part: e }) => [
|
|
675
|
+
"tool-showContactForm": P(({ part: e }) => [C(M(ne), {
|
|
676
676
|
part: e,
|
|
677
|
-
readonly: !M(
|
|
677
|
+
readonly: !M(We),
|
|
678
678
|
submitted: M(ke),
|
|
679
679
|
loading: M(Ae),
|
|
680
680
|
error: M(Ve),
|
|
681
681
|
"privacy-policy-notice": M(L)?.privacyPolicyNotice,
|
|
682
|
-
onSubmit: M(
|
|
682
|
+
onSubmit: M(ut)
|
|
683
683
|
}, null, 8, [
|
|
684
684
|
"part",
|
|
685
685
|
"readonly",
|
|
@@ -689,17 +689,17 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
689
689
|
"privacy-policy-notice",
|
|
690
690
|
"onSubmit"
|
|
691
691
|
])]),
|
|
692
|
-
"tool-showSuggestedReply": P(({ part: e }) => [
|
|
692
|
+
"tool-showSuggestedReply": P(({ part: e }) => [C(M(T), {
|
|
693
693
|
part: e,
|
|
694
694
|
onSelect: (t) => cn(e, t)
|
|
695
695
|
}, null, 8, ["part", "onSelect"])]),
|
|
696
|
-
"tool-showSources": P(({ part: e }) => [
|
|
696
|
+
"tool-showSources": P(({ part: e }) => [C(M(ie), {
|
|
697
697
|
part: e,
|
|
698
|
-
"on-expand-context":
|
|
699
|
-
"on-download":
|
|
698
|
+
"on-expand-context": Pt,
|
|
699
|
+
"on-download": Ft
|
|
700
700
|
}, null, 8, ["part"])]),
|
|
701
|
-
"tool-showForm": P(({ part: e }) => [
|
|
702
|
-
default: P(() => [
|
|
701
|
+
"tool-showForm": P(({ part: e }) => [C(_, { mode: "out-in" }, {
|
|
702
|
+
default: P(() => [C(M(g), {
|
|
703
703
|
part: e,
|
|
704
704
|
answered: rn(e),
|
|
705
705
|
onSelect: (t) => on("showForm", e, t)
|
|
@@ -710,8 +710,8 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
710
710
|
])]),
|
|
711
711
|
_: 2
|
|
712
712
|
}, 1024)]),
|
|
713
|
-
"tool-showMultipleChoice": P(({ part: e }) => [
|
|
714
|
-
default: P(() => [
|
|
713
|
+
"tool-showMultipleChoice": P(({ part: e }) => [C(_, { mode: "out-in" }, {
|
|
714
|
+
default: P(() => [C(M(g), {
|
|
715
715
|
part: e,
|
|
716
716
|
"allow-custom-answer": "",
|
|
717
717
|
answered: rn(e),
|
|
@@ -723,11 +723,11 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
723
723
|
])]),
|
|
724
724
|
_: 2
|
|
725
725
|
}, 1024)]),
|
|
726
|
-
"tool-requestOAuthConnection": P(({ part: e }) => [
|
|
726
|
+
"tool-requestOAuthConnection": P(({ part: e }) => [C(M(oe), {
|
|
727
727
|
part: e,
|
|
728
|
-
"backend-url": M(
|
|
729
|
-
"resolve-connection": (e) => M(
|
|
730
|
-
"check-connection": (e) => M(
|
|
728
|
+
"backend-url": M(We),
|
|
729
|
+
"resolve-connection": (e) => M(H).getOAuthAuthorizeUrl(F.agentId, e),
|
|
730
|
+
"check-connection": (e) => M(H).getOAuthConnectionStatus(F.agentId, e),
|
|
731
731
|
onConnected: (t) => un(e, t)
|
|
732
732
|
}, null, 8, [
|
|
733
733
|
"part",
|
|
@@ -736,10 +736,10 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
736
736
|
"check-connection",
|
|
737
737
|
"onConnected"
|
|
738
738
|
])]),
|
|
739
|
-
"tool-requestGeolocation": P(({ part: e }) => [
|
|
739
|
+
"tool-requestGeolocation": P(({ part: e }) => [C(M(ae), {
|
|
740
740
|
part: e,
|
|
741
741
|
"call-live": M(Z).isActive.value,
|
|
742
|
-
"reverse-geocode": (e, t) => M(
|
|
742
|
+
"reverse-geocode": (e, t) => M(H).reverseGeocode(e, t),
|
|
743
743
|
onResult: (t) => ln(e, t)
|
|
744
744
|
}, null, 8, [
|
|
745
745
|
"part",
|
|
@@ -747,60 +747,70 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
747
747
|
"reverse-geocode",
|
|
748
748
|
"onResult"
|
|
749
749
|
])]),
|
|
750
|
-
"tool-showLocation": P(({ part: e }) => [
|
|
750
|
+
"tool-showLocation": P(({ part: e }) => [C(M(se), {
|
|
751
751
|
part: e,
|
|
752
|
-
"is-dark": M(
|
|
752
|
+
"is-dark": M(Je),
|
|
753
753
|
"main-color": M(L)?.mainColor,
|
|
754
|
-
"forward-geocode": (e, t) => M(
|
|
754
|
+
"forward-geocode": (e, t) => M(H).forwardGeocode(e, t)
|
|
755
755
|
}, null, 8, [
|
|
756
756
|
"part",
|
|
757
757
|
"is-dark",
|
|
758
758
|
"main-color",
|
|
759
759
|
"forward-geocode"
|
|
760
760
|
])]),
|
|
761
|
-
"tool-showDiagram": P(({ part: e }) => [
|
|
761
|
+
"tool-showDiagram": P(({ part: e }) => [C(M(le), {
|
|
762
762
|
part: e,
|
|
763
|
-
"is-dark": M(
|
|
763
|
+
"is-dark": M(Je)
|
|
764
764
|
}, null, 8, ["part", "is-dark"])]),
|
|
765
|
-
"tool-editSpreadsheet": P(({ part: e }) => [(
|
|
765
|
+
"tool-editSpreadsheet": P(({ part: e }) => [(O(), y(M(A), {
|
|
766
|
+
key: M(s)(e),
|
|
767
|
+
part: e,
|
|
768
|
+
"file-url": W
|
|
769
|
+
}, null, 8, ["part"]))]),
|
|
770
|
+
"tool-editWordDocument": P(({ part: e }) => [(O(), y(M(A), {
|
|
771
|
+
key: M(s)(e),
|
|
772
|
+
part: e,
|
|
773
|
+
"file-url": W
|
|
774
|
+
}, null, 8, ["part"]))]),
|
|
775
|
+
"tool-createSpreadsheet": P(({ part: e }) => [(O(), y(M(A), {
|
|
766
776
|
key: M(s)(e),
|
|
767
777
|
part: e,
|
|
768
|
-
"file-url":
|
|
778
|
+
"file-url": W
|
|
769
779
|
}, null, 8, ["part"]))]),
|
|
770
|
-
"tool-
|
|
780
|
+
"tool-createWordDocument": P(({ part: e }) => [(O(), y(M(A), {
|
|
771
781
|
key: M(s)(e),
|
|
772
782
|
part: e,
|
|
773
|
-
"file-url":
|
|
783
|
+
"file-url": W
|
|
774
784
|
}, null, 8, ["part"]))]),
|
|
775
|
-
"tool-shareDocument": P(({ part: e }) => [(
|
|
785
|
+
"tool-shareDocument": P(({ part: e }) => [(O(), y(M(ue), {
|
|
776
786
|
key: M(s)(e),
|
|
777
787
|
part: e,
|
|
778
|
-
"on-download":
|
|
788
|
+
"on-download": Ft
|
|
779
789
|
}, null, 8, ["part"]))]),
|
|
780
790
|
_: 1
|
|
781
791
|
}, 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.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
782
792
|
_: 1
|
|
783
793
|
}),
|
|
784
|
-
M(
|
|
794
|
+
M(tt).length ? (O(), y(p, {
|
|
785
795
|
key: 0,
|
|
786
|
-
messages: M(
|
|
787
|
-
onEdit: M(
|
|
788
|
-
onRemove: M(
|
|
796
|
+
messages: M(tt),
|
|
797
|
+
onEdit: M(yt),
|
|
798
|
+
onRemove: M(bt)
|
|
789
799
|
}, null, 8, [
|
|
790
800
|
"messages",
|
|
791
801
|
"onEdit",
|
|
792
802
|
"onRemove"
|
|
793
|
-
])) :
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
default: P(() => [
|
|
803
|
+
])) : b("", !0),
|
|
804
|
+
S("div", Me, [
|
|
805
|
+
C(_, { name: "pk-chatbot-view-chat-fade" }, {
|
|
806
|
+
default: P(() => [jt.value ? (O(), y(ve, {
|
|
797
807
|
key: 0,
|
|
798
808
|
class: "pk-chatbot-view-chat__aurora",
|
|
799
809
|
"source-selector": ".pk-chatbot-input__form"
|
|
800
|
-
})) :
|
|
810
|
+
})) : b("", !0)]),
|
|
801
811
|
_: 1
|
|
802
812
|
}),
|
|
803
|
-
M(fn) && !M(
|
|
813
|
+
M(fn) && !M(Ue) ? (O(), y(m, {
|
|
804
814
|
key: 0,
|
|
805
815
|
pending: M(fn),
|
|
806
816
|
stopping: M(pn),
|
|
@@ -809,40 +819,40 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
809
819
|
"pending",
|
|
810
820
|
"stopping",
|
|
811
821
|
"onStop"
|
|
812
|
-
])) :
|
|
813
|
-
M(
|
|
822
|
+
])) : b("", !0),
|
|
823
|
+
M(Ue) ? (O(), x("div", Ne, j(M(K)("message.chatErrorConversationBlocked")), 1)) : qt.value === "idle" ? (O(), y(f, {
|
|
814
824
|
key: 3,
|
|
815
|
-
modelValue: M(
|
|
816
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
817
|
-
"pending-attachments": M(
|
|
818
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
819
|
-
placeholder: M(
|
|
820
|
-
"dismissable-notice": M(
|
|
821
|
-
"page-notice":
|
|
822
|
-
status:
|
|
825
|
+
modelValue: M(V),
|
|
826
|
+
"onUpdate:modelValue": n[4] ||= (e) => re(V) ? V.value = e : null,
|
|
827
|
+
"pending-attachments": M(Ge),
|
|
828
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => re(Ge) ? Ge.value = e : null,
|
|
829
|
+
placeholder: M(He),
|
|
830
|
+
"dismissable-notice": M(kt) && M(B).messages.length <= 1 ? M(kt) : void 0,
|
|
831
|
+
"page-notice": Et.value,
|
|
832
|
+
status: wt.value,
|
|
823
833
|
"max-message-length": M(L)?.maxMessageLength,
|
|
824
|
-
"file-upload":
|
|
825
|
-
"attachment-limit-reached": M(
|
|
826
|
-
"attachment-notice":
|
|
834
|
+
"file-upload": U.value,
|
|
835
|
+
"attachment-limit-reached": M(Ke),
|
|
836
|
+
"attachment-notice": Dt.value,
|
|
827
837
|
"voice-enabled": Kt.value,
|
|
828
|
-
"queue-enabled": M(
|
|
829
|
-
"answer-notices":
|
|
830
|
-
onStopGeneration: M(
|
|
831
|
-
onSubmit: M(
|
|
832
|
-
onFileSelect: M(
|
|
833
|
-
onDismissAttachmentNotice: M(
|
|
834
|
-
onDismissPageNotice: M(
|
|
835
|
-
onOpenAnswerNotice: M(
|
|
836
|
-
onDismissAnswerNotice: M(
|
|
838
|
+
"queue-enabled": M(et),
|
|
839
|
+
"answer-notices": Ot.value,
|
|
840
|
+
onStopGeneration: M(it),
|
|
841
|
+
onSubmit: M(rt),
|
|
842
|
+
onFileSelect: M(pt),
|
|
843
|
+
onDismissAttachmentNotice: M(mt),
|
|
844
|
+
onDismissPageNotice: M(_t),
|
|
845
|
+
onOpenAnswerNotice: M(xt),
|
|
846
|
+
onDismissAnswerNotice: M(St),
|
|
837
847
|
onVoiceStart: Qt
|
|
838
|
-
},
|
|
848
|
+
}, te({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
839
849
|
name: "prepend",
|
|
840
|
-
fn: P(() => [
|
|
850
|
+
fn: P(() => [S("span", Pe, [C(u, {
|
|
841
851
|
modifiers: "surface",
|
|
842
852
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
843
853
|
"img-src": M(L)?.logo,
|
|
844
854
|
name: M(I).name
|
|
845
|
-
}, null, 8, ["img-src", "name"]), M(I).name ? (
|
|
855
|
+
}, null, 8, ["img-src", "name"]), M(I).name ? (O(), x("strong", Fe, j(M(I).name), 1)) : b("", !0)])]),
|
|
846
856
|
key: "0"
|
|
847
857
|
} : void 0]), 1032, [
|
|
848
858
|
"modelValue",
|
|
@@ -865,13 +875,13 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
865
875
|
"onDismissPageNotice",
|
|
866
876
|
"onOpenAnswerNotice",
|
|
867
877
|
"onDismissAnswerNotice"
|
|
868
|
-
])) : (
|
|
878
|
+
])) : (O(), y(Te, {
|
|
869
879
|
key: 2,
|
|
870
880
|
state: qt.value,
|
|
871
881
|
sample: Xt,
|
|
872
882
|
spectrum: Zt,
|
|
873
883
|
"remaining-seconds": M(Z).remainingSeconds.value,
|
|
874
|
-
muted:
|
|
884
|
+
muted: q.value,
|
|
875
885
|
error: Jt.value,
|
|
876
886
|
"raw-error": M(Z).error.value,
|
|
877
887
|
live: M(Z).isActive.value,
|
|
@@ -889,11 +899,11 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
889
899
|
"live"
|
|
890
900
|
]))
|
|
891
901
|
]),
|
|
892
|
-
|
|
893
|
-
default: P(() => [M(
|
|
902
|
+
C(_, null, {
|
|
903
|
+
default: P(() => [M(It) && U.value?.enabled ? (O(), x("div", Ie, [C(r, {
|
|
894
904
|
name: "ri:upload-cloud-2-line",
|
|
895
905
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
896
|
-
}),
|
|
906
|
+
}), S("span", null, j(M(K)("action.dropFile")), 1)])) : b("", !0)]),
|
|
897
907
|
_: 1
|
|
898
908
|
})
|
|
899
909
|
], 2);
|
|
@@ -902,4 +912,4 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
902
912
|
});
|
|
903
913
|
export { ve as i, Te as n, be as r, Ve as t };
|
|
904
914
|
|
|
905
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
915
|
+
//# sourceMappingURL=PkChatbotViewChat-CW4SxAtr.js.map
|