@8wave/ai-elements 0.127.0-beta.1 → 0.127.0-beta.3

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 (187) hide show
  1. package/dist/_chunks/{Agent-DytagI8S.js → Agent-nB9V45mr.js} +354 -276
  2. package/dist/_chunks/Agent-nB9V45mr.js.map +1 -0
  3. package/dist/_chunks/{Document-BdWEd1tb.js → Document-Dm5GM40t.js} +7 -7
  4. package/dist/_chunks/{Document-BdWEd1tb.js.map → Document-Dm5GM40t.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreview-C3BxAdui.js → PkFilePreview-qTCDbut0.js} +3 -3
  6. package/dist/_chunks/{PkFilePreview-C3BxAdui.js.map → PkFilePreview-qTCDbut0.js.map} +1 -1
  7. package/dist/_chunks/{PkFilePreviewDialog-WAm7QSvT.js → PkFilePreviewDialog-m5d4zZDi.js} +2 -2
  8. package/dist/_chunks/{PkFilePreviewDialog-WAm7QSvT.js.map → PkFilePreviewDialog-m5d4zZDi.js.map} +1 -1
  9. package/dist/_chunks/{PkImageEditorDialog-DM-d0hCD.js → PkImageEditorDialog-aekpEqWD.js} +2 -2
  10. package/dist/_chunks/{PkImageEditorDialog-DM-d0hCD.js.map → PkImageEditorDialog-aekpEqWD.js.map} +1 -1
  11. package/dist/_chunks/{PkSelectionActions-Bl1KbGOj.js → PkSelectionActions-DDhRX6cs.js} +2 -2
  12. package/dist/_chunks/{PkSelectionActions-Bl1KbGOj.js.map → PkSelectionActions-DDhRX6cs.js.map} +1 -1
  13. package/dist/_chunks/{PkStreamingMarkdown-CU1ZUUCf.js → PkStreamingMarkdown-5WfFCjFv.js} +3 -3
  14. package/dist/_chunks/{PkStreamingMarkdown-CU1ZUUCf.js.map → PkStreamingMarkdown-5WfFCjFv.js.map} +1 -1
  15. package/dist/_chunks/{PkToolChatFile-B-Y47Q_K.js → PkToolChatFile-C3B9q2OL.js} +3 -3
  16. package/dist/_chunks/{PkToolChatFile-B-Y47Q_K.js.map → PkToolChatFile-C3B9q2OL.js.map} +1 -1
  17. package/dist/_chunks/{PkToolRequestGeolocation-B41xrF8k.js → PkToolRequestGeolocation-D4pYnCW5.js} +2 -2
  18. package/dist/_chunks/{PkToolRequestGeolocation-B41xrF8k.js.map → PkToolRequestGeolocation-D4pYnCW5.js.map} +1 -1
  19. package/dist/_chunks/{PkToolRequestOAuthConnection-BuCGuHwd.js → PkToolRequestOAuthConnection-DnnRY2rt.js} +2 -2
  20. package/dist/_chunks/{PkToolRequestOAuthConnection-BuCGuHwd.js.map → PkToolRequestOAuthConnection-DnnRY2rt.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowArtifact-Bjm6uhOK.js → PkToolShowArtifact-DQln7TsF.js} +2 -2
  22. package/dist/_chunks/{PkToolShowArtifact-Bjm6uhOK.js.map → PkToolShowArtifact-DQln7TsF.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowChart-B6TKQ3aT.js → PkToolShowChart-DfDB9BeZ.js} +2 -2
  24. package/dist/_chunks/{PkToolShowChart-B6TKQ3aT.js.map → PkToolShowChart-DfDB9BeZ.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowContactForm-5tg4xbrh.js → PkToolShowContactForm-Dkb8AiqL.js} +2 -2
  26. package/dist/_chunks/{PkToolShowContactForm-5tg4xbrh.js.map → PkToolShowContactForm-Dkb8AiqL.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowDiagram-CiNtS-vX.js → PkToolShowDiagram-B2dBogUW.js} +2 -2
  28. package/dist/_chunks/{PkToolShowDiagram-CiNtS-vX.js.map → PkToolShowDiagram-B2dBogUW.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowForm-eh8mXr6u.js → PkToolShowForm-CtDcwJs4.js} +4 -4
  30. package/dist/_chunks/{PkToolShowForm-eh8mXr6u.js.map → PkToolShowForm-CtDcwJs4.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowImageGallery-DedpXD-b.js → PkToolShowImageGallery-dLMI3SM7.js} +2 -2
  32. package/dist/_chunks/{PkToolShowImageGallery-DedpXD-b.js.map → PkToolShowImageGallery-dLMI3SM7.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowProductList-D24EIc4v.js → PkToolShowProductList-DE6BEdr_.js} +2 -2
  34. package/dist/_chunks/{PkToolShowProductList-D24EIc4v.js.map → PkToolShowProductList-DE6BEdr_.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowSources-Dnw1x7dT.js → PkToolShowSources-vSr080EU.js} +3 -3
  36. package/dist/_chunks/{PkToolShowSources-Dnw1x7dT.js.map → PkToolShowSources-vSr080EU.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowSuggestedReply-CxNx1Uf6.js → PkToolShowSuggestedReply-HuKn3loC.js} +2 -2
  38. package/dist/_chunks/{PkToolShowSuggestedReply-CxNx1Uf6.js.map → PkToolShowSuggestedReply-HuKn3loC.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowVideo-CDcJiprr.js → PkToolShowVideo-BL-9CiYe.js} +2 -2
  40. package/dist/_chunks/{PkToolShowVideo-CDcJiprr.js.map → PkToolShowVideo-BL-9CiYe.js.map} +1 -1
  41. package/dist/_chunks/{PkToolShowWebPages-UXqb0XEJ.js → PkToolShowWebPages-DQfODZdD.js} +2 -2
  42. package/dist/_chunks/{PkToolShowWebPages-UXqb0XEJ.js.map → PkToolShowWebPages-DQfODZdD.js.map} +1 -1
  43. package/dist/_chunks/{chatImagePolicy-DJAB0Bgw.js → chatImagePolicy-Cj5lkTVq.js} +2 -2
  44. package/dist/_chunks/{chatImagePolicy-DJAB0Bgw.js.map → chatImagePolicy-Cj5lkTVq.js.map} +1 -1
  45. package/dist/_chunks/text-CCurUhdH.js +13 -0
  46. package/dist/_chunks/text-CCurUhdH.js.map +1 -0
  47. package/dist/_chunks/{utils-78zQeKDO.js → utils-CRy3kzE3.js} +458 -160
  48. package/dist/_chunks/utils-CRy3kzE3.js.map +1 -0
  49. package/dist/ai-elements.es.js +5973 -5638
  50. package/dist/ai-elements.es.js.map +1 -1
  51. package/dist-vue/PkChatbot.js +1 -1
  52. package/dist-vue/PkChatbotAuth.js +1 -1
  53. package/dist-vue/PkChatbotEmptyState.js +1 -1
  54. package/dist-vue/PkChatbotInput.js +1 -1
  55. package/dist-vue/PkChatbotLocalFolders.d.ts +2 -0
  56. package/dist-vue/PkChatbotLocalFolders.js +1 -0
  57. package/dist-vue/PkChatbotMessages.js +1 -1
  58. package/dist-vue/PkChatbotStepPayload.js +1 -1
  59. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  60. package/dist-vue/PkChatbotSteps.js +1 -1
  61. package/dist-vue/PkChatbotViewChat.js +1 -1
  62. package/dist-vue/PkChatbotViewConversations.js +1 -1
  63. package/dist-vue/PkChatbotViewFiles.js +1 -1
  64. package/dist-vue/PkChatbotViewProfile.js +1 -1
  65. package/dist-vue/PkChatbotWakeupBar.js +1 -1
  66. package/dist-vue/_chunks/{Agent-Da4XChe8.js → Agent-DKefaJeG.js} +445 -377
  67. package/dist-vue/_chunks/Agent-DKefaJeG.js.map +1 -0
  68. package/dist-vue/_chunks/{Document-CsQsUQYa.js → Document-B49E_gxT.js} +18 -18
  69. package/dist-vue/_chunks/{Document-CsQsUQYa.js.map → Document-B49E_gxT.js.map} +1 -1
  70. package/dist-vue/_chunks/{Media-CMiWEpdQ.js → Media-DtudATme.js} +12 -2
  71. package/dist-vue/_chunks/Media-DtudATme.js.map +1 -0
  72. package/dist-vue/_chunks/{PkChatbot-CITKd3qD.js → PkChatbot-B2SwBImk.js} +10 -9
  73. package/dist-vue/_chunks/PkChatbot-B2SwBImk.js.map +1 -0
  74. package/dist-vue/_chunks/{PkChatbotAuth-SfTyFbq1.js → PkChatbotAuth-CIK2CFy-.js} +8 -8
  75. package/dist-vue/_chunks/{PkChatbotAuth-SfTyFbq1.js.map → PkChatbotAuth-CIK2CFy-.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkChatbotEmptyState-DI_8T5a4.js → PkChatbotEmptyState-C_htXOSW.js} +2 -2
  77. package/dist-vue/_chunks/{PkChatbotEmptyState-DI_8T5a4.js.map → PkChatbotEmptyState-C_htXOSW.js.map} +1 -1
  78. package/dist-vue/_chunks/PkChatbotInput-CJ5lPtpH.js +658 -0
  79. package/dist-vue/_chunks/PkChatbotInput-CJ5lPtpH.js.map +1 -0
  80. package/dist-vue/_chunks/PkChatbotLocalFolders-CSvqh_Cx.js +126 -0
  81. package/dist-vue/_chunks/PkChatbotLocalFolders-CSvqh_Cx.js.map +1 -0
  82. package/dist-vue/_chunks/{PkChatbotMessages-BWdINCAX.js → PkChatbotMessages-DY8r4UKe.js} +49 -49
  83. package/dist-vue/_chunks/{PkChatbotMessages-BWdINCAX.js.map → PkChatbotMessages-DY8r4UKe.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkChatbotStepPayload-CTwsRpkv.js → PkChatbotStepPayload-BLjH1pkP.js} +2 -2
  85. package/dist-vue/_chunks/{PkChatbotStepPayload-CTwsRpkv.js.map → PkChatbotStepPayload-BLjH1pkP.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkChatbotStepToolDetail-C9xeMg-k.js → PkChatbotStepToolDetail-wIZmkvr-.js} +3 -3
  87. package/dist-vue/_chunks/{PkChatbotStepToolDetail-C9xeMg-k.js.map → PkChatbotStepToolDetail-wIZmkvr-.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkChatbotSteps-DsubpIKa.js → PkChatbotSteps-DG09GyCb.js} +7 -7
  89. package/dist-vue/_chunks/{PkChatbotSteps-DsubpIKa.js.map → PkChatbotSteps-DG09GyCb.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkChatbotViewChat-DW1a9ZNl.js → PkChatbotViewChat-DPk9LjX-.js} +685 -667
  91. package/dist-vue/_chunks/PkChatbotViewChat-DPk9LjX-.js.map +1 -0
  92. package/dist-vue/_chunks/{PkChatbotViewConversations-DdniYy1b.js → PkChatbotViewConversations-NA_PCvZR.js} +4 -4
  93. package/dist-vue/_chunks/{PkChatbotViewConversations-DdniYy1b.js.map → PkChatbotViewConversations-NA_PCvZR.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkChatbotViewFiles-CMoromsf.js → PkChatbotViewFiles-D8_Khdu2.js} +3 -3
  95. package/dist-vue/_chunks/{PkChatbotViewFiles-CMoromsf.js.map → PkChatbotViewFiles-D8_Khdu2.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkChatbotViewProfile-BT7I3GhB.js → PkChatbotViewProfile-iTBiQVsZ.js} +2 -2
  97. package/dist-vue/_chunks/{PkChatbotViewProfile-BT7I3GhB.js.map → PkChatbotViewProfile-iTBiQVsZ.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkChatbotWakeupBar-Bx1zqFAX.js → PkChatbotWakeupBar-IoQJdUjI.js} +11 -11
  99. package/dist-vue/_chunks/PkChatbotWakeupBar-IoQJdUjI.js.map +1 -0
  100. package/dist-vue/_chunks/{PkFilePreview-Dxp-U8QU.js → PkFilePreview-DLJ2wTHk.js} +4 -4
  101. package/dist-vue/_chunks/{PkFilePreview-Dxp-U8QU.js.map → PkFilePreview-DLJ2wTHk.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkFilePreviewDialog-BE-NpN18.js → PkFilePreviewDialog-CDPZ3QIk.js} +2 -2
  103. package/dist-vue/_chunks/{PkFilePreviewDialog-BE-NpN18.js.map → PkFilePreviewDialog-CDPZ3QIk.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkImageEditorDialog-BiuOD6Hr.js → PkImageEditorDialog-CrjpCier.js} +2 -2
  105. package/dist-vue/_chunks/{PkImageEditorDialog-BiuOD6Hr.js.map → PkImageEditorDialog-CrjpCier.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkStreamingMarkdown-DMmt35Mq.js → PkStreamingMarkdown-CgKFdzCI.js} +23 -23
  107. package/dist-vue/_chunks/{PkStreamingMarkdown-DMmt35Mq.js.map → PkStreamingMarkdown-CgKFdzCI.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolChatFile-BdNron14.js → PkToolChatFile-IEQxfzjM.js} +3 -3
  109. package/dist-vue/_chunks/{PkToolChatFile-BdNron14.js.map → PkToolChatFile-IEQxfzjM.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolRequestGeolocation-DeI7kLlR.js → PkToolRequestGeolocation-BmrbMPke.js} +2 -2
  111. package/dist-vue/_chunks/{PkToolRequestGeolocation-DeI7kLlR.js.map → PkToolRequestGeolocation-BmrbMPke.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C0lE3Qbk.js → PkToolRequestOAuthConnection-yKgXyOUN.js} +2 -2
  113. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C0lE3Qbk.js.map → PkToolRequestOAuthConnection-yKgXyOUN.js.map} +1 -1
  114. package/dist-vue/_chunks/{PkToolShowArtifact-C0Gb-LW2.js → PkToolShowArtifact-CF90yFCe.js} +2 -2
  115. package/dist-vue/_chunks/{PkToolShowArtifact-C0Gb-LW2.js.map → PkToolShowArtifact-CF90yFCe.js.map} +1 -1
  116. package/dist-vue/_chunks/{PkToolShowChart-oJmzU10F.js → PkToolShowChart-CDR8ag4q.js} +2 -2
  117. package/dist-vue/_chunks/{PkToolShowChart-oJmzU10F.js.map → PkToolShowChart-CDR8ag4q.js.map} +1 -1
  118. package/dist-vue/_chunks/{PkToolShowContactForm-D4IAna-K.js → PkToolShowContactForm-DAdKUU4X.js} +2 -2
  119. package/dist-vue/_chunks/{PkToolShowContactForm-D4IAna-K.js.map → PkToolShowContactForm-DAdKUU4X.js.map} +1 -1
  120. package/dist-vue/_chunks/{PkToolShowDiagram-ClGpv5Cr.js → PkToolShowDiagram-Do20AvFb.js} +2 -2
  121. package/dist-vue/_chunks/{PkToolShowDiagram-ClGpv5Cr.js.map → PkToolShowDiagram-Do20AvFb.js.map} +1 -1
  122. package/dist-vue/_chunks/{PkToolShowForm-ByfNodNh.js → PkToolShowForm-DfFmPOt6.js} +4 -4
  123. package/dist-vue/_chunks/{PkToolShowForm-ByfNodNh.js.map → PkToolShowForm-DfFmPOt6.js.map} +1 -1
  124. package/dist-vue/_chunks/{PkToolShowImageGallery-DJ9JNDWK.js → PkToolShowImageGallery-DA6KW2g_.js} +2 -2
  125. package/dist-vue/_chunks/{PkToolShowImageGallery-DJ9JNDWK.js.map → PkToolShowImageGallery-DA6KW2g_.js.map} +1 -1
  126. package/dist-vue/_chunks/{PkToolShowProductList-CcFseg28.js → PkToolShowProductList-FcDDabPI.js} +2 -2
  127. package/dist-vue/_chunks/{PkToolShowProductList-CcFseg28.js.map → PkToolShowProductList-FcDDabPI.js.map} +1 -1
  128. package/dist-vue/_chunks/{PkToolShowSources-DznWqWK3.js → PkToolShowSources-afCYBONq.js} +3 -3
  129. package/dist-vue/_chunks/{PkToolShowSources-DznWqWK3.js.map → PkToolShowSources-afCYBONq.js.map} +1 -1
  130. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BZqnfpwO.js → PkToolShowSuggestedReply-C863wgtU.js} +2 -2
  131. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BZqnfpwO.js.map → PkToolShowSuggestedReply-C863wgtU.js.map} +1 -1
  132. package/dist-vue/_chunks/{PkToolShowVideo-niwkzqTN.js → PkToolShowVideo-kUiwxRlz.js} +2 -2
  133. package/dist-vue/_chunks/{PkToolShowVideo-niwkzqTN.js.map → PkToolShowVideo-kUiwxRlz.js.map} +1 -1
  134. package/dist-vue/_chunks/{PkToolShowWebPages-BsMVJ6c7.js → PkToolShowWebPages-Dw9D1__u.js} +2 -2
  135. package/dist-vue/_chunks/{PkToolShowWebPages-BsMVJ6c7.js.map → PkToolShowWebPages-Dw9D1__u.js.map} +1 -1
  136. package/dist-vue/_chunks/{createChatbotApiClient-Cd_2UI_O.js → createChatbotApiClient-DzrHp52e.js} +66 -65
  137. package/dist-vue/_chunks/createChatbotApiClient-DzrHp52e.js.map +1 -0
  138. package/dist-vue/_chunks/localFolders-ChZp8dLu.js +353 -0
  139. package/dist-vue/_chunks/localFolders-ChZp8dLu.js.map +1 -0
  140. package/dist-vue/_chunks/{useChatbotStore-Dir9Rc7K.js → useChatbotStore-DZlc7dzK.js} +1289 -1152
  141. package/dist-vue/_chunks/useChatbotStore-DZlc7dzK.js.map +1 -0
  142. package/dist-vue/_chunks/useSettledSelection-1bfM1fzx.js +55 -0
  143. package/dist-vue/_chunks/useSettledSelection-1bfM1fzx.js.map +1 -0
  144. package/dist-vue/_chunks/{utils-CibsowVe.js → utils-CY0jFRnG.js} +126 -107
  145. package/dist-vue/_chunks/utils-CY0jFRnG.js.map +1 -0
  146. package/dist-vue/api.js +1 -1
  147. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
  148. package/dist-vue/composables.js +62 -10
  149. package/dist-vue/composables.js.map +1 -1
  150. package/dist-vue/index.js +4100 -4086
  151. package/dist-vue/index.js.map +1 -1
  152. package/dist-vue/locales.js +32 -0
  153. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
  154. package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +7 -1
  155. package/dist-vue/packages/components/src/chat/PkChatbotLocalFolders.d.ts +31 -0
  156. package/dist-vue/packages/components/src/chat/utils.d.ts +3 -2
  157. package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +1 -1
  158. package/dist-vue/packages/composable/src/chatbot/index.d.ts +1 -0
  159. package/dist-vue/packages/composable/src/chatbot/localFolders.d.ts +137 -0
  160. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +46 -3
  161. package/dist-vue/packages/models/src/schema/Agent.d.ts +24 -0
  162. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
  163. package/dist-vue/packages/models/src/schema/HostTool.d.ts +5 -2
  164. package/dist-vue/packages/models/src/schema/LocalFolder.d.ts +78 -0
  165. package/dist-vue/packages/models/src/schema/Organization.d.ts +10 -0
  166. package/dist-vue/packages/models/src/schema/PageAccess.d.ts +4 -1
  167. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +8 -0
  168. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +8 -0
  169. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  170. package/dist-vue/style.css +1 -1
  171. package/package.json +1 -1
  172. package/dist/_chunks/Agent-DytagI8S.js.map +0 -1
  173. package/dist/_chunks/text-5F7L8EHi.js +0 -5
  174. package/dist/_chunks/text-5F7L8EHi.js.map +0 -1
  175. package/dist/_chunks/utils-78zQeKDO.js.map +0 -1
  176. package/dist-vue/_chunks/Agent-Da4XChe8.js.map +0 -1
  177. package/dist-vue/_chunks/Media-CMiWEpdQ.js.map +0 -1
  178. package/dist-vue/_chunks/PkChatbot-CITKd3qD.js.map +0 -1
  179. package/dist-vue/_chunks/PkChatbotInput-UqcSEi8l.js +0 -708
  180. package/dist-vue/_chunks/PkChatbotInput-UqcSEi8l.js.map +0 -1
  181. package/dist-vue/_chunks/PkChatbotViewChat-DW1a9ZNl.js.map +0 -1
  182. package/dist-vue/_chunks/PkChatbotWakeupBar-Bx1zqFAX.js.map +0 -1
  183. package/dist-vue/_chunks/createChatbotApiClient-Cd_2UI_O.js.map +0 -1
  184. package/dist-vue/_chunks/message-DuibQyHy.js +0 -61
  185. package/dist-vue/_chunks/message-DuibQyHy.js.map +0 -1
  186. package/dist-vue/_chunks/useChatbotStore-Dir9Rc7K.js.map +0 -1
  187. package/dist-vue/_chunks/utils-CibsowVe.js.map +0 -1
@@ -1,27 +1,29 @@
1
1
  import { c as e, i as t, l as n, r } from "./ChatTask-2-ffbJFK.js";
2
- import { o as i } from "./Media-CMiWEpdQ.js";
3
- import { t as a } from "./createChatbotApiClient-Cd_2UI_O.js";
4
- import { t as o } from "./PkChatbotMessages-BWdINCAX.js";
2
+ import { o as i } from "./Media-DtudATme.js";
3
+ import { t as a } from "./createChatbotApiClient-DzrHp52e.js";
4
+ import { t as o } from "./PkChatbotMessages-DY8r4UKe.js";
5
5
  import { t as s } from "./VvButtonLocalized-C-vx25u4.js";
