@8wave/ai-elements 0.121.0-beta.58 → 0.121.0-beta.59

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.
Files changed (62) hide show
  1. package/dist/ai-elements.es.js +2303 -2267
  2. package/dist/ai-elements.es.js.map +1 -1
  3. package/dist-vue/PkChatbot.js +1 -1
  4. package/dist-vue/PkChatbotEmptyState.js +1 -1
  5. package/dist-vue/PkChatbotInput.js +1 -1
  6. package/dist-vue/PkChatbotViewChat.js +1 -1
  7. package/dist-vue/PkChatbotViewConversations.js +1 -1
  8. package/dist-vue/PkChatbotViewFiles.js +1 -1
  9. package/dist-vue/PkChatbotViewProfile.js +1 -1
  10. package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js +38 -0
  11. package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js.map +1 -0
  12. package/dist-vue/_chunks/{PkChatbot-BjD_4yaD.js → PkChatbot-DtyJG8HB.js} +7 -8
  13. package/dist-vue/_chunks/PkChatbot-DtyJG8HB.js.map +1 -0
  14. package/dist-vue/_chunks/{PkChatbotEmptyState-CMNmmQdu.js → PkChatbotEmptyState-CivaIYxu.js} +2 -3
  15. package/dist-vue/_chunks/PkChatbotEmptyState-CivaIYxu.js.map +1 -0
  16. package/dist-vue/_chunks/{PkChatbotInput-CdpjDIzr.js → PkChatbotInput-mBl1PWIU.js} +88 -88
  17. package/dist-vue/_chunks/PkChatbotInput-mBl1PWIU.js.map +1 -0
  18. package/dist-vue/_chunks/{PkChatbotViewChat-BqFY0Evp.js → PkChatbotViewChat-ZOpF5REL.js} +248 -243
  19. package/dist-vue/_chunks/PkChatbotViewChat-ZOpF5REL.js.map +1 -0
  20. package/dist-vue/_chunks/{PkChatbotViewConversations-DF_c4X6k.js → PkChatbotViewConversations-THKK5wGp.js} +52 -34
  21. package/dist-vue/_chunks/PkChatbotViewConversations-THKK5wGp.js.map +1 -0
  22. package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js → PkChatbotViewFiles-BOGd3r0o.js} +3 -3
  23. package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js.map → PkChatbotViewFiles-BOGd3r0o.js.map} +1 -1
  24. package/dist-vue/_chunks/{PkChatbotViewProfile-Bt0eH8fO.js → PkChatbotViewProfile-XtL9RfC7.js} +3 -4
  25. package/dist-vue/_chunks/PkChatbotViewProfile-XtL9RfC7.js.map +1 -0
  26. package/dist-vue/_chunks/{createChatbotApiClient-BYGLKd_e.js → createChatbotApiClient-Bt387Z64.js} +6 -5
  27. package/dist-vue/_chunks/createChatbotApiClient-Bt387Z64.js.map +1 -0
  28. package/dist-vue/_chunks/{useChatbotStore-O0u7mVit.js → useChatbotStore-pnj_3y4N.js} +718 -687
  29. package/dist-vue/_chunks/useChatbotStore-pnj_3y4N.js.map +1 -0
  30. package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js +86 -0
  31. package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js.map +1 -0
  32. package/dist-vue/api.js +1 -1
  33. package/dist-vue/composables.js +12 -4
  34. package/dist-vue/composables.js.map +1 -1
  35. package/dist-vue/index.js +4252 -4009
  36. package/dist-vue/index.js.map +1 -1
  37. package/dist-vue/locales.js +22 -12
  38. package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +6 -7
  39. package/dist-vue/packages/components/src/chat/PkChatSearchDialog.d.ts +19 -0
  40. package/dist-vue/packages/components/src/chat/{PkAgentSelectorInline.d.ts → PkChatShortcutsDialog.d.ts} +8 -5
  41. package/dist-vue/packages/components/src/chat/PkChatSidebar.d.ts +7 -8
  42. package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
  43. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +4 -1
  44. package/dist-vue/packages/components/src/chat/index.d.ts +1 -2
  45. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +11 -1
  46. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +21 -3
  47. package/dist-vue/packages/composable/src/chatbot/useConversationActions.d.ts +54 -1
  48. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
  49. package/dist-vue/style.css +1 -1
  50. package/package.json +1 -1
  51. package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js +0 -43
  52. package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js.map +0 -1
  53. package/dist-vue/_chunks/PkChatbot-BjD_4yaD.js.map +0 -1
  54. package/dist-vue/_chunks/PkChatbotEmptyState-CMNmmQdu.js.map +0 -1
  55. package/dist-vue/_chunks/PkChatbotInput-CdpjDIzr.js.map +0 -1
  56. package/dist-vue/_chunks/PkChatbotViewChat-BqFY0Evp.js.map +0 -1
  57. package/dist-vue/_chunks/PkChatbotViewConversations-DF_c4X6k.js.map +0 -1
  58. package/dist-vue/_chunks/PkChatbotViewProfile-Bt0eH8fO.js.map +0 -1
  59. package/dist-vue/_chunks/createChatbotApiClient-BYGLKd_e.js.map +0 -1
  60. package/dist-vue/_chunks/useChatbotStore-O0u7mVit.js.map +0 -1
  61. package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js +0 -84
  62. package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js.map +0 -1
@@ -1,23 +1,23 @@
1
1
  import { t as e } from "./PkChatbotMessages-ozG-o8mm.js";
2
2
  import { o as t } from "./Media-DylqhvaF.js";
3
- import { a as n, n as r, t as i } from "./useChatbotStore-O0u7mVit.js";
3
+ import { a as n, n as r, t as i } from "./useChatbotStore-pnj_3y4N.js";
4
4
  import { n as a } from "./src-B-ZKEhTU.js";
