@8wave/ai-elements 0.121.0-beta.39 → 0.121.0-beta.40

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 (142) hide show
  1. package/README.md +67 -15
  2. package/dist/_chunks/{Agent-C3m0UmlL.js → Agent-BuPgJIt4.js} +203 -202
  3. package/dist/_chunks/Agent-BuPgJIt4.js.map +1 -0
  4. package/dist/_chunks/{PkStreamingMarkdown--PCkA4Fg.js → PkStreamingMarkdown-D2aqCD0I.js} +953 -927
  5. package/dist/_chunks/PkStreamingMarkdown-D2aqCD0I.js.map +1 -0
  6. package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js → PkToolEditSpreadsheet-83ZdmGeA.js} +2 -2
  7. package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js.map → PkToolEditSpreadsheet-83ZdmGeA.js.map} +1 -1
  8. package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js → PkToolRequestGeolocation-1cOmCG8P.js} +2 -2
  9. package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js.map → PkToolRequestGeolocation-1cOmCG8P.js.map} +1 -1
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js → PkToolRequestOAuthConnection-CCu3FCyo.js} +2 -2
  11. package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js.map → PkToolRequestOAuthConnection-CCu3FCyo.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js → PkToolShowArtifact-CiYkZkpe.js} +2 -2
  13. package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js.map → PkToolShowArtifact-CiYkZkpe.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js → PkToolShowContactForm-D7TEzrYe.js} +2 -2
  15. package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js.map → PkToolShowContactForm-D7TEzrYe.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowForm-fburTpQm.js → PkToolShowForm-CSh4Q6sl.js} +5 -5
  17. package/dist/_chunks/{PkToolShowForm-fburTpQm.js.map → PkToolShowForm-CSh4Q6sl.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js → PkToolShowImageGallery-CQEaEfYE.js} +2 -2
  19. package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js.map → PkToolShowImageGallery-CQEaEfYE.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js → PkToolShowProductList-BCmULLct.js} +2 -2
  21. package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js.map → PkToolShowProductList-BCmULLct.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js → PkToolShowSources-R9KWsfTQ.js} +3 -3
  23. package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js.map → PkToolShowSources-R9KWsfTQ.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js → PkToolShowSuggestedReply-DYZz9aV2.js} +2 -2
  25. package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js.map → PkToolShowSuggestedReply-DYZz9aV2.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js → PkToolShowVideo-C_9SZtZM.js} +2 -2
  27. package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js.map → PkToolShowVideo-C_9SZtZM.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js → PkToolShowWebPages-DwRYfle9.js} +2 -2
  29. package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js.map → PkToolShowWebPages-DwRYfle9.js.map} +1 -1
  30. package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js → chatImagePolicy-CQYTWTkP.js} +2 -2
  31. package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js.map → chatImagePolicy-CQYTWTkP.js.map} +1 -1
  32. package/dist/_chunks/{markdown-D3iMlF6T.js → markdown-Br9ROCBT.js} +2 -2
  33. package/dist/_chunks/{markdown-D3iMlF6T.js.map → markdown-Br9ROCBT.js.map} +1 -1
  34. package/dist/ai-elements.es.js +4378 -3756
  35. package/dist/ai-elements.es.js.map +1 -1
  36. package/dist-vue/PkChatbot.js +1 -1
  37. package/dist-vue/PkChatbotEmptyState.js +1 -1
  38. package/dist-vue/PkChatbotInput.js +1 -1
  39. package/dist-vue/PkChatbotMessages.js +1 -1
  40. package/dist-vue/PkChatbotStepPayload.js +1 -1
  41. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  42. package/dist-vue/PkChatbotSteps.js +1 -1
  43. package/dist-vue/PkChatbotViewChat.js +1 -1
  44. package/dist-vue/PkChatbotViewConversations.js +1 -1
  45. package/dist-vue/PkChatbotViewFiles.js +1 -1
  46. package/dist-vue/PkChatbotViewProfile.js +1 -1
  47. package/dist-vue/_chunks/{Agent-3IHYHv05.js → Agent-DZb775Ak.js} +193 -192
  48. package/dist-vue/_chunks/Agent-DZb775Ak.js.map +1 -0
  49. package/dist-vue/_chunks/{Document-B0A_y6N5.js → Document-E72l_VU6.js} +2 -2
  50. package/dist-vue/_chunks/{Document-B0A_y6N5.js.map → Document-E72l_VU6.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js → PkChatbot-DIqduIwr.js} +9 -9
  52. package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js.map → PkChatbot-DIqduIwr.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js → PkChatbotEmptyState-Dh7ETVnf.js} +2 -2
  54. package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js.map → PkChatbotEmptyState-Dh7ETVnf.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js → PkChatbotInput-BJHtmPR-.js} +2 -2
  56. package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js.map → PkChatbotInput-BJHtmPR-.js.map} +1 -1
  57. package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js +968 -0
  58. package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js.map +1 -0
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js → PkChatbotStepPayload-CXdsUMrw.js} +2 -2
  60. package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js.map → PkChatbotStepPayload-CXdsUMrw.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js → PkChatbotStepToolDetail-DbpXR7jh.js} +16 -16
  62. package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js.map → PkChatbotStepToolDetail-DbpXR7jh.js.map} +1 -1
  63. package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js +189 -0
  64. package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js.map +1 -0
  65. package/dist-vue/_chunks/{PkChatbotViewChat-t-XkwFbe.js → PkChatbotViewChat-BI_PtT72.js} +300 -298
  66. package/dist-vue/_chunks/PkChatbotViewChat-BI_PtT72.js.map +1 -0
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js → PkChatbotViewConversations-Bg4jSO9a.js} +3 -3
  68. package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js.map → PkChatbotViewConversations-Bg4jSO9a.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js → PkChatbotViewFiles-Cwm-JQMF.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js.map → PkChatbotViewFiles-Cwm-JQMF.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js → PkChatbotViewProfile-C_GElIM3.js} +2 -2
  72. package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js.map → PkChatbotViewProfile-C_GElIM3.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js → PkStreamingMarkdown-DwDs-cGP.js} +3 -3
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js.map → PkStreamingMarkdown-DwDs-cGP.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js → PkToolEditSpreadsheet-B61LtERY.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js.map → PkToolEditSpreadsheet-B61LtERY.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js → PkToolRequestGeolocation-DC8hSH0j.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js.map → PkToolRequestGeolocation-DC8hSH0j.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js → PkToolRequestOAuthConnection-BH_-drvw.js} +2 -2
  80. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js.map → PkToolRequestOAuthConnection-BH_-drvw.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js → PkToolShowArtifact-CjVN96wJ.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js.map → PkToolShowArtifact-CjVN96wJ.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js → PkToolShowContactForm-CmBLigw8.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js.map → PkToolShowContactForm-CmBLigw8.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js → PkToolShowDiagram-dKUU5_6F.js} +2 -2
  86. package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js.map → PkToolShowDiagram-dKUU5_6F.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js → PkToolShowForm-B6ESvq-5.js} +4 -4
  88. package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js.map → PkToolShowForm-B6ESvq-5.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js → PkToolShowImageGallery-Daq0IwTH.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js.map → PkToolShowImageGallery-Daq0IwTH.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js → PkToolShowProductList-Bc3Gzyxy.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js.map → PkToolShowProductList-Bc3Gzyxy.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js → PkToolShowSources-BDvRbenn.js} +3 -3
  94. package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js.map → PkToolShowSources-BDvRbenn.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js → PkToolShowSuggestedReply-Cd6VkzvJ.js} +2 -2
  96. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js.map → PkToolShowSuggestedReply-Cd6VkzvJ.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js → PkToolShowVideo-Bo1gsD97.js} +2 -2
  98. package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js.map → PkToolShowVideo-Bo1gsD97.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js → PkToolShowWebPages-DI3sZiqh.js} +2 -2
  100. package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js.map → PkToolShowWebPages-DI3sZiqh.js.map} +1 -1
  101. package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js → createChatbotApiClient-DUz4dwzY.js} +12 -12
  102. package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js.map → createChatbotApiClient-DUz4dwzY.js.map} +1 -1
  103. package/dist-vue/_chunks/{useChatbotStore-BliRphuB.js → useChatbotStore-D7LcpA-6.js} +481 -455
  104. package/dist-vue/_chunks/useChatbotStore-D7LcpA-6.js.map +1 -0
  105. package/dist-vue/_chunks/{utils-C7-KrzRE.js → utils-EPX3V3VI.js} +112 -86
  106. package/dist-vue/_chunks/utils-EPX3V3VI.js.map +1 -0
  107. package/dist-vue/api.js +1 -1
  108. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +2 -0
  109. package/dist-vue/apps/web-component/src/components/FloatingChatWidget.ce.d.ts +2 -0
  110. package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +1 -0
  111. package/dist-vue/apps/web-component/src/lib.d.ts +10 -0
  112. package/dist-vue/apps/web-component/src/pageTools/actions.d.ts +2 -0
  113. package/dist-vue/apps/web-component/src/pageTools/announcements.d.ts +9 -0
  114. package/dist-vue/apps/web-component/src/pageTools/index.d.ts +12 -1
  115. package/dist-vue/apps/web-component/src/pageTools/navigation.d.ts +40 -8
  116. package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +60 -0
  117. package/dist-vue/composables.js +34 -8
  118. package/dist-vue/composables.js.map +1 -1
  119. package/dist-vue/index.js +145 -125
  120. package/dist-vue/index.js.map +1 -1
  121. package/dist-vue/locales.js +28 -2
  122. package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +6 -0
  123. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -0
  124. package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +7 -1
  125. package/dist-vue/packages/components/src/chat/PkHostCallConfirmDialog.d.ts +4 -0
  126. package/dist-vue/packages/components/src/chat/PkPageControlBar.d.ts +5 -1
  127. package/dist-vue/packages/components/src/chat/utils.d.ts +11 -1
  128. package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +37 -8
  129. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +8 -2
  130. package/dist-vue/packages/models/src/schema/PageAccess.d.ts +9 -0
  131. package/dist-vue/style.css +1 -1
  132. package/package.json +1 -1
  133. package/dist/_chunks/Agent-C3m0UmlL.js.map +0 -1
  134. package/dist/_chunks/PkStreamingMarkdown--PCkA4Fg.js.map +0 -1
  135. package/dist-vue/_chunks/Agent-3IHYHv05.js.map +0 -1
  136. package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js +0 -954
  137. package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js.map +0 -1
  138. package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js +0 -189
  139. package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js.map +0 -1
  140. package/dist-vue/_chunks/PkChatbotViewChat-t-XkwFbe.js.map +0 -1
  141. package/dist-vue/_chunks/useChatbotStore-BliRphuB.js.map +0 -1
  142. package/dist-vue/_chunks/utils-C7-KrzRE.js.map +0 -1