6
6
  import { t as c } from "./useLightbox-CQ8WtQNC.js";
7
- import { a as l, n as u, t as d } from "./useChatbotStore-Dir9Rc7K.js";
7
+ import { a as l, n as u, t as d } from "./useChatbotStore-DZlc7dzK.js";
8
8
  import { n as f } from "./src-nb8MU1sh.js";
9
- import { s as p, t as m } from "./message-DuibQyHy.js";
10
- import { B as h, b as g, n as _, p as v, r as y, u as b } from "./utils-CibsowVe.js";
11
- import { t as x } from "./useDialogConfirm-fn7iV-iE.js";
12
- import { t as S } from "./useLocalizedString-Dmn92nix.js";
13
- import { n as C, r as w, t as T } from "./PkChatbotInput-UqcSEi8l.js";
14
- import { t as E } from "./PkAvatar-DwtZWSW4.js";
15
- import { n as ee, t as te } from "./PkChatbotWakeupBar-Bx1zqFAX.js";
16
- import { t as ne } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
17
- import { t as re } from "./PkChatbotEmptyState-DI_8T5a4.js";
18
- import { VvAlert as ie, VvButtonGroup as ae, VvCheckboxGroup as oe, VvDialog as se, VvIcon as ce, VvInputText as le, VvSelect as D, VvTextarea as ue } from "@volverjs/ui-vue/components";
19
- import { Fragment as O, Teleport as de, Transition as fe, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createSlots as pe, createTextVNode as P, createVNode as F, defineAsyncComponent as I, defineComponent as L, inject as R, isRef as me, mergeModels as he, nextTick as ge, normalizeClass as _e, normalizeStyle as ve, onBeforeUnmount as ye, onMounted as be, onScopeDispose as xe, onUnmounted as Se, openBlock as z, provide as Ce, ref as B, renderList as V, shallowRef as we, toDisplayString as H, toValue as Te, unref as U, useModel as Ee, useTemplateRef as De, watch as W, withCtx as G } from "vue";
20
- import { useI18n as Oe } from "vue-i18n";
21
- import { useDropZone as ke, useResizeObserver as Ae } from "@vueuse/core";
22
- import { defineStore as je, storeToRefs as Me } from "pinia";
9
+ import { b as p, m } from "./localFolders-ChZp8dLu.js";
10
+ import { t as h } from "./useSettledSelection-1bfM1fzx.js";
11
+ import { t as g } from "./useDialogConfirm-fn7iV-iE.js";
12
+ import { t as _ } from "./useLocalizedString-Dmn92nix.js";
13
+ import { B as v, b as y, n as b, p as x, r as S, u as C } from "./utils-CY0jFRnG.js";
14
+ import { t as w } from "./PkChatbotLocalFolders-CSvqh_Cx.js";
15
+ import { t as T } from "./PkAvatar-DwtZWSW4.js";
16
+ import { n as ee, t as te } from "./PkChatbotWakeupBar-IoQJdUjI.js";
17
+ import { n as E, t as ne } from "./PkChatbotInput-CJ5lPtpH.js";
18
+ import { t as re } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
19
+ import { t as ie } from "./PkChatbotEmptyState-C_htXOSW.js";
20
+ import { VvAlert as ae, VvButtonGroup as oe, VvCheckboxGroup as se, VvDialog as ce, VvIcon as le, VvInputText as ue, VvSelect as D, VvTextarea as de } from "@volverjs/ui-vue/components";
21
+ import { Fragment as O, Teleport as fe, Transition as pe, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createSlots as me, createTextVNode as P, createVNode as F, defineAsyncComponent as I, defineComponent as L, inject as R, isRef as he, mergeModels as ge, nextTick as _e, normalizeClass as ve, normalizeStyle as ye, onBeforeUnmount as be, onMounted as xe, onScopeDispose as Se, onUnmounted as Ce, openBlock as z, provide as we, ref as B, renderList as V, shallowRef as Te, toDisplayString as Ee, toValue as De, unref as H, useModel as Oe, useTemplateRef as ke, watch as U, withCtx as W } from "vue";
22
+ import { useI18n as Ae } from "vue-i18n";
23
+ import { useDropZone as je, useResizeObserver as Me } from "@vueuse/core";
24
+ import { defineStore as Ne, storeToRefs as Pe } from "pinia";
23
25
  // ../../packages/utils/src/next-message.ts
