@e-llm-studio/instant-learning 1.3.0-beta.1 → 1.3.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 (563) hide show
  1. package/README.md +19 -1
  2. package/dist/ContinueWithTemplateModal.js +1 -1
  3. package/dist/ContinueWithTemplateModal.module.css.js +1 -1
  4. package/dist/ILMarketplaceWrapper.js +1 -1
  5. package/dist/ILMarketplaceWrapper.module.css.js +1 -1
  6. package/dist/adapters/creativeWorkspaceAdapter.js +2 -0
  7. package/dist/adapters/creativeWorkspaceAdapter.js.map +1 -0
  8. package/dist/cjs/ContinueWithTemplateModal.js +1 -1
  9. package/dist/cjs/ContinueWithTemplateModal.module.css.js +1 -1
  10. package/dist/cjs/ILMarketplaceWrapper.js +1 -1
  11. package/dist/cjs/ILMarketplaceWrapper.module.css.js +1 -1
  12. package/dist/cjs/adapters/creativeWorkspaceAdapter.js +2 -0
  13. package/dist/cjs/adapters/creativeWorkspaceAdapter.js.map +1 -0
  14. package/dist/cjs/features/DocumentLearning/InstantLearning.module.css.js +1 -1
  15. package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
  16. package/dist/cjs/features/IL-OTJ/InstantLearning.module.css.js +1 -1
  17. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
  18. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
  19. package/dist/cjs/features/IL-OTJ/_components/AccordianSection.js +1 -1
  20. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
  21. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.module.css.js +1 -1
  22. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatHeader.module.css.js +1 -1
  23. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -1
  24. package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
  25. package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +1 -1
  26. package/dist/cjs/features/IL-OTJ/_components/GapExplanationAccordion.js +1 -1
  27. package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +1 -1
  28. package/dist/cjs/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
  29. package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
  30. package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
  31. package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
  32. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +1 -1
  33. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/ChatFeedback.js +1 -1
  34. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
  35. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
  36. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleVariantCard.js +1 -1
  37. package/dist/cjs/features/IL-OTJ/_components/VariantLoadingOverlay.js +1 -1
  38. package/dist/cjs/features/IL-OTJ/_components/ViewFormUpdateCard.js +1 -1
  39. package/dist/cjs/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.js +1 -1
  40. package/dist/cjs/features/IL-OTJ/_components/_svg/ButtonCognitiveIcon.js +1 -1
  41. package/dist/cjs/features/IL-OTJ/_components/atoms/SkeletonLoader/SkeletonLoader.module.css.js +1 -1
  42. package/dist/cjs/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
  43. package/dist/cjs/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.js +2 -0
  44. package/dist/cjs/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.js.map +1 -0
  45. package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
  46. package/dist/cjs/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js +1 -1
  47. package/dist/cjs/features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.js +1 -1
  48. package/dist/cjs/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js +1 -1
  49. package/dist/cjs/features/IL-OTJ/_components/organisms/TextSection/TextSection.js +1 -1
  50. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
  51. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
  52. package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
  53. package/dist/cjs/features/IL-marketplace/components/GuidelineCardMenu.module.css.js +1 -1
  54. package/dist/cjs/features/IL-marketplace/components/GuidelineCart.module.css.js +1 -1
  55. package/dist/cjs/features/IL-marketplace/components/GuidelineCartHeader.module.css.js +1 -1
  56. package/dist/cjs/features/IL-marketplace/components/GuidelineCartItem.module.css.js +1 -1
  57. package/dist/cjs/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js +1 -1
  58. package/dist/cjs/features/IL-marketplace/components/GuidelineEmptyState.module.css.js +1 -1
  59. package/dist/cjs/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js +1 -1
  60. package/dist/cjs/features/IL-marketplace/components/GuidelineHeader.module.css.js +1 -1
  61. package/dist/cjs/features/IL-marketplace/components/GuidelineIconButton.module.css.js +1 -1
  62. package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.js +1 -1
  63. package/dist/cjs/features/IL-marketplace/components/GuidelineLandingPage.module.css.js +1 -1
  64. package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.js +1 -1
  65. package/dist/cjs/features/IL-marketplace/components/GuidelineLibrary.module.css.js +1 -1
  66. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.js +1 -1
  67. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js +1 -1
  68. package/dist/cjs/features/IL-marketplace/components/GuidelineLibraryContent.js +1 -1
  69. package/dist/cjs/features/IL-marketplace/components/GuidelineProceedButton.module.css.js +1 -1
  70. package/dist/cjs/features/IL-marketplace/components/GuidelineSelectButton.module.css.js +1 -1
  71. package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.js +1 -1
  72. package/dist/cjs/features/IL-marketplace/components/GuidelineStatusChip.module.css.js +1 -1
  73. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.module.css.js +1 -1
  74. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.module.css.js +1 -1
  75. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.module.css.js +1 -1
  76. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.module.css.js +1 -1
  77. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js +1 -1
  78. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.module.css.js +1 -1
  79. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.module.css.js +1 -1
  80. package/dist/cjs/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.module.css.js +1 -1
  81. package/dist/cjs/features/IL-marketplace/components/LearningManagementWrapper.js +1 -1
  82. package/dist/cjs/features/IL-marketplace/components/VersionSelectDropdown.module.css.js +1 -1
  83. package/dist/cjs/features/IL-marketplace/hooks/usePublishingFlowConfig.js +1 -1
  84. package/dist/cjs/features/IL-marketplace/marketplaceTheme.js +2 -0
  85. package/dist/cjs/features/IL-marketplace/marketplaceTheme.js.map +1 -0
  86. package/dist/cjs/features/IL-marketplace/services/IL-marketplace.api.js +1 -1
  87. package/dist/cjs/features/InstantLearning/InstantLearning.js +1 -1
  88. package/dist/cjs/features/InstantLearning/InstantLearning.module.css.js +1 -1
  89. package/dist/cjs/features/InstantLearning/_components/ContextualLearningForm.js +1 -1
  90. package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  91. package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.module.css.js +2 -0
  92. package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.module.css.js.map +1 -0
  93. package/dist/cjs/features/LearningManagement/AuditLog/ChangeLogDiff.js +1 -1
  94. package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
  95. package/dist/cjs/features/LearningManagement/LearningManagementTest.js +1 -1
  96. package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
  97. package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  98. package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.js +1 -1
  99. package/dist/cjs/features/LearningManagement/RBAC/AccessPanel.module.css.js +1 -1
  100. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
  101. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  102. package/dist/cjs/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
  103. package/dist/cjs/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
  104. package/dist/cjs/features/LearningManagement/RuleContent/DraftsAccordion.js +2 -0
  105. package/dist/cjs/features/LearningManagement/RuleContent/DraftsAccordion.js.map +1 -0
  106. package/dist/cjs/features/LearningManagement/RuleContent/RenameScopeModal.js +1 -1
  107. package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  108. package/dist/cjs/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
  109. package/dist/cjs/features/LearningManagement/RuleContent/TierCard.js +1 -1
  110. package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
  111. package/dist/cjs/features/LearningManagement/apis/apiConfig.js +1 -1
  112. package/dist/cjs/features/LearningManagement/apis/scopeApis.js +1 -1
  113. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
  114. package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
  115. package/dist/cjs/features/LearningManagement/components/PromptTextEditor.js +1 -1
  116. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeMenu.js +1 -1
  117. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
  118. package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  119. package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js +1 -1
  120. package/dist/cjs/features/LearningManagement/styles/CardSkeleton.module.css.js +1 -1
  121. package/dist/cjs/features/LearningManagement/styles/ConfirmationModal.module.css.js +1 -1
  122. package/dist/cjs/features/LearningManagement/styles/CustomTooltip.module.css.js +1 -1
  123. package/dist/cjs/features/LearningManagement/styles/DraftsAccordion.module.css.js +2 -0
  124. package/dist/cjs/features/LearningManagement/styles/DraftsAccordion.module.css.js.map +1 -0
  125. package/dist/cjs/features/LearningManagement/styles/EmptyRuleState.module.css.js +1 -1
  126. package/dist/cjs/features/LearningManagement/styles/ErrorStateDisplay.module.css.js +1 -1
  127. package/dist/cjs/features/LearningManagement/styles/InputField.module.css.js +1 -1
  128. package/dist/cjs/features/LearningManagement/styles/InstantLearningModal.module.css.js +1 -1
  129. package/dist/cjs/features/LearningManagement/styles/LearningContent.module.css.js +1 -1
  130. package/dist/cjs/features/LearningManagement/styles/LearningContentSkeleton.module.css.js +1 -1
  131. package/dist/cjs/features/LearningManagement/styles/LearningTemplateLayout.module.css.js +1 -1
  132. package/dist/cjs/features/LearningManagement/styles/LearningTemplateManagement.module.css.js +1 -1
  133. package/dist/cjs/features/LearningManagement/styles/LearningTemplateManagementSkeleton.module.css.js +1 -1
  134. package/dist/cjs/features/LearningManagement/styles/OnboardingLoader.module.css.js +1 -1
  135. package/dist/cjs/features/LearningManagement/styles/OverrideTimeline.module.css.js +1 -1
  136. package/dist/cjs/features/LearningManagement/styles/PromptTextEditor.module.css.js +1 -1
  137. package/dist/cjs/features/LearningManagement/styles/RuleAccordion.module.css.js +1 -1
  138. package/dist/cjs/features/LearningManagement/styles/RuleHeader.module.css.js +1 -1
  139. package/dist/cjs/features/LearningManagement/styles/RuleTierList.module.css.js +1 -1
  140. package/dist/cjs/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
  141. package/dist/cjs/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
  142. package/dist/cjs/features/LearningManagement/styles/StationAutocomplete.module.css.js +1 -1
  143. package/dist/cjs/features/LearningManagement/styles/StationOnboardModal.module.css.js +1 -1
  144. package/dist/cjs/features/LearningManagement/styles/StationsContent.module.css.js +1 -1
  145. package/dist/cjs/features/LearningManagement/styles/TemplateCard.module.css.js +1 -1
  146. package/dist/cjs/features/LearningManagement/styles/TierCard.module.css.js +1 -1
  147. package/dist/cjs/features/LearningManagement/styles/ToastContent.module.css.js +1 -1
  148. package/dist/cjs/features/LearningManagement/styles/ToolTip.module.css.js +1 -1
  149. package/dist/cjs/features/LearningManagement/styles/VariantCard.module.css.js +1 -1
  150. package/dist/cjs/features/LearningManagement/styles/VariantList.module.css.js +1 -1
  151. package/dist/cjs/features/LearningManagement/styles/common.module.css.js +1 -1
  152. package/dist/cjs/features/LearningManagement/styles/skeleton.module.css.js +1 -1
  153. package/dist/cjs/features/LearningManagement/utils/learningFlow.js +2 -0
  154. package/dist/cjs/features/LearningManagement/utils/learningFlow.js.map +1 -0
  155. package/dist/cjs/features/LearningManagement/utils/saveDraft.js +2 -0
  156. package/dist/cjs/features/LearningManagement/utils/saveDraft.js.map +1 -0
  157. package/dist/cjs/features/WtaWnta/WtaWnta.module.css.js +1 -1
  158. package/dist/cjs/index.js +1 -1
  159. package/dist/cjs/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  160. package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
  161. package/dist/cjs/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js +1 -1
  162. package/dist/cjs/schema-driven/BPARenderer.js +1 -1
  163. package/dist/cjs/schema-driven/components/GlobalSetupAccordionField.js +1 -1
  164. package/dist/cjs/schema-driven/components/GroupEditRow.js +1 -1
  165. package/dist/cjs/schema-driven/components/PromptTextEditorField.js +1 -1
  166. package/dist/cjs/schema-driven/components/VariantListField.js +1 -1
  167. package/dist/cjs/schema-driven/primitives/Accordion.js +1 -1
  168. package/dist/cjs/utils/agentGenieAPI.js +1 -1
  169. package/dist/features/DocumentLearning/InstantLearning.module.css.js +1 -1
  170. package/dist/features/IL-OTJ/ILOTJ.js +1 -1
  171. package/dist/features/IL-OTJ/InstantLearning.module.css.js +1 -1
  172. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
  173. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
  174. package/dist/features/IL-OTJ/_components/AccordianSection.js +1 -1
  175. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
  176. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.module.css.js +1 -1
  177. package/dist/features/IL-OTJ/_components/ChatComponents/ChatHeader.module.css.js +1 -1
  178. package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -1
  179. package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
  180. package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
  181. package/dist/features/IL-OTJ/_components/GapExplanationAccordion.js +1 -1
  182. package/dist/features/IL-OTJ/_components/ILPopup.js +1 -1
  183. package/dist/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
  184. package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
  185. package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +1 -1
  186. package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.js +1 -1
  187. package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +1 -1
  188. package/dist/features/IL-OTJ/_components/MessageRendering/ChatFeedback.js +1 -1
  189. package/dist/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
  190. package/dist/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
  191. package/dist/features/IL-OTJ/_components/MessageRendering/RuleVariantCard.js +1 -1
  192. package/dist/features/IL-OTJ/_components/VariantLoadingOverlay.js +1 -1
  193. package/dist/features/IL-OTJ/_components/ViewFormUpdateCard.js +1 -1
  194. package/dist/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.js +1 -1
  195. package/dist/features/IL-OTJ/_components/_svg/ButtonCognitiveIcon.js +1 -1
  196. package/dist/features/IL-OTJ/_components/atoms/SkeletonLoader/SkeletonLoader.module.css.js +1 -1
  197. package/dist/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
  198. package/dist/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.js +2 -0
  199. package/dist/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.js.map +1 -0
  200. package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
  201. package/dist/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.js +1 -1
  202. package/dist/features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.js +1 -1
  203. package/dist/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js +1 -1
  204. package/dist/features/IL-OTJ/_components/organisms/TextSection/TextSection.js +1 -1
  205. package/dist/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
  206. package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
  207. package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
  208. package/dist/features/IL-marketplace/components/GuidelineCardMenu.module.css.js +1 -1
  209. package/dist/features/IL-marketplace/components/GuidelineCart.module.css.js +1 -1
  210. package/dist/features/IL-marketplace/components/GuidelineCartHeader.module.css.js +1 -1
  211. package/dist/features/IL-marketplace/components/GuidelineCartItem.module.css.js +1 -1
  212. package/dist/features/IL-marketplace/components/GuidelineConfirmDialog.module.css.js +1 -1
  213. package/dist/features/IL-marketplace/components/GuidelineEmptyState.module.css.js +1 -1
  214. package/dist/features/IL-marketplace/components/GuidelineFilterPanel.module.css.js +1 -1
  215. package/dist/features/IL-marketplace/components/GuidelineHeader.module.css.js +1 -1
  216. package/dist/features/IL-marketplace/components/GuidelineIconButton.module.css.js +1 -1
  217. package/dist/features/IL-marketplace/components/GuidelineLandingPage.js +1 -1
  218. package/dist/features/IL-marketplace/components/GuidelineLandingPage.module.css.js +1 -1
  219. package/dist/features/IL-marketplace/components/GuidelineLibrary.js +1 -1
  220. package/dist/features/IL-marketplace/components/GuidelineLibrary.module.css.js +1 -1
  221. package/dist/features/IL-marketplace/components/GuidelineLibraryCard.js +1 -1
  222. package/dist/features/IL-marketplace/components/GuidelineLibraryCard.module.css.js +1 -1
  223. package/dist/features/IL-marketplace/components/GuidelineLibraryContent.js +1 -1
  224. package/dist/features/IL-marketplace/components/GuidelineProceedButton.module.css.js +1 -1
  225. package/dist/features/IL-marketplace/components/GuidelineSelectButton.module.css.js +1 -1
  226. package/dist/features/IL-marketplace/components/GuidelineStatusChip.js +1 -1
  227. package/dist/features/IL-marketplace/components/GuidelineStatusChip.module.css.js +1 -1
  228. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.module.css.js +1 -1
  229. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.module.css.js +1 -1
  230. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.module.css.js +1 -1
  231. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.module.css.js +1 -1
  232. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.js +1 -1
  233. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.module.css.js +1 -1
  234. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.module.css.js +1 -1
  235. package/dist/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.module.css.js +1 -1
  236. package/dist/features/IL-marketplace/components/LearningManagementWrapper.js +1 -1
  237. package/dist/features/IL-marketplace/components/VersionSelectDropdown.module.css.js +1 -1
  238. package/dist/features/IL-marketplace/hooks/usePublishingFlowConfig.js +1 -1
  239. package/dist/features/IL-marketplace/marketplaceTheme.js +2 -0
  240. package/dist/features/IL-marketplace/marketplaceTheme.js.map +1 -0
  241. package/dist/features/IL-marketplace/services/IL-marketplace.api.js +1 -1
  242. package/dist/features/InstantLearning/InstantLearning.js +1 -1
  243. package/dist/features/InstantLearning/InstantLearning.module.css.js +1 -1
  244. package/dist/features/InstantLearning/_components/ContextualLearningForm.js +1 -1
  245. package/dist/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  246. package/dist/features/LearningManagement/AuditLog/AuditLog.module.css.js +2 -0
  247. package/dist/features/LearningManagement/AuditLog/AuditLog.module.css.js.map +1 -0
  248. package/dist/features/LearningManagement/AuditLog/ChangeLogDiff.js +1 -1
  249. package/dist/features/LearningManagement/LearningManagement.js +1 -1
  250. package/dist/features/LearningManagement/LearningManagementTest.js +1 -1
  251. package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
  252. package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  253. package/dist/features/LearningManagement/RBAC/AccessPanel.js +1 -1
  254. package/dist/features/LearningManagement/RBAC/AccessPanel.module.css.js +1 -1
  255. package/dist/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
  256. package/dist/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  257. package/dist/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
  258. package/dist/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
  259. package/dist/features/LearningManagement/RuleContent/DraftsAccordion.js +2 -0
  260. package/dist/features/LearningManagement/RuleContent/DraftsAccordion.js.map +1 -0
  261. package/dist/features/LearningManagement/RuleContent/RenameScopeModal.js +1 -1
  262. package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  263. package/dist/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
  264. package/dist/features/LearningManagement/RuleContent/TierCard.js +1 -1
  265. package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
  266. package/dist/features/LearningManagement/apis/apiConfig.js +1 -1
  267. package/dist/features/LearningManagement/apis/scopeApis.js +1 -1
  268. package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
  269. package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
  270. package/dist/features/LearningManagement/components/PromptTextEditor.js +1 -1
  271. package/dist/features/LearningManagement/components/ScopeTree/TreeMenu.js +1 -1
  272. package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
  273. package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  274. package/dist/features/LearningManagement/queries/useLMSConfigQuery.js +1 -1
  275. package/dist/features/LearningManagement/styles/CardSkeleton.module.css.js +1 -1
  276. package/dist/features/LearningManagement/styles/ConfirmationModal.module.css.js +1 -1
  277. package/dist/features/LearningManagement/styles/CustomTooltip.module.css.js +1 -1
  278. package/dist/features/LearningManagement/styles/DraftsAccordion.module.css.js +2 -0
  279. package/dist/features/LearningManagement/styles/DraftsAccordion.module.css.js.map +1 -0
  280. package/dist/features/LearningManagement/styles/EmptyRuleState.module.css.js +1 -1
  281. package/dist/features/LearningManagement/styles/ErrorStateDisplay.module.css.js +1 -1
  282. package/dist/features/LearningManagement/styles/InputField.module.css.js +1 -1
  283. package/dist/features/LearningManagement/styles/InstantLearningModal.module.css.js +1 -1
  284. package/dist/features/LearningManagement/styles/LearningContent.module.css.js +1 -1
  285. package/dist/features/LearningManagement/styles/LearningContentSkeleton.module.css.js +1 -1
  286. package/dist/features/LearningManagement/styles/LearningTemplateLayout.module.css.js +1 -1
  287. package/dist/features/LearningManagement/styles/LearningTemplateManagement.module.css.js +1 -1
  288. package/dist/features/LearningManagement/styles/LearningTemplateManagementSkeleton.module.css.js +1 -1
  289. package/dist/features/LearningManagement/styles/OnboardingLoader.module.css.js +1 -1
  290. package/dist/features/LearningManagement/styles/OverrideTimeline.module.css.js +1 -1
  291. package/dist/features/LearningManagement/styles/PromptTextEditor.module.css.js +1 -1
  292. package/dist/features/LearningManagement/styles/RuleAccordion.module.css.js +1 -1
  293. package/dist/features/LearningManagement/styles/RuleHeader.module.css.js +1 -1
  294. package/dist/features/LearningManagement/styles/RuleTierList.module.css.js +1 -1
  295. package/dist/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
  296. package/dist/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
  297. package/dist/features/LearningManagement/styles/StationAutocomplete.module.css.js +1 -1
  298. package/dist/features/LearningManagement/styles/StationOnboardModal.module.css.js +1 -1
  299. package/dist/features/LearningManagement/styles/StationsContent.module.css.js +1 -1
  300. package/dist/features/LearningManagement/styles/TemplateCard.module.css.js +1 -1
  301. package/dist/features/LearningManagement/styles/TierCard.module.css.js +1 -1
  302. package/dist/features/LearningManagement/styles/ToastContent.module.css.js +1 -1
  303. package/dist/features/LearningManagement/styles/ToolTip.module.css.js +1 -1
  304. package/dist/features/LearningManagement/styles/VariantCard.module.css.js +1 -1
  305. package/dist/features/LearningManagement/styles/VariantList.module.css.js +1 -1
  306. package/dist/features/LearningManagement/styles/common.module.css.js +1 -1
  307. package/dist/features/LearningManagement/styles/skeleton.module.css.js +1 -1
  308. package/dist/features/LearningManagement/utils/learningFlow.js +2 -0
  309. package/dist/features/LearningManagement/utils/learningFlow.js.map +1 -0
  310. package/dist/features/LearningManagement/utils/saveDraft.js +2 -0
  311. package/dist/features/LearningManagement/utils/saveDraft.js.map +1 -0
  312. package/dist/features/WtaWnta/WtaWnta.module.css.js +1 -1
  313. package/dist/index.js +1 -1
  314. package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  315. package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
  316. package/dist/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js +1 -1
  317. package/dist/schema-driven/BPARenderer.js +1 -1
  318. package/dist/schema-driven/components/GlobalSetupAccordionField.js +1 -1
  319. package/dist/schema-driven/components/GroupEditRow.js +1 -1
  320. package/dist/schema-driven/components/PromptTextEditorField.js +1 -1
  321. package/dist/schema-driven/components/VariantListField.js +1 -1
  322. package/dist/schema-driven/primitives/Accordion.js +1 -1
  323. package/dist/types/src/CommonComponents/HelloWorld.d.ts +1 -0
  324. package/dist/types/src/CommonComponents/HelloWorld.d.ts.map +1 -1
  325. package/dist/types/src/CommonComponents/NoTableData.d.ts +1 -0
  326. package/dist/types/src/CommonComponents/NoTableData.d.ts.map +1 -1
  327. package/dist/types/src/ContinueWithTemplateModal.d.ts.map +1 -1
  328. package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -1
  329. package/dist/types/src/ILMarketplaceWrapper.d.ts +15 -4
  330. package/dist/types/src/ILMarketplaceWrapper.d.ts.map +1 -1
  331. package/dist/types/src/PublishToMarketplaceTest.d.ts +1 -0
  332. package/dist/types/src/PublishToMarketplaceTest.d.ts.map +1 -1
  333. package/dist/types/src/adapters/creativeWorkspaceAdapter.d.ts +62 -0
  334. package/dist/types/src/adapters/creativeWorkspaceAdapter.d.ts.map +1 -0
  335. package/dist/types/src/api/transport.d.ts +1 -1
  336. package/dist/types/src/api/transport.d.ts.map +1 -1
  337. package/dist/types/src/features/DataSelector/components/DataSelectionOptionsScreen.d.ts +1 -0
  338. package/dist/types/src/features/DataSelector/components/DataSelectionOptionsScreen.d.ts.map +1 -1
  339. package/dist/types/src/features/DataSelector/components/RLEFDataPointsListInSelectedDataSetCollection.d.ts +1 -0
  340. package/dist/types/src/features/DataSelector/components/RLEFDataPointsListInSelectedDataSetCollection.d.ts.map +1 -1
  341. package/dist/types/src/features/DataSelector/components/RLEFDataSetCollectionsList.d.ts +1 -0
  342. package/dist/types/src/features/DataSelector/components/RLEFDataSetCollectionsList.d.ts.map +1 -1
  343. package/dist/types/src/features/DataSelector/components/RlefDataTabsComponent.d.ts +1 -0
  344. package/dist/types/src/features/DataSelector/components/RlefDataTabsComponent.d.ts.map +1 -1
  345. package/dist/types/src/features/DataSelector/components/SelectedDataList.d.ts +1 -0
  346. package/dist/types/src/features/DataSelector/components/SelectedDataList.d.ts.map +1 -1
  347. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +6 -0
  348. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
  349. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +10 -10
  350. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
  351. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +2 -1
  352. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -1
  353. package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts.map +1 -1
  354. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
  355. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
  356. package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
  357. package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts.map +1 -1
  358. package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
  359. package/dist/types/src/features/IL-OTJ/_components/GapExplanationAccordion.d.ts.map +1 -1
  360. package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts +6 -1
  361. package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts.map +1 -1
  362. package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts +1 -1
  363. package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +1 -1
  364. package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -1
  365. package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +1 -1
  366. package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.d.ts.map +1 -1
  367. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts.map +1 -1
  368. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts.map +1 -1
  369. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/RuleVariantCard.d.ts.map +1 -1
  370. package/dist/types/src/features/IL-OTJ/_components/ViewFormUpdateCard.d.ts.map +1 -1
  371. package/dist/types/src/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.d.ts.map +1 -1
  372. package/dist/types/src/features/IL-OTJ/_components/_svg/ButtonCognitiveIcon.d.ts +1 -1
  373. package/dist/types/src/features/IL-OTJ/_components/_svg/ButtonCognitiveIcon.d.ts.map +1 -1
  374. package/dist/types/src/features/IL-OTJ/_components/_svg/ChevronIcon.d.ts +1 -0
  375. package/dist/types/src/features/IL-OTJ/_components/_svg/ChevronIcon.d.ts.map +1 -1
  376. package/dist/types/src/features/IL-OTJ/_components/_svg/LeftAndRightArrow.d.ts +1 -0
  377. package/dist/types/src/features/IL-OTJ/_components/_svg/LeftAndRightArrow.d.ts.map +1 -1
  378. package/dist/types/src/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.d.ts +98 -0
  379. package/dist/types/src/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.d.ts.map +1 -0
  380. package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.d.ts.map +1 -1
  381. package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.d.ts.map +1 -1
  382. package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
  383. package/dist/types/src/features/IL-marketplace/components/GuidelineLandingPage.d.ts +1 -1
  384. package/dist/types/src/features/IL-marketplace/components/GuidelineLandingPage.d.ts.map +1 -1
  385. package/dist/types/src/features/IL-marketplace/components/GuidelineLibrary.d.ts +3 -2
  386. package/dist/types/src/features/IL-marketplace/components/GuidelineLibrary.d.ts.map +1 -1
  387. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryCard.d.ts +2 -1
  388. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryCard.d.ts.map +1 -1
  389. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryContent.d.ts +2 -1
  390. package/dist/types/src/features/IL-marketplace/components/GuidelineLibraryContent.d.ts.map +1 -1
  391. package/dist/types/src/features/IL-marketplace/components/GuidelineStatusChip.d.ts +3 -2
  392. package/dist/types/src/features/IL-marketplace/components/GuidelineStatusChip.d.ts.map +1 -1
  393. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.d.ts +2 -6
  394. package/dist/types/src/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.d.ts.map +1 -1
  395. package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts +6 -1
  396. package/dist/types/src/features/IL-marketplace/components/LearningManagementWrapper.d.ts.map +1 -1
  397. package/dist/types/src/features/IL-marketplace/hooks/usePublishingFlowConfig.d.ts +3 -3
  398. package/dist/types/src/features/IL-marketplace/hooks/usePublishingFlowConfig.d.ts.map +1 -1
  399. package/dist/types/src/features/IL-marketplace/marketplaceTheme.d.ts +99 -0
  400. package/dist/types/src/features/IL-marketplace/marketplaceTheme.d.ts.map +1 -0
  401. package/dist/types/src/features/IL-marketplace/services/IL-marketplace.api.d.ts +25 -13
  402. package/dist/types/src/features/IL-marketplace/services/IL-marketplace.api.d.ts.map +1 -1
  403. package/dist/types/src/features/IL-marketplace/store/usePublishingFlowConfigStore.d.ts +2 -2
  404. package/dist/types/src/features/IL-marketplace/types.d.ts +12 -2
  405. package/dist/types/src/features/IL-marketplace/types.d.ts.map +1 -1
  406. package/dist/types/src/features/IL-marketplace/utils/addContextHelpers.d.ts +1 -0
  407. package/dist/types/src/features/IL-marketplace/utils/addContextHelpers.d.ts.map +1 -1
  408. package/dist/types/src/features/InstantLearning/InstantLearning.d.ts +2 -1
  409. package/dist/types/src/features/InstantLearning/InstantLearning.d.ts.map +1 -1
  410. package/dist/types/src/features/InstantLearning/_components/ChatComponent.d.ts +1 -0
  411. package/dist/types/src/features/InstantLearning/_components/ChatComponent.d.ts.map +1 -1
  412. package/dist/types/src/features/InstantLearning/_components/ContextualChatComponent.d.ts +1 -0
  413. package/dist/types/src/features/InstantLearning/_components/ContextualChatComponent.d.ts.map +1 -1
  414. package/dist/types/src/features/InstantLearning/_components/ContextualLearningForm.d.ts +1 -0
  415. package/dist/types/src/features/InstantLearning/_components/ContextualLearningForm.d.ts.map +1 -1
  416. package/dist/types/src/features/LearningManagement/AuditLog/AuditLog.d.ts.map +1 -1
  417. package/dist/types/src/features/LearningManagement/HumanChanges/HumanChange.d.ts +1 -0
  418. package/dist/types/src/features/LearningManagement/HumanChanges/HumanChange.d.ts.map +1 -0
  419. package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +8 -2
  420. package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
  421. package/dist/types/src/features/LearningManagement/LearningManagementTest.d.ts.map +1 -1
  422. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +1 -0
  423. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
  424. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
  425. package/dist/types/src/features/LearningManagement/RBAC/AccessPanel.d.ts.map +1 -1
  426. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts.map +1 -1
  427. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +1 -1
  428. package/dist/types/src/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts.map +1 -1
  429. package/dist/types/src/features/LearningManagement/RuleContent/ContentLogic.d.ts.map +1 -1
  430. package/dist/types/src/features/LearningManagement/RuleContent/DraftsAccordion.d.ts +18 -0
  431. package/dist/types/src/features/LearningManagement/RuleContent/DraftsAccordion.d.ts.map +1 -0
  432. package/dist/types/src/features/LearningManagement/RuleContent/RenameScopeModal.d.ts.map +1 -1
  433. package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
  434. package/dist/types/src/features/LearningManagement/RuleContent/RuleTierList.d.ts +2 -0
  435. package/dist/types/src/features/LearningManagement/RuleContent/RuleTierList.d.ts.map +1 -1
  436. package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts.map +1 -1
  437. package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts.map +1 -1
  438. package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts +2 -0
  439. package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts.map +1 -1
  440. package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +5 -5
  441. package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
  442. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +13 -0
  443. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
  444. package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts +13 -0
  445. package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
  446. package/dist/types/src/features/LearningManagement/components/PromptTextEditor.d.ts +1 -1
  447. package/dist/types/src/features/LearningManagement/components/PromptTextEditor.d.ts.map +1 -1
  448. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeMenu.d.ts.map +1 -1
  449. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
  450. package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +1 -1
  451. package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts +3 -3
  452. package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts.map +1 -1
  453. package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts +3 -0
  454. package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts.map +1 -1
  455. package/dist/types/src/features/LearningManagement/types.d.ts +10 -2
  456. package/dist/types/src/features/LearningManagement/types.d.ts.map +1 -1
  457. package/dist/types/src/features/LearningManagement/utils/learningFlow.d.ts +30 -0
  458. package/dist/types/src/features/LearningManagement/utils/learningFlow.d.ts.map +1 -0
  459. package/dist/types/src/features/LearningManagement/utils/saveDraft.d.ts +11 -0
  460. package/dist/types/src/features/LearningManagement/utils/saveDraft.d.ts.map +1 -0
  461. package/dist/types/src/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDrive.d.ts +1 -0
  462. package/dist/types/src/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDrive.d.ts.map +1 -1
  463. package/dist/types/src/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDriveButton.d.ts +1 -0
  464. package/dist/types/src/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDriveButton.d.ts.map +1 -1
  465. package/dist/types/src/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystem.d.ts +1 -0
  466. package/dist/types/src/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystem.d.ts.map +1 -1
  467. package/dist/types/src/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystemButton.d.ts +1 -0
  468. package/dist/types/src/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystemButton.d.ts.map +1 -1
  469. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/Dataset-collection.d.ts +1 -0
  470. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/Dataset-collection.d.ts.map +1 -1
  471. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/DatasetCollectionInfo.d.ts +1 -0
  472. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/DatasetCollectionInfo.d.ts.map +1 -1
  473. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/ProjectTaskSelect.d.ts +1 -0
  474. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/ProjectTaskSelect.d.ts.map +1 -1
  475. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/input-label-with-info.d.ts +1 -0
  476. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/Components/input-label-with-info.d.ts.map +1 -1
  477. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEF.d.ts +1 -0
  478. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEF.d.ts.map +1 -1
  479. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEFButton.d.ts +1 -0
  480. package/dist/types/src/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEFButton.d.ts.map +1 -1
  481. package/dist/types/src/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSet.d.ts +1 -0
  482. package/dist/types/src/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSet.d.ts.map +1 -1
  483. package/dist/types/src/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSetButton.d.ts +1 -0
  484. package/dist/types/src/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSetButton.d.ts.map +1 -1
  485. package/dist/types/src/index.d.ts +6 -0
  486. package/dist/types/src/index.d.ts.map +1 -1
  487. package/dist/types/src/methodsToExpose.d.ts +6 -1
  488. package/dist/types/src/methodsToExpose.d.ts.map +1 -1
  489. package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
  490. package/dist/types/src/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts.map +1 -1
  491. package/dist/types/src/service/ProjectService.d.ts +2 -2
  492. package/dist/types/src/service/SavedDataSetService.d.ts +8 -3
  493. package/dist/types/src/service/SavedDataSetService.d.ts.map +1 -1
  494. package/dist/types/src/utils/CustomSkeleton.d.ts +1 -0
  495. package/dist/types/src/utils/CustomSkeleton.d.ts.map +1 -1
  496. package/dist/types/src/utils/SkeletonLoader.d.ts +1 -0
  497. package/dist/types/src/utils/SkeletonLoader.d.ts.map +1 -1
  498. package/dist/types/src/utils/agentGenieAPI.d.ts +5 -9
  499. package/dist/types/src/utils/agentGenieAPI.d.ts.map +1 -1
  500. package/dist/utils/agentGenieAPI.js +1 -1
  501. package/package.json +39 -35
  502. package/dist/assets/csbrainicon.svg.js +0 -2
  503. package/dist/assets/csbrainicon.svg.js.map +0 -1
  504. package/dist/cjs/assets/csbrainicon.svg.js +0 -2
  505. package/dist/cjs/assets/csbrainicon.svg.js.map +0 -1
  506. package/dist/cjs/features/CognitiveSearch/CitationComponentMarkdownRender.js +0 -2
  507. package/dist/cjs/features/CognitiveSearch/CitationComponentMarkdownRender.js.map +0 -1
  508. package/dist/cjs/features/CognitiveSearch/CognitiveSearchErrorBoundary.js +0 -2
  509. package/dist/cjs/features/CognitiveSearch/CognitiveSearchErrorBoundary.js.map +0 -1
  510. package/dist/cjs/features/CognitiveSearch/CognitiveSearchResultCard.js +0 -2
  511. package/dist/cjs/features/CognitiveSearch/CognitiveSearchResultCard.js.map +0 -1
  512. package/dist/cjs/features/CognitiveSearch/CognitiveSearchResultCard.module.css.js +0 -2
  513. package/dist/cjs/features/CognitiveSearch/CognitiveSearchResultCard.module.css.js.map +0 -1
  514. package/dist/cjs/features/CognitiveSearch/CognitiveSearchWrapper.module.css.js +0 -2
  515. package/dist/cjs/features/CognitiveSearch/CognitiveSearchWrapper.module.css.js.map +0 -1
  516. package/dist/cjs/features/CognitiveSearch/cognitiveWrapper.js +0 -2
  517. package/dist/cjs/features/CognitiveSearch/cognitiveWrapper.js.map +0 -1
  518. package/dist/cjs/features/CognitiveSearch/rulebookcitation.js +0 -2
  519. package/dist/cjs/features/CognitiveSearch/rulebookcitation.js.map +0 -1
  520. package/dist/cjs/hooks/useQueries.js +0 -2
  521. package/dist/cjs/hooks/useQueries.js.map +0 -1
  522. package/dist/cjs/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
  523. package/dist/features/CognitiveSearch/CitationComponentMarkdownRender.js +0 -2
  524. package/dist/features/CognitiveSearch/CitationComponentMarkdownRender.js.map +0 -1
  525. package/dist/features/CognitiveSearch/CognitiveSearchErrorBoundary.js +0 -2
  526. package/dist/features/CognitiveSearch/CognitiveSearchErrorBoundary.js.map +0 -1
  527. package/dist/features/CognitiveSearch/CognitiveSearchResultCard.js +0 -2
  528. package/dist/features/CognitiveSearch/CognitiveSearchResultCard.js.map +0 -1
  529. package/dist/features/CognitiveSearch/CognitiveSearchResultCard.module.css.js +0 -2
  530. package/dist/features/CognitiveSearch/CognitiveSearchResultCard.module.css.js.map +0 -1
  531. package/dist/features/CognitiveSearch/CognitiveSearchWrapper.module.css.js +0 -2
  532. package/dist/features/CognitiveSearch/CognitiveSearchWrapper.module.css.js.map +0 -1
  533. package/dist/features/CognitiveSearch/cognitiveWrapper.js +0 -2
  534. package/dist/features/CognitiveSearch/cognitiveWrapper.js.map +0 -1
  535. package/dist/features/CognitiveSearch/rulebookcitation.js +0 -2
  536. package/dist/features/CognitiveSearch/rulebookcitation.js.map +0 -1
  537. package/dist/hooks/useQueries.js +0 -2
  538. package/dist/hooks/useQueries.js.map +0 -1
  539. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
  540. package/dist/types/src/features/CognitiveSearch/CitationComponentMarkdownRender.d.ts +0 -27
  541. package/dist/types/src/features/CognitiveSearch/CitationComponentMarkdownRender.d.ts.map +0 -1
  542. package/dist/types/src/features/CognitiveSearch/CognitiveSearchErrorBoundary.d.ts +0 -30
  543. package/dist/types/src/features/CognitiveSearch/CognitiveSearchErrorBoundary.d.ts.map +0 -1
  544. package/dist/types/src/features/CognitiveSearch/CognitiveSearchResultCard.d.ts +0 -33
  545. package/dist/types/src/features/CognitiveSearch/CognitiveSearchResultCard.d.ts.map +0 -1
  546. package/dist/types/src/features/CognitiveSearch/CognitiveSearchTestfile.d.ts +0 -3
  547. package/dist/types/src/features/CognitiveSearch/CognitiveSearchTestfile.d.ts.map +0 -1
  548. package/dist/types/src/features/CognitiveSearch/SearchResultSkeletonCard.d.ts +0 -3
  549. package/dist/types/src/features/CognitiveSearch/SearchResultSkeletonCard.d.ts.map +0 -1
  550. package/dist/types/src/features/CognitiveSearch/cognitiveParser.d.ts +0 -39
  551. package/dist/types/src/features/CognitiveSearch/cognitiveParser.d.ts.map +0 -1
  552. package/dist/types/src/features/CognitiveSearch/cognitiveSearch.types.d.ts +0 -110
  553. package/dist/types/src/features/CognitiveSearch/cognitiveSearch.types.d.ts.map +0 -1
  554. package/dist/types/src/features/CognitiveSearch/cognitiveWrapper.d.ts +0 -56
  555. package/dist/types/src/features/CognitiveSearch/cognitiveWrapper.d.ts.map +0 -1
  556. package/dist/types/src/features/CognitiveSearch/parseSearchResults.d.ts +0 -6
  557. package/dist/types/src/features/CognitiveSearch/parseSearchResults.d.ts.map +0 -1
  558. package/dist/types/src/features/CognitiveSearch/rulebookcitation.d.ts +0 -23
  559. package/dist/types/src/features/CognitiveSearch/rulebookcitation.d.ts.map +0 -1
  560. package/dist/types/src/hooks/useQueries.d.ts +0 -12
  561. package/dist/types/src/hooks/useQueries.d.ts.map +0 -1
  562. /package/dist/cjs/node_modules/{style-inject → .pnpm/style-inject@0.3.0/node_modules/style-inject}/dist/style-inject.es.js +0 -0
  563. /package/dist/node_modules/{style-inject → .pnpm/style-inject@0.3.0/node_modules/style-inject}/dist/style-inject.es.js +0 -0
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as i,jsx as t,Fragment as o}from"react/jsx-runtime";import{useState as n,useEffect as r}from"react";import{ChevronUp as l,ChevronDown as d}from"lucide-react";import a from"./TooltipComponent.js";import{useLearningTemplateStore as p}from"../../LearningManagement/store/useLearningTemplateStore.js";var s=function(s){var c,f,x=s.title,g=s.subtitle,h=s.children,u=s.defaultOpen,y=void 0===u||u,m=s.footerData,v=s.readOnly,b=void 0!==v&&v,F=s.variant,w=void 0===F?"default":F,C=s.expanded,S=s.onToggle,D=s.actionButtons,z=s.isAiStreaming,I=s.editFlow,k=void 0!==I&&I,E=s.showAccentBorder,T=s.alwaysShowActions,A=void 0!==T&&T,B=s.showTitlePill,R=void 0===B||B,W=n(y),j=W[0],L=W[1],O=p(function(e){return e.backwardCompatibility});r(function(){L(y)},[y]);var M=void 0!==C,N=M?C:j,V=function(){M?null==S||S():L(!N)},P="variant"===x.type,H="other"===x.type,q="tier-header"===w,$="rule-behavior"===w,G="other"===x.type&&x.required,J=x.label.replace(/\s*\d+\s*$/,"").trim()||"Variant",K=O?"#2563EB":"#5925DC",Q={padding:"12px 14px 0px 14px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",borderRadius:q?"0px":"8px",borderBottom:q?"1px solid #E2E8F0":"none"},U={alignItems:"center",gap:"8px",margin:0,fontSize:O?"12px":"14px",fontWeight:O?600:500,padding:H?"":"6px 10px",borderRadius:"4px",color:b?"#717b8c":q&&N?K:O?"#19213D":"#334155",backgroundColor:$&&!x.isNewVariant?"#F7F8FA":P?"#FDF2F8":x.isDefault?"#F7F8FA":"transparent",border:P?"1px solid #FCE7F3":x.isDefault?"1px solid #F0F2F5":"none"},X={badge:{display:"inline-flex",alignItems:"center",gap:"8px",backgroundColor:"#f0fdf4",color:"#367c46",padding:"6px 10px",borderRadius:"8px",border:"1px solid #e1f6e8",fontSize:"12px",fontWeight:"600",lineHeight:"1.2",width:"fit-content"},defaultTag:{backgroundColor:"#f0f4f8",color:"#475569",fontSize:"11px",fontWeight:"600",padding:"2px 8px",borderRadius:"4px",textTransform:"uppercase",border:"1px solid #cbd5e1"},modifiedTag:{boxSizing:"border-box",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"2px 8px",backgroundColor:"#FFFAE3",border:"1px solid #FDEDAA",borderRadius:"4px",color:"#854D0E",fontSize:"11px",fontWeight:"700",letterSpacing:"0.5px"}},Y={width:"100%",backgroundColor:"#ffffff",overflow:"hidden",border:q?"none":(null!=E?E:$)&&N?"1px solid ".concat(K):"1px solid #E2E8F0",borderRadius:"8px",marginBottom:"0px"};return i("div",e({style:Y},{children:[i("div",e({onClick:V,style:Q},{children:[i("div",e({style:{display:"flex",flexDirection:"column",gap:"4px",margin:0,fontSize:"12px",fontWeight:600,borderRadius:"4px"}},{children:[!x.isNewVariant&&R&&i("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[t("div",e({style:U},{children:x.label})),G&&t("span",e({style:{fontFamily:"Open Sans",fontWeight:600,fontSize:"12px",color:"#8F2C23"}},{children:"*"}))]})),x.isDefault&&t("span",e({style:X.defaultTag},{children:"Default"})),x.isModified&&t("span",e({style:X.modifiedTag},{children:"MODIFIED"}))]})),t("div",{children:x.isNewVariant&&R&&i("div",e({style:X.badge},{children:[t("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},{children:t("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})})),i("div",{children:["New ",J]})]}))}),g&&t("div",e({style:{fontFamily:"Inter",fontWeight:400,fontSize:"12px",lineHeight:"130%",color:"#64748B",marginTop:"4px"}},{children:g}))]})),i("div",e({style:{display:"flex",alignItems:"center",gap:"12px",paddingRight:"4px"}},{children:[D&&(!z||A)&&(k?t(a,e({description:"Coming Soon"},{children:t("div",e({onClick:function(e){return e.stopPropagation()},style:{cursor:"not-allowed",opacity:.6}},{children:t("div",e({style:{pointerEvents:"none"}},{children:D(N,function(){})}))}))})):t("div",e({onClick:function(e){return e.stopPropagation()}},{children:D(N,V)}))),t("div",e({onClick:V,style:{cursor:"pointer",display:"flex",alignItems:"center"}},{children:N?t(l,{size:18,color:q?K:"#64748B"}):t(d,{size:18,color:"#64748B"})}))]}))]})),!N&&m&&t("div",e({style:{fontSize:"12px",color:"#475569",fontWeight:400,padding:"0 16px 12px 16px",display:"flex",alignItems:"center",gap:"8px"}},{children:H?i(o,{children:[t("span",e({style:{fontWeight:500,color:"#475569"}},{children:m.ruleTitle||""})),(null!==(f=null===(c=m.tiers)||void 0===c?void 0:c.length)&&void 0!==f?f:0)>0&&i(o,{children:[t("div",{style:{width:"4px",height:"4px",backgroundColor:"#676970",borderRadius:"50%"}}),t("span",{children:Array.isArray(m.tiers)?m.tiers.join(", "):m.tiers})]})]}):t("span",e({style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:m.description}))})),N&&t("div",e({style:{padding:"4px 12px 12px 12px"}},{children:h}))]}))};export{s as default};
1
+ import{__assign as e}from"tslib";import{jsxs as i,jsx as r,Fragment as l}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{ChevronUp as n,ChevronDown as a}from"lucide-react";import d from"./TooltipComponent.js";import{useLearningTemplateStore as p}from"../../LearningManagement/store/useLearningTemplateStore.js";var s=function(s){var c,f,g=s.title,x=s.subtitle,v=s.children,u=s.defaultOpen,h=void 0===u||u,b=s.footerData,m=s.readOnly,y=void 0!==m&&m,w=s.variant,F=void 0===w?"default":w,C=s.expanded,S=s.onToggle,D=s.actionButtons,z=s.isAiStreaming,I=s.editFlow,k=void 0!==I&&I,T=s.showAccentBorder,A=s.alwaysShowActions,R=void 0!==A&&A,W=s.showTitlePill,B=void 0===W||W,E=o(h),j=E[0],L=E[1],O=p(function(e){return e.backwardCompatibility});t(function(){L(h)},[h]);var M=void 0!==C,N=M?C:j,V=function(){M?null==S||S():L(!N)},P="variant"===g.type,H="other"===g.type,q="tier-header"===F,$="rule-behavior"===F,G="other"===g.type&&g.required,J=g.label.replace(/\s*\d+\s*$/,"").trim()||"Variant",K="var(--il-primary, #2563EB)",Q={padding:"12px 14px 0px 14px",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",borderRadius:q?"0px":"8px",borderBottom:q?"1px solid var(--il-border,#e2e8f0)":"none"},U={alignItems:"center",gap:"8px",margin:0,fontSize:O?"12px":"14px",fontWeight:O?600:500,padding:H?"":"6px 10px",borderRadius:"4px",color:y?"var(--il-disabled,#717b8c)":q&&N?K:"var(--il-foreground,#19213d)",backgroundColor:$&&!g.isNewVariant?"var(--il-surface-alt, #F7F8FA)":P?"var(--il-variant-pill-bg, var(--il-surface-alt, #FDF2F8))":g.isDefault?"var(--il-surface-alt, #F7F8FA)":"transparent",border:P?"1px solid var(--il-variant-pill-border, var(--il-border, #FCE7F3))":g.isDefault?"1px solid var(--il-border, #F0F2F5)":"none"},X={badge:{display:"inline-flex",alignItems:"center",gap:"8px",backgroundColor:"var(--il-success-subtle,#f0fdf4)",color:"var(--il-success,#367c46)",padding:"6px 10px",borderRadius:"8px",border:"1px solid var(--il-color-e1f6e8,#e1f6e8)",fontSize:"12px",fontWeight:"600",lineHeight:"1.2",width:"fit-content"},defaultTag:{backgroundColor:"var(--il-badge-bg,#f0f4f8)",color:"var(--il-badge-fg,#475569)",fontSize:"11px",fontWeight:"600",padding:"2px 8px",borderRadius:"4px",textTransform:"uppercase",border:"1px solid var(--il-border,#cbd5e1)"},modifiedTag:{boxSizing:"border-box",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"2px 8px",backgroundColor:"var(--il-warning-subtle,#FFFAE3)",border:"1px solid var(--il-color-fdedaa,#FDEDAA)",borderRadius:"4px",color:"var(--il-warning,#854D0E)",fontSize:"11px",fontWeight:"700",letterSpacing:"0.5px"}},Y={width:"100%",backgroundColor:"var(--il-surface,#ffffff)",color:"var(--il-foreground,inherit)",overflow:"hidden",border:q?"none":(null!=T?T:$)&&N?"1px solid ".concat(K):"1px solid var(--il-border,#e2e8f0)",borderRadius:"8px",marginBottom:"0px"};return i("div",e({style:Y},{children:[i("div",e({onClick:V,style:Q},{children:[i("div",e({style:{display:"flex",flexDirection:"column",gap:"4px",margin:0,fontSize:"12px",fontWeight:600,borderRadius:"4px"}},{children:[!g.isNewVariant&&B&&i("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[r("div",e({style:U},{children:g.label})),G&&r("span",e({style:{fontFamily:"Open Sans",fontWeight:600,fontSize:"12px",color:"var(--il-danger,#8F2C23)"}},{children:"*"}))]})),g.isDefault&&r("span",e({style:X.defaultTag},{children:"Default"})),g.isModified&&r("span",e({style:X.modifiedTag},{children:"MODIFIED"}))]})),r("div",{children:g.isNewVariant&&B&&i("div",e({style:X.badge},{children:[r("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},{children:r("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})})),i("div",{children:["New ",J]})]}))}),x&&r("div",e({style:{fontFamily:"Inter",fontWeight:400,fontSize:"12px",lineHeight:"130%",color:"var(--il-muted,#64748b)",marginTop:"4px"}},{children:x}))]})),i("div",e({style:{display:"flex",alignItems:"center",gap:"12px",paddingRight:"4px"}},{children:[D&&(!z||R)&&(k?r(d,e({description:"Coming Soon"},{children:r("div",e({onClick:function(e){return e.stopPropagation()},style:{cursor:"not-allowed",opacity:.6}},{children:r("div",e({style:{pointerEvents:"none"}},{children:D(N,function(){})}))}))})):r("div",e({onClick:function(e){return e.stopPropagation()}},{children:D(N,V)}))),r("div",e({onClick:V,style:{cursor:"pointer",display:"flex",alignItems:"center"}},{children:N?r(n,{size:18,color:q?K:"var(--il-muted,#64748B)"}):r(a,{size:18,color:"var(--il-muted,#64748B)"})}))]}))]})),!N&&b&&r("div",e({style:{fontSize:"12px",color:"var(--il-secondary-fg,#475569)",fontWeight:400,padding:"0 16px 12px 16px",display:"flex",alignItems:"center",gap:"8px"}},{children:H?i(l,{children:[r("span",e({style:{fontWeight:500,color:"var(--il-secondary-fg,#475569)"}},{children:b.ruleTitle||""})),(null!==(f=null===(c=b.tiers)||void 0===c?void 0:c.length)&&void 0!==f?f:0)>0&&i(l,{children:[r("div",{style:{width:"4px",height:"4px",backgroundColor:"var(--il-muted,#676970)",borderRadius:"50%"}}),r("span",{children:Array.isArray(b.tiers)?b.tiers.join(", "):b.tiers})]})]}):r("span",e({style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:b.description}))})),N&&r("div",e({style:{padding:"4px 12px 12px 12px"}},{children:v}))]}))};export{s as default};
2
2
  //# sourceMappingURL=AccordianSection.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as e,__spreadArray as n,__assign as t,__awaiter as o,__generator as i,__rest as r}from"tslib";import{jsx as a,jsxs as s,Fragment as l}from"react/jsx-runtime";import{useRef as c,useState as d,useMemo as u,useEffect as v,useCallback as m,useLayoutEffect as h}from"react";import{keyframes as p,Dialog as g,Box as f}from"@mui/material";import C from"@mui/material/Tooltip";import b from"react-markdown";import y from"rehype-raw";import{http as S}from"../../../../api/transport.js";import{v4 as w}from"uuid";import{stopStreaming as x,startChatStream as k}from"@e-llm-studio/streaming-response";import{WatchMeWork as I}from"@e-llm-studio/watch-me-work";import T from"./ChatHeader.js";import _ from"../MessageRendering/MessageRendering.js";import{Skeleton as E}from"../atoms/SkeletonLoader/SkeletonLoader.js";import{ActionableButton as M}from"../MessageRendering/ClickableChatComponents.js";import R from"../AudioWaveform.js";import D from"./ChatComponent.module.css.js";import N from"../../InstantLearning.module.css.js";import{ScrollToBottom as q}from"../_svg/ScrollToBottom.js";import{useHeaderObserver as F,extractTextFromChildren as L}from"../../helpers/utils.js";import{SendButton as A}from"../_svg/SendButton.js";import W from"../_svg/SparkleIcon.js";import{UserIcon as P}from"../_svg/UserIcon.js";var z,j=function(e,n){return S.post("".concat(e||"https://devllmstudio.creativeworkspace.ai","/api/chat/chatResponse"),{name:"ilggcautopromptgen",organizationName:"techolution",prompt:n||"Generate a query"},{headers:{"Content-Type":"application/json"},withCredentials:!0}).then(function(e){return e.data}).catch(function(e){throw console.error("Error calling auto-generate API:",e),e})},B=function(j){var B=j.chatAssistantName,O=j.organizationName,H=j.baseUrl,U=j.baseWebsocketUrl,G=j.setIsNewChatClicked;j.ThinkingBulbIconComponent;var Z=j.isFormSaveClicked,K=j.setIsFormSavedClicked,V=j.onResetLearningData,Q=j.sendMessageInChat,J=j.setSendMessageInChat,$=j.isFormValidating,X=j.chatTitle,Y=j.customMetaData,ee=j.headerMessageHandlers;j.aiResponse;var ne=j.setAIResponse,te=j.onResetChat,oe=j.initialChatMessage,ie=void 0===oe?"":oe,re=j.onSave,ae=j.chatSize,se=j.setChatSize,le=j.movingTowards,ce=j.setCitations,de=j.textareaPlaceholder,ue=void 0===de?"Tell me more about this learning...":de,ve=j.setCurrentRequestId,me=j.showSavedMessage,he=void 0!==me&&me,pe=j.savedMessage,ge=j.isError,fe=void 0!==ge&&ge,Ce=j.errorMessage,be=void 0===Ce?"There was an error saving your changes.":Ce;j.isSaving;var ye=j.isHighlighted,Se=void 0!==ye&&ye,we=j.onStreamingStateChange,xe=j.onViewComparison;j.isCopyEnabled;var ke=j.onComparisonLinkClick,Ie=j.onSubmitFeedback,Te=j.userDetails,_e=j.isGlobalEditActive,Ee=j.socketTimeOutInMilliSeconds,Me=j.initialDraftMessage,Re=void 0===Me?"":Me,De=j.onValidateSession,Ne=j.onCloseSessionModal,qe=j.fieldLabelMap,Fe=j.enableChatLogs,Le=void 0!==Fe&&Fe,Ae=B,We=c("".concat(Ae,"-").concat(O,"-").concat(w())),Pe=c("".concat(w())),ze=H,je=c(null),Be=c(!0),Oe=c(null),He=c(null),Ue=d(Re),Ge=Ue[0],Ze=Ue[1],Ke=d([]),Ve=Ke[0],Qe=Ke[1],Je=d(!1),$e=Je[0],Xe=Je[1],Ye=d(!1);Ye[0];var en=Ye[1],nn=d(!0),tn=nn[0],on=nn[1],rn=d(!0);rn[0];var an=rn[1],sn=d("");sn[0];var ln=sn[1],cn=d(""),dn=cn[0],un=cn[1],vn=d(!1),mn=vn[0],hn=vn[1],pn=d(!1),gn=pn[0],fn=pn[1],Cn=d(!0),bn=Cn[0],yn=Cn[1],Sn=d("100%");Sn[0];var wn=Sn[1],xn=d(null),kn=xn[0],In=xn[1],Tn=d(!1);Tn[0];var _n=Tn[1],En=d(!1),Mn=En[0],Rn=En[1],Dn=c(null),Nn=c(new Set),qn=d(null),Fn=qn[0],Ln=qn[1],An=d(!1),Wn=An[0],Pn=An[1],zn=d(!1);zn[0],zn[1];var jn=d(null);jn[0],jn[1],c(null),c(null);var Bn=c(new Map),On=c(""),Hn=c(new Set),Un=c(new Map),Gn=c(!1),Zn=c(0),Kn=c(new Map),Vn=c(null),Qn=d(!1),Jn=Qn[0],$n=Qn[1];p(z||(z=e(["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "],["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "])));var Xn=u(function(){return""===(null==Ge?void 0:Ge.trim())||mn},[Ge,mn]),Yn=u(function(){return $},[$]),et=u(function(){var e;return Ve.length>0&&"user"===(null===(e=Ve[Ve.length-1])||void 0===e?void 0:e.role)},[Ve]),nt=u(function(){return Xn||$||!!_e||et},[Xn,$,_e,et]);v(function(){Re&&!Ge&&(Ze(Re),fn(!0),setTimeout(function(){if(He.current){He.current.focus();var e=Re.length;He.current.setSelectionRange(e,e)}},400))},[Re]),v(function(){null==we||we(mn)},[mn,we]),v(function(){return function(){Kn.current.forEach(function(e){return clearTimeout(e)}),Kn.current.clear()}},[]),v(function(){var e=je.current,n=function(){if(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;yn(t-n-o<=20)}};return e&&(e.addEventListener("scroll",n),n()),function(){e&&e.removeEventListener("scroll",n)}},[Ve]);var tt=F({handlers:ee,setResult:ne}).processHeaderMessage;v(function(){he&&Rn(!0)},[he]),v(function(){if(Wn){var e=setTimeout(function(){Pn(!1)},3e3);return function(){return clearTimeout(e)}}},[Wn]),v(function(){Z&&!_e&&(ut(new KeyboardEvent("keydown",{key:"Enter"}),!1,"Save this Learning"),K(!1))},[Z]),v(function(){if(Q)try{if(Q.startsWith("__SKELETON__:")){var e=Q.split(":"),o=e[1],i=e.slice(2).join(":"),r={role:"user",content:"",id:o,time:new Date,isSkeleton:!0,skeletonContent:i};return Qe(function(e){return n(n([],e,!0),[r],!1)}),ut(new KeyboardEvent("keydown",{key:"Enter"}),!1,i,!1,o),Ln(o),J&&J(""),void setTimeout(function(){Ln(null)},2e3)}if(Q.startsWith("__SKELETON_END__::")){var a=Q.split("::")[1]||"";return Qe(function(e){return e.map(function(e){return e.isSkeleton?t(t({},e),{isSkeleton:!1,content:e.skeletonContent||a}):e})}),void(J&&J(""))}var s=w();ut(new KeyboardEvent("keydown",{key:"Enter"}),!1,Q,!1,s),Ln(s),J&&J(""),setTimeout(function(){return Ln(null)},2e3)}catch(e){console.error("Error handling sendMessageInChat signal",e)}},[Q]),v(function(){it(),rt();var e=function(){var e,n=(null===(e=null==Dn?void 0:Dn.current)||void 0===e?void 0:e.clientHeight)||0,t="calc(100% - ".concat(n,"px - 10px)");wn(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var ot=m(function(e){var n="string"==typeof e?e:"smooth";Oe.current&&Oe.current.scrollIntoView({behavior:n,block:"end"}),Be.current&&setTimeout(function(){Oe.current&&Be.current&&Oe.current.scrollIntoView({behavior:n,block:"end"})},100)},[]);v(function(){if(!mn){var e="";if(Mn?e=pe||"Thank you teacher for teaching me, your rule has been saved successfully.":fe&&(e=be||"I'm sorry, I couldn't save your changes. Please try again."),e){var t={role:"assistant",content:e,id:w(),citations:[],time:new Date};Qe(function(e){return n(n([],e,!0),[t],!1)}),Rn(!1),setTimeout(function(){return ot("smooth")},100)}}},[Mn,fe,mn,pe,be,ot]),v(function(){Be.current&&ot("smooth")},[ot]);var it=function(){var e={method:"get",maxBodyLength:1/0,url:"".concat(ze,"/api/chatbot/getChatSettings?name=").concat(Ae,"&organizationName=").concat(O),headers:{}};S.request(e).then(function(e){var n,t,o;(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.chatSettings)&&""!==(null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.chatSettings)||void 0===o?void 0:o.chatInitialMessage)&&an(!0)}).catch(function(e){console.error(e)})},rt=function(){return o(void 0,void 0,void 0,function(){var e,n;return i(this,function(t){e="".concat(ze,"/api/chat/history?name=").concat(Ae,"&organizationName=").concat(O);try{n={method:"GET",params:{guestSessionId:We.current},withCredentials:!0},S.get(e,n).then(function(e){var n=e.data;n.length>0?(Qe(n),ot()):an(!0)}).catch(function(e){console.error(e)})}catch(e){Xe(!1),console.error(e)}return[2]})})},at=function(){var e="".concat(ze,"/api/chat/resetHistory?name=").concat(Ae,"&organizationName=").concat(O);try{var n={method:"GET",params:{guestSessionId:We.current},withCredentials:!0};S.get(e,n).then(function(){G(!0),ln(""),In(null),Nn.current.clear(),Un.current.clear(),Pe.current="".concat(w()),Qe([]),an(!0),Vn.current=null,null==te||te(),V&&V()}).catch(function(e){console.error(e)}).finally(function(){We.current="".concat(Ae,"-").concat(O,"-").concat(w())})}catch(e){Xe(!1),console.error(e)}};function st(e){return null==e?void 0:e.replace(/<a [^>]*>.*?<\/a>/g,function(e){return null==e?void 0:e.replace(/\*/g,"&ast;")})}var lt=function(e,o,i,r,a,s,l){var c,d,u,v,m,h,p,g,f,C,b,y,S,x,k,I,T,_,E,M,R,D,N,q,F,L,A,W,P,z;if(null===(d=null===(c=null==e?void 0:e.chatStream)||void 0===c?void 0:c.continueChatResult)||void 0===d?void 0:d.header_message){var j={header_message:e.chatStream.continueChatResult.header_message,responsedata:null===(m=null===(v=null===(u=null==e?void 0:e.chatStream)||void 0===u?void 0:u.continueChatResult)||void 0===v?void 0:v.message)||void 0===m?void 0:m.content};tt(j)}var B=null===(h=null==e?void 0:e.chatStream)||void 0===h?void 0:h.continueChatResult,O=null==B?void 0:B.isEnd,H=(null===(p=null==B?void 0:B.message)||void 0===p?void 0:p.citations)||[];O&&H.length>0&&ce&&ce(H);var U={role:"assistant",content:"",id:w()};if(null===(b=null===(C=null===(f=null===(g=null==e?void 0:e.chatStream)||void 0===g?void 0:g.continueChatResult)||void 0===f?void 0:f.message)||void 0===C?void 0:C.content)||void 0===b?void 0:b.includes("WaitMessage: "))en(!0),U.content=function(e){var n="WaitMessage: ",t=e.indexOf(n);if(-1!==t){var o=e.substring(t+13);return null==o?void 0:o.replaceAll("WaitMessage: ","")}return""}((null===(x=null===(S=null===(y=null==e?void 0:e.chatStream)||void 0===y?void 0:y.continueChatResult)||void 0===S?void 0:S.message)||void 0===x?void 0:x.content)+"\n\n"),""!==U.content&&(Xe(!1),Qe(n(n([],Ve,!0),[{role:"user",content:a,time:r,isFirstQuestionSent:s||!1,id:l||(null===(I=null===(k=null==e?void 0:e.chatStream)||void 0===k?void 0:k.continueChatResult)||void 0===I?void 0:I.requestId)||"",reply:""},U],!1)));else{en(!1);var G=null===(_=null===(T=null==e?void 0:e.chatStream)||void 0===T?void 0:T.continueChatResult)||void 0===_?void 0:_.requestId;"string"==typeof G&&G&&ve&&ve(G);var Z=function(e,o,i,r){var a,s,l,c,d,u,v,m={role:"assistant",content:"",id:w(),time:new Date,citations:[]},h=(null===(a=null==e?void 0:e.chatStream)||void 0===a?void 0:a.continueChatResult)||{},p=null==h?void 0:h.requestId,g=null==h?void 0:h.preserve_message,f=null==h?void 0:h.isEnd,C=(null===(s=null==h?void 0:h.message)||void 0===s?void 0:s.content)||"",b=null==h?void 0:h.is_orchestrator,y=null==h?void 0:h.thinking_break,S=(null===(l=null==h?void 0:h.message)||void 0===l?void 0:l.citations)||[];if(p&&g&&C&&!f){var x=r.current.get(p)||[];x[x.length-1]!==C&&(x.push(C),r.current.set(p,x))}var k=(p&&r.current.get(p)||[]).join("\n\n"),I="";if(f)I=k&&""!==k.trim()?k:C;else if(g)I=k;else{var T=C.replace(/<!--(?![\s\S]*-->)[\s\S]*$/,"").trimEnd(),_=!1===b||y||0!==S.length?"":T;I=k?"".concat(k,"\n\n").concat(_):_}if(m.content=st(I),!0===(null==h?void 0:h.thinking_break)&&!0===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)&&o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1}),!1===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){if(h.explainability_id&&h.responded_by){var E=h.explainability_id,M=h.responded_by;i.has(E)||i.set(E,{responded_by:M,index:o.length})}i.has(h.explainability_id)?o[null==(R=i.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(c=h.explainability_id)&&void 0!==c?c:"",isParallelToolResponse:!0}:o=n(n([],o,!0),[{responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(d=h.explainability_id)&&void 0!==d?d:"",isParallelToolResponse:!1}],!1)}if(!0===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){var R;h.explainability_id&&h.responded_by&&(E=h.explainability_id,M=h.responded_by,i.has(E)||i.set(E,{responded_by:M,index:o.length})),i.has(h.explainability_id)?o[null==(R=i.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(u=h.explainability_id)&&void 0!==u?u:"",isParallelToolResponse:!0}:o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(v=h.explainability_id)&&void 0!==v?v:"",isParallelToolResponse:!1})}return t({orchestratorAndAgentsMessages:o},m)}(e,i,o,Un);Z.time=new Date,Z.citations=H,Z.isEnd=null===(M=null===(E=null==e?void 0:e.chatStream)||void 0===E?void 0:E.continueChatResult)||void 0===M?void 0:M.isEnd,Z.requestId=null===(D=null===(R=null==e?void 0:e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===D?void 0:D.requestId,Z.sessionId=We.current,null===(N=Z.orchestratorAndAgentsMessages)||void 0===N||N.forEach(function(e){e&&e.header_message&&tt(e)}),(""!==(null==Z?void 0:Z.content)||(null==Z?void 0:Z.orchestratorAndAgentsMessages)&&(null==Z?void 0:Z.orchestratorAndAgentsMessages.length)>0)&&(Xe(!1),Qe(n(n([],Ve,!0),[{role:"user",content:a||"",time:r,isFirstQuestionSent:s||!1,id:l||(null===(F=null===(q=null==e?void 0:e.chatStream)||void 0===q?void 0:q.continueChatResult)||void 0===F?void 0:F.requestId)||"",requestId:null!==(W=null===(A=null===(L=null==e?void 0:e.chatStream)||void 0===L?void 0:L.continueChatResult)||void 0===A?void 0:A.requestId)&&void 0!==W?W:""},Z],!1))),on(null===(z=null===(P=null==e?void 0:e.chatStream)||void 0===P?void 0:P.continueChatResult)||void 0===z?void 0:z.isEnd)}},ct=m(function(e,t){void 0===t&&(t="inactivity"),console.error("🛑 Stream failed or timed out due to:reason=".concat(t," requestId=").concat(e," at ").concat((new Date).toISOString()));var o=Kn.current.get(e);o&&(clearTimeout(o),Kn.current.delete(e)),e&&U&&(x(e,U,!1),Un.current.delete(e)),e===On.current?(Gn.current=!1,on(!0),hn(!1),_n(!1),Xe(!1),en(!1),Qe(function(e){var o=n([],e,!0).reverse().find(function(e){return"user"===e.role}),i=((null==o?void 0:o.content)||"").replace(/"/g,"&quot;"),r=n([],e,!0),a=r[r.length-1];a&&"assistant"===a.role&&!a.isEnd&&r.pop();var s="I ran into an unexpected issue while trying to process this learning.";return"inactivity"===t?s="Something went wrong—teaching is taking longer than expected.":"websocket_error"===t&&(s="I lost connection to the server while working on that."),n(n([],r,!0),[{role:"assistant",content:"".concat(s,' Please try again.\n\n<button class="clickable-button" data-value="').concat(i,'">Retry</button>'),id:w(),time:new Date,isEnd:!0,citations:[]}],!1)})):console.warn("🛑 [handleStreamTimeout] Ignoring stale timeout for superseded requestId=".concat(e,"; active=").concat(On.current))},[Ee,U]),dt=m(function(e){var n=Kn.current.get(e);if(n&&clearTimeout(n),Ee&&Ee>0){console.log("⏱️ [Timeout armed] requestId=".concat(e," timeout=").concat(Ee,"ms at ").concat((new Date).toISOString()));var t=setTimeout(function(){console.warn("⏱️ [Timeout FIRED — auto stop] requestId=".concat(e," at ").concat((new Date).toISOString())),ct(e,"inactivity")},Ee);Kn.current.set(e,t)}},[ct,Ee]),ut=function(e,r,a,s,l,c){return o(void 0,void 0,void 0,function(){var o,s,d,u,v,m,h,p,g,f,C,b,y,S,x,I;return i(this,function(i){switch(i.label){case 0:if(o=(void 0!==a?a:Ge||"").trim(),(s="Enter"===(null==e?void 0:e.key)&&!(null==e?void 0:e.shiftKey)&&!_e)&&(null===(C=null==e?void 0:e.preventDefault)||void 0===C||C.call(e)),d="user"===(null===(b=Ve[Ve.length-1])||void 0===b?void 0:b.role),!o||mn||Gn.current||d||(null==e?void 0:e.key)&&!s)return[2];if(Vn.current||(Vn.current=(new Date).toISOString(),console.log("Session start time set to ".concat(Vn.current))),!De)return[3,5];Xe(!0),un("Validating session..."),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,De(Vn.current)];case 2:return i.sent()?[3,4]:($n(!0),Xe(!1),c&&c(!1),[2]);case 3:return u=i.sent(),console.error("Validation error:",u),$n(!0),Xe(!1),c&&c(!1),[2];case 4:Xe(!1),i.label=5;case 5:return Gn.current=!0,"I want to add a rule description"===o?(on(!1),Be.current=!0,hn(!0),!kn&&o&&In(a||"manual_entry"),v=new Date,Qe(function(e){return n(n([],e.map(function(e,n){var o;return t(t({},e),{content:null===(o=st(e.content))||void 0===o?void 0:o.replace("WaitMessage: ","")})}),!0),[{role:"user",content:o,time:v,isFirstQuestionSent:!1,id:l||w()}],!1)}),ot("smooth"),setTimeout(function(){Qe(function(e){return n(n([],e,!0),[{role:"assistant",content:"I'd be happy to help you set up a new rule! To get started, could you tell me what kind of behavior or logic you would like this rule to follow?",id:w(),citations:[],time:new Date}],!1)}),ot("smooth"),setTimeout(function(){hn(!1),on(!0)},500)},500),[2]):(on(!1),Be.current=!0,hn(!0),!kn&&o&&In(a||"manual_entry"),m=new Date,Qe(function(e){var i=e.map(function(e){var n;return t(t({},e),{content:null===(n=st(e.content))||void 0===n?void 0:n.replace("WaitMessage: ","")})});return l&&i.some(function(e){return e.id===l})?i.map(function(e){return e.id===l?t(t({},e),{content:o}):e}):n(n([],i,!0),[{role:"user",content:o,time:m,isFirstQuestionSent:!1,id:l||w()}],!1)}),ot("smooth"),h=new Map,p=[],g=function(e){var n;if(!e)return{};var t=Object.keys(e);return 1===t.length&&"current"===t[0]?null!==(n=e.current)&&void 0!==n?n:{}:e},f={WEBSOCKET_URL:U,organizationName:O,chatAssistantName:Ae,selectedAIModel:"gpt-4",replyMessage:"",userName:null!==(y=null==Te?void 0:Te.name)&&void 0!==y?y:"Guest User",userEmailId:null!==(S=null==Te?void 0:Te.email)&&void 0!==S?S:"guestUser@example.com",userId:null!==(x=null==Te?void 0:Te.id)&&void 0!==x?x:"Guest User",query:o,requestId:"requestId-".concat(w()),customPrompt:"",enableForBackend:!1,guestSessionId:We.current,chatPreviewId:Pe.current,customMetaData:g(Y),aiModel:"",enableLogs:!0,logControls:{infoLogs:Le,debugLogs:Le},onStreamEvent:function(e){var n,t,i,a,s,c,d=null===(t=null===(n=null==e?void 0:e.chatStream)||void 0===n?void 0:n.continueChatResult)||void 0===t?void 0:t.requestId,u=null===(a=null===(i=null==e?void 0:e.chatStream)||void 0===i?void 0:i.continueChatResult)||void 0===a?void 0:a.header_message;console.log("📦 [Stream Chunk Received] With RequestID and header_message: ".concat(d,",").concat(u)),dt(f.requestId);var v=null===(c=null===(s=null==e?void 0:e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===c?void 0:c.error_state;if(Array.isArray(v)&&v.length>0)return console.error("⚠️ Agent returned an error_state during stream:",{requestId:d,errorState:v}),void ct(f.requestId,"agent_error");lt(e,h,p,m,o,r,l)},onStreamEnd:function(e){var o,i,r=null===(i=null===(o=null==e?void 0:e.chatStream)||void 0===o?void 0:o.continueChatResult)||void 0===i?void 0:i.requestId;Hn.current.add(f.requestId),console.log("✅ [Stream Completed] RequestID: ".concat(r));var a=Kn.current.get(f.requestId);a&&(clearTimeout(a),Kn.current.delete(f.requestId)),Gn.current=!1,on(!0),hn(!1),_n(!1);var s=Date.now(),l=Bn.current.get(f.requestId);if(l){var c=Math.round((s-l)/1e3).toFixed(1);Qe(function(e){var o=n([],e,!0).reverse().findIndex(function(e){return"assistant"===e.role});if(-1===o)return e;var i=e.length-1-o;return e.map(function(e,n){return n===i?t(t({},e),{finalTimeTaken:c}):e})})}},onError:function(e){var n=Kn.current.get(f.requestId);if(n&&(clearTimeout(n),Kn.current.delete(f.requestId)),Hn.current.has(f.requestId))return console.warn("Ignoring post-completion error for already-finished request:",f.requestId),void Hn.current.delete(f.requestId);console.error("Stream error:",e),ct(f.requestId,"websocket_error")}},o&&(Xe(!0),null===(I=He.current)||void 0===I||I.blur(),Ze(""),ot(),un(l?"Just a moment, processing your request...":"Okay, got it. Let me take a moment to work on this and I'll get back to you shortly."),Bn.current.set(f.requestId,Date.now()),On.current=f.requestId,console.log("Chat Stream Params:",f),dt(f.requestId),Zn.current+=1,console.log("🚀 [UI Action] stream started (Total UI invocations: ".concat(Zn.current,") | RequestID: ").concat(f.requestId,' | Query: "').concat(o,'"')),k(f)),c&&c(!1),[2])}})})},vt=c(null);h(function(){vt.current=ut});var mt=m(function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return null===(e=vt.current)||void 0===e?void 0:e.call.apply(e,n([vt],t,!1))},[]),ht=u(function(){return{p:function(e){e.node;var n=e.children;return r(e,["node","children"]),a("div",t({style:{margin:0,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px",fontFamily:"inherit"}},{children:n}))},button:function(e){e.node;var n=e.className,o=e.children,i=r(e,["node","className","children"]),l=L(o),c=i["data-value"],d="Tester Genie"===l;return a(M,t({},i,{className:n,handleStream:mt,isStreamEnd:tn,disabled:!!kn||!!_e,isLastMessage:!0,style:{margin:0},isTesterGenie:d,"data-selected":kn===l||kn===c?"true":kn?"false":void 0},{children:s("span",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o,d&&s("svg",t({width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[a("path",{d:"M7.20368 8.94768e-06C7.48895 -0.00208639 7.69331 0.364327 7.83856 0.57465C8.14381 1.01633 8.38012 1.87909 7.71077 2.14118C8.57167 2.21011 9.70406 2.93098 10.1785 3.64699C10.5932 4.27286 10.4559 5.16037 9.80301 5.56007L9.9502 7.16593C9.97671 7.44871 10.0265 7.87092 10.0299 8.14457C10.4213 8.23046 11.0787 8.55391 11.326 8.87592C11.5979 8.75656 11.9189 8.76963 12.1688 8.93469C12.3563 8.67751 12.5598 8.41456 12.7507 8.15787C12.3283 7.45155 12.5047 6.57745 13.2143 6.13784C13.5375 5.9377 13.9264 5.87277 14.2971 5.95705C14.0961 6.30964 13.8775 6.72182 13.6593 7.05857C13.7906 7.2436 13.9184 7.44225 14.044 7.63194L14.8022 7.63198C15.0349 7.30106 15.2515 6.90827 15.4835 6.59349C15.8623 7.0712 15.8156 7.79671 15.4734 8.28241C15.1318 8.76741 14.4886 8.9899 13.9118 8.88251C13.758 9.12108 13.5577 9.39243 13.3941 9.63201C13.7143 9.9316 13.7725 10.364 13.4067 10.6594C13.5231 10.8889 13.5309 11.1613 13.447 11.402C13.1502 12.2523 12.1724 12.5645 11.3474 12.5025C11.1171 12.4852 10.939 12.4698 10.7197 12.3953C10.8724 13.1271 10.7744 14.2031 10.5132 14.9051C10.1688 15.8304 9.43632 16.5569 8.54503 16.9655C7.90465 17.2706 7.21222 17.3607 6.50472 17.4505C5.74445 17.5471 4.75801 17.4362 4.08533 17.825C3.9327 17.9132 3.86566 18.0173 3.82943 18.1792C3.94996 18.5982 4.47858 18.6063 4.78474 18.8897C5.20191 19.2758 4.90716 19.9663 4.36611 19.9908C4.31476 19.9931 4.26867 19.9867 4.23186 19.9493C4.23089 19.8303 4.47587 19.7199 4.49787 19.5262C4.55075 19.0604 3.70014 19.0078 3.37835 18.8374C3.13013 18.706 2.99537 18.6309 2.82242 18.4021C2.63795 18.1579 2.58428 17.835 2.63138 17.5392C2.74868 16.7847 3.47123 16.393 4.12184 16.1497C4.61314 15.9659 5.46304 15.7158 5.52019 15.0793C5.58589 14.348 4.97543 13.5523 4.57739 12.9807C4.44275 12.7875 4.3039 12.579 4.16309 12.3919C4.18987 12.365 4.21049 12.3463 4.23916 12.3212C4.59619 12.6218 5.21209 12.6421 5.55038 12.2979C5.70457 12.144 5.78974 11.9342 5.78642 11.7164C5.78121 11.4493 5.63382 11.2002 5.4454 11.019C5.44704 10.9932 5.44824 10.9676 5.449 10.9419C5.4566 10.6648 5.37505 10.4902 5.1892 10.2943C5.18398 10.2538 5.17776 10.2134 5.17053 10.1732C5.08123 9.69297 4.71708 9.34182 4.23415 9.27108C4.16418 9.26083 3.96108 9.26105 3.92071 9.23344C3.90485 9.1828 3.9059 9.20792 3.91904 9.15527C4.22103 8.90139 4.14407 8.78214 4.31107 8.4846C4.42301 8.28513 4.73047 8.15239 4.95452 8.10701C4.96167 7.51076 5.03684 6.88562 5.10036 6.29144C5.12451 6.0655 5.12531 5.75046 5.1511 5.55257C4.11108 4.86747 4.39091 3.75946 5.25465 3.06391C5.84978 2.58469 6.34496 2.31002 7.10143 2.14517C7.01589 2.10416 6.93842 2.04811 6.87269 1.97972C6.77021 1.87349 6.70248 1.73857 6.67853 1.59293C6.60568 1.12096 7.04104 0.914625 7.18759 0.526392C7.26428 0.323403 7.03925 0.146075 7.20368 8.94768e-06Z",fill:"#475569"}),a("path",{d:"M7.459 4.5C7.48797 4.50312 7.71949 4.61154 7.76205 4.63061C8.27062 4.85835 8.87051 5.09164 9.35658 5.3582C9.36602 6.03495 9.37016 6.56625 8.70573 6.91519C8.6633 6.80883 8.63019 6.72409 8.56332 6.63044C8.43786 6.45568 8.24656 6.33963 8.03354 6.30909C7.8434 6.28211 7.65146 6.3197 7.49586 6.43503C7.21897 6.21256 6.76265 6.28197 6.5229 6.52486C6.39308 6.65639 6.34815 6.75074 6.28902 6.92344C5.59702 6.5957 5.58761 6.04267 5.60583 5.35582C5.89882 5.23844 6.21318 5.0724 6.50153 4.941C6.82145 4.79522 7.14482 4.6574 7.459 4.5Z",fill:"#D1EDFD"}),a("path",{d:"M11.0756 10.6406C11.1037 10.6701 11.1324 10.7706 11.1535 10.8145C11.2818 11.0817 11.4922 11.1945 11.7498 11.2977C11.5607 11.63 11.4567 11.8797 11.1034 12.0466L11.0839 12.0517C10.9262 12.0927 10.7996 12.0968 10.651 12.0135C10.4755 11.915 10.3807 11.6614 10.4792 11.478C10.6388 11.1809 10.8877 10.9272 11.0756 10.6406Z",fill:"#D1EDFD"}),a("path",{d:"M11.6036 9.1377C11.6993 9.11763 11.8391 9.16378 11.9294 9.19593C11.6952 9.50644 11.4706 9.81614 11.2327 10.1261L11.1572 10.2255C10.7581 9.73539 11.0333 9.24481 11.6036 9.1377Z",fill:"#D1EDFD"}),a("path",{d:"M7.49681 0.882812C7.53691 0.925159 7.61244 1.08523 7.63598 1.14156C7.74243 1.39673 7.75769 1.76908 7.38596 1.77504C7.28236 1.75599 7.15628 1.68938 7.13517 1.5783C7.0843 1.3107 7.35609 1.09964 7.48737 0.897583L7.49681 0.882812Z",fill:"#D1EDFD"}),a("path",{d:"M1.68305 6.17249C1.71659 6.1673 1.8134 6.16478 1.84892 6.16432C2.34052 6.15616 2.81496 6.34495 3.16655 6.68866C3.50847 7.01806 3.70349 7.47119 3.70765 7.94596C3.70896 8.42345 3.54045 8.85284 3.20281 9.19025C3.34033 9.28068 3.5321 9.52219 3.6543 9.65748C4.17158 9.39073 4.91447 9.69339 4.79675 10.3444C5.08751 10.5485 5.19656 10.8288 5.0585 11.1674C5.15418 11.2375 5.25595 11.3205 5.32383 11.4186C5.40228 11.5303 5.4309 11.6695 5.40291 11.8031C5.32228 12.1857 4.90085 12.3286 4.57669 12.1236C4.51367 12.0838 4.42258 11.9595 4.35299 11.9431C4.30669 11.9557 4.28453 11.9584 4.23644 11.9644C4.22885 11.9742 4.22118 11.9841 4.21343 11.9938C3.93597 12.3413 3.49234 12.4682 3.06933 12.5157C2.85285 12.518 2.70432 12.5146 2.49066 12.4609C1.80785 12.2892 1.50808 11.6167 1.70723 10.9639C1.829 10.5648 2.11891 10.2506 2.48939 10.0518C2.54655 10.132 2.57559 10.2191 2.64066 10.303C2.73571 10.2223 2.82048 10.1482 2.92363 10.0773C2.81023 9.95313 2.66811 9.7693 2.55817 9.63584C2.38871 9.6878 2.23026 9.72879 2.05298 9.74653C1.54239 9.80228 1.03118 9.64711 0.637735 9.31695C0.269964 9.01018 0.0453493 8.54827 0.00544736 8.07322C-0.0309495 7.60988 0.116099 7.15077 0.414918 6.79478C0.742554 6.41198 1.18728 6.21393 1.68305 6.17249Z",fill:"#475569"}),a("path",{d:"M1.79616 6.5951C2.54894 6.5619 3.18687 7.14364 3.22301 7.8963C3.25915 8.64894 2.67989 9.28913 1.92739 9.3282C1.17073 9.3675 0.526231 8.78435 0.489885 8.02753C0.45354 7.27071 1.03921 6.62849 1.79616 6.5951Z",fill:"#D1EDFD"}),a("path",{d:"M4.93607 11.4844C5.12839 11.6261 5.22049 11.9085 4.91876 11.9419C4.8067 11.8805 4.78491 11.8646 4.71094 11.7561C4.81572 11.6752 4.862 11.5925 4.93607 11.4844Z",fill:"#FEFEFD"}),a("path",{d:"M12.5164 3.58594L12.5715 3.59466C12.6589 3.65863 12.6908 3.94434 12.7882 4.05193C12.8789 4.15216 12.9155 4.17816 13.0326 4.24929C13.1363 4.31224 13.3325 4.34025 13.384 4.43124C13.3643 4.56218 13.0693 4.54857 12.9127 4.69344C12.6903 4.89898 12.7114 5.06971 12.5892 5.28622C12.5669 5.28439 12.5368 5.2868 12.5261 5.27346C12.4336 5.15843 12.4072 4.9308 12.3099 4.81465C12.1627 4.63903 11.9972 4.60054 11.7981 4.51372C11.7544 4.49467 11.7266 4.47099 11.7129 4.42649C11.7867 4.31876 12.0509 4.34309 12.2376 4.14892C12.43 3.94901 12.4155 3.72208 12.5164 3.58594Z",fill:"#475569"}),a("path",{d:"M2.13644 3.72656C2.24401 3.77084 2.29712 4.1268 2.431 4.25226C2.60327 4.41371 2.7311 4.41949 2.93246 4.52449C2.96024 4.53897 2.97173 4.56042 2.97671 4.58878C2.89584 4.6981 2.61854 4.70721 2.4596 4.85659C2.26275 5.04156 2.27341 5.29132 2.17022 5.42088C2.16192 5.41849 2.11671 5.40232 2.1156 5.40043C2.01291 5.21216 1.9836 5.04909 1.84812 4.87273C1.73599 4.72675 1.36534 4.69959 1.32812 4.56939C1.3835 4.47941 1.67823 4.44211 1.82291 4.30563C2.02737 4.11274 2.0042 3.8372 2.13644 3.72656Z",fill:"#475569"})]}))]}))}))}}},[mt,tn,kn,_e]),pt=u(function(){return Ve.some(function(e){return e.isSkeleton})},[Ve]),gt=function(e){return o(void 0,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return Ie?[4,Ie(e)]:[3,2];case 1:t.sent(),Qe(function(e){return n(n([],e,!0),[{role:"assistant",content:"Thanks for your feedback — this will help improve future suggestions.",id:w(),citations:[],time:new Date,isEnd:!0}],!1)}),setTimeout(function(){return ot("smooth")},100),t.label=2;case 2:return[2]}})})};return s("div",t({className:"".concat(N.customFont," ").concat(D.chatContainer),style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:Se&&!pt?"0 0 20px 5px rgba(37, 99, 235, 0.5)":"none"}},{children:[s("div",t({ref:je,className:D.scrollWrapper},{children:[a("div",t({ref:Dn,className:D.stickyHeader},{children:a(T,{resetChatHistory:at,isStreamEnd:tn,chatTitle:X,onResize:se,chatSize:ae,movingTowards:le})})),s("div",t({className:D.messagesList},{children:[s("div",t({className:D.initialMessageRow},{children:[a("div",t({className:D.iconWrapper},{children:a(W,{})})),a("div",t({className:D.welcomeTextWrapper},{children:a("div",t({className:D.welcomeMarkdownWrapper},{children:a("span",{children:a(b,t({rehypePlugins:[y],components:ht},{children:ie}))})}))}))]})),Ve.length>0&&Ve.map(function(e,n){var o,i;return s("div",t({className:D.messageRow},{children:["assistant"===e.role?a("div",t({className:D.assistantIconContainer},{children:a(W,{})})):a("div",{className:D.userSpacer}),a("div",t({className:D.messageContent},{children:"assistant"===e.role?s(l,{children:[e.orchestratorAndAgentsMessages&&e.orchestratorAndAgentsMessages.length>0&&a(I,{orchestratorAndAgentsMessages:null==e?void 0:e.orchestratorAndAgentsMessages,isStreamEnd:tn,finalTimeTaken:null==e?void 0:e.finalTimeTaken},null!==(o=null==e?void 0:e.finalTimeTaken)&&void 0!==o?o:null==e?void 0:e.id),a(_,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ve,handleStream:mt,isLastMessage:n===Ve.length-1,onSave:re,citations:null==e?void 0:e.citations,setChatSize:se,chatSize:ae,isStreamEnd:tn,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onTypeResponseClick:function(){var e;Pn(!0),null===(e=He.current)||void 0===e||e.focus()},onComparisonLinkClick:ke,baseURL:ze,onFeedbackSubmit:gt,isGlobalEditActive:_e,fieldLabelMap:qe}),e.hasOwnProperty("isEnd")&&!(null==e?void 0:e.isEnd)&&(null===(i=null==e?void 0:e.content)||void 0===i?void 0:i.length)>0&&s(l,{children:[a(E,{variant:"text",width:"50%",height:20}),a("div",{style:{marginTop:"10px"}}),a(E,{variant:"text",width:"100%",height:40})]}),a("div",t({className:D.timestamp},{children:e.time&&!isNaN(new Date(e.time).getTime())?new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}):s("div",t({className:D.userMessageWrapper},{children:[s("div",t({className:D.userMessageBubble,style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:e.isSkeleton||pt||e.id!==Fn?"none":"0 0 15px 3px rgba(37, 99, 235, 0.6)"}},{children:[e.isSkeleton?s("div",t({style:{display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",padding:"8px 0"}},{children:[a(E,{variant:"text",width:"100%",height:16}),a(E,{variant:"text",width:"80%",height:16})]})):a(_,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ve,handleStream:mt,isLastMessage:n===Ve.length-1,onSave:re,citations:null==e?void 0:e.citations,isStreamEnd:tn,isGlobalEditActive:_e,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onComparisonLinkClick:ke,baseURL:ze,onFeedbackSubmit:gt,fieldLabelMap:qe}),a("div",t({style:{marginTop:"0.5rem"}},{children:a(P,{})}))]})),a("div",t({className:D.userTimestamp},{children:new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}))}))]}),e.id)}),$e&&s("div",t({className:D.loadingRow},{children:[a("div",t({className:D.iconWrapper,style:{marginTop:"0.2rem"}},{children:a(W,{})})),a("div",t({className:D.loadingTextWrapper},{children:a("span",{children:dn})}))]})),a("div",{ref:Oe,style:{float:"left",clear:"both"}})]}))]})),a("div",t({className:D.inputAreaWrapper},{children:a(C,t({title:$?"Please wait for the validation to be completed.":""},{children:s("div",t({className:"".concat(D.inputBoxContainer," ").concat(Yn?D.disabled:""),style:Wn?{boxShadow:"0 0 15px 3px rgba(37, 99, 235, 0.5)",borderColor:"#2563eb",transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}:{transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}},{children:[Ve.length>0&&!bn&&a("div",t({onMouseDown:function(e){e.preventDefault(),ot("smooth")},className:D.scrollToBottomBtn},{children:a(q,{})})),s("div",t({style:{width:"100%",display:"flex"}},{children:[a("textarea",{ref:He,placeholder:ue,value:Ge||"",onChange:function(e){Ze(e.target.value)},onFocus:function(){return fn(!0)},onBlur:function(){return fn(!1)},onKeyDown:function(e){return ut(e)},disabled:Yn,className:"no-scrollbar ".concat(D.chatTextarea),style:{minHeight:gn||Ge&&Ge.length>40?"120px":"50px",height:gn||Ge&&Ge.length>40?"120px":"50px",maxHeight:"120px"}}),a("span",t({className:D.sendButtonWrapper},{children:a("button",t({onClick:function(e){nt||ut(new KeyboardEvent("keydown",{key:"Enter"}))},disabled:nt,className:"".concat(D.sendButton," ").concat(nt?D.disabled:D.active)},{children:a(A,{})}))}))]}))]}))}))})),s("div",t({className:D.footerTools},{children:[a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"speaker",isActive:!1,onClick:function(){return null},disabled:!1})}))})),a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"microphone",isActive:!1,onClick:function(){return null},disabled:!1})}))}))]})),a(g,t({open:Jn,onClose:function(){},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:s(f,t({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[a("h3",t({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"10px"}},{children:"Session Expired"})),a("p",t({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"20px"}},{children:"Changes were made to the learnings in this scope while you were editing. To avoid conflicts, concurrent edits aren’t allowed."})),s(f,t({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[a("button",t({onClick:function(){$n(!1),at()},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Reset Session"})),a("button",t({onClick:function(){$n(!1),null==Ne||Ne()},style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Discard & Close"}))]}))]}))}))]}))};export{j as autoGeneratePrompt,B as default};
1
+ import{__makeTemplateObject as e,__spreadArray as n,__assign as t,__awaiter as o,__generator as r,__rest as i}from"tslib";import{jsx as a,jsxs as s,Fragment as l}from"react/jsx-runtime";import{useRef as c,useState as d,useMemo as u,useEffect as v,useCallback as m,useLayoutEffect as h}from"react";import{keyframes as g,Dialog as p,Box as f}from"@mui/material";import C from"@mui/material/Tooltip";import b from"react-markdown";import y from"rehype-raw";import{http as S}from"../../../../api/transport.js";import{v4 as w}from"uuid";import{stopStreaming as x,startChatStream as k}from"@e-llm-studio/streaming-response";import{WatchMeWork as I}from"@e-llm-studio/watch-me-work";import T from"./ChatHeader.js";import _ from"../MessageRendering/MessageRendering.js";import{Skeleton as E}from"../atoms/SkeletonLoader/SkeletonLoader.js";import{ActionableButton as M}from"../MessageRendering/ClickableChatComponents.js";import R from"../AudioWaveform.js";import D from"./ChatComponent.module.css.js";import N from"../../InstantLearning.module.css.js";import{ScrollToBottom as q}from"../_svg/ScrollToBottom.js";import{useHeaderObserver as F,extractTextFromChildren as L}from"../../helpers/utils.js";import{SendButton as A}from"../_svg/SendButton.js";import W from"../_svg/SparkleIcon.js";import{UserIcon as P}from"../_svg/UserIcon.js";var z,j=function(e,n){return S.post("".concat(e||"https://devllmstudio.creativeworkspace.ai","/api/chat/chatResponse"),{name:"ilggcautopromptgen",organizationName:"techolution",prompt:n||"Generate a query"},{headers:{"Content-Type":"application/json"},withCredentials:!0}).then(function(e){return e.data}).catch(function(e){throw console.error("Error calling auto-generate API:",e),e})},B=function(j){var B=j.chatAssistantName,O=j.organizationName,H=j.baseUrl,U=j.baseWebsocketUrl,G=j.setIsNewChatClicked;j.ThinkingBulbIconComponent;var Z=j.isFormSaveClicked,K=j.setIsFormSavedClicked,V=j.onResetLearningData,Q=j.sendMessageInChat,J=j.setSendMessageInChat,$=j.isFormValidating,X=j.chatTitle,Y=j.customMetaData,ee=j.headerMessageHandlers;j.aiResponse;var ne=j.setAIResponse,te=j.onResetChat,oe=j.initialChatMessage,re=void 0===oe?"":oe,ie=j.onSave,ae=j.chatSize,se=j.setChatSize,le=j.movingTowards,ce=j.setCitations,de=j.textareaPlaceholder,ue=void 0===de?"Tell me more about this learning...":de,ve=j.setCurrentRequestId,me=j.showSavedMessage,he=void 0!==me&&me,ge=j.savedMessage,pe=j.isError,fe=void 0!==pe&&pe,Ce=j.errorMessage,be=void 0===Ce?"There was an error saving your changes.":Ce;j.isSaving;var ye=j.isHighlighted,Se=void 0!==ye&&ye,we=j.onStreamingStateChange,xe=j.onViewComparison;j.isCopyEnabled;var ke=j.onComparisonLinkClick,Ie=j.onSubmitFeedback,Te=j.userDetails,_e=j.isGlobalEditActive,Ee=j.socketTimeOutInMilliSeconds,Me=j.initialDraftMessage,Re=void 0===Me?"":Me,De=j.onValidateSession,Ne=j.onCloseSessionModal,qe=j.fieldLabelMap,Fe=j.enableChatLogs,Le=void 0!==Fe&&Fe,Ae=B,We=c("".concat(Ae,"-").concat(O,"-").concat(w())),Pe=c("".concat(w())),ze=H,je=c(null),Be=c(!0),Oe=c(null),He=c(null),Ue=d(Re),Ge=Ue[0],Ze=Ue[1],Ke=d([]),Ve=Ke[0],Qe=Ke[1],Je=d(!1),$e=Je[0],Xe=Je[1],Ye=d(!1);Ye[0];var en=Ye[1],nn=d(!0),tn=nn[0],on=nn[1],rn=d(!0);rn[0];var an=rn[1],sn=d("");sn[0];var ln=sn[1],cn=d(""),dn=cn[0],un=cn[1],vn=d(!1),mn=vn[0],hn=vn[1],gn=d(!1),pn=gn[0],fn=gn[1],Cn=d(!0),bn=Cn[0],yn=Cn[1],Sn=d("100%");Sn[0];var wn=Sn[1],xn=d(null),kn=xn[0],In=xn[1],Tn=d(!1);Tn[0];var _n=Tn[1],En=d(!1),Mn=En[0],Rn=En[1],Dn=c(null),Nn=c(new Set),qn=d(null),Fn=qn[0],Ln=qn[1],An=d(!1),Wn=An[0],Pn=An[1],zn=d(!1);zn[0],zn[1];var jn=d(null);jn[0],jn[1],c(null),c(null);var Bn=c(new Map),On=c(""),Hn=c(new Set),Un=c(0),Gn=c(!0),Zn=c(new Map),Kn=c(!1),Vn=c(0),Qn=c(new Map),Jn=c(null),$n=d(!1),Xn=$n[0],Yn=$n[1];g(z||(z=e(["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "],["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "])));var et=u(function(){return""===(null==Ge?void 0:Ge.trim())||mn},[Ge,mn]),nt=u(function(){return $},[$]),tt=u(function(){var e;return Ve.length>0&&"user"===(null===(e=Ve[Ve.length-1])||void 0===e?void 0:e.role)},[Ve]),ot=u(function(){return et||$||!!_e||tt},[et,$,_e,tt]);v(function(){Re&&!Ge&&(Ze(Re),fn(!0),setTimeout(function(){if(He.current){He.current.focus();var e=Re.length;He.current.setSelectionRange(e,e)}},400))},[Re]),v(function(){null==we||we(mn)},[mn,we]),v(function(){return Gn.current=!0,function(){Gn.current=!1,Un.current+=1,Qn.current.forEach(function(e){return clearTimeout(e)}),Qn.current.clear(),On.current&&U&&x(On.current,U,!1)}},[U]),v(function(){var e=je.current,n=function(){if(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;yn(t-n-o<=20)}};return e&&(e.addEventListener("scroll",n),n()),function(){e&&e.removeEventListener("scroll",n)}},[Ve]);var rt=F({handlers:ee,setResult:ne}).processHeaderMessage;v(function(){he&&Rn(!0)},[he]),v(function(){if(Wn){var e=setTimeout(function(){Pn(!1)},3e3);return function(){return clearTimeout(e)}}},[Wn]),v(function(){Z&&!_e&&(mt(new KeyboardEvent("keydown",{key:"Enter"}),!1,"Save this Learning"),K(!1))},[Z]),v(function(){if(Q)try{if(Q.startsWith("__SKELETON__:")){var e=Q.split(":"),o=e[1],r=e.slice(2).join(":"),i={role:"user",content:"",id:o,time:new Date,isSkeleton:!0,skeletonContent:r};return Qe(function(e){return n(n([],e,!0),[i],!1)}),mt(new KeyboardEvent("keydown",{key:"Enter"}),!1,r,!1,o),Ln(o),J&&J(""),void setTimeout(function(){Ln(null)},2e3)}if(Q.startsWith("__SKELETON_END__::")){var a=Q.split("::")[1]||"";return Qe(function(e){return e.map(function(e){return e.isSkeleton?t(t({},e),{isSkeleton:!1,content:e.skeletonContent||a}):e})}),void(J&&J(""))}var s=w();mt(new KeyboardEvent("keydown",{key:"Enter"}),!1,Q,!1,s),Ln(s),J&&J(""),setTimeout(function(){return Ln(null)},2e3)}catch(e){console.error("Error handling sendMessageInChat signal",e)}},[Q]),v(function(){at(),st();var e=function(){var e,n=(null===(e=null==Dn?void 0:Dn.current)||void 0===e?void 0:e.clientHeight)||0,t="calc(100% - ".concat(n,"px - 10px)");wn(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var it=m(function(e){var n="string"==typeof e?e:"smooth";Oe.current&&Oe.current.scrollIntoView({behavior:n,block:"end"}),Be.current&&setTimeout(function(){Oe.current&&Be.current&&Oe.current.scrollIntoView({behavior:n,block:"end"})},100)},[]);v(function(){if(!mn){var e="";if(Mn?e=ge||"Thank you teacher for teaching me, your rule has been saved successfully.":fe&&(e=be||"I'm sorry, I couldn't save your changes. Please try again."),e){var t={role:"assistant",content:e,id:w(),citations:[],time:new Date};Qe(function(e){return n(n([],e,!0),[t],!1)}),Rn(!1),setTimeout(function(){return it("smooth")},100)}}},[Mn,fe,mn,ge,be,it]),v(function(){Be.current&&it("smooth")},[it]);var at=function(){var e={method:"get",maxBodyLength:1/0,url:"".concat(ze,"/api/chatbot/getChatSettings?name=").concat(Ae,"&organizationName=").concat(O),headers:{}};S.request(e).then(function(e){var n,t,o;(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.chatSettings)&&""!==(null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.chatSettings)||void 0===o?void 0:o.chatInitialMessage)&&an(!0)}).catch(function(e){console.error(e)})},st=function(){return o(void 0,void 0,void 0,function(){var e,n;return r(this,function(t){e="".concat(ze,"/api/chat/history?name=").concat(Ae,"&organizationName=").concat(O);try{n={method:"GET",params:{guestSessionId:We.current},withCredentials:!0},S.get(e,n).then(function(e){var n=e.data;n.length>0?(Qe(n),it()):an(!0)}).catch(function(e){console.error(e)})}catch(e){Xe(!1),console.error(e)}return[2]})})},lt=function(){var e="".concat(ze,"/api/chat/resetHistory?name=").concat(Ae,"&organizationName=").concat(O);try{var n={method:"GET",params:{guestSessionId:We.current},withCredentials:!0};S.get(e,n).then(function(){G(!0),ln(""),In(null),Nn.current.clear(),Zn.current.clear(),Pe.current="".concat(w()),Qe([]),an(!0),Jn.current=null,null==te||te(),V&&V()}).catch(function(e){console.error(e)}).finally(function(){We.current="".concat(Ae,"-").concat(O,"-").concat(w())})}catch(e){Xe(!1),console.error(e)}};function ct(e){return null==e?void 0:e.replace(/<a [^>]*>.*?<\/a>/g,function(e){return null==e?void 0:e.replace(/\*/g,"&ast;")})}var dt=function(e,o,r,i,a,s,l){var c,d,u,v,m,h,g,p,f,C,b,y,S,x,k,I,T,_,E,M,R,D,N,q,F,L,A,W,P,z;if(null===(d=null===(c=null==e?void 0:e.chatStream)||void 0===c?void 0:c.continueChatResult)||void 0===d?void 0:d.header_message){var j={header_message:e.chatStream.continueChatResult.header_message,responsedata:null===(m=null===(v=null===(u=null==e?void 0:e.chatStream)||void 0===u?void 0:u.continueChatResult)||void 0===v?void 0:v.message)||void 0===m?void 0:m.content};rt(j)}var B=null===(h=null==e?void 0:e.chatStream)||void 0===h?void 0:h.continueChatResult,O=null==B?void 0:B.isEnd,H=(null===(g=null==B?void 0:B.message)||void 0===g?void 0:g.citations)||[];O&&H.length>0&&ce&&ce(H);var U={role:"assistant",content:"",id:w()};if(null===(b=null===(C=null===(f=null===(p=null==e?void 0:e.chatStream)||void 0===p?void 0:p.continueChatResult)||void 0===f?void 0:f.message)||void 0===C?void 0:C.content)||void 0===b?void 0:b.includes("WaitMessage: "))en(!0),U.content=function(e){var n="WaitMessage: ",t=e.indexOf(n);if(-1!==t){var o=e.substring(t+13);return null==o?void 0:o.replaceAll("WaitMessage: ","")}return""}((null===(x=null===(S=null===(y=null==e?void 0:e.chatStream)||void 0===y?void 0:y.continueChatResult)||void 0===S?void 0:S.message)||void 0===x?void 0:x.content)+"\n\n"),""!==U.content&&(Xe(!1),Qe(n(n([],Ve,!0),[{role:"user",content:a,time:i,isFirstQuestionSent:s||!1,id:l||(null===(I=null===(k=null==e?void 0:e.chatStream)||void 0===k?void 0:k.continueChatResult)||void 0===I?void 0:I.requestId)||"",reply:""},U],!1)));else{en(!1);var G=null===(_=null===(T=null==e?void 0:e.chatStream)||void 0===T?void 0:T.continueChatResult)||void 0===_?void 0:_.requestId;"string"==typeof G&&G&&ve&&ve(G);var Z=function(e,o,r,i){var a,s,l,c,d,u,v,m={role:"assistant",content:"",id:w(),time:new Date,citations:[]},h=(null===(a=null==e?void 0:e.chatStream)||void 0===a?void 0:a.continueChatResult)||{},g=null==h?void 0:h.requestId,p=null==h?void 0:h.preserve_message,f=null==h?void 0:h.isEnd,C=(null===(s=null==h?void 0:h.message)||void 0===s?void 0:s.content)||"",b=null==h?void 0:h.is_orchestrator,y=null==h?void 0:h.thinking_break,S=(null===(l=null==h?void 0:h.message)||void 0===l?void 0:l.citations)||[];if(g&&p&&C&&!f){var x=i.current.get(g)||[];x[x.length-1]!==C&&(x.push(C),i.current.set(g,x))}var k=(g&&i.current.get(g)||[]).join("\n\n"),I="";if(f)I=k&&""!==k.trim()?k:C;else if(p)I=k;else{var T=C.replace(/<!--(?![\s\S]*-->)[\s\S]*$/,"").trimEnd(),_=!1===b||y||0!==S.length?"":T;I=k?"".concat(k,"\n\n").concat(_):_}if(m.content=ct(I),!0===(null==h?void 0:h.thinking_break)&&!0===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)&&o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1}),!1===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){if(h.explainability_id&&h.responded_by){var E=h.explainability_id,M=h.responded_by;r.has(E)||r.set(E,{responded_by:M,index:o.length})}r.has(h.explainability_id)?o[null==(R=r.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(c=h.explainability_id)&&void 0!==c?c:"",isParallelToolResponse:!0}:o=n(n([],o,!0),[{responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(d=h.explainability_id)&&void 0!==d?d:"",isParallelToolResponse:!1}],!1)}if(!0===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){var R;h.explainability_id&&h.responded_by&&(E=h.explainability_id,M=h.responded_by,r.has(E)||r.set(E,{responded_by:M,index:o.length})),r.has(h.explainability_id)?o[null==(R=r.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(u=h.explainability_id)&&void 0!==u?u:"",isParallelToolResponse:!0}:o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(v=h.explainability_id)&&void 0!==v?v:"",isParallelToolResponse:!1})}return t({orchestratorAndAgentsMessages:o},m)}(e,r,o,Zn);Z.time=new Date,Z.citations=H,Z.isEnd=null===(M=null===(E=null==e?void 0:e.chatStream)||void 0===E?void 0:E.continueChatResult)||void 0===M?void 0:M.isEnd,Z.requestId=null===(D=null===(R=null==e?void 0:e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===D?void 0:D.requestId,Z.sessionId=We.current,null===(N=Z.orchestratorAndAgentsMessages)||void 0===N||N.forEach(function(e){e&&e.header_message&&rt(e)}),(""!==(null==Z?void 0:Z.content)||(null==Z?void 0:Z.orchestratorAndAgentsMessages)&&(null==Z?void 0:Z.orchestratorAndAgentsMessages.length)>0)&&(Xe(!1),Qe(n(n([],Ve,!0),[{role:"user",content:a||"",time:i,isFirstQuestionSent:s||!1,id:l||(null===(F=null===(q=null==e?void 0:e.chatStream)||void 0===q?void 0:q.continueChatResult)||void 0===F?void 0:F.requestId)||"",requestId:null!==(W=null===(A=null===(L=null==e?void 0:e.chatStream)||void 0===L?void 0:L.continueChatResult)||void 0===A?void 0:A.requestId)&&void 0!==W?W:""},Z],!1))),on(null===(z=null===(P=null==e?void 0:e.chatStream)||void 0===P?void 0:P.continueChatResult)||void 0===z?void 0:z.isEnd)}},ut=m(function(e,t){void 0===t&&(t="inactivity"),console.error("🛑 Stream failed or timed out due to:reason=".concat(t," requestId=").concat(e," at ").concat((new Date).toISOString()));var o=Qn.current.get(e);o&&(clearTimeout(o),Qn.current.delete(e)),e&&U&&(x(e,U,!1),Zn.current.delete(e)),e===On.current?(Kn.current=!1,on(!0),hn(!1),_n(!1),Xe(!1),en(!1),Qe(function(e){var o=n([],e,!0).reverse().find(function(e){return"user"===e.role}),r=((null==o?void 0:o.content)||"").replace(/"/g,"&quot;"),i=n([],e,!0),a=i[i.length-1];a&&"assistant"===a.role&&!a.isEnd&&i.pop();var s="I ran into an unexpected issue while trying to process this learning.";return"inactivity"===t?s="Something went wrong—teaching is taking longer than expected.":"websocket_error"===t&&(s="I lost connection to the server while working on that."),n(n([],i,!0),[{role:"assistant",content:"".concat(s,' Please try again.\n\n<button class="clickable-button" data-value="').concat(r,'">Retry</button>'),id:w(),time:new Date,isEnd:!0,citations:[]}],!1)})):console.warn("🛑 [handleStreamTimeout] Ignoring stale timeout for superseded requestId=".concat(e,"; active=").concat(On.current))},[Ee,U]),vt=m(function(e){var n=Qn.current.get(e);if(n&&clearTimeout(n),Ee&&Ee>0){console.log("⏱️ [Timeout armed] requestId=".concat(e," timeout=").concat(Ee,"ms at ").concat((new Date).toISOString()));var t=setTimeout(function(){console.warn("⏱️ [Timeout FIRED — auto stop] requestId=".concat(e," at ").concat((new Date).toISOString())),ut(e,"inactivity")},Ee);Qn.current.set(e,t)}},[ut,Ee]),mt=function(e,i,a,s,l,c){return o(void 0,void 0,void 0,function(){var o,s,d,u,v,m,h,g,p,f,C,b,y,S,x,I,T;return r(this,function(r){switch(r.label){case 0:if(o=(void 0!==a?a:Ge||"").trim(),(s="Enter"===(null==e?void 0:e.key)&&!(null==e?void 0:e.shiftKey)&&!_e)&&(null===(b=null==e?void 0:e.preventDefault)||void 0===b||b.call(e)),d="user"===(null===(y=Ve[Ve.length-1])||void 0===y?void 0:y.role),!o||mn||Kn.current||d||(null==e?void 0:e.key)&&!s)return[2];if(Jn.current||(Jn.current=(new Date).toISOString(),console.log("Session start time set to ".concat(Jn.current))),!De)return[3,5];Xe(!0),un("Validating session..."),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,De(Jn.current)];case 2:return r.sent()?[3,4]:(Yn(!0),Xe(!1),c&&c(!1),[2]);case 3:return u=r.sent(),console.error("Validation error:",u),Yn(!0),Xe(!1),c&&c(!1),[2];case 4:Xe(!1),r.label=5;case 5:return Kn.current=!0,"I want to add a rule description"===o?(on(!1),Be.current=!0,hn(!0),!kn&&o&&In(a||"manual_entry"),v=new Date,Qe(function(e){return n(n([],e.map(function(e,n){var o;return t(t({},e),{content:null===(o=ct(e.content))||void 0===o?void 0:o.replace("WaitMessage: ","")})}),!0),[{role:"user",content:o,time:v,isFirstQuestionSent:!1,id:l||w()}],!1)}),it("smooth"),setTimeout(function(){Qe(function(e){return n(n([],e,!0),[{role:"assistant",content:"I'd be happy to help you set up a new rule! To get started, could you tell me what kind of behavior or logic you would like this rule to follow?",id:w(),citations:[],time:new Date}],!1)}),it("smooth"),setTimeout(function(){hn(!1),on(!0)},500)},500),[2]):(on(!1),Be.current=!0,hn(!0),!kn&&o&&In(a||"manual_entry"),m=new Date,h=Un.current,Qe(function(e){var r=e.map(function(e){var n;return t(t({},e),{content:null===(n=ct(e.content))||void 0===n?void 0:n.replace("WaitMessage: ","")})});return l&&r.some(function(e){return e.id===l})?r.map(function(e){return e.id===l?t(t({},e),{content:o}):e}):n(n([],r,!0),[{role:"user",content:o,time:m,isFirstQuestionSent:!1,id:l||w()}],!1)}),it("smooth"),g=new Map,p=[],f=function(e){var n;if(!e)return{};var t=Object.keys(e);return 1===t.length&&"current"===t[0]?null!==(n=e.current)&&void 0!==n?n:{}:e},C={WEBSOCKET_URL:U,organizationName:O,chatAssistantName:Ae,selectedAIModel:"gpt-4",replyMessage:"",userName:null!==(S=null==Te?void 0:Te.name)&&void 0!==S?S:"Guest User",userEmailId:null!==(x=null==Te?void 0:Te.email)&&void 0!==x?x:"guestUser@example.com",userId:null!==(I=null==Te?void 0:Te.id)&&void 0!==I?I:"Guest User",query:o,requestId:"requestId-".concat(w()),customPrompt:"",enableForBackend:!1,guestSessionId:We.current,chatPreviewId:Pe.current,customMetaData:f(Y),aiModel:"",enableLogs:!0,logControls:{infoLogs:Le,debugLogs:Le},onStreamEvent:function(e){var n,t,r,a,s,c;if(Gn.current&&Un.current===h){var d=null===(t=null===(n=null==e?void 0:e.chatStream)||void 0===n?void 0:n.continueChatResult)||void 0===t?void 0:t.requestId,u=null===(a=null===(r=null==e?void 0:e.chatStream)||void 0===r?void 0:r.continueChatResult)||void 0===a?void 0:a.header_message;console.log("📦 [Stream Chunk Received] With RequestID and header_message: ".concat(d,",").concat(u)),vt(C.requestId);var v=null===(c=null===(s=null==e?void 0:e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===c?void 0:c.error_state;if(Array.isArray(v)&&v.length>0)return console.error("⚠️ Agent returned an error_state during stream:",{requestId:d,errorState:v}),void ut(C.requestId,"agent_error");dt(e,g,p,m,o,i,l)}},onStreamEnd:function(e){var o,r;if(Gn.current&&Un.current===h){var i=null===(r=null===(o=null==e?void 0:e.chatStream)||void 0===o?void 0:o.continueChatResult)||void 0===r?void 0:r.requestId;Hn.current.add(C.requestId),console.log("✅ [Stream Completed] RequestID: ".concat(i));var a=Qn.current.get(C.requestId);a&&(clearTimeout(a),Qn.current.delete(C.requestId)),Kn.current=!1,on(!0),hn(!1),_n(!1);var s=Date.now(),l=Bn.current.get(C.requestId);if(l){var c=Math.round((s-l)/1e3).toFixed(1);Qe(function(e){var o=n([],e,!0).reverse().findIndex(function(e){return"assistant"===e.role});if(-1===o)return e;var r=e.length-1-o;return e.map(function(e,n){return n===r?t(t({},e),{finalTimeTaken:c}):e})})}}},onError:function(e){if(Gn.current&&Un.current===h){var n=Qn.current.get(C.requestId);if(n&&(clearTimeout(n),Qn.current.delete(C.requestId)),Hn.current.has(C.requestId))return console.warn("Ignoring post-completion error for already-finished request:",C.requestId),void Hn.current.delete(C.requestId);console.error("Stream error:",e),ut(C.requestId,"websocket_error")}}},o&&(Xe(!0),null===(T=He.current)||void 0===T||T.blur(),Ze(""),it(),un(l?"Just a moment, processing your request...":"Okay, got it. Let me take a moment to work on this and I'll get back to you shortly."),Bn.current.set(C.requestId,Date.now()),On.current=C.requestId,console.log("Chat Stream Params:",C),vt(C.requestId),Vn.current+=1,console.log("🚀 [UI Action] stream started (Total UI invocations: ".concat(Vn.current,") | RequestID: ").concat(C.requestId,' | Query: "').concat(o,'"')),k(C)),c&&c(!1),[2])}})})},ht=c(null);h(function(){ht.current=mt});var gt=m(function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return null===(e=ht.current)||void 0===e?void 0:e.call.apply(e,n([ht],t,!1))},[]),pt=u(function(){return{p:function(e){e.node;var n=e.children;return i(e,["node","children"]),a("div",t({style:{margin:0,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px",fontFamily:"inherit"}},{children:n}))},button:function(e){e.node;var n=e.className,o=e.children,r=i(e,["node","className","children"]),l=L(o),c=r["data-value"],d="Tester Genie"===l;return a(M,t({},r,{className:n,handleStream:gt,isStreamEnd:tn,disabled:!!kn||!!_e,isLastMessage:!0,style:{margin:0},isTesterGenie:d,"data-selected":kn===l||kn===c?"true":kn?"false":void 0},{children:s("span",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o,d&&s("svg",t({width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[a("path",{d:"M7.20368 8.94768e-06C7.48895 -0.00208639 7.69331 0.364327 7.83856 0.57465C8.14381 1.01633 8.38012 1.87909 7.71077 2.14118C8.57167 2.21011 9.70406 2.93098 10.1785 3.64699C10.5932 4.27286 10.4559 5.16037 9.80301 5.56007L9.9502 7.16593C9.97671 7.44871 10.0265 7.87092 10.0299 8.14457C10.4213 8.23046 11.0787 8.55391 11.326 8.87592C11.5979 8.75656 11.9189 8.76963 12.1688 8.93469C12.3563 8.67751 12.5598 8.41456 12.7507 8.15787C12.3283 7.45155 12.5047 6.57745 13.2143 6.13784C13.5375 5.9377 13.9264 5.87277 14.2971 5.95705C14.0961 6.30964 13.8775 6.72182 13.6593 7.05857C13.7906 7.2436 13.9184 7.44225 14.044 7.63194L14.8022 7.63198C15.0349 7.30106 15.2515 6.90827 15.4835 6.59349C15.8623 7.0712 15.8156 7.79671 15.4734 8.28241C15.1318 8.76741 14.4886 8.9899 13.9118 8.88251C13.758 9.12108 13.5577 9.39243 13.3941 9.63201C13.7143 9.9316 13.7725 10.364 13.4067 10.6594C13.5231 10.8889 13.5309 11.1613 13.447 11.402C13.1502 12.2523 12.1724 12.5645 11.3474 12.5025C11.1171 12.4852 10.939 12.4698 10.7197 12.3953C10.8724 13.1271 10.7744 14.2031 10.5132 14.9051C10.1688 15.8304 9.43632 16.5569 8.54503 16.9655C7.90465 17.2706 7.21222 17.3607 6.50472 17.4505C5.74445 17.5471 4.75801 17.4362 4.08533 17.825C3.9327 17.9132 3.86566 18.0173 3.82943 18.1792C3.94996 18.5982 4.47858 18.6063 4.78474 18.8897C5.20191 19.2758 4.90716 19.9663 4.36611 19.9908C4.31476 19.9931 4.26867 19.9867 4.23186 19.9493C4.23089 19.8303 4.47587 19.7199 4.49787 19.5262C4.55075 19.0604 3.70014 19.0078 3.37835 18.8374C3.13013 18.706 2.99537 18.6309 2.82242 18.4021C2.63795 18.1579 2.58428 17.835 2.63138 17.5392C2.74868 16.7847 3.47123 16.393 4.12184 16.1497C4.61314 15.9659 5.46304 15.7158 5.52019 15.0793C5.58589 14.348 4.97543 13.5523 4.57739 12.9807C4.44275 12.7875 4.3039 12.579 4.16309 12.3919C4.18987 12.365 4.21049 12.3463 4.23916 12.3212C4.59619 12.6218 5.21209 12.6421 5.55038 12.2979C5.70457 12.144 5.78974 11.9342 5.78642 11.7164C5.78121 11.4493 5.63382 11.2002 5.4454 11.019C5.44704 10.9932 5.44824 10.9676 5.449 10.9419C5.4566 10.6648 5.37505 10.4902 5.1892 10.2943C5.18398 10.2538 5.17776 10.2134 5.17053 10.1732C5.08123 9.69297 4.71708 9.34182 4.23415 9.27108C4.16418 9.26083 3.96108 9.26105 3.92071 9.23344C3.90485 9.1828 3.9059 9.20792 3.91904 9.15527C4.22103 8.90139 4.14407 8.78214 4.31107 8.4846C4.42301 8.28513 4.73047 8.15239 4.95452 8.10701C4.96167 7.51076 5.03684 6.88562 5.10036 6.29144C5.12451 6.0655 5.12531 5.75046 5.1511 5.55257C4.11108 4.86747 4.39091 3.75946 5.25465 3.06391C5.84978 2.58469 6.34496 2.31002 7.10143 2.14517C7.01589 2.10416 6.93842 2.04811 6.87269 1.97972C6.77021 1.87349 6.70248 1.73857 6.67853 1.59293C6.60568 1.12096 7.04104 0.914625 7.18759 0.526392C7.26428 0.323403 7.03925 0.146075 7.20368 8.94768e-06Z",fill:"#475569"}),a("path",{d:"M7.459 4.5C7.48797 4.50312 7.71949 4.61154 7.76205 4.63061C8.27062 4.85835 8.87051 5.09164 9.35658 5.3582C9.36602 6.03495 9.37016 6.56625 8.70573 6.91519C8.6633 6.80883 8.63019 6.72409 8.56332 6.63044C8.43786 6.45568 8.24656 6.33963 8.03354 6.30909C7.8434 6.28211 7.65146 6.3197 7.49586 6.43503C7.21897 6.21256 6.76265 6.28197 6.5229 6.52486C6.39308 6.65639 6.34815 6.75074 6.28902 6.92344C5.59702 6.5957 5.58761 6.04267 5.60583 5.35582C5.89882 5.23844 6.21318 5.0724 6.50153 4.941C6.82145 4.79522 7.14482 4.6574 7.459 4.5Z",fill:"#D1EDFD"}),a("path",{d:"M11.0756 10.6406C11.1037 10.6701 11.1324 10.7706 11.1535 10.8145C11.2818 11.0817 11.4922 11.1945 11.7498 11.2977C11.5607 11.63 11.4567 11.8797 11.1034 12.0466L11.0839 12.0517C10.9262 12.0927 10.7996 12.0968 10.651 12.0135C10.4755 11.915 10.3807 11.6614 10.4792 11.478C10.6388 11.1809 10.8877 10.9272 11.0756 10.6406Z",fill:"#D1EDFD"}),a("path",{d:"M11.6036 9.1377C11.6993 9.11763 11.8391 9.16378 11.9294 9.19593C11.6952 9.50644 11.4706 9.81614 11.2327 10.1261L11.1572 10.2255C10.7581 9.73539 11.0333 9.24481 11.6036 9.1377Z",fill:"#D1EDFD"}),a("path",{d:"M7.49681 0.882812C7.53691 0.925159 7.61244 1.08523 7.63598 1.14156C7.74243 1.39673 7.75769 1.76908 7.38596 1.77504C7.28236 1.75599 7.15628 1.68938 7.13517 1.5783C7.0843 1.3107 7.35609 1.09964 7.48737 0.897583L7.49681 0.882812Z",fill:"#D1EDFD"}),a("path",{d:"M1.68305 6.17249C1.71659 6.1673 1.8134 6.16478 1.84892 6.16432C2.34052 6.15616 2.81496 6.34495 3.16655 6.68866C3.50847 7.01806 3.70349 7.47119 3.70765 7.94596C3.70896 8.42345 3.54045 8.85284 3.20281 9.19025C3.34033 9.28068 3.5321 9.52219 3.6543 9.65748C4.17158 9.39073 4.91447 9.69339 4.79675 10.3444C5.08751 10.5485 5.19656 10.8288 5.0585 11.1674C5.15418 11.2375 5.25595 11.3205 5.32383 11.4186C5.40228 11.5303 5.4309 11.6695 5.40291 11.8031C5.32228 12.1857 4.90085 12.3286 4.57669 12.1236C4.51367 12.0838 4.42258 11.9595 4.35299 11.9431C4.30669 11.9557 4.28453 11.9584 4.23644 11.9644C4.22885 11.9742 4.22118 11.9841 4.21343 11.9938C3.93597 12.3413 3.49234 12.4682 3.06933 12.5157C2.85285 12.518 2.70432 12.5146 2.49066 12.4609C1.80785 12.2892 1.50808 11.6167 1.70723 10.9639C1.829 10.5648 2.11891 10.2506 2.48939 10.0518C2.54655 10.132 2.57559 10.2191 2.64066 10.303C2.73571 10.2223 2.82048 10.1482 2.92363 10.0773C2.81023 9.95313 2.66811 9.7693 2.55817 9.63584C2.38871 9.6878 2.23026 9.72879 2.05298 9.74653C1.54239 9.80228 1.03118 9.64711 0.637735 9.31695C0.269964 9.01018 0.0453493 8.54827 0.00544736 8.07322C-0.0309495 7.60988 0.116099 7.15077 0.414918 6.79478C0.742554 6.41198 1.18728 6.21393 1.68305 6.17249Z",fill:"#475569"}),a("path",{d:"M1.79616 6.5951C2.54894 6.5619 3.18687 7.14364 3.22301 7.8963C3.25915 8.64894 2.67989 9.28913 1.92739 9.3282C1.17073 9.3675 0.526231 8.78435 0.489885 8.02753C0.45354 7.27071 1.03921 6.62849 1.79616 6.5951Z",fill:"#D1EDFD"}),a("path",{d:"M4.93607 11.4844C5.12839 11.6261 5.22049 11.9085 4.91876 11.9419C4.8067 11.8805 4.78491 11.8646 4.71094 11.7561C4.81572 11.6752 4.862 11.5925 4.93607 11.4844Z",fill:"#FEFEFD"}),a("path",{d:"M12.5164 3.58594L12.5715 3.59466C12.6589 3.65863 12.6908 3.94434 12.7882 4.05193C12.8789 4.15216 12.9155 4.17816 13.0326 4.24929C13.1363 4.31224 13.3325 4.34025 13.384 4.43124C13.3643 4.56218 13.0693 4.54857 12.9127 4.69344C12.6903 4.89898 12.7114 5.06971 12.5892 5.28622C12.5669 5.28439 12.5368 5.2868 12.5261 5.27346C12.4336 5.15843 12.4072 4.9308 12.3099 4.81465C12.1627 4.63903 11.9972 4.60054 11.7981 4.51372C11.7544 4.49467 11.7266 4.47099 11.7129 4.42649C11.7867 4.31876 12.0509 4.34309 12.2376 4.14892C12.43 3.94901 12.4155 3.72208 12.5164 3.58594Z",fill:"#475569"}),a("path",{d:"M2.13644 3.72656C2.24401 3.77084 2.29712 4.1268 2.431 4.25226C2.60327 4.41371 2.7311 4.41949 2.93246 4.52449C2.96024 4.53897 2.97173 4.56042 2.97671 4.58878C2.89584 4.6981 2.61854 4.70721 2.4596 4.85659C2.26275 5.04156 2.27341 5.29132 2.17022 5.42088C2.16192 5.41849 2.11671 5.40232 2.1156 5.40043C2.01291 5.21216 1.9836 5.04909 1.84812 4.87273C1.73599 4.72675 1.36534 4.69959 1.32812 4.56939C1.3835 4.47941 1.67823 4.44211 1.82291 4.30563C2.02737 4.11274 2.0042 3.8372 2.13644 3.72656Z",fill:"#475569"})]}))]}))}))}}},[gt,tn,kn,_e]),ft=u(function(){return Ve.some(function(e){return e.isSkeleton})},[Ve]),Ct=function(e){return o(void 0,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return Ie?[4,Ie(e)]:[3,2];case 1:t.sent(),Qe(function(e){return n(n([],e,!0),[{role:"assistant",content:"Thanks for your feedback — this will help improve future suggestions.",id:w(),citations:[],time:new Date,isEnd:!0}],!1)}),setTimeout(function(){return it("smooth")},100),t.label=2;case 2:return[2]}})})};return s("div",t({className:"".concat(N.customFont," ").concat(D.chatContainer),style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:Se&&!ft?"0 0 20px 5px rgba(37, 99, 235, 0.5)":"none"}},{children:[s("div",t({ref:je,className:D.scrollWrapper},{children:[a("div",t({ref:Dn,className:D.stickyHeader},{children:a(T,{resetChatHistory:lt,isStreamEnd:tn,chatTitle:X,onResize:se,chatSize:ae,movingTowards:le})})),s("div",t({className:D.messagesList},{children:[s("div",t({className:D.initialMessageRow},{children:[a("div",t({className:D.iconWrapper},{children:a(W,{})})),a("div",t({className:D.welcomeTextWrapper},{children:a("div",t({className:D.welcomeMarkdownWrapper},{children:a("span",{children:a(b,t({rehypePlugins:[y],components:pt},{children:re}))})}))}))]})),Ve.length>0&&Ve.map(function(e,n){var o,r;return s("div",t({className:D.messageRow},{children:["assistant"===e.role?a("div",t({className:D.assistantIconContainer},{children:a(W,{})})):a("div",{className:D.userSpacer}),a("div",t({className:D.messageContent},{children:"assistant"===e.role?s(l,{children:[e.orchestratorAndAgentsMessages&&e.orchestratorAndAgentsMessages.length>0&&a(I,{orchestratorAndAgentsMessages:null==e?void 0:e.orchestratorAndAgentsMessages,isStreamEnd:tn,finalTimeTaken:null==e?void 0:e.finalTimeTaken},null!==(o=null==e?void 0:e.finalTimeTaken)&&void 0!==o?o:null==e?void 0:e.id),a(_,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ve,handleStream:gt,isLastMessage:n===Ve.length-1,onSave:ie,citations:null==e?void 0:e.citations,setChatSize:se,chatSize:ae,isStreamEnd:tn,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onTypeResponseClick:function(){var e;Pn(!0),null===(e=He.current)||void 0===e||e.focus()},onComparisonLinkClick:ke,baseURL:ze,onFeedbackSubmit:Ct,isGlobalEditActive:_e,fieldLabelMap:qe}),e.hasOwnProperty("isEnd")&&!(null==e?void 0:e.isEnd)&&(null===(r=null==e?void 0:e.content)||void 0===r?void 0:r.length)>0&&s(l,{children:[a(E,{variant:"text",width:"50%",height:20}),a("div",{style:{marginTop:"10px"}}),a(E,{variant:"text",width:"100%",height:40})]}),a("div",t({className:D.timestamp},{children:e.time&&!isNaN(new Date(e.time).getTime())?new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}):s("div",t({className:D.userMessageWrapper},{children:[s("div",t({className:D.userMessageBubble,style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:e.isSkeleton||ft||e.id!==Fn?"none":"0 0 15px 3px rgba(37, 99, 235, 0.6)"}},{children:[e.isSkeleton?s("div",t({style:{display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",padding:"8px 0"}},{children:[a(E,{variant:"text",width:"100%",height:16}),a(E,{variant:"text",width:"80%",height:16})]})):a(_,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ve,handleStream:gt,isLastMessage:n===Ve.length-1,onSave:ie,citations:null==e?void 0:e.citations,isStreamEnd:tn,isGlobalEditActive:_e,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onComparisonLinkClick:ke,baseURL:ze,onFeedbackSubmit:Ct,fieldLabelMap:qe}),a("div",t({style:{marginTop:"0.5rem"}},{children:a(P,{})}))]})),a("div",t({className:D.userTimestamp},{children:new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}))}))]}),e.id)}),$e&&s("div",t({className:D.loadingRow},{children:[a("div",t({className:D.iconWrapper,style:{marginTop:"0.2rem"}},{children:a(W,{})})),a("div",t({className:D.loadingTextWrapper},{children:a("span",{children:dn})}))]})),a("div",{ref:Oe,style:{float:"left",clear:"both"}})]}))]})),a("div",t({className:D.inputAreaWrapper},{children:a(C,t({title:$?"Please wait for the validation to be completed.":""},{children:s("div",t({className:"".concat(D.inputBoxContainer," ").concat(nt?D.disabled:""),style:Wn?{boxShadow:"0 0 15px 3px rgba(37, 99, 235, 0.5)",borderColor:"#2563eb",transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}:{transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}},{children:[Ve.length>0&&!bn&&a("div",t({onMouseDown:function(e){e.preventDefault(),it("smooth")},className:D.scrollToBottomBtn},{children:a(q,{})})),s("div",t({style:{width:"100%",display:"flex"}},{children:[a("textarea",{ref:He,placeholder:ue,value:Ge||"",onChange:function(e){Ze(e.target.value)},onFocus:function(){return fn(!0)},onBlur:function(){return fn(!1)},onKeyDown:function(e){return mt(e)},disabled:nt,className:"no-scrollbar ".concat(D.chatTextarea),style:{minHeight:pn||Ge&&Ge.length>40?"120px":"50px",height:pn||Ge&&Ge.length>40?"120px":"50px",maxHeight:"120px"}}),a("span",t({className:D.sendButtonWrapper},{children:a("button",t({onClick:function(e){ot||mt(new KeyboardEvent("keydown",{key:"Enter"}))},disabled:ot,className:"".concat(D.sendButton," ").concat(ot?D.disabled:D.active)},{children:a(A,{})}))}))]}))]}))}))})),s("div",t({className:D.footerTools},{children:[a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"speaker",isActive:!1,onClick:function(){return null},disabled:!1})}))})),a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"microphone",isActive:!1,onClick:function(){return null},disabled:!1})}))}))]})),a(p,t({open:Xn,onClose:function(){},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px",backgroundColor:"var(--il-surface, #ffffff)",color:"var(--il-foreground, #0F172A)"}}},{children:s(f,t({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[a("h3",t({style:{fontSize:"18px",fontWeight:600,color:"var(--il-foreground, #0F172A)",marginBottom:"10px"}},{children:"Session Expired"})),a("p",t({style:{fontSize:"14px",color:"var(--il-muted, #64748B)",lineHeight:"1.5",marginBottom:"20px"}},{children:"Changes were made to the learnings in this scope while you were editing. To avoid conflicts, concurrent edits aren’t allowed."})),s(f,t({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[a("button",t({onClick:function(){Yn(!1),lt()},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"var(--il-secondary-bg, white)",border:"1px solid var(--il-border, #E2E8F0)",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"var(--il-secondary-fg, #475569)",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="var(--il-hover, #F8FAFC)"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="var(--il-secondary-bg, white)"}},{children:"Reset Session"})),a("button",t({onClick:function(){Yn(!1),null==Ne||Ne()},style:{flex:1,padding:"10px 16px",backgroundColor:"var(--il-danger, #EF4444)",color:"var(--il-primary-fg, white)",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="var(--il-danger-hover, #DC2626)"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="var(--il-danger, #EF4444)"}},{children:"Discard & Close"}))]}))]}))}))]}))};export{j as autoGeneratePrompt,B as default};
2
2
  //# sourceMappingURL=ChatComponent.js.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/style-inject/dist/style-inject.es.js";var o={"welcome-message":"ChatComponent-module_welcome-message__kz4PW",fadeSlideIn:"ChatComponent-module_fadeSlideIn__Pwh2n",thinkingIndicatorContainer:"ChatComponent-module_thinkingIndicatorContainer__bNun2",thinkingText:"ChatComponent-module_thinkingText__CZiAb",thinkingDot:"ChatComponent-module_thinkingDot__Mll-g",thinkingBounce:"ChatComponent-module_thinkingBounce__UVgEW",chatContainer:"ChatComponent-module_chatContainer__FSndl",scrollWrapper:"ChatComponent-module_scrollWrapper__jL4ly",stickyHeader:"ChatComponent-module_stickyHeader__F-aue",messagesList:"ChatComponent-module_messagesList__dIXEK",initialMessageRow:"ChatComponent-module_initialMessageRow__9KdTo",iconWrapper:"ChatComponent-module_iconWrapper__rKr69",welcomeTextWrapper:"ChatComponent-module_welcomeTextWrapper__9r3fC",welcomeMarkdownWrapper:"ChatComponent-module_welcomeMarkdownWrapper__YjUVT",messageRow:"ChatComponent-module_messageRow__CyYZ5",assistantIconContainer:"ChatComponent-module_assistantIconContainer__psZwV",userSpacer:"ChatComponent-module_userSpacer__A8RYb",messageContent:"ChatComponent-module_messageContent__gweOv",timestamp:"ChatComponent-module_timestamp__fUZvx",userMessageWrapper:"ChatComponent-module_userMessageWrapper__j49oJ",userMessageBubble:"ChatComponent-module_userMessageBubble__TMud8",userTimestamp:"ChatComponent-module_userTimestamp__Ul2GB",loadingRow:"ChatComponent-module_loadingRow__V01ST",loadingTextWrapper:"ChatComponent-module_loadingTextWrapper__ZTM3p",inputAreaWrapper:"ChatComponent-module_inputAreaWrapper__PHGMo",inputBoxContainer:"ChatComponent-module_inputBoxContainer__btCTo",disabled:"ChatComponent-module_disabled__Qdyhz",scrollToBottomBtn:"ChatComponent-module_scrollToBottomBtn__5OCWS",chatTextarea:"ChatComponent-module_chatTextarea__YS4KS",sendButtonWrapper:"ChatComponent-module_sendButtonWrapper__L-Kze",sendButton:"ChatComponent-module_sendButton__18iHG",active:"ChatComponent-module_active__1REPW",footerTools:"ChatComponent-module_footerTools__-2FAb",footerToolItem:"ChatComponent-module_footerToolItem__2a9SR"};e(".ChatComponent-module_welcome-message__kz4PW{align-items:flex-start;animation:ChatComponent-module_fadeSlideIn__Pwh2n 1.2s ease-out forwards;border-radius:.5rem;color:#333;display:fixed;font-size:1rem;line-height:1.75rem;max-width:100%;opacity:0;overflow-wrap:break-word;padding:1rem;transform:translateY(10px);white-space:pre-wrap;word-break:break-word}@keyframes ChatComponent-module_fadeSlideIn__Pwh2n{to{opacity:1;transform:translateY(0)}}.ChatComponent-module_thinkingIndicatorContainer__bNun2{align-items:center;background-color:initial;border-radius:4px;color:#6b7280;display:flex;font-family:Plus Jakarta Sans,sans-serif;font-size:.875rem;gap:8px;padding:8px 12px;position:relative;width:100%}.ChatComponent-module_thinkingText__CZiAb{color:#6b7280;font-size:.875rem;font-weight:500;white-space:nowrap}.ChatComponent-module_thinkingDot__Mll-g{animation:ChatComponent-module_thinkingBounce__UVgEW 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:#6b7280;border-radius:50%;display:inline-block;height:5px;width:5px}.ChatComponent-module_thinkingDot__Mll-g:nth-child(2){animation-delay:-.32s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(3){animation-delay:-.16s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(4){animation-delay:0s}@keyframes ChatComponent-module_thinkingBounce__UVgEW{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.ChatComponent-module_chatContainer__FSndl{align-items:center;background-color:#fbfaff;border:1px solid #d1d5db;display:flex;flex-direction:column;font-family:Plus Jakarta Sans,sans-serif;height:100%;justify-content:center;overflow:hidden;width:100%}.ChatComponent-module_scrollWrapper__jL4ly{background-color:#fbfaff;height:100%;max-width:100%;overflow:auto;width:100%}.ChatComponent-module_stickyHeader__F-aue{background-color:#fbfaff;position:sticky;top:0;z-index:99}.ChatComponent-module_messagesList__dIXEK{background-color:#fbfaff;display:flex;flex:1;flex-direction:column;overflow-x:hidden;overflow-y:auto}.ChatComponent-module_initialMessageRow__9KdTo{display:flex;flex-direction:row;font-family:inherit;padding:16px 10px 0 16px}.ChatComponent-module_iconWrapper__rKr69{margin-top:.3rem;max-height:32px;max-width:32px}.ChatComponent-module_welcomeTextWrapper__9r3fC{color:#000;display:flex;flex-direction:column;font-weight:400}.ChatComponent-module_welcomeMarkdownWrapper__YjUVT{align-items:flex-start;border-radius:.5rem;color:#333;display:inline-flex;flex-direction:column;font-size:1rem;line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_messageRow__CyYZ5{box-sizing:border-box;display:flex;padding:.5rem 1.25rem .5rem 1.15rem;width:100%}.ChatComponent-module_assistantIconContainer__psZwV{margin-right:.7rem;margin-top:.5rem;max-width:32px;min-width:32px}.ChatComponent-module_userSpacer__A8RYb{margin-right:1rem;min-width:32px}.ChatComponent-module_messageContent__gweOv{flex:1;min-width:0}.ChatComponent-module_timestamp__fUZvx{color:#bfbfbf;font-size:.75rem;margin-top:4px}.ChatComponent-module_userMessageWrapper__j49oJ{align-items:flex-end;display:flex;flex-direction:column}.ChatComponent-module_userMessageBubble__TMud8{align-items:center;background-color:#8694a10d;border-radius:8px;display:flex;gap:3px;justify-content:center;max-width:80%;padding:0 1rem .5rem}.ChatComponent-module_userTimestamp__Ul2GB{color:#bfbfbf;font-size:.75rem;margin-top:8px;padding-right:16px}.ChatComponent-module_loadingRow__V01ST{display:flex;padding:16px 16px 0}.ChatComponent-module_loadingTextWrapper__ZTM3p{align-items:flex-start;border-radius:.5rem;color:#333;display:inline-flex;font-size:1rem;line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-bottom:1rem;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_inputAreaWrapper__PHGMo{align-items:center;background-color:#fbfaff;display:flex;flex-direction:column;height:fit-content;justify-content:flex-end;position:relative;width:95%}.ChatComponent-module_inputBoxContainer__btCTo{align-items:flex-end;background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;display:flex;gap:.5rem;position:relative;width:100%}.ChatComponent-module_inputBoxContainer__btCTo.ChatComponent-module_disabled__Qdyhz{cursor:not-allowed}.ChatComponent-module_scrollToBottomBtn__5OCWS{align-items:center;background-color:#fff;border-radius:50%;box-shadow:0 2px 5px #0000001a;cursor:pointer;display:flex;height:24px;justify-content:center;left:50%;position:absolute;top:-34px;width:24px;z-index:10}.ChatComponent-module_chatTextarea__YS4KS{background-color:#fff;border:none;border-radius:.5rem;box-sizing:border-box;color:inherit;flex-grow:1;font-family:inherit;font-size:1rem;line-height:1.5rem;outline:none;overflow-y:auto;padding:12px;resize:none;transition:min-height .3s ease,background-color .3s ease}.ChatComponent-module_chatTextarea__YS4KS:disabled{cursor:not-allowed}.ChatComponent-module_sendButtonWrapper__L-Kze{align-items:flex-end;display:flex;flex-direction:column;justify-content:flex-end}.ChatComponent-module_sendButton__18iHG{background-color:#fff;border:none;border-radius:.475rem;font-size:1rem;font-weight:700;height:50px;padding:.5rem .75rem;transition:background-color .3s,color .3s}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW{color:#5928ed;cursor:pointer}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_disabled__Qdyhz{color:#d1d5db;cursor:not-allowed}.ChatComponent-module_footerTools__-2FAb{display:flex;flex-direction:row;gap:.25rem;width:95%}.ChatComponent-module_footerToolItem__2a9SR{width:50%}");export{o as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js";var o={"welcome-message":"ChatComponent-module_welcome-message__kz4PW",fadeSlideIn:"ChatComponent-module_fadeSlideIn__Pwh2n",thinkingIndicatorContainer:"ChatComponent-module_thinkingIndicatorContainer__bNun2",thinkingText:"ChatComponent-module_thinkingText__CZiAb",thinkingDot:"ChatComponent-module_thinkingDot__Mll-g",thinkingBounce:"ChatComponent-module_thinkingBounce__UVgEW",chatContainer:"ChatComponent-module_chatContainer__FSndl",scrollWrapper:"ChatComponent-module_scrollWrapper__jL4ly",messagesList:"ChatComponent-module_messagesList__dIXEK",stickyHeader:"ChatComponent-module_stickyHeader__F-aue",initialMessageRow:"ChatComponent-module_initialMessageRow__9KdTo",iconWrapper:"ChatComponent-module_iconWrapper__rKr69",welcomeTextWrapper:"ChatComponent-module_welcomeTextWrapper__9r3fC",welcomeMarkdownWrapper:"ChatComponent-module_welcomeMarkdownWrapper__YjUVT",messageRow:"ChatComponent-module_messageRow__CyYZ5",assistantIconContainer:"ChatComponent-module_assistantIconContainer__psZwV",userSpacer:"ChatComponent-module_userSpacer__A8RYb",messageContent:"ChatComponent-module_messageContent__gweOv",timestamp:"ChatComponent-module_timestamp__fUZvx",userMessageWrapper:"ChatComponent-module_userMessageWrapper__j49oJ",userMessageBubble:"ChatComponent-module_userMessageBubble__TMud8",userTimestamp:"ChatComponent-module_userTimestamp__Ul2GB",loadingRow:"ChatComponent-module_loadingRow__V01ST",loadingTextWrapper:"ChatComponent-module_loadingTextWrapper__ZTM3p",inputAreaWrapper:"ChatComponent-module_inputAreaWrapper__PHGMo",inputBoxContainer:"ChatComponent-module_inputBoxContainer__btCTo",disabled:"ChatComponent-module_disabled__Qdyhz",scrollToBottomBtn:"ChatComponent-module_scrollToBottomBtn__5OCWS",chatTextarea:"ChatComponent-module_chatTextarea__YS4KS",sendButtonWrapper:"ChatComponent-module_sendButtonWrapper__L-Kze",sendButton:"ChatComponent-module_sendButton__18iHG",active:"ChatComponent-module_active__1REPW",footerTools:"ChatComponent-module_footerTools__-2FAb",footerToolItem:"ChatComponent-module_footerToolItem__2a9SR"};e(".ChatComponent-module_welcome-message__kz4PW{align-items:flex-start;animation:ChatComponent-module_fadeSlideIn__Pwh2n 1.2s ease-out forwards;border-radius:.5rem;color:var(--il-foreground,#333);display:fixed;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;max-width:100%;opacity:0;overflow-wrap:break-word;padding:1rem;transform:translateY(10px);white-space:pre-wrap;word-break:break-word}@keyframes ChatComponent-module_fadeSlideIn__Pwh2n{to{opacity:1;transform:translateY(0)}}.ChatComponent-module_thinkingIndicatorContainer__bNun2{align-items:center;background-color:transparent;border-radius:4px;color:var(--il-color-6b7280,#6b7280);display:flex;font-family:Plus Jakarta Sans,sans-serif;font-size:var(--il-font-size-sm,.875rem);gap:8px;padding:8px 12px;position:relative;width:100%}.ChatComponent-module_thinkingText__CZiAb{color:var(--il-color-6b7280,#6b7280);font-size:var(--il-font-size-sm,.875rem);font-weight:var(--il-font-weight-medium,500);white-space:nowrap}.ChatComponent-module_thinkingDot__Mll-g{animation:ChatComponent-module_thinkingBounce__UVgEW 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:var(--il-color-6b7280,#6b7280);border-radius:50%;display:inline-block;height:5px;width:5px}.ChatComponent-module_thinkingDot__Mll-g:nth-child(2){animation-delay:-.32s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(3){animation-delay:-.16s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(4){animation-delay:0s}@keyframes ChatComponent-module_thinkingBounce__UVgEW{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.ChatComponent-module_chatContainer__FSndl{align-items:center;background-color:var(--il-bg,#fbfaff);border:1px solid var(--il-border,#d1d5db);color:var(--il-foreground,#19213d);display:flex;flex-direction:column;font-family:Plus Jakarta Sans,sans-serif;height:100%;justify-content:center;overflow:hidden;width:100%}.ChatComponent-module_scrollWrapper__jL4ly{background-color:var(--il-bg,#fbfaff);height:100%;max-width:100%;overflow:auto;width:100%}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly{scrollbar-color:var(--il-scrollbar-thumb) var(--il-scrollbar-track);scrollbar-width:var(--il-scrollbar-width)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar{height:var(--il-scrollbar-size);width:var(--il-scrollbar-size)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-track,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-track{background:var(--il-scrollbar-track)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-thumb,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-thumb{background:var(--il-scrollbar-thumb)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-thumb:hover,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-thumb:hover{background:var(--il-scrollbar-thumb-hover)}.ChatComponent-module_stickyHeader__F-aue{background-color:var(--il-bg,#fbfaff);position:sticky;top:0;z-index:99}.ChatComponent-module_messagesList__dIXEK{background-color:var(--il-bg,#fbfaff);display:flex;flex:1;flex-direction:column;overflow-x:hidden;overflow-y:auto}.ChatComponent-module_initialMessageRow__9KdTo{display:flex;flex-direction:row;font-family:inherit;padding:16px 10px 0 16px}.ChatComponent-module_iconWrapper__rKr69{margin-top:.3rem;max-height:32px;max-width:32px}.ChatComponent-module_welcomeTextWrapper__9r3fC{color:var(--il-foreground,#000);display:flex;flex-direction:column;font-weight:var(--il-font-weight-regular,400)}.ChatComponent-module_welcomeMarkdownWrapper__YjUVT{align-items:flex-start;border-radius:.5rem;color:var(--il-foreground,#333);display:inline-flex;flex-direction:column;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_messageRow__CyYZ5{box-sizing:border-box;display:flex;padding:.5rem 1.25rem .5rem 1.15rem;width:100%}.ChatComponent-module_assistantIconContainer__psZwV{margin-right:.7rem;margin-top:.5rem;max-width:32px;min-width:32px}.ChatComponent-module_userSpacer__A8RYb{margin-right:1rem;min-width:32px}.ChatComponent-module_messageContent__gweOv{color:inherit;flex:1;min-width:0}.ChatComponent-module_timestamp__fUZvx{color:var(--il-color-bfbfbf,#bfbfbf);font-size:var(--il-font-size-xs,.75rem);margin-top:4px}.ChatComponent-module_userMessageWrapper__j49oJ{align-items:flex-end;display:flex;flex-direction:column}.ChatComponent-module_userMessageBubble__TMud8{align-items:center;background-color:var(--il-color-8694a10d,#8694a10d);border-radius:8px;color:var(--il-foreground,#19213d);display:flex;gap:3px;justify-content:center;max-width:80%;padding:0 1rem .5rem}.ChatComponent-module_userTimestamp__Ul2GB{color:var(--il-color-bfbfbf,#bfbfbf);font-size:var(--il-font-size-xs,.75rem);margin-top:8px;padding-right:16px}.ChatComponent-module_loadingRow__V01ST{display:flex;padding:16px 16px 0}.ChatComponent-module_loadingTextWrapper__ZTM3p{align-items:flex-start;border-radius:.5rem;color:var(--il-foreground,#333);display:inline-flex;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-bottom:1rem;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_inputAreaWrapper__PHGMo{align-items:center;background-color:var(--il-bg,#fbfaff);display:flex;flex-direction:column;height:fit-content;justify-content:flex-end;position:relative;width:95%}.ChatComponent-module_inputBoxContainer__btCTo{align-items:flex-end;background-color:var(--il-input-bg,#fff);border:1px solid var(--il-input-border,#e5e7eb);border-radius:8px;display:flex;gap:.5rem;position:relative;width:100%}.ChatComponent-module_inputBoxContainer__btCTo.ChatComponent-module_disabled__Qdyhz{cursor:not-allowed}.ChatComponent-module_scrollToBottomBtn__5OCWS{align-items:center;background-color:var(--il-color-ffffff,#fff);border-radius:50%;box-shadow:0 2px 5px rgba(0,0,0,.1);cursor:pointer;display:flex;height:24px;justify-content:center;left:50%;position:absolute;top:-34px;width:24px;z-index:10}.ChatComponent-module_chatTextarea__YS4KS{background-color:var(--il-input-bg,#fff);border:none;border-radius:.5rem;box-sizing:border-box;color:var(--il-input-fg,inherit);flex-grow:1;font-family:inherit;font-size:var(--il-font-size-md,1rem);line-height:1.5rem;outline:none;overflow-y:auto;padding:12px;resize:none;transition:min-height .3s ease,background-color .3s ease}.ChatComponent-module_chatTextarea__YS4KS:disabled{cursor:not-allowed}.ChatComponent-module_chatTextarea__YS4KS::placeholder{color:var(--il-input-placeholder,#6b7280)}.ChatComponent-module_sendButtonWrapper__L-Kze{align-items:flex-end;display:flex;flex-direction:column;justify-content:flex-end}.ChatComponent-module_sendButton__18iHG{background-color:var(--il-secondary-bg,#fff);border:1px solid var(--il-border,#e5e7eb);border-radius:.475rem;color:var(--il-muted,#64748b);font-size:var(--il-font-size-md,1rem);font-weight:700;height:50px;padding:.5rem .75rem;transition:background-color .3s,color .3s}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW{color:var(--il-primary,#5928ed);cursor:pointer}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW:hover{background-color:var(--il-hover,#f1f5f9)}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_disabled__Qdyhz{color:var(--il-disabled,#d1d5db);cursor:not-allowed}.ChatComponent-module_footerTools__-2FAb{display:flex;flex-direction:row;gap:.25rem;width:95%}.ChatComponent-module_footerToolItem__2a9SR{width:50%}");export{o as default};
2
2
  //# sourceMappingURL=ChatComponent.module.css.js.map
@@ -1,2 +1,2 @@
1
- import e from"../../../../node_modules/style-inject/dist/style-inject.es.js";var a={"chat-header-container":"ChatHeader-module_chat-header-container__VrneF","chat-header-title-wrapper":"ChatHeader-module_chat-header-title-wrapper__DvqBK","chat-header-icon-container":"ChatHeader-module_chat-header-icon-container__CcuZH","chat-header-title":"ChatHeader-module_chat-header-title__x-HEq","chat-header-actions":"ChatHeader-module_chat-header-actions__LE7nW","resize-container":"ChatHeader-module_resize-container__zSvfH","resize-trigger":"ChatHeader-module_resize-trigger__pSU19","resize-dropdown":"ChatHeader-module_resize-dropdown__ZBY9o",slideDown:"ChatHeader-module_slideDown__aWXDD","resize-option":"ChatHeader-module_resize-option__-bPiq",selected:"ChatHeader-module_selected__ClG5-","new-chat-trigger":"ChatHeader-module_new-chat-trigger__KQI1a",enabled:"ChatHeader-module_enabled__eIwJb",disabled:"ChatHeader-module_disabled__nO1aI"};e(".ChatHeader-module_chat-header-container__VrneF{align-items:center;background-color:#fff;border-bottom:1px solid #e5e7eb;box-sizing:border-box;display:flex;justify-content:space-between;padding:.65rem 1rem;position:relative;width:100%}.ChatHeader-module_chat-header-title-wrapper__DvqBK{align-items:center;display:flex;flex:1;gap:10px;min-width:0}.ChatHeader-module_chat-header-icon-container__CcuZH{align-items:center;display:flex;flex-shrink:0;justify-content:center}.ChatHeader-module_chat-header-title__x-HEq{color:#111827;font-size:1.125rem;font-weight:500;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ChatHeader-module_chat-header-actions__LE7nW{align-items:center;display:flex;gap:12px;padding-left:1rem}.ChatHeader-module_resize-container__zSvfH{align-items:center;display:flex;padding-bottom:5px;position:relative}.ChatHeader-module_resize-trigger__pSU19{align-items:center;cursor:pointer;display:flex;height:2rem;justify-content:center;transition:transform .3s ease;width:2rem}.ChatHeader-module_resize-dropdown__ZBY9o{animation:ChatHeader-module_slideDown__aWXDD .25s cubic-bezier(.34,1.56,.64,1) forwards;background-color:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 8px 20px #0000001f;display:flex;gap:6px;padding:8px;position:absolute;right:0;top:40px;transform-origin:top;white-space:nowrap;z-index:1000}@keyframes ChatHeader-module_slideDown__aWXDD{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.ChatHeader-module_resize-option__-bPiq{align-items:center;background-color:initial;border:1px solid #f3f4f6;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;gap:2px;padding:4px 8px;transition:all .15s ease}.ChatHeader-module_resize-option__-bPiq:hover{background-color:#f9fafb;border-color:#d1d5db}.ChatHeader-module_resize-option__-bPiq.ChatHeader-module_selected__ClG5-{background-color:#f0f0ff;border:1px solid #512ced}.ChatHeader-module_new-chat-trigger__KQI1a{align-items:center;display:flex;height:2rem;justify-content:center;width:2rem}.ChatHeader-module_new-chat-trigger__KQI1a.ChatHeader-module_enabled__eIwJb{cursor:pointer;opacity:1}.ChatHeader-module_new-chat-trigger__KQI1a.ChatHeader-module_disabled__nO1aI{cursor:not-allowed;opacity:.5}");export{a as default};
1
+ import e from"../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js";var r={"chat-header-container":"ChatHeader-module_chat-header-container__VrneF","chat-header-title-wrapper":"ChatHeader-module_chat-header-title-wrapper__DvqBK","chat-header-icon-container":"ChatHeader-module_chat-header-icon-container__CcuZH","chat-header-title":"ChatHeader-module_chat-header-title__x-HEq","chat-header-actions":"ChatHeader-module_chat-header-actions__LE7nW","resize-container":"ChatHeader-module_resize-container__zSvfH","resize-trigger":"ChatHeader-module_resize-trigger__pSU19","resize-dropdown":"ChatHeader-module_resize-dropdown__ZBY9o",slideDown:"ChatHeader-module_slideDown__aWXDD","resize-option":"ChatHeader-module_resize-option__-bPiq",selected:"ChatHeader-module_selected__ClG5-","new-chat-trigger":"ChatHeader-module_new-chat-trigger__KQI1a",enabled:"ChatHeader-module_enabled__eIwJb",disabled:"ChatHeader-module_disabled__nO1aI"};e(".ChatHeader-module_chat-header-container__VrneF{align-items:center;background-color:var(--il-surface,#fff);border-bottom:1px solid var(--il-border,#e5e7eb);box-sizing:border-box;display:flex;justify-content:space-between;padding:.65rem 1rem;position:relative;width:100%}.ChatHeader-module_chat-header-title-wrapper__DvqBK{align-items:center;display:flex;flex:1;gap:10px;min-width:0}.ChatHeader-module_chat-header-icon-container__CcuZH{align-items:center;display:flex;flex-shrink:0;justify-content:center}.ChatHeader-module_chat-header-title__x-HEq{color:var(--il-foreground,#111827);font-size:var(--il-font-size-lg,1.125rem);font-weight:var(--il-font-weight-medium,500);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ChatHeader-module_chat-header-actions__LE7nW{align-items:center;display:flex;gap:12px;padding-left:1rem}.ChatHeader-module_resize-container__zSvfH{align-items:center;display:flex;padding-bottom:5px;position:relative}.ChatHeader-module_resize-trigger__pSU19{align-items:center;cursor:pointer;display:flex;height:2rem;justify-content:center;transition:transform .3s ease;width:2rem}.ChatHeader-module_resize-dropdown__ZBY9o{animation:ChatHeader-module_slideDown__aWXDD .25s cubic-bezier(.34,1.56,.64,1) forwards;background-color:var(--il-surface,#fff);border:1px solid var(--il-border,#e5e7eb);border-radius:10px;box-shadow:0 8px 20px rgba(0,0,0,.12);display:flex;gap:6px;padding:8px;position:absolute;right:0;top:40px;transform-origin:top;white-space:nowrap;z-index:1000}@keyframes ChatHeader-module_slideDown__aWXDD{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.ChatHeader-module_resize-option__-bPiq{align-items:center;background-color:transparent;border:1px solid var(--il-border,#f3f4f6);border-radius:6px;cursor:pointer;display:flex;flex-direction:column;gap:2px;padding:4px 8px;transition:all .15s ease}.ChatHeader-module_resize-option__-bPiq:hover{background-color:var(--il-hover,#f9fafb);border-color:var(--il-border,#d1d5db)}.ChatHeader-module_resize-option__-bPiq.ChatHeader-module_selected__ClG5-{background-color:var(--il-primary-subtle,#f0f0ff);border:1px solid var(--il-primary,#512ced)}.ChatHeader-module_new-chat-trigger__KQI1a{align-items:center;display:flex;height:2rem;justify-content:center;width:2rem}.ChatHeader-module_new-chat-trigger__KQI1a.ChatHeader-module_enabled__eIwJb{cursor:pointer;opacity:1}.ChatHeader-module_new-chat-trigger__KQI1a.ChatHeader-module_disabled__nO1aI{cursor:not-allowed;opacity:.5}");export{r as default};
2
2
  //# sourceMappingURL=ChatHeader.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as e,__spreadArray as t,__assign as n,__awaiter as i,__generator as o,__rest as a}from"tslib";import{jsx as r,jsxs as s,Fragment as l}from"react/jsx-runtime";import{useRef as d,useState as c,useMemo as u,useEffect as h,useCallback as m,useLayoutEffect as v}from"react";import{keyframes as p,Box as C}from"@mui/material";import g from"@mui/material/Tooltip";import f from"react-markdown";import S from"rehype-raw";import{http as b}from"../../../../api/transport.js";import{v4 as y}from"uuid";import{startChatStream as x}from"@e-llm-studio/streaming-response";import{WatchMeWork as w}from"@e-llm-studio/watch-me-work";import R from"./ChatHeader.js";import k from"../MessageRendering/MessageRendering.js";import{Skeleton as _}from"../atoms/SkeletonLoader/SkeletonLoader.js";import{ActionableButton as E}from"../MessageRendering/ClickableChatComponents.js";import T from"../AudioWaveform.js";import M from"./ChatComponent.module.css.js";import I from"../../InstantLearning.module.css.js";import{ScrollToBottom as N}from"../_svg/ScrollToBottom.js";import{useHeaderObserver as D,extractTextFromChildren as L}from"../../helpers/utils.js";import{SendButton as F}from"../_svg/SendButton.js";import A from"../_svg/SparkleIcon.js";import{UserIcon as W}from"../_svg/UserIcon.js";var z,j=function(j){var q=j.chatAssistantName,B=j.organizationName,P=j.baseUrl,H=j.baseWebsocketUrl,Z=j.setIsNewChatClicked;j.ThinkingBulbIconComponent;var K=j.isFormSaveClicked,U=j.setIsFormSavedClicked,G=j.onResetLearningData,V=j.sendMessageInChat,O=j.setSendMessageInChat,J=j.isFormValidating,Q=j.chatTitle,X=j.customMetaData,Y=j.headerMessageHandlers;j.aiResponse;var $=j.setAIResponse,ee=j.onResetChat,te=j.initialChatMessage,ne=void 0===te?"":te,ie=j.onSave,oe=j.chatSize,ae=j.setChatSize,re=j.movingTowards,se=j.setCitations,le=j.textareaPlaceholder,de=void 0===le?"Tell me more about this learning...":le,ce=j.setCurrentRequestId,ue=j.showSavedMessage,he=void 0!==ue&&ue,me=j.savedMessage,ve=j.isError,pe=void 0!==ve&&ve,Ce=j.errorMessage,ge=void 0===Ce?"There was an error saving your changes.":Ce;j.isSaving;var fe=j.isHighlighted,Se=void 0!==fe&&fe,be=j.onStreamingStateChange,ye=j.onViewComparison;j.isCopyEnabled;var xe=j.onComparisonLinkClick,we=j.onSubmitFeedback,Re=q,ke=d("".concat(Re,"-").concat(B,"-").concat(y())),_e=d("".concat(y())),Ee=P,Te=d(null),Me=d(!0),Ie=d(null),Ne=d(null),De=c(""),Le=De[0],Fe=De[1],Ae=c([]),We=Ae[0],ze=Ae[1],je=c(!1),qe=je[0],Be=je[1],Pe=c(!1);Pe[0];var He=Pe[1],Ze=c(!0),Ke=Ze[0],Ue=Ze[1],Ge=c(!0);Ge[0];var Ve=Ge[1],Oe=c("");Oe[0];var Je=Oe[1],Qe=c(""),Xe=Qe[0],Ye=Qe[1],$e=c(!1),et=$e[0],tt=$e[1],nt=c(!1),it=nt[0],ot=nt[1],at=c(!0),rt=at[0],st=at[1],lt=c("100%");lt[0];var dt=lt[1],ct=c(null),ut=ct[0],ht=ct[1],mt=c(!1);mt[0];var vt=mt[1],pt=c(!1),Ct=pt[0],gt=pt[1],ft=d(null),St=d(new Set),bt=c(null),yt=bt[0],xt=bt[1],wt=c(!1),Rt=wt[0],kt=wt[1],_t=c(!1);_t[0],_t[1];var Et=c(null);Et[0],Et[1],d(null),d(null);var Tt=d(new Map),Mt=d(""),It=p(z||(z=e(["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "],["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "]))),Nt=u(function(){return""===(null==Le?void 0:Le.trim())||et},[Le,et]),Dt=u(function(){return J},[J]),Lt=u(function(){return Nt||et||J},[Nt,et,J]);h(function(){null==be||be(et)},[et,be]),h(function(){var e=Te.current,t=function(){if(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;st(n-t-i<=20)}};return e&&(e.addEventListener("scroll",t),t()),function(){e&&e.removeEventListener("scroll",t)}},[We]);var Ft=D({handlers:Y,setResult:$}).processHeaderMessage;h(function(){he&&gt(!0)},[he]),h(function(){if(Rt){var e=setTimeout(function(){kt(!1)},3e3);return function(){return clearTimeout(e)}}},[Rt]),h(function(){K&&(Bt(new KeyboardEvent("keydown",{key:"Enter"}),!1,"Save this Learning"),U(!1))},[K]),h(function(){if(V)try{if(V.startsWith("__SKELETON__:")){var e=V.split(":"),i=e[1],o=e.slice(2).join(":"),a={role:"user",content:"",id:i,time:new Date,isSkeleton:!0,skeletonContent:o};return ze(function(e){return t(t([],e,!0),[a],!1)}),Bt(new KeyboardEvent("keydown",{key:"Enter"}),!1,o,!1,i),xt(i),O&&O(""),void setTimeout(function(){xt(null)},2e3)}if(V.startsWith("__SKELETON_END__::")){var r=V.split("::")[1]||"";return ze(function(e){return e.map(function(e){return e.isSkeleton?n(n({},e),{isSkeleton:!1,content:e.skeletonContent||r}):e})}),void(O&&O(""))}var s=y();Bt(new KeyboardEvent("keydown",{key:"Enter"}),!1,V,!1,s),xt(s),O&&O(""),setTimeout(function(){return xt(null)},2e3)}catch(e){console.error("Error handling sendMessageInChat signal",e)}},[V]),h(function(){Wt(),zt();var e=function(){var e,t=(null===(e=null==ft?void 0:ft.current)||void 0===e?void 0:e.clientHeight)||0,n="calc(100% - ".concat(t,"px - 10px)");dt(n)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var At=m(function(e){var t="string"==typeof e?e:"smooth";Ie.current&&Ie.current.scrollIntoView({behavior:t,block:"end"}),Me.current&&setTimeout(function(){Ie.current&&Me.current&&Ie.current.scrollIntoView({behavior:t,block:"end"})},100)},[]);h(function(){if(!et){var e="";if(Ct?e=me||"Thank you teacher for teaching me, your rule has been saved successfully.":pe&&(e=ge||"I'm sorry, I couldn't save your changes. Please try again."),e){var n={role:"assistant",content:e,id:y(),citations:[],time:new Date};ze(function(e){return t(t([],e,!0),[n],!1)}),gt(!1),setTimeout(function(){return At("smooth")},100)}}},[Ct,pe,et,me,ge,At]),h(function(){Me.current&&At("smooth")},[At]);var Wt=function(){var e={method:"get",maxBodyLength:1/0,url:"".concat(Ee,"/api/chatbot/getChatSettings?name=").concat(Re,"&organizationName=").concat(B),headers:{}};b.request(e).then(function(e){var t,n,i;(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.chatSettings)&&""!==(null===(i=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.chatSettings)||void 0===i?void 0:i.chatInitialMessage)&&Ve(!0)}).catch(function(e){console.error(e)})},zt=function(){return i(void 0,void 0,void 0,function(){var e,t;return o(this,function(n){e="".concat(Ee,"/api/chat/history?name=").concat(Re,"&organizationName=").concat(B);try{t={method:"GET",params:{guestSessionId:ke.current},withCredentials:!0},b.get(e,t).then(function(e){var t=e.data;t.length>0?(ze(t),At()):Ve(!0)}).catch(function(e){console.error(e)})}catch(e){Be(!1),console.error(e)}return[2]})})};function jt(e){return null==e?void 0:e.replace(/<a [^>]*>.*?<\/a>/g,function(e){return null==e?void 0:e.replace(/\*/g,"&ast;")})}var qt=function(e,i,o,a,r,s,l){var d,c,u,h,m,v,p,C,g,f,S,b,x,w,R,k,_,E,T,M,I,N,D,L,F,A,W,z,j,q,B,P,H,Z;if(null===(c=null===(d=null==e?void 0:e.chatStream)||void 0===d?void 0:d.continueChatResult)||void 0===c?void 0:c.header_message){var K={header_message:e.chatStream.continueChatResult.header_message,responsedata:null===(m=null===(h=null===(u=null==e?void 0:e.chatStream)||void 0===u?void 0:u.continueChatResult)||void 0===h?void 0:h.message)||void 0===m?void 0:m.content};Ft(K)}var U=null===(v=null==e?void 0:e.chatStream)||void 0===v?void 0:v.continueChatResult,G=null==U?void 0:U.isEnd,V=(null===(p=null==U?void 0:U.message)||void 0===p?void 0:p.citations)||[];G&&V.length>0&&se&&se(V);var O={role:"assistant",content:"",id:y()};if(null===(S=null===(f=null===(g=null===(C=null==e?void 0:e.chatStream)||void 0===C?void 0:C.continueChatResult)||void 0===g?void 0:g.message)||void 0===f?void 0:f.content)||void 0===S?void 0:S.includes("WaitMessage: "))He(!0),O.content=function(e){var t="WaitMessage: ",n=e.indexOf(t);if(-1!==n){var i=e.substring(n+13);return null==i?void 0:i.replaceAll("WaitMessage: ","")}return""}((null===(w=null===(x=null===(b=null==e?void 0:e.chatStream)||void 0===b?void 0:b.continueChatResult)||void 0===x?void 0:x.message)||void 0===w?void 0:w.content)+"\n\n"),""!==O.content&&(Be(!1),ze(t(t([],We,!0),[{role:"user",content:r,time:a,isFirstQuestionSent:s||!1,id:l||(null===(k=null===(R=null==e?void 0:e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===k?void 0:k.requestId)||"",reply:""},O],!1)));else{He(!1),O.content=null===(M=jt(null===(T=null===(E=null===(_=null==e?void 0:e.chatStream)||void 0===_?void 0:_.continueChatResult)||void 0===E?void 0:E.message)||void 0===T?void 0:T.content))||void 0===M?void 0:M.replaceAll("WaitMessage: ","");var J=null===(N=null===(I=null==e?void 0:e.chatStream)||void 0===I?void 0:I.continueChatResult)||void 0===N?void 0:N.requestId;"string"==typeof J&&J&&ce&&ce(J);var Q=function(e,i,o){var a,r,s,l,d,c,u,h,m,v,p,C,g,f,S,b,x,w,R,k,_,E,T,M,I,N,D,L,F,A,W,z,j,q,B={role:"assistant",content:"",id:y(),time:new Date,citations:[]};if(!1===(null===(r=null===(a=e.chatStream)||void 0===a?void 0:a.continueChatResult)||void 0===r?void 0:r.thinking_break)&&!0===(null===(l=null===(s=e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===l?void 0:l.is_orchestrator)&&!1===(null===(c=null===(d=e.chatStream)||void 0===d?void 0:d.continueChatResult)||void 0===c?void 0:c.isEnd)&&(B.content=jt(e.chatStream.continueChatResult.message.content||"")),!0===(null===(h=null===(u=e.chatStream)||void 0===u?void 0:u.continueChatResult)||void 0===h?void 0:h.thinking_break)&&!0===(null===(v=null===(m=e.chatStream)||void 0===m?void 0:m.continueChatResult)||void 0===v?void 0:v.is_orchestrator)&&!1===(null===(C=null===(p=e.chatStream)||void 0===p?void 0:p.continueChatResult)||void 0===C?void 0:C.isEnd)&&(B.content="",i.push({responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!1})),!1===(null===(f=null===(g=e.chatStream)||void 0===g?void 0:g.continueChatResult)||void 0===f?void 0:f.thinking_break)&&!0===(null===(b=null===(S=e.chatStream)||void 0===S?void 0:S.continueChatResult)||void 0===b?void 0:b.is_orchestrator)&&!0===(null===(w=null===(x=e.chatStream)||void 0===x?void 0:x.continueChatResult)||void 0===w?void 0:w.isEnd)&&(B.content=jt(e.chatStream.continueChatResult.message.content)),!1===(null===(k=null===(R=e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===k?void 0:k.thinking_break)&&!1===(null===(E=null===(_=e.chatStream)||void 0===_?void 0:_.continueChatResult)||void 0===E?void 0:E.is_orchestrator)&&!1===(null===(M=null===(T=e.chatStream)||void 0===T?void 0:T.continueChatResult)||void 0===M?void 0:M.isEnd)){if((Z=e.chatStream.continueChatResult).explainability_id&&Z.responded_by){var P=Z.explainability_id,H=Z.responded_by;o.has(P)||o.set(P,{responded_by:H,index:i.length})}o.has(e.chatStream.continueChatResult.explainability_id)?i[null==(K=o.get(e.chatStream.continueChatResult.explainability_id))?void 0:K.index]={responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!0,explainability_id:null!==(I=e.chatStream.continueChatResult.explainability_id)&&void 0!==I?I:"",isParallelToolResponse:!0}:i=t(t([],i,!0),[{responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!0,explainability_id:null!==(N=e.chatStream.continueChatResult.explainability_id)&&void 0!==N?N:"",isParallelToolResponse:!1}],!1)}if(!0===(null===(L=null===(D=e.chatStream)||void 0===D?void 0:D.continueChatResult)||void 0===L?void 0:L.thinking_break)&&!1===(null===(A=null===(F=e.chatStream)||void 0===F?void 0:F.continueChatResult)||void 0===A?void 0:A.is_orchestrator)&&!1===(null===(z=null===(W=e.chatStream)||void 0===W?void 0:W.continueChatResult)||void 0===z?void 0:z.isEnd)){var Z,K;(Z=e.chatStream.continueChatResult).explainability_id&&Z.responded_by&&(P=Z.explainability_id,H=Z.responded_by,o.has(P)||o.set(P,{responded_by:H,index:i.length})),o.has(e.chatStream.continueChatResult.explainability_id)?i[null==(K=o.get(e.chatStream.continueChatResult.explainability_id))?void 0:K.index]={responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!1,explainability_id:null!==(j=e.chatStream.continueChatResult.explainability_id)&&void 0!==j?j:"",isParallelToolResponse:!0}:i.push({responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!1,explainability_id:null!==(q=e.chatStream.continueChatResult.explainability_id)&&void 0!==q?q:"",isParallelToolResponse:!1})}return n({orchestratorAndAgentsMessages:i},B)}(e,o,i);Q.time=new Date,Q.citations=V,Q.isEnd=null===(L=null===(D=null==e?void 0:e.chatStream)||void 0===D?void 0:D.continueChatResult)||void 0===L?void 0:L.isEnd,Q.requestId=null===(A=null===(F=null==e?void 0:e.chatStream)||void 0===F?void 0:F.continueChatResult)||void 0===A?void 0:A.requestId,Q.sessionId=ke.current,null===(W=Q.orchestratorAndAgentsMessages)||void 0===W||W.forEach(function(e){e&&e.header_message&&Ft(e)}),(""!==(null==Q?void 0:Q.content)||(null==Q?void 0:Q.orchestratorAndAgentsMessages)&&(null==Q?void 0:Q.orchestratorAndAgentsMessages.length)>0)&&(Be(!1),ze(t(t([],We,!0),[{role:"user",content:r||"",time:a,isFirstQuestionSent:s||!1,id:l||(null===(j=null===(z=null==e?void 0:e.chatStream)||void 0===z?void 0:z.continueChatResult)||void 0===j?void 0:j.requestId)||"",requestId:null!==(P=null===(B=null===(q=null==e?void 0:e.chatStream)||void 0===q?void 0:q.continueChatResult)||void 0===B?void 0:B.requestId)&&void 0!==P?P:""},Q],!1))),Ue(null===(Z=null===(H=null==e?void 0:e.chatStream)||void 0===H?void 0:H.continueChatResult)||void 0===Z?void 0:Z.isEnd)}},Bt=function(e,i,o,a,r,s){var l,d,c=(void 0!==o?o:Le||"").trim(),u="Enter"===(null==e?void 0:e.key)&&!(null==e?void 0:e.shiftKey);if(u&&(null===(l=null==e?void 0:e.preventDefault)||void 0===l||l.call(e)),!(!c||et&&!o||(null==e?void 0:e.key)&&!u)){if("I want to add a rule description"===c){Ue(!1),Me.current=!0,tt(!0),!ut&&c&&ht(o||"manual_entry");var h=new Date;return ze(function(e){return t(t([],e.map(function(e,t){var i;return n(n({},e),{content:null===(i=jt(e.content))||void 0===i?void 0:i.replace("WaitMessage: ","")})}),!0),[{role:"user",content:c,time:h,isFirstQuestionSent:!1,id:r||y()}],!1)}),At("smooth"),void setTimeout(function(){ze(function(e){return t(t([],e,!0),[{role:"assistant",content:"I'd be happy to help you set up a new rule! To get started, could you tell me what kind of behavior or logic you would like this rule to follow?",id:y(),citations:[],time:new Date}],!1)}),At("smooth"),setTimeout(function(){tt(!1),Ue(!0)},500)},500)}Ue(!1),Me.current=!0,tt(!0),!ut&&c&&ht(o||"manual_entry");var m=new Date;ze(function(e){var i=e.map(function(e){var t;return n(n({},e),{content:null===(t=jt(e.content))||void 0===t?void 0:t.replace("WaitMessage: ","")})});return r&&i.some(function(e){return e.id===r})?i.map(function(e){return e.id===r?n(n({},e),{content:c}):e}):t(t([],i,!0),[{role:"user",content:c,time:m,isFirstQuestionSent:!1,id:r||y()}],!1)}),At("smooth");var v=new Map,p=[],C={WEBSOCKET_URL:H,organizationName:B,chatAssistantName:Re,selectedAIModel:"gpt-4",replyMessage:"",userName:"Guest User",userEmailId:"guestUser@example.com",userId:"Guest User",query:c,requestId:"requestId-".concat(y()),customPrompt:"",enableForBackend:!1,guestSessionId:ke.current,chatPreviewId:_e.current,customMetaData:X,aiModel:"",onStreamEvent:function(e){return qt(e,v,p,m,c,i,r)},onStreamEnd:function(e){Ue(!0),tt(!1),vt(!1);var i=Date.now(),o=Tt.current.get(Mt.current);if(o){var a=Math.round((i-o)/1e3).toFixed(1);ze(function(e){var i=t([],e,!0).reverse().findIndex(function(e){return"assistant"===e.role});if(-1===i)return e;var o=e.length-1-i;return e.map(function(e,t){return t===o?n(n({},e),{finalTimeTaken:a}):e})})}},onError:function(e){console.error("Stream error:",e),Ue(!0),tt(!1),vt(!1)}};if(c)Be(!0),null===(d=Ne.current)||void 0===d||d.blur(),Fe(""),At(),Ye(r?"Just a moment, processing your request...":"Okay, got it. Let me take a moment to work on this and I'll get back to you shortly."),Tt.current.set(C.requestId,Date.now()),Mt.current=C.requestId,x(C);s&&s(!1)}},Pt=d(null);v(function(){Pt.current=Bt});var Ht=m(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return null===(e=Pt.current)||void 0===e?void 0:e.call.apply(e,t([Pt],n,!1))},[]),Zt=u(function(){return{p:function(e){e.node;var t=e.children;return a(e,["node","children"]),r("div",n({style:{margin:0,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px",fontFamily:"inherit"}},{children:t}))},button:function(e){e.node;var t=e.className,i=e.children,o=a(e,["node","className","children"]),l=L(i),d=o["data-value"],c="Tester Genie"===l;return r(E,n({},o,{className:t,handleStream:Ht,isStreamEnd:Ke,disabled:!!ut,isLastMessage:!0,style:{margin:0},isTesterGenie:c,"data-selected":ut===l||ut===d?"true":ut?"false":void 0},{children:s("span",n({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i,c&&s("svg",n({width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[r("path",{d:"M7.20368 8.94768e-06C7.48895 -0.00208639 7.69331 0.364327 7.83856 0.57465C8.14381 1.01633 8.38012 1.87909 7.71077 2.14118C8.57167 2.21011 9.70406 2.93098 10.1785 3.64699C10.5932 4.27286 10.4559 5.16037 9.80301 5.56007L9.9502 7.16593C9.97671 7.44871 10.0265 7.87092 10.0299 8.14457C10.4213 8.23046 11.0787 8.55391 11.326 8.87592C11.5979 8.75656 11.9189 8.76963 12.1688 8.93469C12.3563 8.67751 12.5598 8.41456 12.7507 8.15787C12.3283 7.45155 12.5047 6.57745 13.2143 6.13784C13.5375 5.9377 13.9264 5.87277 14.2971 5.95705C14.0961 6.30964 13.8775 6.72182 13.6593 7.05857C13.7906 7.2436 13.9184 7.44225 14.044 7.63194L14.8022 7.63198C15.0349 7.30106 15.2515 6.90827 15.4835 6.59349C15.8623 7.0712 15.8156 7.79671 15.4734 8.28241C15.1318 8.76741 14.4886 8.9899 13.9118 8.88251C13.758 9.12108 13.5577 9.39243 13.3941 9.63201C13.7143 9.9316 13.7725 10.364 13.4067 10.6594C13.5231 10.8889 13.5309 11.1613 13.447 11.402C13.1502 12.2523 12.1724 12.5645 11.3474 12.5025C11.1171 12.4852 10.939 12.4698 10.7197 12.3953C10.8724 13.1271 10.7744 14.2031 10.5132 14.9051C10.1688 15.8304 9.43632 16.5569 8.54503 16.9655C7.90465 17.2706 7.21222 17.3607 6.50472 17.4505C5.74445 17.5471 4.75801 17.4362 4.08533 17.825C3.9327 17.9132 3.86566 18.0173 3.82943 18.1792C3.94996 18.5982 4.47858 18.6063 4.78474 18.8897C5.20191 19.2758 4.90716 19.9663 4.36611 19.9908C4.31476 19.9931 4.26867 19.9867 4.23186 19.9493C4.23089 19.8303 4.47587 19.7199 4.49787 19.5262C4.55075 19.0604 3.70014 19.0078 3.37835 18.8374C3.13013 18.706 2.99537 18.6309 2.82242 18.4021C2.63795 18.1579 2.58428 17.835 2.63138 17.5392C2.74868 16.7847 3.47123 16.393 4.12184 16.1497C4.61314 15.9659 5.46304 15.7158 5.52019 15.0793C5.58589 14.348 4.97543 13.5523 4.57739 12.9807C4.44275 12.7875 4.3039 12.579 4.16309 12.3919C4.18987 12.365 4.21049 12.3463 4.23916 12.3212C4.59619 12.6218 5.21209 12.6421 5.55038 12.2979C5.70457 12.144 5.78974 11.9342 5.78642 11.7164C5.78121 11.4493 5.63382 11.2002 5.4454 11.019C5.44704 10.9932 5.44824 10.9676 5.449 10.9419C5.4566 10.6648 5.37505 10.4902 5.1892 10.2943C5.18398 10.2538 5.17776 10.2134 5.17053 10.1732C5.08123 9.69297 4.71708 9.34182 4.23415 9.27108C4.16418 9.26083 3.96108 9.26105 3.92071 9.23344C3.90485 9.1828 3.9059 9.20792 3.91904 9.15527C4.22103 8.90139 4.14407 8.78214 4.31107 8.4846C4.42301 8.28513 4.73047 8.15239 4.95452 8.10701C4.96167 7.51076 5.03684 6.88562 5.10036 6.29144C5.12451 6.0655 5.12531 5.75046 5.1511 5.55257C4.11108 4.86747 4.39091 3.75946 5.25465 3.06391C5.84978 2.58469 6.34496 2.31002 7.10143 2.14517C7.01589 2.10416 6.93842 2.04811 6.87269 1.97972C6.77021 1.87349 6.70248 1.73857 6.67853 1.59293C6.60568 1.12096 7.04104 0.914625 7.18759 0.526392C7.26428 0.323403 7.03925 0.146075 7.20368 8.94768e-06Z",fill:"#475569"}),r("path",{d:"M7.459 4.5C7.48797 4.50312 7.71949 4.61154 7.76205 4.63061C8.27062 4.85835 8.87051 5.09164 9.35658 5.3582C9.36602 6.03495 9.37016 6.56625 8.70573 6.91519C8.6633 6.80883 8.63019 6.72409 8.56332 6.63044C8.43786 6.45568 8.24656 6.33963 8.03354 6.30909C7.8434 6.28211 7.65146 6.3197 7.49586 6.43503C7.21897 6.21256 6.76265 6.28197 6.5229 6.52486C6.39308 6.65639 6.34815 6.75074 6.28902 6.92344C5.59702 6.5957 5.58761 6.04267 5.60583 5.35582C5.89882 5.23844 6.21318 5.0724 6.50153 4.941C6.82145 4.79522 7.14482 4.6574 7.459 4.5Z",fill:"#D1EDFD"}),r("path",{d:"M11.0756 10.6406C11.1037 10.6701 11.1324 10.7706 11.1535 10.8145C11.2818 11.0817 11.4922 11.1945 11.7498 11.2977C11.5607 11.63 11.4567 11.8797 11.1034 12.0466L11.0839 12.0517C10.9262 12.0927 10.7996 12.0968 10.651 12.0135C10.4755 11.915 10.3807 11.6614 10.4792 11.478C10.6388 11.1809 10.8877 10.9272 11.0756 10.6406Z",fill:"#D1EDFD"}),r("path",{d:"M11.6036 9.1377C11.6993 9.11763 11.8391 9.16378 11.9294 9.19593C11.6952 9.50644 11.4706 9.81614 11.2327 10.1261L11.1572 10.2255C10.7581 9.73539 11.0333 9.24481 11.6036 9.1377Z",fill:"#D1EDFD"}),r("path",{d:"M7.49681 0.882812C7.53691 0.925159 7.61244 1.08523 7.63598 1.14156C7.74243 1.39673 7.75769 1.76908 7.38596 1.77504C7.28236 1.75599 7.15628 1.68938 7.13517 1.5783C7.0843 1.3107 7.35609 1.09964 7.48737 0.897583L7.49681 0.882812Z",fill:"#D1EDFD"}),r("path",{d:"M1.68305 6.17249C1.71659 6.1673 1.8134 6.16478 1.84892 6.16432C2.34052 6.15616 2.81496 6.34495 3.16655 6.68866C3.50847 7.01806 3.70349 7.47119 3.70765 7.94596C3.70896 8.42345 3.54045 8.85284 3.20281 9.19025C3.34033 9.28068 3.5321 9.52219 3.6543 9.65748C4.17158 9.39073 4.91447 9.69339 4.79675 10.3444C5.08751 10.5485 5.19656 10.8288 5.0585 11.1674C5.15418 11.2375 5.25595 11.3205 5.32383 11.4186C5.40228 11.5303 5.4309 11.6695 5.40291 11.8031C5.32228 12.1857 4.90085 12.3286 4.57669 12.1236C4.51367 12.0838 4.42258 11.9595 4.35299 11.9431C4.30669 11.9557 4.28453 11.9584 4.23644 11.9644C4.22885 11.9742 4.22118 11.9841 4.21343 11.9938C3.93597 12.3413 3.49234 12.4682 3.06933 12.5157C2.85285 12.518 2.70432 12.5146 2.49066 12.4609C1.80785 12.2892 1.50808 11.6167 1.70723 10.9639C1.829 10.5648 2.11891 10.2506 2.48939 10.0518C2.54655 10.132 2.57559 10.2191 2.64066 10.303C2.73571 10.2223 2.82048 10.1482 2.92363 10.0773C2.81023 9.95313 2.66811 9.7693 2.55817 9.63584C2.38871 9.6878 2.23026 9.72879 2.05298 9.74653C1.54239 9.80228 1.03118 9.64711 0.637735 9.31695C0.269964 9.01018 0.0453493 8.54827 0.00544736 8.07322C-0.0309495 7.60988 0.116099 7.15077 0.414918 6.79478C0.742554 6.41198 1.18728 6.21393 1.68305 6.17249Z",fill:"#475569"}),r("path",{d:"M1.79616 6.5951C2.54894 6.5619 3.18687 7.14364 3.22301 7.8963C3.25915 8.64894 2.67989 9.28913 1.92739 9.3282C1.17073 9.3675 0.526231 8.78435 0.489885 8.02753C0.45354 7.27071 1.03921 6.62849 1.79616 6.5951Z",fill:"#D1EDFD"}),r("path",{d:"M4.93607 11.4844C5.12839 11.6261 5.22049 11.9085 4.91876 11.9419C4.8067 11.8805 4.78491 11.8646 4.71094 11.7561C4.81572 11.6752 4.862 11.5925 4.93607 11.4844Z",fill:"#FEFEFD"}),r("path",{d:"M12.5164 3.58594L12.5715 3.59466C12.6589 3.65863 12.6908 3.94434 12.7882 4.05193C12.8789 4.15216 12.9155 4.17816 13.0326 4.24929C13.1363 4.31224 13.3325 4.34025 13.384 4.43124C13.3643 4.56218 13.0693 4.54857 12.9127 4.69344C12.6903 4.89898 12.7114 5.06971 12.5892 5.28622C12.5669 5.28439 12.5368 5.2868 12.5261 5.27346C12.4336 5.15843 12.4072 4.9308 12.3099 4.81465C12.1627 4.63903 11.9972 4.60054 11.7981 4.51372C11.7544 4.49467 11.7266 4.47099 11.7129 4.42649C11.7867 4.31876 12.0509 4.34309 12.2376 4.14892C12.43 3.94901 12.4155 3.72208 12.5164 3.58594Z",fill:"#475569"}),r("path",{d:"M2.13644 3.72656C2.24401 3.77084 2.29712 4.1268 2.431 4.25226C2.60327 4.41371 2.7311 4.41949 2.93246 4.52449C2.96024 4.53897 2.97173 4.56042 2.97671 4.58878C2.89584 4.6981 2.61854 4.70721 2.4596 4.85659C2.26275 5.04156 2.27341 5.29132 2.17022 5.42088C2.16192 5.41849 2.11671 5.40232 2.1156 5.40043C2.01291 5.21216 1.9836 5.04909 1.84812 4.87273C1.73599 4.72675 1.36534 4.69959 1.32812 4.56939C1.3835 4.47941 1.67823 4.44211 1.82291 4.30563C2.02737 4.11274 2.0042 3.8372 2.13644 3.72656Z",fill:"#475569"})]}))]}))}))}}},[Ht,Ke,ut]),Kt=u(function(){return We.some(function(e){return e.isSkeleton})},[We]),Ut=function(e){return i(void 0,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return we?[4,we(e)]:[3,2];case 1:n.sent(),ze(function(e){return t(t([],e,!0),[{role:"assistant",content:"Thanks for your feedback — this will help improve future suggestions.",id:y(),citations:[],time:new Date,isEnd:!0}],!1)}),setTimeout(function(){return At("smooth")},100),n.label=2;case 2:return[2]}})})};return console.log(We,"rendering messages"),s("div",n({className:"".concat(I.customFont," ").concat(M.chatContainer),style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:Se&&!Kt?"0 0 20px 5px rgba(37, 99, 235, 0.5)":"none"}},{children:[s("div",n({ref:Te,className:M.scrollWrapper},{children:[r("div",n({ref:ft,className:M.stickyHeader},{children:r(R,{resetChatHistory:function(){var e="".concat(Ee,"/api/chat/resetHistory?name=").concat(Re,"&organizationName=").concat(B);try{var t={method:"GET",params:{guestSessionId:ke.current},withCredentials:!0};b.get(e,t).then(function(){Z(!0),Je(""),ht(null),St.current.clear(),_e.current="".concat(y()),ze([]),Ve(!0),null==ee||ee(),G&&G()}).catch(function(e){console.error(e)}).finally(function(){ke.current="".concat(Re,"-").concat(B,"-").concat(y())})}catch(e){Be(!1),console.error(e)}},isStreamEnd:Ke,chatTitle:Q,onResize:ae,chatSize:oe,movingTowards:re})})),s("div",n({className:M.messagesList},{children:[s("div",n({className:M.initialMessageRow},{children:[r("div",n({className:M.iconWrapper},{children:r(A,{})})),r("div",n({className:M.welcomeTextWrapper},{children:r("div",n({className:M.welcomeMarkdownWrapper},{children:r("span",{children:r(f,n({rehypePlugins:[S],components:Zt},{children:ne}))})}))}))]})),We.length>0&&We.map(function(e,t){return s("div",n({className:M.messageRow},{children:["assistant"===e.role?r("div",n({className:M.assistantIconContainer},{children:r(A,{})})):r("div",{className:M.userSpacer}),r("div",n({className:M.messageContent},{children:"assistant"===e.role?s(l,{children:[e.orchestratorAndAgentsMessages&&e.orchestratorAndAgentsMessages.length>0&&r(w,{orchestratorAndAgentsMessages:null==e?void 0:e.orchestratorAndAgentsMessages,isStreamEnd:Ke,finalTimeTaken:null==e?void 0:e.finalTimeTaken},null==e?void 0:e.id),r(k,{index:t,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:We,handleStream:Bt,isLastMessage:t===We.length-1,onSave:ie,citations:null==e?void 0:e.citations,setChatSize:ae,chatSize:oe,isStreamEnd:Ke,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:ye,onTypeResponseClick:function(){var e;kt(!0),null===(e=Ne.current)||void 0===e||e.focus()},onComparisonLinkClick:xe,baseURL:Ee,onFeedbackSubmit:Ut}),r("div",n({className:M.timestamp},{children:e.time&&!isNaN(new Date(e.time).getTime())?new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}):s("div",n({className:M.userMessageWrapper},{children:[s("div",n({className:M.userMessageBubble,style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:e.isSkeleton||Kt||e.id!==yt?"none":"0 0 15px 3px rgba(37, 99, 235, 0.6)"}},{children:[e.isSkeleton?s("div",n({style:{display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",padding:"8px 0"}},{children:[r(_,{variant:"text",width:"100%",height:16}),r(_,{variant:"text",width:"80%",height:16})]})):r(k,{index:t,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:We,handleStream:Bt,isLastMessage:t===We.length-1,onSave:ie,citations:null==e?void 0:e.citations,isStreamEnd:Ke,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:ye,onComparisonLinkClick:xe,baseURL:Ee,onFeedbackSubmit:Ut}),r("div",n({style:{marginTop:"0.5rem"}},{children:r(W,{})}))]})),r("div",n({className:M.userTimestamp},{children:new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}))}))]}),e.id)}),qe&&s("div",n({className:M.loadingRow},{children:[r("div",n({className:M.iconWrapper,style:{marginTop:"0.2rem"}},{children:r(A,{})})),r("div",n({className:M.loadingTextWrapper},{children:r("span",{children:Xe})}))]})),r("div",{ref:Ie,style:{float:"left",clear:"both"}})]}))]})),s("div",n({className:M.inputAreaWrapper},{children:[et&&s(C,n({sx:{display:"flex",alignItems:"center",gap:"8px",paddingBottom:"8px",paddingLeft:"4px",fontFamily:'"Plus Jakarta Sans", sans-serif',fontSize:"0.875rem",color:"#6b7280",width:"100%"}},{children:[r("span",{children:"Instant Learning AI is thinking"}),r(C,{sx:{width:"5px",height:"5px",bgcolor:"#6b7280",borderRadius:"50%",animation:"".concat(It," 1.4s infinite ease-in-out both"),animationDelay:"-0.32s"}}),r(C,{sx:{width:"5px",height:"5px",bgcolor:"#6b7280",borderRadius:"50%",animation:"".concat(It," 1.4s infinite ease-in-out both"),animationDelay:"-0.16s"}}),r(C,{sx:{width:"5px",height:"5px",bgcolor:"#6b7280",borderRadius:"50%",animation:"".concat(It," 1.4s infinite ease-in-out both")}})]})),r(g,n({title:J?"Please wait for the validation to be completed.":""},{children:s("div",n({className:"".concat(M.inputBoxContainer," ").concat(Dt?M.disabled:""),style:Rt?{boxShadow:"0 0 15px 3px rgba(37, 99, 235, 0.5)",borderColor:"#2563eb",transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}:{transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}},{children:[We.length>0&&!rt&&r("div",n({onMouseDown:function(e){e.preventDefault(),At("smooth")},className:M.scrollToBottomBtn},{children:r(N,{})})),s("div",n({style:{width:"100%",display:"flex"}},{children:[r("textarea",{ref:Ne,placeholder:de,value:Le||"",onChange:function(e){Fe(e.target.value)},onFocus:function(){return ot(!0)},onBlur:function(){return ot(!1)},onKeyDown:function(e){return Bt(e)},disabled:Dt,className:"no-scrollbar ".concat(M.chatTextarea),style:{minHeight:it?"120px":"50px",height:it?"120px":"50px",maxHeight:"120px"}}),r("span",n({className:M.sendButtonWrapper},{children:r("button",n({onClick:function(e){Bt(new KeyboardEvent("keydown",{key:"Enter"}))},disabled:Lt,className:"".concat(M.sendButton," ").concat(Lt?M.disabled:M.active)},{children:r(F,{})}))}))]}))]}))}))]})),s("div",n({className:M.footerTools},{children:[r(g,n({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:r("span",n({className:M.footerToolItem},{children:r(T,{amplitude:1,variant:"speaker",isActive:!1,onClick:function(){return null},disabled:!1})}))})),r(g,n({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:r("span",n({className:M.footerToolItem},{children:r(T,{amplitude:1,variant:"microphone",isActive:!1,onClick:function(){return null},disabled:!1})}))}))]}))]}))};export{j as default};
1
+ import{__makeTemplateObject as e,__spreadArray as t,__assign as n,__awaiter as i,__generator as o,__rest as a}from"tslib";import{jsx as r,jsxs as s,Fragment as l}from"react/jsx-runtime";import{useRef as c,useState as d,useMemo as u,useEffect as h,useCallback as m,useLayoutEffect as v}from"react";import{keyframes as p,Box as C}from"@mui/material";import g from"@mui/material/Tooltip";import f from"react-markdown";import S from"rehype-raw";import{http as b}from"../../../../api/transport.js";import{v4 as y}from"uuid";import{stopStreaming as x,startChatStream as w}from"@e-llm-studio/streaming-response";import{WatchMeWork as R}from"@e-llm-studio/watch-me-work";import k from"./ChatHeader.js";import _ from"../MessageRendering/MessageRendering.js";import{Skeleton as E}from"../atoms/SkeletonLoader/SkeletonLoader.js";import{ActionableButton as T}from"../MessageRendering/ClickableChatComponents.js";import M from"../AudioWaveform.js";import I from"./ChatComponent.module.css.js";import N from"../../InstantLearning.module.css.js";import{ScrollToBottom as D}from"../_svg/ScrollToBottom.js";import{useHeaderObserver as L,extractTextFromChildren as F}from"../../helpers/utils.js";import{SendButton as A}from"../_svg/SendButton.js";import W from"../_svg/SparkleIcon.js";import{UserIcon as z}from"../_svg/UserIcon.js";var j,q=function(q){var B=q.chatAssistantName,P=q.organizationName,H=q.baseUrl,Z=q.baseWebsocketUrl,K=q.setIsNewChatClicked;q.ThinkingBulbIconComponent;var U=q.isFormSaveClicked,G=q.setIsFormSavedClicked,V=q.onResetLearningData,O=q.sendMessageInChat,J=q.setSendMessageInChat,Q=q.isFormValidating,X=q.chatTitle,Y=q.customMetaData,$=q.headerMessageHandlers;q.aiResponse;var ee=q.setAIResponse,te=q.onResetChat,ne=q.initialChatMessage,ie=void 0===ne?"":ne,oe=q.onSave,ae=q.chatSize,re=q.setChatSize,se=q.movingTowards,le=q.setCitations,ce=q.textareaPlaceholder,de=void 0===ce?"Tell me more about this learning...":ce,ue=q.setCurrentRequestId,he=q.showSavedMessage,me=void 0!==he&&he,ve=q.savedMessage,pe=q.isError,Ce=void 0!==pe&&pe,ge=q.errorMessage,fe=void 0===ge?"There was an error saving your changes.":ge;q.isSaving;var Se=q.isHighlighted,be=void 0!==Se&&Se,ye=q.onStreamingStateChange,xe=q.onViewComparison;q.isCopyEnabled;var we=q.onComparisonLinkClick,Re=q.onSubmitFeedback,ke=B,_e=c("".concat(ke,"-").concat(P,"-").concat(y())),Ee=c("".concat(y())),Te=H,Me=c(null),Ie=c(!0),Ne=c(null),De=c(null),Le=d(""),Fe=Le[0],Ae=Le[1],We=d([]),ze=We[0],je=We[1],qe=d(!1),Be=qe[0],Pe=qe[1],He=d(!1);He[0];var Ze=He[1],Ke=d(!0),Ue=Ke[0],Ge=Ke[1],Ve=d(!0);Ve[0];var Oe=Ve[1],Je=d("");Je[0];var Qe=Je[1],Xe=d(""),Ye=Xe[0],$e=Xe[1],et=d(!1),tt=et[0],nt=et[1],it=d(!1),ot=it[0],at=it[1],rt=d(!0),st=rt[0],lt=rt[1],ct=d("100%");ct[0];var dt=ct[1],ut=d(null),ht=ut[0],mt=ut[1],vt=d(!1);vt[0];var pt=vt[1],Ct=d(!1),gt=Ct[0],ft=Ct[1],St=c(null),bt=c(new Set),yt=d(null),xt=yt[0],wt=yt[1],Rt=d(!1),kt=Rt[0],_t=Rt[1],Et=d(!1);Et[0],Et[1];var Tt=d(null);Tt[0],Tt[1],c(null),c(null);var Mt=c(new Map),It=c(""),Nt=c(0),Dt=c(!0),Lt=p(j||(j=e(["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "],["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "]))),Ft=u(function(){return""===(null==Fe?void 0:Fe.trim())||tt},[Fe,tt]),At=u(function(){return Q},[Q]),Wt=u(function(){return Ft||tt||Q},[Ft,tt,Q]);h(function(){null==ye||ye(tt)},[tt,ye]),h(function(){return Dt.current=!0,function(){Dt.current=!1,Nt.current+=1,It.current&&Z&&x(It.current,Z,!1)}},[Z]),h(function(){var e=Me.current,t=function(){if(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;lt(n-t-i<=20)}};return e&&(e.addEventListener("scroll",t),t()),function(){e&&e.removeEventListener("scroll",t)}},[ze]);var zt=L({handlers:$,setResult:ee}).processHeaderMessage;h(function(){me&&ft(!0)},[me]),h(function(){if(kt){var e=setTimeout(function(){_t(!1)},3e3);return function(){return clearTimeout(e)}}},[kt]),h(function(){U&&(Zt(new KeyboardEvent("keydown",{key:"Enter"}),!1,"Save this Learning"),G(!1))},[U]),h(function(){if(O)try{if(O.startsWith("__SKELETON__:")){var e=O.split(":"),i=e[1],o=e.slice(2).join(":"),a={role:"user",content:"",id:i,time:new Date,isSkeleton:!0,skeletonContent:o};return je(function(e){return t(t([],e,!0),[a],!1)}),Zt(new KeyboardEvent("keydown",{key:"Enter"}),!1,o,!1,i),wt(i),J&&J(""),void setTimeout(function(){wt(null)},2e3)}if(O.startsWith("__SKELETON_END__::")){var r=O.split("::")[1]||"";return je(function(e){return e.map(function(e){return e.isSkeleton?n(n({},e),{isSkeleton:!1,content:e.skeletonContent||r}):e})}),void(J&&J(""))}var s=y();Zt(new KeyboardEvent("keydown",{key:"Enter"}),!1,O,!1,s),wt(s),J&&J(""),setTimeout(function(){return wt(null)},2e3)}catch(e){console.error("Error handling sendMessageInChat signal",e)}},[O]),h(function(){qt(),Bt();var e=function(){var e,t=(null===(e=null==St?void 0:St.current)||void 0===e?void 0:e.clientHeight)||0,n="calc(100% - ".concat(t,"px - 10px)");dt(n)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var jt=m(function(e){var t="string"==typeof e?e:"smooth";Ne.current&&Ne.current.scrollIntoView({behavior:t,block:"end"}),Ie.current&&setTimeout(function(){Ne.current&&Ie.current&&Ne.current.scrollIntoView({behavior:t,block:"end"})},100)},[]);h(function(){if(!tt){var e="";if(gt?e=ve||"Thank you teacher for teaching me, your rule has been saved successfully.":Ce&&(e=fe||"I'm sorry, I couldn't save your changes. Please try again."),e){var n={role:"assistant",content:e,id:y(),citations:[],time:new Date};je(function(e){return t(t([],e,!0),[n],!1)}),ft(!1),setTimeout(function(){return jt("smooth")},100)}}},[gt,Ce,tt,ve,fe,jt]),h(function(){Ie.current&&jt("smooth")},[jt]);var qt=function(){var e={method:"get",maxBodyLength:1/0,url:"".concat(Te,"/api/chatbot/getChatSettings?name=").concat(ke,"&organizationName=").concat(P),headers:{}};b.request(e).then(function(e){var t,n,i;(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.chatSettings)&&""!==(null===(i=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.chatSettings)||void 0===i?void 0:i.chatInitialMessage)&&Oe(!0)}).catch(function(e){console.error(e)})},Bt=function(){return i(void 0,void 0,void 0,function(){var e,t;return o(this,function(n){e="".concat(Te,"/api/chat/history?name=").concat(ke,"&organizationName=").concat(P);try{t={method:"GET",params:{guestSessionId:_e.current},withCredentials:!0},b.get(e,t).then(function(e){var t=e.data;t.length>0?(je(t),jt()):Oe(!0)}).catch(function(e){console.error(e)})}catch(e){Pe(!1),console.error(e)}return[2]})})};function Pt(e){return null==e?void 0:e.replace(/<a [^>]*>.*?<\/a>/g,function(e){return null==e?void 0:e.replace(/\*/g,"&ast;")})}var Ht=function(e,i,o,a,r,s,l){var c,d,u,h,m,v,p,C,g,f,S,b,x,w,R,k,_,E,T,M,I,N,D,L,F,A,W,z,j,q,B,P,H,Z;if(null===(d=null===(c=null==e?void 0:e.chatStream)||void 0===c?void 0:c.continueChatResult)||void 0===d?void 0:d.header_message){var K={header_message:e.chatStream.continueChatResult.header_message,responsedata:null===(m=null===(h=null===(u=null==e?void 0:e.chatStream)||void 0===u?void 0:u.continueChatResult)||void 0===h?void 0:h.message)||void 0===m?void 0:m.content};zt(K)}var U=null===(v=null==e?void 0:e.chatStream)||void 0===v?void 0:v.continueChatResult,G=null==U?void 0:U.isEnd,V=(null===(p=null==U?void 0:U.message)||void 0===p?void 0:p.citations)||[];G&&V.length>0&&le&&le(V);var O={role:"assistant",content:"",id:y()};if(null===(S=null===(f=null===(g=null===(C=null==e?void 0:e.chatStream)||void 0===C?void 0:C.continueChatResult)||void 0===g?void 0:g.message)||void 0===f?void 0:f.content)||void 0===S?void 0:S.includes("WaitMessage: "))Ze(!0),O.content=function(e){var t="WaitMessage: ",n=e.indexOf(t);if(-1!==n){var i=e.substring(n+13);return null==i?void 0:i.replaceAll("WaitMessage: ","")}return""}((null===(w=null===(x=null===(b=null==e?void 0:e.chatStream)||void 0===b?void 0:b.continueChatResult)||void 0===x?void 0:x.message)||void 0===w?void 0:w.content)+"\n\n"),""!==O.content&&(Pe(!1),je(t(t([],ze,!0),[{role:"user",content:r,time:a,isFirstQuestionSent:s||!1,id:l||(null===(k=null===(R=null==e?void 0:e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===k?void 0:k.requestId)||"",reply:""},O],!1)));else{Ze(!1),O.content=null===(M=Pt(null===(T=null===(E=null===(_=null==e?void 0:e.chatStream)||void 0===_?void 0:_.continueChatResult)||void 0===E?void 0:E.message)||void 0===T?void 0:T.content))||void 0===M?void 0:M.replaceAll("WaitMessage: ","");var J=null===(N=null===(I=null==e?void 0:e.chatStream)||void 0===I?void 0:I.continueChatResult)||void 0===N?void 0:N.requestId;"string"==typeof J&&J&&ue&&ue(J);var Q=function(e,i,o){var a,r,s,l,c,d,u,h,m,v,p,C,g,f,S,b,x,w,R,k,_,E,T,M,I,N,D,L,F,A,W,z,j,q,B={role:"assistant",content:"",id:y(),time:new Date,citations:[]};if(!1===(null===(r=null===(a=e.chatStream)||void 0===a?void 0:a.continueChatResult)||void 0===r?void 0:r.thinking_break)&&!0===(null===(l=null===(s=e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===l?void 0:l.is_orchestrator)&&!1===(null===(d=null===(c=e.chatStream)||void 0===c?void 0:c.continueChatResult)||void 0===d?void 0:d.isEnd)&&(B.content=Pt(e.chatStream.continueChatResult.message.content||"")),!0===(null===(h=null===(u=e.chatStream)||void 0===u?void 0:u.continueChatResult)||void 0===h?void 0:h.thinking_break)&&!0===(null===(v=null===(m=e.chatStream)||void 0===m?void 0:m.continueChatResult)||void 0===v?void 0:v.is_orchestrator)&&!1===(null===(C=null===(p=e.chatStream)||void 0===p?void 0:p.continueChatResult)||void 0===C?void 0:C.isEnd)&&(B.content="",i.push({responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!1})),!1===(null===(f=null===(g=e.chatStream)||void 0===g?void 0:g.continueChatResult)||void 0===f?void 0:f.thinking_break)&&!0===(null===(b=null===(S=e.chatStream)||void 0===S?void 0:S.continueChatResult)||void 0===b?void 0:b.is_orchestrator)&&!0===(null===(w=null===(x=e.chatStream)||void 0===x?void 0:x.continueChatResult)||void 0===w?void 0:w.isEnd)&&(B.content=Pt(e.chatStream.continueChatResult.message.content)),!1===(null===(k=null===(R=e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===k?void 0:k.thinking_break)&&!1===(null===(E=null===(_=e.chatStream)||void 0===_?void 0:_.continueChatResult)||void 0===E?void 0:E.is_orchestrator)&&!1===(null===(M=null===(T=e.chatStream)||void 0===T?void 0:T.continueChatResult)||void 0===M?void 0:M.isEnd)){if((Z=e.chatStream.continueChatResult).explainability_id&&Z.responded_by){var P=Z.explainability_id,H=Z.responded_by;o.has(P)||o.set(P,{responded_by:H,index:i.length})}o.has(e.chatStream.continueChatResult.explainability_id)?i[null==(K=o.get(e.chatStream.continueChatResult.explainability_id))?void 0:K.index]={responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!0,explainability_id:null!==(I=e.chatStream.continueChatResult.explainability_id)&&void 0!==I?I:"",isParallelToolResponse:!0}:i=t(t([],i,!0),[{responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!0,explainability_id:null!==(N=e.chatStream.continueChatResult.explainability_id)&&void 0!==N?N:"",isParallelToolResponse:!1}],!1)}if(!0===(null===(L=null===(D=e.chatStream)||void 0===D?void 0:D.continueChatResult)||void 0===L?void 0:L.thinking_break)&&!1===(null===(A=null===(F=e.chatStream)||void 0===F?void 0:F.continueChatResult)||void 0===A?void 0:A.is_orchestrator)&&!1===(null===(z=null===(W=e.chatStream)||void 0===W?void 0:W.continueChatResult)||void 0===z?void 0:z.isEnd)){var Z,K;(Z=e.chatStream.continueChatResult).explainability_id&&Z.responded_by&&(P=Z.explainability_id,H=Z.responded_by,o.has(P)||o.set(P,{responded_by:H,index:i.length})),o.has(e.chatStream.continueChatResult.explainability_id)?i[null==(K=o.get(e.chatStream.continueChatResult.explainability_id))?void 0:K.index]={responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!1,explainability_id:null!==(j=e.chatStream.continueChatResult.explainability_id)&&void 0!==j?j:"",isParallelToolResponse:!0}:i.push({responsedata:e.chatStream.continueChatResult.message.content,responseFrom:e.chatStream.continueChatResult.responded_by,header_message:e.chatStream.continueChatResult.header_message,finalResponseStatus:!1,explainability_id:null!==(q=e.chatStream.continueChatResult.explainability_id)&&void 0!==q?q:"",isParallelToolResponse:!1})}return n({orchestratorAndAgentsMessages:i},B)}(e,o,i);Q.time=new Date,Q.citations=V,Q.isEnd=null===(L=null===(D=null==e?void 0:e.chatStream)||void 0===D?void 0:D.continueChatResult)||void 0===L?void 0:L.isEnd,Q.requestId=null===(A=null===(F=null==e?void 0:e.chatStream)||void 0===F?void 0:F.continueChatResult)||void 0===A?void 0:A.requestId,Q.sessionId=_e.current,null===(W=Q.orchestratorAndAgentsMessages)||void 0===W||W.forEach(function(e){e&&e.header_message&&zt(e)}),(""!==(null==Q?void 0:Q.content)||(null==Q?void 0:Q.orchestratorAndAgentsMessages)&&(null==Q?void 0:Q.orchestratorAndAgentsMessages.length)>0)&&(Pe(!1),je(t(t([],ze,!0),[{role:"user",content:r||"",time:a,isFirstQuestionSent:s||!1,id:l||(null===(j=null===(z=null==e?void 0:e.chatStream)||void 0===z?void 0:z.continueChatResult)||void 0===j?void 0:j.requestId)||"",requestId:null!==(P=null===(B=null===(q=null==e?void 0:e.chatStream)||void 0===q?void 0:q.continueChatResult)||void 0===B?void 0:B.requestId)&&void 0!==P?P:""},Q],!1))),Ge(null===(Z=null===(H=null==e?void 0:e.chatStream)||void 0===H?void 0:H.continueChatResult)||void 0===Z?void 0:Z.isEnd)}},Zt=function(e,i,o,a,r,s){var l,c,d=(void 0!==o?o:Fe||"").trim(),u="Enter"===(null==e?void 0:e.key)&&!(null==e?void 0:e.shiftKey);if(u&&(null===(l=null==e?void 0:e.preventDefault)||void 0===l||l.call(e)),!(!d||tt&&!o||(null==e?void 0:e.key)&&!u)){if("I want to add a rule description"===d){Ge(!1),Ie.current=!0,nt(!0),!ht&&d&&mt(o||"manual_entry");var h=new Date;return je(function(e){return t(t([],e.map(function(e,t){var i;return n(n({},e),{content:null===(i=Pt(e.content))||void 0===i?void 0:i.replace("WaitMessage: ","")})}),!0),[{role:"user",content:d,time:h,isFirstQuestionSent:!1,id:r||y()}],!1)}),jt("smooth"),void setTimeout(function(){je(function(e){return t(t([],e,!0),[{role:"assistant",content:"I'd be happy to help you set up a new rule! To get started, could you tell me what kind of behavior or logic you would like this rule to follow?",id:y(),citations:[],time:new Date}],!1)}),jt("smooth"),setTimeout(function(){nt(!1),Ge(!0)},500)},500)}Ge(!1),Ie.current=!0,nt(!0),!ht&&d&&mt(o||"manual_entry");var m=new Date,v=Nt.current;je(function(e){var i=e.map(function(e){var t;return n(n({},e),{content:null===(t=Pt(e.content))||void 0===t?void 0:t.replace("WaitMessage: ","")})});return r&&i.some(function(e){return e.id===r})?i.map(function(e){return e.id===r?n(n({},e),{content:d}):e}):t(t([],i,!0),[{role:"user",content:d,time:m,isFirstQuestionSent:!1,id:r||y()}],!1)}),jt("smooth");var p=new Map,C=[],g={WEBSOCKET_URL:Z,organizationName:P,chatAssistantName:ke,selectedAIModel:"gpt-4",replyMessage:"",userName:"Guest User",userEmailId:"guestUser@example.com",userId:"Guest User",query:d,requestId:"requestId-".concat(y()),customPrompt:"",enableForBackend:!1,guestSessionId:_e.current,chatPreviewId:Ee.current,customMetaData:Y,aiModel:"",onStreamEvent:function(e){Dt.current&&Nt.current===v&&Ht(e,p,C,m,d,i,r)},onStreamEnd:function(e){if(Dt.current&&Nt.current===v){Ge(!0),nt(!1),pt(!1);var i=Date.now(),o=Mt.current.get(It.current);if(o){var a=Math.round((i-o)/1e3).toFixed(1);je(function(e){var i=t([],e,!0).reverse().findIndex(function(e){return"assistant"===e.role});if(-1===i)return e;var o=e.length-1-i;return e.map(function(e,t){return t===o?n(n({},e),{finalTimeTaken:a}):e})})}}},onError:function(e){Dt.current&&Nt.current===v&&(console.error("Stream error:",e),Ge(!0),nt(!1),pt(!1))}};if(d)Pe(!0),null===(c=De.current)||void 0===c||c.blur(),Ae(""),jt(),$e(r?"Just a moment, processing your request...":"Okay, got it. Let me take a moment to work on this and I'll get back to you shortly."),Mt.current.set(g.requestId,Date.now()),It.current=g.requestId,w(g);s&&s(!1)}},Kt=c(null);v(function(){Kt.current=Zt});var Ut=m(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return null===(e=Kt.current)||void 0===e?void 0:e.call.apply(e,t([Kt],n,!1))},[]),Gt=u(function(){return{p:function(e){e.node;var t=e.children;return a(e,["node","children"]),r("div",n({style:{margin:0,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px",fontFamily:"inherit"}},{children:t}))},button:function(e){e.node;var t=e.className,i=e.children,o=a(e,["node","className","children"]),l=F(i),c=o["data-value"],d="Tester Genie"===l;return r(T,n({},o,{className:t,handleStream:Ut,isStreamEnd:Ue,disabled:!!ht,isLastMessage:!0,style:{margin:0},isTesterGenie:d,"data-selected":ht===l||ht===c?"true":ht?"false":void 0},{children:s("span",n({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i,d&&s("svg",n({width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[r("path",{d:"M7.20368 8.94768e-06C7.48895 -0.00208639 7.69331 0.364327 7.83856 0.57465C8.14381 1.01633 8.38012 1.87909 7.71077 2.14118C8.57167 2.21011 9.70406 2.93098 10.1785 3.64699C10.5932 4.27286 10.4559 5.16037 9.80301 5.56007L9.9502 7.16593C9.97671 7.44871 10.0265 7.87092 10.0299 8.14457C10.4213 8.23046 11.0787 8.55391 11.326 8.87592C11.5979 8.75656 11.9189 8.76963 12.1688 8.93469C12.3563 8.67751 12.5598 8.41456 12.7507 8.15787C12.3283 7.45155 12.5047 6.57745 13.2143 6.13784C13.5375 5.9377 13.9264 5.87277 14.2971 5.95705C14.0961 6.30964 13.8775 6.72182 13.6593 7.05857C13.7906 7.2436 13.9184 7.44225 14.044 7.63194L14.8022 7.63198C15.0349 7.30106 15.2515 6.90827 15.4835 6.59349C15.8623 7.0712 15.8156 7.79671 15.4734 8.28241C15.1318 8.76741 14.4886 8.9899 13.9118 8.88251C13.758 9.12108 13.5577 9.39243 13.3941 9.63201C13.7143 9.9316 13.7725 10.364 13.4067 10.6594C13.5231 10.8889 13.5309 11.1613 13.447 11.402C13.1502 12.2523 12.1724 12.5645 11.3474 12.5025C11.1171 12.4852 10.939 12.4698 10.7197 12.3953C10.8724 13.1271 10.7744 14.2031 10.5132 14.9051C10.1688 15.8304 9.43632 16.5569 8.54503 16.9655C7.90465 17.2706 7.21222 17.3607 6.50472 17.4505C5.74445 17.5471 4.75801 17.4362 4.08533 17.825C3.9327 17.9132 3.86566 18.0173 3.82943 18.1792C3.94996 18.5982 4.47858 18.6063 4.78474 18.8897C5.20191 19.2758 4.90716 19.9663 4.36611 19.9908C4.31476 19.9931 4.26867 19.9867 4.23186 19.9493C4.23089 19.8303 4.47587 19.7199 4.49787 19.5262C4.55075 19.0604 3.70014 19.0078 3.37835 18.8374C3.13013 18.706 2.99537 18.6309 2.82242 18.4021C2.63795 18.1579 2.58428 17.835 2.63138 17.5392C2.74868 16.7847 3.47123 16.393 4.12184 16.1497C4.61314 15.9659 5.46304 15.7158 5.52019 15.0793C5.58589 14.348 4.97543 13.5523 4.57739 12.9807C4.44275 12.7875 4.3039 12.579 4.16309 12.3919C4.18987 12.365 4.21049 12.3463 4.23916 12.3212C4.59619 12.6218 5.21209 12.6421 5.55038 12.2979C5.70457 12.144 5.78974 11.9342 5.78642 11.7164C5.78121 11.4493 5.63382 11.2002 5.4454 11.019C5.44704 10.9932 5.44824 10.9676 5.449 10.9419C5.4566 10.6648 5.37505 10.4902 5.1892 10.2943C5.18398 10.2538 5.17776 10.2134 5.17053 10.1732C5.08123 9.69297 4.71708 9.34182 4.23415 9.27108C4.16418 9.26083 3.96108 9.26105 3.92071 9.23344C3.90485 9.1828 3.9059 9.20792 3.91904 9.15527C4.22103 8.90139 4.14407 8.78214 4.31107 8.4846C4.42301 8.28513 4.73047 8.15239 4.95452 8.10701C4.96167 7.51076 5.03684 6.88562 5.10036 6.29144C5.12451 6.0655 5.12531 5.75046 5.1511 5.55257C4.11108 4.86747 4.39091 3.75946 5.25465 3.06391C5.84978 2.58469 6.34496 2.31002 7.10143 2.14517C7.01589 2.10416 6.93842 2.04811 6.87269 1.97972C6.77021 1.87349 6.70248 1.73857 6.67853 1.59293C6.60568 1.12096 7.04104 0.914625 7.18759 0.526392C7.26428 0.323403 7.03925 0.146075 7.20368 8.94768e-06Z",fill:"#475569"}),r("path",{d:"M7.459 4.5C7.48797 4.50312 7.71949 4.61154 7.76205 4.63061C8.27062 4.85835 8.87051 5.09164 9.35658 5.3582C9.36602 6.03495 9.37016 6.56625 8.70573 6.91519C8.6633 6.80883 8.63019 6.72409 8.56332 6.63044C8.43786 6.45568 8.24656 6.33963 8.03354 6.30909C7.8434 6.28211 7.65146 6.3197 7.49586 6.43503C7.21897 6.21256 6.76265 6.28197 6.5229 6.52486C6.39308 6.65639 6.34815 6.75074 6.28902 6.92344C5.59702 6.5957 5.58761 6.04267 5.60583 5.35582C5.89882 5.23844 6.21318 5.0724 6.50153 4.941C6.82145 4.79522 7.14482 4.6574 7.459 4.5Z",fill:"#D1EDFD"}),r("path",{d:"M11.0756 10.6406C11.1037 10.6701 11.1324 10.7706 11.1535 10.8145C11.2818 11.0817 11.4922 11.1945 11.7498 11.2977C11.5607 11.63 11.4567 11.8797 11.1034 12.0466L11.0839 12.0517C10.9262 12.0927 10.7996 12.0968 10.651 12.0135C10.4755 11.915 10.3807 11.6614 10.4792 11.478C10.6388 11.1809 10.8877 10.9272 11.0756 10.6406Z",fill:"#D1EDFD"}),r("path",{d:"M11.6036 9.1377C11.6993 9.11763 11.8391 9.16378 11.9294 9.19593C11.6952 9.50644 11.4706 9.81614 11.2327 10.1261L11.1572 10.2255C10.7581 9.73539 11.0333 9.24481 11.6036 9.1377Z",fill:"#D1EDFD"}),r("path",{d:"M7.49681 0.882812C7.53691 0.925159 7.61244 1.08523 7.63598 1.14156C7.74243 1.39673 7.75769 1.76908 7.38596 1.77504C7.28236 1.75599 7.15628 1.68938 7.13517 1.5783C7.0843 1.3107 7.35609 1.09964 7.48737 0.897583L7.49681 0.882812Z",fill:"#D1EDFD"}),r("path",{d:"M1.68305 6.17249C1.71659 6.1673 1.8134 6.16478 1.84892 6.16432C2.34052 6.15616 2.81496 6.34495 3.16655 6.68866C3.50847 7.01806 3.70349 7.47119 3.70765 7.94596C3.70896 8.42345 3.54045 8.85284 3.20281 9.19025C3.34033 9.28068 3.5321 9.52219 3.6543 9.65748C4.17158 9.39073 4.91447 9.69339 4.79675 10.3444C5.08751 10.5485 5.19656 10.8288 5.0585 11.1674C5.15418 11.2375 5.25595 11.3205 5.32383 11.4186C5.40228 11.5303 5.4309 11.6695 5.40291 11.8031C5.32228 12.1857 4.90085 12.3286 4.57669 12.1236C4.51367 12.0838 4.42258 11.9595 4.35299 11.9431C4.30669 11.9557 4.28453 11.9584 4.23644 11.9644C4.22885 11.9742 4.22118 11.9841 4.21343 11.9938C3.93597 12.3413 3.49234 12.4682 3.06933 12.5157C2.85285 12.518 2.70432 12.5146 2.49066 12.4609C1.80785 12.2892 1.50808 11.6167 1.70723 10.9639C1.829 10.5648 2.11891 10.2506 2.48939 10.0518C2.54655 10.132 2.57559 10.2191 2.64066 10.303C2.73571 10.2223 2.82048 10.1482 2.92363 10.0773C2.81023 9.95313 2.66811 9.7693 2.55817 9.63584C2.38871 9.6878 2.23026 9.72879 2.05298 9.74653C1.54239 9.80228 1.03118 9.64711 0.637735 9.31695C0.269964 9.01018 0.0453493 8.54827 0.00544736 8.07322C-0.0309495 7.60988 0.116099 7.15077 0.414918 6.79478C0.742554 6.41198 1.18728 6.21393 1.68305 6.17249Z",fill:"#475569"}),r("path",{d:"M1.79616 6.5951C2.54894 6.5619 3.18687 7.14364 3.22301 7.8963C3.25915 8.64894 2.67989 9.28913 1.92739 9.3282C1.17073 9.3675 0.526231 8.78435 0.489885 8.02753C0.45354 7.27071 1.03921 6.62849 1.79616 6.5951Z",fill:"#D1EDFD"}),r("path",{d:"M4.93607 11.4844C5.12839 11.6261 5.22049 11.9085 4.91876 11.9419C4.8067 11.8805 4.78491 11.8646 4.71094 11.7561C4.81572 11.6752 4.862 11.5925 4.93607 11.4844Z",fill:"#FEFEFD"}),r("path",{d:"M12.5164 3.58594L12.5715 3.59466C12.6589 3.65863 12.6908 3.94434 12.7882 4.05193C12.8789 4.15216 12.9155 4.17816 13.0326 4.24929C13.1363 4.31224 13.3325 4.34025 13.384 4.43124C13.3643 4.56218 13.0693 4.54857 12.9127 4.69344C12.6903 4.89898 12.7114 5.06971 12.5892 5.28622C12.5669 5.28439 12.5368 5.2868 12.5261 5.27346C12.4336 5.15843 12.4072 4.9308 12.3099 4.81465C12.1627 4.63903 11.9972 4.60054 11.7981 4.51372C11.7544 4.49467 11.7266 4.47099 11.7129 4.42649C11.7867 4.31876 12.0509 4.34309 12.2376 4.14892C12.43 3.94901 12.4155 3.72208 12.5164 3.58594Z",fill:"#475569"}),r("path",{d:"M2.13644 3.72656C2.24401 3.77084 2.29712 4.1268 2.431 4.25226C2.60327 4.41371 2.7311 4.41949 2.93246 4.52449C2.96024 4.53897 2.97173 4.56042 2.97671 4.58878C2.89584 4.6981 2.61854 4.70721 2.4596 4.85659C2.26275 5.04156 2.27341 5.29132 2.17022 5.42088C2.16192 5.41849 2.11671 5.40232 2.1156 5.40043C2.01291 5.21216 1.9836 5.04909 1.84812 4.87273C1.73599 4.72675 1.36534 4.69959 1.32812 4.56939C1.3835 4.47941 1.67823 4.44211 1.82291 4.30563C2.02737 4.11274 2.0042 3.8372 2.13644 3.72656Z",fill:"#475569"})]}))]}))}))}}},[Ut,Ue,ht]),Vt=u(function(){return ze.some(function(e){return e.isSkeleton})},[ze]),Ot=function(e){return i(void 0,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return Re?[4,Re(e)]:[3,2];case 1:n.sent(),je(function(e){return t(t([],e,!0),[{role:"assistant",content:"Thanks for your feedback — this will help improve future suggestions.",id:y(),citations:[],time:new Date,isEnd:!0}],!1)}),setTimeout(function(){return jt("smooth")},100),n.label=2;case 2:return[2]}})})};return console.log(ze,"rendering messages"),s("div",n({className:"".concat(N.customFont," ").concat(I.chatContainer),style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:be&&!Vt?"0 0 20px 5px rgba(37, 99, 235, 0.5)":"none"}},{children:[s("div",n({ref:Me,className:I.scrollWrapper},{children:[r("div",n({ref:St,className:I.stickyHeader},{children:r(k,{resetChatHistory:function(){var e="".concat(Te,"/api/chat/resetHistory?name=").concat(ke,"&organizationName=").concat(P);try{var t={method:"GET",params:{guestSessionId:_e.current},withCredentials:!0};b.get(e,t).then(function(){K(!0),Qe(""),mt(null),bt.current.clear(),Ee.current="".concat(y()),je([]),Oe(!0),null==te||te(),V&&V()}).catch(function(e){console.error(e)}).finally(function(){_e.current="".concat(ke,"-").concat(P,"-").concat(y())})}catch(e){Pe(!1),console.error(e)}},isStreamEnd:Ue,chatTitle:X,onResize:re,chatSize:ae,movingTowards:se})})),s("div",n({className:I.messagesList},{children:[s("div",n({className:I.initialMessageRow},{children:[r("div",n({className:I.iconWrapper},{children:r(W,{})})),r("div",n({className:I.welcomeTextWrapper},{children:r("div",n({className:I.welcomeMarkdownWrapper},{children:r("span",{children:r(f,n({rehypePlugins:[S],components:Gt},{children:ie}))})}))}))]})),ze.length>0&&ze.map(function(e,t){return s("div",n({className:I.messageRow},{children:["assistant"===e.role?r("div",n({className:I.assistantIconContainer},{children:r(W,{})})):r("div",{className:I.userSpacer}),r("div",n({className:I.messageContent},{children:"assistant"===e.role?s(l,{children:[e.orchestratorAndAgentsMessages&&e.orchestratorAndAgentsMessages.length>0&&r(R,{orchestratorAndAgentsMessages:null==e?void 0:e.orchestratorAndAgentsMessages,isStreamEnd:Ue,finalTimeTaken:null==e?void 0:e.finalTimeTaken},null==e?void 0:e.id),r(_,{index:t,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:ze,handleStream:Zt,isLastMessage:t===ze.length-1,onSave:oe,citations:null==e?void 0:e.citations,setChatSize:re,chatSize:ae,isStreamEnd:Ue,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onTypeResponseClick:function(){var e;_t(!0),null===(e=De.current)||void 0===e||e.focus()},onComparisonLinkClick:we,baseURL:Te,onFeedbackSubmit:Ot}),r("div",n({className:I.timestamp},{children:e.time&&!isNaN(new Date(e.time).getTime())?new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}):s("div",n({className:I.userMessageWrapper},{children:[s("div",n({className:I.userMessageBubble,style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:e.isSkeleton||Vt||e.id!==xt?"none":"0 0 15px 3px rgba(37, 99, 235, 0.6)"}},{children:[e.isSkeleton?s("div",n({style:{display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",padding:"8px 0"}},{children:[r(E,{variant:"text",width:"100%",height:16}),r(E,{variant:"text",width:"80%",height:16})]})):r(_,{index:t,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:ze,handleStream:Zt,isLastMessage:t===ze.length-1,onSave:oe,citations:null==e?void 0:e.citations,isStreamEnd:Ue,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onComparisonLinkClick:we,baseURL:Te,onFeedbackSubmit:Ot}),r("div",n({style:{marginTop:"0.5rem"}},{children:r(z,{})}))]})),r("div",n({className:I.userTimestamp},{children:new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}))}))]}),e.id)}),Be&&s("div",n({className:I.loadingRow},{children:[r("div",n({className:I.iconWrapper,style:{marginTop:"0.2rem"}},{children:r(W,{})})),r("div",n({className:I.loadingTextWrapper},{children:r("span",{children:Ye})}))]})),r("div",{ref:Ne,style:{float:"left",clear:"both"}})]}))]})),s("div",n({className:I.inputAreaWrapper},{children:[tt&&s(C,n({sx:{display:"flex",alignItems:"center",gap:"8px",paddingBottom:"8px",paddingLeft:"4px",fontFamily:'"Plus Jakarta Sans", sans-serif',fontSize:"0.875rem",color:"#6b7280",width:"100%"}},{children:[r("span",{children:"Instant Learning AI is thinking"}),r(C,{sx:{width:"5px",height:"5px",bgcolor:"#6b7280",borderRadius:"50%",animation:"".concat(Lt," 1.4s infinite ease-in-out both"),animationDelay:"-0.32s"}}),r(C,{sx:{width:"5px",height:"5px",bgcolor:"#6b7280",borderRadius:"50%",animation:"".concat(Lt," 1.4s infinite ease-in-out both"),animationDelay:"-0.16s"}}),r(C,{sx:{width:"5px",height:"5px",bgcolor:"#6b7280",borderRadius:"50%",animation:"".concat(Lt," 1.4s infinite ease-in-out both")}})]})),r(g,n({title:Q?"Please wait for the validation to be completed.":""},{children:s("div",n({className:"".concat(I.inputBoxContainer," ").concat(At?I.disabled:""),style:kt?{boxShadow:"0 0 15px 3px rgba(37, 99, 235, 0.5)",borderColor:"#2563eb",transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}:{transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}},{children:[ze.length>0&&!st&&r("div",n({onMouseDown:function(e){e.preventDefault(),jt("smooth")},className:I.scrollToBottomBtn},{children:r(D,{})})),s("div",n({style:{width:"100%",display:"flex"}},{children:[r("textarea",{ref:De,placeholder:de,value:Fe||"",onChange:function(e){Ae(e.target.value)},onFocus:function(){return at(!0)},onBlur:function(){return at(!1)},onKeyDown:function(e){return Zt(e)},disabled:At,className:"no-scrollbar ".concat(I.chatTextarea),style:{minHeight:ot?"120px":"50px",height:ot?"120px":"50px",maxHeight:"120px"}}),r("span",n({className:I.sendButtonWrapper},{children:r("button",n({onClick:function(e){Zt(new KeyboardEvent("keydown",{key:"Enter"}))},disabled:Wt,className:"".concat(I.sendButton," ").concat(Wt?I.disabled:I.active)},{children:r(A,{})}))}))]}))]}))}))]})),s("div",n({className:I.footerTools},{children:[r(g,n({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:r("span",n({className:I.footerToolItem},{children:r(M,{amplitude:1,variant:"speaker",isActive:!1,onClick:function(){return null},disabled:!1})}))})),r(g,n({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:r("span",n({className:I.footerToolItem},{children:r(M,{amplitude:1,variant:"microphone",isActive:!1,onClick:function(){return null},disabled:!1})}))}))]}))]}))};export{q as default};
2
2
  //# sourceMappingURL=NormalChat.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{CitationRenderer as i}from"@e-llm-studio/citation";import n,{useRef as r,useCallback as l,useEffect as a}from"react";import d from"./_svg/ChevronDown.js";import c from"./_svg/ChevronUp.js";import s from"./_svg/BookIcon.js";import{CitationLinkSparkleIcon as p}from"./_svg/CitationLinkSparkleIcon.js";import f from"./MarkdownRenderer.js";var h=n.memo(function(o){var i=o.text,n=o.highlights,r=(null!=n?n:[]).filter(function(e){return"string"==typeof e&&e.length>0});if(0===r.length||!i)return t("span",{children:i});var l=r.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),a=new RegExp("(".concat(l.join("|"),")"),"gi"),d=i.split(a);return t("span",{children:d.map(function(o,i){var n=r.some(function(e){return e.toLowerCase()===o.toLowerCase()});return t("span",n?e({style:{backgroundColor:"#fef08a",color:"#000"}},{children:o}):{children:o},i)})})}),u=n.memo(function(i){var n,r,l=i.citation,a=i.headerTitle,d=i.score,c=i.footerText,u=i.userPreferences,x=i.hasUserPreferences;return o("div",e({className:"citation-card-layout",style:{display:"flex",flexDirection:"column",gap:"8px",padding:"10px",height:"auto",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden",backgroundColor:"#fbfaff"}},{children:[d&&o("div",e({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1.5px solid #c4b6fc",backgroundColor:"#FFF",padding:"4px 8px",fontSize:"12px",fontWeight:600,color:"#1E293B",gap:"4px",cursor:"pointer",width:"fit-content"}},{children:[t(p,{width:13,height:13}),o("span",{children:["Citation Relevance ",d,"%"]})]})),o("div",e({style:{flex:"1 1 auto",display:"flex",gap:x?"12px":"0px",overflow:"hidden",alignItems:"stretch",width:"100%",flexWrap:"wrap"}},{children:[o("div",e({style:{display:"flex",flexDirection:"column",flex:x?"1 1 170px":"1 1 100%",minWidth:x?"100px":"100%",width:x?"auto":"100%",border:"1px solid #E3E6EA",borderRadius:"8px"}},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:"4px",borderBottom:"1px solid #E5E7EB",backgroundColor:"#F7F8FA",padding:"12px",fontSize:"14px",fontWeight:"500",color:"#19213D",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[t(s,{})," ",a]})),t("div",e({className:"citation-markdown-wrapper",style:{flex:x?"1 1 60%":"1 1 auto",overflowY:"auto",backgroundColor:"#fff",minWidth:"0"}},{children:t(f,{value:(null===(n=l.customMetaData)||void 0===n?void 0:n.content)||"",highlightedText:null===(r=l.customMetaData)||void 0===r?void 0:r.highlighted_text,styles:{mainCard:{border:"none",padding:"8px"},list:{fontSize:"13px"}}})})),t("div",e({style:{display:"flex",backgroundColor:"#ffffffff",padding:"12px",justifyContent:"flex-end",borderTop:"1px solid #E6DDFE",fontSize:"12px",fontStyle:"italic",color:"#666F8D",fontWeight:"400",textTransform:"capitalize",whiteSpace:"nowrap",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}},{children:c}))]})),x&&o("div",e({style:{flex:"1 1 170px",minWidth:"100px",display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid #E5E7EB",backgroundColor:"#fff",overflowY:"visible",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"}},{children:[t("div",e({style:{backgroundColor:"#fff"}},{children:t("div",e({style:{padding:"12px",backgroundColor:"#F7F8FA",borderBottom:"1px solid #E5E7EB"}},{children:t("h3",e({style:{margin:0,fontSize:"14px",fontWeight:"700",color:"#19213D"}},{children:"Your Preference"}))}))})),t("div",e({style:{padding:"16px",display:"flex",flexDirection:"column",gap:"6px"}},{children:u.slice(0,3).map(function(i,n){return t("div",e({style:{fontSize:"13px",lineHeight:"1.5",color:"#374151"}},{children:o("div",e({style:{display:"flex",alignItems:"flex-start",gap:"4px"}},{children:[o("div",e({style:{minWidth:"18px",fontSize:"13px",fontWeight:"600",color:"#374151",flexShrink:0}},{children:[n+1,"."]})),o("div",e({style:{fontSize:"13px"}},{children:[t("span",{children:i.question}),t("span",e({style:{fontWeight:"600",margin:"0 4px"}},{children:":"})),t("br",{}),o("span",e({style:{fontWeight:"700",color:"#111827"}},{children:['"',t(h,{text:i.answer,highlights:i.highlighted_text}),'"']}))]}))]}))}),n)})}))]}))]})),t("style",{children:"\n .citation-markdown-wrapper p:last-child { margin-bottom: 0 !important; }\n .citation-markdown-wrapper hr { display: none; }\n .citation-markdown-wrapper::-webkit-scrollbar, .citation-card-layout div::-webkit-scrollbar { width: 4px; }\n .citation-markdown-wrapper::-webkit-scrollbar-thumb, .citation-card-layout div::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }\n "})]}))}),x=function(n){var s,p,f,h,x=n.citation,m=n.linkTitle,g=n.isOpen,v=n.onToggle,b=n.fontSize,y=r(null),w=l(function(){v&&v()},[v]);a(function(){g&&y.current&&setTimeout(function(){var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)},[g]);var k=(null===(s=x.customMetaData)||void 0===s?void 0:s.citation_title)||"",C=(null===(p=x.customMetaData)||void 0===p?void 0:p.citation_relevance_score)||null,F="Referenced from ".concat(null===(f=x.customMetaData)||void 0===f?void 0:f.citation_reference)||"",S=(null===(h=x.customMetaData)||void 0===h?void 0:h.user_preference)||[],D=S.length>0;return o("span",e({className:"citation-container",ref:y,onClick:function(e){return e.stopPropagation()}},{children:[t(i,{inLineCitation:!0,citationTitle:m,citationComponent:t(u,{citation:x,headerTitle:k,score:C,footerText:F,userPreferences:S,hasUserPreferences:D}),chevronDownComponent:t(d,{}),chevronUpComponent:t(c,{}),additionalCallbackForPillButton:w,isOpen:g,onToggle:v,styles:{citationWrapper:{maxHeight:"none",overflow:"visible",display:"flex",justifyContent:"center",marginBottom:"4px"},pillButton:{fontFamily:'"Inter", sans-serif',background:"transparent",padding:"2px 6px",margin:0,fontSize:b?"".concat(b,"px"):"1rem",fontWeight:500,color:"rgb(109, 40, 217)",cursor:"pointer",whiteSpace:"nowrap",border:g?"1px solid #A78BFA":"none",borderRadius:"6px",marginBottom:"3px",display:"inline-flex",alignItems:"center",gap:"2px",verticalAlign:"middle"},citationContent:{backgroundColor:"#F5F3FF66",border:"1px solid #A78BFA",borderRadius:"6px",padding:"0rem",fontFamily:'"Inter", sans-serif',fontSize:"12px",textAlign:"justify",textJustify:"inter-word",hyphens:"auto",fontWeight:400,lineHeight:"140%",color:"#1e293b",boxShadow:"none",width:"100%",minHeight:"auto",height:"auto",overflowY:"auto",scrollbarWidth:"none",msOverflowStyle:"none"}}}),t("style",{children:"\n .citation-container ::-webkit-scrollbar {\n display: none !important;\n }\n "})]}))};export{x as default};
1
+ import{__assign as e}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{CitationRenderer as o}from"@e-llm-studio/citation";import t,{useRef as n,useCallback as a,useEffect as l}from"react";import d from"./_svg/ChevronDown.js";import c from"./_svg/ChevronUp.js";import s from"./_svg/BookIcon.js";import{CitationLinkSparkleIcon as p}from"./_svg/CitationLinkSparkleIcon.js";import f from"./MarkdownRenderer.js";var u=t.memo(function(i){var o=i.text,t=i.highlights,n=(null!=t?t:[]).filter(function(e){return"string"==typeof e&&e.length>0});if(0===n.length||!o)return r("span",{children:o});var a=n.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),l=new RegExp("(".concat(a.join("|"),")"),"gi"),d=o.split(l);return r("span",{children:d.map(function(i,o){var t=n.some(function(e){return e.toLowerCase()===i.toLowerCase()});return r("span",t?e({style:{backgroundColor:"var(--il-warning-subtle, #fef08a)",color:"var(--il-foreground, #000)"}},{children:i}):{children:i},o)})})}),h=t.memo(function(o){var t,n,a=o.citation,l=o.headerTitle,d=o.score,c=o.footerText,h=o.userPreferences,g=o.hasUserPreferences;return i("div",e({className:"citation-card-layout",style:{display:"flex",flexDirection:"column",gap:"8px",padding:"10px",height:"auto",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden",backgroundColor:"var(--il-surface-alt, #fbfaff)",color:"var(--il-foreground, #19213D)"}},{children:[d&&i("div",e({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1.5px solid var(--il-primary, #c4b6fc)",backgroundColor:"var(--il-surface, #FFF)",padding:"4px 8px",fontSize:"12px",fontWeight:600,color:"var(--il-foreground, #1E293B)",gap:"4px",cursor:"pointer",width:"fit-content"}},{children:[r(p,{width:13,height:13}),i("span",{children:["Citation Relevance ",d,"%"]})]})),i("div",e({style:{flex:"1 1 auto",display:"flex",gap:g?"12px":"0px",overflow:"hidden",alignItems:"stretch",width:"100%",flexWrap:"wrap"}},{children:[i("div",e({style:{display:"flex",flexDirection:"column",flex:g?"1 1 170px":"1 1 100%",minWidth:g?"100px":"100%",width:g?"auto":"100%",border:"1px solid var(--il-border, #E3E6EA)",borderRadius:"8px"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:"4px",borderBottom:"1px solid var(--il-border, #E5E7EB)",backgroundColor:"var(--il-surface-alt, #F7F8FA)",padding:"12px",fontSize:"14px",fontWeight:"500",color:"var(--il-foreground, #19213D)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[r(s,{})," ",l]})),r("div",e({className:"citation-markdown-wrapper",style:{flex:g?"1 1 60%":"1 1 auto",overflowY:"auto",backgroundColor:"var(--il-surface, #fff)",minWidth:"0"}},{children:r(f,{value:(null===(t=a.customMetaData)||void 0===t?void 0:t.content)||"",highlightedText:null===(n=a.customMetaData)||void 0===n?void 0:n.highlighted_text,styles:{mainCard:{border:"none",padding:"8px"},list:{fontSize:"13px"}}})})),r("div",e({style:{display:"flex",backgroundColor:"var(--il-surface, #ffffff)",padding:"12px",justifyContent:"flex-end",borderTop:"1px solid var(--il-border, #E6DDFE)",fontSize:"12px",fontStyle:"italic",color:"var(--il-muted, #666F8D)",fontWeight:"400",textTransform:"capitalize",whiteSpace:"nowrap",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}},{children:c}))]})),g&&i("div",e({style:{flex:"1 1 170px",minWidth:"100px",display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid var(--il-border, #E5E7EB)",backgroundColor:"var(--il-surface, #fff)",overflowY:"visible",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"}},{children:[r("div",e({style:{backgroundColor:"var(--il-surface, #fff)"}},{children:r("div",e({style:{padding:"12px",backgroundColor:"var(--il-surface-alt, #F7F8FA)",borderBottom:"1px solid var(--il-border, #E5E7EB)"}},{children:r("h3",e({style:{margin:0,fontSize:"14px",fontWeight:"700",color:"var(--il-foreground, #19213D)"}},{children:"Your Preference"}))}))})),r("div",e({style:{padding:"16px",display:"flex",flexDirection:"column",gap:"6px"}},{children:h.slice(0,3).map(function(o,t){return r("div",e({style:{fontSize:"13px",lineHeight:"1.5",color:"var(--il-secondary-fg, #374151)"}},{children:i("div",e({style:{display:"flex",alignItems:"flex-start",gap:"4px"}},{children:[i("div",e({style:{minWidth:"18px",fontSize:"13px",fontWeight:"600",color:"var(--il-secondary-fg, #374151)",flexShrink:0}},{children:[t+1,"."]})),i("div",e({style:{fontSize:"13px"}},{children:[r("span",{children:o.question}),r("span",e({style:{fontWeight:"600",margin:"0 4px"}},{children:":"})),r("br",{}),i("span",e({style:{fontWeight:"700",color:"var(--il-foreground, #111827)"}},{children:['"',r(u,{text:o.answer,highlights:o.highlighted_text}),'"']}))]}))]}))}),t)})}))]}))]})),r("style",{children:"\n .citation-markdown-wrapper p:last-child { margin-bottom: 0 !important; }\n .citation-markdown-wrapper hr { display: none; }\n .citation-markdown-wrapper::-webkit-scrollbar, .citation-card-layout div::-webkit-scrollbar { width: 4px; }\n .citation-markdown-wrapper::-webkit-scrollbar-thumb, .citation-card-layout div::-webkit-scrollbar-thumb { background-color: var(--il-border, #cbd5e1); border-radius: 4px; }\n "})]}))}),g=function(t){var s,p,f,u,g=t.citation,x=t.linkTitle,m=t.isOpen,v=t.onToggle,b=t.fontSize,y=n(null),w=a(function(){v&&v()},[v]);l(function(){m&&y.current&&setTimeout(function(){var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)},[m]);var k=(null===(s=g.customMetaData)||void 0===s?void 0:s.citation_title)||"",C=(null===(p=g.customMetaData)||void 0===p?void 0:p.citation_relevance_score)||null,F="Referenced from ".concat(null===(f=g.customMetaData)||void 0===f?void 0:f.citation_reference)||"",S=(null===(u=g.customMetaData)||void 0===u?void 0:u.user_preference)||[],D=S.length>0;return i("span",e({className:"citation-container",ref:y,onClick:function(e){return e.stopPropagation()}},{children:[r(o,{inLineCitation:!0,citationTitle:x,citationComponent:r(h,{citation:g,headerTitle:k,score:C,footerText:F,userPreferences:S,hasUserPreferences:D}),chevronDownComponent:r(d,{}),chevronUpComponent:r(c,{}),additionalCallbackForPillButton:w,isOpen:m,onToggle:v,styles:{citationWrapper:{maxHeight:"none",overflow:"visible",display:"flex",justifyContent:"center",marginBottom:"4px"},pillButton:{fontFamily:'"Inter", sans-serif',background:"transparent",padding:"2px 6px",margin:0,fontSize:b?"".concat(b,"px"):"1rem",fontWeight:500,color:"var(--il-primary, rgb(109, 40, 217))",cursor:"pointer",whiteSpace:"nowrap",border:m?"1px solid var(--il-primary, #A78BFA)":"none",borderRadius:"6px",marginBottom:"3px",display:"inline-flex",alignItems:"center",gap:"2px",verticalAlign:"middle"},citationContent:{backgroundColor:"var(--il-primary-subtle, #F5F3FF)",border:"1px solid var(--il-primary, #A78BFA)",borderRadius:"6px",padding:"0rem",fontFamily:'"Inter", sans-serif',fontSize:"12px",textAlign:"justify",textJustify:"inter-word",hyphens:"auto",fontWeight:400,lineHeight:"140%",color:"var(--il-foreground, #1e293b)",boxShadow:"none",width:"100%",minHeight:"auto",height:"auto",overflowY:"auto",scrollbarWidth:"none",msOverflowStyle:"none"}}}),r("style",{children:"\n .citation-container ::-webkit-scrollbar {\n display: none !important;\n }\n "})]}))};export{g as default};
2
2
  //# sourceMappingURL=CitationLink.js.map