@@ -1,24 +1,24 @@
1
- import { t as e } from "./PkChatbotMessages-BfKqJ8n_.js";
1
+ import { t as e } from "./PkChatbotMessages-DMSActW1.js";
2
2
  import { o as t } from "./Media-D-UGzdcW.js";
3
- import { a as n, n as r, t as i } from "./useChatbotStore-BliRphuB.js";
3
+ import { a as n, n as r, t as i } from "./useChatbotStore-D7LcpA-6.js";
4
4
  import { n as a } from "./src-BZRiAJsH.js";
5
- import { m as o, s } from "./utils-C7-KrzRE.js";
6
- import { t as c } from "./useLocalizedString-PfaKjIQY.js";
7
- import { t as l } from "./PkAvatar-BTqu8tn9.js";
8
- import { n as u, t as d } from "./PkChatbotInput-CY0YRGkG.js";
9
- import { t as f } from "./PkChatbotEmptyState-ilPJoYjk.js";
10
- import { t as p } from "./PkChatbotWakeupBar-Cjgarxnw.js";
11
- import { VvIcon as m } from "@volverjs/ui-vue/components";
12
- import { Fragment as h, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as ee, createTextVNode as te, createVNode as S, defineAsyncComponent as C, defineComponent as w, isRef as ne, nextTick as re, normalizeClass as T, onBeforeUnmount as E, onMounted as ie, onScopeDispose as ae, onUnmounted as oe, openBlock as D, ref as O, renderList as se, shallowRef as ce, toDisplayString as k, toValue as le, unref as A, useTemplateRef as ue, watch as j, withCtx as M } from "vue";
5
+ import { c as o, h as s, n as c } from "./utils-EPX3V3VI.js";
6
+ import { t as l } from "./useLocalizedString-PfaKjIQY.js";
7
+ import { t as u } from "./PkAvatar-BTqu8tn9.js";
8
+ import { n as d, t as f } from "./PkChatbotInput-BJHtmPR-.js";
9
+ import { t as p } from "./PkChatbotEmptyState-Dh7ETVnf.js";
10
+ import { t as m } from "./PkChatbotWakeupBar-Cjgarxnw.js";
11
+ import { VvIcon as h } from "@volverjs/ui-vue/components";
12
+ import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as ee, createTextVNode as C, createVNode as w, defineAsyncComponent as T, defineComponent as E, isRef as te, nextTick as ne, normalizeClass as D, onBeforeUnmount as O, onMounted as re, onScopeDispose as ie, onUnmounted as ae, openBlock as k, provide as oe, ref as A, renderList as se, shallowRef as ce, toDisplayString as j, toValue as le, unref as M, useTemplateRef as ue, watch as N, withCtx as P } from "vue";
13
13
  import { useI18n as de } from "vue-i18n";
14
14
  import { useDropZone as fe } from "@vueuse/core";
15
15
  import { storeToRefs as pe } from "pinia";
16
16
  //#region ../../packages/composable/src/chatbot/useGreeting.ts