24
- var Ne = 15, Pe = 120, Fe = /* @__PURE__ */ new Set([
26
+ var Fe = 15, Ie = 120, Le = /* @__PURE__ */ new Set([
25
27
  "sì",
26
28
  "si",
27
29
  "no",
@@ -36,7 +38,7 @@ var Ne = 15, Pe = 120, Fe = /* @__PURE__ */ new Set([
36
38
  "go",
37
39
  "continue",
38
40
  "why"
39
- ]), Ie = (e) => (e.match(/\+?\d[\d\s./-]*\d/g) ?? []).some((e) => e.replace(/\D/g, "").length >= 9), Le = [
41
+ ]), Re = (e) => (e.match(/\+?\d[\d\s./-]*\d/g) ?? []).some((e) => e.replace(/\D/g, "").length >= 9), ze = [
40
42
  /[.!?]\s+\p{Lu}/u,
41
43
  /[\n*#`]/,
42
44
  /^[([{<]/,
@@ -53,13 +55,13 @@ var Ne = 15, Pe = 120, Fe = /* @__PURE__ */ new Set([
53
55
  /^(ecco|lascia che|ti mostro|ti spiego|let me|here's|here is)\b/i,
54
56
  /\S+@\S+\.\S+/
55
57
  ];
56
- function Re(e) {
58
+ function Be(e) {
57
59
  let t = e.replace(/<\/?think>/gi, "").replace(/[\u200B-\u200D\uFEFF]/g, "").trim().replace(/^["'«“‘](.*)["'»”’]$/s, "$1").trim(), n = t.split(/\s+/);
58
- if (!(!t || t.length > Pe || n.length > Ne || n.length < 2 && !Fe.has(t.toLowerCase().replace(/\P{L}/gu, "")) || Le.some((e) => e.test(t)) || Ie(t))) return t;
60
+ if (!(!t || t.length > Ie || n.length > Fe || n.length < 2 && !Le.has(t.toLowerCase().replace(/\P{L}/gu, "")) || ze.some((e) => e.test(t)) || Re(t))) return t;
59
61
  }
60
62
  // ../../packages/composable/src/chatbot/useChatTasksStore.ts
61
- function ze(e) {
62
- return je(`chat-tasks-${e}`, () => {
63
+ function Ve(e) {
64
+ return Ne(`chat-tasks-${e}`, () => {
63
65
  let t = u(e), n = B([]), r = B(!1), i = B(), a = B();
64
66
  async function o() {
65
67
  try {
@@ -106,18 +108,18 @@ function ze(e) {
106
108
  })();
107
109
  }
108
110
  // ../../packages/composable/src/chatbot/useGreeting.ts
109
- function Be(e, t) {
110
- let { locale: n, t: r, te: i } = Oe({ useScope: "global" });
111
- return k(() => Ve(Te(e)?.greeting?.[0]?.[n.value] ?? "", Te(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
111
+ function He(e, t) {
112
+ let { locale: n, t: r, te: i } = Ae({ useScope: "global" });
113
+ return k(() => Ue(De(e)?.greeting?.[0]?.[n.value] ?? "", De(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
112
114
  }
113
- function Ve(e, t) {
115
+ function Ue(e, t) {
114
116
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
115
117
  }
116
118
  // ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
117
- var He = {
119
+ var We = {
118
120
  key: 1,
119
121
  class: "pk-aurora__fallback"
120
- }, Ue = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", We = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Ge = /* @__PURE__ */ L({
122
+ }, Ge = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Ke = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", qe = /* @__PURE__ */ L({
121
123
  __name: "PkAuroraCanvas",
122
124
  props: {
123
125
  sourceSelector: {},
@@ -126,21 +128,21 @@ var He = {
126
128
  secondColor: {}
127
129
  },
128
130
  setup(e) {
129
- let t = e, n = De("rootEl"), r = De("canvasEl"), i = B(!1), a = B(null), o = k(() => a.value ? {
131
+ let t = e, n = ke("rootEl"), r = ke("canvasEl"), i = B(!1), a = B(null), o = k(() => a.value ? {
130
132
  "--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
131
133
  "--pk-aurora-tint-2": `rgb(${(a.value.duo ? a.value.second : a.value.first).join(" ")})`
132
- } : void 0), s = null, c = 0, l = null, u = null, d = null, f = null, p = null, m = null, g = null, _ = null, v = null, y = performance.now(), b = (e, t) => {
134
+ } : void 0), s = null, c = 0, l = null, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, y = performance.now(), b = (e, t) => {
133
135
  if (!s) return null;
134
136
  let n = s.createShader(e);
135
137
  return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
136
138
  }, x = (e) => e.map((e) => e / 255), S = () => {
137
- n.value && (a.value = h(n.value, {
139
+ n.value && (a.value = v(n.value, {
138
140
  mainColor: t.mainColor,
139
141
  tones: t.tones,
140
142
  secondColor: t.secondColor
141
- }), s && !i.value && a.value && (s.uniform3f(g, ...x(a.value.first)), s.uniform3f(_, ...x(a.value.second)), s.uniform1f(v, +!!a.value.duo), T(w() ? 10 : void 0)));
143
+ }), s && !i.value && a.value && (s.uniform3f(h, ...x(a.value.first)), s.uniform3f(g, ...x(a.value.second)), s.uniform1f(_, +!!a.value.duo), T(w() ? 10 : void 0)));
142
144
  };
143
- W([
145
+ U([
144
146
  () => t.mainColor,
145
147
  () => t.tones,
146
148
  () => t.secondColor
@@ -159,16 +161,16 @@ var He = {
159
161
  T(w() ? 10 : void 0);
160
162
  }, w = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, T = (e) => {
161
163
  s && r.value && (s.uniform1f(u, e ?? (performance.now() - y) / 1e3), s.uniform2f(d, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
162
- }, E = () => {
163
- T(), c = requestAnimationFrame(E);
164
+ }, ee = () => {
165
+ T(), c = requestAnimationFrame(ee);
164
166
  };
165
- return be(() => {
167
+ return xe(() => {
166
168
  let e = r.value;
167
169
  if (S(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
168
170
  i.value = !0;
169
171
  return;
170
172
  }
171
- let t = b(s.VERTEX_SHADER, Ue), n = b(s.FRAGMENT_SHADER, We), o = s.createProgram();
173
+ let t = b(s.VERTEX_SHADER, Ge), n = b(s.FRAGMENT_SHADER, Ke), o = s.createProgram();
172
174
  if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
173
175
  i.value = !0;
174
176
  return;
@@ -185,11 +187,11 @@ var He = {
185
187
  1,
186
188
  1
187
189
  ]), s.STATIC_DRAW);
188
- let h = s.getAttribLocation(o, "a_position");
189
- s.enableVertexAttribArray(h), s.vertexAttribPointer(h, 2, s.FLOAT, !1, 0, 0), u = s.getUniformLocation(o, "u_time"), d = s.getUniformLocation(o, "u_resolution"), f = s.getUniformLocation(o, "u_center"), p = s.getUniformLocation(o, "u_half"), m = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"), S(), l = new ResizeObserver(C), l.observe(e), C(), ge(C), w() ? T(10) : E();
190
- }), ye(() => {
190
+ let v = s.getAttribLocation(o, "a_position");
191
+ s.enableVertexAttribArray(v), s.vertexAttribPointer(v, 2, s.FLOAT, !1, 0, 0), u = s.getUniformLocation(o, "u_time"), d = s.getUniformLocation(o, "u_resolution"), f = s.getUniformLocation(o, "u_center"), p = s.getUniformLocation(o, "u_half"), m = s.getUniformLocation(o, "u_spread"), h = s.getUniformLocation(o, "u_color"), g = s.getUniformLocation(o, "u_color2"), _ = s.getUniformLocation(o, "u_duo"), S(), l = new ResizeObserver(C), l.observe(e), C(), _e(C), w() ? T(10) : ee();
192
+ }), be(() => {
191
193
  cancelAnimationFrame(c), l?.disconnect();
192
- }), Se(() => {
194
+ }), Ce(() => {
193
195
  let e = s;
194
196
  s = null, setTimeout(() => {
195
197
  e?.getExtension("WEBGL_lose_context")?.loseContext();
@@ -199,8 +201,8 @@ var He = {
199
201
  ref: n,
200
202
  class: "pk-aurora",
201
203
  "aria-hidden": "true",
202
- style: ve(o.value)
203
- }, [i.value ? (z(), M("div", He)) : (z(), M("canvas", {
204
+ style: ye(o.value)
205
+ }, [i.value ? (z(), M("div", We)) : (z(), M("canvas", {
204
206
  key: 0,
205
207
  ref_key: "canvasEl",
206
208
  ref: r,
@@ -209,33 +211,33 @@ var He = {
209
211
  }
210
212
  });
211
213
  // ../../node_modules/.pnpm/croner@10.0.1/node_modules/croner/dist/croner.js
212
- function Ke(e) {
214
+ function Je(e) {
213
215
  return Date.UTC(e.y, e.m - 1, e.d, e.h, e.i, e.s);
214
216
  }
215
- function qe(e, t) {
217
+ function Ye(e, t) {
216
218
  return e.y === t.y && e.m === t.m && e.d === t.d && e.h === t.h && e.i === t.i && e.s === t.s;
217
219
  }
218
- function K(e, t) {
220
+ function G(e, t) {
219
221
  let n = new Date(Date.parse(e));
220
222
  if (isNaN(n)) throw Error("Invalid ISO8601 passed to timezone parser.");
221
223
  let r = e.substring(9);
222
- return r.includes("Z") || r.includes("+") || r.includes("-") ? Ze(n.getUTCFullYear(), n.getUTCMonth() + 1, n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes(), n.getUTCSeconds(), "Etc/UTC") : Ze(n.getFullYear(), n.getMonth() + 1, n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), t);
224
+ return r.includes("Z") || r.includes("+") || r.includes("-") ? $e(n.getUTCFullYear(), n.getUTCMonth() + 1, n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes(), n.getUTCSeconds(), "Etc/UTC") : $e(n.getFullYear(), n.getMonth() + 1, n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), t);
223
225
  }
224
- function Je(e, t, n) {
225
- return Ye(K(e, t), n);
226
+ function Xe(e, t, n) {
227
+ return Ze(G(e, t), n);
226
228
  }
227
- function Ye(e, t) {
228
- let n = new Date(Ke(e)), r = Xe(n, e.tz), i = Ke(e) - Ke(r), a = new Date(n.getTime() + i), o = Xe(a, e.tz);
229
- if (qe(o, e)) {
229
+ function Ze(e, t) {
230
+ let n = new Date(Je(e)), r = Qe(n, e.tz), i = Je(e) - Je(r), a = new Date(n.getTime() + i), o = Qe(a, e.tz);
231
+ if (Ye(o, e)) {
230
232
  let t = /* @__PURE__ */ new Date(a.getTime() - 36e5);
231
- return qe(Xe(t, e.tz), e) ? t : a;
233
+ return Ye(Qe(t, e.tz), e) ? t : a;
232
234
  }
233
- let s = new Date(a.getTime() + Ke(e) - Ke(o));
234
- if (qe(Xe(s, e.tz), e)) return s;
235
+ let s = new Date(a.getTime() + Je(e) - Je(o));
236
+ if (Ye(Qe(s, e.tz), e)) return s;
235
237
  if (t) throw Error("Invalid date passed to fromTZ()");
236
238
  return a.getTime() > s.getTime() ? a : s;
237
239
  }
238
- function Xe(e, t) {
240
+ function Qe(e, t) {
239
241
  let n, r;
240
242
  try {
241
243
  n = new Intl.DateTimeFormat("en-US", {
@@ -272,7 +274,7 @@ function Xe(e, t) {
272
274
  tz: t
273
275
  };
274
276
  }
275
- function Ze(e, t, n, r, i, a, o) {
277
+ function $e(e, t, n, r, i, a, o) {
276
278
  return {
277
279
  y: e,
278
280
  m: t,
@@ -283,13 +285,13 @@ function Ze(e, t, n, r, i, a, o) {
283
285
  tz: o
284
286
  };
285
287
  }
286
- var Qe = [
288
+ var et = [
287
289
  1,
288
290
  2,
289
291
  4,
290
292
  8,
291
293
  16
292
- ], $e = class {
294
+ ], tt = class {
293
295
  pattern;
294
296
  timezone;
295
297
  mode;
@@ -467,10 +469,10 @@ var Qe = [
467
469
  setNthWeekdayOfMonth(e, t) {
468
470
  if (typeof t != "number" && t.toUpperCase() === "L") this.dayOfWeek[e] = this.dayOfWeek[e] | 32;
469
471
  else if (t === 63) this.dayOfWeek[e] = 63;
470
- else if (t < 6 && t > 0) this.dayOfWeek[e] = this.dayOfWeek[e] | Qe[t - 1];
472
+ else if (t < 6 && t > 0) this.dayOfWeek[e] = this.dayOfWeek[e] | et[t - 1];
471
473
  else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${t}, Type: ${typeof t}`);
472
474
  }
473
- }, et = [
475
+ }, nt = [
474
476
  31,
475
477
  28,
476
478
  31,
@@ -483,7 +485,7 @@ var Qe = [
483
485
  31,
484
486
  30,
485
487
  31
486
- ], q = [
488
+ ], K = [
487
489
  [
488
490
  "month",
489
491
  "year",
@@ -509,7 +511,7 @@ var Qe = [
509
511
  "minute",
510
512
  0
511
513
  ]
512
- ], J = class e {
514
+ ], q = class e {
513
515
  tz;
514
516
  ms;
515
517
  second;
@@ -528,7 +530,7 @@ var Qe = [
528
530
  else throw TypeError("CronDate: Invalid type (" + typeof t + ") passed to CronDate constructor");
529
531
  }
530
532
  getLastDayOfMonth(e, t) {
531
- return t === 1 ? new Date(Date.UTC(e, t + 1, 0)).getUTCDate() : et[t];
533
+ return t === 1 ? new Date(Date.UTC(e, t + 1, 0)).getUTCDate() : nt[t];
532
534
  }
533
535
  getLastWeekday(e, t) {
534
536
  let n = this.getLastDayOfMonth(e, t), r = new Date(Date.UTC(e, t, n)).getUTCDay();
@@ -543,7 +545,7 @@ var Qe = [
543
545
  isNthWeekdayOfMonth(e, t, n, r) {
544
546
  let i = new Date(Date.UTC(e, t, n)).getUTCDay(), a = 0;
545
547
  for (let r = 1; r <= n; r++) new Date(Date.UTC(e, t, r)).getUTCDay() === i && a++;
546
- if (r & 63 && Qe[a - 1] & r) return !0;
548
+ if (r & 63 && et[a - 1] & r) return !0;
547
549
  if (r & 32) {
548
550
  let r = this.getLastDayOfMonth(e, t);
549
551
  for (let a = n + 1; a <= r; a++) if (new Date(Date.UTC(e, t, a)).getUTCDay() === i) return !1;
@@ -555,7 +557,7 @@ var Qe = [
555
557
  if (this.tz !== void 0) {
556
558
  if (typeof this.tz == "number") this.ms = e.getUTCMilliseconds(), this.second = e.getUTCSeconds(), this.minute = e.getUTCMinutes() + this.tz, this.hour = e.getUTCHours(), this.day = e.getUTCDate(), this.month = e.getUTCMonth(), this.year = e.getUTCFullYear(), this.apply();
557
559
  else try {
558
- let t = Xe(e, this.tz);
560
+ let t = Qe(e, this.tz);
559
561
  this.ms = e.getMilliseconds(), this.second = t.s, this.minute = t.i, this.hour = t.h, this.day = t.d, this.month = t.m - 1, this.year = t.y;
560
562
  } catch (e) {
561
563
  let t = e instanceof Error ? e.message : String(e);
@@ -567,7 +569,7 @@ var Qe = [
567
569
  this.tz = e.tz, this.year = e.year, this.month = e.month, this.day = e.day, this.hour = e.hour, this.minute = e.minute, this.second = e.second, this.ms = e.ms;
568
570
  }
569
571
  apply() {
570
- if (this.month > 11 || this.month < 0 || this.day > et[this.month] || this.day < 1 || this.hour > 59 || this.minute > 59 || this.second > 59 || this.hour < 0 || this.minute < 0 || this.second < 0) {
572
+ if (this.month > 11 || this.month < 0 || this.day > nt[this.month] || this.day < 1 || this.hour > 59 || this.minute > 59 || this.second > 59 || this.hour < 0 || this.minute < 0 || this.second < 0) {
571
573
  let e = new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms));
572
574
  return this.ms = e.getUTCMilliseconds(), this.second = e.getUTCSeconds(), this.minute = e.getUTCMinutes(), this.hour = e.getUTCHours(), this.day = e.getUTCDate(), this.month = e.getUTCMonth(), this.year = e.getUTCFullYear(), !0;
573
575
  }
@@ -575,9 +577,9 @@ var Qe = [
575
577
  }
576
578
  fromString(e) {
577
579
  if (typeof this.tz == "number") {
578
- let t = Je(e);
580
+ let t = Xe(e);
579
581
  this.ms = t.getUTCMilliseconds(), this.second = t.getUTCSeconds(), this.minute = t.getUTCMinutes(), this.hour = t.getUTCHours(), this.day = t.getUTCDate(), this.month = t.getUTCMonth(), this.year = t.getUTCFullYear(), this.apply();
580
- } else return this.fromDate(Je(e, this.tz));
582
+ } else return this.fromDate(Xe(e, this.tz));
581
583
  }
582
584
  findNext(e, t, n, r) {
583
585
  return this._findMatch(e, t, n, r, 1);
@@ -625,12 +627,12 @@ var Qe = [
625
627
  }
626
628
  if (this.year >= 1e4) return null;
627
629
  }
628
- let r = this.findNext(t, q[n][0], e, q[n][2]);
630
+ let r = this.findNext(t, K[n][0], e, K[n][2]);
629
631
  if (r > 1) {
630
632
  let i = n + 1;
631
- for (; i < q.length;) this[q[i][0]] = -q[i][2], i++;
633
+ for (; i < K.length;) this[K[i][0]] = -K[i][2], i++;
632
634
  if (r === 3) {
633
- if (this[q[n][1]]++, this[q[n][0]] = -q[n][2], this.apply(), n === 0 && !e.starYear) {
635
+ if (this[K[n][1]]++, this[K[n][0]] = -K[n][2], this.apply(), n === 0 && !e.starYear) {
634
636
  for (; this.year >= 0 && this.year < e.year.length && e.year[this.year] === 0 && this.year < 1e4;) this.year++;
635
637
  if (this.year >= 1e4 || this.year >= e.year.length) return null;
636
638
  }
@@ -638,7 +640,7 @@ var Qe = [
638
640
  }
639
641
  if (this.apply()) return this.recurse(e, t, n - 1);
640
642
  }
641
- return n += 1, n >= q.length ? this : (e.starYear ? this.year >= 3e3 : this.year >= 1e4) ? null : this.recurse(e, t, n);
643
+ return n += 1, n >= K.length ? this : (e.starYear ? this.year >= 3e3 : this.year >= 1e4) ? null : this.recurse(e, t, n);
642
644
  }
643
645
  increment(e, t, n) {
644
646
  return this.second += t.interval !== void 0 && t.interval > 1 && n ? t.interval : 1, this.ms = 0, this.apply(), this.recurse(e, t, 0);
@@ -660,15 +662,15 @@ var Qe = [
660
662
  }
661
663
  if (this.year < 0) return null;
662
664
  }
663
- let i = this.findPrevious(t, q[n][0], e, q[n][2]);
665
+ let i = this.findPrevious(t, K[n][0], e, K[n][2]);
664
666
  if (i > 1) {
665
667
  let a = n + 1;
666
- for (; a < q.length;) {
667
- let t = q[a][0], n = q[a][2], r = this.getMaxPatternValue(t, e, n);
668
+ for (; a < K.length;) {
669
+ let t = K[a][0], n = K[a][2], r = this.getMaxPatternValue(t, e, n);
668
670
  this[t] = r, a++;
669
671
  }
670
672
  if (i === 3) {
671
- if (this[q[n][1]]--, n === 0) {
673
+ if (this[K[n][1]]--, n === 0) {
672
674
  let e = this.getLastDayOfMonth(this.year, this.month);
673
675
  this.day > e && (this.day = e);
674
676
  }
@@ -678,19 +680,19 @@ var Qe = [
678
680
  let e = this.year, t = this.month;
679
681
  for (; t < 0;) t += 12, e--;
680
682
  for (; t > 11;) t -= 12, e++;
681
- let n = t === 1 ? new Date(Date.UTC(e, t + 1, 0)).getUTCDate() : et[t];
683
+ let n = t === 1 ? new Date(Date.UTC(e, t + 1, 0)).getUTCDate() : nt[t];
682
684
  this.day > n && (this.day = n);
683
685
  }
684
686
  }
685
687
  this.apply();
686
- let i = q[n][0], a = q[n][2], o = this.getMaxPatternValue(i, e, a);
688
+ let i = K[n][0], a = K[n][2], o = this.getMaxPatternValue(i, e, a);
687
689
  if (i === "day") {
688
690
  let e = this.getLastDayOfMonth(this.year, this.month);
689
691
  this[i] = Math.min(o, e);
690
692
  } else this[i] = o;
691
693
  if (this.apply(), n === 0) {
692
- let t = q[1][2], n = this.getMaxPatternValue("day", e, t), r = this.getLastDayOfMonth(this.year, this.month), i = Math.min(n, r);
693
- i !== this.day && (this.day = i, this.hour = this.getMaxPatternValue("hour", e, q[2][2]), this.minute = this.getMaxPatternValue("minute", e, q[3][2]), this.second = this.getMaxPatternValue("second", e, q[4][2]));
694
+ let t = K[1][2], n = this.getMaxPatternValue("day", e, t), r = this.getLastDayOfMonth(this.year, this.month), i = Math.min(n, r);
695
+ i !== this.day && (this.day = i, this.hour = this.getMaxPatternValue("hour", e, K[2][2]), this.minute = this.getMaxPatternValue("minute", e, K[3][2]), this.second = this.getMaxPatternValue("second", e, K[4][2]));
694
696
  }
695
697
  if (n === 0 && !e.starYear) {
696
698
  for (; this.year >= 0 && this.year < e.year.length && e.year[this.year] === 0;) this.year--;
@@ -700,7 +702,7 @@ var Qe = [
700
702
  }
701
703
  if (this.apply()) return this.recurseBackward(e, t, n - 1, r + 1);
702
704
  }
703
- return n += 1, n >= q.length ? this : this.year < 0 ? null : this.recurseBackward(e, t, n, r + 1);
705
+ return n += 1, n >= K.length ? this : this.year < 0 ? null : this.recurseBackward(e, t, n, r + 1);
704
706
  }
705
707
  getMaxPatternValue(e, t, n) {
706
708
  if (e === "day" && t.lastDayOfMonth || e === "day" && !t.starDOW) return this.getLastDayOfMonth(this.year, this.month);
@@ -711,15 +713,15 @@ var Qe = [
711
713
  return this._findMatch(e, t, n, r, -1);
712
714
  }
713
715
  getDate(e) {
714
- return e || this.tz === void 0 ? new Date(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms) : typeof this.tz == "number" ? new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute - this.tz, this.second, this.ms)) : Ye(Ze(this.year, this.month + 1, this.day, this.hour, this.minute, this.second, this.tz), !1);
716
+ return e || this.tz === void 0 ? new Date(this.year, this.month, this.day, this.hour, this.minute, this.second, this.ms) : typeof this.tz == "number" ? new Date(Date.UTC(this.year, this.month, this.day, this.hour, this.minute - this.tz, this.second, this.ms)) : Ze($e(this.year, this.month + 1, this.day, this.hour, this.minute, this.second, this.tz), !1);
715
717
  }
716
718
  getTime() {
717
719
  return this.getDate(!1).getTime();
718
720
  }
719
721
  match(e, t) {
720
722
  if (!e.starYear && (this.year < 0 || this.year >= e.year.length || e.year[this.year] === 0)) return !1;
721
- for (let n = 0; n < q.length; n++) {
722
- let r = q[n][0], i = q[n][2], a = this[r];
723
+ for (let n = 0; n < K.length; n++) {
724
+ let r = K[n][0], i = K[n][2], a = this[r];
723
725
  if (a + i < 0 || a + i >= e[r].length) return !1;
724
726
  let o = e[r][a + i];
725
727
  if (r === "day") {
@@ -742,7 +744,7 @@ var Qe = [
742
744
  return !0;
743
745
  }
744
746
  };
745
- function tt(e) {
747
+ function rt(e) {
746
748
  if (e === void 0 && (e = {}), delete e.name, e.legacyMode !== void 0 && e.domAndDow === void 0 ? e.domAndDow = !e.legacyMode : e.domAndDow === void 0 && (e.domAndDow = !1), e.legacyMode = !e.domAndDow, e.paused = e.paused !== void 0 && e.paused, e.maxRuns = e.maxRuns === void 0 ? 1 / 0 : e.maxRuns, e.catch = e.catch !== void 0 && e.catch, e.interval = e.interval === void 0 ? 0 : parseInt(e.interval.toString(), 10), e.utcOffset = e.utcOffset === void 0 ? void 0 : parseInt(e.utcOffset.toString(), 10), e.dayOffset = e.dayOffset === void 0 ? 0 : parseInt(e.dayOffset.toString(), 10), e.unref = e.unref !== void 0 && e.unref, e.mode = e.mode === void 0 ? "auto" : e.mode, e.alternativeWeekdays = e.alternativeWeekdays !== void 0 && e.alternativeWeekdays, e.sloppyRanges = e.sloppyRanges !== void 0 && e.sloppyRanges, ![
747
749
  "auto",
748
750
  "5-part",
@@ -751,7 +753,7 @@ function tt(e) {
751
753
  "5-or-6-parts",
752
754
  "6-or-7-parts"
753
755
  ].includes(e.mode)) throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");
754
- if (e.startAt && (e.startAt = new J(e.startAt, e.timezone)), e.stopAt && (e.stopAt = new J(e.stopAt, e.timezone)), e.interval !== null) {
756
+ if (e.startAt && (e.startAt = new q(e.startAt, e.timezone)), e.stopAt && (e.stopAt = new q(e.stopAt, e.timezone)), e.interval !== null) {
755
757
  if (isNaN(e.interval)) throw Error("CronOptions: Supplied value for interval is not a number");
756
758
  if (e.interval < 0) throw Error("CronOptions: Supplied value for interval can not be negative");
757
759
  }
@@ -764,16 +766,16 @@ function tt(e) {
764
766
  if (e.dayOffset !== void 0 && e.dayOffset !== 0 && isNaN(e.dayOffset)) throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");
765
767
  return e;
766
768
  }
767
- function nt(e) {
769
+ function it(e) {
768
770
  return Object.prototype.toString.call(e) === "[object Function]" || typeof e == "function" || e instanceof Function;
769
771
  }
770
- function rt(e) {
771
- return nt(e);
772
+ function at(e) {
773
+ return it(e);
772
774
  }
773
- function it(e) {
775
+ function ot(e) {
774
776
  typeof Deno < "u" && typeof Deno.unrefTimer < "u" ? Deno.unrefTimer(e) : e && typeof e.unref < "u" && e.unref();
775
777
  }
776
- var at = 3e4, ot = [], st = class {
778
+ var st = 3e4, ct = [], lt = class {
777
779
  name;
778
780
  options;
779
781
  _states;
@@ -790,13 +792,13 @@ var at = 3e4, ot = [], st = class {
790
792
  }
791
793
  constructor(e, t, n) {
792
794
  let r, i;
793
- if (nt(t)) i = t;
795
+ if (it(t)) i = t;
794
796
  else if (typeof t == "object") r = t;
795
797
  else if (t !== void 0) throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");
796
- if (nt(n)) i = n;
798
+ if (it(n)) i = n;
797
799
  else if (typeof n == "object") r = n;
798
800
  else if (n !== void 0) throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");
799
- if (this.name = r?.name, this.options = tt(r), this._states = {
801
+ if (this.name = r?.name, this.options = rt(r), this._states = {
800
802
  kill: !1,
801
803
  blocking: !1,
802
804
  previousRun: void 0,
@@ -805,16 +807,16 @@ var at = 3e4, ot = [], st = class {
805
807
  currentTimeout: void 0,
806
808
  maxRuns: r ? r.maxRuns : void 0,
807
809
  paused: r ? r.paused : !1,
808
- pattern: new $e("* * * * *", void 0, { mode: "auto" })
809
- }, e && (e instanceof Date || typeof e == "string" && e.indexOf(":") > 0) ? this._states.once = new J(e, this.getTz()) : this._states.pattern = new $e(e, this.options.timezone, {
810
+ pattern: new tt("* * * * *", void 0, { mode: "auto" })
811
+ }, e && (e instanceof Date || typeof e == "string" && e.indexOf(":") > 0) ? this._states.once = new q(e, this.getTz()) : this._states.pattern = new tt(e, this.options.timezone, {
810
812
  mode: this.options.mode,
811
813
  alternativeWeekdays: this.options.alternativeWeekdays,
812
814
  sloppyRanges: this.options.sloppyRanges
813
815
  }), this.name) {
814
- if (ot.find((e) => e.name === this.name)) throw Error("Cron: Tried to initialize new named job '" + this.name + "', but name already taken.");
815
- ot.push(this);
816
+ if (ct.find((e) => e.name === this.name)) throw Error("Cron: Tried to initialize new named job '" + this.name + "', but name already taken.");
817
+ ct.push(this);
816
818
  }
817
- return i !== void 0 && rt(i) && (this.fn = i, this.schedule()), this;
819
+ return i !== void 0 && at(i) && (this.fn = i, this.schedule()), this;
818
820
  }
819
821
  nextRun(e) {
820
822
  let t = this._next(e);
@@ -829,7 +831,7 @@ var at = 3e4, ot = [], st = class {
829
831
  return this._enumerateRuns(e, t || void 0, "previous");
830
832
  }
831
833
  _enumerateRuns(e, t, n) {
832
- let r = [], i = t ? new J(t, this.getTz()) : null, a = n === "next" ? this._next : this._previous;
834
+ let r = [], i = t ? new q(t, this.getTz()) : null, a = n === "next" ? this._next : this._previous;
833
835
  for (; e--;) {
834
836
  let e = a.call(this, i);
835
837
  if (!e) break;
@@ -840,12 +842,12 @@ var at = 3e4, ot = [], st = class {
840
842
  }
841
843
  match(e) {
842
844
  if (this._states.once) {
843
- let t = new J(e, this.getTz());
845
+ let t = new q(e, this.getTz());
844
846
  t.ms = 0;
845
- let n = new J(this._states.once, this.getTz());
847
+ let n = new q(this._states.once, this.getTz());
846
848
  return n.ms = 0, t.getTime() === n.getTime();
847
849
  }
848
- let t = new J(e, this.getTz());
850
+ let t = new q(e, this.getTz());
849
851
  return t.ms = 0, t.match(this._states.pattern, this.options);
850
852
  }
851
853
  getPattern() {
@@ -872,12 +874,12 @@ var at = 3e4, ot = [], st = class {
872
874
  }
873
875
  msToNext(e) {
874
876
  let t = this._next(e);
875
- return t ? e instanceof J || e instanceof Date ? t.getTime() - e.getTime() : t.getTime() - new J(e).getTime() : null;
877
+ return t ? e instanceof q || e instanceof Date ? t.getTime() - e.getTime() : t.getTime() - new q(e).getTime() : null;
876
878
  }
877
879
  stop() {
878
880
  this._states.kill = !0, this._states.currentTimeout && clearTimeout(this._states.currentTimeout);
879
- let e = ot.indexOf(this);
880
- e >= 0 && ot.splice(e, 1);
881
+ let e = ct.indexOf(this);
882
+ e >= 0 && ct.splice(e, 1);
881
883
  }
882
884
  pause() {
883
885
  return this._states.paused = !0, !this._states.kill;
@@ -889,21 +891,21 @@ var at = 3e4, ot = [], st = class {
889
891
  if (e && this.fn) throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");
890
892
  e && (this.fn = e);
891
893
  let t = this.msToNext(), n = this.nextRun(this._states.currentRun);
892
- return t == null || isNaN(t) || n === null || (t > at && (t = at), this._states.currentTimeout = setTimeout(() => this._checkTrigger(n), t), this._states.currentTimeout && this.options.unref && it(this._states.currentTimeout)), this;
894
+ return t == null || isNaN(t) || n === null || (t > st && (t = st), this._states.currentTimeout = setTimeout(() => this._checkTrigger(n), t), this._states.currentTimeout && this.options.unref && ot(this._states.currentTimeout)), this;
893
895
  }
894
896
  async _trigger(e) {
895
- this._states.blocking = !0, this._states.currentRun = new J(void 0, this.getTz());
897
+ this._states.blocking = !0, this._states.currentRun = new q(void 0, this.getTz());
896
898
  try {
897
899
  if (this.options.catch) try {
898
900
  this.fn !== void 0 && await this.fn(this, this.options.context);
899
901
  } catch (e) {
900
- if (nt(this.options.catch)) try {
902
+ if (it(this.options.catch)) try {
901
903
  this.options.catch(e, this);
902
904
  } catch {}
903
905
  }
904
906
  else this.fn !== void 0 && await this.fn(this, this.options.context);
905
907
  } finally {
906
- this._states.previousRun = new J(e, this.getTz()), this._states.blocking = !1;
908
+ this._states.previousRun = new q(e, this.getTz()), this._states.blocking = !1;
907
909
  }
908
910
  }
909
911
  async trigger() {
@@ -914,36 +916,36 @@ var at = 3e4, ot = [], st = class {
914
916
  }
915
917
  _checkTrigger(e) {
916
918
  let t = /* @__PURE__ */ new Date(), n = !this._states.paused && t.getTime() >= e.getTime(), r = this._states.blocking && this.options.protect;
917
- n && !r ? (this._states.maxRuns !== void 0 && this._states.maxRuns--, this._trigger()) : n && r && nt(this.options.protect) && setTimeout(() => this.options.protect(this), 0), this.schedule();
919
+ n && !r ? (this._states.maxRuns !== void 0 && this._states.maxRuns--, this._trigger()) : n && r && it(this.options.protect) && setTimeout(() => this.options.protect(this), 0), this.schedule();
918
920
  }
919
921
  _next(e) {
920
922
  let t = !!(e || this._states.currentRun), n = !1;
921
- !e && this.options.startAt && this.options.interval && ([e, t] = this._calculatePreviousRun(e, t), n = !e), e = new J(e, this.getTz()), this.options.startAt && e && e.getTime() < this.options.startAt.getTime() && (e = this.options.startAt);
922
- let r = this._states.once || new J(e, this.getTz());
923
+ !e && this.options.startAt && this.options.interval && ([e, t] = this._calculatePreviousRun(e, t), n = !e), e = new q(e, this.getTz()), this.options.startAt && e && e.getTime() < this.options.startAt.getTime() && (e = this.options.startAt);
924
+ let r = this._states.once || new q(e, this.getTz());
923
925
  return !n && r !== this._states.once && (r = r.increment(this._states.pattern, this.options, t)), this._states.once && this._states.once.getTime() <= e.getTime() || r === null || this._states.maxRuns !== void 0 && this._states.maxRuns <= 0 || this._states.kill || this.options.stopAt && r.getTime() >= this.options.stopAt.getTime() ? null : r;
924
926
  }
925
927
  _previous(e) {
926
- let t = new J(e, this.getTz());
928
+ let t = new q(e, this.getTz());
927
929
  this.options.stopAt && t.getTime() > this.options.stopAt.getTime() && (t = this.options.stopAt);
928
- let n = new J(t, this.getTz());
930
+ let n = new q(t, this.getTz());
929
931
  return this._states.once ? this._states.once.getTime() < t.getTime() ? this._states.once : null : (n = n.decrement(this._states.pattern, this.options), n === null || this.options.startAt && n.getTime() < this.options.startAt.getTime() ? null : n);
930
932
  }
931
933
  _calculatePreviousRun(e, t) {
932
- let n = new J(void 0, this.getTz()), r = e;
934
+ let n = new q(void 0, this.getTz()), r = e;
933
935
  if (this.options.startAt.getTime() <= n.getTime()) {
934
936
  r = this.options.startAt;
935
937
  let e = r.getTime() + this.options.interval * 1e3;
936
- for (; e <= n.getTime();) r = new J(r, this.getTz()).increment(this._states.pattern, this.options, !0), e = r.getTime() + this.options.interval * 1e3;
938
+ for (; e <= n.getTime();) r = new q(r, this.getTz()).increment(this._states.pattern, this.options, !0), e = r.getTime() + this.options.interval * 1e3;
937
939
  t = !0;
938
940
  }
939
941
  return r === null && (r = void 0), [r, t];
940
942
  }
941
- }, ct = ["aria-busy"], lt = { class: "pk-chat-task-dialog__when" }, Y = {
943
+ }, ut = ["aria-busy"], dt = { class: "pk-chat-task-dialog__when" }, ft = {
942
944
  key: 2,
943
945
  class: "pk-chat-task-dialog__next"
944
- }, ut = { class: "pk-chat-task-dialog__footer" }, dt = 2592e7, ft = /* @__PURE__ */ L({
946
+ }, pt = { class: "pk-chat-task-dialog__footer" }, mt = 2592e7, ht = /* @__PURE__ */ L({
945
947
  __name: "PkChatTaskDialog",
946
- props: /*@__PURE__*/ he({
948
+ props: /*@__PURE__*/ ge({
947
949
  task: {},
948
950
  load: { type: Function },
949
951
  save: { type: Function }
@@ -954,13 +956,13 @@ var at = 3e4, ot = [], st = class {
954
956
  },
955
957
  modelModifiers: {}
956
958
  }),
957
- emits: /*@__PURE__*/ he([
959
+ emits: /*@__PURE__*/ ge([
958
960
  "saved",
959
961
  "changed",
960
962
  "delete"
961
963
  ], ["update:modelValue"]),
962
964
  setup(i, { emit: a }) {
963
- let o = i, c = Ee(i, "modelValue"), l = a, { t: u, locale: d } = Oe({ useScope: "global" }), { otherTimezone: f, timezoneName: p, scheduleOf: m } = ee(), h = B(), g = B(!1), _ = B(!1), v = B(), y = B(), b = B(!1), x = B(""), S = B(""), C = B("daily"), w = B("09:00"), T = B(""), E = B([]), te = B(1), ne = k(() => h.value?.timezone ?? "Europe/Rome"), re = (e) => {
965
+ let o = i, c = Oe(i, "modelValue"), l = a, { t: u, locale: d } = Ae({ useScope: "global" }), { otherTimezone: f, timezoneName: p, scheduleOf: m } = ee(), h = B(), g = B(!1), _ = B(!1), v = B(), y = B(), b = B(!1), x = B(""), S = B(""), C = B("daily"), w = B("09:00"), T = B(""), te = B([]), E = B(1), ne = k(() => h.value?.timezone ?? "Europe/Rome"), re = (e) => {
964
966
  let t = Object.fromEntries(new Intl.DateTimeFormat("en-CA", {
965
967
  timeZone: ne.value,
966
968
  hourCycle: "h23",
@@ -975,14 +977,14 @@ var at = 3e4, ot = [], st = class {
975
977
  time: `${t.hour}:${t.minute}`
976
978
  };
977
979
  };
978
- function de(e) {
980
+ function ie(e) {
979
981
  h.value = e, x.value = e.reason, S.value = e.prompt;
980
982
  let t = n(e.cron, e.recurring);
981
- C.value = t.kind === "hourly" ? "custom" : t.kind, E.value = t.kind === "weekly" ? t.weekdays : [], te.value = t.kind === "monthly" ? t.day : 1;
983
+ C.value = t.kind === "hourly" ? "custom" : t.kind, te.value = t.kind === "weekly" ? t.weekdays : [], E.value = t.kind === "monthly" ? t.day : 1;
982
984
  let r = e.nextRunAt ? re(new Date(e.nextRunAt)) : re(new Date(Date.now() + 864e5));
983
985
  w.value = "time" in t ? t.time : r.time, T.value = r.date;
984
986
  }
985
- W(c, async (e) => {
987
+ U(c, async (e) => {
986
988
  if (e) {
987
989
  h.value = void 0, v.value = void 0, y.value = void 0, b.value = !1, g.value = !0;
988
990
  try {
@@ -991,7 +993,7 @@ var at = 3e4, ot = [], st = class {
991
993
  c.value = !1, l("changed");
992
994
  return;
993
995
  }
994
- de(e);
996
+ ie(e);
995
997
  } catch {
996
998
  v.value = u("message.errorRetry");
997
999
  } finally {
@@ -1022,7 +1024,7 @@ var at = 3e4, ot = [], st = class {
1022
1024
  weekday: "short",
1023
1025
  timeZone: "UTC"
1024
1026
  }).format(new Date(Date.UTC(2023, 0, 1 + e)))
1025
- }))), I = k(() => {
1027
+ }))), me = k(() => {
1026
1028
  switch (C.value) {
1027
1029
  case "once": return {
1028
1030
  kind: "once",
@@ -1037,21 +1039,21 @@ var at = 3e4, ot = [], st = class {
1037
1039
  case "weekly": return {
1038
1040
  kind: "weekly",
1039
1041
  time: w.value,
1040
- weekdays: E.value
1042
+ weekdays: te.value
1041
1043
  };
1042
1044
  case "monthly": return {
1043
1045
  kind: "monthly",
1044
1046
  time: w.value,
1045
- day: te.value
1047
+ day: E.value
1046
1048
  };
1047
1049
  default: return;
1048
1050
  }
1049
- }), L = k(() => {
1050
- let t = I.value;
1051
+ }), I = k(() => {
1052
+ let t = me.value;
1051
1053
  if (!t || !/^\d{2}:\d{2}$/.test(t.time) || t.kind === "weekly" && t.weekdays.length === 0 || t.kind === "once" && !t.date) return;
1052
1054
  let n;
1053
1055
  try {
1054
- return n = new st(e(t).cron, {
1056
+ return n = new lt(e(t).cron, {
1055
1057
  timezone: ne.value,
1056
1058
  mode: "5-part",
1057
1059
  paused: !0
@@ -1061,34 +1063,34 @@ var at = 3e4, ot = [], st = class {
1061
1063
  } finally {
1062
1064
  n?.stop();
1063
1065
  }
1064
- }), R = k(() => {
1066
+ }), L = k(() => {
1065
1067
  if (C.value !== "once" || !T.value) return;
1066
- let e = L.value;
1067
- return e && re(e).date === T.value ? e.getTime() - Date.now() > dt ? r.TooFar : void 0 : T.value <= re(/* @__PURE__ */ new Date()).date ? r.Past : r.TooFar;
1068
- }), me = k(() => {
1069
- let e = R.value ?? (y.value === r.Past || y.value === r.TooFar ? y.value : void 0);
1068
+ let e = I.value;
1069
+ return e && re(e).date === T.value ? e.getTime() - Date.now() > mt ? r.TooFar : void 0 : T.value <= re(/* @__PURE__ */ new Date()).date ? r.Past : r.TooFar;
1070
+ }), R = k(() => {
1071
+ let e = L.value ?? (y.value === r.Past || y.value === r.TooFar ? y.value : void 0);
1070
1072
  return e ? u(`scheduledTask.dialog.refusal.${e}`) : void 0;
1071
1073
  }), he = k(() => {
1072
- if (!(!L.value || R.value || h.value?.status === t.Paused && C.value !== "once")) return u("scheduledTask.dialog.nextRun", { when: new Intl.DateTimeFormat(d.value, {
1074
+ if (!(!I.value || L.value || h.value?.status === t.Paused && C.value !== "once")) return u("scheduledTask.dialog.nextRun", { when: new Intl.DateTimeFormat(d.value, {
1073
1075
  weekday: "long",
1074
1076
  day: "numeric",
1075
1077
  month: "long",
1076
1078
  hour: "numeric",
1077
1079
  minute: "2-digit",
1078
1080
  timeZone: ne.value
1079
- }).format(L.value) });
1081
+ }).format(I.value) });
1080
1082
  }), ge = k(() => {
1081
1083
  let e = h.value && f(h.value);
1082
1084
  return e ? u("scheduledTask.dialog.timezone", { timezone: p(e) }) : void 0;
1083
1085
  });
1084
1086
  async function _e() {
1085
- if (v.value = void 0, y.value = void 0, b.value = !0, !(!x.value.trim() || !S.value.trim() || C.value === "weekly" && E.value.length === 0 || R.value)) {
1087
+ if (v.value = void 0, y.value = void 0, b.value = !0, !(!x.value.trim() || !S.value.trim() || C.value === "weekly" && te.value.length === 0 || L.value)) {
1086
1088
  _.value = !0;
1087
1089
  try {
1088
1090
  let e = await o.save({
1089
1091
  reason: x.value.trim(),
1090
1092
  prompt: S.value.trim(),
1091
- ...I.value && { schedule: I.value }
1093
+ ...me.value && { schedule: me.value }
1092
1094
  });
1093
1095
  e === "saved" ? (c.value = !1, l("saved")) : e === "changed" ? (c.value = !1, l("changed")) : e === "too-many-tasks" ? v.value = u("profileSection.tasks.tooMany") : e.refusal === r.Past || e.refusal === r.TooFar ? y.value = e.refusal : v.value = u(`scheduledTask.dialog.refusal.${e.refusal}`);
1094
1096
  } catch {
@@ -1099,26 +1101,26 @@ var at = 3e4, ot = [], st = class {
1099
1101
  }
1100
1102
  }
1101
1103
  return (e, t) => {
1102
- let n = ie, r = le, i = ue, a = D, o = oe, d = ce, f = s, p = ae, y = se;
1104
+ let n = ae, r = ue, i = de, a = D, o = se, d = le, f = s, p = oe, y = ce;
1103
1105
  return z(), A(y, {
1104
1106
  modelValue: c.value,
1105
1107
  "onUpdate:modelValue": t[9] ||= (e) => c.value = e,
1106
- title: U(u)("scheduledTask.dialog.title"),
1108
+ title: H(u)("scheduledTask.dialog.title"),
1107
1109
  "keep-open": ""
1108
1110
  }, {
1109
- footer: G(() => [N("div", ut, [F(f, {
1111
+ footer: W(() => [N("div", pt, [F(f, {
1110
1112
  modifiers: "secondary-danger",
1111
1113
  icon: "ri:delete-bin-line",
1112
- label: U(u)("action.delete"),
1114
+ label: H(u)("action.delete"),
1113
1115
  disabled: g.value || _.value || !h.value,
1114
1116
  onClick: t[7] ||= (e) => l("delete")
1115
1117
  }, null, 8, ["label", "disabled"]), F(p, null, {
1116
- default: G(() => [F(f, {
1118
+ default: W(() => [F(f, {
1117
1119
  modifiers: "secondary",
1118
- label: U(u)("action.cancel"),
1120
+ label: H(u)("action.cancel"),
1119
1121
  onClick: t[8] ||= (e) => c.value = !1
1120
1122
  }, null, 8, ["label"]), F(f, {
1121
- label: U(u)("action.save"),
1123
+ label: H(u)("action.save"),
1122
1124
  loading: _.value,
1123
1125
  disabled: g.value || _.value || !h.value,
1124
1126
  onClick: _e
@@ -1129,7 +1131,7 @@ var at = 3e4, ot = [], st = class {
1129
1131
  ])]),
1130
1132
  _: 1
1131
1133
  })])]),
1132
- default: G(() => [N("div", {
1134
+ default: W(() => [N("div", {
1133
1135
  class: "pk-chat-task-dialog",
1134
1136
  "aria-busy": g.value
1135
1137
  }, [v.value ? (z(), A(n, {
@@ -1145,10 +1147,10 @@ var at = 3e4, ot = [], st = class {
1145
1147
  modelValue: x.value,
1146
1148
  "onUpdate:modelValue": t[0] ||= (e) => x.value = e,
1147
1149
  name: "task-name",
1148
- label: U(u)("scheduledTask.dialog.name"),
1150
+ label: H(u)("scheduledTask.dialog.name"),
1149
1151
  maxlength: 200,
1150
1152
  invalid: b.value && !x.value.trim(),
1151
- "invalid-label": U(u)("scheduledTask.dialog.required"),
1153
+ "invalid-label": H(u)("scheduledTask.dialog.required"),
1152
1154
  autofocus: ""
1153
1155
  }, null, 8, [
1154
1156
  "modelValue",
@@ -1160,13 +1162,13 @@ var at = 3e4, ot = [], st = class {
1160
1162
  modelValue: S.value,
1161
1163
  "onUpdate:modelValue": t[1] ||= (e) => S.value = e,
1162
1164
  name: "task-prompt",
1163
- label: U(u)("scheduledTask.dialog.prompt"),
1164
- "hint-label": U(u)("scheduledTask.dialog.promptHint"),
1165
+ label: H(u)("scheduledTask.dialog.prompt"),
1166
+ "hint-label": H(u)("scheduledTask.dialog.promptHint"),
1165
1167
  maxlength: 2e3,
1166
1168
  count: "limit",
1167
1169
  rows: 4,
1168
1170
  invalid: b.value && !S.value.trim(),
1169
- "invalid-label": U(u)("scheduledTask.dialog.required")
1171
+ "invalid-label": H(u)("scheduledTask.dialog.required")
1170
1172
  }, null, 8, [
1171
1173
  "modelValue",
1172
1174
  "label",
@@ -1178,12 +1180,12 @@ var at = 3e4, ot = [], st = class {
1178
1180
  key: 0,
1179
1181
  "model-value": "custom",
1180
1182
  name: "task-when",
1181
- label: U(u)("scheduledTask.dialog.when"),
1183
+ label: H(u)("scheduledTask.dialog.when"),
1182
1184
  options: [{
1183
1185
  value: "custom",
1184
- label: h.value ? U(m)(h.value) : U(u)("profileSection.tasks.schedule.custom")
1186
+ label: h.value ? H(m)(h.value) : H(u)("profileSection.tasks.schedule.custom")
1185
1187
  }],
1186
- "hint-label": U(u)("scheduledTask.dialog.customHint"),
1188
+ "hint-label": H(u)("scheduledTask.dialog.customHint"),
1187
1189
  modifiers: "readonly",
1188
1190
  tabindex: "-1",
1189
1191
  disabled: ""
@@ -1192,11 +1194,11 @@ var at = 3e4, ot = [], st = class {
1192
1194
  "options",
1193
1195
  "hint-label"
1194
1196
  ])) : (z(), M(O, { key: 1 }, [
1195
- N("div", lt, [F(a, {
1197
+ N("div", dt, [F(a, {
1196
1198
  modelValue: C.value,
1197
1199
  "onUpdate:modelValue": t[2] ||= (e) => C.value = e,
1198
1200
  name: "task-when",
1199
- label: U(u)("scheduledTask.dialog.when"),
1201
+ label: H(u)("scheduledTask.dialog.when"),
1200
1202
  options: fe.value
1201
1203
  }, null, 8, [
1202
1204
  "modelValue",
@@ -1208,7 +1210,7 @@ var at = 3e4, ot = [], st = class {
1208
1210
  type: "time",
1209
1211
  step: 60,
1210
1212
  name: "task-time",
1211
- label: U(u)("scheduledTask.dialog.at"),
1213
+ label: H(u)("scheduledTask.dialog.at"),
1212
1214
  "hint-label": ge.value
1213
1215
  }, null, 8, [
1214
1216
  "modelValue",
@@ -1221,9 +1223,9 @@ var at = 3e4, ot = [], st = class {
1221
1223
  "onUpdate:modelValue": t[4] ||= (e) => T.value = e,
1222
1224
  type: "date",
1223
1225
  name: "task-date",
1224
- label: U(u)("scheduledTask.dialog.date"),
1225
- invalid: !!me.value,
1226
- "invalid-label": me.value
1226
+ label: H(u)("scheduledTask.dialog.date"),
1227
+ invalid: !!R.value,
1228
+ "invalid-label": R.value
1227
1229
  }, null, 8, [
1228
1230
  "modelValue",
1229
1231
  "label",
@@ -1232,14 +1234,14 @@ var at = 3e4, ot = [], st = class {
1232
1234
  ])) : j("", !0),
1233
1235
  C.value === "weekly" ? (z(), A(o, {
1234
1236
  key: 1,
1235
- modelValue: E.value,
1236
- "onUpdate:modelValue": t[5] ||= (e) => E.value = e,
1237
+ modelValue: te.value,
1238
+ "onUpdate:modelValue": t[5] ||= (e) => te.value = e,
1237
1239
  name: "task-days",
1238
- label: U(u)("scheduledTask.dialog.days"),
1240
+ label: H(u)("scheduledTask.dialog.days"),
1239
1241
  options: pe.value,
1240
1242
  modifiers: "segmented",
1241
- invalid: b.value && E.value.length === 0,
1242
- "invalid-label": U(u)("scheduledTask.dialog.noDays")
1243
+ invalid: b.value && te.value.length === 0,
1244
+ "invalid-label": H(u)("scheduledTask.dialog.noDays")
1243
1245
  }, null, 8, [
1244
1246
  "modelValue",
1245
1247
  "label",
@@ -1249,35 +1251,35 @@ var at = 3e4, ot = [], st = class {
1249
1251
  ])) : j("", !0),
1250
1252
  C.value === "monthly" ? (z(), A(r, {
1251
1253
  key: 2,
1252
- modelValue: te.value,
1253
- "onUpdate:modelValue": t[6] ||= (e) => te.value = e,
1254
+ modelValue: E.value,
1255
+ "onUpdate:modelValue": t[6] ||= (e) => E.value = e,
1254
1256
  modelModifiers: { number: !0 },
1255
1257
  type: "number",
1256
1258
  name: "task-day",
1257
1259
  min: 1,
1258
1260
  max: 31,
1259
- label: U(u)("scheduledTask.dialog.dayOfMonth")
1261
+ label: H(u)("scheduledTask.dialog.dayOfMonth")
1260
1262
  }, null, 8, ["modelValue", "label"])) : j("", !0)
1261
1263
  ], 64)),
1262
- he.value ? (z(), M("p", Y, [F(d, {
1264
+ he.value ? (z(), M("p", ft, [F(d, {
1263
1265
  name: "ri:time-line",
1264
1266
  class: "shrink-0 w-16 h-16"
1265
- }), P(" " + H(he.value), 1)])) : j("", !0)
1266
- ], 64)) : j("", !0)], 8, ct)]),
1267
+ }), P(" " + Ee(he.value), 1)])) : j("", !0)
1268
+ ], 64)) : j("", !0)], 8, ut)]),
1267
1269
  _: 1
1268
1270
  }, 8, ["modelValue", "title"]);
1269
1271
  };
1270
1272
  }
1271
1273
  });
1272
1274
  // ../../packages/components/src/chat/chatTaskOutcome.ts
1273
- function pt(e, t) {
1275
+ function gt(e, t) {
1274
1276
  if (e === 404) return "changed";
1275
1277
  if (e === 409) return "too-many-tasks";
1276
1278
  if (e === 422 && typeof t == "string") return { refusal: t };
1277
1279
  }
1278
1280
  // ../../packages/components/src/chat/useChatTaskActions.ts
1279
- function mt(e) {
1280
- let { t } = Oe({ useScope: "global" }), n = ze(e), { openDialogConfirm: r } = x(), i = B(), o = (e) => e instanceof a ? e.status : void 0;
1281
+ function _t(e) {
1282
+ let { t } = Ae({ useScope: "global" }), n = Ve(e), { openDialogConfirm: r } = g(), i = B(), o = (e) => e instanceof a ? e.status : void 0;
1281
1283
  function s(e, r) {
1282
1284
  let i = o(e);
1283
1285
  i === 404 ? (n.notice = t("profileSection.tasks.changed"), n.load()) : n.notice = t(i === 409 ? r === "run" ? "scheduledTask.busy" : "profileSection.tasks.tooMany" : "message.errorRetry");
@@ -1338,7 +1340,7 @@ function mt(e) {
1338
1340
  try {
1339
1341
  return await n.update(e, t), "saved";
1340
1342
  } catch (e) {
1341
- let t = pt(o(e), e instanceof a ? e.data?.refusal : void 0);
1343
+ let t = gt(o(e), e instanceof a ? e.data?.refusal : void 0);
1342
1344
  if (t === "changed" && n.load(), t) return t;
1343
1345
  throw e;
1344
1346
  }
@@ -1353,7 +1355,7 @@ function mt(e) {
1353
1355
  };
1354
1356
  }
1355
1357
  // ../../packages/components/src/chat/PkVoiceOrb.vue?vue&type=script&setup=true&lang.ts
1356
- var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1358
+ var vt = .18, J = .35, yt = /* @__PURE__ */ L({
1357
1359
  __name: "PkVoiceOrb",
1358
1360
  props: {
1359
1361
  sample: {},
@@ -1365,20 +1367,20 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1365
1367
  bars: { default: 5 }
1366
1368
  },
1367
1369
  setup(e) {
1368
- let t = e, n = De("barsEl"), r = Array.from({ length: t.bars }, () => ht), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
1370
+ let t = e, n = ke("barsEl"), r = Array.from({ length: t.bars }, () => vt), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
1369
1371
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
1370
1372
  if (!n?.length) {
1371
1373
  let t = Date.now() / 260;
1372
1374
  return Array.from({ length: i }, (n, r) => {
1373
1375
  let i = .65 + .35 * Math.sin(t + r * .9);
1374
- return ht + e * 2.4 * i;
1376
+ return vt + e * 2.4 * i;
1375
1377
  });
1376
1378
  }
1377
1379
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
1378
1380
  return Array.from({ length: i }, (e, t) => {
1379
1381
  let r = 0;
1380
1382
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
1381
- return ht + r / o / 255 * 2.2;
1383
+ return vt + r / o / 255 * 2.2;
1382
1384
  });
1383
1385
  }, s = () => {
1384
1386
  let e = n.value?.children;
@@ -1387,14 +1389,14 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1387
1389
  });
1388
1390
  }, c = () => {
1389
1391
  let e = o();
1390
- r = r.map((t, n) => t + (Math.min(1, Math.max(ht, e[n] ?? ht)) - t) * gt), s(), i = requestAnimationFrame(c);
1392
+ r = r.map((t, n) => t + (Math.min(1, Math.max(vt, e[n] ?? vt)) - t) * J), s(), i = requestAnimationFrame(c);
1391
1393
  }, l = () => {
1392
1394
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
1393
1395
  };
1394
- return W(() => t.state, async (e) => {
1395
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => ht * 1.6), await ge(), s()) : i === void 0 && (i = requestAnimationFrame(c));
1396
- }, { immediate: !0 }), ye(l), (t, r) => (z(), M("div", {
1397
- class: _e(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
1396
+ return U(() => t.state, async (e) => {
1397
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => vt * 1.6), await _e(), s()) : i === void 0 && (i = requestAnimationFrame(c));
1398
+ }, { immediate: !0 }), be(l), (t, r) => (z(), M("div", {
1399
+ class: ve(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
1398
1400
  "aria-hidden": "true"
1399
1401
  }, [N("div", {
1400
1402
  ref_key: "barsEl",
@@ -1405,18 +1407,18 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1405
1407
  class: "pk-voice-orb__bar"
1406
1408
  }))), 128))], 512)], 2));
1407
1409
  }
1408
- }), vt = {
1410
+ }), bt = {
1409
1411
  key: 0,
1410
1412
  class: "pk-voice-session__badge",
1411
1413
  "aria-hidden": "true"
1412
- }, yt = {
1414
+ }, xt = {
1413
1415
  class: "pk-voice-session__status",
1414
1416
  role: "status"
1415
- }, bt = {
1417
+ }, St = {
1416
1418
  key: 0,
1417
1419
  class: "pk-voice-session__live-dot",
1418
1420
  "aria-hidden": "true"
1419
- }, xt = ["title"], St = ["title"], Ct = { class: "pk-voice-session__actions" }, wt = /* @__PURE__ */ L({
1421
+ }, Ct = ["title"], wt = ["title"], Tt = { class: "pk-voice-session__actions" }, Et = /* @__PURE__ */ L({
1420
1422
  __name: "PkVoiceSession",
1421
1423
  props: {
1422
1424
  state: {},
@@ -1435,7 +1437,7 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1435
1437
  "dismiss"
1436
1438
  ],
1437
1439
  setup(e, { emit: t }) {
1438
- let n = e, r = t, { t: i } = Oe({ useScope: "global" }), a = k(() => 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 = k(() => {
1440
+ let n = e, r = t, { t: i } = Ae({ useScope: "global" }), a = k(() => 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 = k(() => {
1439
1441
  if (n.remainingSeconds === void 0) return;
1440
1442
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
1441
1443
  return `${e}:${String(t).padStart(2, "0")}`;
@@ -1443,9 +1445,9 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1443
1445
  if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
1444
1446
  });
1445
1447
  return (t, n) => {
1446
- let u = ce;
1447
- return z(), M("div", { class: _e(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
1448
- e.error ? (z(), M("span", vt, [F(u, { name: "ri:error-warning-line" })])) : (z(), A(_t, {
1448
+ let u = le;
1449
+ return z(), M("div", { class: ve(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
1450
+ e.error ? (z(), M("span", bt, [F(u, { name: "ri:error-warning-line" })])) : (z(), A(yt, {
1449
1451
  key: 1,
1450
1452
  state: e.state,
1451
1453
  sample: e.sample,
@@ -1455,37 +1457,37 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1455
1457
  "sample",
1456
1458
  "spectrum"
1457
1459
  ])),
1458
- N("div", yt, [N("span", { class: _e(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (z(), M("span", bt)) : j("", !0), P(" " + H(a.value), 1)], 2), e.error ? (z(), M("p", {
1460
+ N("div", xt, [N("span", { class: ve(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (z(), M("span", St)) : j("", !0), P(" " + Ee(a.value), 1)], 2), e.error ? (z(), M("p", {
1459
1461
  key: 0,
1460
1462
  class: "pk-voice-session__detail",
1461
1463
  title: e.rawError ?? e.error
1462
- }, H(e.error), 9, xt)) : j("", !0)]),
1464
+ }, Ee(e.error), 9, Ct)) : j("", !0)]),
1463
1465
  o.value ? (z(), M("span", {
1464
1466
  key: 2,
1465
- class: _e(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
1466
- title: U(i)("hint.voiceRemaining"),
1467
+ class: ve(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
1468
+ title: H(i)("hint.voiceRemaining"),
1467
1469
  "aria-hidden": "true"
1468
- }, H(o.value), 11, St)) : j("", !0),
1469
- N("div", Ct, [e.error ? (z(), M(O, { key: 0 }, [F(C, {
1470
+ }, Ee(o.value), 11, wt)) : j("", !0),
1471
+ N("div", Tt, [e.error ? (z(), M(O, { key: 0 }, [F(E, {
1470
1472
  icon: "ri:refresh-line",
1471
- label: U(i)("action.retry"),
1473
+ label: H(i)("action.retry"),
1472
1474
  onClick: n[0] ||= (e) => r("retry")
1473
- }, null, 8, ["label"]), e.live ? (z(), A(C, {
1475
+ }, null, 8, ["label"]), e.live ? (z(), A(E, {
1474
1476
  key: 0,
1475
1477
  icon: "ri:stop-circle-line",
1476
1478
  modifiers: "danger",
1477
- title: U(i)("action.hangUp"),
1478
- "aria-label": U(i)("action.hangUp"),
1479
+ title: H(i)("action.hangUp"),
1480
+ "aria-label": H(i)("action.hangUp"),
1479
1481
  onClick: n[1] ||= (e) => r("hang-up")
1480
- }, null, 8, ["title", "aria-label"])) : (z(), A(C, {
1482
+ }, null, 8, ["title", "aria-label"])) : (z(), A(E, {
1481
1483
  key: 1,
1482
1484
  icon: "ri:close-line",
1483
- label: U(i)("action.close"),
1485
+ label: H(i)("action.close"),
1484
1486
  onClick: n[2] ||= (e) => r("dismiss")
1485
- }, null, 8, ["label"]))], 64)) : (z(), M(O, { key: 1 }, [F(C, {
1487
+ }, null, 8, ["label"]))], 64)) : (z(), M(O, { key: 1 }, [F(E, {
1486
1488
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
1487
- title: e.muted ? U(i)("action.unmute") : U(i)("action.mute"),
1488
- "aria-label": e.muted ? U(i)("action.unmute") : U(i)("action.mute"),
1489
+ title: e.muted ? H(i)("action.unmute") : H(i)("action.mute"),
1490
+ "aria-label": e.muted ? H(i)("action.unmute") : H(i)("action.mute"),
1489
1491
  "aria-pressed": e.muted,
1490
1492
  onClick: n[3] ||= (e) => r("toggle-mute")
1491
1493
  }, null, 8, [
@@ -1493,18 +1495,18 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1493
1495
  "title",
1494
1496
  "aria-label",
1495
1497
  "aria-pressed"
1496
- ]), F(C, {
1498
+ ]), F(E, {
1497
1499
  icon: "ri:stop-circle-line",
1498
1500
  modifiers: "danger",
1499
- title: U(i)("action.hangUp"),
1500
- "aria-label": U(i)("action.hangUp"),
1501
+ title: H(i)("action.hangUp"),
1502
+ "aria-label": H(i)("action.hangUp"),
1501
1503
  onClick: n[4] ||= (e) => r("hang-up")
1502
1504
  }, null, 8, ["title", "aria-label"])], 64))])
1503
1505
  ], 2);
1504
1506
  };
1505
1507
  }
1506
- }), Tt = (e) => {
1507
- let t = we(), n = B("disconnected"), r = B("listening"), i = B(), a = B([]), o = B(), s = B(), c, l, u = 0, d = !1, p = () => {
1508
+ }), Dt = (e) => {
1509
+ let t = Te(), n = B("disconnected"), r = B("listening"), i = B(), a = B([]), o = B(), s = B(), c, l, u = 0, d = !1, p = () => {
1508
1510
  l &&= (clearInterval(l), void 0), o.value = void 0;
1509
1511
  }, m = (e) => {
1510
1512
  let t = Date.now() + e * 1e3, n = () => {
@@ -1607,7 +1609,7 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1607
1609
  let r = t.value;
1608
1610
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
1609
1611
  };
1610
- return typeof window < "u" && window.addEventListener("pagehide", C), xe(() => {
1612
+ return typeof window < "u" && window.addEventListener("pagehide", C), Se(() => {
1611
1613
  d = !0, typeof window < "u" && window.removeEventListener("pagehide", C), g();
1612
1614
  }), {
1613
1615
  status: n,
@@ -1628,33 +1630,33 @@ var ht = .18, gt = .35, _t = /* @__PURE__ */ L({
1628
1630
  readLevel: x,
1629
1631
  readSpectrum: S
1630
1632
  };
1631
- }, Et = Symbol("ChatFilePreviewDock");
1632
- function Dt(e) {
1633
- Ce(Et, e);
1633
+ }, Ot = Symbol("ChatFilePreviewDock");
1634
+ function kt(e) {
1635
+ we(Ot, e);
1634
1636
  }
1635
- function Ot() {
1636
- return R(Et, void 0);
1637
+ function At() {
1638
+ return R(Ot, void 0);
1637
1639
  }
1638
1640
  // ../../packages/components/src/chat/useWakeupWatch.ts
1639
- var kt = 4e3, At = [
1641
+ var jt = 4e3, Mt = [
1640
1642
  3e3,
1641
1643
  5e3,
1642
1644
  1e4
1643
- ], jt = 12e4, Mt = 6e4, Nt = 216e5, Pt = 3e4;
1644
- function Ft(e) {
1645
+ ], Nt = 12e4, Pt = 6e4, Ft = 216e5, It = 3e4;
1646
+ function Lt(e) {
1645
1647
  let t = B(null), n = B([]), r = B(!1), i, a = !1, o = () => {
1646
1648
  clearTimeout(i), i = void 0;
1647
1649
  }, s = (e, t) => {
1648
1650
  o(), a || (i = setTimeout(() => void t(), e));
1649
1651
  }, c = (t) => {
1650
- let n = Date.parse(t.dueAt) - Mt;
1652
+ let n = Date.parse(t.dueAt) - Pt;
1651
1653
  return e.messages().some((e) => {
1652
1654
  let r = e.metadata?.wakeup;
1653
1655
  return r?.id === t.wakeId || t.kind === "task" && r?.taskId === t.taskId && (e.metadata?.createdAt ?? 0) >= n;
1654
1656
  });
1655
1657
  }, l = (e) => {
1656
- let t = Date.parse(e.dueAt) - Date.now() + kt;
1657
- t > Nt ? s(Nt, u) : s(Math.max(kt, t), () => f(e, Date.now(), 0));
1658
+ let t = Date.parse(e.dueAt) - Date.now() + jt;
1659
+ t > Ft ? s(Ft, u) : s(Math.max(jt, t), () => f(e, Date.now(), 0));
1658
1660
  };
1659
1661
  async function u() {
1660
1662
  o();
@@ -1671,7 +1673,7 @@ function Ft(e) {
1671
1673
  o(), t.value = e.pendingWakeup, n.value = e.tasks ?? [], e.pendingWakeup && l(e.pendingWakeup);
1672
1674
  }
1673
1675
  async function f(t, n, r) {
1674
- await e.refreshMessages(), a || (c(t) || Date.now() - n >= jt ? await u() : s(At[Math.min(r, At.length - 1)], () => f(t, n, r + 1)));
1676
+ await e.refreshMessages(), a || (c(t) || Date.now() - n >= Nt ? await u() : s(Mt[Math.min(r, Mt.length - 1)], () => f(t, n, r + 1)));
1675
1677
  }
1676
1678
  async function p() {
1677
1679
  r.value = !0;
@@ -1695,11 +1697,11 @@ function Ft(e) {
1695
1697
  h = void 0;
1696
1698
  }
1697
1699
  let y = k(() => e.messages().some((e) => e.role === "user"));
1698
- W([e.chatId, y], ([, t]) => {
1700
+ U([e.chatId, y], ([, t]) => {
1699
1701
  m();
1700
1702
  let n = e.status(), r = n === "submitted" || n === "streaming" || h === e.chatId();
1701
1703
  t && !r && u();
1702
- }, { immediate: !0 }), W(e.status, (e, t) => {
1704
+ }, { immediate: !0 }), U(e.status, (e, t) => {
1703
1705
  e === "ready" && t !== "ready" && y.value && u();
1704
1706
  });
1705
1707
  let b;
@@ -1707,9 +1709,9 @@ function Ft(e) {
1707
1709
  t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
1708
1710
  }
1709
1711
  let S = () => x();
1710
- return document.addEventListener("visibilitychange", S), W(() => t.value?.wakeId, (e) => {
1711
- clearInterval(b), b = void 0, e && !a && (x(), b = setInterval(x, Pt));
1712
- }), ye(() => {
1712
+ return document.addEventListener("visibilitychange", S), U(() => t.value?.wakeId, (e) => {
1713
+ clearInterval(b), b = void 0, e && !a && (x(), b = setInterval(x, It));
1714
+ }), be(() => {
1713
1715
  a = !0, o(), clearInterval(b), document.removeEventListener("visibilitychange", S);
1714
1716
  }), {
1715
1717
  pendingWakeup: t,
@@ -1725,7 +1727,7 @@ function Ft(e) {
1725
1727
  };
1726
1728
  }
1727
1729
  // ../../packages/components/src/chat/previewChanges.ts
1728
- var It = 1e6, Lt = (e, t) => {
1730
+ var Rt = 1e6, zt = (e, t) => {
1729
1731
  let n = 0;
1730
1732
  for (; n < e.length && n < t.length && e[n] === t[n];) n += 1;
1731
1733
  let r = 0;
@@ -1737,29 +1739,29 @@ var It = 1e6, Lt = (e, t) => {
1737
1739
  }
1738
1740
  };
1739
1741
  if (!a) return o;
1740
- if (!i || i * a > It) return s(n, n + i, n, n + a), o;
1742
+ if (!i || i * a > Rt) return s(n, n + i, n, n + a), o;
1741
1743
  let c = new Uint32Array((i + 1) * (a + 1));
1742
1744
  for (let r = i - 1; r >= 0; r--) for (let i = a - 1; i >= 0; i--) c[r * (a + 1) + i] = e[n + r] === t[n + i] ? c[(r + 1) * (a + 1) + i + 1] + 1 : Math.max(c[(r + 1) * (a + 1) + i], c[r * (a + 1) + i + 1]);
1743
1745
  let l = 0, u = 0, d = 0, f = 0;
1744
1746
  for (; l < i && u < a;) e[n + l] === t[n + u] ? (s(n + d, n + l, n + f, n + u), l += 1, u += 1, d = l, f = u) : c[(l + 1) * (a + 1) + u] >= c[l * (a + 1) + u + 1] ? l += 1 : u += 1;
1745
1747
  return s(n + d, n + i, n + f, n + a), o;
1746
- }, Rt = (e, t) => e === "id" || e === "ids" ? void 0 : t, zt = (e) => JSON.stringify(e, Rt), Bt = (e, t) => {
1748
+ }, Bt = (e, t) => e === "id" || e === "ids" ? void 0 : t, Y = (e) => JSON.stringify(e, Bt), Vt = (e, t) => {
1747
1749
  let n = (e) => e.flatMap((e) => e.ids ?? []);
1748
- return t?.kind === "table" ? [...Lt(t.rows.map(zt), e.rows.map(zt))].flatMap(([r, i]) => {
1750
+ return t?.kind === "table" ? [...zt(t.rows.map(Y), e.rows.map(Y))].flatMap(([r, i]) => {
1749
1751
  let a = i === void 0 ? void 0 : t.rows[i];
1750
- return n(e.rows[r].filter((e, t) => !a?.[t] || zt(a[t]) !== zt(e)));
1752
+ return n(e.rows[r].filter((e, t) => !a?.[t] || Y(a[t]) !== Y(e)));
1751
1753
  }) : n(e.rows.flat());
1752
- }, Vt = (e, t) => {
1753
- let n = /* @__PURE__ */ new Set(), r = Lt(e.blocks.map(zt), t.blocks.map(zt));
1754
+ }, Ht = (e, t) => {
1755
+ let n = /* @__PURE__ */ new Set(), r = zt(e.blocks.map(Y), t.blocks.map(Y));
1754
1756
  for (let [i, a] of r) {
1755
1757
  let r = t.blocks[i];
1756
1758
  if (r.kind === "table") {
1757
1759
  let t = a === void 0 ? void 0 : e.blocks[a];
1758
- for (let e of Bt(r, t)) n.add(e);
1760
+ for (let e of Vt(r, t)) n.add(e);
1759
1761
  } else r.id && n.add(r.id);
1760
1762
  }
1761
1763
  return n;
1762
- }, X = (e, t) => {
1764
+ }, Ut = (e, t) => {
1763
1765
  let n = /* @__PURE__ */ new Map();
1764
1766
  for (let r of t.rows) for (let t of r.cells) n.set(`${r.row}:${t.col}`, JSON.stringify({
1765
1767
  ...t,
@@ -1767,43 +1769,43 @@ var It = 1e6, Lt = (e, t) => {
1767
1769
  numFmt: t.numFmt === void 0 ? void 0 : e.numberFormats?.[t.numFmt]
1768
1770
  }));
1769
1771
  return n;
1770
- }, Ht = (e, t) => {
1772
+ }, Wt = (e, t) => {
1771
1773
  let n = /* @__PURE__ */ new Map();
1772
1774
  for (let r of t.sheets) {
1773
- let i = e.sheets.find((e) => e.name === r.name), a = X(t, r), o = i ? X(e, i) : /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
1775
+ let i = e.sheets.find((e) => e.name === r.name), a = Ut(t, r), o = i ? Ut(e, i) : /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
1774
1776
  for (let [e, t] of a) o.get(e) !== t && s.add(e);
1775
1777
  for (let e of o.keys()) a.has(e) || s.add(e);
1776
1778
  s.size && n.set(r.name, s);
1777
1779
  }
1778
1780
  return n;
1779
- }, Ut = (e, t) => {
1781
+ }, Gt = (e, t) => {
1780
1782
  if (e.kind === "word" && t.kind === "word") {
1781
- let n = Vt(e, t);
1783
+ let n = Ht(e, t);
1782
1784
  return n.size ? {
1783
1785
  kind: "word",
1784
1786
  paragraphs: n
1785
1787
  } : void 0;
1786
1788
  }
1787
1789
  if (e.kind === "spreadsheet" && t.kind === "spreadsheet") {
1788
- let n = Ht(e, t);
1790
+ let n = Wt(e, t);
1789
1791
  return n.size ? {
1790
1792
  kind: "spreadsheet",
1791
1793
  cells: n
1792
1794
  } : void 0;
1793
1795
  }
1794
- }, Wt = (e, t) => {
1796
+ }, Kt = (e, t) => {
1795
1797
  let n = e?.querySelector(t);
1796
1798
  if (!e || !n) return !1;
1797
1799
  let r = e.getBoundingClientRect(), i = n.getBoundingClientRect();
1798
1800
  return (i.top < r.top || i.bottom > r.bottom) && (e.scrollTop += i.top - r.top - (r.height - i.height) / 2), (i.left < r.left || i.right > r.right) && (e.scrollLeft += i.left - r.left - (r.width - i.width) / 2), !0;
1799
- }, Gt = 4e3;
1800
- function Kt(e) {
1801
- let t = B(), n = B(), r = B(!1), i = B(!1), a = we(), o = /* @__PURE__ */ new Map(), s, c = 0, l = 0, u = () => {
1801
+ }, qt = 4e3;
1802
+ function Jt(e) {
1803
+ let t = B(), n = B(), r = B(!1), i = B(!1), a = Te(), o = /* @__PURE__ */ new Map(), s, c = 0, l = 0, u = () => {
1802
1804
  clearTimeout(s), a.value = void 0;
1803
1805
  }, d = (e, t) => {
1804
1806
  u();
1805
- let r = e && t ? Ut(t, e) : void 0;
1806
- r && (a.value = r, s = setTimeout(u, Gt)), n.value = e;
1807
+ let r = e && t ? Gt(t, e) : void 0;
1808
+ r && (a.value = r, s = setTimeout(u, qt)), n.value = e;
1807
1809
  }, f = async (n, a) => {
1808
1810
  let s = ++c, u = l, f = a ? o.get(a) : void 0;
1809
1811
  t.value = n, i.value = !1;
@@ -1836,20 +1838,20 @@ function Kt(e) {
1836
1838
  };
1837
1839
  }
1838
1840
  // ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
1839
- var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
1840
- key: 2,
1841
- class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
1842
- }, Yt = {
1841
+ var Yt = { class: "pk-chatbot-view-chat__input-stage" }, Xt = {
1843
1842
  key: 3,
1843
+ class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
1844
+ }, Zt = {
1845
+ key: 4,
1844
1846
  class: "pk-chatbot-view-chat__read-only",
1845
1847
  role: "status"
1846
- }, Xt = { class: "pk-chatbot-view-chat__read-only-text" }, Zt = { class: "pk-chatbot-view-chat__agent-chip" }, Qt = {
1848
+ }, Qt = { class: "pk-chatbot-view-chat__read-only-text" }, $t = { class: "pk-chatbot-view-chat__agent-chip" }, en = {
1847
1849
  key: 0,
1848
1850
  class: "pk-chatbot-view-chat__agent-chip-name"
1849
- }, $t = {
1851
+ }, tn = {
1850
1852
  key: 0,
1851
1853
  class: "pk-chatbot-view-chat__drop-overlay"
1852
- }, en = 1e3, tn = 3e3, nn = 6e4, rn = 3e5, an = 6e5, on = /* @__PURE__ */ L({
1854
+ }, nn = 1e3, rn = 3e3, an = 6e4, on = 3e5, sn = 6e5, X = /* @__PURE__ */ L({
1853
1855
  __name: "PkChatbotViewChat",
1854
1856
  props: {
1855
1857
  agentId: {},
@@ -1862,307 +1864,307 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
1862
1864
  "selection-action"
1863
1865
  ],
1864
1866
  setup(e, { emit: t }) {
1865
- let n = I(() => import("./PkToolShowForm-ByfNodNh.js").then((e) => e.n)), r = I(() => import("./PkToolShowContactForm-D4IAna-K.js").then((e) => e.n)), a = I(() => import("./PkToolShowSuggestedReply-BZqnfpwO.js").then((e) => e.n)), f = I(() => import("./PkToolShowSources-DznWqWK3.js").then((e) => e.n)), h = I(() => import("./PkToolRequestGeolocation-DeI7kLlR.js").then((e) => e.n)), x = I(() => import("./PkToolRequestOAuthConnection-C0lE3Qbk.js")), C = I(() => import("./PkToolShowLocation-dTZcp7ah.js").then((e) => e.n)), ee = I(() => import("./PkToolShowChart-oJmzU10F.js")), ie = I(() => import("./PkToolShowDiagram-ClGpv5Cr.js")), ae = I(() => import("./PkToolChatFile-BdNron14.js").then((e) => e.n)), oe = I(() => import("./PkToolShareDocument-CVDYH1kA.js").then((e) => e.n)), se = I(() => import("./PkFilePreview-Dxp-U8QU.js").then((e) => e.n)), le = I(() => import("./PkFilePreviewDialog-BE-NpN18.js").then((e) => e.n)), D = e, ue = t, O = u(D.agentId), { isReadOnlyChat: P, chatProjectId: L, agentInterface: R, agentFileUpload: he, agentType: ge, agentVoice: ve, actions: be, revisedAnswers: xe, messages: Se, chat: V, messageFeedbacks: we, feedbackDialogMessage: Te, isFeedbackSubmitting: Ee, isFeedbackSubmitted: je, feedbackSubmitError: Ne, isLeadSubmitted: Pe, isLoadingSubmitLead: Fe, submitLeadError: Ie, input: Le, inputMessagePlaceholder: Ve, isConversationBlocked: He, baseUrl: Ue, pendingAttachments: We, isAttachmentLimitReached: Ke, fileLimitError: qe, apiClient: K, isDark: Je, hostToolsPending: Ye, pageNoticeLevel: Xe, hostConfirmation: Ze, agentPageAccess: Qe, hostStepTitles: $e, hostStepChanges: et, confirmationMode: q, canQueue: J, queuedMessages: tt, backgroundAnswers: nt, inputFocusRequest: rt, pagePointer: it, pagePointerAvailable: at, pagePointing: ot, agentSelectionActions: st } = Me(O);
1866
- Ce(y, $e), Ce(_, et);
1867
- let ct = De("inputEl");
1868
- W(rt, () => {
1869
- ct.value?.focus();
1870
- }), W(it, (e) => {
1871
- e && ct.value?.focus();
1867
+ let n = I(() => import("./PkToolShowForm-DfFmPOt6.js").then((e) => e.n)), r = I(() => import("./PkToolShowContactForm-DAdKUU4X.js").then((e) => e.n)), a = I(() => import("./PkToolShowSuggestedReply-C863wgtU.js").then((e) => e.n)), f = I(() => import("./PkToolShowSources-afCYBONq.js").then((e) => e.n)), g = I(() => import("./PkToolRequestGeolocation-BmrbMPke.js").then((e) => e.n)), v = I(() => import("./PkToolRequestOAuthConnection-yKgXyOUN.js")), ee = I(() => import("./PkToolShowLocation-dTZcp7ah.js").then((e) => e.n)), E = I(() => import("./PkToolShowChart-CDR8ag4q.js")), ae = I(() => import("./PkToolShowDiagram-Do20AvFb.js")), oe = I(() => import("./PkToolChatFile-IEQxfzjM.js").then((e) => e.n)), se = I(() => import("./PkToolShareDocument-CVDYH1kA.js").then((e) => e.n)), ce = I(() => import("./PkFilePreview-DLJ2wTHk.js").then((e) => e.n)), ue = I(() => import("./PkFilePreviewDialog-CDPZ3QIk.js").then((e) => e.n)), D = e, de = t, O = u(D.agentId), { isReadOnlyChat: P, chatProjectId: L, agentInterface: R, agentFileUpload: ge, agentType: _e, agentVoice: ye, actions: xe, revisedAnswers: Se, messages: Ce, chat: V, messageFeedbacks: Te, feedbackDialogMessage: De, isFeedbackSubmitting: Oe, isFeedbackSubmitted: Ne, feedbackSubmitError: Fe, isLeadSubmitted: Ie, isLoadingSubmitLead: Le, submitLeadError: Re, input: ze, inputMessagePlaceholder: Ue, isConversationBlocked: We, baseUrl: Ge, pendingAttachments: Ke, isAttachmentLimitReached: Je, fileLimitError: Ye, apiClient: G, isDark: Xe, hostToolsPending: Ze, pageNoticeLevel: Qe, hostConfirmation: $e, agentPageAccess: et, localFolders: tt, localFoldersAvailable: nt, localFolderPickerAvailable: K, canConnectLocalFolder: q, refusedLocalFolder: rt, hostStepTitles: it, hostStepChanges: at, confirmationMode: ot, canQueue: st, queuedMessages: ct, backgroundAnswers: lt, inputFocusRequest: ut, pagePointer: dt, pagePointerAvailable: ft, pagePointing: pt, agentSelectionActions: mt } = Pe(O);
1868
+ we(S, it), we(b, at);
1869
+ let gt = ke("inputEl");
1870
+ U(ut, () => {
1871
+ gt.value?.focus();
1872
+ }), U(dt, (e) => {
1873
+ e && gt.value?.focus();
1872
1874
  });
1873
- let lt = k(() => it.value ? {
1874
- kind: it.value.kind,
1875
- label: it.value.label
1876
- } : void 0), Y = k(() => ge.value === "reasoning" ? void 0 : he.value), ut = k(() => {
1877
- let e = Y.value?.allowedMimeTypes ?? [];
1878
- return !!Y.value?.enabled && (!e.length || e.some((e) => e.startsWith("image/")));
1875
+ let vt = k(() => dt.value ? {
1876
+ kind: dt.value.kind,
1877
+ label: dt.value.label
1878
+ } : void 0), J = k(() => _e.value === "reasoning" ? void 0 : ge.value), yt = k(() => {
1879
+ let e = J.value?.allowedMimeTypes ?? [];
1880
+ return !!J.value?.enabled && (!e.length || e.some((e) => e.startsWith("image/")));
1879
1881
  });
1880
1882
  c({
1881
- available: () => !!ct.value && ut.value && !Ke.value,
1882
- annotate: (e) => ct.value?.annotateImage(e)
1883
+ available: () => !!gt.value && yt.value && !Je.value,
1884
+ annotate: (e) => gt.value?.annotateImage(e)
1883
1885
  });
1884
- let dt = (e) => K.value.getMediaDownloadUrl(D.agentId, O.localChatId, e), { handleSubmit: pt, stopGeneration: ht, regenerate: gt, onUpvote: _t, onDownvote: vt, onFeedback: yt, onFeedbackSubmit: bt, onLeadSubmit: xt, startNewChat: St, addToolOutput: Ct, addToolApprovalResponse: Et, handleFileSelect: Dt, discardPendingAttachment: kt, replacePendingAttachment: At, retryPendingAttachment: jt, clearFileLimitError: Mt, refreshMessages: Nt, appendMessage: Pt, closePageNotice: It, respondHostConfirmation: Lt, editQueuedMessage: Rt, removeQueuedMessage: zt, openBackgroundAnswer: Bt, dismissBackgroundAnswer: Vt } = O, { t: X } = Oe({ useScope: "global" }), Ht = k(() => Ye.value > 0), Ut = k(() => Ht.value && V.value.status === "ready" ? "streaming" : V.value.status), Wt = k(() => {
1886
+ let bt = (e) => G.value.getMediaDownloadUrl(D.agentId, O.localChatId, e), { handleSubmit: xt, stopGeneration: St, regenerate: Ct, onUpvote: wt, onDownvote: Tt, onFeedback: Ot, onFeedbackSubmit: kt, onLeadSubmit: jt, startNewChat: Mt, addToolOutput: Nt, addToolApprovalResponse: Pt, handleFileSelect: Ft, discardPendingAttachment: It, replacePendingAttachment: Rt, retryPendingAttachment: zt, clearFileLimitError: Bt, refreshMessages: Y, appendMessage: Vt, closePageNotice: Ht, respondHostConfirmation: Ut, editQueuedMessage: Wt, removeQueuedMessage: Gt, openBackgroundAnswer: Kt, dismissBackgroundAnswer: qt } = O, { t: X } = Ae({ useScope: "global" }), cn = k(() => Ze.value > 0), ln = k(() => cn.value && V.value.status === "ready" ? "streaming" : V.value.status), un = k(() => {
1885
1887
  let { messages: e } = V.value, t = e[e.length - 1];
1886
- return Ut.value === "ready" && t?.role === "assistant" ? t.id : void 0;
1887
- }), Gt = B(), on;
1888
- W([Wt, () => R.value?.nextMessageSuggestion], async ([e, t]) => {
1889
- if (!e || !t || w() || Gt.value?.messageId === e || on === e) return;
1890
- on = e;
1891
- let n = await O.suggestNextMessage(e), r = n ? Re(n) : void 0;
1892
- r && Wt.value === e && (Gt.value = {
1888
+ return ln.value === "ready" && t?.role === "assistant" ? t.id : void 0;
1889
+ }), dn = B(), fn;
1890
+ U([un, () => R.value?.nextMessageSuggestion], async ([e, t]) => {
1891
+ if (!e || !t || h() || dn.value?.messageId === e || fn === e) return;
1892
+ fn = e;
1893
+ let n = await O.suggestNextMessage(e), r = n ? Be(n) : void 0;
1894
+ r && un.value === e && (dn.value = {
1893
1895
  messageId: e,
1894
1896
  message: r
1895
1897
  });
1896
1898
  }, { immediate: !0 });
1897
- let sn = k(() => R.value?.nextMessageSuggestion && Gt.value?.messageId === Wt.value ? Gt.value?.message : void 0), cn = S(() => Qe.value?.notice), ln = k(() => Xe.value ? cn.value || X(`message.pageAccessNotice.${Xe.value}`) : void 0), un = k(() => {
1898
- let e = qe.value;
1899
+ let pn = k(() => R.value?.nextMessageSuggestion && dn.value?.messageId === un.value ? dn.value?.message : void 0), mn = _(() => et.value?.notice), hn = k(() => Qe.value ? mn.value || X(`message.pageAccessNotice.${Qe.value}`) : void 0), gn = k(() => {
1900
+ let e = Ye.value;
1899
1901
  if (e) return e.reason === "per-chat" ? X("message.fileLimitPerChat", { max: e.max }) : X("message.fileLimitPerMessage", { max: e.max });
1900
- }), dn = k(() => nt.value.map(({ chatId: e, title: t }) => ({
1902
+ }), _n = k(() => lt.value.map(({ chatId: e, title: t }) => ({
1901
1903
  id: e,
1902
1904
  text: t ? X("message.backgroundAnswerReady", { title: t }) : X("message.backgroundAnswerReadyUntitled")
1903
- }))), fn = S(() => R.value?.dismissableNotice), pn = k(() => Se.value.some((e) => e.role === "user")), mn = k(() => D.modifier === "fullscreen" && !pn.value), hn = Be(R, () => D.userName), gn = De("chatViewEl"), _n = Ot(), vn = k(() => !!_n?.value), yn = k(() => _n?.value ?? "body"), bn = B(0), xn = B(0);
1904
- Ae([gn, k(() => _n?.value ?? void 0)], (e) => {
1905
+ }))), vn = _(() => R.value?.dismissableNotice), yn = k(() => Ce.value.some((e) => e.role === "user")), bn = k(() => D.modifier === "fullscreen" && !yn.value), xn = He(R, () => D.userName), Sn = ke("chatViewEl"), Cn = At(), wn = k(() => !!Cn?.value), Tn = k(() => Cn?.value ?? "body"), En = B(0), Dn = B(0);
1906
+ Me([Sn, k(() => Cn?.value ?? void 0)], (e) => {
1905
1907
  for (let t of e) {
1906
1908
  let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
1907
- t.target === gn.value ? bn.value = e : xn.value = e;
1909
+ t.target === Sn.value ? En.value = e : Dn.value = e;
1908
1910
  }
1909
1911
  }, { box: "border-box" });
1910
- let Sn = k(() => bn.value + (vn.value ? xn.value : 0) >= en), Cn = k(() => bn.value > 0 && bn.value < 576), { target: Z, preview: wn, loading: Tn, error: En, changes: Dn, open: On, close: kn, reset: An } = Kt((e) => K.value.getChatFilePreview(D.agentId, O.localChatId, e)), Q = B({}), jn = (e, t) => {
1912
+ let On = k(() => En.value + (wn.value ? Dn.value : 0) >= nn), kn = k(() => En.value > 0 && En.value < 576), { target: Z, preview: An, loading: jn, error: Mn, changes: Nn, open: Pn, close: Fn, reset: In } = Jt((e) => G.value.getChatFilePreview(D.agentId, O.localChatId, e)), Q = B({}), Ln = (e, t) => {
1911
1913
  let n = (e) => e?.fileId ?? e?.storedFileName;
1912
- return n(e) !== n(Z.value) && (Q.value = {}), On(e, t);
1913
- }, Mn = B(!1), Nn = k(() => !!Z.value && Sn.value && !Mn.value), Pn = () => {
1914
- kn(), Mn.value = !1;
1915
- }, Fn = /* @__PURE__ */ new Set([
1914
+ return n(e) !== n(Z.value) && (Q.value = {}), Pn(e, t);
1915
+ }, Rn = B(!1), zn = k(() => !!Z.value && On.value && !Rn.value), Bn = () => {
1916
+ Fn(), Rn.value = !1;
1917
+ }, Vn = /* @__PURE__ */ new Set([
1916
1918
  "tool-editSpreadsheet",
1917
1919
  "tool-editWordDocument",
1918
1920
  "tool-createSpreadsheet",
1919
1921
  "tool-createWordDocument"
1920
- ]), In = k(() => {
1922
+ ]), Hn = k(() => {
1921
1923
  let e = /* @__PURE__ */ new Map();
1922
- for (let t of Se.value) for (let n of t.parts) {
1924
+ for (let t of Ce.value) for (let n of t.parts) {
1923
1925
  let { type: t, state: r, output: i } = n;
1924
- if (Fn.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
1926
+ if (Vn.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
1925
1927
  let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
1926
1928
  t.set(i.version, i.storedFileName), e.set(i.fileId, t);
1927
1929
  }
1928
1930
  }
1929
1931
  for (let [t, n] of e) n.has(1) || n.set(1, t);
1930
1932
  return e;
1931
- }), Ln = k(() => [...In.value.get(Z.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), Rn = (e, t) => {
1932
- let n = Z.value, r = In.value.get(n?.fileId ?? "")?.get(e);
1933
- n && r && jn({
1933
+ }), Un = k(() => [...Hn.value.get(Z.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), Wn = (e, t) => {
1934
+ let n = Z.value, r = Hn.value.get(n?.fileId ?? "")?.get(e);
1935
+ n && r && Ln({
1934
1936
  ...n,
1935
1937
  version: e,
1936
1938
  storedFileName: r
1937
1939
  }, t);
1938
- }, zn = k(() => {
1939
- let e = Z.value, t = Ln.value;
1940
- return !!kr.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
1941
- }), Bn = () => {
1940
+ }, Gn = k(() => {
1941
+ let e = Z.value, t = Un.value;
1942
+ return !!Fr.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
1943
+ }), Kn = () => {
1942
1944
  let e = Z.value;
1943
- e?.fileId && e.version && (kr.value?.({
1945
+ e?.fileId && e.version && (Fr.value?.({
1944
1946
  fileId: e.fileId,
1945
1947
  version: e.version,
1946
1948
  filename: e.filename
1947
- }), Pn());
1949
+ }), Bn());
1948
1950
  };
1949
- W(() => O.localChatId, An), W(() => {
1951
+ U(() => O.localChatId, In), U(() => {
1950
1952
  let e = Z.value?.fileId;
1951
1953
  return e ? {
1952
1954
  fileId: e,
1953
- newest: Math.max(0, ...Ln.value)
1955
+ newest: Math.max(0, ...Un.value)
1954
1956
  } : void 0;
1955
1957
  }, (e, t) => {
1956
- e && t && e.fileId === t.fileId && e.newest > t.newest && Z.value?.version === t.newest && Rn(e.newest, Z.value.storedFileName);
1958
+ e && t && e.fileId === t.fileId && e.newest > t.newest && Z.value?.version === t.newest && Wn(e.newest, Z.value.storedFileName);
1957
1959
  });
1958
- let Vn = k(() => {
1960
+ let qn = k(() => {
1959
1961
  let e = V.value?.status;
1960
- if (!(He.value || P.value || e === "submitted" || e === "streaming")) return Z.value?.kind === "word" ? st.value?.word : st.value?.excel;
1961
- }), Hn = k(() => Ut.value === "submitted" || Ut.value === "streaming"), Un = () => {
1962
- Sn.value ? Mn.value = !1 : Pn();
1963
- }, Wn = (e, t, n) => {
1964
- O.sendSelection(e, { filePointer: t }) && ue("selection-action", {
1962
+ if (!(We.value || P.value || e === "submitted" || e === "streaming")) return Z.value?.kind === "word" ? mt.value?.word : mt.value?.excel;
1963
+ }), Jn = k(() => ln.value === "submitted" || ln.value === "streaming"), Yn = () => {
1964
+ On.value ? Rn.value = !1 : Bn();
1965
+ }, Xn = (e, t, n) => {
1966
+ O.sendSelection(e, { filePointer: t }) && de("selection-action", {
1965
1967
  surface: t.format === "docx" ? "word" : "excel",
1966
1968
  action: n.id,
1967
1969
  state: "chat",
1968
1970
  size: String(n.size)
1969
1971
  });
1970
- }, Gn = async (e) => (await K.value.expandSourceContext(D.agentId, e.documentId, e.chunkIndex)).content, Kn = async (e) => {
1971
- let t = await K.value.downloadSourceDocument(D.agentId, e);
1972
+ }, Zn = async (e) => (await G.value.expandSourceContext(D.agentId, e.documentId, e.chunkIndex)).content, Qn = async (e) => {
1973
+ let t = await G.value.downloadSourceDocument(D.agentId, e);
1972
1974
  window.open(t.downloadUrl, "_blank");
1973
- }, qn = (e) => {
1974
- if (Y.value?.enabled && e) for (let t of e) Dt(t);
1975
- }, Jn = k(() => P.value ? be.value?.filter((e) => e === "copy") : be.value), { isOverDropZone: Yn } = ke(gn, {
1976
- dataTypes: (e) => !P.value && i(e, Y.value?.allowedMimeTypes ?? []),
1977
- onDrop: qn
1978
- }), Xn = B(!1), Zn = !1, Qn = B(!1), $n = [
1975
+ }, $n = (e) => {
1976
+ if (J.value?.enabled && e) for (let t of e) Ft(t);
1977
+ }, er = k(() => P.value ? xe.value?.filter((e) => e === "copy") : xe.value), { isOverDropZone: tr } = je(Sn, {
1978
+ dataTypes: (e) => !P.value && i(e, J.value?.allowedMimeTypes ?? []),
1979
+ onDrop: $n
1980
+ }), nr = B(!1), rr = !1, ir = B(!1), ar = [
1979
1981
  3e3,
1980
1982
  5e3,
1981
1983
  1e4
1982
- ], er, tr, nr = !1, rr = 0, ir = !1;
1983
- function ar() {
1984
- clearTimeout(er), er = void 0, tr = void 0, nr = !1, rr = 0, Qn.value = !1;
1984
+ ], or, sr, cr = !1, lr = 0, ur = !1;
1985
+ function dr() {
1986
+ clearTimeout(or), or = void 0, sr = void 0, cr = !1, lr = 0, ir.value = !1;
1985
1987
  }
1986
- function or(e) {
1987
- Zn || (clearTimeout(er), er = setTimeout(() => {
1988
- sr();
1988
+ function fr(e) {
1989
+ rr || (clearTimeout(or), or = setTimeout(() => {
1990
+ pr();
1989
1991
  }, e));
1990
1992
  }
1991
- async function sr() {
1992
- if (Zn || ir) return;
1993
- ir = !0;
1993
+ async function pr() {
1994
+ if (rr || ur) return;
1995
+ ur = !0;
1994
1996
  let e;
1995
1997
  try {
1996
- e = await Nt();
1998
+ e = await Y();
1997
1999
  } finally {
1998
- ir = !1;
2000
+ ur = !1;
1999
2001
  }
2000
- if (Zn) return;
2001
- if (e === "caught-up" && (Qn.value = !1, Br()), $.isActive.value) {
2002
- tr = void 0, nr = !1, rr = 0, or(tn);
2002
+ if (rr) return;
2003
+ if (e === "caught-up" && (ir.value = !1, Kr()), $.isActive.value) {
2004
+ sr = void 0, cr = !1, lr = 0, fr(rn);
2003
2005
  return;
2004
2006
  }
2005
- tr === void 0 && (tr = Date.now(), nr = !!$.error.value);
2006
- let t = Date.now() - tr;
2007
- if (e === "caught-up" && t >= (nr ? rn : nn) || t >= an) {
2008
- ar(), Vr();
2007
+ sr === void 0 && (sr = Date.now(), cr = !!$.error.value);
2008
+ let t = Date.now() - sr;
2009
+ if (e === "caught-up" && t >= (cr ? on : an) || t >= sn) {
2010
+ dr(), qr();
2009
2011
  return;
2010
2012
  }
2011
- let n = $n[Math.min(rr, $n.length - 1)];
2012
- rr += 1, or(n);
2013
+ let n = ar[Math.min(lr, ar.length - 1)];
2014
+ lr += 1, fr(n);
2013
2015
  }
2014
- let cr = (e = 1200) => {
2015
- or(e);
2016
- }, lr, $ = Tt({
2016
+ let mr = (e = 1200) => {
2017
+ fr(e);
2018
+ }, hr, $ = Dt({
2017
2019
  fetchGrant: async () => {
2018
- lr = O.voicePageTools();
2019
- let e = await K.value.createVoiceSession(D.agentId, O.localChatId, {
2020
+ hr = O.voicePageTools();
2021
+ let e = await G.value.createVoiceSession(D.agentId, O.localChatId, {
2020
2022
  deviceContext: O.buildDeviceContext(),
2021
2023
  externalContext: O.externalContext,
2022
- pageTools: lr?.declaration,
2024
+ pageTools: hr?.declaration,
2023
2025
  ...O.confirmationMode === "automatic" && { confirmations: "automatic" }
2024
2026
  });
2025
2027
  return e.chatId !== O.localChatId && (O.localChatId = e.chatId), e;
2026
2028
  },
2027
- closeGrant: (e) => K.value.closeVoiceSession(D.agentId, e),
2028
- clientTools: () => lr?.clientTools,
2029
+ closeGrant: (e) => G.value.closeVoiceSession(D.agentId, e),
2030
+ clientTools: () => hr?.clientTools,
2029
2031
  onTranscript: (e) => {
2030
- e.role === "user" ? (Qn.value = !0, zr(), Pt({
2032
+ e.role === "user" ? (ir.value = !0, Gr(), Vt({
2031
2033
  id: `${d}user-${l()}`,
2032
2034
  role: "user",
2033
2035
  parts: [{
2034
2036
  type: "text",
2035
2037
  text: e.text
2036
2038
  }]
2037
- })) : Qn.value = !1;
2039
+ })) : ir.value = !1;
2038
2040
  },
2039
2041
  onTurnEnd: () => {
2040
- cr();
2042
+ mr();
2041
2043
  }
2042
2044
  });
2043
- W(() => $.isActive.value, (e) => {
2045
+ U(() => $.isActive.value, (e) => {
2044
2046
  e || O.cancelVoicePageCalls();
2045
- }), W(() => $.error.value, (e) => {
2046
- e && (Qn.value = !1);
2047
+ }), U(() => $.error.value, (e) => {
2048
+ e && (ir.value = !1);
2047
2049
  });
2048
- let ur = k(() => ve.value?.enabled === !0), dr = k(() => $.error.value ? "error" : $.isConnecting.value ? "connecting" : $.isSpeaking.value ? "speaking" : $.isActive.value ? "listening" : "idle"), fr = k(() => {
2050
+ let gr = k(() => ye.value?.enabled === !0), _r = k(() => $.error.value ? "error" : $.isConnecting.value ? "connecting" : $.isSpeaking.value ? "speaking" : $.isActive.value ? "listening" : "idle"), vr = k(() => {
2049
2051
  let e = $.error.value;
2050
2052
  if (e) return /took too long/i.test(e) ? X("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? X("message.voiceNoAnswer") : X("message.voiceInterrupted");
2051
- }), pr = k(() => $.isSpeaking.value ? "output" : "input"), mr = () => $.readLevel(pr.value), hr = () => $.readSpectrum(pr.value), gr = async () => {
2052
- Xn.value = !1, await $.start(), $.isActive.value && (ar(), or(tn));
2053
- }, _r = async () => {
2054
- Qn.value = !1, await $.stop(), Zn || cr(0);
2055
- }, vr = () => {
2053
+ }), yr = k(() => $.isSpeaking.value ? "output" : "input"), br = () => $.readLevel(yr.value), xr = () => $.readSpectrum(yr.value), Sr = async () => {
2054
+ nr.value = !1, await $.start(), $.isActive.value && (dr(), fr(rn));
2055
+ }, Cr = async () => {
2056
+ ir.value = !1, await $.stop(), rr || mr(0);
2057
+ }, wr = () => {
2056
2058
  $.dismissError();
2057
- }, yr = async () => {
2058
- $.dismissError(), await $.stop(), await gr();
2059
- }, br = (e) => e?.toolCallId ?? "", xr = B(/* @__PURE__ */ new Set()), Sr = (e) => xr.value.has(br(e)), Cr = B(/* @__PURE__ */ new Map()), wr = (e, t) => $.isActive.value ? ($.sendUserMessage(t) && (xr.value = new Set(xr.value).add(br(e)), cr()), !0) : !1, Tr = (e, t, n) => {
2060
- wr(t, v(t, n)) || Ct({
2059
+ }, Tr = async () => {
2060
+ $.dismissError(), await $.stop(), await Sr();
2061
+ }, Er = (e) => e?.toolCallId ?? "", Dr = B(/* @__PURE__ */ new Set()), Or = (e) => Dr.value.has(Er(e)), kr = B(/* @__PURE__ */ new Map()), Ar = (e, t) => $.isActive.value ? ($.sendUserMessage(t) && (Dr.value = new Set(Dr.value).add(Er(e)), mr()), !0) : !1, jr = (e, t, n) => {
2062
+ Ar(t, x(t, n)) || Nt({
2061
2063
  tool: e,
2062
- toolCallId: br(t),
2064
+ toolCallId: Er(t),
2063
2065
  output: n
2064
2066
  });
2065
- }, Er = (e) => {
2067
+ }, Mr = (e) => {
2066
2068
  let t = e.confirmed ? X("message.voiceConfirmed") : X("message.voiceCancelled");
2067
- wr({ toolCallId: e.toolCallId }, t) ? xr.value.has(e.toolCallId) && (Cr.value = new Map(Cr.value).set(e.toolCallId, e.confirmed)) : Ct({
2069
+ Ar({ toolCallId: e.toolCallId }, t) ? Dr.value.has(e.toolCallId) && (kr.value = new Map(kr.value).set(e.toolCallId, e.confirmed)) : Nt({
2068
2070
  tool: "requestConfirm",
2069
2071
  toolCallId: e.toolCallId,
2070
2072
  output: e.confirmed ? "confirmed" : "cancelled"
2071
2073
  });
2072
- }, Dr = k(() => {
2074
+ }, Nr = k(() => {
2073
2075
  let e = /* @__PURE__ */ new Map();
2074
- for (let t of Se.value) for (let n of t.parts) {
2076
+ for (let t of Ce.value) for (let n of t.parts) {
2075
2077
  let { type: t, state: r, output: i } = n;
2076
- Fn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
2078
+ Vn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
2077
2079
  }
2078
2080
  return e;
2079
- }), Or = k(() => {
2081
+ }), Pr = k(() => {
2080
2082
  let e = /* @__PURE__ */ new Map(), t = (t, n) => {
2081
2083
  if (t && n) {
2082
2084
  let r = t.toLowerCase();
2083
2085
  e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
2084
2086
  }
2085
2087
  };
2086
- for (let e of Se.value) for (let n of e.parts) {
2088
+ for (let e of Ce.value) for (let n of e.parts) {
2087
2089
  if (p(n)) {
2088
2090
  t(n.filename, m(n)?.storedFileName);
2089
2091
  continue;
2090
2092
  }
2091
2093
  let { type: e, state: r, output: i } = n;
2092
- Fn.has(e) && r === "output-available" && i?.filename && t(b(i.filename, i.version), i.fileId);
2094
+ Vn.has(e) && r === "output-available" && i?.filename && t(C(i.filename, i.version), i.fileId);
2093
2095
  }
2094
2096
  return e;
2095
- }), kr = k(() => He.value || P.value ? void 0 : (e) => {
2096
- let t = (Or.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
2097
- Le.value = X(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), pt();
2098
- }), Ar = (e, t) => {
2099
- wr(e, t) || (Le.value = t, pt());
2100
- }, jr = (e, t) => {
2097
+ }), Fr = k(() => We.value || P.value ? void 0 : (e) => {
2098
+ let t = (Pr.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
2099
+ ze.value = X(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), xt();
2100
+ }), Ir = (e, t) => {
2101
+ Ar(e, t) || (ze.value = t, xt());
2102
+ }, Lr = (e, t) => {
2101
2103
  let n = t.error ? X("message.voiceLocationRefused") : X("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
2102
- wr(e, n) || Ct({
2104
+ Ar(e, n) || Nt({
2103
2105
  tool: "requestGeolocation",
2104
- toolCallId: br(e),
2106
+ toolCallId: Er(e),
2105
2107
  output: t
2106
2108
  });
2107
- }, Mr = (e, t) => {
2108
- wr(e, X("message.voiceConnectionDone")) || Ct({
2109
+ }, Rr = (e, t) => {
2110
+ Ar(e, X("message.voiceConnectionDone")) || Nt({
2109
2111
  tool: "requestOAuthConnection",
2110
- toolCallId: br(e),
2112
+ toolCallId: Er(e),
2111
2113
  output: {
2112
2114
  connected: !0,
2113
2115
  mcpServerId: t
2114
2116
  }
2115
2117
  });
2116
- }, Nr = () => {
2117
- Xn.value = !Xn.value, $.setMuted(Xn.value);
2118
+ }, zr = () => {
2119
+ nr.value = !nr.value, $.setMuted(nr.value);
2118
2120
  };
2119
- ye(() => {
2120
- Zn = !0, ar();
2121
+ be(() => {
2122
+ rr = !0, dr();
2121
2123
  });
2122
- let { pendingWakeup: Pr, tasks: Fr, isStopping: Ir, apply: Lr, stop: Rr, spokenTurnStarted: zr, spokenTurnsWritten: Br, forgetSpokenTurns: Vr } = Ft({
2124
+ let { pendingWakeup: Br, tasks: Vr, isStopping: Hr, apply: Ur, stop: Wr, spokenTurnStarted: Gr, spokenTurnsWritten: Kr, forgetSpokenTurns: qr } = Lt({
2123
2125
  agentId: () => D.agentId,
2124
2126
  chatId: () => O.localChatId,
2125
- apiClient: () => K.value,
2126
- messages: () => Se.value,
2127
- refreshMessages: Nt,
2127
+ apiClient: () => G.value,
2128
+ messages: () => Ce.value,
2129
+ refreshMessages: Y,
2128
2130
  status: () => V.value.status
2129
- }), Hr = ze(D.agentId), Ur = mt(D.agentId);
2130
- W(() => Hr.changed, (e) => {
2131
- e?.chatId === O.localChatId && Lr(e.state);
2132
- }), W(() => Fr.value.map((e) => `${e.id}:${e.status}`).join(), (e) => {
2133
- e !== Hr.tasks.filter((e) => e.chatId === O.localChatId).map((e) => `${e.id}:${e.status}`).join() && Hr.load();
2131
+ }), Jr = Ve(D.agentId), Yr = _t(D.agentId);
2132
+ U(() => Jr.changed, (e) => {
2133
+ e?.chatId === O.localChatId && Ur(e.state);
2134
+ }), U(() => Vr.value.map((e) => `${e.id}:${e.status}`).join(), (e) => {
2135
+ e !== Jr.tasks.filter((e) => e.chatId === O.localChatId).map((e) => `${e.id}:${e.status}`).join() && Jr.load();
2134
2136
  });
2135
- let Wr = Ur.busy, Gr = B(), Kr = B(!1);
2136
- function qr(e, t) {
2137
- e === "edit" ? (Gr.value = t, Kr.value = !0) : e === "delete" ? Ur.remove(t) : e === "run" ? Ur.run(t) : Ur.setActive(t, e === "resume");
2137
+ let Xr = Yr.busy, Zr = B(), Qr = B(!1);
2138
+ function $r(e, t) {
2139
+ e === "edit" ? (Zr.value = t, Qr.value = !0) : e === "delete" ? Yr.remove(t) : e === "run" ? Yr.run(t) : Yr.setActive(t, e === "resume");
2138
2140
  }
2139
- async function Jr() {
2140
- Gr.value && await Ur.remove(Gr.value) && (Kr.value = !1);
2141
+ async function ei() {
2142
+ Zr.value && await Yr.remove(Zr.value) && (Qr.value = !1);
2141
2143
  }
2142
- let Yr = k(() => Hr.notice ?? un.value);
2143
- function Xr() {
2144
- Hr.notice ? Hr.notice = void 0 : Mt();
2144
+ let ti = k(() => Jr.notice ?? gn.value);
2145
+ function ni() {
2146
+ Jr.notice ? Jr.notice = void 0 : Bt();
2145
2147
  }
2146
2148
  return (t, i) => {
2147
- let c = ce, l = s;
2149
+ let c = le, l = s;
2148
2150
  return z(), M("div", {
2149
2151
  ref_key: "chatViewEl",
2150
- ref: gn,
2151
- class: _e(["pk-chatbot-view-chat", {
2152
- "pk-chatbot-view-chat--dragover": U(Yn) && Y.value?.enabled,
2153
- "pk-chatbot-view-chat--empty": mn.value,
2154
- "pk-chatbot-view-chat--with-preview": Nn.value && !vn.value
2152
+ ref: Sn,
2153
+ class: ve(["pk-chatbot-view-chat", {
2154
+ "pk-chatbot-view-chat--dragover": H(tr) && J.value?.enabled,
2155
+ "pk-chatbot-view-chat--empty": bn.value,
2156
+ "pk-chatbot-view-chat--with-preview": zn.value && !wn.value
2155
2157
  }])
2156
2158
  }, [
2157
- F(fe, {
2159
+ F(pe, {
2158
2160
  name: "pk-chatbot-view-chat-fade",
2159
2161
  mode: "out-in"
2160
2162
  }, {
2161
- default: G(() => [mn.value ? (z(), A(re, {
2163
+ default: W(() => [bn.value ? (z(), A(ie, {
2162
2164
  key: 0,
2163
- greeting: U(hn),
2164
- logo: U(R)?.logo,
2165
- name: U(O).name
2165
+ greeting: H(xn),
2166
+ logo: H(R)?.logo,
2167
+ name: H(O).name
2166
2168
  }, null, 8, [
2167
2169
  "greeting",
2168
2170
  "logo",
@@ -2170,52 +2172,52 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2170
2172
  ])) : (z(), A(o, {
2171
2173
  key: 1,
2172
2174
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
2173
- interactive: !U(P),
2174
- messages: U(Se),
2175
- "confirm-verdicts-on-call": Cr.value,
2176
- status: U(V).status,
2177
- error: U(V).error,
2178
- "main-color": U(R)?.mainColor,
2179
- "text-color": U(R)?.textColor,
2180
- "revised-answers": U(xe),
2181
- actions: Jn.value,
2182
- "message-feedbacks": U(we),
2183
- "feedback-message-id": U(Te)?.id,
2184
- "feedback-loading": U(Ee),
2185
- "feedback-submitted": U(je),
2186
- "feedback-error": U(Ne),
2187
- "show-extended-steps": U(R)?.showExtendedSteps,
2188
- "hide-reasoning": U(R)?.showReasoning === !1,
2189
- "awaiting-spoken-answer": Qn.value,
2190
- "host-working": Ht.value,
2191
- "host-confirmation": U(Ze),
2192
- "is-dark": U(Je),
2175
+ interactive: !H(P),
2176
+ messages: H(Ce),
2177
+ "confirm-verdicts-on-call": kr.value,
2178
+ status: H(V).status,
2179
+ error: H(V).error,
2180
+ "main-color": H(R)?.mainColor,
2181
+ "text-color": H(R)?.textColor,
2182
+ "revised-answers": H(Se),
2183
+ actions: er.value,
2184
+ "message-feedbacks": H(Te),
2185
+ "feedback-message-id": H(De)?.id,
2186
+ "feedback-loading": H(Oe),
2187
+ "feedback-submitted": H(Ne),
2188
+ "feedback-error": H(Fe),
2189
+ "show-extended-steps": H(R)?.showExtendedSteps,
2190
+ "hide-reasoning": H(R)?.showReasoning === !1,
2191
+ "awaiting-spoken-answer": ir.value,
2192
+ "host-working": cn.value,
2193
+ "host-confirmation": H($e),
2194
+ "is-dark": H(Xe),
2193
2195
  "show-scroll-to-bottom": e.modifier === "fullscreen",
2194
- tasks: U(P) ? [] : U(Fr),
2195
- onFeedbackSubmit: i[0] ||= (e) => U(bt)(e),
2196
- onFeedbackClose: i[1] ||= (e) => Te.value = void 0,
2197
- onRegenerate: U(gt),
2198
- onAutoRetry: U(gt),
2199
- onResetChat: U(St),
2200
- onShowInfo: i[2] ||= (e) => ue("show-info", e),
2201
- onRevise: i[3] ||= (e) => ue("revise", e),
2202
- onUpvote: U(_t),
2203
- onDownvote: U(vt),
2204
- onFeedback: U(yt),
2205
- onApprovalRespond: U(Et),
2206
- onConfirmRespond: Er,
2207
- onTaskAction: qr,
2208
- onHostConfirmRespond: U(Lt)
2196
+ tasks: H(P) ? [] : H(Vr),
2197
+ onFeedbackSubmit: i[0] ||= (e) => H(kt)(e),
2198
+ onFeedbackClose: i[1] ||= (e) => De.value = void 0,
2199
+ onRegenerate: H(Ct),
2200
+ onAutoRetry: H(Ct),
2201
+ onResetChat: H(Mt),
2202
+ onShowInfo: i[2] ||= (e) => de("show-info", e),
2203
+ onRevise: i[3] ||= (e) => de("revise", e),
2204
+ onUpvote: H(wt),
2205
+ onDownvote: H(Tt),
2206
+ onFeedback: H(Ot),
2207
+ onApprovalRespond: H(Pt),
2208
+ onConfirmRespond: Mr,
2209
+ onTaskAction: $r,
2210
+ onHostConfirmRespond: H(Ut)
2209
2211
  }, {
2210
- "tool-showContactForm": G(({ part: e }) => [F(U(r), {
2212
+ "tool-showContactForm": W(({ part: e }) => [F(H(r), {
2211
2213
  part: e,
2212
- record: U(P),
2213
- readonly: !U(Ue),
2214
- submitted: U(Pe),
2215
- loading: U(Fe),
2216
- error: U(Ie),
2217
- "privacy-policy-notice": U(R)?.privacyPolicyNotice,
2218
- onSubmit: U(xt)
2214
+ record: H(P),
2215
+ readonly: !H(Ge),
2216
+ submitted: H(Ie),
2217
+ loading: H(Le),
2218
+ error: H(Re),
2219
+ "privacy-policy-notice": H(R)?.privacyPolicyNotice,
2220
+ onSubmit: H(jt)
2219
2221
  }, null, 8, [
2220
2222
  "part",
2221
2223
  "record",
@@ -2226,26 +2228,26 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2226
2228
  "privacy-policy-notice",
2227
2229
  "onSubmit"
2228
2230
  ])]),
2229
- "tool-showSuggestedReply": G(({ part: e }) => [F(U(a), {
2231
+ "tool-showSuggestedReply": W(({ part: e }) => [F(H(a), {
2230
2232
  part: e,
2231
- record: U(P),
2232
- onSelect: (t) => Ar(e, t)
2233
+ record: H(P),
2234
+ onSelect: (t) => Ir(e, t)
2233
2235
  }, null, 8, [
2234
2236
  "part",
2235
2237
  "record",
2236
2238
  "onSelect"
2237
2239
  ])]),
2238
- "tool-showSources": G(({ part: e }) => [F(U(f), {
2240
+ "tool-showSources": W(({ part: e }) => [F(H(f), {
2239
2241
  part: e,
2240
- "on-expand-context": Gn,
2241
- "on-download": Kn
2242
+ "on-expand-context": Zn,
2243
+ "on-download": Qn
2242
2244
  }, null, 8, ["part"])]),
2243
- "tool-showForm": G(({ part: e }) => [F(fe, { mode: "out-in" }, {
2244
- default: G(() => [F(U(n), {
2245
+ "tool-showForm": W(({ part: e }) => [F(pe, { mode: "out-in" }, {
2246
+ default: W(() => [F(H(n), {
2245
2247
  part: e,
2246
- record: U(P),
2247
- answered: Sr(e),
2248
- onSelect: (t) => Tr("showForm", e, t)
2248
+ record: H(P),
2249
+ answered: Or(e),
2250
+ onSelect: (t) => jr("showForm", e, t)
2249
2251
  }, null, 8, [
2250
2252
  "part",
2251
2253
  "record",
@@ -2254,13 +2256,13 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2254
2256
  ])]),
2255
2257
  _: 2
2256
2258
  }, 1024)]),
2257
- "tool-showMultipleChoice": G(({ part: e }) => [F(fe, { mode: "out-in" }, {
2258
- default: G(() => [F(U(n), {
2259
+ "tool-showMultipleChoice": W(({ part: e }) => [F(pe, { mode: "out-in" }, {
2260
+ default: W(() => [F(H(n), {
2259
2261
  part: e,
2260
2262
  "allow-custom-answer": "",
2261
- record: U(P),
2262
- answered: Sr(e),
2263
- onSelect: (t) => Tr("showMultipleChoice", e, t)
2263
+ record: H(P),
2264
+ answered: Or(e),
2265
+ onSelect: (t) => jr("showMultipleChoice", e, t)
2264
2266
  }, null, 8, [
2265
2267
  "part",
2266
2268
  "record",
@@ -2269,12 +2271,12 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2269
2271
  ])]),
2270
2272
  _: 2
2271
2273
  }, 1024)]),
2272
- "tool-requestOAuthConnection": G(({ part: e }) => [F(U(x), {
2274
+ "tool-requestOAuthConnection": W(({ part: e }) => [F(H(v), {
2273
2275
  part: e,
2274
- "backend-url": U(Ue),
2275
- "resolve-connection": (e) => U(K).getOAuthAuthorizeUrl(D.agentId, e),
2276
- "check-connection": (e) => U(K).getOAuthConnectionStatus(D.agentId, e),
2277
- onConnected: (t) => Mr(e, t)
2276
+ "backend-url": H(Ge),
2277
+ "resolve-connection": (e) => H(G).getOAuthAuthorizeUrl(D.agentId, e),
2278
+ "check-connection": (e) => H(G).getOAuthConnectionStatus(D.agentId, e),
2279
+ onConnected: (t) => Rr(e, t)
2278
2280
  }, null, 8, [
2279
2281
  "part",
2280
2282
  "backend-url",
@@ -2282,112 +2284,112 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2282
2284
  "check-connection",
2283
2285
  "onConnected"
2284
2286
  ])]),
2285
- "tool-requestGeolocation": G(({ part: e }) => [F(U(h), {
2287
+ "tool-requestGeolocation": W(({ part: e }) => [F(H(g), {
2286
2288
  part: e,
2287
- "call-live": U($).isActive.value,
2288
- "reverse-geocode": (e, t) => U(K).reverseGeocode(e, t),
2289
- onResult: (t) => jr(e, t)
2289
+ "call-live": H($).isActive.value,
2290
+ "reverse-geocode": (e, t) => H(G).reverseGeocode(e, t),
2291
+ onResult: (t) => Lr(e, t)
2290
2292
  }, null, 8, [
2291
2293
  "part",
2292
2294
  "call-live",
2293
2295
  "reverse-geocode",
2294
2296
  "onResult"
2295
2297
  ])]),
2296
- "tool-showLocation": G(({ part: e }) => [F(U(C), {
2298
+ "tool-showLocation": W(({ part: e }) => [F(H(ee), {
2297
2299
  part: e,
2298
- "is-dark": U(Je),
2299
- "main-color": U(R)?.mainColor,
2300
- "forward-geocode": (e, t) => U(K).forwardGeocode(e, t)
2300
+ "is-dark": H(Xe),
2301
+ "main-color": H(R)?.mainColor,
2302
+ "forward-geocode": (e, t) => H(G).forwardGeocode(e, t)
2301
2303
  }, null, 8, [
2302
2304
  "part",
2303
2305
  "is-dark",
2304
2306
  "main-color",
2305
2307
  "forward-geocode"
2306
2308
  ])]),
2307
- "tool-showChart": G(({ part: e }) => [F(U(ee), {
2309
+ "tool-showChart": W(({ part: e }) => [F(H(E), {
2308
2310
  part: e,
2309
- "is-dark": U(Je)
2311
+ "is-dark": H(Xe)
2310
2312
  }, null, 8, ["part", "is-dark"])]),
2311
- "tool-showDiagram": G(({ part: e }) => [F(U(ie), {
2313
+ "tool-showDiagram": W(({ part: e }) => [F(H(ae), {
2312
2314
  part: e,
2313
- "is-dark": U(Je)
2315
+ "is-dark": H(Xe)
2314
2316
  }, null, 8, ["part", "is-dark"])]),
2315
- "tool-editSpreadsheet": G(({ part: e }) => [(z(), A(U(ae), {
2316
- key: U(g)(e),
2317
+ "tool-editSpreadsheet": W(({ part: e }) => [(z(), A(H(oe), {
2318
+ key: H(y)(e),
2317
2319
  part: e,
2318
- "file-url": dt,
2319
- preview: jn,
2320
- "latest-versions": Dr.value,
2321
- restore: kr.value
2320
+ "file-url": bt,
2321
+ preview: Ln,
2322
+ "latest-versions": Nr.value,
2323
+ restore: Fr.value
2322
2324
  }, null, 8, [
2323
2325
  "part",
2324
2326
  "latest-versions",
2325
2327
  "restore"
2326
2328
  ]))]),
2327
- "tool-editWordDocument": G(({ part: e }) => [(z(), A(U(ae), {
2328
- key: U(g)(e),
2329
+ "tool-editWordDocument": W(({ part: e }) => [(z(), A(H(oe), {
2330
+ key: H(y)(e),
2329
2331
  part: e,
2330
- "file-url": dt,
2331
- preview: jn,
2332
- "latest-versions": Dr.value,
2333
- restore: kr.value
2332
+ "file-url": bt,
2333
+ preview: Ln,
2334
+ "latest-versions": Nr.value,
2335
+ restore: Fr.value
2334
2336
  }, null, 8, [
2335
2337
  "part",
2336
2338
  "latest-versions",
2337
2339
  "restore"
2338
2340
  ]))]),
2339
- "tool-createSpreadsheet": G(({ part: e }) => [(z(), A(U(ae), {
2340
- key: U(g)(e),
2341
+ "tool-createSpreadsheet": W(({ part: e }) => [(z(), A(H(oe), {
2342
+ key: H(y)(e),
2341
2343
  part: e,
2342
- "file-url": dt,
2343
- preview: jn,
2344
- "latest-versions": Dr.value,
2345
- restore: kr.value
2344
+ "file-url": bt,
2345
+ preview: Ln,
2346
+ "latest-versions": Nr.value,
2347
+ restore: Fr.value
2346
2348
  }, null, 8, [
2347
2349
  "part",
2348
2350
  "latest-versions",
2349
2351
  "restore"
2350
2352
  ]))]),
2351
- "tool-createWordDocument": G(({ part: e }) => [(z(), A(U(ae), {
2352
- key: U(g)(e),
2353
+ "tool-createWordDocument": W(({ part: e }) => [(z(), A(H(oe), {
2354
+ key: H(y)(e),
2353
2355
  part: e,
2354
- "file-url": dt,
2355
- preview: jn,
2356
- "latest-versions": Dr.value,
2357
- restore: kr.value
2356
+ "file-url": bt,
2357
+ preview: Ln,
2358
+ "latest-versions": Nr.value,
2359
+ restore: Fr.value
2358
2360
  }, null, 8, [
2359
2361
  "part",
2360
2362
  "latest-versions",
2361
2363
  "restore"
2362
2364
  ]))]),
2363
- "tool-shareDocument": G(({ part: e }) => [(z(), A(U(oe), {
2364
- key: U(g)(e),
2365
+ "tool-shareDocument": W(({ part: e }) => [(z(), A(H(se), {
2366
+ key: H(y)(e),
2365
2367
  part: e,
2366
- "on-download": Kn
2368
+ "on-download": Qn
2367
2369
  }, null, 8, ["part"]))]),
2368
2370
  _: 1
2369
2371
  }, 8, /* @__PURE__ */ "interactive.messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.hide-reasoning.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.tasks.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
2370
2372
  _: 1
2371
2373
  }),
2372
- U(tt).length ? (z(), A(ne, {
2374
+ H(ct).length ? (z(), A(re, {
2373
2375
  key: 0,
2374
- messages: U(tt),
2375
- onEdit: U(Rt),
2376
- onRemove: U(zt)
2376
+ messages: H(ct),
2377
+ onEdit: H(Wt),
2378
+ onRemove: H(Gt)
2377
2379
  }, null, 8, [
2378
2380
  "messages",
2379
2381
  "onEdit",
2380
2382
  "onRemove"
2381
2383
  ])) : j("", !0),
2382
- N("div", qt, [
2383
- F(fe, { name: "pk-chatbot-view-chat-fade" }, {
2384
- default: G(() => [mn.value ? (z(), A(Ge, {
2384
+ N("div", Yt, [
2385
+ F(pe, { name: "pk-chatbot-view-chat-fade" }, {
2386
+ default: W(() => [bn.value ? (z(), A(qe, {
2385
2387
  key: 0,
2386
2388
  class: "pk-chatbot-view-chat__aurora",
2387
2389
  "source-selector": ".pk-chatbot-input__form",
2388
- "main-color": U(R)?.mainColor,
2389
- tones: U(R)?.glowTones,
2390
- "second-color": U(R)?.glowSecondColor
2390
+ "main-color": H(R)?.mainColor,
2391
+ tones: H(R)?.glowTones,
2392
+ "second-color": H(R)?.glowSecondColor
2391
2393
  }, null, 8, [
2392
2394
  "main-color",
2393
2395
  "tones",
@@ -2395,16 +2397,16 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2395
2397
  ])) : j("", !0)]),
2396
2398
  _: 1
2397
2399
  }),
2398
- (U(Pr) || U(Fr).length) && !U(He) && !U(P) ? (z(), A(te, {
2400
+ (H(Br) || H(Vr).length) && !H(We) && !H(P) ? (z(), A(te, {
2399
2401
  key: 0,
2400
- pending: U(Pr),
2401
- tasks: U(Fr),
2402
- stopping: U(Ir),
2403
- busy: U(Wr),
2404
- onStop: U(Rr),
2405
- onEdit: i[4] ||= (e) => qr("edit", e),
2406
- onRun: i[5] ||= (e) => qr("run", e),
2407
- onToggle: i[6] ||= (e, t) => qr(t ? "resume" : "pause", e)
2402
+ pending: H(Br),
2403
+ tasks: H(Vr),
2404
+ stopping: H(Hr),
2405
+ busy: H(Xr),
2406
+ onStop: H(Wr),
2407
+ onEdit: i[4] ||= (e) => $r("edit", e),
2408
+ onRun: i[5] ||= (e) => $r("run", e),
2409
+ onToggle: i[6] ||= (e, t) => $r(t ? "resume" : "pause", e)
2408
2410
  }, null, 8, [
2409
2411
  "pending",
2410
2412
  "tasks",
@@ -2412,98 +2414,114 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2412
2414
  "busy",
2413
2415
  "onStop"
2414
2416
  ])) : j("", !0),
2415
- Gr.value ? (z(), A(ft, {
2417
+ Zr.value ? (z(), A(ht, {
2416
2418
  key: 1,
2417
- modelValue: Kr.value,
2418
- "onUpdate:modelValue": i[7] ||= (e) => Kr.value = e,
2419
- task: Gr.value,
2420
- load: () => U(Ur).detail(Gr.value),
2421
- save: (e) => U(Ur).save(Gr.value, e),
2422
- onChanged: i[8] ||= (e) => U(Hr).notice = U(X)("profileSection.tasks.changed"),
2423
- onDelete: Jr
2419
+ modelValue: Qr.value,
2420
+ "onUpdate:modelValue": i[7] ||= (e) => Qr.value = e,
2421
+ task: Zr.value,
2422
+ load: () => H(Yr).detail(Zr.value),
2423
+ save: (e) => H(Yr).save(Zr.value, e),
2424
+ onChanged: i[8] ||= (e) => H(Jr).notice = H(X)("profileSection.tasks.changed"),
2425
+ onDelete: ei
2424
2426
  }, null, 8, [
2425
2427
  "modelValue",
2426
2428
  "task",
2427
2429
  "load",
2428
2430
  "save"
2429
2431
  ])) : j("", !0),
2430
- U(He) ? (z(), M("div", Jt, H(U(X)("message.chatErrorConversationBlocked")), 1)) : U(P) ? (z(), M("div", Yt, [
2432
+ H(nt) && !H(We) && !H(P) ? (z(), A(w, {
2433
+ key: 2,
2434
+ folders: H(tt),
2435
+ "picker-available": H(K),
2436
+ "can-connect": H(q),
2437
+ refused: H(rt),
2438
+ onConnect: i[9] ||= (e) => H(O).connectLocalFolder(),
2439
+ onConnectFiles: i[10] ||= (e) => H(O).connectLocalFolderFiles(e),
2440
+ onAllow: i[11] ||= (e) => H(O).allowLocalFolder(e),
2441
+ onRemove: i[12] ||= (e) => H(O).removeLocalFolder(e)
2442
+ }, null, 8, [
2443
+ "folders",
2444
+ "picker-available",
2445
+ "can-connect",
2446
+ "refused"
2447
+ ])) : j("", !0),
2448
+ H(We) ? (z(), M("div", Xt, Ee(H(X)("message.chatErrorConversationBlocked")), 1)) : H(P) ? (z(), M("div", Zt, [
2431
2449
  F(c, {
2432
2450
  name: "ri:eye-line",
2433
2451
  class: "shrink-0 w-18 h-18"
2434
2452
  }),
2435
- N("span", Xt, H(U(X)("chatProjects.readOnly")), 1),
2436
- U(L) ? (z(), A(l, {
2453
+ N("span", Qt, Ee(H(X)("chatProjects.readOnly")), 1),
2454
+ H(L) ? (z(), A(l, {
2437
2455
  key: 0,
2438
2456
  modifiers: "action-quiet",
2439
2457
  icon: "ri:edit-box-line",
2440
- label: U(X)("chatProjects.newChat"),
2441
- onClick: i[9] ||= (e) => U(O).startNewChat({ projectId: U(L) })
2458
+ label: H(X)("chatProjects.newChat"),
2459
+ onClick: i[13] ||= (e) => H(O).startNewChat({ projectId: H(L) })
2442
2460
  }, null, 8, ["label"])) : j("", !0)
2443
- ])) : dr.value === "idle" ? (z(), A(T, {
2444
- key: 5,
2461
+ ])) : _r.value === "idle" ? (z(), A(ne, {
2462
+ key: 6,
2445
2463
  ref_key: "inputEl",
2446
- ref: ct,
2447
- modelValue: U(Le),
2448
- "onUpdate:modelValue": i[10] ||= (e) => me(Le) ? Le.value = e : null,
2449
- "pending-attachments": U(We),
2450
- "onUpdate:pendingAttachments": i[11] ||= (e) => me(We) ? We.value = e : null,
2451
- placeholder: U(Ve),
2452
- suggestion: sn.value,
2453
- "dismissable-notice": U(fn) && U(V).messages.length <= 1 ? U(fn) : void 0,
2454
- "page-notice": ln.value,
2455
- status: Ut.value,
2456
- "max-message-length": U(R)?.maxMessageLength,
2457
- "file-upload": Y.value,
2458
- "attachment-limit-reached": U(Ke),
2459
- "attachment-notice": Yr.value,
2460
- "voice-enabled": ur.value,
2461
- "queue-enabled": U(J),
2462
- "answer-notices": dn.value,
2463
- "pointer-available": U(at),
2464
- pointing: U(ot),
2465
- pointer: lt.value,
2466
- "automatic-confirmations": U(q) === "automatic",
2464
+ ref: gt,
2465
+ modelValue: H(ze),
2466
+ "onUpdate:modelValue": i[14] ||= (e) => he(ze) ? ze.value = e : null,
2467
+ "pending-attachments": H(Ke),
2468
+ "onUpdate:pendingAttachments": i[15] ||= (e) => he(Ke) ? Ke.value = e : null,
2469
+ placeholder: H(Ue),
2470
+ suggestion: pn.value,
2471
+ "dismissable-notice": H(vn) && H(V).messages.length <= 1 ? H(vn) : void 0,
2472
+ "page-notice": hn.value,
2473
+ status: ln.value,
2474
+ "max-message-length": H(R)?.maxMessageLength,
2475
+ "file-upload": J.value,
2476
+ "attachment-limit-reached": H(Je),
2477
+ "attachment-notice": ti.value,
2478
+ "voice-enabled": gr.value,
2479
+ "queue-enabled": H(st),
2480
+ "answer-notices": _n.value,
2481
+ "pointer-available": H(ft),
2482
+ pointing: H(pt),
2483
+ pointer: vt.value,
2484
+ "automatic-confirmations": H(ot) === "automatic",
2467
2485
  "editable-images": "",
2468
2486
  "retryable-attachments": "",
2469
- onPoint: i[12] ||= (e) => U(O).pagePointerStart?.(),
2470
- onRemovePointer: i[13] ||= (e) => it.value = void 0,
2471
- onManualConfirmations: i[14] ||= (e) => U(O).setConfirmationMode("manual"),
2472
- onStopGeneration: U(ht),
2473
- onSubmit: U(pt),
2474
- onFileSelect: U(Dt),
2475
- onRemoveAttachment: U(kt),
2476
- onReplaceAttachment: U(At),
2477
- onRetryAttachment: U(jt),
2478
- onDismissAttachmentNotice: Xr,
2479
- onDismissPageNotice: U(It),
2480
- onOpenAnswerNotice: U(Bt),
2481
- onDismissAnswerNotice: U(Vt),
2482
- onVoiceStart: gr
2483
- }, pe({ _: 2 }, [e.modifier === "fullscreen" ? {
2487
+ onPoint: i[16] ||= (e) => H(O).pagePointerStart?.(),
2488
+ onRemovePointer: i[17] ||= (e) => dt.value = void 0,
2489
+ onManualConfirmations: i[18] ||= (e) => H(O).setConfirmationMode("manual"),
2490
+ onStopGeneration: H(St),
2491
+ onSubmit: H(xt),
2492
+ onFileSelect: H(Ft),
2493
+ onRemoveAttachment: H(It),
2494
+ onReplaceAttachment: H(Rt),
2495
+ onRetryAttachment: H(zt),
2496
+ onDismissAttachmentNotice: ni,
2497
+ onDismissPageNotice: H(Ht),
2498
+ onOpenAnswerNotice: H(Kt),
2499
+ onDismissAnswerNotice: H(qt),
2500
+ onVoiceStart: Sr
2501
+ }, me({ _: 2 }, [e.modifier === "fullscreen" ? {
2484
2502
  name: "prepend",
2485
- fn: G(() => [N("span", Zt, [F(E, {
2503
+ fn: W(() => [N("span", $t, [F(T, {
2486
2504
  class: "pk-chatbot-view-chat__agent-chip-avatar",
2487
2505
  "aria-hidden": "true",
2488
- "img-src": U(R)?.logo,
2489
- name: U(O).name
2490
- }, null, 8, ["img-src", "name"]), U(O).name ? (z(), M("strong", Qt, H(U(O).name), 1)) : j("", !0)])]),
2506
+ "img-src": H(R)?.logo,
2507
+ name: H(O).name
2508
+ }, null, 8, ["img-src", "name"]), H(O).name ? (z(), M("strong", en, Ee(H(O).name), 1)) : j("", !0)])]),
2491
2509
  key: "0"
2492
- } : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.suggestion.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (z(), A(wt, {
2493
- key: 4,
2494
- state: dr.value,
2495
- sample: mr,
2496
- spectrum: hr,
2497
- "remaining-seconds": U($).remainingSeconds.value,
2498
- muted: Xn.value,
2499
- error: fr.value,
2500
- "raw-error": U($).error.value,
2501
- live: U($).isActive.value,
2510
+ } : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.suggestion.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (z(), A(Et, {
2511
+ key: 5,
2512
+ state: _r.value,
2513
+ sample: br,
2514
+ spectrum: xr,
2515
+ "remaining-seconds": H($).remainingSeconds.value,
2516
+ muted: nr.value,
2517
+ error: vr.value,
2518
+ "raw-error": H($).error.value,
2519
+ live: H($).isActive.value,
2502
2520
  class: "pk-chatbot-view-chat__voice",
2503
- onToggleMute: Nr,
2504
- onHangUp: _r,
2505
- onRetry: yr,
2506
- onDismiss: vr
2521
+ onToggleMute: zr,
2522
+ onHangUp: Cr,
2523
+ onRetry: Tr,
2524
+ onDismiss: wr
2507
2525
  }, null, 8, [
2508
2526
  "state",
2509
2527
  "remaining-seconds",
@@ -2513,46 +2531,46 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2513
2531
  "live"
2514
2532
  ]))
2515
2533
  ]),
2516
- F(fe, null, {
2517
- default: G(() => [U(Yn) && Y.value?.enabled ? (z(), M("div", $t, [F(c, {
2534
+ F(pe, null, {
2535
+ default: W(() => [H(tr) && J.value?.enabled ? (z(), M("div", tn, [F(c, {
2518
2536
  name: "ri:upload-cloud-2-line",
2519
2537
  class: "pk-chatbot-view-chat__drop-overlay-icon"
2520
- }), N("span", null, H(U(X)("action.dropFile")), 1)])) : j("", !0)]),
2538
+ }), N("span", null, Ee(H(X)("action.dropFile")), 1)])) : j("", !0)]),
2521
2539
  _: 1
2522
2540
  }),
2523
- Nn.value ? (z(), A(de, {
2541
+ zn.value ? (z(), A(fe, {
2524
2542
  key: 1,
2525
- to: yn.value,
2526
- disabled: !vn.value
2527
- }, [N("aside", { class: _e(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": vn.value }]) }, [U(Z) ? (z(), A(U(se), {
2543
+ to: Tn.value,
2544
+ disabled: !wn.value
2545
+ }, [N("aside", { class: ve(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": wn.value }]) }, [H(Z) ? (z(), A(H(ce), {
2528
2546
  key: 0,
2529
2547
  mode: Q.value.mode,
2530
- "onUpdate:mode": i[15] ||= (e) => Q.value.mode = e,
2548
+ "onUpdate:mode": i[19] ||= (e) => Q.value.mode = e,
2531
2549
  sheet: Q.value.sheet,
2532
- "onUpdate:sheet": i[16] ||= (e) => Q.value.sheet = e,
2550
+ "onUpdate:sheet": i[20] ||= (e) => Q.value.sheet = e,
2533
2551
  zoom: Q.value.zoom,
2534
- "onUpdate:zoom": i[17] ||= (e) => Q.value.zoom = e,
2552
+ "onUpdate:zoom": i[21] ||= (e) => Q.value.zoom = e,
2535
2553
  fit: Q.value.fit,
2536
- "onUpdate:fit": i[18] ||= (e) => Q.value.fit = e,
2537
- kind: U(Z).kind,
2538
- filename: U(Z).filename,
2539
- version: U(Z).version,
2540
- versions: Ln.value,
2541
- "download-url": dt(U(Z).storedFileName),
2542
- preview: U(wn),
2543
- changes: U(Dn),
2544
- loading: U(Tn),
2545
- error: U(En),
2546
- restorable: zn.value,
2554
+ "onUpdate:fit": i[22] ||= (e) => Q.value.fit = e,
2555
+ kind: H(Z).kind,
2556
+ filename: H(Z).filename,
2557
+ version: H(Z).version,
2558
+ versions: Un.value,
2559
+ "download-url": bt(H(Z).storedFileName),
2560
+ preview: H(An),
2561
+ changes: H(Nn),
2562
+ loading: H(jn),
2563
+ error: H(Mn),
2564
+ restorable: Gn.value,
2547
2565
  resize: "expand",
2548
- "file-id": U(Z).fileId,
2549
- "stored-file-name": U(Z).storedFileName,
2550
- "selection-actions": Vn.value,
2551
- onVersion: Rn,
2552
- onRestore: Bn,
2553
- onResize: i[19] ||= (e) => Mn.value = !0,
2554
- onSelectionSend: Wn,
2555
- onClose: Pn
2566
+ "file-id": H(Z).fileId,
2567
+ "stored-file-name": H(Z).storedFileName,
2568
+ "selection-actions": qn.value,
2569
+ onVersion: Wn,
2570
+ onRestore: Kn,
2571
+ onResize: i[23] ||= (e) => Rn.value = !0,
2572
+ onSelectionSend: Xn,
2573
+ onClose: Bn
2556
2574
  }, null, 8, [
2557
2575
  "mode",
2558
2576
  "sheet",
@@ -2572,34 +2590,34 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2572
2590
  "stored-file-name",
2573
2591
  "selection-actions"
2574
2592
  ])) : j("", !0)], 2)], 8, ["to", "disabled"])) : j("", !0),
2575
- U(Z) && !Nn.value ? (z(), A(U(le), {
2593
+ H(Z) && !zn.value ? (z(), A(H(ue), {
2576
2594
  key: 2,
2577
2595
  mode: Q.value.mode,
2578
- "onUpdate:mode": i[20] ||= (e) => Q.value.mode = e,
2596
+ "onUpdate:mode": i[24] ||= (e) => Q.value.mode = e,
2579
2597
  sheet: Q.value.sheet,
2580
- "onUpdate:sheet": i[21] ||= (e) => Q.value.sheet = e,
2598
+ "onUpdate:sheet": i[25] ||= (e) => Q.value.sheet = e,
2581
2599
  zoom: Q.value.zoom,
2582
- "onUpdate:zoom": i[22] ||= (e) => Q.value.zoom = e,
2600
+ "onUpdate:zoom": i[26] ||= (e) => Q.value.zoom = e,
2583
2601
  fit: Q.value.fit,
2584
- "onUpdate:fit": i[23] ||= (e) => Q.value.fit = e,
2585
- target: U(Z),
2586
- versions: Ln.value,
2587
- "download-url": dt(U(Z).storedFileName),
2588
- preview: U(wn),
2589
- changes: U(Dn),
2590
- loading: U(Tn),
2591
- error: U(En),
2592
- restorable: zn.value,
2593
- resize: Sn.value ? "shrink" : void 0,
2594
- fullscreen: Cn.value,
2595
- "selection-actions": Vn.value,
2596
- working: Hn.value,
2597
- onVersion: Rn,
2598
- onRestore: Bn,
2599
- onResize: i[24] ||= (e) => Mn.value = !1,
2600
- onSelectionSend: Wn,
2601
- onShowChat: Un,
2602
- onClose: Pn
2602
+ "onUpdate:fit": i[27] ||= (e) => Q.value.fit = e,
2603
+ target: H(Z),
2604
+ versions: Un.value,
2605
+ "download-url": bt(H(Z).storedFileName),
2606
+ preview: H(An),
2607
+ changes: H(Nn),
2608
+ loading: H(jn),
2609
+ error: H(Mn),
2610
+ restorable: Gn.value,
2611
+ resize: On.value ? "shrink" : void 0,
2612
+ fullscreen: kn.value,
2613
+ "selection-actions": qn.value,
2614
+ working: Jn.value,
2615
+ onVersion: Wn,
2616
+ onRestore: Kn,
2617
+ onResize: i[28] ||= (e) => Rn.value = !1,
2618
+ onSelectionSend: Xn,
2619
+ onShowChat: Yn,
2620
+ onClose: Bn
2603
2621
  }, null, 8, [
2604
2622
  "mode",
2605
2623
  "sheet",
@@ -2622,6 +2640,6 @@ var qt = { class: "pk-chatbot-view-chat__input-stage" }, Jt = {
2622
2640
  };
2623
2641
  }
2624
2642
  });
2625
- export { wt as a, pt as c, ze as d, Dt as i, ft as l, Kt as n, _t as o, Wt as r, mt as s, on as t, Ge as u };
2643
+ export { Et as a, gt as c, Ve as d, kt as i, ht as l, Jt as n, yt as o, Kt as r, _t as s, X as t, qe as u };
2626
2644
 
2627
- //# sourceMappingURL=PkChatbotViewChat-DW1a9ZNl.js.map
2645
+ //# sourceMappingURL=PkChatbotViewChat-DPk9LjX-.js.map