@e-llm-studio/instant-learning 1.3.0-alpha.6 → 1.3.0-alpha.61

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 (223) hide show
  1. package/README.md +195 -5
  2. package/dist/cjs/features/IL-OTJ/ILOTJTest.js +1 -1
  3. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
  4. package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
  5. package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
  6. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
  7. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
  8. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
  9. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
  10. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
  11. package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
  12. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
  13. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
  14. package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
  15. package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
  16. package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  17. package/dist/cjs/features/LearningManagement/AuditLog/ChangeLogDiff.js +2 -0
  18. package/dist/cjs/features/LearningManagement/AuditLog/ChangeLogDiff.js.map +1 -0
  19. package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
  20. package/dist/cjs/features/LearningManagement/LearningManagementTest.js +2 -0
  21. package/dist/cjs/features/LearningManagement/LearningManagementTest.js.map +1 -0
  22. package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
  23. package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  24. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
  25. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  26. package/dist/cjs/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
  27. package/dist/cjs/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
  28. package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
  29. package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  30. package/dist/cjs/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
  31. package/dist/cjs/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
  32. package/dist/cjs/features/LearningManagement/RuleContent/TierCard.js +1 -1
  33. package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
  34. package/dist/cjs/features/LearningManagement/Sidebar.js +1 -1
  35. package/dist/cjs/features/LearningManagement/StationsContent/StationsContent.js +1 -1
  36. package/dist/cjs/features/LearningManagement/apis/apiConfig.js +1 -1
  37. package/dist/cjs/features/LearningManagement/apis/scopeApis.js +1 -1
  38. package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js +2 -0
  39. package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js.map +1 -0
  40. package/dist/cjs/features/LearningManagement/components/ConfirmationModal.js +1 -1
  41. package/dist/cjs/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
  42. package/dist/cjs/features/LearningManagement/components/EmptyLearningState.js +1 -1
  43. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
  44. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
  45. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
  46. package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
  47. package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +2 -0
  48. package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +1 -0
  49. package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
  50. package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
  51. package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  52. package/dist/cjs/features/LearningManagement/config.js +1 -1
  53. package/dist/cjs/features/LearningManagement/constants.js +2 -0
  54. package/dist/cjs/features/LearningManagement/constants.js.map +1 -0
  55. package/dist/cjs/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
  56. package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js +2 -0
  57. package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js.map +1 -0
  58. package/dist/cjs/features/LearningManagement/store/useEnvStore.js +1 -1
  59. package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js +2 -0
  60. package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js.map +1 -0
  61. package/dist/cjs/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
  62. package/dist/cjs/features/LearningManagement/store/usePermissionsStore.js +1 -1
  63. package/dist/cjs/features/LearningManagement/styles/TierCard.module.css.js +1 -1
  64. package/dist/cjs/features/LearningManagement/utils/treeUtils.js +1 -1
  65. package/dist/cjs/index.js +1 -1
  66. package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
  67. package/dist/cjs/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
  68. package/dist/features/IL-OTJ/ILOTJTest.js +1 -1
  69. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
  70. package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
  71. package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
  72. package/dist/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
  73. package/dist/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
  74. package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
  75. package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
  76. package/dist/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
  77. package/dist/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
  78. package/dist/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
  79. package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
  80. package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
  81. package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
  82. package/dist/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  83. package/dist/features/LearningManagement/AuditLog/ChangeLogDiff.js +2 -0
  84. package/dist/features/LearningManagement/AuditLog/ChangeLogDiff.js.map +1 -0
  85. package/dist/features/LearningManagement/LearningManagement.js +1 -1
  86. package/dist/features/LearningManagement/LearningManagementTest.js +2 -0
  87. package/dist/features/LearningManagement/LearningManagementTest.js.map +1 -0
  88. package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
  89. package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  90. package/dist/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
  91. package/dist/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  92. package/dist/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
  93. package/dist/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
  94. package/dist/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
  95. package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
  96. package/dist/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
  97. package/dist/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
  98. package/dist/features/LearningManagement/RuleContent/TierCard.js +1 -1
  99. package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
  100. package/dist/features/LearningManagement/Sidebar.js +1 -1
  101. package/dist/features/LearningManagement/StationsContent/StationsContent.js +1 -1
  102. package/dist/features/LearningManagement/apis/apiConfig.js +1 -1
  103. package/dist/features/LearningManagement/apis/scopeApis.js +1 -1
  104. package/dist/features/LearningManagement/assets/Search-result(add new).svg.js +2 -0
  105. package/dist/features/LearningManagement/assets/Search-result(add new).svg.js.map +1 -0
  106. package/dist/features/LearningManagement/components/ConfirmationModal.js +1 -1
  107. package/dist/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
  108. package/dist/features/LearningManagement/components/EmptyLearningState.js +1 -1
  109. package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
  110. package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
  111. package/dist/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
  112. package/dist/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
  113. package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +2 -0
  114. package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +1 -0
  115. package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
  116. package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
  117. package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  118. package/dist/features/LearningManagement/config.js +1 -1
  119. package/dist/features/LearningManagement/constants.js +2 -0
  120. package/dist/features/LearningManagement/constants.js.map +1 -0
  121. package/dist/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
  122. package/dist/features/LearningManagement/queries/useLMSConfigQuery.js +2 -0
  123. package/dist/features/LearningManagement/queries/useLMSConfigQuery.js.map +1 -0
  124. package/dist/features/LearningManagement/store/useEnvStore.js +1 -1
  125. package/dist/features/LearningManagement/store/useLMSConfigStore.js +2 -0
  126. package/dist/features/LearningManagement/store/useLMSConfigStore.js.map +1 -0
  127. package/dist/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
  128. package/dist/features/LearningManagement/store/usePermissionsStore.js +1 -1
  129. package/dist/features/LearningManagement/styles/TierCard.module.css.js +1 -1
  130. package/dist/features/LearningManagement/utils/treeUtils.js +1 -1
  131. package/dist/index.js +1 -1
  132. package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
  133. package/dist/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
  134. package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts +597 -0
  135. package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
  136. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +1 -17
  137. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
  138. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +1 -0
  139. package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -1
  140. package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
  141. package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts +25 -0
  142. package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts.map +1 -0
  143. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts.map +1 -1
  144. package/dist/types/src/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts.map +1 -1
  145. package/dist/types/src/features/IL-OTJ/_components/index.d.ts +2 -0
  146. package/dist/types/src/features/IL-OTJ/_components/index.d.ts.map +1 -1
  147. package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
  148. package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
  149. package/dist/types/src/features/LearningManagement/AuditLog/AuditLog.d.ts.map +1 -1
  150. package/dist/types/src/features/LearningManagement/AuditLog/ChangeLogDiff.d.ts +15 -0
  151. package/dist/types/src/features/LearningManagement/AuditLog/ChangeLogDiff.d.ts.map +1 -0
  152. package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +7 -1
  153. package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
  154. package/dist/types/src/features/LearningManagement/LearningManagementTest.d.ts.map +1 -1
  155. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +1 -0
  156. package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
  157. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +1 -0
  158. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
  159. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts.map +1 -1
  160. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts +1 -0
  161. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +1 -1
  162. package/dist/types/src/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts.map +1 -1
  163. package/dist/types/src/features/LearningManagement/RuleContent/ContentLogic.d.ts.map +1 -1
  164. package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts.map +1 -1
  165. package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts +1 -0
  166. package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
  167. package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts.map +1 -1
  168. package/dist/types/src/features/LearningManagement/RuleContent/RuleTierList.d.ts.map +1 -1
  169. package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts +1 -0
  170. package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts.map +1 -1
  171. package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts.map +1 -1
  172. package/dist/types/src/features/LearningManagement/Sidebar.d.ts.map +1 -1
  173. package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts +1 -0
  174. package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts.map +1 -1
  175. package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts +8 -0
  176. package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts.map +1 -1
  177. package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +25 -3
  178. package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
  179. package/dist/types/src/features/LearningManagement/components/ConfirmationModal.d.ts +2 -1
  180. package/dist/types/src/features/LearningManagement/components/ConfirmationModal.d.ts.map +1 -1
  181. package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts +1 -0
  182. package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts.map +1 -1
  183. package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts +6 -0
  184. package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts.map +1 -1
  185. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +1 -0
  186. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
  187. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts +9 -0
  188. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
  189. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts +1 -0
  190. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map +1 -1
  191. package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts.map +1 -1
  192. package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts +12 -0
  193. package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts.map +1 -0
  194. package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts +13 -0
  195. package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts.map +1 -0
  196. package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +1 -1
  197. package/dist/types/src/features/LearningManagement/constants.d.ts +9 -0
  198. package/dist/types/src/features/LearningManagement/constants.d.ts.map +1 -0
  199. package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +2 -0
  200. package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +1 -1
  201. package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts +2 -0
  202. package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts.map +1 -0
  203. package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts +2 -0
  204. package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts.map +1 -1
  205. package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +195 -0
  206. package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -0
  207. package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts +2 -0
  208. package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts.map +1 -1
  209. package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts +2 -1
  210. package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts.map +1 -1
  211. package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts +2 -1
  212. package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts.map +1 -1
  213. package/dist/types/src/index.d.ts +1 -0
  214. package/dist/types/src/index.d.ts.map +1 -1
  215. package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts +1 -0
  216. package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts.map +1 -1
  217. package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts +2 -8
  218. package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
  219. package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts +28 -0
  220. package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts.map +1 -0
  221. package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts +1 -0
  222. package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts.map +1 -1
  223. package/package.json +9 -2
package/README.md CHANGED
@@ -1,13 +1,203 @@
1
1
  # Instant Learning Library
2
2
 
3
- Alpha Release Commands -
4
3
 
5
- 1. npm version prerelease --preid=alpha
4
+ ## Changelog
5
+ ### 1.3.0-alpha.31 - 2026, June 10th
6
+ -Hide "Copy to Tier" option
7
+ -Hide Tier Accordian in Learning Management screen
8
+ -Configuring Max hirearchy from ILKB config and its UI changes
9
+
10
+ ### 1.3.0-alpha.31 - 2026, June 10th
11
+ Backward Compatibility support for Save from AI changes
12
+
13
+ ### 1.3.0-alpha.21 - 2026, June 8th
14
+ **Permissions — Union-based access resolution**
15
+
16
+ - **Union model**: When a user holds multiple roles on the same resource (e.g. inherited group role + direct assignment), permissions from all roles are merged. If any role grants a permission, the user has it.
17
+ - **Removed**: `ROLE_HIERARCHY`, `getRolePrecedence()`, `resolveHighestRolePerResource()`, and the `resolvedData` store field are all gone.
18
+ - **`hasPermission()`** and **`hasApplicationAccess()`** now run against the raw `accessData` via a new internal `getUnionPermissionsForResource()` helper that builds a `Set` of all permissions across matching records.
19
+ - `fetchPermissions()` no longer calls the resolver — stores raw API response only.
20
+
21
+ ### 1.3.0-alpha.20 - 2026, June 8th
22
+ **TeachMe Popup — LHS Customisation via `dtt()`**
23
+
24
+ - **Chat Title**: Configurable for both Add and Edit modes via `teachMe.chatTitle` and `teachMe.chatTitleEdit`. Both support `{scope}` placeholder which is replaced at runtime with the selected scope name.
25
+ - **Welcome Message**: Configurable greeting via `teachMe.welcomeMessage`. Subtitle via `teachMe.welcomeMessageSubtitle` with full **Markdown** support rendered via `ReactMarkdown`.
26
+ - **Action Buttons**: Configurable via `teachMe.actions` array — each entry has a `label` (button text) and `value` (message sent to agent on click).
27
+ - **Textarea Placeholder**: Configurable via `teachMe.textareaPlaceholder`.
28
+ - **Backward Compatibility**: TeachMe popup customisation is supported with `backwardCompatibility` flag.
29
+
30
+ Keys added in this version:
31
+
32
+ | JSON Key | Default |
33
+ |---|---|
34
+ | `teachMe.chatTitle` | `"Teach Me OTJ - {scope} - Add Learning"` |
35
+ | `teachMe.chatTitleEdit` | `"Teach Me OTJ - {scope} - Edit Learning"` |
36
+ | `teachMe.welcomeMessageSubtitle` | `"How would you like to get started?..."` |
37
+ | `teachMe.actions` | Array of `{ label, value }` — see sample JSON in v17 |
38
+ | `teachMe.textareaPlaceholder` | `"Tell me more about this learning.."` |
39
+
40
+ ### 1.3.0-alpha.19 - 2026, June 6th
41
+ - **Cognitive Compare UI**: Updated comparison UI with visual changes
42
+ - **GraphQL Params**: `userDetails` object is now passed through as a GraphQL parameter
43
+
44
+ ### 1.3.0-alpha.18 - 2026, June 6th
45
+ Patch Fix: Removal of underscore for all labels
46
+
47
+ ### 1.3.0-alpha.17 - 2026, June 6th
48
+ **Without BackwardCompatibiltity Support**
49
+ - **TeachMe Renderer**: Added valuetype json support to render teachMe popup and create rule from the same.
50
+
51
+ **Configurable UI via `dtt()`** — all LHS labels in the TeachMe popup are driven by `value_type_config.teachMe` JSON loaded per `appIntegrationId` and resolved at runtime through the `dtt()` helper.
52
+
53
+ **Supported keys:**
54
+
55
+ | JSON Key | Default |
56
+ |---|---|
57
+ | `teachMe.welcomeMessage` | `"Hi! 👋 I'm your Instant Learning Concierge."` |
58
+ | `teachMe.formTitle` | `"Rule setup"` |
59
+ | `teachMe.setupLabel` | `"Configure your IL"` |
60
+ | `teachMe.ruleTitle` | `"Main Rule Name"` |
61
+ | `teachMe.scopeLabel` | `"Define Scope"` |
62
+ | `teachMe.tierLabel` | `"Select Tiers"` |
63
+ | `teachMe.ruleDescriptionTitle` | `"Learning Explanation"` |
64
+ | `teachMe.whenToApplyTitle` | `"Trigger Events (When to Apply)"` |
65
+ | `teachMe.addWhenToApplyBtnLabel` | `"Add WTA"` |
66
+ | `teachMe.whenNotToApplyTitle` | `"Exclusion Events (When NOT to Apply)"` |
67
+ | `teachMe.addWhenNotToApplyBtnLabel` | `"Add WNTA"` |
68
+ | `teachMe.configTitle` | `"Advanced Settings"` |
69
+ | `teachMe.saveBtnLabel` | `"Save Rule"` |
70
+ | `teachMe.saveBtnLoadingLabel` | `"Saving Rule..."` |
71
+ | `teachMe.showConfiguration` | `false` |
72
+ | `teachMe.showScope` | `false` |
73
+
74
+ **Full sample `value_type_config` JSON:**
75
+
76
+ ```json
77
+ {
78
+ "template": "Default",
79
+ "teachMe": {
80
+ "welcomeMessage": "Hi! 👋 I'm your Instant Learning Concierge.",
81
+ "welcomeMessageSubtitle": "How would you like to get started?\nYou can select an option below or **describe the rule** you'd like to create.",
82
+ "actions": [
83
+ { "label": "Separation rule", "value": "I would want to add a separation rule" },
84
+ { "label": "Max priority rule", "value": "I would want to set a max priority rule" },
85
+ { "label": "Break code matching", "value": "I would want to add a break code matching rule" },
86
+ { "label": "Inventory code matching", "value": "I would want to add a inventory window matching rule" },
87
+ { "label": "Enter a rule description", "value": "I want to add a rule description" },
88
+ { "label": "Tester Genie", "value": "Loading prompt..." }
89
+ ],
90
+ "chatTitle": "Teach Me OTJ - {scope} - Add Learning",
91
+ "chatTitleEdit": "Teach Me OTJ - {scope} - Edit Learning",
92
+ "formTitle": "Rule Setup",
93
+ "setupLabel": "Configure your IL",
94
+ "ruleTitle": "Main Rule Name",
95
+ "scopeLabel": "Define Scope",
96
+ "tierLabel": "Select Tiers",
97
+ "ruleDescriptionTitle": "Learning Explanation",
98
+ "whenToApplyTitle": "Trigger Events (When to Apply)",
99
+ "addWhenToApplyBtnLabel": "Add WTA",
100
+ "whenNotToApplyTitle": "Exclusion Events (When NOT to Apply)",
101
+ "addWhenNotToApplyBtnLabel": "Add WNTA",
102
+ "configTitle": "Advanced Settings",
103
+ "saveBtnLabel": "Save Rule",
104
+ "saveBtnLoadingLabel": "Saving Rule...",
105
+ "textareaPlaceholder": "Tell me more about this learning..",
106
+ "showConfiguration": false,
107
+ "showScope": false
108
+ },
109
+ "learningManagement": {}
110
+ }
111
+ ```
112
+
113
+ > ⚠️ **Important**: The `template` key at the root of `value_type_config` **must** be provided for any JSON customisation to take effect. Without it, the system falls back to resolving the renderer via `value_type_name` from the API, and config values may not be applied.
114
+ >
115
+ > ```json
116
+ > {
117
+ > "template": "Default"
118
+ > }
119
+ > ```
120
+ >
121
+ > The value must exactly match a key registered in `TemplateRegistry`:
122
+ >
123
+ > | `template` value | Renderer |
124
+ > |---|---|
125
+ > | `"Default"` | `DefaultTeachMeRenderer` |
126
+ > | `"Radio Traffic Learning"` | `RadioTrafficLearningRenderer` |
127
+ > | `"Guidelines"` | `GuidelinesTeachMeRenderer` |
128
+ >
129
+ > For custom plugins, use the exact key you registered in `TemplateRegistry` in `TeachMePlugin.tsx`:
130
+ >
131
+ > ```ts
132
+ > export const TemplateRegistry: Record<string, React.FC<TeachMeWrapperProps>> = {
133
+ > "Default": DefaultTeachMeRenderer,
134
+ > "Radio Traffic Learning": RadioTrafficLearningRenderer,
135
+ > "Guidelines": GuidelinesTeachMeRenderer,
136
+ > "Your Template Name": YourCustomRenderer, // ← use this exact string in "template"
137
+ > };
138
+ > ```
139
+ >
140
+ > If the provided `template` value is not found in `TemplateRegistry`, the system automatically falls back to `"Default"`.
141
+
142
+ - **Learning Management Renderer**: Added valuetype json support to render Learning Management Screen and create rule from the same.
143
+
144
+ **Configurable UI via `dt()`**
145
+
146
+ The LMS UI is driven by a remote JSON config loaded per `appIntegrationId`. Every label, button text, and dialog copy is resolved at runtime through the `dt()` helper instead of being hardcoded.
147
+
148
+ `dt()` — read a config value anywhere
149
+
150
+ ```ts
151
+ function dt(
152
+ path: string, // dot-notation key into LMSConfig
153
+ fallback?: string, // returned when key is missing
154
+ params?: Record<string, string | number> // fills {placeholder} tokens in the value
155
+ ): string
156
+ ```
157
+
158
+ - Reads directly from the Zustand store (no hook — works outside React components).
159
+ - Returns `fallback ?? path` when the key is not found or config is not loaded.
160
+
161
+ **Examples:**
162
+
163
+ ```ts
164
+ dt('pageTitle')
165
+ // → value of lmsConfig.pageTitle
166
+
167
+ dt('middleDrawer.addScope', 'Add Scope')
168
+ // → config value or fallback 'Add Scope'
169
+
170
+ dt('learnings.tier.deleteDialog.title', 'Delete {N} learnings', { N: 3 })
171
+ // → "Delete 3 learnings" (placeholder replaced)
172
+
173
+ dt('learnings.tier.learning.approveDialog.desc', undefined, { variant_name: 'Rule A' })
174
+ // → config string with {variant_name} replaced by "Rule A"
175
+ ```
176
+
177
+ ### 1.3.0-alpha.16 - 2026, June 5th
178
+ - **Scope Management**: Added appIntegrationId support to scope creation and deletion flows in AddScopeModal and related API endpoints
179
+ - **Override History**: Included appIntegrationId when fetching override history to ensure correct integration context
180
+ - **Rule Retrieval**: Added appIntegrationId support when fetching rules by ruleId
181
+ - **Scope Deletion**: Fixed deletion logic for station scopes so that associated stations are correctly removed when type = station
182
+
183
+ ### 1.3.0-alpha.15 - 2026, June 5th
184
+ - **Teach Me Renderer**: Modified default Teach Me renderer — switched from generic renderer to Radio Traffic value type renderer to support rule creation flow
185
+
186
+ ### 1.3.0-alpha.14 - 2026, June 5th
187
+ - **IL Mode - Scope Creation**: `parentScopeId` now correctly receives the parent scope's ID (global ID) when creating a new scope from a child node, instead of always being `null`
188
+ - **Auth Fallback**: Added optional chaining (`?.`) on `userDetails.accessToken` to prevent crashes on reload
189
+ - **Access Section**: Fixed logic that was hiding the Access section — it is now always visible regardless of `backwardCompatibility` flag
190
+
191
+ ---
192
+
193
+ ## Alpha Release Commands
194
+
195
+ 1. npm version prerelease --preid=alpha
6
196
 
