@e-llm-studio/instant-learning 1.3.17 → 1.3.19
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/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +61 -10
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.module.css.js +2 -2
- package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +31 -15
- package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +3 -1
- package/dist/cjs/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +31 -8
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js.map +1 -1
- package/dist/cjs/features/IL-OTJ/helpers/rhsFieldAttention.js +19 -0
- package/dist/cjs/features/IL-OTJ/helpers/rhsFieldAttention.js.map +1 -0
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +2 -0
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
- package/dist/cjs/schema-driven/BPARenderer.js +51 -2
- package/dist/cjs/schema-driven/BPARenderer.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +62 -11
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js.map +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.module.css.js +2 -2
- package/dist/features/IL-OTJ/_components/CriticalGaps.js +31 -15
- package/dist/features/IL-OTJ/_components/CriticalGaps.js.map +1 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js +3 -1
- package/dist/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.js.map +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +31 -8
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js.map +1 -1
- package/dist/features/IL-OTJ/helpers/rhsFieldAttention.js +14 -0
- package/dist/features/IL-OTJ/helpers/rhsFieldAttention.js.map +1 -0
- package/dist/features/LearningManagement/components/InstantLearningModal.js +3 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +1 -1
- package/dist/schema-driven/BPARenderer.js +52 -3
- package/dist/schema-driven/BPARenderer.js.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/CriticalGaps.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/MarkdownComponents/MarkdownElements.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/helpers/rhsFieldAttention.d.ts +7 -0
- package/dist/types/src/features/IL-OTJ/helpers/rhsFieldAttention.d.ts.map +1 -0
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/schema-driven/BPARenderer.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".ChatComponent-module_welcome-message__kz4PW{align-items:flex-start;animation:ChatComponent-module_fadeSlideIn__Pwh2n 1.2s ease-out forwards;border-radius:.5rem;color:var(--il-foreground,#333);display:fixed;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;max-width:100%;opacity:0;overflow-wrap:break-word;padding:1rem;transform:translateY(10px);white-space:pre-wrap;word-break:break-word}@keyframes ChatComponent-module_fadeSlideIn__Pwh2n{to{opacity:1;transform:translateY(0)}}.ChatComponent-module_thinkingIndicatorContainer__bNun2{align-items:center;background-color:transparent;border-radius:4px;color:var(--il-color-6b7280,#6b7280);display:flex;font-family:Plus Jakarta Sans,sans-serif;font-size:var(--il-font-size-sm,.875rem);gap:8px;padding:8px 12px;position:relative;width:100%}.ChatComponent-module_thinkingText__CZiAb{color:var(--il-color-6b7280,#6b7280);font-size:var(--il-font-size-sm,.875rem);font-weight:var(--il-font-weight-medium,500);white-space:nowrap}.ChatComponent-module_thinkingDot__Mll-g{animation:ChatComponent-module_thinkingBounce__UVgEW 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:var(--il-color-6b7280,#6b7280);border-radius:50%;display:inline-block;height:5px;width:5px}.ChatComponent-module_thinkingDot__Mll-g:nth-child(2){animation-delay:-.32s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(3){animation-delay:-.16s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(4){animation-delay:0s}@keyframes ChatComponent-module_thinkingBounce__UVgEW{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.ChatComponent-module_chatContainer__FSndl{align-items:center;background-color:var(--il-bg,#fbfaff);border:1px solid var(--il-border,#d1d5db);color:var(--il-foreground,#19213d);display:flex;flex-direction:column;font-family:Plus Jakarta Sans,sans-serif;height:100%;justify-content:center;overflow:hidden;width:100%}.ChatComponent-module_scrollWrapper__jL4ly{background-color:var(--il-bg,#fbfaff);height:100%;max-width:100%;overflow:auto;width:100%}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly{scrollbar-color:var(--il-scrollbar-thumb) var(--il-scrollbar-track);scrollbar-width:var(--il-scrollbar-width)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar{height:var(--il-scrollbar-size);width:var(--il-scrollbar-size)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-track,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-track{background:var(--il-scrollbar-track)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-thumb,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-thumb{background:var(--il-scrollbar-thumb)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-thumb:hover,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-thumb:hover{background:var(--il-scrollbar-thumb-hover)}.ChatComponent-module_stickyHeader__F-aue{background-color:var(--il-bg,#fbfaff);position:sticky;top:0;z-index:99}.ChatComponent-module_messagesList__dIXEK{background-color:var(--il-bg,#fbfaff);display:flex;flex:1;flex-direction:column;overflow-x:hidden;overflow-y:auto}.ChatComponent-module_initialMessageRow__9KdTo{display:flex;flex-direction:row;font-family:inherit;padding:16px 10px 0 16px}.ChatComponent-module_iconWrapper__rKr69{margin-top:.3rem;max-height:32px;max-width:32px}.ChatComponent-module_welcomeTextWrapper__9r3fC{color:var(--il-foreground,#000);display:flex;flex-direction:column;font-weight:var(--il-font-weight-regular,400)}.ChatComponent-module_welcomeMarkdownWrapper__YjUVT{align-items:flex-start;border-radius:.5rem;color:var(--il-foreground,#333);display:inline-flex;flex-direction:column;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_messageRow__CyYZ5{box-sizing:border-box;display:flex;padding:.5rem 1.25rem .5rem 1.15rem;width:100%}.ChatComponent-module_assistantIconContainer__psZwV{margin-right:.7rem;margin-top:.5rem;max-width:32px;min-width:32px}.ChatComponent-module_userSpacer__A8RYb{margin-right:1rem;min-width:32px}.ChatComponent-module_messageContent__gweOv{color:inherit;flex:1;min-width:0}.ChatComponent-module_timestamp__fUZvx{color:var(--il-color-bfbfbf,#bfbfbf);font-size:var(--il-font-size-xs,.75rem);margin-top:4px}.ChatComponent-module_userMessageWrapper__j49oJ{align-items:flex-end;display:flex;flex-direction:column}.ChatComponent-module_userMessageBubble__TMud8{align-items:center;background-color:var(--il-color-8694a10d,#8694a10d);border-radius:8px;color:var(--il-foreground,#19213d);display:flex;gap:3px;justify-content:center;max-width:80%;padding:0 1rem .5rem}.ChatComponent-module_userTimestamp__Ul2GB{color:var(--il-color-bfbfbf,#bfbfbf);font-size:var(--il-font-size-xs,.75rem);margin-top:8px;padding-right:16px}.ChatComponent-module_loadingRow__V01ST{display:flex;padding:16px 16px 0}.ChatComponent-module_loadingTextWrapper__ZTM3p{align-items:flex-start;border-radius:.5rem;color:var(--il-foreground,#333);display:inline-flex;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-bottom:1rem;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_inputAreaWrapper__PHGMo{align-items:center;background-color:var(--il-bg,#fbfaff);display:flex;flex-direction:column;height:fit-content;justify-content:flex-end;position:relative;width:95%}.ChatComponent-module_inputBoxContainer__btCTo{align-items:flex-end;background-color:var(--il-input-bg,#fff);border:1px solid var(--il-input-border,#e5e7eb);border-radius:8px;display:flex;gap:.5rem;position:relative;width:100%}.ChatComponent-module_inputBoxContainer__btCTo.ChatComponent-module_disabled__Qdyhz{cursor:not-allowed}.ChatComponent-module_scrollToBottomBtn__5OCWS{align-items:center;background-color:var(--il-color-ffffff,#fff);border-radius:50%;box-shadow:0 2px 5px rgba(0,0,0,.1);cursor:pointer;display:flex;height:24px;justify-content:center;left:50%;position:absolute;top:-34px;width:24px;z-index:10}.ChatComponent-module_chatTextarea__YS4KS{background-color:var(--il-input-bg,#fff);border:none;border-radius:.5rem;box-sizing:border-box;color:var(--il-input-fg,inherit);flex-grow:1;font-family:inherit;font-size:var(--il-font-size-md,1rem);line-height:1.5rem;outline:none;overflow-y:auto;padding:12px;resize:none;transition:min-height .3s ease,background-color .3s ease}.ChatComponent-module_chatTextarea__YS4KS:disabled{cursor:not-allowed}.ChatComponent-module_chatTextarea__YS4KS::placeholder{color:var(--il-input-placeholder,#6b7280)}.ChatComponent-module_sendButtonWrapper__L-Kze{align-items:flex-end;display:flex;flex-direction:column;justify-content:flex-end}.ChatComponent-module_sendButton__18iHG{background-color:var(--il-secondary-bg,#fff);border:1px solid var(--il-border,#e5e7eb);border-radius:.475rem;color:var(--il-muted,#64748b);font-size:var(--il-font-size-md,1rem);font-weight:700;height:50px;padding:.5rem .75rem;transition:background-color .3s,color .3s}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW{color:var(--il-primary,#5928ed);cursor:pointer}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW:hover{background-color:var(--il-hover,#f1f5f9)}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_disabled__Qdyhz{color:var(--il-disabled,#d1d5db);cursor:not-allowed}.ChatComponent-module_footerTools__-2FAb{display:flex;flex-direction:row;gap:.25rem;width:95%}.ChatComponent-module_footerToolItem__2a9SR{width:50%}";
|
|
4
|
-
var styles = {"welcome-message":"ChatComponent-module_welcome-message__kz4PW","fadeSlideIn":"ChatComponent-module_fadeSlideIn__Pwh2n","thinkingIndicatorContainer":"ChatComponent-module_thinkingIndicatorContainer__bNun2","thinkingText":"ChatComponent-module_thinkingText__CZiAb","thinkingDot":"ChatComponent-module_thinkingDot__Mll-g","thinkingBounce":"ChatComponent-module_thinkingBounce__UVgEW","chatContainer":"ChatComponent-module_chatContainer__FSndl","scrollWrapper":"ChatComponent-module_scrollWrapper__jL4ly","messagesList":"ChatComponent-module_messagesList__dIXEK","stickyHeader":"ChatComponent-module_stickyHeader__F-aue","initialMessageRow":"ChatComponent-module_initialMessageRow__9KdTo","iconWrapper":"ChatComponent-module_iconWrapper__rKr69","welcomeTextWrapper":"ChatComponent-module_welcomeTextWrapper__9r3fC","welcomeMarkdownWrapper":"ChatComponent-module_welcomeMarkdownWrapper__YjUVT","messageRow":"ChatComponent-module_messageRow__CyYZ5","assistantIconContainer":"ChatComponent-module_assistantIconContainer__psZwV","userSpacer":"ChatComponent-module_userSpacer__A8RYb","messageContent":"ChatComponent-module_messageContent__gweOv","timestamp":"ChatComponent-module_timestamp__fUZvx","userMessageWrapper":"ChatComponent-module_userMessageWrapper__j49oJ","userMessageBubble":"ChatComponent-module_userMessageBubble__TMud8","userTimestamp":"ChatComponent-module_userTimestamp__Ul2GB","loadingRow":"ChatComponent-module_loadingRow__V01ST","loadingTextWrapper":"ChatComponent-module_loadingTextWrapper__ZTM3p","inputAreaWrapper":"ChatComponent-module_inputAreaWrapper__PHGMo","inputBoxContainer":"ChatComponent-module_inputBoxContainer__btCTo","disabled":"ChatComponent-module_disabled__Qdyhz","scrollToBottomBtn":"ChatComponent-module_scrollToBottomBtn__5OCWS","chatTextarea":"ChatComponent-module_chatTextarea__YS4KS","sendButtonWrapper":"ChatComponent-module_sendButtonWrapper__L-Kze","sendButton":"ChatComponent-module_sendButton__18iHG","active":"ChatComponent-module_active__1REPW","footerTools":"ChatComponent-module_footerTools__-2FAb","footerToolItem":"ChatComponent-module_footerToolItem__2a9SR"};
|
|
3
|
+
var css_248z = ".ChatComponent-module_welcome-message__kz4PW{align-items:flex-start;animation:ChatComponent-module_fadeSlideIn__Pwh2n 1.2s ease-out forwards;border-radius:.5rem;color:var(--il-foreground,#333);display:fixed;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;max-width:100%;opacity:0;overflow-wrap:break-word;padding:1rem;transform:translateY(10px);white-space:pre-wrap;word-break:break-word}@keyframes ChatComponent-module_fadeSlideIn__Pwh2n{to{opacity:1;transform:translateY(0)}}.ChatComponent-module_thinkingIndicatorContainer__bNun2{align-items:center;background-color:transparent;border-radius:4px;color:var(--il-color-6b7280,#6b7280);display:flex;font-family:Plus Jakarta Sans,sans-serif;font-size:var(--il-font-size-sm,.875rem);gap:8px;padding:8px 12px;position:relative;width:100%}.ChatComponent-module_thinkingText__CZiAb{color:var(--il-color-6b7280,#6b7280);font-size:var(--il-font-size-sm,.875rem);font-weight:var(--il-font-weight-medium,500);white-space:nowrap}.ChatComponent-module_thinkingDot__Mll-g{animation:ChatComponent-module_thinkingBounce__UVgEW 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:var(--il-color-6b7280,#6b7280);border-radius:50%;display:inline-block;height:5px;width:5px}.ChatComponent-module_thinkingDot__Mll-g:nth-child(2){animation-delay:-.32s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(3){animation-delay:-.16s}.ChatComponent-module_thinkingDot__Mll-g:nth-child(4){animation-delay:0s}@keyframes ChatComponent-module_thinkingBounce__UVgEW{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.ChatComponent-module_chatContainer__FSndl{align-items:center;background-color:var(--il-bg,#fbfaff);border:1px solid var(--il-border,#d1d5db);color:var(--il-foreground,#19213d);display:flex;flex-direction:column;font-family:Plus Jakarta Sans,sans-serif;height:100%;justify-content:center;overflow:hidden;width:100%}.ChatComponent-module_scrollWrapper__jL4ly{background-color:var(--il-bg,#fbfaff);height:100%;max-width:100%;overflow:auto;width:100%}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly{scrollbar-color:var(--il-scrollbar-thumb) var(--il-scrollbar-track);scrollbar-width:var(--il-scrollbar-width)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar{height:var(--il-scrollbar-size);width:var(--il-scrollbar-size)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-track,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-track{background:var(--il-scrollbar-track)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-thumb,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-thumb{background:var(--il-scrollbar-thumb)}.il-teach-me-scrollbar-themed .ChatComponent-module_messagesList__dIXEK::-webkit-scrollbar-thumb:hover,.il-teach-me-scrollbar-themed .ChatComponent-module_scrollWrapper__jL4ly::-webkit-scrollbar-thumb:hover{background:var(--il-scrollbar-thumb-hover)}.ChatComponent-module_stickyHeader__F-aue{background-color:var(--il-bg,#fbfaff);position:sticky;top:0;z-index:99}.ChatComponent-module_messagesList__dIXEK{background-color:var(--il-bg,#fbfaff);display:flex;flex:1;flex-direction:column;overflow-x:hidden;overflow-y:auto}.ChatComponent-module_initialMessageRow__9KdTo{display:flex;flex-direction:row;font-family:inherit;padding:16px 10px 0 16px}.ChatComponent-module_iconWrapper__rKr69{margin-top:.3rem;max-height:32px;max-width:32px}.ChatComponent-module_welcomeTextWrapper__9r3fC{color:var(--il-foreground,#000);display:flex;flex-direction:column;font-weight:var(--il-font-weight-regular,400)}.ChatComponent-module_welcomeMarkdownWrapper__YjUVT{align-items:flex-start;border-radius:.5rem;color:var(--il-foreground,#333);display:inline-flex;flex-direction:column;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_messageRow__CyYZ5{box-sizing:border-box;display:flex;padding:.5rem 1.25rem .5rem 1.15rem;width:100%}.ChatComponent-module_assistantIconContainer__psZwV{margin-right:.7rem;margin-top:.5rem;max-width:32px;min-width:32px}.ChatComponent-module_userSpacer__A8RYb{margin-right:1rem;min-width:32px}.ChatComponent-module_messageContent__gweOv{color:inherit;flex:1;min-width:0}.ChatComponent-module_timestamp__fUZvx{color:var(--il-color-bfbfbf,#bfbfbf);font-size:var(--il-font-size-xs,.75rem);margin-top:4px}.ChatComponent-module_userMessageWrapper__j49oJ{align-items:flex-end;display:flex;flex-direction:column}.ChatComponent-module_userMessageBubble__TMud8{align-items:center;background-color:var(--il-color-8694a10d,#8694a10d);border-radius:8px;color:var(--il-foreground,#19213d);display:flex;gap:3px;justify-content:center;max-width:80%;padding:0 1rem .5rem}.ChatComponent-module_userTimestamp__Ul2GB{color:var(--il-color-bfbfbf,#bfbfbf);font-size:var(--il-font-size-xs,.75rem);margin-top:8px;padding-right:16px}.ChatComponent-module_loadingRow__V01ST{display:flex;padding:16px 16px 0}.ChatComponent-module_loadingTextWrapper__ZTM3p{align-items:flex-start;border-radius:.5rem;color:var(--il-foreground,#333);display:inline-flex;font-size:var(--il-font-size-md,1rem);line-height:1.75rem;margin-bottom:1rem;max-width:100%;overflow-wrap:break-word;padding-bottom:1rem;padding-left:1rem;padding-right:1rem;white-space:pre-wrap;width:100%;word-break:break-word}.ChatComponent-module_inputAreaWrapper__PHGMo{align-items:center;background-color:var(--il-bg,#fbfaff);display:flex;flex-direction:column;height:fit-content;justify-content:flex-end;position:relative;width:95%}.ChatComponent-module_inputBoxContainer__btCTo{align-items:flex-end;background-color:var(--il-input-bg,#fff);border:1px solid var(--il-input-border,#e5e7eb);border-radius:8px;display:flex;gap:.5rem;position:relative;width:100%}.ChatComponent-module_inputBoxContainer__btCTo.ChatComponent-module_disabled__Qdyhz{cursor:not-allowed}.ChatComponent-module_chatInputRow__eLu7z{display:flex;position:relative;width:100%}.ChatComponent-module_rhsTextareaBlocker__mKal-{background:transparent;border:0;border-radius:.5rem;cursor:not-allowed;inset:0 48px 0 0;position:absolute;z-index:1}.ChatComponent-module_scrollToBottomBtn__5OCWS{align-items:center;background-color:var(--il-color-ffffff,#fff);border-radius:50%;box-shadow:0 2px 5px rgba(0,0,0,.1);cursor:pointer;display:flex;height:24px;justify-content:center;left:50%;position:absolute;top:-34px;width:24px;z-index:10}.ChatComponent-module_chatTextarea__YS4KS{background-color:var(--il-input-bg,#fff);border:none;border-radius:.5rem;box-sizing:border-box;color:var(--il-input-fg,inherit);flex-grow:1;font-family:inherit;font-size:var(--il-font-size-md,1rem);line-height:1.5rem;outline:none;overflow-y:auto;padding:12px;resize:none;transition:min-height .3s ease,background-color .3s ease}.ChatComponent-module_chatTextarea__YS4KS:disabled{cursor:not-allowed}.ChatComponent-module_chatTextarea__YS4KS::placeholder{color:var(--il-input-placeholder,#6b7280)}.ChatComponent-module_sendButtonWrapper__L-Kze{align-items:flex-end;display:flex;flex-direction:column;justify-content:flex-end}.ChatComponent-module_sendButton__18iHG{background-color:var(--il-secondary-bg,#fff);border:1px solid var(--il-border,#e5e7eb);border-radius:.475rem;color:var(--il-muted,#64748b);font-size:var(--il-font-size-md,1rem);font-weight:700;height:50px;padding:.5rem .75rem;transition:background-color .3s,color .3s}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW{color:var(--il-primary,#5928ed);cursor:pointer}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_active__1REPW:hover{background-color:var(--il-hover,#f1f5f9)}.ChatComponent-module_sendButton__18iHG.ChatComponent-module_disabled__Qdyhz{color:var(--il-disabled,#d1d5db);cursor:not-allowed}.ChatComponent-module_footerTools__-2FAb{display:flex;flex-direction:row;gap:.25rem;width:95%}.ChatComponent-module_footerToolItem__2a9SR{width:50%}";
|
|
4
|
+
var styles = {"welcome-message":"ChatComponent-module_welcome-message__kz4PW","fadeSlideIn":"ChatComponent-module_fadeSlideIn__Pwh2n","thinkingIndicatorContainer":"ChatComponent-module_thinkingIndicatorContainer__bNun2","thinkingText":"ChatComponent-module_thinkingText__CZiAb","thinkingDot":"ChatComponent-module_thinkingDot__Mll-g","thinkingBounce":"ChatComponent-module_thinkingBounce__UVgEW","chatContainer":"ChatComponent-module_chatContainer__FSndl","scrollWrapper":"ChatComponent-module_scrollWrapper__jL4ly","messagesList":"ChatComponent-module_messagesList__dIXEK","stickyHeader":"ChatComponent-module_stickyHeader__F-aue","initialMessageRow":"ChatComponent-module_initialMessageRow__9KdTo","iconWrapper":"ChatComponent-module_iconWrapper__rKr69","welcomeTextWrapper":"ChatComponent-module_welcomeTextWrapper__9r3fC","welcomeMarkdownWrapper":"ChatComponent-module_welcomeMarkdownWrapper__YjUVT","messageRow":"ChatComponent-module_messageRow__CyYZ5","assistantIconContainer":"ChatComponent-module_assistantIconContainer__psZwV","userSpacer":"ChatComponent-module_userSpacer__A8RYb","messageContent":"ChatComponent-module_messageContent__gweOv","timestamp":"ChatComponent-module_timestamp__fUZvx","userMessageWrapper":"ChatComponent-module_userMessageWrapper__j49oJ","userMessageBubble":"ChatComponent-module_userMessageBubble__TMud8","userTimestamp":"ChatComponent-module_userTimestamp__Ul2GB","loadingRow":"ChatComponent-module_loadingRow__V01ST","loadingTextWrapper":"ChatComponent-module_loadingTextWrapper__ZTM3p","inputAreaWrapper":"ChatComponent-module_inputAreaWrapper__PHGMo","inputBoxContainer":"ChatComponent-module_inputBoxContainer__btCTo","disabled":"ChatComponent-module_disabled__Qdyhz","chatInputRow":"ChatComponent-module_chatInputRow__eLu7z","rhsTextareaBlocker":"ChatComponent-module_rhsTextareaBlocker__mKal-","scrollToBottomBtn":"ChatComponent-module_scrollToBottomBtn__5OCWS","chatTextarea":"ChatComponent-module_chatTextarea__YS4KS","sendButtonWrapper":"ChatComponent-module_sendButtonWrapper__L-Kze","sendButton":"ChatComponent-module_sendButton__18iHG","active":"ChatComponent-module_active__1REPW","footerTools":"ChatComponent-module_footerTools__-2FAb","footerToolItem":"ChatComponent-module_footerToolItem__2a9SR"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -9,13 +9,14 @@ import CitationLink from './CitationLink.js';
|
|
|
9
9
|
import { getCognitiveDecisioningThemeStyles } from './cognitiveDecisioningThemeStyles.js';
|
|
10
10
|
import { GapExplanationAccordion } from './GapExplanationAccordion.js';
|
|
11
11
|
import { getSourceFromUrl } from './MarkdownComponents/MarkdownElements.js';
|
|
12
|
+
import { highlightRhsField } from '../helpers/rhsFieldAttention.js';
|
|
12
13
|
|
|
13
14
|
const ProceedArrow = () => /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
14
15
|
/* @__PURE__ */ jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
15
16
|
/* @__PURE__ */ jsx("polyline", { points: "12 5 19 12 12 19" })
|
|
16
17
|
] });
|
|
17
|
-
const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseClick }) => {
|
|
18
|
-
var _a, _b;
|
|
18
|
+
const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseClick, shouldHighlightRhs, onRhsAttention }) => {
|
|
19
|
+
var _a, _b, _c, _d;
|
|
19
20
|
const [showMainReasoning, setShowMainReasoning] = useState(false);
|
|
20
21
|
const [optionReasoningState, setOptionReasoningState] = useState({});
|
|
21
22
|
const textInputRef = useRef(null);
|
|
@@ -25,6 +26,13 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
25
26
|
(_a2 = textInputRef.current) == null ? void 0 : _a2.focus();
|
|
26
27
|
}
|
|
27
28
|
}, [index, gap.inputType, isEditable]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
var _a2, _b2;
|
|
31
|
+
if (gap.inputType !== "rhs" || !shouldHighlightRhs) return;
|
|
32
|
+
const fieldId = (_b2 = (_a2 = gap.options) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.highlightRhsField;
|
|
33
|
+
if (onRhsAttention) onRhsAttention(gap.id, fieldId);
|
|
34
|
+
else highlightRhsField(fieldId);
|
|
35
|
+
}, [gap.id, gap.inputType, (_b = (_a = gap.options) == null ? void 0 : _a[0]) == null ? void 0 : _b.highlightRhsField, shouldHighlightRhs, onRhsAttention]);
|
|
28
36
|
const formatMarkdownSource = (content) => {
|
|
29
37
|
if (!content) return "";
|
|
30
38
|
return content.replace(/\\n/g, "\n");
|
|
@@ -34,14 +42,14 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
34
42
|
var _a2;
|
|
35
43
|
return formatMarkdownSource(((_a2 = gap.aiReasoning) == null ? void 0 : _a2.reason) || "");
|
|
36
44
|
},
|
|
37
|
-
[(
|
|
45
|
+
[(_c = gap.aiReasoning) == null ? void 0 : _c.reason]
|
|
38
46
|
);
|
|
39
47
|
const sanitizedGapReasoning = useMemo(
|
|
40
48
|
() => {
|
|
41
49
|
var _a2;
|
|
42
50
|
return formatMarkdownSource(((_a2 = gap.aiReasoning) == null ? void 0 : _a2.gap) || "");
|
|
43
51
|
},
|
|
44
|
-
[(
|
|
52
|
+
[(_d = gap.aiReasoning) == null ? void 0 : _d.gap]
|
|
45
53
|
);
|
|
46
54
|
const getCitationByNumber = useCallback((citationNumber, source) => {
|
|
47
55
|
if (!citations) return null;
|
|
@@ -75,7 +83,8 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
75
83
|
explanation: opt.explanation,
|
|
76
84
|
// This ensures the data from the JSON payload is captured
|
|
77
85
|
id: opt.id,
|
|
78
|
-
isRecommended: opt.is_recommended
|
|
86
|
+
isRecommended: opt.is_recommended,
|
|
87
|
+
highlightRhsField: opt.highlightRhsField
|
|
79
88
|
};
|
|
80
89
|
};
|
|
81
90
|
const isMultiSelect = gap.inputType === "checkbox";
|
|
@@ -83,7 +92,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
83
92
|
if (!isEditable) return;
|
|
84
93
|
onUpdate(gap.id, event.target.value);
|
|
85
94
|
};
|
|
86
|
-
const handleChange = (val, optId) => {
|
|
95
|
+
const handleChange = (val, optId, rhsFieldId) => {
|
|
87
96
|
if (!isEditable) return;
|
|
88
97
|
if (optId === "typeYourAnswer" || val.trim().toLowerCase() === "type your response") {
|
|
89
98
|
onUpdate(gap.id, val);
|
|
@@ -94,8 +103,10 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
94
103
|
const currentSelection = Array.isArray(gap.userSelection) ? gap.userSelection : [];
|
|
95
104
|
const newSelection = currentSelection.includes(val) ? currentSelection.filter((item) => item !== val) : [...currentSelection, val];
|
|
96
105
|
onUpdate(gap.id, newSelection);
|
|
106
|
+
if (!currentSelection.includes(val)) highlightRhsField(rhsFieldId);
|
|
97
107
|
} else {
|
|
98
108
|
onUpdate(gap.id, val);
|
|
109
|
+
highlightRhsField(rhsFieldId);
|
|
99
110
|
}
|
|
100
111
|
};
|
|
101
112
|
return /* @__PURE__ */ jsx(
|
|
@@ -160,7 +171,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
160
171
|
]
|
|
161
172
|
}
|
|
162
173
|
) }),
|
|
163
|
-
gap.inputType === "text" ? /* @__PURE__ */ jsx(
|
|
174
|
+
gap.inputType === "rhs" ? null : gap.inputType === "text" ? /* @__PURE__ */ jsx(
|
|
164
175
|
TextareaAutosize,
|
|
165
176
|
{
|
|
166
177
|
ref: textInputRef,
|
|
@@ -183,7 +194,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
183
194
|
}
|
|
184
195
|
}
|
|
185
196
|
) : isMultiSelect ? /* @__PURE__ */ jsx(FormGroup, { row: true, sx: { gap: "16px", flexDirection: "column" }, children: gap.options.map((opt, idx) => {
|
|
186
|
-
const { text, reasoning, explanation, id, isRecommended } = getOptionData(opt);
|
|
197
|
+
const { text, reasoning, explanation, id, isRecommended, highlightRhsField: rhsFieldId } = getOptionData(opt);
|
|
187
198
|
const isSelected = gap.inputType === "checkbox" ? (gap.userSelection || []).includes(text) : gap.userSelection === text;
|
|
188
199
|
return /* @__PURE__ */ jsxs(
|
|
189
200
|
Box,
|
|
@@ -197,7 +208,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
197
208
|
Checkbox,
|
|
198
209
|
{
|
|
199
210
|
checked: (gap.userSelection || []).includes(text),
|
|
200
|
-
onChange: () => handleChange(text, id),
|
|
211
|
+
onChange: () => handleChange(text, id, rhsFieldId),
|
|
201
212
|
value: text,
|
|
202
213
|
size: "small",
|
|
203
214
|
disabled: !isEditable,
|
|
@@ -299,7 +310,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
299
310
|
{
|
|
300
311
|
explanation,
|
|
301
312
|
isSelected,
|
|
302
|
-
onProceed: () => handleChange(text),
|
|
313
|
+
onProceed: () => handleChange(text, id, rhsFieldId),
|
|
303
314
|
proceedIcon: /* @__PURE__ */ jsx(ProceedArrow, {})
|
|
304
315
|
}
|
|
305
316
|
),
|
|
@@ -336,7 +347,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
336
347
|
idx
|
|
337
348
|
);
|
|
338
349
|
}) }) : /* @__PURE__ */ jsx(Box, { sx: { display: "flex", flexDirection: "column", gap: "8px" }, children: gap.options.map((opt, idx) => {
|
|
339
|
-
const { text, reasoning, explanation, id, isRecommended } = getOptionData(opt);
|
|
350
|
+
const { text, reasoning, explanation, id, isRecommended, highlightRhsField: rhsFieldId } = getOptionData(opt);
|
|
340
351
|
const isSelected = gap.userSelection === text;
|
|
341
352
|
return /* @__PURE__ */ jsxs(
|
|
342
353
|
Box,
|
|
@@ -356,7 +367,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
356
367
|
/* @__PURE__ */ jsxs(
|
|
357
368
|
Box,
|
|
358
369
|
{
|
|
359
|
-
onClick: () => handleChange(text, id),
|
|
370
|
+
onClick: () => handleChange(text, id, rhsFieldId),
|
|
360
371
|
sx: {
|
|
361
372
|
display: "flex",
|
|
362
373
|
alignItems: "center",
|
|
@@ -455,7 +466,7 @@ const GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseCl
|
|
|
455
466
|
{
|
|
456
467
|
explanation,
|
|
457
468
|
isSelected,
|
|
458
|
-
onProceed: () => handleChange(text),
|
|
469
|
+
onProceed: () => handleChange(text, id, rhsFieldId),
|
|
459
470
|
proceedIcon: /* @__PURE__ */ jsx(ProceedArrow, {})
|
|
460
471
|
}
|
|
461
472
|
) }),
|
|
@@ -503,7 +514,8 @@ const CriticalGaps = ({
|
|
|
503
514
|
isSubmitted,
|
|
504
515
|
citations,
|
|
505
516
|
onTypeResponseClick,
|
|
506
|
-
isGlobalEditActive
|
|
517
|
+
isGlobalEditActive,
|
|
518
|
+
onRhsAttention
|
|
507
519
|
}) => {
|
|
508
520
|
const [gapsState, setGapsState] = useState(
|
|
509
521
|
data.gaps.map((g) => ({
|
|
@@ -524,6 +536,8 @@ const CriticalGaps = ({
|
|
|
524
536
|
const isValid = gapsState.some((g) => {
|
|
525
537
|
if (g.inputType === "checkbox") {
|
|
526
538
|
return Array.isArray(g.userSelection) && g.userSelection.length > 0;
|
|
539
|
+
} else if (g.inputType === "rhs") {
|
|
540
|
+
return true;
|
|
527
541
|
} else if (g.inputType === "text") {
|
|
528
542
|
return g.userSelection !== null && typeof g.userSelection === "string" && g.userSelection.trim() !== "";
|
|
529
543
|
} else {
|
|
@@ -685,7 +699,9 @@ const CriticalGaps = ({
|
|
|
685
699
|
onUpdate: handleUpdate,
|
|
686
700
|
isEditable,
|
|
687
701
|
citations,
|
|
688
|
-
onTypeResponseClick
|
|
702
|
+
onTypeResponseClick,
|
|
703
|
+
shouldHighlightRhs: isLastMessage,
|
|
704
|
+
onRhsAttention
|
|
689
705
|
},
|
|
690
706
|
gap.id
|
|
691
707
|
))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalGaps.js","sources":["../../../../src/features/IL-OTJ/_components/CriticalGaps.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback, useMemo, useRef } from \"react\";\nimport {\n Box,\n Card,\n Typography,\n Checkbox,\n FormGroup,\n FormControlLabel,\n Collapse,\n TextareaAutosize,\n} from \"@mui/material\";\nimport { ChevronDown, ChevronUp } from \"lucide-react\";\nimport ChevronDownIcon from \"./_svg/ChevronDown\";\nimport ChevronUpIcon from \"./_svg/ChevronUp\";\nimport SparkleIcon from \"./_svg/SparkleIcon\";\nimport { CognitiveDecisioningCard } from '@e-llm-studio/citation';\nimport { DynamicArrow } from \"../_components/MarkdownComponents/MarkdownSelect\";\nimport { ButtonCognitiveIcon } from \"./_svg/ButtonCognitiveIcon\";\nimport CitationLink from \"./CitationLink\";\nimport { getCognitiveDecisioningThemeStyles } from './cognitiveDecisioningThemeStyles';\nimport { GapExplanationAccordion } from \"./GapExplanationAccordion\";\nimport { getSourceFromUrl } from \"./MarkdownComponents/MarkdownElements\";\n\ninterface GapItemProps {\n gap: any;\n index: number;\n onUpdate: (id: string, value: any) => void;\n isEditable: boolean;\n citations?: any[];\n onTypeResponseClick?: () => void; \n}\n\nconst ProceedArrow = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n <polyline points=\"12 5 19 12 12 19\"></polyline>\n </svg>\n);\n\nconst GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseClick }: GapItemProps) => {\n const [showMainReasoning, setShowMainReasoning] = useState(false);\n const [optionReasoningState, setOptionReasoningState] = useState<Record<number, boolean>>({});\n // const [isOpen, setIsOpen] = useState(true);\n const textInputRef = useRef<HTMLTextAreaElement | null>(null);\n\n useEffect(() => {\n if (index === 0 && gap.inputType === \"text\" && isEditable) {\n textInputRef.current?.focus();\n }\n }, [index, gap.inputType, isEditable]);\n\n const formatMarkdownSource = (content: string) => {\n if (!content) return \"\";\n // Convert literal \"\\n\" strings into actual newline characters\n // and ensure proper spacing for lists\n return content\n .replace(/\\\\n/g, \"\\n\");\n };\n // Use the formatter for the values coming from your data\n const sanitizedReasoning = useMemo(() => \n formatMarkdownSource(gap.aiReasoning?.reason || \"\"), \n [gap.aiReasoning?.reason]\n );\n\n const sanitizedGapReasoning = useMemo(() => \n formatMarkdownSource(gap.aiReasoning?.gap || \"\"), \n [gap.aiReasoning?.gap]\n );\n\n const getCitationByNumber = useCallback((citationNumber: string, source: string) => {\n if (!citations) return null;\n return (\n citations.find(\n (c: any) =>\n c.customMetaData.citation_number &&\n c.customMetaData.citation_title !== 'Cognitive Decisioning' &&\n c.customMetaData.source === source &&\n String(c.customMetaData.citation_number) === String(citationNumber)\n ) || null\n );\n }, [citations]);\n\n const markdownComponents = useMemo(() => ({\n img: ({ node, ...props }: any) => (\n <img {...props} style={{ height: '100%', width: '100%', objectFit: 'contain' }} alt={props?.alt || ''} className=\"w-full sm:max-w-lg md:max-w-2xl lg:max-w-4xl mx-auto\" />\n ),\n p: ({ node, ...props }: any) => (\n <p {...props} style={{ margin: 0 }}>{props?.children}</p>\n ),\n code: ({ node, ...props }: any) => (\n <span {...props} style={{ maxWidth: '100%', wordWrap: 'break-word', overflowWrap: 'break-word', wordBreak: 'break-word', whiteSpace: 'normal', overflow: 'hidden', display: 'inline-flex', fontSize: '1rem', lineHeight: '1.625rem' }}>\n {props?.children}\n </span>\n ),\n ol: ({ node, ...props }: any) => (\n <ol {...props} style={{ display: 'flex', flexDirection: 'column', gap: '1rem', listStyle: 'decimal', paddingLeft: '2.5rem' }}>{props?.children}</ol>\n ),\n ul: ({ node, ...props }: any) => (\n <ol {...props} style={{ paddingLeft: '1.25rem', listStyleType: 'decimal' }} />\n ),\n li: ({ node, ...props }: any) => (\n <li {...props} style={{ marginBottom: '4px', listStyle: 'decimal' }}>{props.children}</li>\n ),\n a: ({ href, children }: any) => {\n if (!href) return <a>{children}</a>;\n \n const match = href.match(/citationNumber=([^&]+)/);\n if (match && CitationLink) {\n const source = getSourceFromUrl(href);\n const cit = getCitationByNumber(match[1], source);\n if (cit) return <CitationLink citation={cit} linkTitle={children as string} fontSize={12} />;\n }\n return <a href={href} target='_blank' rel='noopener noreferrer' className='md-link inline-flex items-center gap-1 text-purple-700 hover:underline' style={{ color: 'var(--il-primary, #7C3AED)' }}>{children}</a>;\n },\n }), [getCitationByNumber]);\n\n // Update the helper to extract the explanation\n const getOptionData = (opt: any) => {\n if (typeof opt === \"string\") return { text: opt, reasoning: null, explanation: null, id: null, isRecommended: false };\n return { \n text: opt.text, \n reasoning: opt.aiReasoning, \n explanation: opt.explanation, // This ensures the data from the JSON payload is captured\n id: opt.id,\n isRecommended: opt.is_recommended\n };\n };\n\n const isMultiSelect = gap.inputType === \"checkbox\";\n\n const handleTextChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (!isEditable) return;\n onUpdate(gap.id, event.target.value);\n };\n\n const handleChange = (val: string, optId?: string) => {\n if (!isEditable) return;\n\n // Check against the ID first, fallback to string matching\n if (optId === \"typeYourAnswer\" || val.trim().toLowerCase() === \"type your response\") {\n onUpdate(gap.id, val); // Still select it visually\n if (onTypeResponseClick) onTypeResponseClick(); // Trigger the glow\n return; \n }\n if (isMultiSelect) {\n const currentSelection = Array.isArray(gap.userSelection) ? gap.userSelection : [];\n const newSelection = currentSelection.includes(val)\n ? currentSelection.filter((item: string) => item !== val)\n : [...currentSelection, val];\n onUpdate(gap.id, newSelection);\n } else {\n onUpdate(gap.id, val);\n }\n };\n\n return (\n <Box\n sx={{\n // boxSizing: \"border-box\",\n // border: \"1px solid #F0F2F5\",\n // borderRadius: \"8px\",\n // mb: \"2px\",\n // pb: \"14px\",\n bgcolor: \"var(--il-surface, #FFFEFE)\",\n color: \"var(--il-foreground, #17212B)\",\n // boxShadow: \"0px 2px 4px rgba(25, 33, 61, 0.08)\",\n overflow: \"hidden\",\n }}\n >\n {/* Header */}\n {/* <Box\n onClick={() => setIsOpen(!isOpen)}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n p: \"12px 14px\",\n cursor: \"pointer\",\n }}\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"8px\" }}>\n <Typography sx={{ fontWeight: 400, fontSize: \"16px\", color: \"#17212B\" }}>\n <span style={{color: '#8F2C23'}}>*</span> {index + 1}. {gap.name}\n </Typography>\n <Box\n sx={{\n bgcolor: \"rgba(219, 234, 254, 0.5)\",\n color: \"#0369A1\",\n px: \"7px\",\n py: \"3.5px\",\n borderRadius: \"6px\",\n fontSize: \"12px\",\n fontWeight: 500,\n }}\n >\n Impact {gap.impact}\n </Box>\n </Box>\n {isOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Box> */}\n\n {/* <Collapse in={isOpen}> */}\n <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: \"8px\" }}>\n {/* Main Gap Reasoning */}\n <Box sx={{ display: \"flex\", flexDirection: \"column\", width: \"100%\" }}>\n \n <Typography\n component=\"div\"\n sx={{\n fontSize: \"16px\",\n fontWeight: 400,\n color: \"var(--il-foreground, #17212B)\",\n lineHeight: 1.5,\n }}\n >\n <span style={{color: 'var(--il-danger, #8F2C23)', paddingRight: '2px'}}>*</span> {index + 1}. {gap.value}\n\n {gap.aiReasoning && (\n <Box \n component=\"span\"\n sx={{\n display: \"inline\",\n verticalAlign: \"middle\",\n ml: 0.5,\n }}\n >\n <CognitiveDecisioningCard\n headerIcon={<ButtonCognitiveIcon />}\n reasoning={sanitizedReasoning}\n reasoningTitle = \"Decision Making Factors\"\n reasoningSubtitle = \"Why is this Suggested?\"\n gapTitle = \"Gaps in Decision\"\n gapSubtitle = \"What's missing or unclear?\"\n gap={sanitizedGapReasoning}\n score={gap.aiReasoning.score}\n isOpen={showMainReasoning}\n onToggle={() => setShowMainReasoning((prev) => !prev)}\n mdComponents={markdownComponents}\n styles={getCognitiveDecisioningThemeStyles()}\n />\n </Box>\n )}\n </Typography>\n\n </Box>\n\n {/* Input Section */}\n {gap.inputType === \"text\" ? (\n <TextareaAutosize\n ref={textInputRef}\n minRows={1}\n maxRows={10}\n value={gap.userSelection || \"\"}\n onChange={handleTextChange}\n disabled={!isEditable}\n placeholder=\"Enter your input...\"\n style={{\n width: \"100%\",\n minHeight: \"30px\",\n padding: \"8px 12px\",\n borderRadius: \"6px\",\n border: \"1px solid var(--il-input-border, #CBD5E1)\",\n background: \"var(--il-input-bg, #FFFFFF)\",\n color: \"var(--il-input-fg, #17212B)\",\n fontSize: \"14px\",\n resize: \"none\",\n }}\n />\n ) : isMultiSelect ? (\n <FormGroup row sx={{ gap: \"16px\", flexDirection: \"column\" }}>\n {gap.options.map((opt: any, idx: number) => {\n const { text, reasoning, explanation, id, isRecommended } = getOptionData(opt);\n // check for selection state based on input type\n const isSelected = gap.inputType === \"checkbox\" \n ? (gap.userSelection || []).includes(text)\n : gap.userSelection === text;\n\n return (\n <Box\n key={idx}\n sx={{ display: \"flex\", flexDirection: \"column\", width: \"100%\" }}\n >\n {/* Row (unchanged styling) */}\n <FormControlLabel\n control={\n <Checkbox\n checked={(gap.userSelection || []).includes(text)}\n onChange={() => handleChange(text, id)}\n value={text}\n size=\"small\"\n disabled={!isEditable}\n sx={{\n p: 0,\n mr: \"7px\",\n width: \"17.5px\",\n height: \"17.5px\",\n \"& .MuiSvgIcon-root\": { fontSize: 17.5 },\n color: \"var(--il-muted, #CBD5E1)\",\n \"&.Mui-checked\": { color: \"var(--il-primary, #2563EB)\" },\n alignSelf: \"flex-start\",\n mt: \"2px\",\n }}\n />\n }\n label={\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n width: \"100%\",\n }}\n >\n <Typography\n sx={{\n fontSize: \"14px\",\n color: \"var(--il-foreground, #1E293B)\",\n fontWeight: 400,\n }}\n >\n {text}\n {isRecommended && (\n <span style={{\n borderRadius: '100px',\n border: '1px solid var(--il-primary, #D1E0FF)',\n background: 'color-mix(in srgb, var(--il-primary, #528BFF) 12%, var(--il-surface, #FFF))',\n color: 'var(--il-primary, #528BFF)',\n padding: '2px 8px',\n paddingBottom: '3.5px',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: 'Inter',\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: '100%',\n marginLeft: '8px',\n }}>\n Recommended\n </span>\n )}\n </Typography>\n\n {(reasoning || explanation) && (\n <Box\n onClick={(e) => {\n e.stopPropagation();\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: !prev[idx],\n }));\n }}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n cursor: \"pointer\",\n flexShrink: 0,\n }}\n >\n <ButtonCognitiveIcon />\n {optionReasoningState[idx] ? (\n <ChevronUp size={12} color=\"var(--il-muted, #667085)\" />\n ) : (\n <ChevronDown size={12} color=\"var(--il-muted, #667085)\" />\n )}\n </Box>\n )}\n </Box>\n }\n sx={{ mr: 0, ml: 0, alignItems: \"flex-start\", width: \"100%\" }}\n />\n\n {/* Card BELOW (new block) */}\n {(reasoning|| explanation) && optionReasoningState[idx] && (\n <Box \n sx={{ \n width: \"100%\", \n border: '1px solid var(--il-border, #EAECF0)',\n marginTop: '6px',\n borderRadius: '16px', \n overflow: 'hidden',\n boxShadow: '0 1px 2px 0 rgba(16, 24, 40, 0.05)'\n }}\n >\n {/* Render Explanation Block */}\n {explanation && (\n <GapExplanationAccordion\n explanation={explanation}\n isSelected={isSelected} // Pass the selection state\n onProceed={() => handleChange(text)}\n proceedIcon={<ProceedArrow />}\n />\n )}\n {/* Render Cognitive Reasoning Section */}\n {reasoning && (\n <CognitiveDecisioningCard\n headerIcon={<ButtonCognitiveIcon />}\n reasoning={reasoning.reason}\n gap={reasoning.gap}\n reasoningTitle = \"Decision Making Factors\"\n reasoningSubtitle = \"Why is this Suggested?\"\n gapTitle = \"Gaps in Decision\"\n gapSubtitle = \"What's missing or unclear?\"\n score={reasoning.score}\n isOpen={true}\n onToggle={() =>\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: false,\n }))\n }\n hideTrigger\n mdComponents={markdownComponents}\n styles={getCognitiveDecisioningThemeStyles({\n container: { border: 'none', borderRadius: 0, marginTop: 0, marginBottom: 0 },\n header: { borderBottom: 'none' },\n sectionButton: { padding: '16px' },\n })}\n />\n )}\n </Box>\n )}\n </Box>\n );\n })}\n </FormGroup>\n ) : (\n <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: \"8px\" }}>\n {gap.options.map((opt: any, idx: number) => {\n const { text, reasoning, explanation, id, isRecommended } = getOptionData(opt);\n const isSelected = gap.userSelection === text;\n\n return (\n <Box\n key={idx}\n sx={{ display: \"flex\", flexDirection: \"column\", width: \"100%\" }}\n >\n {/* Row */}\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n width: \"100%\",\n }}\n >\n <Box\n onClick={() => handleChange(text, id)}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n padding: \"8px\",\n borderRadius: \"8px\",\n cursor: isEditable ? \"pointer\" : \"default\",\n bgcolor: isSelected ? \"color-mix(in srgb, var(--il-primary, #2563eb) 16%, var(--il-surface, #ffffff))\" : \"transparent\",\n border: \"1px solid\",\n borderColor: isSelected ? \"var(--il-primary, #B2CCFF)\" : \"transparent\",\n transition: \"all 0.15s ease-in-out\",\n flex: 1,\n boxSizing: \"border-box\",\n }}\n >\n <DynamicArrow\n isSelected={isSelected}\n width={24}\n height={24}\n />\n <Typography\n sx={{\n fontSize: \"14px\",\n color: \"var(--il-foreground, #344054)\",\n fontWeight: 500,\n }}\n >\n {text}\n {isRecommended && (\n <span style={{\n borderRadius: '100px',\n border: '1px solid var(--il-primary, #D1E0FF)',\n background: 'color-mix(in srgb, var(--il-primary, #528BFF) 12%, var(--il-surface, #FFF))',\n color: 'var(--il-primary, #528BFF)',\n padding: '2px 8px',\n paddingBottom: '3.5px',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: 'Inter',\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: '100%',\n marginLeft: '8px',\n }}>\n Recommended\n </span>\n )}\n </Typography>\n </Box>\n\n {(reasoning || explanation) && (\n <Box\n onClick={(e) => {\n e.stopPropagation();\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: !prev[idx],\n }));\n }}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n cursor: \"pointer\",\n flexShrink: 0,\n }}\n >\n <ButtonCognitiveIcon />\n {optionReasoningState[idx] ? (\n <ChevronUp size={12} color=\"var(--il-muted, #667085)\" />\n ) : (\n <ChevronDown size={12} color=\"var(--il-muted, #667085)\" />\n )}\n </Box>\n )}\n </Box>\n\n {/* Card BELOW */}\n {(reasoning || explanation) && optionReasoningState[idx] && (\n <Box \n sx={{ \n width: \"100%\", \n border: '1px solid var(--il-border, #EAECF0)',\n marginTop: '6px',\n borderRadius: '16px', \n overflow: 'hidden',\n boxShadow: '0 1px 2px 0 rgba(16, 24, 40, 0.05)'\n }}\n >\n {/* Render Explanation Block */}\n {explanation && (\n <Box sx={{ borderBottom: reasoning ? '1px solid var(--il-border, #EAECF0)' : 'none' }}>\n <GapExplanationAccordion\n explanation={explanation}\n isSelected={isSelected} // Pass the selection state\n onProceed={() => handleChange(text)}\n proceedIcon={<ProceedArrow />}\n />\n </Box>\n )}\n {/* Render Cognitive Reasoning Section */}\n {reasoning && (\n <CognitiveDecisioningCard\n reasoningTitle = \"Decision Making Factors\"\n reasoningSubtitle = \"Why is this Suggested?\"\n gapTitle = \"Gaps in Decision\"\n gapSubtitle = \"What's missing or unclear?\"\n headerIcon={<ButtonCognitiveIcon />}\n reasoning={reasoning.reason}\n gap={reasoning.gap}\n score={reasoning.score}\n isOpen={true}\n onToggle={() =>\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: false,\n }))\n }\n hideTrigger\n mdComponents={markdownComponents}\n styles={getCognitiveDecisioningThemeStyles({\n container: { border: 'none', borderRadius: 0, marginTop: 0, marginBottom: 0 },\n header: { borderBottom: 'none' },\n sectionButton: { padding: '16px' },\n })}\n />\n )}\n </Box>\n )}\n </Box>\n );\n })}\n </Box>\n )}\n </Box>\n {/* </Collapse> */}\n </Box>\n );\n};\n\nexport const CriticalGaps = ({\n data,\n isLastMessage,\n onValidationChange,\n isSubmitted,\n citations,\n onTypeResponseClick,\n isGlobalEditActive,\n}: {\n data: any;\n isLastMessage: boolean;\n onValidationChange?: (isValid: boolean, selections: any[]) => void;\n isSubmitted?: boolean;\n citations?: any[];\n onTypeResponseClick?: () => void;\n isGlobalEditActive?: boolean;\n}) => {\n // const [isMainOpen, setIsMainOpen] = useState(true);\n\n const [gapsState, setGapsState] = useState(\n data.gaps.map((g: any) => ({\n ...g,\n userSelection: g.inputType === \"checkbox\" ? [] : null,\n }))\n );\n\n const handleUpdate = useCallback((gapId: string, value: any) => {\n setGapsState((prev: any) => {\n const newState = prev.map((g: any) =>\n g.id === gapId ? { ...g, userSelection: value } : g\n );\n return newState;\n });\n }, []);\n\n useEffect(() => {\n if (!onValidationChange) return;\n\n const isValid = gapsState.some((g: any) => {\n if (g.inputType === \"checkbox\") {\n return Array.isArray(g.userSelection) && g.userSelection.length > 0;\n } else if (g.inputType === \"text\") {\n return (\n g.userSelection !== null &&\n typeof g.userSelection === \"string\" &&\n g.userSelection.trim() !== \"\"\n );\n } else {\n return g.userSelection !== null && g.userSelection !== \"\";\n }\n });\n\n onValidationChange(isValid, gapsState);\n }, [gapsState, onValidationChange]);\n\n const isEditable = isLastMessage && !isSubmitted && !isGlobalEditActive;\n\n return (\n // <Box\n // sx={{\n // display: \"flex\",\n // flexDirection: \"column\",\n // gap: \"20px\", // spacing between gap items\n // width: \"100%\",\n // }}\n // >\n // <Box\n // onClick={() => setIsMainOpen(!isMainOpen)}\n // sx={{\n // display: \"flex\",\n // alignItems: \"center\",\n // justifyContent: \"space-between\",\n // cursor: \"pointer\",\n // }}\n // >\n // <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"16px\" }}>\n // <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"8px\" }}>\n // <Typography\n // sx={{\n // color: \"#DC2626\",\n // fontWeight: 500,\n // fontSize: \"14px\",\n // lineHeight: \"17px\",\n // }}\n // >\n // Critical Gaps\n // </Typography>\n // <Box\n // sx={{\n // bgcolor: \"#FEF2F2\",\n // color: \"#DC2626\",\n // px: \"5px\",\n // py: \"2px\",\n // borderRadius: \"200px\",\n // fontSize: \"12px\",\n // fontWeight: 600,\n // lineHeight: \"130%\",\n // minWidth: \"20px\",\n // textAlign: \"center\",\n // }}\n // >\n // {data.count}\n // </Box>\n // </Box>\n\n // <Box\n // sx={{\n // display: \"inline-flex\",\n // alignItems: \"center\",\n // gap: \"2px\",\n // px: \"8px\",\n // py: \"5px\",\n // // height: \"20px\",\n // bgcolor: \"#FFFFFF\",\n // border: \"1px solid #C4B5FD\",\n // borderRadius: \"16px\",\n // boxSizing: \"border-box\",\n // }}\n // >\n // <Box\n // sx={{\n // display: \"flex\",\n // alignItems: \"center\",\n // mr: \"2px\",\n // \"& svg\": {\n // width: \"10px\",\n // height: \"10px\",\n // color: \"#7C3AED\",\n // },\n // }}\n // >\n // <SparkleIcon />\n // </Box>\n // <Typography\n // sx={{\n // fontSize: \"12px\",\n // fontWeight: 500,\n // color: \"#1E293B\",\n // lineHeight: \"150%\",\n // }}\n // >\n // Decision Strength {data.decisionStrength}\n // </Typography>\n // </Box>\n // </Box>\n\n // <Box\n // sx={{\n // display: \"flex\",\n // \"& svg\": { width: 24, height: 24, color: \"#1E293B\" },\n // }}\n // >\n // {isMainOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}\n // </Box>\n // </Box>\n\n // <Collapse in={isMainOpen}>\n // <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: \"16px\" }}>\n // <Typography\n // sx={{\n // fontSize: \"13px\",\n // color: \"#666F8D\",\n // lineHeight: \"20px\",\n // fontWeight: 400,\n // letterSpacing: \"-0.15px\",\n // mt: \"-6px\",\n // }}\n // >\n // {data.value ||\n // \"Shows missing information that can help me guide you better\"}\n // </Typography>\n\n // {gapsState.map((gap: any, index: number) => (\n // <GapItem\n // key={gap.id}\n // index={index}\n // gap={gap}\n // onUpdate={handleUpdate}\n // isEditable={isEditable}\n // citations={citations}\n // />\n // ))}\n // </Box>\n // </Collapse>\n // </Box>\n <Box\n sx={{\n width: \"100%\",\n backgroundColor: \"var(--il-surface, #FFFFFF)\",\n color: \"var(--il-foreground, #17212B)\",\n borderRadius: \"8px\",\n border: \"1px solid var(--il-border, #E3E6EA)\",\n padding: \"14px\",\n marginTop: \"12px\",\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n }}\n >\n {gapsState.map((gap: any, index: number) => (\n <GapItem\n key={gap.id}\n index={index}\n gap={gap}\n onUpdate={handleUpdate}\n isEditable={isEditable}\n citations={citations}\n onTypeResponseClick={onTypeResponseClick}\n />\n ))}\n </Box>\n </Box>\n );\n};"],"names":["_a"],"mappings":";;;;;;;;;;;;AAgCA,MAAM,eAAe,sBACjB,IAAA,CAAC,SAAI,KAAM,EAAA,IAAA,EAAK,QAAO,IAAK,EAAA,OAAA,EAAQ,aAAY,IAAK,EAAA,MAAA,EAAO,QAAO,cAAe,EAAA,WAAA,EAAY,OAAM,aAAc,EAAA,OAAA,EAAQ,gBAAe,OACrI,EAAA,QAAA,EAAA;AAAA,kBAAC,GAAA,CAAA,MAAA,EAAA,EAAK,IAAG,GAAI,EAAA,EAAA,EAAG,MAAK,EAAG,EAAA,IAAA,EAAK,IAAG,IAAK,EAAA,CAAA;AAAA,kBACrC,GAAA,CAAC,UAAS,EAAA,EAAA,MAAA,EAAO,kBAAmB,EAA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
|
+
{"version":3,"file":"CriticalGaps.js","sources":["../../../../src/features/IL-OTJ/_components/CriticalGaps.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback, useMemo, useRef } from \"react\";\nimport {\n Box,\n Card,\n Typography,\n Checkbox,\n FormGroup,\n FormControlLabel,\n Collapse,\n TextareaAutosize,\n} from \"@mui/material\";\nimport { ChevronDown, ChevronUp } from \"lucide-react\";\nimport ChevronDownIcon from \"./_svg/ChevronDown\";\nimport ChevronUpIcon from \"./_svg/ChevronUp\";\nimport SparkleIcon from \"./_svg/SparkleIcon\";\nimport { CognitiveDecisioningCard } from '@e-llm-studio/citation';\nimport { DynamicArrow } from \"../_components/MarkdownComponents/MarkdownSelect\";\nimport { ButtonCognitiveIcon } from \"./_svg/ButtonCognitiveIcon\";\nimport CitationLink from \"./CitationLink\";\nimport { getCognitiveDecisioningThemeStyles } from './cognitiveDecisioningThemeStyles';\nimport { GapExplanationAccordion } from \"./GapExplanationAccordion\";\nimport { getSourceFromUrl } from \"./MarkdownComponents/MarkdownElements\";\nimport { highlightRhsField } from \"../helpers/rhsFieldAttention\";\n\ninterface GapItemProps {\n gap: any;\n index: number;\n onUpdate: (id: string, value: any) => void;\n isEditable: boolean;\n citations?: any[];\n onTypeResponseClick?: () => void; \n shouldHighlightRhs?: boolean;\n onRhsAttention?: (gapId: string, fieldId?: string) => void;\n}\n\nconst ProceedArrow = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n <polyline points=\"12 5 19 12 12 19\"></polyline>\n </svg>\n);\n\nconst GapItem = ({ gap, index, onUpdate, isEditable, citations, onTypeResponseClick, shouldHighlightRhs, onRhsAttention }: GapItemProps) => {\n const [showMainReasoning, setShowMainReasoning] = useState(false);\n const [optionReasoningState, setOptionReasoningState] = useState<Record<number, boolean>>({});\n // const [isOpen, setIsOpen] = useState(true);\n const textInputRef = useRef<HTMLTextAreaElement | null>(null);\n\n useEffect(() => {\n if (index === 0 && gap.inputType === \"text\" && isEditable) {\n textInputRef.current?.focus();\n }\n }, [index, gap.inputType, isEditable]);\n\n // A RHS interaction has no answer to collect in chat: it points the user to\n // the form field that needs attention as soon as the card is displayed.\n useEffect(() => {\n if (gap.inputType !== \"rhs\" || !shouldHighlightRhs) return;\n const fieldId = gap.options?.[0]?.highlightRhsField;\n\n // The message renderer owns the once-per-gap guard. This prevents unrelated\n // form state updates (for example Edit/Cancel) from replaying the RHS glow.\n if (onRhsAttention) onRhsAttention(gap.id, fieldId);\n else highlightRhsField(fieldId);\n }, [gap.id, gap.inputType, gap.options?.[0]?.highlightRhsField, shouldHighlightRhs, onRhsAttention]);\n\n const formatMarkdownSource = (content: string) => {\n if (!content) return \"\";\n // Convert literal \"\\n\" strings into actual newline characters\n // and ensure proper spacing for lists\n return content\n .replace(/\\\\n/g, \"\\n\");\n };\n // Use the formatter for the values coming from your data\n const sanitizedReasoning = useMemo(() => \n formatMarkdownSource(gap.aiReasoning?.reason || \"\"), \n [gap.aiReasoning?.reason]\n );\n\n const sanitizedGapReasoning = useMemo(() => \n formatMarkdownSource(gap.aiReasoning?.gap || \"\"), \n [gap.aiReasoning?.gap]\n );\n\n const getCitationByNumber = useCallback((citationNumber: string, source: string) => {\n if (!citations) return null;\n return (\n citations.find(\n (c: any) =>\n c.customMetaData.citation_number &&\n c.customMetaData.citation_title !== 'Cognitive Decisioning' &&\n c.customMetaData.source === source &&\n String(c.customMetaData.citation_number) === String(citationNumber)\n ) || null\n );\n }, [citations]);\n\n const markdownComponents = useMemo(() => ({\n img: ({ node, ...props }: any) => (\n <img {...props} style={{ height: '100%', width: '100%', objectFit: 'contain' }} alt={props?.alt || ''} className=\"w-full sm:max-w-lg md:max-w-2xl lg:max-w-4xl mx-auto\" />\n ),\n p: ({ node, ...props }: any) => (\n <p {...props} style={{ margin: 0 }}>{props?.children}</p>\n ),\n code: ({ node, ...props }: any) => (\n <span {...props} style={{ maxWidth: '100%', wordWrap: 'break-word', overflowWrap: 'break-word', wordBreak: 'break-word', whiteSpace: 'normal', overflow: 'hidden', display: 'inline-flex', fontSize: '1rem', lineHeight: '1.625rem' }}>\n {props?.children}\n </span>\n ),\n ol: ({ node, ...props }: any) => (\n <ol {...props} style={{ display: 'flex', flexDirection: 'column', gap: '1rem', listStyle: 'decimal', paddingLeft: '2.5rem' }}>{props?.children}</ol>\n ),\n ul: ({ node, ...props }: any) => (\n <ol {...props} style={{ paddingLeft: '1.25rem', listStyleType: 'decimal' }} />\n ),\n li: ({ node, ...props }: any) => (\n <li {...props} style={{ marginBottom: '4px', listStyle: 'decimal' }}>{props.children}</li>\n ),\n a: ({ href, children }: any) => {\n if (!href) return <a>{children}</a>;\n \n const match = href.match(/citationNumber=([^&]+)/);\n if (match && CitationLink) {\n const source = getSourceFromUrl(href);\n const cit = getCitationByNumber(match[1], source);\n if (cit) return <CitationLink citation={cit} linkTitle={children as string} fontSize={12} />;\n }\n return <a href={href} target='_blank' rel='noopener noreferrer' className='md-link inline-flex items-center gap-1 text-purple-700 hover:underline' style={{ color: 'var(--il-primary, #7C3AED)' }}>{children}</a>;\n },\n }), [getCitationByNumber]);\n\n // Update the helper to extract the explanation\n const getOptionData = (opt: any) => {\n if (typeof opt === \"string\") return { text: opt, reasoning: null, explanation: null, id: null, isRecommended: false };\n return { \n text: opt.text, \n reasoning: opt.aiReasoning, \n explanation: opt.explanation, // This ensures the data from the JSON payload is captured\n id: opt.id,\n isRecommended: opt.is_recommended,\n highlightRhsField: opt.highlightRhsField,\n };\n };\n\n const isMultiSelect = gap.inputType === \"checkbox\";\n\n const handleTextChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (!isEditable) return;\n onUpdate(gap.id, event.target.value);\n };\n\n const handleChange = (val: string, optId?: string, rhsFieldId?: string) => {\n if (!isEditable) return;\n\n // Check against the ID first, fallback to string matching\n if (optId === \"typeYourAnswer\" || val.trim().toLowerCase() === \"type your response\") {\n onUpdate(gap.id, val); // Still select it visually\n if (onTypeResponseClick) onTypeResponseClick(); // Trigger the glow\n return; \n }\n if (isMultiSelect) {\n const currentSelection = Array.isArray(gap.userSelection) ? gap.userSelection : [];\n const newSelection = currentSelection.includes(val)\n ? currentSelection.filter((item: string) => item !== val)\n : [...currentSelection, val];\n onUpdate(gap.id, newSelection);\n if (!currentSelection.includes(val)) highlightRhsField(rhsFieldId);\n } else {\n onUpdate(gap.id, val);\n highlightRhsField(rhsFieldId);\n }\n };\n\n return (\n <Box\n sx={{\n // boxSizing: \"border-box\",\n // border: \"1px solid #F0F2F5\",\n // borderRadius: \"8px\",\n // mb: \"2px\",\n // pb: \"14px\",\n bgcolor: \"var(--il-surface, #FFFEFE)\",\n color: \"var(--il-foreground, #17212B)\",\n // boxShadow: \"0px 2px 4px rgba(25, 33, 61, 0.08)\",\n overflow: \"hidden\",\n }}\n >\n {/* Header */}\n {/* <Box\n onClick={() => setIsOpen(!isOpen)}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n p: \"12px 14px\",\n cursor: \"pointer\",\n }}\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"8px\" }}>\n <Typography sx={{ fontWeight: 400, fontSize: \"16px\", color: \"#17212B\" }}>\n <span style={{color: '#8F2C23'}}>*</span> {index + 1}. {gap.name}\n </Typography>\n <Box\n sx={{\n bgcolor: \"rgba(219, 234, 254, 0.5)\",\n color: \"#0369A1\",\n px: \"7px\",\n py: \"3.5px\",\n borderRadius: \"6px\",\n fontSize: \"12px\",\n fontWeight: 500,\n }}\n >\n Impact {gap.impact}\n </Box>\n </Box>\n {isOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Box> */}\n\n {/* <Collapse in={isOpen}> */}\n <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: \"8px\" }}>\n {/* Main Gap Reasoning */}\n <Box sx={{ display: \"flex\", flexDirection: \"column\", width: \"100%\" }}>\n \n <Typography\n component=\"div\"\n sx={{\n fontSize: \"16px\",\n fontWeight: 400,\n color: \"var(--il-foreground, #17212B)\",\n lineHeight: 1.5,\n }}\n >\n <span style={{color: 'var(--il-danger, #8F2C23)', paddingRight: '2px'}}>*</span> {index + 1}. {gap.value}\n\n {gap.aiReasoning && (\n <Box \n component=\"span\"\n sx={{\n display: \"inline\",\n verticalAlign: \"middle\",\n ml: 0.5,\n }}\n >\n <CognitiveDecisioningCard\n headerIcon={<ButtonCognitiveIcon />}\n reasoning={sanitizedReasoning}\n reasoningTitle = \"Decision Making Factors\"\n reasoningSubtitle = \"Why is this Suggested?\"\n gapTitle = \"Gaps in Decision\"\n gapSubtitle = \"What's missing or unclear?\"\n gap={sanitizedGapReasoning}\n score={gap.aiReasoning.score}\n isOpen={showMainReasoning}\n onToggle={() => setShowMainReasoning((prev) => !prev)}\n mdComponents={markdownComponents}\n styles={getCognitiveDecisioningThemeStyles()}\n />\n </Box>\n )}\n </Typography>\n\n </Box>\n\n {/* Input Section */}\n {gap.inputType === \"rhs\" ? null : gap.inputType === \"text\" ? (\n <TextareaAutosize\n ref={textInputRef}\n minRows={1}\n maxRows={10}\n value={gap.userSelection || \"\"}\n onChange={handleTextChange}\n disabled={!isEditable}\n placeholder=\"Enter your input...\"\n style={{\n width: \"100%\",\n minHeight: \"30px\",\n padding: \"8px 12px\",\n borderRadius: \"6px\",\n border: \"1px solid var(--il-input-border, #CBD5E1)\",\n background: \"var(--il-input-bg, #FFFFFF)\",\n color: \"var(--il-input-fg, #17212B)\",\n fontSize: \"14px\",\n resize: \"none\",\n }}\n />\n ) : isMultiSelect ? (\n <FormGroup row sx={{ gap: \"16px\", flexDirection: \"column\" }}>\n {gap.options.map((opt: any, idx: number) => {\n const { text, reasoning, explanation, id, isRecommended, highlightRhsField: rhsFieldId } = getOptionData(opt);\n // check for selection state based on input type\n const isSelected = gap.inputType === \"checkbox\" \n ? (gap.userSelection || []).includes(text)\n : gap.userSelection === text;\n\n return (\n <Box\n key={idx}\n sx={{ display: \"flex\", flexDirection: \"column\", width: \"100%\" }}\n >\n {/* Row (unchanged styling) */}\n <FormControlLabel\n control={\n <Checkbox\n checked={(gap.userSelection || []).includes(text)}\n onChange={() => handleChange(text, id, rhsFieldId)}\n value={text}\n size=\"small\"\n disabled={!isEditable}\n sx={{\n p: 0,\n mr: \"7px\",\n width: \"17.5px\",\n height: \"17.5px\",\n \"& .MuiSvgIcon-root\": { fontSize: 17.5 },\n color: \"var(--il-muted, #CBD5E1)\",\n \"&.Mui-checked\": { color: \"var(--il-primary, #2563EB)\" },\n alignSelf: \"flex-start\",\n mt: \"2px\",\n }}\n />\n }\n label={\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"6px\",\n width: \"100%\",\n }}\n >\n <Typography\n sx={{\n fontSize: \"14px\",\n color: \"var(--il-foreground, #1E293B)\",\n fontWeight: 400,\n }}\n >\n {text}\n {isRecommended && (\n <span style={{\n borderRadius: '100px',\n border: '1px solid var(--il-primary, #D1E0FF)',\n background: 'color-mix(in srgb, var(--il-primary, #528BFF) 12%, var(--il-surface, #FFF))',\n color: 'var(--il-primary, #528BFF)',\n padding: '2px 8px',\n paddingBottom: '3.5px',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: 'Inter',\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: '100%',\n marginLeft: '8px',\n }}>\n Recommended\n </span>\n )}\n </Typography>\n\n {(reasoning || explanation) && (\n <Box\n onClick={(e) => {\n e.stopPropagation();\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: !prev[idx],\n }));\n }}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n cursor: \"pointer\",\n flexShrink: 0,\n }}\n >\n <ButtonCognitiveIcon />\n {optionReasoningState[idx] ? (\n <ChevronUp size={12} color=\"var(--il-muted, #667085)\" />\n ) : (\n <ChevronDown size={12} color=\"var(--il-muted, #667085)\" />\n )}\n </Box>\n )}\n </Box>\n }\n sx={{ mr: 0, ml: 0, alignItems: \"flex-start\", width: \"100%\" }}\n />\n\n {/* Card BELOW (new block) */}\n {(reasoning|| explanation) && optionReasoningState[idx] && (\n <Box \n sx={{ \n width: \"100%\", \n border: '1px solid var(--il-border, #EAECF0)',\n marginTop: '6px',\n borderRadius: '16px', \n overflow: 'hidden',\n boxShadow: '0 1px 2px 0 rgba(16, 24, 40, 0.05)'\n }}\n >\n {/* Render Explanation Block */}\n {explanation && (\n <GapExplanationAccordion\n explanation={explanation}\n isSelected={isSelected} // Pass the selection state\n onProceed={() => handleChange(text, id, rhsFieldId)}\n proceedIcon={<ProceedArrow />}\n />\n )}\n {/* Render Cognitive Reasoning Section */}\n {reasoning && (\n <CognitiveDecisioningCard\n headerIcon={<ButtonCognitiveIcon />}\n reasoning={reasoning.reason}\n gap={reasoning.gap}\n reasoningTitle = \"Decision Making Factors\"\n reasoningSubtitle = \"Why is this Suggested?\"\n gapTitle = \"Gaps in Decision\"\n gapSubtitle = \"What's missing or unclear?\"\n score={reasoning.score}\n isOpen={true}\n onToggle={() =>\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: false,\n }))\n }\n hideTrigger\n mdComponents={markdownComponents}\n styles={getCognitiveDecisioningThemeStyles({\n container: { border: 'none', borderRadius: 0, marginTop: 0, marginBottom: 0 },\n header: { borderBottom: 'none' },\n sectionButton: { padding: '16px' },\n })}\n />\n )}\n </Box>\n )}\n </Box>\n );\n })}\n </FormGroup>\n ) : (\n <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: \"8px\" }}>\n {gap.options.map((opt: any, idx: number) => {\n const { text, reasoning, explanation, id, isRecommended, highlightRhsField: rhsFieldId } = getOptionData(opt);\n const isSelected = gap.userSelection === text;\n\n return (\n <Box\n key={idx}\n sx={{ display: \"flex\", flexDirection: \"column\", width: \"100%\" }}\n >\n {/* Row */}\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n width: \"100%\",\n }}\n >\n <Box\n onClick={() => handleChange(text, id, rhsFieldId)}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n padding: \"8px\",\n borderRadius: \"8px\",\n cursor: isEditable ? \"pointer\" : \"default\",\n bgcolor: isSelected ? \"color-mix(in srgb, var(--il-primary, #2563eb) 16%, var(--il-surface, #ffffff))\" : \"transparent\",\n border: \"1px solid\",\n borderColor: isSelected ? \"var(--il-primary, #B2CCFF)\" : \"transparent\",\n transition: \"all 0.15s ease-in-out\",\n flex: 1,\n boxSizing: \"border-box\",\n }}\n >\n <DynamicArrow\n isSelected={isSelected}\n width={24}\n height={24}\n />\n <Typography\n sx={{\n fontSize: \"14px\",\n color: \"var(--il-foreground, #344054)\",\n fontWeight: 500,\n }}\n >\n {text}\n {isRecommended && (\n <span style={{\n borderRadius: '100px',\n border: '1px solid var(--il-primary, #D1E0FF)',\n background: 'color-mix(in srgb, var(--il-primary, #528BFF) 12%, var(--il-surface, #FFF))',\n color: 'var(--il-primary, #528BFF)',\n padding: '2px 8px',\n paddingBottom: '3.5px',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: 'Inter',\n fontSize: '12px',\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: '100%',\n marginLeft: '8px',\n }}>\n Recommended\n </span>\n )}\n </Typography>\n </Box>\n\n {(reasoning || explanation) && (\n <Box\n onClick={(e) => {\n e.stopPropagation();\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: !prev[idx],\n }));\n }}\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"2px\",\n cursor: \"pointer\",\n flexShrink: 0,\n }}\n >\n <ButtonCognitiveIcon />\n {optionReasoningState[idx] ? (\n <ChevronUp size={12} color=\"var(--il-muted, #667085)\" />\n ) : (\n <ChevronDown size={12} color=\"var(--il-muted, #667085)\" />\n )}\n </Box>\n )}\n </Box>\n\n {/* Card BELOW */}\n {(reasoning || explanation) && optionReasoningState[idx] && (\n <Box \n sx={{ \n width: \"100%\", \n border: '1px solid var(--il-border, #EAECF0)',\n marginTop: '6px',\n borderRadius: '16px', \n overflow: 'hidden',\n boxShadow: '0 1px 2px 0 rgba(16, 24, 40, 0.05)'\n }}\n >\n {/* Render Explanation Block */}\n {explanation && (\n <Box sx={{ borderBottom: reasoning ? '1px solid var(--il-border, #EAECF0)' : 'none' }}>\n <GapExplanationAccordion\n explanation={explanation}\n isSelected={isSelected} // Pass the selection state\n onProceed={() => handleChange(text, id, rhsFieldId)}\n proceedIcon={<ProceedArrow />}\n />\n </Box>\n )}\n {/* Render Cognitive Reasoning Section */}\n {reasoning && (\n <CognitiveDecisioningCard\n reasoningTitle = \"Decision Making Factors\"\n reasoningSubtitle = \"Why is this Suggested?\"\n gapTitle = \"Gaps in Decision\"\n gapSubtitle = \"What's missing or unclear?\"\n headerIcon={<ButtonCognitiveIcon />}\n reasoning={reasoning.reason}\n gap={reasoning.gap}\n score={reasoning.score}\n isOpen={true}\n onToggle={() =>\n setOptionReasoningState((prev) => ({\n ...prev,\n [idx]: false,\n }))\n }\n hideTrigger\n mdComponents={markdownComponents}\n styles={getCognitiveDecisioningThemeStyles({\n container: { border: 'none', borderRadius: 0, marginTop: 0, marginBottom: 0 },\n header: { borderBottom: 'none' },\n sectionButton: { padding: '16px' },\n })}\n />\n )}\n </Box>\n )}\n </Box>\n );\n })}\n </Box>\n )}\n </Box>\n {/* </Collapse> */}\n </Box>\n );\n};\n\nexport const CriticalGaps = ({\n data,\n isLastMessage,\n onValidationChange,\n isSubmitted,\n citations,\n onTypeResponseClick,\n isGlobalEditActive,\n onRhsAttention,\n}: {\n data: any;\n isLastMessage: boolean;\n onValidationChange?: (isValid: boolean, selections: any[]) => void;\n isSubmitted?: boolean;\n citations?: any[];\n onTypeResponseClick?: () => void;\n isGlobalEditActive?: boolean;\n onRhsAttention?: (gapId: string, fieldId?: string) => void;\n}) => {\n // const [isMainOpen, setIsMainOpen] = useState(true);\n\n const [gapsState, setGapsState] = useState(\n data.gaps.map((g: any) => ({\n ...g,\n userSelection: g.inputType === \"checkbox\" ? [] : null,\n }))\n );\n\n const handleUpdate = useCallback((gapId: string, value: any) => {\n setGapsState((prev: any) => {\n const newState = prev.map((g: any) =>\n g.id === gapId ? { ...g, userSelection: value } : g\n );\n return newState;\n });\n }, []);\n\n useEffect(() => {\n if (!onValidationChange) return;\n\n const isValid = gapsState.some((g: any) => {\n if (g.inputType === \"checkbox\") {\n return Array.isArray(g.userSelection) && g.userSelection.length > 0;\n } else if (g.inputType === \"rhs\") {\n return true;\n } else if (g.inputType === \"text\") {\n return (\n g.userSelection !== null &&\n typeof g.userSelection === \"string\" &&\n g.userSelection.trim() !== \"\"\n );\n } else {\n return g.userSelection !== null && g.userSelection !== \"\";\n }\n });\n\n onValidationChange(isValid, gapsState);\n }, [gapsState, onValidationChange]);\n\n const isEditable = isLastMessage && !isSubmitted && !isGlobalEditActive;\n\n return (\n // <Box\n // sx={{\n // display: \"flex\",\n // flexDirection: \"column\",\n // gap: \"20px\", // spacing between gap items\n // width: \"100%\",\n // }}\n // >\n // <Box\n // onClick={() => setIsMainOpen(!isMainOpen)}\n // sx={{\n // display: \"flex\",\n // alignItems: \"center\",\n // justifyContent: \"space-between\",\n // cursor: \"pointer\",\n // }}\n // >\n // <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"16px\" }}>\n // <Box sx={{ display: \"flex\", alignItems: \"center\", gap: \"8px\" }}>\n // <Typography\n // sx={{\n // color: \"#DC2626\",\n // fontWeight: 500,\n // fontSize: \"14px\",\n // lineHeight: \"17px\",\n // }}\n // >\n // Critical Gaps\n // </Typography>\n // <Box\n // sx={{\n // bgcolor: \"#FEF2F2\",\n // color: \"#DC2626\",\n // px: \"5px\",\n // py: \"2px\",\n // borderRadius: \"200px\",\n // fontSize: \"12px\",\n // fontWeight: 600,\n // lineHeight: \"130%\",\n // minWidth: \"20px\",\n // textAlign: \"center\",\n // }}\n // >\n // {data.count}\n // </Box>\n // </Box>\n\n // <Box\n // sx={{\n // display: \"inline-flex\",\n // alignItems: \"center\",\n // gap: \"2px\",\n // px: \"8px\",\n // py: \"5px\",\n // // height: \"20px\",\n // bgcolor: \"#FFFFFF\",\n // border: \"1px solid #C4B5FD\",\n // borderRadius: \"16px\",\n // boxSizing: \"border-box\",\n // }}\n // >\n // <Box\n // sx={{\n // display: \"flex\",\n // alignItems: \"center\",\n // mr: \"2px\",\n // \"& svg\": {\n // width: \"10px\",\n // height: \"10px\",\n // color: \"#7C3AED\",\n // },\n // }}\n // >\n // <SparkleIcon />\n // </Box>\n // <Typography\n // sx={{\n // fontSize: \"12px\",\n // fontWeight: 500,\n // color: \"#1E293B\",\n // lineHeight: \"150%\",\n // }}\n // >\n // Decision Strength {data.decisionStrength}\n // </Typography>\n // </Box>\n // </Box>\n\n // <Box\n // sx={{\n // display: \"flex\",\n // \"& svg\": { width: 24, height: 24, color: \"#1E293B\" },\n // }}\n // >\n // {isMainOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}\n // </Box>\n // </Box>\n\n // <Collapse in={isMainOpen}>\n // <Box sx={{ display: \"flex\", flexDirection: \"column\", gap: \"16px\" }}>\n // <Typography\n // sx={{\n // fontSize: \"13px\",\n // color: \"#666F8D\",\n // lineHeight: \"20px\",\n // fontWeight: 400,\n // letterSpacing: \"-0.15px\",\n // mt: \"-6px\",\n // }}\n // >\n // {data.value ||\n // \"Shows missing information that can help me guide you better\"}\n // </Typography>\n\n // {gapsState.map((gap: any, index: number) => (\n // <GapItem\n // key={gap.id}\n // index={index}\n // gap={gap}\n // onUpdate={handleUpdate}\n // isEditable={isEditable}\n // citations={citations}\n // />\n // ))}\n // </Box>\n // </Collapse>\n // </Box>\n <Box\n sx={{\n width: \"100%\",\n backgroundColor: \"var(--il-surface, #FFFFFF)\",\n color: \"var(--il-foreground, #17212B)\",\n borderRadius: \"8px\",\n border: \"1px solid var(--il-border, #E3E6EA)\",\n padding: \"14px\",\n marginTop: \"12px\",\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n }}\n >\n {gapsState.map((gap: any, index: number) => (\n <GapItem\n key={gap.id}\n index={index}\n gap={gap}\n onUpdate={handleUpdate}\n isEditable={isEditable}\n citations={citations}\n onTypeResponseClick={onTypeResponseClick}\n shouldHighlightRhs={isLastMessage}\n onRhsAttention={onRhsAttention}\n />\n ))}\n </Box>\n </Box>\n );\n};\n"],"names":["_a","_b"],"mappings":";;;;;;;;;;;;;AAmCA,MAAM,eAAe,sBACjB,IAAA,CAAC,SAAI,KAAM,EAAA,IAAA,EAAK,QAAO,IAAK,EAAA,OAAA,EAAQ,aAAY,IAAK,EAAA,MAAA,EAAO,QAAO,cAAe,EAAA,WAAA,EAAY,OAAM,aAAc,EAAA,OAAA,EAAQ,gBAAe,OACrI,EAAA,QAAA,EAAA;AAAA,kBAAC,GAAA,CAAA,MAAA,EAAA,EAAK,IAAG,GAAI,EAAA,EAAA,EAAG,MAAK,EAAG,EAAA,IAAA,EAAK,IAAG,IAAK,EAAA,CAAA;AAAA,kBACrC,GAAA,CAAC,UAAS,EAAA,EAAA,MAAA,EAAO,kBAAmB,EAAA,CAAA;AAAA,CACxC,EAAA,CAAA,CAAA;AAGJ,MAAM,OAAA,GAAU,CAAC,EAAE,GAAK,EAAA,KAAA,EAAO,QAAU,EAAA,UAAA,EAAY,SAAW,EAAA,mBAAA,EAAqB,kBAAoB,EAAA,cAAA,EAAmC,KAAA;AA1C5I,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AA2CE,EAAA,MAAM,CAAC,iBAAA,EAAmB,oBAAoB,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAChE,EAAA,MAAM,CAAC,oBAAsB,EAAA,uBAAuB,CAAI,GAAA,QAAA,CAAkC,EAAE,CAAA,CAAA;AAE5F,EAAM,MAAA,YAAA,GAAe,OAAmC,IAAI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C,GAAA;AAAA,MAAA;AAAA,QACC,EAAI,EAAA;AAAA,UACF,KAAO,EAAA,MAAA;AAAA,UACP,eAAiB,EAAA,4BAAA;AAAA,UACjB,KAAO,EAAA,+BAAA;AAAA,UACP,YAAc,EAAA,KAAA;AAAA,UACd,MAAQ,EAAA,qCAAA;AAAA,UACR,OAAS,EAAA,MAAA;AAAA,UACT,SAAW,EAAA,MAAA;AAAA,SACb;AAAA,QAEA,QAAA,kBAAA,GAAA;AAAA,UAAC,GAAA;AAAA,UAAA;AAAA,YACC,EAAI,EAAA;AAAA,cACF,OAAS,EAAA,MAAA;AAAA,cACT,aAAe,EAAA,QAAA;AAAA,cACf,GAAK,EAAA,MAAA;AAAA,aACP;AAAA,YAEC,QAAU,EAAA,SAAA,CAAA,GAAA,CAAI,CAAC,GAAA,EAAU,KACxB,qBAAA,GAAA;AAAA,cAAC,OAAA;AAAA,cAAA;AAAA,gBAEC,KAAA;AAAA,gBACA,GAAA;AAAA,gBACA,QAAU,EAAA,YAAA;AAAA,gBACV,UAAA;AAAA,gBACA,SAAA;AAAA,gBACA,mBAAA;AAAA,gBACA,kBAAoB,EAAA,aAAA;AAAA,gBACpB,cAAA;AAAA,eAAA;AAAA,cARK,GAAI,CAAA,EAAA;AAAA,aAUZ,CAAA;AAAA,WAAA;AAAA,SACH;AAAA,OAAA;AAAA,KACF;AAAA,IAAA;AAEJ;;;;"}
|
|
@@ -128,6 +128,7 @@ const MarkdownDivRenderer = React__default.memo(({
|
|
|
128
128
|
onTypeResponseClick,
|
|
129
129
|
onComparisonLinkClick,
|
|
130
130
|
isGlobalEditActive,
|
|
131
|
+
onRhsAttention,
|
|
131
132
|
...props
|
|
132
133
|
}) => {
|
|
133
134
|
var _a;
|
|
@@ -341,7 +342,8 @@ const MarkdownDivRenderer = React__default.memo(({
|
|
|
341
342
|
isSubmitted: isGapsSubmitted,
|
|
342
343
|
citations,
|
|
343
344
|
onTypeResponseClick,
|
|
344
|
-
isGlobalEditActive
|
|
345
|
+
isGlobalEditActive,
|
|
346
|
+
onRhsAttention
|
|
345
347
|
}
|
|
346
348
|
);
|
|
347
349
|
}
|