@athenaintel/react 0.19.0 → 0.21.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 (987) hide show
  1. package/README.md +171 -11
  2. package/dist/assets/AssetPanel.cjs +277 -0
  3. package/dist/assets/AssetPanel.cjs.map +1 -0
  4. package/dist/assets/AssetPanel.js +277 -0
  5. package/dist/assets/AssetPanel.js.map +1 -0
  6. package/dist/assets/AthenaAssetEmbed.cjs +151 -0
  7. package/dist/assets/AthenaAssetEmbed.cjs.map +1 -0
  8. package/dist/assets/AthenaAssetEmbed.js +151 -0
  9. package/dist/assets/AthenaAssetEmbed.js.map +1 -0
  10. package/dist/assets/AthenaLayout.cjs +69 -0
  11. package/dist/assets/AthenaLayout.cjs.map +1 -0
  12. package/dist/assets/AthenaLayout.js +69 -0
  13. package/dist/assets/AthenaLayout.js.map +1 -0
  14. package/dist/assets/asset-embed-messages.cjs +39 -0
  15. package/dist/assets/asset-embed-messages.cjs.map +1 -0
  16. package/dist/assets/asset-embed-messages.js +39 -0
  17. package/dist/assets/asset-embed-messages.js.map +1 -0
  18. package/dist/assets/asset-panel-store.cjs +124 -0
  19. package/dist/assets/asset-panel-store.cjs.map +1 -0
  20. package/dist/assets/asset-panel-store.js +124 -0
  21. package/dist/assets/asset-panel-store.js.map +1 -0
  22. package/dist/assets/asset-panel-url.cjs +40 -0
  23. package/dist/assets/asset-panel-url.cjs.map +1 -0
  24. package/dist/assets/asset-panel-url.js +40 -0
  25. package/dist/assets/asset-panel-url.js.map +1 -0
  26. package/dist/assets/use-asset-embed.cjs +370 -0
  27. package/dist/assets/use-asset-embed.cjs.map +1 -0
  28. package/dist/assets/use-asset-embed.js +370 -0
  29. package/dist/assets/use-asset-embed.js.map +1 -0
  30. package/dist/{AthenaAuthContext-B3AwLA5Z.cjs → auth/AthenaAuthContext.cjs} +5 -4
  31. package/dist/auth/AthenaAuthContext.cjs.map +1 -0
  32. package/dist/{AthenaAuthContext-DQsdayH2.js → auth/AthenaAuthContext.js} +3 -3
  33. package/dist/auth/AthenaAuthContext.js.map +1 -0
  34. package/dist/auth/AthenaAuthProvider.cjs +141 -0
  35. package/dist/auth/AthenaAuthProvider.cjs.map +1 -0
  36. package/dist/auth/AthenaAuthProvider.js +141 -0
  37. package/dist/auth/AthenaAuthProvider.js.map +1 -0
  38. package/dist/{auth.cjs → auth/AthenaSSOProvider.cjs} +14 -151
  39. package/dist/auth/AthenaSSOProvider.cjs.map +1 -0
  40. package/dist/{auth.js → auth/AthenaSSOProvider.js} +4 -142
  41. package/dist/auth/AthenaSSOProvider.js.map +1 -0
  42. package/dist/auth/index.cjs +10 -0
  43. package/dist/auth/index.cjs.map +1 -0
  44. package/dist/auth/index.js +10 -0
  45. package/dist/auth/index.js.map +1 -0
  46. package/dist/chat/AthenaChat.cjs +753 -0
  47. package/dist/chat/AthenaChat.cjs.map +1 -0
  48. package/dist/chat/AthenaChat.d.ts +3 -2
  49. package/dist/chat/AthenaChat.js +753 -0
  50. package/dist/chat/AthenaChat.js.map +1 -0
  51. package/dist/chat/AthenaChatErrorBoundary.cjs +53 -0
  52. package/dist/chat/AthenaChatErrorBoundary.cjs.map +1 -0
  53. package/dist/chat/AthenaChatErrorBoundary.js +53 -0
  54. package/dist/chat/AthenaChatErrorBoundary.js.map +1 -0
  55. package/dist/chat/StatewireApprovalCard.cjs +189 -0
  56. package/dist/chat/StatewireApprovalCard.cjs.map +1 -0
  57. package/dist/chat/StatewireApprovalCard.d.ts +14 -0
  58. package/dist/chat/StatewireApprovalCard.js +189 -0
  59. package/dist/chat/StatewireApprovalCard.js.map +1 -0
  60. package/dist/chat/StatewireClientToolBridge.cjs +51 -0
  61. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -0
  62. package/dist/chat/StatewireClientToolBridge.js +51 -0
  63. package/dist/chat/StatewireClientToolBridge.js.map +1 -0
  64. package/dist/chat/StatewireQueuedMessages.cjs +433 -0
  65. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -0
  66. package/dist/chat/StatewireQueuedMessages.d.ts +3 -4
  67. package/dist/chat/StatewireQueuedMessages.js +433 -0
  68. package/dist/chat/StatewireQueuedMessages.js.map +1 -0
  69. package/dist/chat/athena-citation-links.cjs +342 -0
  70. package/dist/chat/athena-citation-links.cjs.map +1 -0
  71. package/dist/chat/athena-citation-links.js +342 -0
  72. package/dist/chat/athena-citation-links.js.map +1 -0
  73. package/dist/chat/run-activity.cjs +28 -0
  74. package/dist/chat/run-activity.cjs.map +1 -0
  75. package/dist/chat/run-activity.js +28 -0
  76. package/dist/chat/run-activity.js.map +1 -0
  77. package/dist/chat/statewire-banners.cjs +83 -0
  78. package/dist/chat/statewire-banners.cjs.map +1 -0
  79. package/dist/chat/statewire-banners.js +83 -0
  80. package/dist/chat/statewire-banners.js.map +1 -0
  81. package/dist/chat/statewire-client-tools.cjs +74 -0
  82. package/dist/chat/statewire-client-tools.cjs.map +1 -0
  83. package/dist/chat/statewire-client-tools.js +74 -0
  84. package/dist/chat/statewire-client-tools.js.map +1 -0
  85. package/dist/chat/super-grouping/CollapsibleGroup.cjs +158 -0
  86. package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -0
  87. package/dist/chat/super-grouping/CollapsibleGroup.js +158 -0
  88. package/dist/chat/super-grouping/CollapsibleGroup.js.map +1 -0
  89. package/dist/chat/super-grouping/SuperGroupingCard.cjs +243 -0
  90. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -0
  91. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +14 -7
  92. package/dist/chat/super-grouping/SuperGroupingCard.js +243 -0
  93. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -0
  94. package/dist/chat/super-grouping/ToolTimeline.cjs +131 -0
  95. package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -0
  96. package/dist/chat/super-grouping/ToolTimeline.d.ts +16 -0
  97. package/dist/chat/super-grouping/ToolTimeline.js +131 -0
  98. package/dist/chat/super-grouping/ToolTimeline.js.map +1 -0
  99. package/dist/chat/super-grouping/activity-timeline.cjs +157 -0
  100. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -0
  101. package/dist/chat/super-grouping/activity-timeline.d.ts +6 -3
  102. package/dist/chat/super-grouping/activity-timeline.js +157 -0
  103. package/dist/chat/super-grouping/activity-timeline.js.map +1 -0
  104. package/dist/chat/super-grouping/grouping-function.cjs +55 -0
  105. package/dist/chat/super-grouping/grouping-function.cjs.map +1 -0
  106. package/dist/chat/super-grouping/grouping-function.js +55 -0
  107. package/dist/chat/super-grouping/grouping-function.js.map +1 -0
  108. package/dist/chat/super-grouping/index.cjs +26 -0
  109. package/dist/chat/super-grouping/index.cjs.map +1 -0
  110. package/dist/chat/super-grouping/index.js +26 -0
  111. package/dist/chat/super-grouping/index.js.map +1 -0
  112. package/dist/chat/super-grouping/timeline-step.cjs +65 -0
  113. package/dist/chat/super-grouping/timeline-step.cjs.map +1 -0
  114. package/dist/chat/super-grouping/timeline-step.d.ts +17 -0
  115. package/dist/chat/super-grouping/timeline-step.js +65 -0
  116. package/dist/chat/super-grouping/timeline-step.js.map +1 -0
  117. package/dist/chat/super-grouping/toolkit-map.cjs +96 -0
  118. package/dist/chat/super-grouping/toolkit-map.cjs.map +1 -0
  119. package/dist/chat/super-grouping/toolkit-map.js +96 -0
  120. package/dist/chat/super-grouping/toolkit-map.js.map +1 -0
  121. package/dist/chat/tiptap-text.cjs +101 -0
  122. package/dist/chat/tiptap-text.cjs.map +1 -0
  123. package/dist/chat/tiptap-text.js +101 -0
  124. package/dist/chat/tiptap-text.js.map +1 -0
  125. package/dist/chat/tooltip-icon-button.cjs +32 -0
  126. package/dist/chat/tooltip-icon-button.cjs.map +1 -0
  127. package/dist/chat/tooltip-icon-button.js +32 -0
  128. package/dist/chat/tooltip-icon-button.js.map +1 -0
  129. package/dist/chat/use-athena-run-live.cjs +24 -0
  130. package/dist/chat/use-athena-run-live.cjs.map +1 -0
  131. package/dist/chat/use-athena-run-live.d.ts +10 -0
  132. package/dist/chat/use-athena-run-live.js +24 -0
  133. package/dist/chat/use-athena-run-live.js.map +1 -0
  134. package/dist/chat/use-statewire-approval-request.cjs +51 -0
  135. package/dist/chat/use-statewire-approval-request.cjs.map +1 -0
  136. package/dist/chat/use-statewire-approval-request.d.ts +12 -2
  137. package/dist/chat/use-statewire-approval-request.js +51 -0
  138. package/dist/chat/use-statewire-approval-request.js.map +1 -0
  139. package/dist/chat-ui/auth/sign-in-card.cjs +128 -0
  140. package/dist/chat-ui/auth/sign-in-card.cjs.map +1 -0
  141. package/dist/chat-ui/auth/sign-in-card.js +128 -0
  142. package/dist/chat-ui/auth/sign-in-card.js.map +1 -0
  143. package/dist/chat-ui/composer/composer-action.cjs +11 -0
  144. package/dist/chat-ui/composer/composer-action.cjs.map +1 -0
  145. package/dist/chat-ui/composer/composer-action.d.ts +5 -8
  146. package/dist/chat-ui/composer/composer-action.js +11 -0
  147. package/dist/chat-ui/composer/composer-action.js.map +1 -0
  148. package/dist/chat-ui/composer/pending-attachment-uploads.cjs +25 -0
  149. package/dist/chat-ui/composer/pending-attachment-uploads.cjs.map +1 -0
  150. package/dist/chat-ui/composer/pending-attachment-uploads.js +25 -0
  151. package/dist/chat-ui/composer/pending-attachment-uploads.js.map +1 -0
  152. package/dist/chat-ui/composer/tiptap-composer.cjs +549 -0
  153. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -0
  154. package/dist/chat-ui/composer/tiptap-composer.d.ts +44 -7
  155. package/dist/chat-ui/composer/tiptap-composer.js +549 -0
  156. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -0
  157. package/dist/chat-ui/header/chat-header.cjs +33 -0
  158. package/dist/chat-ui/header/chat-header.cjs.map +1 -0
  159. package/dist/chat-ui/header/chat-header.js +33 -0
  160. package/dist/chat-ui/header/chat-header.js.map +1 -0
  161. package/dist/chat-ui/header/conversation-history-panel.cjs +369 -0
  162. package/dist/chat-ui/header/conversation-history-panel.cjs.map +1 -0
  163. package/dist/chat-ui/header/conversation-history-panel.js +369 -0
  164. package/dist/chat-ui/header/conversation-history-panel.js.map +1 -0
  165. package/dist/chat-ui/index.cjs +140 -0
  166. package/dist/chat-ui/index.cjs.map +1 -0
  167. package/dist/chat-ui/index.d.ts +4 -3
  168. package/dist/chat-ui/index.js +140 -0
  169. package/dist/chat-ui/index.js.map +1 -0
  170. package/dist/chat-ui/lib/asset-urls.cjs +18 -0
  171. package/dist/chat-ui/lib/asset-urls.cjs.map +1 -0
  172. package/dist/chat-ui/lib/asset-urls.js +18 -0
  173. package/dist/chat-ui/lib/asset-urls.js.map +1 -0
  174. package/dist/chat-ui/mentions/mention-chip.cjs +253 -0
  175. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -0
  176. package/dist/chat-ui/mentions/mention-chip.d.ts +11 -0
  177. package/dist/chat-ui/mentions/mention-chip.js +253 -0
  178. package/dist/chat-ui/mentions/mention-chip.js.map +1 -0
  179. package/dist/chat-ui/mentions/mention-extension.cjs +196 -0
  180. package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -0
  181. package/dist/chat-ui/mentions/mention-extension.d.ts +26 -2
  182. package/dist/chat-ui/mentions/mention-extension.js +196 -0
  183. package/dist/chat-ui/mentions/mention-extension.js.map +1 -0
  184. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs +35 -0
  185. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs.map +1 -0
  186. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js +35 -0
  187. package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js.map +1 -0
  188. package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs +95 -0
  189. package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs.map +1 -0
  190. package/dist/chat-ui/mentions/suggestions/components/mention-icon.d.ts +5 -0
  191. package/dist/chat-ui/mentions/suggestions/components/mention-icon.js +95 -0
  192. package/dist/chat-ui/mentions/suggestions/components/mention-icon.js.map +1 -0
  193. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs +116 -0
  194. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs.map +1 -0
  195. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js +116 -0
  196. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js.map +1 -0
  197. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +31 -0
  198. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -0
  199. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js +31 -0
  200. package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js.map +1 -0
  201. package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.cjs +27 -0
  202. package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.cjs.map +1 -0
  203. package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.js +27 -0
  204. package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.js.map +1 -0
  205. package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs +65 -0
  206. package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs.map +1 -0
  207. package/dist/chat-ui/mentions/suggestions/components/menu-item.d.ts +2 -2
  208. package/dist/chat-ui/mentions/suggestions/components/menu-item.js +65 -0
  209. package/dist/chat-ui/mentions/suggestions/components/menu-item.js.map +1 -0
  210. package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs +63 -0
  211. package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs.map +1 -0
  212. package/dist/chat-ui/mentions/suggestions/components/menu-list.d.ts +2 -2
  213. package/dist/chat-ui/mentions/suggestions/components/menu-list.js +63 -0
  214. package/dist/chat-ui/mentions/suggestions/components/menu-list.js.map +1 -0
  215. package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.cjs +11 -0
  216. package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.cjs.map +1 -0
  217. package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.js +11 -0
  218. package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.js.map +1 -0
  219. package/dist/chat-ui/mentions/suggestions/components/menu-summary.cjs +33 -0
  220. package/dist/chat-ui/mentions/suggestions/components/menu-summary.cjs.map +1 -0
  221. package/dist/chat-ui/mentions/suggestions/components/menu-summary.js +33 -0
  222. package/dist/chat-ui/mentions/suggestions/components/menu-summary.js.map +1 -0
  223. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs +58 -0
  224. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs.map +1 -0
  225. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.js +58 -0
  226. package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.js.map +1 -0
  227. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs +81 -0
  228. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs.map +1 -0
  229. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.js +81 -0
  230. package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.js.map +1 -0
  231. package/dist/chat-ui/mentions/suggestions/components/utils.cjs +18 -0
  232. package/dist/chat-ui/mentions/suggestions/components/utils.cjs.map +1 -0
  233. package/dist/chat-ui/mentions/suggestions/components/utils.js +18 -0
  234. package/dist/chat-ui/mentions/suggestions/components/utils.js.map +1 -0
  235. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +124 -0
  236. package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -0
  237. package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +13 -2
  238. package/dist/chat-ui/mentions/suggestions/data/api-client.js +124 -0
  239. package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -0
  240. package/dist/chat-ui/mentions/suggestions/data/item-cache.cjs +37 -0
  241. package/dist/chat-ui/mentions/suggestions/data/item-cache.cjs.map +1 -0
  242. package/dist/chat-ui/mentions/suggestions/data/item-cache.js +37 -0
  243. package/dist/chat-ui/mentions/suggestions/data/item-cache.js.map +1 -0
  244. package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs +134 -0
  245. package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs.map +1 -0
  246. package/dist/chat-ui/mentions/suggestions/data/orchestrator.js +134 -0
  247. package/dist/chat-ui/mentions/suggestions/data/orchestrator.js.map +1 -0
  248. package/dist/chat-ui/mentions/suggestions/data/scope-registry.cjs +91 -0
  249. package/dist/chat-ui/mentions/suggestions/data/scope-registry.cjs.map +1 -0
  250. package/dist/chat-ui/mentions/suggestions/data/scope-registry.js +91 -0
  251. package/dist/chat-ui/mentions/suggestions/data/scope-registry.js.map +1 -0
  252. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +137 -0
  253. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -0
  254. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +137 -0
  255. package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -0
  256. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +375 -0
  257. package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -0
  258. package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +16 -1
  259. package/dist/chat-ui/mentions/suggestions/data/sources/index.js +375 -0
  260. package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -0
  261. package/dist/chat-ui/mentions/suggestions/data/types.cjs +9 -0
  262. package/dist/chat-ui/mentions/suggestions/data/types.cjs.map +1 -0
  263. package/dist/chat-ui/mentions/suggestions/data/types.d.ts +14 -0
  264. package/dist/chat-ui/mentions/suggestions/data/types.js +9 -0
  265. package/dist/chat-ui/mentions/suggestions/data/types.js.map +1 -0
  266. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +173 -0
  267. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -0
  268. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +14 -4
  269. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +173 -0
  270. package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -0
  271. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs +45 -0
  272. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs.map +1 -0
  273. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js +45 -0
  274. package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js.map +1 -0
  275. package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.cjs +43 -0
  276. package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.cjs.map +1 -0
  277. package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.js +43 -0
  278. package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.js.map +1 -0
  279. package/dist/chat-ui/mentions/suggestions/data/utils/match-query.cjs +14 -0
  280. package/dist/chat-ui/mentions/suggestions/data/utils/match-query.cjs.map +1 -0
  281. package/dist/chat-ui/mentions/suggestions/data/utils/match-query.js +14 -0
  282. package/dist/chat-ui/mentions/suggestions/data/utils/match-query.js.map +1 -0
  283. package/dist/chat-ui/mentions/suggestions/data/utils/score-match.cjs +48 -0
  284. package/dist/chat-ui/mentions/suggestions/data/utils/score-match.cjs.map +1 -0
  285. package/dist/chat-ui/mentions/suggestions/data/utils/score-match.js +48 -0
  286. package/dist/chat-ui/mentions/suggestions/data/utils/score-match.js.map +1 -0
  287. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs +71 -0
  288. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs.map +1 -0
  289. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js +71 -0
  290. package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js.map +1 -0
  291. package/dist/chat-ui/messages/continue-pill.cjs +54 -0
  292. package/dist/chat-ui/messages/continue-pill.cjs.map +1 -0
  293. package/dist/chat-ui/messages/continue-pill.js +54 -0
  294. package/dist/chat-ui/messages/continue-pill.js.map +1 -0
  295. package/dist/chat-ui/messages/message-actions-config.cjs +12 -0
  296. package/dist/chat-ui/messages/message-actions-config.cjs.map +1 -0
  297. package/dist/chat-ui/messages/message-actions-config.js +12 -0
  298. package/dist/chat-ui/messages/message-actions-config.js.map +1 -0
  299. package/dist/chat-ui/messages/message-components.cjs +320 -0
  300. package/dist/chat-ui/messages/message-components.cjs.map +1 -0
  301. package/dist/chat-ui/messages/message-components.d.ts +1 -1
  302. package/dist/chat-ui/messages/message-components.js +320 -0
  303. package/dist/chat-ui/messages/message-components.js.map +1 -0
  304. package/dist/chat-ui/messages/running-indicator.cjs +49 -0
  305. package/dist/chat-ui/messages/running-indicator.cjs.map +1 -0
  306. package/dist/chat-ui/messages/running-indicator.js +49 -0
  307. package/dist/chat-ui/messages/running-indicator.js.map +1 -0
  308. package/dist/chat-ui/messages/runtime-message.cjs +66 -0
  309. package/dist/chat-ui/messages/runtime-message.cjs.map +1 -0
  310. package/dist/chat-ui/messages/runtime-message.js +66 -0
  311. package/dist/chat-ui/messages/runtime-message.js.map +1 -0
  312. package/dist/{statewire-continue-run-nE9VCKUh.cjs → chat-ui/messages/statewire-continue-run.cjs} +61 -23
  313. package/dist/chat-ui/messages/statewire-continue-run.cjs.map +1 -0
  314. package/dist/chat-ui/messages/statewire-continue-run.d.ts +19 -5
  315. package/dist/{statewire-continue-run-D34gS7_1.js → chat-ui/messages/statewire-continue-run.js} +51 -14
  316. package/dist/chat-ui/messages/statewire-continue-run.js.map +1 -0
  317. package/dist/chat-ui/messages/user-edit-composer.cjs +62 -0
  318. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -0
  319. package/dist/chat-ui/messages/user-edit-composer.js +62 -0
  320. package/dist/chat-ui/messages/user-edit-composer.js.map +1 -0
  321. package/dist/chat-ui/messages/voice-delegation-card.cjs +51 -0
  322. package/dist/chat-ui/messages/voice-delegation-card.cjs.map +1 -0
  323. package/dist/chat-ui/messages/voice-delegation-card.d.ts +26 -0
  324. package/dist/chat-ui/messages/voice-delegation-card.js +51 -0
  325. package/dist/chat-ui/messages/voice-delegation-card.js.map +1 -0
  326. package/dist/chat-ui/rich-text/chat-message-body.cjs +76 -0
  327. package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -0
  328. package/dist/chat-ui/rich-text/chat-message-body.d.ts +5 -0
  329. package/dist/chat-ui/rich-text/chat-message-body.js +76 -0
  330. package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -0
  331. package/dist/chat-ui/rich-text/chat-node-views.cjs +51 -0
  332. package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -0
  333. package/dist/chat-ui/rich-text/chat-node-views.d.ts +13 -0
  334. package/dist/chat-ui/rich-text/chat-node-views.js +51 -0
  335. package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -0
  336. package/dist/chat-ui/rich-text/chat-text-schema.cjs +70 -0
  337. package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -0
  338. package/dist/chat-ui/rich-text/chat-text-schema.d.ts +7 -0
  339. package/dist/chat-ui/rich-text/chat-text-schema.js +70 -0
  340. package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -0
  341. package/dist/chat-ui/rich-text/dom-output-spec.cjs +83 -0
  342. package/dist/chat-ui/rich-text/dom-output-spec.cjs.map +1 -0
  343. package/dist/chat-ui/rich-text/dom-output-spec.d.ts +11 -0
  344. package/dist/chat-ui/rich-text/dom-output-spec.js +83 -0
  345. package/dist/chat-ui/rich-text/dom-output-spec.js.map +1 -0
  346. package/dist/chat-ui/statewire.cjs +40 -0
  347. package/dist/chat-ui/statewire.cjs.map +1 -0
  348. package/dist/chat-ui/statewire.js +40 -0
  349. package/dist/chat-ui/statewire.js.map +1 -0
  350. package/dist/chat-ui/thread/chat-composer-dock.cjs +37 -0
  351. package/dist/chat-ui/thread/chat-composer-dock.cjs.map +1 -0
  352. package/dist/chat-ui/thread/chat-composer-dock.js +37 -0
  353. package/dist/chat-ui/thread/chat-composer-dock.js.map +1 -0
  354. package/dist/chat-ui/thread/chat-thread-shell.cjs +102 -0
  355. package/dist/chat-ui/thread/chat-thread-shell.cjs.map +1 -0
  356. package/dist/chat-ui/thread/chat-thread-shell.js +102 -0
  357. package/dist/chat-ui/thread/chat-thread-shell.js.map +1 -0
  358. package/dist/chat-ui/thread/composer-send-or-stop.cjs +75 -0
  359. package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -0
  360. package/dist/chat-ui/thread/composer-send-or-stop.d.ts +0 -6
  361. package/dist/chat-ui/thread/composer-send-or-stop.js +75 -0
  362. package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -0
  363. package/dist/chat-ui/thread/statewire-history-edge.cjs +135 -0
  364. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -0
  365. package/dist/chat-ui/thread/statewire-history-edge.js +135 -0
  366. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -0
  367. package/dist/{collab.cjs → collab/client.cjs} +6 -166
  368. package/dist/collab/client.cjs.map +1 -0
  369. package/dist/{collab.js → collab/client.js} +5 -164
  370. package/dist/collab/client.js.map +1 -0
  371. package/dist/collab/close-policy.cjs +14 -0
  372. package/dist/collab/close-policy.cjs.map +1 -0
  373. package/dist/collab/close-policy.js +14 -0
  374. package/dist/collab/close-policy.js.map +1 -0
  375. package/dist/collab/index.cjs +17 -0
  376. package/dist/collab/index.cjs.map +1 -0
  377. package/dist/collab/index.js +17 -0
  378. package/dist/collab/index.js.map +1 -0
  379. package/dist/collab/mint.cjs +59 -0
  380. package/dist/collab/mint.cjs.map +1 -0
  381. package/dist/collab/mint.js +59 -0
  382. package/dist/collab/mint.js.map +1 -0
  383. package/dist/collab/react.cjs +58 -0
  384. package/dist/collab/react.cjs.map +1 -0
  385. package/dist/collab/react.js +58 -0
  386. package/dist/collab/react.js.map +1 -0
  387. package/dist/collab/shape.cjs +45 -0
  388. package/dist/collab/shape.cjs.map +1 -0
  389. package/dist/collab/shape.js +45 -0
  390. package/dist/collab/shape.js.map +1 -0
  391. package/dist/composer/AttachmentContext.cjs +40 -0
  392. package/dist/composer/AttachmentContext.cjs.map +1 -0
  393. package/dist/composer/AttachmentContext.js +40 -0
  394. package/dist/composer/AttachmentContext.js.map +1 -0
  395. package/dist/composer/ComposerAttachmentPreview.cjs +39 -0
  396. package/dist/composer/ComposerAttachmentPreview.cjs.map +1 -0
  397. package/dist/composer/ComposerAttachmentPreview.js +39 -0
  398. package/dist/composer/ComposerAttachmentPreview.js.map +1 -0
  399. package/dist/composer/ComposerDropZone.cjs +61 -0
  400. package/dist/composer/ComposerDropZone.cjs.map +1 -0
  401. package/dist/composer/ComposerDropZone.d.ts +1 -1
  402. package/dist/composer/ComposerDropZone.js +61 -0
  403. package/dist/composer/ComposerDropZone.js.map +1 -0
  404. package/dist/composer/ComposerQuotePreview.cjs +42 -0
  405. package/dist/composer/ComposerQuotePreview.cjs.map +1 -0
  406. package/dist/composer/ComposerQuotePreview.js +42 -0
  407. package/dist/composer/ComposerQuotePreview.js.map +1 -0
  408. package/dist/composer/FileUploadButton.cjs +65 -0
  409. package/dist/composer/FileUploadButton.cjs.map +1 -0
  410. package/dist/composer/FileUploadButton.d.ts +1 -1
  411. package/dist/composer/FileUploadButton.js +65 -0
  412. package/dist/composer/FileUploadButton.js.map +1 -0
  413. package/dist/composer/QuoteContext.cjs +68 -0
  414. package/dist/composer/QuoteContext.cjs.map +1 -0
  415. package/dist/composer/QuoteContext.js +68 -0
  416. package/dist/composer/QuoteContext.js.map +1 -0
  417. package/dist/composer/build-composed-message.cjs +25 -0
  418. package/dist/composer/build-composed-message.cjs.map +1 -0
  419. package/dist/composer/build-composed-message.js +25 -0
  420. package/dist/composer/build-composed-message.js.map +1 -0
  421. package/dist/composer/clipboard.cjs +62 -0
  422. package/dist/composer/clipboard.cjs.map +1 -0
  423. package/dist/composer/clipboard.d.ts +27 -3
  424. package/dist/composer/clipboard.js +62 -0
  425. package/dist/composer/clipboard.js.map +1 -0
  426. package/dist/composer/useAppendToComposer.cjs +21 -0
  427. package/dist/composer/useAppendToComposer.cjs.map +1 -0
  428. package/dist/composer/useAppendToComposer.js +21 -0
  429. package/dist/composer/useAppendToComposer.js.map +1 -0
  430. package/dist/composer/useAttachFiles.cjs +40 -0
  431. package/dist/composer/useAttachFiles.cjs.map +1 -0
  432. package/dist/composer/useAttachFiles.d.ts +24 -0
  433. package/dist/composer/useAttachFiles.js +40 -0
  434. package/dist/composer/useAttachFiles.js.map +1 -0
  435. package/dist/composer/useComposerAttachment.cjs +25 -0
  436. package/dist/composer/useComposerAttachment.cjs.map +1 -0
  437. package/dist/composer/useComposerAttachment.js +25 -0
  438. package/dist/composer/useComposerAttachment.js.map +1 -0
  439. package/dist/composer/useFileUpload.cjs +123 -0
  440. package/dist/composer/useFileUpload.cjs.map +1 -0
  441. package/dist/composer/useFileUpload.js +123 -0
  442. package/dist/composer/useFileUpload.js.map +1 -0
  443. package/dist/composer/useSendMessage.cjs +22 -0
  444. package/dist/composer/useSendMessage.cjs.map +1 -0
  445. package/dist/composer/useSendMessage.js +22 -0
  446. package/dist/composer/useSendMessage.js.map +1 -0
  447. package/dist/diagnostics/athena-diagnostics.cjs +329 -0
  448. package/dist/diagnostics/athena-diagnostics.cjs.map +1 -0
  449. package/dist/diagnostics/athena-diagnostics.js +329 -0
  450. package/dist/diagnostics/athena-diagnostics.js.map +1 -0
  451. package/dist/diagnostics/errors.cjs +89 -0
  452. package/dist/diagnostics/errors.cjs.map +1 -0
  453. package/dist/diagnostics/errors.js +89 -0
  454. package/dist/diagnostics/errors.js.map +1 -0
  455. package/dist/diagnostics/useAthenaDiagnostics.cjs +16 -0
  456. package/dist/diagnostics/useAthenaDiagnostics.cjs.map +1 -0
  457. package/dist/diagnostics/useAthenaDiagnostics.js +16 -0
  458. package/dist/diagnostics/useAthenaDiagnostics.js.map +1 -0
  459. package/dist/index.cjs +275 -27882
  460. package/dist/index.cjs.map +1 -1
  461. package/dist/index.d.ts +6 -4
  462. package/dist/index.js +162 -27759
  463. package/dist/index.js.map +1 -1
  464. package/dist/lib/athena-urls.cjs +194 -0
  465. package/dist/lib/athena-urls.cjs.map +1 -0
  466. package/dist/lib/athena-urls.d.ts +20 -5
  467. package/dist/lib/athena-urls.js +194 -0
  468. package/dist/lib/athena-urls.js.map +1 -0
  469. package/dist/lib/posthog/before-send.cjs +58 -0
  470. package/dist/lib/posthog/before-send.cjs.map +1 -0
  471. package/dist/lib/posthog/before-send.js +58 -0
  472. package/dist/lib/posthog/before-send.js.map +1 -0
  473. package/dist/lib/posthog/capture-gate.cjs +322 -0
  474. package/dist/lib/posthog/capture-gate.cjs.map +1 -0
  475. package/dist/lib/posthog/capture-gate.js +322 -0
  476. package/dist/lib/posthog/capture-gate.js.map +1 -0
  477. package/dist/lib/posthog/wrap-posthog-client.cjs +163 -0
  478. package/dist/lib/posthog/wrap-posthog-client.cjs.map +1 -0
  479. package/dist/lib/posthog/wrap-posthog-client.js +163 -0
  480. package/dist/lib/posthog/wrap-posthog-client.js.map +1 -0
  481. package/dist/lib/utils.cjs +12 -0
  482. package/dist/lib/utils.cjs.map +1 -0
  483. package/dist/lib/utils.js +9 -0
  484. package/dist/lib/utils.js.map +1 -0
  485. package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs +77 -0
  486. package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs.map +1 -0
  487. package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js +77 -0
  488. package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js.map +1 -0
  489. package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs +181 -0
  490. package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs.map +1 -0
  491. package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js +181 -0
  492. package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js.map +1 -0
  493. package/dist/node_modules/qrcode-generator/dist/qrcode.cjs +32 -0
  494. package/dist/node_modules/qrcode-generator/dist/qrcode.cjs.map +1 -0
  495. package/dist/node_modules/qrcode-generator/dist/qrcode.js +31 -0
  496. package/dist/node_modules/qrcode-generator/dist/qrcode.js.map +1 -0
  497. package/dist/node_modules/zod/v4/classic/errors.cjs +44 -0
  498. package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -0
  499. package/dist/node_modules/zod/v4/classic/errors.js +44 -0
  500. package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
  501. package/dist/node_modules/zod/v4/classic/iso.cjs +43 -0
  502. package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -0
  503. package/dist/node_modules/zod/v4/classic/iso.js +43 -0
  504. package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
  505. package/dist/node_modules/zod/v4/classic/parse.cjs +29 -0
  506. package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -0
  507. package/dist/node_modules/zod/v4/classic/parse.js +29 -0
  508. package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
  509. package/dist/node_modules/zod/v4/classic/schemas.cjs +871 -0
  510. package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
  511. package/dist/node_modules/zod/v4/classic/schemas.js +871 -0
  512. package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
  513. package/dist/node_modules/zod/v4/core/api.cjs +570 -0
  514. package/dist/node_modules/zod/v4/core/api.cjs.map +1 -0
  515. package/dist/node_modules/zod/v4/core/api.js +570 -0
  516. package/dist/node_modules/zod/v4/core/api.js.map +1 -0
  517. package/dist/node_modules/zod/v4/core/checks.cjs +411 -0
  518. package/dist/node_modules/zod/v4/core/checks.cjs.map +1 -0
  519. package/dist/node_modules/zod/v4/core/checks.js +411 -0
  520. package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
  521. package/dist/node_modules/zod/v4/core/core.cjs +77 -0
  522. package/dist/node_modules/zod/v4/core/core.cjs.map +1 -0
  523. package/dist/node_modules/zod/v4/core/core.js +77 -0
  524. package/dist/node_modules/zod/v4/core/core.js.map +1 -0
  525. package/dist/node_modules/zod/v4/core/doc.cjs +38 -0
  526. package/dist/node_modules/zod/v4/core/doc.cjs.map +1 -0
  527. package/dist/node_modules/zod/v4/core/doc.js +38 -0
  528. package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
  529. package/dist/node_modules/zod/v4/core/errors.cjs +76 -0
  530. package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -0
  531. package/dist/node_modules/zod/v4/core/errors.js +76 -0
  532. package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
  533. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +312 -0
  534. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -0
  535. package/dist/node_modules/zod/v4/core/json-schema-processors.js +312 -0
  536. package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
  537. package/dist/node_modules/zod/v4/core/parse.cjs +96 -0
  538. package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -0
  539. package/dist/node_modules/zod/v4/core/parse.js +96 -0
  540. package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
  541. package/dist/node_modules/zod/v4/core/regexes.cjs +86 -0
  542. package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -0
  543. package/dist/node_modules/zod/v4/core/regexes.js +86 -0
  544. package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
  545. package/dist/node_modules/zod/v4/core/registries.cjs +52 -0
  546. package/dist/node_modules/zod/v4/core/registries.cjs.map +1 -0
  547. package/dist/node_modules/zod/v4/core/registries.js +52 -0
  548. package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
  549. package/dist/node_modules/zod/v4/core/schemas.cjs +1412 -0
  550. package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -0
  551. package/dist/node_modules/zod/v4/core/schemas.js +1413 -0
  552. package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
  553. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +370 -0
  554. package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -0
  555. package/dist/node_modules/zod/v4/core/to-json-schema.js +370 -0
  556. package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  557. package/dist/node_modules/zod/v4/core/util.cjs +444 -0
  558. package/dist/node_modules/zod/v4/core/util.cjs.map +1 -0
  559. package/dist/node_modules/zod/v4/core/util.js +444 -0
  560. package/dist/node_modules/zod/v4/core/util.js.map +1 -0
  561. package/dist/node_modules/zod/v4/core/versions.cjs +9 -0
  562. package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -0
  563. package/dist/node_modules/zod/v4/core/versions.js +9 -0
  564. package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
  565. package/dist/packages/agent-runtime/src/asset-attachment.cjs +19 -0
  566. package/dist/packages/agent-runtime/src/asset-attachment.cjs.map +1 -0
  567. package/dist/packages/agent-runtime/src/asset-attachment.js +19 -0
  568. package/dist/packages/agent-runtime/src/asset-attachment.js.map +1 -0
  569. package/dist/packages/agent-runtime/src/auth-denial.cjs +28 -0
  570. package/dist/packages/agent-runtime/src/auth-denial.cjs.map +1 -0
  571. package/dist/packages/agent-runtime/src/auth-denial.js +28 -0
  572. package/dist/packages/agent-runtime/src/auth-denial.js.map +1 -0
  573. package/dist/packages/agent-runtime/src/client-tool-bridge.cjs +276 -0
  574. package/dist/packages/agent-runtime/src/client-tool-bridge.cjs.map +1 -0
  575. package/dist/packages/agent-runtime/src/client-tool-bridge.js +276 -0
  576. package/dist/packages/agent-runtime/src/client-tool-bridge.js.map +1 -0
  577. package/dist/packages/agent-runtime/src/client-tools.cjs +137 -0
  578. package/dist/packages/agent-runtime/src/client-tools.cjs.map +1 -0
  579. package/dist/packages/agent-runtime/src/client-tools.js +137 -0
  580. package/dist/packages/agent-runtime/src/client-tools.js.map +1 -0
  581. package/dist/packages/agent-runtime/src/conversation-index.cjs +80 -0
  582. package/dist/packages/agent-runtime/src/conversation-index.cjs.map +1 -0
  583. package/dist/packages/agent-runtime/src/conversation-index.js +80 -0
  584. package/dist/packages/agent-runtime/src/conversation-index.js.map +1 -0
  585. package/dist/packages/agent-runtime/src/conversation-list.cjs +90 -0
  586. package/dist/packages/agent-runtime/src/conversation-list.cjs.map +1 -0
  587. package/dist/packages/agent-runtime/src/conversation-list.js +90 -0
  588. package/dist/packages/agent-runtime/src/conversation-list.js.map +1 -0
  589. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs +55 -0
  590. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -0
  591. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js +55 -0
  592. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -0
  593. package/dist/packages/agent-runtime/src/edit-command.cjs +89 -0
  594. package/dist/packages/agent-runtime/src/edit-command.cjs.map +1 -0
  595. package/dist/packages/agent-runtime/src/edit-command.js +89 -0
  596. package/dist/packages/agent-runtime/src/edit-command.js.map +1 -0
  597. package/dist/packages/agent-runtime/src/errors.cjs +95 -0
  598. package/dist/packages/agent-runtime/src/errors.cjs.map +1 -0
  599. package/dist/packages/agent-runtime/src/errors.js +95 -0
  600. package/dist/packages/agent-runtime/src/errors.js.map +1 -0
  601. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs +238 -0
  602. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -0
  603. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js +238 -0
  604. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +1 -0
  605. package/dist/packages/agent-runtime/src/interrupts.cjs +141 -0
  606. package/dist/packages/agent-runtime/src/interrupts.cjs.map +1 -0
  607. package/dist/packages/agent-runtime/src/interrupts.js +141 -0
  608. package/dist/packages/agent-runtime/src/interrupts.js.map +1 -0
  609. package/dist/packages/agent-runtime/src/message-author.cjs +31 -0
  610. package/dist/packages/agent-runtime/src/message-author.cjs.map +1 -0
  611. package/dist/packages/agent-runtime/src/message-author.js +31 -0
  612. package/dist/packages/agent-runtime/src/message-author.js.map +1 -0
  613. package/dist/packages/agent-runtime/src/message-window.cjs +85 -0
  614. package/dist/packages/agent-runtime/src/message-window.cjs.map +1 -0
  615. package/dist/packages/agent-runtime/src/message-window.js +85 -0
  616. package/dist/packages/agent-runtime/src/message-window.js.map +1 -0
  617. package/dist/packages/agent-runtime/src/messages.cjs +463 -0
  618. package/dist/packages/agent-runtime/src/messages.cjs.map +1 -0
  619. package/dist/packages/agent-runtime/src/messages.js +463 -0
  620. package/dist/packages/agent-runtime/src/messages.js.map +1 -0
  621. package/dist/packages/agent-runtime/src/model-context.cjs +13 -0
  622. package/dist/packages/agent-runtime/src/model-context.cjs.map +1 -0
  623. package/dist/packages/agent-runtime/src/model-context.js +13 -0
  624. package/dist/packages/agent-runtime/src/model-context.js.map +1 -0
  625. package/dist/packages/agent-runtime/src/optimistic-content.cjs +17 -0
  626. package/dist/packages/agent-runtime/src/optimistic-content.cjs.map +1 -0
  627. package/dist/packages/agent-runtime/src/optimistic-content.js +17 -0
  628. package/dist/packages/agent-runtime/src/optimistic-content.js.map +1 -0
  629. package/dist/packages/agent-runtime/src/protocol.cjs +31 -0
  630. package/dist/packages/agent-runtime/src/protocol.cjs.map +1 -0
  631. package/dist/packages/agent-runtime/src/protocol.js +31 -0
  632. package/dist/packages/agent-runtime/src/protocol.js.map +1 -0
  633. package/dist/packages/agent-runtime/src/queue.cjs +67 -0
  634. package/dist/packages/agent-runtime/src/queue.cjs.map +1 -0
  635. package/dist/packages/agent-runtime/src/queue.js +67 -0
  636. package/dist/packages/agent-runtime/src/queue.js.map +1 -0
  637. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs +329 -0
  638. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -0
  639. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js +329 -0
  640. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -0
  641. package/dist/packages/agent-runtime/src/runtime-messages.cjs +187 -0
  642. package/dist/packages/agent-runtime/src/runtime-messages.cjs.map +1 -0
  643. package/dist/packages/agent-runtime/src/runtime-messages.js +187 -0
  644. package/dist/packages/agent-runtime/src/runtime-messages.js.map +1 -0
  645. package/dist/packages/agent-runtime/src/screen-point.cjs +68 -0
  646. package/dist/packages/agent-runtime/src/screen-point.cjs.map +1 -0
  647. package/dist/packages/agent-runtime/src/screen-point.js +68 -0
  648. package/dist/packages/agent-runtime/src/screen-point.js.map +1 -0
  649. package/dist/packages/agent-runtime/src/send-recovery.cjs +128 -0
  650. package/dist/packages/agent-runtime/src/send-recovery.cjs.map +1 -0
  651. package/dist/packages/agent-runtime/src/send-recovery.js +128 -0
  652. package/dist/packages/agent-runtime/src/send-recovery.js.map +1 -0
  653. package/dist/packages/agent-runtime/src/statewire-attach-observer.cjs +249 -0
  654. package/dist/packages/agent-runtime/src/statewire-attach-observer.cjs.map +1 -0
  655. package/dist/packages/agent-runtime/src/statewire-attach-observer.js +249 -0
  656. package/dist/packages/agent-runtime/src/statewire-attach-observer.js.map +1 -0
  657. package/dist/packages/agent-runtime/src/statewire-state.cjs +16 -0
  658. package/dist/packages/agent-runtime/src/statewire-state.cjs.map +1 -0
  659. package/dist/packages/agent-runtime/src/statewire-state.js +16 -0
  660. package/dist/packages/agent-runtime/src/statewire-state.js.map +1 -0
  661. package/dist/packages/agent-runtime/src/statewire-suspended.cjs +41 -0
  662. package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +1 -0
  663. package/dist/packages/agent-runtime/src/statewire-suspended.js +41 -0
  664. package/dist/packages/agent-runtime/src/statewire-suspended.js.map +1 -0
  665. package/dist/packages/agent-runtime/src/statewire-transport.cjs +11 -0
  666. package/dist/packages/agent-runtime/src/statewire-transport.cjs.map +1 -0
  667. package/dist/packages/agent-runtime/src/statewire-transport.js +11 -0
  668. package/dist/packages/agent-runtime/src/statewire-transport.js.map +1 -0
  669. package/dist/packages/agent-runtime/src/streaming-markdown.cjs +214 -0
  670. package/dist/packages/agent-runtime/src/streaming-markdown.cjs.map +1 -0
  671. package/dist/packages/agent-runtime/src/streaming-markdown.js +214 -0
  672. package/dist/packages/agent-runtime/src/streaming-markdown.js.map +1 -0
  673. package/dist/packages/agent-runtime/src/thread-extras.cjs +38 -0
  674. package/dist/packages/agent-runtime/src/thread-extras.cjs.map +1 -0
  675. package/dist/packages/agent-runtime/src/thread-extras.js +38 -0
  676. package/dist/packages/agent-runtime/src/thread-extras.js.map +1 -0
  677. package/dist/packages/agent-runtime/src/thread-handoff.cjs +85 -0
  678. package/dist/packages/agent-runtime/src/thread-handoff.cjs.map +1 -0
  679. package/dist/packages/agent-runtime/src/thread-handoff.js +85 -0
  680. package/dist/packages/agent-runtime/src/thread-handoff.js.map +1 -0
  681. package/dist/packages/agent-runtime/src/thread-snapshot-cache.cjs +90 -0
  682. package/dist/packages/agent-runtime/src/thread-snapshot-cache.cjs.map +1 -0
  683. package/dist/packages/agent-runtime/src/thread-snapshot-cache.js +90 -0
  684. package/dist/packages/agent-runtime/src/thread-snapshot-cache.js.map +1 -0
  685. package/dist/packages/agent-runtime/src/thread-status.cjs +49 -0
  686. package/dist/packages/agent-runtime/src/thread-status.cjs.map +1 -0
  687. package/dist/packages/agent-runtime/src/thread-status.js +49 -0
  688. package/dist/packages/agent-runtime/src/thread-status.js.map +1 -0
  689. package/dist/packages/agent-runtime/src/tool-metadata.cjs +1794 -0
  690. package/dist/packages/agent-runtime/src/tool-metadata.cjs.map +1 -0
  691. package/dist/packages/agent-runtime/src/tool-metadata.js +1794 -0
  692. package/dist/packages/agent-runtime/src/tool-metadata.js.map +1 -0
  693. package/dist/packages/agent-runtime/src/tool-outputs.cjs +46 -0
  694. package/dist/packages/agent-runtime/src/tool-outputs.cjs.map +1 -0
  695. package/dist/packages/agent-runtime/src/tool-outputs.js +46 -0
  696. package/dist/packages/agent-runtime/src/tool-outputs.js.map +1 -0
  697. package/dist/packages/agent-runtime/src/tool-result.cjs +151 -0
  698. package/dist/packages/agent-runtime/src/tool-result.cjs.map +1 -0
  699. package/dist/packages/agent-runtime/src/tool-result.js +151 -0
  700. package/dist/packages/agent-runtime/src/tool-result.js.map +1 -0
  701. package/dist/packages/agent-runtime/src/use-conversation-list.cjs +139 -0
  702. package/dist/packages/agent-runtime/src/use-conversation-list.cjs.map +1 -0
  703. package/dist/packages/agent-runtime/src/use-conversation-list.js +139 -0
  704. package/dist/packages/agent-runtime/src/use-conversation-list.js.map +1 -0
  705. package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs +14 -0
  706. package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs.map +1 -0
  707. package/dist/packages/agent-runtime/src/use-deep-agent-config.js +14 -0
  708. package/dist/packages/agent-runtime/src/use-deep-agent-config.js.map +1 -0
  709. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs +44 -0
  710. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -0
  711. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js +44 -0
  712. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -0
  713. package/dist/packages/agent-runtime/src/use-deep-agent-runtime.cjs +148 -0
  714. package/dist/packages/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -0
  715. package/dist/packages/agent-runtime/src/use-deep-agent-runtime.js +148 -0
  716. package/dist/packages/agent-runtime/src/use-deep-agent-runtime.js.map +1 -0
  717. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs +407 -0
  718. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -0
  719. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js +407 -0
  720. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +1 -0
  721. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs +133 -0
  722. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -0
  723. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js +133 -0
  724. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -0
  725. package/dist/packages/agent-runtime/src/voice-presentation.cjs +37 -0
  726. package/dist/packages/agent-runtime/src/voice-presentation.cjs.map +1 -0
  727. package/dist/packages/agent-runtime/src/voice-presentation.js +37 -0
  728. package/dist/packages/agent-runtime/src/voice-presentation.js.map +1 -0
  729. package/dist/packages/react/package.json.cjs +9 -0
  730. package/dist/packages/react/package.json.cjs.map +1 -0
  731. package/dist/packages/react/package.json.js +9 -0
  732. package/dist/packages/react/package.json.js.map +1 -0
  733. package/dist/{AthenaContext-B1QMhIP-.cjs → provider/AthenaContext.cjs} +5 -4
  734. package/dist/provider/AthenaContext.cjs.map +1 -0
  735. package/dist/{AthenaContext-MOslgOmE.js → provider/AthenaContext.js} +3 -3
  736. package/dist/provider/AthenaContext.js.map +1 -0
  737. package/dist/provider/AthenaProvider.cjs +404 -0
  738. package/dist/provider/AthenaProvider.cjs.map +1 -0
  739. package/dist/provider/AthenaProvider.js +404 -0
  740. package/dist/provider/AthenaProvider.js.map +1 -0
  741. package/dist/provider/PostHogProvider.cjs +81 -0
  742. package/dist/provider/PostHogProvider.cjs.map +1 -0
  743. package/dist/provider/PostHogProvider.js +59 -0
  744. package/dist/provider/PostHogProvider.js.map +1 -0
  745. package/dist/provider/config.d.ts +8 -7
  746. package/dist/provider/statewire-lifecycle-context.cjs +10 -0
  747. package/dist/provider/statewire-lifecycle-context.cjs.map +1 -0
  748. package/dist/provider/statewire-lifecycle-context.js +10 -0
  749. package/dist/provider/statewire-lifecycle-context.js.map +1 -0
  750. package/dist/provider/statewire-window-context.cjs +10 -0
  751. package/dist/provider/statewire-window-context.cjs.map +1 -0
  752. package/dist/provider/statewire-window-context.js +10 -0
  753. package/dist/provider/statewire-window-context.js.map +1 -0
  754. package/dist/runtime/auth.cjs +309 -0
  755. package/dist/runtime/auth.cjs.map +1 -0
  756. package/dist/runtime/auth.d.ts +19 -18
  757. package/dist/runtime/auth.js +309 -0
  758. package/dist/runtime/auth.js.map +1 -0
  759. package/dist/runtime/statewire-auth-headers.cjs +18 -0
  760. package/dist/runtime/statewire-auth-headers.cjs.map +1 -0
  761. package/dist/runtime/statewire-auth-headers.js +18 -0
  762. package/dist/runtime/statewire-auth-headers.js.map +1 -0
  763. package/dist/runtime/statewire-lifecycle.cjs +68 -0
  764. package/dist/runtime/statewire-lifecycle.cjs.map +1 -0
  765. package/dist/runtime/statewire-lifecycle.js +68 -0
  766. package/dist/runtime/statewire-lifecycle.js.map +1 -0
  767. package/dist/runtime/statewire-run-config.cjs +68 -0
  768. package/dist/runtime/statewire-run-config.cjs.map +1 -0
  769. package/dist/runtime/statewire-run-config.js +68 -0
  770. package/dist/runtime/statewire-run-config.js.map +1 -0
  771. package/dist/runtime/statewire-session-key.cjs +11 -0
  772. package/dist/runtime/statewire-session-key.cjs.map +1 -0
  773. package/dist/runtime/statewire-session-key.js +11 -0
  774. package/dist/runtime/statewire-session-key.js.map +1 -0
  775. package/dist/runtime/useAthenaStatewireRuntime.cjs +180 -0
  776. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -0
  777. package/dist/runtime/useAthenaStatewireRuntime.js +181 -0
  778. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -0
  779. package/dist/styles.css +1 -1
  780. package/dist/theme/index.cjs +182 -0
  781. package/dist/theme/index.cjs.map +1 -0
  782. package/dist/theme/index.js +182 -0
  783. package/dist/theme/index.js.map +1 -0
  784. package/dist/threads/ThreadList.cjs +55 -0
  785. package/dist/threads/ThreadList.cjs.map +1 -0
  786. package/dist/threads/ThreadList.js +55 -0
  787. package/dist/threads/ThreadList.js.map +1 -0
  788. package/dist/threads/api.cjs +208 -0
  789. package/dist/threads/api.cjs.map +1 -0
  790. package/dist/threads/api.js +208 -0
  791. package/dist/threads/api.js.map +1 -0
  792. package/dist/threads/conversation-list-fetcher.cjs +74 -0
  793. package/dist/threads/conversation-list-fetcher.cjs.map +1 -0
  794. package/dist/threads/conversation-list-fetcher.js +74 -0
  795. package/dist/threads/conversation-list-fetcher.js.map +1 -0
  796. package/dist/threads/mint-thread-id.cjs +7 -0
  797. package/dist/threads/mint-thread-id.cjs.map +1 -0
  798. package/dist/threads/mint-thread-id.js +7 -0
  799. package/dist/threads/mint-thread-id.js.map +1 -0
  800. package/dist/threads/statewire-thread-list.cjs +232 -0
  801. package/dist/threads/statewire-thread-list.cjs.map +1 -0
  802. package/dist/threads/statewire-thread-list.js +232 -0
  803. package/dist/threads/statewire-thread-list.js.map +1 -0
  804. package/dist/threads/thread-id-context.cjs +22 -0
  805. package/dist/threads/thread-id-context.cjs.map +1 -0
  806. package/dist/threads/thread-id-context.d.ts +9 -0
  807. package/dist/threads/thread-id-context.js +22 -0
  808. package/dist/threads/thread-id-context.js.map +1 -0
  809. package/dist/threads/title.cjs +95 -0
  810. package/dist/threads/title.cjs.map +1 -0
  811. package/dist/threads/title.js +95 -0
  812. package/dist/threads/title.js.map +1 -0
  813. package/dist/threads/use-rest-conversation-history.cjs +80 -0
  814. package/dist/threads/use-rest-conversation-history.cjs.map +1 -0
  815. package/dist/threads/use-rest-conversation-history.js +80 -0
  816. package/dist/threads/use-rest-conversation-history.js.map +1 -0
  817. package/dist/threads/use-statewire-conversation-history.cjs +244 -0
  818. package/dist/threads/use-statewire-conversation-history.cjs.map +1 -0
  819. package/dist/threads/use-statewire-conversation-history.d.ts +1 -0
  820. package/dist/threads/use-statewire-conversation-history.js +244 -0
  821. package/dist/threads/use-statewire-conversation-history.js.map +1 -0
  822. package/dist/threads/useAthenaThreadManager.cjs +24 -0
  823. package/dist/threads/useAthenaThreadManager.cjs.map +1 -0
  824. package/dist/threads/useAthenaThreadManager.js +24 -0
  825. package/dist/threads/useAthenaThreadManager.js.map +1 -0
  826. package/dist/toolkits/index.cjs +279 -0
  827. package/dist/toolkits/index.cjs.map +1 -0
  828. package/dist/toolkits/index.js +279 -0
  829. package/dist/toolkits/index.js.map +1 -0
  830. package/dist/tools/NestedPtcMessages.cjs +46 -0
  831. package/dist/tools/NestedPtcMessages.cjs.map +1 -0
  832. package/dist/tools/NestedPtcMessages.js +46 -0
  833. package/dist/tools/NestedPtcMessages.js.map +1 -0
  834. package/dist/tools/append-document-tool-ui.cjs +145 -0
  835. package/dist/tools/append-document-tool-ui.cjs.map +1 -0
  836. package/dist/tools/append-document-tool-ui.js +145 -0
  837. package/dist/tools/append-document-tool-ui.js.map +1 -0
  838. package/dist/tools/asset-utils.cjs +16 -0
  839. package/dist/tools/asset-utils.cjs.map +1 -0
  840. package/dist/tools/asset-utils.js +16 -0
  841. package/dist/tools/asset-utils.js.map +1 -0
  842. package/dist/tools/auto-open-tools.cjs +121 -0
  843. package/dist/tools/auto-open-tools.cjs.map +1 -0
  844. package/dist/tools/auto-open-tools.js +121 -0
  845. package/dist/tools/auto-open-tools.js.map +1 -0
  846. package/dist/tools/file-tool-uis.cjs +108 -0
  847. package/dist/tools/file-tool-uis.cjs.map +1 -0
  848. package/dist/tools/file-tool-uis.js +108 -0
  849. package/dist/tools/file-tool-uis.js.map +1 -0
  850. package/dist/tools/index.cjs +57 -0
  851. package/dist/tools/index.cjs.map +1 -0
  852. package/dist/tools/index.d.ts +1 -0
  853. package/dist/tools/index.js +57 -0
  854. package/dist/tools/index.js.map +1 -0
  855. package/dist/tools/misc-tool-uis.cjs +55 -0
  856. package/dist/tools/misc-tool-uis.cjs.map +1 -0
  857. package/dist/{misc-tool-uis-gAiQw0Yl.js → tools/misc-tool-uis.js} +18 -7
  858. package/dist/tools/misc-tool-uis.js.map +1 -0
  859. package/dist/tools/primitives.cjs +167 -0
  860. package/dist/tools/primitives.cjs.map +1 -0
  861. package/dist/tools/primitives.js +167 -0
  862. package/dist/tools/primitives.js.map +1 -0
  863. package/dist/tools/read-asset-tool-ui.cjs +284 -0
  864. package/dist/tools/read-asset-tool-ui.cjs.map +1 -0
  865. package/dist/tools/read-asset-tool-ui.js +284 -0
  866. package/dist/tools/read-asset-tool-ui.js.map +1 -0
  867. package/dist/tools/todo-plan-store.cjs +88 -0
  868. package/dist/tools/todo-plan-store.cjs.map +1 -0
  869. package/dist/tools/todo-plan-store.js +88 -0
  870. package/dist/tools/todo-plan-store.js.map +1 -0
  871. package/dist/tools/tool-fallback.cjs +668 -0
  872. package/dist/tools/tool-fallback.cjs.map +1 -0
  873. package/dist/tools/tool-fallback.js +668 -0
  874. package/dist/tools/tool-fallback.js.map +1 -0
  875. package/dist/tools/tool-icons.cjs +61 -0
  876. package/dist/tools/tool-icons.cjs.map +1 -0
  877. package/dist/tools/tool-icons.js +61 -0
  878. package/dist/tools/tool-icons.js.map +1 -0
  879. package/dist/tools/tool-uis.cjs +3049 -0
  880. package/dist/tools/tool-uis.cjs.map +1 -0
  881. package/dist/tools/tool-uis.js +3049 -0
  882. package/dist/tools/tool-uis.js.map +1 -0
  883. package/dist/tools/voice-update-tool-ui.cjs +90 -0
  884. package/dist/tools/voice-update-tool-ui.cjs.map +1 -0
  885. package/dist/tools/voice-update-tool-ui.d.ts +27 -0
  886. package/dist/tools/voice-update-tool-ui.js +90 -0
  887. package/dist/tools/voice-update-tool-ui.js.map +1 -0
  888. package/dist/tools/write-todos-tool-ui.cjs +270 -0
  889. package/dist/tools/write-todos-tool-ui.cjs.map +1 -0
  890. package/dist/tools/write-todos-tool-ui.js +270 -0
  891. package/dist/tools/write-todos-tool-ui.js.map +1 -0
  892. package/dist/ui/button.cjs +57 -0
  893. package/dist/ui/button.cjs.map +1 -0
  894. package/dist/ui/button.js +57 -0
  895. package/dist/ui/button.js.map +1 -0
  896. package/dist/ui/collapsible.cjs +17 -0
  897. package/dist/ui/collapsible.cjs.map +1 -0
  898. package/dist/ui/collapsible.js +17 -0
  899. package/dist/ui/collapsible.js.map +1 -0
  900. package/dist/ui/tooltip.cjs +48 -0
  901. package/dist/ui/tooltip.cjs.map +1 -0
  902. package/dist/ui/tooltip.js +48 -0
  903. package/dist/ui/tooltip.js.map +1 -0
  904. package/dist/version.cjs +6 -0
  905. package/dist/version.cjs.map +1 -0
  906. package/dist/version.js +6 -0
  907. package/dist/version.js.map +1 -0
  908. package/dist/voice/index.cjs +6 -0
  909. package/dist/voice/index.cjs.map +1 -0
  910. package/dist/voice/index.d.ts +2 -0
  911. package/dist/voice/index.js +6 -0
  912. package/dist/voice/index.js.map +1 -0
  913. package/dist/voice/use-athena-voice-session.cjs +315 -0
  914. package/dist/voice/use-athena-voice-session.cjs.map +1 -0
  915. package/dist/voice/use-athena-voice-session.d.ts +145 -0
  916. package/dist/voice/use-athena-voice-session.js +315 -0
  917. package/dist/voice/use-athena-voice-session.js.map +1 -0
  918. package/package.json +32 -20
  919. package/dist/AthenaAuthContext-B3AwLA5Z.cjs.map +0 -1
  920. package/dist/AthenaAuthContext-DQsdayH2.js.map +0 -1
  921. package/dist/AthenaContext-B1QMhIP-.cjs.map +0 -1
  922. package/dist/AthenaContext-MOslgOmE.js.map +0 -1
  923. package/dist/SuperGroupingCard-BsWbHyV_.js +0 -795
  924. package/dist/SuperGroupingCard-BsWbHyV_.js.map +0 -1
  925. package/dist/SuperGroupingCard-CRRFUgjN.cjs +0 -794
  926. package/dist/SuperGroupingCard-CRRFUgjN.cjs.map +0 -1
  927. package/dist/auth.cjs.map +0 -1
  928. package/dist/auth.js.map +0 -1
  929. package/dist/chat/ComposerEditorContext.d.ts +0 -36
  930. package/dist/chat/tiptap-composer.d.ts +0 -7
  931. package/dist/chat-ui-statewire.cjs +0 -25
  932. package/dist/chat-ui-statewire.cjs.map +0 -1
  933. package/dist/chat-ui-statewire.js +0 -25
  934. package/dist/chat-ui-statewire.js.map +0 -1
  935. package/dist/chat-ui.cjs +0 -2484
  936. package/dist/chat-ui.cjs.map +0 -1
  937. package/dist/chat-ui.js +0 -2486
  938. package/dist/chat-ui.js.map +0 -1
  939. package/dist/collab.cjs.map +0 -1
  940. package/dist/collab.js.map +0 -1
  941. package/dist/mentions/composer-keybinds.d.ts +0 -5
  942. package/dist/mentions/mention-extension.d.ts +0 -6
  943. package/dist/mentions/mention-icons.d.ts +0 -4
  944. package/dist/mentions/mention-node-view.d.ts +0 -2
  945. package/dist/mentions/mention-suggestion-list.d.ts +0 -14
  946. package/dist/mentions/mention-suggestion-popup.d.ts +0 -15
  947. package/dist/mentions/mention-suggestions-extension.d.ts +0 -11
  948. package/dist/mentions/mention-types.d.ts +0 -21
  949. package/dist/mentions/mention-utils.d.ts +0 -23
  950. package/dist/mentions/use-mention-suggestions.d.ts +0 -29
  951. package/dist/misc-tool-uis-B2e0Okkn.cjs +0 -43
  952. package/dist/misc-tool-uis-B2e0Okkn.cjs.map +0 -1
  953. package/dist/misc-tool-uis-gAiQw0Yl.js.map +0 -1
  954. package/dist/statewire-continue-run-D34gS7_1.js.map +0 -1
  955. package/dist/statewire-continue-run-nE9VCKUh.cjs.map +0 -1
  956. package/dist/statewire-history-edge-C8uyTEjX.cjs +0 -1711
  957. package/dist/statewire-history-edge-C8uyTEjX.cjs.map +0 -1
  958. package/dist/statewire-history-edge-CPohUKMt.js +0 -1712
  959. package/dist/statewire-history-edge-CPohUKMt.js.map +0 -1
  960. package/dist/super-grouping.cjs +0 -22
  961. package/dist/super-grouping.cjs.map +0 -1
  962. package/dist/super-grouping.js +0 -22
  963. package/dist/super-grouping.js.map +0 -1
  964. package/dist/tool-fallback-DkQ3DLkn.js +0 -4281
  965. package/dist/tool-fallback-DkQ3DLkn.js.map +0 -1
  966. package/dist/tool-fallback-kfhpJQZa.cjs +0 -4297
  967. package/dist/tool-fallback-kfhpJQZa.cjs.map +0 -1
  968. package/dist/tools.cjs +0 -41
  969. package/dist/tools.cjs.map +0 -1
  970. package/dist/tools.js +0 -41
  971. package/dist/tools.js.map +0 -1
  972. package/dist/trash-2-B5OaNAL7.cjs +0 -5096
  973. package/dist/trash-2-B5OaNAL7.cjs.map +0 -1
  974. package/dist/trash-2-CCwSURL-.js +0 -5081
  975. package/dist/trash-2-CCwSURL-.js.map +0 -1
  976. package/dist/use-rest-conversation-history-Cm8qMRxp.cjs +0 -32397
  977. package/dist/use-rest-conversation-history-Cm8qMRxp.cjs.map +0 -1
  978. package/dist/use-rest-conversation-history-veDZS-oL.js +0 -32361
  979. package/dist/use-rest-conversation-history-veDZS-oL.js.map +0 -1
  980. package/dist/wrench-BEf72cyP.cjs +0 -417
  981. package/dist/wrench-BEf72cyP.cjs.map +0 -1
  982. package/dist/wrench-CbrOlVYm.js +0 -418
  983. package/dist/wrench-CbrOlVYm.js.map +0 -1
  984. package/dist/x-Dfd2NzK0.cjs +0 -42
  985. package/dist/x-Dfd2NzK0.cjs.map +0 -1
  986. package/dist/x-_DntAa_a.js +0 -43
  987. package/dist/x-_DntAa_a.js.map +0 -1
