@8wave/ai-elements 0.117.0-beta.14 → 0.117.0-beta.24

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 (133) hide show
  1. package/dist/_chunks/Agent-CFkAjuTy.js.map +1 -1
  2. package/dist/_chunks/{PkChatbotFilePreview-C-02Ovgi.js → PkChatbotFilePreview-BCWqFkY8.js} +2 -2
  3. package/dist/_chunks/{PkChatbotFilePreview-C-02Ovgi.js.map → PkChatbotFilePreview-BCWqFkY8.js.map} +1 -1
  4. package/dist/_chunks/{PkHeldImage-B4gZSfa6.js → PkHeldImage-CEFdfFts.js} +2 -2
  5. package/dist/_chunks/{PkHeldImage-B4gZSfa6.js.map → PkHeldImage-CEFdfFts.js.map} +1 -1
  6. package/dist/_chunks/{PkLazyImg-DT3U67q-.js → PkLazyImg-BfqUTZXg.js} +2 -2
  7. package/dist/_chunks/{PkLazyImg-DT3U67q-.js.map → PkLazyImg-BfqUTZXg.js.map} +1 -1
  8. package/dist/_chunks/{PkStreamingMarkdown-BoVR7gtl.js → PkStreamingMarkdown-DhViwQEZ.js} +2 -2
  9. package/dist/_chunks/PkStreamingMarkdown-DhViwQEZ.js.map +1 -0
  10. package/dist/_chunks/{PkToolEditSpreadsheet-BlfsM7Qp.js → PkToolEditSpreadsheet-CQ6wLZyD.js} +2 -2
  11. package/dist/_chunks/{PkToolEditSpreadsheet-BlfsM7Qp.js.map → PkToolEditSpreadsheet-CQ6wLZyD.js.map} +1 -1
  12. package/dist/_chunks/{PkToolRequestGeolocation-DdQ91rpB.js → PkToolRequestGeolocation-B5wbvcC1.js} +2 -2
  13. package/dist/_chunks/{PkToolRequestGeolocation-DdQ91rpB.js.map → PkToolRequestGeolocation-B5wbvcC1.js.map} +1 -1
  14. package/dist/_chunks/{PkToolRequestOAuthConnection-yuTNMEFj.js → PkToolRequestOAuthConnection-Dma-POc7.js} +2 -2
  15. package/dist/_chunks/{PkToolRequestOAuthConnection-yuTNMEFj.js.map → PkToolRequestOAuthConnection-Dma-POc7.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowArtifact-DaTlDsDo.js → PkToolShowArtifact-DoLn-Tb8.js} +3 -3
  17. package/dist/_chunks/{PkToolShowArtifact-DaTlDsDo.js.map → PkToolShowArtifact-DoLn-Tb8.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowCalendarEvent-DmHdErMH.js → PkToolShowCalendarEvent-CqGz7T6h.js} +2 -2
  19. package/dist/_chunks/{PkToolShowCalendarEvent-DmHdErMH.js.map → PkToolShowCalendarEvent-CqGz7T6h.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowComparison-DcXSOyMw.js → PkToolShowComparison-Doa9DkEp.js} +2 -2
  21. package/dist/_chunks/{PkToolShowComparison-DcXSOyMw.js.map → PkToolShowComparison-Doa9DkEp.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowContactForm-Dxh6bEZt.js → PkToolShowContactForm-B6_h5oSO.js} +4 -4
  23. package/dist/_chunks/{PkToolShowContactForm-Dxh6bEZt.js.map → PkToolShowContactForm-B6_h5oSO.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowDiagram-B_kuxtaZ.js → PkToolShowDiagram-R91cRscb.js} +2 -2
  25. package/dist/_chunks/{PkToolShowDiagram-B_kuxtaZ.js.map → PkToolShowDiagram-R91cRscb.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowEmail-AWhVo3l3.js → PkToolShowEmail-D-ZrJpBo.js} +2 -2
  27. package/dist/_chunks/{PkToolShowEmail-AWhVo3l3.js.map → PkToolShowEmail-D-ZrJpBo.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowForm-D1VzwMmq.js → PkToolShowForm-Bw98qrZ_.js} +3 -3
  29. package/dist/_chunks/{PkToolShowForm-D1VzwMmq.js.map → PkToolShowForm-Bw98qrZ_.js.map} +1 -1
  30. package/dist/_chunks/{PkToolShowImageGallery-Cs8FxK9V.js → PkToolShowImageGallery-o4OXj4kF.js} +3 -3
  31. package/dist/_chunks/{PkToolShowImageGallery-Cs8FxK9V.js.map → PkToolShowImageGallery-o4OXj4kF.js.map} +1 -1
  32. package/dist/_chunks/{PkToolShowLocation-BcqMFhXM.js → PkToolShowLocation-DXpfaKpJ.js} +2 -2
  33. package/dist/_chunks/{PkToolShowLocation-BcqMFhXM.js.map → PkToolShowLocation-DXpfaKpJ.js.map} +1 -1
  34. package/dist/_chunks/{PkToolShowMessage-DlckklB3.js → PkToolShowMessage-BwAo9Qx2.js} +2 -2
  35. package/dist/_chunks/{PkToolShowMessage-DlckklB3.js.map → PkToolShowMessage-BwAo9Qx2.js.map} +1 -1
  36. package/dist/_chunks/{PkToolShowProductList-B4fxqFaf.js → PkToolShowProductList-BKydg1YK.js} +4 -4
  37. package/dist/_chunks/{PkToolShowProductList-B4fxqFaf.js.map → PkToolShowProductList-BKydg1YK.js.map} +1 -1
  38. package/dist/_chunks/{PkToolShowQrCode-CFueYo4P.js → PkToolShowQrCode-CbBvVSmj.js} +2 -2
  39. package/dist/_chunks/{PkToolShowQrCode-CFueYo4P.js.map → PkToolShowQrCode-CbBvVSmj.js.map} +1 -1
  40. package/dist/_chunks/{PkToolShowSources-DNiiBz9b.js → PkToolShowSources-gleJ91hl.js} +3 -3
  41. package/dist/_chunks/{PkToolShowSources-DNiiBz9b.js.map → PkToolShowSources-gleJ91hl.js.map} +1 -1
  42. package/dist/_chunks/{PkToolShowSuggestedReply-Bn1w6HdI.js → PkToolShowSuggestedReply-fsG-mX-c.js} +2 -2
  43. package/dist/_chunks/{PkToolShowSuggestedReply-Bn1w6HdI.js.map → PkToolShowSuggestedReply-fsG-mX-c.js.map} +1 -1
  44. package/dist/_chunks/{PkToolShowVideo-Be5bKhUf.js → PkToolShowVideo-CHbk5VXp.js} +3 -3
  45. package/dist/_chunks/{PkToolShowVideo-Be5bKhUf.js.map → PkToolShowVideo-CHbk5VXp.js.map} +1 -1
  46. package/dist/_chunks/{PkToolShowWeather-B2rcVmEJ.js → PkToolShowWeather-rTcxGcWl.js} +2 -2
  47. package/dist/_chunks/{PkToolShowWeather-B2rcVmEJ.js.map → PkToolShowWeather-rTcxGcWl.js.map} +1 -1
  48. package/dist/_chunks/{PkToolShowWebPages-Bs251x0h.js → PkToolShowWebPages-BzH1_SjA.js} +4 -4
  49. package/dist/_chunks/{PkToolShowWebPages-Bs251x0h.js.map → PkToolShowWebPages-BzH1_SjA.js.map} +1 -1
  50. package/dist/_chunks/{VvCheckbox.es-DKT8ys4U.js → VvCheckbox.es-CGVgFeBD.js} +2 -2
  51. package/dist/_chunks/{VvCheckbox.es-DKT8ys4U.js.map → VvCheckbox.es-CGVgFeBD.js.map} +1 -1
  52. package/dist/_chunks/{VvCheckboxGroup.es-BR2Zrit_.js → VvCheckboxGroup.es-CWqFL8RR.js} +2 -2
  53. package/dist/_chunks/{VvCheckboxGroup.es-BR2Zrit_.js.map → VvCheckboxGroup.es-CWqFL8RR.js.map} +1 -1
  54. package/dist/_chunks/{VvCombobox.es-DWJtN8ha.js → VvCombobox.es-kUT6EeIn.js} +2 -2
  55. package/dist/_chunks/{VvCombobox.es-DWJtN8ha.js.map → VvCombobox.es-kUT6EeIn.js.map} +1 -1
  56. package/dist/_chunks/{VvInputText.es-BH6ohnZF.js → VvInputText.es-CJfMyJ0G.js} +2 -2
  57. package/dist/_chunks/{VvInputText.es-BH6ohnZF.js.map → VvInputText.es-CJfMyJ0G.js.map} +1 -1
  58. package/dist/_chunks/{VvRadio.es-L9HmgYh4.js → VvRadio.es-BkIuydtE.js} +2 -2
  59. package/dist/_chunks/{VvRadio.es-L9HmgYh4.js.map → VvRadio.es-BkIuydtE.js.map} +1 -1
  60. package/dist/_chunks/{VvRadioGroup.es-Dyip2x3c.js → VvRadioGroup.es-jFTh_3Gw.js} +2 -2
  61. package/dist/_chunks/{VvRadioGroup.es-Dyip2x3c.js.map → VvRadioGroup.es-jFTh_3Gw.js.map} +1 -1
  62. package/dist/_chunks/{VvSelect.es-B8GZOw4X.js → VvSelect.es-Cy_TK4HS.js} +2 -2
  63. package/dist/_chunks/{VvSelect.es-B8GZOw4X.js.map → VvSelect.es-Cy_TK4HS.js.map} +1 -1
  64. package/dist/_chunks/{VvTextarea.es-7E1SuavW.js → VvTextarea.es-aCy57_J_.js} +2 -2
  65. package/dist/_chunks/{VvTextarea.es-7E1SuavW.js.map → VvTextarea.es-aCy57_J_.js.map} +1 -1
  66. package/dist/_chunks/{index.es-a98v5vZY.js → index.es-7xRVenur.js} +10 -10
  67. package/dist/_chunks/{index.es-a98v5vZY.js.map → index.es-7xRVenur.js.map} +1 -1
  68. package/dist/_chunks/{index.es-D_E1Gj_U.js → index.es-dzrOH5E9.js} +2 -2
  69. package/dist/_chunks/{index.es-D_E1Gj_U.js.map → index.es-dzrOH5E9.js.map} +1 -1
  70. package/dist/ai-elements.es.js +623 -593
  71. package/dist/ai-elements.es.js.map +1 -1
  72. package/dist-vue/PkChatbot.js +1 -1
  73. package/dist-vue/PkChatbotAudioTranscript.js +1 -1
  74. package/dist-vue/PkChatbotAuth.js +1 -1
  75. package/dist-vue/PkChatbotEmptyState.js +1 -1
  76. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  77. package/dist-vue/PkChatbotInput.js +1 -1
  78. package/dist-vue/PkChatbotMessages.js +1 -1
  79. package/dist-vue/PkChatbotSteps.js +1 -1
  80. package/dist-vue/PkChatbotViewChat.js +1 -1
  81. package/dist-vue/_chunks/Media-C6Xsb1Lm.js.map +1 -1
  82. package/dist-vue/_chunks/{PkChatbot-CSMWib9A.js → PkChatbot-CqjOLnzZ.js} +3 -3
  83. package/dist-vue/_chunks/{PkChatbot-CSMWib9A.js.map → PkChatbot-CqjOLnzZ.js.map} +1 -1
  84. package/dist-vue/_chunks/PkChatbotAudioTranscript-BUxBHanA.js +80 -0
  85. package/dist-vue/_chunks/PkChatbotAudioTranscript-BUxBHanA.js.map +1 -0
  86. package/dist-vue/_chunks/{PkChatbotAuth-C0qfDOGh.js → PkChatbotAuth-Byn_3wdb.js} +2 -2
  87. package/dist-vue/_chunks/{PkChatbotAuth-C0qfDOGh.js.map → PkChatbotAuth-Byn_3wdb.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkChatbotEmptyState-DjmF3dcI.js → PkChatbotEmptyState-eS8safl9.js} +2 -2
  89. package/dist-vue/_chunks/{PkChatbotEmptyState-DjmF3dcI.js.map → PkChatbotEmptyState-eS8safl9.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkChatbotFeedbackForm-DrPKjh-0.js → PkChatbotFeedbackForm-Cqbz2qey.js} +2 -2
  91. package/dist-vue/_chunks/{PkChatbotFeedbackForm-DrPKjh-0.js.map → PkChatbotFeedbackForm-Cqbz2qey.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkChatbotInput-B8hKYdD9.js → PkChatbotInput-CMAklEDF.js} +2 -2
  93. package/dist-vue/_chunks/{PkChatbotInput-B8hKYdD9.js.map → PkChatbotInput-CMAklEDF.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkChatbotMessages-DJmRPFB8.js → PkChatbotMessages-DHcfZNYn.js} +287 -287
  95. package/dist-vue/_chunks/PkChatbotMessages-DHcfZNYn.js.map +1 -0
  96. package/dist-vue/_chunks/{PkChatbotSteps-qyUOh42z.js → PkChatbotSteps-CLjlBbYH.js} +2 -2
  97. package/dist-vue/_chunks/{PkChatbotSteps-qyUOh42z.js.map → PkChatbotSteps-CLjlBbYH.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkChatbotViewChat-C7eA7hef.js → PkChatbotViewChat-CmZ1E6ip.js} +5 -5
  99. package/dist-vue/_chunks/{PkChatbotViewChat-C7eA7hef.js.map → PkChatbotViewChat-CmZ1E6ip.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkStreamingMarkdown-NWO3WTw9.js → PkStreamingMarkdown-DdA0SZ4P.js} +2 -2
  101. package/dist-vue/_chunks/PkStreamingMarkdown-DdA0SZ4P.js.map +1 -0
  102. package/dist-vue/_chunks/{PkToolShowArtifact-Dr0NHXDG.js → PkToolShowArtifact-DzCxmsLc.js} +2 -2
  103. package/dist-vue/_chunks/{PkToolShowArtifact-Dr0NHXDG.js.map → PkToolShowArtifact-DzCxmsLc.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkToolShowContactForm-BDm1w3UK.js → PkToolShowContactForm-BNqRlhkB.js} +3 -3
  105. package/dist-vue/_chunks/{PkToolShowContactForm-BDm1w3UK.js.map → PkToolShowContactForm-BNqRlhkB.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkToolShowDiagram-BKz7OPHC.js → PkToolShowDiagram-CtLg5U0A.js} +2 -2
  107. package/dist-vue/_chunks/{PkToolShowDiagram-BKz7OPHC.js.map → PkToolShowDiagram-CtLg5U0A.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolShowForm-cKgWwvPD.js → PkToolShowForm-CMKKzfZU.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowForm-cKgWwvPD.js.map → PkToolShowForm-CMKKzfZU.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolShowImageGallery-DsAQhyOq.js → PkToolShowImageGallery-C-LVA9Eg.js} +2 -2
  111. package/dist-vue/_chunks/{PkToolShowImageGallery-DsAQhyOq.js.map → PkToolShowImageGallery-C-LVA9Eg.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkToolShowProductList-OwGaM5qj.js → PkToolShowProductList-DU8Am4mJ.js} +2 -2
  113. package/dist-vue/_chunks/{PkToolShowProductList-OwGaM5qj.js.map → PkToolShowProductList-DU8Am4mJ.js.map} +1 -1
  114. package/dist-vue/_chunks/{PkToolShowSources-BVOqH-ZV.js → PkToolShowSources-vmHitTkY.js} +2 -2
  115. package/dist-vue/_chunks/{PkToolShowSources-BVOqH-ZV.js.map → PkToolShowSources-vmHitTkY.js.map} +1 -1
  116. package/dist-vue/_chunks/{PkToolShowVideo-BAqSAfdq.js → PkToolShowVideo-BcWVHiPb.js} +2 -2
  117. package/dist-vue/_chunks/{PkToolShowVideo-BAqSAfdq.js.map → PkToolShowVideo-BcWVHiPb.js.map} +1 -1
  118. package/dist-vue/_chunks/{PkToolShowWebPages-BeMJqIkW.js → PkToolShowWebPages-DemGs1ZO.js} +2 -2
  119. package/dist-vue/_chunks/{PkToolShowWebPages-BeMJqIkW.js.map → PkToolShowWebPages-DemGs1ZO.js.map} +1 -1
  120. package/dist-vue/_chunks/{index.es-C_tAUcFb.js → index.es-Tp61H9fG.js} +2 -2
  121. package/dist-vue/_chunks/{index.es-C_tAUcFb.js.map → index.es-Tp61H9fG.js.map} +1 -1
  122. package/dist-vue/composables.js +2 -2
  123. package/dist-vue/composables.js.map +1 -1
  124. package/dist-vue/index.js +16 -16
  125. package/dist-vue/locales.js +2 -2
  126. package/dist-vue/packages/models/src/schema/Media.d.ts +8 -0
  127. package/dist-vue/style.css +1 -1
  128. package/package.json +1 -1
  129. package/dist/_chunks/PkStreamingMarkdown-BoVR7gtl.js.map +0 -1
  130. package/dist-vue/_chunks/PkChatbotAudioTranscript-B-cSKvWR.js +0 -52
  131. package/dist-vue/_chunks/PkChatbotAudioTranscript-B-cSKvWR.js.map +0 -1
  132. package/dist-vue/_chunks/PkChatbotMessages-DJmRPFB8.js.map +0 -1
  133. package/dist-vue/_chunks/PkStreamingMarkdown-NWO3WTw9.js.map +0 -1