5
5
  import { c as o, h as s, n as c } from "./utils-CqPytB2D.js";
6
6
  import { t as l } from "./useLocalizedString-Dmn92nix.js";
7
- import { t as u } from "./PkAvatar-uVRs_DD9.js";
8
- import { n as d, t as f } from "./PkChatbotInput-CdpjDIzr.js";
7
+ import { t as u } from "./PkAvatar-DwtZWSW4.js";
8
+ import { n as d, t as f } from "./PkChatbotInput-mBl1PWIU.js";
9
9
  import { t as p } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
10
- import { t as ee } from "./PkChatbotEmptyState-CMNmmQdu.js";
10
+ import { t as ee } from "./PkChatbotEmptyState-CivaIYxu.js";
11
11
  import { t as m } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
12
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";
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 ae, onMounted as oe, onScopeDispose as se, onUnmounted as ce, openBlock as D, provide as le, ref as O, renderList as ue, shallowRef as k, toDisplayString as A, toValue as de, unref as j, useTemplateRef as M, 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 v(() => F(ue(e)?.greeting?.[0]?.[n.value] ?? "", ue(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
20
+ return v(() => F(de(e)?.greeting?.[0]?.[n.value] ?? "", de(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();
@@ -33,7 +33,7 @@ var ge = {
33
33
  __name: "PkAuroraCanvas",
34
34
  props: { sourceSelector: {} },
35
35
  setup(e) {
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) => {
36
+ let t = e, n = M("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
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;
@@ -62,7 +62,7 @@ var ge = {
62
62
  }, _ = () => {
63
63
  g(), a = requestAnimationFrame(_);
64
64
  };
65
- return ae(() => {
65
+ return oe(() => {
66
66
  let e = n.value;
67
67
  i = e?.getContext("webgl", { alpha: !0 }) ?? null;
68
68
  let t = ee();
@@ -89,14 +89,14 @@ var ge = {
89
89
  ]), i.STATIC_DRAW);
90
90
  let b = i.getAttribLocation(v, "a_position");
91
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(() => {
92
+ }), ae(() => {
93
93
  cancelAnimationFrame(a), o?.disconnect();
94
- }), se(() => {
94
+ }), ce(() => {
95
95
  let e = i;
96
96
  i = null, setTimeout(() => {
97
97
  e?.getExtension("WEBGL_lose_context")?.loseContext();
98
98
  }, 150);
99
- }), (e, t) => (O(), x("div", ge, [r.value ? (O(), x("div", I)) : (O(), x("canvas", {
99
+ }), (e, t) => (D(), x("div", ge, [r.value ? (D(), x("div", I)) : (D(), x("canvas", {
100
100
  key: 0,
101
101
  ref_key: "canvasEl",
102
102
  ref: n,
@@ -115,7 +115,7 @@ var ge = {
115
115
  bars: { default: 5 }
116
116
  },
117
117
  setup(e) {
118
- let t = e, n = de("barsEl"), r = Array.from({ length: t.bars }, () => R), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
118
+ let t = e, n = M("barsEl"), r = Array.from({ length: t.bars }, () => R), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
119
119
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
120
120
  if (!n?.length) {
121
121
  let t = Date.now() / 260;
@@ -143,14 +143,14 @@ var ge = {
143
143
  };
144
144
  return N(() => t.state, async (e) => {
145
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", {
146
+ }, { immediate: !0 }), ae(l), (t, r) => (D(), x("div", {
147
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
- }, [(O(!0), x(g, null, le(e.bars, (e) => (O(), x("span", {
153
+ }, [(D(!0), x(g, null, ue(e.bars, (e) => (D(), x("span", {
154
154
  key: e,
155
155
  class: "pk-voice-orb__bar"
156
156
  }))), 128))], 512)], 2));
@@ -194,8 +194,8 @@ var ge = {
194
194
  });
195
195
  return (t, n) => {
196
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, {
197
+ return D(), x("div", { class: E(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
198
+ e.error ? (D(), x("span", xe, [C(u, { name: "ri:error-warning-line" })])) : (D(), y(be, {
199
199
  key: 1,
200
200
  state: e.state,
201
201
  sample: e.sample,
@@ -205,37 +205,37 @@ var ge = {
205
205
  "sample",
206
206
  "spectrum"
207
207
  ])),
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", {
208
+ S("div", z, [S("span", { class: E(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), x("span", B)) : b("", !0), ne(" " + A(a.value), 1)], 2), e.error ? (D(), 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)) : b("", !0)]),
213
- o.value ? (O(), x("span", {
212
+ }, A(e.error), 9, Se)) : b("", !0)]),
213
+ o.value ? (D(), x("span", {
214
214
  key: 2,
215
215
  class: E(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
216
- title: M(i)("hint.voiceRemaining"),
216
+ title: j(i)("hint.voiceRemaining"),
217
217
  "aria-hidden": "true"
218
- }, j(o.value), 11, Ce)) : b("", !0),
219
- S("div", we, [e.error ? (O(), x(g, { key: 0 }, [C(d, {
218
+ }, A(o.value), 11, Ce)) : b("", !0),
219
+ S("div", we, [e.error ? (D(), x(g, { key: 0 }, [C(d, {
220
220
  icon: "ri:refresh-line",
221
- label: M(i)("action.retry"),
221
+ label: j(i)("action.retry"),
222
222
  onClick: n[0] ||= (e) => r("retry")
223
- }, null, 8, ["label"]), e.live ? (O(), y(d, {
223
+ }, null, 8, ["label"]), e.live ? (D(), y(d, {
224
224
  key: 0,
225
225
  icon: "ri:stop-circle-line",
226
226
  modifiers: "danger",
227
- title: M(i)("action.hangUp"),
228
- "aria-label": M(i)("action.hangUp"),
227
+ title: j(i)("action.hangUp"),
228
+ "aria-label": j(i)("action.hangUp"),
229
229
  onClick: n[1] ||= (e) => r("hang-up")
230
- }, null, 8, ["title", "aria-label"])) : (O(), y(d, {
230
+ }, null, 8, ["title", "aria-label"])) : (D(), y(d, {
231
231
  key: 1,
232
232
  icon: "ri:close-line",
233
- label: M(i)("action.close"),
233
+ label: j(i)("action.close"),
234
234
  onClick: n[2] ||= (e) => r("dismiss")
235
- }, null, 8, ["label"]))], 64)) : (O(), x(g, { key: 1 }, [C(d, {
235
+ }, null, 8, ["label"]))], 64)) : (D(), x(g, { key: 1 }, [C(d, {
236
236
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
237
- title: e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
238
- "aria-label": e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
237
+ title: e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
238
+ "aria-label": e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
239
239
  "aria-pressed": e.muted,
240
240
  onClick: n[3] ||= (e) => r("toggle-mute")
241
241
  }, null, 8, [
@@ -246,15 +246,15 @@ var ge = {
246
246
  ]), C(d, {
247
247
  icon: "ri:stop-circle-line",
248
248
  modifiers: "danger",
249
- title: M(i)("action.hangUp"),
250
- "aria-label": M(i)("action.hangUp"),
249
+ title: j(i)("action.hangUp"),
250
+ "aria-label": j(i)("action.hangUp"),
251
251
  onClick: n[4] ||= (e) => r("hang-up")
252
252
  }, null, 8, ["title", "aria-label"])], 64))])
253
253
  ], 2);
254
254
  };
255
255
  }
256
256
  }), Ee = (e) => {
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 = () => {
257
+ let t = k(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), 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 = () => {
@@ -356,7 +356,7 @@ var ge = {
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", te), oe(() => {
359
+ return typeof window < "u" && window.addEventListener("pagehide", te), se(() => {
360
360
  f = !0, typeof window < "u" && window.removeEventListener("pagehide", te), h();
361
361
  }), {
362
362
  status: n,
@@ -383,7 +383,7 @@ var ge = {
383
383
  1e4
384
384
  ], ke = 12e4, Ae = 3e4;
385
385
  function je(e) {
386
- let t = k(null), n = k(!1), r, i = !1, a = () => {
386
+ let t = O(null), n = O(!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));
@@ -444,7 +444,7 @@ function je(e) {
444
444
  let y = () => _();
445
445
  return document.addEventListener("visibilitychange", y), N(() => t.value?.wakeId, (e) => {
446
446
  clearInterval(g), g = void 0, e && !i && (_(), g = setInterval(_, Ae));
447
- }), D(() => {
447
+ }), ae(() => {
448
448
  i = !0, a(), clearInterval(g), document.removeEventListener("visibilitychange", y);
449
449
  }), {
450
450
  pendingWakeup: t,
@@ -476,121 +476,125 @@ 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 g = w(() => import("./PkToolShowForm-CblYA_3B.js").then((e) => e.n)), ne = w(() => import("./PkToolShowContactForm-B3uOHhnG.js").then((e) => e.n)), T = w(() => import("./PkToolShowSuggestedReply-CQgkPMgE.js").then((e) => e.n)), ie = w(() => import("./PkToolShowSources-Ci8ssht-.js").then((e) => e.n)), ae = w(() => import("./PkToolRequestGeolocation-DXHDyI5N.js")), oe = w(() => import("./PkToolRequestOAuthConnection-D5hBaUNG.js")), se = w(() => import("./PkToolShowLocation-Cq0IXye1.js").then((e) => e.n)), le = w(() => import("./PkToolShowDiagram-CHLApsxe.js")), A = w(() => import("./PkToolChatFile-CVRYORvL.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 }) => ({
479
+ let g = w(() => import("./PkToolShowForm-CblYA_3B.js").then((e) => e.n)), ne = w(() => import("./PkToolShowContactForm-B3uOHhnG.js").then((e) => e.n)), T = w(() => import("./PkToolShowSuggestedReply-CQgkPMgE.js").then((e) => e.n)), ie = w(() => import("./PkToolShowSources-Ci8ssht-.js").then((e) => e.n)), oe = w(() => import("./PkToolRequestGeolocation-DXHDyI5N.js")), se = w(() => import("./PkToolRequestOAuthConnection-D5hBaUNG.js")), ce = w(() => import("./PkToolShowLocation-Cq0IXye1.js").then((e) => e.n)), ue = w(() => import("./PkToolShowDiagram-CHLApsxe.js")), k = w(() => import("./PkToolChatFile-CVRYORvL.js")), de = 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: He, inputMessagePlaceholder: Ue, isConversationBlocked: We, baseUrl: Ge, pendingAttachments: Ke, isAttachmentLimitReached: qe, fileLimitError: Je, apiClient: V, isDark: Ye, hostToolsPending: Xe, pageNoticeLevel: Ze, hostConfirmation: Qe, agentPageAccess: $e, hostStepTitles: et, canQueue: tt, queuedMessages: nt, backgroundAnswers: rt, inputFocusRequest: it } = me(I);
480
+ le(c, et);
481
+ let at = M("inputEl");
482
+ N(it, () => {
483
+ at.value?.focus();
484
+ });
485
+ let H = v(() => R.value === "reasoning" ? void 0 : _e.value), U = (e) => V.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: ot, stopGeneration: st, regenerate: ct, onUpvote: lt, onDownvote: ut, onFeedback: dt, onFeedbackSubmit: ft, onLeadSubmit: pt, startNewChat: mt, addToolOutput: W, addToolApprovalResponse: ht, handleFileSelect: gt, clearFileLimitError: _t, refreshMessages: vt, appendMessage: yt, closePageNotice: bt, respondHostConfirmation: xt, editQueuedMessage: St, removeQueuedMessage: Ct, openBackgroundAnswer: wt, dismissBackgroundAnswer: Tt } = I, { t: G } = fe({ useScope: "global" }), Et = v(() => Xe.value > 0), Dt = v(() => Et.value && B.value.status === "ready" ? "streaming" : B.value.status), Ot = l(() => $e.value?.notice), kt = v(() => Ze.value ? Ot.value || G(`message.pageAccessNotice.${Ze.value}`) : void 0), At = v(() => {
486
+ let e = Je.value;
487
+ if (e) return e.reason === "per-chat" ? G("message.fileLimitPerChat", { max: e.max }) : G("message.fileLimitPerMessage", { max: e.max });
488
+ }), jt = v(() => rt.value.map(({ chatId: e, title: t }) => ({
485
489
  id: e,
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);
490
+ text: t ? G("message.backgroundAnswerReady", { title: t }) : G("message.backgroundAnswerReadyUntitled")
491
+ }))), Mt = l(() => L.value?.dismissableNotice), Nt = v(() => z.value.some((e) => e.role === "user")), Pt = v(() => F.modifier === "fullscreen" && !Nt.value), Ft = he(L, () => F.userName), It = M("chatViewEl"), Lt = async (e) => (await V.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Rt = async (e) => {
492
+ let t = await V.value.downloadSourceDocument(F.agentId, e);
489
493
  window.open(t.downloadUrl, "_blank");
490
- }, { isOverDropZone: It } = pe(Nt, {
491
- dataTypes: (e) => t(e, U.value?.allowedMimeTypes ?? []),
494
+ }, { isOverDropZone: zt } = pe(It, {
495
+ dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
492
496
  onDrop: (e) => {
493
- if (U.value?.enabled && e) for (let t of e) pt(t);
497
+ if (H.value?.enabled && e) for (let t of e) gt(t);
494
498
  }
495
- }), q = k(!1), J = !1, Y = k(!1), Lt = [
499
+ }), K = O(!1), q = !1, J = O(!1), Bt = [
496
500
  3e3,
497
501
  5e3,
498
502
  1e4
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;
503
+ ], Y, X, Vt = !1, Ht = 0, Ut = !1;
504
+ function Wt() {
505
+ clearTimeout(Y), Y = void 0, X = void 0, Vt = !1, Ht = 0, J.value = !1;
502
506
  }
503
- function Ut(e) {
504
- J || (clearTimeout(Rt), Rt = setTimeout(() => {
505
- Wt();
507
+ function Gt(e) {
508
+ q || (clearTimeout(Y), Y = setTimeout(() => {
509
+ Kt();
506
510
  }, e));
507
511
  }
508
- async function Wt() {
509
- if (J || Vt) return;
510
- Vt = !0;
512
+ async function Kt() {
513
+ if (q || Ut) return;
514
+ Ut = !0;
511
515
  let e;
512
516
  try {
513
- e = await ht();
517
+ e = await vt();
514
518
  } finally {
515
- Vt = !1;
519
+ Ut = !1;
516
520
  }
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);
521
+ if (q) return;
522
+ if (e === "caught-up" && (J.value = !1, vn()), Z.isActive.value) {
523
+ X = void 0, Vt = !1, Ht = 0, Gt(Le);
520
524
  return;
521
525
  }
522
- X === void 0 && (X = Date.now(), zt = !!Z.error.value);
526
+ X === void 0 && (X = Date.now(), Vt = !!Z.error.value);
523
527
  let t = Date.now() - X;
524
- if (e === "caught-up" && t >= (zt ? ze : Re) || t >= Be) {
525
- Ht(), _n();
528
+ if (e === "caught-up" && t >= (Vt ? ze : Re) || t >= Be) {
529
+ Wt(), yn();
526
530
  return;
527
531
  }
528
- let n = Lt[Math.min(Bt, Lt.length - 1)];
529
- Bt += 1, Ut(n);
532
+ let n = Bt[Math.min(Ht, Bt.length - 1)];
533
+ Ht += 1, Gt(n);
530
534
  }
531
- let Gt = (e = 1200) => {
532
- Ut(e);
535
+ let qt = (e = 1200) => {
536
+ Gt(e);
533
537
  }, Z = Ee({
534
538
  fetchGrant: async () => {
535
- let e = await H.value.createVoiceSession(F.agentId, I.localChatId, {
539
+ let e = await V.value.createVoiceSession(F.agentId, I.localChatId, {
536
540
  deviceContext: I.buildDeviceContext(),
537
541
  externalContext: I.externalContext
538
542
  });
539
543
  return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
540
544
  },
541
- closeGrant: (e) => H.value.closeVoiceSession(F.agentId, e),
545
+ closeGrant: (e) => V.value.closeVoiceSession(F.agentId, e),
542
546
  onTranscript: (e) => {
543
- e.role === "user" ? (Y.value = !0, hn(), gt({
547
+ e.role === "user" ? (J.value = !0, _n(), yt({
544
548
  id: `${i}user-${n()}`,
545
549
  role: "user",
546
550
  parts: [{
547
551
  type: "text",
548
552
  text: e.text
549
553
  }]
550
- })) : Y.value = !1;
554
+ })) : J.value = !1;
551
555
  },
552
556
  onTurnEnd: () => {
553
- Gt();
557
+ qt();
554
558
  }
555
559
  });
556
560
  N(() => Z.error.value, (e) => {
557
- e && (Y.value = !1);
561
+ e && (J.value = !1);
558
562
  });
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(() => {
563
+ let Jt = v(() => ye.value?.enabled === !0), Yt = v(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Xt = v(() => {
560
564
  let e = Z.error.value;
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
- }, $t = async () => {
565
- Y.value = !1, await Z.stop(), !J && Gt(0);
566
- }, en = () => {
567
- Z.dismissError();
565
+ if (e) return /took too long/i.test(e) ? G("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? G("message.voiceNoAnswer") : G("message.voiceInterrupted");
566
+ }), Zt = v(() => Z.isSpeaking.value ? "output" : "input"), Qt = () => Z.readLevel(Zt.value), $t = () => Z.readSpectrum(Zt.value), en = async () => {
567
+ K.value = !1, await Z.start(), Z.isActive.value && (Wt(), Gt(Le));
568
568
  }, tn = async () => {
569
- Z.dismissError(), await Z.stop(), await Qt();
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({
569
+ J.value = !1, await Z.stop(), !q && qt(0);
570
+ }, nn = () => {
571
+ Z.dismissError();
572
+ }, rn = async () => {
573
+ Z.dismissError(), await Z.stop(), await en();
574
+ }, Q = (e) => e?.toolCallId ?? "", an = O(/* @__PURE__ */ new Set()), on = (e) => an.value.has(Q(e)), sn = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (an.value = new Set(an.value).add(Q(e)), qt()), !0) : !1, cn = (e, t, n) => {
575
+ $(t, o(t, n)) || W({
572
576
  tool: e,
573
577
  toolCallId: Q(t),
574
578
  output: n
575
579
  });
576
- }, sn = (e) => {
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({
580
+ }, ln = (e) => {
581
+ let t = e.confirmed ? G("message.voiceConfirmed") : G("message.voiceCancelled");
582
+ $({ toolCallId: e.toolCallId }, t) ? an.value.has(e.toolCallId) && (sn.value = new Map(sn.value).set(e.toolCallId, e.confirmed)) : W({
579
583
  tool: "requestConfirm",
580
584
  toolCallId: e.toolCallId,
581
585
  output: e.confirmed ? "confirmed" : "cancelled"
582
586
  });
583
- }, cn = (e, t) => {
584
- $(e, t) || (V.value = t, rt());
585
- }, ln = (e, t) => {
586
- let n = t.error ? K("message.voiceLocationRefused") : K("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
587
- $(e, n) || G({
587
+ }, un = (e, t) => {
588
+ $(e, t) || (He.value = t, ot());
589
+ }, dn = (e, t) => {
590
+ let n = t.error ? G("message.voiceLocationRefused") : G("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
591
+ $(e, n) || W({
588
592
  tool: "requestGeolocation",
589
593
  toolCallId: Q(e),
590
594
  output: t
591
595
  });
592
- }, un = (e, t) => {
593
- $(e, K("message.voiceConnectionDone")) || G({
596
+ }, fn = (e, t) => {
597
+ $(e, G("message.voiceConnectionDone")) || W({
594
598
  tool: "requestOAuthConnection",
595
599
  toolCallId: Q(e),
596
600
  output: {
@@ -598,88 +602,88 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
598
602
  mcpServerId: t
599
603
  }
600
604
  });
601
- }, dn = () => {
602
- q.value = !q.value, Z.setMuted(q.value);
605
+ }, pn = () => {
606
+ K.value = !K.value, Z.setMuted(K.value);
603
607
  };
604
- D(() => {
605
- J = !0, Ht();
608
+ ae(() => {
609
+ q = !0, Wt();
606
610
  });
607
- let { pendingWakeup: fn, isStopping: pn, stop: mn, spokenTurnStarted: hn, spokenTurnsWritten: gn, forgetSpokenTurns: _n } = je({
611
+ let { pendingWakeup: mn, isStopping: hn, stop: gn, spokenTurnStarted: _n, spokenTurnsWritten: vn, forgetSpokenTurns: yn } = je({
608
612
  agentId: () => F.agentId,
609
613
  chatId: () => I.localChatId,
610
- apiClient: () => H.value,
614
+ apiClient: () => V.value,
611
615
  messages: () => z.value,
612
- refreshMessages: ht,
616
+ refreshMessages: vt,
613
617
  status: () => B.value.status
614
618
  });
615
619
  return (t, n) => {
616
620
  let r = h;
617
- return O(), x("div", {
621
+ return D(), x("div", {
618
622
  ref_key: "chatViewEl",
619
- ref: Nt,
623
+ ref: It,
620
624
  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
625
+ "pk-chatbot-view-chat--dragover": j(zt) && H.value?.enabled,
626
+ "pk-chatbot-view-chat--empty": Pt.value
623
627
  }])
624
628
  }, [
625
629
  C(_, {
626
630
  name: "pk-chatbot-view-chat-fade",
627
631
  mode: "out-in"
628
632
  }, {
629
- default: P(() => [jt.value ? (O(), y(ee, {
633
+ default: P(() => [Pt.value ? (D(), y(ee, {
630
634
  key: 0,
631
- greeting: M(Mt),
632
- logo: M(L)?.logo,
633
- name: M(I).name
635
+ greeting: j(Ft),
636
+ logo: j(L)?.logo,
637
+ name: j(I).name
634
638
  }, null, 8, [
635
639
  "greeting",
636
640
  "logo",
637
641
  "name"
638
- ])) : (O(), y(e, {
642
+ ])) : (D(), y(e, {
639
643
  key: 1,
640
644
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
641
645
  interactive: "",
642
- messages: M(z),
643
- "confirm-verdicts-on-call": an.value,
644
- status: M(B).status,
645
- error: M(B).error,
646
- "main-color": M(L)?.mainColor,
647
- "text-color": M(L)?.textColor,
648
- "revised-answers": M(xe),
649
- actions: M(be),
650
- "message-feedbacks": M(Se),
651
- "feedback-message-id": M(Ce)?.id,
652
- "feedback-loading": M(we),
653
- "feedback-submitted": M(De),
654
- "feedback-error": M(Oe),
655
- "show-extended-steps": M(L)?.showExtendedSteps,
656
- "awaiting-spoken-answer": Y.value,
657
- "host-working": Ct.value,
658
- "host-confirmation": M(Ze),
659
- "is-dark": M(Je),
646
+ messages: j(z),
647
+ "confirm-verdicts-on-call": sn.value,
648
+ status: j(B).status,
649
+ error: j(B).error,
650
+ "main-color": j(L)?.mainColor,
651
+ "text-color": j(L)?.textColor,
652
+ "revised-answers": j(xe),
653
+ actions: j(be),
654
+ "message-feedbacks": j(Se),
655
+ "feedback-message-id": j(Ce)?.id,
656
+ "feedback-loading": j(we),
657
+ "feedback-submitted": j(De),
658
+ "feedback-error": j(Oe),
659
+ "show-extended-steps": j(L)?.showExtendedSteps,
660
+ "awaiting-spoken-answer": J.value,
661
+ "host-working": Et.value,
662
+ "host-confirmation": j(Qe),
663
+ "is-dark": j(Ye),
660
664
  "show-scroll-to-bottom": a.modifier === "fullscreen",
661
- onFeedbackSubmit: n[0] ||= (e) => M(lt)(e),
665
+ onFeedbackSubmit: n[0] ||= (e) => j(ft)(e),
662
666
  onFeedbackClose: n[1] ||= (e) => Ce.value = void 0,
663
- onRegenerate: M(at),
664
- onAutoRetry: M(at),
665
- onResetChat: M(dt),
667
+ onRegenerate: j(ct),
668
+ onAutoRetry: j(ct),
669
+ onResetChat: j(mt),
666
670
  onShowInfo: n[2] ||= (e) => ge("show-info", e),
667
671
  onRevise: n[3] ||= (e) => ge("revise", e),
668
- onUpvote: M(ot),
669
- onDownvote: M(st),
670
- onFeedback: M(ct),
671
- onApprovalRespond: M(ft),
672
- onConfirmRespond: sn,
673
- onHostConfirmRespond: M(vt)
672
+ onUpvote: j(lt),
673
+ onDownvote: j(ut),
674
+ onFeedback: j(dt),
675
+ onApprovalRespond: j(ht),
676
+ onConfirmRespond: ln,
677
+ onHostConfirmRespond: j(xt)
674
678
  }, {
675
- "tool-showContactForm": P(({ part: e }) => [C(M(ne), {
679
+ "tool-showContactForm": P(({ part: e }) => [C(j(ne), {
676
680
  part: e,
677
- readonly: !M(We),
678
- submitted: M(ke),
679
- loading: M(Ae),
680
- error: M(Ve),
681
- "privacy-policy-notice": M(L)?.privacyPolicyNotice,
682
- onSubmit: M(ut)
681
+ readonly: !j(Ge),
682
+ submitted: j(ke),
683
+ loading: j(Ae),
684
+ error: j(Ve),
685
+ "privacy-policy-notice": j(L)?.privacyPolicyNotice,
686
+ onSubmit: j(pt)
683
687
  }, null, 8, [
684
688
  "part",
685
689
  "readonly",
@@ -689,20 +693,20 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
689
693
  "privacy-policy-notice",
690
694
  "onSubmit"
691
695
  ])]),
692
- "tool-showSuggestedReply": P(({ part: e }) => [C(M(T), {
696
+ "tool-showSuggestedReply": P(({ part: e }) => [C(j(T), {
693
697
  part: e,
694
- onSelect: (t) => cn(e, t)
698
+ onSelect: (t) => un(e, t)
695
699
  }, null, 8, ["part", "onSelect"])]),
696
- "tool-showSources": P(({ part: e }) => [C(M(ie), {
700
+ "tool-showSources": P(({ part: e }) => [C(j(ie), {
697
701
  part: e,
698
- "on-expand-context": Pt,
699
- "on-download": Ft
702
+ "on-expand-context": Lt,
703
+ "on-download": Rt
700
704
  }, null, 8, ["part"])]),
701
705
  "tool-showForm": P(({ part: e }) => [C(_, { mode: "out-in" }, {
702
- default: P(() => [C(M(g), {
706
+ default: P(() => [C(j(g), {
703
707
  part: e,
704
- answered: rn(e),
705
- onSelect: (t) => on("showForm", e, t)
708
+ answered: on(e),
709
+ onSelect: (t) => cn("showForm", e, t)
706
710
  }, null, 8, [
707
711
  "part",
708
712
  "answered",
@@ -711,11 +715,11 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
711
715
  _: 2
712
716
  }, 1024)]),
713
717
  "tool-showMultipleChoice": P(({ part: e }) => [C(_, { mode: "out-in" }, {
714
- default: P(() => [C(M(g), {
718
+ default: P(() => [C(j(g), {
715
719
  part: e,
716
720
  "allow-custom-answer": "",
717
- answered: rn(e),
718
- onSelect: (t) => on("showMultipleChoice", e, t)
721
+ answered: on(e),
722
+ onSelect: (t) => cn("showMultipleChoice", e, t)
719
723
  }, null, 8, [
720
724
  "part",
721
725
  "answered",
@@ -723,12 +727,12 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
723
727
  ])]),
724
728
  _: 2
725
729
  }, 1024)]),
726
- "tool-requestOAuthConnection": P(({ part: e }) => [C(M(oe), {
730
+ "tool-requestOAuthConnection": P(({ part: e }) => [C(j(se), {
727
731
  part: e,
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
- onConnected: (t) => un(e, t)
732
+ "backend-url": j(Ge),
733
+ "resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(F.agentId, e),
734
+ "check-connection": (e) => j(V).getOAuthConnectionStatus(F.agentId, e),
735
+ onConnected: (t) => fn(e, t)
732
736
  }, null, 8, [
733
737
  "part",
734
738
  "backend-url",
@@ -736,66 +740,66 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
736
740
  "check-connection",
737
741
  "onConnected"
738
742
  ])]),
739
- "tool-requestGeolocation": P(({ part: e }) => [C(M(ae), {
743
+ "tool-requestGeolocation": P(({ part: e }) => [C(j(oe), {
740
744
  part: e,
741
- "call-live": M(Z).isActive.value,
742
- "reverse-geocode": (e, t) => M(H).reverseGeocode(e, t),
743
- onResult: (t) => ln(e, t)
745
+ "call-live": j(Z).isActive.value,
746
+ "reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
747
+ onResult: (t) => dn(e, t)
744
748
  }, null, 8, [
745
749
  "part",
746
750
  "call-live",
747
751
  "reverse-geocode",
748
752
  "onResult"
749
753
  ])]),
750
- "tool-showLocation": P(({ part: e }) => [C(M(se), {
754
+ "tool-showLocation": P(({ part: e }) => [C(j(ce), {
751
755
  part: e,
752
- "is-dark": M(Je),
753
- "main-color": M(L)?.mainColor,
754
- "forward-geocode": (e, t) => M(H).forwardGeocode(e, t)
756
+ "is-dark": j(Ye),
757
+ "main-color": j(L)?.mainColor,
758
+ "forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
755
759
  }, null, 8, [
756
760
  "part",
757
761
  "is-dark",
758
762
  "main-color",
759
763
  "forward-geocode"
760
764
  ])]),
761
- "tool-showDiagram": P(({ part: e }) => [C(M(le), {
765
+ "tool-showDiagram": P(({ part: e }) => [C(j(ue), {
762
766
  part: e,
763
- "is-dark": M(Je)
767
+ "is-dark": j(Ye)
764
768
  }, null, 8, ["part", "is-dark"])]),
765
- "tool-editSpreadsheet": P(({ part: e }) => [(O(), y(M(A), {
766
- key: M(s)(e),
769
+ "tool-editSpreadsheet": P(({ part: e }) => [(D(), y(j(k), {
770
+ key: j(s)(e),
767
771
  part: e,
768
- "file-url": W
772
+ "file-url": U
769
773
  }, null, 8, ["part"]))]),
770
- "tool-editWordDocument": P(({ part: e }) => [(O(), y(M(A), {
771
- key: M(s)(e),
774
+ "tool-editWordDocument": P(({ part: e }) => [(D(), y(j(k), {
775
+ key: j(s)(e),
772
776
  part: e,
773
- "file-url": W
777
+ "file-url": U
774
778
  }, null, 8, ["part"]))]),
775
- "tool-createSpreadsheet": P(({ part: e }) => [(O(), y(M(A), {
776
- key: M(s)(e),
779
+ "tool-createSpreadsheet": P(({ part: e }) => [(D(), y(j(k), {
780
+ key: j(s)(e),
777
781
  part: e,
778
- "file-url": W
782
+ "file-url": U
779
783
  }, null, 8, ["part"]))]),
780
- "tool-createWordDocument": P(({ part: e }) => [(O(), y(M(A), {
781
- key: M(s)(e),
784
+ "tool-createWordDocument": P(({ part: e }) => [(D(), y(j(k), {
785
+ key: j(s)(e),
782
786
  part: e,
783
- "file-url": W
787
+ "file-url": U
784
788
  }, null, 8, ["part"]))]),
785
- "tool-shareDocument": P(({ part: e }) => [(O(), y(M(ue), {
786
- key: M(s)(e),
789
+ "tool-shareDocument": P(({ part: e }) => [(D(), y(j(de), {
790
+ key: j(s)(e),
787
791
  part: e,
788
- "on-download": Ft
792
+ "on-download": Rt
789
793
  }, null, 8, ["part"]))]),
790
794
  _: 1
791
795
  }, 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(".")))]),
792
796
  _: 1
793
797
  }),
794
- M(tt).length ? (O(), y(p, {
798
+ j(nt).length ? (D(), y(p, {
795
799
  key: 0,
796
- messages: M(tt),
797
- onEdit: M(yt),
798
- onRemove: M(bt)
800
+ messages: j(nt),
801
+ onEdit: j(St),
802
+ onRemove: j(Ct)
799
803
  }, null, 8, [
800
804
  "messages",
801
805
  "onEdit",
@@ -803,56 +807,57 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
803
807
  ])) : b("", !0),
804
808
  S("div", Me, [
805
809
  C(_, { name: "pk-chatbot-view-chat-fade" }, {
806
- default: P(() => [jt.value ? (O(), y(ve, {
810
+ default: P(() => [Pt.value ? (D(), y(ve, {
807
811
  key: 0,
808
812
  class: "pk-chatbot-view-chat__aurora",
809
813
  "source-selector": ".pk-chatbot-input__form"
810
814
  })) : b("", !0)]),
811
815
  _: 1
812
816
  }),
813
- M(fn) && !M(Ue) ? (O(), y(m, {
817
+ j(mn) && !j(We) ? (D(), y(m, {
814
818
  key: 0,
815
- pending: M(fn),
816
- stopping: M(pn),
817
- onStop: M(mn)
819
+ pending: j(mn),
820
+ stopping: j(hn),
821
+ onStop: j(gn)
818
822
  }, null, 8, [
819
823
  "pending",
820
824
  "stopping",
821
825
  "onStop"
822
826
  ])) : b("", !0),
823
- M(Ue) ? (O(), x("div", Ne, j(M(K)("message.chatErrorConversationBlocked")), 1)) : qt.value === "idle" ? (O(), y(f, {
827
+ j(We) ? (D(), x("div", Ne, A(j(G)("message.chatErrorConversationBlocked")), 1)) : Yt.value === "idle" ? (D(), y(f, {
824
828
  key: 3,
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,
833
- "max-message-length": M(L)?.maxMessageLength,
834
- "file-upload": U.value,
835
- "attachment-limit-reached": M(Ke),
836
- "attachment-notice": Dt.value,
837
- "voice-enabled": Kt.value,
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),
847
- onVoiceStart: Qt
829
+ ref_key: "inputEl",
830
+ ref: at,
831
+ modelValue: j(He),
832
+ "onUpdate:modelValue": n[4] ||= (e) => re(He) ? He.value = e : null,
833
+ "pending-attachments": j(Ke),
834
+ "onUpdate:pendingAttachments": n[5] ||= (e) => re(Ke) ? Ke.value = e : null,
835
+ placeholder: j(Ue),
836
+ "dismissable-notice": j(Mt) && j(B).messages.length <= 1 ? j(Mt) : void 0,
837
+ "page-notice": kt.value,
838
+ status: Dt.value,
839
+ "max-message-length": j(L)?.maxMessageLength,
840
+ "file-upload": H.value,
841
+ "attachment-limit-reached": j(qe),
842
+ "attachment-notice": At.value,
843
+ "voice-enabled": Jt.value,
844
+ "queue-enabled": j(tt),
845
+ "answer-notices": jt.value,
846
+ onStopGeneration: j(st),
847
+ onSubmit: j(ot),
848
+ onFileSelect: j(gt),
849
+ onDismissAttachmentNotice: j(_t),
850
+ onDismissPageNotice: j(bt),
851
+ onOpenAnswerNotice: j(wt),
852
+ onDismissAnswerNotice: j(Tt),
853
+ onVoiceStart: en
848
854
  }, te({ _: 2 }, [a.modifier === "fullscreen" ? {
849
855
  name: "prepend",
850
856
  fn: P(() => [S("span", Pe, [C(u, {
851
- modifiers: "surface",
852
857
  class: "pk-chatbot-view-chat__agent-chip-avatar",
853
- "img-src": M(L)?.logo,
854
- name: M(I).name
855
- }, null, 8, ["img-src", "name"]), M(I).name ? (O(), x("strong", Fe, j(M(I).name), 1)) : b("", !0)])]),
858
+ "img-src": j(L)?.logo,
859
+ name: j(I).name
860
+ }, null, 8, ["img-src", "name"]), j(I).name ? (D(), x("strong", Fe, A(j(I).name), 1)) : b("", !0)])]),
856
861
  key: "0"
857
862
  } : void 0]), 1032, [
858
863
  "modelValue",
@@ -875,21 +880,21 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
875
880
  "onDismissPageNotice",
876
881
  "onOpenAnswerNotice",
877
882
  "onDismissAnswerNotice"
878
- ])) : (O(), y(Te, {
883
+ ])) : (D(), y(Te, {
879
884
  key: 2,
880
- state: qt.value,
881
- sample: Xt,
882
- spectrum: Zt,
883
- "remaining-seconds": M(Z).remainingSeconds.value,
884
- muted: q.value,
885
- error: Jt.value,
886
- "raw-error": M(Z).error.value,
887
- live: M(Z).isActive.value,
885
+ state: Yt.value,
886
+ sample: Qt,
887
+ spectrum: $t,
888
+ "remaining-seconds": j(Z).remainingSeconds.value,
889
+ muted: K.value,
890
+ error: Xt.value,
891
+ "raw-error": j(Z).error.value,
892
+ live: j(Z).isActive.value,
888
893
  class: "pk-chatbot-view-chat__voice",
889
- onToggleMute: dn,
890
- onHangUp: $t,
891
- onRetry: tn,
892
- onDismiss: en
894
+ onToggleMute: pn,
895
+ onHangUp: tn,
896
+ onRetry: rn,
897
+ onDismiss: nn
893
898
  }, null, 8, [
894
899
  "state",
895
900
  "remaining-seconds",
@@ -900,10 +905,10 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
900
905
  ]))
901
906
  ]),
902
907
  C(_, null, {
903
- default: P(() => [M(It) && U.value?.enabled ? (O(), x("div", Ie, [C(r, {
908
+ default: P(() => [j(zt) && H.value?.enabled ? (D(), x("div", Ie, [C(r, {
904
909
  name: "ri:upload-cloud-2-line",
905
910
  class: "pk-chatbot-view-chat__drop-overlay-icon"
906
- }), S("span", null, j(M(K)("action.dropFile")), 1)])) : b("", !0)]),
911
+ }), S("span", null, A(j(G)("action.dropFile")), 1)])) : b("", !0)]),
907
912
  _: 1
908
913
  })
909
914
  ], 2);
@@ -912,4 +917,4 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
912
917
  });
913
918
  export { ve as i, Te as n, be as r, Ve as t };
914
919
 
915
- //# sourceMappingURL=PkChatbotViewChat-BqFY0Evp.js.map
920
+ //# sourceMappingURL=PkChatbotViewChat-ZOpF5REL.js.map