@e-llm-studio/instant-learning 1.3.0-alpha.266 → 1.3.0-alpha.268

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 (1021) hide show
  1. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
  2. package/dist/cjs/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -1
  3. package/dist/cjs/features/LearningManagement/LearningManagementTest.js +1 -1
  4. package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
  5. package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  6. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
  7. package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
  8. package/dist/cjs/features/LearningManagement/utils/learningMetadataUtils.js +1 -1
  9. package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
  10. package/dist/features/IL-OTJ/_components/ChatComponents/NormalChat.js +1 -1
  11. package/dist/features/LearningManagement/LearningManagementTest.js +1 -1
  12. package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
  13. package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  14. package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
  15. package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
  16. package/dist/features/LearningManagement/utils/learningMetadataUtils.js +1 -1
  17. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
  18. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
  19. package/dist/types/src/features/LearningManagement/LearningManagementTest.d.ts.map +1 -1
  20. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
  21. package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
  22. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
  23. package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
  24. package/dist/types/src/features/LearningManagement/utils/learningMetadataUtils.d.ts.map +1 -1
  25. package/package.json +2 -2
  26. package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +0 -2
  27. package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +0 -1
  28. package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +0 -2
  29. package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +0 -1
  30. package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +0 -2
  31. package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +0 -1
  32. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js +0 -2
  33. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.js.map +0 -1
  34. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.styles.js +0 -2
  35. package/dist/cjs/features/LSCGuidelinesCart/Cart/Cart.styles.js.map +0 -1
  36. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js +0 -2
  37. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.js.map +0 -1
  38. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.styles.js +0 -2
  39. package/dist/cjs/features/LSCGuidelinesCart/GuidelineCard.styles.js.map +0 -1
  40. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js +0 -2
  41. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.js.map +0 -1
  42. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +0 -2
  43. package/dist/cjs/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js.map +0 -1
  44. package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js +0 -2
  45. package/dist/cjs/features/LSCGuidelinesCart/LearningManagementWrapper.js.map +0 -1
  46. package/dist/cjs/features/LSCGuidelinesCart/api.js +0 -2
  47. package/dist/cjs/features/LSCGuidelinesCart/api.js.map +0 -1
  48. package/dist/cjs/features/LSCGuidelinesCart/endpoints.js +0 -2
  49. package/dist/cjs/features/LSCGuidelinesCart/endpoints.js.map +0 -1
  50. package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +0 -2
  51. package/dist/cjs/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +0 -1
  52. package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js +0 -2
  53. package/dist/cjs/features/LearningManagement/components/CreateLearningSetModal.js.map +0 -1
  54. package/dist/cjs/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +0 -2
  55. package/dist/cjs/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +0 -1
  56. package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +0 -2
  57. package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +0 -1
  58. package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +0 -2
  59. package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +0 -1
  60. package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +0 -2
  61. package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +0 -1
  62. package/dist/features/LSCGuidelinesCart/Cart/Cart.js +0 -2
  63. package/dist/features/LSCGuidelinesCart/Cart/Cart.js.map +0 -1
  64. package/dist/features/LSCGuidelinesCart/Cart/Cart.styles.js +0 -2
  65. package/dist/features/LSCGuidelinesCart/Cart/Cart.styles.js.map +0 -1
  66. package/dist/features/LSCGuidelinesCart/GuidelineCard.js +0 -2
  67. package/dist/features/LSCGuidelinesCart/GuidelineCard.js.map +0 -1
  68. package/dist/features/LSCGuidelinesCart/GuidelineCard.styles.js +0 -2
  69. package/dist/features/LSCGuidelinesCart/GuidelineCard.styles.js.map +0 -1
  70. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js +0 -2
  71. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.js.map +0 -1
  72. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js +0 -2
  73. package/dist/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.js.map +0 -1
  74. package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js +0 -2
  75. package/dist/features/LSCGuidelinesCart/LearningManagementWrapper.js.map +0 -1
  76. package/dist/features/LSCGuidelinesCart/api.js +0 -2
  77. package/dist/features/LSCGuidelinesCart/api.js.map +0 -1
  78. package/dist/features/LSCGuidelinesCart/endpoints.js +0 -2
  79. package/dist/features/LSCGuidelinesCart/endpoints.js.map +0 -1
  80. package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js +0 -2
  81. package/dist/features/LSCGuidelinesCart/transformSelectedGuidelineData.js.map +0 -1
  82. package/dist/features/LearningManagement/components/CreateLearningSetModal.js +0 -2
  83. package/dist/features/LearningManagement/components/CreateLearningSetModal.js.map +0 -1
  84. package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js +0 -2
  85. package/dist/features/LearningManagement/styles/CreateLearningSetModal.module.css.js.map +0 -1
  86. package/dist/types/AccordianHeadTest.d.ts +0 -3
  87. package/dist/types/AccordianHeadTest.d.ts.map +0 -1
  88. package/dist/types/App.d.ts +0 -4
  89. package/dist/types/App.d.ts.map +0 -1
  90. package/dist/types/CommonComponents/AccordianHead/AccordianHead.d.ts +0 -9
  91. package/dist/types/CommonComponents/AccordianHead/AccordianHead.d.ts.map +0 -1
  92. package/dist/types/CommonComponents/CustomDropdown.d.ts +0 -4
  93. package/dist/types/CommonComponents/CustomDropdown.d.ts.map +0 -1
  94. package/dist/types/CommonComponents/GradientSparkleIcon.d.ts +0 -6
  95. package/dist/types/CommonComponents/GradientSparkleIcon.d.ts.map +0 -1
  96. package/dist/types/CommonComponents/HelloWorld.d.ts +0 -3
  97. package/dist/types/CommonComponents/HelloWorld.d.ts.map +0 -1
  98. package/dist/types/CommonComponents/NoTableData.d.ts +0 -7
  99. package/dist/types/CommonComponents/NoTableData.d.ts.map +0 -1
  100. package/dist/types/CommonComponents/Spinner.d.ts +0 -5
  101. package/dist/types/CommonComponents/Spinner.d.ts.map +0 -1
  102. package/dist/types/CommonConstants/CommonConstants.d.ts +0 -5
  103. package/dist/types/CommonConstants/CommonConstants.d.ts.map +0 -1
  104. package/dist/types/ComponentRegistry.d.ts +0 -13
  105. package/dist/types/ComponentRegistry.d.ts.map +0 -1
  106. package/dist/types/ContinueWithTemplateModal.d.ts +0 -24
  107. package/dist/types/ContinueWithTemplateModal.d.ts.map +0 -1
  108. package/dist/types/CustomStylesProvider.d.ts +0 -6
  109. package/dist/types/CustomStylesProvider.d.ts.map +0 -1
  110. package/dist/types/CustomThemeProvider.d.ts +0 -7
  111. package/dist/types/CustomThemeProvider.d.ts.map +0 -1
  112. package/dist/types/GoogleFilePickerDemo.d.ts +0 -3
  113. package/dist/types/GoogleFilePickerDemo.d.ts.map +0 -1
  114. package/dist/types/ILMarketplaceMockTest.d.ts +0 -4
  115. package/dist/types/ILMarketplaceMockTest.d.ts.map +0 -1
  116. package/dist/types/ILMarketplaceWrapper.d.ts +0 -174
  117. package/dist/types/ILMarketplaceWrapper.d.ts.map +0 -1
  118. package/dist/types/PublishToMarketplaceTest.d.ts +0 -4
  119. package/dist/types/PublishToMarketplaceTest.d.ts.map +0 -1
  120. package/dist/types/api/transport.d.ts +0 -44
  121. package/dist/types/api/transport.d.ts.map +0 -1
  122. package/dist/types/context/DataSelectedContext.d.ts +0 -73
  123. package/dist/types/context/DataSelectedContext.d.ts.map +0 -1
  124. package/dist/types/features/DataSelector/DataSelector.d.ts +0 -18
  125. package/dist/types/features/DataSelector/DataSelector.d.ts.map +0 -1
  126. package/dist/types/features/DataSelector/components/DataSelectionOptionsScreen.d.ts +0 -4
  127. package/dist/types/features/DataSelector/components/DataSelectionOptionsScreen.d.ts.map +0 -1
  128. package/dist/types/features/DataSelector/components/RLEFDataPointsListInSelectedDataSetCollection.d.ts +0 -4
  129. package/dist/types/features/DataSelector/components/RLEFDataPointsListInSelectedDataSetCollection.d.ts.map +0 -1
  130. package/dist/types/features/DataSelector/components/RLEFDataSetCollectionsList.d.ts +0 -4
  131. package/dist/types/features/DataSelector/components/RLEFDataSetCollectionsList.d.ts.map +0 -1
  132. package/dist/types/features/DataSelector/components/RlefDataTabsComponent.d.ts +0 -4
  133. package/dist/types/features/DataSelector/components/RlefDataTabsComponent.d.ts.map +0 -1
  134. package/dist/types/features/DataSelector/components/RlefHistoricalCopilotData.d.ts +0 -4
  135. package/dist/types/features/DataSelector/components/RlefHistoricalCopilotData.d.ts.map +0 -1
  136. package/dist/types/features/DataSelector/components/SavedDataSetListScreen.d.ts +0 -14
  137. package/dist/types/features/DataSelector/components/SavedDataSetListScreen.d.ts.map +0 -1
  138. package/dist/types/features/DataSelector/components/SelectedDataList.d.ts +0 -4
  139. package/dist/types/features/DataSelector/components/SelectedDataList.d.ts.map +0 -1
  140. package/dist/types/features/DataSelector/components/subcomponents/DataSetElement/DataSetElement.d.ts +0 -11
  141. package/dist/types/features/DataSelector/components/subcomponents/DataSetElement/DataSetElement.d.ts.map +0 -1
  142. package/dist/types/features/DataSelector/components/subcomponents/Pagination/Pagination.d.ts +0 -8
  143. package/dist/types/features/DataSelector/components/subcomponents/Pagination/Pagination.d.ts.map +0 -1
  144. package/dist/types/features/DataSelector/tables/ShowSelectedDataTable.d.ts +0 -4
  145. package/dist/types/features/DataSelector/tables/ShowSelectedDataTable.d.ts.map +0 -1
  146. package/dist/types/features/DocumentLearning/DocumentLearning.d.ts +0 -21
  147. package/dist/types/features/DocumentLearning/DocumentLearning.d.ts.map +0 -1
  148. package/dist/types/features/DocumentLearning/_components/AudioWaveform.d.ts +0 -13
  149. package/dist/types/features/DocumentLearning/_components/AudioWaveform.d.ts.map +0 -1
  150. package/dist/types/features/DocumentLearning/_components/BookLearningForm.d.ts +0 -23
  151. package/dist/types/features/DocumentLearning/_components/BookLearningForm.d.ts.map +0 -1
  152. package/dist/types/features/DocumentLearning/_components/ChatComponent.d.ts +0 -61
  153. package/dist/types/features/DocumentLearning/_components/ChatComponent.d.ts.map +0 -1
  154. package/dist/types/features/DocumentLearning/_components/ConflictingLearningWarnCard.d.ts +0 -13
  155. package/dist/types/features/DocumentLearning/_components/ConflictingLearningWarnCard.d.ts.map +0 -1
  156. package/dist/types/features/DocumentLearning/_components/ConflictingLearningWarnCardDB.d.ts +0 -41
  157. package/dist/types/features/DocumentLearning/_components/ConflictingLearningWarnCardDB.d.ts.map +0 -1
  158. package/dist/types/features/DocumentLearning/_components/ContextualChatComponent.d.ts +0 -62
  159. package/dist/types/features/DocumentLearning/_components/ContextualChatComponent.d.ts.map +0 -1
  160. package/dist/types/features/DocumentLearning/_components/ContextualConflictDBCard.d.ts +0 -30
  161. package/dist/types/features/DocumentLearning/_components/ContextualConflictDBCard.d.ts.map +0 -1
  162. package/dist/types/features/DocumentLearning/_components/ContextualLearningForm.d.ts +0 -1
  163. package/dist/types/features/DocumentLearning/_components/ContextualLearningForm.d.ts.map +0 -1
  164. package/dist/types/features/DocumentLearning/_components/LearningDetailsForm.d.ts +0 -71
  165. package/dist/types/features/DocumentLearning/_components/LearningDetailsForm.d.ts.map +0 -1
  166. package/dist/types/features/DocumentLearning/_components/MessageRendering.d.ts +0 -10
  167. package/dist/types/features/DocumentLearning/_components/MessageRendering.d.ts.map +0 -1
  168. package/dist/types/features/DocumentLearning/_components/MinimizedThinkingSteps.d.ts +0 -4
  169. package/dist/types/features/DocumentLearning/_components/MinimizedThinkingSteps.d.ts.map +0 -1
  170. package/dist/types/features/DocumentLearning/_components/SimilarLearningCard.d.ts +0 -20
  171. package/dist/types/features/DocumentLearning/_components/SimilarLearningCard.d.ts.map +0 -1
  172. package/dist/types/features/DocumentLearning/_components/TemplateRetrievalForm.d.ts +0 -50
  173. package/dist/types/features/DocumentLearning/_components/TemplateRetrievalForm.d.ts.map +0 -1
  174. package/dist/types/features/DocumentLearning/_components/TooltipComponent.d.ts +0 -8
  175. package/dist/types/features/DocumentLearning/_components/TooltipComponent.d.ts.map +0 -1
  176. package/dist/types/features/DocumentLearning/_components/_svg/ArrowDown.d.ts +0 -4
  177. package/dist/types/features/DocumentLearning/_components/_svg/ArrowDown.d.ts.map +0 -1
  178. package/dist/types/features/DocumentLearning/_components/_svg/ArrowIconBlue.d.ts +0 -4
  179. package/dist/types/features/DocumentLearning/_components/_svg/ArrowIconBlue.d.ts.map +0 -1
  180. package/dist/types/features/DocumentLearning/_components/_svg/CompleteIconGreen.d.ts +0 -4
  181. package/dist/types/features/DocumentLearning/_components/_svg/CompleteIconGreen.d.ts.map +0 -1
  182. package/dist/types/features/DocumentLearning/_components/_svg/NewChatIcon.d.ts +0 -4
  183. package/dist/types/features/DocumentLearning/_components/_svg/NewChatIcon.d.ts.map +0 -1
  184. package/dist/types/features/IL-OTJ/ILOTJ.d.ts +0 -95
  185. package/dist/types/features/IL-OTJ/ILOTJ.d.ts.map +0 -1
  186. package/dist/types/features/IL-OTJ/ILOTJTest.d.ts +0 -609
  187. package/dist/types/features/IL-OTJ/ILOTJTest.d.ts.map +0 -1
  188. package/dist/types/features/IL-OTJ/ILOTJTriageAITest.d.ts +0 -12
  189. package/dist/types/features/IL-OTJ/ILOTJTriageAITest.d.ts.map +0 -1
  190. package/dist/types/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +0 -102
  191. package/dist/types/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +0 -1
  192. package/dist/types/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +0 -33
  193. package/dist/types/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +0 -1
  194. package/dist/types/features/IL-OTJ/_components/AccordianSection.d.ts +0 -52
  195. package/dist/types/features/IL-OTJ/_components/AccordianSection.d.ts.map +0 -1
  196. package/dist/types/features/IL-OTJ/_components/AudioWaveform.d.ts +0 -13
  197. package/dist/types/features/IL-OTJ/_components/AudioWaveform.d.ts.map +0 -1
  198. package/dist/types/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts +0 -59
  199. package/dist/types/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +0 -1
  200. package/dist/types/features/IL-OTJ/_components/ChatComponents/ChatHeader.d.ts +0 -12
  201. package/dist/types/features/IL-OTJ/_components/ChatComponents/ChatHeader.d.ts.map +0 -1
  202. package/dist/types/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts +0 -45
  203. package/dist/types/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +0 -1
  204. package/dist/types/features/IL-OTJ/_components/ChatComponents/mockComparisonData.d.ts +0 -1503
  205. package/dist/types/features/IL-OTJ/_components/ChatComponents/mockComparisonData.d.ts.map +0 -1
  206. package/dist/types/features/IL-OTJ/_components/CitationLink.d.ts +0 -18
  207. package/dist/types/features/IL-OTJ/_components/CitationLink.d.ts.map +0 -1
  208. package/dist/types/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts +0 -11
  209. package/dist/types/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts.map +0 -1
  210. package/dist/types/features/IL-OTJ/_components/ConflictingReasoningCard.d.ts +0 -11
  211. package/dist/types/features/IL-OTJ/_components/ConflictingReasoningCard.d.ts.map +0 -1
  212. package/dist/types/features/IL-OTJ/_components/CriticalGaps.d.ts +0 -11
  213. package/dist/types/features/IL-OTJ/_components/CriticalGaps.d.ts.map +0 -1
  214. package/dist/types/features/IL-OTJ/_components/GapExplanationAccordion.d.ts +0 -10
  215. package/dist/types/features/IL-OTJ/_components/GapExplanationAccordion.d.ts.map +0 -1
  216. package/dist/types/features/IL-OTJ/_components/ILPopup.d.ts +0 -33
  217. package/dist/types/features/IL-OTJ/_components/ILPopup.d.ts.map +0 -1
  218. package/dist/types/features/IL-OTJ/_components/ILPopup.styles.d.ts +0 -2
  219. package/dist/types/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +0 -1
  220. package/dist/types/features/IL-OTJ/_components/InputDataReasoningCard.d.ts +0 -11
  221. package/dist/types/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +0 -1
  222. package/dist/types/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts +0 -33
  223. package/dist/types/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +0 -1
  224. package/dist/types/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.d.ts +0 -26
  225. package/dist/types/features/IL-OTJ/_components/MarkdownComponents/MarkdownSelect.d.ts.map +0 -1
  226. package/dist/types/features/IL-OTJ/_components/MarkdownRenderer.d.ts +0 -25
  227. package/dist/types/features/IL-OTJ/_components/MarkdownRenderer.d.ts.map +0 -1
  228. package/dist/types/features/IL-OTJ/_components/MessageRendering/ChatFeedback.d.ts +0 -26
  229. package/dist/types/features/IL-OTJ/_components/MessageRendering/ChatFeedback.d.ts.map +0 -1
  230. package/dist/types/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts +0 -8
  231. package/dist/types/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts.map +0 -1
  232. package/dist/types/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts +0 -35
  233. package/dist/types/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map +0 -1
  234. package/dist/types/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts +0 -24
  235. package/dist/types/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts.map +0 -1
  236. package/dist/types/features/IL-OTJ/_components/MessageRendering/RuleVariantCard.d.ts +0 -17
  237. package/dist/types/features/IL-OTJ/_components/MessageRendering/RuleVariantCard.d.ts.map +0 -1
  238. package/dist/types/features/IL-OTJ/_components/MinimizedThinkingSteps.d.ts +0 -4
  239. package/dist/types/features/IL-OTJ/_components/MinimizedThinkingSteps.d.ts.map +0 -1
  240. package/dist/types/features/IL-OTJ/_components/NewMinimizedThinkingSteps.d.ts +0 -7
  241. package/dist/types/features/IL-OTJ/_components/NewMinimizedThinkingSteps.d.ts.map +0 -1
  242. package/dist/types/features/IL-OTJ/_components/TooltipComponent.d.ts +0 -8
  243. package/dist/types/features/IL-OTJ/_components/TooltipComponent.d.ts.map +0 -1
  244. package/dist/types/features/IL-OTJ/_components/VariantLoadingOverlay.d.ts +0 -9
  245. package/dist/types/features/IL-OTJ/_components/VariantLoadingOverlay.d.ts.map +0 -1
  246. package/dist/types/features/IL-OTJ/_components/ViewFormUpdateCard.d.ts +0 -3
  247. package/dist/types/features/IL-OTJ/_components/ViewFormUpdateCard.d.ts.map +0 -1
  248. package/dist/types/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.d.ts +0 -3
  249. package/dist/types/features/IL-OTJ/_components/ViewIdentifiedFieldsCard.d.ts.map +0 -1
  250. package/dist/types/features/IL-OTJ/_components/WatchMeWork/AgentStepsView.d.ts +0 -16
  251. package/dist/types/features/IL-OTJ/_components/WatchMeWork/AgentStepsView.d.ts.map +0 -1
  252. package/dist/types/features/IL-OTJ/_components/WatchMeWork/StepDetailView.d.ts +0 -11
  253. package/dist/types/features/IL-OTJ/_components/WatchMeWork/StepDetailView.d.ts.map +0 -1
  254. package/dist/types/features/IL-OTJ/_components/WatchMeWork/Thinkingstepshelper.d.ts +0 -43
  255. package/dist/types/features/IL-OTJ/_components/WatchMeWork/Thinkingstepshelper.d.ts.map +0 -1
  256. package/dist/types/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.d.ts +0 -27
  257. package/dist/types/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.d.ts.map +0 -1
  258. package/dist/types/features/IL-OTJ/_components/WatchMeWork/WorkingIndicator.d.ts +0 -7
  259. package/dist/types/features/IL-OTJ/_components/WatchMeWork/WorkingIndicator.d.ts.map +0 -1
  260. package/dist/types/features/IL-OTJ/_components/_svg/ArrowDown.d.ts +0 -4
  261. package/dist/types/features/IL-OTJ/_components/_svg/ArrowDown.d.ts.map +0 -1
  262. package/dist/types/features/IL-OTJ/_components/_svg/ArrowIconBlue.d.ts +0 -4
  263. package/dist/types/features/IL-OTJ/_components/_svg/ArrowIconBlue.d.ts.map +0 -1
  264. package/dist/types/features/IL-OTJ/_components/_svg/BookIcon.d.ts +0 -4
  265. package/dist/types/features/IL-OTJ/_components/_svg/BookIcon.d.ts.map +0 -1
  266. package/dist/types/features/IL-OTJ/_components/_svg/ButtonCognitiveIcon.d.ts +0 -7
  267. package/dist/types/features/IL-OTJ/_components/_svg/ButtonCognitiveIcon.d.ts.map +0 -1
  268. package/dist/types/features/IL-OTJ/_components/_svg/ChevronDown.d.ts +0 -4
  269. package/dist/types/features/IL-OTJ/_components/_svg/ChevronDown.d.ts.map +0 -1
  270. package/dist/types/features/IL-OTJ/_components/_svg/ChevronIcon.d.ts +0 -7
  271. package/dist/types/features/IL-OTJ/_components/_svg/ChevronIcon.d.ts.map +0 -1
  272. package/dist/types/features/IL-OTJ/_components/_svg/ChevronUp.d.ts +0 -4
  273. package/dist/types/features/IL-OTJ/_components/_svg/ChevronUp.d.ts.map +0 -1
  274. package/dist/types/features/IL-OTJ/_components/_svg/CitationLinkSparkleIcon.d.ts +0 -10
  275. package/dist/types/features/IL-OTJ/_components/_svg/CitationLinkSparkleIcon.d.ts.map +0 -1
  276. package/dist/types/features/IL-OTJ/_components/_svg/CognitiveDecisioning.d.ts +0 -4
  277. package/dist/types/features/IL-OTJ/_components/_svg/CognitiveDecisioning.d.ts.map +0 -1
  278. package/dist/types/features/IL-OTJ/_components/_svg/CompleteIconGreen.d.ts +0 -4
  279. package/dist/types/features/IL-OTJ/_components/_svg/CompleteIconGreen.d.ts.map +0 -1
  280. package/dist/types/features/IL-OTJ/_components/_svg/EditPencilIcon.d.ts +0 -7
  281. package/dist/types/features/IL-OTJ/_components/_svg/EditPencilIcon.d.ts.map +0 -1
  282. package/dist/types/features/IL-OTJ/_components/_svg/GapIcon.d.ts +0 -10
  283. package/dist/types/features/IL-OTJ/_components/_svg/GapIcon.d.ts.map +0 -1
  284. package/dist/types/features/IL-OTJ/_components/_svg/HumanWithBrainIcon.d.ts +0 -9
  285. package/dist/types/features/IL-OTJ/_components/_svg/HumanWithBrainIcon.d.ts.map +0 -1
  286. package/dist/types/features/IL-OTJ/_components/_svg/InfoIcon.d.ts +0 -4
  287. package/dist/types/features/IL-OTJ/_components/_svg/InfoIcon.d.ts.map +0 -1
  288. package/dist/types/features/IL-OTJ/_components/_svg/LeftAndRightArrow.d.ts +0 -4
  289. package/dist/types/features/IL-OTJ/_components/_svg/LeftAndRightArrow.d.ts.map +0 -1
  290. package/dist/types/features/IL-OTJ/_components/_svg/Lightbulb.d.ts +0 -10
  291. package/dist/types/features/IL-OTJ/_components/_svg/Lightbulb.d.ts.map +0 -1
  292. package/dist/types/features/IL-OTJ/_components/_svg/NewChatIcon.d.ts +0 -10
  293. package/dist/types/features/IL-OTJ/_components/_svg/NewChatIcon.d.ts.map +0 -1
  294. package/dist/types/features/IL-OTJ/_components/_svg/PencilEdit.d.ts +0 -9
  295. package/dist/types/features/IL-OTJ/_components/_svg/PencilEdit.d.ts.map +0 -1
  296. package/dist/types/features/IL-OTJ/_components/_svg/RadioButton.d.ts +0 -10
  297. package/dist/types/features/IL-OTJ/_components/_svg/RadioButton.d.ts.map +0 -1
  298. package/dist/types/features/IL-OTJ/_components/_svg/RightSideIcons.d.ts +0 -10
  299. package/dist/types/features/IL-OTJ/_components/_svg/RightSideIcons.d.ts.map +0 -1
  300. package/dist/types/features/IL-OTJ/_components/_svg/ScrollToBottom.d.ts +0 -3
  301. package/dist/types/features/IL-OTJ/_components/_svg/ScrollToBottom.d.ts.map +0 -1
  302. package/dist/types/features/IL-OTJ/_components/_svg/SendButton.d.ts +0 -3
  303. package/dist/types/features/IL-OTJ/_components/_svg/SendButton.d.ts.map +0 -1
  304. package/dist/types/features/IL-OTJ/_components/_svg/SparkleIcon.d.ts +0 -4
  305. package/dist/types/features/IL-OTJ/_components/_svg/SparkleIcon.d.ts.map +0 -1
  306. package/dist/types/features/IL-OTJ/_components/_svg/TickIcon.d.ts +0 -10
  307. package/dist/types/features/IL-OTJ/_components/_svg/TickIcon.d.ts.map +0 -1
  308. package/dist/types/features/IL-OTJ/_components/_svg/UserIcon.d.ts +0 -3
  309. package/dist/types/features/IL-OTJ/_components/_svg/UserIcon.d.ts.map +0 -1
  310. package/dist/types/features/IL-OTJ/_components/_svg/WarningIcon.d.ts +0 -4
  311. package/dist/types/features/IL-OTJ/_components/_svg/WarningIcon.d.ts.map +0 -1
  312. package/dist/types/features/IL-OTJ/_components/_svg/WatchMeWorkIcon.d.ts +0 -4
  313. package/dist/types/features/IL-OTJ/_components/_svg/WatchMeWorkIcon.d.ts.map +0 -1
  314. package/dist/types/features/IL-OTJ/_components/atoms/Button/Button.d.ts +0 -7
  315. package/dist/types/features/IL-OTJ/_components/atoms/Button/Button.d.ts.map +0 -1
  316. package/dist/types/features/IL-OTJ/_components/atoms/Button/index.d.ts +0 -2
  317. package/dist/types/features/IL-OTJ/_components/atoms/Button/index.d.ts.map +0 -1
  318. package/dist/types/features/IL-OTJ/_components/atoms/Dropdown/Dropdown.d.ts +0 -15
  319. package/dist/types/features/IL-OTJ/_components/atoms/Dropdown/Dropdown.d.ts.map +0 -1
  320. package/dist/types/features/IL-OTJ/_components/atoms/Dropdown/index.d.ts +0 -2
  321. package/dist/types/features/IL-OTJ/_components/atoms/Dropdown/index.d.ts.map +0 -1
  322. package/dist/types/features/IL-OTJ/_components/atoms/SkeletonLoader/SkeletonLoader.d.ts +0 -11
  323. package/dist/types/features/IL-OTJ/_components/atoms/SkeletonLoader/SkeletonLoader.d.ts.map +0 -1
  324. package/dist/types/features/IL-OTJ/_components/atoms/Textarea/Textarea.d.ts +0 -27
  325. package/dist/types/features/IL-OTJ/_components/atoms/Textarea/Textarea.d.ts.map +0 -1
  326. package/dist/types/features/IL-OTJ/_components/atoms/Textarea/index.d.ts +0 -2
  327. package/dist/types/features/IL-OTJ/_components/atoms/Textarea/index.d.ts.map +0 -1
  328. package/dist/types/features/IL-OTJ/_components/atoms/Toggle/Toggle.d.ts +0 -9
  329. package/dist/types/features/IL-OTJ/_components/atoms/Toggle/Toggle.d.ts.map +0 -1
  330. package/dist/types/features/IL-OTJ/_components/atoms/Toggle/index.d.ts +0 -2
  331. package/dist/types/features/IL-OTJ/_components/atoms/Toggle/index.d.ts.map +0 -1
  332. package/dist/types/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.d.ts +0 -98
  333. package/dist/types/features/IL-OTJ/_components/cognitiveDecisioningThemeStyles.d.ts.map +0 -1
  334. package/dist/types/features/IL-OTJ/_components/hooks/usePendingEditHighlight.d.ts +0 -5
  335. package/dist/types/features/IL-OTJ/_components/hooks/usePendingEditHighlight.d.ts.map +0 -1
  336. package/dist/types/features/IL-OTJ/_components/hooks/useVariantEditSession.d.ts +0 -66
  337. package/dist/types/features/IL-OTJ/_components/hooks/useVariantEditSession.d.ts.map +0 -1
  338. package/dist/types/features/IL-OTJ/_components/index.d.ts +0 -22
  339. package/dist/types/features/IL-OTJ/_components/index.d.ts.map +0 -1
  340. package/dist/types/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +0 -39
  341. package/dist/types/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +0 -1
  342. package/dist/types/features/IL-OTJ/_components/molecules/Condition/index.d.ts +0 -2
  343. package/dist/types/features/IL-OTJ/_components/molecules/Condition/index.d.ts.map +0 -1
  344. package/dist/types/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.d.ts +0 -19
  345. package/dist/types/features/IL-OTJ/_components/molecules/Sections/SectionWrapper.d.ts.map +0 -1
  346. package/dist/types/features/IL-OTJ/_components/molecules/Sections/index.d.ts +0 -2
  347. package/dist/types/features/IL-OTJ/_components/molecules/Sections/index.d.ts.map +0 -1
  348. package/dist/types/features/IL-OTJ/_components/molecules/SeperationRow/SeparationRow.d.ts +0 -15
  349. package/dist/types/features/IL-OTJ/_components/molecules/SeperationRow/SeparationRow.d.ts.map +0 -1
  350. package/dist/types/features/IL-OTJ/_components/molecules/SeperationRow/index.d.ts +0 -2
  351. package/dist/types/features/IL-OTJ/_components/molecules/SeperationRow/index.d.ts.map +0 -1
  352. package/dist/types/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +0 -3
  353. package/dist/types/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +0 -1
  354. package/dist/types/features/IL-OTJ/_components/organisms/ConditionSection/index.d.ts +0 -2
  355. package/dist/types/features/IL-OTJ/_components/organisms/ConditionSection/index.d.ts.map +0 -1
  356. package/dist/types/features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.d.ts +0 -30
  357. package/dist/types/features/IL-OTJ/_components/organisms/ConfigSection/ConfigSection.d.ts.map +0 -1
  358. package/dist/types/features/IL-OTJ/_components/organisms/ConfigSection/index.d.ts +0 -2
  359. package/dist/types/features/IL-OTJ/_components/organisms/ConfigSection/index.d.ts.map +0 -1
  360. package/dist/types/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.d.ts +0 -17
  361. package/dist/types/features/IL-OTJ/_components/organisms/DropdownSection/DropdownSection.d.ts.map +0 -1
  362. package/dist/types/features/IL-OTJ/_components/organisms/DropdownSection/index.d.ts +0 -2
  363. package/dist/types/features/IL-OTJ/_components/organisms/DropdownSection/index.d.ts.map +0 -1
  364. package/dist/types/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.d.ts +0 -34
  365. package/dist/types/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.d.ts.map +0 -1
  366. package/dist/types/features/IL-OTJ/_components/organisms/ScopeSection/index.d.ts +0 -2
  367. package/dist/types/features/IL-OTJ/_components/organisms/ScopeSection/index.d.ts.map +0 -1
  368. package/dist/types/features/IL-OTJ/_components/organisms/TextSection/TextSection.d.ts +0 -3
  369. package/dist/types/features/IL-OTJ/_components/organisms/TextSection/TextSection.d.ts.map +0 -1
  370. package/dist/types/features/IL-OTJ/_components/organisms/TextSection/index.d.ts +0 -2
  371. package/dist/types/features/IL-OTJ/_components/organisms/TextSection/index.d.ts.map +0 -1
  372. package/dist/types/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.d.ts +0 -73
  373. package/dist/types/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.d.ts.map +0 -1
  374. package/dist/types/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.d.ts +0 -71
  375. package/dist/types/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.d.ts.map +0 -1
  376. package/dist/types/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.d.ts +0 -55
  377. package/dist/types/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.d.ts.map +0 -1
  378. package/dist/types/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts +0 -22
  379. package/dist/types/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +0 -1
  380. package/dist/types/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.d.ts +0 -57
  381. package/dist/types/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.d.ts.map +0 -1
  382. package/dist/types/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts +0 -12
  383. package/dist/types/features/IL-OTJ/_components/templates/SchemaDriven/SchemaDrivenCreateRule.d.ts.map +0 -1
  384. package/dist/types/features/IL-OTJ/_components/templates/TemplatesMap/index.d.ts +0 -2
  385. package/dist/types/features/IL-OTJ/_components/templates/TemplatesMap/index.d.ts.map +0 -1
  386. package/dist/types/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts +0 -12
  387. package/dist/types/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts.map +0 -1
  388. package/dist/types/features/IL-OTJ/_components/templates/Testing/Testing.d.ts +0 -3
  389. package/dist/types/features/IL-OTJ/_components/templates/Testing/Testing.d.ts.map +0 -1
  390. package/dist/types/features/IL-OTJ/_components/templates/Testing/index.d.ts +0 -2
  391. package/dist/types/features/IL-OTJ/_components/templates/Testing/index.d.ts.map +0 -1
  392. package/dist/types/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts +0 -10
  393. package/dist/types/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +0 -1
  394. package/dist/types/features/IL-OTJ/_components/templates/TrafficManager/TrafficManagerTemplate.d.ts +0 -3
  395. package/dist/types/features/IL-OTJ/_components/templates/TrafficManager/TrafficManagerTemplate.d.ts.map +0 -1
  396. package/dist/types/features/IL-OTJ/_components/templates/TrafficManager/index.d.ts +0 -2
  397. package/dist/types/features/IL-OTJ/_components/templates/TrafficManager/index.d.ts.map +0 -1
  398. package/dist/types/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.d.ts +0 -3
  399. package/dist/types/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.d.ts.map +0 -1
  400. package/dist/types/features/IL-OTJ/helpers/index.d.ts +0 -2
  401. package/dist/types/features/IL-OTJ/helpers/index.d.ts.map +0 -1
  402. package/dist/types/features/IL-OTJ/helpers/message-rendering-utils.d.ts +0 -26
  403. package/dist/types/features/IL-OTJ/helpers/message-rendering-utils.d.ts.map +0 -1
  404. package/dist/types/features/IL-OTJ/helpers/utils.d.ts +0 -23
  405. package/dist/types/features/IL-OTJ/helpers/utils.d.ts.map +0 -1
  406. package/dist/types/features/IL-OTJ/store/CitationsContext.d.ts +0 -23
  407. package/dist/types/features/IL-OTJ/store/CitationsContext.d.ts.map +0 -1
  408. package/dist/types/features/IL-OTJ/store/index.d.ts +0 -2
  409. package/dist/types/features/IL-OTJ/store/index.d.ts.map +0 -1
  410. package/dist/types/features/IL-marketplace/components/GuidelineCardMenu.d.ts +0 -34
  411. package/dist/types/features/IL-marketplace/components/GuidelineCardMenu.d.ts.map +0 -1
  412. package/dist/types/features/IL-marketplace/components/GuidelineCart.d.ts +0 -4
  413. package/dist/types/features/IL-marketplace/components/GuidelineCart.d.ts.map +0 -1
  414. package/dist/types/features/IL-marketplace/components/GuidelineCartHeader.d.ts +0 -14
  415. package/dist/types/features/IL-marketplace/components/GuidelineCartHeader.d.ts.map +0 -1
  416. package/dist/types/features/IL-marketplace/components/GuidelineCartItem.d.ts +0 -16
  417. package/dist/types/features/IL-marketplace/components/GuidelineCartItem.d.ts.map +0 -1
  418. package/dist/types/features/IL-marketplace/components/GuidelineConfirmDialog.d.ts +0 -18
  419. package/dist/types/features/IL-marketplace/components/GuidelineConfirmDialog.d.ts.map +0 -1
  420. package/dist/types/features/IL-marketplace/components/GuidelineEmptyState.d.ts +0 -11
  421. package/dist/types/features/IL-marketplace/components/GuidelineEmptyState.d.ts.map +0 -1
  422. package/dist/types/features/IL-marketplace/components/GuidelineFilterPanel.d.ts +0 -9
  423. package/dist/types/features/IL-marketplace/components/GuidelineFilterPanel.d.ts.map +0 -1
  424. package/dist/types/features/IL-marketplace/components/GuidelineHeader.d.ts +0 -4
  425. package/dist/types/features/IL-marketplace/components/GuidelineHeader.d.ts.map +0 -1
  426. package/dist/types/features/IL-marketplace/components/GuidelineIconButton.d.ts +0 -15
  427. package/dist/types/features/IL-marketplace/components/GuidelineIconButton.d.ts.map +0 -1
  428. package/dist/types/features/IL-marketplace/components/GuidelineLandingPage.d.ts +0 -4
  429. package/dist/types/features/IL-marketplace/components/GuidelineLandingPage.d.ts.map +0 -1
  430. package/dist/types/features/IL-marketplace/components/GuidelineLibrary.d.ts +0 -68
  431. package/dist/types/features/IL-marketplace/components/GuidelineLibrary.d.ts.map +0 -1
  432. package/dist/types/features/IL-marketplace/components/GuidelineLibraryCard.d.ts +0 -94
  433. package/dist/types/features/IL-marketplace/components/GuidelineLibraryCard.d.ts.map +0 -1
  434. package/dist/types/features/IL-marketplace/components/GuidelineLibraryContent.d.ts +0 -96
  435. package/dist/types/features/IL-marketplace/components/GuidelineLibraryContent.d.ts.map +0 -1
  436. package/dist/types/features/IL-marketplace/components/GuidelineLibraryTab.d.ts +0 -27
  437. package/dist/types/features/IL-marketplace/components/GuidelineLibraryTab.d.ts.map +0 -1
  438. package/dist/types/features/IL-marketplace/components/GuidelineProceedButton.d.ts +0 -4
  439. package/dist/types/features/IL-marketplace/components/GuidelineProceedButton.d.ts.map +0 -1
  440. package/dist/types/features/IL-marketplace/components/GuidelineSelectButton.d.ts +0 -11
  441. package/dist/types/features/IL-marketplace/components/GuidelineSelectButton.d.ts.map +0 -1
  442. package/dist/types/features/IL-marketplace/components/GuidelineStatusChip.d.ts +0 -10
  443. package/dist/types/features/IL-marketplace/components/GuidelineStatusChip.d.ts.map +0 -1
  444. package/dist/types/features/IL-marketplace/components/GuidelineTooltip.d.ts +0 -10
  445. package/dist/types/features/IL-marketplace/components/GuidelineTooltip.d.ts.map +0 -1
  446. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.d.ts +0 -3
  447. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionBody.d.ts.map +0 -1
  448. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.d.ts +0 -8
  449. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsSelectionFooter.d.ts.map +0 -1
  450. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.d.ts +0 -3
  451. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationBody.d.ts.map +0 -1
  452. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.d.ts +0 -8
  453. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/LearningsValidationFooter.d.ts.map +0 -1
  454. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishDetailsCards.d.ts +0 -24
  455. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishDetailsCards.d.ts.map +0 -1
  456. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.d.ts +0 -8
  457. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishEmptyState.d.ts.map +0 -1
  458. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.d.ts +0 -4
  459. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepBody.d.ts.map +0 -1
  460. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.d.ts +0 -4
  461. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepFooter.d.ts.map +0 -1
  462. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.d.ts +0 -5
  463. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishStepper.d.ts.map +0 -1
  464. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.d.ts +0 -3
  465. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.constants.d.ts.map +0 -1
  466. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.types.d.ts +0 -94
  467. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplace.types.d.ts.map +0 -1
  468. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.d.ts +0 -44
  469. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/PublishToMarketplaceCompnent.d.ts.map +0 -1
  470. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.d.ts +0 -4
  471. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryBody.d.ts.map +0 -1
  472. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.d.ts +0 -14
  473. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/ReleaseSummaryFooter.d.ts.map +0 -1
  474. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.d.ts +0 -4
  475. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsBody.d.ts.map +0 -1
  476. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.d.ts +0 -8
  477. package/dist/types/features/IL-marketplace/components/ILMarketPlacePublish/TemplateDetailsFooter.d.ts.map +0 -1
  478. package/dist/types/features/IL-marketplace/components/LearningManagementWrapper.d.ts +0 -31
  479. package/dist/types/features/IL-marketplace/components/LearningManagementWrapper.d.ts.map +0 -1
  480. package/dist/types/features/IL-marketplace/components/VersionSelectDropdown.d.ts +0 -13
  481. package/dist/types/features/IL-marketplace/components/VersionSelectDropdown.d.ts.map +0 -1
  482. package/dist/types/features/IL-marketplace/constants.d.ts +0 -183
  483. package/dist/types/features/IL-marketplace/constants.d.ts.map +0 -1
  484. package/dist/types/features/IL-marketplace/hooks/useControllableState.d.ts +0 -8
  485. package/dist/types/features/IL-marketplace/hooks/useControllableState.d.ts.map +0 -1
  486. package/dist/types/features/IL-marketplace/hooks/useDeleteGuidelineMutation.d.ts +0 -10
  487. package/dist/types/features/IL-marketplace/hooks/useDeleteGuidelineMutation.d.ts.map +0 -1
  488. package/dist/types/features/IL-marketplace/hooks/useGuidelineSelection.d.ts +0 -17
  489. package/dist/types/features/IL-marketplace/hooks/useGuidelineSelection.d.ts.map +0 -1
  490. package/dist/types/features/IL-marketplace/hooks/useGuidelineWorkspaceLegacyBridge.d.ts +0 -6
  491. package/dist/types/features/IL-marketplace/hooks/useGuidelineWorkspaceLegacyBridge.d.ts.map +0 -1
  492. package/dist/types/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.d.ts +0 -4
  493. package/dist/types/features/IL-marketplace/hooks/useMarketplaceApprovalStatus.d.ts.map +0 -1
  494. package/dist/types/features/IL-marketplace/hooks/useMarketplacePublishILKBData.d.ts +0 -29
  495. package/dist/types/features/IL-marketplace/hooks/useMarketplacePublishILKBData.d.ts.map +0 -1
  496. package/dist/types/features/IL-marketplace/hooks/usePublishingFlowConfig.d.ts +0 -17
  497. package/dist/types/features/IL-marketplace/hooks/usePublishingFlowConfig.d.ts.map +0 -1
  498. package/dist/types/features/IL-marketplace/icons/GuidelineSpinner.d.ts +0 -7
  499. package/dist/types/features/IL-marketplace/icons/GuidelineSpinner.d.ts.map +0 -1
  500. package/dist/types/features/IL-marketplace/index.d.ts +0 -42
  501. package/dist/types/features/IL-marketplace/index.d.ts.map +0 -1
  502. package/dist/types/features/IL-marketplace/marketplaceTheme.d.ts +0 -99
  503. package/dist/types/features/IL-marketplace/marketplaceTheme.d.ts.map +0 -1
  504. package/dist/types/features/IL-marketplace/queryClient.d.ts +0 -3
  505. package/dist/types/features/IL-marketplace/queryClient.d.ts.map +0 -1
  506. package/dist/types/features/IL-marketplace/services/IL-marketplace.api.d.ts +0 -156
  507. package/dist/types/features/IL-marketplace/services/IL-marketplace.api.d.ts.map +0 -1
  508. package/dist/types/features/IL-marketplace/services/guideline.api.d.ts +0 -2
  509. package/dist/types/features/IL-marketplace/services/guideline.api.d.ts.map +0 -1
  510. package/dist/types/features/IL-marketplace/services/guideline.cart.api.d.ts +0 -28
  511. package/dist/types/features/IL-marketplace/services/guideline.cart.api.d.ts.map +0 -1
  512. package/dist/types/features/IL-marketplace/services/guideline.chat.d.ts +0 -2
  513. package/dist/types/features/IL-marketplace/services/guideline.chat.d.ts.map +0 -1
  514. package/dist/types/features/IL-marketplace/services/guideline.content.d.ts +0 -2
  515. package/dist/types/features/IL-marketplace/services/guideline.content.d.ts.map +0 -1
  516. package/dist/types/features/IL-marketplace/services/guideline.core.api.d.ts +0 -51
  517. package/dist/types/features/IL-marketplace/services/guideline.core.api.d.ts.map +0 -1
  518. package/dist/types/features/IL-marketplace/services/guideline.runtime.config.d.ts +0 -47
  519. package/dist/types/features/IL-marketplace/services/guideline.runtime.config.d.ts.map +0 -1
  520. package/dist/types/features/IL-marketplace/services/guideline.session.d.ts +0 -10
  521. package/dist/types/features/IL-marketplace/services/guideline.session.d.ts.map +0 -1
  522. package/dist/types/features/IL-marketplace/services/instant-learning.api.d.ts +0 -112
  523. package/dist/types/features/IL-marketplace/services/instant-learning.api.d.ts.map +0 -1
  524. package/dist/types/features/IL-marketplace/services/instant-learning.wishlist.d.ts +0 -8
  525. package/dist/types/features/IL-marketplace/services/instant-learning.wishlist.d.ts.map +0 -1
  526. package/dist/types/features/IL-marketplace/store/usePublishTemplateStore.d.ts +0 -14
  527. package/dist/types/features/IL-marketplace/store/usePublishTemplateStore.d.ts.map +0 -1
  528. package/dist/types/features/IL-marketplace/store/usePublishingFlowConfigStore.d.ts +0 -132
  529. package/dist/types/features/IL-marketplace/store/usePublishingFlowConfigStore.d.ts.map +0 -1
  530. package/dist/types/features/IL-marketplace/types/add-context.types.d.ts +0 -40
  531. package/dist/types/features/IL-marketplace/types/add-context.types.d.ts.map +0 -1
  532. package/dist/types/features/IL-marketplace/types/api.types.d.ts +0 -116
  533. package/dist/types/features/IL-marketplace/types/api.types.d.ts.map +0 -1
  534. package/dist/types/features/IL-marketplace/types/file-item.d.ts +0 -60
  535. package/dist/types/features/IL-marketplace/types/file-item.d.ts.map +0 -1
  536. package/dist/types/features/IL-marketplace/types/guideline.api.types.d.ts +0 -11
  537. package/dist/types/features/IL-marketplace/types/guideline.api.types.d.ts.map +0 -1
  538. package/dist/types/features/IL-marketplace/types/guideline.types.d.ts +0 -42
  539. package/dist/types/features/IL-marketplace/types/guideline.types.d.ts.map +0 -1
  540. package/dist/types/features/IL-marketplace/types.d.ts +0 -443
  541. package/dist/types/features/IL-marketplace/types.d.ts.map +0 -1
  542. package/dist/types/features/IL-marketplace/utils/addContextHelpers.d.ts +0 -7
  543. package/dist/types/features/IL-marketplace/utils/addContextHelpers.d.ts.map +0 -1
  544. package/dist/types/features/IL-marketplace/utils/cn.d.ts +0 -3
  545. package/dist/types/features/IL-marketplace/utils/cn.d.ts.map +0 -1
  546. package/dist/types/features/IL-marketplace/utils/guidelineFiles.d.ts +0 -17
  547. package/dist/types/features/IL-marketplace/utils/guidelineFiles.d.ts.map +0 -1
  548. package/dist/types/features/IL-marketplace/utils/guidelineOverlay.d.ts +0 -3
  549. package/dist/types/features/IL-marketplace/utils/guidelineOverlay.d.ts.map +0 -1
  550. package/dist/types/features/IL-marketplace/utils/guidelineSort.d.ts +0 -3
  551. package/dist/types/features/IL-marketplace/utils/guidelineSort.d.ts.map +0 -1
  552. package/dist/types/features/IL-marketplace/utils/microfrontend.d.ts +0 -23
  553. package/dist/types/features/IL-marketplace/utils/microfrontend.d.ts.map +0 -1
  554. package/dist/types/features/IL-marketplace/utils/publishingFlow.d.ts +0 -35
  555. package/dist/types/features/IL-marketplace/utils/publishingFlow.d.ts.map +0 -1
  556. package/dist/types/features/IL-marketplace/utils/session.d.ts +0 -4
  557. package/dist/types/features/IL-marketplace/utils/session.d.ts.map +0 -1
  558. package/dist/types/features/IL-marketplace/utils/url.d.ts +0 -2
  559. package/dist/types/features/IL-marketplace/utils/url.d.ts.map +0 -1
  560. package/dist/types/features/IL-marketplace/utils.d.ts +0 -75
  561. package/dist/types/features/IL-marketplace/utils.d.ts.map +0 -1
  562. package/dist/types/features/IL-marketplace/workspace/useGuidelineWorkspace.d.ts +0 -44
  563. package/dist/types/features/IL-marketplace/workspace/useGuidelineWorkspace.d.ts.map +0 -1
  564. package/dist/types/features/IL-marketplace/workspace/workspace.context.d.ts +0 -9
  565. package/dist/types/features/IL-marketplace/workspace/workspace.context.d.ts.map +0 -1
  566. package/dist/types/features/IL-marketplace/workspace/workspace.runtime.d.ts +0 -12
  567. package/dist/types/features/IL-marketplace/workspace/workspace.runtime.d.ts.map +0 -1
  568. package/dist/types/features/IL-marketplace/workspace/workspace.selectors.d.ts +0 -5
  569. package/dist/types/features/IL-marketplace/workspace/workspace.selectors.d.ts.map +0 -1
  570. package/dist/types/features/IL-marketplace/workspace/workspace.types.d.ts +0 -89
  571. package/dist/types/features/IL-marketplace/workspace/workspace.types.d.ts.map +0 -1
  572. package/dist/types/features/InstantLearning/InstantLearning.d.ts +0 -118
  573. package/dist/types/features/InstantLearning/InstantLearning.d.ts.map +0 -1
  574. package/dist/types/features/InstantLearning/_components/AudioWaveform.d.ts +0 -13
  575. package/dist/types/features/InstantLearning/_components/AudioWaveform.d.ts.map +0 -1
  576. package/dist/types/features/InstantLearning/_components/ChatComponent.d.ts +0 -58
  577. package/dist/types/features/InstantLearning/_components/ChatComponent.d.ts.map +0 -1
  578. package/dist/types/features/InstantLearning/_components/ConflictingLearningWarnCard.d.ts +0 -13
  579. package/dist/types/features/InstantLearning/_components/ConflictingLearningWarnCard.d.ts.map +0 -1
  580. package/dist/types/features/InstantLearning/_components/ConflictingLearningWarnCardDB.d.ts +0 -41
  581. package/dist/types/features/InstantLearning/_components/ConflictingLearningWarnCardDB.d.ts.map +0 -1
  582. package/dist/types/features/InstantLearning/_components/ContextualChatComponent.d.ts +0 -64
  583. package/dist/types/features/InstantLearning/_components/ContextualChatComponent.d.ts.map +0 -1
  584. package/dist/types/features/InstantLearning/_components/ContextualConflictDBCard.d.ts +0 -32
  585. package/dist/types/features/InstantLearning/_components/ContextualConflictDBCard.d.ts.map +0 -1
  586. package/dist/types/features/InstantLearning/_components/ContextualLearningForm.d.ts +0 -45
  587. package/dist/types/features/InstantLearning/_components/ContextualLearningForm.d.ts.map +0 -1
  588. package/dist/types/features/InstantLearning/_components/DebuggerPanel.d.ts +0 -16
  589. package/dist/types/features/InstantLearning/_components/DebuggerPanel.d.ts.map +0 -1
  590. package/dist/types/features/InstantLearning/_components/GeneralizationAccordion.d.ts +0 -28
  591. package/dist/types/features/InstantLearning/_components/GeneralizationAccordion.d.ts.map +0 -1
  592. package/dist/types/features/InstantLearning/_components/LearningDetailsForm.d.ts +0 -74
  593. package/dist/types/features/InstantLearning/_components/LearningDetailsForm.d.ts.map +0 -1
  594. package/dist/types/features/InstantLearning/_components/MessageRendering.d.ts +0 -10
  595. package/dist/types/features/InstantLearning/_components/MessageRendering.d.ts.map +0 -1
  596. package/dist/types/features/InstantLearning/_components/MinimizedThinkingSteps.d.ts +0 -4
  597. package/dist/types/features/InstantLearning/_components/MinimizedThinkingSteps.d.ts.map +0 -1
  598. package/dist/types/features/InstantLearning/_components/SimilarLearningCard.d.ts +0 -20
  599. package/dist/types/features/InstantLearning/_components/SimilarLearningCard.d.ts.map +0 -1
  600. package/dist/types/features/InstantLearning/_components/TemplateRetrievalForm.d.ts +0 -50
  601. package/dist/types/features/InstantLearning/_components/TemplateRetrievalForm.d.ts.map +0 -1
  602. package/dist/types/features/InstantLearning/_components/TooltipComponent.d.ts +0 -8
  603. package/dist/types/features/InstantLearning/_components/TooltipComponent.d.ts.map +0 -1
  604. package/dist/types/features/InstantLearning/_components/_svg/ArrowDown.d.ts +0 -4
  605. package/dist/types/features/InstantLearning/_components/_svg/ArrowDown.d.ts.map +0 -1
  606. package/dist/types/features/InstantLearning/_components/_svg/ArrowIconBlue.d.ts +0 -4
  607. package/dist/types/features/InstantLearning/_components/_svg/ArrowIconBlue.d.ts.map +0 -1
  608. package/dist/types/features/InstantLearning/_components/_svg/CompleteIconGreen.d.ts +0 -4
  609. package/dist/types/features/InstantLearning/_components/_svg/CompleteIconGreen.d.ts.map +0 -1
  610. package/dist/types/features/InstantLearning/_components/_svg/NewChatIcon.d.ts +0 -4
  611. package/dist/types/features/InstantLearning/_components/_svg/NewChatIcon.d.ts.map +0 -1
  612. package/dist/types/features/LearningManagement/AuditLog/AuditLog.d.ts +0 -11
  613. package/dist/types/features/LearningManagement/AuditLog/AuditLog.d.ts.map +0 -1
  614. package/dist/types/features/LearningManagement/AuditLog/ChangeLogDiff.d.ts +0 -15
  615. package/dist/types/features/LearningManagement/AuditLog/ChangeLogDiff.d.ts.map +0 -1
  616. package/dist/types/features/LearningManagement/LearningManagement.d.ts +0 -67
  617. package/dist/types/features/LearningManagement/LearningManagement.d.ts.map +0 -1
  618. package/dist/types/features/LearningManagement/LearningManagementTest.d.ts +0 -4
  619. package/dist/types/features/LearningManagement/LearningManagementTest.d.ts.map +0 -1
  620. package/dist/types/features/LearningManagement/LearningTemplateLayout.d.ts +0 -41
  621. package/dist/types/features/LearningManagement/LearningTemplateLayout.d.ts.map +0 -1
  622. package/dist/types/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +0 -8
  623. package/dist/types/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +0 -1
  624. package/dist/types/features/LearningManagement/RBAC/AccessPanel.d.ts +0 -12
  625. package/dist/types/features/LearningManagement/RBAC/AccessPanel.d.ts.map +0 -1
  626. package/dist/types/features/LearningManagement/RBAC/index.d.ts +0 -4
  627. package/dist/types/features/LearningManagement/RBAC/index.d.ts.map +0 -1
  628. package/dist/types/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts +0 -12
  629. package/dist/types/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts.map +0 -1
  630. package/dist/types/features/LearningManagement/RuleContent/AddScopeModal.d.ts +0 -19
  631. package/dist/types/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +0 -1
  632. package/dist/types/features/LearningManagement/RuleContent/ApprovalActionButton.d.ts +0 -8
  633. package/dist/types/features/LearningManagement/RuleContent/ApprovalActionButton.d.ts.map +0 -1
  634. package/dist/types/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts +0 -18
  635. package/dist/types/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts.map +0 -1
  636. package/dist/types/features/LearningManagement/RuleContent/ContentLogic.d.ts +0 -44
  637. package/dist/types/features/LearningManagement/RuleContent/ContentLogic.d.ts.map +0 -1
  638. package/dist/types/features/LearningManagement/RuleContent/HistorySkeleton.d.ts +0 -10
  639. package/dist/types/features/LearningManagement/RuleContent/HistorySkeleton.d.ts.map +0 -1
  640. package/dist/types/features/LearningManagement/RuleContent/InheritanceBreadcrumb.d.ts +0 -22
  641. package/dist/types/features/LearningManagement/RuleContent/InheritanceBreadcrumb.d.ts.map +0 -1
  642. package/dist/types/features/LearningManagement/RuleContent/InstructionPromptBlock.d.ts +0 -27
  643. package/dist/types/features/LearningManagement/RuleContent/InstructionPromptBlock.d.ts.map +0 -1
  644. package/dist/types/features/LearningManagement/RuleContent/OverrideTimeline.d.ts +0 -23
  645. package/dist/types/features/LearningManagement/RuleContent/OverrideTimeline.d.ts.map +0 -1
  646. package/dist/types/features/LearningManagement/RuleContent/PendingApprovalChip.d.ts +0 -7
  647. package/dist/types/features/LearningManagement/RuleContent/PendingApprovalChip.d.ts.map +0 -1
  648. package/dist/types/features/LearningManagement/RuleContent/RenameScopeModal.d.ts +0 -10
  649. package/dist/types/features/LearningManagement/RuleContent/RenameScopeModal.d.ts.map +0 -1
  650. package/dist/types/features/LearningManagement/RuleContent/RuleAccordion.d.ts +0 -131
  651. package/dist/types/features/LearningManagement/RuleContent/RuleAccordion.d.ts.map +0 -1
  652. package/dist/types/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts +0 -47
  653. package/dist/types/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts.map +0 -1
  654. package/dist/types/features/LearningManagement/RuleContent/RuleAccordionShell.d.ts +0 -69
  655. package/dist/types/features/LearningManagement/RuleContent/RuleAccordionShell.d.ts.map +0 -1
  656. package/dist/types/features/LearningManagement/RuleContent/RuleConditionBlock.d.ts +0 -39
  657. package/dist/types/features/LearningManagement/RuleContent/RuleConditionBlock.d.ts.map +0 -1
  658. package/dist/types/features/LearningManagement/RuleContent/RuleContent.d.ts +0 -49
  659. package/dist/types/features/LearningManagement/RuleContent/RuleContent.d.ts.map +0 -1
  660. package/dist/types/features/LearningManagement/RuleContent/RuleHeader.d.ts +0 -41
  661. package/dist/types/features/LearningManagement/RuleContent/RuleHeader.d.ts.map +0 -1
  662. package/dist/types/features/LearningManagement/RuleContent/RuleTierList.d.ts +0 -51
  663. package/dist/types/features/LearningManagement/RuleContent/RuleTierList.d.ts.map +0 -1
  664. package/dist/types/features/LearningManagement/RuleContent/TierCard.d.ts +0 -60
  665. package/dist/types/features/LearningManagement/RuleContent/TierCard.d.ts.map +0 -1
  666. package/dist/types/features/LearningManagement/RuleContent/VariantCard.d.ts +0 -109
  667. package/dist/types/features/LearningManagement/RuleContent/VariantCard.d.ts.map +0 -1
  668. package/dist/types/features/LearningManagement/RuleContent/VariantList.d.ts +0 -106
  669. package/dist/types/features/LearningManagement/RuleContent/VariantList.d.ts.map +0 -1
  670. package/dist/types/features/LearningManagement/ScopeSelector.d.ts +0 -45
  671. package/dist/types/features/LearningManagement/ScopeSelector.d.ts.map +0 -1
  672. package/dist/types/features/LearningManagement/Sidebar.d.ts +0 -37
  673. package/dist/types/features/LearningManagement/Sidebar.d.ts.map +0 -1
  674. package/dist/types/features/LearningManagement/SidebarWrapper.d.ts +0 -34
  675. package/dist/types/features/LearningManagement/SidebarWrapper.d.ts.map +0 -1
  676. package/dist/types/features/LearningManagement/StationsContent/StationsContent.d.ts +0 -17
  677. package/dist/types/features/LearningManagement/StationsContent/StationsContent.d.ts.map +0 -1
  678. package/dist/types/features/LearningManagement/apis/apiConfig.d.ts +0 -54
  679. package/dist/types/features/LearningManagement/apis/apiConfig.d.ts.map +0 -1
  680. package/dist/types/features/LearningManagement/apis/scopeApis.d.ts +0 -388
  681. package/dist/types/features/LearningManagement/apis/scopeApis.d.ts.map +0 -1
  682. package/dist/types/features/LearningManagement/components/CardSkeleton.d.ts +0 -8
  683. package/dist/types/features/LearningManagement/components/CardSkeleton.d.ts.map +0 -1
  684. package/dist/types/features/LearningManagement/components/ConfirmationModal.d.ts +0 -22
  685. package/dist/types/features/LearningManagement/components/ConfirmationModal.d.ts.map +0 -1
  686. package/dist/types/features/LearningManagement/components/CreateLearningSetModal.d.ts +0 -20
  687. package/dist/types/features/LearningManagement/components/CreateLearningSetModal.d.ts.map +0 -1
  688. package/dist/types/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts +0 -12
  689. package/dist/types/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts.map +0 -1
  690. package/dist/types/features/LearningManagement/components/CustomTooltip.d.ts +0 -16
  691. package/dist/types/features/LearningManagement/components/CustomTooltip.d.ts.map +0 -1
  692. package/dist/types/features/LearningManagement/components/EmptyLearningState.d.ts +0 -42
  693. package/dist/types/features/LearningManagement/components/EmptyLearningState.d.ts.map +0 -1
  694. package/dist/types/features/LearningManagement/components/ErrorStateDisplay.d.ts +0 -25
  695. package/dist/types/features/LearningManagement/components/ErrorStateDisplay.d.ts.map +0 -1
  696. package/dist/types/features/LearningManagement/components/InstantLearningModal.d.ts +0 -41
  697. package/dist/types/features/LearningManagement/components/InstantLearningModal.d.ts.map +0 -1
  698. package/dist/types/features/LearningManagement/components/InstantLearningModalDynamic.d.ts +0 -62
  699. package/dist/types/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +0 -1
  700. package/dist/types/features/LearningManagement/components/LearningTemplateManagementSkeleton.d.ts +0 -8
  701. package/dist/types/features/LearningManagement/components/LearningTemplateManagementSkeleton.d.ts.map +0 -1
  702. package/dist/types/features/LearningManagement/components/PromptTextEditor.d.ts +0 -44
  703. package/dist/types/features/LearningManagement/components/PromptTextEditor.d.ts.map +0 -1
  704. package/dist/types/features/LearningManagement/components/RuleContentSkeleton.d.ts +0 -8
  705. package/dist/types/features/LearningManagement/components/RuleContentSkeleton.d.ts.map +0 -1
  706. package/dist/types/features/LearningManagement/components/ScopeSkeletonLoader.d.ts +0 -36
  707. package/dist/types/features/LearningManagement/components/ScopeSkeletonLoader.d.ts.map +0 -1
  708. package/dist/types/features/LearningManagement/components/ScopeTree/HighlightedText.d.ts +0 -8
  709. package/dist/types/features/LearningManagement/components/ScopeTree/HighlightedText.d.ts.map +0 -1
  710. package/dist/types/features/LearningManagement/components/ScopeTree/TreeAddAction.d.ts +0 -10
  711. package/dist/types/features/LearningManagement/components/ScopeTree/TreeAddAction.d.ts.map +0 -1
  712. package/dist/types/features/LearningManagement/components/ScopeTree/TreeMenu.d.ts +0 -17
  713. package/dist/types/features/LearningManagement/components/ScopeTree/TreeMenu.d.ts.map +0 -1
  714. package/dist/types/features/LearningManagement/components/ScopeTree/TreeNode.d.ts +0 -38
  715. package/dist/types/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +0 -1
  716. package/dist/types/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts +0 -22
  717. package/dist/types/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map +0 -1
  718. package/dist/types/features/LearningManagement/components/ScopeTree/TreeSectionItem.d.ts +0 -16
  719. package/dist/types/features/LearningManagement/components/ScopeTree/TreeSectionItem.d.ts.map +0 -1
  720. package/dist/types/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts +0 -23
  721. package/dist/types/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts.map +0 -1
  722. package/dist/types/features/LearningManagement/components/ScopeTree/TreeTooltip.d.ts +0 -10
  723. package/dist/types/features/LearningManagement/components/ScopeTree/TreeTooltip.d.ts.map +0 -1
  724. package/dist/types/features/LearningManagement/components/SidebarSearch.d.ts +0 -25
  725. package/dist/types/features/LearningManagement/components/SidebarSearch.d.ts.map +0 -1
  726. package/dist/types/features/LearningManagement/components/Skeleton.d.ts +0 -12
  727. package/dist/types/features/LearningManagement/components/Skeleton.d.ts.map +0 -1
  728. package/dist/types/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts +0 -13
  729. package/dist/types/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts.map +0 -1
  730. package/dist/types/features/LearningManagement/components/StationOnboarding/InputField.d.ts +0 -27
  731. package/dist/types/features/LearningManagement/components/StationOnboarding/InputField.d.ts.map +0 -1
  732. package/dist/types/features/LearningManagement/components/StationOnboarding/OnboardingLoader.d.ts +0 -19
  733. package/dist/types/features/LearningManagement/components/StationOnboarding/OnboardingLoader.d.ts.map +0 -1
  734. package/dist/types/features/LearningManagement/components/StationOnboarding/StationAutocomplete.d.ts +0 -15
  735. package/dist/types/features/LearningManagement/components/StationOnboarding/StationAutocomplete.d.ts.map +0 -1
  736. package/dist/types/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts +0 -16
  737. package/dist/types/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +0 -1
  738. package/dist/types/features/LearningManagement/components/StationOnboarding/TemplateCard.d.ts +0 -22
  739. package/dist/types/features/LearningManagement/components/StationOnboarding/TemplateCard.d.ts.map +0 -1
  740. package/dist/types/features/LearningManagement/components/ToolTip.d.ts +0 -8
  741. package/dist/types/features/LearningManagement/components/ToolTip.d.ts.map +0 -1
  742. package/dist/types/features/LearningManagement/config.d.ts +0 -64
  743. package/dist/types/features/LearningManagement/config.d.ts.map +0 -1
  744. package/dist/types/features/LearningManagement/constants.d.ts +0 -19
  745. package/dist/types/features/LearningManagement/constants.d.ts.map +0 -1
  746. package/dist/types/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +0 -62
  747. package/dist/types/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +0 -1
  748. package/dist/types/features/LearningManagement/queries/useApprovalQueries.d.ts +0 -20
  749. package/dist/types/features/LearningManagement/queries/useApprovalQueries.d.ts.map +0 -1
  750. package/dist/types/features/LearningManagement/queries/useLMSConfigQuery.d.ts +0 -9
  751. package/dist/types/features/LearningManagement/queries/useLMSConfigQuery.d.ts.map +0 -1
  752. package/dist/types/features/LearningManagement/shared/ErrorToastContent.d.ts +0 -22
  753. package/dist/types/features/LearningManagement/shared/ErrorToastContent.d.ts.map +0 -1
  754. package/dist/types/features/LearningManagement/shared/SuccessToastContent.d.ts +0 -22
  755. package/dist/types/features/LearningManagement/shared/SuccessToastContent.d.ts.map +0 -1
  756. package/dist/types/features/LearningManagement/shared/index.d.ts +0 -7
  757. package/dist/types/features/LearningManagement/shared/index.d.ts.map +0 -1
  758. package/dist/types/features/LearningManagement/store/types.d.ts +0 -32
  759. package/dist/types/features/LearningManagement/store/types.d.ts.map +0 -1
  760. package/dist/types/features/LearningManagement/store/useAppSecRolesStore.d.ts +0 -11
  761. package/dist/types/features/LearningManagement/store/useAppSecRolesStore.d.ts.map +0 -1
  762. package/dist/types/features/LearningManagement/store/useAuthStore.d.ts +0 -12
  763. package/dist/types/features/LearningManagement/store/useAuthStore.d.ts.map +0 -1
  764. package/dist/types/features/LearningManagement/store/useConfigStore.d.ts +0 -18
  765. package/dist/types/features/LearningManagement/store/useConfigStore.d.ts.map +0 -1
  766. package/dist/types/features/LearningManagement/store/useEnvStore.d.ts +0 -36
  767. package/dist/types/features/LearningManagement/store/useEnvStore.d.ts.map +0 -1
  768. package/dist/types/features/LearningManagement/store/useExternalWorkflowStore.d.ts +0 -38
  769. package/dist/types/features/LearningManagement/store/useExternalWorkflowStore.d.ts.map +0 -1
  770. package/dist/types/features/LearningManagement/store/useLMSConfigStore.d.ts +0 -388
  771. package/dist/types/features/LearningManagement/store/useLMSConfigStore.d.ts.map +0 -1
  772. package/dist/types/features/LearningManagement/store/useLearningTemplateStore.d.ts +0 -84
  773. package/dist/types/features/LearningManagement/store/useLearningTemplateStore.d.ts.map +0 -1
  774. package/dist/types/features/LearningManagement/store/usePermissionsStore.d.ts +0 -35
  775. package/dist/types/features/LearningManagement/store/usePermissionsStore.d.ts.map +0 -1
  776. package/dist/types/features/LearningManagement/types.d.ts +0 -288
  777. package/dist/types/features/LearningManagement/types.d.ts.map +0 -1
  778. package/dist/types/features/LearningManagement/utils/learningMetadataUtils.d.ts +0 -17
  779. package/dist/types/features/LearningManagement/utils/learningMetadataUtils.d.ts.map +0 -1
  780. package/dist/types/features/LearningManagement/utils/treeUtils.d.ts +0 -18
  781. package/dist/types/features/LearningManagement/utils/treeUtils.d.ts.map +0 -1
  782. package/dist/types/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDrive.d.ts +0 -4
  783. package/dist/types/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDrive.d.ts.map +0 -1
  784. package/dist/types/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDriveButton.d.ts +0 -10
  785. package/dist/types/features/UploadData/Components/SelectDataFromGoogleDrive/SelectDataFromGoogleDriveButton.d.ts.map +0 -1
  786. package/dist/types/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystem.d.ts +0 -4
  787. package/dist/types/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystem.d.ts.map +0 -1
  788. package/dist/types/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystemButton.d.ts +0 -10
  789. package/dist/types/features/UploadData/Components/SelectDataFromLocalSystem/SelectDataFromLocalSystemButton.d.ts.map +0 -1
  790. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/Dataset-collection.d.ts +0 -13
  791. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/Dataset-collection.d.ts.map +0 -1
  792. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/DatasetCollectionInfo.d.ts +0 -4
  793. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/DatasetCollectionInfo.d.ts.map +0 -1
  794. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/ProjectTaskSelect.d.ts +0 -4
  795. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/ProjectTaskSelect.d.ts.map +0 -1
  796. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/Tooltip.d.ts +0 -10
  797. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/Tooltip.d.ts.map +0 -1
  798. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/ConfidenceScoreColumnMenu.d.ts +0 -22
  799. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/ConfidenceScoreColumnMenu.d.ts.map +0 -1
  800. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/FilterHandlerUtility.d.ts +0 -33
  801. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/FilterHandlerUtility.d.ts.map +0 -1
  802. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/LabelColumnMenu.d.ts +0 -20
  803. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/LabelColumnMenu.d.ts.map +0 -1
  804. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/TableColumnResetFilterButton.d.ts +0 -7
  805. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/TableColumnResetFilterButton.d.ts.map +0 -1
  806. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/TagColumnMenu.d.ts +0 -18
  807. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dataset-collectionFilterColumnMenuComponents/TagColumnMenu.d.ts.map +0 -1
  808. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dropdown-with-radio.d.ts +0 -26
  809. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/dropdown-with-radio.d.ts.map +0 -1
  810. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/input-label-with-info.d.ts +0 -4
  811. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/Components/input-label-with-info.d.ts.map +0 -1
  812. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/RELFInterfaces.d.ts +0 -3
  813. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/RELFInterfaces.d.ts.map +0 -1
  814. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEF.d.ts +0 -4
  815. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEF.d.ts.map +0 -1
  816. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEFButton.d.ts +0 -10
  817. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/SelectDataFromRLEFButton.d.ts.map +0 -1
  818. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/collections.d.ts +0 -1108
  819. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/collections.d.ts.map +0 -1
  820. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/common.d.ts +0 -57
  821. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/common.d.ts.map +0 -1
  822. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/data.d.ts +0 -643
  823. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/data.d.ts.map +0 -1
  824. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/modelGroup.type.d.ts +0 -24
  825. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/modelGroup.type.d.ts.map +0 -1
  826. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/models.d.ts +0 -283
  827. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/models.d.ts.map +0 -1
  828. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/projects.d.ts +0 -58
  829. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/projects.d.ts.map +0 -1
  830. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/tags.d.ts +0 -20
  831. package/dist/types/features/UploadData/Components/SelectDataFromRLEF/interfaces/tags.d.ts.map +0 -1
  832. package/dist/types/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSet.d.ts +0 -4
  833. package/dist/types/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSet.d.ts.map +0 -1
  834. package/dist/types/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSetButton.d.ts +0 -4
  835. package/dist/types/features/UploadData/Components/SelectDataFromSavedDataSet/SelectDataFromSavedDataSetButton.d.ts.map +0 -1
  836. package/dist/types/features/UploadData/NotFound.d.ts +0 -4
  837. package/dist/types/features/UploadData/NotFound.d.ts.map +0 -1
  838. package/dist/types/features/UploadData/main.d.ts +0 -10
  839. package/dist/types/features/UploadData/main.d.ts.map +0 -1
  840. package/dist/types/features/WtaWnta/WtaWnta.d.ts +0 -55
  841. package/dist/types/features/WtaWnta/WtaWnta.d.ts.map +0 -1
  842. package/dist/types/features/WtaWnta/_components/AgentDetailsForm.d.ts +0 -43
  843. package/dist/types/features/WtaWnta/_components/AgentDetailsForm.d.ts.map +0 -1
  844. package/dist/types/features/WtaWnta/_components/SimilarConflictingCard.d.ts +0 -18
  845. package/dist/types/features/WtaWnta/_components/SimilarConflictingCard.d.ts.map +0 -1
  846. package/dist/types/features/WtaWnta/_components/ValidationCard.d.ts +0 -30
  847. package/dist/types/features/WtaWnta/_components/ValidationCard.d.ts.map +0 -1
  848. package/dist/types/hooks/useAgentFix.d.ts +0 -15
  849. package/dist/types/hooks/useAgentFix.d.ts.map +0 -1
  850. package/dist/types/hooks/useAgentSuggestions.d.ts +0 -20
  851. package/dist/types/hooks/useAgentSuggestions.d.ts.map +0 -1
  852. package/dist/types/hooks/useAgentValidation.d.ts +0 -17
  853. package/dist/types/hooks/useAgentValidation.d.ts.map +0 -1
  854. package/dist/types/hooks/useDebounce copy.d.ts +0 -2
  855. package/dist/types/hooks/useDebounce copy.d.ts.map +0 -1
  856. package/dist/types/hooks/useDebounce.d.ts +0 -2
  857. package/dist/types/hooks/useDebounce.d.ts.map +0 -1
  858. package/dist/types/hooks/useExistingAgentCheck.d.ts +0 -28
  859. package/dist/types/hooks/useExistingAgentCheck.d.ts.map +0 -1
  860. package/dist/types/hooks/useExistingPromptCheck.d.ts +0 -36
  861. package/dist/types/hooks/useExistingPromptCheck.d.ts.map +0 -1
  862. package/dist/types/hooks/usePromptFix.d.ts +0 -14
  863. package/dist/types/hooks/usePromptFix.d.ts.map +0 -1
  864. package/dist/types/hooks/usePromptSuggestions.d.ts +0 -8
  865. package/dist/types/hooks/usePromptSuggestions.d.ts.map +0 -1
  866. package/dist/types/hooks/usePromptValidation.d.ts +0 -18
  867. package/dist/types/hooks/usePromptValidation.d.ts.map +0 -1
  868. package/dist/types/hooks/useTableHeadCellsCount copy.d.ts +0 -6
  869. package/dist/types/hooks/useTableHeadCellsCount copy.d.ts.map +0 -1
  870. package/dist/types/hooks/useTableHeadCellsCount.d.ts +0 -6
  871. package/dist/types/hooks/useTableHeadCellsCount.d.ts.map +0 -1
  872. package/dist/types/hooks/useURLQuery copy.d.ts +0 -10
  873. package/dist/types/hooks/useURLQuery copy.d.ts.map +0 -1
  874. package/dist/types/hooks/useURLQuery.d.ts +0 -10
  875. package/dist/types/hooks/useURLQuery.d.ts.map +0 -1
  876. package/dist/types/index.d.ts +0 -58
  877. package/dist/types/index.d.ts.map +0 -1
  878. package/dist/types/methodsToExpose.d.ts +0 -13
  879. package/dist/types/methodsToExpose.d.ts.map +0 -1
  880. package/dist/types/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts +0 -29
  881. package/dist/types/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts.map +0 -1
  882. package/dist/types/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts +0 -22
  883. package/dist/types/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +0 -1
  884. package/dist/types/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts +0 -28
  885. package/dist/types/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts.map +0 -1
  886. package/dist/types/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts +0 -29
  887. package/dist/types/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts.map +0 -1
  888. package/dist/types/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts +0 -5
  889. package/dist/types/plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.d.ts.map +0 -1
  890. package/dist/types/schema-driven/BPARenderer.d.ts +0 -14
  891. package/dist/types/schema-driven/BPARenderer.d.ts.map +0 -1
  892. package/dist/types/schema-driven/FallbackField.d.ts +0 -13
  893. package/dist/types/schema-driven/FallbackField.d.ts.map +0 -1
  894. package/dist/types/schema-driven/components/ConditionSectionField.d.ts +0 -3
  895. package/dist/types/schema-driven/components/ConditionSectionField.d.ts.map +0 -1
  896. package/dist/types/schema-driven/components/ConfigSectionField.d.ts +0 -3
  897. package/dist/types/schema-driven/components/ConfigSectionField.d.ts.map +0 -1
  898. package/dist/types/schema-driven/components/DropdownSectionField.d.ts +0 -3
  899. package/dist/types/schema-driven/components/DropdownSectionField.d.ts.map +0 -1
  900. package/dist/types/schema-driven/components/GlobalSetupAccordionField.d.ts +0 -3
  901. package/dist/types/schema-driven/components/GlobalSetupAccordionField.d.ts.map +0 -1
  902. package/dist/types/schema-driven/components/GroupEditRow.d.ts +0 -3
  903. package/dist/types/schema-driven/components/GroupEditRow.d.ts.map +0 -1
  904. package/dist/types/schema-driven/components/PromptTextEditorField.d.ts +0 -3
  905. package/dist/types/schema-driven/components/PromptTextEditorField.d.ts.map +0 -1
  906. package/dist/types/schema-driven/components/ScopeSectionField.d.ts +0 -3
  907. package/dist/types/schema-driven/components/ScopeSectionField.d.ts.map +0 -1
  908. package/dist/types/schema-driven/components/TextInputField.d.ts +0 -3
  909. package/dist/types/schema-driven/components/TextInputField.d.ts.map +0 -1
  910. package/dist/types/schema-driven/components/VariantListField.d.ts +0 -3
  911. package/dist/types/schema-driven/components/VariantListField.d.ts.map +0 -1
  912. package/dist/types/schema-driven/demoSchema.d.ts +0 -13
  913. package/dist/types/schema-driven/demoSchema.d.ts.map +0 -1
  914. package/dist/types/schema-driven/hooks/useParentEditEnabled.d.ts +0 -18
  915. package/dist/types/schema-driven/hooks/useParentEditEnabled.d.ts.map +0 -1
  916. package/dist/types/schema-driven/hooks/useSectionEditSession.d.ts +0 -34
  917. package/dist/types/schema-driven/hooks/useSectionEditSession.d.ts.map +0 -1
  918. package/dist/types/schema-driven/primitives/Accordion.d.ts +0 -21
  919. package/dist/types/schema-driven/primitives/Accordion.d.ts.map +0 -1
  920. package/dist/types/schema-driven/store/useDynamicFormStore.d.ts +0 -28
  921. package/dist/types/schema-driven/store/useDynamicFormStore.d.ts.map +0 -1
  922. package/dist/types/schema-driven/types.d.ts +0 -81
  923. package/dist/types/schema-driven/types.d.ts.map +0 -1
  924. package/dist/types/schema-driven/utils/PayloadUtils.d.ts +0 -82
  925. package/dist/types/schema-driven/utils/PayloadUtils.d.ts.map +0 -1
  926. package/dist/types/schema-driven/utils/aiReasoning.d.ts +0 -5
  927. package/dist/types/schema-driven/utils/aiReasoning.d.ts.map +0 -1
  928. package/dist/types/schema-driven/utils/conditionText.d.ts +0 -8
  929. package/dist/types/schema-driven/utils/conditionText.d.ts.map +0 -1
  930. package/dist/types/schema-driven/utils/editLock.d.ts +0 -39
  931. package/dist/types/schema-driven/utils/editLock.d.ts.map +0 -1
  932. package/dist/types/service/API.d.ts +0 -6
  933. package/dist/types/service/API.d.ts.map +0 -1
  934. package/dist/types/service/DataService.d.ts +0 -73
  935. package/dist/types/service/DataService.d.ts.map +0 -1
  936. package/dist/types/service/GoogleFilePickerService.d.ts +0 -61
  937. package/dist/types/service/GoogleFilePickerService.d.ts.map +0 -1
  938. package/dist/types/service/InstantLearningService.d.ts +0 -20
  939. package/dist/types/service/InstantLearningService.d.ts.map +0 -1
  940. package/dist/types/service/JavascriptFileService.d.ts +0 -4
  941. package/dist/types/service/JavascriptFileService.d.ts.map +0 -1
  942. package/dist/types/service/ModelService.d.ts +0 -68
  943. package/dist/types/service/ModelService.d.ts.map +0 -1
  944. package/dist/types/service/ProjectService.d.ts +0 -16
  945. package/dist/types/service/ProjectService.d.ts.map +0 -1
  946. package/dist/types/service/SavedDataSetService.d.ts +0 -22
  947. package/dist/types/service/SavedDataSetService.d.ts.map +0 -1
  948. package/dist/types/service/constants.d.ts +0 -3
  949. package/dist/types/service/constants.d.ts.map +0 -1
  950. package/dist/types/service/envHelperService.d.ts +0 -5
  951. package/dist/types/service/envHelperService.d.ts.map +0 -1
  952. package/dist/types/service/variableHelperService.d.ts +0 -6
  953. package/dist/types/service/variableHelperService.d.ts.map +0 -1
  954. package/dist/types/shims/react-dom-shim.d.ts +0 -17
  955. package/dist/types/shims/react-dom-shim.d.ts.map +0 -1
  956. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts +0 -10
  957. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.d.ts.map +0 -1
  958. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.styles.d.ts +0 -6
  959. package/dist/types/src/features/LSCGuidelinesCart/Cart/Cart.styles.d.ts.map +0 -1
  960. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.d.ts +0 -11
  961. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.d.ts.map +0 -1
  962. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.styles.d.ts +0 -6
  963. package/dist/types/src/features/LSCGuidelinesCart/GuidelineCard.styles.d.ts.map +0 -1
  964. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts +0 -16
  965. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.d.ts.map +0 -1
  966. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts +0 -6
  967. package/dist/types/src/features/LSCGuidelinesCart/GuidelinesLandingPage.styles.d.ts.map +0 -1
  968. package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts +0 -19
  969. package/dist/types/src/features/LSCGuidelinesCart/LearningManagementWrapper.d.ts.map +0 -1
  970. package/dist/types/src/features/LSCGuidelinesCart/api.d.ts +0 -4
  971. package/dist/types/src/features/LSCGuidelinesCart/api.d.ts.map +0 -1
  972. package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts +0 -5
  973. package/dist/types/src/features/LSCGuidelinesCart/endpoints.d.ts.map +0 -1
  974. package/dist/types/src/features/LSCGuidelinesCart/interfacesApi.d.ts +0 -25
  975. package/dist/types/src/features/LSCGuidelinesCart/interfacesApi.d.ts.map +0 -1
  976. package/dist/types/src/features/LSCGuidelinesCart/transformSelectedGuidelineData.d.ts +0 -18
  977. package/dist/types/src/features/LSCGuidelinesCart/transformSelectedGuidelineData.d.ts.map +0 -1
  978. package/dist/types/src/routes/ErrorBoundary.d.ts +0 -22
  979. package/dist/types/src/routes/ErrorBoundary.d.ts.map +0 -1
  980. package/dist/types/src/routes/Routes.d.ts +0 -3
  981. package/dist/types/src/routes/Routes.d.ts.map +0 -1
  982. package/dist/types/theme.d.ts +0 -4
  983. package/dist/types/theme.d.ts.map +0 -1
  984. package/dist/types/types/GoogleFilePicker/GoogleFilePickerCallbackFunctionType.d.ts +0 -23
  985. package/dist/types/types/GoogleFilePicker/GoogleFilePickerCallbackFunctionType.d.ts.map +0 -1
  986. package/dist/types/userProvidedConfig.d.ts +0 -8
  987. package/dist/types/userProvidedConfig.d.ts.map +0 -1
  988. package/dist/types/utils/CustomSkeleton.d.ts +0 -3
  989. package/dist/types/utils/CustomSkeleton.d.ts.map +0 -1
  990. package/dist/types/utils/SkeletonLoader.d.ts +0 -8
  991. package/dist/types/utils/SkeletonLoader.d.ts.map +0 -1
  992. package/dist/types/utils/agentGenieAPI.d.ts +0 -21
  993. package/dist/types/utils/agentGenieAPI.d.ts.map +0 -1
  994. package/dist/types/utils/api.d.ts +0 -2
  995. package/dist/types/utils/api.d.ts.map +0 -1
  996. package/dist/types/utils/bookGenieAPI.d.ts +0 -14
  997. package/dist/types/utils/bookGenieAPI.d.ts.map +0 -1
  998. package/dist/types/utils/codeCitations.utils.d.ts +0 -2
  999. package/dist/types/utils/codeCitations.utils.d.ts.map +0 -1
  1000. package/dist/types/utils/colors.d.ts +0 -5
  1001. package/dist/types/utils/colors.d.ts.map +0 -1
  1002. package/dist/types/utils/date.d.ts +0 -8
  1003. package/dist/types/utils/date.d.ts.map +0 -1
  1004. package/dist/types/utils/helperFunctions.d.ts +0 -2
  1005. package/dist/types/utils/helperFunctions.d.ts.map +0 -1
  1006. package/dist/types/utils/instantLearning.utils.d.ts +0 -3
  1007. package/dist/types/utils/instantLearning.utils.d.ts.map +0 -1
  1008. package/dist/types/utils/instantLearningAPI.d.ts +0 -21
  1009. package/dist/types/utils/instantLearningAPI.d.ts.map +0 -1
  1010. package/dist/types/utils/payloadParsers.d.ts +0 -16
  1011. package/dist/types/utils/payloadParsers.d.ts.map +0 -1
  1012. package/dist/types/utils/recommendationParser.d.ts +0 -22
  1013. package/dist/types/utils/recommendationParser.d.ts.map +0 -1
  1014. package/dist/types/utils/regexHelperService.d.ts +0 -9
  1015. package/dist/types/utils/regexHelperService.d.ts.map +0 -1
  1016. package/dist/types/utils/urlQueryParamService.d.ts +0 -2
  1017. package/dist/types/utils/urlQueryParamService.d.ts.map +0 -1
  1018. package/dist/types/utils/variableHelperService.d.ts +0 -7
  1019. package/dist/types/utils/variableHelperService.d.ts.map +0 -1
  1020. package/dist/types/utils/variantParser.d.ts +0 -14
  1021. package/dist/types/utils/variantParser.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=["instruction_prompt"],e=function(i,e){var n,r=null!==(n=null==i?void 0:i.teachMe)&&void 0!==n?n:i,o=function(i){void 0===i&&(i={});for(var n=0,r=Object.entries(i);n<r.length;n++){var l=r[n],u=l[0],t=l[1];if(u===e)return t;var d=(null==t?void 0:t.properties)?o(t.properties):void 0;if(d)return d}};return o(null==r?void 0:r.properties)},n=function(e,n){var r,o,l,u;void 0===n&&(n={});var t=null!==(r=null==e?void 0:e.teachMe)&&void 0!==r?r:e,d=null!==(o=null==t?void 0:t.properties)&&void 0!==o?o:{};return{required:null!==(u=null===(l=null==t?void 0:t.required)||void 0===l?void 0:l.filter(function(i){var e;return!(null===(e=d[i])||void 0===e?void 0:e.core_field)}))&&void 0!==u?u:[],properties:i.reduce(function(i,e){var r,o=d[e];return o?(i[e]={type:null==o?void 0:o.type,title:null==o?void 0:o.title,value:null!==(r=null==n?void 0:n[e])&&void 0!==r?r:""},i):i},{})}};exports.buildLearningMetadataPayload=n,exports.buildLegacyLearningMetadataPayload=function(i,r){var o,l,u;void 0===r&&(r={});var t=n(i,r),d=e(i,"scheduling_config");return!1===(null==d?void 0:d.core_field)&&(t.properties.scheduling_config=null!==(u=null!==(l=null===(o=null==r?void 0:r.properties)||void 0===o?void 0:o.scheduling_config)&&void 0!==l?l:null==r?void 0:r.scheduling_config)&&void 0!==u?u:"",(null==d?void 0:d.is_required)&&!t.required.includes("scheduling_config")&&t.required.push("scheduling_config")),t},exports.getInstructionPromptValue=function(i){var e,n;if(!i)return"";var r=null===(e=i.properties)||void 0===e?void 0:e.instruction_prompt;return void 0!==r?"string"==typeof r?r:null!==(n=null==r?void 0:r.value)&&void 0!==n?n:"":"string"==typeof i.instruction_prompt?i.instruction_prompt:""},exports.isSchedulingConfigLearningMetadata=function(i){var n;return!1===(null===(n=e(i,"scheduling_config"))||void 0===n?void 0:n.core_field)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=["instruction_prompt"],i=function(e,i){var n,o=null!==(n=null==e?void 0:e.teachMe)&&void 0!==n?n:e,l=function(e){void 0===e&&(e={});for(var n=0,o=Object.entries(e);n<o.length;n++){var a=o[n],d=a[0],r=a[1];if(d===i)return r;var t=(null==r?void 0:r.properties)?l(r.properties):void 0;if(t)return t}};return l(null==o?void 0:o.properties)},n=function(i,n){var o,l,a,d;void 0===n&&(n={});var r=null!==(o=null==i?void 0:i.teachMe)&&void 0!==o?o:i,t=null!==(l=null==r?void 0:r.properties)&&void 0!==l?l:{};return{required:null!==(d=null===(a=null==r?void 0:r.required)||void 0===a?void 0:a.filter(function(e){var i;return!(null===(i=t[e])||void 0===i?void 0:i.core_field)}))&&void 0!==d?d:[],properties:e.reduce(function(e,i){var o,l=t[i];return l?(e[i]={type:null==l?void 0:l.type,title:null==l?void 0:l.title,value:null!==(o=null==n?void 0:n[i])&&void 0!==o?o:""},e):e},{})}};exports.buildLearningMetadataPayload=n,exports.buildLegacyLearningMetadataPayload=function(e,o){var l,a;void 0===o&&(o={});var d=n(e,o),r=i(e,"scheduling_config");if(console.log("[buildLegacyLearningMetadataPayload] Input metadataValues:",JSON.stringify(o)),console.log("[buildLegacyLearningMetadataPayload] schedulingConfigField found:",r),console.log("[buildLegacyLearningMetadataPayload] schedulingConfigField?.core_field:",null==r?void 0:r.core_field),!1===(null==r?void 0:r.core_field)){var t=null===(l=null==o?void 0:o.properties)||void 0===l?void 0:l.scheduling_config,u=null==o?void 0:o.scheduling_config,c=null!==(a=null!=t?t:u)&&void 0!==a?a:"";console.log("[buildLegacyLearningMetadataPayload] metadataValues?.properties?.scheduling_config:",t),console.log("[buildLegacyLearningMetadataPayload] metadataValues?.scheduling_config:",u),console.log("[buildLegacyLearningMetadataPayload] Resolved scheduling_config value:",c),d.properties.scheduling_config=c,(null==r?void 0:r.is_required)&&!d.required.includes("scheduling_config")&&(console.log("[buildLegacyLearningMetadataPayload] Adding scheduling_config to required array"),d.required.push("scheduling_config"))}else console.log("[buildLegacyLearningMetadataPayload] Skipping scheduling_config processing - core_field condition not met");return console.log("[buildLegacyLearningMetadataPayload] Final payload:",JSON.stringify(d)),d},exports.getInstructionPromptValue=function(e){var i,n;if(!e)return"";var o=null===(i=e.properties)||void 0===i?void 0:i.instruction_prompt;return void 0!==o?"string"==typeof o?o:null!==(n=null==o?void 0:o.value)&&void 0!==n?n:"":"string"==typeof e.instruction_prompt?e.instruction_prompt:""},exports.isSchedulingConfigLearningMetadata=function(e){var n;return!1===(null===(n=i(e,"scheduling_config"))||void 0===n?void 0:n.core_field)};
2
2
  //# sourceMappingURL=learningMetadataUtils.js.map
@@ -1,2 +1,2 @@
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 d,useState as c,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,de=j.setCitations,ce=j.textareaPlaceholder,ue=void 0===ce?"Tell me more about this learning...":ce,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=d("".concat(Ae,"-").concat(O,"-").concat(w())),Pe=d("".concat(w())),ze=H,je=d(null),Be=d(!0),Oe=d(null),He=d(null),Ue=c(Re),Ge=Ue[0],Ze=Ue[1],Ke=c([]),Ve=Ke[0],Qe=Ke[1],Je=c(!1),$e=Je[0],Xe=Je[1],Ye=c(!1);Ye[0];var en=Ye[1],nn=c(!0),tn=nn[0],on=nn[1],rn=c(!0);rn[0];var an=rn[1],sn=c("");sn[0];var ln=sn[1],dn=c(""),cn=dn[0],un=dn[1],vn=c(!1),mn=vn[0],hn=vn[1],gn=c(!1),pn=gn[0],fn=gn[1],Cn=c(!0),bn=Cn[0],yn=Cn[1],Sn=c("100%");Sn[0];var wn=Sn[1],xn=c(null),kn=xn[0],In=xn[1],Tn=c(!1);Tn[0];var _n=Tn[1],En=c(!1),Mn=En[0],Rn=En[1],Dn=d(null),Nn=d(new Set),qn=c(null),Fn=qn[0],Ln=qn[1],An=c(!1),Wn=An[0],Pn=An[1],zn=c(!1);zn[0],zn[1];var jn=c(null);jn[0],jn[1],d(null),d(null);var Bn=d(new Map),On=d(""),Hn=d(new Set),Un=d(new Map),Gn=d(!1),Zn=d(0),Kn=d(new Map),Vn=d(null),Qn=c(!1),Jn=Qn[0],$n=Qn[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 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],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)}),ut(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();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(){rt(),it();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=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 ot("smooth")},100)}}},[Mn,fe,mn,ge,be,ot]),v(function(){Be.current&&ot("smooth")},[ot]);var rt=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)})},it=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),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,r,i,a,s,l){var d,c,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===(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 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===(g=null==B?void 0:B.message)||void 0===g?void 0:g.citations)||[];O&&H.length>0&&de&&de(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,d,c,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=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;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!==(d=h.explainability_id)&&void 0!==d?d:"",isParallelToolResponse:!0}:o=n(n([],o,!0),[{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:!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,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: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)}},dt=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}),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]),ct=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())),dt(e,"inactivity")},Ee);Kn.current.set(e,t)}},[dt,Ee]),ut=function(e,i,a,s,l,d){return o(void 0,void 0,void 0,function(){var o,s,c,u,v,m,h,g,p,f,C,b,y,S,x,I;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===(C=null==e?void 0:e.preventDefault)||void 0===C||C.call(e)),c="user"===(null===(b=Ve[Ve.length-1])||void 0===b?void 0:b.role),!o||mn||Gn.current||c||(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..."),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,De(Vn.current)];case 2:return r.sent()?[3,4]:($n(!0),Xe(!1),d&&d(!1),[2]);case 3:return u=r.sent(),console.error("Validation error:",u),$n(!0),Xe(!1),d&&d(!1),[2];case 4:Xe(!1),r.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 r=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&&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)}),ot("smooth"),h=new Map,g=[],p=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:p(Y),aiModel:"",enableLogs:!0,logControls:{infoLogs:Le,debugLogs:Le},onStreamEvent:function(e){var n,t,r,a,s,d,c=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(c,",").concat(u)),ct(f.requestId);var v=null===(d=null===(s=null==e?void 0:e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===d?void 0:d.error_state;if(Array.isArray(v)&&v.length>0)return console.error("⚠️ Agent returned an error_state during stream:",{requestId:c,errorState:v}),void dt(f.requestId,"agent_error");lt(e,h,g,m,o,i,l)},onStreamEnd:function(e){var o,r,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(f.requestId),console.log("✅ [Stream Completed] RequestID: ".concat(i));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 d=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:d}):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),dt(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),ct(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)),d&&d(!1),[2])}})})},vt=d(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 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),d=r["data-value"],c="Tester Genie"===l;return a(M,t({},r,{className:n,handleStream:mt,isStreamEnd:tn,disabled:!!kn||!!_e,isLastMessage:!0,style:{margin:0},isTesterGenie:c,"data-selected":kn===l||kn===d?"true":kn?"false":void 0},{children:s("span",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o,c&&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]),gt=u(function(){return Ve.some(function(e){return e.isSkeleton})},[Ve]),pt=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 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&&!gt?"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: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:mt,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:pt,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||gt||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: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:pt,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:cn})}))]})),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: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){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(p,t({open:Jn,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(){$n(!1),at()},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(){$n(!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};
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{__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"tslib";import"react/jsx-runtime";import"react";import"../../api/transport.js";import"lucide-react";import"./store/useLearningTemplateStore.js";import"primereact/toast";import"./apis/scopeApis.js";import"./store/usePermissionsStore.js";import"./store/useLMSConfigStore.js";import"./components/ToolTip.js";import"./store/useAuthStore.js";import"@mui/material";import"@mui/icons-material/Check";import"@mui/icons-material/CloseRounded";import"../IL-marketplace/marketplaceTheme.js";import{QueryClient as t}from"@tanstack/react-query";import"./store/useEnvStore.js";import"date-fns/format";import"date-fns/isValid";import"date-fns/parseISO";import"framer-motion";import"../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../IL-OTJ/_components/InputDataReasoningCard.js";import"../IL-OTJ/_components/TooltipComponent.js";import"../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../IL-OTJ/store/CitationsContext.js";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"../../ILMarketplaceWrapper.js";import"../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import"./store/useExternalWorkflowStore.js";import"../IL-marketplace/queryClient.js";import"./store/useConfigStore.js";import"appsec-ui";import"react-dom";import"@radix-ui/react-tooltip";import"./components/StationOnboarding/InputField.js";import"./config.js";import"./store/useAppSecRolesStore.js";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"./AuditLog/ChangeLogDiff.js";import"react-router-dom";import"../IL-marketplace/components/GuidelineIconButton.js";import"@e-llm-studio/federated-dashboard-components";import"@e-llm-studio/federated-dashboard-components/styles.css";import"./hooks/useLearningTemplateQueryParams.js";new t;
1
+ import"tslib";import"react/jsx-runtime";import"@e-llm-studio/federated-dashboard-components";import"react";import"../../api/transport.js";import"lucide-react";import"./store/useLearningTemplateStore.js";import"primereact/toast";import"./apis/scopeApis.js";import"./store/usePermissionsStore.js";import"./store/useLMSConfigStore.js";import"./components/ToolTip.js";import"./store/useAuthStore.js";import"@mui/material";import"@mui/icons-material/Check";import"@mui/icons-material/CloseRounded";import"../IL-marketplace/marketplaceTheme.js";import{QueryClient as t}from"@tanstack/react-query";import"./store/useEnvStore.js";import"date-fns/format";import"date-fns/isValid";import"date-fns/parseISO";import"framer-motion";import"../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"../IL-OTJ/_components/InputDataReasoningCard.js";import"../IL-OTJ/_components/TooltipComponent.js";import"../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import"../IL-OTJ/store/CitationsContext.js";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import"../../ILMarketplaceWrapper.js";import"../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import"./store/useExternalWorkflowStore.js";import"../IL-marketplace/queryClient.js";import"./store/useConfigStore.js";import"appsec-ui";import"react-dom";import"@radix-ui/react-tooltip";import"./components/StationOnboarding/InputField.js";import"./config.js";import"./store/useAppSecRolesStore.js";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"./AuditLog/ChangeLogDiff.js";import"react-router-dom";import"../IL-marketplace/components/GuidelineIconButton.js";import"@e-llm-studio/federated-dashboard-components/styles.css";import"./hooks/useLearningTemplateQueryParams.js";new t;
2
2
  //# sourceMappingURL=LearningManagementTest.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import{useEffect as o}from"react";import i from"./RuleContent/RuleContent.js";import s from"./StationsContent/StationsContent.js";import c from"./RBAC/AccessManagementPanel.js";import"appsec-ui";import"../../api/transport.js";import"./store/useAuthStore.js";import"./store/usePermissionsStore.js";import{useLearningTemplateStore as a}from"./store/useLearningTemplateStore.js";import r from"./store/useEnvStore.js";import"../IL-marketplace/marketplaceTheme.js";import l from"./styles/LearningTemplateLayout.module.css.js";import{findNodeById as u,mapScopeChildrenToStations as d}from"./utils/treeUtils.js";import m from"./SidebarWrapper.js";import p from"./components/StationOnboarding/StationOnboardModal.js";import f from"./AuditLog/AuditLog.js";import S from"./components/EmptyLearningState.js";import{dt as g}from"./store/useLMSConfigStore.js";import{EMPTY_STATE_DT_PATH as h}from"./constants.js";import{GuidelineLibraryContent as C}from"../IL-marketplace/components/GuidelineLibraryContent.js";import{HumanChange as v}from"./HumanChanges/HumanChange.js";var A=function(A){var R,j,I=A.onOpenCreateModal,q=A.onRefreshRuleSets,D=A.scopeTreeData,L=A.onAddChild,M=A.onRenameChild,T=A.onDeleteChild,k=A.canDeleteScope,y=A.canEditScope,w=A.canCreateScope,O=A.onSectionSelect,b=A.onViewStation,N=A.activeSectionId,B=void 0===N?"learnings":N,_=A.sectionsConfig,x=A.nodeTypesConfig,E=A.app_integration_id,U=A.token,P=A.modeId,H=A.onRequestAccess,V=A.isRequestingAccess,Y=A.isAccessRequested,G=A.selectionMode,W=void 0!==G&&G,z=A.isILMarketplace,F=A.children,J=A.guidelineContentProps,K=A.humanChanges,Q=A.menuActionsConfig,X=a(function(e){return e.isStationModalOpen}),Z=a(function(e){return e.setStationModalOpen}),$=a(function(e){return e.isStationOnboardModalTriggered}),ee=a(function(e){return e.setIsStationOnboardModalTriggered}),ne=a(function(e){return e.selectedRuleSetId}),te=a(function(e){return e.rawAuditRuleData}),oe=r(function(e){return e.auditLogConfig});a(function(e){return e.ruleData});var ie=ne?u((null==D?void 0:D.data)||null,ne):null;return Boolean((null===(R=null==D?void 0:D.data)||void 0===R?void 0:R.id)&&ne===D.data.id),o(function(){$&&Z(!0)},[$,Z,ee]),n("div",e({className:"".concat(l.container," ").concat(W?l.containerSelectionMode:"")},{children:[t(m,{onOpenCreateModal:I,onRefreshRuleSets:q,scopeTreeData:D,onAddChild:L,onRenameChild:M,onDeleteChild:T,canDeleteScope:k,canEditScope:y,canCreateScope:w,onSectionSelect:O,activeSectionId:B,sectionsConfig:_,nodeTypesConfig:x,menuActionsConfig:Q}),t("div",e({id:"rule-template-layout-content",className:"".concat(l.content," relative flex-1 overflow-hidden")},{children:"stations"===B?t(s,{scopeId:ne||"",scopeName:(null==ie?void 0:ie.name)||"Unknown Scope",stationsCount:null===(j=null==ie?void 0:ie.metrics)||void 0===j?void 0:j.stationsCount,stations:d(ie),onViewStation:b}):"access"===B?t(c,{selectedRuleSetId:ne,scopeName:(null==ie?void 0:ie.name)||"Unknown Scope"}):"history"===B?(null==oe?void 0:oe.configId)?t(f,{configId:oe.configId,scopeId:ne||void 0,scopeName:(null==ie?void 0:ie.name)||"Unknown Scope",ruleData:te}):null:"human-changes"===B?K?t(v,{humanChanges:K}):t("div",e({className:"flex items-center justify-center h-full"},{children:t("p",e({className:"text-gray-500"},{children:"No human changes configuration provided."}))})):ie&&!1===ie.hasAccess?t(S,{onCreate:function(){},title:g("".concat(h,".noAccessTitle"),"Access Restricted"),desc:g("".concat(h,".noAccessDesc"),"You do not have access to view this ".concat(null==ie?void 0:ie.name," learnings.")),button:"",canCreateRule:!1,noAccessTitle:g("".concat(h,".noAccessTitle"),"Access Restricted"),noAccessDesc:g("".concat(h,".noAccessDesc"),"You do not have access to view this ".concat(null==ie?void 0:ie.name," learnings.")),requestAccessButton:g("".concat(h,".requestAccessButton"),"Request Access"),requestSentButton:g("".concat(h,".requestSentButton"),"Request Sent"),onRequestAccess:function(){return null==H?void 0:H(ne)},isRequestingAccess:V,isAccessRequested:Y}):F||(z?J?t(C,e({},J)):null:t(i,{onRefreshRuleSets:q,app_integration_id:E,token:U,modeId:P}))})),t(p,{isOpen:X,onClose:function(){Z(!1),ee(!1)},onBoardStation:function(e){q(!0,e)},app_integration_id:E,token:U})]}))};export{A as default};
1
+ import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import o,{useEffect as s}from"react";import i from"./RuleContent/RuleContent.js";import c from"./StationsContent/StationsContent.js";import a from"./RBAC/AccessManagementPanel.js";import"appsec-ui";import"../../api/transport.js";import"./store/useAuthStore.js";import"./store/usePermissionsStore.js";import{useLearningTemplateStore as r}from"./store/useLearningTemplateStore.js";import l from"./store/useEnvStore.js";import"../IL-marketplace/marketplaceTheme.js";import u from"./styles/LearningTemplateLayout.module.css.js";import{findNodeById as d,mapScopeChildrenToStations as m}from"./utils/treeUtils.js";import p from"./SidebarWrapper.js";import f from"./components/StationOnboarding/StationOnboardModal.js";import S from"./AuditLog/AuditLog.js";import g from"./components/EmptyLearningState.js";import{dt as h}from"./store/useLMSConfigStore.js";import{EMPTY_STATE_DT_PATH as v}from"./constants.js";import{GuidelineLibraryContent as C}from"../IL-marketplace/components/GuidelineLibraryContent.js";import{HumanChange as A}from"./HumanChanges/HumanChange.js";var R=function(R){var j,I,q=R.onOpenCreateModal,M=R.onRefreshRuleSets,y=R.scopeTreeData,D=R.onAddChild,L=R.onRenameChild,T=R.onDeleteChild,k=R.canDeleteScope,w=R.canEditScope,O=R.canCreateScope,b=R.onSectionSelect,N=R.onViewStation,B=R.activeSectionId,_=void 0===B?"learnings":B,x=R.sectionsConfig,E=R.nodeTypesConfig,U=R.app_integration_id,P=R.token,H=R.modeId,V=R.onRequestAccess,Y=R.isRequestingAccess,G=R.isAccessRequested,W=R.selectionMode,z=void 0!==W&&W,F=R.isILMarketplace,J=R.children,K=R.guidelineContentProps,Q=R.humanChanges,X=R.menuActionsConfig,Z=r(function(e){return e.isStationModalOpen}),$=r(function(e){return e.setStationModalOpen}),ee=r(function(e){return e.isStationOnboardModalTriggered}),ne=r(function(e){return e.setIsStationOnboardModalTriggered}),te=r(function(e){return e.selectedRuleSetId}),oe=r(function(e){return e.rawAuditRuleData}),se=l(function(e){return e.auditLogConfig});r(function(e){return e.ruleData});var ie=te?d((null==y?void 0:y.data)||null,te):null;Boolean((null===(j=null==y?void 0:y.data)||void 0===j?void 0:j.id)&&te===y.data.id);var ce=o.useMemo(function(){return Q&&te?e(e({},Q),{query:e(e({},Q.query),{scopeId:[te]})}):Q},[Q,te]);return s(function(){ee&&$(!0)},[ee,$,ne]),n("div",e({className:"".concat(u.container," ").concat(z?u.containerSelectionMode:"")},{children:[t(p,{onOpenCreateModal:q,onRefreshRuleSets:M,scopeTreeData:y,onAddChild:D,onRenameChild:L,onDeleteChild:T,canDeleteScope:k,canEditScope:w,canCreateScope:O,onSectionSelect:b,activeSectionId:_,sectionsConfig:x,nodeTypesConfig:E,menuActionsConfig:X}),t("div",e({id:"rule-template-layout-content",className:"".concat(u.content," relative flex-1 overflow-hidden")},{children:"stations"===_?t(c,{scopeId:te||"",scopeName:(null==ie?void 0:ie.name)||"Unknown Scope",stationsCount:null===(I=null==ie?void 0:ie.metrics)||void 0===I?void 0:I.stationsCount,stations:m(ie),onViewStation:N}):"access"===_?t(a,{selectedRuleSetId:te,scopeName:(null==ie?void 0:ie.name)||"Unknown Scope"}):"history"===_?(null==se?void 0:se.configId)?t(S,{configId:se.configId,scopeId:te||void 0,scopeName:(null==ie?void 0:ie.name)||"Unknown Scope",ruleData:oe}):null:"human-changes"===_?ce?t(A,{humanChanges:ce}):t("div",e({className:"flex items-center justify-center h-full"},{children:t("p",e({className:"text-gray-500"},{children:"No human changes configuration provided."}))})):ie&&!1===ie.hasAccess?t(g,{onCreate:function(){},title:h("".concat(v,".noAccessTitle"),"Access Restricted"),desc:h("".concat(v,".noAccessDesc"),"You do not have access to view this ".concat(null==ie?void 0:ie.name," learnings.")),button:"",canCreateRule:!1,noAccessTitle:h("".concat(v,".noAccessTitle"),"Access Restricted"),noAccessDesc:h("".concat(v,".noAccessDesc"),"You do not have access to view this ".concat(null==ie?void 0:ie.name," learnings.")),requestAccessButton:h("".concat(v,".requestAccessButton"),"Request Access"),requestSentButton:h("".concat(v,".requestSentButton"),"Request Sent"),onRequestAccess:function(){return null==V?void 0:V(te)},isRequestingAccess:Y,isAccessRequested:G}):J||(F?K?t(C,e({},K)):null:t(i,{onRefreshRuleSets:M,app_integration_id:U,token:P,modeId:H}))})),t(f,{isOpen:Z,onClose:function(){$(!1),ne(!1)},onBoardStation:function(e){M(!0,e)},app_integration_id:U,token:P})]}))};export{R as default};
2
2
  //# sourceMappingURL=LearningTemplateLayout.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as t,__assign as n,__spreadArray as r}from"tslib";import{jsx as o,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useRef as a,useState as u,useEffect as s}from"react";import{useLearningTemplateStore as d}from"../store/useLearningTemplateStore.js";import c from"../components/EmptyLearningState.js";import{getRulesInRuleSetById as v,exportRuleSet as p,deleteRule as m,deleteQuestion as f,alterQuestionPriority as g}from"../apis/scopeApis.js";import h from"../components/RuleContentSkeleton.js";import{Toast as y}from"primereact/toast";import T from"./ContentLogic.js";import w from"../components/ErrorStateDisplay.js";import _ from"../shared/SuccessToastContent.js";import I from"../shared/ErrorToastContent.js";import{findNodeById as S}from"../utils/treeUtils.js";import j from"../styles/LearningContent.module.css.js";import C from"../components/ConfirmationModal.js";import{dt as b}from"../store/useLMSConfigStore.js";import"../../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"lucide-react";import"../../IL-OTJ/_components/InputDataReasoningCard.js";import"../../IL-OTJ/_components/TooltipComponent.js";import"../../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import{CitationProvider as D}from"../../IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"../../../api/transport.js";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import R from"../../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import x from"../../../ContinueWithTemplateModal.js";import{LEARNING_DT_PATH as L,VARIANT_DT_PATH as A,TIER_DT_PATH as k}from"../constants.js";import{useConfigStore as M}from"../store/useConfigStore.js";import"../store/usePermissionsStore.js";import"appsec-ui";import"../store/useAuthStore.js";import"../store/useEnvStore.js";import"../../IL-marketplace/marketplaceTheme.js";import"react-dom";import"@radix-ui/react-tooltip";import"../components/StationOnboarding/InputField.js";import"../config.js";import"../store/useAppSecRolesStore.js";import"@tanstack/react-query";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"../AuditLog/ChangeLogDiff.js";import"react-router-dom";import"../../IL-marketplace/components/GuidelineIconButton.js";import"@e-llm-studio/federated-dashboard-components";import"@e-llm-studio/federated-dashboard-components/styles.css";import"../hooks/useLearningTemplateQueryParams.js";import"../components/ToolTip.js";import"../../../ILMarketplaceWrapper.js";import"../LearningManagementTest.js";var O=function(O){var N,E=O.noRulesTitle,F=void 0===E?"No rules have been added !":E,V=O.noRulesDesc,P=void 0===V?"Start by adding rules that should apply across all stations.":V,B=O.noRulesButtonText,J=void 0===B?"Create New Rule":B,U=O.deleteRuleSuccessMessage,q=void 0===U?"Rule deleted successfully!":U,W=O.deleteVariantSuccessMessage,G=void 0===W?"Variant deleted successfully!":W,Q=O.deleteRuleErrorMessage,H=void 0===Q?"Failed to delete rule. Please try again.":Q,$=O.deleteVariantErrorMessage,z=void 0===$?"Failed to delete variant. Please try again.":$,K=O.deleteModalTitle,X=void 0===K?"Delete":K,Y=O.deleteRuleModalWarning,Z=void 0===Y?"This will permanently delete the rule configuration.":Y,ee=O.deleteVariantModalWarning,te=void 0===ee?"This will permanently delete the variant configuration.":ee,ne=O.deleteConfirmText,re=void 0===ne?"Delete":ne,oe=O.onRefreshRuleSets,ie=O.app_integration_id,le=O.token,ae=O.modeId,ue=d(function(e){return e.selectedRuleSetId}),se=d(function(e){return e.scopeTreeData}),de=d(function(e){return e.sidebarTab}),ce=d(function(e){return e.setInitialRules}),ve=d(function(e){return e.currentRules}),pe=d(function(e){return e.setRawAuditRuleData});d(function(e){return e.createdVariantInfo});var me=d(function(e){return e.resetCreatedVariantInfo}),fe=d(function(e){return e.isILModalTriggered}),ge=d(function(e){return e.setIsILModalTriggered}),he=a(null),ye=M.getState().configuration,Te=u(!1),we=Te[0],_e=Te[1],Ie=u(null),Se=Ie[0],je=Ie[1],Ce=u(null),be=Ce[0],De=Ce[1],Re=u(null),xe=Re[0],Le=Re[1],Ae=u("create"),ke=Ae[0],Me=Ae[1],Oe=u(null),Ne=Oe[0],Ee=Oe[1],Fe=u(!1),Ve=Fe[0],Pe=Fe[1],Be=u(null),Je=Be[0],Ue=Be[1],qe=u(!1),We=qe[0],Ge=qe[1],Qe=u(""),He=Qe[0],$e=Qe[1],ze=u(null),Ke=ze[0],Xe=ze[1],Ye=u(!1),Ze=Ye[0],et=Ye[1],tt=u(!1),nt=tt[0],rt=tt[1],ot=u("ruleDeletion"),it=ot[0],lt=ot[1],at=u(null),ut=at[0],st=at[1],dt=u(!1),ct=dt[0],vt=dt[1],pt=u(!1),mt=pt[0],ft=pt[1],gt=u(!1),ht=gt[0],yt=gt[1],Tt=d.getState().tiers,wt=u(null),_t=wt[0],It=wt[1],St=u(null),jt=St[0],Ct=St[1],bt=u(null),Dt=bt[0],Rt=bt[1],xt=function(e){return String(e||"").trim().toLowerCase().replace(/\s+/g,"_").replace(/tier_?(\d+)/i,"tier_$1")},Lt=function(e){return xt(e).replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()})},At=function(e){if(!e||"object"!=typeof e)return!1;var t=e;return Boolean(t.ruleId||t.ruleTitle||Array.isArray(t.variants))},kt=function(e){var t,r,o,i,l,a,u,s,d,c=null!==(i=null!==(o=null!==(r=null!==(t=null==e?void 0:e.ruleId)&&void 0!==t?t:null==e?void 0:e.id)&&void 0!==r?r:null==e?void 0:e.questionId)&&void 0!==o?o:null==e?void 0:e.question_id)&&void 0!==i?i:"",v=null!==(d=null!==(s=null!==(u=null!==(a=null!==(l=null==e?void 0:e.ruleTitle)&&void 0!==l?l:null==e?void 0:e.title)&&void 0!==a?a:null==e?void 0:e.question_title)&&void 0!==u?u:null==e?void 0:e.originalQuestion)&&void 0!==s?s:null==e?void 0:e.question)&&void 0!==d?d:"",p=Array.isArray(null==e?void 0:e.variants)?e.variants:(null==e?void 0:e.variantId)||(null==e?void 0:e.description)||(null==e?void 0:e.ruleDesc)?[e]:[];return n(n({},e),{ruleId:c,ruleTitle:v,variants:p.map(function(e,t){var r,o,i,l,a,u,s,d,p,m,f,g,h,y,T,w,_,I,S=null!==(l=null!==(i=null!==(o=null!==(r=null==e?void 0:e.variantId)&&void 0!==r?r:null==e?void 0:e.variant_id)&&void 0!==o?o:null==e?void 0:e.id)&&void 0!==i?i:null==e?void 0:e.new_variant_id)&&void 0!==l?l:"".concat(c||"rule","-variant-").concat(t);return n(n({},e),{variantId:S,description:null!==(s=null!==(u=null!==(a=null==e?void 0:e.description)&&void 0!==a?a:null==e?void 0:e.ruleDesc)&&void 0!==u?u:null==e?void 0:e.variant)&&void 0!==s?s:"",whenToApply:null!==(m=null!==(p=null!==(d=null==e?void 0:e.whenToApply)&&void 0!==d?d:null==e?void 0:e.conditions_whentoapply)&&void 0!==p?p:null==e?void 0:e.wta)&&void 0!==m?m:"",whenNotToApply:null!==(h=null!==(g=null!==(f=null==e?void 0:e.whenNotToApply)&&void 0!==f?f:null==e?void 0:e.conditions_whennottoapply)&&void 0!==g?g:null==e?void 0:e.wnta)&&void 0!==h?h:"",variantType:null!==(T=null!==(y=null==e?void 0:e.variantType)&&void 0!==y?y:null==e?void 0:e.variant_type)&&void 0!==T?T:"variant",is_drafted:(I=null!==(w=null==e?void 0:e.is_drafted)&&void 0!==w?w:null==e?void 0:e.wasDrafted,!0===I||"true"===I||1===I||"1"===I),is_enabled:null===(_=null==e?void 0:e.is_enabled)||void 0===_||_,ruleTitle:v,title:v})})})},Mt=function(){Me("create"),je(null),Le(null),De(null),It(null),Ct(null),Rt(null),$e(""),yt(!1),_e(!0),Ee(0)},Ot=function(){_e(!1),ge(!1),je(null),De(null),Le(null),Ee(null),rt(!1),ft(!1),yt(!1),Nt(),It(null),Ct(null),Rt(null),$e(""),oe&&oe(!1,ue||void 0)};s(function(){Nt()},[ue,ce]),s(function(){fe&&_e(!0)},[fe]);var Nt=function(o){return void 0===o&&(o=!1),e(void 0,void 0,void 0,function(){var e,i,l,a,u,s,c,p,m,f,g,h,y,T,w,_,I,S;return t(this,function(t){switch(t.label){case 0:if(!ue)return ce([]),[2];o||Pe(!0),Ue(null),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,v(ue,le)];case 2:return e=t.sent(),console.log("response==",e),(null==e?void 0:e.data)&&0!==Object.keys(e.data).length?(pe(e),i=e.data,console.log("rulesData==",i),l=function(e){var t=function(e){var t,n,r,o,i=null!==(o=null!==(r=null!==(n=null!==(t=null==e?void 0:e.value)&&void 0!==t?t:null==e?void 0:e.rules)&&void 0!==n?n:null==e?void 0:e.learnings)&&void 0!==r?r:null==e?void 0:e.questions)&&void 0!==o?o:[];return Array.isArray(i)?i.filter(At).map(kt):[]};if(Array.isArray(e))return[["tier_1",e.filter(At).map(kt)]];if(Array.isArray(e.tiers))return r([],e.tiers,!0).sort(function(e,t){var n,r,o,i;return(null!==(r=null!==(n=e.tier_priority)&&void 0!==n?n:e.priority)&&void 0!==r?r:0)-(null!==(i=null!==(o=t.tier_priority)&&void 0!==o?o:t.priority)&&void 0!==i?i:0)}).map(function(e,n){var r,o,i;return[null!==(i=null!==(o=null!==(r=e.name)&&void 0!==r?r:e.tier_name)&&void 0!==o?o:e.tier_title)&&void 0!==i?i:"tier_".concat(n+1),t(e)]});var n=t(e);if(n.length>0)return[["tier_1",n]];var o=new Set(["ruleSetName","ruleSetDesc","created_at","updated_at","created_by","updated_by","scope_id","application_mapping_id"]);return Object.entries(e).filter(function(e){var t=e[0],n=e[1];return!o.has(t)&&Array.isArray(n)&&n.some(At)}).map(function(e){return[e[0],e[1].map(kt)]})}(i),a=l.map(function(e){var t=e[1];return new Set(t.flatMap(function(e){var t,n;return null!==(n=null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return e.link_id}).filter(Boolean))&&void 0!==n?n:[]}))}),u=a.flatMap(function(e){return Array.from(e)}),s=u.reduce(function(e,t){var n;return e[t]=(null!==(n=e[t])&&void 0!==n?n:0)+1,e},{}),c=new Set(Object.entries(s).filter(function(e){return e[1]>1}).map(function(e){return e[0]})),p=function(e){return e.map(function(e){var t;return n(n({},e),{variants:null===(t=e.variants)||void 0===t?void 0:t.map(function(e){return n(n({},e),{isLinked:!!e.link_id&&c.has(e.link_id)})})})})},m=l.map(function(e,t){var n,r=e[0],o=e[1],i=xt(r),l=Tt.find(function(e){return xt(e.tier_name)===i});return{id:null!==(n=null==l?void 0:l.tier_id)&&void 0!==n?n:String(t+1),name:Lt(r),ruleCount:o.length,description:0===t?"".concat(b("tier.subtitle","These are the system-wide learnings applied across all stations.")):"These learnings apply after higher-priority tiers and may refine or relax default behavior.",isOpen:0===t,rules:p(o)}}),(f=d.getState().createdVariantInfo)&&f.length>0?(g=Object.fromEntries(l.flatMap(function(e,t){var n,r,o=e[0],i=null!==(r=null===(n=m[t])||void 0===n?void 0:n.id)&&void 0!==r?r:String(t+1);return[[o,i],[xt(o),i],[Lt(o),i]]})),h=new Set(f.flatMap(function(e){return[e.tierName,xt(e.tierName)]}).map(function(e){return g[e]}).filter(Boolean)),y=m.map(function(e){return n(n({},e),{isOpen:e.isOpen||h.has(e.id)})}),ce(y),(T=null===(S=null===(I=null===(_=f[0])||void 0===_?void 0:_.variants)||void 0===I?void 0:I[0])||void 0===S?void 0:S.id)?setTimeout(function(){var e=document.querySelector('[data-variant-id="'.concat(T,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(function(){return me()},1e4)},500):me()):ce(m),[3,5]):(ce([]),[2]);case 3:return w=t.sent(),console.error("Failed to fetch rule details",w),404!==(null==w?void 0:w.status)&&Ue((null==w?void 0:w.message)||"Failed to load rules. Please try again."),ce([]),[3,5];case 4:return o||Pe(!1),[7];case 5:return[2]}})})},Et=ue?S((null==se?void 0:se.data)||null,ue):null,Ft=Et?{ruleSetId:Et.id,ruleSetName:Et.name,ruleSetDesc:"",ruleCount:null===(N=null==Et?void 0:Et.metrics)||void 0===N?void 0:N.learningsCount}:void 0,Vt=Boolean(null==se?void 0:se.data),Pt=Boolean(ue&&!Et&&Vt),Bt=function(){if("stations"===de)return"custom";if(!Et)return"global";switch(Et.type){case"GLOBAL":default:return"global";case"SCOPE":return"genre";case"SUBSCOPE":case"Custom":return"custom"}},Jt=function(e){var t;if(!e)return o("p",{children:b("".concat(k,".deleteDialog.description"),"Are you sure you want to delete this rule? This action cannot be undone.")});var n=null==ve?void 0:ve.flatMap(function(e){var t;return null!==(t=e.rules)&&void 0!==t?t:[]}).find(function(t){return t.ruleId===e});return o("p",{children:b("".concat(k,".deleteDialog.description"),"Are you sure you want to delete ".concat(null==n?void 0:n.ruleTitle," rule? This action cannot be undone."),{rule_title:null!==(t=null==n?void 0:n.ruleTitle)&&void 0!==t?t:""})})},Ut={flow:ke,editingRule:Se,editingTier:be,editingVariants:xe,focusedVariantIndex:Ne,setFocusedVariantIndex:Ee,triggerAddVariant:nt,triggerFixGaps:mt,isDraftFlow:ht,copiedRule:_t,copiedSourceTier:jt,copiedTargetTier:Dt,initialDraftMessage:He,app_integration_id:ie,modeId:ae};return Ft?i(l,{children:[o(y,{ref:he}),o("div",n({className:j.container},{children:Ve?o(h,{}):Je?o(w,{errorMessage:Je,onRetry:Nt}):o(T,{onAddRule:Mt,onDeleteRule:function(e){Xe(e)},onEditRule:function(e,t){Me("edit"),je(e),De(t||null),Le(e.variants||null),Ee(null),rt(!0),yt(!1),_e(!0)},onEditVariant:function(e,t,n,r){var o,i,l,a,u=null!==(l=null===(i=null===(o=null==ve?void 0:ve.find(function(e){return e.name===n}))||void 0===o?void 0:o.rules)||void 0===i?void 0:i.find(function(e){return e.ruleId===t}))&&void 0!==l?l:null==ve?void 0:ve.flatMap(function(e){return e.rules}).find(function(e){return e.ruleId===t});if(u){if(e.is_drafted)return Me("create"),je(null),De(n||null),Le([e]),Ee(0),yt(!0),void _e(!0);var s=null===(a=u.variants)||void 0===a?void 0:a.findIndex(function(t){return t.variantId===e.variantId}),d=void 0!==s&&-1!==s?s:0;Me("edit"),je(u),De(n||null),Le(u.variants||null),Ee(d),yt(!1),_e(!0),"resolve_gaps"===r&&ft(!0)}},onDeleteVariant:function(e,t){st({variantId:e,ruleId:t})},onExportRule:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l,a,u;return t(this,function(t){switch(t.label){case 0:if(!ue)return[2];Ge(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p(ue)];case 2:return e=t.sent(),n=window.URL.createObjectURL(e),(r=document.createElement("a")).href=n,i=(null==Ft?void 0:Ft.ruleSetName)?"".concat(Ft.ruleSetName.replace(/\s+/g,"_"),"_rules.csv"):"ruleset_".concat(ue,".csv"),r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n),null===(a=he.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:"Ruleset exported successfully!"})}),[3,5];case 3:return l=t.sent(),console.error("Export error:",l),null===(u=he.current)||void 0===u||u.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:l.message||"Failed to export ruleset. Please try again."})}),[3,5];case 4:return Ge(!1),[7];case 5:return[2]}})})},isExporting:We,onToggleSuccess:function(){return Nt(!0)},onReorderRules:function(n,r,i,l,a){return e(void 0,void 0,void 0,function(){var e,u,s;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,g(n,r,i,l,a)];case 1:return t.sent(),Nt(!0),null===(u=he.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:"Rule order changed successfully. Future rule applications will follow the updated order."})}),[3,3];case 2:return e=t.sent(),console.error("Failed to reorder rules:",e),Nt(!0),null===(s=he.current)||void 0===s||s.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:"Failed to update rule order. Please try again."})}),[3,3];case 3:return[2]}})})},onRefreshRuleSets:oe,setDeleteConfirmationUsedFor:lt,onCopyToTier:function(e,t,n,r,o){var i,l,a=null===(l=null===(i=null==ve?void 0:ve.find(function(e){return e.name===r}))||void 0===i?void 0:i.rules)||void 0===l?void 0:l.find(function(e){return e.ruleId===t});if(a){var u=["Add a new learning with the following details:","- Rule Title: ".concat(n),"- Description: ".concat(e.description),"- When to apply: ".concat(e.whenToApply),"- When NOT to apply: ".concat(e.whenNotToApply),"- Tier information: ".concat(o)].join("\n");$e(u),It(a),Ct(r),Rt(o),Me("create"),je(null),De(null),Le(null),Ee(null),yt(!1),_e(!0)}}})})),we&&o(D,{children:o(R,{isOpen:we,onClose:Ot,app_integration_id:ie,token:le,mode:"ADD",config:ye,pluginPayload:n(n({},Ut),{initialScope:Bt(),ruleSet:Ft}),renderContinueModal:!1})}),o(x,{}),o(C,{isOpen:!!Ke,title:b("".concat(L,".deleteDialog.title"),X),description:Jt(Ke),warning:b("".concat(L,".deleteDialog.warningText"),Z),confirmText:b("".concat(L,".deleteDialog.deleteText"),re),cancelText:b("".concat(L,".deleteDialog.cancelText"),"Cancel"),loadingText:b("".concat(L,".deleteDialog.loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!Ke)return[2];et(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,m(Ke)];case 2:return t.sent(),Xe(null),null===(n=he.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:q})}),Nt(),oe&&oe(!1,ue||void 0),[3,5];case 3:return e=t.sent(),console.error("Failed to delete rule",e),null===(r=he.current)||void 0===r||r.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||H})}),[3,5];case 4:return et(!1),[7];case 5:return[2]}})})},onCancel:function(){return Xe(null)},isLoading:Ze,position:"fixed"}),o(C,{isOpen:!!ut,title:b("".concat(A,".deleteVariant.title"),X),description:"variantDeletion"===it?o("span",{children:b("".concat(A,".deleteVariant.desc"),"Are you sure you want to delete this variant? This action cannot be undone.")}):Jt((null==ut?void 0:ut.ruleId)||null),warning:b("".concat(A,".deleteVariant.warningText"),"ruleDeletion"===it?Z:te),confirmText:b("".concat(A,".deleteDialog.deleteText"),re),cancelText:b("".concat(A,".cancelText"),"Cancel"),loadingText:b("".concat(A,".loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,n,r,i,l;return t(this,function(t){switch(t.label){case 0:if(!ut)return[2];vt(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),"ruleDeletion"!==it?[3,3]:[4,f(ut.ruleId)];case 2:return t.sent(),[3,5];case 3:return[4,m(ut.variantId)];case 4:t.sent(),t.label=5;case 5:return st(null),null===(n=he.current)||void 0===n||n.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:"ruleDeletion"===it?q:G})}),Nt(),oe&&oe(!1,ue||void 0),[3,8];case 6:return e=t.sent(),console.error("Failed to delete variant",e),null===(r=he.current)||void 0===r||r.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||("ruleDeletion"===it?H:z)})}),[3,8];case 7:return vt(!1),[7];case 8:return[2]}})})},onCancel:function(){return st(null)},isLoading:ct,position:"fixed"})]}):Pt?o(w,{title:"Scope Not Found",errorMessage:"The selected scope does not exist. Please refresh the page or choose a valid scope.",onRetry:function(){return null==oe?void 0:oe(!0)},retryButtonText:"Refresh"}):i(l,{children:[o(c,{onCreate:Mt,title:F,desc:P,button:J}),we&&o(D,{children:o(R,{isOpen:we,onClose:Ot,app_integration_id:ie,token:le,mode:"ADD",config:ye,pluginPayload:n(n({},Ut),{initialScope:Bt(),ruleSet:Ft}),renderContinueModal:!1})}),o(x,{})]})};export{O as default};
1
+ import{__awaiter as e,__generator as n,__assign as t,__spreadArray as r}from"tslib";import{jsx as o,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useRef as a,useState as u,useEffect as s}from"react";import{useLearningTemplateStore as d}from"../store/useLearningTemplateStore.js";import c from"../components/EmptyLearningState.js";import{getRulesInRuleSetById as v,exportRuleSet as p,deleteRule as m,deleteQuestion as f,alterQuestionPriority as g}from"../apis/scopeApis.js";import h from"../components/RuleContentSkeleton.js";import{Toast as y}from"primereact/toast";import T from"./ContentLogic.js";import w from"../components/ErrorStateDisplay.js";import _ from"../shared/SuccessToastContent.js";import I from"../shared/ErrorToastContent.js";import{findNodeById as S}from"../utils/treeUtils.js";import j from"../styles/LearningContent.module.css.js";import C from"../components/ConfirmationModal.js";import{dt as b}from"../store/useLMSConfigStore.js";import"../../IL-OTJ/_components/atoms/Textarea/Textarea.js";import"lucide-react";import"../../IL-OTJ/_components/InputDataReasoningCard.js";import"../../IL-OTJ/_components/TooltipComponent.js";import"../../IL-OTJ/_components/templates/TemplatesMap/templatesMap.js";import{CitationProvider as D}from"../../IL-OTJ/store/CitationsContext.js";import"@mui/material";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import"../../../api/transport.js";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"../../IL-OTJ/_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"../../IL-OTJ/_components/MarkdownComponents/MarkdownElements.js";import"../../IL-OTJ/_components/CitationLink.js";import"@e-llm-studio/citation";import R from"../../IL-OTJ/ValueTypeWrappers/TeachMePlugin.js";import x from"../../../ContinueWithTemplateModal.js";import{LEARNING_DT_PATH as L,VARIANT_DT_PATH as A,TIER_DT_PATH as k}from"../constants.js";import{useConfigStore as M}from"../store/useConfigStore.js";import"../store/usePermissionsStore.js";import"appsec-ui";import"../store/useAuthStore.js";import"../store/useEnvStore.js";import"../../IL-marketplace/marketplaceTheme.js";import"react-dom";import"@radix-ui/react-tooltip";import"../components/StationOnboarding/InputField.js";import"../config.js";import"../store/useAppSecRolesStore.js";import"@tanstack/react-query";import"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import"../AuditLog/ChangeLogDiff.js";import"react-router-dom";import"../../IL-marketplace/components/GuidelineIconButton.js";import"@e-llm-studio/federated-dashboard-components";import"@e-llm-studio/federated-dashboard-components/styles.css";import"../hooks/useLearningTemplateQueryParams.js";import"../components/ToolTip.js";import"../../../ILMarketplaceWrapper.js";import"../LearningManagementTest.js";var O=function(O){var N,E=O.noRulesTitle,F=void 0===E?"No rules have been added !":E,V=O.noRulesDesc,P=void 0===V?"Start by adding rules that should apply across all stations.":V,B=O.noRulesButtonText,J=void 0===B?"Create New Rule":B,U=O.deleteRuleSuccessMessage,q=void 0===U?"Rule deleted successfully!":U,W=O.deleteVariantSuccessMessage,G=void 0===W?"Variant deleted successfully!":W,Q=O.deleteRuleErrorMessage,H=void 0===Q?"Failed to delete rule. Please try again.":Q,$=O.deleteVariantErrorMessage,z=void 0===$?"Failed to delete variant. Please try again.":$,K=O.deleteModalTitle,X=void 0===K?"Delete":K,Y=O.deleteRuleModalWarning,Z=void 0===Y?"This will permanently delete the rule configuration.":Y,ee=O.deleteVariantModalWarning,ne=void 0===ee?"This will permanently delete the variant configuration.":ee,te=O.deleteConfirmText,re=void 0===te?"Delete":te,oe=O.onRefreshRuleSets,ie=O.app_integration_id,le=O.token,ae=O.modeId,ue=d(function(e){return e.selectedRuleSetId}),se=d(function(e){return e.scopeTreeData}),de=d(function(e){return e.sidebarTab}),ce=d(function(e){return e.setInitialRules}),ve=d(function(e){return e.currentRules}),pe=d(function(e){return e.setRawAuditRuleData});d(function(e){return e.createdVariantInfo});var me=d(function(e){return e.resetCreatedVariantInfo}),fe=d(function(e){return e.isILModalTriggered}),ge=d(function(e){return e.setIsILModalTriggered}),he=a(null),ye=M.getState().configuration,Te=u(!1),we=Te[0],_e=Te[1],Ie=u(null),Se=Ie[0],je=Ie[1],Ce=u(null),be=Ce[0],De=Ce[1],Re=u(null),xe=Re[0],Le=Re[1],Ae=u("create"),ke=Ae[0],Me=Ae[1],Oe=u(null),Ne=Oe[0],Ee=Oe[1],Fe=u(0),Ve=Fe[0],Pe=Fe[1],Be=u(!1),Je=Be[0],Ue=Be[1],qe=u(null),We=qe[0],Ge=qe[1],Qe=u(!1),He=Qe[0],$e=Qe[1],ze=u(""),Ke=ze[0],Xe=ze[1],Ye=u(null),Ze=Ye[0],en=Ye[1],nn=u(!1),tn=nn[0],rn=nn[1],on=u(!1),ln=on[0],an=on[1],un=u("ruleDeletion"),sn=un[0],dn=un[1],cn=u(null),vn=cn[0],pn=cn[1],mn=u(!1),fn=mn[0],gn=mn[1],hn=u(!1),yn=hn[0],Tn=hn[1],wn=u(!1),_n=wn[0],In=wn[1],Sn=d.getState().tiers,jn=u(null),Cn=jn[0],bn=jn[1],Dn=u(null),Rn=Dn[0],xn=Dn[1],Ln=u(null),An=Ln[0],kn=Ln[1],Mn=function(e){return String(e||"").trim().toLowerCase().replace(/\s+/g,"_").replace(/tier_?(\d+)/i,"tier_$1")},On=function(e){return Mn(e).replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()})},Nn=function(e){if(!e||"object"!=typeof e)return!1;var n=e;return Boolean(n.ruleId||n.ruleTitle||Array.isArray(n.variants))},En=function(e){var n,r,o,i,l,a,u,s,d,c=null!==(i=null!==(o=null!==(r=null!==(n=null==e?void 0:e.ruleId)&&void 0!==n?n:null==e?void 0:e.id)&&void 0!==r?r:null==e?void 0:e.questionId)&&void 0!==o?o:null==e?void 0:e.question_id)&&void 0!==i?i:"",v=null!==(d=null!==(s=null!==(u=null!==(a=null!==(l=null==e?void 0:e.ruleTitle)&&void 0!==l?l:null==e?void 0:e.title)&&void 0!==a?a:null==e?void 0:e.question_title)&&void 0!==u?u:null==e?void 0:e.originalQuestion)&&void 0!==s?s:null==e?void 0:e.question)&&void 0!==d?d:"",p=Array.isArray(null==e?void 0:e.variants)?e.variants:(null==e?void 0:e.variantId)||(null==e?void 0:e.description)||(null==e?void 0:e.ruleDesc)?[e]:[];return t(t({},e),{ruleId:c,ruleTitle:v,variants:p.map(function(e,n){var r,o,i,l,a,u,s,d,p,m,f,g,h,y,T,w,_,I,S=null!==(l=null!==(i=null!==(o=null!==(r=null==e?void 0:e.variantId)&&void 0!==r?r:null==e?void 0:e.variant_id)&&void 0!==o?o:null==e?void 0:e.id)&&void 0!==i?i:null==e?void 0:e.new_variant_id)&&void 0!==l?l:"".concat(c||"rule","-variant-").concat(n);return t(t({},e),{variantId:S,description:null!==(s=null!==(u=null!==(a=null==e?void 0:e.description)&&void 0!==a?a:null==e?void 0:e.ruleDesc)&&void 0!==u?u:null==e?void 0:e.variant)&&void 0!==s?s:"",whenToApply:null!==(m=null!==(p=null!==(d=null==e?void 0:e.whenToApply)&&void 0!==d?d:null==e?void 0:e.conditions_whentoapply)&&void 0!==p?p:null==e?void 0:e.wta)&&void 0!==m?m:"",whenNotToApply:null!==(h=null!==(g=null!==(f=null==e?void 0:e.whenNotToApply)&&void 0!==f?f:null==e?void 0:e.conditions_whennottoapply)&&void 0!==g?g:null==e?void 0:e.wnta)&&void 0!==h?h:"",variantType:null!==(T=null!==(y=null==e?void 0:e.variantType)&&void 0!==y?y:null==e?void 0:e.variant_type)&&void 0!==T?T:"variant",is_drafted:(I=null!==(w=null==e?void 0:e.is_drafted)&&void 0!==w?w:null==e?void 0:e.wasDrafted,!0===I||"true"===I||1===I||"1"===I),is_enabled:null===(_=null==e?void 0:e.is_enabled)||void 0===_||_,ruleTitle:v,title:v})})})},Fn=function(){Me("create"),je(null),Le(null),De(null),bn(null),xn(null),kn(null),Xe(""),In(!1),an(!1),Tn(!1),Ee(null),Pe(function(e){return e+1}),_e(!0)},Vn=function(){_e(!1),ge(!1),je(null),De(null),Le(null),Ee(null),an(!1),Tn(!1),In(!1),Pn(),bn(null),xn(null),kn(null),Xe(""),oe&&oe(!1,ue||void 0)};s(function(){Pn()},[ue,ce]),s(function(){fe&&_e(!0)},[fe]);var Pn=function(o){return void 0===o&&(o=!1),e(void 0,void 0,void 0,function(){var e,i,l,a,u,s,c,p,m,f,g,h,y,T,w,_,I,S;return n(this,function(n){switch(n.label){case 0:if(!ue)return ce([]),[2];o||Ue(!0),Ge(null),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,v(ue,le)];case 2:return e=n.sent(),console.log("response==",e),(null==e?void 0:e.data)&&0!==Object.keys(e.data).length?(pe(e),i=e.data,console.log("rulesData==",i),l=function(e){var n=function(e){var n,t,r,o,i=null!==(o=null!==(r=null!==(t=null!==(n=null==e?void 0:e.value)&&void 0!==n?n:null==e?void 0:e.rules)&&void 0!==t?t:null==e?void 0:e.learnings)&&void 0!==r?r:null==e?void 0:e.questions)&&void 0!==o?o:[];return Array.isArray(i)?i.filter(Nn).map(En):[]};if(Array.isArray(e))return[["tier_1",e.filter(Nn).map(En)]];if(Array.isArray(e.tiers))return r([],e.tiers,!0).sort(function(e,n){var t,r,o,i;return(null!==(r=null!==(t=e.tier_priority)&&void 0!==t?t:e.priority)&&void 0!==r?r:0)-(null!==(i=null!==(o=n.tier_priority)&&void 0!==o?o:n.priority)&&void 0!==i?i:0)}).map(function(e,t){var r,o,i;return[null!==(i=null!==(o=null!==(r=e.name)&&void 0!==r?r:e.tier_name)&&void 0!==o?o:e.tier_title)&&void 0!==i?i:"tier_".concat(t+1),n(e)]});var t=n(e);if(t.length>0)return[["tier_1",t]];var o=new Set(["ruleSetName","ruleSetDesc","created_at","updated_at","created_by","updated_by","scope_id","application_mapping_id"]);return Object.entries(e).filter(function(e){var n=e[0],t=e[1];return!o.has(n)&&Array.isArray(t)&&t.some(Nn)}).map(function(e){return[e[0],e[1].map(En)]})}(i),a=l.map(function(e){var n=e[1];return new Set(n.flatMap(function(e){var n,t;return null!==(t=null===(n=e.variants)||void 0===n?void 0:n.map(function(e){return e.link_id}).filter(Boolean))&&void 0!==t?t:[]}))}),u=a.flatMap(function(e){return Array.from(e)}),s=u.reduce(function(e,n){var t;return e[n]=(null!==(t=e[n])&&void 0!==t?t:0)+1,e},{}),c=new Set(Object.entries(s).filter(function(e){return e[1]>1}).map(function(e){return e[0]})),p=function(e){return e.map(function(e){var n;return t(t({},e),{variants:null===(n=e.variants)||void 0===n?void 0:n.map(function(e){return t(t({},e),{isLinked:!!e.link_id&&c.has(e.link_id)})})})})},m=l.map(function(e,n){var t,r=e[0],o=e[1],i=Mn(r),l=Sn.find(function(e){return Mn(e.tier_name)===i});return{id:null!==(t=null==l?void 0:l.tier_id)&&void 0!==t?t:String(n+1),name:On(r),ruleCount:o.length,description:0===n?"".concat(b("tier.subtitle","These are the system-wide learnings applied across all stations.")):"These learnings apply after higher-priority tiers and may refine or relax default behavior.",isOpen:0===n,rules:p(o)}}),(f=d.getState().createdVariantInfo)&&f.length>0?(g=Object.fromEntries(l.flatMap(function(e,n){var t,r,o=e[0],i=null!==(r=null===(t=m[n])||void 0===t?void 0:t.id)&&void 0!==r?r:String(n+1);return[[o,i],[Mn(o),i],[On(o),i]]})),h=new Set(f.flatMap(function(e){return[e.tierName,Mn(e.tierName)]}).map(function(e){return g[e]}).filter(Boolean)),y=m.map(function(e){return t(t({},e),{isOpen:e.isOpen||h.has(e.id)})}),ce(y),(T=null===(S=null===(I=null===(_=f[0])||void 0===_?void 0:_.variants)||void 0===I?void 0:I[0])||void 0===S?void 0:S.id)?setTimeout(function(){var e=document.querySelector('[data-variant-id="'.concat(T,'"]'));e&&e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(function(){return me()},1e4)},500):me()):ce(m),[3,5]):(ce([]),[2]);case 3:return w=n.sent(),console.error("Failed to fetch rule details",w),404!==(null==w?void 0:w.status)&&Ge((null==w?void 0:w.message)||"Failed to load rules. Please try again."),ce([]),[3,5];case 4:return o||Ue(!1),[7];case 5:return[2]}})})},Bn=ue?S((null==se?void 0:se.data)||null,ue):null,Jn=Bn?{ruleSetId:Bn.id,ruleSetName:Bn.name,ruleSetDesc:"",ruleCount:null===(N=null==Bn?void 0:Bn.metrics)||void 0===N?void 0:N.learningsCount}:void 0,Un=Boolean(null==se?void 0:se.data),qn=Boolean(ue&&!Bn&&Un),Wn=function(){if("stations"===de)return"custom";if(!Bn)return"global";switch(Bn.type){case"GLOBAL":default:return"global";case"SCOPE":return"genre";case"SUBSCOPE":case"Custom":return"custom"}},Gn=function(e){var n;if(!e)return o("p",{children:b("".concat(k,".deleteDialog.description"),"Are you sure you want to delete this rule? This action cannot be undone.")});var t=null==ve?void 0:ve.flatMap(function(e){var n;return null!==(n=e.rules)&&void 0!==n?n:[]}).find(function(n){return n.ruleId===e});return o("p",{children:b("".concat(k,".deleteDialog.description"),"Are you sure you want to delete ".concat(null==t?void 0:t.ruleTitle," rule? This action cannot be undone."),{rule_title:null!==(n=null==t?void 0:t.ruleTitle)&&void 0!==n?n:""})})},Qn={flow:ke,editingRule:Se,editingTier:be,editingVariants:xe,focusedVariantIndex:Ne,setFocusedVariantIndex:Ee,triggerAddVariant:ln,triggerFixGaps:yn,isDraftFlow:_n,copiedRule:Cn,copiedSourceTier:Rn,copiedTargetTier:An,initialDraftMessage:Ke,app_integration_id:ie,modeId:ae};return Jn?i(l,{children:[o(y,{ref:he}),o("div",t({className:j.container},{children:Je?o(h,{}):We?o(w,{errorMessage:We,onRetry:Pn}):o(T,{onAddRule:Fn,onDeleteRule:function(e){en(e)},onEditRule:function(e,n){Me("edit"),je(e),De(n||null),Le(e.variants||null),Ee(null),an(!0),In(!1),Tn(!1),Pe(function(e){return e+1}),_e(!0)},onEditVariant:function(e,n,t,r){var o,i,l,a,u=null!==(l=null===(i=null===(o=null==ve?void 0:ve.find(function(e){return e.name===t}))||void 0===o?void 0:o.rules)||void 0===i?void 0:i.find(function(e){return e.ruleId===n}))&&void 0!==l?l:null==ve?void 0:ve.flatMap(function(e){return e.rules}).find(function(e){return e.ruleId===n});if(u){if(e.is_drafted)return Me("create"),je(null),De(t||null),Le([e]),Ee(0),In(!0),an(!1),Tn(!1),Pe(function(e){return e+1}),void _e(!0);var s=null===(a=u.variants)||void 0===a?void 0:a.findIndex(function(n){return n.variantId===e.variantId}),d=void 0!==s&&-1!==s?s:0;Me("edit"),je(u),De(t||null),Le(u.variants||null),Ee(d),In(!1),an(!1),Tn(!1),Pe(function(e){return e+1}),_e(!0),"resolve_gaps"===r&&Tn(!0)}},onDeleteVariant:function(e,n){pn({variantId:e,ruleId:n})},onExportRule:function(){return e(void 0,void 0,void 0,function(){var e,t,r,i,l,a,u;return n(this,function(n){switch(n.label){case 0:if(!ue)return[2];$e(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,p(ue)];case 2:return e=n.sent(),t=window.URL.createObjectURL(e),(r=document.createElement("a")).href=t,i=(null==Jn?void 0:Jn.ruleSetName)?"".concat(Jn.ruleSetName.replace(/\s+/g,"_"),"_rules.csv"):"ruleset_".concat(ue,".csv"),r.download=i,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(t),null===(a=he.current)||void 0===a||a.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:"Ruleset exported successfully!"})}),[3,5];case 3:return l=n.sent(),console.error("Export error:",l),null===(u=he.current)||void 0===u||u.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:l.message||"Failed to export ruleset. Please try again."})}),[3,5];case 4:return $e(!1),[7];case 5:return[2]}})})},isExporting:He,onToggleSuccess:function(){return Pn(!0)},onReorderRules:function(t,r,i,l,a){return e(void 0,void 0,void 0,function(){var e,u,s;return n(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,g(t,r,i,l,a)];case 1:return n.sent(),Pn(!0),null===(u=he.current)||void 0===u||u.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:"Rule order changed successfully. Future rule applications will follow the updated order."})}),[3,3];case 2:return e=n.sent(),console.error("Failed to reorder rules:",e),Pn(!0),null===(s=he.current)||void 0===s||s.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:"Failed to update rule order. Please try again."})}),[3,3];case 3:return[2]}})})},onRefreshRuleSets:oe,setDeleteConfirmationUsedFor:dn,onCopyToTier:function(e,n,t,r,o){var i,l,a=null===(l=null===(i=null==ve?void 0:ve.find(function(e){return e.name===r}))||void 0===i?void 0:i.rules)||void 0===l?void 0:l.find(function(e){return e.ruleId===n});if(a){var u=["Add a new learning with the following details:","- Rule Title: ".concat(t),"- Description: ".concat(e.description),"- When to apply: ".concat(e.whenToApply),"- When NOT to apply: ".concat(e.whenNotToApply),"- Tier information: ".concat(o)].join("\n");Xe(u),bn(a),xn(r),kn(o),Me("create"),je(null),De(null),Le(null),Ee(null),In(!1),an(!1),Tn(!1),Pe(function(e){return e+1}),_e(!0)}}})})),we&&o(D,{children:o(R,{isOpen:we,onClose:Vn,app_integration_id:ie,token:le,mode:"ADD",config:ye,pluginPayload:t(t({},Qn),{initialScope:Wn(),ruleSet:Jn}),renderContinueModal:!1},Ve)}),o(x,{}),o(C,{isOpen:!!Ze,title:b("".concat(L,".deleteDialog.title"),X),description:Gn(Ze),warning:b("".concat(L,".deleteDialog.warningText"),Z),confirmText:b("".concat(L,".deleteDialog.deleteText"),re),cancelText:b("".concat(L,".deleteDialog.cancelText"),"Cancel"),loadingText:b("".concat(L,".deleteDialog.loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,t,r,i,l;return n(this,function(n){switch(n.label){case 0:if(!Ze)return[2];rn(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,m(Ze)];case 2:return n.sent(),en(null),null===(t=he.current)||void 0===t||t.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:q})}),Pn(),oe&&oe(!1,ue||void 0),[3,5];case 3:return e=n.sent(),console.error("Failed to delete rule",e),null===(r=he.current)||void 0===r||r.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||H})}),[3,5];case 4:return rn(!1),[7];case 5:return[2]}})})},onCancel:function(){return en(null)},isLoading:tn,position:"fixed"}),o(C,{isOpen:!!vn,title:b("".concat(A,".deleteVariant.title"),X),description:"variantDeletion"===sn?o("span",{children:b("".concat(A,".deleteVariant.desc"),"Are you sure you want to delete this variant? This action cannot be undone.")}):Gn((null==vn?void 0:vn.ruleId)||null),warning:b("".concat(A,".deleteVariant.warningText"),"ruleDeletion"===sn?Z:ne),confirmText:b("".concat(A,".deleteDialog.deleteText"),re),cancelText:b("".concat(A,".cancelText"),"Cancel"),loadingText:b("".concat(A,".loadingText"),"Deleting..."),confirmBgColor:"#EF4444",onConfirm:function(){return e(void 0,void 0,void 0,function(){var e,t,r,i,l;return n(this,function(n){switch(n.label){case 0:if(!vn)return[2];gn(!0),n.label=1;case 1:return n.trys.push([1,6,7,8]),"ruleDeletion"!==sn?[3,3]:[4,f(vn.ruleId)];case 2:return n.sent(),[3,5];case 3:return[4,m(vn.variantId)];case 4:n.sent(),n.label=5;case 5:return pn(null),null===(t=he.current)||void 0===t||t.show({severity:"success",sticky:!1,life:3e3,className:j.successToast,content:o(_,{message:"ruleDeletion"===sn?q:G})}),Pn(),oe&&oe(!1,ue||void 0),[3,8];case 6:return e=n.sent(),console.error("Failed to delete variant",e),null===(r=he.current)||void 0===r||r.show({severity:"error",sticky:!1,className:j.errorToast,content:o(I,{message:(null===(l=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===l?void 0:l.detail)||("ruleDeletion"===sn?H:z)})}),[3,8];case 7:return gn(!1),[7];case 8:return[2]}})})},onCancel:function(){return pn(null)},isLoading:fn,position:"fixed"})]}):qn?o(w,{title:"Scope Not Found",errorMessage:"The selected scope does not exist. Please refresh the page or choose a valid scope.",onRetry:function(){return null==oe?void 0:oe(!0)},retryButtonText:"Refresh"}):i(l,{children:[o(c,{onCreate:Fn,title:F,desc:P,button:J}),we&&o(D,{children:o(R,{isOpen:we,onClose:Vn,app_integration_id:ie,token:le,mode:"ADD",config:ye,pluginPayload:t(t({},Qn),{initialScope:Wn(),ruleSet:Jn}),renderContinueModal:!1},Ve)}),o(x,{})]})};export{O as default};
2
2
  //# sourceMappingURL=RuleContent.js.map