@8wave/ai-elements 0.98.0 → 0.99.0-beta.2

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 (178) hide show
  1. package/README.md +24 -5
  2. package/{dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js → dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js} +379 -362
  3. package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +1 -0
  4. package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js → PkToolRequestGeolocation-B73evGBg.js} +2 -2
  5. package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js.map → PkToolRequestGeolocation-B73evGBg.js.map} +1 -1
  6. package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js → PkToolRequestOAuthConnection-BWP5dsK_.js} +3 -3
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js.map → PkToolRequestOAuthConnection-BWP5dsK_.js.map} +1 -1
  8. package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js → PkToolShowArtifact-bYYaMGxq.js} +7 -7
  9. package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js.map → PkToolShowArtifact-bYYaMGxq.js.map} +1 -1
  10. package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js → PkToolShowCalendarEvent-DdEWaTj-.js} +4 -4
  11. package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js.map → PkToolShowCalendarEvent-DdEWaTj-.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js → PkToolShowComparison-Dcar7HPW.js} +4 -4
  13. package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js.map → PkToolShowComparison-Dcar7HPW.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js → PkToolShowContactForm-DtjVW-n6.js} +13 -13
  15. package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js.map → PkToolShowContactForm-DtjVW-n6.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js → PkToolShowDiagram-X35nsoIY.js} +8 -8
  17. package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js.map → PkToolShowDiagram-X35nsoIY.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js → PkToolShowEmail-jVoK8qEh.js} +4 -4
  19. package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js.map → PkToolShowEmail-jVoK8qEh.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowForm-BNV4Ja6g.js → PkToolShowForm-BP8asXtz.js} +123 -97
  21. package/dist/_chunks/PkToolShowForm-BP8asXtz.js.map +1 -0
  22. package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js → PkToolShowImageGallery-WQL3T4Hr.js} +2 -2
  23. package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js.map → PkToolShowImageGallery-WQL3T4Hr.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js → PkToolShowLocation-w2t7lKpb.js} +4 -4
  25. package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js.map → PkToolShowLocation-w2t7lKpb.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js → PkToolShowMessage-BPo7WPim.js} +4 -4
  27. package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js.map → PkToolShowMessage-BPo7WPim.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowProductList-puiPFItN.js → PkToolShowProductList-BbY4ni7Y.js} +2 -2
  29. package/dist/_chunks/{PkToolShowProductList-puiPFItN.js.map → PkToolShowProductList-BbY4ni7Y.js.map} +1 -1
  30. package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js → PkToolShowQrCode-CN0ms27N.js} +4 -4
  31. package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js.map → PkToolShowQrCode-CN0ms27N.js.map} +1 -1
  32. package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js → PkToolShowSources-D2tBcx7n.js} +18 -18
  33. package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js.map → PkToolShowSources-D2tBcx7n.js.map} +1 -1
  34. package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js → PkToolShowSuggestedReply-Cdh_elSh.js} +2 -2
  35. package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js.map → PkToolShowSuggestedReply-Cdh_elSh.js.map} +1 -1
  36. package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js → PkToolShowVideo-D3aU5FMO.js} +2 -2
  37. package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js.map → PkToolShowVideo-D3aU5FMO.js.map} +1 -1
  38. package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js → PkToolShowWeather-CzanXIJp.js} +3 -3
  39. package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js.map → PkToolShowWeather-CzanXIJp.js.map} +1 -1
  40. package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js → PkToolShowWebPages-DkMJrWmT.js} +2 -2
  41. package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js.map → PkToolShowWebPages-DkMJrWmT.js.map} +1 -1
  42. package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js → VvCheckbox.es-CRhIKQNR.js} +2 -2
  43. package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js.map → VvCheckbox.es-CRhIKQNR.js.map} +1 -1
  44. package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js → VvCheckboxGroup.es-gOy2kM1Y.js} +5 -5
  45. package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js.map → VvCheckboxGroup.es-gOy2kM1Y.js.map} +1 -1
  46. package/dist/_chunks/{VvCombobox.es-CFA-K-cQ.js → VvCombobox.es-BOwH3LmO.js} +9 -9
  47. package/dist/_chunks/VvCombobox.es-BOwH3LmO.js.map +1 -0
  48. package/dist/_chunks/{VvInputText.es-csEQ-bSG.js → VvInputText.es-D8nXroKO.js} +536 -513
  49. package/dist/_chunks/VvInputText.es-D8nXroKO.js.map +1 -0
  50. package/dist/_chunks/{VvRadio.es-BpymhC73.js → VvRadio.es-Djy5J33A.js} +2 -2
  51. package/dist/_chunks/{VvRadio.es-BpymhC73.js.map → VvRadio.es-Djy5J33A.js.map} +1 -1
  52. package/dist/_chunks/{VvRadioGroup.es-CSNzOJKx.js → VvRadioGroup.es-DQq3JYCR.js} +5 -5
  53. package/dist/_chunks/VvRadioGroup.es-DQq3JYCR.js.map +1 -0
  54. package/dist/_chunks/{VvSelect.es-CjKMd0nH.js → VvSelect.es-CE4x1ww0.js} +4 -4
  55. package/dist/_chunks/{VvSelect.es-CjKMd0nH.js.map → VvSelect.es-CE4x1ww0.js.map} +1 -1
  56. package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js +1129 -0
  57. package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js.map +1 -0
  58. package/dist/_chunks/{dist-BNET2z7b.js → dist-CvMCBce7.js} +39 -21
  59. package/dist/_chunks/dist-CvMCBce7.js.map +1 -0
  60. package/dist/_chunks/dot-prop-CObyt75F.js +141 -0
  61. package/dist/_chunks/dot-prop-CObyt75F.js.map +1 -0
  62. package/dist/_chunks/{floating-ui.vue-CIKvCpTA.js → floating-ui.vue-BacoFpVq.js} +278 -305
  63. package/dist/_chunks/floating-ui.vue-BacoFpVq.js.map +1 -0
  64. package/dist/_chunks/{index.es-u1dF1xg2.js → index.es-DpqfagWZ.js} +12 -12
  65. package/dist/_chunks/{index.es-u1dF1xg2.js.map → index.es-DpqfagWZ.js.map} +1 -1
  66. package/dist/_chunks/{index.es-BYny0uhz.js → index.es-_oXVRjHy.js} +2352 -2329
  67. package/dist/_chunks/index.es-_oXVRjHy.js.map +1 -0
  68. package/dist/ai-elements.es.js +4818 -5765
  69. package/dist/ai-elements.es.js.map +1 -1
  70. package/dist-vue/PkChatbot.js +1 -1
  71. package/dist-vue/PkChatbotAuth.js +1 -1
  72. package/dist-vue/PkChatbotEmptyState.js +1 -1
  73. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  74. package/dist-vue/PkChatbotInput.js +1 -1
  75. package/dist-vue/PkChatbotMessages.js +1 -1
  76. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  77. package/dist-vue/PkChatbotSteps.js +1 -1
  78. package/dist-vue/PkChatbotViewChat.js +1 -1
  79. package/dist-vue/PkChatbotViewConversations.js +1 -1
  80. package/dist-vue/PkChatbotViewFiles.js +1 -1
  81. package/dist-vue/PkChatbotViewProfile.js +1 -1
  82. package/dist-vue/_chunks/PkChatbot-Bf5uY3cO.js +236 -0
  83. package/dist-vue/_chunks/{PkChatbot-DHkhT0Jf.js.map → PkChatbot-Bf5uY3cO.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js → PkChatbotAuth-BGn2MDYD.js} +2 -2
  85. package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js.map → PkChatbotAuth-BGn2MDYD.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js → PkChatbotEmptyState-CPqLqXek.js} +2 -2
  87. package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js.map → PkChatbotEmptyState-CPqLqXek.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js → PkChatbotFeedbackForm-C_y__RH8.js} +2 -2
  89. package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js.map → PkChatbotFeedbackForm-C_y__RH8.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js → PkChatbotInput-jvb0vuak.js} +2 -2
  91. package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js.map → PkChatbotInput-jvb0vuak.js.map} +1 -1
  92. package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js +752 -0
  93. package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js.map +1 -0
  94. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js → PkChatbotStepToolDetail-BVI72gyx.js} +2 -2
  95. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js.map → PkChatbotStepToolDetail-BVI72gyx.js.map} +1 -1
  96. package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
  97. package/dist-vue/_chunks/{PkChatbotSteps-BpqdFhsG.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkChatbotViewChat-C08TsXiL.js → PkChatbotViewChat-c0Ecpzoc.js} +68 -68
  99. package/dist-vue/_chunks/PkChatbotViewChat-c0Ecpzoc.js.map +1 -0
  100. package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
  101. package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
  103. package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
  105. package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js.map → PkChatbotViewProfile-DuLwYpGZ.js.map} +1 -1
  106. package/{dist/_chunks/PkStreamingMarkdown-Djw604Ny.js → dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js} +344 -347
  107. package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +1 -0
  108. package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js → PkToolShowArtifact-COwSXmF4.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js.map → PkToolShowArtifact-COwSXmF4.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js → PkToolShowContactForm-DRRtCCxB.js} +10 -10
  111. package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js.map → PkToolShowContactForm-DRRtCCxB.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkToolShowForm-C-mWyeka.js → PkToolShowForm-j7Ha-0X3.js} +128 -102
  113. package/dist-vue/_chunks/PkToolShowForm-j7Ha-0X3.js.map +1 -0
  114. package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js → PkToolShowSources-BVLw4W5l.js} +43 -43
  115. package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js.map → PkToolShowSources-BVLw4W5l.js.map} +1 -1
  116. package/dist-vue/_chunks/{createChatbotApiClient-BOBdBxmf.js → createChatbotApiClient-IH6wBh4s.js} +148 -160
  117. package/dist-vue/_chunks/createChatbotApiClient-IH6wBh4s.js.map +1 -0
  118. package/dist-vue/_chunks/{index.es-XfWQ82pb.js → index.es-Bk1O0p8N.js} +166 -156
  119. package/dist-vue/_chunks/index.es-Bk1O0p8N.js.map +1 -0
  120. package/dist-vue/_chunks/{useChatbotStore-BJ-EDmND.js → useChatbotStore-C3uKi2FS.js} +114 -106
  121. package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
  122. package/dist-vue/_chunks/{utils-BMa8jwJS.js → utils-Cru8TJxe.js} +48 -30
  123. package/dist-vue/_chunks/utils-Cru8TJxe.js.map +1 -0
  124. package/dist-vue/api.js +1 -1
  125. package/dist-vue/composables.js +3 -3
  126. package/dist-vue/index.js +3732 -3213
  127. package/dist-vue/index.js.map +1 -1
  128. package/dist-vue/locales.js +43 -7
  129. package/dist-vue/packages/components/src/PkCheckboxField.d.ts +45 -0
  130. package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
  131. package/dist-vue/packages/components/src/{chat/PkToolRequestConfirm.d.ts → PkOfflineScreen.d.ts} +10 -3
  132. package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
  133. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +18 -3
  134. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +24 -2
  135. package/dist-vue/packages/components/src/chat/PkToolApprovalBadge.d.ts +4 -0
  136. package/dist-vue/packages/components/src/chat/PkToolApprovalCard.d.ts +35 -0
  137. package/dist-vue/packages/components/src/chat/PkToolApprovalPreviewMessage.d.ts +11 -0
  138. package/dist-vue/packages/components/src/chat/index.d.ts +2 -1
  139. package/dist-vue/packages/components/src/chat/toolApprovalPreviews.d.ts +12 -0
  140. package/dist-vue/packages/components/src/chat/toolComponentMap.d.ts +5 -3
  141. package/dist-vue/packages/components/src/chat/useChatScroll.d.ts +6 -0
  142. package/dist-vue/packages/components/src/chat/utils.d.ts +13 -0
  143. package/dist-vue/packages/components/src/index.d.ts +4 -1
  144. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +70 -1
  145. package/dist-vue/packages/composable/src/index.d.ts +1 -0
  146. package/dist-vue/packages/composable/src/useConnectivity.d.ts +28 -0
  147. package/dist-vue/packages/models/src/schema/Agent.d.ts +129 -0
  148. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +30 -0
  149. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +30 -0
  150. package/dist-vue/style.css +1 -1
  151. package/package.json +3 -3
  152. package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +0 -1
  153. package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js +0 -48
  154. package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js.map +0 -1
  155. package/dist/_chunks/PkToolShowForm-BNV4Ja6g.js.map +0 -1
  156. package/dist/_chunks/VvCombobox.es-CFA-K-cQ.js.map +0 -1
  157. package/dist/_chunks/VvInputText.es-csEQ-bSG.js.map +0 -1
  158. package/dist/_chunks/VvRadioGroup.es-CSNzOJKx.js.map +0 -1
  159. package/dist/_chunks/VvTextarea.es-eEyRRpuT.js +0 -1109
  160. package/dist/_chunks/VvTextarea.es-eEyRRpuT.js.map +0 -1
  161. package/dist/_chunks/dist-BNET2z7b.js.map +0 -1
  162. package/dist/_chunks/dot-prop-BXrC9bAX.js +0 -131
  163. package/dist/_chunks/dot-prop-BXrC9bAX.js.map +0 -1
  164. package/dist/_chunks/floating-ui.vue-CIKvCpTA.js.map +0 -1
  165. package/dist/_chunks/index.es-BYny0uhz.js.map +0 -1
  166. package/dist-vue/_chunks/PkChatbot-DHkhT0Jf.js +0 -236
  167. package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js +0 -630
  168. package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js.map +0 -1
  169. package/dist-vue/_chunks/PkChatbotSteps-BpqdFhsG.js +0 -172
  170. package/dist-vue/_chunks/PkChatbotViewChat-C08TsXiL.js.map +0 -1
  171. package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
  172. package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js +0 -48
  173. package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js.map +0 -1
  174. package/dist-vue/_chunks/PkToolShowForm-C-mWyeka.js.map +0 -1
  175. package/dist-vue/_chunks/createChatbotApiClient-BOBdBxmf.js.map +0 -1
  176. package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
  177. package/dist-vue/_chunks/useChatbotStore-BJ-EDmND.js.map +0 -1
  178. package/dist-vue/_chunks/utils-BMa8jwJS.js.map +0 -1