@@ -1,73 +1,73 @@
1
1
  import { T as e, k as t, n, v as r, x as i } from "./schemas-COXYARAA.js";
2
2
  import { a } from "./Media-C6Xsb1Lm.js";
3
3
  import { k as o } from "./Agent-CNJ3b9Je.js";
4
- import { t as s } from "./PkStreamingMarkdown-NWO3WTw9.js";
4
+ import { t as s } from "./PkStreamingMarkdown-DdA0SZ4P.js";
5
5
  import "./src-DCfvejyT.js";
6
6
  import { c, i as l, l as u, n as d, o as f, s as p, t as m } from "./message-BOiF6Bt5.js";
7
- import { t as h } from "./PkChatbotError-CRGbK09-.js";
8
- import { t as g } from "./PkRelativeTime--1cIphlA.js";
9
- import { C as _, S as ee, a as te, b as v, d as y, f as ne, i as re, l as ie, m as ae, n as b, p as oe, t as x, v as se, w as ce, x as le } from "./utils-DxuGvgWg.js";
10
- import { t as ue } from "./PkChatbotFilePreview-DIP8KLkS.js";
11
- import { t as de } from "./PkChatbotFeedbackForm-DrPKjh-0.js";
12
- import { t as fe } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
13
- import { t as pe } from "./PkChatbotAudioTranscript-B-cSKvWR.js";
14
- import { n as me, t as he } from "./PkChatbotSteps-qyUOh42z.js";
7
+ import { t as h } from "./PkChatbotAudioTranscript-BUxBHanA.js";
8
+ import { t as g } from "./PkChatbotError-CRGbK09-.js";
9
+ import { t as _ } from "./PkRelativeTime--1cIphlA.js";
10
+ import { C as v, S as y, a as ee, b, d as te, f as ne, i as re, l as ie, m as x, n as ae, p as oe, t as se, v as ce, w as le, x as ue } from "./utils-DxuGvgWg.js";
11
+ import { t as de } from "./PkChatbotFilePreview-DIP8KLkS.js";
12
+ import { t as fe } from "./PkChatbotFeedbackForm-Cqbz2qey.js";
13
+ import { t as pe } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
14
+ import { n as me, t as he } from "./PkChatbotSteps-CLjlBbYH.js";
15
15
  import { t as ge } from "./PkChatbotOutlineRail-np4g6vsz.js";
16
16
  import { VvButton as _e, VvButtonGroup as ve, VvIcon as ye } from "@volverjs/ui-vue/components";