@@ -0,0 +1,1412 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const checks = require("./checks.cjs");
4
+ const core = require("./core.cjs");
5
+ const doc = require("./doc.cjs");
6
+ const parse = require("./parse.cjs");
7
+ const regexes = require("./regexes.cjs");
8
+ const util = require("./util.cjs");
9
+ const versions = require("./versions.cjs");
10
+ const $ZodType = /* @__PURE__ */ core.$constructor("$ZodType", (inst, def) => {
11
+ var _a2;
12
+ var _a;
13
+ inst ?? (inst = {});
14
+ inst._zod.def = def;
15
+ inst._zod.bag = inst._zod.bag || {};
16
+ inst._zod.version = versions.version;
17
+ const checks2 = [...inst._zod.def.checks ?? []];
18
+ if (inst._zod.traits.has("$ZodCheck")) {
19
+ checks2.unshift(inst);
20
+ }
21
+ for (const ch of checks2) {
22
+ for (const fn of ch._zod.onattach) {
23
+ fn(inst);
24
+ }
25
+ }
26
+ if (checks2.length === 0) {
27
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
28
+ (_a2 = inst._zod.deferred) == null ? void 0 : _a2.push(() => {
29
+ inst._zod.run = inst._zod.parse;
30
+ });
31
+ } else {
32
+ const runChecks = (payload, checks3, ctx) => {
33
+ let isAborted = util.aborted(payload);
34
+ let asyncResult;
35
+ for (const ch of checks3) {
36
+ if (ch._zod.def.when) {
37
+ if (util.explicitlyAborted(payload))
38
+ continue;
39
+ const shouldRun = ch._zod.def.when(payload);
40
+ if (!shouldRun)
41
+ continue;
42
+ } else if (isAborted) {
43
+ continue;
44
+ }
45
+ const currLen = payload.issues.length;
46
+ const _ = ch._zod.check(payload);
47
+ if (_ instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
48
+ throw new core.$ZodAsyncError();
49
+ }
50
+ if (asyncResult || _ instanceof Promise) {
51
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
52
+ await _;
53
+ const nextLen = payload.issues.length;
54
+ if (nextLen === currLen)
55
+ return;
56
+ if (!isAborted)
57
+ isAborted = util.aborted(payload, currLen);
58
+ });
59
+ } else {
60
+ const nextLen = payload.issues.length;
61
+ if (nextLen === currLen)
62
+ continue;
63
+ if (!isAborted)
64
+ isAborted = util.aborted(payload, currLen);
65
+ }
66
+ }
67
+ if (asyncResult) {
68
+ return asyncResult.then(() => {
69
+ return payload;
70
+ });
71
+ }
72
+ return payload;
73
+ };
74
+ const handleCanaryResult = (canary, payload, ctx) => {
75
+ if (util.aborted(canary)) {
76
+ canary.aborted = true;
77
+ return canary;
78
+ }
79
+ const checkResult = runChecks(payload, checks2, ctx);
80
+ if (checkResult instanceof Promise) {
81
+ if (ctx.async === false)
82
+ throw new core.$ZodAsyncError();
83
+ return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
84
+ }
85
+ return inst._zod.parse(checkResult, ctx);
86
+ };
87
+ inst._zod.run = (payload, ctx) => {
88
+ if (ctx.skipChecks) {
89
+ return inst._zod.parse(payload, ctx);
90
+ }
91
+ if (ctx.direction === "backward") {
92
+ const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
93
+ if (canary instanceof Promise) {
94
+ return canary.then((canary2) => {
95
+ return handleCanaryResult(canary2, payload, ctx);
96
+ });
97
+ }
98
+ return handleCanaryResult(canary, payload, ctx);
99
+ }
100
+ const result = inst._zod.parse(payload, ctx);
101
+ if (result instanceof Promise) {
102
+ if (ctx.async === false)
103
+ throw new core.$ZodAsyncError();
104
+ return result.then((result2) => runChecks(result2, checks2, ctx));
105
+ }
106
+ return runChecks(result, checks2, ctx);
107
+ };
108
+ }
109
+ util.defineLazy(inst, "~standard", () => ({
110
+ validate: (value) => {
111
+ var _a3;
112
+ try {
113
+ const r = parse.safeParse(inst, value);
114
+ return r.success ? { value: r.data } : { issues: (_a3 = r.error) == null ? void 0 : _a3.issues };
115
+ } catch (_) {
116
+ return parse.safeParseAsync(inst, value).then((r) => {
117
+ var _a4;
118
+ return r.success ? { value: r.data } : { issues: (_a4 = r.error) == null ? void 0 : _a4.issues };
119
+ });
120
+ }
121
+ },
122
+ vendor: "zod",
123
+ version: 1
124
+ }));
125
+ });
126
+ const $ZodString = /* @__PURE__ */ core.$constructor("$ZodString", (inst, def) => {
127
+ var _a;
128
+ $ZodType.init(inst, def);
129
+ inst._zod.pattern = [...((_a = inst == null ? void 0 : inst._zod.bag) == null ? void 0 : _a.patterns) ?? []].pop() ?? regexes.string(inst._zod.bag);
130
+ inst._zod.parse = (payload, _) => {
131
+ if (def.coerce)
132
+ try {
133
+ payload.value = String(payload.value);
134
+ } catch (_2) {
135
+ }
136
+ if (typeof payload.value === "string")
137
+ return payload;
138
+ payload.issues.push({
139
+ expected: "string",
140
+ code: "invalid_type",
141
+ input: payload.value,
142
+ inst
143
+ });
144
+ return payload;
145
+ };
146
+ });
147
+ const $ZodStringFormat = /* @__PURE__ */ core.$constructor("$ZodStringFormat", (inst, def) => {
148
+ checks.$ZodCheckStringFormat.init(inst, def);
149
+ $ZodString.init(inst, def);
150
+ });
151
+ const $ZodGUID = /* @__PURE__ */ core.$constructor("$ZodGUID", (inst, def) => {
152
+ def.pattern ?? (def.pattern = regexes.guid);
153
+ $ZodStringFormat.init(inst, def);
154
+ });
155
+ const $ZodUUID = /* @__PURE__ */ core.$constructor("$ZodUUID", (inst, def) => {
156
+ if (def.version) {
157
+ const versionMap = {
158
+ v1: 1,
159
+ v2: 2,
160
+ v3: 3,
161
+ v4: 4,
162
+ v5: 5,
163
+ v6: 6,
164
+ v7: 7,
165
+ v8: 8
166
+ };
167
+ const v = versionMap[def.version];
168
+ if (v === void 0)
169
+ throw new Error(`Invalid UUID version: "${def.version}"`);
170
+ def.pattern ?? (def.pattern = regexes.uuid(v));
171
+ } else
172
+ def.pattern ?? (def.pattern = regexes.uuid());
173
+ $ZodStringFormat.init(inst, def);
174
+ });
175
+ const $ZodEmail = /* @__PURE__ */ core.$constructor("$ZodEmail", (inst, def) => {
176
+ def.pattern ?? (def.pattern = regexes.email);
177
+ $ZodStringFormat.init(inst, def);
178
+ });
179
+ const $ZodURL = /* @__PURE__ */ core.$constructor("$ZodURL", (inst, def) => {
180
+ $ZodStringFormat.init(inst, def);
181
+ inst._zod.check = (payload) => {
182
+ var _a;
183
+ try {
184
+ const trimmed = payload.value.trim();
185
+ if (!def.normalize && ((_a = def.protocol) == null ? void 0 : _a.source) === regexes.httpProtocol.source) {
186
+ if (!/^https?:\/\//i.test(trimmed)) {
187
+ payload.issues.push({
188
+ code: "invalid_format",
189
+ format: "url",
190
+ note: "Invalid URL format",
191
+ input: payload.value,
192
+ inst,
193
+ continue: !def.abort
194
+ });
195
+ return;
196
+ }
197
+ }
198
+ const url = new URL(trimmed);
199
+ if (def.hostname) {
200
+ def.hostname.lastIndex = 0;
201
+ if (!def.hostname.test(url.hostname)) {
202
+ payload.issues.push({
203
+ code: "invalid_format",
204
+ format: "url",
205
+ note: "Invalid hostname",
206
+ pattern: def.hostname.source,
207
+ input: payload.value,
208
+ inst,
209
+ continue: !def.abort
210
+ });
211
+ }
212
+ }
213
+ if (def.protocol) {
214
+ def.protocol.lastIndex = 0;
215
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
216
+ payload.issues.push({
217
+ code: "invalid_format",
218
+ format: "url",
219
+ note: "Invalid protocol",
220
+ pattern: def.protocol.source,
221
+ input: payload.value,
222
+ inst,
223
+ continue: !def.abort
224
+ });
225
+ }
226
+ }
227
+ if (def.normalize) {
228
+ payload.value = url.href;
229
+ } else {
230
+ payload.value = trimmed;
231
+ }
232
+ return;
233
+ } catch (_) {
234
+ payload.issues.push({
235
+ code: "invalid_format",
236
+ format: "url",
237
+ input: payload.value,
238
+ inst,
239
+ continue: !def.abort
240
+ });
241
+ }
242
+ };
243
+ });
244
+ const $ZodEmoji = /* @__PURE__ */ core.$constructor("$ZodEmoji", (inst, def) => {
245
+ def.pattern ?? (def.pattern = regexes.emoji());
246
+ $ZodStringFormat.init(inst, def);
247
+ });
248
+ const $ZodNanoID = /* @__PURE__ */ core.$constructor("$ZodNanoID", (inst, def) => {
249
+ def.pattern ?? (def.pattern = regexes.nanoid);
250
+ $ZodStringFormat.init(inst, def);
251
+ });
252
+ const $ZodCUID = /* @__PURE__ */ core.$constructor("$ZodCUID", (inst, def) => {
253
+ def.pattern ?? (def.pattern = regexes.cuid);
254
+ $ZodStringFormat.init(inst, def);
255
+ });
256
+ const $ZodCUID2 = /* @__PURE__ */ core.$constructor("$ZodCUID2", (inst, def) => {
257
+ def.pattern ?? (def.pattern = regexes.cuid2);
258
+ $ZodStringFormat.init(inst, def);
259
+ });
260
+ const $ZodULID = /* @__PURE__ */ core.$constructor("$ZodULID", (inst, def) => {
261
+ def.pattern ?? (def.pattern = regexes.ulid);
262
+ $ZodStringFormat.init(inst, def);
263
+ });
264
+ const $ZodXID = /* @__PURE__ */ core.$constructor("$ZodXID", (inst, def) => {
265
+ def.pattern ?? (def.pattern = regexes.xid);
266
+ $ZodStringFormat.init(inst, def);
267
+ });
268
+ const $ZodKSUID = /* @__PURE__ */ core.$constructor("$ZodKSUID", (inst, def) => {
269
+ def.pattern ?? (def.pattern = regexes.ksuid);
270
+ $ZodStringFormat.init(inst, def);
271
+ });
272
+ const $ZodISODateTime = /* @__PURE__ */ core.$constructor("$ZodISODateTime", (inst, def) => {
273
+ def.pattern ?? (def.pattern = regexes.datetime(def));
274
+ $ZodStringFormat.init(inst, def);
275
+ });
276
+ const $ZodISODate = /* @__PURE__ */ core.$constructor("$ZodISODate", (inst, def) => {
277
+ def.pattern ?? (def.pattern = regexes.date);
278
+ $ZodStringFormat.init(inst, def);
279
+ });
280
+ const $ZodISOTime = /* @__PURE__ */ core.$constructor("$ZodISOTime", (inst, def) => {
281
+ def.pattern ?? (def.pattern = regexes.time(def));
282
+ $ZodStringFormat.init(inst, def);
283
+ });
284
+ const $ZodISODuration = /* @__PURE__ */ core.$constructor("$ZodISODuration", (inst, def) => {
285
+ def.pattern ?? (def.pattern = regexes.duration);
286
+ $ZodStringFormat.init(inst, def);
287
+ });
288
+ const $ZodIPv4 = /* @__PURE__ */ core.$constructor("$ZodIPv4", (inst, def) => {
289
+ def.pattern ?? (def.pattern = regexes.ipv4);
290
+ $ZodStringFormat.init(inst, def);
291
+ inst._zod.bag.format = `ipv4`;
292
+ });
293
+ const $ZodIPv6 = /* @__PURE__ */ core.$constructor("$ZodIPv6", (inst, def) => {
294
+ def.pattern ?? (def.pattern = regexes.ipv6);
295
+ $ZodStringFormat.init(inst, def);
296
+ inst._zod.bag.format = `ipv6`;
297
+ inst._zod.check = (payload) => {
298
+ try {
299
+ new URL(`http://[${payload.value}]`);
300
+ } catch {
301
+ payload.issues.push({
302
+ code: "invalid_format",
303
+ format: "ipv6",
304
+ input: payload.value,
305
+ inst,
306
+ continue: !def.abort
307
+ });
308
+ }
309
+ };
310
+ });
311
+ const $ZodCIDRv4 = /* @__PURE__ */ core.$constructor("$ZodCIDRv4", (inst, def) => {
312
+ def.pattern ?? (def.pattern = regexes.cidrv4);
313
+ $ZodStringFormat.init(inst, def);
314
+ });
315
+ const $ZodCIDRv6 = /* @__PURE__ */ core.$constructor("$ZodCIDRv6", (inst, def) => {
316
+ def.pattern ?? (def.pattern = regexes.cidrv6);
317
+ $ZodStringFormat.init(inst, def);
318
+ inst._zod.check = (payload) => {
319
+ const parts = payload.value.split("/");
320
+ try {
321
+ if (parts.length !== 2)
322
+ throw new Error();
323
+ const [address, prefix] = parts;
324
+ if (!prefix)
325
+ throw new Error();
326
+ const prefixNum = Number(prefix);
327
+ if (`${prefixNum}` !== prefix)
328
+ throw new Error();
329
+ if (prefixNum < 0 || prefixNum > 128)
330
+ throw new Error();
331
+ new URL(`http://[${address}]`);
332
+ } catch {
333
+ payload.issues.push({
334
+ code: "invalid_format",
335
+ format: "cidrv6",
336
+ input: payload.value,
337
+ inst,
338
+ continue: !def.abort
339
+ });
340
+ }
341
+ };
342
+ });
343
+ function isValidBase64(data) {
344
+ if (data === "")
345
+ return true;
346
+ if (/\s/.test(data))
347
+ return false;
348
+ if (data.length % 4 !== 0)
349
+ return false;
350
+ try {
351
+ atob(data);
352
+ return true;
353
+ } catch {
354
+ return false;
355
+ }
356
+ }
357
+ const $ZodBase64 = /* @__PURE__ */ core.$constructor("$ZodBase64", (inst, def) => {
358
+ def.pattern ?? (def.pattern = regexes.base64);
359
+ $ZodStringFormat.init(inst, def);
360
+ inst._zod.bag.contentEncoding = "base64";
361
+ inst._zod.check = (payload) => {
362
+ if (isValidBase64(payload.value))
363
+ return;
364
+ payload.issues.push({
365
+ code: "invalid_format",
366
+ format: "base64",
367
+ input: payload.value,
368
+ inst,
369
+ continue: !def.abort
370
+ });
371
+ };
372
+ });
373
+ function isValidBase64URL(data) {
374
+ if (!regexes.base64url.test(data))
375
+ return false;
376
+ const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
377
+ const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
378
+ return isValidBase64(padded);
379
+ }
380
+ const $ZodBase64URL = /* @__PURE__ */ core.$constructor("$ZodBase64URL", (inst, def) => {
381
+ def.pattern ?? (def.pattern = regexes.base64url);
382
+ $ZodStringFormat.init(inst, def);
383
+ inst._zod.bag.contentEncoding = "base64url";
384
+ inst._zod.check = (payload) => {
385
+ if (isValidBase64URL(payload.value))
386
+ return;
387
+ payload.issues.push({
388
+ code: "invalid_format",
389
+ format: "base64url",
390
+ input: payload.value,
391
+ inst,
392
+ continue: !def.abort
393
+ });
394
+ };
395
+ });
396
+ const $ZodE164 = /* @__PURE__ */ core.$constructor("$ZodE164", (inst, def) => {
397
+ def.pattern ?? (def.pattern = regexes.e164);
398
+ $ZodStringFormat.init(inst, def);
399
+ });
400
+ function isValidJWT(token, algorithm = null) {
401
+ try {
402
+ const tokensParts = token.split(".");
403
+ if (tokensParts.length !== 3)
404
+ return false;
405
+ const [header] = tokensParts;
406
+ if (!header)
407
+ return false;
408
+ const parsedHeader = JSON.parse(atob(header));
409
+ if ("typ" in parsedHeader && (parsedHeader == null ? void 0 : parsedHeader.typ) !== "JWT")
410
+ return false;
411
+ if (!parsedHeader.alg)
412
+ return false;
413
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
414
+ return false;
415
+ return true;
416
+ } catch {
417
+ return false;
418
+ }
419
+ }
420
+ const $ZodJWT = /* @__PURE__ */ core.$constructor("$ZodJWT", (inst, def) => {
421
+ $ZodStringFormat.init(inst, def);
422
+ inst._zod.check = (payload) => {
423
+ if (isValidJWT(payload.value, def.alg))
424
+ return;
425
+ payload.issues.push({
426
+ code: "invalid_format",
427
+ format: "jwt",
428
+ input: payload.value,
429
+ inst,
430
+ continue: !def.abort
431
+ });
432
+ };
433
+ });
434
+ const $ZodNumber = /* @__PURE__ */ core.$constructor("$ZodNumber", (inst, def) => {
435
+ $ZodType.init(inst, def);
436
+ inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
437
+ inst._zod.parse = (payload, _ctx) => {
438
+ if (def.coerce)
439
+ try {
440
+ payload.value = Number(payload.value);
441
+ } catch (_) {
442
+ }
443
+ const input = payload.value;
444
+ if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
445
+ return payload;
446
+ }
447
+ const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
448
+ payload.issues.push({
449
+ expected: "number",
450
+ code: "invalid_type",
451
+ input,
452
+ inst,
453
+ ...received ? { received } : {}
454
+ });
455
+ return payload;
456
+ };
457
+ });
458
+ const $ZodNumberFormat = /* @__PURE__ */ core.$constructor("$ZodNumberFormat", (inst, def) => {
459
+ checks.$ZodCheckNumberFormat.init(inst, def);
460
+ $ZodNumber.init(inst, def);
461
+ });
462
+ const $ZodBoolean = /* @__PURE__ */ core.$constructor("$ZodBoolean", (inst, def) => {
463
+ $ZodType.init(inst, def);
464
+ inst._zod.pattern = regexes.boolean;
465
+ inst._zod.parse = (payload, _ctx) => {
466
+ if (def.coerce)
467
+ try {
468
+ payload.value = Boolean(payload.value);
469
+ } catch (_) {
470
+ }
471
+ const input = payload.value;
472
+ if (typeof input === "boolean")
473
+ return payload;
474
+ payload.issues.push({
475
+ expected: "boolean",
476
+ code: "invalid_type",
477
+ input,
478
+ inst
479
+ });
480
+ return payload;
481
+ };
482
+ });
483
+ const $ZodUnknown = /* @__PURE__ */ core.$constructor("$ZodUnknown", (inst, def) => {
484
+ $ZodType.init(inst, def);
485
+ inst._zod.parse = (payload) => payload;
486
+ });
487
+ const $ZodNever = /* @__PURE__ */ core.$constructor("$ZodNever", (inst, def) => {
488
+ $ZodType.init(inst, def);
489
+ inst._zod.parse = (payload, _ctx) => {
490
+ payload.issues.push({
491
+ expected: "never",
492
+ code: "invalid_type",
493
+ input: payload.value,
494
+ inst
495
+ });
496
+ return payload;
497
+ };
498
+ });
499
+ function handleArrayResult(result, final, index) {
500
+ if (result.issues.length) {
501
+ final.issues.push(...util.prefixIssues(index, result.issues));
502
+ }
503
+ final.value[index] = result.value;
504
+ }
505
+ const $ZodArray = /* @__PURE__ */ core.$constructor("$ZodArray", (inst, def) => {
506
+ $ZodType.init(inst, def);
507
+ inst._zod.parse = (payload, ctx) => {
508
+ const input = payload.value;
509
+ if (!Array.isArray(input)) {
510
+ payload.issues.push({
511
+ expected: "array",
512
+ code: "invalid_type",
513
+ input,
514
+ inst
515
+ });
516
+ return payload;
517
+ }
518
+ payload.value = Array(input.length);
519
+ const proms = [];
520
+ for (let i = 0; i < input.length; i++) {
521
+ const item = input[i];
522
+ const result = def.element._zod.run({
523
+ value: item,
524
+ issues: []
525
+ }, ctx);
526
+ if (result instanceof Promise) {
527
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
528
+ } else {
529
+ handleArrayResult(result, payload, i);
530
+ }
531
+ }
532
+ if (proms.length) {
533
+ return Promise.all(proms).then(() => payload);
534
+ }
535
+ return payload;
536
+ };
537
+ });
538
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
539
+ const isPresent = key in input;
540
+ if (result.issues.length) {
541
+ if (isOptionalIn && isOptionalOut && !isPresent) {
542
+ return;
543
+ }
544
+ final.issues.push(...util.prefixIssues(key, result.issues));
545
+ }
546
+ if (!isPresent && !isOptionalIn) {
547
+ if (!result.issues.length) {
548
+ final.issues.push({
549
+ code: "invalid_type",
550
+ expected: "nonoptional",
551
+ input: void 0,
552
+ path: [key]
553
+ });
554
+ }
555
+ return;
556
+ }
557
+ if (result.value === void 0) {
558
+ if (isPresent) {
559
+ final.value[key] = void 0;
560
+ }
561
+ } else {
562
+ final.value[key] = result.value;
563
+ }
564
+ }
565
+ function normalizeDef(def) {
566
+ var _a, _b, _c, _d;
567
+ const keys = Object.keys(def.shape);
568
+ for (const k of keys) {
569
+ if (!((_d = (_c = (_b = (_a = def.shape) == null ? void 0 : _a[k]) == null ? void 0 : _b._zod) == null ? void 0 : _c.traits) == null ? void 0 : _d.has("$ZodType"))) {
570
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
571
+ }
572
+ }
573
+ const okeys = util.optionalKeys(def.shape);
574
+ return {
575
+ ...def,
576
+ keys,
577
+ keySet: new Set(keys),
578
+ numKeys: keys.length,
579
+ optionalKeys: new Set(okeys)
580
+ };
581
+ }
582
+ function handleCatchall(proms, input, payload, ctx, def, inst) {
583
+ const unrecognized = [];
584
+ const keySet = def.keySet;
585
+ const _catchall = def.catchall._zod;
586
+ const t = _catchall.def.type;
587
+ const isOptionalIn = _catchall.optin === "optional";
588
+ const isOptionalOut = _catchall.optout === "optional";
589
+ for (const key in input) {
590
+ if (key === "__proto__")
591
+ continue;
592
+ if (keySet.has(key))
593
+ continue;
594
+ if (t === "never") {
595
+ unrecognized.push(key);
596
+ continue;
597
+ }
598
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
599
+ if (r instanceof Promise) {
600
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
601
+ } else {
602
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
603
+ }
604
+ }
605
+ if (unrecognized.length) {
606
+ payload.issues.push({
607
+ code: "unrecognized_keys",
608
+ keys: unrecognized,
609
+ input,
610
+ inst
611
+ });
612
+ }
613
+ if (!proms.length)
614
+ return payload;
615
+ return Promise.all(proms).then(() => {
616
+ return payload;
617
+ });
618
+ }
619
+ const $ZodObject = /* @__PURE__ */ core.$constructor("$ZodObject", (inst, def) => {
620
+ $ZodType.init(inst, def);
621
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
622
+ if (!(desc == null ? void 0 : desc.get)) {
623
+ const sh = def.shape;
624
+ Object.defineProperty(def, "shape", {
625
+ get: () => {
626
+ const newSh = { ...sh };
627
+ Object.defineProperty(def, "shape", {
628
+ value: newSh
629
+ });
630
+ return newSh;
631
+ }
632
+ });
633
+ }
634
+ const _normalized = util.cached(() => normalizeDef(def));
635
+ util.defineLazy(inst._zod, "propValues", () => {
636
+ const shape = def.shape;
637
+ const propValues = {};
638
+ for (const key in shape) {
639
+ const field = shape[key]._zod;
640
+ if (field.values) {
641
+ propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
642
+ for (const v of field.values)
643
+ propValues[key].add(v);
644
+ }
645
+ }
646
+ return propValues;
647
+ });
648
+ const isObject = util.isObject;
649
+ const catchall = def.catchall;
650
+ let value;
651
+ inst._zod.parse = (payload, ctx) => {
652
+ value ?? (value = _normalized.value);
653
+ const input = payload.value;
654
+ if (!isObject(input)) {
655
+ payload.issues.push({
656
+ expected: "object",
657
+ code: "invalid_type",
658
+ input,
659
+ inst
660
+ });
661
+ return payload;
662
+ }
663
+ payload.value = {};
664
+ const proms = [];
665
+ const shape = value.shape;
666
+ for (const key of value.keys) {
667
+ const el = shape[key];
668
+ const isOptionalIn = el._zod.optin === "optional";
669
+ const isOptionalOut = el._zod.optout === "optional";
670
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
671
+ if (r instanceof Promise) {
672
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
673
+ } else {
674
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
675
+ }
676
+ }
677
+ if (!catchall) {
678
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
679
+ }
680
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
681
+ };
682
+ });
683
+ const $ZodObjectJIT = /* @__PURE__ */ core.$constructor("$ZodObjectJIT", (inst, def) => {
684
+ $ZodObject.init(inst, def);
685
+ const superParse = inst._zod.parse;
686
+ const _normalized = util.cached(() => normalizeDef(def));
687
+ const generateFastpass = (shape) => {
688
+ var _a, _b;
689
+ const doc$1 = new doc.Doc(["shape", "payload", "ctx"]);
690
+ const normalized = _normalized.value;
691
+ const parseStr = (key) => {
692
+ const k = util.esc(key);
693
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
694
+ };
695
+ doc$1.write(`const input = payload.value;`);
696
+ const ids = /* @__PURE__ */ Object.create(null);
697
+ let counter = 0;
698
+ for (const key of normalized.keys) {
699
+ ids[key] = `key_${counter++}`;
700
+ }
701
+ doc$1.write(`const newResult = {};`);
702
+ for (const key of normalized.keys) {
703
+ const id = ids[key];
704
+ const k = util.esc(key);
705
+ const schema = shape[key];
706
+ const isOptionalIn = ((_a = schema == null ? void 0 : schema._zod) == null ? void 0 : _a.optin) === "optional";
707
+ const isOptionalOut = ((_b = schema == null ? void 0 : schema._zod) == null ? void 0 : _b.optout) === "optional";
708
+ doc$1.write(`const ${id} = ${parseStr(key)};`);
709
+ if (isOptionalIn && isOptionalOut) {
710
+ doc$1.write(`
711
+ if (${id}.issues.length) {
712
+ if (${k} in input) {
713
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
714
+ ...iss,
715
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
716
+ })));
717
+ }
718
+ }
719
+
720
+ if (${id}.value === undefined) {
721
+ if (${k} in input) {
722
+ newResult[${k}] = undefined;
723
+ }
724
+ } else {
725
+ newResult[${k}] = ${id}.value;
726
+ }
727
+
728
+ `);
729
+ } else if (!isOptionalIn) {
730
+ doc$1.write(`
731
+ const ${id}_present = ${k} in input;
732
+ if (${id}.issues.length) {
733
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
734
+ ...iss,
735
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
736
+ })));
737
+ }
738
+ if (!${id}_present && !${id}.issues.length) {
739
+ payload.issues.push({
740
+ code: "invalid_type",
741
+ expected: "nonoptional",
742
+ input: undefined,
743
+ path: [${k}]
744
+ });
745
+ }
746
+
747
+ if (${id}_present) {
748
+ if (${id}.value === undefined) {
749
+ newResult[${k}] = undefined;
750
+ } else {
751
+ newResult[${k}] = ${id}.value;
752
+ }
753
+ }
754
+
755
+ `);
756
+ } else {
757
+ doc$1.write(`
758
+ if (${id}.issues.length) {
759
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
760
+ ...iss,
761
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
762
+ })));
763
+ }
764
+
765
+ if (${id}.value === undefined) {
766
+ if (${k} in input) {
767
+ newResult[${k}] = undefined;
768
+ }
769
+ } else {
770
+ newResult[${k}] = ${id}.value;
771
+ }
772
+
773
+ `);
774
+ }
775
+ }
776
+ doc$1.write(`payload.value = newResult;`);
777
+ doc$1.write(`return payload;`);
778
+ const fn = doc$1.compile();
779
+ return (payload, ctx) => fn(shape, payload, ctx);
780
+ };
781
+ let fastpass;
782
+ const isObject = util.isObject;
783
+ const jit = !core.globalConfig.jitless;
784
+ const allowsEval = util.allowsEval;
785
+ const fastEnabled = jit && allowsEval.value;
786
+ const catchall = def.catchall;
787
+ let value;
788
+ inst._zod.parse = (payload, ctx) => {
789
+ value ?? (value = _normalized.value);
790
+ const input = payload.value;
791
+ if (!isObject(input)) {
792
+ payload.issues.push({
793
+ expected: "object",
794
+ code: "invalid_type",
795
+ input,
796
+ inst
797
+ });
798
+ return payload;
799
+ }
800
+ if (jit && fastEnabled && (ctx == null ? void 0 : ctx.async) === false && ctx.jitless !== true) {
801
+ if (!fastpass)
802
+ fastpass = generateFastpass(def.shape);
803
+ payload = fastpass(payload, ctx);
804
+ if (!catchall)
805
+ return payload;
806
+ return handleCatchall([], input, payload, ctx, value, inst);
807
+ }
808
+ return superParse(payload, ctx);
809
+ };
810
+ });
811
+ function handleUnionResults(results, final, inst, ctx) {
812
+ for (const result of results) {
813
+ if (result.issues.length === 0) {
814
+ final.value = result.value;
815
+ return final;
816
+ }
817
+ }
818
+ const nonaborted = results.filter((r) => !util.aborted(r));
819
+ if (nonaborted.length === 1) {
820
+ final.value = nonaborted[0].value;
821
+ return nonaborted[0];
822
+ }
823
+ final.issues.push({
824
+ code: "invalid_union",
825
+ input: final.value,
826
+ inst,
827
+ errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())))
828
+ });
829
+ return final;
830
+ }
831
+ const $ZodUnion = /* @__PURE__ */ core.$constructor("$ZodUnion", (inst, def) => {
832
+ $ZodType.init(inst, def);
833
+ util.defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
834
+ util.defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
835
+ util.defineLazy(inst._zod, "values", () => {
836
+ if (def.options.every((o) => o._zod.values)) {
837
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
838
+ }
839
+ return void 0;
840
+ });
841
+ util.defineLazy(inst._zod, "pattern", () => {
842
+ if (def.options.every((o) => o._zod.pattern)) {
843
+ const patterns = def.options.map((o) => o._zod.pattern);
844
+ return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
845
+ }
846
+ return void 0;
847
+ });
848
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
849
+ inst._zod.parse = (payload, ctx) => {
850
+ if (first) {
851
+ return first(payload, ctx);
852
+ }
853
+ let async = false;
854
+ const results = [];
855
+ for (const option of def.options) {
856
+ const result = option._zod.run({
857
+ value: payload.value,
858
+ issues: []
859
+ }, ctx);
860
+ if (result instanceof Promise) {
861
+ results.push(result);
862
+ async = true;
863
+ } else {
864
+ if (result.issues.length === 0)
865
+ return result;
866
+ results.push(result);
867
+ }
868
+ }
869
+ if (!async)
870
+ return handleUnionResults(results, payload, inst, ctx);
871
+ return Promise.all(results).then((results2) => {
872
+ return handleUnionResults(results2, payload, inst, ctx);
873
+ });
874
+ };
875
+ });
876
+ const $ZodDiscriminatedUnion = /* @__PURE__ */ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
877
+ def.inclusive = false;
878
+ $ZodUnion.init(inst, def);
879
+ const _super = inst._zod.parse;
880
+ util.defineLazy(inst._zod, "propValues", () => {
881
+ const propValues = {};
882
+ for (const option of def.options) {
883
+ const pv = option._zod.propValues;
884
+ if (!pv || Object.keys(pv).length === 0)
885
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
886
+ for (const [k, v] of Object.entries(pv)) {
887
+ if (!propValues[k])
888
+ propValues[k] = /* @__PURE__ */ new Set();
889
+ for (const val of v) {
890
+ propValues[k].add(val);
891
+ }
892
+ }
893
+ }
894
+ return propValues;
895
+ });
896
+ const disc = util.cached(() => {
897
+ var _a;
898
+ const opts = def.options;
899
+ const map = /* @__PURE__ */ new Map();
900
+ for (const o of opts) {
901
+ const values = (_a = o._zod.propValues) == null ? void 0 : _a[def.discriminator];
902
+ if (!values || values.size === 0)
903
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
904
+ for (const v of values) {
905
+ if (map.has(v)) {
906
+ throw new Error(`Duplicate discriminator value "${String(v)}"`);
907
+ }
908
+ map.set(v, o);
909
+ }
910
+ }
911
+ return map;
912
+ });
913
+ inst._zod.parse = (payload, ctx) => {
914
+ const input = payload.value;
915
+ if (!util.isObject(input)) {
916
+ payload.issues.push({
917
+ code: "invalid_type",
918
+ expected: "object",
919
+ input,
920
+ inst
921
+ });
922
+ return payload;
923
+ }
924
+ const opt = disc.value.get(input == null ? void 0 : input[def.discriminator]);
925
+ if (opt) {
926
+ return opt._zod.run(payload, ctx);
927
+ }
928
+ if (def.unionFallback || ctx.direction === "backward") {
929
+ return _super(payload, ctx);
930
+ }
931
+ payload.issues.push({
932
+ code: "invalid_union",
933
+ errors: [],
934
+ note: "No matching discriminator",
935
+ discriminator: def.discriminator,
936
+ options: Array.from(disc.value.keys()),
937
+ input,
938
+ path: [def.discriminator],
939
+ inst
940
+ });
941
+ return payload;
942
+ };
943
+ });
944
+ const $ZodIntersection = /* @__PURE__ */ core.$constructor("$ZodIntersection", (inst, def) => {
945
+ $ZodType.init(inst, def);
946
+ inst._zod.parse = (payload, ctx) => {
947
+ const input = payload.value;
948
+ const left = def.left._zod.run({ value: input, issues: [] }, ctx);
949
+ const right = def.right._zod.run({ value: input, issues: [] }, ctx);
950
+ const async = left instanceof Promise || right instanceof Promise;
951
+ if (async) {
952
+ return Promise.all([left, right]).then(([left2, right2]) => {
953
+ return handleIntersectionResults(payload, left2, right2);
954
+ });
955
+ }
956
+ return handleIntersectionResults(payload, left, right);
957
+ };
958
+ });
959
+ function mergeValues(a, b) {
960
+ if (a === b) {
961
+ return { valid: true, data: a };
962
+ }
963
+ if (a instanceof Date && b instanceof Date && +a === +b) {
964
+ return { valid: true, data: a };
965
+ }
966
+ if (util.isPlainObject(a) && util.isPlainObject(b)) {
967
+ const bKeys = Object.keys(b);
968
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
969
+ const newObj = { ...a, ...b };
970
+ for (const key of sharedKeys) {
971
+ const sharedValue = mergeValues(a[key], b[key]);
972
+ if (!sharedValue.valid) {
973
+ return {
974
+ valid: false,
975
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
976
+ };
977
+ }
978
+ newObj[key] = sharedValue.data;
979
+ }
980
+ return { valid: true, data: newObj };
981
+ }
982
+ if (Array.isArray(a) && Array.isArray(b)) {
983
+ if (a.length !== b.length) {
984
+ return { valid: false, mergeErrorPath: [] };
985
+ }
986
+ const newArray = [];
987
+ for (let index = 0; index < a.length; index++) {
988
+ const itemA = a[index];
989
+ const itemB = b[index];
990
+ const sharedValue = mergeValues(itemA, itemB);
991
+ if (!sharedValue.valid) {
992
+ return {
993
+ valid: false,
994
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
995
+ };
996
+ }
997
+ newArray.push(sharedValue.data);
998
+ }
999
+ return { valid: true, data: newArray };
1000
+ }
1001
+ return { valid: false, mergeErrorPath: [] };
1002
+ }
1003
+ function handleIntersectionResults(result, left, right) {
1004
+ const unrecKeys = /* @__PURE__ */ new Map();
1005
+ let unrecIssue;
1006
+ for (const iss of left.issues) {
1007
+ if (iss.code === "unrecognized_keys") {
1008
+ unrecIssue ?? (unrecIssue = iss);
1009
+ for (const k of iss.keys) {
1010
+ if (!unrecKeys.has(k))
1011
+ unrecKeys.set(k, {});
1012
+ unrecKeys.get(k).l = true;
1013
+ }
1014
+ } else {
1015
+ result.issues.push(iss);
1016
+ }
1017
+ }
1018
+ for (const iss of right.issues) {
1019
+ if (iss.code === "unrecognized_keys") {
1020
+ for (const k of iss.keys) {
1021
+ if (!unrecKeys.has(k))
1022
+ unrecKeys.set(k, {});
1023
+ unrecKeys.get(k).r = true;
1024
+ }
1025
+ } else {
1026
+ result.issues.push(iss);
1027
+ }
1028
+ }
1029
+ const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1030
+ if (bothKeys.length && unrecIssue) {
1031
+ result.issues.push({ ...unrecIssue, keys: bothKeys });
1032
+ }
1033
+ if (util.aborted(result))
1034
+ return result;
1035
+ const merged = mergeValues(left.value, right.value);
1036
+ if (!merged.valid) {
1037
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
1038
+ }
1039
+ result.value = merged.data;
1040
+ return result;
1041
+ }
1042
+ const $ZodEnum = /* @__PURE__ */ core.$constructor("$ZodEnum", (inst, def) => {
1043
+ $ZodType.init(inst, def);
1044
+ const values = util.getEnumValues(def.entries);
1045
+ const valuesSet = new Set(values);
1046
+ inst._zod.values = valuesSet;
1047
+ inst._zod.pattern = new RegExp(`^(${values.filter((k) => util.propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? util.escapeRegex(o) : o.toString()).join("|")})$`);
1048
+ inst._zod.parse = (payload, _ctx) => {
1049
+ const input = payload.value;
1050
+ if (valuesSet.has(input)) {
1051
+ return payload;
1052
+ }
1053
+ payload.issues.push({
1054
+ code: "invalid_value",
1055
+ values,
1056
+ input,
1057
+ inst
1058
+ });
1059
+ return payload;
1060
+ };
1061
+ });
1062
+ const $ZodLiteral = /* @__PURE__ */ core.$constructor("$ZodLiteral", (inst, def) => {
1063
+ $ZodType.init(inst, def);
1064
+ if (def.values.length === 0) {
1065
+ throw new Error("Cannot create literal schema with no valid values");
1066
+ }
1067
+ const values = new Set(def.values);
1068
+ inst._zod.values = values;
1069
+ inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)).join("|")})$`);
1070
+ inst._zod.parse = (payload, _ctx) => {
1071
+ const input = payload.value;
1072
+ if (values.has(input)) {
1073
+ return payload;
1074
+ }
1075
+ payload.issues.push({
1076
+ code: "invalid_value",
1077
+ values: def.values,
1078
+ input,
1079
+ inst
1080
+ });
1081
+ return payload;
1082
+ };
1083
+ });
1084
+ const $ZodTransform = /* @__PURE__ */ core.$constructor("$ZodTransform", (inst, def) => {
1085
+ $ZodType.init(inst, def);
1086
+ inst._zod.optin = "optional";
1087
+ inst._zod.parse = (payload, ctx) => {
1088
+ if (ctx.direction === "backward") {
1089
+ throw new core.$ZodEncodeError(inst.constructor.name);
1090
+ }
1091
+ const _out = def.transform(payload.value, payload);
1092
+ if (ctx.async) {
1093
+ const output = _out instanceof Promise ? _out : Promise.resolve(_out);
1094
+ return output.then((output2) => {
1095
+ payload.value = output2;
1096
+ payload.fallback = true;
1097
+ return payload;
1098
+ });
1099
+ }
1100
+ if (_out instanceof Promise) {
1101
+ throw new core.$ZodAsyncError();
1102
+ }
1103
+ payload.value = _out;
1104
+ payload.fallback = true;
1105
+ return payload;
1106
+ };
1107
+ });
1108
+ function handleOptionalResult(result, input) {
1109
+ if (input === void 0 && (result.issues.length || result.fallback)) {
1110
+ return { issues: [], value: void 0 };
1111
+ }
1112
+ return result;
1113
+ }
1114
+ const $ZodOptional = /* @__PURE__ */ core.$constructor("$ZodOptional", (inst, def) => {
1115
+ $ZodType.init(inst, def);
1116
+ inst._zod.optin = "optional";
1117
+ inst._zod.optout = "optional";
1118
+ util.defineLazy(inst._zod, "values", () => {
1119
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
1120
+ });
1121
+ util.defineLazy(inst._zod, "pattern", () => {
1122
+ const pattern = def.innerType._zod.pattern;
1123
+ return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : void 0;
1124
+ });
1125
+ inst._zod.parse = (payload, ctx) => {
1126
+ if (def.innerType._zod.optin === "optional") {
1127
+ const input = payload.value;
1128
+ const result = def.innerType._zod.run(payload, ctx);
1129
+ if (result instanceof Promise)
1130
+ return result.then((r) => handleOptionalResult(r, input));
1131
+ return handleOptionalResult(result, input);
1132
+ }
1133
+ if (payload.value === void 0) {
1134
+ return payload;
1135
+ }
1136
+ return def.innerType._zod.run(payload, ctx);
1137
+ };
1138
+ });
1139
+ const $ZodExactOptional = /* @__PURE__ */ core.$constructor("$ZodExactOptional", (inst, def) => {
1140
+ $ZodOptional.init(inst, def);
1141
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1142
+ util.defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
1143
+ inst._zod.parse = (payload, ctx) => {
1144
+ return def.innerType._zod.run(payload, ctx);
1145
+ };
1146
+ });
1147
+ const $ZodNullable = /* @__PURE__ */ core.$constructor("$ZodNullable", (inst, def) => {
1148
+ $ZodType.init(inst, def);
1149
+ util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1150
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1151
+ util.defineLazy(inst._zod, "pattern", () => {
1152
+ const pattern = def.innerType._zod.pattern;
1153
+ return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : void 0;
1154
+ });
1155
+ util.defineLazy(inst._zod, "values", () => {
1156
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
1157
+ });
1158
+ inst._zod.parse = (payload, ctx) => {
1159
+ if (payload.value === null)
1160
+ return payload;
1161
+ return def.innerType._zod.run(payload, ctx);
1162
+ };
1163
+ });
1164
+ const $ZodDefault = /* @__PURE__ */ core.$constructor("$ZodDefault", (inst, def) => {
1165
+ $ZodType.init(inst, def);
1166
+ inst._zod.optin = "optional";
1167
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1168
+ inst._zod.parse = (payload, ctx) => {
1169
+ if (ctx.direction === "backward") {
1170
+ return def.innerType._zod.run(payload, ctx);
1171
+ }
1172
+ if (payload.value === void 0) {
1173
+ payload.value = def.defaultValue;
1174
+ return payload;
1175
+ }
1176
+ const result = def.innerType._zod.run(payload, ctx);
1177
+ if (result instanceof Promise) {
1178
+ return result.then((result2) => handleDefaultResult(result2, def));
1179
+ }
1180
+ return handleDefaultResult(result, def);
1181
+ };
1182
+ });
1183
+ function handleDefaultResult(payload, def) {
1184
+ if (payload.value === void 0) {
1185
+ payload.value = def.defaultValue;
1186
+ }
1187
+ return payload;
1188
+ }
1189
+ const $ZodPrefault = /* @__PURE__ */ core.$constructor("$ZodPrefault", (inst, def) => {
1190
+ $ZodType.init(inst, def);
1191
+ inst._zod.optin = "optional";
1192
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1193
+ inst._zod.parse = (payload, ctx) => {
1194
+ if (ctx.direction === "backward") {
1195
+ return def.innerType._zod.run(payload, ctx);
1196
+ }
1197
+ if (payload.value === void 0) {
1198
+ payload.value = def.defaultValue;
1199
+ }
1200
+ return def.innerType._zod.run(payload, ctx);
1201
+ };
1202
+ });
1203
+ const $ZodNonOptional = /* @__PURE__ */ core.$constructor("$ZodNonOptional", (inst, def) => {
1204
+ $ZodType.init(inst, def);
1205
+ util.defineLazy(inst._zod, "values", () => {
1206
+ const v = def.innerType._zod.values;
1207
+ return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
1208
+ });
1209
+ inst._zod.parse = (payload, ctx) => {
1210
+ const result = def.innerType._zod.run(payload, ctx);
1211
+ if (result instanceof Promise) {
1212
+ return result.then((result2) => handleNonOptionalResult(result2, inst));
1213
+ }
1214
+ return handleNonOptionalResult(result, inst);
1215
+ };
1216
+ });
1217
+ function handleNonOptionalResult(payload, inst) {
1218
+ if (!payload.issues.length && payload.value === void 0) {
1219
+ payload.issues.push({
1220
+ code: "invalid_type",
1221
+ expected: "nonoptional",
1222
+ input: payload.value,
1223
+ inst
1224
+ });
1225
+ }
1226
+ return payload;
1227
+ }
1228
+ const $ZodCatch = /* @__PURE__ */ core.$constructor("$ZodCatch", (inst, def) => {
1229
+ $ZodType.init(inst, def);
1230
+ inst._zod.optin = "optional";
1231
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1232
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1233
+ inst._zod.parse = (payload, ctx) => {
1234
+ if (ctx.direction === "backward") {
1235
+ return def.innerType._zod.run(payload, ctx);
1236
+ }
1237
+ const result = def.innerType._zod.run(payload, ctx);
1238
+ if (result instanceof Promise) {
1239
+ return result.then((result2) => {
1240
+ payload.value = result2.value;
1241
+ if (result2.issues.length) {
1242
+ payload.value = def.catchValue({
1243
+ ...payload,
1244
+ error: {
1245
+ issues: result2.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))
1246
+ },
1247
+ input: payload.value
1248
+ });
1249
+ payload.issues = [];
1250
+ payload.fallback = true;
1251
+ }
1252
+ return payload;
1253
+ });
1254
+ }
1255
+ payload.value = result.value;
1256
+ if (result.issues.length) {
1257
+ payload.value = def.catchValue({
1258
+ ...payload,
1259
+ error: {
1260
+ issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))
1261
+ },
1262
+ input: payload.value
1263
+ });
1264
+ payload.issues = [];
1265
+ payload.fallback = true;
1266
+ }
1267
+ return payload;
1268
+ };
1269
+ });
1270
+ const $ZodPipe = /* @__PURE__ */ core.$constructor("$ZodPipe", (inst, def) => {
1271
+ $ZodType.init(inst, def);
1272
+ util.defineLazy(inst._zod, "values", () => def.in._zod.values);
1273
+ util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1274
+ util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1275
+ util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1276
+ inst._zod.parse = (payload, ctx) => {
1277
+ if (ctx.direction === "backward") {
1278
+ const right = def.out._zod.run(payload, ctx);
1279
+ if (right instanceof Promise) {
1280
+ return right.then((right2) => handlePipeResult(right2, def.in, ctx));
1281
+ }
1282
+ return handlePipeResult(right, def.in, ctx);
1283
+ }
1284
+ const left = def.in._zod.run(payload, ctx);
1285
+ if (left instanceof Promise) {
1286
+ return left.then((left2) => handlePipeResult(left2, def.out, ctx));
1287
+ }
1288
+ return handlePipeResult(left, def.out, ctx);
1289
+ };
1290
+ });
1291
+ function handlePipeResult(left, next, ctx) {
1292
+ if (left.issues.length) {
1293
+ left.aborted = true;
1294
+ return left;
1295
+ }
1296
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
1297
+ }
1298
+ const $ZodReadonly = /* @__PURE__ */ core.$constructor("$ZodReadonly", (inst, def) => {
1299
+ $ZodType.init(inst, def);
1300
+ util.defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
1301
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1302
+ util.defineLazy(inst._zod, "optin", () => {
1303
+ var _a, _b;
1304
+ return (_b = (_a = def.innerType) == null ? void 0 : _a._zod) == null ? void 0 : _b.optin;
1305
+ });
1306
+ util.defineLazy(inst._zod, "optout", () => {
1307
+ var _a, _b;
1308
+ return (_b = (_a = def.innerType) == null ? void 0 : _a._zod) == null ? void 0 : _b.optout;
1309
+ });
1310
+ inst._zod.parse = (payload, ctx) => {
1311
+ if (ctx.direction === "backward") {
1312
+ return def.innerType._zod.run(payload, ctx);
1313
+ }
1314
+ const result = def.innerType._zod.run(payload, ctx);
1315
+ if (result instanceof Promise) {
1316
+ return result.then(handleReadonlyResult);
1317
+ }
1318
+ return handleReadonlyResult(result);
1319
+ };
1320
+ });
1321
+ function handleReadonlyResult(payload) {
1322
+ payload.value = Object.freeze(payload.value);
1323
+ return payload;
1324
+ }
1325
+ const $ZodCustom = /* @__PURE__ */ core.$constructor("$ZodCustom", (inst, def) => {
1326
+ checks.$ZodCheck.init(inst, def);
1327
+ $ZodType.init(inst, def);
1328
+ inst._zod.parse = (payload, _) => {
1329
+ return payload;
1330
+ };
1331
+ inst._zod.check = (payload) => {
1332
+ const input = payload.value;
1333
+ const r = def.fn(input);
1334
+ if (r instanceof Promise) {
1335
+ return r.then((r2) => handleRefineResult(r2, payload, input, inst));
1336
+ }
1337
+ handleRefineResult(r, payload, input, inst);
1338
+ return;
1339
+ };
1340
+ });
1341
+ function handleRefineResult(result, payload, input, inst) {
1342
+ if (!result) {
1343
+ const _iss = {
1344
+ code: "custom",
1345
+ input,
1346
+ inst,
1347
+ // incorporates params.error into issue reporting
1348
+ path: [...inst._zod.def.path ?? []],
1349
+ // incorporates params.error into issue reporting
1350
+ continue: !inst._zod.def.abort
1351
+ // params: inst._zod.def.params,
1352
+ };
1353
+ if (inst._zod.def.params)
1354
+ _iss.params = inst._zod.def.params;
1355
+ payload.issues.push(util.issue(_iss));
1356
+ }
1357
+ }
1358
+ exports.clone = util.clone;
1359
+ exports.$ZodArray = $ZodArray;
1360
+ exports.$ZodBase64 = $ZodBase64;
1361
+ exports.$ZodBase64URL = $ZodBase64URL;
1362
+ exports.$ZodBoolean = $ZodBoolean;
1363
+ exports.$ZodCIDRv4 = $ZodCIDRv4;
1364
+ exports.$ZodCIDRv6 = $ZodCIDRv6;
1365
+ exports.$ZodCUID = $ZodCUID;
1366
+ exports.$ZodCUID2 = $ZodCUID2;
1367
+ exports.$ZodCatch = $ZodCatch;
1368
+ exports.$ZodCustom = $ZodCustom;
1369
+ exports.$ZodDefault = $ZodDefault;
1370
+ exports.$ZodDiscriminatedUnion = $ZodDiscriminatedUnion;
1371
+ exports.$ZodE164 = $ZodE164;
1372
+ exports.$ZodEmail = $ZodEmail;
1373
+ exports.$ZodEmoji = $ZodEmoji;
1374
+ exports.$ZodEnum = $ZodEnum;
1375
+ exports.$ZodExactOptional = $ZodExactOptional;
1376
+ exports.$ZodGUID = $ZodGUID;
1377
+ exports.$ZodIPv4 = $ZodIPv4;
1378
+ exports.$ZodIPv6 = $ZodIPv6;
1379
+ exports.$ZodISODate = $ZodISODate;
1380
+ exports.$ZodISODateTime = $ZodISODateTime;
1381
+ exports.$ZodISODuration = $ZodISODuration;
1382
+ exports.$ZodISOTime = $ZodISOTime;
1383
+ exports.$ZodIntersection = $ZodIntersection;
1384
+ exports.$ZodJWT = $ZodJWT;
1385
+ exports.$ZodKSUID = $ZodKSUID;
1386
+ exports.$ZodLiteral = $ZodLiteral;
1387
+ exports.$ZodNanoID = $ZodNanoID;
1388
+ exports.$ZodNever = $ZodNever;
1389
+ exports.$ZodNonOptional = $ZodNonOptional;
1390
+ exports.$ZodNullable = $ZodNullable;
1391
+ exports.$ZodNumber = $ZodNumber;
1392
+ exports.$ZodNumberFormat = $ZodNumberFormat;
1393
+ exports.$ZodObject = $ZodObject;
1394
+ exports.$ZodObjectJIT = $ZodObjectJIT;
1395
+ exports.$ZodOptional = $ZodOptional;
1396
+ exports.$ZodPipe = $ZodPipe;
1397
+ exports.$ZodPrefault = $ZodPrefault;
1398
+ exports.$ZodReadonly = $ZodReadonly;
1399
+ exports.$ZodString = $ZodString;
1400
+ exports.$ZodStringFormat = $ZodStringFormat;
1401
+ exports.$ZodTransform = $ZodTransform;
1402
+ exports.$ZodType = $ZodType;
1403
+ exports.$ZodULID = $ZodULID;
1404
+ exports.$ZodURL = $ZodURL;
1405
+ exports.$ZodUUID = $ZodUUID;
1406
+ exports.$ZodUnion = $ZodUnion;
1407
+ exports.$ZodUnknown = $ZodUnknown;
1408
+ exports.$ZodXID = $ZodXID;
1409
+ exports.isValidBase64 = isValidBase64;
1410
+ exports.isValidBase64URL = isValidBase64URL;
1411
+ exports.isValidJWT = isValidJWT;
1412
+ //# sourceMappingURL=schemas.cjs.map