@8wave/ai-elements 0.125.0-beta.4 → 0.125.0-beta.6
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-BBWFD4nI.js → Agent-DZhK49jg.js} +99 -96
- package/dist/_chunks/Agent-DZhK49jg.js.map +1 -0
- package/dist/_chunks/{PkFilePreview-BwHe4-m1.js → PkFilePreview-C3R3jrNi.js} +31 -31
- package/dist/_chunks/{PkFilePreview-BwHe4-m1.js.map → PkFilePreview-C3R3jrNi.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-LWxNgkzk.js → PkFilePreviewDialog-BAKFOnPI.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-LWxNgkzk.js.map → PkFilePreviewDialog-BAKFOnPI.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-BvgO6aHe.js → PkStreamingMarkdown-BM-DSTPr.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-BvgO6aHe.js.map → PkStreamingMarkdown-BM-DSTPr.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-OuaeZTxw.js → PkToolChatFile-DbeOmRPh.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-OuaeZTxw.js.map → PkToolChatFile-DbeOmRPh.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-C9PSITRU.js → PkToolRequestGeolocation-CCz4REP9.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-C9PSITRU.js.map → PkToolRequestGeolocation-CCz4REP9.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CWi5SeCi.js → PkToolRequestOAuthConnection-BU-4Sm3z.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CWi5SeCi.js.map → PkToolRequestOAuthConnection-BU-4Sm3z.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BqgW3E6D.js → PkToolShowArtifact-utxGuLLt.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BqgW3E6D.js.map → PkToolShowArtifact-utxGuLLt.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DDDXopZp.js → PkToolShowContactForm-DTtE93D3.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DDDXopZp.js.map → PkToolShowContactForm-DTtE93D3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-D2LZ8Kkl.js → PkToolShowForm-I4pKopEI.js} +6 -6
- package/dist/_chunks/{PkToolShowForm-D2LZ8Kkl.js.map → PkToolShowForm-I4pKopEI.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DAcW2Dau.js → PkToolShowImageGallery-skV87BlD.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DAcW2Dau.js.map → PkToolShowImageGallery-skV87BlD.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-OYwQCHar.js → PkToolShowProductList-CcdOQoxf.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-OYwQCHar.js.map → PkToolShowProductList-CcdOQoxf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DA4SOt-H.js → PkToolShowSources-DLmVS3bL.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-DA4SOt-H.js.map → PkToolShowSources-DLmVS3bL.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-BTE7TZ4Z.js → PkToolShowSuggestedReply-Cv-WVCFN.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BTE7TZ4Z.js.map → PkToolShowSuggestedReply-Cv-WVCFN.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-bTWeXtZd.js → PkToolShowVideo-D_K95gTR.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-bTWeXtZd.js.map → PkToolShowVideo-D_K95gTR.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-DNbdkSSz.js → PkToolShowWebPages-DsfMacw-.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-DNbdkSSz.js.map → PkToolShowWebPages-DsfMacw-.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-C4jFnVQl.js → chatImagePolicy-BfgdFbm_.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-C4jFnVQl.js.map → chatImagePolicy-BfgdFbm_.js.map} +1 -1
- package/dist/_chunks/{markdown-DDYeZICP.js → markdown-CrMYpY8l.js} +10 -10
- package/dist/_chunks/{markdown-DDYeZICP.js.map → markdown-CrMYpY8l.js.map} +1 -1
- package/dist/_chunks/{utils-euH8esYP.js → utils-CbhqxYyx.js} +57 -57
- package/dist/_chunks/utils-CbhqxYyx.js.map +1 -0
- package/dist/ai-elements.es.js +3812 -3717
- 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-DQl-tv4S.js → Agent-BtXBSGy6.js} +34 -31
- package/dist-vue/_chunks/Agent-BtXBSGy6.js.map +1 -0
- package/dist-vue/_chunks/{Document-DXDifFZE.js → Document-DERAWuR0.js} +10 -10
- package/dist-vue/_chunks/{Document-DXDifFZE.js.map → Document-DERAWuR0.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbot-Qrk8yEM0.js +294 -0
- package/dist-vue/_chunks/PkChatbot-Qrk8yEM0.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CLOH5Z2d.js → PkChatbotEmptyState-C9aUiynZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CLOH5Z2d.js.map → PkChatbotEmptyState-C9aUiynZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BK7f1jFE.js → PkChatbotInput-Bs8nn-Jz.js} +154 -135
- package/dist-vue/_chunks/PkChatbotInput-Bs8nn-Jz.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotMessages-DAwGWRtd.js +1039 -0
- package/dist-vue/_chunks/PkChatbotMessages-DAwGWRtd.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-D682n3VR.js → PkChatbotStepPayload-C45aVagz.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-D682n3VR.js.map → PkChatbotStepPayload-C45aVagz.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-D5c8rqj9.js → PkChatbotStepToolDetail-B0tC33x6.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-D5c8rqj9.js.map → PkChatbotStepToolDetail-B0tC33x6.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-MTSA_RrY.js +215 -0
- package/dist-vue/_chunks/PkChatbotSteps-MTSA_RrY.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-D8depeWQ.js → PkChatbotViewChat-CMFc4eLD.js} +450 -446
- package/dist-vue/_chunks/PkChatbotViewChat-CMFc4eLD.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-B-dmLi-8.js → PkChatbotViewConversations-CtxE_a1O.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-B-dmLi-8.js.map → PkChatbotViewConversations-CtxE_a1O.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Du5AAS4v.js → PkChatbotViewFiles-B51zU374.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-Du5AAS4v.js.map → PkChatbotViewFiles-B51zU374.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-UZrZdOyM.js → PkChatbotViewProfile-BSKRU7Ae.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-UZrZdOyM.js.map → PkChatbotViewProfile-BSKRU7Ae.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-B54Dp_Rs.js → PkFilePreview-p-AGDrXi.js} +30 -30
- package/dist-vue/_chunks/{PkFilePreview-B54Dp_Rs.js.map → PkFilePreview-p-AGDrXi.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-QDPoZh1v.js → PkFilePreviewDialog-BpeeWS6d.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-QDPoZh1v.js.map → PkFilePreviewDialog-BpeeWS6d.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-qnKwvrCg.js → PkStreamingMarkdown-DlcTV5je.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-qnKwvrCg.js.map → PkStreamingMarkdown-DlcTV5je.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-i0rHgFxB.js → PkToolChatFile-HWGjtuaT.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-i0rHgFxB.js.map → PkToolChatFile-HWGjtuaT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-SDzM1-Wl.js → PkToolRequestGeolocation-euI4VBVe.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-SDzM1-Wl.js.map → PkToolRequestGeolocation-euI4VBVe.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DNrlGxMX.js → PkToolRequestOAuthConnection-DAAYyufP.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DNrlGxMX.js.map → PkToolRequestOAuthConnection-DAAYyufP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-Dh4ogn6A.js → PkToolShowArtifact-C8OIF_sy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-Dh4ogn6A.js.map → PkToolShowArtifact-C8OIF_sy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BGTI1sio.js → PkToolShowContactForm-K6Z5MUXk.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BGTI1sio.js.map → PkToolShowContactForm-K6Z5MUXk.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-xef3wJb0.js → PkToolShowDiagram-DrlGh_v6.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-xef3wJb0.js.map → PkToolShowDiagram-DrlGh_v6.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-Crg4Kl6v.js → PkToolShowForm-DzsXJfOl.js} +6 -6
- package/dist-vue/_chunks/{PkToolShowForm-Crg4Kl6v.js.map → PkToolShowForm-DzsXJfOl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-D9hdGBHK.js → PkToolShowImageGallery-sCyrPOIT.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-D9hdGBHK.js.map → PkToolShowImageGallery-sCyrPOIT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-SC5aKDCw.js → PkToolShowProductList-DPDDeVu4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-SC5aKDCw.js.map → PkToolShowProductList-DPDDeVu4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-Bf9_JwFL.js → PkToolShowSources-D4zjssdh.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-Bf9_JwFL.js.map → PkToolShowSources-D4zjssdh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BlcEfMx8.js → PkToolShowSuggestedReply-smfC1hlT.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BlcEfMx8.js.map → PkToolShowSuggestedReply-smfC1hlT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-C2ITZDNo.js → PkToolShowVideo-C77DAqoZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-C2ITZDNo.js.map → PkToolShowVideo-C77DAqoZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-BrefGxKQ.js → PkToolShowWebPages-D_tqGI6o.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-BrefGxKQ.js.map → PkToolShowWebPages-D_tqGI6o.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Bukf58dz.js → createChatbotApiClient-CO6l0P79.js} +87 -85
- package/dist-vue/_chunks/createChatbotApiClient-CO6l0P79.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-DcvdWkgq.js → useChatbotStore-CY1gAHOh.js} +1224 -1201
- package/dist-vue/_chunks/useChatbotStore-CY1gAHOh.js.map +1 -0
- package/dist-vue/_chunks/{utils-B0PnU1Rk.js → utils-CX4JuhXz.js} +66 -66
- package/dist-vue/_chunks/utils-CX4JuhXz.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
- package/dist-vue/composables.js +16 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3394 -3359
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +16 -0
- package/dist-vue/packages/components/src/chat/PkAgentPageAccessSettings.d.ts +5 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
- package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +10 -8
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +11 -3
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +2 -2
- package/dist-vue/packages/components/src/chat/PkFieldChanges.d.ts +15 -0
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +1 -2
- package/dist-vue/packages/components/src/chat/utils.d.ts +18 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +10 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +31 -4
- package/dist-vue/packages/models/src/schema/Agent.d.ts +41 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +9 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +6 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-BBWFD4nI.js.map +0 -1
- package/dist/_chunks/utils-euH8esYP.js.map +0 -1
- package/dist-vue/_chunks/Agent-DQl-tv4S.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-BRttF7Lo.js +0 -286
- package/dist-vue/_chunks/PkChatbot-BRttF7Lo.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-BK7f1jFE.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-Ck0ofhtK.js +0 -1041
- package/dist-vue/_chunks/PkChatbotMessages-Ck0ofhtK.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-CtKRHqaG.js +0 -189
- package/dist-vue/_chunks/PkChatbotSteps-CtKRHqaG.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-D8depeWQ.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-Bukf58dz.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-DcvdWkgq.js.map +0 -1
- package/dist-vue/_chunks/utils-B0PnU1Rk.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-DAwGWRtd.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-CY1gAHOh.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
|
|
6
|
+
import { L as c, f as l, l as u, n as d, r as f, y as p } from "./utils-CX4JuhXz.js";
|
|
7
|
+
import { t as m } from "./useLocalizedString-Dmn92nix.js";
|
|
8
|
+
import { t as h } from "./PkAvatar-DwtZWSW4.js";
|
|
9
|
+
import { n as g, t as _ } from "./PkChatbotInput-Bs8nn-Jz.js";
|
|
10
|
+
import { t as v } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
11
|
+
import { t as y } from "./PkChatbotEmptyState-C9aUiynZ.js";
|
|
12
12
|
import { t as ee } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
13
|
-
import { VvIcon as
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { useDropZone as
|
|
17
|
-
import { storeToRefs as
|
|
13
|
+
import { VvIcon as b } from "@volverjs/ui-vue/components";
|
|
14
|
+
import { Fragment as x, Teleport as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as te, createTextVNode as ne, createVNode as k, defineAsyncComponent as A, defineComponent as j, inject as re, isRef as ie, nextTick as ae, normalizeClass as M, normalizeStyle as oe, onBeforeUnmount as se, onMounted as ce, onScopeDispose as le, onUnmounted as ue, openBlock as N, provide as de, ref as P, renderList as fe, shallowRef as pe, toDisplayString as F, toValue as I, unref as L, useTemplateRef as me, watch as R, withCtx as z } from "vue";
|
|
15
|
+
import { useI18n as he } from "vue-i18n";
|
|
16
|
+
import { useDropZone as ge, useResizeObserver as _e } from "@vueuse/core";
|
|
17
|
+
import { storeToRefs as ve } from "pinia";
|
|
18
18
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
19
|
-
function
|
|
20
|
-
let { locale: n, t: r, te: i } =
|
|
21
|
-
return
|
|
19
|
+
function ye(e, t) {
|
|
20
|
+
let { locale: n, t: r, te: i } = he({ useScope: "global" });
|
|
21
|
+
return w(() => be(I(e)?.greeting?.[0]?.[n.value] ?? "", I(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function be(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
|
|
27
|
+
var B = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "pk-aurora__fallback"
|
|
30
|
-
},
|
|
30
|
+
}, V = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", xe = "\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}", Se = /* @__PURE__ */ j({
|
|
31
31
|
__name: "PkAuroraCanvas",
|
|
32
32
|
props: {
|
|
33
33
|
sourceSelector: {},
|
|
@@ -36,26 +36,26 @@ var R = {
|
|
|
36
36
|
secondColor: {}
|
|
37
37
|
},
|
|
38
38
|
setup(e) {
|
|
39
|
-
let t = e, n =
|
|
39
|
+
let t = e, n = me("rootEl"), r = me("canvasEl"), i = P(!1), a = P(null), o = w(() => a.value ? {
|
|
40
40
|
"--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
|
|
41
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,
|
|
42
|
+
} : void 0), s = null, l = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null, y = performance.now(), ee = (e, t) => {
|
|
43
43
|
if (!s) return null;
|
|
44
44
|
let n = s.createShader(e);
|
|
45
45
|
return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
|
|
46
|
-
},
|
|
46
|
+
}, b = (e) => e.map((e) => e / 255), x = () => {
|
|
47
47
|
n.value && (a.value = c(n.value, {
|
|
48
48
|
mainColor: t.mainColor,
|
|
49
49
|
tones: t.tones,
|
|
50
50
|
secondColor: t.secondColor
|
|
51
|
-
}), s && !i.value && a.value && (s.uniform3f(g, ...
|
|
51
|
+
}), s && !i.value && a.value && (s.uniform3f(g, ...b(a.value.first)), s.uniform3f(_, ...b(a.value.second)), s.uniform1f(v, +!!a.value.duo), T(C() ? 10 : void 0)));
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
R([
|
|
54
54
|
() => t.mainColor,
|
|
55
55
|
() => t.tones,
|
|
56
56
|
() => t.secondColor
|
|
57
|
-
],
|
|
58
|
-
let
|
|
57
|
+
], x);
|
|
58
|
+
let S = () => {
|
|
59
59
|
if (!s || !r.value) return;
|
|
60
60
|
let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: n, clientHeight: i } = r.value;
|
|
61
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);
|
|
@@ -66,19 +66,19 @@ var R = {
|
|
|
66
66
|
let u = Number.parseFloat(getComputedStyle(r.value).getPropertyValue("--aurora-spread"));
|
|
67
67
|
s.uniform1f(h, Number.isNaN(u) ? 1 : u);
|
|
68
68
|
}
|
|
69
|
-
C(
|
|
70
|
-
},
|
|
71
|
-
s && r.value && (s.uniform1f(d, e ?? (performance.now() -
|
|
72
|
-
},
|
|
73
|
-
|
|
69
|
+
T(C() ? 10 : void 0);
|
|
70
|
+
}, C = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, T = (e) => {
|
|
71
|
+
s && r.value && (s.uniform1f(d, e ?? (performance.now() - y) / 1e3), s.uniform2f(f, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
|
|
72
|
+
}, E = () => {
|
|
73
|
+
T(), l = requestAnimationFrame(E);
|
|
74
74
|
};
|
|
75
|
-
return
|
|
75
|
+
return ce(() => {
|
|
76
76
|
let e = r.value;
|
|
77
|
-
if (
|
|
77
|
+
if (x(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
|
|
78
78
|
i.value = !0;
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
let t =
|
|
81
|
+
let t = ee(s.VERTEX_SHADER, V), n = ee(s.FRAGMENT_SHADER, xe), o = s.createProgram();
|
|
82
82
|
if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
|
|
83
83
|
i.value = !0;
|
|
84
84
|
return;
|
|
@@ -96,28 +96,28 @@ var R = {
|
|
|
96
96
|
1
|
|
97
97
|
]), s.STATIC_DRAW);
|
|
98
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"),
|
|
100
|
-
}),
|
|
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"), x(), u = new ResizeObserver(S), u.observe(e), S(), ae(S), C() ? T(10) : E();
|
|
100
|
+
}), se(() => {
|
|
101
101
|
cancelAnimationFrame(l), u?.disconnect();
|
|
102
|
-
}),
|
|
102
|
+
}), ue(() => {
|
|
103
103
|
let e = s;
|
|
104
104
|
s = null, setTimeout(() => {
|
|
105
105
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
106
106
|
}, 150);
|
|
107
|
-
}), (e, t) => (
|
|
107
|
+
}), (e, t) => (N(), D("div", {
|
|
108
108
|
ref_key: "rootEl",
|
|
109
109
|
ref: n,
|
|
110
110
|
class: "pk-aurora",
|
|
111
111
|
"aria-hidden": "true",
|
|
112
|
-
style:
|
|
113
|
-
}, [i.value ? (
|
|
112
|
+
style: oe(o.value)
|
|
113
|
+
}, [i.value ? (N(), D("div", B)) : (N(), D("canvas", {
|
|
114
114
|
key: 0,
|
|
115
115
|
ref_key: "canvasEl",
|
|
116
116
|
ref: r,
|
|
117
117
|
class: "pk-aurora__canvas"
|
|
118
118
|
}, null, 512))], 4));
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
120
|
+
}), H = .18, Ce = .35, we = /* @__PURE__ */ j({
|
|
121
121
|
__name: "PkVoiceOrb",
|
|
122
122
|
props: {
|
|
123
123
|
sample: {},
|
|
@@ -129,20 +129,20 @@ var R = {
|
|
|
129
129
|
bars: { default: 5 }
|
|
130
130
|
},
|
|
131
131
|
setup(e) {
|
|
132
|
-
let t = e, n =
|
|
132
|
+
let t = e, n = me("barsEl"), r = Array.from({ length: t.bars }, () => H), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
133
133
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
134
134
|
if (!n?.length) {
|
|
135
135
|
let t = Date.now() / 260;
|
|
136
136
|
return Array.from({ length: i }, (n, r) => {
|
|
137
137
|
let i = .65 + .35 * Math.sin(t + r * .9);
|
|
138
|
-
return
|
|
138
|
+
return H + e * 2.4 * i;
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
|
|
142
142
|
return Array.from({ length: i }, (e, t) => {
|
|
143
143
|
let r = 0;
|
|
144
144
|
for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
|
|
145
|
-
return
|
|
145
|
+
return H + r / o / 255 * 2.2;
|
|
146
146
|
});
|
|
147
147
|
}, s = () => {
|
|
148
148
|
let e = n.value?.children;
|
|
@@ -151,36 +151,36 @@ var R = {
|
|
|
151
151
|
});
|
|
152
152
|
}, c = () => {
|
|
153
153
|
let e = o();
|
|
154
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(
|
|
154
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(H, e[n] ?? H)) - t) * Ce), s(), i = requestAnimationFrame(c);
|
|
155
155
|
}, l = () => {
|
|
156
156
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
157
157
|
};
|
|
158
|
-
return
|
|
159
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() =>
|
|
160
|
-
}, { immediate: !0 }),
|
|
161
|
-
class:
|
|
158
|
+
return R(() => t.state, async (e) => {
|
|
159
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => H * 1.6), await ae(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
160
|
+
}, { immediate: !0 }), se(l), (t, r) => (N(), D("div", {
|
|
161
|
+
class: M(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
162
162
|
"aria-hidden": "true"
|
|
163
|
-
}, [
|
|
163
|
+
}, [O("div", {
|
|
164
164
|
ref_key: "barsEl",
|
|
165
165
|
ref: n,
|
|
166
166
|
class: "pk-voice-orb__bars"
|
|
167
|
-
}, [(
|
|
167
|
+
}, [(N(!0), D(x, null, fe(e.bars, (e) => (N(), D("span", {
|
|
168
168
|
key: e,
|
|
169
169
|
class: "pk-voice-orb__bar"
|
|
170
170
|
}))), 128))], 512)], 2));
|
|
171
171
|
}
|
|
172
|
-
}),
|
|
172
|
+
}), Te = {
|
|
173
173
|
key: 0,
|
|
174
174
|
class: "pk-voice-session__badge",
|
|
175
175
|
"aria-hidden": "true"
|
|
176
|
-
},
|
|
176
|
+
}, U = {
|
|
177
177
|
class: "pk-voice-session__status",
|
|
178
178
|
role: "status"
|
|
179
|
-
},
|
|
179
|
+
}, W = {
|
|
180
180
|
key: 0,
|
|
181
181
|
class: "pk-voice-session__live-dot",
|
|
182
182
|
"aria-hidden": "true"
|
|
183
|
-
},
|
|
183
|
+
}, Ee = ["title"], De = ["title"], Oe = { class: "pk-voice-session__actions" }, ke = /* @__PURE__ */ j({
|
|
184
184
|
__name: "PkVoiceSession",
|
|
185
185
|
props: {
|
|
186
186
|
state: {},
|
|
@@ -199,17 +199,17 @@ var R = {
|
|
|
199
199
|
"dismiss"
|
|
200
200
|
],
|
|
201
201
|
setup(e, { emit: t }) {
|
|
202
|
-
let n = e, r = t, { t: i } =
|
|
202
|
+
let n = e, r = t, { t: i } = he({ useScope: "global" }), a = w(() => 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 = w(() => {
|
|
203
203
|
if (n.remainingSeconds === void 0) return;
|
|
204
204
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
205
205
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
206
|
-
}), s =
|
|
206
|
+
}), s = w(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = w(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = w(() => {
|
|
207
207
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
208
208
|
});
|
|
209
209
|
return (t, n) => {
|
|
210
|
-
let u =
|
|
211
|
-
return
|
|
212
|
-
e.error ? (
|
|
210
|
+
let u = b;
|
|
211
|
+
return N(), D("div", { class: M(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
212
|
+
e.error ? (N(), D("span", Te, [k(u, { name: "ri:error-warning-line" })])) : (N(), T(we, {
|
|
213
213
|
key: 1,
|
|
214
214
|
state: e.state,
|
|
215
215
|
sample: e.sample,
|
|
@@ -219,37 +219,37 @@ var R = {
|
|
|
219
219
|
"sample",
|
|
220
220
|
"spectrum"
|
|
221
221
|
])),
|
|
222
|
-
|
|
222
|
+
O("div", U, [O("span", { class: M(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (N(), D("span", W)) : E("", !0), ne(" " + F(a.value), 1)], 2), e.error ? (N(), D("p", {
|
|
223
223
|
key: 0,
|
|
224
224
|
class: "pk-voice-session__detail",
|
|
225
225
|
title: e.rawError ?? e.error
|
|
226
|
-
},
|
|
227
|
-
o.value ? (
|
|
226
|
+
}, F(e.error), 9, Ee)) : E("", !0)]),
|
|
227
|
+
o.value ? (N(), D("span", {
|
|
228
228
|
key: 2,
|
|
229
|
-
class:
|
|
230
|
-
title:
|
|
229
|
+
class: M(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
230
|
+
title: L(i)("hint.voiceRemaining"),
|
|
231
231
|
"aria-hidden": "true"
|
|
232
|
-
},
|
|
233
|
-
|
|
232
|
+
}, F(o.value), 11, De)) : E("", !0),
|
|
233
|
+
O("div", Oe, [e.error ? (N(), D(x, { key: 0 }, [k(g, {
|
|
234
234
|
icon: "ri:refresh-line",
|
|
235
|
-
label:
|
|
235
|
+
label: L(i)("action.retry"),
|
|
236
236
|
onClick: n[0] ||= (e) => r("retry")
|
|
237
|
-
}, null, 8, ["label"]), e.live ? (
|
|
237
|
+
}, null, 8, ["label"]), e.live ? (N(), T(g, {
|
|
238
238
|
key: 0,
|
|
239
239
|
icon: "ri:stop-circle-line",
|
|
240
240
|
modifiers: "danger",
|
|
241
|
-
title:
|
|
242
|
-
"aria-label":
|
|
241
|
+
title: L(i)("action.hangUp"),
|
|
242
|
+
"aria-label": L(i)("action.hangUp"),
|
|
243
243
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
244
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
244
|
+
}, null, 8, ["title", "aria-label"])) : (N(), T(g, {
|
|
245
245
|
key: 1,
|
|
246
246
|
icon: "ri:close-line",
|
|
247
|
-
label:
|
|
247
|
+
label: L(i)("action.close"),
|
|
248
248
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
249
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
249
|
+
}, null, 8, ["label"]))], 64)) : (N(), D(x, { key: 1 }, [k(g, {
|
|
250
250
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
251
|
-
title: e.muted ?
|
|
252
|
-
"aria-label": e.muted ?
|
|
251
|
+
title: e.muted ? L(i)("action.unmute") : L(i)("action.mute"),
|
|
252
|
+
"aria-label": e.muted ? L(i)("action.unmute") : L(i)("action.mute"),
|
|
253
253
|
"aria-pressed": e.muted,
|
|
254
254
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
255
255
|
}, null, 8, [
|
|
@@ -257,18 +257,18 @@ var R = {
|
|
|
257
257
|
"title",
|
|
258
258
|
"aria-label",
|
|
259
259
|
"aria-pressed"
|
|
260
|
-
]),
|
|
260
|
+
]), k(g, {
|
|
261
261
|
icon: "ri:stop-circle-line",
|
|
262
262
|
modifiers: "danger",
|
|
263
|
-
title:
|
|
264
|
-
"aria-label":
|
|
263
|
+
title: L(i)("action.hangUp"),
|
|
264
|
+
"aria-label": L(i)("action.hangUp"),
|
|
265
265
|
onClick: n[4] ||= (e) => r("hang-up")
|
|
266
266
|
}, null, 8, ["title", "aria-label"])], 64))])
|
|
267
267
|
], 2);
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
}),
|
|
271
|
-
let t =
|
|
270
|
+
}), Ae = (e) => {
|
|
271
|
+
let t = pe(), n = P("disconnected"), r = P("listening"), i = P(), o = P([]), s = P(), c = P(), l, u, d = 0, f = !1, p = () => {
|
|
272
272
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
273
273
|
}, m = (e) => {
|
|
274
274
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -340,9 +340,9 @@ var R = {
|
|
|
340
340
|
}
|
|
341
341
|
}, v = () => {
|
|
342
342
|
i.value = void 0;
|
|
343
|
-
},
|
|
343
|
+
}, y = (e) => {
|
|
344
344
|
t.value?.setMicMuted(e);
|
|
345
|
-
},
|
|
345
|
+
}, ee = (e) => {
|
|
346
346
|
let n = t.value;
|
|
347
347
|
if (!n || !e.trim()) return !1;
|
|
348
348
|
try {
|
|
@@ -350,7 +350,7 @@ var R = {
|
|
|
350
350
|
} catch (e) {
|
|
351
351
|
return a.warn("The spoken answer could not be sent", e), !1;
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, b = (e) => {
|
|
354
354
|
let n = t.value;
|
|
355
355
|
if (!n) return 0;
|
|
356
356
|
try {
|
|
@@ -358,21 +358,21 @@ var R = {
|
|
|
358
358
|
} catch {
|
|
359
359
|
return 0;
|
|
360
360
|
}
|
|
361
|
-
},
|
|
361
|
+
}, x = (e) => {
|
|
362
362
|
let n = t.value;
|
|
363
363
|
if (n) try {
|
|
364
364
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
365
365
|
} catch {
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
},
|
|
368
|
+
}, S = () => {
|
|
369
369
|
let e = l;
|
|
370
370
|
l = void 0, d += 1, p(), h(e);
|
|
371
371
|
let r = t.value;
|
|
372
372
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
373
373
|
};
|
|
374
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
375
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
374
|
+
return typeof window < "u" && window.addEventListener("pagehide", S), le(() => {
|
|
375
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", S), g();
|
|
376
376
|
}), {
|
|
377
377
|
status: n,
|
|
378
378
|
mode: r,
|
|
@@ -380,33 +380,33 @@ var R = {
|
|
|
380
380
|
transcript: o,
|
|
381
381
|
remainingSeconds: s,
|
|
382
382
|
chatId: c,
|
|
383
|
-
isActive:
|
|
384
|
-
isConnecting:
|
|
385
|
-
isSpeaking:
|
|
386
|
-
isListening:
|
|
383
|
+
isActive: w(() => n.value === "connected" || n.value === "connecting"),
|
|
384
|
+
isConnecting: w(() => n.value === "connecting"),
|
|
385
|
+
isSpeaking: w(() => n.value === "connected" && r.value === "speaking"),
|
|
386
|
+
isListening: w(() => n.value === "connected" && r.value === "listening"),
|
|
387
387
|
start: _,
|
|
388
388
|
stop: g,
|
|
389
389
|
dismissError: v,
|
|
390
|
-
setMuted:
|
|
391
|
-
sendUserMessage:
|
|
392
|
-
readLevel:
|
|
393
|
-
readSpectrum:
|
|
390
|
+
setMuted: y,
|
|
391
|
+
sendUserMessage: ee,
|
|
392
|
+
readLevel: b,
|
|
393
|
+
readSpectrum: x
|
|
394
394
|
};
|
|
395
|
-
},
|
|
396
|
-
function
|
|
397
|
-
|
|
395
|
+
}, je = Symbol("ChatFilePreviewDock");
|
|
396
|
+
function Me(e) {
|
|
397
|
+
de(je, e);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function Ne() {
|
|
400
|
+
return re(je, void 0);
|
|
401
401
|
}
|
|
402
402
|
// ../../packages/components/src/chat/useWakeupWatch.ts
|
|
403
|
-
var
|
|
403
|
+
var Pe = 4e3, Fe = [
|
|
404
404
|
3e3,
|
|
405
405
|
5e3,
|
|
406
406
|
1e4
|
|
407
|
-
],
|
|
408
|
-
function
|
|
409
|
-
let t =
|
|
407
|
+
], Ie = 12e4, G = 3e4;
|
|
408
|
+
function Le(e) {
|
|
409
|
+
let t = P(null), n = P(!1), r, i = !1, a = () => {
|
|
410
410
|
clearTimeout(r), r = void 0;
|
|
411
411
|
}, o = (e, t) => {
|
|
412
412
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -423,12 +423,12 @@ function Re(e) {
|
|
|
423
423
|
}
|
|
424
424
|
let r = t.value;
|
|
425
425
|
if (r) {
|
|
426
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
427
|
-
o(Math.max(
|
|
426
|
+
let e = Date.parse(r.dueAt) - Date.now() + Pe;
|
|
427
|
+
o(Math.max(Pe, e), () => l(r.wakeId, Date.now(), 0));
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
async function l(t, n, r) {
|
|
431
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
431
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Ie ? await c() : o(Fe[Math.min(r, Fe.length - 1)], () => l(t, n, r + 1)));
|
|
432
432
|
}
|
|
433
433
|
async function u() {
|
|
434
434
|
n.value = !0;
|
|
@@ -452,23 +452,23 @@ function Re(e) {
|
|
|
452
452
|
function h() {
|
|
453
453
|
f = void 0;
|
|
454
454
|
}
|
|
455
|
-
let g =
|
|
456
|
-
|
|
455
|
+
let g = w(() => e.messages().some((e) => e.role === "user"));
|
|
456
|
+
R([e.chatId, g], ([, t]) => {
|
|
457
457
|
d();
|
|
458
458
|
let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
|
|
459
459
|
t && !r && c();
|
|
460
|
-
}, { immediate: !0 }),
|
|
460
|
+
}, { immediate: !0 }), R(e.status, (e, t) => {
|
|
461
461
|
e === "ready" && t !== "ready" && g.value && c();
|
|
462
462
|
});
|
|
463
463
|
let _;
|
|
464
464
|
function v() {
|
|
465
465
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
466
466
|
}
|
|
467
|
-
let
|
|
468
|
-
return document.addEventListener("visibilitychange",
|
|
469
|
-
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v,
|
|
470
|
-
}),
|
|
471
|
-
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange",
|
|
467
|
+
let y = () => v();
|
|
468
|
+
return document.addEventListener("visibilitychange", y), R(() => t.value?.wakeId, (e) => {
|
|
469
|
+
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, G));
|
|
470
|
+
}), se(() => {
|
|
471
|
+
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", y);
|
|
472
472
|
}), {
|
|
473
473
|
pendingWakeup: t,
|
|
474
474
|
isStopping: n,
|
|
@@ -481,8 +481,8 @@ function Re(e) {
|
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
// ../../packages/components/src/chat/useChatFilePreview.ts
|
|
484
|
-
function
|
|
485
|
-
let t =
|
|
484
|
+
function Re(e) {
|
|
485
|
+
let t = P(), n = P(), r = P(!1), i = P(!1), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = async (c) => {
|
|
486
486
|
let l = ++o, u = s;
|
|
487
487
|
t.value = c, i.value = !1;
|
|
488
488
|
let d = a.get(c.storedFileName);
|
|
@@ -513,16 +513,16 @@ function ze(e) {
|
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
// ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
516
|
-
var
|
|
516
|
+
var ze = { class: "pk-chatbot-view-chat__input-stage" }, Be = {
|
|
517
517
|
key: 1,
|
|
518
518
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
519
|
-
},
|
|
519
|
+
}, Ve = { class: "pk-chatbot-view-chat__agent-chip" }, He = {
|
|
520
520
|
key: 0,
|
|
521
521
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
522
|
-
},
|
|
522
|
+
}, Ue = {
|
|
523
523
|
key: 0,
|
|
524
524
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
525
|
-
},
|
|
525
|
+
}, We = 1e3, Ge = 3e3, Ke = 6e4, qe = 3e5, Je = 6e5, Ye = /* @__PURE__ */ j({
|
|
526
526
|
__name: "PkChatbotViewChat",
|
|
527
527
|
props: {
|
|
528
528
|
agentId: {},
|
|
@@ -531,125 +531,126 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
531
531
|
},
|
|
532
532
|
emits: ["show-info", "revise"],
|
|
533
533
|
setup(a, { emit: c }) {
|
|
534
|
-
let
|
|
535
|
-
|
|
536
|
-
let
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}),
|
|
540
|
-
e &&
|
|
534
|
+
let g = A(() => import("./PkToolShowForm-DzsXJfOl.js").then((e) => e.n)), x = A(() => import("./PkToolShowContactForm-K6Z5MUXk.js").then((e) => e.n)), ne = A(() => import("./PkToolShowSuggestedReply-smfC1hlT.js").then((e) => e.n)), j = A(() => import("./PkToolShowSources-D4zjssdh.js").then((e) => e.n)), re = A(() => import("./PkToolRequestGeolocation-euI4VBVe.js").then((e) => e.n)), ae = A(() => import("./PkToolRequestOAuthConnection-DAAYyufP.js")), oe = A(() => import("./PkToolShowLocation-DAQEuCuQ.js").then((e) => e.n)), ce = A(() => import("./PkToolShowDiagram-DrlGh_v6.js")), le = A(() => import("./PkToolChatFile-HWGjtuaT.js").then((e) => e.n)), ue = A(() => import("./PkToolShareDocument-CsS5OTDj.js").then((e) => e.n)), fe = A(() => import("./PkFilePreview-p-AGDrXi.js").then((e) => e.n)), pe = A(() => import("./PkFilePreviewDialog-BpeeWS6d.js").then((e) => e.n)), I = a, be = c, B = r(I.agentId), { agentInterface: V, agentFileUpload: xe, agentType: H, agentVoice: Ce, actions: we, revisedAnswers: Te, messages: U, chat: W, messageFeedbacks: Ee, feedbackDialogMessage: De, isFeedbackSubmitting: Oe, isFeedbackSubmitted: je, feedbackSubmitError: Me, isLeadSubmitted: Pe, isLoadingSubmitLead: Fe, submitLeadError: Ie, input: G, inputMessagePlaceholder: Ye, isConversationBlocked: Xe, baseUrl: Ze, pendingAttachments: Qe, isAttachmentLimitReached: $e, fileLimitError: et, apiClient: K, isDark: tt, hostToolsPending: nt, pageNoticeLevel: rt, hostConfirmation: it, agentPageAccess: at, hostStepTitles: ot, hostStepChanges: st, confirmationMode: ct, canQueue: lt, queuedMessages: ut, backgroundAnswers: dt, inputFocusRequest: ft, pagePointer: pt, pagePointerAvailable: mt, pagePointing: ht } = ve(B);
|
|
535
|
+
de(f, ot), de(d, st);
|
|
536
|
+
let gt = me("inputEl");
|
|
537
|
+
R(ft, () => {
|
|
538
|
+
gt.value?.focus();
|
|
539
|
+
}), R(pt, (e) => {
|
|
540
|
+
e && gt.value?.focus();
|
|
541
541
|
});
|
|
542
|
-
let
|
|
543
|
-
kind:
|
|
544
|
-
label:
|
|
545
|
-
} : void 0),
|
|
546
|
-
let e =
|
|
542
|
+
let _t = w(() => pt.value ? {
|
|
543
|
+
kind: pt.value.kind,
|
|
544
|
+
label: pt.value.label
|
|
545
|
+
} : void 0), vt = w(() => H.value === "reasoning" ? void 0 : xe.value), q = (e) => K.value.getMediaDownloadUrl(I.agentId, B.localChatId, e), { handleSubmit: yt, stopGeneration: bt, regenerate: xt, onUpvote: St, onDownvote: Ct, onFeedback: wt, onFeedbackSubmit: Tt, onLeadSubmit: Et, startNewChat: Dt, addToolOutput: Ot, addToolApprovalResponse: kt, handleFileSelect: At, clearFileLimitError: jt, refreshMessages: Mt, appendMessage: Nt, closePageNotice: Pt, respondHostConfirmation: Ft, editQueuedMessage: It, removeQueuedMessage: Lt, openBackgroundAnswer: Rt, dismissBackgroundAnswer: zt } = B, { t: J } = he({ useScope: "global" }), Bt = w(() => nt.value > 0), Vt = w(() => Bt.value && W.value.status === "ready" ? "streaming" : W.value.status), Ht = m(() => at.value?.notice), Ut = w(() => rt.value ? Ht.value || J(`message.pageAccessNotice.${rt.value}`) : void 0), Wt = w(() => {
|
|
546
|
+
let e = et.value;
|
|
547
547
|
if (e) return e.reason === "per-chat" ? J("message.fileLimitPerChat", { max: e.max }) : J("message.fileLimitPerMessage", { max: e.max });
|
|
548
|
-
}),
|
|
548
|
+
}), Gt = w(() => dt.value.map(({ chatId: e, title: t }) => ({
|
|
549
549
|
id: e,
|
|
550
550
|
text: t ? J("message.backgroundAnswerReady", { title: t }) : J("message.backgroundAnswerReadyUntitled")
|
|
551
|
-
}))),
|
|
552
|
-
|
|
551
|
+
}))), Kt = m(() => V.value?.dismissableNotice), qt = w(() => U.value.some((e) => e.role === "user")), Jt = w(() => I.modifier === "fullscreen" && !qt.value), Yt = ye(V, () => I.userName), Xt = me("chatViewEl"), Zt = Ne(), Qt = w(() => !!Zt?.value), $t = w(() => Zt?.value ?? "body"), en = P(0), tn = P(0);
|
|
552
|
+
_e([Xt, w(() => Zt?.value ?? void 0)], (e) => {
|
|
553
553
|
for (let t of e) {
|
|
554
554
|
let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
|
|
555
|
-
t.target ===
|
|
555
|
+
t.target === Xt.value ? en.value = e : tn.value = e;
|
|
556
556
|
}
|
|
557
557
|
}, { box: "border-box" });
|
|
558
|
-
let
|
|
558
|
+
let nn = w(() => en.value + (Qt.value ? tn.value : 0) >= We), rn = w(() => en.value > 0 && en.value < 576), { target: Y, preview: an, loading: on, error: sn, open: cn, close: ln, reset: un } = Re((e) => K.value.getChatFilePreview(I.agentId, B.localChatId, e)), X = P({}), dn = (e) => {
|
|
559
559
|
let t = (e) => e?.fileId ?? e?.storedFileName;
|
|
560
|
-
return t(e) !== t(Y.value) && (X.value = {}),
|
|
561
|
-
},
|
|
562
|
-
|
|
563
|
-
},
|
|
560
|
+
return t(e) !== t(Y.value) && (X.value = {}), cn(e);
|
|
561
|
+
}, fn = P(!1), pn = w(() => !!Y.value && nn.value && !fn.value), mn = () => {
|
|
562
|
+
ln(), fn.value = !1;
|
|
563
|
+
}, hn = w(() => {
|
|
564
564
|
let e = /* @__PURE__ */ new Map();
|
|
565
|
-
for (let t of
|
|
565
|
+
for (let t of U.value) for (let n of t.parts) {
|
|
566
566
|
let { type: t, state: r, output: i } = n;
|
|
567
|
-
if (
|
|
567
|
+
if ($n.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
|
|
568
568
|
let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
|
|
569
569
|
t.set(i.version, i.storedFileName), e.set(i.fileId, t);
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
for (let [t, n] of e) n.has(1) || n.set(1, t);
|
|
573
573
|
return e;
|
|
574
|
-
}),
|
|
575
|
-
let t = Y.value, n =
|
|
576
|
-
t && n &&
|
|
574
|
+
}), gn = w(() => [...hn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), _n = (e) => {
|
|
575
|
+
let t = Y.value, n = hn.value.get(t?.fileId ?? "")?.get(e);
|
|
576
|
+
t && n && dn({
|
|
577
577
|
...t,
|
|
578
578
|
version: e,
|
|
579
579
|
storedFileName: n
|
|
580
580
|
});
|
|
581
|
-
},
|
|
582
|
-
let e = Y.value, t =
|
|
581
|
+
}, vn = w(() => {
|
|
582
|
+
let e = Y.value, t = gn.value;
|
|
583
583
|
return !!$.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
|
|
584
|
-
}),
|
|
584
|
+
}), yn = () => {
|
|
585
585
|
let e = Y.value;
|
|
586
586
|
e?.fileId && e.version && ($.value?.({
|
|
587
587
|
fileId: e.fileId,
|
|
588
588
|
version: e.version,
|
|
589
589
|
filename: e.filename
|
|
590
|
-
}),
|
|
590
|
+
}), mn());
|
|
591
591
|
};
|
|
592
|
-
|
|
593
|
-
let
|
|
594
|
-
let t = await
|
|
592
|
+
R(() => B.localChatId, un);
|
|
593
|
+
let bn = async (e) => (await K.value.expandSourceContext(I.agentId, e.documentId, e.chunkIndex)).content, xn = async (e) => {
|
|
594
|
+
let t = await K.value.downloadSourceDocument(I.agentId, e);
|
|
595
595
|
window.open(t.downloadUrl, "_blank");
|
|
596
|
-
}, { isOverDropZone:
|
|
597
|
-
dataTypes: (e) => t(e,
|
|
596
|
+
}, { isOverDropZone: Sn } = ge(Xt, {
|
|
597
|
+
dataTypes: (e) => t(e, vt.value?.allowedMimeTypes ?? []),
|
|
598
598
|
onDrop: (e) => {
|
|
599
|
-
if (
|
|
599
|
+
if (vt.value?.enabled && e) for (let t of e) At(t);
|
|
600
600
|
}
|
|
601
|
-
}),
|
|
601
|
+
}), Cn = P(!1), wn = !1, Z = P(!1), Tn = [
|
|
602
602
|
3e3,
|
|
603
603
|
5e3,
|
|
604
604
|
1e4
|
|
605
|
-
],
|
|
606
|
-
function
|
|
607
|
-
clearTimeout(
|
|
605
|
+
], En, Dn, On = !1, kn = 0, An = !1;
|
|
606
|
+
function jn() {
|
|
607
|
+
clearTimeout(En), En = void 0, Dn = void 0, On = !1, kn = 0, Z.value = !1;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
|
|
611
|
-
|
|
609
|
+
function Mn(e) {
|
|
610
|
+
wn || (clearTimeout(En), En = setTimeout(() => {
|
|
611
|
+
Nn();
|
|
612
612
|
}, e));
|
|
613
613
|
}
|
|
614
|
-
async function
|
|
615
|
-
if (
|
|
616
|
-
|
|
614
|
+
async function Nn() {
|
|
615
|
+
if (wn || An) return;
|
|
616
|
+
An = !0;
|
|
617
617
|
let e;
|
|
618
618
|
try {
|
|
619
|
-
e = await
|
|
619
|
+
e = await Mt();
|
|
620
620
|
} finally {
|
|
621
|
-
|
|
621
|
+
An = !1;
|
|
622
622
|
}
|
|
623
|
-
if (
|
|
624
|
-
if (e === "caught-up" && (Z.value = !1,
|
|
625
|
-
|
|
623
|
+
if (wn) return;
|
|
624
|
+
if (e === "caught-up" && (Z.value = !1, ur()), Q.isActive.value) {
|
|
625
|
+
Dn = void 0, On = !1, kn = 0, Mn(Ge);
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
|
|
629
|
-
let t = Date.now() -
|
|
630
|
-
if (e === "caught-up" && t >= (
|
|
631
|
-
|
|
628
|
+
Dn === void 0 && (Dn = Date.now(), On = !!Q.error.value);
|
|
629
|
+
let t = Date.now() - Dn;
|
|
630
|
+
if (e === "caught-up" && t >= (On ? qe : Ke) || t >= Je) {
|
|
631
|
+
jn(), dr();
|
|
632
632
|
return;
|
|
633
633
|
}
|
|
634
|
-
let n =
|
|
635
|
-
|
|
634
|
+
let n = Tn[Math.min(kn, Tn.length - 1)];
|
|
635
|
+
kn += 1, Mn(n);
|
|
636
636
|
}
|
|
637
|
-
let
|
|
638
|
-
|
|
639
|
-
},
|
|
637
|
+
let Pn = (e = 1200) => {
|
|
638
|
+
Mn(e);
|
|
639
|
+
}, Fn, Q = Ae({
|
|
640
640
|
fetchGrant: async () => {
|
|
641
|
-
|
|
642
|
-
let e = await
|
|
643
|
-
deviceContext:
|
|
644
|
-
externalContext:
|
|
645
|
-
pageTools:
|
|
641
|
+
Fn = B.voicePageTools();
|
|
642
|
+
let e = await K.value.createVoiceSession(I.agentId, B.localChatId, {
|
|
643
|
+
deviceContext: B.buildDeviceContext(),
|
|
644
|
+
externalContext: B.externalContext,
|
|
645
|
+
pageTools: Fn?.declaration,
|
|
646
|
+
...B.confirmationMode === "automatic" && { confirmations: "automatic" }
|
|
646
647
|
});
|
|
647
|
-
return e.chatId !==
|
|
648
|
+
return e.chatId !== B.localChatId && (B.localChatId = e.chatId), e;
|
|
648
649
|
},
|
|
649
|
-
closeGrant: (e) =>
|
|
650
|
-
clientTools: () =>
|
|
650
|
+
closeGrant: (e) => K.value.closeVoiceSession(I.agentId, e),
|
|
651
|
+
clientTools: () => Fn?.clientTools,
|
|
651
652
|
onTranscript: (e) => {
|
|
652
|
-
e.role === "user" ? (Z.value = !0,
|
|
653
|
+
e.role === "user" ? (Z.value = !0, lr(), Nt({
|
|
653
654
|
id: `${i}user-${n()}`,
|
|
654
655
|
role: "user",
|
|
655
656
|
parts: [{
|
|
@@ -659,171 +660,171 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
659
660
|
})) : Z.value = !1;
|
|
660
661
|
},
|
|
661
662
|
onTurnEnd: () => {
|
|
662
|
-
|
|
663
|
+
Pn();
|
|
663
664
|
}
|
|
664
665
|
});
|
|
665
|
-
|
|
666
|
-
e ||
|
|
667
|
-
}),
|
|
666
|
+
R(() => Q.isActive.value, (e) => {
|
|
667
|
+
e || B.cancelVoicePageCalls();
|
|
668
|
+
}), R(() => Q.error.value, (e) => {
|
|
668
669
|
e && (Z.value = !1);
|
|
669
670
|
});
|
|
670
|
-
let
|
|
671
|
+
let In = w(() => Ce.value?.enabled === !0), Ln = w(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Rn = w(() => {
|
|
671
672
|
let e = Q.error.value;
|
|
672
673
|
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");
|
|
673
|
-
}),
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
Z.value = !1, await Q.stop(), !
|
|
677
|
-
},
|
|
674
|
+
}), zn = w(() => Q.isSpeaking.value ? "output" : "input"), Bn = () => Q.readLevel(zn.value), Vn = () => Q.readSpectrum(zn.value), Hn = async () => {
|
|
675
|
+
Cn.value = !1, await Q.start(), Q.isActive.value && (jn(), Mn(Ge));
|
|
676
|
+
}, Un = async () => {
|
|
677
|
+
Z.value = !1, await Q.stop(), !wn && Pn(0);
|
|
678
|
+
}, Wn = () => {
|
|
678
679
|
Q.dismissError();
|
|
679
|
-
},
|
|
680
|
-
Q.dismissError(), await Q.stop(), await
|
|
681
|
-
},
|
|
682
|
-
|
|
680
|
+
}, Gn = async () => {
|
|
681
|
+
Q.dismissError(), await Q.stop(), await Hn();
|
|
682
|
+
}, Kn = (e) => e?.toolCallId ?? "", qn = P(/* @__PURE__ */ new Set()), Jn = (e) => qn.value.has(Kn(e)), Yn = P(/* @__PURE__ */ new Map()), Xn = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (qn.value = new Set(qn.value).add(Kn(e)), Pn()), !0) : !1, Zn = (e, t, n) => {
|
|
683
|
+
Xn(t, l(t, n)) || Ot({
|
|
683
684
|
tool: e,
|
|
684
|
-
toolCallId:
|
|
685
|
+
toolCallId: Kn(t),
|
|
685
686
|
output: n
|
|
686
687
|
});
|
|
687
|
-
},
|
|
688
|
+
}, Qn = (e) => {
|
|
688
689
|
let t = e.confirmed ? J("message.voiceConfirmed") : J("message.voiceCancelled");
|
|
689
|
-
|
|
690
|
+
Xn({ toolCallId: e.toolCallId }, t) ? qn.value.has(e.toolCallId) && (Yn.value = new Map(Yn.value).set(e.toolCallId, e.confirmed)) : Ot({
|
|
690
691
|
tool: "requestConfirm",
|
|
691
692
|
toolCallId: e.toolCallId,
|
|
692
693
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
693
694
|
});
|
|
694
|
-
},
|
|
695
|
+
}, $n = /* @__PURE__ */ new Set([
|
|
695
696
|
"tool-editSpreadsheet",
|
|
696
697
|
"tool-editWordDocument",
|
|
697
698
|
"tool-createSpreadsheet",
|
|
698
699
|
"tool-createWordDocument"
|
|
699
|
-
]),
|
|
700
|
+
]), er = w(() => {
|
|
700
701
|
let e = /* @__PURE__ */ new Map();
|
|
701
|
-
for (let t of
|
|
702
|
+
for (let t of U.value) for (let n of t.parts) {
|
|
702
703
|
let { type: t, state: r, output: i } = n;
|
|
703
|
-
|
|
704
|
+
$n.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
|
|
704
705
|
}
|
|
705
706
|
return e;
|
|
706
|
-
}),
|
|
707
|
+
}), tr = w(() => {
|
|
707
708
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
708
709
|
if (t && n) {
|
|
709
710
|
let r = t.toLowerCase();
|
|
710
711
|
e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
|
|
711
712
|
}
|
|
712
713
|
};
|
|
713
|
-
for (let e of
|
|
714
|
+
for (let e of U.value) for (let n of e.parts) {
|
|
714
715
|
if (o(n)) {
|
|
715
716
|
t(n.filename, s(n)?.storedFileName);
|
|
716
717
|
continue;
|
|
717
718
|
}
|
|
718
719
|
let { type: e, state: r, output: i } = n;
|
|
719
|
-
|
|
720
|
+
$n.has(e) && r === "output-available" && i?.filename && t(u(i.filename, i.version), i.fileId);
|
|
720
721
|
}
|
|
721
722
|
return e;
|
|
722
|
-
}), $ =
|
|
723
|
-
let t = (
|
|
724
|
-
|
|
725
|
-
}),
|
|
726
|
-
|
|
727
|
-
},
|
|
723
|
+
}), $ = w(() => Xe.value ? void 0 : (e) => {
|
|
724
|
+
let t = (tr.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
|
|
725
|
+
G.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), yt();
|
|
726
|
+
}), nr = (e, t) => {
|
|
727
|
+
Xn(e, t) || (G.value = t, yt());
|
|
728
|
+
}, rr = (e, t) => {
|
|
728
729
|
let n = t.error ? J("message.voiceLocationRefused") : J("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
729
|
-
|
|
730
|
+
Xn(e, n) || Ot({
|
|
730
731
|
tool: "requestGeolocation",
|
|
731
|
-
toolCallId:
|
|
732
|
+
toolCallId: Kn(e),
|
|
732
733
|
output: t
|
|
733
734
|
});
|
|
734
|
-
},
|
|
735
|
-
|
|
735
|
+
}, ir = (e, t) => {
|
|
736
|
+
Xn(e, J("message.voiceConnectionDone")) || Ot({
|
|
736
737
|
tool: "requestOAuthConnection",
|
|
737
|
-
toolCallId:
|
|
738
|
+
toolCallId: Kn(e),
|
|
738
739
|
output: {
|
|
739
740
|
connected: !0,
|
|
740
741
|
mcpServerId: t
|
|
741
742
|
}
|
|
742
743
|
});
|
|
743
|
-
},
|
|
744
|
-
|
|
744
|
+
}, ar = () => {
|
|
745
|
+
Cn.value = !Cn.value, Q.setMuted(Cn.value);
|
|
745
746
|
};
|
|
746
|
-
|
|
747
|
-
|
|
747
|
+
se(() => {
|
|
748
|
+
wn = !0, jn();
|
|
748
749
|
});
|
|
749
|
-
let { pendingWakeup:
|
|
750
|
-
agentId: () =>
|
|
751
|
-
chatId: () =>
|
|
752
|
-
apiClient: () =>
|
|
753
|
-
messages: () =>
|
|
754
|
-
refreshMessages:
|
|
755
|
-
status: () =>
|
|
750
|
+
let { pendingWakeup: or, isStopping: sr, stop: cr, spokenTurnStarted: lr, spokenTurnsWritten: ur, forgetSpokenTurns: dr } = Le({
|
|
751
|
+
agentId: () => I.agentId,
|
|
752
|
+
chatId: () => B.localChatId,
|
|
753
|
+
apiClient: () => K.value,
|
|
754
|
+
messages: () => U.value,
|
|
755
|
+
refreshMessages: Mt,
|
|
756
|
+
status: () => W.value.status
|
|
756
757
|
});
|
|
757
758
|
return (t, n) => {
|
|
758
|
-
let r =
|
|
759
|
-
return
|
|
759
|
+
let r = b;
|
|
760
|
+
return N(), D("div", {
|
|
760
761
|
ref_key: "chatViewEl",
|
|
761
|
-
ref:
|
|
762
|
-
class:
|
|
763
|
-
"pk-chatbot-view-chat--dragover":
|
|
764
|
-
"pk-chatbot-view-chat--empty":
|
|
765
|
-
"pk-chatbot-view-chat--with-preview":
|
|
762
|
+
ref: Xt,
|
|
763
|
+
class: M(["pk-chatbot-view-chat", {
|
|
764
|
+
"pk-chatbot-view-chat--dragover": L(Sn) && vt.value?.enabled,
|
|
765
|
+
"pk-chatbot-view-chat--empty": Jt.value,
|
|
766
|
+
"pk-chatbot-view-chat--with-preview": pn.value && !Qt.value
|
|
766
767
|
}])
|
|
767
768
|
}, [
|
|
768
|
-
|
|
769
|
+
k(C, {
|
|
769
770
|
name: "pk-chatbot-view-chat-fade",
|
|
770
771
|
mode: "out-in"
|
|
771
772
|
}, {
|
|
772
|
-
default:
|
|
773
|
+
default: z(() => [Jt.value ? (N(), T(y, {
|
|
773
774
|
key: 0,
|
|
774
|
-
greeting:
|
|
775
|
-
logo:
|
|
776
|
-
name:
|
|
775
|
+
greeting: L(Yt),
|
|
776
|
+
logo: L(V)?.logo,
|
|
777
|
+
name: L(B).name
|
|
777
778
|
}, null, 8, [
|
|
778
779
|
"greeting",
|
|
779
780
|
"logo",
|
|
780
781
|
"name"
|
|
781
|
-
])) : (
|
|
782
|
+
])) : (N(), T(e, {
|
|
782
783
|
key: 1,
|
|
783
784
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
784
785
|
interactive: "",
|
|
785
|
-
messages:
|
|
786
|
-
"confirm-verdicts-on-call":
|
|
787
|
-
status:
|
|
788
|
-
error:
|
|
789
|
-
"main-color":
|
|
790
|
-
"text-color":
|
|
791
|
-
"revised-answers":
|
|
792
|
-
actions:
|
|
793
|
-
"message-feedbacks":
|
|
794
|
-
"feedback-message-id":
|
|
795
|
-
"feedback-loading":
|
|
796
|
-
"feedback-submitted":
|
|
797
|
-
"feedback-error":
|
|
798
|
-
"show-extended-steps":
|
|
799
|
-
"hide-reasoning":
|
|
786
|
+
messages: L(U),
|
|
787
|
+
"confirm-verdicts-on-call": Yn.value,
|
|
788
|
+
status: L(W).status,
|
|
789
|
+
error: L(W).error,
|
|
790
|
+
"main-color": L(V)?.mainColor,
|
|
791
|
+
"text-color": L(V)?.textColor,
|
|
792
|
+
"revised-answers": L(Te),
|
|
793
|
+
actions: L(we),
|
|
794
|
+
"message-feedbacks": L(Ee),
|
|
795
|
+
"feedback-message-id": L(De)?.id,
|
|
796
|
+
"feedback-loading": L(Oe),
|
|
797
|
+
"feedback-submitted": L(je),
|
|
798
|
+
"feedback-error": L(Me),
|
|
799
|
+
"show-extended-steps": L(V)?.showExtendedSteps,
|
|
800
|
+
"hide-reasoning": L(V)?.showReasoning === !1,
|
|
800
801
|
"awaiting-spoken-answer": Z.value,
|
|
801
|
-
"host-working":
|
|
802
|
-
"host-confirmation":
|
|
803
|
-
"is-dark":
|
|
802
|
+
"host-working": Bt.value,
|
|
803
|
+
"host-confirmation": L(it),
|
|
804
|
+
"is-dark": L(tt),
|
|
804
805
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
805
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
806
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
807
|
-
onRegenerate:
|
|
808
|
-
onAutoRetry:
|
|
809
|
-
onResetChat:
|
|
810
|
-
onShowInfo: n[2] ||= (e) =>
|
|
811
|
-
onRevise: n[3] ||= (e) =>
|
|
812
|
-
onUpvote:
|
|
813
|
-
onDownvote:
|
|
814
|
-
onFeedback:
|
|
815
|
-
onApprovalRespond:
|
|
816
|
-
onConfirmRespond:
|
|
817
|
-
onHostConfirmRespond:
|
|
806
|
+
onFeedbackSubmit: n[0] ||= (e) => L(Tt)(e),
|
|
807
|
+
onFeedbackClose: n[1] ||= (e) => De.value = void 0,
|
|
808
|
+
onRegenerate: L(xt),
|
|
809
|
+
onAutoRetry: L(xt),
|
|
810
|
+
onResetChat: L(Dt),
|
|
811
|
+
onShowInfo: n[2] ||= (e) => be("show-info", e),
|
|
812
|
+
onRevise: n[3] ||= (e) => be("revise", e),
|
|
813
|
+
onUpvote: L(St),
|
|
814
|
+
onDownvote: L(Ct),
|
|
815
|
+
onFeedback: L(wt),
|
|
816
|
+
onApprovalRespond: L(kt),
|
|
817
|
+
onConfirmRespond: Qn,
|
|
818
|
+
onHostConfirmRespond: L(Ft)
|
|
818
819
|
}, {
|
|
819
|
-
"tool-showContactForm":
|
|
820
|
+
"tool-showContactForm": z(({ part: e }) => [k(L(x), {
|
|
820
821
|
part: e,
|
|
821
|
-
readonly: !
|
|
822
|
-
submitted:
|
|
823
|
-
loading:
|
|
824
|
-
error:
|
|
825
|
-
"privacy-policy-notice":
|
|
826
|
-
onSubmit:
|
|
822
|
+
readonly: !L(Ze),
|
|
823
|
+
submitted: L(Pe),
|
|
824
|
+
loading: L(Fe),
|
|
825
|
+
error: L(Ie),
|
|
826
|
+
"privacy-policy-notice": L(V)?.privacyPolicyNotice,
|
|
827
|
+
onSubmit: L(Et)
|
|
827
828
|
}, null, 8, [
|
|
828
829
|
"part",
|
|
829
830
|
"readonly",
|
|
@@ -833,20 +834,20 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
833
834
|
"privacy-policy-notice",
|
|
834
835
|
"onSubmit"
|
|
835
836
|
])]),
|
|
836
|
-
"tool-showSuggestedReply":
|
|
837
|
+
"tool-showSuggestedReply": z(({ part: e }) => [k(L(ne), {
|
|
837
838
|
part: e,
|
|
838
|
-
onSelect: (t) =>
|
|
839
|
+
onSelect: (t) => nr(e, t)
|
|
839
840
|
}, null, 8, ["part", "onSelect"])]),
|
|
840
|
-
"tool-showSources":
|
|
841
|
+
"tool-showSources": z(({ part: e }) => [k(L(j), {
|
|
841
842
|
part: e,
|
|
842
|
-
"on-expand-context":
|
|
843
|
-
"on-download":
|
|
843
|
+
"on-expand-context": bn,
|
|
844
|
+
"on-download": xn
|
|
844
845
|
}, null, 8, ["part"])]),
|
|
845
|
-
"tool-showForm":
|
|
846
|
-
default:
|
|
846
|
+
"tool-showForm": z(({ part: e }) => [k(C, { mode: "out-in" }, {
|
|
847
|
+
default: z(() => [k(L(g), {
|
|
847
848
|
part: e,
|
|
848
|
-
answered:
|
|
849
|
-
onSelect: (t) =>
|
|
849
|
+
answered: Jn(e),
|
|
850
|
+
onSelect: (t) => Zn("showForm", e, t)
|
|
850
851
|
}, null, 8, [
|
|
851
852
|
"part",
|
|
852
853
|
"answered",
|
|
@@ -854,12 +855,12 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
854
855
|
])]),
|
|
855
856
|
_: 2
|
|
856
857
|
}, 1024)]),
|
|
857
|
-
"tool-showMultipleChoice":
|
|
858
|
-
default:
|
|
858
|
+
"tool-showMultipleChoice": z(({ part: e }) => [k(C, { mode: "out-in" }, {
|
|
859
|
+
default: z(() => [k(L(g), {
|
|
859
860
|
part: e,
|
|
860
861
|
"allow-custom-answer": "",
|
|
861
|
-
answered:
|
|
862
|
-
onSelect: (t) =>
|
|
862
|
+
answered: Jn(e),
|
|
863
|
+
onSelect: (t) => Zn("showMultipleChoice", e, t)
|
|
863
864
|
}, null, 8, [
|
|
864
865
|
"part",
|
|
865
866
|
"answered",
|
|
@@ -867,12 +868,12 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
867
868
|
])]),
|
|
868
869
|
_: 2
|
|
869
870
|
}, 1024)]),
|
|
870
|
-
"tool-requestOAuthConnection":
|
|
871
|
+
"tool-requestOAuthConnection": z(({ part: e }) => [k(L(ae), {
|
|
871
872
|
part: e,
|
|
872
|
-
"backend-url":
|
|
873
|
-
"resolve-connection": (e) =>
|
|
874
|
-
"check-connection": (e) =>
|
|
875
|
-
onConnected: (t) =>
|
|
873
|
+
"backend-url": L(Ze),
|
|
874
|
+
"resolve-connection": (e) => L(K).getOAuthAuthorizeUrl(I.agentId, e),
|
|
875
|
+
"check-connection": (e) => L(K).getOAuthConnectionStatus(I.agentId, e),
|
|
876
|
+
onConnected: (t) => ir(e, t)
|
|
876
877
|
}, null, 8, [
|
|
877
878
|
"part",
|
|
878
879
|
"backend-url",
|
|
@@ -880,164 +881,166 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
880
881
|
"check-connection",
|
|
881
882
|
"onConnected"
|
|
882
883
|
])]),
|
|
883
|
-
"tool-requestGeolocation":
|
|
884
|
+
"tool-requestGeolocation": z(({ part: e }) => [k(L(re), {
|
|
884
885
|
part: e,
|
|
885
|
-
"call-live":
|
|
886
|
-
"reverse-geocode": (e, t) =>
|
|
887
|
-
onResult: (t) =>
|
|
886
|
+
"call-live": L(Q).isActive.value,
|
|
887
|
+
"reverse-geocode": (e, t) => L(K).reverseGeocode(e, t),
|
|
888
|
+
onResult: (t) => rr(e, t)
|
|
888
889
|
}, null, 8, [
|
|
889
890
|
"part",
|
|
890
891
|
"call-live",
|
|
891
892
|
"reverse-geocode",
|
|
892
893
|
"onResult"
|
|
893
894
|
])]),
|
|
894
|
-
"tool-showLocation":
|
|
895
|
+
"tool-showLocation": z(({ part: e }) => [k(L(oe), {
|
|
895
896
|
part: e,
|
|
896
|
-
"is-dark":
|
|
897
|
-
"main-color":
|
|
898
|
-
"forward-geocode": (e, t) =>
|
|
897
|
+
"is-dark": L(tt),
|
|
898
|
+
"main-color": L(V)?.mainColor,
|
|
899
|
+
"forward-geocode": (e, t) => L(K).forwardGeocode(e, t)
|
|
899
900
|
}, null, 8, [
|
|
900
901
|
"part",
|
|
901
902
|
"is-dark",
|
|
902
903
|
"main-color",
|
|
903
904
|
"forward-geocode"
|
|
904
905
|
])]),
|
|
905
|
-
"tool-showDiagram":
|
|
906
|
+
"tool-showDiagram": z(({ part: e }) => [k(L(ce), {
|
|
906
907
|
part: e,
|
|
907
|
-
"is-dark":
|
|
908
|
+
"is-dark": L(tt)
|
|
908
909
|
}, null, 8, ["part", "is-dark"])]),
|
|
909
|
-
"tool-editSpreadsheet":
|
|
910
|
-
key:
|
|
910
|
+
"tool-editSpreadsheet": z(({ part: e }) => [(N(), T(L(le), {
|
|
911
|
+
key: L(p)(e),
|
|
911
912
|
part: e,
|
|
912
913
|
"file-url": q,
|
|
913
|
-
preview:
|
|
914
|
-
"latest-versions":
|
|
914
|
+
preview: dn,
|
|
915
|
+
"latest-versions": er.value,
|
|
915
916
|
restore: $.value
|
|
916
917
|
}, null, 8, [
|
|
917
918
|
"part",
|
|
918
919
|
"latest-versions",
|
|
919
920
|
"restore"
|
|
920
921
|
]))]),
|
|
921
|
-
"tool-editWordDocument":
|
|
922
|
-
key:
|
|
922
|
+
"tool-editWordDocument": z(({ part: e }) => [(N(), T(L(le), {
|
|
923
|
+
key: L(p)(e),
|
|
923
924
|
part: e,
|
|
924
925
|
"file-url": q,
|
|
925
|
-
preview:
|
|
926
|
-
"latest-versions":
|
|
926
|
+
preview: dn,
|
|
927
|
+
"latest-versions": er.value,
|
|
927
928
|
restore: $.value
|
|
928
929
|
}, null, 8, [
|
|
929
930
|
"part",
|
|
930
931
|
"latest-versions",
|
|
931
932
|
"restore"
|
|
932
933
|
]))]),
|
|
933
|
-
"tool-createSpreadsheet":
|
|
934
|
-
key:
|
|
934
|
+
"tool-createSpreadsheet": z(({ part: e }) => [(N(), T(L(le), {
|
|
935
|
+
key: L(p)(e),
|
|
935
936
|
part: e,
|
|
936
937
|
"file-url": q,
|
|
937
|
-
preview:
|
|
938
|
-
"latest-versions":
|
|
938
|
+
preview: dn,
|
|
939
|
+
"latest-versions": er.value,
|
|
939
940
|
restore: $.value
|
|
940
941
|
}, null, 8, [
|
|
941
942
|
"part",
|
|
942
943
|
"latest-versions",
|
|
943
944
|
"restore"
|
|
944
945
|
]))]),
|
|
945
|
-
"tool-createWordDocument":
|
|
946
|
-
key:
|
|
946
|
+
"tool-createWordDocument": z(({ part: e }) => [(N(), T(L(le), {
|
|
947
|
+
key: L(p)(e),
|
|
947
948
|
part: e,
|
|
948
949
|
"file-url": q,
|
|
949
|
-
preview:
|
|
950
|
-
"latest-versions":
|
|
950
|
+
preview: dn,
|
|
951
|
+
"latest-versions": er.value,
|
|
951
952
|
restore: $.value
|
|
952
953
|
}, null, 8, [
|
|
953
954
|
"part",
|
|
954
955
|
"latest-versions",
|
|
955
956
|
"restore"
|
|
956
957
|
]))]),
|
|
957
|
-
"tool-shareDocument":
|
|
958
|
-
key:
|
|
958
|
+
"tool-shareDocument": z(({ part: e }) => [(N(), T(L(ue), {
|
|
959
|
+
key: L(p)(e),
|
|
959
960
|
part: e,
|
|
960
|
-
"on-download":
|
|
961
|
+
"on-download": xn
|
|
961
962
|
}, null, 8, ["part"]))]),
|
|
962
963
|
_: 1
|
|
963
964
|
}, 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(".")))]),
|
|
964
965
|
_: 1
|
|
965
966
|
}),
|
|
966
|
-
|
|
967
|
+
L(ut).length ? (N(), T(v, {
|
|
967
968
|
key: 0,
|
|
968
|
-
messages:
|
|
969
|
-
onEdit:
|
|
970
|
-
onRemove:
|
|
969
|
+
messages: L(ut),
|
|
970
|
+
onEdit: L(It),
|
|
971
|
+
onRemove: L(Lt)
|
|
971
972
|
}, null, 8, [
|
|
972
973
|
"messages",
|
|
973
974
|
"onEdit",
|
|
974
975
|
"onRemove"
|
|
975
|
-
])) :
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
default:
|
|
976
|
+
])) : E("", !0),
|
|
977
|
+
O("div", ze, [
|
|
978
|
+
k(C, { name: "pk-chatbot-view-chat-fade" }, {
|
|
979
|
+
default: z(() => [Jt.value ? (N(), T(Se, {
|
|
979
980
|
key: 0,
|
|
980
981
|
class: "pk-chatbot-view-chat__aurora",
|
|
981
982
|
"source-selector": ".pk-chatbot-input__form",
|
|
982
|
-
"main-color":
|
|
983
|
-
tones:
|
|
984
|
-
"second-color":
|
|
983
|
+
"main-color": L(V)?.mainColor,
|
|
984
|
+
tones: L(V)?.glowTones,
|
|
985
|
+
"second-color": L(V)?.glowSecondColor
|
|
985
986
|
}, null, 8, [
|
|
986
987
|
"main-color",
|
|
987
988
|
"tones",
|
|
988
989
|
"second-color"
|
|
989
|
-
])) :
|
|
990
|
+
])) : E("", !0)]),
|
|
990
991
|
_: 1
|
|
991
992
|
}),
|
|
992
|
-
|
|
993
|
+
L(or) && !L(Xe) ? (N(), T(ee, {
|
|
993
994
|
key: 0,
|
|
994
|
-
pending:
|
|
995
|
-
stopping:
|
|
996
|
-
onStop:
|
|
995
|
+
pending: L(or),
|
|
996
|
+
stopping: L(sr),
|
|
997
|
+
onStop: L(cr)
|
|
997
998
|
}, null, 8, [
|
|
998
999
|
"pending",
|
|
999
1000
|
"stopping",
|
|
1000
1001
|
"onStop"
|
|
1001
|
-
])) :
|
|
1002
|
-
|
|
1002
|
+
])) : E("", !0),
|
|
1003
|
+
L(Xe) ? (N(), D("div", Be, F(L(J)("message.chatErrorConversationBlocked")), 1)) : Ln.value === "idle" ? (N(), T(_, {
|
|
1003
1004
|
key: 3,
|
|
1004
1005
|
ref_key: "inputEl",
|
|
1005
|
-
ref:
|
|
1006
|
-
modelValue:
|
|
1007
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
1008
|
-
"pending-attachments":
|
|
1009
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
1010
|
-
placeholder:
|
|
1011
|
-
"dismissable-notice":
|
|
1012
|
-
"page-notice":
|
|
1013
|
-
status:
|
|
1014
|
-
"max-message-length":
|
|
1015
|
-
"file-upload":
|
|
1016
|
-
"attachment-limit-reached":
|
|
1017
|
-
"attachment-notice":
|
|
1018
|
-
"voice-enabled":
|
|
1019
|
-
"queue-enabled":
|
|
1020
|
-
"answer-notices":
|
|
1021
|
-
"pointer-available":
|
|
1022
|
-
pointing:
|
|
1023
|
-
pointer:
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1006
|
+
ref: gt,
|
|
1007
|
+
modelValue: L(G),
|
|
1008
|
+
"onUpdate:modelValue": n[4] ||= (e) => ie(G) ? G.value = e : null,
|
|
1009
|
+
"pending-attachments": L(Qe),
|
|
1010
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => ie(Qe) ? Qe.value = e : null,
|
|
1011
|
+
placeholder: L(Ye),
|
|
1012
|
+
"dismissable-notice": L(Kt) && L(W).messages.length <= 1 ? L(Kt) : void 0,
|
|
1013
|
+
"page-notice": Ut.value,
|
|
1014
|
+
status: Vt.value,
|
|
1015
|
+
"max-message-length": L(V)?.maxMessageLength,
|
|
1016
|
+
"file-upload": vt.value,
|
|
1017
|
+
"attachment-limit-reached": L($e),
|
|
1018
|
+
"attachment-notice": Wt.value,
|
|
1019
|
+
"voice-enabled": In.value,
|
|
1020
|
+
"queue-enabled": L(lt),
|
|
1021
|
+
"answer-notices": Gt.value,
|
|
1022
|
+
"pointer-available": L(mt),
|
|
1023
|
+
pointing: L(ht),
|
|
1024
|
+
pointer: _t.value,
|
|
1025
|
+
"automatic-confirmations": L(ct) === "automatic",
|
|
1026
|
+
onPoint: n[6] ||= (e) => L(B).pagePointerStart?.(),
|
|
1027
|
+
onRemovePointer: n[7] ||= (e) => pt.value = void 0,
|
|
1028
|
+
onManualConfirmations: n[8] ||= (e) => L(B).setConfirmationMode("manual"),
|
|
1029
|
+
onStopGeneration: L(bt),
|
|
1030
|
+
onSubmit: L(yt),
|
|
1031
|
+
onFileSelect: L(At),
|
|
1032
|
+
onDismissAttachmentNotice: L(jt),
|
|
1033
|
+
onDismissPageNotice: L(Pt),
|
|
1034
|
+
onOpenAnswerNotice: L(Rt),
|
|
1035
|
+
onDismissAnswerNotice: L(zt),
|
|
1036
|
+
onVoiceStart: Hn
|
|
1037
|
+
}, te({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
1035
1038
|
name: "prepend",
|
|
1036
|
-
fn:
|
|
1039
|
+
fn: z(() => [O("span", Ve, [k(h, {
|
|
1037
1040
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
1038
|
-
"img-src":
|
|
1039
|
-
name:
|
|
1040
|
-
}, null, 8, ["img-src", "name"]),
|
|
1041
|
+
"img-src": L(V)?.logo,
|
|
1042
|
+
name: L(B).name
|
|
1043
|
+
}, null, 8, ["img-src", "name"]), L(B).name ? (N(), D("strong", He, F(L(B).name), 1)) : E("", !0)])]),
|
|
1041
1044
|
key: "0"
|
|
1042
1045
|
} : void 0]), 1032, [
|
|
1043
1046
|
"modelValue",
|
|
@@ -1056,6 +1059,7 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1056
1059
|
"pointer-available",
|
|
1057
1060
|
"pointing",
|
|
1058
1061
|
"pointer",
|
|
1062
|
+
"automatic-confirmations",
|
|
1059
1063
|
"onStopGeneration",
|
|
1060
1064
|
"onSubmit",
|
|
1061
1065
|
"onFileSelect",
|
|
@@ -1063,21 +1067,21 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1063
1067
|
"onDismissPageNotice",
|
|
1064
1068
|
"onOpenAnswerNotice",
|
|
1065
1069
|
"onDismissAnswerNotice"
|
|
1066
|
-
])) : (
|
|
1070
|
+
])) : (N(), T(ke, {
|
|
1067
1071
|
key: 2,
|
|
1068
|
-
state:
|
|
1069
|
-
sample:
|
|
1070
|
-
spectrum:
|
|
1071
|
-
"remaining-seconds":
|
|
1072
|
-
muted:
|
|
1073
|
-
error:
|
|
1074
|
-
"raw-error":
|
|
1075
|
-
live:
|
|
1072
|
+
state: Ln.value,
|
|
1073
|
+
sample: Bn,
|
|
1074
|
+
spectrum: Vn,
|
|
1075
|
+
"remaining-seconds": L(Q).remainingSeconds.value,
|
|
1076
|
+
muted: Cn.value,
|
|
1077
|
+
error: Rn.value,
|
|
1078
|
+
"raw-error": L(Q).error.value,
|
|
1079
|
+
live: L(Q).isActive.value,
|
|
1076
1080
|
class: "pk-chatbot-view-chat__voice",
|
|
1077
|
-
onToggleMute:
|
|
1078
|
-
onHangUp:
|
|
1079
|
-
onRetry:
|
|
1080
|
-
onDismiss:
|
|
1081
|
+
onToggleMute: ar,
|
|
1082
|
+
onHangUp: Un,
|
|
1083
|
+
onRetry: Gn,
|
|
1084
|
+
onDismiss: Wn
|
|
1081
1085
|
}, null, 8, [
|
|
1082
1086
|
"state",
|
|
1083
1087
|
"remaining-seconds",
|
|
@@ -1087,41 +1091,41 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1087
1091
|
"live"
|
|
1088
1092
|
]))
|
|
1089
1093
|
]),
|
|
1090
|
-
|
|
1091
|
-
default:
|
|
1094
|
+
k(C, null, {
|
|
1095
|
+
default: z(() => [L(Sn) && vt.value?.enabled ? (N(), D("div", Ue, [k(r, {
|
|
1092
1096
|
name: "ri:upload-cloud-2-line",
|
|
1093
1097
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
1094
|
-
}),
|
|
1098
|
+
}), O("span", null, F(L(J)("action.dropFile")), 1)])) : E("", !0)]),
|
|
1095
1099
|
_: 1
|
|
1096
1100
|
}),
|
|
1097
|
-
|
|
1101
|
+
pn.value ? (N(), T(S, {
|
|
1098
1102
|
key: 1,
|
|
1099
|
-
to:
|
|
1100
|
-
disabled: !
|
|
1101
|
-
}, [
|
|
1103
|
+
to: $t.value,
|
|
1104
|
+
disabled: !Qt.value
|
|
1105
|
+
}, [O("aside", { class: M(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": Qt.value }]) }, [L(Y) ? (N(), T(L(fe), {
|
|
1102
1106
|
key: 0,
|
|
1103
1107
|
mode: X.value.mode,
|
|
1104
|
-
"onUpdate:mode": n[
|
|
1108
|
+
"onUpdate:mode": n[9] ||= (e) => X.value.mode = e,
|
|
1105
1109
|
sheet: X.value.sheet,
|
|
1106
|
-
"onUpdate:sheet": n[
|
|
1110
|
+
"onUpdate:sheet": n[10] ||= (e) => X.value.sheet = e,
|
|
1107
1111
|
zoom: X.value.zoom,
|
|
1108
|
-
"onUpdate:zoom": n[
|
|
1112
|
+
"onUpdate:zoom": n[11] ||= (e) => X.value.zoom = e,
|
|
1109
1113
|
fit: X.value.fit,
|
|
1110
|
-
"onUpdate:fit": n[
|
|
1111
|
-
kind:
|
|
1112
|
-
filename:
|
|
1113
|
-
version:
|
|
1114
|
-
versions:
|
|
1115
|
-
"download-url": q(
|
|
1116
|
-
preview:
|
|
1117
|
-
loading:
|
|
1118
|
-
error:
|
|
1119
|
-
restorable:
|
|
1114
|
+
"onUpdate:fit": n[12] ||= (e) => X.value.fit = e,
|
|
1115
|
+
kind: L(Y).kind,
|
|
1116
|
+
filename: L(Y).filename,
|
|
1117
|
+
version: L(Y).version,
|
|
1118
|
+
versions: gn.value,
|
|
1119
|
+
"download-url": q(L(Y).storedFileName),
|
|
1120
|
+
preview: L(an),
|
|
1121
|
+
loading: L(on),
|
|
1122
|
+
error: L(sn),
|
|
1123
|
+
restorable: vn.value,
|
|
1120
1124
|
resize: "expand",
|
|
1121
|
-
onVersion:
|
|
1122
|
-
onRestore:
|
|
1123
|
-
onResize: n[
|
|
1124
|
-
onClose:
|
|
1125
|
+
onVersion: _n,
|
|
1126
|
+
onRestore: yn,
|
|
1127
|
+
onResize: n[13] ||= (e) => fn.value = !0,
|
|
1128
|
+
onClose: mn
|
|
1125
1129
|
}, null, 8, [
|
|
1126
1130
|
"mode",
|
|
1127
1131
|
"sheet",
|
|
@@ -1136,30 +1140,30 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1136
1140
|
"loading",
|
|
1137
1141
|
"error",
|
|
1138
1142
|
"restorable"
|
|
1139
|
-
])) :
|
|
1140
|
-
|
|
1143
|
+
])) : E("", !0)], 2)], 8, ["to", "disabled"])) : E("", !0),
|
|
1144
|
+
L(Y) && !pn.value ? (N(), T(L(pe), {
|
|
1141
1145
|
key: 2,
|
|
1142
1146
|
mode: X.value.mode,
|
|
1143
|
-
"onUpdate:mode": n[
|
|
1147
|
+
"onUpdate:mode": n[14] ||= (e) => X.value.mode = e,
|
|
1144
1148
|
sheet: X.value.sheet,
|
|
1145
|
-
"onUpdate:sheet": n[
|
|
1149
|
+
"onUpdate:sheet": n[15] ||= (e) => X.value.sheet = e,
|
|
1146
1150
|
zoom: X.value.zoom,
|
|
1147
|
-
"onUpdate:zoom": n[
|
|
1151
|
+
"onUpdate:zoom": n[16] ||= (e) => X.value.zoom = e,
|
|
1148
1152
|
fit: X.value.fit,
|
|
1149
|
-
"onUpdate:fit": n[
|
|
1150
|
-
target:
|
|
1151
|
-
versions:
|
|
1152
|
-
"download-url": q(
|
|
1153
|
-
preview:
|
|
1154
|
-
loading:
|
|
1155
|
-
error:
|
|
1156
|
-
restorable:
|
|
1157
|
-
resize:
|
|
1158
|
-
fullscreen:
|
|
1159
|
-
onVersion:
|
|
1160
|
-
onRestore:
|
|
1161
|
-
onResize: n[
|
|
1162
|
-
onClose:
|
|
1153
|
+
"onUpdate:fit": n[17] ||= (e) => X.value.fit = e,
|
|
1154
|
+
target: L(Y),
|
|
1155
|
+
versions: gn.value,
|
|
1156
|
+
"download-url": q(L(Y).storedFileName),
|
|
1157
|
+
preview: L(an),
|
|
1158
|
+
loading: L(on),
|
|
1159
|
+
error: L(sn),
|
|
1160
|
+
restorable: vn.value,
|
|
1161
|
+
resize: nn.value ? "shrink" : void 0,
|
|
1162
|
+
fullscreen: rn.value,
|
|
1163
|
+
onVersion: _n,
|
|
1164
|
+
onRestore: yn,
|
|
1165
|
+
onResize: n[18] ||= (e) => fn.value = !1,
|
|
1166
|
+
onClose: mn
|
|
1163
1167
|
}, null, 8, [
|
|
1164
1168
|
"mode",
|
|
1165
1169
|
"sheet",
|
|
@@ -1174,11 +1178,11 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
|
|
|
1174
1178
|
"restorable",
|
|
1175
1179
|
"resize",
|
|
1176
1180
|
"fullscreen"
|
|
1177
|
-
])) :
|
|
1181
|
+
])) : E("", !0)
|
|
1178
1182
|
], 2);
|
|
1179
1183
|
};
|
|
1180
1184
|
}
|
|
1181
1185
|
});
|
|
1182
|
-
export {
|
|
1186
|
+
export { we as a, ke as i, Re as n, Se as o, Me as r, Ye as t };
|
|
1183
1187
|
|
|
1184
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
1188
|
+
//# sourceMappingURL=PkChatbotViewChat-CMFc4eLD.js.map
|