@8wave/ai-elements 0.73.0 → 0.75.0

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 (220) hide show
  1. package/README.md +62 -15
  2. package/dist/_chunks/{PkStreamingMarkdown-orhL2kzD.js → PkStreamingMarkdown-rIdQh5_D.js} +20 -20
  3. package/dist/_chunks/PkStreamingMarkdown-rIdQh5_D.js.map +1 -0
  4. package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js → PkToolShowArtifact-CeLgwZBA.js} +6 -6
  5. package/dist/_chunks/{PkToolShowArtifact-D-dU41VG.js.map → PkToolShowArtifact-CeLgwZBA.js.map} +1 -1
  6. package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js → PkToolShowCalendarEvent-cQpAAE3a.js} +10 -10
  7. package/dist/_chunks/{PkToolShowCalendarEvent-B33fWbkk.js.map → PkToolShowCalendarEvent-cQpAAE3a.js.map} +1 -1
  8. package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js → PkToolShowComparison-Cu-zT8-Z.js} +6 -6
  9. package/dist/_chunks/{PkToolShowComparison-CcKHsr36.js.map → PkToolShowComparison-Cu-zT8-Z.js.map} +1 -1
  10. package/dist/_chunks/PkToolShowContactForm-CqoSVvjG.js +1658 -0
  11. package/dist/_chunks/PkToolShowContactForm-CqoSVvjG.js.map +1 -0
  12. package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js → PkToolShowEmail-oLGym0R9.js} +10 -10
  13. package/dist/_chunks/{PkToolShowEmail-BOivL2p_.js.map → PkToolShowEmail-oLGym0R9.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js → PkToolShowImageGallery-CDXSL1Mg.js} +2 -2
  15. package/dist/_chunks/{PkToolShowImageGallery-Dy0vFEU-.js.map → PkToolShowImageGallery-CDXSL1Mg.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowLocation-US6u26ra.js → PkToolShowLocation-BtRUdoEw.js} +7 -7
  17. package/dist/_chunks/{PkToolShowLocation-US6u26ra.js.map → PkToolShowLocation-BtRUdoEw.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js → PkToolShowMessage-tJQGRhce.js} +9 -9
  19. package/dist/_chunks/{PkToolShowMessage-Cjslxq94.js.map → PkToolShowMessage-tJQGRhce.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js → PkToolShowMultipleChoice-CtVvdyDg.js} +3 -3
  21. package/dist/_chunks/{PkToolShowMultipleChoice-BEwiJCLu.js.map → PkToolShowMultipleChoice-CtVvdyDg.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js → PkToolShowProductList-D_k6CDdb.js} +2 -2
  23. package/dist/_chunks/{PkToolShowProductList-D3Qe8yQM.js.map → PkToolShowProductList-D_k6CDdb.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js → PkToolShowQrCode-S1j_T8wQ.js} +6 -6
  25. package/dist/_chunks/{PkToolShowQrCode-B64sdI0N.js.map → PkToolShowQrCode-S1j_T8wQ.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowSources-B2rf94fU.js → PkToolShowSources-CroItMtG.js} +6 -5
  27. package/dist/_chunks/PkToolShowSources-CroItMtG.js.map +1 -0
  28. package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js → PkToolShowSuggestedReply-BRa5Lpti.js} +2 -2
  29. package/dist/_chunks/{PkToolShowSuggestedReply-BGWA08C7.js.map → PkToolShowSuggestedReply-BRa5Lpti.js.map} +1 -1
  30. package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js → PkToolShowWeather-CUpCJ8Nj.js} +3 -3
  31. package/dist/_chunks/{PkToolShowWeather-ClMzD04y.js.map → PkToolShowWeather-CUpCJ8Nj.js.map} +1 -1
  32. package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js → PkToolShowWebPages-f-dHyxfD.js} +2 -2
  33. package/dist/_chunks/{PkToolShowWebPages-BCqywwEK.js.map → PkToolShowWebPages-f-dHyxfD.js.map} +1 -1
  34. package/dist/_chunks/{VvCheckbox.es-kmMsWlkU.js → VvCheckbox.es-BF8Mdg0O.js} +2 -2
  35. package/dist/_chunks/{VvCheckbox.es-kmMsWlkU.js.map → VvCheckbox.es-BF8Mdg0O.js.map} +1 -1
  36. package/dist/_chunks/{VvCheckboxGroup.es-BRRmuO9h.js → VvCheckboxGroup.es-BJc8MmJ3.js} +109 -109
  37. package/dist/_chunks/{VvCheckboxGroup.es-BRRmuO9h.js.map → VvCheckboxGroup.es-BJc8MmJ3.js.map} +1 -1
  38. package/dist/_chunks/{VvCombobox.es-pTM53Z4B.js → VvCombobox.es-ILRHqAye.js} +256 -256
  39. package/dist/_chunks/{VvCombobox.es-pTM53Z4B.js.map → VvCombobox.es-ILRHqAye.js.map} +1 -1
  40. package/dist/_chunks/{VvInputText.es-DO39OSWk.js → VvInputText.es-CDnMeO26.js} +190 -190
  41. package/dist/_chunks/{VvInputText.es-DO39OSWk.js.map → VvInputText.es-CDnMeO26.js.map} +1 -1
  42. package/dist/_chunks/{VvRadio.es-BpQAJbon.js → VvRadio.es-C2p5vvAx.js} +2 -2
  43. package/dist/_chunks/{VvRadio.es-BpQAJbon.js.map → VvRadio.es-C2p5vvAx.js.map} +1 -1
  44. package/dist/_chunks/{VvRadioGroup.es-BSBrmx9w.js → VvRadioGroup.es-6GlWuDjY.js} +10 -10
  45. package/dist/_chunks/{VvRadioGroup.es-BSBrmx9w.js.map → VvRadioGroup.es-6GlWuDjY.js.map} +1 -1
  46. package/dist/_chunks/{VvSelect.es-DALpUK5j.js → VvSelect.es-i4lO9onq.js} +6 -6
  47. package/dist/_chunks/{VvSelect.es-DALpUK5j.js.map → VvSelect.es-i4lO9onq.js.map} +1 -1
  48. package/dist/_chunks/{VvTextarea.es-C9dwYLOG.js → VvTextarea.es-CGpiCS4S.js} +248 -248
  49. package/dist/_chunks/{VvTextarea.es-C9dwYLOG.js.map → VvTextarea.es-CGpiCS4S.js.map} +1 -1
  50. package/dist/_chunks/{dist-DtF6poRc.js → dist-BTnzL-m0.js} +131 -119
  51. package/dist/_chunks/dist-BTnzL-m0.js.map +1 -0
  52. package/dist/_chunks/{index.es-Z3Hu-QIb.js → index.es-CUjDCkXD.js} +2428 -1558
  53. package/dist/_chunks/{index.es-Z3Hu-QIb.js.map → index.es-CUjDCkXD.js.map} +1 -1
  54. package/dist/_chunks/{schemas-Bp3a8tYV.js → schemas-aPiXCaCc.js} +1309 -945
  55. package/dist/_chunks/schemas-aPiXCaCc.js.map +1 -0
  56. package/dist/ai-elements.es.js +4746 -3352
  57. package/dist/ai-elements.es.js.map +1 -1
  58. package/dist-vue/PkChatbot.js +1 -1
  59. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  60. package/dist-vue/PkChatbotFilePreview.js +1 -1
  61. package/dist-vue/PkChatbotInput.js +1 -1
  62. package/dist-vue/PkChatbotMessages.js +1 -1
  63. package/dist-vue/PkChatbotViewChat.js +1 -1
  64. package/dist-vue/PkChatbotViewConversations.js +1 -1
  65. package/dist-vue/PkChatbotViewProfile.js +1 -1
  66. package/dist-vue/_chunks/{Media-Bic_vfSX.js → Media-CXQSoKqt.js} +3 -3
  67. package/dist-vue/_chunks/{Media-Bic_vfSX.js.map → Media-CXQSoKqt.js.map} +1 -1
  68. package/dist-vue/_chunks/PkChatbot-DAzGc7al.js +190 -0
  69. package/dist-vue/_chunks/{PkChatbot-D5_ytfqS.js.map → PkChatbot-DAzGc7al.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js → PkChatbotFeedbackForm-DvUzirPP.js} +3 -3
  71. package/dist-vue/_chunks/{PkChatbotFeedbackForm-CUnS-WyR.js.map → PkChatbotFeedbackForm-DvUzirPP.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js → PkChatbotFilePreview-DHzuGtz5.js} +2 -2
  73. package/dist-vue/_chunks/{PkChatbotFilePreview-JSpi3pmN.js.map → PkChatbotFilePreview-DHzuGtz5.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js → PkChatbotInput-C5QSmt21.js} +3 -3
  75. package/dist-vue/_chunks/{PkChatbotInput-ODPhsqZt.js.map → PkChatbotInput-C5QSmt21.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkChatbotMessages-CMLqkhmb.js → PkChatbotMessages-dsjB0-26.js} +16 -16
  77. package/dist-vue/_chunks/PkChatbotMessages-dsjB0-26.js.map +1 -0
  78. package/dist-vue/_chunks/{PkChatbotViewChat-wLCypxNG.js → PkChatbotViewChat-CjoezIyz.js} +9 -9
  79. package/dist-vue/_chunks/{PkChatbotViewChat-wLCypxNG.js.map → PkChatbotViewChat-CjoezIyz.js.map} +1 -1
  80. package/dist-vue/_chunks/PkChatbotViewConversations-DSQu6vY1.js +163 -0
  81. package/dist-vue/_chunks/PkChatbotViewConversations-DSQu6vY1.js.map +1 -0
  82. package/dist-vue/_chunks/{PkChatbotViewProfile-CXmmVXrD.js → PkChatbotViewProfile-BJJiaG9H.js} +2 -2
  83. package/dist-vue/_chunks/{PkChatbotViewProfile-CXmmVXrD.js.map → PkChatbotViewProfile-BJJiaG9H.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js → PkRelativeTime-WZ2aPcp_.js} +1 -1
  85. package/dist-vue/_chunks/{PkRelativeTime-jP41qAJ5.js.map → PkRelativeTime-WZ2aPcp_.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkStreamingMarkdown-CtiMH6FD.js → PkStreamingMarkdown-BAhC3uGK.js} +20 -20
  87. package/dist-vue/_chunks/PkStreamingMarkdown-BAhC3uGK.js.map +1 -0
  88. package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js → PkToolShowArtifact-RzrDPcEQ.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowArtifact-C2DgB_1z.js.map → PkToolShowArtifact-RzrDPcEQ.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js → PkToolShowContactForm-r_GgO-ZX.js} +4 -4
  91. package/dist-vue/_chunks/{PkToolShowContactForm-BzzbXuhh.js.map → PkToolShowContactForm-r_GgO-ZX.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js → PkToolShowImageGallery-B7Bt6ZGv.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowImageGallery-DQXrJYop.js.map → PkToolShowImageGallery-B7Bt6ZGv.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js → PkToolShowLocation-DteWf0Cs.js} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowLocation-McDIqI8y.js.map → PkToolShowLocation-DteWf0Cs.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js → PkToolShowMultipleChoice-DZXfWtQp.js} +1 -1
  97. package/dist-vue/_chunks/{PkToolShowMultipleChoice-DW3m6VbJ.js.map → PkToolShowMultipleChoice-DZXfWtQp.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js → PkToolShowProductList-CtqWK0x4.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowProductList-BDSJs7bn.js.map → PkToolShowProductList-CtqWK0x4.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkToolShowSources-D5cBZxwQ.js → PkToolShowSources-DK2DCvU3.js} +6 -5
  101. package/dist-vue/_chunks/PkToolShowSources-DK2DCvU3.js.map +1 -0
  102. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js → PkToolShowSuggestedReply-30m9yWDL.js} +1 -1
  103. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Dm3BTWYg.js.map → PkToolShowSuggestedReply-30m9yWDL.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js → PkToolShowWebPages-DZIdrdWs.js} +2 -2
  105. package/dist-vue/_chunks/{PkToolShowWebPages-DnYVhLVU.js.map → PkToolShowWebPages-DZIdrdWs.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js → PkUrl-CGbSBfuP.js} +1 -1
  107. package/dist-vue/_chunks/{PkUrl-CH4pWBR8.js.map → PkUrl-CGbSBfuP.js.map} +1 -1
  108. package/dist-vue/_chunks/{ZodError-Ca0wCsGp.js → ZodError-C_est8SY.js} +2 -2
  109. package/dist-vue/_chunks/{ZodError-Ca0wCsGp.js.map → ZodError-C_est8SY.js.map} +1 -1
  110. package/dist-vue/_chunks/{createChatbotApiClient-2ynLWELM.js → createChatbotApiClient-f86KwRcq.js} +141 -119
  111. package/dist-vue/_chunks/createChatbotApiClient-f86KwRcq.js.map +1 -0
  112. package/dist-vue/_chunks/{dist-Bs6dYy7x.js → dist-21vPGg1O.js} +3 -3
  113. package/dist-vue/_chunks/{dist-Bs6dYy7x.js.map → dist-21vPGg1O.js.map} +1 -1
  114. package/dist-vue/_chunks/{dist-Bb1zRSg4.js → dist-BGXTbYew2.js} +4 -4
  115. package/dist-vue/_chunks/dist-BGXTbYew2.js.map +1 -0
  116. package/dist-vue/_chunks/{dist-BrlD3co0.js → dist-BL9cumqH.js} +2 -2
  117. package/dist-vue/_chunks/{dist-BrlD3co0.js.map → dist-BL9cumqH.js.map} +1 -1
  118. package/dist-vue/_chunks/{dist-B9Pw4_a5.js → dist-BU-VgsYM.js} +3 -3
  119. package/dist-vue/_chunks/{dist-B9Pw4_a5.js.map → dist-BU-VgsYM.js.map} +1 -1
  120. package/dist-vue/_chunks/{dist-D-tjAaHK.js → dist-BU5m1pTR.js} +3 -3
  121. package/dist-vue/_chunks/{dist-D-tjAaHK.js.map → dist-BU5m1pTR.js.map} +1 -1
  122. package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js → dist-BbP2I_Or.js} +2 -2
  123. package/dist-vue/_chunks/{dist-Dn0cKZ5Q.js.map → dist-BbP2I_Or.js.map} +1 -1
  124. package/dist-vue/_chunks/{dist-Cvsv0YEw.js → dist-BvmTki6w.js} +3 -3
  125. package/dist-vue/_chunks/{dist-Cvsv0YEw.js.map → dist-BvmTki6w.js.map} +1 -1
  126. package/dist-vue/_chunks/{dist-QzbLuLIV.js → dist-C3dPzENq.js} +3 -3
  127. package/dist-vue/_chunks/{dist-QzbLuLIV.js.map → dist-C3dPzENq.js.map} +1 -1
  128. package/dist-vue/_chunks/{dist-BMWOJZqC.js → dist-C6AWJq9a.js} +2 -2
  129. package/dist-vue/_chunks/{dist-BMWOJZqC.js.map → dist-C6AWJq9a.js.map} +1 -1
  130. package/dist-vue/_chunks/{dist-BQCdUoYc.js → dist-CGNGkvWf.js} +4 -4
  131. package/dist-vue/_chunks/{dist-BQCdUoYc.js.map → dist-CGNGkvWf.js.map} +1 -1
  132. package/dist-vue/_chunks/{dist-JOgG1zY3.js → dist-CIN_Avbm.js} +1 -1
  133. package/dist-vue/_chunks/{dist-JOgG1zY3.js.map → dist-CIN_Avbm.js.map} +1 -1
  134. package/dist-vue/_chunks/{dist-NKG-Bt-Q.js → dist-CePpgudw.js} +3 -3
  135. package/dist-vue/_chunks/{dist-NKG-Bt-Q.js.map → dist-CePpgudw.js.map} +1 -1
  136. package/dist-vue/_chunks/{dist-C13mHkC-.js → dist-CtMo7ig_.js} +2 -2
  137. package/dist-vue/_chunks/{dist-C13mHkC-.js.map → dist-CtMo7ig_.js.map} +1 -1
  138. package/dist-vue/_chunks/{dist-DucfoJQX.js → dist-CwG072cD.js} +3 -3
  139. package/dist-vue/_chunks/{dist-DucfoJQX.js.map → dist-CwG072cD.js.map} +1 -1
  140. package/dist-vue/_chunks/{dist-_4yQQX_L.js → dist-DFvVVU0-.js} +2 -2
  141. package/dist-vue/_chunks/{dist-_4yQQX_L.js.map → dist-DFvVVU0-.js.map} +1 -1
  142. package/dist-vue/_chunks/{dist-C_tRbeXQ.js → dist-DGz57kzK.js} +2 -2
  143. package/dist-vue/_chunks/{dist-C_tRbeXQ.js.map → dist-DGz57kzK.js.map} +1 -1
  144. package/dist-vue/_chunks/{dist-C2tC3pDh.js → dist-DT30Xa-D.js} +2 -2
  145. package/dist-vue/_chunks/{dist-C2tC3pDh.js.map → dist-DT30Xa-D.js.map} +1 -1
  146. package/dist-vue/_chunks/{dist-DNn7FqmI.js → dist-DoRhRpjL.js} +2 -2
  147. package/dist-vue/_chunks/{dist-DNn7FqmI.js.map → dist-DoRhRpjL.js.map} +1 -1
  148. package/dist-vue/_chunks/{dist-CQmgfFIN.js → dist-GnhLE5-A.js} +4 -4
  149. package/dist-vue/_chunks/{dist-CQmgfFIN.js.map → dist-GnhLE5-A.js.map} +1 -1
  150. package/dist-vue/_chunks/{dist-1ToEz3Zq.js → dist-QzWOn2Kx.js} +3 -3
  151. package/dist-vue/_chunks/{dist-1ToEz3Zq.js.map → dist-QzWOn2Kx.js.map} +1 -1
  152. package/dist-vue/_chunks/{dist-e9UFeG14.js → dist-uYEYs0EJ.js} +2 -2
  153. package/dist-vue/_chunks/{dist-e9UFeG14.js.map → dist-uYEYs0EJ.js.map} +1 -1
  154. package/dist-vue/_chunks/{dist-BpT8aqtS.js → dist-ukeBjdwq.js} +4 -4
  155. package/dist-vue/_chunks/{dist-BpT8aqtS.js.map → dist-ukeBjdwq.js.map} +1 -1
  156. package/dist-vue/_chunks/{dist-BHTSdHeX.js → dist-wLB8N32T.js} +3 -3
  157. package/dist-vue/_chunks/{dist-BHTSdHeX.js.map → dist-wLB8N32T.js.map} +1 -1
  158. package/dist-vue/_chunks/{index.es-BnOT0fHY.js → index.es-_14zrNZB.js} +4 -4
  159. package/dist-vue/_chunks/{index.es-BnOT0fHY.js.map → index.es-_14zrNZB.js.map} +1 -1
  160. package/dist-vue/_chunks/{schemas-sa2dDEGb.js → schemas-Clx4oKCB.js} +1309 -945
  161. package/dist-vue/_chunks/schemas-Clx4oKCB.js.map +1 -0
  162. package/dist-vue/_chunks/{useChatbotStore-Im8Xjwte.js → useChatbotStore-CJlkoNn7.js} +756 -679
  163. package/dist-vue/_chunks/useChatbotStore-CJlkoNn7.js.map +1 -0
  164. package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js → useLightbox-1sB7fmFb.js} +1 -1
  165. package/dist-vue/_chunks/{useLightbox-BiZUwsmB.js.map → useLightbox-1sB7fmFb.js.map} +1 -1
  166. package/dist-vue/_chunks/{utils-DO7emdsn.js → utils-BegUBK7s.js} +1 -1
  167. package/dist-vue/_chunks/{utils-DO7emdsn.js.map → utils-BegUBK7s.js.map} +1 -1
  168. package/dist-vue/api.js +1 -1
  169. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +9 -7
  170. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +8 -8
  171. package/dist-vue/apps/web-component/src/lib.d.ts +29 -0
  172. package/dist-vue/apps/web-component/src/main.d.ts +0 -0
  173. package/dist-vue/apps/web-component/src/modules/applicationInsights.d.ts +38 -0
  174. package/dist-vue/composables.js +3 -3
  175. package/dist-vue/index.js +3680 -3664
  176. package/dist-vue/index.js.map +1 -1
  177. package/dist-vue/locales.js +56 -20
  178. package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +5 -0
  179. package/dist-vue/packages/auth/src/anonymous-reauth-plugin.d.ts +11 -0
  180. package/dist-vue/packages/auth/src/external-auth-plugin.d.ts +2 -0
  181. package/dist-vue/packages/auth/src/index.d.ts +3477 -8
  182. package/dist-vue/packages/auth/src/media-helpers.d.ts +13 -0
  183. package/dist-vue/packages/auth/src/organization-auto-join.d.ts +1 -0
  184. package/dist-vue/packages/components/src/PkEditorMarkdown.d.ts +1 -1
  185. package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +2 -0
  186. package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
  187. package/dist-vue/packages/components/src/PkEditorWyswyg.d.ts +1 -1
  188. package/dist-vue/packages/components/src/PkFieldset.d.ts +3 -3
  189. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -3
  190. package/dist-vue/packages/components/src/chat/PkEditorChannels.d.ts +16 -0
  191. package/dist-vue/packages/components/src/composables/index.d.ts +3 -0
  192. package/dist-vue/packages/components/src/composables/useChatbotError.d.ts +11 -11
  193. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
  194. package/dist-vue/packages/composable/src/constants.d.ts +5 -0
  195. package/dist-vue/packages/composable/src/useDialog.d.ts +3 -3
  196. package/dist-vue/packages/composable/src/useSettingsStore.d.ts +4 -5
  197. package/dist-vue/packages/models/src/schema/Agent.d.ts +37 -27
  198. package/dist-vue/packages/models/src/schema/Chat.d.ts +6 -0
  199. package/dist-vue/packages/models/src/schema/Document.d.ts +2 -0
  200. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +8 -6
  201. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +13 -11
  202. package/dist-vue/style.css +1 -1
  203. package/package.json +3 -3
  204. package/dist/_chunks/PkStreamingMarkdown-orhL2kzD.js.map +0 -1
  205. package/dist/_chunks/PkToolShowContactForm-SmOSbCsp.js +0 -1103
  206. package/dist/_chunks/PkToolShowContactForm-SmOSbCsp.js.map +0 -1
  207. package/dist/_chunks/PkToolShowSources-B2rf94fU.js.map +0 -1
  208. package/dist/_chunks/dist-DtF6poRc.js.map +0 -1
  209. package/dist/_chunks/schemas-Bp3a8tYV.js.map +0 -1
  210. package/dist-vue/_chunks/PkChatbot-D5_ytfqS.js +0 -190
  211. package/dist-vue/_chunks/PkChatbotMessages-CMLqkhmb.js.map +0 -1
  212. package/dist-vue/_chunks/PkChatbotViewConversations-B5qBiqo4.js +0 -40
  213. package/dist-vue/_chunks/PkChatbotViewConversations-B5qBiqo4.js.map +0 -1
  214. package/dist-vue/_chunks/PkStreamingMarkdown-CtiMH6FD.js.map +0 -1
  215. package/dist-vue/_chunks/PkToolShowSources-D5cBZxwQ.js.map +0 -1
  216. package/dist-vue/_chunks/createChatbotApiClient-2ynLWELM.js.map +0 -1
  217. package/dist-vue/_chunks/dist-Bb1zRSg4.js.map +0 -1
  218. package/dist-vue/_chunks/schemas-sa2dDEGb.js.map +0 -1
  219. package/dist-vue/_chunks/useChatbotStore-Im8Xjwte.js.map +0 -1
  220. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -6
@@ -1,52 +1,52 @@
1
1
  import { t as e } from "./rolldown-runtime-D9KsE1-l.js";
2
- import { t } from "./createChatbotApiClient-2ynLWELM.js";
3
- import { C as n, S as r, _ as i, a, b as o, c as s, d as c, g as l, i as u, m as d, n as f, o as p, p as m, r as h, s as g, u as ee, v as _, y as v } from "./schemas-sa2dDEGb.js";
2
+ import { t } from "./createChatbotApiClient-f86KwRcq.js";
3
+ import { C as n, S as r, _ as i, a, b as o, c as s, d as c, g as l, i as u, m as d, n as f, o as p, p as m, r as h, s as g, u as ee, v as _, y as v } from "./schemas-Clx4oKCB.js";
4
4
  import { _ as te, g as ne, h as re, s as ie } from "./src-EtGd6cRz.js";
