@e-llm-studio/instant-learning 1.3.0-alpha.8 → 1.3.0-alpha.81
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.
- package/README.md +732 -6
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/cjs/features/IL-OTJ/ILOTJTest.js +1 -1
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
- package/dist/cjs/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.js +1 -1
- package/dist/cjs/features/LearningManagement/AuditLog/ChangeLogDiff.js +2 -0
- package/dist/cjs/features/LearningManagement/AuditLog/ChangeLogDiff.js.map +1 -0
- package/dist/cjs/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/cjs/features/LearningManagement/LearningManagementTest.js +2 -0
- package/dist/cjs/features/LearningManagement/LearningManagementTest.js.map +1 -0
- package/dist/cjs/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/TierCard.js +1 -1
- package/dist/cjs/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/cjs/features/LearningManagement/Sidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/StationsContent/StationsContent.js +1 -1
- package/dist/cjs/features/LearningManagement/apis/apiConfig.js +1 -1
- package/dist/cjs/features/LearningManagement/apis/scopeApis.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ConfirmationModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/EmptyLearningState.js +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/cjs/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
- package/dist/cjs/features/LearningManagement/config.js +1 -1
- package/dist/cjs/features/LearningManagement/constants.js +2 -0
- package/dist/cjs/features/LearningManagement/constants.js.map +1 -0
- package/dist/cjs/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js +2 -0
- package/dist/cjs/features/LearningManagement/queries/useLMSConfigQuery.js.map +1 -0
- package/dist/cjs/features/LearningManagement/store/useEnvStore.js +1 -1
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js +2 -0
- package/dist/cjs/features/LearningManagement/store/useLMSConfigStore.js.map +1 -0
- package/dist/cjs/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
- package/dist/cjs/features/LearningManagement/store/usePermissionsStore.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/styles/TierCard.module.css.js +1 -1
- package/dist/cjs/features/LearningManagement/utils/treeUtils.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/cjs/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/features/IL-OTJ/ILOTJTest.js +1 -1
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.js +1 -1
- package/dist/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.js +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.js +2 -0
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +2 -0
- package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/AgentComposerRuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparisonNew.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/LearningManagement/AuditLog/AuditLog.js +1 -1
- package/dist/features/LearningManagement/AuditLog/ChangeLogDiff.js +2 -0
- package/dist/features/LearningManagement/AuditLog/ChangeLogDiff.js.map +1 -0
- package/dist/features/LearningManagement/LearningManagement.js +1 -1
- package/dist/features/LearningManagement/LearningManagementTest.js +2 -0
- package/dist/features/LearningManagement/LearningManagementTest.js.map +1 -0
- package/dist/features/LearningManagement/LearningTemplateLayout.js +1 -1
- package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
- package/dist/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.js +1 -1
- package/dist/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
- package/dist/features/LearningManagement/RuleContent/ApprovalLearningDialog.js +1 -1
- package/dist/features/LearningManagement/RuleContent/ContentLogic.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleAccordionHeader.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleContent.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleHeader.js +1 -1
- package/dist/features/LearningManagement/RuleContent/RuleTierList.js +1 -1
- package/dist/features/LearningManagement/RuleContent/TierCard.js +1 -1
- package/dist/features/LearningManagement/RuleContent/VariantCard.js +1 -1
- package/dist/features/LearningManagement/Sidebar.js +1 -1
- package/dist/features/LearningManagement/StationsContent/StationsContent.js +1 -1
- package/dist/features/LearningManagement/apis/apiConfig.js +1 -1
- package/dist/features/LearningManagement/apis/scopeApis.js +1 -1
- package/dist/features/LearningManagement/components/ConfirmationModal.js +1 -1
- package/dist/features/LearningManagement/components/CreateRuleSetLegacyModal.js +1 -1
- package/dist/features/LearningManagement/components/EmptyLearningState.js +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNode.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/features/LearningManagement/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js +2 -0
- package/dist/features/LearningManagement/components/StationOnboarding/DayToggleSelector.js.map +1 -0
- package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
- package/dist/features/LearningManagement/config.js +1 -1
- package/dist/features/LearningManagement/constants.js +2 -0
- package/dist/features/LearningManagement/constants.js.map +1 -0
- package/dist/features/LearningManagement/hooks/useLearningTemplateQueryParams.js +1 -1
- package/dist/features/LearningManagement/queries/useLMSConfigQuery.js +2 -0
- package/dist/features/LearningManagement/queries/useLMSConfigQuery.js.map +1 -0
- package/dist/features/LearningManagement/store/useEnvStore.js +1 -1
- package/dist/features/LearningManagement/store/useLMSConfigStore.js +2 -0
- package/dist/features/LearningManagement/store/useLMSConfigStore.js.map +1 -0
- package/dist/features/LearningManagement/store/useLearningTemplateStore.js +1 -1
- package/dist/features/LearningManagement/store/usePermissionsStore.js +1 -1
- package/dist/features/LearningManagement/styles/ScopeTree.module.css.js +1 -1
- package/dist/features/LearningManagement/styles/Sidebar.module.css.js +1 -1
- package/dist/features/LearningManagement/styles/TierCard.module.css.js +1 -1
- package/dist/features/LearningManagement/utils/treeUtils.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/ValueTypes/Default/DefaultTeachMeRenderer.js +1 -1
- package/dist/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +0 -2
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts +597 -0
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts +1 -17
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMePlugin.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ValueTypeWrappers/TeachMeWrapper.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts +25 -0
- package/dist/types/src/features/IL-OTJ/_components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/ClickableChatComponents.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/RuleValidationCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/index.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/index.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/AuditLog/AuditLog.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/AuditLog/ChangeLogDiff.d.ts +15 -0
- package/dist/types/src/features/LearningManagement/AuditLog/ChangeLogDiff.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts +8 -1
- package/dist/types/src/features/LearningManagement/LearningManagement.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningManagementTest.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/LearningTemplateLayout.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/AddScopeApprovalSearchComponent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/ApprovalLearningDialog.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/ContentLogic.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleAccordionHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/RuleContent/RuleContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/RuleContent/RuleHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/RuleTierList.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/RuleContent/TierCard.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/RuleContent/VariantCard.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/Sidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/StationsContent/StationsContent.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts +8 -0
- package/dist/types/src/features/LearningManagement/apis/apiConfig.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts +25 -3
- package/dist/types/src/features/LearningManagement/apis/scopeApis.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ConfirmationModal.d.ts +2 -1
- package/dist/types/src/features/LearningManagement/components/ConfirmationModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/components/CreateRuleSetLegacyModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts +6 -0
- package/dist/types/src/features/LearningManagement/components/EmptyLearningState.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +1 -0
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts +9 -0
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNode.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeNodeHeader.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/ScopeTree/TreeSidebar.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts +13 -0
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/DayToggleSelector.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/components/StationOnboarding/StationOnboardModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/constants.d.ts +9 -0
- package/dist/types/src/features/LearningManagement/constants.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/hooks/useLearningTemplateQueryParams.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/queries/useLMSConfigQuery.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts +2 -0
- package/dist/types/src/features/LearningManagement/store/useEnvStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts +235 -0
- package/dist/types/src/features/LearningManagement/store/useLMSConfigStore.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts +4 -0
- package/dist/types/src/features/LearningManagement/store/useLearningTemplateStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts +2 -1
- package/dist/types/src/features/LearningManagement/store/usePermissionsStore.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts +2 -1
- package/dist/types/src/features/LearningManagement/utils/treeUtils.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts +1 -0
- package/dist/types/src/plugins/ValueTypes/Category/CategoryTeachMeRenderer.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts +2 -8
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRenderer.d.ts.map +1 -1
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts +28 -0
- package/dist/types/src/plugins/ValueTypes/Default/DefaultTeachMeRendererOld.d.ts.map +1 -0
- package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts +1 -0
- package/dist/types/src/plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.d.ts.map +1 -1
- package/package.json +12 -5
- package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +0 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +0 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +0 -2
- package/dist/cjs/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +0 -1
- package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/BaseTemplate/BaseTemplate.js.map +0 -1
- package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +0 -1
- package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js +0 -2
- package/dist/features/IL-OTJ/_components/templates/WorkflowComposer/WorkflowComposer.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import{Dialog as t,DialogContent as i,Box as a}from"@mui/material";import s,{useState as r,useEffect as l,useCallback as d}from"react";import u from"./_components/ChatComponents/ChatComponent.js";import c from"./_components/ILPopup.js";import m from"./_components/VariantLoadingOverlay.js";import h from"./_components/templates/RuleComparison/RuleComparison.js";import g from"./_components/templates/RuleComparison/AgentComposerRuleComparison.js";import p from"./_components/ChatComponents/NormalChat.js";import{useLearningTemplateStore as f}from"../LearningManagement/store/useLearningTemplateStore.js";import C from"./_components/templates/RuleComparison/RuleComparisonNew.js";var v=function(v){var S=v.open,x=v.chatAssistantName,b=v.organizationName,k=v.baseUrl,w=v.baseWebsocketUrl,M=v.closeFunction,y=v.ThinkingBulbIconComponent,R=v.customSections,I=v.customMetaData,V=v.chatTitle,T=void 0===V?"Instant Learning On-The-Job":V,F=v.formTitle,A=void 0===F?"Instant Learning On-The-Job Form":F,L=v.onSave,D=v.headerMessageHandlers,W=v.aiResponse,E=v.setAIResponse,B=v.width,P=void 0===B?"90vw":B,z=v.height,N=void 0===z?"90vh":z,O=v.sendMessageInChat,j=void 0===O?"":O,U=v.setSendMessageInChat,_=v.validateCustom,J=v.onResetChat,q=v.
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import{Dialog as t,DialogContent as i,Box as a}from"@mui/material";import s,{useState as r,useEffect as l,useCallback as d}from"react";import u from"./_components/ChatComponents/ChatComponent.js";import c from"./_components/ILPopup.js";import m from"./_components/VariantLoadingOverlay.js";import h from"./_components/templates/RuleComparison/RuleComparison.js";import g from"./_components/templates/RuleComparison/AgentComposerRuleComparison.js";import p from"./_components/ChatComponents/NormalChat.js";import{useLearningTemplateStore as f}from"../LearningManagement/store/useLearningTemplateStore.js";import C from"./_components/templates/RuleComparison/RuleComparisonNew.js";var v=function(v){var S=v.open,x=v.chatAssistantName,b=v.organizationName,k=v.baseUrl,w=v.baseWebsocketUrl,M=v.closeFunction,y=v.ThinkingBulbIconComponent,R=v.customSections,I=v.customMetaData,V=v.chatTitle,T=void 0===V?"Instant Learning On-The-Job":V,F=v.formTitle,A=void 0===F?"Instant Learning On-The-Job Form":F,L=v.onSave,D=v.headerMessageHandlers,W=v.aiResponse,E=v.setAIResponse,B=v.width,P=void 0===B?"90vw":B,z=v.height,N=void 0===z?"90vh":z,O=v.sendMessageInChat,j=void 0===O?"":O,U=v.setSendMessageInChat,_=v.validateCustom,J=v.onResetChat,q=v.templateProps,H=v.initialChatMessage,G=v.setCitations,X=v.isLoading,Y=void 0!==X&&X,K=v.isLocked,Q=void 0!==K&&K,Z=v.saveButtonConfig,$=void 0===Z?{label:"Save Learning",loadingLabel:"Saving Learning..."}:Z,ee=v.saveButtonColor,ne=v.saveWithoutValBtnConfig,oe=void 0===ne?{label:"Save Without Validation",loadingLabel:"Saving Without Validation..."}:ne,te=v.textareaPlaceholder,ie=v.setCurrentRequestId,ae=v.showSavedMessage,se=void 0!==ae&&ae,re=v.savedMessage,le=void 0===re?"Thank you teacher for teaching me, your learning has been saved successfully.":re,de=v.isError,ue=void 0!==de&&de,ce=v.errorMessage,me=void 0===ce?"I'm sorry, I couldn't save your changes. Please try again.":ce,he=v.isSaving,ge=void 0!==he&&he,pe=v.isAiStreaming,fe=v.setIsAiStreaming,Ce=v.showConfirmReset,ve=void 0!==Ce&&Ce,Se=v.setShowConfirmReset,xe=v.confirmReset,be=v.isLoadingVariants,ke=v.isFormDirty,we=v.onResetRequest,Me=v.mainText,ye=void 0===Me?"Adding a variant":Me,Re=v.subText,Ie=void 0===Re?"This may take a moment as we update the learning with the new variant.":Re,Ve=v.showComparison,Te=void 0!==Ve&&Ve,Fe=v.setShowComparison,Ae=v.showAgentComposerRuleComparison,Le=void 0!==Ae&&Ae,De=v.setShowAgentComposerRuleComparison,We=v.isFetchingComparison,Ee=v.handleOpenComparison,Be=v.proposedRule,Pe=v.variants,ze=v.onAddAsVariant,Ne=v.isCopyEnabled,Oe=v.showSaveWithoutValidation,je=void 0!==Oe&&Oe,Ue=v.onSaveWithoutValidation,_e=v.onComparisonLinkClick,Je=v.targetComparisonVariantId,qe=v.highlightedComparisonField,He=v.onSubmitFeedback,Ge=v.isUseNormalChat,Xe=void 0!==Ge&&Ge,Ye=v.userDetails,Ke=v.handleGlobalClickCapture,Qe=v.isGlobalEditActive,Ze=v.socketTimeOutInMilliSeconds,$e=v.initialDraftMessage,en=v.onValidateSession,nn=r(S),on=nn[0],tn=nn[1],an=r(!1);an[0];var sn=an[1],rn=r(!1),ln=rn[0],dn=rn[1],un=r(!1),cn=un[0];un[1];var mn=r(45),hn=mn[0],gn=mn[1],pn=r("right"),fn=pn[0],Cn=pn[1],vn=s.useRef(fn),Sn=r(!1),xn=Sn[0],bn=Sn[1],kn=r(0),wn=kn[0],Mn=kn[1],yn=r(40),Rn=yn[0],In=yn[1],Vn=f.getState().cognitiveCompareCompatibility;l(function(){vn.current=fn},[fn]),l(function(){tn(S)},[S]);var Tn=d(function(e){e.preventDefault(),bn(!0),Mn(e.clientX),In(hn)},[hn]),Fn=d(function(e){if(xn){var n=document.querySelector("[data-dialog-content]");if(n){var o=n.getBoundingClientRect(),t=(e.clientX-wn)/o.width*100,i=Math.max(20,Math.min(80,Rn+t));gn(i),i>Rn&&Cn("right"),i<Rn&&Cn("left")}}},[xn,wn,Rn]),An=d(function(){bn(!1)},[]);l(function(){if(xn)return document.addEventListener("mousemove",Fn),document.addEventListener("mouseup",An),function(){document.removeEventListener("mousemove",Fn),document.removeEventListener("mouseup",An)}},[xn,Fn,An]);var Ln=function(e,n){Q&&"backdropClick"===n||("escapeKeyDown"!==n&&"manualClose"!==n||!(null==ke?void 0:ke())?(tn(!1),M()):null==we||we())},Dn=d(function(e){gn(function(n){var o;if("number"==typeof e)return e>n&&Cn("right"),e<n&&Cn("left"),e;var t=vn.current,i=null!==(o={20:30,30:"left"===t?20:50,50:"left"===t?30:75,75:"left"===t?50:100,100:75}[n])&&void 0!==o?o:40;return 100===i&&Cn("left"),20===i&&Cn("right"),i})},[]),Wn=d(function(){Ee&&(Dn(30),Ee())},[Dn,Ee]);return n(t,e({open:on,onClose:Ln,maxWidth:!1,fullWidth:!0,PaperProps:{sx:{width:P,height:N,display:"flex",flexDirection:"column",padding:0,margin:0,maxWidth:"100vw",borderRadius:"10px"}}},{children:o(i,e({"data-dialog-content":!0,onClickCapture:Ke,sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"row",gap:0,padding:0,fontFamily:'"Plus Jakarta Sans", sans-serif',"& *":{fontFamily:'"Plus Jakarta Sans", sans-serif !important'}}},{children:[n(a,e({sx:{width:"".concat(hn,"%"),maxWidth:"".concat(hn,"%"),transition:xn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",bgcolor:"#ffffff",p:0,display:0===hn?"none":"flex",flexDirection:"column"}},{children:Xe?n(p,{chatAssistantName:x,organizationName:b,baseUrl:k,baseWebsocketUrl:w,setIsNewChatClicked:sn,ThinkingBulbIconComponent:y,isFormSaveClicked:ln,setIsFormSavedClicked:dn,onResetLearningData:function(){},sendMessageInChat:j,setSendMessageInChat:U,isFormValidating:cn,chatTitle:T,customMetaData:I,headerMessageHandlers:D,aiResponse:W,setAIResponse:E,onResetChat:J,initialChatMessage:H,onSave:L,chatSize:hn,movingTowards:fn,setChatSize:Dn,setCitations:G,textareaPlaceholder:te,setCurrentRequestId:ie,showSavedMessage:se,savedMessage:le,isError:ue,errorMessage:me,isSaving:ge,onStreamingStateChange:fe,onViewComparison:Wn,isCopyEnabled:Ne,onComparisonLinkClick:_e,onSubmitFeedback:He}):n(u,{chatAssistantName:x,organizationName:b,baseUrl:k,baseWebsocketUrl:w,setIsNewChatClicked:sn,ThinkingBulbIconComponent:y,isFormSaveClicked:ln,setIsFormSavedClicked:dn,onResetLearningData:function(){},sendMessageInChat:j,setSendMessageInChat:U,isFormValidating:cn,chatTitle:T,customMetaData:I,headerMessageHandlers:D,aiResponse:W,setAIResponse:E,onResetChat:J,initialChatMessage:H,onSave:L,chatSize:hn,movingTowards:fn,setChatSize:Dn,setCitations:G,textareaPlaceholder:te,setCurrentRequestId:ie,showSavedMessage:se,savedMessage:le,isError:ue,errorMessage:me,isSaving:ge,onStreamingStateChange:fe,onViewComparison:Wn,isCopyEnabled:Ne,onComparisonLinkClick:_e,onSubmitFeedback:He,userDetails:Ye,isGlobalEditActive:Qe,socketTimeOutInMilliSeconds:Ze,initialDraftMessage:$e,onValidateSession:en,onCloseSessionModal:xe})})),n(a,{sx:{width:"2px",cursor:"col-resize",backgroundColor:xn?"#1976d2":"#e0e0e0",transition:"background-color 0.2s ease","&:hover":{backgroundColor:"#1976d2"},flexShrink:0},onMouseDown:Tn}),o(a,e({sx:{width:"".concat(100-hn,"%"),maxWidth:"".concat(100-hn,"%"),transition:xn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",display:100===hn?"none":"flex",flexDirection:"column",overflowY:"hidden",position:"relative"}},{children:[n(m,{isLoading:We||!1,mainText:"Fetching differences between rules",subText:"This may take a moment..."}),n(m,{isLoading:be||!1,mainText:ye,subText:Ie}),Le?n(g,{proposedRule:Be,variants:Pe,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==ze||ze(),Dn(40),null==De||De(!1)},onSkip:function(){Dn(40),null==De||De(!1)},onBack:function(){Dn(40),null==De||De(!1)},targetVariantId:Je,highlightedField:qe}):Te?Vn?n(C,{proposedRule:Be,variants:Pe,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==ze||ze(),Dn(40),null==Fe||Fe(!1)},onSkip:function(){Dn(40),null==Fe||Fe(!1)},onBack:function(){Dn(40),null==Fe||Fe(!1)},targetVariantId:Je,highlightedField:qe}):n(h,{variants:Pe,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==ze||ze(),Dn(40),null==Fe||Fe(!1)},onSkip:function(){Dn(40),null==Fe||Fe(!1)},onBack:function(){Dn(40),null==Fe||Fe(!1)},targetVariantId:Je}):n(c,{setIsFormSavedClicked:dn,customSections:R,onSave:L,formHeader:A,onClose:function(){return Ln(0,"manualClose")},validateCustom:_,templateProps:q,isLoading:Y,isAiStreaming:pe,saveButtonConfig:$,saveButtonColor:ee,showSaveWithoutValidation:je,saveWithoutValBtnConfig:oe,onSaveWithoutValidation:Ue}),n(t,e({open:ve,onClose:function(){return null==Se?void 0:Se(!1)},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:o(a,e({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[n("h3",e({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"6px"}},{children:"Exit Teach Me OTJ?"})),n("p",e({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"10px"}},{children:"Exiting will discard any unsaved changes and end your session."})),o(a,e({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[n("button",e({onClick:function(){return null==Se?void 0:Se(!1)},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Cancel"})),n("button",e({onClick:xe,style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Yes, Discard"}))]}))]}))}))]}))]}))}))};export{v as default};
|
|
2
2
|
//# sourceMappingURL=ILOTJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o}from"tslib";import"react/jsx-runtime";import"@mui/material";import"lucide-react";import"react";import"uuid";import"./_components/templates/TemplatesMap/templatesMap.js";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import r from"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"./_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"./_components/MarkdownComponents/MarkdownElements.js";import"./_components/CitationLink.js";import"@e-llm-studio/citation";import"./store/CitationsContext.js";import"@viswa-test/test-citation";var i=function(i){return t(void 0,void 0,void 0,function(){var t;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,r.post("https://devllmstudio.creativeworkspace.ai/instant_learning/give-variant-info",i)];case 1:return[2,o.sent().data];case 2:throw t=o.sent(),console.error("Error getting variant info:",t),t;case 3:return[2]}})})};export{i as getVariantInfo};
|
|
1
|
+
import{__awaiter as e,__generator as t}from"tslib";import"react/jsx-runtime";import"@mui/material";import"lucide-react";import"react";import"uuid";import"@mui/material/Tooltip";import"react-markdown";import"rehype-raw";import i from"axios";import"@e-llm-studio/streaming-response";import"@e-llm-studio/watch-me-work";import"./_components/ChatComponents/ChatHeader.js";import"remark-gfm";import"./_components/MarkdownComponents/MarkdownElements.js";import"./_components/CitationLink.js";import"@e-llm-studio/citation";import"./_components/templates/TemplatesMap/templatesMap.js";import"./store/CitationsContext.js";var n=[[{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"}}]],a=function(n){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i.post("https://devllmstudio.creativeworkspace.ai/instant_learning/give-variant-info",n)];case 1:return[2,t.sent().data];case 2:throw e=t.sent(),console.error("Error getting variant info:",e),e;case 3:return[2]}})})};export{n as dummyDat,a as getVariantInfo};
|
|
2
2
|
//# sourceMappingURL=ILOTJTest.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n}from"react/jsx-runtime";import{useEffect as t}from"react";import r from"./TeachMeWrapper.js";import i from"../../../plugins/ValueTypes/Default/DefaultTeachMeRenderer.js";import a from"../../../plugins/ValueTypes/RadioTrafficLearning/RadioTrafficLearningRenderer.js";import o from"../../../plugins/ValueTypes/Guidelines/GuidelinesTeachMeRenderer.js";import{useTeachMeConfigStore as s,useLMSConfigStore as l}from"../../LearningManagement/store/useLMSConfigStore.js";import{useLearningTemplateStore as u}from"../../LearningManagement/store/useLearningTemplateStore.js";import{useLMSConfigQuery as g}from"../../LearningManagement/queries/useLMSConfigQuery.js";import m from"../../LearningManagement/store/useAuthStore.js";import p from"../../LearningManagement/store/useEnvStore.js";import{QueryClient as f,QueryClientProvider as c}from"@tanstack/react-query";import{fetchTiers as d}from"../../LearningManagement/apis/scopeApis.js";import{useConfigStore as S}from"../../LearningManagement/store/useConfigStore.js";var M={Default:i,"Radio Traffic Learning":a,Guidelines:o},L=new f,v=function(t){return n(c,e({client:L},{children:n(T,e({},t))}))},T=function(i){var a,o=i.app_integration_id,f=i.isOpen,c=i.onClose,L=i.pluginPayload,v=i.token,T=i.mode,h=i.config,j=s(function(e){return e.setTeachMeConfig});s(function(e){return e.clearTeachMeConfig});var R=l(function(e){return e.setLMSConfig}),C=S().setConfig;t(function(){C(h),m.getState().setUser(e(e({},m.getState().user),{accessToken:v})),p.getState().setLlmStudioUrl(null==h?void 0:h.BASE_URL),u.getState().setAppIntegrationId(null!=o?o:""),v&&(null==h?void 0:h.BASE_URL)&&((null==L?void 0:L.tiers)||d())},[o,v,null==h?void 0:h.BASE_URL]),null==L||L.teachMe;var y=g(null!=o?o:"",!1,!0);return y.isLoading,y.isError,y.refetch,y.isSuccess,t(function(){var n;if(null==L?void 0:L.teachMe){var t=L.teachMe;t.teachMe&&j(t.teachMe),t.template&&u.getState().setTemplateData(null!=o?o:"",t.template),t.learningManagement&&R(e(e({},t.learningManagement),{agents:null!==(n=t.agents)&&void 0!==n?n:{}}))}(null==L?void 0:L.tiers)&&u.getState().setTiers(L.tiers)},[L]),n(r,{app_integration_id:o,isOpen:f,onClose:c,token:v,templateRegistry:M,baseURL:null==h?void 0:h.BASE_URL,initialScope:null!==(a=null==L?void 0:L.initialScope)&&void 0!==a?a:"",ruleSet:null==L?void 0:L.ruleSet,pluginPayload:e(e({},L),{mode:T})})};export{M as TemplateRegistry,v as default};
|
|
2
2
|
//# sourceMappingURL=TeachMePlugin.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useState as a,useEffect as o}from"react";import{Box as l,CircularProgress as s,Dialog as p,DialogTitle as c,Typography as d,IconButton as u,DialogContent as f}from"@mui/material";import m from"@mui/icons-material/Close";import{useLearningTemplateStore as h}from"../../LearningManagement/store/useLearningTemplateStore.js";var v=function(){var t=a(!0),i=t[0],o=t[1];return n(p,e({open:i,onClose:function(){return o(!1)},fullWidth:!0,maxWidth:"lg",PaperProps:{sx:{borderRadius:"16px",minHeight:"70vh",overflow:"hidden"}}},{children:[n(c,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",px:3,py:2}},{children:[r(d,e({variant:"h6",fontWeight:600},{children:"Teach Me"})),r(u,e({onClick:function(){return o(!1)}},{children:r(m,{})}))]})),r(f,e({dividers:!0,sx:{p:3,backgroundColor:"#fafafa"}},{children:"There is some issue with the selected template. Kindly check steps to resolve."}))]}))},g=function(n){var p=n.templateRegistry,c=void 0===p?{}:p,d=h(function(e){return e.backwardCompatibility}),u=h(function(e){return n.app_integration_id?e.templateMap[n.app_integration_id]:void 0}),f=h(function(e){return e.setTemplateData}),m=d?"Radio Traffic Learning":u,g=a(!m),_=g[0],y=g[1],b=a(!1),x=b[0],w=b[1];if(o(function(){var e,r;if(n.isOpen){if(!d&&!n.app_integration_id)return console.error("TeachMeWrapper requires an app_integration_id when backward compatibility is disabled."),w(!0),void y(!1);if(null===(r=null===(e=n.pluginPayload)||void 0===e?void 0:e.teachMe)||void 0===r?void 0:r.template)return f(n.app_integration_id,n.pluginPayload.teachMe.template),void y(!1);if(m)y(!1);else{t(void 0,void 0,void 0,function(){var e,r;return i(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),y(!0),w(!1),[4,(o=n.app_integration_id,l=n.token,t(void 0,void 0,void 0,function(){var e,t;return i(this,function(i){switch(i.label){case 0:return[4,fetch("".concat(n.baseURL,"/instant_learning/ilotj/application/getValueType/").concat(o),{headers:{Authorization:"Bearer ".concat(l)}})];case 1:if(!(e=i.sent()).ok)throw new Error("Failed to fetch value type");return[4,e.json()];case 2:return t=i.sent(),console.log("Fetched value type data:",t),!t||Array.isArray(t.data)&&0===t.data.length?[2,null]:[2,t.data[0].value_type_name||t.valueTypeName||t.templateName]}})}))];case 1:return e=a.sent(),f(n.app_integration_id,e),[3,4];case 2:return r=a.sent(),console.error(r),w(!0),n.app_integration_id&&f(n.app_integration_id,"ERROR"),[3,4];case 3:return y(!1),[7];case 4:return[2]}var o,l})})}}},[n.isOpen,n.app_integration_id,m,n.token,f,d]),_)return r(l,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:r(s,{size:32})}));if(x||!m)return r(v,{});var k=c[m&&c[m]?m:"Default"];return k?r(k,e({},n)):(console.warn("No renderer found for template: ".concat(m)),r(v,{}))};export{g as default};
|
|
2
2
|
//# sourceMappingURL=TeachMeWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__makeTemplateObject as e,__spreadArray as n,__assign as t,__awaiter as o,__generator as i,__rest as r}from"tslib";import{jsx as a,jsxs as s,Fragment as l}from"react/jsx-runtime";import{useRef as c,useState as u,useMemo as d,useEffect as v,useCallback as m,useLayoutEffect as h}from"react";import{keyframes as p,Dialog as g,Box as f}from"@mui/material";import C from"@mui/material/Tooltip";import y from"react-markdown";import b from"rehype-raw";import S from"axios";import{v4 as w}from"uuid";import{stopStreaming as x,startChatStream as k}from"@e-llm-studio/streaming-response";import{WatchMeWork as _}from"@e-llm-studio/watch-me-work";import T from"./ChatHeader.js";import E from"../MessageRendering/MessageRendering.js";import{Skeleton as I}from"../atoms/SkeletonLoader/SkeletonLoader.js";import{ActionableButton as M}from"../MessageRendering/ClickableChatComponents.js";import R from"../AudioWaveform.js";import D from"./ChatComponent.module.css.js";import N from"../../InstantLearning.module.css.js";import{ScrollToBottom as F}from"../_svg/ScrollToBottom.js";import{useHeaderObserver as A,extractTextFromChildren as L}from"../../helpers/utils.js";import{SendButton as W}from"../_svg/SendButton.js";import q from"../_svg/SparkleIcon.js";import{UserIcon as z}from"../_svg/UserIcon.js";var P,j=function(e,n){return S.post("".concat(e||"https://devllmstudio.creativeworkspace.ai","/api/chat/chatResponse"),{name:"ilggcautopromptgen",organizationName:"techolution",prompt:n||"Generate a query"},{headers:{"Content-Type":"application/json"},withCredentials:!0}).then(function(e){return e.data}).catch(function(e){throw console.error("Error calling auto-generate API:",e),e})},B=function(j){var B=j.chatAssistantName,H=j.organizationName,O=j.baseUrl,U=j.baseWebsocketUrl,G=j.setIsNewChatClicked;j.ThinkingBulbIconComponent;var Z=j.isFormSaveClicked,K=j.setIsFormSavedClicked,V=j.onResetLearningData,Q=j.sendMessageInChat,J=j.setSendMessageInChat,$=j.isFormValidating,X=j.chatTitle,Y=j.customMetaData,ee=j.headerMessageHandlers;j.aiResponse;var ne=j.setAIResponse,te=j.onResetChat,oe=j.initialChatMessage,ie=void 0===oe?"":oe,re=j.onSave,ae=j.chatSize,se=j.setChatSize,le=j.movingTowards,ce=j.setCitations,ue=j.textareaPlaceholder,de=void 0===ue?"Tell me more about this learning...":ue,ve=j.setCurrentRequestId,me=j.showSavedMessage,he=void 0!==me&&me,pe=j.savedMessage,ge=j.isError,fe=void 0!==ge&&ge,Ce=j.errorMessage,ye=void 0===Ce?"There was an error saving your changes.":Ce;j.isSaving;var be=j.isHighlighted,Se=void 0!==be&&be,we=j.onStreamingStateChange,xe=j.onViewComparison;j.isCopyEnabled;var ke=j.onComparisonLinkClick,_e=j.onSubmitFeedback,Te=j.userDetails,Ee=j.isGlobalEditActive,Ie=j.socketTimeOutInMilliSeconds,Me=j.initialDraftMessage,Re=void 0===Me?"":Me,De=j.onValidateSession,Ne=j.onCloseSessionModal,Fe=B,Ae=c("".concat(Fe,"-").concat(H,"-").concat(w())),Le=c("".concat(w())),We=O,qe=c(null),ze=c(!0),Pe=c(null),je=c(null),Be=u(Re),He=Be[0],Oe=Be[1],Ue=u([]),Ge=Ue[0],Ze=Ue[1],Ke=u(!1),Ve=Ke[0],Qe=Ke[1],Je=u(!1);Je[0];var $e=Je[1],Xe=u(!0),Ye=Xe[0],en=Xe[1],nn=u(!0);nn[0];var tn=nn[1],on=u("");on[0];var rn=on[1],an=u(""),sn=an[0],ln=an[1],cn=u(!1),un=cn[0],dn=cn[1],vn=u(!1),mn=vn[0],hn=vn[1],pn=u(!0),gn=pn[0],fn=pn[1],Cn=u("100%");Cn[0];var yn=Cn[1],bn=u(null),Sn=bn[0],wn=bn[1],xn=u(!1);xn[0];var kn=xn[1],_n=u(!1),Tn=_n[0],En=_n[1],In=c(null),Mn=c(new Set),Rn=u(null),Dn=Rn[0],Nn=Rn[1],Fn=u(!1),An=Fn[0],Ln=Fn[1],Wn=u(!1);Wn[0],Wn[1];var qn=u(null);qn[0],qn[1],c(null),c(null);var zn=c(new Map),Pn=c(""),jn=c(new Map),Bn=c(!1),Hn=c(0),On=c(null),Un=c(null),Gn=u(!1),Zn=Gn[0],Kn=Gn[1];p(P||(P=e(["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "],["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "])));var Vn=d(function(){return""===(null==He?void 0:He.trim())||un},[He,un]),Qn=d(function(){return $},[$]),Jn=d(function(){var e;return Ge.length>0&&"user"===(null===(e=Ge[Ge.length-1])||void 0===e?void 0:e.role)},[Ge]),$n=d(function(){return Vn||$||!!Ee||Jn},[Vn,$,Ee,Jn]);v(function(){Re&&!He&&(Oe(Re),hn(!0),setTimeout(function(){if(je.current){je.current.focus();var e=Re.length;je.current.setSelectionRange(e,e)}},400))},[Re]),v(function(){null==we||we(un)},[un,we]),v(function(){return function(){On.current&&clearTimeout(On.current)}},[]),v(function(){var e=qe.current,n=function(){if(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;fn(t-n-o<=20)}};return e&&(e.addEventListener("scroll",n),n()),function(){e&&e.removeEventListener("scroll",n)}},[Ge]);var Xn=A({handlers:ee,setResult:ne}).processHeaderMessage;v(function(){he&&En(!0)},[he]),v(function(){if(An){var e=setTimeout(function(){Ln(!1)},3e3);return function(){return clearTimeout(e)}}},[An]),v(function(){Z&&!Ee&&(st(new KeyboardEvent("keydown",{key:"Enter"}),!1,"Save this Learning"),K(!1))},[Z]),v(function(){if(Q)try{if(Q.startsWith("__SKELETON__:")){var e=Q.split(":"),o=e[1],i=e.slice(2).join(":"),r={role:"user",content:"",id:o,time:new Date,isSkeleton:!0,skeletonContent:i};return Ze(function(e){return n(n([],e,!0),[r],!1)}),st(new KeyboardEvent("keydown",{key:"Enter"}),!1,i,!1,o),Nn(o),J&&J(""),void setTimeout(function(){Nn(null)},2e3)}if(Q.startsWith("__SKELETON_END__::")){var a=Q.split("::")[1]||"";return Ze(function(e){return e.map(function(e){return e.isSkeleton?t(t({},e),{isSkeleton:!1,content:e.skeletonContent||a}):e})}),void(J&&J(""))}var s=w();st(new KeyboardEvent("keydown",{key:"Enter"}),!1,Q,!1,s),Nn(s),J&&J(""),setTimeout(function(){return Nn(null)},2e3)}catch(e){console.error("Error handling sendMessageInChat signal",e)}},[Q]),v(function(){et(),nt();var e=function(){var e,n=(null===(e=null==In?void 0:In.current)||void 0===e?void 0:e.clientHeight)||0,t="calc(100% - ".concat(n,"px - 10px)");yn(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var Yn=m(function(e){var n="string"==typeof e?e:"smooth";Pe.current&&Pe.current.scrollIntoView({behavior:n,block:"end"}),ze.current&&setTimeout(function(){Pe.current&&ze.current&&Pe.current.scrollIntoView({behavior:n,block:"end"})},100)},[]);v(function(){if(!un){var e="";if(Tn?e=pe||"Thank you teacher for teaching me, your rule has been saved successfully.":fe&&(e=ye||"I'm sorry, I couldn't save your changes. Please try again."),e){var t={role:"assistant",content:e,id:w(),citations:[],time:new Date};Ze(function(e){return n(n([],e,!0),[t],!1)}),En(!1),setTimeout(function(){return Yn("smooth")},100)}}},[Tn,fe,un,pe,ye,Yn]),v(function(){ze.current&&Yn("smooth")},[Yn]);var et=function(){var e={method:"get",maxBodyLength:1/0,url:"".concat(We,"/api/chatbot/getChatSettings?name=").concat(Fe,"&organizationName=").concat(H),headers:{}};S.request(e).then(function(e){var n,t,o;(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.chatSettings)&&""!==(null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.chatSettings)||void 0===o?void 0:o.chatInitialMessage)&&tn(!0)}).catch(function(e){console.error(e)})},nt=function(){return o(void 0,void 0,void 0,function(){var e,n;return i(this,function(t){e="".concat(We,"/api/chat/history?name=").concat(Fe,"&organizationName=").concat(H);try{n={method:"GET",params:{guestSessionId:Ae.current},withCredentials:!0},S.get(e,n).then(function(e){var n=e.data;n.length>0?(Ze(n),Yn()):tn(!0)}).catch(function(e){console.error(e)})}catch(e){Qe(!1),console.error(e)}return[2]})})},tt=function(){var e="".concat(We,"/api/chat/resetHistory?name=").concat(Fe,"&organizationName=").concat(H);try{var n={method:"GET",params:{guestSessionId:Ae.current},withCredentials:!0};S.get(e,n).then(function(){G(!0),rn(""),wn(null),Mn.current.clear(),jn.current.clear(),Le.current="".concat(w()),Ze([]),tn(!0),Un.current=null,null==te||te(),V&&V()}).catch(function(e){console.error(e)}).finally(function(){Ae.current="".concat(Fe,"-").concat(H,"-").concat(w())})}catch(e){Qe(!1),console.error(e)}};function ot(e){return null==e?void 0:e.replace(/<a [^>]*>.*?<\/a>/g,function(e){return null==e?void 0:e.replace(/\*/g,"*")})}var it=function(e,o,i,r,a,s,l){var c,u,d,v,m,h,p,g,f,C,y,b,S,x,k,_,T,E,I,M,R,D,N,F,A,L,W,q,z,P;if(null===(u=null===(c=null==e?void 0:e.chatStream)||void 0===c?void 0:c.continueChatResult)||void 0===u?void 0:u.header_message){var j={header_message:e.chatStream.continueChatResult.header_message,responsedata:null===(m=null===(v=null===(d=null==e?void 0:e.chatStream)||void 0===d?void 0:d.continueChatResult)||void 0===v?void 0:v.message)||void 0===m?void 0:m.content};Xn(j)}var B=null===(h=null==e?void 0:e.chatStream)||void 0===h?void 0:h.continueChatResult,H=null==B?void 0:B.isEnd,O=(null===(p=null==B?void 0:B.message)||void 0===p?void 0:p.citations)||[];H&&O.length>0&&ce&&ce(O);var U={role:"assistant",content:"",id:w()};if(null===(y=null===(C=null===(f=null===(g=null==e?void 0:e.chatStream)||void 0===g?void 0:g.continueChatResult)||void 0===f?void 0:f.message)||void 0===C?void 0:C.content)||void 0===y?void 0:y.includes("WaitMessage: "))$e(!0),U.content=function(e){var n="WaitMessage: ",t=e.indexOf(n);if(-1!==t){var o=e.substring(t+13);return null==o?void 0:o.replaceAll("WaitMessage: ","")}return""}((null===(x=null===(S=null===(b=null==e?void 0:e.chatStream)||void 0===b?void 0:b.continueChatResult)||void 0===S?void 0:S.message)||void 0===x?void 0:x.content)+"\n\n"),""!==U.content&&(Qe(!1),Ze(n(n([],Ge,!0),[{role:"user",content:a,time:r,isFirstQuestionSent:s||!1,id:l||(null===(_=null===(k=null==e?void 0:e.chatStream)||void 0===k?void 0:k.continueChatResult)||void 0===_?void 0:_.requestId)||"",reply:""},U],!1)));else{$e(!1);var G=null===(E=null===(T=null==e?void 0:e.chatStream)||void 0===T?void 0:T.continueChatResult)||void 0===E?void 0:E.requestId;"string"==typeof G&&G&&ve&&ve(G);var Z=function(e,o,i,r){var a,s,l,c,u,d,v,m={role:"assistant",content:"",id:w(),time:new Date,citations:[]},h=(null===(a=null==e?void 0:e.chatStream)||void 0===a?void 0:a.continueChatResult)||{},p=null==h?void 0:h.requestId,g=null==h?void 0:h.preserve_message,f=null==h?void 0:h.isEnd,C=(null===(s=null==h?void 0:h.message)||void 0===s?void 0:s.content)||"",y=null==h?void 0:h.is_orchestrator,b=null==h?void 0:h.thinking_break,S=(null===(l=null==h?void 0:h.message)||void 0===l?void 0:l.citations)||[];if(p&&g&&C&&!f){var x=r.current.get(p)||[];x[x.length-1]!==C&&(x.push(C),r.current.set(p,x))}var k=(p&&r.current.get(p)||[]).join("\n\n"),_="";if(f)_=k&&""!==k.trim()?k:C;else if(g)_=k;else{var T=C.replace(/<!--(?![\s\S]*-->)[\s\S]*$/,"").trimEnd(),E=!1===y||b||0!==S.length?"":T;_=k?"".concat(k,"\n\n").concat(E):E}if(m.content=ot(_),!0===(null==h?void 0:h.thinking_break)&&!0===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)&&o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1}),!1===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){if(h.explainability_id&&h.responded_by){var I=h.explainability_id,M=h.responded_by;i.has(I)||i.set(I,{responded_by:M,index:o.length})}i.has(h.explainability_id)?o[null==(R=i.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(c=h.explainability_id)&&void 0!==c?c:"",isParallelToolResponse:!0}:o=n(n([],o,!0),[{responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(u=h.explainability_id)&&void 0!==u?u:"",isParallelToolResponse:!1}],!1)}if(!0===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){var R;h.explainability_id&&h.responded_by&&(I=h.explainability_id,M=h.responded_by,i.has(I)||i.set(I,{responded_by:M,index:o.length})),i.has(h.explainability_id)?o[null==(R=i.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(d=h.explainability_id)&&void 0!==d?d:"",isParallelToolResponse:!0}:o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(v=h.explainability_id)&&void 0!==v?v:"",isParallelToolResponse:!1})}return t({orchestratorAndAgentsMessages:o},m)}(e,i,o,jn);Z.time=new Date,Z.citations=O,Z.isEnd=null===(M=null===(I=null==e?void 0:e.chatStream)||void 0===I?void 0:I.continueChatResult)||void 0===M?void 0:M.isEnd,Z.requestId=null===(D=null===(R=null==e?void 0:e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===D?void 0:D.requestId,Z.sessionId=Ae.current,null===(N=Z.orchestratorAndAgentsMessages)||void 0===N||N.forEach(function(e){e&&e.header_message&&Xn(e)}),(""!==(null==Z?void 0:Z.content)||(null==Z?void 0:Z.orchestratorAndAgentsMessages)&&(null==Z?void 0:Z.orchestratorAndAgentsMessages.length)>0)&&(Qe(!1),Ze(n(n([],Ge,!0),[{role:"user",content:a||"",time:r,isFirstQuestionSent:s||!1,id:l||(null===(A=null===(F=null==e?void 0:e.chatStream)||void 0===F?void 0:F.continueChatResult)||void 0===A?void 0:A.requestId)||"",requestId:null!==(q=null===(W=null===(L=null==e?void 0:e.chatStream)||void 0===L?void 0:L.continueChatResult)||void 0===W?void 0:W.requestId)&&void 0!==q?q:""},Z],!1))),en(null===(P=null===(z=null==e?void 0:e.chatStream)||void 0===z?void 0:z.continueChatResult)||void 0===P?void 0:P.isEnd)}},rt=m(function(e){void 0===e&&(e="inactivity"),console.error("Stream failed or timed out due to: ".concat(e)),Bn.current=!1,en(!0),dn(!1),kn(!1),Qe(!1),$e(!1),Pn.current&&U&&(x(Pn.current,U,!1),jn.current.delete(Pn.current)),Ze(function(t){var o=n([],t,!0).reverse().find(function(e){return"user"===e.role}),i=((null==o?void 0:o.content)||"").replace(/"/g,"""),r=n([],t,!0),a=r[r.length-1];a&&"assistant"===a.role&&!a.isEnd&&r.pop();var s="I ran into an unexpected issue while trying to process this learning.";return"inactivity"===e?s="Something went wrong—teaching is taking longer than expected.":"websocket_error"===e&&(s="I lost connection to the server while working on that."),n(n([],r,!0),[{role:"assistant",content:"".concat(s,' Please try again.\n\n<button class="clickable-button" data-value="').concat(i,'">Retry</button>'),id:w(),time:new Date,isEnd:!0,citations:[]}],!1)})},[Ie,U]),at=m(function(){On.current&&(clearTimeout(On.current),On.current=null),Ie&&Ie>0&&(On.current=setTimeout(function(){return rt("inactivity")},Ie))},[rt,Ie]),st=function(e,r,a,s,l,c){return o(void 0,void 0,void 0,function(){var o,s,u,d,v,m,h,p,g,f,C,y,b,S,x,_;return i(this,function(i){switch(i.label){case 0:if(o=(void 0!==a?a:He||"").trim(),(s="Enter"===(null==e?void 0:e.key)&&!(null==e?void 0:e.shiftKey)&&!Ee)&&(null===(C=null==e?void 0:e.preventDefault)||void 0===C||C.call(e)),u="user"===(null===(y=Ge[Ge.length-1])||void 0===y?void 0:y.role),!o||un||Bn.current||u||(null==e?void 0:e.key)&&!s)return[2];if(Un.current||(Un.current=(new Date).toISOString(),console.log("Session start time set to ".concat(Un.current))),!De)return[3,5];Qe(!0),ln("Validating session..."),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,De(Un.current)];case 2:return i.sent()?[3,4]:(Kn(!0),Qe(!1),c&&c(!1),[2]);case 3:return d=i.sent(),console.error("Validation error:",d),Kn(!0),Qe(!1),c&&c(!1),[2];case 4:Qe(!1),i.label=5;case 5:return Bn.current=!0,"I want to add a rule description"===o?(en(!1),ze.current=!0,dn(!0),!Sn&&o&&wn(a||"manual_entry"),v=new Date,Ze(function(e){return n(n([],e.map(function(e,n){var o;return t(t({},e),{content:null===(o=ot(e.content))||void 0===o?void 0:o.replace("WaitMessage: ","")})}),!0),[{role:"user",content:o,time:v,isFirstQuestionSent:!1,id:l||w()}],!1)}),Yn("smooth"),setTimeout(function(){Ze(function(e){return n(n([],e,!0),[{role:"assistant",content:"I'd be happy to help you set up a new rule! To get started, could you tell me what kind of behavior or logic you would like this rule to follow?",id:w(),citations:[],time:new Date}],!1)}),Yn("smooth"),setTimeout(function(){dn(!1),en(!0)},500)},500),[2]):(en(!1),ze.current=!0,dn(!0),!Sn&&o&&wn(a||"manual_entry"),m=new Date,Ze(function(e){var i=e.map(function(e){var n;return t(t({},e),{content:null===(n=ot(e.content))||void 0===n?void 0:n.replace("WaitMessage: ","")})});return l&&i.some(function(e){return e.id===l})?i.map(function(e){return e.id===l?t(t({},e),{content:o}):e}):n(n([],i,!0),[{role:"user",content:o,time:m,isFirstQuestionSent:!1,id:l||w()}],!1)}),Yn("smooth"),h=new Map,p=[],g=function(e){var n;if(!e)return{};var t=Object.keys(e);return 1===t.length&&"current"===t[0]?null!==(n=e.current)&&void 0!==n?n:{}:e},f={WEBSOCKET_URL:U,organizationName:H,chatAssistantName:Fe,selectedAIModel:"gpt-4",replyMessage:"",userName:null!==(b=null==Te?void 0:Te.name)&&void 0!==b?b:"Guest User",userEmailId:null!==(S=null==Te?void 0:Te.email)&&void 0!==S?S:"guestUser@example.com",userId:null!==(x=null==Te?void 0:Te.id)&&void 0!==x?x:"Guest User",query:o,requestId:"requestId-".concat(w()),customPrompt:"",enableForBackend:!1,guestSessionId:Ae.current,chatPreviewId:Le.current,customMetaData:g(Y),aiModel:"",enableLogs:!0,onStreamEvent:function(e){var n,t,i,a,s,c,u=null===(t=null===(n=null==e?void 0:e.chatStream)||void 0===n?void 0:n.continueChatResult)||void 0===t?void 0:t.requestId,d=null===(a=null===(i=null==e?void 0:e.chatStream)||void 0===i?void 0:i.continueChatResult)||void 0===a?void 0:a.header_message;console.log("📦 [Stream Chunk Received] With RequestID and header_message: ".concat(u,",").concat(d)),at();var v=null===(c=null===(s=null==e?void 0:e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===c?void 0:c.error_state;if(Array.isArray(v)&&v.length>0)return console.error("Agent returned an error_state during stream:",v),void rt("agent_error");it(e,h,p,m,o,r,l)},onStreamEnd:function(e){var o,i,r=null===(i=null===(o=null==e?void 0:e.chatStream)||void 0===o?void 0:o.continueChatResult)||void 0===i?void 0:i.requestId;console.log("✅ [Stream Completed] RequestID: ".concat(r)),On.current&&clearTimeout(On.current),Bn.current=!1,en(!0),dn(!1),kn(!1);var a=Date.now(),s=zn.current.get(Pn.current);if(s){var l=Math.round((a-s)/1e3).toFixed(1);Ze(function(e){var o=n([],e,!0).reverse().findIndex(function(e){return"assistant"===e.role});if(-1===o)return e;var i=e.length-1-o;return e.map(function(e,n){return n===i?t(t({},e),{finalTimeTaken:l}):e})})}},onError:function(e){On.current&&clearTimeout(On.current),console.error("Stream error:",e),rt("websocket_error")}},o&&(Qe(!0),null===(_=je.current)||void 0===_||_.blur(),Oe(""),Yn(),ln(l?"Just a moment, processing your request...":"Okay, got it. Let me take a moment to work on this and I'll get back to you shortly."),zn.current.set(f.requestId,Date.now()),Pn.current=f.requestId,at(),Hn.current+=1,console.log("🚀 [UI Action] stream started (Total UI invocations: ".concat(Hn.current,") | RequestID: ").concat(f.requestId,' | Query: "').concat(o,'"')),k(f)),c&&c(!1),[2])}})})},lt=c(null);h(function(){lt.current=st});var ct=m(function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return null===(e=lt.current)||void 0===e?void 0:e.call.apply(e,n([lt],t,!1))},[]),ut=d(function(){return{p:function(e){e.node;var n=e.children;return r(e,["node","children"]),a("div",t({style:{margin:0,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px",fontFamily:"inherit"}},{children:n}))},button:function(e){e.node;var n=e.className,o=e.children,i=r(e,["node","className","children"]),l=L(o),c=i["data-value"],u="Tester Genie"===l;return a(M,t({},i,{className:n,handleStream:ct,isStreamEnd:Ye,disabled:!!Sn||!!Ee,isLastMessage:!0,style:{margin:0},isTesterGenie:u,"data-selected":Sn===l||Sn===c?"true":Sn?"false":void 0},{children:s("span",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o,u&&s("svg",t({width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[a("path",{d:"M7.20368 8.94768e-06C7.48895 -0.00208639 7.69331 0.364327 7.83856 0.57465C8.14381 1.01633 8.38012 1.87909 7.71077 2.14118C8.57167 2.21011 9.70406 2.93098 10.1785 3.64699C10.5932 4.27286 10.4559 5.16037 9.80301 5.56007L9.9502 7.16593C9.97671 7.44871 10.0265 7.87092 10.0299 8.14457C10.4213 8.23046 11.0787 8.55391 11.326 8.87592C11.5979 8.75656 11.9189 8.76963 12.1688 8.93469C12.3563 8.67751 12.5598 8.41456 12.7507 8.15787C12.3283 7.45155 12.5047 6.57745 13.2143 6.13784C13.5375 5.9377 13.9264 5.87277 14.2971 5.95705C14.0961 6.30964 13.8775 6.72182 13.6593 7.05857C13.7906 7.2436 13.9184 7.44225 14.044 7.63194L14.8022 7.63198C15.0349 7.30106 15.2515 6.90827 15.4835 6.59349C15.8623 7.0712 15.8156 7.79671 15.4734 8.28241C15.1318 8.76741 14.4886 8.9899 13.9118 8.88251C13.758 9.12108 13.5577 9.39243 13.3941 9.63201C13.7143 9.9316 13.7725 10.364 13.4067 10.6594C13.5231 10.8889 13.5309 11.1613 13.447 11.402C13.1502 12.2523 12.1724 12.5645 11.3474 12.5025C11.1171 12.4852 10.939 12.4698 10.7197 12.3953C10.8724 13.1271 10.7744 14.2031 10.5132 14.9051C10.1688 15.8304 9.43632 16.5569 8.54503 16.9655C7.90465 17.2706 7.21222 17.3607 6.50472 17.4505C5.74445 17.5471 4.75801 17.4362 4.08533 17.825C3.9327 17.9132 3.86566 18.0173 3.82943 18.1792C3.94996 18.5982 4.47858 18.6063 4.78474 18.8897C5.20191 19.2758 4.90716 19.9663 4.36611 19.9908C4.31476 19.9931 4.26867 19.9867 4.23186 19.9493C4.23089 19.8303 4.47587 19.7199 4.49787 19.5262C4.55075 19.0604 3.70014 19.0078 3.37835 18.8374C3.13013 18.706 2.99537 18.6309 2.82242 18.4021C2.63795 18.1579 2.58428 17.835 2.63138 17.5392C2.74868 16.7847 3.47123 16.393 4.12184 16.1497C4.61314 15.9659 5.46304 15.7158 5.52019 15.0793C5.58589 14.348 4.97543 13.5523 4.57739 12.9807C4.44275 12.7875 4.3039 12.579 4.16309 12.3919C4.18987 12.365 4.21049 12.3463 4.23916 12.3212C4.59619 12.6218 5.21209 12.6421 5.55038 12.2979C5.70457 12.144 5.78974 11.9342 5.78642 11.7164C5.78121 11.4493 5.63382 11.2002 5.4454 11.019C5.44704 10.9932 5.44824 10.9676 5.449 10.9419C5.4566 10.6648 5.37505 10.4902 5.1892 10.2943C5.18398 10.2538 5.17776 10.2134 5.17053 10.1732C5.08123 9.69297 4.71708 9.34182 4.23415 9.27108C4.16418 9.26083 3.96108 9.26105 3.92071 9.23344C3.90485 9.1828 3.9059 9.20792 3.91904 9.15527C4.22103 8.90139 4.14407 8.78214 4.31107 8.4846C4.42301 8.28513 4.73047 8.15239 4.95452 8.10701C4.96167 7.51076 5.03684 6.88562 5.10036 6.29144C5.12451 6.0655 5.12531 5.75046 5.1511 5.55257C4.11108 4.86747 4.39091 3.75946 5.25465 3.06391C5.84978 2.58469 6.34496 2.31002 7.10143 2.14517C7.01589 2.10416 6.93842 2.04811 6.87269 1.97972C6.77021 1.87349 6.70248 1.73857 6.67853 1.59293C6.60568 1.12096 7.04104 0.914625 7.18759 0.526392C7.26428 0.323403 7.03925 0.146075 7.20368 8.94768e-06Z",fill:"#475569"}),a("path",{d:"M7.459 4.5C7.48797 4.50312 7.71949 4.61154 7.76205 4.63061C8.27062 4.85835 8.87051 5.09164 9.35658 5.3582C9.36602 6.03495 9.37016 6.56625 8.70573 6.91519C8.6633 6.80883 8.63019 6.72409 8.56332 6.63044C8.43786 6.45568 8.24656 6.33963 8.03354 6.30909C7.8434 6.28211 7.65146 6.3197 7.49586 6.43503C7.21897 6.21256 6.76265 6.28197 6.5229 6.52486C6.39308 6.65639 6.34815 6.75074 6.28902 6.92344C5.59702 6.5957 5.58761 6.04267 5.60583 5.35582C5.89882 5.23844 6.21318 5.0724 6.50153 4.941C6.82145 4.79522 7.14482 4.6574 7.459 4.5Z",fill:"#D1EDFD"}),a("path",{d:"M11.0756 10.6406C11.1037 10.6701 11.1324 10.7706 11.1535 10.8145C11.2818 11.0817 11.4922 11.1945 11.7498 11.2977C11.5607 11.63 11.4567 11.8797 11.1034 12.0466L11.0839 12.0517C10.9262 12.0927 10.7996 12.0968 10.651 12.0135C10.4755 11.915 10.3807 11.6614 10.4792 11.478C10.6388 11.1809 10.8877 10.9272 11.0756 10.6406Z",fill:"#D1EDFD"}),a("path",{d:"M11.6036 9.1377C11.6993 9.11763 11.8391 9.16378 11.9294 9.19593C11.6952 9.50644 11.4706 9.81614 11.2327 10.1261L11.1572 10.2255C10.7581 9.73539 11.0333 9.24481 11.6036 9.1377Z",fill:"#D1EDFD"}),a("path",{d:"M7.49681 0.882812C7.53691 0.925159 7.61244 1.08523 7.63598 1.14156C7.74243 1.39673 7.75769 1.76908 7.38596 1.77504C7.28236 1.75599 7.15628 1.68938 7.13517 1.5783C7.0843 1.3107 7.35609 1.09964 7.48737 0.897583L7.49681 0.882812Z",fill:"#D1EDFD"}),a("path",{d:"M1.68305 6.17249C1.71659 6.1673 1.8134 6.16478 1.84892 6.16432C2.34052 6.15616 2.81496 6.34495 3.16655 6.68866C3.50847 7.01806 3.70349 7.47119 3.70765 7.94596C3.70896 8.42345 3.54045 8.85284 3.20281 9.19025C3.34033 9.28068 3.5321 9.52219 3.6543 9.65748C4.17158 9.39073 4.91447 9.69339 4.79675 10.3444C5.08751 10.5485 5.19656 10.8288 5.0585 11.1674C5.15418 11.2375 5.25595 11.3205 5.32383 11.4186C5.40228 11.5303 5.4309 11.6695 5.40291 11.8031C5.32228 12.1857 4.90085 12.3286 4.57669 12.1236C4.51367 12.0838 4.42258 11.9595 4.35299 11.9431C4.30669 11.9557 4.28453 11.9584 4.23644 11.9644C4.22885 11.9742 4.22118 11.9841 4.21343 11.9938C3.93597 12.3413 3.49234 12.4682 3.06933 12.5157C2.85285 12.518 2.70432 12.5146 2.49066 12.4609C1.80785 12.2892 1.50808 11.6167 1.70723 10.9639C1.829 10.5648 2.11891 10.2506 2.48939 10.0518C2.54655 10.132 2.57559 10.2191 2.64066 10.303C2.73571 10.2223 2.82048 10.1482 2.92363 10.0773C2.81023 9.95313 2.66811 9.7693 2.55817 9.63584C2.38871 9.6878 2.23026 9.72879 2.05298 9.74653C1.54239 9.80228 1.03118 9.64711 0.637735 9.31695C0.269964 9.01018 0.0453493 8.54827 0.00544736 8.07322C-0.0309495 7.60988 0.116099 7.15077 0.414918 6.79478C0.742554 6.41198 1.18728 6.21393 1.68305 6.17249Z",fill:"#475569"}),a("path",{d:"M1.79616 6.5951C2.54894 6.5619 3.18687 7.14364 3.22301 7.8963C3.25915 8.64894 2.67989 9.28913 1.92739 9.3282C1.17073 9.3675 0.526231 8.78435 0.489885 8.02753C0.45354 7.27071 1.03921 6.62849 1.79616 6.5951Z",fill:"#D1EDFD"}),a("path",{d:"M4.93607 11.4844C5.12839 11.6261 5.22049 11.9085 4.91876 11.9419C4.8067 11.8805 4.78491 11.8646 4.71094 11.7561C4.81572 11.6752 4.862 11.5925 4.93607 11.4844Z",fill:"#FEFEFD"}),a("path",{d:"M12.5164 3.58594L12.5715 3.59466C12.6589 3.65863 12.6908 3.94434 12.7882 4.05193C12.8789 4.15216 12.9155 4.17816 13.0326 4.24929C13.1363 4.31224 13.3325 4.34025 13.384 4.43124C13.3643 4.56218 13.0693 4.54857 12.9127 4.69344C12.6903 4.89898 12.7114 5.06971 12.5892 5.28622C12.5669 5.28439 12.5368 5.2868 12.5261 5.27346C12.4336 5.15843 12.4072 4.9308 12.3099 4.81465C12.1627 4.63903 11.9972 4.60054 11.7981 4.51372C11.7544 4.49467 11.7266 4.47099 11.7129 4.42649C11.7867 4.31876 12.0509 4.34309 12.2376 4.14892C12.43 3.94901 12.4155 3.72208 12.5164 3.58594Z",fill:"#475569"}),a("path",{d:"M2.13644 3.72656C2.24401 3.77084 2.29712 4.1268 2.431 4.25226C2.60327 4.41371 2.7311 4.41949 2.93246 4.52449C2.96024 4.53897 2.97173 4.56042 2.97671 4.58878C2.89584 4.6981 2.61854 4.70721 2.4596 4.85659C2.26275 5.04156 2.27341 5.29132 2.17022 5.42088C2.16192 5.41849 2.11671 5.40232 2.1156 5.40043C2.01291 5.21216 1.9836 5.04909 1.84812 4.87273C1.73599 4.72675 1.36534 4.69959 1.32812 4.56939C1.3835 4.47941 1.67823 4.44211 1.82291 4.30563C2.02737 4.11274 2.0042 3.8372 2.13644 3.72656Z",fill:"#475569"})]}))]}))}))}}},[ct,Ye,Sn,Ee]),dt=d(function(){return Ge.some(function(e){return e.isSkeleton})},[Ge]),vt=function(e){return o(void 0,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return _e?[4,_e(e)]:[3,2];case 1:t.sent(),Ze(function(e){return n(n([],e,!0),[{role:"assistant",content:"Thanks for your feedback — this will help improve future suggestions.",id:w(),citations:[],time:new Date,isEnd:!0}],!1)}),setTimeout(function(){return Yn("smooth")},100),t.label=2;case 2:return[2]}})})};return s("div",t({className:"".concat(N.customFont," ").concat(D.chatContainer),style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:Se&&!dt?"0 0 20px 5px rgba(37, 99, 235, 0.5)":"none"}},{children:[s("div",t({ref:qe,className:D.scrollWrapper},{children:[a("div",t({ref:In,className:D.stickyHeader},{children:a(T,{resetChatHistory:tt,isStreamEnd:Ye,chatTitle:X,onResize:se,chatSize:ae,movingTowards:le})})),s("div",t({className:D.messagesList},{children:[s("div",t({className:D.initialMessageRow},{children:[a("div",t({className:D.iconWrapper},{children:a(q,{})})),a("div",t({className:D.welcomeTextWrapper},{children:a("div",t({className:D.welcomeMarkdownWrapper},{children:a("span",{children:a(y,t({rehypePlugins:[b],components:ut},{children:ie}))})}))}))]})),Ge.length>0&&Ge.map(function(e,n){var o,i;return s("div",t({className:D.messageRow},{children:["assistant"===e.role?a("div",t({className:D.assistantIconContainer},{children:a(q,{})})):a("div",{className:D.userSpacer}),a("div",t({className:D.messageContent},{children:"assistant"===e.role?s(l,{children:[e.orchestratorAndAgentsMessages&&e.orchestratorAndAgentsMessages.length>0&&a(_,{orchestratorAndAgentsMessages:null==e?void 0:e.orchestratorAndAgentsMessages,isStreamEnd:Ye,finalTimeTaken:null==e?void 0:e.finalTimeTaken},null!==(o=null==e?void 0:e.finalTimeTaken)&&void 0!==o?o:null==e?void 0:e.id),a(E,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ge,handleStream:st,isLastMessage:n===Ge.length-1,onSave:re,citations:null==e?void 0:e.citations,setChatSize:se,chatSize:ae,isStreamEnd:Ye,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onTypeResponseClick:function(){var e;Ln(!0),null===(e=je.current)||void 0===e||e.focus()},onComparisonLinkClick:ke,baseURL:We,onFeedbackSubmit:vt,isGlobalEditActive:Ee}),e.hasOwnProperty("isEnd")&&!(null==e?void 0:e.isEnd)&&(null===(i=null==e?void 0:e.content)||void 0===i?void 0:i.length)>0&&s(l,{children:[a(I,{variant:"text",width:"50%",height:20}),a("div",{style:{marginTop:"10px"}}),a(I,{variant:"text",width:"100%",height:40})]}),a("div",t({className:D.timestamp},{children:e.time&&!isNaN(new Date(e.time).getTime())?new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}):s("div",t({className:D.userMessageWrapper},{children:[s("div",t({className:D.userMessageBubble,style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:e.isSkeleton||dt||e.id!==Dn?"none":"0 0 15px 3px rgba(37, 99, 235, 0.6)"}},{children:[e.isSkeleton?s("div",t({style:{display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",padding:"8px 0"}},{children:[a(I,{variant:"text",width:"100%",height:16}),a(I,{variant:"text",width:"80%",height:16})]})):a(E,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ge,handleStream:st,isLastMessage:n===Ge.length-1,onSave:re,citations:null==e?void 0:e.citations,isStreamEnd:Ye,isGlobalEditActive:Ee,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onComparisonLinkClick:ke,baseURL:We,onFeedbackSubmit:vt}),a("div",t({style:{marginTop:"0.5rem"}},{children:a(z,{})}))]})),a("div",t({className:D.userTimestamp},{children:new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}))}))]}),e.id)}),Ve&&s("div",t({className:D.loadingRow},{children:[a("div",t({className:D.iconWrapper,style:{marginTop:"0.2rem"}},{children:a(q,{})})),a("div",t({className:D.loadingTextWrapper},{children:a("span",{children:sn})}))]})),a("div",{ref:Pe,style:{float:"left",clear:"both"}})]}))]})),a("div",t({className:D.inputAreaWrapper},{children:a(C,t({title:$?"Please wait for the validation to be completed.":""},{children:s("div",t({className:"".concat(D.inputBoxContainer," ").concat(Qn?D.disabled:""),style:An?{boxShadow:"0 0 15px 3px rgba(37, 99, 235, 0.5)",borderColor:"#2563eb",transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}:{transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}},{children:[Ge.length>0&&!gn&&a("div",t({onMouseDown:function(e){e.preventDefault(),Yn("smooth")},className:D.scrollToBottomBtn},{children:a(F,{})})),s("div",t({style:{width:"100%",display:"flex"}},{children:[a("textarea",{ref:je,placeholder:de,value:He||"",onChange:function(e){Oe(e.target.value)},onFocus:function(){return hn(!0)},onBlur:function(){return hn(!1)},onKeyDown:function(e){return st(e)},disabled:Qn,className:"no-scrollbar ".concat(D.chatTextarea),style:{minHeight:mn||He&&He.length>40?"120px":"50px",height:mn||He&&He.length>40?"120px":"50px",maxHeight:"120px"}}),a("span",t({className:D.sendButtonWrapper},{children:a("button",t({onClick:function(e){$n||st(new KeyboardEvent("keydown",{key:"Enter"}))},disabled:$n,className:"".concat(D.sendButton," ").concat($n?D.disabled:D.active)},{children:a(W,{})}))}))]}))]}))}))})),s("div",t({className:D.footerTools},{children:[a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"speaker",isActive:!1,onClick:function(){return null},disabled:!1})}))})),a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"microphone",isActive:!1,onClick:function(){return null},disabled:!1})}))}))]})),a(g,t({open:Zn,onClose:function(){},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:s(f,t({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[a("h3",t({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"10px"}},{children:"Session Expired"})),a("p",t({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"20px"}},{children:"Changes were made to the learnings in this scope while you were editing. To avoid conflicts, concurrent edits aren’t allowed."})),s(f,t({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[a("button",t({onClick:function(){Kn(!1),tt()},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Reset Session"})),a("button",t({onClick:function(){Kn(!1),null==Ne||Ne()},style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Discard & Close"}))]}))]}))}))]}))};export{j as autoGeneratePrompt,B as default};
|
|
1
|
+
import{__makeTemplateObject as e,__spreadArray as n,__assign as t,__awaiter as o,__generator as i,__rest as r}from"tslib";import{jsx as a,jsxs as s,Fragment as l}from"react/jsx-runtime";import{useRef as c,useState as u,useMemo as d,useEffect as v,useCallback as m,useLayoutEffect as h}from"react";import{keyframes as p,Dialog as g,Box as f}from"@mui/material";import C from"@mui/material/Tooltip";import y from"react-markdown";import b from"rehype-raw";import S from"axios";import{v4 as w}from"uuid";import{stopStreaming as x,startChatStream as k}from"@e-llm-studio/streaming-response";import{WatchMeWork as _}from"@e-llm-studio/watch-me-work";import T from"./ChatHeader.js";import E from"../MessageRendering/MessageRendering.js";import{Skeleton as I}from"../atoms/SkeletonLoader/SkeletonLoader.js";import{ActionableButton as M}from"../MessageRendering/ClickableChatComponents.js";import R from"../AudioWaveform.js";import D from"./ChatComponent.module.css.js";import N from"../../InstantLearning.module.css.js";import{ScrollToBottom as F}from"../_svg/ScrollToBottom.js";import{useHeaderObserver as A,extractTextFromChildren as L}from"../../helpers/utils.js";import{SendButton as W}from"../_svg/SendButton.js";import q from"../_svg/SparkleIcon.js";import{UserIcon as P}from"../_svg/UserIcon.js";var z,j=function(e,n){return S.post("".concat(e||"https://devllmstudio.creativeworkspace.ai","/api/chat/chatResponse"),{name:"ilggcautopromptgen",organizationName:"techolution",prompt:n||"Generate a query"},{headers:{"Content-Type":"application/json"},withCredentials:!0}).then(function(e){return e.data}).catch(function(e){throw console.error("Error calling auto-generate API:",e),e})},B=function(j){var B=j.chatAssistantName,H=j.organizationName,O=j.baseUrl,U=j.baseWebsocketUrl,G=j.setIsNewChatClicked;j.ThinkingBulbIconComponent;var Z=j.isFormSaveClicked,K=j.setIsFormSavedClicked,V=j.onResetLearningData,Q=j.sendMessageInChat,J=j.setSendMessageInChat,$=j.isFormValidating,X=j.chatTitle,Y=j.customMetaData,ee=j.headerMessageHandlers;j.aiResponse;var ne=j.setAIResponse,te=j.onResetChat,oe=j.initialChatMessage,ie=void 0===oe?"":oe,re=j.onSave,ae=j.chatSize,se=j.setChatSize,le=j.movingTowards,ce=j.setCitations,ue=j.textareaPlaceholder,de=void 0===ue?"Tell me more about this learning...":ue,ve=j.setCurrentRequestId,me=j.showSavedMessage,he=void 0!==me&&me,pe=j.savedMessage,ge=j.isError,fe=void 0!==ge&&ge,Ce=j.errorMessage,ye=void 0===Ce?"There was an error saving your changes.":Ce;j.isSaving;var be=j.isHighlighted,Se=void 0!==be&&be,we=j.onStreamingStateChange,xe=j.onViewComparison;j.isCopyEnabled;var ke=j.onComparisonLinkClick,_e=j.onSubmitFeedback,Te=j.userDetails,Ee=j.isGlobalEditActive,Ie=j.socketTimeOutInMilliSeconds,Me=j.initialDraftMessage,Re=void 0===Me?"":Me,De=j.onValidateSession,Ne=j.onCloseSessionModal,Fe=B,Ae=c("".concat(Fe,"-").concat(H,"-").concat(w())),Le=c("".concat(w())),We=O,qe=c(null),Pe=c(!0),ze=c(null),je=c(null),Be=u(Re),He=Be[0],Oe=Be[1],Ue=u([]),Ge=Ue[0],Ze=Ue[1],Ke=u(!1),Ve=Ke[0],Qe=Ke[1],Je=u(!1);Je[0];var $e=Je[1],Xe=u(!0),Ye=Xe[0],en=Xe[1],nn=u(!0);nn[0];var tn=nn[1],on=u("");on[0];var rn=on[1],an=u(""),sn=an[0],ln=an[1],cn=u(!1),un=cn[0],dn=cn[1],vn=u(!1),mn=vn[0],hn=vn[1],pn=u(!0),gn=pn[0],fn=pn[1],Cn=u("100%");Cn[0];var yn=Cn[1],bn=u(null),Sn=bn[0],wn=bn[1],xn=u(!1);xn[0];var kn=xn[1],_n=u(!1),Tn=_n[0],En=_n[1],In=c(null),Mn=c(new Set),Rn=u(null),Dn=Rn[0],Nn=Rn[1],Fn=u(!1),An=Fn[0],Ln=Fn[1],Wn=u(!1);Wn[0],Wn[1];var qn=u(null);qn[0],qn[1],c(null),c(null);var Pn=c(new Map),zn=c(""),jn=c(new Map),Bn=c(!1),Hn=c(0),On=c(null),Un=c(null),Gn=u(!1),Zn=Gn[0],Kn=Gn[1];p(z||(z=e(["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "],["\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n "])));var Vn=d(function(){return""===(null==He?void 0:He.trim())||un},[He,un]),Qn=d(function(){return $},[$]),Jn=d(function(){var e;return Ge.length>0&&"user"===(null===(e=Ge[Ge.length-1])||void 0===e?void 0:e.role)},[Ge]),$n=d(function(){return Vn||$||!!Ee||Jn},[Vn,$,Ee,Jn]);v(function(){Re&&!He&&(Oe(Re),hn(!0),setTimeout(function(){if(je.current){je.current.focus();var e=Re.length;je.current.setSelectionRange(e,e)}},400))},[Re]),v(function(){null==we||we(un)},[un,we]),v(function(){return function(){On.current&&clearTimeout(On.current)}},[]),v(function(){var e=qe.current,n=function(){if(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;fn(t-n-o<=20)}};return e&&(e.addEventListener("scroll",n),n()),function(){e&&e.removeEventListener("scroll",n)}},[Ge]);var Xn=A({handlers:ee,setResult:ne}).processHeaderMessage;v(function(){he&&En(!0)},[he]),v(function(){if(An){var e=setTimeout(function(){Ln(!1)},3e3);return function(){return clearTimeout(e)}}},[An]),v(function(){Z&&!Ee&&(st(new KeyboardEvent("keydown",{key:"Enter"}),!1,"Save this Learning"),K(!1))},[Z]),v(function(){if(Q)try{if(Q.startsWith("__SKELETON__:")){var e=Q.split(":"),o=e[1],i=e.slice(2).join(":"),r={role:"user",content:"",id:o,time:new Date,isSkeleton:!0,skeletonContent:i};return Ze(function(e){return n(n([],e,!0),[r],!1)}),st(new KeyboardEvent("keydown",{key:"Enter"}),!1,i,!1,o),Nn(o),J&&J(""),void setTimeout(function(){Nn(null)},2e3)}if(Q.startsWith("__SKELETON_END__::")){var a=Q.split("::")[1]||"";return Ze(function(e){return e.map(function(e){return e.isSkeleton?t(t({},e),{isSkeleton:!1,content:e.skeletonContent||a}):e})}),void(J&&J(""))}var s=w();st(new KeyboardEvent("keydown",{key:"Enter"}),!1,Q,!1,s),Nn(s),J&&J(""),setTimeout(function(){return Nn(null)},2e3)}catch(e){console.error("Error handling sendMessageInChat signal",e)}},[Q]),v(function(){et(),nt();var e=function(){var e,n=(null===(e=null==In?void 0:In.current)||void 0===e?void 0:e.clientHeight)||0,t="calc(100% - ".concat(n,"px - 10px)");yn(t)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var Yn=m(function(e){var n="string"==typeof e?e:"smooth";ze.current&&ze.current.scrollIntoView({behavior:n,block:"end"}),Pe.current&&setTimeout(function(){ze.current&&Pe.current&&ze.current.scrollIntoView({behavior:n,block:"end"})},100)},[]);v(function(){if(!un){var e="";if(Tn?e=pe||"Thank you teacher for teaching me, your rule has been saved successfully.":fe&&(e=ye||"I'm sorry, I couldn't save your changes. Please try again."),e){var t={role:"assistant",content:e,id:w(),citations:[],time:new Date};Ze(function(e){return n(n([],e,!0),[t],!1)}),En(!1),setTimeout(function(){return Yn("smooth")},100)}}},[Tn,fe,un,pe,ye,Yn]),v(function(){Pe.current&&Yn("smooth")},[Yn]);var et=function(){var e={method:"get",maxBodyLength:1/0,url:"".concat(We,"/api/chatbot/getChatSettings?name=").concat(Fe,"&organizationName=").concat(H),headers:{}};S.request(e).then(function(e){var n,t,o;(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.chatSettings)&&""!==(null===(o=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.chatSettings)||void 0===o?void 0:o.chatInitialMessage)&&tn(!0)}).catch(function(e){console.error(e)})},nt=function(){return o(void 0,void 0,void 0,function(){var e,n;return i(this,function(t){e="".concat(We,"/api/chat/history?name=").concat(Fe,"&organizationName=").concat(H);try{n={method:"GET",params:{guestSessionId:Ae.current},withCredentials:!0},S.get(e,n).then(function(e){var n=e.data;n.length>0?(Ze(n),Yn()):tn(!0)}).catch(function(e){console.error(e)})}catch(e){Qe(!1),console.error(e)}return[2]})})},tt=function(){var e="".concat(We,"/api/chat/resetHistory?name=").concat(Fe,"&organizationName=").concat(H);try{var n={method:"GET",params:{guestSessionId:Ae.current},withCredentials:!0};S.get(e,n).then(function(){G(!0),rn(""),wn(null),Mn.current.clear(),jn.current.clear(),Le.current="".concat(w()),Ze([]),tn(!0),Un.current=null,null==te||te(),V&&V()}).catch(function(e){console.error(e)}).finally(function(){Ae.current="".concat(Fe,"-").concat(H,"-").concat(w())})}catch(e){Qe(!1),console.error(e)}};function ot(e){return null==e?void 0:e.replace(/<a [^>]*>.*?<\/a>/g,function(e){return null==e?void 0:e.replace(/\*/g,"*")})}var it=function(e,o,i,r,a,s,l){var c,u,d,v,m,h,p,g,f,C,y,b,S,x,k,_,T,E,I,M,R,D,N,F,A,L,W,q,P,z;if(null===(u=null===(c=null==e?void 0:e.chatStream)||void 0===c?void 0:c.continueChatResult)||void 0===u?void 0:u.header_message){var j={header_message:e.chatStream.continueChatResult.header_message,responsedata:null===(m=null===(v=null===(d=null==e?void 0:e.chatStream)||void 0===d?void 0:d.continueChatResult)||void 0===v?void 0:v.message)||void 0===m?void 0:m.content};Xn(j)}var B=null===(h=null==e?void 0:e.chatStream)||void 0===h?void 0:h.continueChatResult,H=null==B?void 0:B.isEnd,O=(null===(p=null==B?void 0:B.message)||void 0===p?void 0:p.citations)||[];H&&O.length>0&&ce&&ce(O);var U={role:"assistant",content:"",id:w()};if(null===(y=null===(C=null===(f=null===(g=null==e?void 0:e.chatStream)||void 0===g?void 0:g.continueChatResult)||void 0===f?void 0:f.message)||void 0===C?void 0:C.content)||void 0===y?void 0:y.includes("WaitMessage: "))$e(!0),U.content=function(e){var n="WaitMessage: ",t=e.indexOf(n);if(-1!==t){var o=e.substring(t+13);return null==o?void 0:o.replaceAll("WaitMessage: ","")}return""}((null===(x=null===(S=null===(b=null==e?void 0:e.chatStream)||void 0===b?void 0:b.continueChatResult)||void 0===S?void 0:S.message)||void 0===x?void 0:x.content)+"\n\n"),""!==U.content&&(Qe(!1),Ze(n(n([],Ge,!0),[{role:"user",content:a,time:r,isFirstQuestionSent:s||!1,id:l||(null===(_=null===(k=null==e?void 0:e.chatStream)||void 0===k?void 0:k.continueChatResult)||void 0===_?void 0:_.requestId)||"",reply:""},U],!1)));else{$e(!1);var G=null===(E=null===(T=null==e?void 0:e.chatStream)||void 0===T?void 0:T.continueChatResult)||void 0===E?void 0:E.requestId;"string"==typeof G&&G&&ve&&ve(G);var Z=function(e,o,i,r){var a,s,l,c,u,d,v,m={role:"assistant",content:"",id:w(),time:new Date,citations:[]},h=(null===(a=null==e?void 0:e.chatStream)||void 0===a?void 0:a.continueChatResult)||{},p=null==h?void 0:h.requestId,g=null==h?void 0:h.preserve_message,f=null==h?void 0:h.isEnd,C=(null===(s=null==h?void 0:h.message)||void 0===s?void 0:s.content)||"",y=null==h?void 0:h.is_orchestrator,b=null==h?void 0:h.thinking_break,S=(null===(l=null==h?void 0:h.message)||void 0===l?void 0:l.citations)||[];if(p&&g&&C&&!f){var x=r.current.get(p)||[];x[x.length-1]!==C&&(x.push(C),r.current.set(p,x))}var k=(p&&r.current.get(p)||[]).join("\n\n"),_="";if(f)_=k&&""!==k.trim()?k:C;else if(g)_=k;else{var T=C.replace(/<!--(?![\s\S]*-->)[\s\S]*$/,"").trimEnd(),E=!1===y||b||0!==S.length?"":T;_=k?"".concat(k,"\n\n").concat(E):E}if(m.content=ot(_),!0===(null==h?void 0:h.thinking_break)&&!0===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)&&o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1}),!1===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){if(h.explainability_id&&h.responded_by){var I=h.explainability_id,M=h.responded_by;i.has(I)||i.set(I,{responded_by:M,index:o.length})}i.has(h.explainability_id)?o[null==(R=i.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(c=h.explainability_id)&&void 0!==c?c:"",isParallelToolResponse:!0}:o=n(n([],o,!0),[{responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!0,explainability_id:null!==(u=h.explainability_id)&&void 0!==u?u:"",isParallelToolResponse:!1}],!1)}if(!0===(null==h?void 0:h.thinking_break)&&!1===(null==h?void 0:h.is_orchestrator)&&!1===(null==h?void 0:h.isEnd)){var R;h.explainability_id&&h.responded_by&&(I=h.explainability_id,M=h.responded_by,i.has(I)||i.set(I,{responded_by:M,index:o.length})),i.has(h.explainability_id)?o[null==(R=i.get(h.explainability_id))?void 0:R.index]={responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(d=h.explainability_id)&&void 0!==d?d:"",isParallelToolResponse:!0}:o.push({responsedata:C,responseFrom:h.responded_by,header_message:h.header_message,finalResponseStatus:!1,explainability_id:null!==(v=h.explainability_id)&&void 0!==v?v:"",isParallelToolResponse:!1})}return t({orchestratorAndAgentsMessages:o},m)}(e,i,o,jn);Z.time=new Date,Z.citations=O,Z.isEnd=null===(M=null===(I=null==e?void 0:e.chatStream)||void 0===I?void 0:I.continueChatResult)||void 0===M?void 0:M.isEnd,Z.requestId=null===(D=null===(R=null==e?void 0:e.chatStream)||void 0===R?void 0:R.continueChatResult)||void 0===D?void 0:D.requestId,Z.sessionId=Ae.current,null===(N=Z.orchestratorAndAgentsMessages)||void 0===N||N.forEach(function(e){e&&e.header_message&&Xn(e)}),(""!==(null==Z?void 0:Z.content)||(null==Z?void 0:Z.orchestratorAndAgentsMessages)&&(null==Z?void 0:Z.orchestratorAndAgentsMessages.length)>0)&&(Qe(!1),Ze(n(n([],Ge,!0),[{role:"user",content:a||"",time:r,isFirstQuestionSent:s||!1,id:l||(null===(A=null===(F=null==e?void 0:e.chatStream)||void 0===F?void 0:F.continueChatResult)||void 0===A?void 0:A.requestId)||"",requestId:null!==(q=null===(W=null===(L=null==e?void 0:e.chatStream)||void 0===L?void 0:L.continueChatResult)||void 0===W?void 0:W.requestId)&&void 0!==q?q:""},Z],!1))),en(null===(z=null===(P=null==e?void 0:e.chatStream)||void 0===P?void 0:P.continueChatResult)||void 0===z?void 0:z.isEnd)}},rt=m(function(e){void 0===e&&(e="inactivity"),console.error("Stream failed or timed out due to: ".concat(e)),Bn.current=!1,en(!0),dn(!1),kn(!1),Qe(!1),$e(!1),zn.current&&U&&(x(zn.current,U,!1),jn.current.delete(zn.current)),Ze(function(t){var o=n([],t,!0).reverse().find(function(e){return"user"===e.role}),i=((null==o?void 0:o.content)||"").replace(/"/g,"""),r=n([],t,!0),a=r[r.length-1];a&&"assistant"===a.role&&!a.isEnd&&r.pop();var s="I ran into an unexpected issue while trying to process this learning.";return"inactivity"===e?s="Something went wrong—teaching is taking longer than expected.":"websocket_error"===e&&(s="I lost connection to the server while working on that."),n(n([],r,!0),[{role:"assistant",content:"".concat(s,' Please try again.\n\n<button class="clickable-button" data-value="').concat(i,'">Retry</button>'),id:w(),time:new Date,isEnd:!0,citations:[]}],!1)})},[Ie,U]),at=m(function(){On.current&&(clearTimeout(On.current),On.current=null),Ie&&Ie>0&&(On.current=setTimeout(function(){return rt("inactivity")},Ie))},[rt,Ie]),st=function(e,r,a,s,l,c){return o(void 0,void 0,void 0,function(){var o,s,u,d,v,m,h,p,g,f,C,y,b,S,x,_;return i(this,function(i){switch(i.label){case 0:if(o=(void 0!==a?a:He||"").trim(),(s="Enter"===(null==e?void 0:e.key)&&!(null==e?void 0:e.shiftKey)&&!Ee)&&(null===(C=null==e?void 0:e.preventDefault)||void 0===C||C.call(e)),u="user"===(null===(y=Ge[Ge.length-1])||void 0===y?void 0:y.role),!o||un||Bn.current||u||(null==e?void 0:e.key)&&!s)return[2];if(Un.current||(Un.current=(new Date).toISOString(),console.log("Session start time set to ".concat(Un.current))),!De)return[3,5];Qe(!0),ln("Validating session..."),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,De(Un.current)];case 2:return i.sent()?[3,4]:(Kn(!0),Qe(!1),c&&c(!1),[2]);case 3:return d=i.sent(),console.error("Validation error:",d),Kn(!0),Qe(!1),c&&c(!1),[2];case 4:Qe(!1),i.label=5;case 5:return Bn.current=!0,"I want to add a rule description"===o?(en(!1),Pe.current=!0,dn(!0),!Sn&&o&&wn(a||"manual_entry"),v=new Date,Ze(function(e){return n(n([],e.map(function(e,n){var o;return t(t({},e),{content:null===(o=ot(e.content))||void 0===o?void 0:o.replace("WaitMessage: ","")})}),!0),[{role:"user",content:o,time:v,isFirstQuestionSent:!1,id:l||w()}],!1)}),Yn("smooth"),setTimeout(function(){Ze(function(e){return n(n([],e,!0),[{role:"assistant",content:"I'd be happy to help you set up a new rule! To get started, could you tell me what kind of behavior or logic you would like this rule to follow?",id:w(),citations:[],time:new Date}],!1)}),Yn("smooth"),setTimeout(function(){dn(!1),en(!0)},500)},500),[2]):(en(!1),Pe.current=!0,dn(!0),!Sn&&o&&wn(a||"manual_entry"),m=new Date,Ze(function(e){var i=e.map(function(e){var n;return t(t({},e),{content:null===(n=ot(e.content))||void 0===n?void 0:n.replace("WaitMessage: ","")})});return l&&i.some(function(e){return e.id===l})?i.map(function(e){return e.id===l?t(t({},e),{content:o}):e}):n(n([],i,!0),[{role:"user",content:o,time:m,isFirstQuestionSent:!1,id:l||w()}],!1)}),Yn("smooth"),h=new Map,p=[],g=function(e){var n;if(!e)return{};var t=Object.keys(e);return 1===t.length&&"current"===t[0]?null!==(n=e.current)&&void 0!==n?n:{}:e},f={WEBSOCKET_URL:U,organizationName:H,chatAssistantName:Fe,selectedAIModel:"gpt-4",replyMessage:"",userName:null!==(b=null==Te?void 0:Te.name)&&void 0!==b?b:"Guest User",userEmailId:null!==(S=null==Te?void 0:Te.email)&&void 0!==S?S:"guestUser@example.com",userId:null!==(x=null==Te?void 0:Te.id)&&void 0!==x?x:"Guest User",query:o,requestId:"requestId-".concat(w()),customPrompt:"",enableForBackend:!1,guestSessionId:Ae.current,chatPreviewId:Le.current,customMetaData:g(Y),aiModel:"",enableLogs:!0,onStreamEvent:function(e){var n,t,i,a,s,c,u=null===(t=null===(n=null==e?void 0:e.chatStream)||void 0===n?void 0:n.continueChatResult)||void 0===t?void 0:t.requestId,d=null===(a=null===(i=null==e?void 0:e.chatStream)||void 0===i?void 0:i.continueChatResult)||void 0===a?void 0:a.header_message;console.log("📦 [Stream Chunk Received] With RequestID and header_message: ".concat(u,",").concat(d)),at();var v=null===(c=null===(s=null==e?void 0:e.chatStream)||void 0===s?void 0:s.continueChatResult)||void 0===c?void 0:c.error_state;if(Array.isArray(v)&&v.length>0)return console.error("Agent returned an error_state during stream:",v),void rt("agent_error");it(e,h,p,m,o,r,l)},onStreamEnd:function(e){var o,i,r=null===(i=null===(o=null==e?void 0:e.chatStream)||void 0===o?void 0:o.continueChatResult)||void 0===i?void 0:i.requestId;console.log("✅ [Stream Completed] RequestID: ".concat(r)),On.current&&clearTimeout(On.current),Bn.current=!1,en(!0),dn(!1),kn(!1);var a=Date.now(),s=Pn.current.get(zn.current);if(s){var l=Math.round((a-s)/1e3).toFixed(1);Ze(function(e){var o=n([],e,!0).reverse().findIndex(function(e){return"assistant"===e.role});if(-1===o)return e;var i=e.length-1-o;return e.map(function(e,n){return n===i?t(t({},e),{finalTimeTaken:l}):e})})}},onError:function(e){On.current&&clearTimeout(On.current),console.error("Stream error:",e),rt("websocket_error")}},o&&(Qe(!0),null===(_=je.current)||void 0===_||_.blur(),Oe(""),Yn(),ln(l?"Just a moment, processing your request...":"Okay, got it. Let me take a moment to work on this and I'll get back to you shortly."),Pn.current.set(f.requestId,Date.now()),zn.current=f.requestId,console.log("Chat Stream Params:",f),at(),Hn.current+=1,console.log("🚀 [UI Action] stream started (Total UI invocations: ".concat(Hn.current,") | RequestID: ").concat(f.requestId,' | Query: "').concat(o,'"')),k(f)),c&&c(!1),[2])}})})},lt=c(null);h(function(){lt.current=st});var ct=m(function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return null===(e=lt.current)||void 0===e?void 0:e.call.apply(e,n([lt],t,!1))},[]),ut=d(function(){return{p:function(e){e.node;var n=e.children;return r(e,["node","children"]),a("div",t({style:{margin:0,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"10px",fontFamily:"inherit"}},{children:n}))},button:function(e){e.node;var n=e.className,o=e.children,i=r(e,["node","className","children"]),l=L(o),c=i["data-value"],u="Tester Genie"===l;return a(M,t({},i,{className:n,handleStream:ct,isStreamEnd:Ye,disabled:!!Sn||!!Ee,isLastMessage:!0,style:{margin:0},isTesterGenie:u,"data-selected":Sn===l||Sn===c?"true":Sn?"false":void 0},{children:s("span",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o,u&&s("svg",t({width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[a("path",{d:"M7.20368 8.94768e-06C7.48895 -0.00208639 7.69331 0.364327 7.83856 0.57465C8.14381 1.01633 8.38012 1.87909 7.71077 2.14118C8.57167 2.21011 9.70406 2.93098 10.1785 3.64699C10.5932 4.27286 10.4559 5.16037 9.80301 5.56007L9.9502 7.16593C9.97671 7.44871 10.0265 7.87092 10.0299 8.14457C10.4213 8.23046 11.0787 8.55391 11.326 8.87592C11.5979 8.75656 11.9189 8.76963 12.1688 8.93469C12.3563 8.67751 12.5598 8.41456 12.7507 8.15787C12.3283 7.45155 12.5047 6.57745 13.2143 6.13784C13.5375 5.9377 13.9264 5.87277 14.2971 5.95705C14.0961 6.30964 13.8775 6.72182 13.6593 7.05857C13.7906 7.2436 13.9184 7.44225 14.044 7.63194L14.8022 7.63198C15.0349 7.30106 15.2515 6.90827 15.4835 6.59349C15.8623 7.0712 15.8156 7.79671 15.4734 8.28241C15.1318 8.76741 14.4886 8.9899 13.9118 8.88251C13.758 9.12108 13.5577 9.39243 13.3941 9.63201C13.7143 9.9316 13.7725 10.364 13.4067 10.6594C13.5231 10.8889 13.5309 11.1613 13.447 11.402C13.1502 12.2523 12.1724 12.5645 11.3474 12.5025C11.1171 12.4852 10.939 12.4698 10.7197 12.3953C10.8724 13.1271 10.7744 14.2031 10.5132 14.9051C10.1688 15.8304 9.43632 16.5569 8.54503 16.9655C7.90465 17.2706 7.21222 17.3607 6.50472 17.4505C5.74445 17.5471 4.75801 17.4362 4.08533 17.825C3.9327 17.9132 3.86566 18.0173 3.82943 18.1792C3.94996 18.5982 4.47858 18.6063 4.78474 18.8897C5.20191 19.2758 4.90716 19.9663 4.36611 19.9908C4.31476 19.9931 4.26867 19.9867 4.23186 19.9493C4.23089 19.8303 4.47587 19.7199 4.49787 19.5262C4.55075 19.0604 3.70014 19.0078 3.37835 18.8374C3.13013 18.706 2.99537 18.6309 2.82242 18.4021C2.63795 18.1579 2.58428 17.835 2.63138 17.5392C2.74868 16.7847 3.47123 16.393 4.12184 16.1497C4.61314 15.9659 5.46304 15.7158 5.52019 15.0793C5.58589 14.348 4.97543 13.5523 4.57739 12.9807C4.44275 12.7875 4.3039 12.579 4.16309 12.3919C4.18987 12.365 4.21049 12.3463 4.23916 12.3212C4.59619 12.6218 5.21209 12.6421 5.55038 12.2979C5.70457 12.144 5.78974 11.9342 5.78642 11.7164C5.78121 11.4493 5.63382 11.2002 5.4454 11.019C5.44704 10.9932 5.44824 10.9676 5.449 10.9419C5.4566 10.6648 5.37505 10.4902 5.1892 10.2943C5.18398 10.2538 5.17776 10.2134 5.17053 10.1732C5.08123 9.69297 4.71708 9.34182 4.23415 9.27108C4.16418 9.26083 3.96108 9.26105 3.92071 9.23344C3.90485 9.1828 3.9059 9.20792 3.91904 9.15527C4.22103 8.90139 4.14407 8.78214 4.31107 8.4846C4.42301 8.28513 4.73047 8.15239 4.95452 8.10701C4.96167 7.51076 5.03684 6.88562 5.10036 6.29144C5.12451 6.0655 5.12531 5.75046 5.1511 5.55257C4.11108 4.86747 4.39091 3.75946 5.25465 3.06391C5.84978 2.58469 6.34496 2.31002 7.10143 2.14517C7.01589 2.10416 6.93842 2.04811 6.87269 1.97972C6.77021 1.87349 6.70248 1.73857 6.67853 1.59293C6.60568 1.12096 7.04104 0.914625 7.18759 0.526392C7.26428 0.323403 7.03925 0.146075 7.20368 8.94768e-06Z",fill:"#475569"}),a("path",{d:"M7.459 4.5C7.48797 4.50312 7.71949 4.61154 7.76205 4.63061C8.27062 4.85835 8.87051 5.09164 9.35658 5.3582C9.36602 6.03495 9.37016 6.56625 8.70573 6.91519C8.6633 6.80883 8.63019 6.72409 8.56332 6.63044C8.43786 6.45568 8.24656 6.33963 8.03354 6.30909C7.8434 6.28211 7.65146 6.3197 7.49586 6.43503C7.21897 6.21256 6.76265 6.28197 6.5229 6.52486C6.39308 6.65639 6.34815 6.75074 6.28902 6.92344C5.59702 6.5957 5.58761 6.04267 5.60583 5.35582C5.89882 5.23844 6.21318 5.0724 6.50153 4.941C6.82145 4.79522 7.14482 4.6574 7.459 4.5Z",fill:"#D1EDFD"}),a("path",{d:"M11.0756 10.6406C11.1037 10.6701 11.1324 10.7706 11.1535 10.8145C11.2818 11.0817 11.4922 11.1945 11.7498 11.2977C11.5607 11.63 11.4567 11.8797 11.1034 12.0466L11.0839 12.0517C10.9262 12.0927 10.7996 12.0968 10.651 12.0135C10.4755 11.915 10.3807 11.6614 10.4792 11.478C10.6388 11.1809 10.8877 10.9272 11.0756 10.6406Z",fill:"#D1EDFD"}),a("path",{d:"M11.6036 9.1377C11.6993 9.11763 11.8391 9.16378 11.9294 9.19593C11.6952 9.50644 11.4706 9.81614 11.2327 10.1261L11.1572 10.2255C10.7581 9.73539 11.0333 9.24481 11.6036 9.1377Z",fill:"#D1EDFD"}),a("path",{d:"M7.49681 0.882812C7.53691 0.925159 7.61244 1.08523 7.63598 1.14156C7.74243 1.39673 7.75769 1.76908 7.38596 1.77504C7.28236 1.75599 7.15628 1.68938 7.13517 1.5783C7.0843 1.3107 7.35609 1.09964 7.48737 0.897583L7.49681 0.882812Z",fill:"#D1EDFD"}),a("path",{d:"M1.68305 6.17249C1.71659 6.1673 1.8134 6.16478 1.84892 6.16432C2.34052 6.15616 2.81496 6.34495 3.16655 6.68866C3.50847 7.01806 3.70349 7.47119 3.70765 7.94596C3.70896 8.42345 3.54045 8.85284 3.20281 9.19025C3.34033 9.28068 3.5321 9.52219 3.6543 9.65748C4.17158 9.39073 4.91447 9.69339 4.79675 10.3444C5.08751 10.5485 5.19656 10.8288 5.0585 11.1674C5.15418 11.2375 5.25595 11.3205 5.32383 11.4186C5.40228 11.5303 5.4309 11.6695 5.40291 11.8031C5.32228 12.1857 4.90085 12.3286 4.57669 12.1236C4.51367 12.0838 4.42258 11.9595 4.35299 11.9431C4.30669 11.9557 4.28453 11.9584 4.23644 11.9644C4.22885 11.9742 4.22118 11.9841 4.21343 11.9938C3.93597 12.3413 3.49234 12.4682 3.06933 12.5157C2.85285 12.518 2.70432 12.5146 2.49066 12.4609C1.80785 12.2892 1.50808 11.6167 1.70723 10.9639C1.829 10.5648 2.11891 10.2506 2.48939 10.0518C2.54655 10.132 2.57559 10.2191 2.64066 10.303C2.73571 10.2223 2.82048 10.1482 2.92363 10.0773C2.81023 9.95313 2.66811 9.7693 2.55817 9.63584C2.38871 9.6878 2.23026 9.72879 2.05298 9.74653C1.54239 9.80228 1.03118 9.64711 0.637735 9.31695C0.269964 9.01018 0.0453493 8.54827 0.00544736 8.07322C-0.0309495 7.60988 0.116099 7.15077 0.414918 6.79478C0.742554 6.41198 1.18728 6.21393 1.68305 6.17249Z",fill:"#475569"}),a("path",{d:"M1.79616 6.5951C2.54894 6.5619 3.18687 7.14364 3.22301 7.8963C3.25915 8.64894 2.67989 9.28913 1.92739 9.3282C1.17073 9.3675 0.526231 8.78435 0.489885 8.02753C0.45354 7.27071 1.03921 6.62849 1.79616 6.5951Z",fill:"#D1EDFD"}),a("path",{d:"M4.93607 11.4844C5.12839 11.6261 5.22049 11.9085 4.91876 11.9419C4.8067 11.8805 4.78491 11.8646 4.71094 11.7561C4.81572 11.6752 4.862 11.5925 4.93607 11.4844Z",fill:"#FEFEFD"}),a("path",{d:"M12.5164 3.58594L12.5715 3.59466C12.6589 3.65863 12.6908 3.94434 12.7882 4.05193C12.8789 4.15216 12.9155 4.17816 13.0326 4.24929C13.1363 4.31224 13.3325 4.34025 13.384 4.43124C13.3643 4.56218 13.0693 4.54857 12.9127 4.69344C12.6903 4.89898 12.7114 5.06971 12.5892 5.28622C12.5669 5.28439 12.5368 5.2868 12.5261 5.27346C12.4336 5.15843 12.4072 4.9308 12.3099 4.81465C12.1627 4.63903 11.9972 4.60054 11.7981 4.51372C11.7544 4.49467 11.7266 4.47099 11.7129 4.42649C11.7867 4.31876 12.0509 4.34309 12.2376 4.14892C12.43 3.94901 12.4155 3.72208 12.5164 3.58594Z",fill:"#475569"}),a("path",{d:"M2.13644 3.72656C2.24401 3.77084 2.29712 4.1268 2.431 4.25226C2.60327 4.41371 2.7311 4.41949 2.93246 4.52449C2.96024 4.53897 2.97173 4.56042 2.97671 4.58878C2.89584 4.6981 2.61854 4.70721 2.4596 4.85659C2.26275 5.04156 2.27341 5.29132 2.17022 5.42088C2.16192 5.41849 2.11671 5.40232 2.1156 5.40043C2.01291 5.21216 1.9836 5.04909 1.84812 4.87273C1.73599 4.72675 1.36534 4.69959 1.32812 4.56939C1.3835 4.47941 1.67823 4.44211 1.82291 4.30563C2.02737 4.11274 2.0042 3.8372 2.13644 3.72656Z",fill:"#475569"})]}))]}))}))}}},[ct,Ye,Sn,Ee]),dt=d(function(){return Ge.some(function(e){return e.isSkeleton})},[Ge]),vt=function(e){return o(void 0,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return _e?[4,_e(e)]:[3,2];case 1:t.sent(),Ze(function(e){return n(n([],e,!0),[{role:"assistant",content:"Thanks for your feedback — this will help improve future suggestions.",id:w(),citations:[],time:new Date,isEnd:!0}],!1)}),setTimeout(function(){return Yn("smooth")},100),t.label=2;case 2:return[2]}})})};return s("div",t({className:"".concat(N.customFont," ").concat(D.chatContainer),style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:Se&&!dt?"0 0 20px 5px rgba(37, 99, 235, 0.5)":"none"}},{children:[s("div",t({ref:qe,className:D.scrollWrapper},{children:[a("div",t({ref:In,className:D.stickyHeader},{children:a(T,{resetChatHistory:tt,isStreamEnd:Ye,chatTitle:X,onResize:se,chatSize:ae,movingTowards:le})})),s("div",t({className:D.messagesList},{children:[s("div",t({className:D.initialMessageRow},{children:[a("div",t({className:D.iconWrapper},{children:a(q,{})})),a("div",t({className:D.welcomeTextWrapper},{children:a("div",t({className:D.welcomeMarkdownWrapper},{children:a("span",{children:a(y,t({rehypePlugins:[b],components:ut},{children:ie}))})}))}))]})),Ge.length>0&&Ge.map(function(e,n){var o,i;return s("div",t({className:D.messageRow},{children:["assistant"===e.role?a("div",t({className:D.assistantIconContainer},{children:a(q,{})})):a("div",{className:D.userSpacer}),a("div",t({className:D.messageContent},{children:"assistant"===e.role?s(l,{children:[e.orchestratorAndAgentsMessages&&e.orchestratorAndAgentsMessages.length>0&&a(_,{orchestratorAndAgentsMessages:null==e?void 0:e.orchestratorAndAgentsMessages,isStreamEnd:Ye,finalTimeTaken:null==e?void 0:e.finalTimeTaken},null!==(o=null==e?void 0:e.finalTimeTaken)&&void 0!==o?o:null==e?void 0:e.id),a(E,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ge,handleStream:st,isLastMessage:n===Ge.length-1,onSave:re,citations:null==e?void 0:e.citations,setChatSize:se,chatSize:ae,isStreamEnd:Ye,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onTypeResponseClick:function(){var e;Ln(!0),null===(e=je.current)||void 0===e||e.focus()},onComparisonLinkClick:ke,baseURL:We,onFeedbackSubmit:vt,isGlobalEditActive:Ee}),e.hasOwnProperty("isEnd")&&!(null==e?void 0:e.isEnd)&&(null===(i=null==e?void 0:e.content)||void 0===i?void 0:i.length)>0&&s(l,{children:[a(I,{variant:"text",width:"50%",height:20}),a("div",{style:{marginTop:"10px"}}),a(I,{variant:"text",width:"100%",height:40})]}),a("div",t({className:D.timestamp},{children:e.time&&!isNaN(new Date(e.time).getTime())?new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}):s("div",t({className:D.userMessageWrapper},{children:[s("div",t({className:D.userMessageBubble,style:{transition:"box-shadow 0.3s ease-in-out",boxShadow:e.isSkeleton||dt||e.id!==Dn?"none":"0 0 15px 3px rgba(37, 99, 235, 0.6)"}},{children:[e.isSkeleton?s("div",t({style:{display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",padding:"8px 0"}},{children:[a(I,{variant:"text",width:"100%",height:16}),a(I,{variant:"text",width:"80%",height:16})]})):a(E,{index:n,content:null==e?void 0:e.content,role:null==e?void 0:e.role,messages:Ge,handleStream:st,isLastMessage:n===Ge.length-1,onSave:re,citations:null==e?void 0:e.citations,isStreamEnd:Ye,isGlobalEditActive:Ee,messageIsEnd:null==e?void 0:e.isEnd,onViewComparison:xe,onComparisonLinkClick:ke,baseURL:We,onFeedbackSubmit:vt}),a("div",t({style:{marginTop:"0.5rem"}},{children:a(P,{})}))]})),a("div",t({className:D.userTimestamp},{children:new Date(e.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}))]}))}))]}),e.id)}),Ve&&s("div",t({className:D.loadingRow},{children:[a("div",t({className:D.iconWrapper,style:{marginTop:"0.2rem"}},{children:a(q,{})})),a("div",t({className:D.loadingTextWrapper},{children:a("span",{children:sn})}))]})),a("div",{ref:ze,style:{float:"left",clear:"both"}})]}))]})),a("div",t({className:D.inputAreaWrapper},{children:a(C,t({title:$?"Please wait for the validation to be completed.":""},{children:s("div",t({className:"".concat(D.inputBoxContainer," ").concat(Qn?D.disabled:""),style:An?{boxShadow:"0 0 15px 3px rgba(37, 99, 235, 0.5)",borderColor:"#2563eb",transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}:{transition:"box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out"}},{children:[Ge.length>0&&!gn&&a("div",t({onMouseDown:function(e){e.preventDefault(),Yn("smooth")},className:D.scrollToBottomBtn},{children:a(F,{})})),s("div",t({style:{width:"100%",display:"flex"}},{children:[a("textarea",{ref:je,placeholder:de,value:He||"",onChange:function(e){Oe(e.target.value)},onFocus:function(){return hn(!0)},onBlur:function(){return hn(!1)},onKeyDown:function(e){return st(e)},disabled:Qn,className:"no-scrollbar ".concat(D.chatTextarea),style:{minHeight:mn||He&&He.length>40?"120px":"50px",height:mn||He&&He.length>40?"120px":"50px",maxHeight:"120px"}}),a("span",t({className:D.sendButtonWrapper},{children:a("button",t({onClick:function(e){$n||st(new KeyboardEvent("keydown",{key:"Enter"}))},disabled:$n,className:"".concat(D.sendButton," ").concat($n?D.disabled:D.active)},{children:a(W,{})}))}))]}))]}))}))})),s("div",t({className:D.footerTools},{children:[a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"speaker",isActive:!1,onClick:function(){return null},disabled:!1})}))})),a(C,t({title:"Coming soon",placement:"top",arrow:!0,componentsProps:{tooltip:{sx:{fontSize:"0.875rem",padding:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}}}},{children:a("span",t({className:D.footerToolItem},{children:a(R,{amplitude:1,variant:"microphone",isActive:!1,onClick:function(){return null},disabled:!1})}))}))]})),a(g,t({open:Zn,onClose:function(){},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:s(f,t({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[a("h3",t({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"10px"}},{children:"Session Expired"})),a("p",t({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"20px"}},{children:"Changes were made to the learnings in this scope while you were editing. To avoid conflicts, concurrent edits aren’t allowed."})),s(f,t({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[a("button",t({onClick:function(){Kn(!1),tt()},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Reset Session"})),a("button",t({onClick:function(){Kn(!1),null==Ne||Ne()},style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Discard & Close"}))]}))]}))}))]}))};export{j as autoGeneratePrompt,B as default};
|
|
2
2
|
//# sourceMappingURL=ChatComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as o,jsxs as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as o,jsxs as t}from"react/jsx-runtime";import{CitationRenderer as i}from"@e-llm-studio/citation";import n,{useRef as r,useCallback as l,useEffect as a}from"react";import d from"./_svg/ChevronDown.js";import c from"./_svg/ChevronUp.js";import s from"./_svg/BookIcon.js";import{CitationLinkSparkleIcon as p}from"./_svg/CitationLinkSparkleIcon.js";import f from"./MarkdownRenderer.js";var h=n.memo(function(t){var i=t.text,n=t.highlights;if(!n||0===n.length||!i)return o("span",{children:i});var r=n.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}),l=new RegExp("(".concat(r.join("|"),")"),"gi"),a=i.split(l);return o("span",{children:a.map(function(t,i){var r=n.some(function(e){return e.toLowerCase()===t.toLowerCase()});return o("span",r?e({style:{backgroundColor:"#fef08a",color:"#000"}},{children:t}):{children:t},i)})})}),x=n.memo(function(i){var n,r,l=i.citation,a=i.headerTitle,d=i.score,c=i.footerText,x=i.userPreferences,u=i.hasUserPreferences;return t("div",e({className:"citation-card-layout",style:{display:"flex",flexDirection:"column",gap:"8px",padding:"10px",height:"auto",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden",backgroundColor:"#fbfaff"}},{children:[d&&t("div",e({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1.5px solid #c4b6fc",backgroundColor:"#FFF",padding:"4px 8px",fontSize:"12px",fontWeight:600,color:"#1E293B",gap:"4px",cursor:"pointer",width:"fit-content"}},{children:[o(p,{width:13,height:13}),t("span",{children:["Citation Relevance ",d,"%"]})]})),t("div",e({style:{flex:"1 1 auto",display:"flex",gap:u?"12px":"0px",overflow:"hidden",alignItems:"stretch",width:"100%",flexWrap:"wrap"}},{children:[t("div",e({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:[t("div",e({style:{display:"flex",alignItems:"center",gap:"4px",borderBottom:"1px solid #E5E7EB",backgroundColor:"#F7F8FA",padding:"12px",fontSize:"14px",fontWeight:"500",color:"#19213D",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[o(s,{})," ",a]})),o("div",e({className:"citation-markdown-wrapper",style:{flex:u?"1 1 60%":"1 1 auto",overflowY:"auto",backgroundColor:"#fff",minWidth:"0"}},{children:o(f,{value:(null===(n=l.customMetaData)||void 0===n?void 0:n.content)||"",highlightedText:null===(r=l.customMetaData)||void 0===r?void 0:r.highlighted_text,styles:{mainCard:{border:"none",padding:"8px"},list:{fontSize:"13px"}}})})),o("div",e({style:{display:"flex",backgroundColor:"#ffffffff",padding:"12px",justifyContent:"flex-end",borderTop:"1px solid #E6DDFE",fontSize:"12px",fontStyle:"italic",color:"#666F8D",fontWeight:"400",textTransform:"capitalize",whiteSpace:"nowrap",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"}},{children:c}))]})),u&&t("div",e({style:{flex:"1 1 170px",minWidth:"100px",display:"flex",flexDirection:"column",borderRadius:"8px",border:"1px solid #E5E7EB",backgroundColor:"#fff",overflowY:"visible",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"}},{children:[o("div",e({style:{backgroundColor:"#fff"}},{children:o("div",e({style:{padding:"12px",backgroundColor:"#F7F8FA",borderBottom:"1px solid #E5E7EB"}},{children:o("h3",e({style:{margin:0,fontSize:"14px",fontWeight:"700",color:"#19213D"}},{children:"Your Preference"}))}))})),o("div",e({style:{padding:"16px",display:"flex",flexDirection:"column",gap:"6px"}},{children:x.slice(0,3).map(function(i,n){return o("div",e({style:{fontSize:"13px",lineHeight:"1.5",color:"#374151"}},{children:t("div",e({style:{display:"flex",alignItems:"flex-start",gap:"4px"}},{children:[t("div",e({style:{minWidth:"18px",fontSize:"13px",fontWeight:"600",color:"#374151",flexShrink:0}},{children:[n+1,"."]})),t("div",e({style:{fontSize:"13px"}},{children:[o("span",{children:i.question}),o("span",e({style:{fontWeight:"600",margin:"0 4px"}},{children:":"})),o("br",{}),t("span",e({style:{fontWeight:"700",color:"#111827"}},{children:['"',o(h,{text:i.answer,highlights:i.highlighted_text}),'"']}))]}))]}))}),n)})}))]}))]})),o("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 "})]}))}),u=function(n){var s,p,f,h,u=n.citation,m=n.linkTitle,g=n.isOpen,v=n.onToggle,b=n.fontSize,y=r(null),w=l(function(){v&&v()},[v]);a(function(){g&&y.current&&setTimeout(function(){var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)},[g]);var k=(null===(s=u.customMetaData)||void 0===s?void 0:s.citation_title)||"",C=(null===(p=u.customMetaData)||void 0===p?void 0:p.citation_relevance_score)||null,F="Referenced from ".concat(null===(f=u.customMetaData)||void 0===f?void 0:f.citation_reference)||"",S=(null===(h=u.customMetaData)||void 0===h?void 0:h.user_preference)||[],D=S.length>0;return t("span",e({className:"citation-container",ref:y,onClick:function(e){return e.stopPropagation()}},{children:[o(i,{inLineCitation:!0,citationTitle:m,citationComponent:o(x,{citation:u,headerTitle:k,score:C,footerText:F,userPreferences:S,hasUserPreferences:D}),chevronDownComponent:o(d,{}),chevronUpComponent:o(c,{}),additionalCallbackForPillButton:w,isOpen:g,onToggle:v,styles:{citationWrapper:{maxHeight:"none",overflow:"visible",display:"flex",justifyContent:"center",marginBottom:"4px"},pillButton:{fontFamily:'"Inter", sans-serif',background:"transparent",padding:"2px 6px",margin:0,fontSize:b?"".concat(b,"px"):"1rem",fontWeight:500,color:"rgb(109, 40, 217)",cursor:"pointer",whiteSpace:"nowrap",border:g?"1px solid #A78BFA":"none",borderRadius:"6px",marginBottom:"3px",display:"inline-flex",alignItems:"center",gap:"2px",verticalAlign:"middle"},citationContent:{backgroundColor:"#F5F3FF66",border:"1px solid #A78BFA",borderRadius:"6px",padding:"0rem",fontFamily:'"Inter", sans-serif',fontSize:"12px",textAlign:"justify",textJustify:"inter-word",hyphens:"auto",fontWeight:400,lineHeight:"140%",color:"#1e293b",boxShadow:"none",width:"100%",minHeight:"auto",height:"auto",overflowY:"auto",scrollbarWidth:"none",msOverflowStyle:"none"}}}),o("style",{children:"\n .citation-container ::-webkit-scrollbar {\n display: none !important;\n }\n "})]}))};export{u as default};
|
|
2
2
|
//# sourceMappingURL=CitationLink.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as o,Fragment as i,jsx as a}from"react/jsx-runtime";import{X as t,TriangleAlert as l}from"lucide-react";import{Typography as n}from"@mui/material";import r from"../InstantLearning.module.css.js";import{componentStyles as s}from"./ILPopup.styles.js";import{TemplateMap as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as o,Fragment as i,jsx as a}from"react/jsx-runtime";import{X as t,TriangleAlert as l}from"lucide-react";import{Typography as n}from"@mui/material";import r from"../InstantLearning.module.css.js";import{componentStyles as s}from"./ILPopup.styles.js";import{TemplateList as d,TemplateMap as c}from"./templates/TemplatesMap/templatesMap.js";var m=function(m){var u=m.customSections,p=m.showCustomSections,v=void 0===p||p,f=m.onSave,g=m.formHeader,h=m.onClose,b=m.validateCustom,x=m.template,C=void 0===x?d.CreateRule:x,S=m.templateProps,y=m.isLoading,L=m.saveButtonConfig,w=void 0===L?{label:"Save Learning",loadingLabel:"Saving Learning..."}:L,N=m.isAiStreaming,j=void 0!==N&&N,k=m.showSaveWithoutValidation,W=m.saveWithoutValBtnConfig,B=void 0===W?{label:"Save w/o validation",loadingLabel:"Saving w/o validation..."}:W,P=m.onSaveWithoutValidation,E=m.saveButtonColor,F=C?c[C]:null,I=!b||b();return o(i,{children:[a("style",{children:s}),o("div",e({className:"il-popup-container ".concat(r.customFont)},{children:[o("div",e({className:"form-header"},{children:[a(n,e({sx:{fontSize:"1.125rem",fontWeight:500,lineHeight:"1.82rem",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:g})),a("div",e({onClick:h,style:{cursor:"pointer"}},{children:a(t,{})}))]})),a("div",e({style:{flexGrow:1,display:"flex",flexDirection:"column",width:"100%",padding:"20px 24px",overflowY:"auto",borderBottom:"1px solid #E7E7E9"}},{children:o("div",e({className:"sections-space"},{children:[F&&a(F,e({},S)),v&&u]}))})),o("div",e({className:"save-button-container"},{children:[k&&o("button",e({className:"save-button-secondary",onClick:function(){P&&I&&P()},disabled:y||!I||j},{children:[a(l,{size:16,style:{marginRight:"4px"}}),y?B.loadingLabel:B.label]})),a("button",e({className:"save-button",onClick:function(){!b||b()?(f(),console.log("Form Data to Save:")):console.error("Please fill all required fields before saving the learning.")},disabled:y||!I||j,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",maxWidth:"fit-content",backgroundColor:E,borderColor:E}},{children:y?w.loadingLabel:w.label}))]}))]}))]})};export{m as default};
|
|
2
2
|
//# sourceMappingURL=ILPopup.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__rest as t,__spreadArray as r}from"tslib";import{jsx as n,jsxs as i}from"react/jsx-runtime";import a,{useEffect as l}from"react";import o from"react-markdown";import u from"rehype-raw";import c from"remark-gfm";import{visit as p}from"unist-util-visit";import s from"./MarkdownRenderer.module.css.js";function d(){return function(e){p(e,"text",function(e,t,n){var i;if(n&&"string"==typeof e.value&&e.value.includes("✓")){for(var a=e.value.split("✓"),l=[],o=0;o<a.length;o++){var u=a[o];u&&l.push({type:"text",value:u}),o<a.length-1&&l.push({type:"element",tagName:"span",properties:{"data-green-check":"true",className:[s.checkGreen]},children:[{type:"text",value:"✓"}]})}return(i=n.children).splice.apply(i,r([t,1],l,!1)),t+l.length}})}}function m(){return function(e){p(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 f=function(e){var t;return"text"===(null==e?void 0:e.type)&&/^\s*$/.test(null!==(t=e.value)&&void 0!==t?t:"")};function v(){return function(e){p(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!f(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 o={type:"element",tagName:"div",properties:{"data-popup":""},children:a};e.children=n.slice(0,i).concat([o])}}})}}function h(){return function(e){p(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),o=l.filter(function(e){return!f(e)});if((1!==o.length||"element"!==o[0].type||!o[0].properties||!("data-popup"in o[0].properties)&&void 0===o[0].properties["data-popup"])&&!o.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 g=function(t,r,i){if(!r||!r.trim())return t;var a=new RegExp("(".concat(r.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),")"),"gi");return t.split(a).map(function(t,r){return a.test(t)?n("mark",e({className:s.customHighlight,id:"customHighlight",style:i},{children:t}),r):t})},y=function(r){var p=r.value,f=r.highlightedText,y=r.scrollTo,N=r.styles,k=void 0===N?{}:N,x=a.useRef(null),T=a.useRef(null);l(function(){if(f){var e=setTimeout(function(){if(T.current){var e=T.current.querySelector("#customHighlight");e&&e.scrollIntoView({behavior:"smooth",block:y||"center"})}},225);return function(){return clearTimeout(e)}}},[f,p]);return n("div",e({ref:x,className:s.containerWrapper,style:k.containerWrapper},{children:n("div",e({className:s.mainCard,style:k.mainCard},{children:n("div",e({ref:T,className:s.scrollArea,style:k.scrollArea},{children:n(o,e({remarkPlugins:[c],rehypePlugins:[u,m,d,v,h],components:{details:function(r){r.node;var a=t(r,["node"]),l=!!a["data-inline"],o=!!a["data-target"],u=s.detailsBlock,c=k.detailsBlock;return l&&(u=s.detailsInline,c=k.detailsInline),o&&(u=s.detailsTarget,c=k.detailsTarget),i("details",e({},a,{className:u,style:e(e({},c),a.style),onToggle:function(e){e.stopPropagation(),l&&function(e){var t=e.currentTarget,r=t.getAttribute("data-inline");if(r&&x.current){var n=x.current.querySelector('details[data-target="'.concat(r,'"]'));n&&(n.open=t.open)}}(e)}},{children:[o&&n("summary",{className:s.targetDummySummary,"aria-hidden":"true"}),a.children]}))},summary:function(r){r.node;var i=t(r,["node"]);return n("summary",e({className:s.summary,style:k.summary,onClick:function(e){return e.stopPropagation()}},i,{children:i.children}))},ul:function(t){return n("ul",e({className:s.list,style:k.list},t))},ol:function(t){return n("ol",e({className:s.list,style:k.list},t))},div:function(r){var i=r.node,a=t(r,["node"]),l=(null==i?void 0:i.properties)&&"data-popup"in i.properties;return n("div",e({},a,{className:l?s.popup:a.className,style:l?k.popup:a.style}))},span:function(r){var i,a=r.node,l=t(r,["node"]),o="true"===(null===(i=null==a?void 0:a.properties)||void 0===i?void 0:i["data-green-check"]);return n("span",o?e({},l,{style:k.checkGreen}):e({},l))},p:function(e){var t=e.children,r=Array.isArray(t)?t:[t];return n("p",{children:r.map(function(e,t){return"string"==typeof e?g(e,f,k.customHighlight):n(a.Fragment,{children:e},t)})})},li:function(t){var r=t.children;try{var i=null==r?[]:Array.isArray(r)?r:[r];return n("li",e({style:{marginBottom:"4px"}},{children:null==i?void 0:i.map(function(e,t){return"string"==typeof e?g(e,f,k.customHighlight):n(a.Fragment,{children:e},t)})}))}catch(e){return console.error("Error rendering <li>:",e),n("li",{children:r})}},code:function(r){var i=r.children,a=t(r,["children"]);return n("code",e({},a,{children:i.map(function(e){return"string"==typeof e?g(e,f,k.customHighlight):e})}))}}},{children:p}))}))}))}))};export{y as default};
|
|
2
|
+
//# sourceMappingURL=MarkdownRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var r={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"};e(".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}");export{r as default};
|
|
2
|
+
//# sourceMappingURL=MarkdownRenderer.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|