7
197
  becomes 0.0.0-alpha.0
8
198
 
9
- 2. run this again to bump it : npm version prerelease --preid=alpha
199
+ 2. run this again to bump it: npm version prerelease --preid=alpha
10
200
 
11
- 3. during publish : npm publish --tag alpha
201
+ 3. during publish: npm publish --tag alpha
12
202
 
13
- 4. installation : npm install @e-llm-studio/instant-learning@0.1.0-alpha.1
203
+ 4. installation: npm install @e-llm-studio/instant-learning@0.1.0-alpha.1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib");require("react/jsx-runtime"),require("@mui/material"),require("lucide-react"),require("react"),require("uuid"),require("./_components/templates/TemplatesMap/templatesMap.js"),require("@mui/material/Tooltip"),require("react-markdown"),require("rehype-raw");var r=require("axios");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@e-llm-studio/streaming-response"),require("@e-llm-studio/watch-me-work"),require("./_components/ChatComponents/ChatHeader.js"),require("remark-gfm"),require("./_components/MarkdownComponents/MarkdownElements.js"),require("./_components/CitationLink.js"),require("@e-llm-studio/citation"),require("./store/CitationsContext.js"),require("@viswa-test/test-citation");var i=t(r);exports.getVariantInfo=function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i.default.post("https://devllmstudio.creativeworkspace.ai/instant_learning/give-variant-info",r)];case 1:return[2,e.sent().data];case 2:throw t=e.sent(),console.error("Error getting variant info:",t),t;case 3:return[2]}})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib");require("react/jsx-runtime"),require("@mui/material"),require("lucide-react"),require("react"),require("uuid"),require("./_components/templates/TemplatesMap/templatesMap.js"),require("@mui/material/Tooltip"),require("react-markdown"),require("rehype-raw");var t=require("axios");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@e-llm-studio/streaming-response"),require("@e-llm-studio/watch-me-work"),require("./_components/ChatComponents/ChatHeader.js"),require("remark-gfm"),require("./_components/MarkdownComponents/MarkdownElements.js"),require("./_components/CitationLink.js"),require("@e-llm-studio/citation"),require("./store/CitationsContext.js"),require("@viswa-test/test-citation");var n=i(t);exports.dummyDat=[[{intent_output:{nodes:{title:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"intent_in_learning_title"},comparison_inputs:{existing_variant:{title:"Title",content:"Order Separation",additional_attributes:null},new_variant:{title:"Title",content:"Order Separation",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"No Deviation Found",deviation_explanation:["1. Both base section and compare section are semantically identical — no deviations were found."],evaluation_outputs:{name:"labelling_criteria",output_value:"100% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. Both base section and compare section are exactly the same — no semantic deviation exists between them."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{}}},learning_description_intent:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"intent_in_learning_description"},comparison_inputs:{existing_variant:{title:"Description",content:"Maintains a minimum separation of 15 minutes between ads with the same order number.",additional_attributes:null},new_variant:{title:"Description",content:"Maintains a minimum separation of 10 minutes between ads with the same order number.",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Separation Interval Reduced",deviation_explanation:["1. The Description from Variant you are creating reduces the required separation interval between ads with the same order number to 10 minutes, which is a less restrictive enforcement than the 15-minute standard in the Existing variant.","2. The Variant you are creating lacks the 15-minute minimum separation threshold required by the Existing variant, thereby narrowing the buffer period between identical order ads."],evaluation_outputs:{name:"labelling_criteria",output_value:"90% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The Description from Variant you are creating specifies a 10-minute separation interval while the Description from Existing variant mandates a 15-minute interval","2. Both entities share the same underlying intent of maintaining separation between ads with the same order number, but the rule-defining numerical threshold differs, triggering the 90% Conflict criteria"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{0:{existing_variant:"15 minutes",new_variant:"10 minutes",deviation_summary:""}}}},overall_comparison:{next:{0:"title",1:"learning_description_intent"},skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"aggregated",execution_mode:"per_node",criterion_set_id:"intent_overall_compare"},comparison_inputs:{existing_variant:{title:"Existing learning",content:null,additional_attributes:null},new_variant:{title:"Learning You 're Creating",content:null,additional_attributes:null}},mapping_rationale:null,decision_scope_title:"Is the learning's intent matching?",decision_scope_description:"Checking if the intent of the learning you are creating is conflicting with the the existing learning.",evaluation_result:{deviation_title:"Separation Interval Reduced",deviation_explanation:["1. The reduction of the separation interval in the Description from Variant you are creating to 10 minutes creates a less restrictive enforcement compared to the 15-minute standard in the Description from Existing variant, potentially increasing ad frequency.","2. The Description from Variant you are creating lacks the 15-minute minimum separation threshold mandated by the Description from Existing variant, thereby narrowing the buffer period between ads with the same order number."],evaluation_outputs:{name:"labelling_criteria",output_value:"1% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The Title from Variant you are creating and the Title from Existing variant are semantically identical ([Title from Variant you are contributing to the overall intent alignment.","2. The Description from Variant you are creating specifies a 10-minute interval while the Description from Existing variant mandates a 15-minute interval ([Description from Variant you are which represents the primary behavioral divergence.","3. The aggregated evaluation reflects the high degree of alignment in the title and the specific numerical threshold difference in the description, resulting in the final conflict classification ([Description from Variant you are"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null}}}},documents:{existing_variant:{role:"reference",title:"Existing variant | tier1",metadata:{file_name:null},mime_type:null,source_uri:null},new_variant:{role:"source",title:"Variant you are creating | tier1",metadata:{file_name:null},mime_type:null,source_uri:null}},base_root_id:"overall_comparison",input_index_map:{0:"new_variant",1:"existing_variant"},evaluation_criteria:{"criteria-uuid1":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the overall intent by combining the results from learning title comparison and learning description comparison. Always assign the output_label as 'Conflict'. The final output_percentage must be calculated using weighted averaging where intent_in_learning_title contributes 20% (0.2 weightage) and intent_in_learning_description contributes 80% (0.8 weightage). The percentage should not be determined independently and must be derived from the child comparison results. A higher weighted score indicates greater intent overlap, while a lower weighted score indicates less overlap. Use the computed weighted average as the final Conflict percentage.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"intent_overall_compare"},"criteria-uuid2":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the learning titles semantically. Always assign the output_label as 'Conflict'. Use 100% Conflict when both titles convey exactly the same meaning and intent. Use 50% Conflict when the titles partially overlap in meaning but are not exact matches. Use 0% Conflict when the titles represent different meanings with no meaningful overlap. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"intent_in_learning_title"},"criteria-uuid3":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the tiers. Always assign the output_label as 'Conflict'. Use 100% Conflict when the tiers are exactly the same. Use 50% Conflict when both are of different tiers. Use 0% Conflict when the tiers are completely different.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"match_in_tier"},"criteria-uuid4":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the learning descriptions primarily based on rule-defining properties such as thresholds, limits, numerical values, conditions, or any property that directly defines the behavior of the rule. Always assign the output_label as 'Conflict'. If both learnings contain rule-defining properties and all such properties match exactly, assign 100% Conflict. If both learnings represent the same underlying intent but one or more rule-defining properties differ, assign exactly 90% Conflict. If no rule-defining properties exist in either learning, determine the Conflict percentage based on semantic similarity of the descriptions. Intermediate percentages may be used only when evaluating semantic similarity in cases where rule-defining properties do not exist.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"intent_in_learning_description"}}}},{behaviour_output:{nodes:{learning_description_behavior:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"behaviour_in_learning_description"},comparison_inputs:{existing_variant:{title:"Behavior",content:"Maintains a minimum separation of 15 minutes between ads with the same order number.",additional_attributes:null},new_variant:{title:"Behavior",content:"Maintains a minimum separation of 10 minutes between ads with the same order number.",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Separation duration reduced",deviation_explanation:["1. The Behavior from Variant you are creating reduces the mandatory separation interval between ads with the same order number, which weakens the enforcement standard compared to the Existing variant.","2. The Variant you are creating specifies a 10-minute separation threshold, whereas the Existing variant requires a more restrictive 15-minute separation threshold."],evaluation_outputs:{name:"labelling_criteria",output_value:"0% Conflict"},cognitive_decisioning:{decisioning_factors:["1. The Behavior from Variant you are creating defines a 10-minute separation threshold while the Behavior from Existing variant defines a 15-minute threshold","2. As per the criteria, any difference in rule-defining properties such as numerical thresholds results in 0% Conflict"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{0:{existing_variant:"15 minutes",new_variant:"10 minutes",deviation_summary:""}}}},"conditions-uuid12":{next:{0:"when_to_apply",1:"when_not_to_apply"},skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"aggregated",execution_mode:"per_node",criterion_set_id:"conditions_compare"},comparison_inputs:{existing_variant:{title:"Conditions",content:null,additional_attributes:null},new_variant:{title:"Conditions",content:null,additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Targeting scope expanded",deviation_explanation:["1. The expanded targeting scope in the Conditions from Variant you are creating increases the operational reach by including an additional advertiser, Audacy, which is not present in the Conditions from Existing variant.","2. The Conditions from Variant you are creating relaxes the restrictive targeting logic found in the Conditions from Existing variant by permitting application for both Audacy and KYKY instead of limiting it solely to KYKY."],evaluation_outputs:{name:"labelling_criteria",output_value:"50% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The 'When to apply' evaluation confirms that the Conditions from Variant you are creating broadens the targeting scope compared to the Conditions from Existing variant, resulting in a 50% Conflict classification.","2. The 'When NOT to apply' evaluation indicates that both the Conditions from Variant you are creating and the Conditions from Existing variant define no exemptions, leading to an N/A classification that defaults the aggregated result to the 'When to apply' outcome."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null}}},overall_comparison:{next:{0:"learning_description_behavior",1:"conditions-uuid12"},skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"aggregated",execution_mode:"per_node",criterion_set_id:"behavior_compare"},comparison_inputs:{existing_variant:{title:"Existing learning",content:null,additional_attributes:null},new_variant:{title:"Learning You 're Creating",content:null,additional_attributes:null}},mapping_rationale:null,decision_scope_title:"Is the learning 's behaviour matching?",decision_scope_description:"Checking if the behaviour of the learning you are trying to create is conflicting with the existing learning",evaluation_result:{deviation_title:"Operational scope altered",deviation_explanation:["1. The cumulative impact of the reduced separation interval and expanded targeting scope in the Learning You're Creating results in a less restrictive operational workflow compared to the Existing learning.","2. The Behavior from Learning You're Creating shortens the mandatory ad separation duration, while the Conditions from Learning You're Creating broadens the targeting scope to include additional advertisers not present in the Existing learning."],evaluation_outputs:{name:"labelling_criteria",output_value:"25% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The Behavior from Learning You're Creating defines a 10-minute separation threshold while the Behavior from Existing learning defines a 15-minute threshold, which the child evaluation classifies as a 0% Conflict","2. The Conditions from Learning You're Creating broadens the targeting scope to include additional advertisers, which the child evaluation classifies as a 50% Conflict","3. The final classification reflects the synthesis of these two findings, where the behavioral reduction and targeting expansion collectively result in a 25% Conflict."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null}}},when_to_apply:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"behavior_in_when_to_apply"},comparison_inputs:{existing_variant:{title:"When to apply",content:"When the advertiser is KYKY",additional_attributes:null},new_variant:{title:"When to apply",content:"When the advertiser is Audacy or KYKY",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Targeting scope expanded",deviation_explanation:["1. The 'When to apply' condition from the Variant you are creating broadens the targeting scope by including an additional advertiser, Audacy, which is absent in the 'When to apply' condition from the Existing variant.","2. The Variant you are creating lacks the restrictive targeting logic present in the Existing variant, as it permits application for both Audacy and KYKY rather than limiting it solely to KYKY."],evaluation_outputs:{name:"labelling_criteria",output_value:"50% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The 'When to apply' condition from the Variant you are creating includes 'Audacy or KYKY', whereas the 'When to apply' condition from the Existing variant is restricted to 'KYKY'.","2. Because the Variant you are creating includes the advertiser from the Existing variant but adds an additional one, there is a partial overlap in targeting logic, justifying a 50% Conflict classification as per the criteria."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{0:{existing_variant:"When the advertiser is KYKY",new_variant:"When the advertiser is Audacy or KYKY",deviation_summary:""}}}},when_not_to_apply:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"behavior_in_when_not_to_apply"},comparison_inputs:{existing_variant:{title:"When NOT to apply",content:"No Exemptions",additional_attributes:null},new_variant:{title:"When NOT to apply",content:"No Exemptions",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"No Exclusion Conditions",deviation_explanation:["1. The 'When NOT to apply' section from Variant you are creating defines no exclusion conditions, which aligns with the operational standard of the 'When NOT to apply' section from Existing variant.","2. Both variants lack specific exclusion logic, resulting in an N/A classification as per the evaluation criteria."],evaluation_outputs:{name:"labelling_criteria",output_value:"N/A"},cognitive_decisioning:{decisioning_factors:["1. The 'When NOT to apply' section from Variant you are creating explicitly states 'No Exemptions'","2. The 'When NOT to apply' section from Existing variant also states 'No Exemptions'","3. Since neither variant defines active exclusion conditions, the criteria mandate an N/A result"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{}}}},documents:{existing_variant:{role:"reference",title:"Existing variant | tier1",metadata:{file_name:null},mime_type:null,source_uri:null},new_variant:{role:"source",title:"Variant you are creating | tier1",metadata:{file_name:null},mime_type:null,source_uri:null}},base_root_id:"overall_comparison",input_index_map:{0:"new_variant",1:"existing_variant"},evaluation_criteria:{"criteria-uuid1":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the overall behavior of both learnings. Always assign the output_label as 'Conflict'. Use 100% Conflict when both learnings express exactly the same behavior and meaning. Use 50% Conflict when the learnings partially overlap in behavior, scope, or meaning. Use 0% Conflict when the learnings represent different behaviors with no meaningful overlap. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"default_criteria"},"criteria-uuid2":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare only the rule-defining properties that determine the behavior of the learning, such as thresholds, limits, numerical values, conditions, or any property that directly governs execution of the rule. Always assign the output_label as 'Conflict'. If all rule-defining properties match exactly, assign 100% Conflict. If any rule-defining property differs, assign 0% Conflict. No intermediate percentages should be used for this comparison. The evaluation should focus exclusively on rule-defining properties and not on general semantic similarity.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"behaviour_in_learning_description"},"criteria-uuid3":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the 'When to apply' conditions. Always assign the output_label as 'Conflict'. Use 100% Conflict when all conditions, entities, entity types, and logical relationships match exactly. Use 50% Conflict when there is partial overlap between the conditions. Use 0% Conflict when the conditions are completely different or have no meaningful overlap. If one condition is global in scope and the other is specific in scope, the result must be treated as 0% Conflict. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"behavior_in_when_to_apply"},"criteria-uuid4":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the 'When NOT to apply' conditions. Always assign the output_label as 'Conflict'. Use 100% Conflict when all exclusion conditions, entities, entity types, and logical relationships match exactly. Use 50% Conflict when there is partial overlap between exclusion conditions. Use 0% Conflict when exclusion conditions are completely different or have no meaningful overlap. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"},{metadata:{label_color:"#475569"},description:"Assign the output_label as 'N/A' when exclusion conditions are not defined in one or both learnings. When N/A is assigned, no output_percentage should be provided. The result should contain only the label 'N/A'.",output_label:"N/A",output_template:"{output_percentage} {output_label}",output_percentage:""}]},criteria_set_id:"behavior_in_when_not_to_apply"},"criteria-uuid5":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the combined conditions from both 'When to apply' and 'When NOT to apply'. Always assign the output_label as 'Conflict'. The final output_percentage must be calculated using weighted averaging where behavior_in_when_to_apply contributes 80% (0.8 weightage) and behavior_in_when_not_to_apply contributes 20% (0.2 weightage). If When NOT to apply is labelled as N/A, the comparison should rely entirely on the When to apply result. The percentage should not be independently determined and must be derived from the weighted child comparison results.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"conditions_compare"},"criteria-uuid6":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the overall learning behavior by combining the learning behavior description comparison and the conditions comparison. Always assign the output_label as 'Conflict'. The final output_percentage must be calculated using weighted averaging where behaviour_in_learning_description contributes 50% (0.5 weightage) and conditions_compare contributes 50% (0.5 weightage). The percentage should not be determined independently and must be derived from the child comparison results. Exact matches in both components should result in 100% Conflict, while complete differences in both components should result in 0% Conflict. All intermediate values should be derived from the weighted average of the two components.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"behavior_compare"}},final_score:"59% Conflict",rule_id:"2873566e-9232-4c3a-bfc9-17f1483162e2"}}],[{intent_output:{nodes:{title:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"intent_in_learning_title"},comparison_inputs:{existing_variant:{title:"Title",content:"Order Separation",additional_attributes:null},new_variant:{title:"Title",content:"Order Separation",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"No Deviation Found",deviation_explanation:["1. Both base section and compare section are semantically identical — no deviations were found."],evaluation_outputs:{name:"labelling_criteria",output_value:"100% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. Both base section and compare section are exactly the same — no semantic deviation exists between them."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{}}},learning_description_intent:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"intent_in_learning_description"},comparison_inputs:{existing_variant:{title:"Description",content:"Maintains a minimum separation of 5 minutes between ads with the same order number.",additional_attributes:null},new_variant:{title:"Description",content:"Maintains a minimum separation of 10 minutes between ads with the same order number.",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Separation Duration Reduced",deviation_explanation:["1. The Description from Variant you are creating reduces the required separation interval between ads with the same order number to 5 minutes, which is a more permissive operational threshold than the 10-minute standard in the Existing variant.","2. The Variant you are creating lacks the stricter 10-minute separation enforcement required by the Existing variant, thereby narrowing the buffer period for ad delivery.","3. This change in the threshold directly alters the behavioral enforcement of the rule, resulting in a deviation from the established operational standard."],evaluation_outputs:{name:"labelling_criteria",output_value:"90% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The Description from Variant you are creating specifies a 5-minute separation interval while the Description from Existing variant mandates a 10-minute interval","2. Both entities share the same underlying intent of maintaining separation between ads with the same order number, but the rule-defining numerical threshold differs","3. Per the criteria, when intent matches but rule-defining properties differ, the classification must be exactly 90% Conflict"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{0:{existing_variant:"5 minutes",new_variant:"10 minutes",deviation_summary:""}}}},overall_comparison:{next:{0:"title",1:"learning_description_intent"},skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"aggregated",execution_mode:"per_node",criterion_set_id:"intent_overall_compare"},comparison_inputs:{existing_variant:{title:"Existing learning",content:null,additional_attributes:null},new_variant:{title:"Learning You 're Creating",content:null,additional_attributes:null}},mapping_rationale:null,decision_scope_title:"Is the learning's intent matching?",decision_scope_description:"Checking if the intent of the learning you are creating is conflicting with the the existing learning.",evaluation_result:{deviation_title:"Separation Duration Reduced",deviation_explanation:["1. The Description from Variant you are creating reduces the required separation interval between ads with the same order number to 5 minutes, which is a more permissive operational threshold than the 10-minute standard in the Existing variant.","2. The Description from Variant you are creating lacks the stricter 10-minute separation enforcement required by the Existing variant, thereby narrowing the buffer period for ad delivery.","3. This change in the threshold directly alters the behavioral enforcement of the rule, resulting in a deviation from the established operational standard."],evaluation_outputs:{name:"labelling_criteria",output_value:"92% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The Title from Variant you are creating and the Title from Existing variant are semantically identical, confirming full alignment in the learning's primary identifier ([Title from Variant you are","2. The Description from Variant you are creating introduces a 5-minute separation threshold, whereas the Description from Existing variant mandates a 10-minute interval, representing a clear divergence in operational enforcement ([Description from Variant you are [Description from Existing","3. The aggregated evaluation reflects the high degree of alignment in the learning title alongside the specific numerical divergence in the description, resulting in the final conflict classification."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null}}}},documents:{existing_variant:{role:"reference",title:"Existing variant | tier1",metadata:{file_name:null},mime_type:null,source_uri:null},new_variant:{role:"source",title:"Variant you are creating | tier1",metadata:{file_name:null},mime_type:null,source_uri:null}},base_root_id:"overall_comparison",input_index_map:{0:"new_variant",1:"existing_variant"},evaluation_criteria:{"criteria-uuid1":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the overall intent by combining the results from learning title comparison and learning description comparison. Always assign the output_label as 'Conflict'. The final output_percentage must be calculated using weighted averaging where intent_in_learning_title contributes 20% (0.2 weightage) and intent_in_learning_description contributes 80% (0.8 weightage). The percentage should not be determined independently and must be derived from the child comparison results. A higher weighted score indicates greater intent overlap, while a lower weighted score indicates less overlap. Use the computed weighted average as the final Conflict percentage.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"intent_overall_compare"},"criteria-uuid2":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the learning titles semantically. Always assign the output_label as 'Conflict'. Use 100% Conflict when both titles convey exactly the same meaning and intent. Use 50% Conflict when the titles partially overlap in meaning but are not exact matches. Use 0% Conflict when the titles represent different meanings with no meaningful overlap. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"intent_in_learning_title"},"criteria-uuid3":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the tiers. Always assign the output_label as 'Conflict'. Use 100% Conflict when the tiers are exactly the same. Use 50% Conflict when both are of different tiers. Use 0% Conflict when the tiers are completely different.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"match_in_tier"},"criteria-uuid4":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the learning descriptions primarily based on rule-defining properties such as thresholds, limits, numerical values, conditions, or any property that directly defines the behavior of the rule. Always assign the output_label as 'Conflict'. If both learnings contain rule-defining properties and all such properties match exactly, assign 100% Conflict. If both learnings represent the same underlying intent but one or more rule-defining properties differ, assign exactly 90% Conflict. If no rule-defining properties exist in either learning, determine the Conflict percentage based on semantic similarity of the descriptions. Intermediate percentages may be used only when evaluating semantic similarity in cases where rule-defining properties do not exist.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"intent_in_learning_description"}}}},{behaviour_output:{nodes:{learning_description_behavior:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"behaviour_in_learning_description"},comparison_inputs:{existing_variant:{title:"Behavior",content:"Maintains a minimum separation of 5 minutes between ads with the same order number.",additional_attributes:null},new_variant:{title:"Behavior",content:"Maintains a minimum separation of 10 minutes between ads with the same order number.",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Separation Duration Reduced",deviation_explanation:["1. The Variant you are creating enforces a 10-minute separation interval, which broadens the separation enforcement compared to the Existing variant's 5-minute requirement.","2. The Variant you are creating lacks the 5-minute threshold defined in the Existing variant, resulting in a more restrictive operational behavior."],evaluation_outputs:{name:"labelling_criteria",output_value:"0% Conflict"},cognitive_decisioning:{decisioning_factors:["1. The Behavior from Variant you are creating specifies a 10-minute separation interval whereas the Behavior from Existing variant specifies a 5-minute interval","2. As per the criteria, any difference in rule-defining properties such as numerical thresholds results in 0% Conflict"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{0:{existing_variant:"5 minutes",new_variant:"10 minutes",deviation_summary:""}}}},"conditions-uuid12":{next:{0:"when_to_apply",1:"when_not_to_apply"},skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"aggregated",execution_mode:"per_node",criterion_set_id:"conditions_compare"},comparison_inputs:{existing_variant:{title:"Conditions",content:null,additional_attributes:null},new_variant:{title:"Conditions",content:null,additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Targeting scope expanded",deviation_explanation:["1. The 'When to apply' condition from Variant you are creating broadens the targeting scope by including an additional advertiser, KYKY, which is absent in the 'When to apply' condition from Existing variant, potentially increasing the volume of applicable learning instances.","2. The 'When to apply' condition from Variant you are creating introduces a disjunctive logical relationship that is not present in the 'When to apply' condition from Existing variant.","3. The 'When NOT to apply' section from Variant you are creating lacks any exclusion logic, maintaining consistency with the 'When NOT to apply' section from Existing variant."],evaluation_outputs:{name:"labelling_criteria",output_value:"50% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The 'When to apply' condition from Variant you are creating includes 'Audacy or KYKY' whereas the 'When to apply' condition from Existing variant is restricted to 'Audacy'","2. The 'When NOT to apply' section from Variant you are creating and the 'When NOT to apply' section from Existing variant both specify 'No Exemptions' resulting in an N/A classification for that component.","3. As the 'When NOT to apply' component is N/A, the final aggregated classification relies entirely on the 'When to apply' result, which identifies a partial targeting overlap"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null}}},overall_comparison:{next:{0:"learning_description_behavior",1:"conditions-uuid12"},skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"aggregated",execution_mode:"per_node",criterion_set_id:"behavior_compare"},comparison_inputs:{existing_variant:{title:"Existing learning",content:null,additional_attributes:null},new_variant:{title:"Learning You 're Creating",content:null,additional_attributes:null}},mapping_rationale:null,decision_scope_title:"Is the learning 's behaviour matching?",decision_scope_description:"Checking if the behaviour of the learning you are trying to create is conflicting with the existing learning",evaluation_result:{deviation_title:"Operational Scope Divergence",deviation_explanation:["1. The cumulative impact of the behavioral and conditional differences in the Variant you are creating results in a more restrictive separation interval and a broader targeting scope compared to the Existing variant.","2. The Behavior from Variant you are creating increases the separation interval to 10 minutes, whereas the Existing variant requires only 5 minutes, creating a more restrictive operational constraint.","3. The Conditions from Variant you are creating expands the targeting scope by including an additional advertiser, KYKY, which is absent in the Existing variant, thereby altering the applicability of the learning."],evaluation_outputs:{name:"labelling_criteria",output_value:"25% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The Behavior evaluation from Variant you are creating identifies a numerical threshold difference in separation intervals, which is classified as a complete divergence","2. The Conditions evaluation from Variant you are creating identifies a partial targeting overlap due to the inclusion of an additional advertiser, resulting in a moderate conflict classification","3. The final classification reflects the synthesis of the behavioral divergence and the conditional expansion, balancing the restrictive operational change with the broader targeting scope defined in the Variant you are creating."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null}}},when_to_apply:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"behavior_in_when_to_apply"},comparison_inputs:{existing_variant:{title:"When to apply",content:"When the advertiser is Audacy",additional_attributes:null},new_variant:{title:"When to apply",content:"When the advertiser is Audacy or KYKY",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"Targeting scope expanded",deviation_explanation:["1. The 'When to apply' condition from Variant you are creating broadens the targeting scope by including an additional advertiser, KYKY, which is absent in the 'When to apply' condition from Existing variant.","2. The 'When to apply' condition from Variant you are creating introduces a disjunctive logical relationship that is not present in the 'When to apply' condition from Existing variant."],evaluation_outputs:{name:"labelling_criteria",output_value:"50% Conflict",metadata:{label_color:"#B91C1C"}},cognitive_decisioning:{decisioning_factors:["1. The 'When to apply' condition from Variant you are creating includes 'Audacy or KYKY', whereas the 'When to apply' condition from Existing variant is restricted to 'Audacy'.","2. The inclusion of an additional entity in the Variant you are creating creates a partial overlap in targeting logic, justifying a 50% Conflict classification as per the criteria."],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{0:{existing_variant:"Audacy",new_variant:"Audacy or KYKY",deviation_summary:""}}}},when_not_to_apply:{next:null,skip_node:!1,display_node:!0,comparison_config:{mode:"context_aware",type:"independent",execution_mode:"per_node",criterion_set_id:"behavior_in_when_not_to_apply"},comparison_inputs:{existing_variant:{title:"When NOT to apply",content:"No Exemptions",additional_attributes:null},new_variant:{title:"When NOT to apply",content:"No Exemptions",additional_attributes:null}},mapping_rationale:null,evaluation_result:{deviation_title:"No Exclusion Conditions",deviation_explanation:["1. The 'When NOT to apply' section from Variant you are creating defines no exclusion conditions, which aligns with the operational standard of the 'When NOT to apply' section from Existing variant.","2. Both variants lack specific exclusion logic, resulting in an N/A classification as per the evaluation criteria."],evaluation_outputs:{name:"labelling_criteria",output_value:"N/A"},cognitive_decisioning:{decisioning_factors:["1. The 'When NOT to apply' section from Variant you are creating explicitly states 'No Exemptions'","2. The 'When NOT to apply' section from Existing variant also states 'No Exemptions'","3. Since neither variant defines active exclusion conditions, the criteria mandate an N/A result"],gaps_in_decision:["1. No gaps found."],decision_strength:100,citations:null},deviations:{}}}},documents:{existing_variant:{role:"reference",title:"Existing variant | tier1",metadata:{file_name:null},mime_type:null,source_uri:null},new_variant:{role:"source",title:"Variant you are creating | tier1",metadata:{file_name:null},mime_type:null,source_uri:null}},base_root_id:"overall_comparison",input_index_map:{0:"new_variant",1:"existing_variant"},evaluation_criteria:{"criteria-uuid1":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the overall behavior of both learnings. Always assign the output_label as 'Conflict'. Use 100% Conflict when both learnings express exactly the same behavior and meaning. Use 50% Conflict when the learnings partially overlap in behavior, scope, or meaning. Use 0% Conflict when the learnings represent different behaviors with no meaningful overlap. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"default_criteria"},"criteria-uuid2":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare only the rule-defining properties that determine the behavior of the learning, such as thresholds, limits, numerical values, conditions, or any property that directly governs execution of the rule. Always assign the output_label as 'Conflict'. If all rule-defining properties match exactly, assign 100% Conflict. If any rule-defining property differs, assign 0% Conflict. No intermediate percentages should be used for this comparison. The evaluation should focus exclusively on rule-defining properties and not on general semantic similarity.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"behaviour_in_learning_description"},"criteria-uuid3":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the 'When to apply' conditions. Always assign the output_label as 'Conflict'. Use 100% Conflict when all conditions, entities, entity types, and logical relationships match exactly. Use 50% Conflict when there is partial overlap between the conditions. Use 0% Conflict when the conditions are completely different or have no meaningful overlap. If one condition is global in scope and the other is specific in scope, the result must be treated as 0% Conflict. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"behavior_in_when_to_apply"},"criteria-uuid4":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the 'When NOT to apply' conditions. Always assign the output_label as 'Conflict'. Use 100% Conflict when all exclusion conditions, entities, entity types, and logical relationships match exactly. Use 50% Conflict when there is partial overlap between exclusion conditions. Use 0% Conflict when exclusion conditions are completely different or have no meaningful overlap. Intermediate percentages may be used to represent the degree of overlap between 0% and 100%.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"},{metadata:{label_color:"#475569"},description:"Assign the output_label as 'N/A' when exclusion conditions are not defined in one or both learnings. When N/A is assigned, no output_percentage should be provided. The result should contain only the label 'N/A'.",output_label:"N/A",output_template:"{output_percentage} {output_label}",output_percentage:""}]},criteria_set_id:"behavior_in_when_not_to_apply"},"criteria-uuid5":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the combined conditions from both 'When to apply' and 'When NOT to apply'. Always assign the output_label as 'Conflict'. The final output_percentage must be calculated using weighted averaging where behavior_in_when_to_apply contributes 80% (0.8 weightage) and behavior_in_when_not_to_apply contributes 20% (0.2 weightage). If When NOT to apply is labelled as N/A, the comparison should rely entirely on the When to apply result. The percentage should not be independently determined and must be derived from the weighted child comparison results.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"conditions_compare"},"criteria-uuid6":{criterion:{name:"labelling_criteria",data_type:"array",measuring_unit:"category",criteria_properties:[{metadata:{label_color:"#B91C1C"},description:"Compare the overall learning behavior by combining the learning behavior description comparison and the conditions comparison. Always assign the output_label as 'Conflict'. The final output_percentage must be calculated using weighted averaging where behaviour_in_learning_description contributes 50% (0.5 weightage) and conditions_compare contributes 50% (0.5 weightage). The percentage should not be determined independently and must be derived from the child comparison results. Exact matches in both components should result in 100% Conflict, while complete differences in both components should result in 0% Conflict. All intermediate values should be derived from the weighted average of the two components.",output_label:"Conflict",output_template:"{output_percentage} {output_label}",output_percentage:"1-100%"}]},criteria_set_id:"behavior_compare"}},final_score:"59% Conflict",rule_id:"5edd213f-4621-4c25-941d-d6a0532705a7"}}]],exports.getVariantInfo=function(t){return e.__awaiter(void 0,void 0,void 0,function(){var i;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n.default.post("https://devllmstudio.creativeworkspace.ai/instant_learning/give-variant-info",t)];case 1:return[2,e.sent().data];case 2:throw i=e.sent(),console.error("Error getting variant info:",i),i;case 3:return[2]}})})};
2
2
  //# sourceMappingURL=ILOTJTest.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("./TeachMeWrapper.js"),a=require("../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js"),n=require("../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),l=require("../../../plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js"),u={Default:a.default,"Radio Traffic Learning":n.default,Guidelines:l.default};exports.TemplateRegistry=u,exports.default=function(a){var n,l=a.app_integration_id,t=a.isOpen,s=a.onClose,o=a.pluginPayload,d=a.token,p=a.mode;return i.jsx(r.default,{app_integration_id:l,isOpen:t,onClose:s,token:d,templateRegistry:u,initialScope:null!==(n=null==o?void 0:o.initialScope)&&void 0!==n?n:"",ruleSet:null==o?void 0:o.ruleSet,pluginPayload:e.__assign(e.__assign({},o),{mode:p})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),r=require("./TeachMeWrapper.js"),i=require("../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js"),a=require("../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js"),s=require("../../../plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js"),u=require("../../LearningManagement/store/useLMSConfigStore.js"),l=require("../../LearningManagement/store/useLearningTemplateStore.js"),o=require("../../LearningManagement/queries/useLMSConfigQuery.js"),g=require("../../LearningManagement/store/useAuthStore.js"),f=require("../../LearningManagement/store/useEnvStore.js"),c=require("@tanstack/react-query"),d=require("../../LearningManagement/apis/scopeApis.js"),p=require("../../LearningManagement/store/useConfigStore.js"),S={Default:i.default,"Radio Traffic Learning":a.default,Guidelines:s.default},M=new c.QueryClient,L=function(i){var a,s=i.app_integration_id,c=i.isOpen,M=i.onClose,L=i.pluginPayload,m=i.token,T=i.mode,_=i.config,v=u.useTeachMeConfigStore(function(e){return e.setTeachMeConfig});u.useTeachMeConfigStore(function(e){return e.clearTeachMeConfig});var q=u.useLMSConfigStore(function(e){return e.setLMSConfig}),h=p.useConfigStore().setConfig;t.useEffect(function(){h(_),g.default.getState().setUser({accessToken:m}),f.default.getState().setLlmStudioUrl(null==_?void 0:_.BASE_URL),l.useLearningTemplateStore.getState().setAppIntegrationId(null!=s?s:""),m&&(null==_?void 0:_.BASE_URL)&&((null==L?void 0:L.tiers)||d.fetchTiers())},[s,m,null==_?void 0:_.BASE_URL]),null==L||L.teachMe;var j=o.useLMSConfigQuery(null!=s?s:"",!1,!0);return j.isLoading,j.isError,j.refetch,j.isSuccess,t.useEffect(function(){var n;if(null==L?void 0:L.teachMe){var t=L.teachMe;t.teachMe&&v(t.teachMe),t.template&&l.useLearningTemplateStore.getState().setTemplateData(null!=s?s:"",t.template),t.learningManagement&&q(e.__assign(e.__assign({},t.learningManagement),{agents:null!==(n=t.agents)&&void 0!==n?n:{}}))}(null==L?void 0:L.tiers)&&l.useLearningTemplateStore.getState().setTiers(L.tiers)},[L]),n.jsx(r.default,{app_integration_id:s,isOpen:c,onClose:M,token:m,templateRegistry:S,baseURL:null==_?void 0:_.BASE_URL,initialScope:null!==(a=null==L?void 0:L.initialScope)&&void 0!==a?a:"",ruleSet:null==L?void 0:L.ruleSet,pluginPayload:e.__assign(e.__assign({},L),{mode:T})})};exports.TemplateRegistry=S,exports.default=function(t){return n.jsx(c.QueryClientProvider,e.__assign({client:M},{children:n.jsx(L,e.__assign({},t))}))};
2
2
  //# sourceMappingURL=TeachMePlugin.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("@mui/material"),i=require("@mui/icons-material/Close"),a=require("../../LearningManagement/store/useLearningTemplateStore.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(i),u=function(){var i=r.useState(!0),a=i[0],o=i[1];return t.jsxs(n.Dialog,e.__assign({open:a,onClose:function(){return o(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[t.jsxs(n.DialogTitle,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[t.jsx(n.Typography,e.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),t.jsx(n.IconButton,e.__assign({onClick:function(){return o(!1)}},{children:t.jsx(s.default,{})}))]})),t.jsx(n.DialogContent,e.__assign({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))};exports.default=function(i){var o=i.templateRegistry,s=void 0===o?{}:o,l=a.useLearningTemplateStore(function(e){return e.backwardCompatibility}),c=a.useLearningTemplateStore(function(e){return i.app_integration_id?e.templateMap[i.app_integration_id]:void 0}),p=a.useLearningTemplateStore(function(e){return e.setTemplateData}),d=l?"Radio Traffic Learning":c,_=r.useState(!d),f=_[0],g=_[1],h=r.useState(!1),v=h[0],m=h[1];if(r.useEffect(function(){if(i.isOpen){if(!l&&!i.app_integration_id)return console.error("TeachMeWrapper requires an app_integration_id when backward compatibility is disabled."),m(!0),void g(!1);if(d)g(!1);else{e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),g(!0),m(!1),[4,(a=i.app_integration_id,o=i.token,e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(e){switch(e.label){case 0:return[4,fetch("".concat("https://devllmstudio.creativeworkspace.ai","/instant_learning/ilotj/application/getValueType/").concat(a),{headers:{Authorization:"Bearer ".concat(o)}})];case 1:if(!(t=e.sent()).ok)throw new Error("Failed to fetch value type");return[4,t.json()];case 2:return r=e.sent(),console.log("Fetched value type data:",r),!r||Array.isArray(r.data)&&0===r.data.length?[2,null]:[2,r.data[0].value_type_name||r.valueTypeName||r.templateName]}})}))];case 1:return t=n.sent(),p(i.app_integration_id,t),[3,4];case 2:return r=n.sent(),console.error(r),m(!0),i.app_integration_id&&p(i.app_integration_id,"ERROR"),[3,4];case 3:return g(!1),[7];case 4:return[2]}var a,o})})}}},[i.isOpen,i.app_integration_id,d,i.token,p,l]),f)return t.jsx(n.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:t.jsx(n.CircularProgress,{size:32})}));if(v||!d)return t.jsx(u,{});var x=s[d];return x?t.jsx(x,e.__assign({},i)):(console.warn("No renderer found for template: ".concat(d)),t.jsx(u,{}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),a=require("@mui/material"),n=require("@mui/icons-material/Close"),i=require("../../LearningManagement/store/useLearningTemplateStore.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(n),l=function(){var n=r.useState(!0),i=n[0],o=n[1];return t.jsxs(a.Dialog,e.__assign({open:i,onClose:function(){return o(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[t.jsxs(a.DialogTitle,e.__assign({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[t.jsx(a.Typography,e.__assign({variant:"h6",fontWeight:600},{children:"Teach Me"})),t.jsx(a.IconButton,e.__assign({onClick:function(){return o(!1)}},{children:t.jsx(s.default,{})}))]})),t.jsx(a.DialogContent,e.__assign({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))};exports.default=function(n){var o=n.templateRegistry,s=void 0===o?{}:o,u=i.useLearningTemplateStore(function(e){return e.backwardCompatibility}),c=i.useLearningTemplateStore(function(e){return n.app_integration_id?e.templateMap[n.app_integration_id]:void 0}),d=i.useLearningTemplateStore(function(e){return e.setTemplateData}),p=u?"Radio Traffic Learning":c,_=r.useState(!p),f=_[0],g=_[1],h=r.useState(!1),v=h[0],m=h[1];if(r.useEffect(function(){var t,r;if(n.isOpen){if(!u&&!n.app_integration_id)return console.error("TeachMeWrapper requires an app_integration_id when backward compatibility is disabled."),m(!0),void g(!1);if(null===(r=null===(t=n.pluginPayload)||void 0===t?void 0:t.teachMe)||void 0===r?void 0:r.template)return d(n.app_integration_id,n.pluginPayload.teachMe.template),void g(!1);if(p)g(!1);else{e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),g(!0),m(!1),[4,(i=n.app_integration_id,o=n.token,e.__awaiter(void 0,void 0,void 0,function(){var t,r;return e.__generator(this,function(e){switch(e.label){case 0:return[4,fetch("".concat(n.baseURL,"/instant_learning/ilotj/application/getValueType/").concat(i),{headers:{Authorization:"Bearer ".concat(o)}})];case 1:if(!(t=e.sent()).ok)throw new Error("Failed to fetch value type");return[4,t.json()];case 2:return r=e.sent(),console.log("Fetched value type data:",r),!r||Array.isArray(r.data)&&0===r.data.length?[2,null]:[2,r.data[0].value_type_name||r.valueTypeName||r.templateName]}})}))];case 1:return t=a.sent(),d(n.app_integration_id,t),[3,4];case 2:return r=a.sent(),console.error(r),m(!0),n.app_integration_id&&d(n.app_integration_id,"ERROR"),[3,4];case 3:return g(!1),[7];case 4:return[2]}var i,o})})}}},[n.isOpen,n.app_integration_id,p,n.token,d,u]),f)return t.jsx(a.Box,e.__assign({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:t.jsx(a.CircularProgress,{size:32})}));if(v||!p)return t.jsx(l,{});var x=s[p&&s[p]?p:"Default"];return x?t.jsx(x,e.__assign({},n)):(console.warn("No renderer found for template: ".concat(p)),t.jsx(l,{}))};
2
2
  //# sourceMappingURL=TeachMeWrapper.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("@e-llm-studio/citation"),n=require("react"),o=require("./_svg/ChevronDown.js"),r=require("./_svg/ChevronUp.js"),a=require("./_svg/BookIcon.js"),s=require("./_svg/CitationLinkSparkleIcon.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(n),c=d.default.memo(function(t){var n=t.text,o=t.highlights;if(!o||0===o.length||!n)return i.jsx("span",{children:n});var r=o.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),a=new RegExp("(".concat(r.join("|"),")"),"gi"),s=n.split(a);return i.jsx("span",{children:s.map(function(t,n){return o.some(function(e){return e.toLowerCase()===t.toLowerCase()})?i.jsx("span",e.__assign({style:{backgroundColor:"#fef08a",color:"#000"}},{children:t}),n):i.jsx("span",{children:t},n)})})}),p=d.default.memo(function(n){var o,r,l=n.citation,d=n.headerTitle,p=n.score,x=n.footerText,f=n.userPreferences,u=n.hasUserPreferences;return i.jsxs("div",e.__assign({className:"citation-card-layout",style:{display:"flex",flexDirection:"column",gap:"8px",padding:"10px",height:"auto",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden",backgroundColor:"#fbfaff"}},{children:[p&&i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1.5px solid #c4b6fc",backgroundColor:"#FFF",padding:"4px 8px",fontSize:"12px",fontWeight:600,color:"#1E293B",gap:"4px",cursor:"pointer",width:"fit-content"}},{children:[i.jsx(s.CitationLinkSparkleIcon,{width:13,height:13}),i.jsxs("span",{children:["Citation Relevance ",p,"%"]})]})),i.jsxs("div",e.__assign({style:{flex:"1 1 auto",display:"flex",gap:u?"12px":"0px",overflow:"hidden",alignItems:"stretch",width:"100%",flexWrap:"wrap"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",flex:u?"1 1 170px":"1 1 100%",minWidth:u?"100px":"100%",width:u?"auto":"100%",border:"1px solid #E3E6EA",borderRadius:"8px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",borderBottom:"1px solid #E5E7EB",backgroundColor:"#F7F8FA",padding:"12px",fontSize:"14px",fontWeight:"500",color:"#19213D",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(a.default,{})," ",d]})),i.jsx("div",e.__assign({className:"citation-markdown-wrapper",style:{flex:u?"1 1 60%":"1 1 auto",overflowY:"auto",backgroundColor:"#fff",minWidth:"0"}},{children:i.jsx(t.MarkdownRenderer,{value:(null===(o=l.customMetaData)||void 0===o?void 0:o.content)||"",highlightedText:null===(r=l.customMetaData)||void 0===r?void 0:r.highlighted_text,styles:{mainCard:{border:"none",padding:"8px"},list:{fontSize:"13px"}}})})),i.jsx("div",e.__assign({style:{display:"flex",backgroundColor:"#ffffffff",padding:"12px",justifyContent:"flex-end",borderTop:"1px solid #E6DDFE",fontSize:"12px",fontStyle:"italic",color:"#666F8D",fontWeight:"400",textTransform:"capitalize",whiteSpace:"nowrap",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}},{children:x}))]})),u&&i.jsxs("div",e.__assign({style:{flex:"1 1 170px",minWidth:"100px",display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid #E5E7EB",backgroundColor:"#fff",overflowY:"visible",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"}},{children:[i.jsx("div",e.__assign({style:{backgroundColor:"#fff"}},{children:i.jsx("div",e.__assign({style:{padding:"12px",backgroundColor:"#F7F8FA",borderBottom:"1px solid #E5E7EB"}},{children:i.jsx("h3",e.__assign({style:{margin:0,fontSize:"14px",fontWeight:"700",color:"#19213D"}},{children:"Your Preference"}))}))})),i.jsx("div",e.__assign({style:{padding:"16px",display:"flex",flexDirection:"column",gap:"6px"}},{children:f.slice(0,3).map(function(t,n){return i.jsx("div",e.__assign({style:{fontSize:"13px",lineHeight:"1.5",color:"#374151"}},{children:i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"flex-start",gap:"4px"}},{children:[i.jsxs("div",e.__assign({style:{minWidth:"18px",fontSize:"13px",fontWeight:"600",color:"#374151",flexShrink:0}},{children:[n+1,"."]})),i.jsxs("div",e.__assign({style:{fontSize:"13px"}},{children:[i.jsx("span",{children:t.question}),i.jsx("span",e.__assign({style:{fontWeight:"600",margin:"0 4px"}},{children:":"})),i.jsx("br",{}),i.jsxs("span",e.__assign({style:{fontWeight:"700",color:"#111827"}},{children:['"',i.jsx(c,{text:t.answer,highlights:t.highlighted_text}),'"']}))]}))]}))}),n)})}))]}))]})),i.jsx("style",{children:"\n .citation-markdown-wrapper p:last-child { margin-bottom: 0 !important; }\n .citation-markdown-wrapper hr { display: none; }\n .citation-markdown-wrapper::-webkit-scrollbar, .citation-card-layout div::-webkit-scrollbar { width: 4px; }\n .citation-markdown-wrapper::-webkit-scrollbar-thumb, .citation-card-layout div::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }\n "})]}))});exports.default=function(a){var s,l,d,c,x=a.citation,f=a.linkTitle,u=a.isOpen,g=a.onToggle,h=a.fontSize,m=n.useRef(null),b=n.useCallback(function(){g&&g()},[g]);n.useEffect(function(){u&&m.current&&setTimeout(function(){var e;null===(e=m.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)},[u]);var v=(null===(s=x.customMetaData)||void 0===s?void 0:s.citation_title)||"",_=(null===(l=x.customMetaData)||void 0===l?void 0:l.citation_relevance_score)||null,y="Referenced from ".concat(null===(d=x.customMetaData)||void 0===d?void 0:d.citation_reference)||"",w=(null===(c=x.customMetaData)||void 0===c?void 0:c.user_preference)||[],j=w.length>0;return i.jsxs("span",e.__assign({className:"citation-container",ref:m,onClick:function(e){return e.stopPropagation()}},{children:[i.jsx(t.CitationRenderer,{inLineCitation:!0,citationTitle:f,citationComponent:i.jsx(p,{citation:x,headerTitle:v,score:_,footerText:y,userPreferences:w,hasUserPreferences:j}),chevronDownComponent:i.jsx(o.default,{}),chevronUpComponent:i.jsx(r.default,{}),additionalCallbackForPillButton:b,isOpen:u,onToggle:g,styles:{citationWrapper:{maxHeight:"none",overflow:"visible",display:"flex",justifyContent:"center",marginBottom:"4px"},pillButton:{fontFamily:'"Inter", sans-serif',background:"transparent",padding:"2px 6px",margin:0,fontSize:h?"".concat(h,"px"):"1rem",fontWeight:500,color:"rgb(109, 40, 217)",cursor:"pointer",whiteSpace:"nowrap",border:u?"1px solid #A78BFA":"none",borderRadius:"6px",marginBottom:"3px",display:"inline-flex",alignItems:"center",gap:"2px",verticalAlign:"middle"},citationContent:{backgroundColor:"#F5F3FF66",border:"1px solid #A78BFA",borderRadius:"6px",padding:"0rem",fontFamily:'"Inter", sans-serif',fontSize:"12px",textAlign:"justify",textJustify:"inter-word",hyphens:"auto",fontWeight:400,lineHeight:"140%",color:"#1e293b",boxShadow:"none",width:"100%",minHeight:"auto",height:"auto",overflowY:"auto",scrollbarWidth:"none",msOverflowStyle:"none"}}}),i.jsx("style",{children:"\n .citation-container ::-webkit-scrollbar {\n display: none !important;\n }\n "})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("@e-llm-studio/citation"),n=require("react"),o=require("./_svg/ChevronDown.js"),r=require("./_svg/ChevronUp.js"),a=require("./_svg/BookIcon.js"),s=require("./_svg/CitationLinkSparkleIcon.js"),l=require("./MarkdownRenderer.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(n),p=c.default.memo(function(t){var n=t.text,o=t.highlights;if(!o||0===o.length||!n)return i.jsx("span",{children:n});var r=o.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),a=new RegExp("(".concat(r.join("|"),")"),"gi"),s=n.split(a);return i.jsx("span",{children:s.map(function(t,n){return o.some(function(e){return e.toLowerCase()===t.toLowerCase()})?i.jsx("span",e.__assign({style:{backgroundColor:"#fef08a",color:"#000"}},{children:t}),n):i.jsx("span",{children:t},n)})})}),x=c.default.memo(function(t){var n,o,r=t.citation,d=t.headerTitle,c=t.score,x=t.footerText,f=t.userPreferences,u=t.hasUserPreferences;return i.jsxs("div",e.__assign({className:"citation-card-layout",style:{display:"flex",flexDirection:"column",gap:"8px",padding:"10px",height:"auto",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden",backgroundColor:"#fbfaff"}},{children:[c&&i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1.5px solid #c4b6fc",backgroundColor:"#FFF",padding:"4px 8px",fontSize:"12px",fontWeight:600,color:"#1E293B",gap:"4px",cursor:"pointer",width:"fit-content"}},{children:[i.jsx(s.CitationLinkSparkleIcon,{width:13,height:13}),i.jsxs("span",{children:["Citation Relevance ",c,"%"]})]})),i.jsxs("div",e.__assign({style:{flex:"1 1 auto",display:"flex",gap:u?"12px":"0px",overflow:"hidden",alignItems:"stretch",width:"100%",flexWrap:"wrap"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",flex:u?"1 1 170px":"1 1 100%",minWidth:u?"100px":"100%",width:u?"auto":"100%",border:"1px solid #E3E6EA",borderRadius:"8px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",borderBottom:"1px solid #E5E7EB",backgroundColor:"#F7F8FA",padding:"12px",fontSize:"14px",fontWeight:"500",color:"#19213D",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(a.default,{})," ",d]})),i.jsx("div",e.__assign({className:"citation-markdown-wrapper",style:{flex:u?"1 1 60%":"1 1 auto",overflowY:"auto",backgroundColor:"#fff",minWidth:"0"}},{children:i.jsx(l.default,{value:(null===(n=r.customMetaData)||void 0===n?void 0:n.content)||"",highlightedText:null===(o=r.customMetaData)||void 0===o?void 0:o.highlighted_text,styles:{mainCard:{border:"none",padding:"8px"},list:{fontSize:"13px"}}})})),i.jsx("div",e.__assign({style:{display:"flex",backgroundColor:"#ffffffff",padding:"12px",justifyContent:"flex-end",borderTop:"1px solid #E6DDFE",fontSize:"12px",fontStyle:"italic",color:"#666F8D",fontWeight:"400",textTransform:"capitalize",whiteSpace:"nowrap",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}},{children:x}))]})),u&&i.jsxs("div",e.__assign({style:{flex:"1 1 170px",minWidth:"100px",display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid #E5E7EB",backgroundColor:"#fff",overflowY:"visible",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"}},{children:[i.jsx("div",e.__assign({style:{backgroundColor:"#fff"}},{children:i.jsx("div",e.__assign({style:{padding:"12px",backgroundColor:"#F7F8FA",borderBottom:"1px solid #E5E7EB"}},{children:i.jsx("h3",e.__assign({style:{margin:0,fontSize:"14px",fontWeight:"700",color:"#19213D"}},{children:"Your Preference"}))}))})),i.jsx("div",e.__assign({style:{padding:"16px",display:"flex",flexDirection:"column",gap:"6px"}},{children:f.slice(0,3).map(function(t,n){return i.jsx("div",e.__assign({style:{fontSize:"13px",lineHeight:"1.5",color:"#374151"}},{children:i.jsxs("div",e.__assign({style:{display:"flex",alignItems:"flex-start",gap:"4px"}},{children:[i.jsxs("div",e.__assign({style:{minWidth:"18px",fontSize:"13px",fontWeight:"600",color:"#374151",flexShrink:0}},{children:[n+1,"."]})),i.jsxs("div",e.__assign({style:{fontSize:"13px"}},{children:[i.jsx("span",{children:t.question}),i.jsx("span",e.__assign({style:{fontWeight:"600",margin:"0 4px"}},{children:":"})),i.jsx("br",{}),i.jsxs("span",e.__assign({style:{fontWeight:"700",color:"#111827"}},{children:['"',i.jsx(p,{text:t.answer,highlights:t.highlighted_text}),'"']}))]}))]}))}),n)})}))]}))]})),i.jsx("style",{children:"\n .citation-markdown-wrapper p:last-child { margin-bottom: 0 !important; }\n .citation-markdown-wrapper hr { display: none; }\n .citation-markdown-wrapper::-webkit-scrollbar, .citation-card-layout div::-webkit-scrollbar { width: 4px; }\n .citation-markdown-wrapper::-webkit-scrollbar-thumb, .citation-card-layout div::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; }\n "})]}))});exports.default=function(a){var s,l,d,c,p=a.citation,f=a.linkTitle,u=a.isOpen,g=a.onToggle,h=a.fontSize,m=n.useRef(null),b=n.useCallback(function(){g&&g()},[g]);n.useEffect(function(){u&&m.current&&setTimeout(function(){var e;null===(e=m.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)},[u]);var v=(null===(s=p.customMetaData)||void 0===s?void 0:s.citation_title)||"",_=(null===(l=p.customMetaData)||void 0===l?void 0:l.citation_relevance_score)||null,y="Referenced from ".concat(null===(d=p.customMetaData)||void 0===d?void 0:d.citation_reference)||"",j=(null===(c=p.customMetaData)||void 0===c?void 0:c.user_preference)||[],w=j.length>0;return i.jsxs("span",e.__assign({className:"citation-container",ref:m,onClick:function(e){return e.stopPropagation()}},{children:[i.jsx(t.CitationRenderer,{inLineCitation:!0,citationTitle:f,citationComponent:i.jsx(x,{citation:p,headerTitle:v,score:_,footerText:y,userPreferences:j,hasUserPreferences:w}),chevronDownComponent:i.jsx(o.default,{}),chevronUpComponent:i.jsx(r.default,{}),additionalCallbackForPillButton:b,isOpen:u,onToggle:g,styles:{citationWrapper:{maxHeight:"none",overflow:"visible",display:"flex",justifyContent:"center",marginBottom:"4px"},pillButton:{fontFamily:'"Inter", sans-serif',background:"transparent",padding:"2px 6px",margin:0,fontSize:h?"".concat(h,"px"):"1rem",fontWeight:500,color:"rgb(109, 40, 217)",cursor:"pointer",whiteSpace:"nowrap",border:u?"1px solid #A78BFA":"none",borderRadius:"6px",marginBottom:"3px",display:"inline-flex",alignItems:"center",gap:"2px",verticalAlign:"middle"},citationContent:{backgroundColor:"#F5F3FF66",border:"1px solid #A78BFA",borderRadius:"6px",padding:"0rem",fontFamily:'"Inter", sans-serif',fontSize:"12px",textAlign:"justify",textJustify:"inter-word",hyphens:"auto",fontWeight:400,lineHeight:"140%",color:"#1e293b",boxShadow:"none",width:"100%",minHeight:"auto",height:"auto",overflowY:"auto",scrollbarWidth:"none",msOverflowStyle:"none"}}}),i.jsx("style",{children:"\n .citation-container ::-webkit-scrollbar {\n display: none !important;\n }\n "})]}))};
2
2
  //# sourceMappingURL=CitationLink.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("react-markdown"),i=require("rehype-raw"),a=require("remark-gfm"),l=require("unist-util-visit"),s=require("./MarkdownRenderer.module.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(r),c=u(n),d=u(i),p=u(a);function f(){return function(t){l.visit(t,"text",function(t,r,n){var i;if(n&&"string"==typeof t.value&&t.value.includes("✓")){for(var a=t.value.split("✓"),l=[],u=0;u<a.length;u++){var o=a[u];o&&l.push({type:"text",value:o}),u<a.length-1&&l.push({type:"element",tagName:"span",properties:{"data-green-check":"true",className:[s.default.checkGreen]},children:[{type:"text",value:"✓"}]})}return(i=n.children).splice.apply(i,e.__spreadArray([r,1],l,!1)),r+l.length}})}}function m(){return function(e){l.visit(e,"element",function(e,t,r){if(r&&"p"===e.tagName)return e.children&&1===e.children.length&&"element"===e.children[0].type&&"details"===e.children[0].tagName?(r.children.splice(t,1,e.children[0]),t):void 0})}}var v=function(e){var t;return"text"===(null==e?void 0:e.type)&&/^\s*$/.test(null!==(t=e.value)&&void 0!==t?t:"")};function g(){return function(e){l.visit(e,"element",function(e){var t,r;if("details"===e.tagName&&"data-target"in(e.properties||{})){var n=e.children||[],i=0;"element"===(null===(t=n[0])||void 0===t?void 0:t.type)&&"summary"===(null===(r=n[0])||void 0===r?void 0:r.tagName)&&(i=1);var a=n.slice(i),l=a.filter(function(e){return!v(e)});if((1!==l.length||"element"!==l[0].type||!l[0].properties||!("data-popup"in l[0].properties)&&void 0===l[0].properties["data-popup"])&&!l.some(function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])})){var s={type:"element",tagName:"div",properties:{"data-popup":""},children:a};e.children=n.slice(0,i).concat([s])}}})}}function h(){return function(e){l.visit(e,"element",function(e){var t,r;if("details"===e.tagName){var n=e.properties||{};if(!("data-inline"in n)&&!("data-target"in n)){var i=e.children||[],a=0;"element"===(null===(t=i[0])||void 0===t?void 0:t.type)&&"summary"===(null===(r=i[0])||void 0===r?void 0:r.tagName)&&(a=1);var l=i.slice(a),s=l.filter(function(e){return!v(e)});if((1!==s.length||"element"!==s[0].type||!s[0].properties||!("data-popup"in s[0].properties)&&void 0===s[0].properties["data-popup"])&&!s.some(function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])})){var u={type:"element",tagName:"div",properties:{"data-popup":""},children:l};e.children=i.slice(0,a).concat([u])}}}})}}var y=function(r,n,i){if(!n||!n.trim())return r;var a=new RegExp("(".concat(n.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),")"),"gi");return r.split(a).map(function(r,n){return a.test(r)?t.jsx("mark",e.__assign({className:s.default.customHighlight,id:"customHighlight",style:i},{children:r}),n):r})};exports.default=function(n){var i=n.value,a=n.highlightedText,l=n.scrollTo,u=n.styles,v=void 0===u?{}:u,_=o.default.useRef(null),x=o.default.useRef(null);r.useEffect(function(){if(a){var e=setTimeout(function(){if(x.current){var e=x.current.querySelector("#customHighlight");e&&e.scrollIntoView({behavior:"smooth",block:l||"center"})}},225);return function(){return clearTimeout(e)}}},[a,i]);return t.jsx("div",e.__assign({ref:_,className:s.default.containerWrapper,style:v.containerWrapper},{children:t.jsx("div",e.__assign({className:s.default.mainCard,style:v.mainCard},{children:t.jsx("div",e.__assign({ref:x,className:s.default.scrollArea,style:v.scrollArea},{children:t.jsx(c.default,e.__assign({remarkPlugins:[p.default],rehypePlugins:[d.default,m,f,g,h],components:{details:function(r){r.node;var n=e.__rest(r,["node"]),i=!!n["data-inline"],a=!!n["data-target"],l=s.default.detailsBlock,u=v.detailsBlock;return i&&(l=s.default.detailsInline,u=v.detailsInline),a&&(l=s.default.detailsTarget,u=v.detailsTarget),t.jsxs("details",e.__assign({},n,{className:l,style:e.__assign(e.__assign({},u),n.style),onToggle:function(e){e.stopPropagation(),i&&function(e){var t=e.currentTarget,r=t.getAttribute("data-inline");if(r&&_.current){var n=_.current.querySelector('details[data-target="'.concat(r,'"]'));n&&(n.open=t.open)}}(e)}},{children:[a&&t.jsx("summary",{className:s.default.targetDummySummary,"aria-hidden":"true"}),n.children]}))},summary:function(r){r.node;var n=e.__rest(r,["node"]);return t.jsx("summary",e.__assign({className:s.default.summary,style:v.summary,onClick:function(e){return e.stopPropagation()}},n,{children:n.children}))},ul:function(r){return t.jsx("ul",e.__assign({className:s.default.list,style:v.list},r))},ol:function(r){return t.jsx("ol",e.__assign({className:s.default.list,style:v.list},r))},div:function(r){var n=r.node,i=e.__rest(r,["node"]),a=(null==n?void 0:n.properties)&&"data-popup"in n.properties;return t.jsx("div",e.__assign({},i,{className:a?s.default.popup:i.className,style:a?v.popup:i.style}))},span:function(r){var n,i=r.node,a=e.__rest(r,["node"]);return"true"===(null===(n=null==i?void 0:i.properties)||void 0===n?void 0:n["data-green-check"])?t.jsx("span",e.__assign({},a,{style:v.checkGreen})):t.jsx("span",e.__assign({},a))},p:function(e){var r=e.children,n=Array.isArray(r)?r:[r];return t.jsx("p",{children:n.map(function(e,r){return"string"==typeof e?y(e,a,v.customHighlight):t.jsx(o.default.Fragment,{children:e},r)})})},li:function(r){var n=r.children;try{var i=null==n?[]:Array.isArray(n)?n:[n];return t.jsx("li",e.__assign({style:{marginBottom:"4px"}},{children:null==i?void 0:i.map(function(e,r){return"string"==typeof e?y(e,a,v.customHighlight):t.jsx(o.default.Fragment,{children:e},r)})}))}catch(e){return console.error("Error rendering <li>:",e),t.jsx("li",{children:n})}},code:function(r){var n=r.children,i=e.__rest(r,["children"]);return t.jsx("code",e.__assign({},i,{children:n.map(function(e){return"string"==typeof e?y(e,a,v.customHighlight):e})}))}}},{children:i}))}))}))}))};
2
+ //# sourceMappingURL=MarkdownRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});require("../../../node_modules/style-inject/dist/style-inject.es.js").default(".MarkdownRenderer-module_containerWrapper__XUtML{display:flex;gap:16px;height:42vh!important}.MarkdownRenderer-module_mainCard__BcSV-{background-color:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 1px 2px 0 #0000000d;flex:1;height:42vh;padding:20px}.MarkdownRenderer-module_scrollArea__oTyxO{height:100%;overflow-y:auto;padding-right:8px}.MarkdownRenderer-module_scrollArea__oTyxO h2{font-size:1.5em;font-weight:700}.MarkdownRenderer-module_scrollArea__oTyxO h3{font-size:1.17em;font-weight:700}.MarkdownRenderer-module_checkGreen__fc8ex{color:#16a34a!important;display:inline-block;font-weight:500;margin-right:4px;vertical-align:middle}.MarkdownRenderer-module_list__UqrN9{list-style-type:decimal;margin:4px 0;padding-left:20px}.MarkdownRenderer-module_customHighlight__KSBCr{background-color:#fef08a;border-radius:4px;color:#374151;padding:2px 4px}.MarkdownRenderer-module_detailsInline__Lqlyi{border-radius:8px;display:inline-block;margin:4px 0;position:relative;vertical-align:middle}.MarkdownRenderer-module_detailsInline__Lqlyi>:not(summary){display:none!important}.MarkdownRenderer-module_detailsTarget__MQk1n{display:block;margin:8px 0}.MarkdownRenderer-module_detailsBlock__iHvXn{border-radius:8px;margin:4px 0;position:relative;width:100%}.MarkdownRenderer-module_summary__2-IHg{align-items:center;color:#19213d;cursor:pointer;display:inline-flex;font-weight:500;gap:4px;padding:4px 0;user-select:none}.MarkdownRenderer-module_summary__2-IHg:hover{opacity:.9}.MarkdownRenderer-module_detailsBlock__iHvXn summary::-webkit-details-marker,.MarkdownRenderer-module_detailsInline__Lqlyi summary::-webkit-details-marker,.MarkdownRenderer-module_detailsTarget__MQk1n summary::-webkit-details-marker{display:none}.MarkdownRenderer-module_targetDummySummary__1L590{display:none!important}.MarkdownRenderer-module_popup__QuC1y{background:#6d28d91a;border:1px solid #6d28d9;border-radius:10px;box-shadow:0 8px 24px #0000000f;color:#6d28d9;display:block;font-size:12px;line-height:1.35;margin-top:6px;padding:12px;transition:opacity .2s ease,transform .2s ease}.MarkdownRenderer-module_detailsTarget__MQk1n .MarkdownRenderer-module_popup__QuC1y{opacity:0;transform:translateY(-4px)}.MarkdownRenderer-module_detailsTarget__MQk1n[open] .MarkdownRenderer-module_popup__QuC1y{opacity:1;transform:translateY(0)}.MarkdownRenderer-module_popup__QuC1y .MarkdownRenderer-module_popup__QuC1y{background:#0000!important;border:none!important;box-shadow:none!important;color:inherit!important;padding:0!important}"),exports.default={containerWrapper:"MarkdownRenderer-module_containerWrapper__XUtML",mainCard:"MarkdownRenderer-module_mainCard__BcSV-",scrollArea:"MarkdownRenderer-module_scrollArea__oTyxO",checkGreen:"MarkdownRenderer-module_checkGreen__fc8ex",list:"MarkdownRenderer-module_list__UqrN9",customHighlight:"MarkdownRenderer-module_customHighlight__KSBCr",detailsInline:"MarkdownRenderer-module_detailsInline__Lqlyi",detailsTarget:"MarkdownRenderer-module_detailsTarget__MQk1n",detailsBlock:"MarkdownRenderer-module_detailsBlock__iHvXn",summary:"MarkdownRenderer-module_summary__2-IHg",targetDummySummary:"MarkdownRenderer-module_targetDummySummary__1L590",popup:"MarkdownRenderer-module_popup__QuC1y"};
2
+ //# sourceMappingURL=MarkdownRenderer.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),t=require("../../helpers/utils.js"),i=require("../_svg/TickIcon.js"),o=require("../ChatComponents/ChatComponent.js"),s=require("../_svg/SparkleIcon.js"),a=require("lucide-react"),l=function(n){var t=n.label,i=n.onToggle,o=n.isSelected,s=n.disabled;return r.jsxs("div",e.__assign({style:{display:"inline-flex",alignItems:"center",cursor:s?"not-allowed":"pointer",margin:"8px 24px 8px 0",userSelect:"none",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"14px",color:s?"#9ca3af":"#000000de",verticalAlign:"middle",opacity:s&&!o?.6:1},onClick:function(){return!s&&i(t,!o)}},{children:[r.jsx("div",e.__assign({style:{width:"18px",height:"18px",borderRadius:"4px",border:o?"none":"2px solid ".concat(s?"#e5e7eb":"#cfd8dc"),backgroundColor:o?s?"#90caf9":"#2661eb":"transparent",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",transition:"all 0.2s ease",color:"white",flexShrink:0}},{children:o&&r.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})),r.jsx("span",{children:t})]}))};exports.ActionableButton=function(l){var d,c=l.node,u=l.className,g=l.children,p=l.handleStream,f=l.onAction,x=l.disabled,b=l.isStreamEnd,h=void 0===b||b,y=l.style;l.isLastMessage;var m=l.onTypeResponseClick,_=e.__rest(l,["node","className","children","handleStream","onAction","disabled","isStreamEnd","style","isLastMessage","onTypeResponseClick"]),v=t.extractTextFromChildren(g),C=n.useState(!1),k=C[0],j=C[1],F=n.useState(!1),w=F[0],T=F[1],S=n.useState(null),R=S[0],E=S[1],z=n.useState(!1),A=z[0],G=z[1],L=n.useState(""),W=L[0],M=L[1],I="typeYourAnswer"===((null===(d=null==c?void 0:c.properties)||void 0===d?void 0:d.id)||_.id)||"type your response"===v.toLowerCase().trim(),P=_["data-selected"],B="true"===P,D="true"===P||"false"===P,N=_["data-value"],q=n.useState(!1),J=q[0],H=q[1],K=B||I&&J;if(!1===h&&!x&&!D&&!I)return null;var U={padding:"0.3rem 0.8rem",borderRadius:"4px",fontSize:"0.9rem",fontWeight:"500",fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",transition:"all 0.2s ease",border:"1px solid"},O={display:"inline-block",width:"12px",height:"12px",border:"2px solid currentColor",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 0.6s linear infinite",flexShrink:0};if("clickable-button"===u){var Y=(null==_?void 0:_.isTesterGenie)&&(k||null!==R),$=x||D&&!B||Y,Q={background:(null==_?void 0:_.isTesterGenie)?"linear-gradient(135deg, #e0eaff, #ede9fe, #dbeafe, #e0eaff)":"#fff",color:(null==_?void 0:_.isTesterGenie)?"#6d28d9":"#272727ff",borderColor:(null==_?void 0:_.isTesterGenie)?"rgba(139, 92, 246, 0.35)":"#272727ff",cursor:"pointer",opacity:1};return D||I?Q=K?{background:"linear-gradient(to right, rgb(236, 253, 245), rgb(209, 250, 229))",color:"#047857",borderColor:"#55a78fff",cursor:I?"pointer":"default",opacity:1}:{background:"#f3f4f6",color:"#64676A",borderColor:"#a8a8a8ff",cursor:"default",opacity:.6}:(x||Y)&&(Q={background:"#f3f4f6",color:"#64676A",borderColor:"#C0C0C2",cursor:"not-allowed",opacity:1}),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes tgShimmer {\n 0%, 100% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n }\n "}),r.jsx("button",e.__assign({className:u,onClick:function(r){return e.__awaiter(void 0,void 0,void 0,function(){var n,t,i,s;return e.__generator(this,function(e){switch(e.label){case 0:return r.preventDefault(),I?(H(!0),m&&m(),[2]):$?[2]:(n=N||v,f?(f(n),[3,8]):[3,1]);case 1:if(!(null==_?void 0:_.isTesterGenie))return[3,7];e.label=2;case 2:return e.trys.push([2,4,5,6]),j(!0),[4,o.autoGeneratePrompt(_.baseURL)];case 3:return t=e.sent(),E((null===(s=null==t?void 0:t.result)||void 0===s?void 0:s.Answer)||""),[3,6];case 4:return i=e.sent(),console.error("Error in TesterGenie click:",i),[3,6];case 5:return j(!1),[7];case 6:return[3,8];case 7:p(new KeyboardEvent("keydown",{key:"Enter"}),!1,n,j),e.label=8;case 8:return[2]}})})},disabled:$,style:(null==_?void 0:_.isTesterGenie)?e.__assign(e.__assign({padding:"0.3rem 0.8rem",margin:"10px 8px 8px 0",background:Q.background,backgroundSize:(null==_?void 0:_.isTesterGenie)?"250% 250%":void 0,animation:(null==_?void 0:_.isTesterGenie)&&!$?"tgShimmer 6s ease infinite":void 0,color:Q.color,border:"1.5px solid ".concat(Q.borderColor),borderRadius:"6px",cursor:Q.cursor,fontSize:"0.9rem",fontWeight:"500",transition:"color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",alignItems:"center",gap:"3px",pointerEvents:$?"none":"auto",opacity:Q.opacity,boxShadow:(null==_?void 0:_.isTesterGenie)?"0 1px 4px rgba(124, 58, 237, 0.1)":"none"},y),{marginLeft:"8px"}):e.__assign({display:"flex",alignItems:"center",padding:"5px 8px",background:K?"linear-gradient(to right, #EFF4FF)":"transparent",border:"1px solid ".concat(K?"#B2CCFF":"transparent"),borderRadius:"6px",cursor:$?"not-allowed":"pointer",textAlign:"left",fontFamily:"Plus Jakarta Sans, sans-serif",opacity:$?.6:1},y),onMouseEnter:function(e){$||(null==_?void 0:_.isTesterGenie)||K||(e.currentTarget.style.background="linear-gradient(to right, #EFF4FF)",e.currentTarget.style.borderColor="#B2CCFF")},onMouseLeave:function(e){$||(null==_?void 0:_.isTesterGenie)||K||(e.currentTarget.style.background="transparent",e.currentTarget.style.borderColor="transparent")}},_,{children:k&&(null==_?void 0:_.isTesterGenie)&&null===R?r.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[r.jsx("span",{style:O}),"Finding an interesting usecase to test..."]})):r.jsx(r.Fragment,{children:(null==_?void 0:_.isTesterGenie)?g:r.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",width:"100%"}},{children:[r.jsx("div",e.__assign({style:{width:"28px",height:"28px",borderRadius:"50%",border:K?"1px solid #D0D5DD":"1px solid #B2CCFF",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",backgroundColor:K?"#D1E0FF":"#fff",flexShrink:0}},{children:r.jsx(a.ArrowRight,{color:K?"#004EEB":"#667085",size:20})})),r.jsx("span",e.__assign({style:{fontSize:"14px",color:"#344054",fontFamily:"Inter",fontWeight:"500"}},{children:g}))]}))})})),(null==_?void 0:_.isTesterGenie)&&null!==R&&r.jsxs("div",e.__assign({style:{marginTop:"6px",borderRadius:"8px",border:"1px solid #e5e7eb",background:"#f9fafb",padding:"14px 16px",maxWidth:"520px",fontFamily:"Plus Jakarta Sans, sans-serif"},onWheel:function(e){return e.stopPropagation()}},{children:[r.jsxs("p",e.__assign({style:{margin:"0 0 4px 0",fontSize:"1rem",color:"#111827"}},{children:[r.jsx("span",e.__assign({style:{height:"1.2em",width:"1.2em",marginRight:"4px"}},{children:r.jsx(s.default,{})})),"Your prompt is ready!"]})),r.jsx("p",e.__assign({style:{margin:"14px 0 14px 0",fontSize:"0.95rem",fontWeight:"600",color:"#111827",whiteSpace:"pre-wrap"}},{children:R})),r.jsx("p",e.__assign({style:{margin:"0 0 4px 0",fontSize:"1rem",color:"#111827",lineHeight:"1.55"}},{children:"Would you like to proceed with this prompt, or generate a new one?"})),r.jsxs("div",e.__assign({style:{display:"flex",gap:"6px",flexWrap:"wrap"}},{children:[r.jsxs("button",e.__assign({disabled:w||k,style:e.__assign(e.__assign({},U),{background:"linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))",color:"#5b21b6",borderColor:"#7c3aed",opacity:w||k?.6:1,cursor:w||k?"not-allowed":"pointer"}),onMouseEnter:function(e){w||k||(e.currentTarget.style.background="linear-gradient(to right, rgb(221, 214, 254), rgb(196, 181, 253))")},onMouseLeave:function(e){w||k||(e.currentTarget.style.background="linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))")},onClick:function(){p(new KeyboardEvent("keydown",{key:"Enter"}),!1,R,j),E(null),G(!1),M("")}},{children:[r.jsx(i.TickIcon,{color:"#5b21b6"})," Proceed"]})),r.jsx("button",e.__assign({disabled:w||k,style:e.__assign(e.__assign({},U),{background:w?"#f3f4f6":"#fff",color:w?"#64676A":"#272727",borderColor:w?"#C0C0C2":"#272727",cursor:w||k?"not-allowed":"pointer",opacity:w||k?.7:1}),onMouseEnter:function(e){w||k||(e.currentTarget.style.background="linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))",e.currentTarget.style.borderColor="#7c3aed",e.currentTarget.style.color="#5b21b6")},onMouseLeave:function(e){w||k||(e.currentTarget.style.background="#fff",e.currentTarget.style.borderColor="#272727",e.currentTarget.style.color="#272727")},onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,n,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),T(!0),[4,o.autoGeneratePrompt(_.baseUrl,W||void 0)];case 1:return r=e.sent(),E((null===(t=null==r?void 0:r.result)||void 0===t?void 0:t.Answer)||""),[3,4];case 2:return n=e.sent(),console.error("Error regenerating prompt:",n),[3,4];case 3:return T(!1),[7];case 4:return[2]}})})}},{children:w?r.jsxs(r.Fragment,{children:[r.jsx("span",{style:O})," Regenerating..."]}):r.jsxs(r.Fragment,{children:[r.jsxs("svg",e.__assign({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0}},{children:[r.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),r.jsx("path",{d:"M3 3v5h5"})]})),"Regenerate"]})})),r.jsx("button",e.__assign({disabled:w||k,style:e.__assign(e.__assign({},U),{background:"#fff",color:A?"#5b21b6":"#64676A",borderColor:A?"#7c3aed":"#C0C0C2",cursor:w||k?"not-allowed":"pointer",opacity:w||k?.6:1}),onMouseEnter:function(e){w||k||(e.currentTarget.style.borderColor="#7c3aed",e.currentTarget.style.color="#5b21b6")},onMouseLeave:function(e){w||k||A||(e.currentTarget.style.borderColor="#C0C0C2",e.currentTarget.style.color="#64676A")},onClick:function(){return G(function(e){return!e})}},{children:A?"✕ Hide Inputs":" Give Inputs"}))]})),A&&r.jsxs("div",e.__assign({style:{marginTop:"12px",paddingTop:"12px",borderTop:"1px solid #e5e7eb"}},{children:[r.jsx("p",e.__assign({style:{margin:"0 0 6px 0",fontSize:"1rem",color:"#6b7280"}},{children:"Help us generate better prompt (optional)"})),r.jsx("textarea",{placeholder:"e.g. Provide usecases for seperation rules",value:W,onChange:function(e){return M(e.target.value)},rows:3,onKeyDown:function(e){e.stopPropagation()},onWheel:function(e){e.stopPropagation()},style:{width:"100%",minWidth:"420px",maxWidth:"100%",padding:"10px 12px",borderRadius:"6px",border:"1px solid #d1d5db",fontSize:"0.9rem",fontFamily:"Plus Jakarta Sans, sans-serif",color:"#111827",background:"#fff",resize:"vertical",outline:"none",boxSizing:"border-box",lineHeight:"1.5",transition:"border-color 0.2s ease"},onFocus:function(e){e.currentTarget.style.borderColor="#7c3aed"},onBlur:function(e){e.currentTarget.style.borderColor="#d1d5db"}}),r.jsxs("div",e.__assign({style:{display:"flex",gap:"8px",marginTop:"8px"}},{children:[r.jsx("button",e.__assign({disabled:k||!W.trim(),style:e.__assign(e.__assign({},U),{background:k||!W.trim()?"#f3f4f6":"linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))",color:k||!W.trim()?"#64676A":"#5b21b6",borderColor:k||!W.trim()?"#C0C0C2":"#7c3aed",cursor:k||!W.trim()?"not-allowed":"pointer",opacity:k||!W.trim()?.7:1}),onMouseEnter:function(e){!k&&W.trim()&&(e.currentTarget.style.background="linear-gradient(to right, rgb(221, 214, 254), rgb(196, 181, 253))")},onMouseLeave:function(e){!k&&W.trim()&&(e.currentTarget.style.background="linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))")},onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,n,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),j(!0),[4,o.autoGeneratePrompt(_.baseUrl,W)];case 1:return r=e.sent(),E((null===(t=null==r?void 0:r.result)||void 0===t?void 0:t.Answer)||""),G(!1),[3,4];case 2:return n=e.sent(),console.error("Error generating with direction:",n),[3,4];case 3:return j(!1),[7];case 4:return[2]}})})}},{children:k?r.jsxs(r.Fragment,{children:[r.jsx("span",{style:O})," Generating..."]}):r.jsx(r.Fragment,{children:"✦ Generate"})})),r.jsx("button",e.__assign({disabled:k,style:e.__assign(e.__assign({},U),{background:"#fff",color:"#64676A",borderColor:"#C0C0C2",cursor:k?"not-allowed":"pointer",opacity:k?.5:1}),onMouseEnter:function(e){k||(e.currentTarget.style.borderColor="#272727",e.currentTarget.style.color="#272727")},onMouseLeave:function(e){k||(e.currentTarget.style.borderColor="#C0C0C2",e.currentTarget.style.color="#64676A")},onClick:function(){return M("")}},{children:"Clear"}))]}))]}))]}))]})}return r.jsx("button",e.__assign({className:u},_,{children:g}))},exports.ActionableCheckbox=function(n){n.node;var i=n.className,o=n.children,s=n.selectedItems,a=n.onToggle,d=n.isSubmitted,c=n.disabled;e.__rest(n,["node","className","children","selectedItems","onToggle","isSubmitted","disabled"]);var u=t.extractTextFromChildren(o),g=u.trim();return"clickable-box"===i?d?s.includes(g)?r.jsxs("div",e.__assign({style:{display:"inline-flex",alignItems:"center",margin:"4px 24px 4px 0",color:"#2661eb",fontWeight:600,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[r.jsx("span",e.__assign({style:{marginRight:"6px",fontSize:"16px"}},{children:"✓"}))," ",u]})):null:r.jsx(l,{label:u,isSelected:s.includes(g),onToggle:a,disabled:c}):r.jsx("span",e.__assign({className:i},{children:o}))},exports.CheckboxSelector=l,exports.RuleDisplay=function(n){var t=n.content,i=function(e){var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp("<".concat(r,">([\\s\\S]*?)<\\/").concat(r,">"),"i"),i=t.match(n);return i?i[1].trim():"*No ".concat(e," tag found.*")},o=i("reasoning_new"),s=i("proposed_rule"),a=i("wta_new"),l=i("wnta_new");return r.jsxs("div",e.__assign({style:{padding:"16px 16px",maxWidth:"100%",border:"1px solid #A78BFA",borderRadius:"8px",backgroundColor:"#F6F4FF"}},{children:[r.jsx("div",e.__assign({style:{color:"#4B5563",fontSize:"1rem",lineHeight:"1.5rem",marginBottom:"1rem",fontFamily:"inherit",maxWidth:"90%"}},{children:o})),r.jsxs("div",e.__assign({style:{border:"1px solid #ddd",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.05)"}},{children:[r.jsxs("div",e.__assign({style:{paddingLeft:"12px",marginBottom:"12px",fontFamily:"inherit"}},{children:[r.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"Proposed Rule"})),r.jsx("div",e.__assign({style:{fontSize:"0.95rem",color:"#374151",fontFamily:"inherit"}},{children:s}))]})),r.jsxs("div",e.__assign({style:{marginBottom:"12px",paddingLeft:"12px",fontFamily:"inherit"}},{children:[r.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"When to apply"})),r.jsx("div",e.__assign({style:{fontSize:"0.9rem",color:"#374151",fontFamily:"inherit"}},{children:a}))]})),r.jsxs("div",e.__assign({style:{paddingLeft:"12px",fontFamily:"inherit"}},{children:[r.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"When NOT to apply"})),r.jsx("div",e.__assign({style:{fontSize:"0.9rem",color:"#374151",fontFamily:"inherit"}},{children:l}))]}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("react"),t=require("../../helpers/utils.js"),i=require("../_svg/TickIcon.js"),o=require("../ChatComponents/ChatComponent.js"),s=require("../_svg/SparkleIcon.js"),a=require("lucide-react"),l=function(n){var t=n.label,i=n.onToggle,o=n.isSelected,s=n.disabled;return r.jsxs("div",e.__assign({style:{display:"inline-flex",alignItems:"center",cursor:s?"not-allowed":"pointer",margin:"8px 24px 8px 0",userSelect:"none",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"14px",color:s?"#9ca3af":"#000000de",verticalAlign:"middle",opacity:s&&!o?.6:1},onClick:function(){return!s&&i(t,!o)}},{children:[r.jsx("div",e.__assign({style:{width:"18px",height:"18px",borderRadius:"4px",border:o?"none":"2px solid ".concat(s?"#e5e7eb":"#cfd8dc"),backgroundColor:o?s?"#90caf9":"#2661eb":"transparent",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",transition:"all 0.2s ease",color:"white",flexShrink:0}},{children:o&&r.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})),r.jsx("span",{children:t})]}))};exports.ActionableButton=function(l){var d,c=l.node,u=l.className,g=l.children,p=l.handleStream,f=l.onAction,x=l.disabled,b=l.isStreamEnd,h=void 0===b||b,y=l.style;l.isLastMessage;var m=l.onTypeResponseClick,_=e.__rest(l,["node","className","children","handleStream","onAction","disabled","isStreamEnd","style","isLastMessage","onTypeResponseClick"]),v=t.extractTextFromChildren(g),C=n.useState(!1),k=C[0],j=C[1],w=n.useState(!1),F=w[0],T=w[1],S=n.useState(null),R=S[0],E=S[1],z=n.useState(!1),A=z[0],G=z[1],L=n.useState(""),W=L[0],M=L[1],I="typeYourAnswer"===((null===(d=null==c?void 0:c.properties)||void 0===d?void 0:d.id)||_.id)||"type your response"===v.toLowerCase().trim(),P=_["data-selected"],B="true"===P,D="true"===P||"false"===P,N=_["data-value"],q=n.useState(!1),J=q[0],H=q[1],K=B||I&&J;if(!1===h&&!x&&!D&&!I)return null;var U={padding:"0.3rem 0.8rem",borderRadius:"4px",fontSize:"0.9rem",fontWeight:"500",fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",transition:"all 0.2s ease",border:"1px solid"},O={display:"inline-block",width:"12px",height:"12px",border:"2px solid currentColor",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 0.6s linear infinite",flexShrink:0};if("clickable-button"===u){var Y=(null==_?void 0:_.isTesterGenie)&&(k||null!==R),$=x||D&&!B||Y,Q={background:(null==_?void 0:_.isTesterGenie)?"linear-gradient(135deg, #e0eaff, #ede9fe, #dbeafe, #e0eaff)":"#fff",color:(null==_?void 0:_.isTesterGenie)?"#6d28d9":"#272727ff",borderColor:(null==_?void 0:_.isTesterGenie)?"rgba(139, 92, 246, 0.35)":"#272727ff",cursor:"pointer",opacity:1};return D||I?Q=K?{background:"linear-gradient(to right, rgb(236, 253, 245), rgb(209, 250, 229))",color:"#047857",borderColor:"#55a78fff",cursor:I?"pointer":"default",opacity:1}:{background:"#f3f4f6",color:"#64676A",borderColor:"#a8a8a8ff",cursor:"default",opacity:.6}:(x||Y)&&(Q={background:"#f3f4f6",color:"#64676A",borderColor:"#C0C0C2",cursor:"not-allowed",opacity:1}),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:"\n @keyframes spin { to { transform: rotate(360deg); } }\n @keyframes tgShimmer {\n 0%, 100% { background-position: 0% 50%; }\n 50% { background-position: 100% 50%; }\n }\n "}),r.jsx("button",e.__assign({className:u,onClick:function(r){return e.__awaiter(void 0,void 0,void 0,function(){var n,t,i,s;return e.__generator(this,function(e){switch(e.label){case 0:return r.preventDefault(),I?(H(!0),m&&m(),[2]):$?[2]:(n=N||v,f?(f(n),[3,8]):[3,1]);case 1:if(!(null==_?void 0:_.isTesterGenie))return[3,7];e.label=2;case 2:return e.trys.push([2,4,5,6]),j(!0),[4,o.autoGeneratePrompt(_.baseURL)];case 3:return t=e.sent(),E((null===(s=null==t?void 0:t.result)||void 0===s?void 0:s.Answer)||""),[3,6];case 4:return i=e.sent(),console.error("Error in TesterGenie click:",i),[3,6];case 5:return j(!1),[7];case 6:return[3,8];case 7:p(new KeyboardEvent("keydown",{key:"Enter"}),!1,n,j),e.label=8;case 8:return[2]}})})},disabled:$,style:(null==_?void 0:_.isTesterGenie)?e.__assign(e.__assign({padding:"0.3rem 0.8rem",margin:"10px 8px 8px 0",background:Q.background,backgroundSize:(null==_?void 0:_.isTesterGenie)?"250% 250%":void 0,animation:(null==_?void 0:_.isTesterGenie)&&!$?"tgShimmer 6s ease infinite":void 0,color:Q.color,border:"1.5px solid ".concat(Q.borderColor),borderRadius:"6px",cursor:Q.cursor,fontSize:"0.9rem",fontWeight:"500",transition:"color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",alignItems:"center",gap:"3px",pointerEvents:$?"none":"auto",opacity:Q.opacity,boxShadow:(null==_?void 0:_.isTesterGenie)?"0 1px 4px rgba(124, 58, 237, 0.1)":"none"},y),{marginLeft:"8px",width:"fit-content"}):e.__assign({display:"flex",alignItems:"center",padding:"5px 8px",background:K?"linear-gradient(to right, #EFF4FF)":"transparent",border:"1px solid ".concat(K?"#B2CCFF":"transparent"),borderRadius:"6px",cursor:$?"not-allowed":"pointer",textAlign:"left",fontFamily:"Plus Jakarta Sans, sans-serif",opacity:$?.6:1},y),onMouseEnter:function(e){$||(null==_?void 0:_.isTesterGenie)||K||(e.currentTarget.style.background="linear-gradient(to right, #EFF4FF)",e.currentTarget.style.borderColor="#B2CCFF")},onMouseLeave:function(e){$||(null==_?void 0:_.isTesterGenie)||K||(e.currentTarget.style.background="transparent",e.currentTarget.style.borderColor="transparent")}},_,{children:k&&(null==_?void 0:_.isTesterGenie)&&null===R?r.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[r.jsx("span",{style:O}),"Finding an interesting usecase to test..."]})):r.jsx(r.Fragment,{children:(null==_?void 0:_.isTesterGenie)?g:r.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",width:"100%"}},{children:[r.jsx("div",e.__assign({style:{width:"28px",height:"28px",borderRadius:"50%",border:K?"1px solid #D0D5DD":"1px solid #B2CCFF",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",backgroundColor:K?"#D1E0FF":"#fff",flexShrink:0}},{children:r.jsx(a.ArrowRight,{color:K?"#004EEB":"#667085",size:20})})),r.jsx("span",e.__assign({style:{fontSize:"14px",color:"#344054",fontFamily:"Inter",fontWeight:"500"}},{children:g}))]}))})})),(null==_?void 0:_.isTesterGenie)&&null!==R&&r.jsxs("div",e.__assign({style:{marginTop:"6px",borderRadius:"8px",border:"1px solid #e5e7eb",background:"#f9fafb",padding:"14px 16px",maxWidth:"520px",fontFamily:"Plus Jakarta Sans, sans-serif"},onWheel:function(e){return e.stopPropagation()}},{children:[r.jsxs("p",e.__assign({style:{margin:"0 0 4px 0",fontSize:"1rem",color:"#111827"}},{children:[r.jsx("span",e.__assign({style:{height:"1.2em",width:"1.2em",marginRight:"4px"}},{children:r.jsx(s.default,{})})),"Your prompt is ready!"]})),r.jsx("p",e.__assign({style:{margin:"14px 0 14px 0",fontSize:"0.95rem",fontWeight:"600",color:"#111827",whiteSpace:"pre-wrap"}},{children:R})),r.jsx("p",e.__assign({style:{margin:"0 0 4px 0",fontSize:"1rem",color:"#111827",lineHeight:"1.55"}},{children:"Would you like to proceed with this prompt, or generate a new one?"})),r.jsxs("div",e.__assign({style:{display:"flex",gap:"6px",flexWrap:"wrap"}},{children:[r.jsxs("button",e.__assign({disabled:F||k,style:e.__assign(e.__assign({},U),{background:"linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))",color:"#5b21b6",borderColor:"#7c3aed",opacity:F||k?.6:1,cursor:F||k?"not-allowed":"pointer"}),onMouseEnter:function(e){F||k||(e.currentTarget.style.background="linear-gradient(to right, rgb(221, 214, 254), rgb(196, 181, 253))")},onMouseLeave:function(e){F||k||(e.currentTarget.style.background="linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))")},onClick:function(){p(new KeyboardEvent("keydown",{key:"Enter"}),!1,R,j),E(null),G(!1),M("")}},{children:[r.jsx(i.TickIcon,{color:"#5b21b6"})," Proceed"]})),r.jsx("button",e.__assign({disabled:F||k,style:e.__assign(e.__assign({},U),{background:F?"#f3f4f6":"#fff",color:F?"#64676A":"#272727",borderColor:F?"#C0C0C2":"#272727",cursor:F||k?"not-allowed":"pointer",opacity:F||k?.7:1}),onMouseEnter:function(e){F||k||(e.currentTarget.style.background="linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))",e.currentTarget.style.borderColor="#7c3aed",e.currentTarget.style.color="#5b21b6")},onMouseLeave:function(e){F||k||(e.currentTarget.style.background="#fff",e.currentTarget.style.borderColor="#272727",e.currentTarget.style.color="#272727")},onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,n,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),T(!0),[4,o.autoGeneratePrompt(_.baseUrl,W||void 0)];case 1:return r=e.sent(),E((null===(t=null==r?void 0:r.result)||void 0===t?void 0:t.Answer)||""),[3,4];case 2:return n=e.sent(),console.error("Error regenerating prompt:",n),[3,4];case 3:return T(!1),[7];case 4:return[2]}})})}},{children:F?r.jsxs(r.Fragment,{children:[r.jsx("span",{style:O})," Regenerating..."]}):r.jsxs(r.Fragment,{children:[r.jsxs("svg",e.__assign({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0}},{children:[r.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),r.jsx("path",{d:"M3 3v5h5"})]})),"Regenerate"]})})),r.jsx("button",e.__assign({disabled:F||k,style:e.__assign(e.__assign({},U),{background:"#fff",color:A?"#5b21b6":"#64676A",borderColor:A?"#7c3aed":"#C0C0C2",cursor:F||k?"not-allowed":"pointer",opacity:F||k?.6:1}),onMouseEnter:function(e){F||k||(e.currentTarget.style.borderColor="#7c3aed",e.currentTarget.style.color="#5b21b6")},onMouseLeave:function(e){F||k||A||(e.currentTarget.style.borderColor="#C0C0C2",e.currentTarget.style.color="#64676A")},onClick:function(){return G(function(e){return!e})}},{children:A?"✕ Hide Inputs":" Give Inputs"}))]})),A&&r.jsxs("div",e.__assign({style:{marginTop:"12px",paddingTop:"12px",borderTop:"1px solid #e5e7eb"}},{children:[r.jsx("p",e.__assign({style:{margin:"0 0 6px 0",fontSize:"1rem",color:"#6b7280"}},{children:"Help us generate better prompt (optional)"})),r.jsx("textarea",{placeholder:"e.g. Provide usecases for seperation rules",value:W,onChange:function(e){return M(e.target.value)},rows:3,onKeyDown:function(e){e.stopPropagation()},onWheel:function(e){e.stopPropagation()},style:{width:"100%",minWidth:"420px",maxWidth:"100%",padding:"10px 12px",borderRadius:"6px",border:"1px solid #d1d5db",fontSize:"0.9rem",fontFamily:"Plus Jakarta Sans, sans-serif",color:"#111827",background:"#fff",resize:"vertical",outline:"none",boxSizing:"border-box",lineHeight:"1.5",transition:"border-color 0.2s ease"},onFocus:function(e){e.currentTarget.style.borderColor="#7c3aed"},onBlur:function(e){e.currentTarget.style.borderColor="#d1d5db"}}),r.jsxs("div",e.__assign({style:{display:"flex",gap:"8px",marginTop:"8px"}},{children:[r.jsx("button",e.__assign({disabled:k||!W.trim(),style:e.__assign(e.__assign({},U),{background:k||!W.trim()?"#f3f4f6":"linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))",color:k||!W.trim()?"#64676A":"#5b21b6",borderColor:k||!W.trim()?"#C0C0C2":"#7c3aed",cursor:k||!W.trim()?"not-allowed":"pointer",opacity:k||!W.trim()?.7:1}),onMouseEnter:function(e){!k&&W.trim()&&(e.currentTarget.style.background="linear-gradient(to right, rgb(221, 214, 254), rgb(196, 181, 253))")},onMouseLeave:function(e){!k&&W.trim()&&(e.currentTarget.style.background="linear-gradient(to right, rgb(237, 233, 254), rgb(221, 214, 254))")},onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var r,n,t;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),j(!0),[4,o.autoGeneratePrompt(_.baseUrl,W)];case 1:return r=e.sent(),E((null===(t=null==r?void 0:r.result)||void 0===t?void 0:t.Answer)||""),G(!1),[3,4];case 2:return n=e.sent(),console.error("Error generating with direction:",n),[3,4];case 3:return j(!1),[7];case 4:return[2]}})})}},{children:k?r.jsxs(r.Fragment,{children:[r.jsx("span",{style:O})," Generating..."]}):r.jsx(r.Fragment,{children:"✦ Generate"})})),r.jsx("button",e.__assign({disabled:k,style:e.__assign(e.__assign({},U),{background:"#fff",color:"#64676A",borderColor:"#C0C0C2",cursor:k?"not-allowed":"pointer",opacity:k?.5:1}),onMouseEnter:function(e){k||(e.currentTarget.style.borderColor="#272727",e.currentTarget.style.color="#272727")},onMouseLeave:function(e){k||(e.currentTarget.style.borderColor="#C0C0C2",e.currentTarget.style.color="#64676A")},onClick:function(){return M("")}},{children:"Clear"}))]}))]}))]}))]})}return r.jsx("button",e.__assign({className:u},_,{children:g}))},exports.ActionableCheckbox=function(n){n.node;var i=n.className,o=n.children,s=n.selectedItems,a=n.onToggle,d=n.isSubmitted,c=n.disabled;e.__rest(n,["node","className","children","selectedItems","onToggle","isSubmitted","disabled"]);var u=t.extractTextFromChildren(o),g=u.trim();return"clickable-box"===i?d?s.includes(g)?r.jsxs("div",e.__assign({style:{display:"inline-flex",alignItems:"center",margin:"4px 24px 4px 0",color:"#2661eb",fontWeight:600,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[r.jsx("span",e.__assign({style:{marginRight:"6px",fontSize:"16px"}},{children:"✓"}))," ",u]})):null:r.jsx(l,{label:u,isSelected:s.includes(g),onToggle:a,disabled:c}):r.jsx("span",e.__assign({className:i},{children:o}))},exports.CheckboxSelector=l,exports.RuleDisplay=function(n){var t=n.content,i=function(e){var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp("<".concat(r,">([\\s\\S]*?)<\\/").concat(r,">"),"i"),i=t.match(n);return i?i[1].trim():"*No ".concat(e," tag found.*")},o=i("reasoning_new"),s=i("proposed_rule"),a=i("wta_new"),l=i("wnta_new");return r.jsxs("div",e.__assign({style:{padding:"16px 16px",maxWidth:"100%",border:"1px solid #A78BFA",borderRadius:"8px",backgroundColor:"#F6F4FF"}},{children:[r.jsx("div",e.__assign({style:{color:"#4B5563",fontSize:"1rem",lineHeight:"1.5rem",marginBottom:"1rem",fontFamily:"inherit",maxWidth:"90%"}},{children:o})),r.jsxs("div",e.__assign({style:{border:"1px solid #ddd",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.05)"}},{children:[r.jsxs("div",e.__assign({style:{paddingLeft:"12px",marginBottom:"12px",fontFamily:"inherit"}},{children:[r.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"Proposed Rule"})),r.jsx("div",e.__assign({style:{fontSize:"0.95rem",color:"#374151",fontFamily:"inherit"}},{children:s}))]})),r.jsxs("div",e.__assign({style:{marginBottom:"12px",paddingLeft:"12px",fontFamily:"inherit"}},{children:[r.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"When to apply"})),r.jsx("div",e.__assign({style:{fontSize:"0.9rem",color:"#374151",fontFamily:"inherit"}},{children:a}))]})),r.jsxs("div",e.__assign({style:{paddingLeft:"12px",fontFamily:"inherit"}},{children:[r.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"When NOT to apply"})),r.jsx("div",e.__assign({style:{fontSize:"0.9rem",color:"#374151",fontFamily:"inherit"}},{children:l}))]}))]}))]}))};
2
2
  //# sourceMappingURL=ClickableChatComponents.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),s=require("react"),n=require("../_svg/InfoIcon.js");exports.default=function(t){var l=t.validationType,o=t.decisionStrength,r=t.ruleId,a=t.title,d=t.tier,x=t.descriptionText,p=t.reasoningNode,g=t.customStyles,c=t.onViewComparison,u=t.disabled,h=s.useState(!1),_=h[0],f=h[1],y="100%"===o?"Exact Rule Found":"duplicate"===l?"Existing Rule Found":"Similar Rule Found",j=e.__assign({display:"flex",flexDirection:"column",border:"1px solid #E3E6EA",borderRadius:"8px",padding:"14px 16px",gap:"8px",backgroundColor:"#fff"},null==g?void 0:g.container),v=e.__assign({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#E0F2FE80",color:"#0369A1",padding:"0.5px 9px",borderRadius:"9999px",fontSize:"12px",fontWeight:500},null==g?void 0:g.headerTag),F=e.__assign({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#FEE2E2",color:"#B91C1C",padding:"0.5px 7px",borderRadius:"6px",fontSize:"12px",fontWeight:500},null==g?void 0:g.strengthBadgeStyle),b=e.__assign({display:"flex",flexDirection:"row",alignItems:"center",padding:"8px",gap:"8px",width:"100%",maxWidth:"140px",height:"44px",backgroundColor:u?"#F2F4F7":_?"#EFF4FF":"transparent",border:u?"1px solid #D0D5DD":_?"1px solid #B2CCFF":"1px solid transparent",borderRadius:"8px",cursor:u?"not-allowed":"pointer",opacity:u?.6:1,boxSizing:"border-box",transition:"all 0.2s ease"},null==g?void 0:g.button);return i.jsxs("div",e.__assign({style:j},{children:[i.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i.jsxs("div",e.__assign({style:v},{children:[i.jsx(n.default,{})," ",y]})),o&&i.jsx("div",e.__assign({style:F},{children:i.jsx("span",{children:o})}))]})),i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"6px"}},{children:[i.jsxs("h3",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:500,color:"#19213D",margin:0},null==g?void 0:g.title)},{children:[a," ",d?"— ".concat(d):""]})),i.jsxs("div",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:400,color:"#666F8D",lineHeight:"1.5"},null==g?void 0:g.description)},{children:[i.jsx("span",{children:x}),p]}))]})),i.jsxs("button",e.__assign({style:b,onClick:function(){f(!0),c(r,o)},disabled:u},{children:[i.jsxs("svg",e.__assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i.jsx("rect",{x:"0.5",y:"0.5",width:"27",height:"27",rx:"13.5",fill:_?"#D1E0FF":"transparent",stroke:_?"#D1E0FF":"#D0D5DD",style:{transition:"all 0.2s ease"}}),i.jsx("path",{d:"M9.33399 13.9974L18.6673 13.9974M18.6673 13.9974L14.0007 18.6641M18.6673 13.9974L14.0007 9.33073",stroke:_?"#004EEB":"#667085",strokeWidth:"1.52381",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"stroke 0.2s ease"}})]})),i.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,fontFamily:"'Inter', sans-serif",color:"#1D2939",lineHeight:"20px",display:"flex",alignItems:"center"}},{children:"Compare"}))]}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),s=require("react"),n=require("../_svg/InfoIcon.js");exports.default=function(t){t.validationType;var r=t.decisionStrength,l=t.ruleId,o=t.title,a=t.tier,d=t.descriptionText,x=t.reasoningNode,p=t.customStyles,g=t.onViewComparison,c=t.disabled,u=s.useState(!1),f=u[0],h=u[1],_=e.__assign({display:"flex",flexDirection:"column",border:"1px solid #E3E6EA",borderRadius:"8px",padding:"14px 16px",gap:"8px",backgroundColor:"#fff"},null==p?void 0:p.container);e.__assign({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#E0F2FE80",color:"#0369A1",padding:"0.5px 9px",borderRadius:"9999px",fontSize:"12px",fontWeight:500},null==p?void 0:p.headerTag);var y=e.__assign({display:"flex",alignItems:"center",gap:"4px",backgroundColor:"#FEE2E2",color:"#B91C1C",padding:"0.5px 7px",borderRadius:"6px",fontSize:"12px",fontWeight:500},null==p?void 0:p.strengthBadgeStyle),v=e.__assign({display:"flex",flexDirection:"row",alignItems:"center",padding:"8px",gap:"8px",width:"100%",maxWidth:"140px",height:"44px",backgroundColor:c?"#F2F4F7":f?"#EFF4FF":"transparent",border:c?"1px solid #D0D5DD":f?"1px solid #B2CCFF":"1px solid transparent",borderRadius:"8px",cursor:c?"not-allowed":"pointer",opacity:c?.6:1,boxSizing:"border-box",transition:"all 0.2s ease"},null==p?void 0:p.button);return i.jsxs("div",e.__assign({style:_},{children:[i.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i.jsxs("div",e.__assign({style:y},{children:[i.jsx(n.default,{})," ","Conflicting Learning Found"]})),r&&i.jsx("div",e.__assign({style:y},{children:i.jsx("span",{children:r})}))]})),i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[i.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:"6px"}},{children:[i.jsxs("h3",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:500,color:"#19213D",margin:0},null==p?void 0:p.title)},{children:[o," ",a?"— ".concat(a):""]})),i.jsxs("div",e.__assign({style:e.__assign({fontSize:"14px",fontWeight:400,color:"#666F8D",lineHeight:"1.5"},null==p?void 0:p.description)},{children:[i.jsx("span",{children:d}),x]}))]})),i.jsxs("button",e.__assign({style:v,onClick:function(){h(!0),g(l,r)},disabled:c},{children:[i.jsxs("svg",e.__assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i.jsx("rect",{x:"0.5",y:"0.5",width:"27",height:"27",rx:"13.5",fill:f?"#D1E0FF":"transparent",stroke:f?"#D1E0FF":"#D0D5DD",style:{transition:"all 0.2s ease"}}),i.jsx("path",{d:"M9.33399 13.9974L18.6673 13.9974M18.6673 13.9974L14.0007 18.6641M18.6673 13.9974L14.0007 9.33073",stroke:f?"#004EEB":"#667085",strokeWidth:"1.52381",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"stroke 0.2s ease"}})]})),i.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,fontFamily:"'Inter', sans-serif",color:"#1D2939",lineHeight:"20px",display:"flex",alignItems:"center"}},{children:"Compare"}))]}))]}))]}))};
2
2
  //# sourceMappingURL=RuleValidationCard.js.map