5
- import { a as y, i as b, n as x, r as S, t as C } from "./ZodError-Ca0wCsGp.js";
5
+ import { a as y, i as b, n as x, r as S, t as C } from "./ZodError-C_est8SY.js";
6
6
  import { t as ae } from "./useSafeLocalStorage-BDPvGrtd.js";
7
7
  import { computed as w, getCurrentInstance as oe, isReadonly as se, onMounted as ce, onUnmounted as le, reactive as ue, ref as T, toRefs as E, watch as de, watchEffect as fe } from "vue";
8
8
  import { useI18n as pe } from "vue-i18n";
9
- import { defineStore as D } from "pinia";
9
+ import { defineStore as me } from "pinia";
10
10
  //#region ../../node_modules/.pnpm/@ai-sdk+provider@3.0.8/node_modules/@ai-sdk/provider/dist/index.mjs
11
- var me = "vercel.ai.error", he = Symbol.for(me), ge, _e, O = class e extends (_e = Error, ge = he, _e) {
11
+ var D = "vercel.ai.error", he = Symbol.for(D), ge, _e, O = class e extends (_e = Error, ge = he, _e) {
12
12
  constructor({ name: e, message: t, cause: n }) {
13
13
  super(t), this[ge] = !0, this.name = e, this.cause = n;
14
14
  }
15
15
  static isInstance(t) {
16
- return e.hasMarker(t, me);
16
+ return e.hasMarker(t, D);
17
17
  }
18
18
  static hasMarker(e, t) {
19
19
  let n = Symbol.for(t);
20
20
  return typeof e == "object" && !!e && n in e && typeof e[n] == "boolean" && e[n] === !0;
21
21
  }
22
22
  };
23
- function ve(e) {
23
+ function k(e) {
24
24
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
25
25
  }
26
- var ye = "AI_InvalidArgumentError", be = `vercel.ai.error.${ye}`, xe = Symbol.for(be), Se, Ce, we = class extends (Ce = O, Se = xe, Ce) {
26
+ var ve = "AI_InvalidArgumentError", ye = `vercel.ai.error.${ve}`, be = Symbol.for(ye), xe, Se, Ce = class extends (Se = O, xe = be, Se) {
27
27
  constructor({ message: e, cause: t, argument: n }) {
28
28
  super({
29
- name: ye,
29
+ name: ve,
30
30
  message: e,
31
31
  cause: t
32
- }), this[Se] = !0, this.argument = n;
32
+ }), this[xe] = !0, this.argument = n;
33
33
  }
34
34
  static isInstance(e) {
35
- return O.hasMarker(e, be);
35
+ return O.hasMarker(e, ye);
36
36
  }
37
- }, Te = "AI_JSONParseError", Ee = `vercel.ai.error.${Te}`, De = Symbol.for(Ee), k, Oe, ke = class extends (Oe = O, k = De, Oe) {
37
+ }, we = "AI_JSONParseError", Te = `vercel.ai.error.${we}`, Ee = Symbol.for(Te), De, A, j = class extends (A = O, De = Ee, A) {
38
38
  constructor({ text: e, cause: t }) {
39
39
  super({
40
- name: Te,
40
+ name: we,
41
41
  message: `JSON parsing failed: Text: ${e}.
42
- Error message: ${ve(t)}`,
42
+ Error message: ${k(t)}`,
43
43
  cause: t
44
- }), this[k] = !0, this.text = e;
44
+ }), this[De] = !0, this.text = e;
45
45
  }
46
46
  static isInstance(e) {
47
- return O.hasMarker(e, Ee);
47
+ return O.hasMarker(e, Te);
48
48
  }
49
- }, Ae = "AI_TypeValidationError", je = `vercel.ai.error.${Ae}`, Me = Symbol.for(je), Ne, Pe, A = class e extends (Pe = O, Ne = Me, Pe) {
49
+ }, Oe = "AI_TypeValidationError", ke = `vercel.ai.error.${Oe}`, Ae = Symbol.for(ke), je, Me, M = class e extends (Me = O, je = Ae, Me) {
50
50
  constructor({ value: e, cause: t, context: n }) {
51
51
  let r = "Type validation failed";
52
52
  if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) {
@@ -55,14 +55,14 @@ Error message: ${ve(t)}`,
55
55
  n.entityName && e.push(n.entityName), n.entityId && e.push(`id: "${n.entityId}"`), r += e.join(", "), r += ")";
56
56
  }
57
57
  super({
58
- name: Ae,
58
+ name: Oe,
59
59
  message: `${r}: Value: ${JSON.stringify(e)}.
60
- Error message: ${ve(t)}`,
60
+ Error message: ${k(t)}`,
61
61
  cause: t
62
- }), this[Ne] = !0, this.value = e, this.context = n;
62
+ }), this[je] = !0, this.value = e, this.context = n;
63
63
  }
64
64
  static isInstance(e) {
65
- return O.hasMarker(e, je);
65
+ return O.hasMarker(e, ke);
66
66
  }
67
67
  static wrap({ value: t, cause: n, context: r }) {
68
68
  return e.isInstance(n) && n.value === t && n.context?.field === r?.field && n.context?.entityName === r?.entityName && n.context?.entityId === r?.entityId ? n : new e({
@@ -71,7 +71,7 @@ Error message: ${ve(t)}`,
71
71
  context: r
72
72
  });
73
73
  }
74
- }, j = (e, t) => {
74
+ }, Ne = (e, t) => {
75
75
  let n;
76
76
  switch (e.code) {
77
77
  case x.invalid_type:
@@ -125,13 +125,13 @@ Error message: ${ve(t)}`,
125
125
  default: n = t.defaultError, y.assertNever(e);
126
126
  }
127
127
  return { message: n };
128
- }, Fe = j;
129
- function Ie() {
130
- return Fe;
128
+ }, Pe = Ne;
129
+ function Fe() {
130
+ return Pe;
131
131
  }
132
132
  //#endregion
133
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.js
134
- var Le = (e) => {
133
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/helpers/parseUtil.js
134
+ var Ie = (e) => {
135
135
  let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
136
136
  ...i,
137
137
  path: a
@@ -152,8 +152,8 @@ var Le = (e) => {
152
152
  message: s
153
153
  };
154
154
  };
155
- function M(e, t) {
156
- let n = Ie(), r = Le({
155
+ function N(e, t) {
156
+ let n = Fe(), r = Ie({
157
157
  issueData: t,
158
158
  data: e.data,
159
159
  path: e.path,
@@ -161,12 +161,12 @@ function M(e, t) {
161
161
  e.common.contextualErrorMap,
162
162
  e.schemaErrorMap,
163
163
  n,
164
- n === j ? void 0 : j
164
+ n === Ne ? void 0 : Ne
165
165
  ].filter((e) => !!e)
166
166
  });
167
167
  e.common.issues.push(r);
168
168
  }
169
- var N = class e {
169
+ var P = class e {
170
170
  constructor() {
171
171
  this.value = "valid";
172
172
  }
@@ -179,7 +179,7 @@ var N = class e {
179
179
  static mergeArray(e, t) {
180
180
  let n = [];
181
181
  for (let r of t) {
182
- if (r.status === "aborted") return P;
182
+ if (r.status === "aborted") return F;
183
183
  r.status === "dirty" && e.dirty(), n.push(r.value);
184
184
  }
185
185
  return {
@@ -202,7 +202,7 @@ var N = class e {
202
202
  let n = {};
203
203
  for (let r of t) {
204
204
  let { key: t, value: i } = r;
205
- if (t.status === "aborted" || i.status === "aborted") return P;
205
+ if (t.status === "aborted" || i.status === "aborted") return F;
206
206
  t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
207
207
  }
208
208
  return {
@@ -210,18 +210,18 @@ var N = class e {
210
210
  value: n
211
211
  };
212
212
  }
213
- }, P = Object.freeze({ status: "aborted" }), Re = (e) => ({
213
+ }, F = Object.freeze({ status: "aborted" }), Le = (e) => ({
214
214
  status: "dirty",
215
215
  value: e
216
- }), F = (e) => ({
216
+ }), I = (e) => ({
217
217
  status: "valid",
218
218
  value: e
219
- }), ze = (e) => e.status === "aborted", Be = (e) => e.status === "dirty", I = (e) => e.status === "valid", Ve = (e) => typeof Promise < "u" && e instanceof Promise, L;
219
+ }), Re = (e) => e.status === "aborted", ze = (e) => e.status === "dirty", Be = (e) => e.status === "valid", Ve = (e) => typeof Promise < "u" && e instanceof Promise, L;
220
220
  (function(e) {
221
221
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
222
222
  })(L ||= {});
223
223
  //#endregion
224
- //#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.js
224
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/types.js
225
225
  var R = class {
226
226
  constructor(e, t, n, r) {
227
227
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
@@ -230,7 +230,7 @@ var R = class {
230
230
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
231
231
  }
232
232
  }, He = (e, t) => {
233
- if (I(t)) return {
233
+ if (Be(t)) return {
234
234
  success: !0,
235
235
  data: t.value
236
236
  };
@@ -278,7 +278,7 @@ var B = class {
278
278
  }
279
279
  _processInputParams(e) {
280
280
  return {
281
- status: new N(),
281
+ status: new P(),
282
282
  ctx: {
283
283
  common: e.parent.common,
284
284
  data: e.data,
@@ -340,7 +340,7 @@ var B = class {
340
340
  path: [],
341
341
  parent: t
342
342
  });
343
- return I(n) ? { value: n.value } : { issues: t.common.issues };
343
+ return Be(n) ? { value: n.value } : { issues: t.common.issues };
344
344
  } catch (e) {
345
345
  e?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
346
346
  issues: [],
@@ -351,7 +351,7 @@ var B = class {
351
351
  data: e,
352
352
  path: [],
353
353
  parent: t
354
- }).then((e) => I(e) ? { value: e.value } : { issues: t.common.issues });
354
+ }).then((e) => Be(e) ? { value: e.value } : { issues: t.common.issues });
355
355
  }
356
356
  async parseAsync(e, t) {
357
357
  let n = await this.safeParseAsync(e, t);
@@ -521,14 +521,14 @@ var pt = class e extends B {
521
521
  _parse(e) {
522
522
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== S.string) {
523
523
  let t = this._getOrReturnCtx(e);
524
- return M(t, {
524
+ return N(t, {
525
525
  code: x.invalid_type,
526
526
  expected: S.string,
527
527
  received: t.parsedType
528
- }), P;
528
+ }), F;
529
529
  }
530
- let t = new N(), n;
531
- for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), M(n, {
530
+ let t = new P(), n;
531
+ for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), N(n, {
532
532
  code: x.too_small,
533
533
  minimum: r.value,
534
534
  type: "string",
@@ -536,7 +536,7 @@ var pt = class e extends B {
536
536
  exact: !1,
537
537
  message: r.message
538
538
  }), t.dirty());
539
- else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), M(n, {
539
+ else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), N(n, {
540
540
  code: x.too_big,
541
541
  maximum: r.value,
542
542
  type: "string",
@@ -546,14 +546,14 @@ var pt = class e extends B {
546
546
  }), t.dirty());
547
547
  else if (r.kind === "length") {
548
548
  let i = e.data.length > r.value, a = e.data.length < r.value;
549
- (i || a) && (n = this._getOrReturnCtx(e, n), i ? M(n, {
549
+ (i || a) && (n = this._getOrReturnCtx(e, n), i ? N(n, {
550
550
  code: x.too_big,
551
551
  maximum: r.value,
552
552
  type: "string",
553
553
  inclusive: !0,
554
554
  exact: !0,
555
555
  message: r.message
556
- }) : a && M(n, {
556
+ }) : a && N(n, {
557
557
  code: x.too_small,
558
558
  minimum: r.value,
559
559
  type: "string",
@@ -561,37 +561,37 @@ var pt = class e extends B {
561
561
  exact: !0,
562
562
  message: r.message
563
563
  }), t.dirty());
564
- } else if (r.kind === "email") Xe.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
564
+ } else if (r.kind === "email") Xe.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
565
565
  validation: "email",
566
566
  code: x.invalid_string,
567
567
  message: r.message
568
568
  }), t.dirty());
569
- else if (r.kind === "emoji") Qe ||= new RegExp(Ze, "u"), Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
569
+ else if (r.kind === "emoji") Qe ||= new RegExp(Ze, "u"), Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
570
570
  validation: "emoji",
571
571
  code: x.invalid_string,
572
572
  message: r.message
573
573
  }), t.dirty());
574
- else if (r.kind === "uuid") Ke.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
574
+ else if (r.kind === "uuid") Ke.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
575
575
  validation: "uuid",
576
576
  code: x.invalid_string,
577
577
  message: r.message
578
578
  }), t.dirty());
579
- else if (r.kind === "nanoid") qe.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
579
+ else if (r.kind === "nanoid") qe.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
580
580
  validation: "nanoid",
581
581
  code: x.invalid_string,
582
582
  message: r.message
583
583
  }), t.dirty());
584
- else if (r.kind === "cuid") Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
584
+ else if (r.kind === "cuid") Ue.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
585
585
  validation: "cuid",
586
586
  code: x.invalid_string,
587
587
  message: r.message
588
588
  }), t.dirty());
589
- else if (r.kind === "cuid2") We.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
589
+ else if (r.kind === "cuid2") We.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
590
590
  validation: "cuid2",
591
591
  code: x.invalid_string,
592
592
  message: r.message
593
593
  }), t.dirty());
594
- else if (r.kind === "ulid") Ge.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
594
+ else if (r.kind === "ulid") Ge.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
595
595
  validation: "ulid",
596
596
  code: x.invalid_string,
597
597
  message: r.message
@@ -599,64 +599,64 @@ var pt = class e extends B {
599
599
  else if (r.kind === "url") try {
600
600
  new URL(e.data);
601
601
  } catch {
602
- n = this._getOrReturnCtx(e, n), M(n, {
602
+ n = this._getOrReturnCtx(e, n), N(n, {
603
603
  validation: "url",
604
604
  code: x.invalid_string,
605
605
  message: r.message
606
606
  }), t.dirty();
607
607
  }
608
- else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
608
+ else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
609
609
  validation: "regex",
610
610
  code: x.invalid_string,
611
611
  message: r.message
612
- }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), M(n, {
612
+ }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), N(n, {
613
613
  code: x.invalid_string,
614
614
  validation: {
615
615
  includes: r.value,
616
616
  position: r.position
617
617
  },
618
618
  message: r.message
619
- }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), M(n, {
619
+ }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), N(n, {
620
620
  code: x.invalid_string,
621
621
  validation: { startsWith: r.value },
622
622
  message: r.message
623
- }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), M(n, {
623
+ }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), N(n, {
624
624
  code: x.invalid_string,
625
625
  validation: { endsWith: r.value },
626
626
  message: r.message
627
- }), t.dirty()) : r.kind === "datetime" ? lt(r).test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
627
+ }), t.dirty()) : r.kind === "datetime" ? lt(r).test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
628
628
  code: x.invalid_string,
629
629
  validation: "datetime",
630
630
  message: r.message
631
- }), t.dirty()) : r.kind === "date" ? ot.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
631
+ }), t.dirty()) : r.kind === "date" ? ot.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
632
632
  code: x.invalid_string,
633
633
  validation: "date",
634
634
  message: r.message
635
- }), t.dirty()) : r.kind === "time" ? ct(r).test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
635
+ }), t.dirty()) : r.kind === "time" ? ct(r).test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
636
636
  code: x.invalid_string,
637
637
  validation: "time",
638
638
  message: r.message
639
- }), t.dirty()) : r.kind === "duration" ? Ye.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
639
+ }), t.dirty()) : r.kind === "duration" ? Ye.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
640
640
  validation: "duration",
641
641
  code: x.invalid_string,
642
642
  message: r.message
643
- }), t.dirty()) : r.kind === "ip" ? ut(e.data, r.version) || (n = this._getOrReturnCtx(e, n), M(n, {
643
+ }), t.dirty()) : r.kind === "ip" ? ut(e.data, r.version) || (n = this._getOrReturnCtx(e, n), N(n, {
644
644
  validation: "ip",
645
645
  code: x.invalid_string,
646
646
  message: r.message
647
- }), t.dirty()) : r.kind === "jwt" ? dt(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), M(n, {
647
+ }), t.dirty()) : r.kind === "jwt" ? dt(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), N(n, {
648
648
  validation: "jwt",
649
649
  code: x.invalid_string,
650
650
  message: r.message
651
- }), t.dirty()) : r.kind === "cidr" ? ft(e.data, r.version) || (n = this._getOrReturnCtx(e, n), M(n, {
651
+ }), t.dirty()) : r.kind === "cidr" ? ft(e.data, r.version) || (n = this._getOrReturnCtx(e, n), N(n, {
652
652
  validation: "cidr",
653
653
  code: x.invalid_string,
654
654
  message: r.message
655
- }), t.dirty()) : r.kind === "base64" ? rt.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
655
+ }), t.dirty()) : r.kind === "base64" ? rt.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
656
656
  validation: "base64",
657
657
  code: x.invalid_string,
658
658
  message: r.message
659
- }), t.dirty()) : r.kind === "base64url" ? it.test(e.data) || (n = this._getOrReturnCtx(e, n), M(n, {
659
+ }), t.dirty()) : r.kind === "base64url" ? it.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
660
660
  validation: "base64url",
661
661
  code: x.invalid_string,
662
662
  message: r.message
@@ -942,37 +942,37 @@ var ht = class e extends B {
942
942
  _parse(e) {
943
943
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== S.number) {
944
944
  let t = this._getOrReturnCtx(e);
945
- return M(t, {
945
+ return N(t, {
946
946
  code: x.invalid_type,
947
947
  expected: S.number,
948
948
  received: t.parsedType
949
- }), P;
949
+ }), F;
950
950
  }
951
- let t, n = new N();
952
- for (let r of this._def.checks) r.kind === "int" ? y.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), M(t, {
951
+ let t, n = new P();
952
+ for (let r of this._def.checks) r.kind === "int" ? y.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), N(t, {
953
953
  code: x.invalid_type,
954
954
  expected: "integer",
955
955
  received: "float",
956
956
  message: r.message
957
- }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
957
+ }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
958
958
  code: x.too_small,
959
959
  minimum: r.value,
960
960
  type: "number",
961
961
  inclusive: r.inclusive,
962
962
  exact: !1,
963
963
  message: r.message
964
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
964
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
965
965
  code: x.too_big,
966
966
  maximum: r.value,
967
967
  type: "number",
968
968
  inclusive: r.inclusive,
969
969
  exact: !1,
970
970
  message: r.message
971
- }), n.dirty()) : r.kind === "multipleOf" ? mt(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), M(t, {
971
+ }), n.dirty()) : r.kind === "multipleOf" ? mt(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), N(t, {
972
972
  code: x.not_multiple_of,
973
973
  multipleOf: r.value,
974
974
  message: r.message
975
- }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), M(t, {
975
+ }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), N(t, {
976
976
  code: x.not_finite,
977
977
  message: r.message
978
978
  }), n.dirty()) : y.assertNever(r);
@@ -1111,20 +1111,20 @@ var gt = class e extends B {
1111
1111
  return this._getInvalidInput(e);
1112
1112
  }
1113
1113
  if (this._getType(e) !== S.bigint) return this._getInvalidInput(e);
1114
- let t, n = new N();
1115
- for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
1114
+ let t, n = new P();
1115
+ for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1116
1116
  code: x.too_small,
1117
1117
  type: "bigint",
1118
1118
  minimum: r.value,
1119
1119
  inclusive: r.inclusive,
1120
1120
  message: r.message
1121
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), M(t, {
1121
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1122
1122
  code: x.too_big,
1123
1123
  type: "bigint",
1124
1124
  maximum: r.value,
1125
1125
  inclusive: r.inclusive,
1126
1126
  message: r.message
1127
- }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), M(t, {
1127
+ }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), N(t, {
1128
1128
  code: x.not_multiple_of,
1129
1129
  multipleOf: r.value,
1130
1130
  message: r.message
@@ -1136,11 +1136,11 @@ var gt = class e extends B {
1136
1136
  }
1137
1137
  _getInvalidInput(e) {
1138
1138
  let t = this._getOrReturnCtx(e);
1139
- return M(t, {
1139
+ return N(t, {
1140
1140
  code: x.invalid_type,
1141
1141
  expected: S.bigint,
1142
1142
  received: t.parsedType
1143
- }), P;
1143
+ }), F;
1144
1144
  }
1145
1145
  gte(e, t) {
1146
1146
  return this.setLimit("min", e, !0, L.toString(t));
@@ -1231,13 +1231,13 @@ var _t = class extends B {
1231
1231
  _parse(e) {
1232
1232
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== S.boolean) {
1233
1233
  let t = this._getOrReturnCtx(e);
1234
- return M(t, {
1234
+ return N(t, {
1235
1235
  code: x.invalid_type,
1236
1236
  expected: S.boolean,
1237
1237
  received: t.parsedType
1238
- }), P;
1238
+ }), F;
1239
1239
  }
1240
- return F(e.data);
1240
+ return I(e.data);
1241
1241
  }
1242
1242
  };
1243
1243
  _t.create = (e) => new _t({
@@ -1249,22 +1249,22 @@ var vt = class e extends B {
1249
1249
  _parse(e) {
1250
1250
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== S.date) {
1251
1251
  let t = this._getOrReturnCtx(e);
1252
- return M(t, {
1252
+ return N(t, {
1253
1253
  code: x.invalid_type,
1254
1254
  expected: S.date,
1255
1255
  received: t.parsedType
1256
- }), P;
1256
+ }), F;
1257
1257
  }
1258
- if (Number.isNaN(e.data.getTime())) return M(this._getOrReturnCtx(e), { code: x.invalid_date }), P;
1259
- let t = new N(), n;
1260
- for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), M(n, {
1258
+ if (Number.isNaN(e.data.getTime())) return N(this._getOrReturnCtx(e), { code: x.invalid_date }), F;
1259
+ let t = new P(), n;
1260
+ for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), N(n, {
1261
1261
  code: x.too_small,
1262
1262
  message: r.message,
1263
1263
  inclusive: !0,
1264
1264
  exact: !1,
1265
1265
  minimum: r.value,
1266
1266
  type: "date"
1267
- }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), M(n, {
1267
+ }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), N(n, {
1268
1268
  code: x.too_big,
1269
1269
  message: r.message,
1270
1270
  inclusive: !0,
@@ -1318,13 +1318,13 @@ var yt = class extends B {
1318
1318
  _parse(e) {
1319
1319
  if (this._getType(e) !== S.symbol) {
1320
1320
  let t = this._getOrReturnCtx(e);
1321
- return M(t, {
1321
+ return N(t, {
1322
1322
  code: x.invalid_type,
1323
1323
  expected: S.symbol,
1324
1324
  received: t.parsedType
1325
- }), P;
1325
+ }), F;
1326
1326
  }
1327
- return F(e.data);
1327
+ return I(e.data);
1328
1328
  }
1329
1329
  };
1330
1330
  yt.create = (e) => new yt({
@@ -1335,13 +1335,13 @@ var bt = class extends B {
1335
1335
  _parse(e) {
1336
1336
  if (this._getType(e) !== S.undefined) {
1337
1337
  let t = this._getOrReturnCtx(e);
1338
- return M(t, {
1338
+ return N(t, {
1339
1339
  code: x.invalid_type,
1340
1340
  expected: S.undefined,
1341
1341
  received: t.parsedType
1342
- }), P;
1342
+ }), F;
1343
1343
  }
1344
- return F(e.data);
1344
+ return I(e.data);
1345
1345
  }
1346
1346
  };
1347
1347
  bt.create = (e) => new bt({
@@ -1352,13 +1352,13 @@ var xt = class extends B {
1352
1352
  _parse(e) {
1353
1353
  if (this._getType(e) !== S.null) {
1354
1354
  let t = this._getOrReturnCtx(e);
1355
- return M(t, {
1355
+ return N(t, {
1356
1356
  code: x.invalid_type,
1357
1357
  expected: S.null,
1358
1358
  received: t.parsedType
1359
- }), P;
1359
+ }), F;
1360
1360
  }
1361
- return F(e.data);
1361
+ return I(e.data);
1362
1362
  }
1363
1363
  };
1364
1364
  xt.create = (e) => new xt({
@@ -1370,7 +1370,7 @@ var St = class extends B {
1370
1370
  super(...arguments), this._any = !0;
1371
1371
  }
1372
1372
  _parse(e) {
1373
- return F(e.data);
1373
+ return I(e.data);
1374
1374
  }
1375
1375
  };
1376
1376
  St.create = (e) => new St({
@@ -1382,7 +1382,7 @@ var Ct = class extends B {
1382
1382
  super(...arguments), this._unknown = !0;
1383
1383
  }
1384
1384
  _parse(e) {
1385
- return F(e.data);
1385
+ return I(e.data);
1386
1386
  }
1387
1387
  };
1388
1388
  Ct.create = (e) => new Ct({
@@ -1392,11 +1392,11 @@ Ct.create = (e) => new Ct({
1392
1392
  var V = class extends B {
1393
1393
  _parse(e) {
1394
1394
  let t = this._getOrReturnCtx(e);
1395
- return M(t, {
1395
+ return N(t, {
1396
1396
  code: x.invalid_type,
1397
1397
  expected: S.never,
1398
1398
  received: t.parsedType
1399
- }), P;
1399
+ }), F;
1400
1400
  }
1401
1401
  };
1402
1402
  V.create = (e) => new V({
@@ -1407,13 +1407,13 @@ var wt = class extends B {
1407
1407
  _parse(e) {
1408
1408
  if (this._getType(e) !== S.undefined) {
1409
1409
  let t = this._getOrReturnCtx(e);
1410
- return M(t, {
1410
+ return N(t, {
1411
1411
  code: x.invalid_type,
1412
1412
  expected: S.void,
1413
1413
  received: t.parsedType
1414
- }), P;
1414
+ }), F;
1415
1415
  }
1416
- return F(e.data);
1416
+ return I(e.data);
1417
1417
  }
1418
1418
  };
1419
1419
  wt.create = (e) => new wt({
@@ -1423,14 +1423,14 @@ wt.create = (e) => new wt({
1423
1423
  var Tt = class e extends B {
1424
1424
  _parse(e) {
1425
1425
  let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
1426
- if (t.parsedType !== S.array) return M(t, {
1426
+ if (t.parsedType !== S.array) return N(t, {
1427
1427
  code: x.invalid_type,
1428
1428
  expected: S.array,
1429
1429
  received: t.parsedType
1430
- }), P;
1430
+ }), F;
1431
1431
  if (r.exactLength !== null) {
1432
1432
  let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
1433
- (e || i) && (M(t, {
1433
+ (e || i) && (N(t, {
1434
1434
  code: e ? x.too_big : x.too_small,
1435
1435
  minimum: i ? r.exactLength.value : void 0,
1436
1436
  maximum: e ? r.exactLength.value : void 0,
@@ -1440,23 +1440,23 @@ var Tt = class e extends B {
1440
1440
  message: r.exactLength.message
1441
1441
  }), n.dirty());
1442
1442
  }
1443
- if (r.minLength !== null && t.data.length < r.minLength.value && (M(t, {
1443
+ if (r.minLength !== null && t.data.length < r.minLength.value && (N(t, {
1444
1444
  code: x.too_small,
1445
1445
  minimum: r.minLength.value,
1446
1446
  type: "array",
1447
1447
  inclusive: !0,
1448
1448
  exact: !1,
1449
1449
  message: r.minLength.message
1450
- }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (M(t, {
1450
+ }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (N(t, {
1451
1451
  code: x.too_big,
1452
1452
  maximum: r.maxLength.value,
1453
1453
  type: "array",
1454
1454
  inclusive: !0,
1455
1455
  exact: !1,
1456
1456
  message: r.maxLength.message
1457
- }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new R(t, e, t.path, n)))).then((e) => N.mergeArray(n, e));
1457
+ }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new R(t, e, t.path, n)))).then((e) => P.mergeArray(n, e));
1458
1458
  let i = [...t.data].map((e, n) => r.type._parseSync(new R(t, e, t.path, n)));
1459
- return N.mergeArray(n, i);
1459
+ return P.mergeArray(n, i);
1460
1460
  }
1461
1461
  get element() {
1462
1462
  return this._def.type;
@@ -1535,11 +1535,11 @@ var H = class e extends B {
1535
1535
  _parse(e) {
1536
1536
  if (this._getType(e) !== S.object) {
1537
1537
  let t = this._getOrReturnCtx(e);
1538
- return M(t, {
1538
+ return N(t, {
1539
1539
  code: x.invalid_type,
1540
1540
  expected: S.object,
1541
1541
  received: t.parsedType
1542
- }), P;
1542
+ }), F;
1543
1543
  }
1544
1544
  let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
1545
1545
  if (!(this._def.catchall instanceof V && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
@@ -1567,7 +1567,7 @@ var H = class e extends B {
1567
1567
  value: n.data[e]
1568
1568
  }
1569
1569
  });
1570
- else if (e === "strict") a.length > 0 && (M(n, {
1570
+ else if (e === "strict") a.length > 0 && (N(n, {
1571
1571
  code: x.unrecognized_keys,
1572
1572
  keys: a
1573
1573
  }), t.dirty());
@@ -1597,7 +1597,7 @@ var H = class e extends B {
1597
1597
  });
1598
1598
  }
1599
1599
  return e;
1600
- }).then((e) => N.mergeObjectSync(t, e)) : N.mergeObjectSync(t, o);
1600
+ }).then((e) => P.mergeObjectSync(t, e)) : P.mergeObjectSync(t, o);
1601
1601
  }
1602
1602
  get shape() {
1603
1603
  return this._def.shape();
@@ -1726,10 +1726,10 @@ var Dt = class extends B {
1726
1726
  for (let t of e) if (t.result.status === "valid") return t.result;
1727
1727
  for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
1728
1728
  let n = e.map((e) => new C(e.ctx.common.issues));
1729
- return M(t, {
1729
+ return N(t, {
1730
1730
  code: x.invalid_union,
1731
1731
  unionErrors: n
1732
- }), P;
1732
+ }), F;
1733
1733
  }
1734
1734
  if (t.common.async) return Promise.all(n.map(async (e) => {
1735
1735
  let n = {
@@ -1772,10 +1772,10 @@ var Dt = class extends B {
1772
1772
  }
1773
1773
  if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
1774
1774
  let i = r.map((e) => new C(e));
1775
- return M(t, {
1775
+ return N(t, {
1776
1776
  code: x.invalid_union,
1777
1777
  unionErrors: i
1778
- }), P;
1778
+ }), F;
1779
1779
  }
1780
1780
  }
1781
1781
  get options() {
@@ -1790,11 +1790,11 @@ Dt.create = (e, t) => new Dt({
1790
1790
  var U = (e) => e instanceof It ? U(e.schema) : e instanceof W ? U(e.innerType()) : e instanceof Lt ? [e.value] : e instanceof zt ? e.options : e instanceof Bt ? y.objectValues(e.enum) : e instanceof Ut ? U(e._def.innerType) : e instanceof bt ? [void 0] : e instanceof xt ? [null] : e instanceof G ? [void 0, ...U(e.unwrap())] : e instanceof Ht ? [null, ...U(e.unwrap())] : e instanceof Kt || e instanceof Jt ? U(e.unwrap()) : e instanceof Wt ? U(e._def.innerType) : [], Ot = class e extends B {
1791
1791
  _parse(e) {
1792
1792
  let { ctx: t } = this._processInputParams(e);
1793
- if (t.parsedType !== S.object) return M(t, {
1793
+ if (t.parsedType !== S.object) return N(t, {
1794
1794
  code: x.invalid_type,
1795
1795
  expected: S.object,
1796
1796
  received: t.parsedType
1797
- }), P;
1797
+ }), F;
1798
1798
  let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
1799
1799
  return i ? t.common.async ? i._parseAsync({
1800
1800
  data: t.data,
@@ -1804,11 +1804,11 @@ var U = (e) => e instanceof It ? U(e.schema) : e instanceof W ? U(e.innerType())
1804
1804
  data: t.data,
1805
1805
  path: t.path,
1806
1806
  parent: t
1807
- }) : (M(t, {
1807
+ }) : (N(t, {
1808
1808
  code: x.invalid_union_discriminator,
1809
1809
  options: Array.from(this.optionsMap.keys()),
1810
1810
  path: [n]
1811
- }), P);
1811
+ }), F);
1812
1812
  }
1813
1813
  get discriminator() {
1814
1814
  return this._def.discriminator;
@@ -1879,12 +1879,12 @@ function kt(e, t) {
1879
1879
  var At = class extends B {
1880
1880
  _parse(e) {
1881
1881
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
1882
- if (ze(e) || ze(r)) return P;
1882
+ if (Re(e) || Re(r)) return F;
1883
1883
  let i = kt(e.value, r.value);
1884
- return i.valid ? ((Be(e) || Be(r)) && t.dirty(), {
1884
+ return i.valid ? ((ze(e) || ze(r)) && t.dirty(), {
1885
1885
  status: t.value,
1886
1886
  value: i.data
1887
- }) : (M(n, { code: x.invalid_intersection_types }), P);
1887
+ }) : (N(n, { code: x.invalid_intersection_types }), F);
1888
1888
  };
1889
1889
  return n.common.async ? Promise.all([this._def.left._parseAsync({
1890
1890
  data: n.data,
@@ -1914,19 +1914,19 @@ At.create = (e, t, n) => new At({
1914
1914
  var jt = class e extends B {
1915
1915
  _parse(e) {
1916
1916
  let { status: t, ctx: n } = this._processInputParams(e);
1917
- if (n.parsedType !== S.array) return M(n, {
1917
+ if (n.parsedType !== S.array) return N(n, {
1918
1918
  code: x.invalid_type,
1919
1919
  expected: S.array,
1920
1920
  received: n.parsedType
1921
- }), P;
1922
- if (n.data.length < this._def.items.length) return M(n, {
1921
+ }), F;
1922
+ if (n.data.length < this._def.items.length) return N(n, {
1923
1923
  code: x.too_small,
1924
1924
  minimum: this._def.items.length,
1925
1925
  inclusive: !0,
1926
1926
  exact: !1,
1927
1927
  type: "array"
1928
- }), P;
1929
- !this._def.rest && n.data.length > this._def.items.length && (M(n, {
1928
+ }), F;
1929
+ !this._def.rest && n.data.length > this._def.items.length && (N(n, {
1930
1930
  code: x.too_big,
1931
1931
  maximum: this._def.items.length,
1932
1932
  inclusive: !0,
@@ -1937,7 +1937,7 @@ var jt = class e extends B {
1937
1937
  let r = this._def.items[t] || this._def.rest;
1938
1938
  return r ? r._parse(new R(n, e, n.path, t)) : null;
1939
1939
  }).filter((e) => !!e);
1940
- return n.common.async ? Promise.all(r).then((e) => N.mergeArray(t, e)) : N.mergeArray(t, r);
1940
+ return n.common.async ? Promise.all(r).then((e) => P.mergeArray(t, e)) : P.mergeArray(t, r);
1941
1941
  }
1942
1942
  get items() {
1943
1943
  return this._def.items;
@@ -1967,18 +1967,18 @@ var Mt = class e extends B {
1967
1967
  }
1968
1968
  _parse(e) {
1969
1969
  let { status: t, ctx: n } = this._processInputParams(e);
1970
- if (n.parsedType !== S.object) return M(n, {
1970
+ if (n.parsedType !== S.object) return N(n, {
1971
1971
  code: x.invalid_type,
1972
1972
  expected: S.object,
1973
1973
  received: n.parsedType
1974
- }), P;
1974
+ }), F;
1975
1975
  let r = [], i = this._def.keyType, a = this._def.valueType;
1976
1976
  for (let e in n.data) r.push({
1977
1977
  key: i._parse(new R(n, e, n.path, e)),
1978
1978
  value: a._parse(new R(n, n.data[e], n.path, e)),
1979
1979
  alwaysSet: e in n.data
1980
1980
  });
1981
- return n.common.async ? N.mergeObjectAsync(t, r) : N.mergeObjectSync(t, r);
1981
+ return n.common.async ? P.mergeObjectAsync(t, r) : P.mergeObjectSync(t, r);
1982
1982
  }
1983
1983
  get element() {
1984
1984
  return this._def.valueType;
@@ -2005,11 +2005,11 @@ var Mt = class e extends B {
2005
2005
  }
2006
2006
  _parse(e) {
2007
2007
  let { status: t, ctx: n } = this._processInputParams(e);
2008
- if (n.parsedType !== S.map) return M(n, {
2008
+ if (n.parsedType !== S.map) return N(n, {
2009
2009
  code: x.invalid_type,
2010
2010
  expected: S.map,
2011
2011
  received: n.parsedType
2012
- }), P;
2012
+ }), F;
2013
2013
  let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
2014
2014
  key: r._parse(new R(n, e, n.path, [a, "key"])),
2015
2015
  value: i._parse(new R(n, t, n.path, [a, "value"]))
@@ -2019,7 +2019,7 @@ var Mt = class e extends B {
2019
2019
  return Promise.resolve().then(async () => {
2020
2020
  for (let n of a) {
2021
2021
  let r = await n.key, i = await n.value;
2022
- if (r.status === "aborted" || i.status === "aborted") return P;
2022
+ if (r.status === "aborted" || i.status === "aborted") return F;
2023
2023
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
2024
2024
  }
2025
2025
  return {
@@ -2031,7 +2031,7 @@ var Mt = class e extends B {
2031
2031
  let e = /* @__PURE__ */ new Map();
2032
2032
  for (let n of a) {
2033
2033
  let r = n.key, i = n.value;
2034
- if (r.status === "aborted" || i.status === "aborted") return P;
2034
+ if (r.status === "aborted" || i.status === "aborted") return F;
2035
2035
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
2036
2036
  }
2037
2037
  return {
@@ -2050,20 +2050,20 @@ Nt.create = (e, t, n) => new Nt({
2050
2050
  var Pt = class e extends B {
2051
2051
  _parse(e) {
2052
2052
  let { status: t, ctx: n } = this._processInputParams(e);
2053
- if (n.parsedType !== S.set) return M(n, {
2053
+ if (n.parsedType !== S.set) return N(n, {
2054
2054
  code: x.invalid_type,
2055
2055
  expected: S.set,
2056
2056
  received: n.parsedType
2057
- }), P;
2057
+ }), F;
2058
2058
  let r = this._def;
2059
- r.minSize !== null && n.data.size < r.minSize.value && (M(n, {
2059
+ r.minSize !== null && n.data.size < r.minSize.value && (N(n, {
2060
2060
  code: x.too_small,
2061
2061
  minimum: r.minSize.value,
2062
2062
  type: "set",
2063
2063
  inclusive: !0,
2064
2064
  exact: !1,
2065
2065
  message: r.minSize.message
2066
- }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (M(n, {
2066
+ }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (N(n, {
2067
2067
  code: x.too_big,
2068
2068
  maximum: r.maxSize.value,
2069
2069
  type: "set",
@@ -2075,7 +2075,7 @@ var Pt = class e extends B {
2075
2075
  function a(e) {
2076
2076
  let n = /* @__PURE__ */ new Set();
2077
2077
  for (let r of e) {
2078
- if (r.status === "aborted") return P;
2078
+ if (r.status === "aborted") return F;
2079
2079
  r.status === "dirty" && t.dirty(), n.add(r.value);
2080
2080
  }
2081
2081
  return {
@@ -2124,20 +2124,20 @@ var Ft = class e extends B {
2124
2124
  }
2125
2125
  _parse(e) {
2126
2126
  let { ctx: t } = this._processInputParams(e);
2127
- if (t.parsedType !== S.function) return M(t, {
2127
+ if (t.parsedType !== S.function) return N(t, {
2128
2128
  code: x.invalid_type,
2129
2129
  expected: S.function,
2130
2130
  received: t.parsedType
2131
- }), P;
2131
+ }), F;
2132
2132
  function n(e, n) {
2133
- return Le({
2133
+ return Ie({
2134
2134
  data: e,
2135
2135
  path: t.path,
2136
2136
  errorMaps: [
2137
2137
  t.common.contextualErrorMap,
2138
2138
  t.schemaErrorMap,
2139
- Ie(),
2140
- j
2139
+ Fe(),
2140
+ Ne
2141
2141
  ].filter((e) => !!e),
2142
2142
  issueData: {
2143
2143
  code: x.invalid_arguments,
@@ -2146,14 +2146,14 @@ var Ft = class e extends B {
2146
2146
  });
2147
2147
  }
2148
2148
  function r(e, n) {
2149
- return Le({
2149
+ return Ie({
2150
2150
  data: e,
2151
2151
  path: t.path,
2152
2152
  errorMaps: [
2153
2153
  t.common.contextualErrorMap,
2154
2154
  t.schemaErrorMap,
2155
- Ie(),
2156
- j
2155
+ Fe(),
2156
+ Ne
2157
2157
  ].filter((e) => !!e),
2158
2158
  issueData: {
2159
2159
  code: x.invalid_return_type,
@@ -2164,7 +2164,7 @@ var Ft = class e extends B {
2164
2164
  let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
2165
2165
  if (this._def.returns instanceof Vt) {
2166
2166
  let e = this;
2167
- return F(async function(...t) {
2167
+ return I(async function(...t) {
2168
2168
  let o = new C([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
2169
2169
  throw o.addIssue(n(t, e)), o;
2170
2170
  }), c = await Reflect.apply(a, this, s);
@@ -2174,7 +2174,7 @@ var Ft = class e extends B {
2174
2174
  });
2175
2175
  } else {
2176
2176
  let e = this;
2177
- return F(function(...t) {
2177
+ return I(function(...t) {
2178
2178
  let o = e._def.args.safeParse(t, i);
2179
2179
  if (!o.success) throw new C([n(t, o.error)]);
2180
2180
  let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i);
@@ -2237,11 +2237,11 @@ var Lt = class extends B {
2237
2237
  _parse(e) {
2238
2238
  if (e.data !== this._def.value) {
2239
2239
  let t = this._getOrReturnCtx(e);
2240
- return M(t, {
2240
+ return N(t, {
2241
2241
  received: t.data,
2242
2242
  code: x.invalid_literal,
2243
2243
  expected: this._def.value
2244
- }), P;
2244
+ }), F;
2245
2245
  }
2246
2246
  return {
2247
2247
  status: "valid",
@@ -2268,21 +2268,21 @@ var zt = class e extends B {
2268
2268
  _parse(e) {
2269
2269
  if (typeof e.data != "string") {
2270
2270
  let t = this._getOrReturnCtx(e), n = this._def.values;
2271
- return M(t, {
2271
+ return N(t, {
2272
2272
  expected: y.joinValues(n),
2273
2273
  received: t.parsedType,
2274
2274
  code: x.invalid_type
2275
- }), P;
2275
+ }), F;
2276
2276
  }
2277
2277
  if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
2278
2278
  let t = this._getOrReturnCtx(e), n = this._def.values;
2279
- return M(t, {
2279
+ return N(t, {
2280
2280
  received: t.data,
2281
2281
  code: x.invalid_enum_value,
2282
2282
  options: n
2283
- }), P;
2283
+ }), F;
2284
2284
  }
2285
- return F(e.data);
2285
+ return I(e.data);
2286
2286
  }
2287
2287
  get options() {
2288
2288
  return this._def.values;
@@ -2321,21 +2321,21 @@ var Bt = class extends B {
2321
2321
  let t = y.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
2322
2322
  if (n.parsedType !== S.string && n.parsedType !== S.number) {
2323
2323
  let e = y.objectValues(t);
2324
- return M(n, {
2324
+ return N(n, {
2325
2325
  expected: y.joinValues(e),
2326
2326
  received: n.parsedType,
2327
2327
  code: x.invalid_type
2328
- }), P;
2328
+ }), F;
2329
2329
  }
2330
2330
  if (this._cache ||= new Set(y.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
2331
2331
  let e = y.objectValues(t);
2332
- return M(n, {
2332
+ return N(n, {
2333
2333
  received: n.data,
2334
2334
  code: x.invalid_enum_value,
2335
2335
  options: e
2336
- }), P;
2336
+ }), F;
2337
2337
  }
2338
- return F(e.data);
2338
+ return I(e.data);
2339
2339
  }
2340
2340
  get enum() {
2341
2341
  return this._def.values;
@@ -2352,11 +2352,11 @@ var Vt = class extends B {
2352
2352
  }
2353
2353
  _parse(e) {
2354
2354
  let { ctx: t } = this._processInputParams(e);
2355
- return t.parsedType !== S.promise && t.common.async === !1 ? (M(t, {
2355
+ return t.parsedType !== S.promise && t.common.async === !1 ? (N(t, {
2356
2356
  code: x.invalid_type,
2357
2357
  expected: S.promise,
2358
2358
  received: t.parsedType
2359
- }), P) : F((t.parsedType === S.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
2359
+ }), F) : I((t.parsedType === S.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
2360
2360
  path: t.path,
2361
2361
  errorMap: t.common.contextualErrorMap
2362
2362
  })));
@@ -2377,7 +2377,7 @@ var W = class extends B {
2377
2377
  _parse(e) {
2378
2378
  let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
2379
2379
  addIssue: (e) => {
2380
- M(n, e), e.fatal ? t.abort() : t.dirty();
2380
+ N(n, e), e.fatal ? t.abort() : t.dirty();
2381
2381
  },
2382
2382
  get path() {
2383
2383
  return n.path;
@@ -2386,22 +2386,22 @@ var W = class extends B {
2386
2386
  if (i.addIssue = i.addIssue.bind(i), r.type === "preprocess") {
2387
2387
  let e = r.transform(n.data, i);
2388
2388
  if (n.common.async) return Promise.resolve(e).then(async (e) => {
2389
- if (t.value === "aborted") return P;
2389
+ if (t.value === "aborted") return F;
2390
2390
  let r = await this._def.schema._parseAsync({
2391
2391
  data: e,
2392
2392
  path: n.path,
2393
2393
  parent: n
2394
2394
  });
2395
- return r.status === "aborted" ? P : r.status === "dirty" || t.value === "dirty" ? Re(r.value) : r;
2395
+ return r.status === "aborted" ? F : r.status === "dirty" || t.value === "dirty" ? Le(r.value) : r;
2396
2396
  });
2397
2397
  {
2398
- if (t.value === "aborted") return P;
2398
+ if (t.value === "aborted") return F;
2399
2399
  let r = this._def.schema._parseSync({
2400
2400
  data: e,
2401
2401
  path: n.path,
2402
2402
  parent: n
2403
2403
  });
2404
- return r.status === "aborted" ? P : r.status === "dirty" || t.value === "dirty" ? Re(r.value) : r;
2404
+ return r.status === "aborted" ? F : r.status === "dirty" || t.value === "dirty" ? Le(r.value) : r;
2405
2405
  }
2406
2406
  }
2407
2407
  if (r.type === "refinement") {
@@ -2417,7 +2417,7 @@ var W = class extends B {
2417
2417
  path: n.path,
2418
2418
  parent: n
2419
2419
  });
2420
- return r.status === "aborted" ? P : (r.status === "dirty" && t.dirty(), e(r.value), {
2420
+ return r.status === "aborted" ? F : (r.status === "dirty" && t.dirty(), e(r.value), {
2421
2421
  status: t.value,
2422
2422
  value: r.value
2423
2423
  });
@@ -2425,7 +2425,7 @@ var W = class extends B {
2425
2425
  data: n.data,
2426
2426
  path: n.path,
2427
2427
  parent: n
2428
- }).then((n) => n.status === "aborted" ? P : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
2428
+ }).then((n) => n.status === "aborted" ? F : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
2429
2429
  status: t.value,
2430
2430
  value: n.value
2431
2431
  }))));
@@ -2436,7 +2436,7 @@ var W = class extends B {
2436
2436
  path: n.path,
2437
2437
  parent: n
2438
2438
  });
2439
- if (!I(e)) return P;
2439
+ if (!Be(e)) return F;
2440
2440
  let a = r.transform(e.value, i);
2441
2441
  if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2442
2442
  return {
@@ -2447,10 +2447,10 @@ var W = class extends B {
2447
2447
  data: n.data,
2448
2448
  path: n.path,
2449
2449
  parent: n
2450
- }).then((e) => I(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2450
+ }).then((e) => Be(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2451
2451
  status: t.value,
2452
2452
  value: e
2453
- })) : P);
2453
+ })) : F);
2454
2454
  y.assertNever(r);
2455
2455
  }
2456
2456
  };
@@ -2470,7 +2470,7 @@ W.create = (e, t, n) => new W({
2470
2470
  });
2471
2471
  var G = class extends B {
2472
2472
  _parse(e) {
2473
- return this._getType(e) === S.undefined ? F(void 0) : this._def.innerType._parse(e);
2473
+ return this._getType(e) === S.undefined ? I(void 0) : this._def.innerType._parse(e);
2474
2474
  }
2475
2475
  unwrap() {
2476
2476
  return this._def.innerType;
@@ -2483,7 +2483,7 @@ G.create = (e, t) => new G({
2483
2483
  });
2484
2484
  var Ht = class extends B {
2485
2485
  _parse(e) {
2486
- return this._getType(e) === S.null ? F(null) : this._def.innerType._parse(e);
2486
+ return this._getType(e) === S.null ? I(null) : this._def.innerType._parse(e);
2487
2487
  }
2488
2488
  unwrap() {
2489
2489
  return this._def.innerType;
@@ -2558,11 +2558,11 @@ var Gt = class extends B {
2558
2558
  _parse(e) {
2559
2559
  if (this._getType(e) !== S.nan) {
2560
2560
  let t = this._getOrReturnCtx(e);
2561
- return M(t, {
2561
+ return N(t, {
2562
2562
  code: x.invalid_type,
2563
2563
  expected: S.nan,
2564
2564
  received: t.parsedType
2565
- }), P;
2565
+ }), F;
2566
2566
  }
2567
2567
  return {
2568
2568
  status: "valid",
@@ -2595,7 +2595,7 @@ var Kt = class extends B {
2595
2595
  path: n.path,
2596
2596
  parent: n
2597
2597
  });
2598
- return e.status === "aborted" ? P : e.status === "dirty" ? (t.dirty(), Re(e.value)) : this._def.out._parseAsync({
2598
+ return e.status === "aborted" ? F : e.status === "dirty" ? (t.dirty(), Le(e.value)) : this._def.out._parseAsync({
2599
2599
  data: e.value,
2600
2600
  path: n.path,
2601
2601
  parent: n
@@ -2607,7 +2607,7 @@ var Kt = class extends B {
2607
2607
  path: n.path,
2608
2608
  parent: n
2609
2609
  });
2610
- return e.status === "aborted" ? P : e.status === "dirty" ? (t.dirty(), {
2610
+ return e.status === "aborted" ? F : e.status === "dirty" ? (t.dirty(), {
2611
2611
  status: "dirty",
2612
2612
  value: e.value
2613
2613
  }) : this._def.out._parseSync({
@@ -2626,7 +2626,7 @@ var Kt = class extends B {
2626
2626
  }
2627
2627
  }, Jt = class extends B {
2628
2628
  _parse(e) {
2629
- let t = this._def.innerType._parse(e), n = (e) => (I(e) && (e.value = Object.freeze(e.value)), e);
2629
+ let t = this._def.innerType._parse(e), n = (e) => (Be(e) && (e.value = Object.freeze(e.value)), e);
2630
2630
  return Ve(t) ? t.then((e) => n(e)) : n(t);
2631
2631
  }
2632
2632
  unwrap() {
@@ -2643,46 +2643,111 @@ var K;
2643
2643
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
2644
2644
  })(K ||= {}), pt.create, ht.create, Gt.create, gt.create, _t.create, vt.create, yt.create, bt.create, xt.create, St.create, Ct.create, V.create, wt.create, Tt.create, H.create, H.strictCreate, Dt.create, Ot.create, At.create, jt.create, Mt.create, Nt.create, Pt.create, Ft.create, It.create, Lt.create, zt.create, Bt.create, Vt.create, W.create, G.create, Ht.create, W.createWithPreprocess, qt.create;
2645
2645
  //#endregion
2646
- //#region ../../node_modules/.pnpm/eventsource-parser@3.0.6/node_modules/eventsource-parser/dist/index.js
2646
+ //#region ../../node_modules/.pnpm/eventsource-parser@3.0.8/node_modules/eventsource-parser/dist/index.js
2647
2647
  var Yt = class extends Error {
2648
2648
  constructor(e, t) {
2649
2649
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
2650
2650
  }
2651
- };
2652
- function Xt(e) {}
2653
- function Zt(e) {
2651
+ }, Xt = 10, Zt = 13, Qt = 32;
2652
+ function $t(e) {}
2653
+ function en(e) {
2654
2654
  if (typeof e == "function") throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
2655
- let { onEvent: t = Xt, onError: n = Xt, onRetry: r = Xt, onComment: i } = e, a = "", o = !0, s, c = "", l = "";
2656
- function u(e) {
2657
- let t = o ? e.replace(/^\xEF\xBB\xBF/, "") : e, [n, r] = Qt(`${a}${t}`);
2658
- for (let e of n) d(e);
2659
- a = r, o = !1;
2660
- }
2655
+ let { onEvent: t = $t, onError: n = $t, onRetry: r = $t, onComment: i } = e, a = [], o = !0, s, c = "", l = 0, u;
2661
2656
  function d(e) {
2662
- if (e === "") {
2663
- p();
2657
+ if (o && (o = !1, e.charCodeAt(0) === 239 && e.charCodeAt(1) === 187 && e.charCodeAt(2) === 191 && (e = e.slice(3))), a.length === 0) {
2658
+ let t = f(e);
2659
+ t !== "" && a.push(t);
2660
+ return;
2661
+ }
2662
+ if (e.indexOf("\n") === -1 && e.indexOf("\r") === -1) {
2663
+ a.push(e);
2664
+ return;
2665
+ }
2666
+ a.push(e);
2667
+ let t = a.join("");
2668
+ a.length = 0;
2669
+ let n = f(t);
2670
+ n !== "" && a.push(n);
2671
+ }
2672
+ function f(e) {
2673
+ let n = 0;
2674
+ if (e.indexOf("\r") === -1) {
2675
+ let r = e.indexOf("\n", n);
2676
+ for (; r !== -1;) {
2677
+ if (n === r) {
2678
+ l > 0 && t({
2679
+ id: s,
2680
+ event: u,
2681
+ data: c
2682
+ }), s = void 0, c = "", l = 0, u = void 0, n = r + 1, r = e.indexOf("\n", n);
2683
+ continue;
2684
+ }
2685
+ let i = e.charCodeAt(n);
2686
+ if (tn(e, n, i)) {
2687
+ let i = e.charCodeAt(n + 5) === Qt ? n + 6 : n + 5, a = e.slice(i, r);
2688
+ if (l === 0 && e.charCodeAt(r + 1) === Xt) {
2689
+ t({
2690
+ id: s,
2691
+ event: u,
2692
+ data: a
2693
+ }), s = void 0, c = "", u = void 0, n = r + 2, r = e.indexOf("\n", n);
2694
+ continue;
2695
+ }
2696
+ c = l === 0 ? a : `${c}
2697
+ ${a}`, l++;
2698
+ } else nn(e, n, i) ? u = e.slice(e.charCodeAt(n + 6) === Qt ? n + 7 : n + 6, r) || void 0 : p(e, n, r);
2699
+ n = r + 1, r = e.indexOf("\n", n);
2700
+ }
2701
+ return e.slice(n);
2702
+ }
2703
+ for (; n < e.length;) {
2704
+ let t = e.indexOf("\r", n), r = e.indexOf("\n", n), i = -1;
2705
+ if (t !== -1 && r !== -1 ? i = t < r ? t : r : t === -1 ? r !== -1 && (i = r) : i = t === e.length - 1 ? -1 : t, i === -1) break;
2706
+ p(e, n, i), n = i + 1, e.charCodeAt(n - 1) === Zt && e.charCodeAt(n) === Xt && n++;
2707
+ }
2708
+ return e.slice(n);
2709
+ }
2710
+ function p(e, t, n) {
2711
+ if (t === n) {
2712
+ h();
2713
+ return;
2714
+ }
2715
+ let r = e.charCodeAt(t);
2716
+ if (tn(e, t, r)) {
2717
+ let r = e.charCodeAt(t + 5) === Qt ? t + 6 : t + 5, i = e.slice(r, n);
2718
+ c = l === 0 ? i : `${c}
2719
+ ${i}`, l++;
2720
+ return;
2721
+ }
2722
+ if (nn(e, t, r)) {
2723
+ u = e.slice(e.charCodeAt(t + 6) === Qt ? t + 7 : t + 6, n) || void 0;
2724
+ return;
2725
+ }
2726
+ if (r === 105 && e.charCodeAt(t + 1) === 100 && e.charCodeAt(t + 2) === 58) {
2727
+ let r = e.slice(e.charCodeAt(t + 3) === Qt ? t + 4 : t + 3, n);
2728
+ s = r.includes("\0") ? void 0 : r;
2664
2729
  return;
2665
2730
  }
2666
- if (e.startsWith(":")) {
2667
- i && i(e.slice(e.startsWith(": ") ? 2 : 1));
2731
+ if (r === 58) {
2732
+ i && i(e.slice(t, n).slice(e.charCodeAt(t + 1) === Qt ? 2 : 1));
2668
2733
  return;
2669
2734
  }
2670
- let t = e.indexOf(":");
2671
- if (t !== -1) {
2672
- let n = e.slice(0, t), r = e[t + 1] === " " ? 2 : 1;
2673
- f(n, e.slice(t + r), e);
2735
+ let a = e.slice(t, n), o = a.indexOf(":");
2736
+ if (o === -1) {
2737
+ m(a, "", a);
2674
2738
  return;
2675
2739
  }
2676
- f(e, "", e);
2740
+ let d = a.slice(0, o), f = a.charCodeAt(o + 1) === Qt ? 2 : 1;
2741
+ m(d, a.slice(o + f), a);
2677
2742
  }
2678
- function f(e, t, i) {
2743
+ function m(e, t, i) {
2679
2744
  switch (e) {
2680
2745
  case "event":
2681
- l = t;
2746
+ u = t || void 0;
2682
2747
  break;
2683
2748
  case "data":
2684
- c = `${c}${t}
2685
- `;
2749
+ c = l === 0 ? t : `${c}
2750
+ ${t}`, l++;
2686
2751
  break;
2687
2752
  case "id":
2688
2753
  s = t.includes("\0") ? void 0 : t;
@@ -2704,43 +2769,39 @@ function Zt(e) {
2704
2769
  break;
2705
2770
  }
2706
2771
  }
2707
- function p() {
2708
- c.length > 0 && t({
2772
+ function h() {
2773
+ l > 0 && t({
2709
2774
  id: s,
2710
- event: l || void 0,
2711
- data: c.endsWith("\n") ? c.slice(0, -1) : c
2712
- }), s = void 0, c = "", l = "";
2713
- }
2714
- function m(e = {}) {
2715
- a && e.consume && d(a), o = !0, s = void 0, c = "", l = "", a = "";
2775
+ event: u,
2776
+ data: c
2777
+ }), s = void 0, c = "", l = 0, u = void 0;
2778
+ }
2779
+ function g(e = {}) {
2780
+ if (e.consume && a.length > 0) {
2781
+ let e = a.join("");
2782
+ p(e, 0, e.length);
2783
+ }
2784
+ o = !0, s = void 0, c = "", l = 0, u = void 0, a.length = 0;
2716
2785
  }
2717
2786
  return {
2718
- feed: u,
2719
- reset: m
2787
+ feed: d,
2788
+ reset: g
2720
2789
  };
2721
2790
  }
2722
- function Qt(e) {
2723
- let t = [], n = "", r = 0;
2724
- for (; r < e.length;) {
2725
- let i = e.indexOf("\r", r), a = e.indexOf("\n", r), o = -1;
2726
- if (i !== -1 && a !== -1 ? o = Math.min(i, a) : i === -1 ? a !== -1 && (o = a) : o = i === e.length - 1 ? -1 : i, o === -1) {
2727
- n = e.slice(r);
2728
- break;
2729
- } else {
2730
- let n = e.slice(r, o);
2731
- t.push(n), r = o + 1, e[r - 1] === "\r" && e[r] === "\n" && r++;
2732
- }
2733
- }
2734
- return [t, n];
2791
+ function tn(e, t, n) {
2792
+ return n === 100 && e.charCodeAt(t + 1) === 97 && e.charCodeAt(t + 2) === 116 && e.charCodeAt(t + 3) === 97 && e.charCodeAt(t + 4) === 58;
2793
+ }
2794
+ function nn(e, t, n) {
2795
+ return n === 101 && e.charCodeAt(t + 1) === 118 && e.charCodeAt(t + 2) === 101 && e.charCodeAt(t + 3) === 110 && e.charCodeAt(t + 4) === 116 && e.charCodeAt(t + 5) === 58;
2735
2796
  }
2736
2797
  //#endregion
2737
- //#region ../../node_modules/.pnpm/eventsource-parser@3.0.6/node_modules/eventsource-parser/dist/stream.js
2738
- var $t = class extends TransformStream {
2798
+ //#region ../../node_modules/.pnpm/eventsource-parser@3.0.8/node_modules/eventsource-parser/dist/stream.js
2799
+ var rn = class extends TransformStream {
2739
2800
  constructor({ onError: e, onRetry: t, onComment: n } = {}) {
2740
2801
  let r;
2741
2802
  super({
2742
2803
  start(i) {
2743
- r = Zt({
2804
+ r = en({
2744
2805
  onEvent: (e) => {
2745
2806
  i.enqueue(e);
2746
2807
  },
@@ -2756,20 +2817,20 @@ var $t = class extends TransformStream {
2756
2817
  }
2757
2818
  });
2758
2819
  }
2759
- }, { btoa: en, atob: tn } = globalThis, nn = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
2820
+ }, { btoa: an, atob: on } = globalThis, sn = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
2760
2821
  let i = () => {
2761
2822
  let e = n.length, r = Array(t);
2762
2823
  for (let i = 0; i < t; i++) r[i] = n[Math.random() * e | 0];
2763
2824
  return r.join("");
2764
2825
  };
2765
2826
  if (e == null) return i;
2766
- if (n.includes(r)) throw new we({
2827
+ if (n.includes(r)) throw new Ce({
2767
2828
  argument: "separator",
2768
2829
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
2769
2830
  });
2770
2831
  return () => `${e}${r}${i()}`;
2771
- }, rn = nn();
2772
- function an(e) {
2832
+ }, cn = sn();
2833
+ function ln(e) {
2773
2834
  if (e == null) return {};
2774
2835
  let t = {};
2775
2836
  if (e instanceof Headers) e.forEach((e, n) => {
@@ -2781,12 +2842,12 @@ function an(e) {
2781
2842
  }
2782
2843
  return t;
2783
2844
  }
2784
- var on = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, sn = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
2785
- function cn(e) {
2845
+ var un = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, dn = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
2846
+ function fn(e) {
2786
2847
  let t = JSON.parse(e);
2787
- return typeof t != "object" || !t || on.test(e) === !1 && sn.test(e) === !1 ? t : ln(t);
2848
+ return typeof t != "object" || !t || un.test(e) === !1 && dn.test(e) === !1 ? t : pn(t);
2788
2849
  }
2789
- function ln(e) {
2850
+ function pn(e) {
2790
2851
  let t = [e];
2791
2852
  for (; t.length;) {
2792
2853
  let e = t;
@@ -2801,34 +2862,34 @@ function ln(e) {
2801
2862
  }
2802
2863
  return e;
2803
2864
  }
2804
- function un(e) {
2865
+ function mn(e) {
2805
2866
  let { stackTraceLimit: t } = Error;
2806
2867
  try {
2807
2868
  Error.stackTraceLimit = 0;
2808
2869
  } catch {
2809
- return cn(e);
2870
+ return fn(e);
2810
2871
  }
2811
2872
  try {
2812
- return cn(e);
2873
+ return fn(e);
2813
2874
  } finally {
2814
2875
  Error.stackTraceLimit = t;
2815
2876
  }
2816
2877
  }
2817
- function dn(e) {
2878
+ function hn(e) {
2818
2879
  if (e.type === "object" || Array.isArray(e.type) && e.type.includes("object")) {
2819
2880
  e.additionalProperties = !1;
2820
2881
  let { properties: t } = e;
2821
- if (t != null) for (let e of Object.keys(t)) t[e] = fn(t[e]);
2882
+ if (t != null) for (let e of Object.keys(t)) t[e] = gn(t[e]);
2822
2883
  }
2823
- e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(fn) : fn(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(fn)), e.allOf != null && (e.allOf = e.allOf.map(fn)), e.oneOf != null && (e.oneOf = e.oneOf.map(fn));
2884
+ e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(gn) : gn(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(gn)), e.allOf != null && (e.allOf = e.allOf.map(gn)), e.oneOf != null && (e.oneOf = e.oneOf.map(gn));
2824
2885
  let { definitions: t } = e;
2825
- if (t != null) for (let e of Object.keys(t)) t[e] = fn(t[e]);
2886
+ if (t != null) for (let e of Object.keys(t)) t[e] = gn(t[e]);
2826
2887
  return e;
2827
2888
  }
2828
- function fn(e) {
2829
- return typeof e == "boolean" ? e : dn(e);
2889
+ function gn(e) {
2890
+ return typeof e == "boolean" ? e : hn(e);
2830
2891
  }
2831
- var pn = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"), mn = {
2892
+ var _n = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"), vn = {
2832
2893
  name: void 0,
2833
2894
  $refStrategy: "root",
2834
2895
  basePath: ["#"],
@@ -2848,24 +2909,24 @@ var pn = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to u
2848
2909
  emailStrategy: "format:email",
2849
2910
  base64Strategy: "contentEncoding:base64",
2850
2911
  nameStrategy: "ref"
2851
- }, hn = (e) => typeof e == "string" ? {
2852
- ...mn,
2912
+ }, yn = (e) => typeof e == "string" ? {
2913
+ ...vn,
2853
2914
  name: e
2854
2915
  } : {
2855
- ...mn,
2916
+ ...vn,
2856
2917
  ...e
2857
2918
  };
2858
2919
  function q() {
2859
2920
  return {};
2860
2921
  }
2861
- function gn(e, t) {
2922
+ function bn(e, t) {
2862
2923
  let n = { type: "array" };
2863
2924
  return e.type?._def && e.type?._def?.typeName !== K.ZodAny && (n.items = Z(e.type._def, {
2864
2925
  ...t,
2865
2926
  currentPath: [...t.currentPath, "items"]
2866
2927
  })), e.minLength && (n.minItems = e.minLength.value), e.maxLength && (n.maxItems = e.maxLength.value), e.exactLength && (n.minItems = e.exactLength.value, n.maxItems = e.exactLength.value), n;
2867
2928
  }
2868
- function _n(e) {
2929
+ function xn(e) {
2869
2930
  let t = {
2870
2931
  type: "integer",
2871
2932
  format: "int64"
@@ -2884,16 +2945,16 @@ function _n(e) {
2884
2945
  }
2885
2946
  return t;
2886
2947
  }
2887
- function vn() {
2948
+ function Sn() {
2888
2949
  return { type: "boolean" };
2889
2950
  }
2890
- function yn(e, t) {
2951
+ function Cn(e, t) {
2891
2952
  return Z(e.type._def, t);
2892
2953
  }
2893
- var bn = (e, t) => Z(e.innerType._def, t);
2894
- function xn(e, t, n) {
2954
+ var wn = (e, t) => Z(e.innerType._def, t);
2955
+ function Tn(e, t, n) {
2895
2956
  let r = n ?? t.dateStrategy;
2896
- if (Array.isArray(r)) return { anyOf: r.map((n, r) => xn(e, t, n)) };
2957
+ if (Array.isArray(r)) return { anyOf: r.map((n, r) => Tn(e, t, n)) };
2897
2958
  switch (r) {
2898
2959
  case "string":
2899
2960
  case "format:date-time": return {
@@ -2904,10 +2965,10 @@ function xn(e, t, n) {
2904
2965
  type: "string",
2905
2966
  format: "date"
2906
2967
  };
2907
- case "integer": return Sn(e);
2968
+ case "integer": return En(e);
2908
2969
  }
2909
2970
  }
2910
- var Sn = (e) => {
2971
+ var En = (e) => {
2911
2972
  let t = {
2912
2973
  type: "integer",
2913
2974
  format: "unix-time"
@@ -2922,23 +2983,23 @@ var Sn = (e) => {
2922
2983
  }
2923
2984
  return t;
2924
2985
  };
2925
- function Cn(e, t) {
2986
+ function Dn(e, t) {
2926
2987
  return {
2927
2988
  ...Z(e.innerType._def, t),
2928
2989
  default: e.defaultValue()
2929
2990
  };
2930
2991
  }
2931
- function wn(e, t) {
2992
+ function On(e, t) {
2932
2993
  return t.effectStrategy === "input" ? Z(e.schema._def, t) : q();
2933
2994
  }
2934
- function Tn(e) {
2995
+ function kn(e) {
2935
2996
  return {
2936
2997
  type: "string",
2937
2998
  enum: Array.from(e.values)
2938
2999
  };
2939
3000
  }
2940
- var En = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
2941
- function Dn(e, t) {
3001
+ var An = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3002
+ function jn(e, t) {
2942
3003
  let n = [Z(e.left._def, {
2943
3004
  ...t,
2944
3005
  currentPath: [
@@ -2955,7 +3016,7 @@ function Dn(e, t) {
2955
3016
  ]
2956
3017
  })].filter((e) => !!e), r = [];
2957
3018
  return n.forEach((e) => {
2958
- if (En(e)) r.push(...e.allOf);
3019
+ if (An(e)) r.push(...e.allOf);
2959
3020
  else {
2960
3021
  let t = e;
2961
3022
  if ("additionalProperties" in e && e.additionalProperties === !1) {
@@ -2966,19 +3027,19 @@ function Dn(e, t) {
2966
3027
  }
2967
3028
  }), r.length ? { allOf: r } : void 0;
2968
3029
  }
2969
- function On(e) {
3030
+ function Mn(e) {
2970
3031
  let t = typeof e.value;
2971
3032
  return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : {
2972
3033
  type: t === "bigint" ? "integer" : t,
2973
3034
  const: e.value
2974
3035
  };
2975
3036
  }
2976
- var kn = void 0, J = {
3037
+ var Nn = void 0, J = {
2977
3038
  cuid: /^[cC][^\s-]{8,}$/,
2978
3039
  cuid2: /^[0-9a-z]+$/,
2979
3040
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
2980
3041
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
2981
- emoji: () => (kn === void 0 && (kn = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), kn),
3042
+ emoji: () => (Nn === void 0 && (Nn = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Nn),
2982
3043
  uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
2983
3044
  ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
2984
3045
  ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
@@ -2989,7 +3050,7 @@ var kn = void 0, J = {
2989
3050
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
2990
3051
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
2991
3052
  };
2992
- function An(e, t) {
3053
+ function Pn(e, t) {
2993
3054
  let n = { type: "string" };
2994
3055
  if (e.checks) for (let r of e.checks) switch (r.kind) {
2995
3056
  case "min":
@@ -3027,10 +3088,10 @@ function An(e, t) {
3027
3088
  X(n, J.cuid2, r.message, t);
3028
3089
  break;
3029
3090
  case "startsWith":
3030
- X(n, RegExp(`^${jn(r.value, t)}`), r.message, t);
3091
+ X(n, RegExp(`^${Fn(r.value, t)}`), r.message, t);
3031
3092
  break;
3032
3093
  case "endsWith":
3033
- X(n, RegExp(`${jn(r.value, t)}$`), r.message, t);
3094
+ X(n, RegExp(`${Fn(r.value, t)}$`), r.message, t);
3034
3095
  break;
3035
3096
  case "datetime":
3036
3097
  Y(n, "date-time", r.message, t);
@@ -3048,7 +3109,7 @@ function An(e, t) {
3048
3109
  n.minLength = typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, n.maxLength = typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value;
3049
3110
  break;
3050
3111
  case "includes":
3051
- X(n, RegExp(jn(r.value, t)), r.message, t);
3112
+ X(n, RegExp(Fn(r.value, t)), r.message, t);
3052
3113
  break;
3053
3114
  case "ip":
3054
3115
  r.version !== "v6" && Y(n, "ipv4", r.message, t), r.version !== "v4" && Y(n, "ipv6", r.message, t);
@@ -3089,13 +3150,13 @@ function An(e, t) {
3089
3150
  }
3090
3151
  return n;
3091
3152
  }
3092
- function jn(e, t) {
3093
- return t.patternStrategy === "escape" ? Nn(e) : e;
3153
+ function Fn(e, t) {
3154
+ return t.patternStrategy === "escape" ? Ln(e) : e;
3094
3155
  }
3095
- var Mn = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3096
- function Nn(e) {
3156
+ var In = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3157
+ function Ln(e) {
3097
3158
  let t = "";
3098
- for (let n = 0; n < e.length; n++) Mn.has(e[n]) || (t += "\\"), t += e[n];
3159
+ for (let n = 0; n < e.length; n++) In.has(e[n]) || (t += "\\"), t += e[n];
3099
3160
  return t;
3100
3161
  }
3101
3162
  function Y(e, t, n, r) {
@@ -3106,11 +3167,11 @@ function Y(e, t, n, r) {
3106
3167
  }
3107
3168
  function X(e, t, n, r) {
3108
3169
  e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({ pattern: e.pattern }), delete e.pattern), e.allOf.push({
3109
- pattern: Pn(t, r),
3170
+ pattern: Rn(t, r),
3110
3171
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
3111
- })) : e.pattern = Pn(t, r);
3172
+ })) : e.pattern = Rn(t, r);
3112
3173
  }
3113
- function Pn(e, t) {
3174
+ function Rn(e, t) {
3114
3175
  if (!t.applyRegexFlags || !e.flags) return e.source;
3115
3176
  let n = {
3116
3177
  i: e.flags.includes("i"),
@@ -3157,7 +3218,7 @@ function Pn(e, t) {
3157
3218
  }
3158
3219
  return i;
3159
3220
  }
3160
- function Fn(e, t) {
3221
+ function zn(e, t) {
3161
3222
  let n = {
3162
3223
  type: "object",
3163
3224
  additionalProperties: Z(e.valueType._def, {
@@ -3166,7 +3227,7 @@ function Fn(e, t) {
3166
3227
  }) ?? t.allowedAdditionalProperties
3167
3228
  };
3168
3229
  if (e.keyType?._def.typeName === K.ZodString && e.keyType._def.checks?.length) {
3169
- let { type: r, ...i } = An(e.keyType._def, t);
3230
+ let { type: r, ...i } = Pn(e.keyType._def, t);
3170
3231
  return {
3171
3232
  ...n,
3172
3233
  propertyNames: i
@@ -3176,7 +3237,7 @@ function Fn(e, t) {
3176
3237
  propertyNames: { enum: e.keyType._def.values }
3177
3238
  };
3178
3239
  else if (e.keyType?._def.typeName === K.ZodBranded && e.keyType._def.type._def.typeName === K.ZodString && e.keyType._def.type._def.checks?.length) {
3179
- let { type: r, ...i } = yn(e.keyType._def, t);
3240
+ let { type: r, ...i } = Cn(e.keyType._def, t);
3180
3241
  return {
3181
3242
  ...n,
3182
3243
  propertyNames: i
@@ -3184,8 +3245,8 @@ function Fn(e, t) {
3184
3245
  }
3185
3246
  return n;
3186
3247
  }
3187
- function In(e, t) {
3188
- return t.mapStrategy === "record" ? Fn(e, t) : {
3248
+ function Bn(e, t) {
3249
+ return t.mapStrategy === "record" ? zn(e, t) : {
3189
3250
  type: "array",
3190
3251
  maxItems: 125,
3191
3252
  items: {
@@ -3212,31 +3273,31 @@ function In(e, t) {
3212
3273
  }
3213
3274
  };
3214
3275
  }
3215
- function Ln(e) {
3276
+ function Vn(e) {
3216
3277
  let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
3217
3278
  return {
3218
3279
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
3219
3280
  enum: n
3220
3281
  };
3221
3282
  }
3222
- function Rn() {
3283
+ function Hn() {
3223
3284
  return { not: q() };
3224
3285
  }
3225
- function zn() {
3286
+ function Un() {
3226
3287
  return { type: "null" };
3227
3288
  }
3228
- var Bn = {
3289
+ var Wn = {
3229
3290
  ZodString: "string",
3230
3291
  ZodNumber: "number",
3231
3292
  ZodBigInt: "integer",
3232
3293
  ZodBoolean: "boolean",
3233
3294
  ZodNull: "null"
3234
3295
  };
3235
- function Vn(e, t) {
3296
+ function Gn(e, t) {
3236
3297
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
3237
- if (n.every((e) => e._def.typeName in Bn && (!e._def.checks || !e._def.checks.length))) {
3298
+ if (n.every((e) => e._def.typeName in Wn && (!e._def.checks || !e._def.checks.length))) {
3238
3299
  let e = n.reduce((e, t) => {
3239
- let n = Bn[t._def.typeName];
3300
+ let n = Wn[t._def.typeName];
3240
3301
  return n && !e.includes(n) ? [...e, n] : e;
3241
3302
  }, []);
3242
3303
  return { type: e.length > 1 ? e : e[0] };
@@ -3263,9 +3324,9 @@ function Vn(e, t) {
3263
3324
  type: "string",
3264
3325
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
3265
3326
  };
3266
- return Hn(e, t);
3327
+ return Kn(e, t);
3267
3328
  }
3268
- var Hn = (e, t) => {
3329
+ var Kn = (e, t) => {
3269
3330
  let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => Z(e._def, {
3270
3331
  ...t,
3271
3332
  currentPath: [
@@ -3276,14 +3337,14 @@ var Hn = (e, t) => {
3276
3337
  })).filter((e) => !!e && (!t.strictUnions || typeof e == "object" && Object.keys(e).length > 0));
3277
3338
  return n.length ? { anyOf: n } : void 0;
3278
3339
  };
3279
- function Un(e, t) {
3340
+ function qn(e, t) {
3280
3341
  if ([
3281
3342
  "ZodString",
3282
3343
  "ZodNumber",
3283
3344
  "ZodBigInt",
3284
3345
  "ZodBoolean",
3285
3346
  "ZodNull"
3286
- ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [Bn[e.innerType._def.typeName], "null"] };
3347
+ ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [Wn[e.innerType._def.typeName], "null"] };
3287
3348
  let n = Z(e.innerType._def, {
3288
3349
  ...t,
3289
3350
  currentPath: [
@@ -3294,7 +3355,7 @@ function Un(e, t) {
3294
3355
  });
3295
3356
  return n && { anyOf: [n, { type: "null" }] };
3296
3357
  }
3297
- function Wn(e) {
3358
+ function Jn(e) {
3298
3359
  let t = { type: "number" };
3299
3360
  if (!e.checks) return t;
3300
3361
  for (let n of e.checks) switch (n.kind) {
@@ -3313,7 +3374,7 @@ function Wn(e) {
3313
3374
  }
3314
3375
  return t;
3315
3376
  }
3316
- function Gn(e, t) {
3377
+ function Yn(e, t) {
3317
3378
  let n = {
3318
3379
  type: "object",
3319
3380
  properties: {}
@@ -3321,7 +3382,7 @@ function Gn(e, t) {
3321
3382
  for (let e in i) {
3322
3383
  let a = i[e];
3323
3384
  if (a === void 0 || a._def === void 0) continue;
3324
- let o = qn(a), s = Z(a._def, {
3385
+ let o = Zn(a), s = Z(a._def, {
3325
3386
  ...t,
3326
3387
  currentPath: [
3327
3388
  ...t.currentPath,
@@ -3337,10 +3398,10 @@ function Gn(e, t) {
3337
3398
  s !== void 0 && (n.properties[e] = s, o || r.push(e));
3338
3399
  }
3339
3400
  r.length && (n.required = r);
3340
- let a = Kn(e, t);
3401
+ let a = Xn(e, t);
3341
3402
  return a !== void 0 && (n.additionalProperties = a), n;
3342
3403
  }
3343
- function Kn(e, t) {
3404
+ function Xn(e, t) {
3344
3405
  if (e.catchall._def.typeName !== "ZodNever") return Z(e.catchall._def, {
3345
3406
  ...t,
3346
3407
  currentPath: [...t.currentPath, "additionalProperties"]
@@ -3351,14 +3412,14 @@ function Kn(e, t) {
3351
3412
  case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
3352
3413
  }
3353
3414
  }
3354
- function qn(e) {
3415
+ function Zn(e) {
3355
3416
  try {
3356
3417
  return e.isOptional();
3357
3418
  } catch {
3358
3419
  return !0;
3359
3420
  }
3360
3421
  }
3361
- var Jn = (e, t) => {
3422
+ var Qn = (e, t) => {
3362
3423
  if (t.currentPath.toString() === t.propertyPath?.toString()) return Z(e.innerType._def, t);
3363
3424
  let n = Z(e.innerType._def, {
3364
3425
  ...t,
@@ -3369,7 +3430,7 @@ var Jn = (e, t) => {
3369
3430
  ]
3370
3431
  });
3371
3432
  return n ? { anyOf: [{ not: q() }, n] } : q();
3372
- }, Yn = (e, t) => {
3433
+ }, $n = (e, t) => {
3373
3434
  if (t.pipeStrategy === "input") return Z(e.in._def, t);
3374
3435
  if (t.pipeStrategy === "output") return Z(e.out._def, t);
3375
3436
  let n = Z(e.in._def, {
@@ -3389,10 +3450,10 @@ var Jn = (e, t) => {
3389
3450
  ]
3390
3451
  })].filter((e) => e !== void 0) };
3391
3452
  };
3392
- function Xn(e, t) {
3453
+ function er(e, t) {
3393
3454
  return Z(e.type._def, t);
3394
3455
  }
3395
- function Zn(e, t) {
3456
+ function tr(e, t) {
3396
3457
  let n = {
3397
3458
  type: "array",
3398
3459
  uniqueItems: !0,
@@ -3403,7 +3464,7 @@ function Zn(e, t) {
3403
3464
  };
3404
3465
  return e.minSize && (n.minItems = e.minSize.value), e.maxSize && (n.maxItems = e.maxSize.value), n;
3405
3466
  }
3406
- function Qn(e, t) {
3467
+ function nr(e, t) {
3407
3468
  return e.rest ? {
3408
3469
  type: "array",
3409
3470
  minItems: e.items.length,
@@ -3433,53 +3494,53 @@ function Qn(e, t) {
3433
3494
  })).reduce((e, t) => t === void 0 ? e : [...e, t], [])
3434
3495
  };
3435
3496
  }
3436
- function $n() {
3497
+ function rr() {
3437
3498
  return { not: q() };
3438
3499
  }
3439
- function er() {
3500
+ function ir() {
3440
3501
  return q();
3441
3502
  }
3442
- var tr = (e, t) => Z(e.innerType._def, t), nr = (e, t, n) => {
3503
+ var ar = (e, t) => Z(e.innerType._def, t), or = (e, t, n) => {
3443
3504
  switch (t) {
3444
- case K.ZodString: return An(e, n);
3445
- case K.ZodNumber: return Wn(e);
3446
- case K.ZodObject: return Gn(e, n);
3447
- case K.ZodBigInt: return _n(e);
3448
- case K.ZodBoolean: return vn();
3449
- case K.ZodDate: return xn(e, n);
3450
- case K.ZodUndefined: return $n();
3451
- case K.ZodNull: return zn();
3452
- case K.ZodArray: return gn(e, n);
3505
+ case K.ZodString: return Pn(e, n);
3506
+ case K.ZodNumber: return Jn(e);
3507
+ case K.ZodObject: return Yn(e, n);
3508
+ case K.ZodBigInt: return xn(e);
3509
+ case K.ZodBoolean: return Sn();
3510
+ case K.ZodDate: return Tn(e, n);
3511
+ case K.ZodUndefined: return rr();
3512
+ case K.ZodNull: return Un();
3513
+ case K.ZodArray: return bn(e, n);
3453
3514
  case K.ZodUnion:
3454
- case K.ZodDiscriminatedUnion: return Vn(e, n);
3455
- case K.ZodIntersection: return Dn(e, n);
3456
- case K.ZodTuple: return Qn(e, n);
3457
- case K.ZodRecord: return Fn(e, n);
3458
- case K.ZodLiteral: return On(e);
3459
- case K.ZodEnum: return Tn(e);
3460
- case K.ZodNativeEnum: return Ln(e);
3461
- case K.ZodNullable: return Un(e, n);
3462
- case K.ZodOptional: return Jn(e, n);
3463
- case K.ZodMap: return In(e, n);
3464
- case K.ZodSet: return Zn(e, n);
3515
+ case K.ZodDiscriminatedUnion: return Gn(e, n);
3516
+ case K.ZodIntersection: return jn(e, n);
3517
+ case K.ZodTuple: return nr(e, n);
3518
+ case K.ZodRecord: return zn(e, n);
3519
+ case K.ZodLiteral: return Mn(e);
3520
+ case K.ZodEnum: return kn(e);
3521
+ case K.ZodNativeEnum: return Vn(e);
3522
+ case K.ZodNullable: return qn(e, n);
3523
+ case K.ZodOptional: return Qn(e, n);
3524
+ case K.ZodMap: return Bn(e, n);
3525
+ case K.ZodSet: return tr(e, n);
3465
3526
  case K.ZodLazy: return () => e.getter()._def;
3466
- case K.ZodPromise: return Xn(e, n);
3527
+ case K.ZodPromise: return er(e, n);
3467
3528
  case K.ZodNaN:
3468
- case K.ZodNever: return Rn();
3469
- case K.ZodEffects: return wn(e, n);
3529
+ case K.ZodNever: return Hn();
3530
+ case K.ZodEffects: return On(e, n);
3470
3531
  case K.ZodAny: return q();
3471
- case K.ZodUnknown: return er();
3472
- case K.ZodDefault: return Cn(e, n);
3473
- case K.ZodBranded: return yn(e, n);
3474
- case K.ZodReadonly: return tr(e, n);
3475
- case K.ZodCatch: return bn(e, n);
3476
- case K.ZodPipeline: return Yn(e, n);
3532
+ case K.ZodUnknown: return ir();
3533
+ case K.ZodDefault: return Dn(e, n);
3534
+ case K.ZodBranded: return Cn(e, n);
3535
+ case K.ZodReadonly: return ar(e, n);
3536
+ case K.ZodCatch: return wn(e, n);
3537
+ case K.ZodPipeline: return $n(e, n);
3477
3538
  case K.ZodFunction:
3478
3539
  case K.ZodVoid:
3479
3540
  case K.ZodSymbol: return;
3480
3541
  default: return /* @__PURE__ */ ((e) => void 0)(t);
3481
3542
  }
3482
- }, rr = (e, t) => {
3543
+ }, sr = (e, t) => {
3483
3544
  let n = 0;
3484
3545
  for (; n < e.length && n < t.length && e[n] === t[n]; n++);
3485
3546
  return [(e.length - n).toString(), ...t.slice(n)].join("/");
@@ -3488,10 +3549,10 @@ function Z(e, t, n = !1) {
3488
3549
  let r = t.seen.get(e);
3489
3550
  if (t.override) {
3490
3551
  let i = t.override?.call(t, e, t, r, n);
3491
- if (i !== pn) return i;
3552
+ if (i !== _n) return i;
3492
3553
  }
3493
3554
  if (r && !n) {
3494
- let e = ir(r, t);
3555
+ let e = cr(r, t);
3495
3556
  if (e !== void 0) return e;
3496
3557
  }
3497
3558
  let i = {
@@ -3500,22 +3561,22 @@ function Z(e, t, n = !1) {
3500
3561
  jsonSchema: void 0
3501
3562
  };
3502
3563
  t.seen.set(e, i);
3503
- let a = nr(e, e.typeName, t), o = typeof a == "function" ? Z(a(), t) : a;
3504
- if (o && ar(e, t, o), t.postProcess) {
3564
+ let a = or(e, e.typeName, t), o = typeof a == "function" ? Z(a(), t) : a;
3565
+ if (o && lr(e, t, o), t.postProcess) {
3505
3566
  let n = t.postProcess(o, e, t);
3506
3567
  return i.jsonSchema = o, n;
3507
3568
  }
3508
3569
  return i.jsonSchema = o, o;
3509
3570
  }
3510
- var ir = (e, t) => {
3571
+ var cr = (e, t) => {
3511
3572
  switch (t.$refStrategy) {
3512
3573
  case "root": return { $ref: e.path.join("/") };
3513
- case "relative": return { $ref: rr(t.currentPath, e.path) };
3574
+ case "relative": return { $ref: sr(t.currentPath, e.path) };
3514
3575
  case "none":
3515
3576
  case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), q()) : t.$refStrategy === "seen" ? q() : void 0;
3516
3577
  }
3517
- }, ar = (e, t, n) => (e.description && (n.description = e.description), n), or = (e) => {
3518
- let t = hn(e), n = t.name === void 0 ? t.basePath : [
3578
+ }, lr = (e, t, n) => (e.description && (n.description = e.description), n), ur = (e) => {
3579
+ let t = yn(e), n = t.name === void 0 ? t.basePath : [
3519
3580
  ...t.basePath,
3520
3581
  t.definitionPath,
3521
3582
  t.name
@@ -3534,8 +3595,8 @@ var ir = (e, t) => {
3534
3595
  jsonSchema: void 0
3535
3596
  }]))
3536
3597
  };
3537
- }, sr = (e, t) => {
3538
- let n = or(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
3598
+ }, dr = (e, t) => {
3599
+ let n = ur(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
3539
3600
  ...e,
3540
3601
  [t]: Z(r._def, {
3541
3602
  ...n,
@@ -3569,14 +3630,14 @@ var ir = (e, t) => {
3569
3630
  }
3570
3631
  };
3571
3632
  return s.$schema = "http://json-schema.org/draft-07/schema#", s;
3572
- }, cr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
3573
- function lr(e) {
3633
+ }, fr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
3634
+ function pr(e) {
3574
3635
  let t;
3575
3636
  return () => (t ??= e(), t);
3576
3637
  }
3577
- function ur(e, { validate: t } = {}) {
3638
+ function mr(e, { validate: t } = {}) {
3578
3639
  return {
3579
- [cr]: !0,
3640
+ [fr]: !0,
3580
3641
  _type: void 0,
3581
3642
  get jsonSchema() {
3582
3643
  return typeof e == "function" && (e = e()), e;
@@ -3584,33 +3645,33 @@ function ur(e, { validate: t } = {}) {
3584
3645
  validate: t
3585
3646
  };
3586
3647
  }
3587
- function dr(e) {
3588
- return typeof e == "object" && !!e && cr in e && e[cr] === !0 && "jsonSchema" in e && "validate" in e;
3648
+ function hr(e) {
3649
+ return typeof e == "object" && !!e && fr in e && e[fr] === !0 && "jsonSchema" in e && "validate" in e;
3589
3650
  }
3590
- function fr(e) {
3591
- return e == null ? ur({
3651
+ function gr(e) {
3652
+ return e == null ? mr({
3592
3653
  properties: {},
3593
3654
  additionalProperties: !1
3594
- }) : dr(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? _r(e) : pr(e) : e();
3655
+ }) : hr(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? xr(e) : _r(e) : e();
3595
3656
  }
3596
- function pr(e) {
3597
- return ur(() => dn(e["~standard"].jsonSchema.input({ target: "draft-07" })), { validate: async (t) => {
3657
+ function _r(e) {
3658
+ return mr(() => hn(e["~standard"].jsonSchema.input({ target: "draft-07" })), { validate: async (t) => {
3598
3659
  let n = await e["~standard"].validate(t);
3599
3660
  return "value" in n ? {
3600
3661
  success: !0,
3601
3662
  value: n.value
3602
3663
  } : {
3603
3664
  success: !1,
3604
- error: new A({
3665
+ error: new M({
3605
3666
  value: t,
3606
3667
  cause: n.issues
3607
3668
  })
3608
3669
  };
3609
3670
  } });
3610
3671
  }
3611
- function mr(e, t) {
3672
+ function vr(e, t) {
3612
3673
  let n = t?.useReferences ?? !1;
3613
- return ur(() => sr(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
3674
+ return mr(() => dr(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
3614
3675
  let n = await e.safeParseAsync(t);
3615
3676
  return n.success ? {
3616
3677
  success: !0,
@@ -3621,9 +3682,9 @@ function mr(e, t) {
3621
3682
  };
3622
3683
  } });
3623
3684
  }
3624
- function hr(e, t) {
3685
+ function yr(e, t) {
3625
3686
  let i = t?.useReferences ?? !1;
3626
- return ur(() => dn(n(e, {
3687
+ return mr(() => hn(n(e, {
3627
3688
  target: "draft-7",
3628
3689
  io: "input",
3629
3690
  reused: i ? "ref" : "inline"
@@ -3638,27 +3699,27 @@ function hr(e, t) {
3638
3699
  };
3639
3700
  } });
3640
3701
  }
3641
- function gr(e) {
3702
+ function br(e) {
3642
3703
  return "_zod" in e;
3643
3704
  }
3644
- function _r(e, t) {
3645
- return gr(e) ? hr(e, t) : mr(e, t);
3705
+ function xr(e, t) {
3706
+ return br(e) ? yr(e, t) : vr(e, t);
3646
3707
  }
3647
- async function vr({ value: e, schema: t, context: n }) {
3648
- let r = await yr({
3708
+ async function Sr({ value: e, schema: t, context: n }) {
3709
+ let r = await Cr({
3649
3710
  value: e,
3650
3711
  schema: t,
3651
3712
  context: n
3652
3713
  });
3653
- if (!r.success) throw A.wrap({
3714
+ if (!r.success) throw M.wrap({
3654
3715
  value: e,
3655
3716
  cause: r.error,
3656
3717
  context: n
3657
3718
  });
3658
3719
  return r.value;
3659
3720
  }
3660
- async function yr({ value: e, schema: t, context: n }) {
3661
- let r = fr(t);
3721
+ async function Cr({ value: e, schema: t, context: n }) {
3722
+ let r = gr(t);
3662
3723
  try {
3663
3724
  if (r.validate == null) return {
3664
3725
  success: !0,
@@ -3672,7 +3733,7 @@ async function yr({ value: e, schema: t, context: n }) {
3672
3733
  rawValue: e
3673
3734
  } : {
3674
3735
  success: !1,
3675
- error: A.wrap({
3736
+ error: M.wrap({
3676
3737
  value: e,
3677
3738
  cause: t.error,
3678
3739
  context: n
@@ -3682,7 +3743,7 @@ async function yr({ value: e, schema: t, context: n }) {
3682
3743
  } catch (t) {
3683
3744
  return {
3684
3745
  success: !1,
3685
- error: A.wrap({
3746
+ error: M.wrap({
3686
3747
  value: e,
3687
3748
  cause: t,
3688
3749
  context: n
@@ -3691,21 +3752,21 @@ async function yr({ value: e, schema: t, context: n }) {
3691
3752
  };
3692
3753
  }
3693
3754
  }
3694
- async function br({ text: e, schema: t }) {
3755
+ async function wr({ text: e, schema: t }) {
3695
3756
  try {
3696
- let n = un(e);
3757
+ let n = mn(e);
3697
3758
  return t == null ? {
3698
3759
  success: !0,
3699
3760
  value: n,
3700
3761
  rawValue: n
3701
- } : await yr({
3762
+ } : await Cr({
3702
3763
  value: n,
3703
3764
  schema: t
3704
3765
  });
3705
3766
  } catch (t) {
3706
3767
  return {
3707
3768
  success: !1,
3708
- error: ke.isInstance(t) ? t : new ke({
3769
+ error: j.isInstance(t) ? t : new j({
3709
3770
  text: e,
3710
3771
  cause: t
3711
3772
  }),
@@ -3713,88 +3774,88 @@ async function br({ text: e, schema: t }) {
3713
3774
  };
3714
3775
  }
3715
3776
  }
3716
- function xr({ stream: e, schema: t }) {
3717
- return e.pipeThrough(new TextDecoderStream()).pipeThrough(new $t()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
3718
- e !== "[DONE]" && n.enqueue(await br({
3777
+ function Tr({ stream: e, schema: t }) {
3778
+ return e.pipeThrough(new TextDecoderStream()).pipeThrough(new rn()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
3779
+ e !== "[DONE]" && n.enqueue(await wr({
3719
3780
  text: e,
3720
3781
  schema: t
3721
3782
  }));
3722
3783
  } }));
3723
3784
  }
3724
- async function Sr(e) {
3785
+ async function Er(e) {
3725
3786
  return typeof e == "function" && (e = e()), Promise.resolve(e);
3726
3787
  }
3727
3788
  //#endregion
3728
- //#region ../../node_modules/.pnpm/ai@6.0.138_zod@4.3.6/node_modules/ai/dist/index.mjs
3729
- var Cr = Object.defineProperty, wr = (e, t) => {
3730
- for (var n in t) Cr(e, n, {
3789
+ //#region ../../node_modules/.pnpm/ai@6.0.138_zod@4.4.3/node_modules/ai/dist/index.mjs
3790
+ var Dr = Object.defineProperty, Or = (e, t) => {
3791
+ for (var n in t) Dr(e, n, {
3731
3792
  get: t[n],
3732
3793
  enumerable: !0
3733
3794
  });
3734
- }, Tr = "AI_NoObjectGeneratedError", Er = `vercel.ai.error.${Tr}`, Dr = Symbol.for(Er), Or, kr = class extends O {
3795
+ }, kr = "AI_NoObjectGeneratedError", Ar = `vercel.ai.error.${kr}`, jr = Symbol.for(Ar), Mr, Nr = class extends O {
3735
3796
  constructor({ message: e = "No object generated.", cause: t, text: n, response: r, usage: i, finishReason: a }) {
3736
3797
  super({
3737
- name: Tr,
3798
+ name: kr,
3738
3799
  message: e,
3739
3800
  cause: t
3740
- }), this[Or] = !0, this.text = n, this.response = r, this.usage = i, this.finishReason = a;
3801
+ }), this[Mr] = !0, this.text = n, this.response = r, this.usage = i, this.finishReason = a;
3741
3802
  }
3742
3803
  static isInstance(e) {
3743
- return O.hasMarker(e, Er);
3804
+ return O.hasMarker(e, Ar);
3744
3805
  }
3745
3806
  };
3746
- Or = Dr;
3747
- var Ar = "AI_UIMessageStreamError", jr = `vercel.ai.error.${Ar}`, Mr = Symbol.for(jr), Nr, Pr = class extends O {
3807
+ Mr = jr;
3808
+ var Pr = "AI_UIMessageStreamError", Fr = `vercel.ai.error.${Pr}`, Ir = Symbol.for(Fr), Lr, Rr = class extends O {
3748
3809
  constructor({ chunkType: e, chunkId: t, message: n }) {
3749
3810
  super({
3750
- name: Ar,
3811
+ name: Pr,
3751
3812
  message: n
3752
- }), this[Nr] = !0, this.chunkType = e, this.chunkId = t;
3813
+ }), this[Lr] = !0, this.chunkType = e, this.chunkId = t;
3753
3814
  }
3754
3815
  static isInstance(e) {
3755
- return O.hasMarker(e, jr);
3816
+ return O.hasMarker(e, Fr);
3756
3817
  }
3757
3818
  };
3758
- Nr = Mr;
3759
- var Fr = v([
3819
+ Lr = Ir;
3820
+ var zr = v([
3760
3821
  _(),
3761
3822
  h(Uint8Array),
3762
3823
  h(ArrayBuffer),
3763
3824
  g((e) => globalThis.Buffer?.isBuffer(e) ?? !1, { message: "Must be a Buffer" })
3764
- ]), Ir = ee(() => v([
3825
+ ]), Br = ee(() => v([
3765
3826
  u(),
3766
3827
  _(),
3767
3828
  m(),
3768
3829
  p(),
3769
- l(_(), Ir.optional()),
3770
- a(Ir)
3771
- ])), Q = l(_(), l(_(), Ir.optional())), Lr = d({
3830
+ l(_(), Br.optional()),
3831
+ a(Br)
3832
+ ])), Q = l(_(), l(_(), Br.optional())), Vr = d({
3772
3833
  type: c("text"),
3773
3834
  text: _(),
3774
3835
  providerOptions: Q.optional()
3775
- }), Rr = d({
3836
+ }), Hr = d({
3776
3837
  type: c("image"),
3777
- image: v([Fr, h(URL)]),
3838
+ image: v([zr, h(URL)]),
3778
3839
  mediaType: _().optional(),
3779
3840
  providerOptions: Q.optional()
3780
- }), zr = d({
3841
+ }), Ur = d({
3781
3842
  type: c("file"),
3782
- data: v([Fr, h(URL)]),
3843
+ data: v([zr, h(URL)]),
3783
3844
  filename: _().optional(),
3784
3845
  mediaType: _(),
3785
3846
  providerOptions: Q.optional()
3786
- }), Br = d({
3847
+ }), Wr = d({
3787
3848
  type: c("reasoning"),
3788
3849
  text: _(),
3789
3850
  providerOptions: Q.optional()
3790
- }), Vr = d({
3851
+ }), Gr = d({
3791
3852
  type: c("tool-call"),
3792
3853
  toolCallId: _(),
3793
3854
  toolName: _(),
3794
3855
  input: o(),
3795
3856
  providerOptions: Q.optional(),
3796
3857
  providerExecuted: p().optional()
3797
- }), Hr = s("type", [
3858
+ }), Kr = s("type", [
3798
3859
  d({
3799
3860
  type: c("text"),
3800
3861
  value: _(),
@@ -3802,7 +3863,7 @@ var Fr = v([
3802
3863
  }),
3803
3864
  d({
3804
3865
  type: c("json"),
3805
- value: Ir,
3866
+ value: Br,
3806
3867
  providerOptions: Q.optional()
3807
3868
  }),
3808
3869
  d({
@@ -3817,7 +3878,7 @@ var Fr = v([
3817
3878
  }),
3818
3879
  d({
3819
3880
  type: c("error-json"),
3820
- value: Ir,
3881
+ value: Br,
3821
3882
  providerOptions: Q.optional()
3822
3883
  }),
3823
3884
  d({
@@ -3872,17 +3933,17 @@ var Fr = v([
3872
3933
  })
3873
3934
  ]))
3874
3935
  })
3875
- ]), Ur = d({
3936
+ ]), qr = d({
3876
3937
  type: c("tool-result"),
3877
3938
  toolCallId: _(),
3878
3939
  toolName: _(),
3879
- output: Hr,
3940
+ output: Kr,
3880
3941
  providerOptions: Q.optional()
3881
- }), Wr = d({
3942
+ }), Jr = d({
3882
3943
  type: c("tool-approval-request"),
3883
3944
  approvalId: _(),
3884
3945
  toolCallId: _()
3885
- }), Gr = d({
3946
+ }), Yr = d({
3886
3947
  type: c("tool-approval-response"),
3887
3948
  approvalId: _(),
3888
3949
  approved: p(),
@@ -3897,31 +3958,31 @@ v([
3897
3958
  d({
3898
3959
  role: c("user"),
3899
3960
  content: v([_(), a(v([
3900
- Lr,
3901
- Rr,
3902
- zr
3961
+ Vr,
3962
+ Hr,
3963
+ Ur
3903
3964
  ]))]),
3904
3965
  providerOptions: Q.optional()
3905
3966
  }),
3906
3967
  d({
3907
3968
  role: c("assistant"),
3908
3969
  content: v([_(), a(v([
3909
- Lr,
3910
- zr,
3911
- Br,
3912
3970
  Vr,
3913
3971
  Ur,
3914
- Wr
3972
+ Wr,
3973
+ Gr,
3974
+ qr,
3975
+ Jr
3915
3976
  ]))]),
3916
3977
  providerOptions: Q.optional()
3917
3978
  }),
3918
3979
  d({
3919
3980
  role: c("tool"),
3920
- content: a(v([Ur, Gr])),
3981
+ content: a(v([qr, Yr])),
3921
3982
  providerOptions: Q.optional()
3922
3983
  })
3923
3984
  ]);
3924
- function Kr(e, t) {
3985
+ function Xr(e, t) {
3925
3986
  if (e === void 0 && t === void 0) return;
3926
3987
  if (e === void 0) return t;
3927
3988
  if (t === void 0) return e;
@@ -3930,18 +3991,18 @@ function Kr(e, t) {
3930
3991
  let i = t[r];
3931
3992
  if (i === void 0) continue;
3932
3993
  let a = r in e ? e[r] : void 0, o = typeof i == "object" && !!i && !Array.isArray(i) && !(i instanceof Date) && !(i instanceof RegExp), s = typeof a == "object" && !!a && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof RegExp);
3933
- o && s ? n[r] = Kr(a, i) : n[r] = i;
3994
+ o && s ? n[r] = Xr(a, i) : n[r] = i;
3934
3995
  }
3935
3996
  return n;
3936
3997
  }
3937
- wr({}, {
3938
- array: () => Zr,
3939
- choice: () => Qr,
3940
- json: () => $r,
3941
- object: () => Xr,
3942
- text: () => Yr
3998
+ Or({}, {
3999
+ array: () => ti,
4000
+ choice: () => ni,
4001
+ json: () => ri,
4002
+ object: () => ei,
4003
+ text: () => $r
3943
4004
  });
3944
- function qr(e) {
4005
+ function Zr(e) {
3945
4006
  let t = ["ROOT"], n = -1, r = null;
3946
4007
  function i(e, i, a) {
3947
4008
  switch (e) {
@@ -4143,16 +4204,16 @@ function qr(e) {
4143
4204
  }
4144
4205
  return s;
4145
4206
  }
4146
- async function Jr(e) {
4207
+ async function Qr(e) {
4147
4208
  if (e === void 0) return {
4148
4209
  value: void 0,
4149
4210
  state: "undefined-input"
4150
4211
  };
4151
- let t = await br({ text: e });
4212
+ let t = await wr({ text: e });
4152
4213
  return t.success ? {
4153
4214
  value: t.value,
4154
4215
  state: "successful-parse"
4155
- } : (t = await br({ text: qr(e) }), t.success ? {
4216
+ } : (t = await wr({ text: Zr(e) }), t.success ? {
4156
4217
  value: t.value,
4157
4218
  state: "repaired-parse"
4158
4219
  } : {
@@ -4160,7 +4221,7 @@ async function Jr(e) {
4160
4221
  state: "failed-parse"
4161
4222
  });
4162
4223
  }
4163
- var Yr = () => ({
4224
+ var $r = () => ({
4164
4225
  name: "text",
4165
4226
  responseFormat: Promise.resolve({ type: "text" }),
4166
4227
  async parseCompleteOutput({ text: e }) {
@@ -4170,19 +4231,19 @@ var Yr = () => ({
4170
4231
  return { partial: e };
4171
4232
  },
4172
4233
  createElementStreamTransform() {}
4173
- }), Xr = ({ schema: e, name: t, description: n }) => {
4174
- let r = fr(e);
4234
+ }), ei = ({ schema: e, name: t, description: n }) => {
4235
+ let r = gr(e);
4175
4236
  return {
4176
4237
  name: "object",
4177
- responseFormat: Sr(r.jsonSchema).then((e) => ({
4238
+ responseFormat: Er(r.jsonSchema).then((e) => ({
4178
4239
  type: "json",
4179
4240
  schema: e,
4180
4241
  ...t != null && { name: t },
4181
4242
  ...n != null && { description: n }
4182
4243
  })),
4183
4244
  async parseCompleteOutput({ text: e }, t) {
4184
- let n = await br({ text: e });
4185
- if (!n.success) throw new kr({
4245
+ let n = await wr({ text: e });
4246
+ if (!n.success) throw new Nr({
4186
4247
  message: "No object generated: could not parse the response.",
4187
4248
  cause: n.error,
4188
4249
  text: e,
@@ -4190,11 +4251,11 @@ var Yr = () => ({
4190
4251
  usage: t.usage,
4191
4252
  finishReason: t.finishReason
4192
4253
  });
4193
- let i = await yr({
4254
+ let i = await Cr({
4194
4255
  value: n.value,
4195
4256
  schema: r
4196
4257
  });
4197
- if (!i.success) throw new kr({
4258
+ if (!i.success) throw new Nr({
4198
4259
  message: "No object generated: response did not match schema.",
4199
4260
  cause: i.error,
4200
4261
  text: e,
@@ -4205,7 +4266,7 @@ var Yr = () => ({
4205
4266
  return i.value;
4206
4267
  },
4207
4268
  async parsePartialOutput({ text: e }) {
4208
- let t = await Jr(e);
4269
+ let t = await Qr(e);
4209
4270
  switch (t.state) {
4210
4271
  case "failed-parse":
4211
4272
  case "undefined-input": return;
@@ -4215,11 +4276,11 @@ var Yr = () => ({
4215
4276
  },
4216
4277
  createElementStreamTransform() {}
4217
4278
  };
4218
- }, Zr = ({ element: e, name: t, description: n }) => {
4219
- let r = fr(e);
4279
+ }, ti = ({ element: e, name: t, description: n }) => {
4280
+ let r = gr(e);
4220
4281
  return {
4221
4282
  name: "array",
4222
- responseFormat: Sr(r.jsonSchema).then((e) => {
4283
+ responseFormat: Er(r.jsonSchema).then((e) => {
4223
4284
  let { $schema: r, ...i } = e;
4224
4285
  return {
4225
4286
  type: "json",
@@ -4238,8 +4299,8 @@ var Yr = () => ({
4238
4299
  };
4239
4300
  }),
4240
4301
  async parseCompleteOutput({ text: e }, t) {
4241
- let n = await br({ text: e });
4242
- if (!n.success) throw new kr({
4302
+ let n = await wr({ text: e });
4303
+ if (!n.success) throw new Nr({
4243
4304
  message: "No object generated: could not parse the response.",
4244
4305
  cause: n.error,
4245
4306
  text: e,
@@ -4248,9 +4309,9 @@ var Yr = () => ({
4248
4309
  finishReason: t.finishReason
4249
4310
  });
4250
4311
  let i = n.value;
4251
- if (typeof i != "object" || !i || !("elements" in i) || !Array.isArray(i.elements)) throw new kr({
4312
+ if (typeof i != "object" || !i || !("elements" in i) || !Array.isArray(i.elements)) throw new Nr({
4252
4313
  message: "No object generated: response did not match schema.",
4253
- cause: new A({
4314
+ cause: new M({
4254
4315
  value: i,
4255
4316
  cause: "response must be an object with an elements array"
4256
4317
  }),
@@ -4260,11 +4321,11 @@ var Yr = () => ({
4260
4321
  finishReason: t.finishReason
4261
4322
  });
4262
4323
  for (let n of i.elements) {
4263
- let i = await yr({
4324
+ let i = await Cr({
4264
4325
  value: n,
4265
4326
  schema: r
4266
4327
  });
4267
- if (!i.success) throw new kr({
4328
+ if (!i.success) throw new Nr({
4268
4329
  message: "No object generated: response did not match schema.",
4269
4330
  cause: i.error,
4270
4331
  text: e,
@@ -4276,7 +4337,7 @@ var Yr = () => ({
4276
4337
  return i.elements;
4277
4338
  },
4278
4339
  async parsePartialOutput({ text: e }) {
4279
- let t = await Jr(e);
4340
+ let t = await Qr(e);
4280
4341
  switch (t.state) {
4281
4342
  case "failed-parse":
4282
4343
  case "undefined-input": return;
@@ -4286,7 +4347,7 @@ var Yr = () => ({
4286
4347
  if (typeof e != "object" || !e || !("elements" in e) || !Array.isArray(e.elements)) return;
4287
4348
  let n = t.state === "repaired-parse" && e.elements.length > 0 ? e.elements.slice(0, -1) : e.elements, i = [];
4288
4349
  for (let e of n) {
4289
- let t = await yr({
4350
+ let t = await Cr({
4290
4351
  value: e,
4291
4352
  schema: r
4292
4353
  });
@@ -4303,7 +4364,7 @@ var Yr = () => ({
4303
4364
  } });
4304
4365
  }
4305
4366
  };
4306
- }, Qr = ({ options: e, name: t, description: n }) => ({
4367
+ }, ni = ({ options: e, name: t, description: n }) => ({
4307
4368
  name: "choice",
4308
4369
  responseFormat: Promise.resolve({
4309
4370
  type: "json",
@@ -4321,8 +4382,8 @@ var Yr = () => ({
4321
4382
  ...n != null && { description: n }
4322
4383
  }),
4323
4384
  async parseCompleteOutput({ text: t }, n) {
4324
- let r = await br({ text: t });
4325
- if (!r.success) throw new kr({
4385
+ let r = await wr({ text: t });
4386
+ if (!r.success) throw new Nr({
4326
4387
  message: "No object generated: could not parse the response.",
4327
4388
  cause: r.error,
4328
4389
  text: t,
@@ -4331,9 +4392,9 @@ var Yr = () => ({
4331
4392
  finishReason: n.finishReason
4332
4393
  });
4333
4394
  let i = r.value;
4334
- if (typeof i != "object" || !i || !("result" in i) || typeof i.result != "string" || !e.includes(i.result)) throw new kr({
4395
+ if (typeof i != "object" || !i || !("result" in i) || typeof i.result != "string" || !e.includes(i.result)) throw new Nr({
4335
4396
  message: "No object generated: response did not match schema.",
4336
- cause: new A({
4397
+ cause: new M({
4337
4398
  value: i,
4338
4399
  cause: "response must be an object that contains a choice value."
4339
4400
  }),
@@ -4345,7 +4406,7 @@ var Yr = () => ({
4345
4406
  return i.result;
4346
4407
  },
4347
4408
  async parsePartialOutput({ text: t }) {
4348
- let n = await Jr(t);
4409
+ let n = await Qr(t);
4349
4410
  switch (n.state) {
4350
4411
  case "failed-parse":
4351
4412
  case "undefined-input": return;
@@ -4359,7 +4420,7 @@ var Yr = () => ({
4359
4420
  }
4360
4421
  },
4361
4422
  createElementStreamTransform() {}
4362
- }), $r = ({ name: e, description: t } = {}) => ({
4423
+ }), ri = ({ name: e, description: t } = {}) => ({
4363
4424
  name: "json",
4364
4425
  responseFormat: Promise.resolve({
4365
4426
  type: "json",
@@ -4367,8 +4428,8 @@ var Yr = () => ({
4367
4428
  ...t != null && { description: t }
4368
4429
  }),
4369
4430
  async parseCompleteOutput({ text: e }, t) {
4370
- let n = await br({ text: e });
4371
- if (!n.success) throw new kr({
4431
+ let n = await wr({ text: e });
4432
+ if (!n.success) throw new Nr({
4372
4433
  message: "No object generated: could not parse the response.",
4373
4434
  cause: n.error,
4374
4435
  text: e,
@@ -4379,7 +4440,7 @@ var Yr = () => ({
4379
4440
  return n.value;
4380
4441
  },
4381
4442
  async parsePartialOutput({ text: e }) {
4382
- let t = await Jr(e);
4443
+ let t = await Qr(e);
4383
4444
  switch (t.state) {
4384
4445
  case "failed-parse":
4385
4446
  case "undefined-input": return;
@@ -4389,11 +4450,11 @@ var Yr = () => ({
4389
4450
  },
4390
4451
  createElementStreamTransform() {}
4391
4452
  });
4392
- nn({
4453
+ sn({
4393
4454
  prefix: "aitxt",
4394
4455
  size: 24
4395
4456
  }), TransformStream;
4396
- var ei = lr(() => _r(v([
4457
+ var ii = pr(() => xr(v([
4397
4458
  i({
4398
4459
  type: c("text-start"),
4399
4460
  id: _(),
@@ -4546,22 +4607,22 @@ var ei = lr(() => _r(v([
4546
4607
  messageMetadata: o()
4547
4608
  })
4548
4609
  ])));
4549
- function ti(e) {
4610
+ function ai(e) {
4550
4611
  return e.type.startsWith("data-");
4551
4612
  }
4552
- function ni(e) {
4613
+ function oi(e) {
4553
4614
  return e.type.startsWith("tool-");
4554
4615
  }
4555
- function ri(e) {
4616
+ function si(e) {
4556
4617
  return e.type === "dynamic-tool";
4557
4618
  }
4558
- function ii(e) {
4559
- return ni(e) || ri(e);
4619
+ function ci(e) {
4620
+ return oi(e) || si(e);
4560
4621
  }
4561
- function ai(e) {
4622
+ function li(e) {
4562
4623
  return e.type.split("-").slice(1).join("-");
4563
4624
  }
4564
- function oi({ lastMessage: e, messageId: t }) {
4625
+ function ui({ lastMessage: e, messageId: t }) {
4565
4626
  return {
4566
4627
  message: e?.role === "assistant" ? e : {
4567
4628
  id: t,
@@ -4574,12 +4635,12 @@ function oi({ lastMessage: e, messageId: t }) {
4574
4635
  partialToolCalls: {}
4575
4636
  };
4576
4637
  }
4577
- function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdateMessageJob: r, onError: i, onToolCall: a, onData: o }) {
4638
+ function di({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdateMessageJob: r, onError: i, onToolCall: a, onData: o }) {
4578
4639
  return e.pipeThrough(new TransformStream({ async transform(e, s) {
4579
4640
  await r(async ({ state: r, write: c }) => {
4580
4641
  function l(e) {
4581
- let t = r.message.parts.filter(ii).find((t) => t.toolCallId === e);
4582
- if (t == null) throw new Pr({
4642
+ let t = r.message.parts.filter(ci).find((t) => t.toolCallId === e);
4643
+ if (t == null) throw new Rr({
4583
4644
  chunkType: "tool-invocation",
4584
4645
  chunkId: e,
4585
4646
  message: `No tool invocation found for tool call ID "${e}".`
@@ -4587,7 +4648,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4587
4648
  return t;
4588
4649
  }
4589
4650
  function u(e) {
4590
- let t = r.message.parts.find((t) => ni(t) && t.toolCallId === e.toolCallId), n = e, i = t;
4651
+ let t = r.message.parts.find((t) => oi(t) && t.toolCallId === e.toolCallId), n = e, i = t;
4591
4652
  if (t != null) {
4592
4653
  t.state = e.state, i.input = n.input, i.output = n.output, i.errorText = n.errorText, i.rawInput = n.rawInput, i.preliminary = n.preliminary, e.title !== void 0 && (i.title = e.title), i.providerExecuted = n.providerExecuted ?? t.providerExecuted;
4593
4654
  let r = n.providerMetadata;
@@ -4636,8 +4697,8 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4636
4697
  }
4637
4698
  async function f(e) {
4638
4699
  if (e != null) {
4639
- let n = r.message.metadata == null ? e : Kr(r.message.metadata, e);
4640
- t != null && await vr({
4700
+ let n = r.message.metadata == null ? e : Xr(r.message.metadata, e);
4701
+ t != null && await Sr({
4641
4702
  value: n,
4642
4703
  schema: t,
4643
4704
  context: {
@@ -4660,7 +4721,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4660
4721
  }
4661
4722
  case "text-delta": {
4662
4723
  let t = r.activeTextParts[e.id];
4663
- if (t == null) throw new Pr({
4724
+ if (t == null) throw new Rr({
4664
4725
  chunkType: "text-delta",
4665
4726
  chunkId: e.id,
4666
4727
  message: `Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`
@@ -4670,7 +4731,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4670
4731
  }
4671
4732
  case "text-end": {
4672
4733
  let t = r.activeTextParts[e.id];
4673
- if (t == null) throw new Pr({
4734
+ if (t == null) throw new Rr({
4674
4735
  chunkType: "text-end",
4675
4736
  chunkId: e.id,
4676
4737
  message: `Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`
@@ -4690,7 +4751,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4690
4751
  }
4691
4752
  case "reasoning-delta": {
4692
4753
  let t = r.activeReasoningParts[e.id];
4693
- if (t == null) throw new Pr({
4754
+ if (t == null) throw new Rr({
4694
4755
  chunkType: "reasoning-delta",
4695
4756
  chunkId: e.id,
4696
4757
  message: `Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`
@@ -4700,7 +4761,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4700
4761
  }
4701
4762
  case "reasoning-end": {
4702
4763
  let t = r.activeReasoningParts[e.id];
4703
- if (t == null) throw new Pr({
4764
+ if (t == null) throw new Rr({
4704
4765
  chunkType: "reasoning-end",
4705
4766
  chunkId: e.id,
4706
4767
  message: `Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`
@@ -4736,7 +4797,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4736
4797
  }), c();
4737
4798
  break;
4738
4799
  case "tool-input-start": {
4739
- let t = r.message.parts.filter(ni);
4800
+ let t = r.message.parts.filter(oi);
4740
4801
  r.partialToolCalls[e.toolCallId] = {
4741
4802
  text: "",
4742
4803
  toolName: e.toolName,
@@ -4764,13 +4825,13 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4764
4825
  }
4765
4826
  case "tool-input-delta": {
4766
4827
  let t = r.partialToolCalls[e.toolCallId];
4767
- if (t == null) throw new Pr({
4828
+ if (t == null) throw new Rr({
4768
4829
  chunkType: "tool-input-delta",
4769
4830
  chunkId: e.toolCallId,
4770
4831
  message: `Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`
4771
4832
  });
4772
4833
  t.text += e.inputTextDelta;
4773
- let { value: n } = await Jr(t.text);
4834
+ let { value: n } = await Qr(t.text);
4774
4835
  t.dynamic ? d({
4775
4836
  toolCallId: e.toolCallId,
4776
4837
  toolName: t.toolName,
@@ -4806,7 +4867,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4806
4867
  }), c(), a && !e.providerExecuted && await a({ toolCall: e });
4807
4868
  break;
4808
4869
  case "tool-input-error": {
4809
- let t = r.message.parts.filter(ii).find((t) => t.toolCallId === e.toolCallId);
4870
+ let t = r.message.parts.filter(ci).find((t) => t.toolCallId === e.toolCallId);
4810
4871
  (t == null ? e.dynamic : t.type === "dynamic-tool") ? d({
4811
4872
  toolCallId: e.toolCallId,
4812
4873
  toolName: e.toolName,
@@ -4851,7 +4912,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4851
4912
  title: t.title
4852
4913
  }) : u({
4853
4914
  toolCallId: e.toolCallId,
4854
- toolName: ai(t),
4915
+ toolName: li(t),
4855
4916
  state: "output-available",
4856
4917
  input: t.input,
4857
4918
  output: e.output,
@@ -4875,7 +4936,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4875
4936
  title: t.title
4876
4937
  }) : u({
4877
4938
  toolCallId: e.toolCallId,
4878
- toolName: ai(t),
4939
+ toolName: li(t),
4879
4940
  state: "output-error",
4880
4941
  input: t.input,
4881
4942
  rawInput: t.rawInput,
@@ -4904,10 +4965,10 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4904
4965
  case "error":
4905
4966
  i?.(Error(e.errorText));
4906
4967
  break;
4907
- default: if (ti(e)) {
4968
+ default: if (ai(e)) {
4908
4969
  if (n?.[e.type] != null) {
4909
4970
  let t = r.message.parts.findIndex((t) => "id" in t && "data" in t && t.id === e.id && t.type === e.type), i = t >= 0 ? t : r.message.parts.length;
4910
- await vr({
4971
+ await Sr({
4911
4972
  value: e.data,
4912
4973
  schema: n[e.type],
4913
4974
  context: {
@@ -4930,7 +4991,7 @@ function si({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4930
4991
  });
4931
4992
  } }));
4932
4993
  }
4933
- async function ci({ stream: e, onError: t }) {
4994
+ async function fi({ stream: e, onError: t }) {
4934
4995
  let n = e.getReader();
4935
4996
  try {
4936
4997
  for (;;) {
@@ -4943,14 +5004,14 @@ async function ci({ stream: e, onError: t }) {
4943
5004
  n.releaseLock();
4944
5005
  }
4945
5006
  }
4946
- nn({
5007
+ sn({
4947
5008
  prefix: "aitxt",
4948
5009
  size: 24
4949
- }), nn({
5010
+ }), sn({
4950
5011
  prefix: "aiobj",
4951
5012
  size: 24
4952
5013
  });
4953
- var li = class {
5014
+ var pi = class {
4954
5015
  constructor() {
4955
5016
  this.queue = [], this.isProcessing = !1;
4956
5017
  }
@@ -4972,11 +5033,11 @@ var li = class {
4972
5033
  });
4973
5034
  }
4974
5035
  };
4975
- nn({
5036
+ sn({
4976
5037
  prefix: "aiobj",
4977
5038
  size: 24
4978
5039
  });
4979
- async function ui(e) {
5040
+ async function mi(e) {
4980
5041
  if (e == null) return [];
4981
5042
  if (!globalThis.FileList || !(e instanceof globalThis.FileList)) throw Error("FileList is not supported in the current environment");
4982
5043
  return Promise.all(Array.from(e).map(async (e) => {
@@ -4994,14 +5055,14 @@ async function ui(e) {
4994
5055
  };
4995
5056
  }));
4996
5057
  }
4997
- var di = class {
5058
+ var hi = class {
4998
5059
  constructor({ api: e = "/api/chat", credentials: t, headers: n, body: r, fetch: i, prepareSendMessagesRequest: a, prepareReconnectToStreamRequest: o }) {
4999
5060
  this.api = e, this.credentials = t, this.headers = n, this.body = r, this.fetch = i, this.prepareSendMessagesRequest = a, this.prepareReconnectToStreamRequest = o;
5000
5061
  }
5001
5062
  async sendMessages({ abortSignal: e, ...t }) {
5002
- let n = await Sr(this.body), r = await Sr(this.headers), i = await Sr(this.credentials), a = {
5003
- ...an(r),
5004
- ...an(t.headers)
5063
+ let n = await Er(this.body), r = await Er(this.headers), i = await Er(this.credentials), a = {
5064
+ ...ln(r),
5065
+ ...ln(t.headers)
5005
5066
  }, o = await this.prepareSendMessagesRequest?.call(this, {
5006
5067
  api: this.api,
5007
5068
  id: t.chatId,
@@ -5015,7 +5076,7 @@ var di = class {
5015
5076
  requestMetadata: t.metadata,
5016
5077
  trigger: t.trigger,
5017
5078
  messageId: t.messageId
5018
- }), s = o?.api ?? this.api, c = o?.headers === void 0 ? a : an(o.headers), l = o?.body === void 0 ? {
5079
+ }), s = o?.api ?? this.api, c = o?.headers === void 0 ? a : ln(o.headers), l = o?.body === void 0 ? {
5019
5080
  ...n,
5020
5081
  ...t.body,
5021
5082
  id: t.chatId,
@@ -5037,9 +5098,9 @@ var di = class {
5037
5098
  return this.processResponseStream(d.body);
5038
5099
  }
5039
5100
  async reconnectToStream(e) {
5040
- let t = await Sr(this.body), n = await Sr(this.headers), r = await Sr(this.credentials), i = {
5041
- ...an(n),
5042
- ...an(e.headers)
5101
+ let t = await Er(this.body), n = await Er(this.headers), r = await Er(this.credentials), i = {
5102
+ ...ln(n),
5103
+ ...ln(e.headers)
5043
5104
  }, a = await this.prepareReconnectToStreamRequest?.call(this, {
5044
5105
  api: this.api,
5045
5106
  id: e.chatId,
@@ -5050,7 +5111,7 @@ var di = class {
5050
5111
  headers: i,
5051
5112
  credentials: r,
5052
5113
  requestMetadata: e.metadata
5053
- }), o = a?.api ?? `${this.api}/${e.chatId}/stream`, s = a?.headers === void 0 ? i : an(a.headers), c = a?.credentials ?? r, l = await (this.fetch ?? globalThis.fetch)(o, {
5114
+ }), o = a?.api ?? `${this.api}/${e.chatId}/stream`, s = a?.headers === void 0 ? i : ln(a.headers), c = a?.credentials ?? r, l = await (this.fetch ?? globalThis.fetch)(o, {
5054
5115
  method: "GET",
5055
5116
  headers: s,
5056
5117
  credentials: c
@@ -5060,22 +5121,22 @@ var di = class {
5060
5121
  if (!l.body) throw Error("The response body is empty.");
5061
5122
  return this.processResponseStream(l.body);
5062
5123
  }
5063
- }, fi = class extends di {
5124
+ }, gi = class extends hi {
5064
5125
  constructor(e = {}) {
5065
5126
  super(e);
5066
5127
  }
5067
5128
  processResponseStream(e) {
5068
- return xr({
5129
+ return Tr({
5069
5130
  stream: e,
5070
- schema: ei
5131
+ schema: ii
5071
5132
  }).pipeThrough(new TransformStream({ async transform(e, t) {
5072
5133
  if (!e.success) throw e.error;
5073
5134
  t.enqueue(e.value);
5074
5135
  } }));
5075
5136
  }
5076
- }, pi = class {
5077
- constructor({ generateId: e = rn, id: t = e(), transport: n = new fi(), messageMetadataSchema: r, dataPartSchemas: i, state: a, onError: o, onToolCall: s, onFinish: c, onData: l, sendAutomaticallyWhen: u }) {
5078
- this.activeResponse = void 0, this.jobExecutor = new li(), this.sendMessage = async (e, t) => {
5137
+ }, _i = class {
5138
+ constructor({ generateId: e = cn, id: t = e(), transport: n = new gi(), messageMetadataSchema: r, dataPartSchemas: i, state: a, onError: o, onToolCall: s, onFinish: c, onData: l, sendAutomaticallyWhen: u }) {
5139
+ this.activeResponse = void 0, this.jobExecutor = new pi(), this.sendMessage = async (e, t) => {
5079
5140
  if (e == null) {
5080
5141
  await this.makeRequest({
5081
5142
  trigger: "submit-message",
@@ -5085,7 +5146,7 @@ var di = class {
5085
5146
  return;
5086
5147
  }
5087
5148
  let n;
5088
- if (n = "text" in e || "files" in e ? { parts: [...Array.isArray(e.files) ? e.files : await ui(e.files), ..."text" in e && e.text != null ? [{
5149
+ if (n = "text" in e || "files" in e ? { parts: [...Array.isArray(e.files) ? e.files : await mi(e.files), ..."text" in e && e.text != null ? [{
5089
5150
  type: "text",
5090
5151
  text: e.text
5091
5152
  }] : []] } : e, e.messageId != null) {
@@ -5125,7 +5186,7 @@ var di = class {
5125
5186
  }, this.clearError = () => {
5126
5187
  this.status === "error" && (this.state.error = void 0, this.setStatus({ status: "ready" }));
5127
5188
  }, this.addToolApprovalResponse = async ({ id: e, approved: t, reason: n, options: r }) => this.jobExecutor.run(async () => {
5128
- let i = this.state.messages, a = i[i.length - 1], o = (r) => ii(r) && r.state === "approval-requested" && r.approval.id === e ? {
5189
+ let i = this.state.messages, a = i[i.length - 1], o = (r) => ci(r) && r.state === "approval-requested" && r.approval.id === e ? {
5129
5190
  ...r,
5130
5191
  state: "approval-responded",
5131
5192
  approval: {
@@ -5145,7 +5206,7 @@ var di = class {
5145
5206
  });
5146
5207
  });
5147
5208
  }), this.addToolOutput = async ({ state: e = "output-available", toolCallId: t, output: n, errorText: r, options: i }) => this.jobExecutor.run(async () => {
5148
- let a = this.state.messages, o = a[a.length - 1], s = (i) => ii(i) && i.toolCallId === t ? {
5209
+ let a = this.state.messages, o = a[a.length - 1], s = (i) => ci(i) && i.toolCallId === t ? {
5149
5210
  ...i,
5150
5211
  state: e,
5151
5212
  output: n,
@@ -5214,7 +5275,7 @@ var di = class {
5214
5275
  let s = this.lastMessage, c = !1, l = !1, u = !1;
5215
5276
  try {
5216
5277
  let a = {
5217
- state: oi({
5278
+ state: ui({
5218
5279
  lastMessage: this.state.snapshot(s),
5219
5280
  messageId: this.generateId()
5220
5281
  }),
@@ -5233,8 +5294,8 @@ var di = class {
5233
5294
  body: r,
5234
5295
  trigger: e,
5235
5296
  messageId: i
5236
- }), await ci({
5237
- stream: si({
5297
+ }), await fi({
5298
+ stream: di({
5238
5299
  stream: l,
5239
5300
  onToolCall: this.onToolCall,
5240
5301
  onData: this.onData,
@@ -5284,41 +5345,41 @@ var di = class {
5284
5345
  });
5285
5346
  }
5286
5347
  };
5287
- function mi({ messages: e }) {
5348
+ function vi({ messages: e }) {
5288
5349
  let t = e[e.length - 1];
5289
5350
  if (!t || t.role !== "assistant") return !1;
5290
- let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter(ii).filter((e) => !e.providerExecuted);
5351
+ let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter(ci).filter((e) => !e.providerExecuted);
5291
5352
  return r.length > 0 && r.every((e) => e.state === "output-available" || e.state === "output-error");
5292
5353
  }
5293
5354
  //#endregion
5294
5355
  //#region ../../node_modules/.pnpm/@ai-sdk+provider@1.1.3/node_modules/@ai-sdk/provider/dist/index.mjs
5295
- var hi = "vercel.ai.error", gi = Symbol.for(hi), _i, vi = class e extends Error {
5356
+ var yi = "vercel.ai.error", bi = Symbol.for(yi), xi, Si = class e extends Error {
5296
5357
  constructor({ name: e, message: t, cause: n }) {
5297
- super(t), this[_i] = !0, this.name = e, this.cause = n;
5358
+ super(t), this[xi] = !0, this.name = e, this.cause = n;
5298
5359
  }
5299
5360
  static isInstance(t) {
5300
- return e.hasMarker(t, hi);
5361
+ return e.hasMarker(t, yi);
5301
5362
  }
5302
5363
  static hasMarker(e, t) {
5303
5364
  let n = Symbol.for(t);
5304
5365
  return typeof e == "object" && !!e && n in e && typeof e[n] == "boolean" && e[n] === !0;
5305
5366
  }
5306
5367
  };
5307
- _i = gi;
5308
- var yi = vi, bi = "AI_InvalidArgumentError", xi = `vercel.ai.error.${bi}`, Si = Symbol.for(xi), Ci, wi = class extends yi {
5368
+ xi = bi;
5369
+ var Ci = Si, wi = "AI_InvalidArgumentError", Ti = `vercel.ai.error.${wi}`, Ei = Symbol.for(Ti), Di, Oi = class extends Ci {
5309
5370
  constructor({ message: e, cause: t, argument: n }) {
5310
5371
  super({
5311
- name: bi,
5372
+ name: wi,
5312
5373
  message: e,
5313
5374
  cause: t
5314
- }), this[Ci] = !0, this.argument = n;
5375
+ }), this[Di] = !0, this.argument = n;
5315
5376
  }
5316
5377
  static isInstance(e) {
5317
- return yi.hasMarker(e, xi);
5378
+ return Ci.hasMarker(e, Ti);
5318
5379
  }
5319
5380
  };
5320
- Ci = Si;
5321
- var Ti = (e, t = 21) => (n = t) => {
5381
+ Di = Ei;
5382
+ var ki = (e, t = 21) => (n = t) => {
5322
5383
  let r = "", i = n | 0;
5323
5384
  for (; i--;) r += e[Math.random() * e.length | 0];
5324
5385
  return r;
@@ -5388,39 +5449,39 @@ var Ti = (e, t = 21) => (n = t) => {
5388
5449
  }
5389
5450
  t.exports = s, t.exports.default = s, t.exports.parse = s, t.exports.safeParse = c, t.exports.scan = o;
5390
5451
  })))();
5391
- var Ei = (({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
5392
- let i = Ti(n, t);
5452
+ var Ai = (({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
5453
+ let i = ki(n, t);
5393
5454
  if (e == null) return i;
5394
- if (n.includes(r)) throw new wi({
5455
+ if (n.includes(r)) throw new Oi({
5395
5456
  argument: "separator",
5396
5457
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
5397
5458
  });
5398
5459
  return (t) => `${e}${r}${i(t)}`;
5399
- })(), { btoa: Di, atob: Oi } = globalThis, ki = /* @__PURE__ */ new WeakMap(), Ai = 0;
5400
- function ji(e) {
5460
+ })(), { btoa: ji, atob: Mi } = globalThis, Ni = /* @__PURE__ */ new WeakMap(), Pi = 0;
5461
+ function Fi(e) {
5401
5462
  if (!e.length) return "";
5402
5463
  for (var t = "arg", n = 0; n < e.length; ++n) {
5403
5464
  var r = void 0;
5404
- e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? r = typeof e[n] == "string" ? "\"" + e[n] + "\"" : String(e[n]) : ki.has(e[n]) ? r = ki.get(e[n]) : (r = Ai, ki.set(e[n], Ai++)), t += "@" + r;
5465
+ e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? r = typeof e[n] == "string" ? "\"" + e[n] + "\"" : String(e[n]) : Ni.has(e[n]) ? r = Ni.get(e[n]) : (r = Pi, Ni.set(e[n], Pi++)), t += "@" + r;
5405
5466
  }
5406
5467
  return t;
5407
5468
  }
5408
5469
  //#endregion
5409
5470
  //#region ../../node_modules/.pnpm/swrv@1.1.0_vue@3.5.33_typescript@6.0.3_/node_modules/swrv/esm/cache/index.js
5410
- function Mi(e) {
5471
+ function Ii(e) {
5411
5472
  if (typeof e == "function") try {
5412
5473
  e = e();
5413
5474
  } catch {
5414
5475
  e = "";
5415
5476
  }
5416
- return e = Array.isArray(e) ? ji(e) : String(e || ""), e;
5477
+ return e = Array.isArray(e) ? Fi(e) : String(e || ""), e;
5417
5478
  }
5418
- var Ni = function() {
5479
+ var Li = function() {
5419
5480
  function e(e) {
5420
5481
  e === void 0 && (e = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = e;
5421
5482
  }
5422
5483
  return e.prototype.serializeKey = function(e) {
5423
- return Mi(e);
5484
+ return Ii(e);
5424
5485
  }, e.prototype.get = function(e) {
5425
5486
  var t = this.serializeKey(e);
5426
5487
  return this.items.get(t);
@@ -5442,15 +5503,15 @@ var Ni = function() {
5442
5503
  }();
5443
5504
  //#endregion
5444
5505
  //#region ../../node_modules/.pnpm/swrv@1.1.0_vue@3.5.33_typescript@6.0.3_/node_modules/swrv/esm/lib/web-preset.js
5445
- function Pi() {
5506
+ function Ri() {
5446
5507
  return navigator.onLine === void 0 ? !0 : navigator.onLine;
5447
5508
  }
5448
- function Fi() {
5509
+ function zi() {
5449
5510
  return typeof document < "u" && document.visibilityState !== void 0 ? document.visibilityState !== "hidden" : !0;
5450
5511
  }
5451
- var Ii = {
5452
- isOnline: Pi,
5453
- isDocumentVisible: Fi,
5512
+ var Bi = {
5513
+ isOnline: Ri,
5514
+ isDocumentVisible: zi,
5454
5515
  fetcher: function(e) {
5455
5516
  return fetch(e).then(function(e) {
5456
5517
  return e.json();
@@ -5461,7 +5522,7 @@ var Ii = {
5461
5522
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
5462
5523
  return e;
5463
5524
  }, $.apply(this, arguments);
5464
- }, Li = function(e, t, n, r) {
5525
+ }, Vi = function(e, t, n, r) {
5465
5526
  function i(e) {
5466
5527
  return e instanceof n ? e : new n(function(t) {
5467
5528
  t(e);
@@ -5487,7 +5548,7 @@ var Ii = {
5487
5548
  }
5488
5549
  c((r = r.apply(e, t || [])).next());
5489
5550
  });
5490
- }, Ri = function(e, t) {
5551
+ }, Hi = function(e, t) {
5491
5552
  var n = {
5492
5553
  label: 0,
5493
5554
  sent: function() {
@@ -5560,7 +5621,7 @@ var Ii = {
5560
5621
  done: !0
5561
5622
  };
5562
5623
  }
5563
- }, zi = function(e, t) {
5624
+ }, Ui = function(e, t) {
5564
5625
  var n = typeof Symbol == "function" && e[Symbol.iterator];
5565
5626
  if (!n) return e;
5566
5627
  var r = n.call(e), i, a = [], o;
@@ -5576,11 +5637,11 @@ var Ii = {
5576
5637
  }
5577
5638
  }
5578
5639
  return a;
5579
- }, Bi = function(e, t, n) {
5640
+ }, Wi = function(e, t, n) {
5580
5641
  if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
5581
5642
  return e.concat(a || Array.prototype.slice.call(t));
5582
- }, Vi = new Ni(), Hi = new Ni(), Ui = new Ni(), Wi = {
5583
- cache: Vi,
5643
+ }, Gi = new Li(), Ki = new Li(), qi = new Li(), Ji = {
5644
+ cache: Gi,
5584
5645
  refreshInterval: 0,
5585
5646
  ttl: 0,
5586
5647
  serverTTL: 1e3,
@@ -5590,15 +5651,15 @@ var Ii = {
5590
5651
  shouldRetryOnError: !0,
5591
5652
  errorRetryInterval: 5e3,
5592
5653
  errorRetryCount: 5,
5593
- fetcher: Ii.fetcher,
5594
- isOnline: Ii.isOnline,
5595
- isDocumentVisible: Ii.isDocumentVisible
5654
+ fetcher: Bi.fetcher,
5655
+ isOnline: Bi.isOnline,
5656
+ isDocumentVisible: Bi.isDocumentVisible
5596
5657
  };
5597
- function Gi(e, t, n) {
5598
- var r = Hi.get(e);
5599
- r ? r.data.push(t) : Hi.set(e, [t], n > 0 ? n + 5e3 : n);
5658
+ function Yi(e, t, n) {
5659
+ var r = Ki.get(e);
5660
+ r ? r.data.push(t) : Ki.set(e, [t], n > 0 ? n + 5e3 : n);
5600
5661
  }
5601
- function Ki(e, t, n) {
5662
+ function Xi(e, t, n) {
5602
5663
  if (n.isDocumentVisible() && !(n.errorRetryCount !== void 0 && t > n.errorRetryCount)) {
5603
5664
  var r = Math.min(t || 0, n.errorRetryCount), i = r * n.errorRetryInterval;
5604
5665
  setTimeout(function() {
@@ -5609,13 +5670,13 @@ function Ki(e, t, n) {
5609
5670
  }, i);
5610
5671
  }
5611
5672
  }
5612
- var qi = function(e, t, n, r) {
5613
- return n === void 0 && (n = Vi), r === void 0 && (r = Wi.ttl), Li(void 0, void 0, void 0, function() {
5673
+ var Zi = function(e, t, n, r) {
5674
+ return n === void 0 && (n = Gi), r === void 0 && (r = Ji.ttl), Vi(void 0, void 0, void 0, function() {
5614
5675
  var i, a, o, s, c, l, u;
5615
- return Ri(this, function(d) {
5676
+ return Hi(this, function(d) {
5616
5677
  switch (d.label) {
5617
5678
  case 0:
5618
- if (!Yi(t)) return [3, 5];
5679
+ if (!$i(t)) return [3, 5];
5619
5680
  d.label = 1;
5620
5681
  case 1: return d.trys.push([
5621
5682
  1,
@@ -5637,7 +5698,7 @@ var qi = function(e, t, n, r) {
5637
5698
  } catch (e) {
5638
5699
  console.error("swrv(mutate): failed to set cache", e);
5639
5700
  }
5640
- return l = Hi.get(e), l && l.data.length && (u = l.data.filter(function(t) {
5701
+ return l = Ki.get(e), l && l.data.length && (u = l.data.filter(function(t) {
5641
5702
  return t.key === e;
5642
5703
  }), u.forEach(function(e, t) {
5643
5704
  c.data !== void 0 && (e.data = c.data), e.error = c.error, e.isValidating = c.isValidating, e.isLoading = c.isValidating, t !== u.length - 1 && delete u[t];
@@ -5646,9 +5707,9 @@ var qi = function(e, t, n, r) {
5646
5707
  });
5647
5708
  });
5648
5709
  };
5649
- function Ji() {
5710
+ function Qi() {
5650
5711
  for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
5651
- var r, i, a = $({}, Wi), o = !1, s = !1, c = oe(), l = c?.proxy || c;
5712
+ var r, i, a = $({}, Ji), o = !1, s = !1, c = oe(), l = c?.proxy || c;
5652
5713
  if (!l) return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
5653
5714
  var u = l?.$isServer || !1;
5654
5715
  t.length >= 1 && (r = t[0]), t.length >= 2 && (i = t[1]), t.length > 2 && (a = $($({}, a), t[2]));
@@ -5663,26 +5724,26 @@ function Ji() {
5663
5724
  key: null
5664
5725
  });
5665
5726
  var m = function(t, n) {
5666
- return Li(e, void 0, void 0, function() {
5727
+ return Vi(e, void 0, void 0, function() {
5667
5728
  var e, r, s, c, l, u, h, g = this;
5668
- return Ri(this, function(ee) {
5729
+ return Hi(this, function(ee) {
5669
5730
  switch (ee.label) {
5670
5731
  case 0: return e = p.data === void 0, r = f.value, r ? (s = a.cache.get(r), c = s && s.data, p.isValidating = !0, p.isLoading = !c, c && (p.data = c.data, p.error = c.error), l = t || i, !l || !a.isDocumentVisible() && !e || n?.forceRevalidate !== void 0 && !n?.forceRevalidate || s && (u = !!(Date.now() - s.createdAt >= a.dedupingInterval || n?.forceRevalidate), !u) ? (p.isValidating = !1, p.isLoading = !1, [2]) : (h = function() {
5671
- return Li(g, void 0, void 0, function() {
5732
+ return Vi(g, void 0, void 0, function() {
5672
5733
  var e, t, i, s;
5673
- return Ri(this, function(c) {
5734
+ return Hi(this, function(c) {
5674
5735
  switch (c.label) {
5675
- case 0: return e = Ui.get(r), e ? [3, 2] : (t = Array.isArray(r) ? r : [r], i = l.apply(void 0, Bi([], zi(t), !1)), Ui.set(r, i, a.dedupingInterval), [4, qi(r, i, a.cache, d)]);
5736
+ case 0: return e = qi.get(r), e ? [3, 2] : (t = Array.isArray(r) ? r : [r], i = l.apply(void 0, Wi([], Ui(t), !1)), qi.set(r, i, a.dedupingInterval), [4, Zi(r, i, a.cache, d)]);
5676
5737
  case 1: return c.sent(), [3, 4];
5677
- case 2: return [4, qi(r, e.data, a.cache, d)];
5738
+ case 2: return [4, Zi(r, e.data, a.cache, d)];
5678
5739
  case 3: c.sent(), c.label = 4;
5679
- case 4: return p.isValidating = !1, p.isLoading = !1, Ui.delete(r), p.error !== void 0 && (s = !o && a.shouldRetryOnError && (n ? n.shouldRetryOnError : !0), s && Ki(m, n ? n.errorRetryCount : 1, a)), [2];
5740
+ case 4: return p.isValidating = !1, p.isLoading = !1, qi.delete(r), p.error !== void 0 && (s = !o && a.shouldRetryOnError && (n ? n.shouldRetryOnError : !0), s && Xi(m, n ? n.errorRetryCount : 1, a)), [2];
5680
5741
  }
5681
5742
  });
5682
5743
  });
5683
5744
  }, c && a.revalidateDebounce ? (setTimeout(function() {
5684
- return Li(g, void 0, void 0, function() {
5685
- return Ri(this, function(e) {
5745
+ return Vi(g, void 0, void 0, function() {
5746
+ return Hi(this, function(e) {
5686
5747
  switch (e.label) {
5687
5748
  case 0: return o ? [3, 2] : [4, h()];
5688
5749
  case 1: e.sent(), e.label = 2;
@@ -5698,16 +5759,16 @@ function Ji() {
5698
5759
  });
5699
5760
  });
5700
5761
  }, h = function() {
5701
- return Li(e, void 0, void 0, function() {
5702
- return Ri(this, function(e) {
5762
+ return Vi(e, void 0, void 0, function() {
5763
+ return Hi(this, function(e) {
5703
5764
  return [2, m(null, { shouldRetryOnError: !1 })];
5704
5765
  });
5705
5766
  });
5706
5767
  }, g = null;
5707
5768
  ce(function() {
5708
5769
  var t = function() {
5709
- return Li(e, void 0, void 0, function() {
5710
- return Ri(this, function(e) {
5770
+ return Vi(e, void 0, void 0, function() {
5771
+ return Hi(this, function(e) {
5711
5772
  switch (e.label) {
5712
5773
  case 0: return !p.error && a.isOnline() ? [4, m()] : [3, 2];
5713
5774
  case 1: return e.sent(), [3, 3];
@@ -5720,28 +5781,28 @@ function Ji() {
5720
5781
  a.refreshInterval && (g = setTimeout(t, a.refreshInterval)), a.revalidateOnFocus && (document.addEventListener("visibilitychange", h, !1), window.addEventListener("focus", h, !1));
5721
5782
  }), le(function() {
5722
5783
  o = !0, g && clearTimeout(g), a.revalidateOnFocus && (document.removeEventListener("visibilitychange", h, !1), window.removeEventListener("focus", h, !1));
5723
- var e = Hi.get(f.value);
5784
+ var e = Ki.get(f.value);
5724
5785
  e && (e.data = e.data.filter(function(e) {
5725
5786
  return e !== p;
5726
5787
  }));
5727
5788
  });
5728
5789
  try {
5729
5790
  de(f, function(e) {
5730
- se(f) || (f.value = e), p.key = e, p.isValidating = !!e, Gi(f.value, p, d), !u && !s && f.value && m(), s = !1;
5791
+ se(f) || (f.value = e), p.key = e, p.isValidating = !!e, Yi(f.value, p, d), !u && !s && f.value && m(), s = !1;
5731
5792
  }, { immediate: !0 });
5732
5793
  } catch {}
5733
5794
  return $($({}, E(p)), { mutate: function(e, t) {
5734
5795
  return m(e, $($({}, t), { forceRevalidate: !0 }));
5735
5796
  } });
5736
5797
  }
5737
- function Yi(e) {
5798
+ function $i(e) {
5738
5799
  return typeof e == "object" && !!e && typeof e.then == "function";
5739
5800
  }
5740
5801
  //#endregion
5741
5802
  //#region ../../node_modules/.pnpm/swrv@1.1.0_vue@3.5.33_typescript@6.0.3_/node_modules/swrv/esm/index.js
5742
- var Xi = Ji;
5743
- Xi.default;
5744
- var Zi = class {
5803
+ var ea = Qi;
5804
+ ea.default;
5805
+ var ta = class {
5745
5806
  constructor(e) {
5746
5807
  this.statusRef = T("ready"), this.errorRef = T(void 0), this.pushMessage = (e) => {
5747
5808
  this.messagesRef.value = [...this.messagesRef.value, e];
@@ -5769,26 +5830,26 @@ var Zi = class {
5769
5830
  set error(e) {
5770
5831
  this.errorRef.value = e;
5771
5832
  }
5772
- }, Qi = class extends pi {
5833
+ }, na = class extends _i {
5773
5834
  constructor({ messages: e, ...t }) {
5774
5835
  super({
5775
5836
  ...t,
5776
- state: new Zi(e)
5837
+ state: new ta(e)
5777
5838
  });
5778
5839
  }
5779
5840
  };
5780
- Xi.default;
5841
+ ea.default;
5781
5842
  //#endregion
5782
5843
  //#region ../../packages/composable/src/chatbot/useChatbotStore.ts
5783
- function $i(e) {
5784
- return D(`chatbot-${e}`, () => {
5844
+ function ra(e) {
5845
+ return me(`chatbot-${e}`, () => {
5785
5846
  let { t: n, te: r, locale: i } = pe({ useScope: "global" }), a = T(""), o = T(), s = T(e), c = T(), l = T(), u = T(), d = T(), f = T(), p = T(), m = T(), h = T(), g = T(), ee = T(), _ = T(), v = T(), y = T(), b = w(() => l.value === "reasoning"), x = w(() => b.value ? ee.value?.filter((e) => ![
5786
5847
  "upvote",
5787
5848
  "downvote",
5788
5849
  "feedback"
5789
5850
  ].includes(e)) : ee.value), S = ae(w(() => `${s.value}-chatId`), null);
5790
5851
  fe(() => {
5791
- S.value ||= Ei();
5852
+ S.value ||= Ai();
5792
5853
  });
5793
5854
  let C = w({
5794
5855
  get: () => S.value,
@@ -5807,7 +5868,7 @@ function $i(e) {
5807
5868
  function ue(e) {
5808
5869
  if (le(e)) {
5809
5870
  let e = D.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ? ie(t) : void 0;
5810
- C.value = Ei(), D.value.clearError(), oe.value = void 0, n && D.value.sendMessage({ text: n });
5871
+ C.value = Ai(), D.value.clearError(), oe.value = void 0, n && D.value.sendMessage({ text: n });
5811
5872
  return;
5812
5873
  }
5813
5874
  re.error(e), oe.value = e, ce.value && (se.value = !0);
@@ -5816,9 +5877,9 @@ function $i(e) {
5816
5877
  baseUrl: a.value,
5817
5878
  basePath: o.value,
5818
5879
  headers: () => m.value
5819
- })), de = T(null), D = w(() => new Qi({
5880
+ })), me = T(null), D = w(() => new na({
5820
5881
  id: C.value,
5821
- transport: new fi({
5882
+ transport: new gi({
5822
5883
  api: E.value.getChatEndpoint(s.value, b.value ? "reasoning" : "chat"),
5823
5884
  prepareSendMessagesRequest: ({ messages: e, id: t }) => ({ body: {
5824
5885
  id: t,
@@ -5834,7 +5895,7 @@ function $i(e) {
5834
5895
  reasoning: f.value?.reasoning,
5835
5896
  deviceContext: {
5836
5897
  ...ne(),
5837
- ...de.value ?? {}
5898
+ ...me.value ?? {}
5838
5899
  },
5839
5900
  disabledTools: p.value?.disabled,
5840
5901
  fallbackModels: v.value,
@@ -5846,19 +5907,19 @@ function $i(e) {
5846
5907
  onToolCall: ({ toolCall: e }) => {
5847
5908
  re.log("Tool call:", e);
5848
5909
  },
5849
- sendAutomaticallyWhen: mi,
5910
+ sendAutomaticallyWhen: vi,
5850
5911
  onError: ue
5851
- })), me = w(() => {
5912
+ })), he = w(() => {
5852
5913
  let e = d.value?.initialMessage;
5853
5914
  return e?.[i.value] ? e[i.value] : r("message.defaultAgentWelcome") ? n("message.defaultAgentWelcome") : "";
5854
- }), he = w(() => ({
5855
- id: Ei(),
5915
+ }), ge = w(() => ({
5916
+ id: Ai(),
5856
5917
  role: "assistant",
5857
5918
  parts: [{
5858
5919
  type: "text",
5859
- text: me.value
5920
+ text: he.value
5860
5921
  }]
5861
- })), ge = w(() => {
5922
+ })), _e = w(() => {
5862
5923
  let e = (e) => e.map((e) => e.role !== "user" || !e.parts.some((e) => e.type === "file") ? e : {
5863
5924
  ...e,
5864
5925
  parts: e.parts.map((e) => {
@@ -5877,23 +5938,23 @@ function $i(e) {
5877
5938
  };
5878
5939
  })
5879
5940
  });
5880
- return b.value || D.value.messages?.[0]?.role === "assistant" ? e(D.value.messages) : [he.value, ...e(D.value.messages)];
5881
- }), _e = w(() => {
5941
+ return b.value || D.value.messages?.[0]?.role === "assistant" ? e(D.value.messages) : [ge.value, ...e(D.value.messages)];
5942
+ }), O = w(() => {
5882
5943
  let e = d.value?.messagePlaceholder;
5883
5944
  return e?.[i.value] ? e[i.value] : r("placeholder.askAnything") ? n("placeholder.askAnything") : "";
5884
- }), O = T([]), ve = T("chat"), ye = T([]), be = T(), xe = T(!1), Se = T(!1), Ce = T(), we = T(!1), Te = T(!1), Ee = T(), De = T(""), k = T([]);
5885
- async function Oe(e) {
5945
+ }), k = T([]), ve = T("chat"), ye = T([]), be = T(), xe = T(!1), Se = T(!1), Ce = T(), we = T(!1), Te = T(!1), Ee = T(), De = T(""), A = T([]), j = T(""), Oe = T(0);
5946
+ async function ke(e) {
5886
5947
  if (b.value) {
5887
- O.value = [];
5948
+ k.value = [];
5888
5949
  return;
5889
5950
  }
5890
5951
  try {
5891
- O.value = await E.value.getConversations(e, u.value);
5952
+ k.value = await E.value.getConversations(e, u.value);
5892
5953
  } catch {
5893
- O.value = [];
5954
+ k.value = [];
5894
5955
  }
5895
5956
  }
5896
- async function ke(e, t) {
5957
+ async function Ae(e, t) {
5897
5958
  if (b.value) {
5898
5959
  D.value.messages = [];
5899
5960
  return;
@@ -5905,19 +5966,19 @@ function $i(e) {
5905
5966
  D.value.messages = [];
5906
5967
  }
5907
5968
  }
5908
- async function Ae(e) {
5969
+ async function je(e) {
5909
5970
  try {
5910
5971
  ye.value = await E.value.getMessageFeedbacks(e);
5911
5972
  } catch {
5912
5973
  ye.value = [];
5913
5974
  }
5914
5975
  }
5915
- function je(e) {
5976
+ function Me(e) {
5916
5977
  let t = ye.value.findIndex((t) => t.messageId === e.messageId);
5917
5978
  t >= 0 ? ye.value[t] = e : ye.value.push(e);
5918
5979
  }
5919
- function Me(e) {
5920
- let t = ge.value, n = t.findIndex((t) => t.id === e.id), r = ie(e) ?? "";
5980
+ function M(e) {
5981
+ let t = _e.value, n = t.findIndex((t) => t.id === e.id), r = ie(e) ?? "";
5921
5982
  return {
5922
5983
  userQuestion: ie(t.slice(0, n).reverse().find((e) => e.role === "user") ?? e) ?? "",
5923
5984
  assistantMessage: r
@@ -5925,45 +5986,49 @@ function $i(e) {
5925
5986
  }
5926
5987
  async function Ne(e, t) {
5927
5988
  await Promise.all([
5928
- ke(e, t),
5929
- Oe(e),
5930
- Ae(t)
5931
- ]), de.value || te((e, t) => E.value.reverseGeocode(e, t, i.value)).then((e) => {
5932
- e && (de.value = e);
5989
+ Ae(e, t),
5990
+ ke(e),
5991
+ je(t)
5992
+ ]), me.value || te((e, t) => E.value.reverseGeocode(e, t, i.value)).then((e) => {
5993
+ e && (me.value = e);
5933
5994
  });
5934
5995
  }
5935
5996
  async function Pe() {
5936
- let e = De.value.trim(), t = k.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
5997
+ let e = De.value.trim(), t = A.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
5937
5998
  type: "file",
5938
5999
  mediaType: e.mediaSource.mimeType,
5939
6000
  url: e.localUrl,
5940
6001
  filename: e.mediaSource.name,
5941
6002
  providerMetadata: { "8bot": { media: e.mediaSource } }
5942
6003
  }));
5943
- b.value && ge.value.length > 0 && await Fe();
6004
+ b.value && _e.value.length > 0 && await N(), j.value = e, Oe.value = D.value.messages.length;
5944
6005
  let n = D.value.sendMessage;
5945
6006
  n({
5946
6007
  text: e,
5947
6008
  files: t.length > 0 ? t : void 0
5948
- }), De.value = "", j();
6009
+ }), De.value = "", Ie();
5949
6010
  }
5950
- async function A() {
5951
- return D.value.stop();
6011
+ async function Fe() {
6012
+ let e = j.value.length > 0;
6013
+ await D.value.stop(), e && (De.value = j.value, D.value.messages = D.value.messages.slice(0, Oe.value), j.value = "");
5952
6014
  }
5953
- function j(e = !1) {
5954
- for (let t of k.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
5955
- k.value = [];
6015
+ de(() => D.value.status, (e) => {
6016
+ e === "ready" && j.value.length > 0 && (j.value = "");
6017
+ });
6018
+ function Ie(e = !1) {
6019
+ for (let t of A.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
6020
+ A.value = [];
5956
6021
  }
5957
- async function Fe() {
5958
- return await A(), C.value = Ei(), D.value.clearError(), oe.value = void 0, se.value = !1, j(!0), I("chat"), C.value;
6022
+ async function N() {
6023
+ return j.value = "", await Fe(), C.value = Ai(), D.value.clearError(), oe.value = void 0, se.value = !1, Ie(!0), z("chat"), C.value;
5959
6024
  }
5960
- async function Ie(e) {
5961
- D.value.status !== "ready" && await A(), await D.value.regenerate(e);
6025
+ async function P(e) {
6026
+ D.value.status !== "ready" && (j.value = "", await Fe()), await D.value.regenerate(e);
5962
6027
  }
5963
- function Le(e) {
6028
+ function F(e) {
5964
6029
  if (e.tool === "requestGeolocation") {
5965
6030
  let t = e.output;
5966
- "latitude" in t && (de.value = {
6031
+ "latitude" in t && (me.value = {
5967
6032
  geolocationLatitude: t.latitude,
5968
6033
  geolocationLongitude: t.longitude,
5969
6034
  geolocationAccuracy: t.accuracy,
@@ -5972,33 +6037,33 @@ function $i(e) {
5972
6037
  }
5973
6038
  D.value.addToolOutput(e);
5974
6039
  }
5975
- async function M(e) {
5976
- let t = Ei(), n = {
6040
+ async function Le(e) {
6041
+ let t = Ai(), n = {
5977
6042
  id: t,
5978
6043
  file: e,
5979
6044
  localUrl: URL.createObjectURL(e),
5980
6045
  state: "uploading"
5981
6046
  };
5982
- k.value = [...k.value, n];
6047
+ A.value = [...A.value, n];
5983
6048
  try {
5984
6049
  let n = await E.value.uploadMedia(s.value, C.value, e);
5985
- k.value = k.value.map((e) => e.id === t ? {
6050
+ A.value = A.value.map((e) => e.id === t ? {
5986
6051
  ...e,
5987
6052
  state: "done",
5988
6053
  mediaSource: n
5989
6054
  } : e);
5990
6055
  } catch (e) {
5991
6056
  let n = e instanceof Error ? e.message : "Upload failed";
5992
- k.value = k.value.map((e) => e.id === t ? {
6057
+ A.value = A.value.map((e) => e.id === t ? {
5993
6058
  ...e,
5994
6059
  state: "error",
5995
6060
  error: n
5996
6061
  } : e);
5997
6062
  }
5998
6063
  }
5999
- async function N(e, t) {
6000
- let { userQuestion: n, assistantMessage: r } = Me(e);
6001
- je(await E.value.submitMessageFeedback({
6064
+ async function I(e, t) {
6065
+ let { userQuestion: n, assistantMessage: r } = M(e);
6066
+ Me(await E.value.submitMessageFeedback({
6002
6067
  messageId: e.id,
6003
6068
  chatId: C.value,
6004
6069
  agentId: s.value,
@@ -6007,34 +6072,34 @@ function $i(e) {
6007
6072
  assistantMessage: r
6008
6073
  }));
6009
6074
  }
6010
- async function P(e) {
6011
- await N(e, "upvote");
6012
- }
6013
6075
  async function Re(e) {
6014
- await N(e, "downvote");
6076
+ await I(e, "upvote");
6015
6077
  }
6016
- function F(e) {
6078
+ async function ze(e) {
6079
+ await I(e, "downvote");
6080
+ }
6081
+ function Be(e) {
6017
6082
  Se.value = !1, Ce.value = void 0, be.value = e;
6018
6083
  }
6019
- async function ze(e) {
6084
+ async function Ve(e) {
6020
6085
  if (be.value) try {
6021
6086
  xe.value = !0, Se.value = !1, Ce.value = void 0;
6022
- let { userQuestion: t, assistantMessage: n } = Me(be.value);
6023
- je(await E.value.submitMessageFeedback({
6087
+ let { userQuestion: t, assistantMessage: n } = M(be.value);
6088
+ Me(await E.value.submitMessageFeedback({
6024
6089
  messageId: be.value.id,
6025
6090
  chatId: C.value,
6026
6091
  agentId: s.value,
6027
6092
  userQuestion: t,
6028
6093
  assistantMessage: n,
6029
6094
  comment: e
6030
- })), Se.value = !0, await Ae(C.value);
6095
+ })), Se.value = !0, await je(C.value);
6031
6096
  } catch {
6032
6097
  Ce.value = r("message.feedbackSubmitError") ? n("message.feedbackSubmitError") : "Failed to submit feedback";
6033
6098
  } finally {
6034
6099
  xe.value = !1;
6035
6100
  }
6036
6101
  }
6037
- async function Be(e) {
6102
+ async function L(e) {
6038
6103
  try {
6039
6104
  Te.value = !0, we.value = !1, Ee.value = void 0, await E.value.submitLead({
6040
6105
  agentId: s.value,
@@ -6047,7 +6112,17 @@ function $i(e) {
6047
6112
  Te.value = !1;
6048
6113
  }
6049
6114
  }
6050
- function I(e) {
6115
+ async function R(e, t) {
6116
+ let n = await E.value.updateChatTitle(s.value, e, t);
6117
+ k.value = k.value.map((t) => t.id === e ? {
6118
+ ...t,
6119
+ title: n.title
6120
+ } : t);
6121
+ }
6122
+ async function He(e) {
6123
+ await E.value.deleteChat(s.value, e), k.value = k.value.filter((t) => t.id !== e), C.value === e && await N();
6124
+ }
6125
+ function z(e) {
6051
6126
  ve.value = e;
6052
6127
  }
6053
6128
  return {
@@ -6070,13 +6145,13 @@ function $i(e) {
6070
6145
  fallbackModels: v,
6071
6146
  gatewayOptions: y,
6072
6147
  chat: D,
6073
- messages: ge,
6074
- conversations: O,
6148
+ messages: _e,
6149
+ conversations: k,
6075
6150
  input: De,
6076
- pendingAttachments: k,
6151
+ pendingAttachments: A,
6077
6152
  localChatId: C,
6078
6153
  isConversationBlocked: se,
6079
- inputMessagePlaceholder: _e,
6154
+ inputMessagePlaceholder: O,
6080
6155
  chatError: oe,
6081
6156
  activeView: ve,
6082
6157
  messageFeedbacks: ye,
@@ -6088,24 +6163,26 @@ function $i(e) {
6088
6163
  isLoadingSubmitLead: Te,
6089
6164
  submitLeadError: Ee,
6090
6165
  initialize: Ne,
6091
- loadConversations: Oe,
6166
+ loadConversations: ke,
6092
6167
  handleSubmit: Pe,
6093
- stopGeneration: A,
6094
- startNewChat: Fe,
6095
- regenerate: Ie,
6096
- addToolOutput: Le,
6097
- handleFileSelect: M,
6098
- clearPendingAttachments: j,
6099
- onUpvote: P,
6100
- onDownvote: Re,
6101
- onFeedback: F,
6102
- onFeedbackSubmit: ze,
6103
- onLeadSubmit: Be,
6104
- navigate: I
6168
+ stopGeneration: Fe,
6169
+ startNewChat: N,
6170
+ regenerate: P,
6171
+ addToolOutput: F,
6172
+ handleFileSelect: Le,
6173
+ clearPendingAttachments: Ie,
6174
+ onUpvote: Re,
6175
+ onDownvote: ze,
6176
+ onFeedback: Be,
6177
+ onFeedbackSubmit: Ve,
6178
+ onLeadSubmit: L,
6179
+ navigate: z,
6180
+ renameChatTitle: R,
6181
+ deleteChat: He
6105
6182
  };
6106
6183
  })();
6107
6184
  }
6108
6185
  //#endregion
6109
- export { K as i, Xi as n, Ei as r, $i as t };
6186
+ export { K as a, rn as i, ea as n, Ai as r, ra as t };
6110
6187
 
6111
- //# sourceMappingURL=useChatbotStore-Im8Xjwte.js.map
6188
+ //# sourceMappingURL=useChatbotStore-CJlkoNn7.js.map