17
17
  function me(e, t) {
18
18
  let { locale: n, t: r, te: i } = de({ useScope: "global" });
19
- return _(() => N(le(e)?.greeting?.[0]?.[n.value] ?? "", le(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
19
+ return v(() => F(le(e)?.greeting?.[0]?.[n.value] ?? "", le(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
20
20
  }
21
- function N(e, t) {
21
+ function F(e, t) {
22
22
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
23
23
  }
24
24
  //#endregion
@@ -26,14 +26,14 @@ function N(e, t) {
26
26
  var he = {
27
27
  class: "pk-aurora",
28
28
  "aria-hidden": "true"
29
- }, P = {
29
+ }, I = {
30
30
  key: 1,
31
31
  class: "pk-aurora__fallback"
32
- }, F = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", ge = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", _e = /* @__PURE__ */ w({
32
+ }, L = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", ge = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", _e = /* @__PURE__ */ E({
33
33
  __name: "PkAuroraCanvas",
34
34
  props: { sourceSelector: {} },
35
35
  setup(e) {
36
- let t = e, n = ue("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) => {
36
+ let t = e, n = ue("canvasEl"), r = A(!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 he = {
62
62
  }, v = () => {
63
63
  _(), a = requestAnimationFrame(v);
64
64
  };
65
- return ie(() => {
65
+ return re(() => {
66
66
  let e = n.value;
67
67
  i = e?.getContext("webgl", { alpha: !0 }) ?? null;
68
68
  let t = m();
@@ -70,7 +70,7 @@ var he = {
70
70
  r.value = !0;
71
71
  return;
72
72
  }
73
- let a = p(i.VERTEX_SHADER, F), f = p(i.FRAGMENT_SHADER, ge), y = i.createProgram();
73
+ let a = p(i.VERTEX_SHADER, L), f = p(i.FRAGMENT_SHADER, ge), y = i.createProgram();
74
74
  if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
75
75
  r.value = !0;
76
76
  return;
@@ -88,22 +88,22 @@ var he = {
88
88
  1
89
89
  ]), i.STATIC_DRAW);
90
90
  let x = i.getAttribLocation(y, "a_position");
91
- i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), re(h), g() ? _(10) : v();
92
- }), E(() => {
91
+ i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), ne(h), g() ? _(10) : v();
92
+ }), O(() => {
93
93
  cancelAnimationFrame(a), o?.disconnect();
94
- }), oe(() => {
94
+ }), ae(() => {
95
95
  let e = i;
96
96
  i = null, setTimeout(() => {
97
97
  e?.getExtension("WEBGL_lose_context")?.loseContext();
98
98
  }, 150);
99
- }), (e, t) => (D(), b("div", he, [r.value ? (D(), b("div", P)) : (D(), b("canvas", {
99
+ }), (e, t) => (k(), x("div", he, [r.value ? (k(), x("div", I)) : (k(), x("canvas", {
100
100
  key: 0,
101
101
  ref_key: "canvasEl",
102
102
  ref: n,
103
103
  class: "pk-aurora__canvas"
104
104
  }, null, 512))]));
105
105
  }
106
- }), I = .18, ve = .35, ye = /* @__PURE__ */ w({
106
+ }), R = .18, ve = .35, ye = /* @__PURE__ */ E({
107
107
  __name: "PkVoiceOrb",
108
108
  props: {
109
109
  sample: {},
@@ -115,20 +115,20 @@ var he = {
115
115
  bars: { default: 5 }
116
116
  },
117
117
  setup(e) {
118
- let t = e, n = ue("barsEl"), r = Array.from({ length: t.bars }, () => I), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
118
+ let t = e, n = ue("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;
122
122
  return Array.from({ length: i }, (n, r) => {
123
123
  let i = .65 + .35 * Math.sin(t + r * .9);
124
- return I + e * 2.4 * i;
124
+ return R + e * 2.4 * i;
125
125
  });
126
126
  }
127
127
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
128
128
  return Array.from({ length: i }, (e, t) => {
129
129
  let r = 0;
130
130
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
131
- return I + r / o / 255 * 2.2;
131
+ return R + r / o / 255 * 2.2;
132
132
  });
133
133
  }, s = () => {
134
134
  let e = n.value?.children;
@@ -137,20 +137,20 @@ var he = {
137
137
  });
138
138
  }, c = () => {
139
139
  let e = o();
140
- r = r.map((t, n) => t + (Math.min(1, Math.max(I, e[n] ?? I)) - t) * ve), s(), i = requestAnimationFrame(c);
140
+ r = r.map((t, n) => t + (Math.min(1, Math.max(R, e[n] ?? R)) - t) * ve), s(), i = requestAnimationFrame(c);
141
141
  }, l = () => {
142
142
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
143
143
  };
144
- return j(() => t.state, async (e) => {
145
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => I * 1.6), await re(), s()) : i === void 0 && (i = requestAnimationFrame(c));
146
- }, { immediate: !0 }), E(l), (t, r) => (D(), b("div", {
147
- class: T(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
144
+ return N(() => t.state, async (e) => {
145
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await ne(), s()) : i === void 0 && (i = requestAnimationFrame(c));
146
+ }, { immediate: !0 }), O(l), (t, r) => (k(), x("div", {
147
+ class: D(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
148
148
  "aria-hidden": "true"
149
- }, [x("div", {
149
+ }, [S("div", {
150
150
  ref_key: "barsEl",
151
151
  ref: n,
152
152
  class: "pk-voice-orb__bars"
153
- }, [(D(!0), b(h, null, se(e.bars, (e) => (D(), b("span", {
153
+ }, [(k(!0), x(g, null, se(e.bars, (e) => (k(), x("span", {
154
154
  key: e,
155
155
  class: "pk-voice-orb__bar"
156
156
  }))), 128))], 512)], 2));
@@ -159,14 +159,14 @@ var he = {
159
159
  key: 0,
160
160
  class: "pk-voice-session__badge",
161
161
  "aria-hidden": "true"
162
- }, xe = {
162
+ }, z = {
163
163
  class: "pk-voice-session__status",
164
164
  role: "status"
165
- }, L = {
165
+ }, B = {
166
166
  key: 0,
167
167
  class: "pk-voice-session__live-dot",
168
168
  "aria-hidden": "true"
169
- }, Se = ["title"], Ce = ["title"], we = { class: "pk-voice-session__actions" }, Te = /* @__PURE__ */ w({
169
+ }, xe = ["title"], Se = ["title"], Ce = { class: "pk-voice-session__actions" }, we = /* @__PURE__ */ E({
170
170
  __name: "PkVoiceSession",
171
171
  props: {
172
172
  state: {},
@@ -185,17 +185,17 @@ var he = {
185
185
  "dismiss"
186
186
  ],
187
187
  setup(e, { emit: t }) {
188
- let n = e, r = t, { t: i } = de({ useScope: "global" }), a = _(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = _(() => {
188
+ let n = e, r = t, { t: i } = de({ useScope: "global" }), a = v(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = v(() => {
189
189
  if (n.remainingSeconds === void 0) return;
190
190
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
191
191
  return `${e}:${String(t).padStart(2, "0")}`;
192
- }), s = _(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = _(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = _(() => {
192
+ }), s = v(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = v(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = v(() => {
193
193
  if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
194
194
  });
195
195
  return (t, n) => {
196
- let d = m;
197
- return D(), b("div", { class: T(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
198
- e.error ? (D(), b("span", be, [S(d, { name: "ri:error-warning-line" })])) : (D(), v(ye, {
196
+ let u = h;
197
+ return k(), x("div", { class: D(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
198
+ e.error ? (k(), x("span", be, [w(u, { name: "ri:error-warning-line" })])) : (k(), y(ye, {
199
199
  key: 1,
200
200
  state: e.state,
201
201
  sample: e.sample,
@@ -205,37 +205,37 @@ var he = {
205
205
  "sample",
206
206
  "spectrum"
207
207
  ])),
208
- x("div", xe, [x("span", { class: T(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), b("span", L)) : y("", !0), te(" " + k(a.value), 1)], 2), e.error ? (D(), b("p", {
208
+ S("div", z, [S("span", { class: D(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (k(), x("span", B)) : b("", !0), C(" " + j(a.value), 1)], 2), e.error ? (k(), x("p", {
209
209
  key: 0,
210
210
  class: "pk-voice-session__detail",
211
211
  title: e.rawError ?? e.error
212
- }, k(e.error), 9, Se)) : y("", !0)]),
213
- o.value ? (D(), b("span", {
212
+ }, j(e.error), 9, xe)) : b("", !0)]),
213
+ o.value ? (k(), x("span", {
214
214
  key: 2,
215
- class: T(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
216
- title: A(i)("hint.voiceRemaining"),
215
+ class: D(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
216
+ title: M(i)("hint.voiceRemaining"),
217
217
  "aria-hidden": "true"
218
- }, k(o.value), 11, Ce)) : y("", !0),
219
- x("div", we, [e.error ? (D(), b(h, { key: 0 }, [S(u, {
218
+ }, j(o.value), 11, Se)) : b("", !0),
219
+ S("div", Ce, [e.error ? (k(), x(g, { key: 0 }, [w(d, {
220
220
  icon: "ri:refresh-line",
221
- label: A(i)("action.retry"),
221
+ label: M(i)("action.retry"),
222
222
  onClick: n[0] ||= (e) => r("retry")
223
- }, null, 8, ["label"]), e.live ? (D(), v(u, {
223
+ }, null, 8, ["label"]), e.live ? (k(), y(d, {
224
224
  key: 0,
225
225
  icon: "ri:stop-circle-line",
226
226
  modifiers: "danger",
227
- title: A(i)("action.hangUp"),
228
- "aria-label": A(i)("action.hangUp"),
227
+ title: M(i)("action.hangUp"),
228
+ "aria-label": M(i)("action.hangUp"),
229
229
  onClick: n[1] ||= (e) => r("hang-up")
230
- }, null, 8, ["title", "aria-label"])) : (D(), v(u, {
230
+ }, null, 8, ["title", "aria-label"])) : (k(), y(d, {
231
231
  key: 1,
232
232
  icon: "ri:close-line",
233
- label: A(i)("action.close"),
233
+ label: M(i)("action.close"),
234
234
  onClick: n[2] ||= (e) => r("dismiss")
235
- }, null, 8, ["label"]))], 64)) : (D(), b(h, { key: 1 }, [S(u, {
235
+ }, null, 8, ["label"]))], 64)) : (k(), x(g, { key: 1 }, [w(d, {
236
236
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
237
- title: e.muted ? A(i)("action.unmute") : A(i)("action.mute"),
238
- "aria-label": e.muted ? A(i)("action.unmute") : A(i)("action.mute"),
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"),
239
239
  "aria-pressed": e.muted,
240
240
  onClick: n[3] ||= (e) => r("toggle-mute")
241
241
  }, null, 8, [
@@ -243,18 +243,18 @@ var he = {
243
243
  "title",
244
244
  "aria-label",
245
245
  "aria-pressed"
246
- ]), S(u, {
246
+ ]), w(d, {
247
247
  icon: "ri:stop-circle-line",
248
248
  modifiers: "danger",
249
- title: A(i)("action.hangUp"),
250
- "aria-label": A(i)("action.hangUp"),
249
+ title: M(i)("action.hangUp"),
250
+ "aria-label": M(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
- }), Ee = (e) => {
257
- let t = ce(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
256
+ }), Te = (e) => {
257
+ let t = ce(), n = A("disconnected"), r = A("listening"), i = A(), o = A([]), s = A(), c = A(), l, u, d = 0, f = !1, p = () => {
258
258
  u &&= (clearInterval(u), void 0), s.value = void 0;
259
259
  }, m = (e) => {
260
260
  let t = Date.now() + e * 1e3, n = () => {
@@ -270,7 +270,7 @@ var he = {
270
270
  l = void 0;
271
271
  let i = t.value;
272
272
  t.value = void 0, await i?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", r.value = "listening";
273
- }, v = async () => {
273
+ }, _ = async () => {
274
274
  if (f || t.value || n.value === "connecting") return;
275
275
  i.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
276
276
  let a = d, s = () => a === d && !f, u;
@@ -335,7 +335,7 @@ var he = {
335
335
  } catch (e) {
336
336
  return a.warn("The spoken answer could not be sent", e), !1;
337
337
  }
338
- }, ee = (e) => {
338
+ }, S = (e) => {
339
339
  let n = t.value;
340
340
  if (!n) return 0;
341
341
  try {
@@ -343,21 +343,21 @@ var he = {
343
343
  } catch {
344
344
  return 0;
345
345
  }
346
- }, te = (e) => {
346
+ }, ee = (e) => {
347
347
  let n = t.value;
348
348
  if (n) try {
349
349
  return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
350
350
  } catch {
351
351
  return;
352
352
  }
353
- }, S = () => {
353
+ }, C = () => {
354
354
  let e = l;
355
355
  l = void 0, d += 1, p(), h(e);
356
356
  let r = t.value;
357
357
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
358
358
  };
359
- return typeof window < "u" && window.addEventListener("pagehide", S), ae(() => {
360
- f = !0, typeof window < "u" && window.removeEventListener("pagehide", S), g();
359
+ return typeof window < "u" && window.addEventListener("pagehide", C), ie(() => {
360
+ f = !0, typeof window < "u" && window.removeEventListener("pagehide", C), g();
361
361
  }), {
362
362
  status: n,
363
363
  mode: r,
@@ -365,25 +365,25 @@ var he = {
365
365
  transcript: o,
366
366
  remainingSeconds: s,
367
367
  chatId: c,
368
- isActive: _(() => n.value === "connected" || n.value === "connecting"),
369
- isConnecting: _(() => n.value === "connecting"),
370
- isSpeaking: _(() => n.value === "connected" && r.value === "speaking"),
371
- isListening: _(() => n.value === "connected" && r.value === "listening"),
372
- start: v,
368
+ isActive: v(() => n.value === "connected" || n.value === "connecting"),
369
+ isConnecting: v(() => n.value === "connecting"),
370
+ isSpeaking: v(() => n.value === "connected" && r.value === "speaking"),
371
+ isListening: v(() => n.value === "connected" && r.value === "listening"),
372
+ start: _,
373
373
  stop: g,
374
374
  dismissError: y,
375
375
  setMuted: b,
376
376
  sendUserMessage: x,
377
- readLevel: ee,
378
- readSpectrum: te
377
+ readLevel: S,
378
+ readSpectrum: ee
379
379
  };
380
- }, De = 4e3, Oe = [
380
+ }, Ee = 4e3, De = [
381
381
  3e3,
382
382
  5e3,
383
383
  1e4
384
- ], ke = 12e4, Ae = 3e4;
385
- function je(e) {
386
- let t = O(null), n = O(!1), r, i = !1, a = () => {
384
+ ], Oe = 12e4, ke = 3e4;
385
+ function Ae(e) {
386
+ let t = A(null), n = A(!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));
@@ -400,12 +400,12 @@ function je(e) {
400
400
  }
401
401
  let r = t.value;
402
402
  if (r) {
403
- let e = Date.parse(r.dueAt) - Date.now() + De;
404
- o(Math.max(De, e), () => l(r.wakeId, Date.now(), 0));
403
+ let e = Date.parse(r.dueAt) - Date.now() + Ee;
404
+ o(Math.max(Ee, e), () => l(r.wakeId, Date.now(), 0));
405
405
  }
406
406
  }
407
407
  async function l(t, n, r) {
408
- await e.refreshMessages(), !i && (s(t) || Date.now() - n >= ke ? await c() : o(Oe[Math.min(r, Oe.length - 1)], () => l(t, n, r + 1)));
408
+ await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Oe ? await c() : o(De[Math.min(r, De.length - 1)], () => l(t, n, r + 1)));
409
409
  }
410
410
  async function u() {
411
411
  n.value = !0;
@@ -424,9 +424,9 @@ function je(e) {
424
424
  t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
425
425
  }
426
426
  let m = () => p();
427
- return document.addEventListener("visibilitychange", m), j(() => t.value?.wakeId, (e) => {
428
- clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, Ae));
429
- }), E(() => {
427
+ return document.addEventListener("visibilitychange", m), N(() => t.value?.wakeId, (e) => {
428
+ clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, ke));
429
+ }), O(() => {
430
430
  i = !0, a(), clearInterval(f), document.removeEventListener("visibilitychange", m);
431
431
  }), {
432
432
  pendingWakeup: t,
@@ -438,16 +438,16 @@ function je(e) {
438
438
  }
439
439
  //#endregion
440
440
  //#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
441
- var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
441
+ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
442
442
  key: 1,
443
443
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
444
- }, Pe = { class: "pk-chatbot-view-chat__agent-chip" }, Fe = {
444
+ }, Ne = { class: "pk-chatbot-view-chat__agent-chip" }, Pe = {
445
445
  key: 0,
446
446
  class: "pk-chatbot-view-chat__agent-chip-name"
447
- }, Ie = {
447
+ }, Fe = {
448
448
  key: 0,
449
449
  class: "pk-chatbot-view-chat__drop-overlay"
450
- }, Le = 3e3, Re = 6e4, ze = 3e5, Be = 6e5, Ve = /* @__PURE__ */ w({
450
+ }, Ie = 3e3, Le = 6e4, Re = 3e5, ze = 6e5, Be = /* @__PURE__ */ E({
451
451
  __name: "PkChatbotViewChat",
452
452
  props: {
453
453
  agentId: {},
@@ -455,117 +455,119 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
455
455
  userName: {}
456
456
  },
457
457
  emits: ["show-info", "revise"],
458
- setup(a, { emit: u }) {
459
- let h = C(() => import("./PkToolShowForm-DxiiMSCC.js").then((e) => e.n)), te = C(() => import("./PkToolShowContactForm-DlZdfcNw.js").then((e) => e.n)), w = C(() => import("./PkToolShowSuggestedReply-BcjKYwbk.js").then((e) => e.n)), re = C(() => import("./PkToolShowSources-C0_MwX7m.js").then((e) => e.n)), ie = C(() => import("./PkToolRequestGeolocation-DZnJd1od.js")), ae = C(() => import("./PkToolRequestOAuthConnection-C8MGtBlh.js")), oe = C(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), se = C(() => import("./PkToolShowDiagram-BUUjmUpE.js")), ce = C(() => import("./PkToolEditSpreadsheet-D0EPgCmp.js")), le = C(() => import("./PkToolShareDocument-C8sPmh0k.js").then((e) => e.n)), N = a, he = u, P = r(N.agentId), { agentInterface: F, agentFileUpload: ge, agentType: I, agentVoice: ve, actions: ye, revisedAnswers: be, messages: xe, chat: L, messageFeedbacks: Se, feedbackDialogMessage: Ce, isFeedbackSubmitting: we, isFeedbackSubmitted: De, feedbackSubmitError: Oe, isLeadSubmitted: ke, isLoadingSubmitLead: Ae, submitLeadError: Ve, input: R, inputMessagePlaceholder: He, isConversationBlocked: Ue, baseUrl: We, pendingAttachments: Ge, isAttachmentLimitReached: Ke, fileLimitError: qe, apiClient: z, isDark: Je, hostToolsPending: Ye, pageNoticeLevel: Xe, hostConfirmation: Ze, agentPageAccess: Qe } = pe(P), B = _(() => I.value === "reasoning" ? void 0 : ge.value), $e = (e) => z.value.getMediaDownloadUrl(N.agentId, P.localChatId, e), { handleSubmit: et, stopGeneration: tt, regenerate: nt, onUpvote: rt, onDownvote: it, onFeedback: at, onFeedbackSubmit: ot, onLeadSubmit: st, startNewChat: ct, addToolOutput: V, addToolApprovalResponse: lt, handleFileSelect: ut, clearFileLimitError: dt, refreshMessages: ft, appendMessage: pt, closePageNotice: mt, respondHostConfirmation: ht } = P, { t: H } = de({ useScope: "global" }), gt = _(() => Ye.value > 0), _t = _(() => gt.value && L.value.status === "ready" ? "streaming" : L.value.status), vt = c(() => Qe.value?.notice), yt = _(() => Xe.value ? vt.value || H(`message.pageAccessNotice.${Xe.value}`) : void 0), bt = _(() => {
458
+ setup(a, { emit: d }) {
459
+ let g = T(() => import("./PkToolShowForm-B6ESvq-5.js").then((e) => e.n)), C = T(() => import("./PkToolShowContactForm-CmBLigw8.js").then((e) => e.n)), E = T(() => import("./PkToolShowSuggestedReply-Cd6VkzvJ.js").then((e) => e.n)), ne = T(() => import("./PkToolShowSources-BDvRbenn.js").then((e) => e.n)), re = T(() => import("./PkToolRequestGeolocation-DC8hSH0j.js")), ie = T(() => import("./PkToolRequestOAuthConnection-BH_-drvw.js")), ae = T(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), se = T(() => import("./PkToolShowDiagram-dKUU5_6F.js")), ce = T(() => import("./PkToolEditSpreadsheet-B61LtERY.js")), le = T(() => import("./PkToolShareDocument-C8sPmh0k.js").then((e) => e.n)), F = a, he = d, I = r(F.agentId), { agentInterface: L, agentFileUpload: ge, agentType: R, agentVoice: ve, actions: ye, revisedAnswers: be, messages: z, chat: B, messageFeedbacks: xe, feedbackDialogMessage: Se, isFeedbackSubmitting: Ce, isFeedbackSubmitted: Ee, feedbackSubmitError: De, isLeadSubmitted: Oe, isLoadingSubmitLead: ke, submitLeadError: Be, input: Ve, inputMessagePlaceholder: He, isConversationBlocked: Ue, baseUrl: We, pendingAttachments: Ge, isAttachmentLimitReached: Ke, fileLimitError: qe, apiClient: V, isDark: Je, hostToolsPending: Ye, pageNoticeLevel: Xe, hostConfirmation: Ze, agentPageAccess: Qe, hostStepTitles: $e } = pe(I);
460
+ oe(c, $e);
461
+ let H = v(() => R.value === "reasoning" ? void 0 : ge.value), et = (e) => V.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: tt, stopGeneration: nt, regenerate: rt, onUpvote: it, onDownvote: at, onFeedback: ot, onFeedbackSubmit: st, onLeadSubmit: ct, startNewChat: lt, addToolOutput: U, addToolApprovalResponse: ut, handleFileSelect: dt, clearFileLimitError: ft, refreshMessages: pt, appendMessage: mt, closePageNotice: ht, respondHostConfirmation: gt } = I, { t: W } = de({ useScope: "global" }), _t = v(() => Ye.value > 0), vt = v(() => _t.value && B.value.status === "ready" ? "streaming" : B.value.status), yt = l(() => Qe.value?.notice), bt = v(() => Xe.value ? yt.value || W(`message.pageAccessNotice.${Xe.value}`) : void 0), xt = v(() => {
460
462
  let e = qe.value;
461
- if (e) return e.reason === "per-chat" ? H("message.fileLimitPerChat", { max: e.max }) : H("message.fileLimitPerMessage", { max: e.max });
462
- }), xt = c(() => F.value?.dismissableNotice), St = _(() => xe.value.some((e) => e.role === "user")), Ct = _(() => N.modifier === "fullscreen" && !St.value), wt = me(F, () => N.userName), Tt = ue("chatViewEl"), Et = async (e) => (await z.value.expandSourceContext(N.agentId, e.documentId, e.chunkIndex)).content, Dt = async (e) => {
463
- let t = await z.value.downloadSourceDocument(N.agentId, e);
463
+ if (e) return e.reason === "per-chat" ? W("message.fileLimitPerChat", { max: e.max }) : W("message.fileLimitPerMessage", { max: e.max });
464
+ }), St = l(() => L.value?.dismissableNotice), Ct = v(() => z.value.some((e) => e.role === "user")), wt = v(() => F.modifier === "fullscreen" && !Ct.value), Tt = me(L, () => F.userName), Et = ue("chatViewEl"), Dt = async (e) => (await V.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Ot = async (e) => {
465
+ let t = await V.value.downloadSourceDocument(F.agentId, e);
464
466
  window.open(t.downloadUrl, "_blank");
465
- }, { isOverDropZone: Ot } = fe(Tt, {
466
- dataTypes: (e) => t(e, B.value?.allowedMimeTypes ?? []),
467
+ }, { isOverDropZone: kt } = fe(Et, {
468
+ dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
467
469
  onDrop: (e) => {
468
- if (B.value?.enabled && e) for (let t of e) ut(t);
470
+ if (H.value?.enabled && e) for (let t of e) dt(t);
469
471
  }
470
- }), U = O(!1), W = !1, G = O(!1), kt = [
472
+ }), G = A(!1), K = !1, q = A(!1), At = [
471
473
  3e3,
472
474
  5e3,
473
475
  1e4
474
- ], K, q, J = !1, Y = 0, At = !1;
475
- function jt() {
476
- clearTimeout(K), K = void 0, q = void 0, J = !1, Y = 0, G.value = !1;
476
+ ], J, Y, X = !1, jt = 0, Mt = !1;
477
+ function Nt() {
478
+ clearTimeout(J), J = void 0, Y = void 0, X = !1, jt = 0, q.value = !1;
477
479
  }
478
- function X(e) {
479
- W || (clearTimeout(K), K = setTimeout(() => {
480
- Mt();
480
+ function Pt(e) {
481
+ K || (clearTimeout(J), J = setTimeout(() => {
482
+ Ft();
481
483
  }, e));
482
484
  }
483
- async function Mt() {
484
- if (W || At) return;
485
- At = !0;
485
+ async function Ft() {
486
+ if (K || Mt) return;
487
+ Mt = !0;
486
488
  let e;
487
489
  try {
488
- e = await ft();
490
+ e = await pt();
489
491
  } finally {
490
- At = !1;
492
+ Mt = !1;
491
493
  }
492
- if (W) return;
493
- if (e === "caught-up" && (G.value = !1), Z.isActive.value) {
494
- q = void 0, J = !1, Y = 0, X(Le);
494
+ if (K) return;
495
+ if (e === "caught-up" && (q.value = !1), Z.isActive.value) {
496
+ Y = void 0, X = !1, jt = 0, Pt(Ie);
495
497
  return;
496
498
  }
497
- q === void 0 && (q = Date.now(), J = !!Z.error.value);
498
- let t = Date.now() - q;
499
- if (e === "caught-up" && t >= (J ? ze : Re) || t >= Be) {
500
- jt();
499
+ Y === void 0 && (Y = Date.now(), X = !!Z.error.value);
500
+ let t = Date.now() - Y;
501
+ if (e === "caught-up" && t >= (X ? Re : Le) || t >= ze) {
502
+ Nt();
501
503
  return;
502
504
  }
503
- let n = kt[Math.min(Y, kt.length - 1)];
504
- Y += 1, X(n);
505
+ let n = At[Math.min(jt, At.length - 1)];
506
+ jt += 1, Pt(n);
505
507
  }
506
- let Nt = (e = 1200) => {
507
- X(e);
508
- }, Z = Ee({
508
+ let It = (e = 1200) => {
509
+ Pt(e);
510
+ }, Z = Te({
509
511
  fetchGrant: async () => {
510
- let e = await z.value.createVoiceSession(N.agentId, P.localChatId, {
511
- deviceContext: P.buildDeviceContext(),
512
- externalContext: P.externalContext
512
+ let e = await V.value.createVoiceSession(F.agentId, I.localChatId, {
513
+ deviceContext: I.buildDeviceContext(),
514
+ externalContext: I.externalContext
513
515
  });
514
- return e.chatId !== P.localChatId && (P.localChatId = e.chatId), e;
516
+ return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
515
517
  },
516
- closeGrant: (e) => z.value.closeVoiceSession(N.agentId, e),
518
+ closeGrant: (e) => V.value.closeVoiceSession(F.agentId, e),
517
519
  onTranscript: (e) => {
518
- e.role === "user" ? (G.value = !0, pt({
520
+ e.role === "user" ? (q.value = !0, mt({
519
521
  id: `${i}user-${n()}`,
520
522
  role: "user",
521
523
  parts: [{
522
524
  type: "text",
523
525
  text: e.text
524
526
  }]
525
- })) : G.value = !1;
527
+ })) : q.value = !1;
526
528
  },
527
529
  onTurnEnd: () => {
528
- Nt();
530
+ It();
529
531
  }
530
532
  });
531
- j(() => Z.error.value, (e) => {
532
- e && (G.value = !1);
533
+ N(() => Z.error.value, (e) => {
534
+ e && (q.value = !1);
533
535
  });
534
- let Pt = _(() => ve.value?.enabled === !0), Ft = _(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), It = _(() => {
536
+ let Lt = v(() => ve.value?.enabled === !0), Rt = v(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), zt = v(() => {
535
537
  let e = Z.error.value;
536
- if (e) return /took too long/i.test(e) ? H("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? H("message.voiceNoAnswer") : H("message.voiceInterrupted");
537
- }), Lt = _(() => Z.isSpeaking.value ? "output" : "input"), Rt = () => Z.readLevel(Lt.value), zt = () => Z.readSpectrum(Lt.value), Bt = async () => {
538
- U.value = !1, await Z.start(), Z.isActive.value && (jt(), X(Le));
539
- }, Vt = async () => {
540
- G.value = !1, await Z.stop(), !W && Nt(0);
541
- }, Ht = () => {
538
+ if (e) return /took too long/i.test(e) ? W("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? W("message.voiceNoAnswer") : W("message.voiceInterrupted");
539
+ }), Bt = v(() => Z.isSpeaking.value ? "output" : "input"), Vt = () => Z.readLevel(Bt.value), Ht = () => Z.readSpectrum(Bt.value), Ut = async () => {
540
+ G.value = !1, await Z.start(), Z.isActive.value && (Nt(), Pt(Ie));
541
+ }, Wt = async () => {
542
+ q.value = !1, await Z.stop(), !K && It(0);
543
+ }, Gt = () => {
542
544
  Z.dismissError();
543
- }, Ut = async () => {
544
- Z.dismissError(), await Z.stop(), await Bt();
545
- }, Q = (e) => e?.toolCallId ?? "", Wt = O(/* @__PURE__ */ new Set()), Gt = (e) => Wt.value.has(Q(e)), Kt = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (Wt.value = new Set(Wt.value).add(Q(e)), Nt()), !0) : !1, qt = (e, t, n) => {
546
- $(t, s(t, n)) || V({
545
+ }, Kt = async () => {
546
+ Z.dismissError(), await Z.stop(), await Ut();
547
+ }, Q = (e) => e?.toolCallId ?? "", qt = A(/* @__PURE__ */ new Set()), Jt = (e) => qt.value.has(Q(e)), Yt = A(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (qt.value = new Set(qt.value).add(Q(e)), It()), !0) : !1, Xt = (e, t, n) => {
548
+ $(t, o(t, n)) || U({
547
549
  tool: e,
548
550
  toolCallId: Q(t),
549
551
  output: n
550
552
  });
551
- }, Jt = (e) => {
552
- let t = e.confirmed ? H("message.voiceConfirmed") : H("message.voiceCancelled");
553
- $({ toolCallId: e.toolCallId }, t) ? Wt.value.has(e.toolCallId) && (Kt.value = new Map(Kt.value).set(e.toolCallId, e.confirmed)) : V({
553
+ }, Zt = (e) => {
554
+ let t = e.confirmed ? W("message.voiceConfirmed") : W("message.voiceCancelled");
555
+ $({ toolCallId: e.toolCallId }, t) ? qt.value.has(e.toolCallId) && (Yt.value = new Map(Yt.value).set(e.toolCallId, e.confirmed)) : U({
554
556
  tool: "requestConfirm",
555
557
  toolCallId: e.toolCallId,
556
558
  output: e.confirmed ? "confirmed" : "cancelled"
557
559
  });
558
- }, Yt = (e, t) => {
559
- $(e, t) || (R.value = t, et());
560
- }, Xt = (e, t) => {
561
- let n = t.error ? H("message.voiceLocationRefused") : H("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
562
- $(e, n) || V({
560
+ }, Qt = (e, t) => {
561
+ $(e, t) || (Ve.value = t, tt());
562
+ }, $t = (e, t) => {
563
+ let n = t.error ? W("message.voiceLocationRefused") : W("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
564
+ $(e, n) || U({
563
565
  tool: "requestGeolocation",
564
566
  toolCallId: Q(e),
565
567
  output: t
566
568
  });
567
- }, Zt = (e, t) => {
568
- $(e, H("message.voiceConnectionDone")) || V({
569
+ }, en = (e, t) => {
570
+ $(e, W("message.voiceConnectionDone")) || U({
569
571
  tool: "requestOAuthConnection",
570
572
  toolCallId: Q(e),
571
573
  output: {
@@ -573,91 +575,91 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
573
575
  mcpServerId: t
574
576
  }
575
577
  });
576
- }, Qt = () => {
577
- U.value = !U.value, Z.setMuted(U.value);
578
+ }, tn = () => {
579
+ G.value = !G.value, Z.setMuted(G.value);
578
580
  };
579
- E(() => {
580
- W = !0, jt();
581
+ O(() => {
582
+ K = !0, Nt();
581
583
  });
582
- let { pendingWakeup: $t, isStopping: en, check: tn, reset: nn, stop: rn } = je({
583
- agentId: () => N.agentId,
584
- chatId: () => P.localChatId,
585
- apiClient: () => z.value,
586
- messages: () => xe.value,
587
- refreshMessages: ft
584
+ let { pendingWakeup: nn, isStopping: rn, check: an, reset: on, stop: sn } = Ae({
585
+ agentId: () => F.agentId,
586
+ chatId: () => I.localChatId,
587
+ apiClient: () => V.value,
588
+ messages: () => z.value,
589
+ refreshMessages: pt
588
590
  });
589
- return j([() => P.localChatId, St], ([, e]) => {
590
- nn(), e && tn();
591
- }, { immediate: !0 }), j(() => L.value.status, (e, t) => {
592
- e === "ready" && t !== "ready" && St.value && tn();
591
+ return N([() => I.localChatId, Ct], ([, e]) => {
592
+ on(), e && an();
593
+ }, { immediate: !0 }), N(() => B.value.status, (e, t) => {
594
+ e === "ready" && t !== "ready" && Ct.value && an();
593
595
  }), (t, n) => {
594
- let r = m;
595
- return D(), b("div", {
596
+ let r = h;
597
+ return k(), x("div", {
596
598
  ref_key: "chatViewEl",
597
- ref: Tt,
598
- class: T(["pk-chatbot-view-chat", {
599
- "pk-chatbot-view-chat--dragover": A(Ot) && B.value?.enabled,
600
- "pk-chatbot-view-chat--empty": Ct.value
599
+ ref: Et,
600
+ class: D(["pk-chatbot-view-chat", {
601
+ "pk-chatbot-view-chat--dragover": M(kt) && H.value?.enabled,
602
+ "pk-chatbot-view-chat--empty": wt.value
601
603
  }])
602
604
  }, [
603
- S(g, {
605
+ w(_, {
604
606
  name: "pk-chatbot-view-chat-fade",
605
607
  mode: "out-in"
606
608
  }, {
607
- default: M(() => [Ct.value ? (D(), v(f, {
609
+ default: P(() => [wt.value ? (k(), y(p, {
608
610
  key: 0,
609
- greeting: A(wt),
610
- logo: A(F)?.logo,
611
- name: A(P).name
611
+ greeting: M(Tt),
612
+ logo: M(L)?.logo,
613
+ name: M(I).name
612
614
  }, null, 8, [
613
615
  "greeting",
614
616
  "logo",
615
617
  "name"
616
- ])) : (D(), v(e, {
618
+ ])) : (k(), y(e, {
617
619
  key: 1,
618
620
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
619
621
  interactive: "",
620
- messages: A(xe),
621
- "confirm-verdicts-on-call": Kt.value,
622
- status: A(L).status,
623
- error: A(L).error,
624
- "main-color": A(F)?.mainColor,
625
- "text-color": A(F)?.textColor,
626
- "revised-answers": A(be),
627
- actions: A(ye),
628
- "message-feedbacks": A(Se),
629
- "feedback-message-id": A(Ce)?.id,
630
- "feedback-loading": A(we),
631
- "feedback-submitted": A(De),
632
- "feedback-error": A(Oe),
633
- "show-extended-steps": A(F)?.showExtendedSteps,
634
- "awaiting-spoken-answer": G.value,
635
- "host-working": gt.value,
636
- "host-confirmation": A(Ze),
637
- "is-dark": A(Je),
622
+ messages: M(z),
623
+ "confirm-verdicts-on-call": Yt.value,
624
+ status: M(B).status,
625
+ error: M(B).error,
626
+ "main-color": M(L)?.mainColor,
627
+ "text-color": M(L)?.textColor,
628
+ "revised-answers": M(be),
629
+ actions: M(ye),
630
+ "message-feedbacks": M(xe),
631
+ "feedback-message-id": M(Se)?.id,
632
+ "feedback-loading": M(Ce),
633
+ "feedback-submitted": M(Ee),
634
+ "feedback-error": M(De),
635
+ "show-extended-steps": M(L)?.showExtendedSteps,
636
+ "awaiting-spoken-answer": q.value,
637
+ "host-working": _t.value,
638
+ "host-confirmation": M(Ze),
639
+ "is-dark": M(Je),
638
640
  "show-scroll-to-bottom": a.modifier === "fullscreen",
639
- onFeedbackSubmit: n[0] ||= (e) => A(ot)(e),
640
- onFeedbackClose: n[1] ||= (e) => Ce.value = void 0,
641
- onRegenerate: A(nt),
642
- onAutoRetry: A(nt),
643
- onResetChat: A(ct),
641
+ onFeedbackSubmit: n[0] ||= (e) => M(st)(e),
642
+ onFeedbackClose: n[1] ||= (e) => Se.value = void 0,
643
+ onRegenerate: M(rt),
644
+ onAutoRetry: M(rt),
645
+ onResetChat: M(lt),
644
646
  onShowInfo: n[2] ||= (e) => he("show-info", e),
645
647
  onRevise: n[3] ||= (e) => he("revise", e),
646
- onUpvote: A(rt),
647
- onDownvote: A(it),
648
- onFeedback: A(at),
649
- onApprovalRespond: A(lt),
650
- onConfirmRespond: Jt,
651
- onHostConfirmRespond: A(ht)
648
+ onUpvote: M(it),
649
+ onDownvote: M(at),
650
+ onFeedback: M(ot),
651
+ onApprovalRespond: M(ut),
652
+ onConfirmRespond: Zt,
653
+ onHostConfirmRespond: M(gt)
652
654
  }, {
653
- "tool-showContactForm": M(({ part: e }) => [S(A(te), {
655
+ "tool-showContactForm": P(({ part: e }) => [w(M(C), {
654
656
  part: e,
655
- readonly: !A(We),
656
- submitted: A(ke),
657
- loading: A(Ae),
658
- error: A(Ve),
659
- "privacy-policy-notice": A(F)?.privacyPolicyNotice,
660
- onSubmit: A(st)
657
+ readonly: !M(We),
658
+ submitted: M(Oe),
659
+ loading: M(ke),
660
+ error: M(Be),
661
+ "privacy-policy-notice": M(L)?.privacyPolicyNotice,
662
+ onSubmit: M(ct)
661
663
  }, null, 8, [
662
664
  "part",
663
665
  "readonly",
@@ -667,20 +669,20 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
667
669
  "privacy-policy-notice",
668
670
  "onSubmit"
669
671
  ])]),
670
- "tool-showSuggestedReply": M(({ part: e }) => [S(A(w), {
672
+ "tool-showSuggestedReply": P(({ part: e }) => [w(M(E), {
671
673
  part: e,
672
- onSelect: (t) => Yt(e, t)
674
+ onSelect: (t) => Qt(e, t)
673
675
  }, null, 8, ["part", "onSelect"])]),
674
- "tool-showSources": M(({ part: e }) => [S(A(re), {
676
+ "tool-showSources": P(({ part: e }) => [w(M(ne), {
675
677
  part: e,
676
- "on-expand-context": Et,
677
- "on-download": Dt
678
+ "on-expand-context": Dt,
679
+ "on-download": Ot
678
680
  }, null, 8, ["part"])]),
679
- "tool-showForm": M(({ part: e }) => [S(g, { mode: "out-in" }, {
680
- default: M(() => [S(A(h), {
681
+ "tool-showForm": P(({ part: e }) => [w(_, { mode: "out-in" }, {
682
+ default: P(() => [w(M(g), {
681
683
  part: e,
682
- answered: Gt(e),
683
- onSelect: (t) => qt("showForm", e, t)
684
+ answered: Jt(e),
685
+ onSelect: (t) => Xt("showForm", e, t)
684
686
  }, null, 8, [
685
687
  "part",
686
688
  "answered",
@@ -688,12 +690,12 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
688
690
  ])]),
689
691
  _: 2
690
692
  }, 1024)]),
691
- "tool-showMultipleChoice": M(({ part: e }) => [S(g, { mode: "out-in" }, {
692
- default: M(() => [S(A(h), {
693
+ "tool-showMultipleChoice": P(({ part: e }) => [w(_, { mode: "out-in" }, {
694
+ default: P(() => [w(M(g), {
693
695
  part: e,
694
696
  "allow-custom-answer": "",
695
- answered: Gt(e),
696
- onSelect: (t) => qt("showMultipleChoice", e, t)
697
+ answered: Jt(e),
698
+ onSelect: (t) => Xt("showMultipleChoice", e, t)
697
699
  }, null, 8, [
698
700
  "part",
699
701
  "answered",
@@ -701,12 +703,12 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
701
703
  ])]),
702
704
  _: 2
703
705
  }, 1024)]),
704
- "tool-requestOAuthConnection": M(({ part: e }) => [S(A(ae), {
706
+ "tool-requestOAuthConnection": P(({ part: e }) => [w(M(ie), {
705
707
  part: e,
706
- "backend-url": A(We),
707
- "resolve-connection": (e) => A(z).getOAuthAuthorizeUrl(N.agentId, e),
708
- "check-connection": (e) => A(z).getOAuthConnectionStatus(N.agentId, e),
709
- onConnected: (t) => Zt(e, t)
708
+ "backend-url": M(We),
709
+ "resolve-connection": (e) => M(V).getOAuthAuthorizeUrl(F.agentId, e),
710
+ "check-connection": (e) => M(V).getOAuthConnectionStatus(F.agentId, e),
711
+ onConnected: (t) => en(e, t)
710
712
  }, null, 8, [
711
713
  "part",
712
714
  "backend-url",
@@ -714,94 +716,94 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
714
716
  "check-connection",
715
717
  "onConnected"
716
718
  ])]),
717
- "tool-requestGeolocation": M(({ part: e }) => [S(A(ie), {
719
+ "tool-requestGeolocation": P(({ part: e }) => [w(M(re), {
718
720
  part: e,
719
- "call-live": A(Z).isActive.value,
720
- "reverse-geocode": (e, t) => A(z).reverseGeocode(e, t),
721
- onResult: (t) => Xt(e, t)
721
+ "call-live": M(Z).isActive.value,
722
+ "reverse-geocode": (e, t) => M(V).reverseGeocode(e, t),
723
+ onResult: (t) => $t(e, t)
722
724
  }, null, 8, [
723
725
  "part",
724
726
  "call-live",
725
727
  "reverse-geocode",
726
728
  "onResult"
727
729
  ])]),
728
- "tool-showLocation": M(({ part: e }) => [S(A(oe), {
730
+ "tool-showLocation": P(({ part: e }) => [w(M(ae), {
729
731
  part: e,
730
- "is-dark": A(Je),
731
- "main-color": A(F)?.mainColor,
732
- "forward-geocode": (e, t) => A(z).forwardGeocode(e, t)
732
+ "is-dark": M(Je),
733
+ "main-color": M(L)?.mainColor,
734
+ "forward-geocode": (e, t) => M(V).forwardGeocode(e, t)
733
735
  }, null, 8, [
734
736
  "part",
735
737
  "is-dark",
736
738
  "main-color",
737
739
  "forward-geocode"
738
740
  ])]),
739
- "tool-showDiagram": M(({ part: e }) => [S(A(se), {
741
+ "tool-showDiagram": P(({ part: e }) => [w(M(se), {
740
742
  part: e,
741
- "is-dark": A(Je)
743
+ "is-dark": M(Je)
742
744
  }, null, 8, ["part", "is-dark"])]),
743
- "tool-editSpreadsheet": M(({ part: e }) => [(D(), v(A(ce), {
744
- key: A(o)(e),
745
+ "tool-editSpreadsheet": P(({ part: e }) => [(k(), y(M(ce), {
746
+ key: M(s)(e),
745
747
  part: e,
746
- "file-url": $e
748
+ "file-url": et
747
749
  }, null, 8, ["part"]))]),
748
- "tool-shareDocument": M(({ part: e }) => [(D(), v(A(le), {
749
- key: A(o)(e),
750
+ "tool-shareDocument": P(({ part: e }) => [(k(), y(M(le), {
751
+ key: M(s)(e),
750
752
  part: e,
751
- "on-download": Dt
753
+ "on-download": Ot
752
754
  }, null, 8, ["part"]))]),
753
755
  _: 1
754
756
  }, 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(".")))]),
755
757
  _: 1
756
758
  }),
757
- x("div", Me, [
758
- S(g, { name: "pk-chatbot-view-chat-fade" }, {
759
- default: M(() => [Ct.value ? (D(), v(_e, {
759
+ S("div", je, [
760
+ w(_, { name: "pk-chatbot-view-chat-fade" }, {
761
+ default: P(() => [wt.value ? (k(), y(_e, {
760
762
  key: 0,
761
763
  class: "pk-chatbot-view-chat__aurora",
762
764
  "source-selector": ".pk-chatbot-input__form"
763
- })) : y("", !0)]),
765
+ })) : b("", !0)]),
764
766
  _: 1
765
767
  }),
766
- A($t) && !A(Ue) ? (D(), v(p, {
768
+ M(nn) && !M(Ue) ? (k(), y(m, {
767
769
  key: 0,
768
- pending: A($t),
769
- stopping: A(en),
770
- onStop: A(rn)
770
+ pending: M(nn),
771
+ stopping: M(rn),
772
+ onStop: M(sn)
771
773
  }, null, 8, [
772
774
  "pending",
773
775
  "stopping",
774
776
  "onStop"
775
- ])) : y("", !0),
776
- A(Ue) ? (D(), b("div", Ne, k(A(H)("message.chatErrorConversationBlocked")), 1)) : Ft.value === "idle" ? (D(), v(d, {
777
+ ])) : b("", !0),
778
+ M(Ue) ? (k(), x("div", Me, j(M(W)("message.chatErrorConversationBlocked")), 1)) : Rt.value === "idle" ? (k(), y(f, {
777
779
  key: 3,
778
- modelValue: A(R),
779
- "onUpdate:modelValue": n[4] ||= (e) => ne(R) ? R.value = e : null,
780
- "pending-attachments": A(Ge),
781
- "onUpdate:pendingAttachments": n[5] ||= (e) => ne(Ge) ? Ge.value = e : null,
782
- placeholder: A(He),
783
- "dismissable-notice": A(xt) && A(L).messages.length <= 1 ? A(xt) : void 0,
784
- "page-notice": yt.value,
785
- status: _t.value,
786
- "max-message-length": A(F)?.maxMessageLength,
787
- "file-upload": B.value,
788
- "attachment-limit-reached": A(Ke),
789
- "attachment-notice": bt.value,
790
- "voice-enabled": Pt.value,
791
- onStopGeneration: A(tt),
792
- onSubmit: A(et),
793
- onFileSelect: A(ut),
794
- onDismissAttachmentNotice: A(dt),
795
- onDismissPageNotice: A(mt),
796
- onVoiceStart: Bt
780
+ modelValue: M(Ve),
781
+ "onUpdate:modelValue": n[4] ||= (e) => te(Ve) ? Ve.value = e : null,
782
+ "pending-attachments": M(Ge),
783
+ "onUpdate:pendingAttachments": n[5] ||= (e) => te(Ge) ? Ge.value = e : null,
784
+ placeholder: M(He),
785
+ "dismissable-notice": M(St) && M(B).messages.length <= 1 ? M(St) : void 0,
786
+ "page-notice": bt.value,
787
+ status: vt.value,
788
+ "max-message-length": M(L)?.maxMessageLength,
789
+ "file-upload": H.value,
790
+ "attachment-limit-reached": M(Ke),
791
+ "attachment-notice": xt.value,
792
+ "voice-enabled": Lt.value,
793
+ onStopGeneration: M(nt),
794
+ onSubmit: M(tt),
795
+ onFileSelect: M(dt),
796
+ onDismissAttachmentNotice: M(ft),
797
+ onDismissPageNotice: M(ht),
798
+ onVoiceStart: Ut
797
799
  }, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
798
800
  name: "prepend",
799
- fn: M(() => [x("span", Pe, [S(l, {
801
+ fn: P(() => [S("span", Ne, [w(u, {
800
802
  modifiers: "surface",
801
803
  class: "pk-chatbot-view-chat__agent-chip-avatar",
802
- "img-src": A(F)?.logo,
803
- name: A(P).name
804
- }, null, 8, ["img-src", "name"]), A(P).name ? (D(), b("strong", Fe, k(A(P).name), 1)) : y("", !0)])]),
804
+ "img-src": M(L)?.logo,
805
+ name: M(I).name
806
+ }, null, 8, ["img-src", "name"]), M(I).name ? (k(), x("strong", Pe, j(M(I).name), 1)) : b("", !0)])]),
805
807
  key: "0"
806
808
  } : void 0]), 1032, [
807
809
  "modelValue",
@@ -820,21 +822,21 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
820
822
  "onFileSelect",
821
823
  "onDismissAttachmentNotice",
822
824
  "onDismissPageNotice"
823
- ])) : (D(), v(Te, {
825
+ ])) : (k(), y(we, {
824
826
  key: 2,
825
- state: Ft.value,
826
- sample: Rt,
827
- spectrum: zt,
828
- "remaining-seconds": A(Z).remainingSeconds.value,
829
- muted: U.value,
830
- error: It.value,
831
- "raw-error": A(Z).error.value,
832
- live: A(Z).isActive.value,
827
+ state: Rt.value,
828
+ sample: Vt,
829
+ spectrum: Ht,
830
+ "remaining-seconds": M(Z).remainingSeconds.value,
831
+ muted: G.value,
832
+ error: zt.value,
833
+ "raw-error": M(Z).error.value,
834
+ live: M(Z).isActive.value,
833
835
  class: "pk-chatbot-view-chat__voice",
834
- onToggleMute: Qt,
835
- onHangUp: Vt,
836
- onRetry: Ut,
837
- onDismiss: Ht
836
+ onToggleMute: tn,
837
+ onHangUp: Wt,
838
+ onRetry: Kt,
839
+ onDismiss: Gt
838
840
  }, null, 8, [
839
841
  "state",
840
842
  "remaining-seconds",
@@ -844,11 +846,11 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
844
846
  "live"
845
847
  ]))
846
848
  ]),
847
- S(g, null, {
848
- default: M(() => [A(Ot) && B.value?.enabled ? (D(), b("div", Ie, [S(r, {
849
+ w(_, null, {
850
+ default: P(() => [M(kt) && H.value?.enabled ? (k(), x("div", Fe, [w(r, {
849
851
  name: "ri:upload-cloud-2-line",
850
852
  class: "pk-chatbot-view-chat__drop-overlay-icon"
851
- }), x("span", null, k(A(H)("action.dropFile")), 1)])) : y("", !0)]),
853
+ }), S("span", null, j(M(W)("action.dropFile")), 1)])) : b("", !0)]),
852
854
  _: 1
853
855
  })
854
856
  ], 2);
@@ -856,6 +858,6 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
856
858
  }
857
859
  });
858
860
  //#endregion
859
- export { _e as i, Te as n, ye as r, Ve as t };
861
+ export { _e as i, we as n, ye as r, Be as t };
860
862
 
861
- //# sourceMappingURL=PkChatbotViewChat-t-XkwFbe.js.map
863
+ //# sourceMappingURL=PkChatbotViewChat-BI_PtT72.js.map