17
- import { Fragment as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createTextVNode as be, createVNode as k, defineAsyncComponent as A, defineComponent as j, mergeProps as xe, nextTick as M, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as F, onMounted as Se, openBlock as I, ref as L, renderList as Ce, renderSlot as we, resolveDynamicComponent as Te, toDisplayString as R, unref as z, useSlots as Ee, useTemplateRef as De, watch as B, withCtx as V, withModifiers as H } from "vue";
18
- import { useI18n as Oe } from "vue-i18n";
17
+ import { Fragment as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createTextVNode as be, createVNode as k, defineAsyncComponent as A, defineComponent as xe, mergeProps as Se, nextTick as j, normalizeClass as M, normalizeStyle as N, onBeforeUnmount as P, onMounted as Ce, openBlock as F, ref as I, renderList as we, renderSlot as Te, resolveDynamicComponent as Ee, toDisplayString as L, unref as R, useSlots as De, useTemplateRef as Oe, watch as z, withCtx as B, withModifiers as V } from "vue";
18
+ import { useI18n as ke } from "vue-i18n";
19
19
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.js
20
- function U(e) {
20
+ function H(e) {
21
21
  return t(n, e);
22
22
  }
23
23
  r({
24
24
  platform: i(),
25
25
  threadId: i()
26
26
  });
27
- var ke = r({
27
+ var Ae = r({
28
28
  wakeId: e(),
29
- dueAt: U(),
29
+ dueAt: H(),
30
30
  reason: i()
31
31
  });
32
- r({ pendingWakeup: ke.nullable() }), r({ wakeId: e() });
33
- var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ae = /* @__PURE__ */ new Set([
32
+ r({ pendingWakeup: Ae.nullable() }), r({ wakeId: e() });
33
+ var U = (e) => e?.role === "user" && !!e.metadata?.wakeup, je = /* @__PURE__ */ new Set([
34
34
  "input-streaming",
35
35
  "input-available",
36
36
  "approval-requested"
37
- ]), je = (e) => {
37
+ ]), Me = (e) => {
38
38
  if (e?.role !== "assistant") return !1;
39
39
  let t = !1;
40
40
  for (let n of e.parts) {
41
41
  if (n.type === "text" && n.text.trim() || n.type === "file") return !1;
42
42
  let e = n.state;
43
- if (e && Ae.has(e)) return !1;
43
+ if (e && je.has(e)) return !1;
44
44
  n.type === "tool-scheduleWakeup" && (t = e === "output-available" && n.input?.noop === !0);
45
45
  }
46
46
  return t;
47
- }, G = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Me = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", Ne = (e) => e ? G(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", Pe = (e) => e ? G(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", K = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", Fe = {
47
+ }, W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), Ne = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", Pe = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", Fe = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", G = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", Ie = {
48
48
  requestOAuthConnection: A(() => import("./PkToolRequestOAuthConnection-B262JqNh.js")),
49
- showArtifact: A(() => import("./PkToolShowArtifact-Dr0NHXDG.js").then((e) => e.n)),
49
+ showArtifact: A(() => import("./PkToolShowArtifact-DzCxmsLc.js").then((e) => e.n)),
50
50
  showCalendarEvent: A(() => import("./PkToolShowCalendarEvent-Dv_rss26.js").then((e) => e.n)),
51
51
  showComparison: A(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
52
- showContactForm: A(() => import("./PkToolShowContactForm-BDm1w3UK.js").then((e) => e.n)),
53
- showDiagram: A(() => import("./PkToolShowDiagram-BKz7OPHC.js")),
52
+ showContactForm: A(() => import("./PkToolShowContactForm-BNqRlhkB.js").then((e) => e.n)),
53
+ showDiagram: A(() => import("./PkToolShowDiagram-CtLg5U0A.js")),
54
54
  showEmail: A(() => import("./PkToolShowEmail-C591LR5N.js").then((e) => e.n)),
55
- showImageGallery: A(() => import("./PkToolShowImageGallery-DsAQhyOq.js").then((e) => e.n)),
55
+ showImageGallery: A(() => import("./PkToolShowImageGallery-C-LVA9Eg.js").then((e) => e.n)),
56
56
  showLocation: A(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)),
57
57
  showMessage: A(() => import("./PkToolShowMessage-CbXERPHI.js").then((e) => e.n)),
58
- showForm: A(() => import("./PkToolShowForm-cKgWwvPD.js").then((e) => e.n)),
59
- showMultipleChoice: A(() => import("./PkToolShowForm-cKgWwvPD.js").then((e) => e.n)),
60
- showProductList: A(() => import("./PkToolShowProductList-OwGaM5qj.js").then((e) => e.n)),
58
+ showForm: A(() => import("./PkToolShowForm-CMKKzfZU.js").then((e) => e.n)),
59
+ showMultipleChoice: A(() => import("./PkToolShowForm-CMKKzfZU.js").then((e) => e.n)),
60
+ showProductList: A(() => import("./PkToolShowProductList-DU8Am4mJ.js").then((e) => e.n)),
61
61
  showQrCode: A(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
62
- showSources: A(() => import("./PkToolShowSources-BVOqH-ZV.js").then((e) => e.n)),
62
+ showSources: A(() => import("./PkToolShowSources-vmHitTkY.js").then((e) => e.n)),
63
63
  showSuggestedReply: A(() => import("./PkToolShowSuggestedReply-CF31zmck.js").then((e) => e.n)),
64
- showVideo: A(() => import("./PkToolShowVideo-BAqSAfdq.js")),
64
+ showVideo: A(() => import("./PkToolShowVideo-BcWVHiPb.js")),
65
65
  showWeather: A(() => import("./PkToolShowWeather-BH-FtLpk.js")),
66
- showWebPages: A(() => import("./PkToolShowWebPages-BeMJqIkW.js").then((e) => e.n))
67
- }, Ie = {
66
+ showWebPages: A(() => import("./PkToolShowWebPages-DemGs1ZO.js").then((e) => e.n))
67
+ }, Le = {
68
68
  key: 0,
69
69
  class: "text-12 text-word-3 m-0 mb-xs"
70
- }, Le = /* @__PURE__ */ j({
70
+ }, Re = /* @__PURE__ */ xe({
71
71
  __name: "PkToolApprovalPreviewMessage",
72
72
  props: { input: {} },
73
73
  setup(e) {
@@ -75,12 +75,12 @@ var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ae = /* @__PURE__ */
75
75
  let e = t.input;
76
76
  return typeof e?.message == "string" ? e.message : "";
77
77
  });
78
- return (e, t) => n.value ? (I(), D("p", Ie, R(n.value), 1)) : E("", !0);
78
+ return (e, t) => n.value ? (F(), D("p", Le, L(n.value), 1)) : E("", !0);
79
79
  }
80
- }), Re = { [x]: Le }, ze = {
80
+ }), ze = { [se]: Re }, Be = {
81
81
  key: 0,
82
82
  class: "text-12 text-word-3 m-0 mb-xs"
83
- }, Be = /* @__PURE__ */ j({
83
+ }, Ve = /* @__PURE__ */ xe({
84
84
  __name: "PkToolApprovalCard",
85
85
  props: {
86
86
  part: {},
@@ -89,7 +89,7 @@ var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ae = /* @__PURE__ */
89
89
  },
90
90
  emits: ["respond"],
91
91
  setup(e, { emit: t }) {
92
- let n = e, r = t, { t: i } = Oe({ useScope: "global" }), a = w(() => n.part), s = w(() => l(n.part)), c = w(() => s.value === x), u = w(() => c.value ? (a.value.state === "input-available" || o(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), d = w(() => u.value && n.actionable === !0), f = w(() => u.value && n.actionable !== !0), p = w(() => c.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), m = w(() => c.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), h = w(() => Re[s.value]), g = w(() => {
92
+ let n = e, r = t, { t: i } = ke({ useScope: "global" }), a = w(() => n.part), s = w(() => l(n.part)), c = w(() => s.value === se), u = w(() => c.value ? (a.value.state === "input-available" || o(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), d = w(() => u.value && n.actionable === !0), f = w(() => u.value && n.actionable !== !0), p = w(() => c.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), m = w(() => c.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), h = w(() => ze[s.value]), g = w(() => {
93
93
  if (f.value) return {
94
94
  icon: "ri:time-line",
95
95
  message: i("toolApproval.expired")
@@ -105,36 +105,36 @@ var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ae = /* @__PURE__ */
105
105
  }), _ = w(() => !!g.value && !h.value);
106
106
  return (t, n) => {
107
107
  let o = _e, s = ve, l = ye;
108
- return I(), D("div", { class: N(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
108
+ return F(), D("div", { class: M(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
109
109
  k(C, null, {
110
- default: V(() => [!c.value && u.value ? (I(), D("p", ze, R(z(i)("toolApproval.prompt")), 1)) : E("", !0)]),
110
+ default: B(() => [!c.value && u.value ? (F(), D("p", Be, L(R(i)("toolApproval.prompt")), 1)) : E("", !0)]),
111
111
  _: 1
112
112
  }),
113
- h.value ? (I(), T(Te(h.value), {
113
+ h.value ? (F(), T(Ee(h.value), {
114
114
  key: 0,
115
115
  part: e.part,
116
116
  input: a.value.input
117
117
  }, null, 8, ["part", "input"])) : E("", !0),
118
118
  k(C, { mode: "out-in" }, {
119
- default: V(() => [g.value ? (I(), D("p", {
119
+ default: B(() => [g.value ? (F(), D("p", {
120
120
  key: 1,
121
- class: N(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
121
+ class: M(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
122
122
  }, [k(l, {
123
123
  name: g.value.icon,
124
124
  class: "shrink-0"
125
- }, null, 8, ["name"]), be(" " + R(g.value.message), 1)], 2)) : (I(), T(s, { key: 0 }, {
126
- default: V(() => [k(o, {
125
+ }, null, 8, ["name"]), be(" " + L(g.value.message), 1)], 2)) : (F(), T(s, { key: 0 }, {
126
+ default: B(() => [k(o, {
127
127
  modifiers: "primary-small",
128
128
  disabled: !d.value,
129
129
  icon: "ri:check-line",
130
- label: z(i)("action.proceed"),
131
- onClick: n[0] ||= H((e) => r("respond", !0), ["stop"])
130
+ label: R(i)("action.proceed"),
131
+ onClick: n[0] ||= V((e) => r("respond", !0), ["stop"])
132
132
  }, null, 8, ["disabled", "label"]), k(o, {
133
133
  modifiers: "action-quiet-small",
134
134
  disabled: !d.value,
135
135
  icon: "ri:close-line",
136
- label: z(i)("action.cancel"),
137
- onClick: n[1] ||= H((e) => r("respond", !1), ["stop"])
136
+ label: R(i)("action.cancel"),
137
+ onClick: n[1] ||= V((e) => r("respond", !1), ["stop"])
138
138
  }, null, 8, ["disabled", "label"])]),
139
139
  _: 1
140
140
  }))]),
@@ -143,72 +143,72 @@ var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ae = /* @__PURE__ */
143
143
  ], 2);
144
144
  };
145
145
  }
146
- }), Ve = 30, q = 500;
147
- function He(e) {
148
- let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = L(!1), u = L(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
146
+ }), He = 30, K = 500;
147
+ function Ue(e) {
148
+ let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = I(!1), u = I(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
149
149
  !t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
150
150
  top: t.value.scrollHeight,
151
151
  behavior: e
152
152
  }), setTimeout(() => {
153
153
  d = !1;
154
- }, e === "instant" ? 0 : q));
155
- }, ee = (e) => {
154
+ }, e === "instant" ? 0 : K));
155
+ }, v = (e) => {
156
156
  e.deltaY < 0 && (l.value = !0);
157
- }, te = 0, v = (e) => {
158
- te = e.touches[0]?.clientY ?? 0;
159
- }, y = (e) => {
157
+ }, y = 0, ee = (e) => {
158
+ y = e.touches[0]?.clientY ?? 0;
159
+ }, b = (e) => {
160
160
  let t = e.touches[0]?.clientY ?? 0;
161
- t > te && (l.value = !0), te = t;
162
- }, ne = () => {
161
+ t > y && (l.value = !0), y = t;
162
+ }, te = () => {
163
163
  if (!t.value) return;
164
164
  let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
165
- u.value = n - r - e < Ve, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
166
- }, re = () => {
165
+ u.value = n - r - e < He, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
166
+ }, ne = () => {
167
167
  if (d || l.value || !t.value) return;
168
168
  let e = t.value, n = e.scrollHeight - e.clientHeight;
169
169
  n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
170
170
  d = !1;
171
171
  }));
172
- }, ie = () => {
173
- !f && t.value && (f = new MutationObserver(re), f.observe(t.value, {
172
+ }, re = () => {
173
+ !f && t.value && (f = new MutationObserver(ne), f.observe(t.value, {
174
174
  childList: !0,
175
175
  subtree: !0,
176
176
  characterData: !0
177
177
  }));
178
- }, ae = () => {
178
+ }, ie = () => {
179
179
  f?.disconnect(), f = null;
180
180
  };
181
- B(n, (e, t) => {
182
- e === "streaming" || e === "submitted" ? ie() : (e !== "ready" || t !== "streaming") && ae();
183
- }), B(r, async () => {
181
+ z(n, (e, t) => {
182
+ e === "streaming" || e === "submitted" ? re() : (e !== "ready" || t !== "streaming") && ie();
183
+ }), z(r, async () => {
184
184
  if (r() && i() !== "assistant") {
185
- x(), l.value = !1, d = !0;
185
+ oe(), l.value = !1, d = !0;
186
186
  try {
187
- await M(), await o?.(), await M();
187
+ await j(), await o?.(), await j();
188
188
  } finally {
189
189
  _();
190
190
  }
191
191
  }
192
192
  });
193
- let b = null, oe = () => {
194
- t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, b && clearTimeout(b), b = setTimeout(x, 300)));
195
- }, x = () => {
196
- p?.disconnect(), p = null, m?.disconnect(), m = null, b &&= (clearTimeout(b), null);
193
+ let x = null, ae = () => {
194
+ t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, x && clearTimeout(x), x = setTimeout(oe, 300)));
195
+ }, oe = () => {
196
+ p?.disconnect(), p = null, m?.disconnect(), m = null, x &&= (clearTimeout(x), null);
197
197
  };
198
- return Se(() => {
198
+ return Ce(() => {
199
199
  if (!t.value) return;
200
- t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", v, { passive: !0 }), t.value.addEventListener("touchmove", y, { passive: !0 });
200
+ t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", ee, { passive: !0 }), t.value.addEventListener("touchmove", b, { passive: !0 });
201
201
  let e = n() === "submitted" || n() === "streaming";
202
- e ? ie() : (p = new ResizeObserver(oe), p.observe(t.value), m = new MutationObserver(oe), m.observe(t.value, {
202
+ e ? re() : (p = new ResizeObserver(ae), p.observe(t.value), m = new MutationObserver(ae), m.observe(t.value, {
203
203
  childList: !0,
204
204
  subtree: !0
205
205
  }));
206
206
  let r = a?.() ?? t.value.firstElementChild;
207
- r && (h = new ResizeObserver(re), h.observe(r)), e || oe();
208
- }), F(() => {
209
- t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", v), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, ae(), x();
207
+ r && (h = new ResizeObserver(ne), h.observe(r)), e || ae();
208
+ }), P(() => {
209
+ t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", ee), t.value?.removeEventListener("touchmove", b), h?.disconnect(), h = null, ie(), oe();
210
210
  }), {
211
- handleScroll: ne,
211
+ handleScroll: te,
212
212
  scrollToBottom: _,
213
213
  userScrolledUp: l,
214
214
  isAtBottom: u
@@ -216,13 +216,13 @@ function He(e) {
216
216
  }
217
217
  //#endregion
218
218
  //#region ../../packages/components/src/chat/wakeupFeed.ts
219
- function Ue(e, t = () => !1) {
220
- let n = (e) => je(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
219
+ function We(e, t = () => !1) {
220
+ let n = (e) => Me(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
221
221
  for (; a < e.length;) {
222
222
  let t = e[a];
223
- if (W(t) && n(e[a + 1])) {
223
+ if (U(t) && n(e[a + 1])) {
224
224
  let o = t.id, s = 0, c;
225
- for (; W(e[a]) && n(e[a + 1]);) s += 1, c = e[a].metadata?.createdAt ?? c, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
225
+ for (; U(e[a]) && n(e[a + 1]);) s += 1, c = e[a].metadata?.createdAt ?? c, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
226
226
  i.set(o, {
227
227
  count: s,
228
228
  lastAt: c
@@ -236,40 +236,40 @@ function Ue(e, t = () => !1) {
236
236
  }
237
237
  //#endregion
238
238
  //#region ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
239
- var We = ["aria-busy"], Ge = {
239
+ var Ge = ["aria-busy"], Ke = {
240
240
  key: 0,
241
241
  class: "pk-chatbot-messages__outline"
242
- }, Ke = {
242
+ }, qe = {
243
243
  key: 0,
244
244
  class: "pk-chatbot-divider vv-separator"
245
- }, qe = { class: "pk-chatbot-divider__label" }, Je = {
245
+ }, Je = { class: "pk-chatbot-divider__label" }, Ye = {
246
246
  key: 1,
247
247
  class: "pk-chatbot-wakeup"
248
- }, Ye = ["title"], Xe = { class: "pk-chatbot-message__text" }, Ze = ["title"], Qe = {
248
+ }, Xe = ["title"], Ze = { class: "pk-chatbot-message__text" }, Qe = ["title"], $e = {
249
249
  key: 0,
250
250
  class: "pk-chatbot-message__reaction-emoji"
251
- }, $e = {
252
- key: 0,
253
- class: "flex flex-col gap-8"
254
251
  }, et = {
252
+ key: 0,
253
+ class: "flex flex-col items-end gap-8 w-full"
254
+ }, tt = {
255
255
  key: 0,
256
256
  class: "pk-chatbot-message__loading-info"
257
- }, tt = { class: "flex gap-8 items-center" }, nt = { class: "font-mono rounded text-12" }, rt = { class: "flex gap-8 items-center" }, it = {
257
+ }, nt = { class: "flex gap-8 items-center" }, rt = { class: "font-mono rounded text-12" }, it = { class: "flex gap-8 items-center" }, at = {
258
258
  key: 0,
259
259
  class: "pk-chatbot-message__footer"
260
- }, at = {
260
+ }, ot = {
261
261
  key: 0,
262
262
  class: "pk-chatbot-message__hover-meta"
263
- }, ot = ["datetime", "title"], st = { class: "truncate" }, ct = {
263
+ }, st = ["datetime", "title"], ct = { class: "truncate" }, lt = {
264
264
  key: 0,
265
265
  class: "flex items-center gap-4 min-w-0"
266
- }, lt = { class: "truncate" }, ut = ["title"], dt = {
266
+ }, ut = { class: "truncate" }, dt = ["title"], ft = {
267
267
  key: 2,
268
268
  class: "flex items-center gap-4 text-12 text-word-3"
269
- }, ft = { class: "truncate" }, pt = ["datetime"], mt = { class: "truncate" }, ht = {
269
+ }, pt = { class: "truncate" }, mt = ["datetime"], ht = { class: "truncate" }, gt = {
270
270
  key: 4,
271
271
  class: "flex items-center gap-4 text-12 text-word-3"
272
- }, gt = { class: "pk-chatbot-message__loading-info" }, _t = { class: "flex gap-8 items-center" }, vt = { class: "text-12" }, yt = ["title", "aria-label"], bt = /* @__PURE__ */ j({
272
+ }, _t = { class: "pk-chatbot-message__loading-info" }, vt = { class: "flex gap-8 items-center" }, yt = { class: "text-12" }, bt = ["title", "aria-label"], xt = /* @__PURE__ */ xe({
273
273
  __name: "PkChatbotMessages",
274
274
  props: {
275
275
  status: {},
@@ -314,8 +314,8 @@ var We = ["aria-busy"], Ge = {
314
314
  "confirm-respond"
315
315
  ],
316
316
  setup(e, { emit: t }) {
317
- let n = e, r = t, { t: i, d: o, n: x } = Oe({ useScope: "global" }), A = Ee(), j = (e, t) => {
318
- if (le(e)) {
317
+ let n = e, r = t, { t: i, d: o, n: se } = ke({ useScope: "global" }), A = De(), xe = (e, t) => {
318
+ if (ue(e)) {
319
319
  let n = e.toolCallId;
320
320
  n && r("confirm-respond", {
321
321
  toolCallId: n,
@@ -328,88 +328,88 @@ var We = ["aria-busy"], Ge = {
328
328
  id: n,
329
329
  approved: t
330
330
  });
331
- }, F = De("scrollEl"), U = De("wrapperEl"), ke = w(() => ce(n.textColor, n.mainColor)), { handleScroll: Ae, scrollToBottom: je, userScrolledUp: G, isAtBottom: Me } = He({
332
- scrollEl: F,
331
+ }, P = Oe("scrollEl"), H = Oe("wrapperEl"), Ae = w(() => le(n.textColor, n.mainColor)), { handleScroll: je, scrollToBottom: Me, userScrolledUp: W, isAtBottom: Ne } = Ue({
332
+ scrollEl: P,
333
333
  status: () => n.status,
334
334
  messagesLength: () => n.messages?.length,
335
335
  lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
336
- contentEl: () => U.value,
337
- beforeNewMessageScroll: () => xt(),
336
+ contentEl: () => H.value,
337
+ beforeNewMessageScroll: () => St(),
338
338
  onScrollUp: () => r("scroll-up"),
339
339
  onScrollDown: () => r("scroll-down")
340
- }), Pe = () => {
341
- G.value = !1, je();
342
- }, K = w(() => (n.messages ?? []).filter((e) => e.role === "user" && !W(e)).map((e) => ({
340
+ }), Fe = () => {
341
+ W.value = !1, Me();
342
+ }, G = w(() => (n.messages ?? []).filter((e) => e.role === "user" && !U(e)).map((e) => ({
343
343
  id: e.id,
344
344
  preview: e.parts.find(c)?.text.trim().slice(0, 120) || "…"
345
- }))), Ie = L(), Le = () => F.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Re = () => {
346
- let e = F.value;
345
+ }))), Le = I(), Re = () => P.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], ze = () => {
346
+ let e = P.value;
347
347
  if (!e || !n.showScrollToBottom) return;
348
- let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
349
- Le().forEach((e, n) => {
350
- e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
351
- }), Ie.value = r;
348
+ let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = G.value[0]?.id;
349
+ Re().forEach((e, n) => {
350
+ e.getBoundingClientRect().top <= t && (r = G.value[n]?.id);
351
+ }), Le.value = r;
352
352
  };
353
- B(K, async () => {
354
- await M(), Re();
353
+ z(G, async () => {
354
+ await j(), ze();
355
355
  });
356
- let ze = () => {
357
- Ae(), Re();
358
- }, Ve = (e) => {
359
- let t = F.value, n = K.value.findIndex((t) => t.id === e), r = Le()[n];
360
- t && r && (G.value = !0, t.scrollTo({
356
+ let Be = () => {
357
+ je(), ze();
358
+ }, He = (e) => {
359
+ let t = P.value, n = G.value.findIndex((t) => t.id === e), r = Re()[n];
360
+ t && r && (W.value = !0, t.scrollTo({
361
361
  top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
362
362
  behavior: "smooth"
363
363
  }));
364
- }, q = L(0), bt = L(!1), xt = async () => {
364
+ }, K = I(0), xt = I(!1), St = async () => {
365
365
  let e = n.messages;
366
- if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (bt.value = !1, await M(), !F.value)) return;
367
- let { paddingTop: t, paddingBottom: r } = getComputedStyle(F.value), i = F.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = U.value && Number.parseFloat(getComputedStyle(U.value).rowGap) || 0, o = Le(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
368
- i > 0 && (q.value = Math.max(s, 0)), await M();
366
+ if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (xt.value = !1, await j(), !P.value)) return;
367
+ let { paddingTop: t, paddingBottom: r } = getComputedStyle(P.value), i = P.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = H.value && Number.parseFloat(getComputedStyle(H.value).rowGap) || 0, o = Re(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
368
+ i > 0 && (K.value = Math.max(s, 0)), await j();
369
369
  };
370
- B(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => xt()), Se(() => {
371
- (n.status === "submitted" || n.status === "streaming" || n.awaitingSpokenAnswer) && xt();
372
- }), B(() => n.status, (e) => {
373
- (e === "ready" || e === "error") && (bt.value = !0, q.value = 0);
370
+ z(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => St()), Ce(() => {
371
+ (n.status === "submitted" || n.status === "streaming" || n.awaitingSpokenAnswer) && St();
372
+ }), z(() => n.status, (e) => {
373
+ (e === "ready" || e === "error") && (xt.value = !0, K.value = 0);
374
374
  });
375
- let St = (e) => n.revisedAnswers?.some((t) => t.messageId === e), J = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Ct = (e, t) => !n.readonlyFeedback && Vt(e, t), wt = (e) => n.readonlyFeedback ? J(e) : void 0, Tt = (e) => wt(e)?.vote, Et = (e) => {
376
- let t = wt(e);
375
+ let Ct = (e) => n.revisedAnswers?.some((t) => t.messageId === e), q = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), wt = (e, t) => !n.readonlyFeedback && Vt(e, t), Tt = (e) => n.readonlyFeedback ? q(e) : void 0, Et = (e) => Tt(e)?.vote, Dt = (e) => {
376
+ let t = Tt(e);
377
377
  if (t?.vote) return;
378
378
  let n = t?.metadata?.reactionEmoji;
379
379
  return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
380
- }, Dt = (e) => !!(Tt(e) || Et(e)), Ot = (e) => {
381
- if (Et(e)) return "pk-chatbot-message__reaction--neutral";
382
- let t = Tt(e);
380
+ }, Ot = (e) => !!(Et(e) || Dt(e)), kt = (e) => {
381
+ if (Dt(e)) return "pk-chatbot-message__reaction--neutral";
382
+ let t = Et(e);
383
383
  return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
384
- }, kt = (e) => {
385
- let t = Tt(e);
386
- return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
387
384
  }, At = (e) => {
388
- let t = Nt(e);
385
+ let t = Et(e);
386
+ return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
387
+ }, jt = (e) => {
388
+ let t = Pt(e);
389
389
  for (let e = t.length - 1; e >= 0; --e) if (c(t[e])) return e;
390
390
  return -1;
391
- }, jt = w(() => n.messages?.[n.messages.length - 1]), Y = w(() => {
392
- let e = jt.value;
391
+ }, Mt = w(() => n.messages?.[n.messages.length - 1]), J = w(() => {
392
+ let e = Mt.value;
393
393
  return e ? e.parts[e.parts.length - 1] : null;
394
- }), Mt = w(() => {
394
+ }), Nt = w(() => {
395
395
  let e = /* @__PURE__ */ new Map();
396
- for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, _(re(ee(t.parts))));
396
+ for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, v(re(y(t.parts))));
397
397
  return e;
398
- }), Nt = (e) => Mt.value.get(e.id) ?? e.parts, X = w(() => n.status === "submitted" || n.status === "streaming"), Pt = w(() => n.status === "error"), Ft = w(() => n.awaitingSpokenAnswer === !0 && !X.value), It = w(() => Ft.value && jt.value?.role === "user" && !Pt.value), Lt = w(() => {
399
- let e = Y.value;
400
- return ae(i, e);
398
+ }), Pt = (e) => Nt.value.get(e.id) ?? e.parts, Y = w(() => n.status === "submitted" || n.status === "streaming"), X = w(() => n.status === "error"), Ft = w(() => n.awaitingSpokenAnswer === !0 && !Y.value), It = w(() => Ft.value && Mt.value?.role === "user" && !X.value), Lt = w(() => {
399
+ let e = J.value;
400
+ return x(i, e);
401
401
  }), Rt = w(() => {
402
- let e = Y.value;
403
- return y(e);
402
+ let e = J.value;
403
+ return te(e);
404
404
  }), zt = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Bt = (e) => Z(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Vt = (e, t) => (!Z(t) || n.status === "ready") && !!n.actions?.includes(e), Ht = (e) => {
405
405
  let t = e.parts[e.parts.length - 1];
406
406
  return c(t);
407
- }, Ut = (e) => e.parts.some((e) => p(e) || u(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => u(e) && !v(e) && !!(Fe[l(e)] || A[e.type] || n.showAllMessageParts), Kt = (e) => e.parts.some((e) => c(e) && !!e.text.trim() || f(e) || se(e) && !v(e) || Gt(e)), Q = (e) => e.role === "assistant", qt = (e) => e.role === "user", Jt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Yt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Xt = (e) => {
407
+ }, Ut = (e) => e.parts.some((e) => p(e) || u(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => u(e) && !b(e) && !!(Ie[l(e)] || A[e.type] || n.showAllMessageParts), Kt = (e) => e.parts.some((e) => c(e) && !!e.text.trim() || f(e) || ce(e) && !b(e) || Gt(e)), Q = (e) => e.role === "assistant", qt = (e) => e.role === "user", Jt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Yt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Xt = (e) => {
408
408
  let t = Jt(e)?.metadata?.createdAt, n = Yt(e)?.metadata?.createdAt;
409
409
  if (!t || !n) return;
410
410
  let r = new Date(t), i = new Date(n);
411
411
  return r.toDateString() === i.toDateString() ? void 0 : i;
412
- }, $ = w(() => n.showAllMessageParts ? Ue([]) : Ue(n.messages ?? [], Kt)), Zt = w(() => {
412
+ }, $ = w(() => n.showAllMessageParts ? We([]) : We(n.messages ?? [], Kt)), Zt = w(() => {
413
413
  let e = 0;
414
414
  return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
415
415
  }), Qt = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(n.actions?.length || n.showMessageNumber || n.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || n.showMessageTokensCount && e.metadata?.totalTokens !== void 0), $t = (e) => {
@@ -417,71 +417,71 @@ var We = ["aria-busy"], Ge = {
417
417
  return o(t, n ? "time" : "date-time");
418
418
  }, en = (e) => {
419
419
  let { createdAt: t, completedAt: n } = e.metadata ?? {};
420
- if (t && n) return ie(x, n - t);
421
- }, tn = De("feedbackMessageEl");
422
- return B(() => n.feedbackMessageId, async () => {
423
- if (await M(), !n.feedbackMessageId) return;
420
+ if (t && n) return ie(se, n - t);
421
+ }, tn = Oe("feedbackMessageEl");
422
+ return z(() => n.feedbackMessageId, async () => {
423
+ if (await j(), !n.feedbackMessageId) return;
424
424
  let e = tn.value?.[0]?.$el;
425
- e && (Z(zt(n.feedbackMessageId)) ? je() : e.scrollIntoView({
425
+ e && (Z(zt(n.feedbackMessageId)) ? Me() : e.scrollIntoView({
426
426
  behavior: "smooth",
427
427
  block: "center"
428
428
  }));
429
429
  }), (t, n) => {
430
430
  let r = ye, u = _e, p = ve;
431
- return I(), D("div", {
431
+ return F(), D("div", {
432
432
  ref_key: "scrollEl",
433
- ref: F,
434
- class: N(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": bt.value }]),
433
+ ref: P,
434
+ class: M(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": xt.value }]),
435
435
  role: "log",
436
436
  "aria-live": "polite",
437
437
  "aria-relevant": "additions text",
438
- "aria-busy": X.value,
439
- style: P({
438
+ "aria-busy": Y.value,
439
+ style: N({
440
440
  "--chatbot-main-color": e.mainColor,
441
- "--chatbot-contrast-color": ke.value
441
+ "--chatbot-contrast-color": Ae.value
442
442
  }),
443
- onScroll: ze
443
+ onScroll: Be
444
444
  }, [
445
- e.showScrollToBottom && K.value.length > 1 ? (I(), D("div", Ge, [k(ge, {
446
- items: K.value,
447
- "active-id": Ie.value,
448
- onSelect: Ve
445
+ e.showScrollToBottom && G.value.length > 1 ? (F(), D("div", Ke, [k(ge, {
446
+ items: G.value,
447
+ "active-id": Le.value,
448
+ onSelect: He
449
449
  }, null, 8, ["items", "active-id"])])) : E("", !0),
450
450
  O("div", {
451
451
  ref_key: "wrapperEl",
452
- ref: U,
452
+ ref: H,
453
453
  class: "pk-chatbot-messages__wrapper"
454
454
  }, [
455
- (I(!0), D(S, null, Ce(e.messages, (h, _) => (I(), D(S, { key: h.id }, [
456
- qt(h) && Xt(_) ? (I(), D("div", Ke, [O("span", qe, R(z(o)(Xt(_), "short")), 1)])) : E("", !0),
457
- $.value.quietRuns.has(h.id) ? (I(), D("div", Je, [k(r, {
455
+ (F(!0), D(S, null, we(e.messages, (g, v) => (F(), D(S, { key: g.id }, [
456
+ qt(g) && Xt(v) ? (F(), D("div", qe, [O("span", Je, L(R(o)(Xt(v), "short")), 1)])) : E("", !0),
457
+ $.value.quietRuns.has(g.id) ? (F(), D("div", Ye, [k(r, {
458
458
  name: "ri:alarm-line",
459
459
  class: "shrink-0"
460
- }), O("span", null, R(z(i)("label.wakeupQuietRun", {
461
- count: $.value.quietRuns.get(h.id).count,
462
- time: z(o)($.value.quietRuns.get(h.id).lastAt ?? Date.now(), "time")
463
- }, $.value.quietRuns.get(h.id).count)), 1)])) : z(W)(h) && !$.value.hidden.has(h.id) && !e.showAllMessageParts ? (I(), D("div", {
460
+ }), O("span", null, L(R(i)("label.wakeupQuietRun", {
461
+ count: $.value.quietRuns.get(g.id).count,
462
+ time: R(o)($.value.quietRuns.get(g.id).lastAt ?? Date.now(), "time")
463
+ }, $.value.quietRuns.get(g.id).count)), 1)])) : R(U)(g) && !$.value.hidden.has(g.id) && !e.showAllMessageParts ? (F(), D("div", {
464
464
  key: 2,
465
465
  class: "pk-chatbot-wakeup",
466
- title: h.metadata?.wakeup?.reason
466
+ title: g.metadata?.wakeup?.reason
467
467
  }, [k(r, {
468
468
  name: "ri:alarm-line",
469
469
  class: "shrink-0"
470
- }), O("span", null, [be(R(z(i)("label.wakeupCheck")) + " ", 1), h.metadata?.createdAt ? (I(), D(S, { key: 0 }, [be(" · " + R(z(o)(h.metadata.createdAt, "time")), 1)], 64)) : E("", !0)])], 8, Ye)) : E("", !0),
471
- (!z(W)(h) || e.showAllMessageParts) && (!$.value.hidden.has(h.id) || X.value && Z(_)) && (h.parts.length || Z(_) && X.value && Q(h)) ? (I(), D("div", {
470
+ }), O("span", null, [be(L(R(i)("label.wakeupCheck")) + " ", 1), g.metadata?.createdAt ? (F(), D(S, { key: 0 }, [be(" · " + L(R(o)(g.metadata.createdAt, "time")), 1)], 64)) : E("", !0)])], 8, Xe)) : E("", !0),
471
+ (!R(U)(g) || e.showAllMessageParts) && (!$.value.hidden.has(g.id) || Y.value && Z(v)) && (g.parts.length || Z(v) && Y.value && Q(g)) ? (F(), D("div", {
472
472
  key: 3,
473
- class: N(["pk-chatbot-message", [`pk-chatbot-message--${h.role}`, { "pk-chatbot-message--loading": X.value && Z(_) && Q(h) }]]),
474
- style: P({ minHeight: Z(_) && Q(h) && !Pt.value ? `${q.value}px` : void 0 })
473
+ class: M(["pk-chatbot-message", [`pk-chatbot-message--${g.role}`, { "pk-chatbot-message--loading": Y.value && Z(v) && Q(g) }]]),
474
+ style: N({ minHeight: Z(v) && Q(g) && !X.value ? `${K.value}px` : void 0 })
475
475
  }, [
476
476
  k(C, {
477
477
  appear: "",
478
478
  name: "pk-chatbot-part"
479
479
  }, {
480
- default: V(() => [Wt(h) ? (I(), T(he, {
480
+ default: B(() => [Wt(g) ? (F(), T(he, {
481
481
  key: 0,
482
- message: h,
483
- "is-streaming": X.value && Z(_),
484
- "has-content": Kt(h),
482
+ message: g,
483
+ "is-streaming": Y.value && Z(v),
484
+ "has-content": Kt(g),
485
485
  "is-dark": e.isDark
486
486
  }, null, 8, [
487
487
  "message",
@@ -491,64 +491,64 @@ var We = ["aria-busy"], Ge = {
491
491
  ])) : E("", !0)]),
492
492
  _: 2
493
493
  }, 1024),
494
- (I(!0), D(S, null, Ce(Nt(h), (n, i) => (I(), D(S, { key: z(te)(n, i) }, [z(c)(n) && n.text.trim() ? (I(), T(C, {
494
+ (F(!0), D(S, null, we(Pt(g), (n, i) => (F(), D(S, { key: R(ee)(n, i) }, [R(c)(n) && n.text.trim() ? (F(), T(C, {
495
495
  key: 0,
496
496
  appear: "",
497
497
  name: "pk-chatbot-part"
498
498
  }, {
499
- default: V(() => [O("div", Xe, [we(t.$slots, "text", xe({ ref_for: !0 }, {
500
- message: h,
499
+ default: B(() => [O("div", Ze, [Te(t.$slots, "text", Se({ ref_for: !0 }, {
500
+ message: g,
501
501
  part: n,
502
- index: _,
503
- isLoading: X.value
504
- }), () => [Q(h) ? (I(), T(s, {
502
+ index: v,
503
+ isLoading: Y.value
504
+ }), () => [Q(g) ? (F(), T(s, {
505
505
  key: 0,
506
506
  class: "wysiwyg",
507
507
  markdown: n.text,
508
508
  "is-dark": e.isDark,
509
- loading: Z(_) && e.status === "streaming"
509
+ loading: Z(v) && e.status === "streaming"
510
510
  }, null, 8, [
511
511
  "markdown",
512
512
  "is-dark",
513
513
  "loading"
514
- ])) : (I(), D(S, { key: 1 }, [be(R(n.text), 1)], 64))]), Dt(h.id) && !J(h.id)?.comment && i === At(h) ? (I(), D("span", {
514
+ ])) : (F(), D(S, { key: 1 }, [be(L(n.text), 1)], 64))]), Ot(g.id) && !q(g.id)?.comment && i === jt(g) ? (F(), D("span", {
515
515
  key: 0,
516
- class: N(["pk-chatbot-message__reaction", Ot(h.id)]),
517
- title: kt(h.id)
518
- }, [Et(h.id) ? (I(), D("span", Qe, R(Et(h.id)), 1)) : (I(), T(r, {
516
+ class: M(["pk-chatbot-message__reaction", kt(g.id)]),
517
+ title: At(g.id)
518
+ }, [Dt(g.id) ? (F(), D("span", $e, L(Dt(g.id)), 1)) : (F(), T(r, {
519
519
  key: 1,
520
- name: Tt(h.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
521
- }, null, 8, ["name"]))], 10, Ze)) : E("", !0)])]),
520
+ name: Et(g.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
521
+ }, null, 8, ["name"]))], 10, Qe)) : E("", !0)])]),
522
522
  _: 2
523
- }, 1024)) : z(f)(n) ? (I(), T(C, {
523
+ }, 1024)) : R(f)(n) ? (F(), T(C, {
524
524
  key: 1,
525
525
  appear: "",
526
526
  name: "pk-chatbot-part"
527
527
  }, {
528
- default: V(() => [z(a)(n.filename, n.mediaType) ? (I(), D("div", $e, [k(ue, {
528
+ default: B(() => [R(a)(n.filename, n.mediaType) ? (F(), D("div", et, [k(de, {
529
529
  "media-type": n.mediaType,
530
530
  url: n.url,
531
531
  filename: n.filename,
532
- size: z(m)(n)?.bytesCount
532
+ size: R(m)(n)?.bytesCount
533
533
  }, null, 8, [
534
534
  "media-type",
535
535
  "url",
536
536
  "filename",
537
537
  "size"
538
- ]), k(pe, {
538
+ ]), k(h, {
539
539
  url: n.url,
540
- transcript: z(d)(n),
541
- pending: e.status === "submitted" && Z(_)
540
+ transcript: R(d)(n),
541
+ pending: e.status === "submitted" && Z(v)
542
542
  }, null, 8, [
543
543
  "url",
544
544
  "transcript",
545
545
  "pending"
546
- ])])) : (I(), T(ue, {
546
+ ])])) : (F(), T(de, {
547
547
  key: 1,
548
548
  "media-type": n.mediaType,
549
549
  url: n.url,
550
550
  filename: n.filename,
551
- size: z(m)(n)?.bytesCount
551
+ size: R(m)(n)?.bytesCount
552
552
  }, null, 8, [
553
553
  "media-type",
554
554
  "url",
@@ -556,17 +556,17 @@ var We = ["aria-busy"], Ge = {
556
556
  "size"
557
557
  ]))]),
558
558
  _: 2
559
- }, 1024)) : z(se)(n) && !z(v)(n) ? (I(), T(C, {
559
+ }, 1024)) : R(ce)(n) && !R(b)(n) ? (F(), T(C, {
560
560
  key: 2,
561
561
  appear: "",
562
562
  name: "pk-chatbot-part"
563
563
  }, {
564
- default: V(() => [(I(), T(Be, {
564
+ default: B(() => [(F(), T(Ve, {
565
565
  key: `approval-${i}`,
566
566
  part: n,
567
- actionable: e.interactive === !0 && (z(le)(n) || Z(_)),
567
+ actionable: e.interactive === !0 && (R(ue)(n) || Z(v)),
568
568
  "call-verdict": e.confirmVerdictsOnCall?.get(n.toolCallId ?? ""),
569
- onRespond: (e) => j(n, e)
569
+ onRespond: (e) => xe(n, e)
570
570
  }, null, 8, [
571
571
  "part",
572
572
  "actionable",
@@ -574,29 +574,29 @@ var We = ["aria-busy"], Ge = {
574
574
  "onRespond"
575
575
  ]))]),
576
576
  _: 2
577
- }, 1024)) : Gt(n) ? (I(), T(C, {
577
+ }, 1024)) : Gt(n) ? (F(), T(C, {
578
578
  key: 3,
579
579
  appear: "",
580
580
  name: "pk-chatbot-part"
581
581
  }, {
582
- default: V(() => [!z(A)[n.type] && z(Fe)[z(l)(n)] ? (I(), T(Te(z(Fe)[z(l)(n)]), {
583
- key: `component-${i}-${z(ne)(n)}`,
582
+ default: B(() => [!R(A)[n.type] && R(Ie)[R(l)(n)] ? (F(), T(Ee(R(Ie)[R(l)(n)]), {
583
+ key: `component-${i}-${R(ne)(n)}`,
584
584
  part: n
585
- }, null, 8, ["part"])) : we(t.$slots, n.type, xe({ ref_for: !0 }, {
586
- message: h,
585
+ }, null, 8, ["part"])) : Te(t.$slots, n.type, Se({ ref_for: !0 }, {
586
+ message: g,
587
587
  part: n,
588
- index: _,
589
- isLoading: X.value
590
- }), () => [e.showAllMessageParts ? (I(), D("div", et, [O("div", tt, [z(y)(n) ? (I(), T(r, {
588
+ index: v,
589
+ isLoading: Y.value
590
+ }), () => [e.showAllMessageParts ? (F(), D("div", tt, [O("div", nt, [R(te)(n) ? (F(), T(r, {
591
591
  key: 0,
592
- name: z(y)(n),
592
+ name: R(te)(n),
593
593
  class: "shrink-0"
594
- }, null, 8, ["name"])) : E("", !0), O("code", nt, R(z(Ne)(n.type)), 1)])])) : E("", !0)], void 0, 1)]),
594
+ }, null, 8, ["name"])) : E("", !0), O("code", rt, L(R(Pe)(n.type)), 1)])])) : E("", !0)], void 0, 1)]),
595
595
  _: 2
596
596
  }, 1024)) : E("", !0), k(C, { mode: "out-in" }, {
597
- default: V(() => [i === At(h) && e.readonlyFeedback && J(h.id)?.comment ? (I(), T(fe, {
597
+ default: B(() => [i === jt(g) && e.readonlyFeedback && q(g.id)?.comment ? (F(), T(pe, {
598
598
  key: 0,
599
- feedback: J(h.id)
599
+ feedback: q(g.id)
600
600
  }, null, 8, ["feedback"])) : E("", !0)]),
601
601
  _: 2
602
602
  }, 1024)], 64))), 128)),
@@ -604,16 +604,16 @@ var We = ["aria-busy"], Ge = {
604
604
  name: "fade-in",
605
605
  mode: "out-in"
606
606
  }, {
607
- default: V(() => [X.value && Z(_) && !Ht(h) && Q(h) && (!Wt(h) || Kt(h)) ? (I(), D("div", {
608
- key: `loading-info-${h.id}`,
607
+ default: B(() => [Y.value && Z(v) && !Ht(g) && Q(g) && (!Wt(g) || Kt(g)) ? (F(), D("div", {
608
+ key: `loading-info-${g.id}`,
609
609
  class: "pk-chatbot-message__loading-info"
610
- }, [O("div", rt, [
610
+ }, [O("div", it, [
611
611
  k(r, {
612
612
  name: "loading-loop",
613
613
  class: "shrink-0"
614
614
  }),
615
615
  k(C, { mode: "out-in" }, {
616
- default: V(() => [Rt.value ? (I(), T(r, {
616
+ default: B(() => [Rt.value ? (F(), T(r, {
617
617
  key: Rt.value,
618
618
  class: "shrink-0",
619
619
  name: Rt.value
@@ -621,21 +621,21 @@ var We = ["aria-busy"], Ge = {
621
621
  _: 1
622
622
  }),
623
623
  k(C, { mode: "out-in" }, {
624
- default: V(() => [Lt.value ? (I(), D("span", {
624
+ default: B(() => [Lt.value ? (F(), D("span", {
625
625
  key: Lt.value,
626
626
  class: "text-12"
627
- }, R(Lt.value), 1)) : E("", !0)]),
627
+ }, L(Lt.value), 1)) : E("", !0)]),
628
628
  _: 1
629
629
  })
630
630
  ]), k(C, {
631
631
  name: "fade-in",
632
632
  mode: "out-in"
633
633
  }, {
634
- default: V(() => [!Wt(h) && Y.value && "text" in Y.value && Y.value.text.trim() ? (I(), T(me, {
634
+ default: B(() => [!Wt(g) && J.value && "text" in J.value && J.value.text.trim() ? (F(), T(me, {
635
635
  key: 0,
636
- markdown: Y.value.text,
636
+ markdown: J.value.text,
637
637
  "is-dark": e.isDark,
638
- "tail-length": z(b),
638
+ "tail-length": R(ae),
639
639
  "inner-class": "wysiwyg",
640
640
  class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
641
641
  }, null, 8, [
@@ -648,31 +648,31 @@ var We = ["aria-busy"], Ge = {
648
648
  _: 2
649
649
  }, 1024),
650
650
  k(C, { mode: "out-in" }, {
651
- default: V(() => [Qt(h, _) ? (I(), D("div", it, [
651
+ default: B(() => [Qt(g, v) ? (F(), D("div", at, [
652
652
  k(p, {
653
653
  modifiers: "compact",
654
654
  class: "mr-auto shrink-0"
655
655
  }, {
656
- default: V(() => [
656
+ default: B(() => [
657
657
  k(C, { mode: "out-in" }, {
658
- default: V(() => [Bt(_) ? (I(), T(u, {
658
+ default: B(() => [Bt(v) ? (F(), T(u, {
659
659
  key: 0,
660
660
  icon: "ri:reset-right-line",
661
661
  modifiers: "action-quiet-small",
662
- title: z(i)("action.regenerate"),
663
- "aria-label": z(i)("action.regenerate"),
664
- onClick: n[0] ||= H((e) => t.$emit("regenerate"), ["stop"])
662
+ title: R(i)("action.regenerate"),
663
+ "aria-label": R(i)("action.regenerate"),
664
+ onClick: n[0] ||= V((e) => t.$emit("regenerate"), ["stop"])
665
665
  }, null, 8, ["title", "aria-label"])) : E("", !0)]),
666
666
  _: 2
667
667
  }, 1024),
668
668
  k(C, { mode: "out-in" }, {
669
- default: V(() => [Vt("show-info", _) ? (I(), T(u, {
669
+ default: B(() => [Vt("show-info", v) ? (F(), T(u, {
670
670
  key: 0,
671
671
  icon: "ri:information-line",
672
- title: z(i)("action.getMoreInfo"),
673
- "aria-label": z(i)("action.getMoreInfo"),
672
+ title: R(i)("action.getMoreInfo"),
673
+ "aria-label": R(i)("action.getMoreInfo"),
674
674
  modifiers: "action-quiet-small",
675
- onClick: H((e) => t.$emit("show-info", h), ["stop"])
675
+ onClick: V((e) => t.$emit("show-info", g), ["stop"])
676
676
  }, null, 8, [
677
677
  "title",
678
678
  "aria-label",
@@ -681,14 +681,14 @@ var We = ["aria-busy"], Ge = {
681
681
  _: 2
682
682
  }, 1024),
683
683
  k(C, { mode: "out-in" }, {
684
- default: V(() => [Vt("revise", _) ? (I(), T(u, {
684
+ default: B(() => [Vt("revise", v) ? (F(), T(u, {
685
685
  key: 0,
686
- icon: St(h.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
687
- title: St(h.id) ? z(i)("action.editRevise") : z(i)("action.createRevise"),
688
- "aria-label": St(h.id) ? z(i)("action.editRevise") : z(i)("action.createRevise"),
686
+ icon: Ct(g.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
687
+ title: Ct(g.id) ? R(i)("action.editRevise") : R(i)("action.createRevise"),
688
+ "aria-label": Ct(g.id) ? R(i)("action.editRevise") : R(i)("action.createRevise"),
689
689
  modifiers: "action-quiet-small",
690
- class: N({ "text-brand-graphic": St(h.id) }),
691
- onClick: H((e) => t.$emit("revise", h), ["stop"])
690
+ class: M({ "text-brand-graphic": Ct(g.id) }),
691
+ onClick: V((e) => t.$emit("revise", g), ["stop"])
692
692
  }, null, 8, [
693
693
  "icon",
694
694
  "title",
@@ -699,13 +699,13 @@ var We = ["aria-busy"], Ge = {
699
699
  _: 2
700
700
  }, 1024),
701
701
  k(C, { mode: "out-in" }, {
702
- default: V(() => [Ct("upvote", _) ? (I(), T(u, {
702
+ default: B(() => [wt("upvote", v) ? (F(), T(u, {
703
703
  key: 0,
704
- icon: J(h.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
705
- title: z(i)("action.upvote"),
706
- "aria-label": z(i)("action.upvote"),
704
+ icon: q(g.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
705
+ title: R(i)("action.upvote"),
706
+ "aria-label": R(i)("action.upvote"),
707
707
  modifiers: "action-quiet-small",
708
- onClick: H((e) => t.$emit("upvote", h), ["stop"])
708
+ onClick: V((e) => t.$emit("upvote", g), ["stop"])
709
709
  }, null, 8, [
710
710
  "icon",
711
711
  "title",
@@ -715,13 +715,13 @@ var We = ["aria-busy"], Ge = {
715
715
  _: 2
716
716
  }, 1024),
717
717
  k(C, { mode: "out-in" }, {
718
- default: V(() => [Ct("downvote", _) ? (I(), T(u, {
718
+ default: B(() => [wt("downvote", v) ? (F(), T(u, {
719
719
  key: 0,
720
- icon: J(h.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
721
- title: z(i)("action.downvote"),
722
- "aria-label": z(i)("action.downvote"),
720
+ icon: q(g.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
721
+ title: R(i)("action.downvote"),
722
+ "aria-label": R(i)("action.downvote"),
723
723
  modifiers: "action-quiet-small",
724
- onClick: H((e) => t.$emit("downvote", h), ["stop"])
724
+ onClick: V((e) => t.$emit("downvote", g), ["stop"])
725
725
  }, null, 8, [
726
726
  "icon",
727
727
  "title",
@@ -731,13 +731,13 @@ var We = ["aria-busy"], Ge = {
731
731
  _: 2
732
732
  }, 1024),
733
733
  k(C, { mode: "out-in" }, {
734
- default: V(() => [Ct("feedback", _) ? (I(), T(u, {
734
+ default: B(() => [wt("feedback", v) ? (F(), T(u, {
735
735
  key: 0,
736
- icon: J(h.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
737
- title: z(i)("action.feedback"),
738
- "aria-label": z(i)("action.feedback"),
736
+ icon: q(g.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
737
+ title: R(i)("action.feedback"),
738
+ "aria-label": R(i)("action.feedback"),
739
739
  modifiers: "action-quiet-small",
740
- onClick: H((e) => t.$emit("feedback", h), ["stop"])
740
+ onClick: V((e) => t.$emit("feedback", g), ["stop"])
741
741
  }, null, 8, [
742
742
  "icon",
743
743
  "title",
@@ -749,47 +749,47 @@ var We = ["aria-busy"], Ge = {
749
749
  ]),
750
750
  _: 2
751
751
  }, 1024),
752
- !e.showMessageDateTime && h.metadata?.createdAt && h.metadata?.completedAt ? (I(), D("div", at, [O("time", {
753
- datetime: new Date(h.metadata.createdAt).toISOString(),
754
- title: z(o)(new Date(h.metadata.createdAt), "date-time"),
752
+ !e.showMessageDateTime && g.metadata?.createdAt && g.metadata?.completedAt ? (F(), D("div", ot, [O("time", {
753
+ datetime: new Date(g.metadata.createdAt).toISOString(),
754
+ title: R(o)(new Date(g.metadata.createdAt), "date-time"),
755
755
  class: "flex items-center gap-4 min-w-0"
756
756
  }, [k(r, {
757
757
  name: "ri:time-line",
758
758
  class: "shrink-0"
759
- }), O("span", st, R($t(h.metadata.createdAt)), 1)], 8, ot), en(h) ? (I(), D("span", ct, [k(r, {
759
+ }), O("span", ct, L($t(g.metadata.createdAt)), 1)], 8, st), en(g) ? (F(), D("span", lt, [k(r, {
760
760
  name: "ri:hourglass-line",
761
761
  class: "shrink-0"
762
- }), O("span", lt, R(en(h)), 1)])) : E("", !0)])) : E("", !0),
763
- e.showMessageNumber ? (I(), D("span", {
762
+ }), O("span", ut, L(en(g)), 1)])) : E("", !0)])) : E("", !0),
763
+ e.showMessageNumber ? (F(), D("span", {
764
764
  key: 1,
765
- title: z(i)("label.messageNumber", { n: Zt.value[_] }),
765
+ title: R(i)("label.messageNumber", { n: Zt.value[v] }),
766
766
  class: "text-12 text-word-3 tabular-nums"
767
- }, " #" + R(Zt.value[_]), 9, ut)) : E("", !0),
768
- e.showMessageTokensCount && h.metadata?.totalTokens ? (I(), D("span", dt, [k(r, {
767
+ }, " #" + L(Zt.value[v]), 9, dt)) : E("", !0),
768
+ e.showMessageTokensCount && g.metadata?.totalTokens ? (F(), D("span", ft, [k(r, {
769
769
  name: "ri:ai-generate-2-line",
770
770
  class: "shrink-0"
771
- }), O("span", ft, R(z(x)(h.metadata.totalTokens, "integer")) + " " + R(z(i)("label.tokens")), 1)])) : E("", !0),
772
- e.showMessageDateTime && h.metadata?.createdAt ? (I(), D("time", {
771
+ }), O("span", pt, L(R(se)(g.metadata.totalTokens, "integer")) + " " + L(R(i)("label.tokens")), 1)])) : E("", !0),
772
+ e.showMessageDateTime && g.metadata?.createdAt ? (F(), D("time", {
773
773
  key: 3,
774
- datetime: new Date(h.metadata?.createdAt).toISOString(),
774
+ datetime: new Date(g.metadata?.createdAt).toISOString(),
775
775
  class: "flex items-center gap-4 text-12 text-word-3"
776
776
  }, [k(r, {
777
777
  name: "ri:time-line",
778
778
  class: "shrink-0"
779
- }), O("span", mt, R(z(o)(new Date(h.metadata?.createdAt), "date-time")), 1)], 8, pt)) : E("", !0),
780
- e.showMessageDateTime && h?.metadata?.completedAt && h?.metadata?.createdAt ? (I(), D("div", ht, [k(r, {
779
+ }), O("span", ht, L(R(o)(new Date(g.metadata?.createdAt), "date-time")), 1)], 8, mt)) : E("", !0),
780
+ e.showMessageDateTime && g?.metadata?.completedAt && g?.metadata?.createdAt ? (F(), D("div", gt, [k(r, {
781
781
  name: "ri:hourglass-line",
782
782
  class: "shrink-0"
783
- }), k(g, {
783
+ }), k(_, {
784
784
  class: "truncate",
785
- date: h.metadata?.createdAt,
786
- "end-date": h.metadata?.completedAt
785
+ date: g.metadata?.createdAt,
786
+ "end-date": g.metadata?.completedAt
787
787
  }, null, 8, ["date", "end-date"])])) : E("", !0)
788
788
  ])) : E("", !0)]),
789
789
  _: 2
790
790
  }, 1024),
791
791
  k(C, { mode: "out-in" }, {
792
- default: V(() => [h.id === e.feedbackMessageId ? (I(), T(de, {
792
+ default: B(() => [g.id === e.feedbackMessageId ? (F(), T(fe, {
793
793
  key: 0,
794
794
  ref_for: !0,
795
795
  ref_key: "feedbackMessageEl",
@@ -812,21 +812,21 @@ var We = ["aria-busy"], Ge = {
812
812
  appear: "",
813
813
  name: "pk-chatbot-part"
814
814
  }, {
815
- default: V(() => [Ft.value ? (I(), D("div", {
815
+ default: B(() => [Ft.value ? (F(), D("div", {
816
816
  key: 0,
817
817
  class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
818
- style: P({ minHeight: It.value ? `${q.value}px` : void 0 })
819
- }, [O("div", gt, [O("div", _t, [k(r, {
818
+ style: N({ minHeight: It.value ? `${K.value}px` : void 0 })
819
+ }, [O("div", _t, [O("div", vt, [k(r, {
820
820
  name: "loading-loop",
821
821
  class: "shrink-0"
822
- }), O("span", vt, R(z(i)("label.answeringOnTheCall")), 1)])])], 4)) : E("", !0)]),
822
+ }), O("span", yt, L(R(i)("label.answeringOnTheCall")), 1)])])], 4)) : E("", !0)]),
823
823
  _: 1
824
824
  }),
825
825
  k(C, {
826
826
  appear: "",
827
827
  name: "pk-chatbot-part"
828
828
  }, {
829
- default: V(() => [Pt.value ? (I(), T(h, {
829
+ default: B(() => [X.value ? (F(), T(g, {
830
830
  key: 0,
831
831
  error: e.error,
832
832
  onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
@@ -834,28 +834,28 @@ var We = ["aria-busy"], Ge = {
834
834
  }, null, 8, ["error"])) : E("", !0)]),
835
835
  _: 1
836
836
  }),
837
- jt.value?.role === "user" && !It.value || Pt.value ? (I(), D("div", {
837
+ Mt.value?.role === "user" && !It.value || X.value ? (F(), D("div", {
838
838
  key: 0,
839
839
  class: "pk-chatbot-messages__spacer",
840
- style: P({ minHeight: `${q.value}px` })
840
+ style: N({ minHeight: `${K.value}px` })
841
841
  }, null, 4)) : E("", !0)
842
842
  ], 512),
843
843
  k(C, { name: "pk-chatbot-messages-fab" }, {
844
- default: V(() => [e.showScrollToBottom && (z(G) || !z(Me)) ? (I(), D("button", {
844
+ default: B(() => [e.showScrollToBottom && (R(W) || !R(Ne)) ? (F(), D("button", {
845
845
  key: 0,
846
846
  type: "button",
847
847
  class: "pk-chatbot-messages__scroll-to-bottom",
848
- title: z(i)("action.scrollToBottom"),
849
- "aria-label": z(i)("action.scrollToBottom"),
850
- onClick: Pe
851
- }, [k(r, { name: "ri:arrow-down-line" })], 8, yt)) : E("", !0)]),
848
+ title: R(i)("action.scrollToBottom"),
849
+ "aria-label": R(i)("action.scrollToBottom"),
850
+ onClick: Fe
851
+ }, [k(r, { name: "ri:arrow-down-line" })], 8, bt)) : E("", !0)]),
852
852
  _: 1
853
853
  })
854
- ], 46, We);
854
+ ], 46, Ge);
855
855
  };
856
856
  }
857
857
  });
858
858
  //#endregion
859
- export { Pe as a, Ne as i, K as n, Me as r, bt as t };
859
+ export { Fe as a, Pe as i, G as n, Ne as r, xt as t };
860
860
 
861
- //# sourceMappingURL=PkChatbotMessages-DJmRPFB8.js.map
861
+ //# sourceMappingURL=PkChatbotMessages-DHcfZNYn.js.map