@@ -73,27 +73,12 @@ function ve(e) {
73
73
  }
74
74
  return e;
75
75
  }
76
- var S = ne(r(), _e, ve).optional();
77
- function ye(e, t) {
78
- if (!t) return !1;
79
- let [n = ""] = e.split("/");
80
- if (n === "openai") {
81
- let e = t.openai;
82
- return !!(e?.reasoningEffort && e.reasoningEffort !== "none");
83
- }
84
- if (n === "anthropic") {
85
- let e = t.anthropic;
86
- return !!(e && e.type !== "disabled");
87
- }
88
- if (n === "google") {
89
- let e = t.google;
90
- return !e || e.thinkingBudget === 0 ? !1 : !!(e.thinkingLevel && e.thinkingLevel !== "minimal" || e.thinkingBudget || e.includeThoughts);
91
- }
92
- return n === "deepseek" && t.deepseek?.type === "enabled";
93
- }
94
- var C = /* @__PURE__ */ function(e) {
76
+ var S = ne(r(), _e, ve).optional(), C = /* @__PURE__ */ function(e) {
95
77
  return e.Geocode = "geocode", e.GetWeather = "getWeather", e.ReadDocumentFile = "readDocumentFile", e.RequestConfirm = "requestConfirm", e.RequestGeolocation = "requestGeolocation", e.RetrieveRevisedAnswers = "retrieveRevisedAnswers", e.SearchInKnowledgeBase = "searchInKnowledgeBase", e.SearchInUserFiles = "searchInUserFiles", e.UserMemory = "userMemory", e.RunWorker = "runWorker", e.FetchTeamsChannelHistory = "fetchTeamsChannelHistory", e.ShowArtifact = "showArtifact", e.ShowCalendarEvent = "showCalendarEvent", e.ShowComparison = "showComparison", e.ShowContactForm = "showContactForm", e.ShowDiagram = "showDiagram", e.ShowEmail = "showEmail", e.ShowImageGallery = "showImageGallery", e.ShowLocation = "showLocation", e.ShowMessage = "showMessage", e.ShowForm = "showForm", e.ShowProductList = "showProductList", e.ShowQrCode = "showQrCode", e.ShowSources = "showSources", e.ShowSuggestedReply = "showSuggestedReply", e.ShowVideo = "showVideo", e.ShowWeather = "showWeather", e.ShowWebPages = "showWebPages", e.ShowMultipleChoice = "showMultipleChoice", e;
96
78
  }({});
79
+ function ye(e) {
80
+ return !be(e) && e !== C.RequestGeolocation;
81
+ }
97
82
  function be(e) {
98
83
  return e === C.RequestConfirm || e === C.ShowArtifact || e === C.ShowCalendarEvent || e === C.ShowComparison || e === C.ShowContactForm || e === C.ShowDiagram || e === C.ShowEmail || e === C.ShowImageGallery || e === C.ShowLocation || e === C.ShowMessage || e === C.ShowForm || e === C.ShowMultipleChoice || e === C.ShowProductList || e === C.ShowQrCode || e === C.ShowSources || e === C.ShowSuggestedReply || e === C.ShowVideo || e === C.ShowWeather || e === C.ShowWebPages;
99
84
  }
@@ -120,7 +105,7 @@ function Se(e) {
120
105
  var w = o({
121
106
  maxSteps: s().int().min(1).max(10).optional().default(5),
122
107
  maxOptionsPerStep: s().int().min(2).max(10).optional().default(5)
123
- }), T = /* @__PURE__ */ function(e) {
108
+ }), T = o({ mode: u(["optional", "required"]).optional().default("optional") }), E = o({ mode: u(["optional", "required"]).optional().default("required") }), D = /* @__PURE__ */ function(e) {
124
109
  return e.Perplexity = "perplexity", e.Parallel = "parallel", e.Native = "native", e;
125
110
  }({}), Ce = o({
126
111
  maxResults: s().int().min(1).max(20).optional(),
@@ -163,13 +148,13 @@ var w = o({
163
148
  }).optional()
164
149
  }).optional(),
165
150
  google: o({}).optional()
166
- }), E = o({
151
+ }), O = o({
167
152
  enabled: d().default(!1),
168
- provider: u(T).optional().default(T.Native),
153
+ provider: u(D).optional().default(D.Native),
169
154
  perplexity: Ce.optional(),
170
155
  parallel: we.optional(),
171
156
  native: Te.optional()
172
- }), D = o({ useAllUserKb: d().default(!1) }), O = o({ useAllUserFiles: d().default(!1) }), k = o({
157
+ }), k = o({ useAllUserKb: d().default(!1) }), A = o({ useAllUserFiles: d().default(!1) }), j = o({ tools: n(f()).default([]) }), M = o({
173
158
  disabled: n(u(C)).default([
174
159
  C.UserMemory,
175
160
  C.SearchInUserFiles,
@@ -177,10 +162,13 @@ var w = o({
177
162
  C.FetchTeamsChannelHistory
178
163
  ]),
179
164
  showForm: w.optional().default(() => w.parse({})),
180
- webSearch: E.optional().default(() => E.parse({})),
181
- userMemory: D.optional().default(() => D.parse({})),
182
- userFiles: O.optional().default(() => O.parse({}))
183
- }), A = o({
165
+ suggestedReply: T.optional().default(() => T.parse({})),
166
+ showSources: E.optional().default(() => E.parse({})),
167
+ webSearch: O.optional().default(() => O.parse({})),
168
+ userMemory: k.optional().default(() => k.parse({})),
169
+ userFiles: A.optional().default(() => A.parse({})),
170
+ approval: j.optional().default(() => j.parse({}))
171
+ }), N = o({
184
172
  freshness: o({
185
173
  enabled: d().default(!1),
186
174
  scale: s().int().min(86400).max(31536e3).default(7776e3),
@@ -202,12 +190,12 @@ var w = o({
202
190
  limit: s().positive().max(100).optional().default(10),
203
191
  maxStepCount: s().int().min(1).max(40).optional().default(10),
204
192
  reasoning: S,
205
- ranking: A.optional().default(() => A.parse({}))
206
- }), j = ne(r(), t(f(), f()), (e) => typeof e == "string" ? { it: e } : e), M = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", N = /* @__PURE__ */ function(e) {
193
+ ranking: N.optional().default(() => N.parse({}))
194
+ }), P = ne(r(), t(f(), f()), (e) => typeof e == "string" ? { it: e } : e), F = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", I = /* @__PURE__ */ function(e) {
207
195
  return e.InlineModule = "inline-module", e.ScriptSrc = "script-src", e.DynamicImport = "dynamic-import", e;
208
- }({}), P = /* @__PURE__ */ function(e) {
196
+ }({}), L = /* @__PURE__ */ function(e) {
209
197
  return e.Frontoffice = "frontoffice", e.App = "app", e.Widget = "widget", e;
210
- }({}), F = Object.values(P), I = o({
198
+ }({}), R = Object.values(L), z = o({
211
199
  media: ee.optional(),
212
200
  logo: f().optional(),
213
201
  theme: u([
@@ -222,23 +210,23 @@ var w = o({
222
210
  "black"
223
211
  ]).optional().default("auto"),
224
212
  useColorsForAgentHeader: d().optional().default(!1),
225
- initialMessage: j.optional(),
226
- greeting: n(j).min(1).max(10).optional(),
227
- messagePlaceholder: j.optional(),
228
- dismissableNotice: j.optional(),
229
- footerMessage: j.optional(),
230
- privacyPolicyNotice: j.optional(),
213
+ initialMessage: P.optional(),
214
+ greeting: n(P).min(1).max(10).optional(),
215
+ messagePlaceholder: P.optional(),
216
+ dismissableNotice: P.optional(),
217
+ footerMessage: P.optional(),
218
+ privacyPolicyNotice: P.optional(),
231
219
  interactiveLogin: d().optional().default(!0),
232
220
  welcomePopup: d().optional().default(!1),
233
221
  floatingButtonPosition: u(["left", "right"]).optional().default("right"),
234
222
  maxMessageLength: s().int().positive().optional(),
235
- widgetUrl: p().default(M),
223
+ widgetUrl: p().default(F),
236
224
  loadDelay: s().int().min(0).max(3e4).optional().default(0),
237
- loaderStrategy: u(N).optional().default(N.InlineModule),
225
+ loaderStrategy: u(I).optional().default(I.InlineModule),
238
226
  customCss: f().optional(),
239
227
  smoothStream: d().optional().default(!1),
240
228
  showExtendedSteps: d().optional().default(!1)
241
- }), L = o({
229
+ }), B = o({
242
230
  enabled: d().default(!1),
243
231
  maxFileSizeBytes: s().int().positive().max(104857600).optional().default(20971520),
244
232
  allowedMimeTypes: n(f().regex(te)).optional().default([
@@ -253,19 +241,19 @@ var w = o({
253
241
  ]),
254
242
  maxFilesPerMessage: s().int().positive().max(10).optional().default(5),
255
243
  maxFilesPerChat: s().int().positive().max(50).optional().default(20)
256
- }), R = o({
244
+ }), V = o({
257
245
  zeroDataRetention: d().default(!0),
258
246
  disallowPromptTraining: d().default(!0),
259
247
  providerTimeoutMs: s().int().min(1e3).max(789e3).optional()
260
- }), z = o({
248
+ }), H = o({
261
249
  model: Ee,
262
- interface: I,
263
- tools: k.optional().default(() => k.parse({})),
264
- fileUpload: L.optional().default(() => L.parse({})),
265
- gatewayOptions: R.optional().default(() => R.parse({})),
266
- channels: n(u(P)).optional().default(() => [...F]),
250
+ interface: z,
251
+ tools: M.optional().default(() => M.parse({})),
252
+ fileUpload: B.optional().default(() => B.parse({})),
253
+ gatewayOptions: V.optional().default(() => V.parse({})),
254
+ channels: n(u(L)).optional().default(() => [...R]),
267
255
  externalContextSchema: re.optional()
268
- }), B = o({
256
+ }), U = o({
269
257
  rateLimits: o({
270
258
  minuteRateLimit: s().int().min(0).optional(),
271
259
  hourRateLimit: s().int().min(0).optional(),
@@ -282,8 +270,8 @@ o({
282
270
  fallbackModels: n(f()).default([]),
283
271
  status: u(v).default(v.Draft),
284
272
  visibility: u(y).default(y.Organization),
285
- settings: z,
286
- security: B.nullish(),
273
+ settings: H,
274
+ security: U.nullish(),
287
275
  type: u(b).default(b.Chat),
288
276
  organizationId: f()
289
277
  }), i(() => o({
@@ -294,8 +282,8 @@ o({
294
282
  fallbackModels: n(f()).nullable().default([]),
295
283
  status: u(v).default(v.Draft),
296
284
  visibility: u(y).default(y.Organization),
297
- settings: z,
298
- security: B.nullable(),
285
+ settings: H,
286
+ security: U.nullable(),
299
287
  type: u(b).default(b.Chat),
300
288
  organizationId: f(),
301
289
  createdAt: m(),
@@ -308,42 +296,42 @@ o({
308
296
  outOfBudget: d().optional().default(!1),
309
297
  outOfBudgetReason: f().optional().default("")
310
298
  }));
311
- var V = o({
299
+ var De = o({
312
300
  id: f(),
313
301
  name: f(),
314
302
  status: u(v),
315
303
  visibility: u(y),
316
304
  organizationId: f(),
317
- interface: I,
305
+ interface: z,
318
306
  createdAt: m(),
319
307
  updatedAt: m(),
320
- capabilities: o({ fileUpload: L }),
321
- channels: n(u(P)).default(() => [...F])
322
- }), De = I.pick({
308
+ capabilities: o({ fileUpload: B }),
309
+ channels: n(u(L)).default(() => [...R])
310
+ }), Oe = z.pick({
323
311
  logo: !0,
324
312
  mainColor: !0,
325
313
  textColor: !0,
326
314
  theme: !0,
327
315
  floatingButtonPosition: !0,
328
316
  customCss: !0
329
- }), Oe = V.pick({
317
+ }), ke = De.pick({
330
318
  id: !0,
331
319
  name: !0,
332
320
  organizationId: !0
333
- }).extend({ interface: De }), H = o({
321
+ }).extend({ interface: Oe }), Ae = o({
334
322
  emailPassword: d(),
335
323
  google: d(),
336
324
  microsoft: d()
337
- }), U = o({
325
+ }), je = o({
338
326
  requiresAuth: a(!1),
339
- agent: V,
327
+ agent: De,
340
328
  branding: c()
341
329
  }), W = o({
342
330
  requiresAuth: a(!0),
343
331
  agent: c(),
344
- branding: Oe
332
+ branding: ke
345
333
  });
346
- l("requiresAuth", [U, W]), l("requiresAuth", [U.extend({ authMethods: H }), W.extend({ authMethods: H })]), o({
334
+ l("requiresAuth", [je, W]), l("requiresAuth", [je.extend({ authMethods: Ae }), W.extend({ authMethods: Ae })]), o({
347
335
  id: e(),
348
336
  agentIds: n(e())
349
337
  }), o({
@@ -365,41 +353,41 @@ l("requiresAuth", [U, W]), l("requiresAuth", [U.extend({ authMethods: H }), W.ex
365
353
  });
366
354
  //#endregion
367
355
  //#region ../../packages/models/src/schema/ConversationAnalysis.ts
368
- var ke = /* @__PURE__ */ function(e) {
356
+ var Me = /* @__PURE__ */ function(e) {
369
357
  return e.Harassment = "harassment", e.HateSpeech = "hate_speech", e.SexualContent = "sexual_content", e.SelfHarm = "self_harm", e.Violence = "violence", e.PromptInjection = "prompt_injection", e.DataExtraction = "data_extraction", e.Spam = "spam", e.OffTopicPersistent = "off_topic_persistent", e.Impersonation = "impersonation", e;
370
- }({}), Ae = /* @__PURE__ */ function(e) {
358
+ }({}), Ne = /* @__PURE__ */ function(e) {
371
359
  return e.Low = "low", e.Medium = "medium", e.High = "high", e;
372
- }({}), je = /* @__PURE__ */ function(e) {
360
+ }({}), Pe = /* @__PURE__ */ function(e) {
373
361
  return e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e;
374
- }({}), Me = /* @__PURE__ */ function(e) {
362
+ }({}), Fe = /* @__PURE__ */ function(e) {
375
363
  return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
376
- }({}), Ne = /* @__PURE__ */ function(e) {
364
+ }({}), Ie = /* @__PURE__ */ function(e) {
377
365
  return e.High = "high", e.Medium = "medium", e.Low = "low", e.Disengaged = "disengaged", e;
378
- }({}), Pe = /* @__PURE__ */ function(e) {
366
+ }({}), Le = /* @__PURE__ */ function(e) {
379
367
  return e.Polite = "polite", e.Neutral = "neutral", e.Impatient = "impatient", e.Aggressive = "aggressive", e.Abusive = "abusive", e;
380
- }({}), Fe = /* @__PURE__ */ function(e) {
368
+ }({}), Re = /* @__PURE__ */ function(e) {
381
369
  return e.Positive = "positive", e.Neutral = "neutral", e.Negative = "negative", e.Frustrated = "frustrated", e.Excited = "excited", e;
382
- }({}), Ie = /* @__PURE__ */ function(e) {
370
+ }({}), ze = /* @__PURE__ */ function(e) {
383
371
  return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
384
- }({}), Le = o({
372
+ }({}), Be = o({
385
373
  analyzedAt: m().describe("When the analysis was generated."),
386
- analysisTrigger: u(Me).describe("What triggered this analysis run."),
387
- sentiment: u(Fe).describe("Overall user sentiment in the conversation."),
388
- sentimentTrend: u(Ie).describe("How the user sentiment evolved during the conversation."),
389
- userTone: u(Pe).describe("Predominant tone of the user messages."),
374
+ analysisTrigger: u(Fe).describe("What triggered this analysis run."),
375
+ sentiment: u(Re).describe("Overall user sentiment in the conversation."),
376
+ sentimentTrend: u(ze).describe("How the user sentiment evolved during the conversation."),
377
+ userTone: u(Le).describe("Predominant tone of the user messages."),
390
378
  language: f().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
391
379
  topics: n(f().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
392
380
  userAbuseDetected: d().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
393
- userAbuseCategories: n(u(ke)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
394
- userAbuseConfidence: u(Ae).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
381
+ userAbuseCategories: n(u(Me)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
382
+ userAbuseConfidence: u(Ne).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
395
383
  userAbuseSummary: f().max(500).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
396
384
  llmIssueDetected: d().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
397
- llmIssueCategories: n(u(je)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
385
+ llmIssueCategories: n(u(Pe)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
398
386
  llmIssueSummary: f().max(500).optional().describe("Brief description of the LLM quality issue detected. Always write in English. Set only if llmIssueDetected is true."),
399
- userEngagement: u(Ne).describe("Level of user engagement in the conversation."),
387
+ userEngagement: u(Ie).describe("Level of user engagement in the conversation."),
400
388
  conversationGoalMet: d().optional().describe("Whether the user seems to have achieved what they came for. Leave undefined if unclear."),
401
389
  riskScore: s().int().min(0).max(100).describe("Overall risk score (0 = safe, 100 = critical). Combination of abuse severity, persistence and escalation.")
402
- }), Re = o({
390
+ }), Ve = o({
403
391
  dateTime: f().optional(),
404
392
  timezone: f().optional(),
405
393
  language: f().optional(),
@@ -429,7 +417,7 @@ var ke = /* @__PURE__ */ function(e) {
429
417
  geolocationLongitude: s().optional(),
430
418
  geolocationAccuracy: s().optional(),
431
419
  geolocationCity: f().optional()
432
- }), ze = l("type", [o({
420
+ }), He = l("type", [o({
433
421
  type: a("text"),
434
422
  text: f()
435
423
  }), o({
@@ -445,7 +433,7 @@ o({
445
433
  id: f().optional(),
446
434
  role: u(["assistant", "user"]),
447
435
  content: f(),
448
- parts: n(ze),
436
+ parts: n(He),
449
437
  createdAt: f().optional()
450
438
  })),
451
439
  model: f().optional(),
@@ -456,20 +444,20 @@ o({
456
444
  frequencyPenalty: s().min(-2).max(2).optional(),
457
445
  searchMode: u(x).optional(),
458
446
  limit: s().optional(),
459
- ranking: A.optional(),
447
+ ranking: N.optional(),
460
448
  reasoning: S,
461
- webSearch: E.optional(),
449
+ webSearch: O.optional(),
462
450
  maxStepCount: s().int().min(1).max(40).optional(),
463
451
  disabledTools: n(u(C)).optional(),
464
452
  fallbackModels: n(f()).optional(),
465
- gatewayOptions: R.partial().optional(),
466
- deviceContext: Re.optional(),
453
+ gatewayOptions: V.partial().optional(),
454
+ deviceContext: Ve.optional(),
467
455
  externalContext: t(f(), r()).optional(),
468
456
  smoothStream: d().optional()
469
457
  });
470
- var Be = /* @__PURE__ */ function(e) {
458
+ var Ue = /* @__PURE__ */ function(e) {
471
459
  return e.SevereAbuse = "severe_abuse", e.HighRiskScore = "high_risk_score", e.RepeatedWarnings = "repeated_warnings", e;
472
- }({}), Ve = o({
460
+ }({}), We = o({
473
461
  id: f(),
474
462
  messages: n(r()),
475
463
  title: f().nullable(),
@@ -486,10 +474,10 @@ var Be = /* @__PURE__ */ function(e) {
486
474
  deleted: d(),
487
475
  deletedAt: m().nullable(),
488
476
  deletedBy: f().nullable(),
489
- conversationAnalysis: Le.nullable().optional(),
477
+ conversationAnalysis: Be.nullable().optional(),
490
478
  blocked: d(),
491
479
  blockedAt: m().nullable(),
492
- blockedReasonCode: u(Be).nullable(),
480
+ blockedReasonCode: u(Ue).nullable(),
493
481
  blockedReason: f().nullable(),
494
482
  warningCount: s(),
495
483
  lastMessageAt: m()
@@ -508,7 +496,7 @@ o({
508
496
  startDate: f().optional(),
509
497
  endDate: f().optional()
510
498
  });
511
- var He = o({
499
+ var Ge = o({
512
500
  id: f(),
513
501
  agentId: f().optional(),
514
502
  organizationId: f(),
@@ -520,7 +508,7 @@ var He = o({
520
508
  lastMessageAt: m(),
521
509
  messages: n(r()),
522
510
  blocked: d()
523
- }), Ue = class {
511
+ }), Ke = class {
524
512
  constructor(e, t) {
525
513
  this.operator = e, this.value = t, Object.defineProperty(this, "_notes", { writable: !0 });
526
514
  }
@@ -530,18 +518,18 @@ var He = o({
530
518
  addNote(e) {
531
519
  this._notes = this._notes || [], this._notes.push(e);
532
520
  }
533
- }, We = class extends Ue {}, G = class extends We {
521
+ }, qe = class extends Ke {}, G = class extends qe {
534
522
  constructor(e, t) {
535
523
  if (!Array.isArray(t)) throw Error(`"${e}" operator expects to receive an array of conditions`);
536
524
  super(e, t);
537
525
  }
538
- }, Ge = "__itself__", K = class extends Ue {
526
+ }, Je = "__itself__", K = class extends Ke {
539
527
  constructor(e, t, n) {
540
528
  super(e, n), this.field = t;
541
529
  }
542
- }, Ke = new We("__null__", null);
530
+ }, Ye = new qe("__null__", null);
543
531
  Object.hasOwn;
544
- function qe(e, t) {
532
+ function Xe(e, t) {
545
533
  let n;
546
534
  for (let r = 0, i = t.length; r < i; r++) {
547
535
  let i = t[r];
@@ -558,69 +546,69 @@ function qe(e, t) {
558
546
  }
559
547
  return n || t;
560
548
  }
561
- function Je(e, t) {
549
+ function Ze(e, t) {
562
550
  if (t.length === 1) return t[0];
563
551
  if (t.length === 0) return new G(e, t);
564
- let n = qe(e, t);
552
+ let n = Xe(e, t);
565
553
  return n.length === 1 ? n[0] : (n.length, new G(e, n));
566
554
  }
567
555
  Object.defineProperty(Object.create(null), "__@type@__", { value: "ignore value" });
568
556
  //#endregion
569
557
  //#region ../../node_modules/.pnpm/@ucast+mongo@3.0.0/node_modules/@ucast/mongo/dist/esm/index.mjs
570
- var Ye = Object.defineProperty;
558
+ var Qe = Object.defineProperty;
571
559
  ((e, t) => {
572
560
  let n = {};
573
- for (var r in e) Ye(n, r, {
561
+ for (var r in e) Qe(n, r, {
574
562
  get: e[r],
575
563
  enumerable: !0
576
564
  });
577
- return t || Ye(n, Symbol.toStringTag, { value: "Module" }), n;
565
+ return t || Qe(n, Symbol.toStringTag, { value: "Module" }), n;
578
566
  })({
579
- $all: () => it,
580
- $and: () => Xe,
581
- $elemMatch: () => tt,
582
- $eq: () => ut,
583
- $exists: () => ot,
567
+ $all: () => st,
568
+ $and: () => $e,
569
+ $elemMatch: () => it,
570
+ $eq: () => pt,
571
+ $exists: () => lt,
584
572
  $gt: () => J,
585
- $gte: () => st,
573
+ $gte: () => ut,
586
574
  $in: () => q,
587
- $lt: () => ct,
588
- $lte: () => lt,
589
- $mod: () => at,
590
- $ne: () => dt,
591
- $nin: () => rt,
592
- $nor: () => Qe,
593
- $not: () => et,
594
- $options: () => pt,
595
- $or: () => Ze,
596
- $regex: () => ft,
597
- $size: () => nt,
598
- $where: () => mt
575
+ $lt: () => dt,
576
+ $lte: () => ft,
577
+ $mod: () => ct,
578
+ $ne: () => mt,
579
+ $nin: () => ot,
580
+ $nor: () => tt,
581
+ $not: () => rt,
582
+ $options: () => gt,
583
+ $or: () => et,
584
+ $regex: () => ht,
585
+ $size: () => at,
586
+ $where: () => _t
599
587
  });
600
- var Xe = {
588
+ var $e = {
601
589
  type: "compound",
602
- validate: gt,
590
+ validate: yt,
603
591
  parse(e, t, n) {
604
- let r = $e(e, t, n);
605
- return Je(e.name, r);
592
+ let r = nt(e, t, n);
593
+ return Ze(e.name, r);
606
594
  }
607
- }, Ze = Xe, Qe = {
595
+ }, et = $e, tt = {
608
596
  type: "compound",
609
- validate: gt,
597
+ validate: yt,
610
598
  parse(e, t, n) {
611
- let r = $e(e, t, n);
599
+ let r = nt(e, t, n);
612
600
  return new G(e.name, r);
613
601
  }
614
602
  };
615
- function $e(e, t, n) {
603
+ function nt(e, t, n) {
616
604
  let r = Array(t.length);
617
605
  for (let i = 0; i < t.length; i++) {
618
606
  let a = t[i];
619
- vt(e, a, i), r[i] = n.parse(a);
607
+ xt(e, a, i), r[i] = n.parse(a);
620
608
  }
621
609
  return r;
622
610
  }
623
- var et = {
611
+ var rt = {
624
612
  type: "field",
625
613
  validate(e, t) {
626
614
  if (!(t && (t instanceof RegExp || t.constructor === Object))) throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`);
@@ -629,33 +617,33 @@ var et = {
629
617
  let r = t instanceof RegExp ? new K("regex", n.field, t) : n.parse(t, n);
630
618
  return new G(e.name, [r]);
631
619
  }
632
- }, tt = {
620
+ }, it = {
633
621
  type: "field",
634
622
  validate(e, t) {
635
623
  if (!t || t.constructor !== Object) throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`);
636
624
  },
637
625
  parse(e, t, { parse: n, field: r, hasOperators: i }) {
638
- let a = i(t) ? n(t, { field: Ge }) : n(t);
626
+ let a = i(t) ? n(t, { field: Je }) : n(t);
639
627
  return new K(e.name, r, a);
640
628
  }
641
- }, nt = {
629
+ }, at = {
642
630
  type: "field",
643
631
  validate: Y("number")
644
632
  }, q = {
645
633
  type: "field",
646
- validate: ht
647
- }, rt = q, it = q, at = {
634
+ validate: vt
635
+ }, ot = q, st = q, ct = {
648
636
  type: "field",
649
637
  validate(e, t) {
650
638
  if (!Array.isArray(t) || t.length !== 2) throw Error(`"${e.name}" expects an array with 2 numeric elements`);
651
639
  }
652
- }, ot = {
640
+ }, lt = {
653
641
  type: "field",
654
642
  validate: Y("boolean")
655
- }, st = {
643
+ }, ut = {
656
644
  type: "field",
657
- validate: _t
658
- }, J = st, ct = J, lt = J, ut = { type: "field" }, dt = ut, ft = {
645
+ validate: bt
646
+ }, J = ut, dt = J, ft = J, pt = { type: "field" }, mt = pt, ht = {
659
647
  type: "field",
660
648
  validate(e, t) {
661
649
  if (!(t instanceof RegExp) && typeof t != "string") throw Error(`"${e.name}" expects value to be a regular expression or a string that represents regular expression`);
@@ -664,20 +652,20 @@ var et = {
664
652
  let r = typeof t == "string" ? new RegExp(t, n.query.$options || "") : t;
665
653
  return new K(e.name, n.field, r);
666
654
  }
667
- }, pt = {
655
+ }, gt = {
668
656
  type: "field",
669
- parse: () => Ke
670
- }, mt = {
657
+ parse: () => Ye
658
+ }, _t = {
671
659
  type: "document",
672
660
  validate: Y("function")
673
661
  };
674
- function ht(e, t) {
662
+ function vt(e, t) {
675
663
  if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
676
664
  }
677
- function gt(e, t) {
678
- if (ht(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
665
+ function yt(e, t) {
666
+ if (vt(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
679
667
  }
680
- function _t(e, t) {
668
+ function bt(e, t) {
681
669
  if (!(typeof t == "string" || typeof t == "number" || t instanceof Date)) throw Error(`"${e.name}" expects value to be comparable (i.e., string, number or date)`);
682
670
  }
683
671
  function Y(e) {
@@ -685,7 +673,7 @@ function Y(e) {
685
673
  if (typeof n !== e) throw Error(`"${t.name}" expects value to be a "${e}"`);
686
674
  };
687
675
  }
688
- function vt(e, t, n) {
676
+ function xt(e, t, n) {
689
677
  let r = t;
690
678
  if (!r || r.constructor !== Object) throw Error(`"${e.name}" expects item at index ${n} to be an object`);
691
679
  }
@@ -695,7 +683,7 @@ var X = /* @__PURE__ */ function(e) {
695
683
  return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
696
684
  }({}), Z = /* @__PURE__ */ function(e) {
697
685
  return e.All = "all", e.Todo = "todo", e.User = "user", e.Chat = "chat", e.Agent = "agent", e.SubAgent = "subAgent", e.Document = "document", e.AgentDocument = "agent_document", e.AgentAnalytic = "agent_analytic", e.McpServer = "mcp_server", e.Media = "media", e.RevisedAnswer = "revised_answer", e.Organization = "organization", e.Member = "member", e.Lead = "lead", e.MessageFeedback = "message_feedback", e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Invitation = "invitation", e.Crawler = "crawler", e.ReasoningChat = "reasoning_chat", e.TimeTrackerChat = "time_tracker_chat", e.OrganizationExternalAuth = "organization_external_auth", e.AgentEndpoint = "agent_endpoint", e.AgentEndpointLog = "agent_endpoint_log", e.AgentApiTool = "agent_api_tool", e.DocumentFolder = "document_folder", e.Integration = "integration", e.Notification = "notification", e.PlatformConnection = "platform_connection", e;
698
- }({}), yt = (e) => e ? [
686
+ }({}), St = (e) => e ? [
699
687
  {
700
688
  subject: Z.Chat,
701
689
  action: "create"
@@ -727,21 +715,21 @@ var X = /* @__PURE__ */ function(e) {
727
715
  action: "read",
728
716
  condition: { createdBy: { $eq: e.user?.id } }
729
717
  }
730
- ] : [], bt = ce({ modify: [
718
+ ] : [], Ct = ce({ modify: [
731
719
  "read",
732
720
  "update",
733
721
  "delete"
734
- ] }), xt = se({ $or: Ze });
735
- new oe(yt(), {
736
- conditionsMatcher: xt,
737
- resolveAction: bt,
722
+ ] }), wt = se({ $or: et });
723
+ new oe(St(), {
724
+ conditionsMatcher: wt,
725
+ resolveAction: Ct,
738
726
  fieldMatcher: (e) => (t) => e.includes(t)
739
727
  });
740
728
  var Q = le(de);
741
729
  Q.newRole(ue.statements), Q.newRole(fe.statements), Q.newRole(_.statements), Q.newRole(_.statements);
742
730
  //#endregion
743
731
  //#region ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
744
- async function St(e, t, n = {}) {
732
+ async function Tt(e, t, n = {}) {
745
733
  try {
746
734
  let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
747
735
  method: "POST",
@@ -759,12 +747,12 @@ async function St(e, t, n = {}) {
759
747
  }
760
748
  //#endregion
761
749
  //#region ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
762
- var Ct = Ve.or(He);
750
+ var Et = We.or(Ge);
763
751
  function $(e) {
764
- let t = Ct.safeParse(e);
752
+ let t = Et.safeParse(e);
765
753
  return t.success ? t.data : e;
766
754
  }
767
- function wt(e) {
755
+ function Dt(e) {
768
756
  let t = e.basePath ? ae(e.basePath) : `/api/v1/${X.Public}`, n = `${g(e.baseUrl)}${t}`, r = `${g(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${X.Frontoffice}`)}`;
769
757
  async function i(t, r, i = "json") {
770
758
  let a = await fetch(`${n}${t}`, {
@@ -912,7 +900,7 @@ function wt(e) {
912
900
  return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/authorize?${n}`);
913
901
  },
914
902
  resolveShortUrls(t) {
915
- return St(e.baseUrl, t, {
903
+ return Tt(e.baseUrl, t, {
916
904
  headers: e.headers?.(),
917
905
  credentials: e.credentials
918
906
  });
@@ -920,6 +908,6 @@ function wt(e) {
920
908
  };
921
909
  }
922
910
  //#endregion
923
- export { L as a, M as c, be as d, ye as f, P as i, T as l, X as n, N as o, C as r, b as s, wt as t, Se as u };
911
+ export { B as a, F as c, Se as d, be as f, L as i, D as l, X as n, I as o, C as r, b as s, Dt as t, ye as u };
924
912
 
925
- //# sourceMappingURL=createChatbotApiClient-BOBdBxmf.js.map
913
+ //# sourceMappingURL=createChatbotApiClient-IH6wBh4s.js.map