@e-llm-studio/instant-learning 0.0.107 → 0.0.108
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/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/CustomComponents.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/CustomComponents.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MarkdownElements.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MarkdownElements.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/ChevronDown.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/ChevronDown.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/ChevronUp.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/ChevronUp.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/CognitiveDecisioning.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/_svg/CognitiveDecisioning.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/TextSection/TextSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/features/IL-OTJ/helpers/utils.js +1 -1
- package/dist/cjs/features/InstantLearning/_components/TooltipComponent.js +2 -0
- package/dist/cjs/features/InstantLearning/_components/TooltipComponent.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +2 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +1 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +2 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +2 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +1 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +2 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Grow/Grow.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Grow/Grow.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Popper/Popper.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Popper/Popper.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Portal/Portal.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Portal/Portal.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Tooltip/Tooltip.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/Tooltip/Tooltip.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/colorManipulator.js +1 -1
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/colorManipulator.js.map +1 -1
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/makeStyles.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/makeStyles.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/useTheme.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/useTheme.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/withTheme.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/styles/withTheme.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/transitions/utils.js +2 -0
- package/dist/cjs/node_modules/@material-ui/core/esm/transitions/utils.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/styles/esm/withStyles/withStyles.js +1 -1
- package/dist/cjs/node_modules/@material-ui/styles/esm/withStyles/withStyles.js.map +1 -1
- package/dist/cjs/node_modules/@material-ui/utils/esm/HTMLElementType.js +2 -0
- package/dist/cjs/node_modules/@material-ui/utils/esm/HTMLElementType.js.map +1 -0
- package/dist/cjs/node_modules/@material-ui/utils/esm/refType.js +1 -1
- package/dist/cjs/node_modules/@material-ui/utils/esm/refType.js.map +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/brain.js +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/brain.js.map +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/chevron-right.js +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/chevron-up.js +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -1
- package/dist/cjs/node_modules/popper.js/dist/esm/popper.js +27 -0
- package/dist/cjs/node_modules/popper.js/dist/esm/popper.js.map +1 -0
- package/dist/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/CustomComponents.js +2 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/CustomComponents.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/MarkdownElements.js +2 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/MarkdownElements.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +2 -0
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js.map +1 -0
- package/dist/features/IL-OTJ/_components/_svg/ChevronDown.js +2 -0
- package/dist/features/IL-OTJ/_components/_svg/ChevronDown.js.map +1 -0
- package/dist/features/IL-OTJ/_components/_svg/ChevronUp.js +2 -0
- package/dist/features/IL-OTJ/_components/_svg/ChevronUp.js.map +1 -0
- package/dist/features/IL-OTJ/_components/_svg/CognitiveDecisioning.js +2 -0
- package/dist/features/IL-OTJ/_components/_svg/CognitiveDecisioning.js.map +1 -0
- package/dist/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
- package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/TextSection/TextSection.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/IL-OTJ/helpers/utils.js +1 -1
- package/dist/features/InstantLearning/_components/TooltipComponent.js +2 -0
- package/dist/features/InstantLearning/_components/TooltipComponent.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/Grow/Grow.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/Grow/Grow.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/Popper/Popper.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/Popper/Popper.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/Portal/Portal.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/Portal/Portal.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/Tooltip/Tooltip.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/Tooltip/Tooltip.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/styles/colorManipulator.js +1 -1
- package/dist/node_modules/@material-ui/core/esm/styles/colorManipulator.js.map +1 -1
- package/dist/node_modules/@material-ui/core/esm/styles/makeStyles.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/styles/makeStyles.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/styles/useTheme.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/styles/useTheme.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/styles/withTheme.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/styles/withTheme.js.map +1 -0
- package/dist/node_modules/@material-ui/core/esm/transitions/utils.js +2 -0
- package/dist/node_modules/@material-ui/core/esm/transitions/utils.js.map +1 -0
- package/dist/node_modules/@material-ui/styles/esm/withStyles/withStyles.js.map +1 -1
- package/dist/node_modules/@material-ui/utils/esm/HTMLElementType.js +2 -0
- package/dist/node_modules/@material-ui/utils/esm/HTMLElementType.js.map +1 -0
- package/dist/node_modules/@material-ui/utils/esm/refType.js +1 -1
- package/dist/node_modules/@material-ui/utils/esm/refType.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/brain.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/brain.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -1
- package/dist/node_modules/popper.js/dist/esm/popper.js +26 -0
- package/dist/node_modules/popper.js/dist/esm/popper.js.map +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts +6 -0
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/CustomComponents.d.ts +10 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/CustomComponents.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MarkdownElements.d.ts +22 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MarkdownElements.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts +14 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/ChevronDown.d.ts +3 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/ChevronDown.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/ChevronUp.d.ts +3 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/ChevronUp.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/CognitiveDecisioning.d.ts +3 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/CognitiveDecisioning.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/atoms/Textarea/Textarea.d.ts +8 -2
- package/dist/types/src/features/IL-OTJ/_components/atoms/Textarea/Textarea.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +5 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.d.ts +5 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/TextSection/TextSection.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/TextSection/TextSection.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/IL-OTJ/helpers/utils.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/helpers/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e,__assign as t}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{useMemo as i,useState as o,useCallback as a}from"react";import{ReactMarkdown as l}from"../../../node_modules/react-markdown/lib/react-markdown.js";import d from"../../../node_modules/rehype-raw/lib/index.js";import s from"../../../node_modules/remark-gfm/index.js";import c from"./CitationLink.js";var p=function(e){var r=e.isOpen,i=e.color;return n("svg",t({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{color:void 0===i?"#9CA3AF":i,transform:r?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",marginLeft:"4px"}},{children:n("path",{d:"M6 9l6 6 6-6"})}))},u=function(){return r("svg",t({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[n("mask",t({id:"cognition_svg__a",width:"21",height:"20",x:"0",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},{children:n("path",{fill:"#D9D9D9",d:"M.976 0h20v20h-20z"})})),n("g",t({mask:"url(#cognition_svg__a)"},{children:n("path",{fill:"#667085",d:"M11.187 12.579q1.306 0 2.235-.842.929-.84.929-2.046 0-1.051-.669-1.786-.668-.735-1.64-.735-.85 0-1.451.545-.6.544-.601 1.344 0 .345.123.686.124.342.417.601.254.228.507.192a.68.68 0 0 0 .413-.21.7.7 0 0 0 .188-.411q.026-.24-.193-.446a1 1 0 0 1-.135-.176.4.4 0 0 1-.07-.226q0-.254.215-.44.216-.188.588-.188.449 0 .76.36.31.36.31.91 0 .67-.543 1.15t-1.362.48q-.988 0-1.684-.791-.698-.792-.698-1.962 0-.445.126-.868a2.8 2.8 0 0 1 .378-.787 1.03 1.03 0 0 0 .142-.492.6.6 0 0 0-.186-.454.6.6 0 0 0-.46-.183.5.5 0 0 0-.413.23q-.417.543-.637 1.186-.22.644-.22 1.347 0 1.665 1.054 2.838t2.577 1.174m-4.796 1.98a7.9 7.9 0 0 1-1.844-2.483 6.8 6.8 0 0 1-.656-2.914q0-2.949 2.066-5.013t5.017-2.064q2.428 0 4.342 1.451t2.486 3.765l.974 3.846a.71.71 0 0 1-.132.647.72.72 0 0 1-.603.291h-1.65v2.66q0 .623-.443 1.064a1.45 1.45 0 0 1-1.064.443h-1.827v1.041q0 .266-.18.445a.6.6 0 0 1-.445.18.6.6 0 0 1-.445-.18.6.6 0 0 1-.18-.445V15.76q0-.327.217-.542a.73.73 0 0 1 .536-.215h2.324a.25.25 0 0 0 .184-.072.25.25 0 0 0 .073-.185v-3.157a.73.73 0 0 1 .216-.537.73.73 0 0 1 .537-.216h1.497l-.792-3.23a5.4 5.4 0 0 0-2.05-3.086q-1.57-1.184-3.575-1.184-2.417 0-4.125 1.69t-1.708 4.11q0 1.248.51 2.37a6.2 6.2 0 0 0 1.448 1.997l.542.5v3.291q0 .266-.18.445a.6.6 0 0 1-.446.18.6.6 0 0 1-.445-.18.6.6 0 0 1-.18-.445z"})}))]}))},h=function(i){var o=i.style,a=e(i,["style"]);return n("div",t({style:t({display:"flex",height:"20px",width:"20px",alignItems:"center",justifyContent:"center",color:"#667085",flexShrink:0},o)},a,{children:r("svg",t({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n("path",{d:"M9 18h6"}),n("path",{d:"M10 22h4"}),n("path",{d:"M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.55-3 6H8a7 7 0 0 1-3-6 7 7 0 0 1 7-7z"})]}))}))},g=function(e){var i=e.width,o=void 0===i?16:i,a=e.height;return r("svg",t({width:o,height:void 0===a?16:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[n("path",{d:"M4.92363 2.64844H1.93457V5.34844M1.93457 10.7484V12.5484M8.90904 2.64844H12.9601M16.9455 2.64844H19.9346V5.34844M4.92363 20.6484H1.93457V17.9484",stroke:"url(#paint0_linear_gap)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),n("path",{d:"M18.2707 19.1183C18.7024 18.6924 19.0455 18.1852 19.2802 17.6261C19.5149 17.0669 19.6366 16.4669 19.6383 15.8605C19.6399 15.2541 19.5215 14.6533 19.2898 14.0929C19.0582 13.5325 18.7179 13.0235 18.2885 12.5953C17.8592 12.167 17.3493 11.828 16.7883 11.5978C16.2273 11.3676 15.6262 11.2507 15.0198 11.254C14.4134 11.2572 13.8137 11.3804 13.2551 11.6166C12.6966 11.8528 12.1903 12.1972 11.7656 12.6299C10.9166 13.4949 10.4438 14.6604 10.4503 15.8724C10.4567 17.0844 10.9418 18.2447 11.8 19.1006C12.6581 19.9566 13.8197 20.4387 15.0317 20.442C16.2437 20.4453 17.408 19.9695 18.2707 19.1183ZM18.2707 19.1183L21.1436 21.9987",stroke:"url(#paint1_linear_gap)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),r("defs",{children:[r("linearGradient",t({id:"paint0_linear_gap",x1:"-2.35114",y1:"-1.51018",x2:"19.0006",y2:"8.49096",gradientUnits:"userSpaceOnUse"},{children:[n("stop",{stopColor:"#2546F0"}),n("stop",{offset:"1",stopColor:"#5928ED"})]})),r("linearGradient",t({id:"paint1_linear_gap",x1:"7.90416",y1:"8.77148",x2:"20.6106",y2:"14.6946",gradientUnits:"userSpaceOnUse"},{children:[n("stop",{stopColor:"#2546F0"}),n("stop",{offset:"1",stopColor:"#5928ED"})]}))]})]}))},f=function(){return n("svg",t({width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:"4px"}},{children:n("path",{d:"M12 2L9 9l-7 3 7 3 3 7 3-7 7-3-7-3z"})}))},m=function(m){var x=m.citation,v=m.citations,y=m.fieldName,k=m.fieldValue,b=function(e,t){var n,r="";if(!(r="string"==typeof t?t:(null===(n=null==t?void 0:t.customMetaData)||void 0===n?void 0:n.content)?t.customMetaData.content:String(t)))return null;var i=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),o=r.match(i);return o?o[1].replace(/\\n/g,"\n"):null},w=i(function(){return b("reason",x)},[x]),C=i(function(){return b("gap",x)},[x]),F=i(function(){return b("relevance_score",x)},[x]),_=o(!1),M=_[0],S=_[1],D=o(!0),L=D[0],j=D[1],B=o(!0),q=B[0],I=B[1],W=a(function(e){return v&&v.find(function(t){return t.customMetaData.citation_number&&"Cognitive Decisioning"!==t.customMetaData.citation_title&&String(t.customMetaData.citation_number)===String(e)})||null},[v]),z=i(function(){return{p:function(r){r.node;var i=e(r,["node"]);return n("p",t({},i,{style:{margin:0}},{children:null==i?void 0:i.children}))},li:function(i){i.node;var o=i.index,a=e(i,["node","index"]);return r("div",t({style:{display:"flex",alignItems:"flex-start",marginBottom:"6px"}},{children:[n("span",t({style:{fontSize:"12px",fontWeight:400,color:"#55585fff",flexShrink:0,minWidth:"18px"}},{children:"number"==typeof o?"".concat(o+1,"."):"•"})),n("span",t({style:{fontSize:"12px",color:"#4B5563",lineHeight:"1.5",flex:1}},{children:a.children}))]}))},a:function(r){var i;r.node;var o=r.href,a=r.children,l=e(r,["node","href","children"]);if(!o)return n("a",t({},l,{children:a}));var d=o.match(/citationNumber=([^&]+)/),s=d?d[1]:null;if(s){var p=W(s);if(p){var u=(null===(i=p.customMetaData)||void 0===i?void 0:i.citation_type)||"",h=String(u).trim().toLowerCase(),g="rule_book"===h||"advertiser_names"===h,f={headerTitle:p.customMetaData.citation_title,headerBadge:p.customMetaData.citation_relevance_score,footerText:"Referenced from ".concat(p.customMetaData.citation_reference),rightSidebarItems:g?[]:[{label:"Category",value:p.customMetaData.citation_category||""},{label:"Code Name",value:p.customMetaData.citation_source||""}]};return n("span",t({style:{display:"inline",alignItems:"center",gap:"3px",color:"#2563EB",verticalAlign:"middle"}},{children:n(c,{citation:p,linkTitle:a,cardData:f})}))}}return n("a",t({href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"#2563EB",textDecoration:"none"}},l,{children:a}))}}},[W]),E=i(function(){return[d]},[]),R=i(function(){return[s]},[]),O=function(e){return e?e.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,t,n,r){return"".concat(t).concat(n.replace(/\s/g,"%20")).concat(r)}):""},A={display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"10px 12px",textAlign:"left"},H={paddingLeft:"40px",paddingRight:"12px",paddingBottom:"12px",fontSize:"12px",lineHeight:"1.5",color:"#4B5563"};return r("div",t({style:{margin:"8px 5px 0 5px",border:"1px solid #E5E7EB",borderRadius:"8px",overflow:"hidden",backgroundColor:"#FFFFFF",boxShadow:"0px 1px 2px rgba(16, 24, 40, 0.05)",boxSizing:"border-box"}},{children:[r("button",t({onClick:function(){return S(!M)},style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"none",background:"transparent",cursor:"pointer",transition:"background-color 0.2s",textAlign:"left"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#F9FAFB"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:[r("div",t({style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0}},{children:[n("div",t({style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"#F3F4F6",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:n(u,{})})),n("span",t({style:{fontSize:"13px",fontWeight:500,color:M?"#111827":"#343434ff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:"rule description"===y.toLowerCase()?"Why rule description is what is mentioned?":"Why ".concat(y," is ").concat(k,"?")}))]})),r("div",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[F&&r("div",t({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1px solid #E9D5FF",backgroundColor:"#FFFFFF",padding:"2px 8px",fontSize:"11px",fontWeight:600,color:"#2546F0"}},{children:[n(f,{}),"AI Relevance: ",F,"%"]})),n(p,{isOpen:M})]}))]})),M&&r("div",t({style:{backgroundColor:"#FFFFFF",borderTop:"1px solid #F3F4F6"}},{children:[r("div",t({style:{borderBottom:"1px solid #F3F4F6"}},{children:[r("button",t({onClick:function(){return j(!L)},style:A},{children:[r("div",t({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[n(h,{style:{color:"#2546F0"}}),n("h4",t({style:{fontSize:"12px",fontWeight:600,color:"#111827",margin:0}},{children:"Reasoning"}))]})),n(p,{isOpen:L})]})),L&&n("div",t({style:H},{children:n(l,t({components:z,rehypePlugins:E,remarkPlugins:R},{children:O(w||"No reasoning provided.")}))}))]})),r("div",{children:[r("button",t({onClick:function(){return I(!q)},style:A},{children:[r("div",t({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[n(g,{width:14,height:14}),n("h4",t({style:{fontSize:"12px",fontWeight:600,color:"#111827",margin:0}},{children:"Gaps"}))]})),n(p,{isOpen:q})]})),q&&n("div",t({style:H},{children:n(l,t({components:z,rehypePlugins:E,remarkPlugins:R},{children:O(C||"No gaps found.")}))}))]})]}))]}))};export{m as InputDataReasoningCard};
|
|
1
|
+
import{__rest as e,__assign as t}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as n,jsxs as i}from"react/jsx-runtime";import{memo as r,useMemo as o,useState as a,useCallback as l}from"react";import{ReactMarkdown as d}from"../../../node_modules/react-markdown/lib/react-markdown.js";import c from"../../../node_modules/rehype-raw/lib/index.js";import s from"../../../node_modules/remark-gfm/index.js";import f from"./CitationLink.js";import{HumanWithBrainIcon as p}from"./CognitiveDecisioningCard.js";var u=function(e){var i=e.isOpen,r=e.color;return n("svg",t({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{color:void 0===r?"#9CA3AF":r,transform:i?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",marginLeft:"4px"}},{children:n("path",{d:"M6 9l6 6 6-6"})}))},h=function(){return n("div",t({style:{display:"flex",height:"32px",width:"32px",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5ff",color:"#6b27d9",flexShrink:0,border:"1.5px solid #f5f5ff"}},{children:i("svg",t({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n("path",{d:"M9 18h6"}),n("path",{d:"M10 22h4"}),n("path",{d:"M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.55-3 6H8a7 7 0 0 1-3-6 7 7 0 0 1 7-7z"})]}))}))},g=function(){return n("div",t({style:{display:"flex",height:"32px",width:"32px",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5ff",flexShrink:0,border:"1.5px solid #f5f5ff"}},{children:i("svg",t({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[n("path",{d:"M4.92363 2.64844H1.93457V5.34844M1.93457 10.7484V12.5484M8.90904 2.64844H12.9601M16.9455 2.64844H19.9346V5.34844M4.92363 20.6484H1.93457V17.9484",stroke:"#6b27d9",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),n("path",{d:"M18.2707 19.1183C18.7024 18.6924 19.0455 18.1852 19.2802 17.6261C19.5149 17.0669 19.6366 16.4669 19.6383 15.8605C19.6399 15.2541 19.5215 14.6533 19.2898 14.0929C19.0582 13.5325 18.7179 13.0235 18.2885 12.5953C17.8592 12.167 17.3493 11.828 16.7883 11.5978C16.2273 11.3676 15.6262 11.2507 15.0198 11.254C14.4134 11.2572 13.8137 11.3804 13.2551 11.6166C12.6966 11.8528 12.1903 12.1972 11.7656 12.6299C10.9166 13.4949 10.4438 14.6604 10.4503 15.8724C10.4567 17.0844 10.9418 18.2447 11.8 19.1006C12.6581 19.9566 13.8197 20.4387 15.0317 20.442C16.2437 20.4453 17.408 19.9695 18.2707 19.1183ZM18.2707 19.1183L21.1436 21.9987",stroke:"#6b27d9",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}))}))},m=function(){return n("svg",t({width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:"4px"}},{children:n("path",{d:"M12 2L9 9l-7 3 7 3 3 7 3-7 7-3-7-3z"})}))},x=r(function(r){var x=r.citation,v=r.citations;r.fieldName,r.fieldValue;var y=r.isVisible,b=void 0!==y&&y,k=function(e,t){var n,i="";if(!(i="string"==typeof t?t:(null===(n=null==t?void 0:t.customMetaData)||void 0===n?void 0:n.content)?t.customMetaData.content:String(t)))return null;var r=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),o=i.match(r);return o?o[1].replace(/\\n/g,"\n"):null},C=o(function(){return k("reason",x)},[x]),w=o(function(){return k("gap",x)},[x]),S=o(function(){return k("relevance_score",x)},[x]),M=a(!0),D=M[0],_=M[1],j=a(!0),B=j[0],F=j[1],I=l(function(e){return v&&v.find(function(t){return t.customMetaData.citation_number&&"Cognitive Decisioning"!==t.customMetaData.citation_title&&String(t.customMetaData.citation_number)===String(e)})||null},[v]),L=o(function(){return{p:function(i){i.node;var r=e(i,["node"]);return n("p",t({},r,{style:{margin:0}},{children:null==r?void 0:r.children}))},li:function(r){r.node;var o=r.index,a=e(r,["node","index"]);return i("div",t({style:{display:"flex",alignItems:"flex-start",marginBottom:"6px"}},{children:[n("span",t({style:{fontSize:"12px",fontWeight:400,color:"#55585fff",flexShrink:0,minWidth:"18px"}},{children:"number"==typeof o?"".concat(o+1,"."):"•"})),n("span",t({style:{fontSize:"12px",color:"#4B5563",lineHeight:"1.5",flex:1}},{children:a.children}))]}))},a:function(i){var r;i.node;var o=i.href,a=i.children,l=e(i,["node","href","children"]);if(!o)return n("a",t({},l,{children:a}));var d=o.match(/citationNumber=([^&]+)/),c=d?d[1]:null;if(c){var s=I(c);if(s){var p=(null===(r=s.customMetaData)||void 0===r?void 0:r.citation_type)||"",u=String(p).trim().toLowerCase(),h="rule_book"===u||"advertiser_names"===u,g={headerTitle:s.customMetaData.citation_title,headerBadge:s.customMetaData.citation_relevance_score,footerText:"Referenced from ".concat(s.customMetaData.citation_reference),rightSidebarItems:h?[]:[{label:"Category",value:s.customMetaData.citation_category||""},{label:"Code Name",value:s.customMetaData.citation_source||""}]};return n("span",t({style:{display:"inline",alignItems:"center",fontSize:"14px !important",gap:"3px",color:"#2563EB",verticalAlign:"middle"}},{children:n(f,{citation:s,linkTitle:a,cardData:g,fontSize:12})}))}}return n("a",t({href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"#2563EB",textDecoration:"none"}},l,{children:a}))}}},[I]),z=o(function(){return[c]},[]),N=o(function(){return[s]},[]),W=function(e){return e?e.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,t,n,i){return"".concat(t).concat(n.replace(/\s/g,"%20")).concat(i)}):""},R={display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"10px 12px",textAlign:"left"},V={marginTop:"2px",paddingLeft:"40px",paddingRight:"12px",paddingBottom:"12px",fontSize:"12px",lineHeight:"1.5",color:"#4B5563"};return b?i("div",t({style:{width:"100%",marginTop:"4px",marginBottom:"12px",overflow:"hidden",borderRadius:"8px",border:"1.5px solid #cacdfa",backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px -1px rgba(0, 0, 0, 0.05)",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:[i("div",t({style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1.5px solid #d4dbff",backgroundColor:"#f4f2ff",padding:"8px 12px",gap:"8px"}},{children:[i("div",t({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[n(p,{}),n("span",t({style:{fontSize:"13px",fontWeight:500,color:"#1F2937"}},{children:"Cognitive Decisioning AI"}))]})),S&&i("div",t({style:{display:"flex",alignItems:"center",borderRadius:"16px",border:"1px solid #d4dbff",backgroundColor:"#FFFFFF",padding:"8px 8px",fontSize:"11px",fontWeight:600,color:"#7C3AED"}},{children:[n(m,{}),"AI Relevance: ",S,"%"]}))]})),i("div",t({style:{borderBottom:"1.5px solid #e9ebf0"}},{children:[i("button",t({onClick:function(){return _(!D)},style:R},{children:[i("div",t({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[n(h,{}),i("div",{children:[n("h4",t({style:{fontSize:"12px",fontWeight:500,color:"#111827",margin:0}},{children:"Reasoning"})),n("p",t({style:{fontSize:"10px",color:"#6B7280",margin:"0"}},{children:" Why this was picked"}))]})]})),n(u,{isOpen:D})]})),D&&n("div",t({style:V},{children:n(d,t({components:L,rehypePlugins:z,remarkPlugins:N},{children:W(C||"No reasoning provided.")}))}))]})),i("div",{children:[i("button",t({onClick:function(){return F(!B)},style:R},{children:[i("div",t({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[n(g,{}),i("div",{children:[n("h4",t({style:{fontSize:"12px",fontWeight:500,color:"#111827",margin:0}},{children:"Gap"})),n("p",t({style:{fontSize:"10px",color:"#6B7280",margin:"0"}},{children:"What's missing or unclear"}))]})]})),n(u,{isOpen:B})]})),B&&n("div",t({style:V},{children:n(d,t({components:L,rehypePlugins:z,remarkPlugins:N},{children:W(w||"No gaps identified")}))}))]})]})):null},function(e,t){return e.isVisible===t.isVisible&&e.fieldValue===t.fieldValue&&e.fieldName===t.fieldName&&JSON.stringify(e.citation)===JSON.stringify(t.citation)&&JSON.stringify(e.citations)===JSON.stringify(t.citations)});x.displayName="InputDataReasoningCard";export{x as InputDataReasoningCard};
|
|
2
2
|
//# sourceMappingURL=InputDataReasoningCard.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__rest as n}from"../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as i}from"react/jsx-runtime";import"react";import{extractTextFromChildren as r}from"../../helpers/utils.js";var o=function(n){var r=n.content,o=function(e){var n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),t=new RegExp("<".concat(n,">([\\s\\S]*?)<\\/").concat(n,">"),"i"),i=r.match(t);return i?i[1].trim():"*No ".concat(e," tag found.*")},l=o("reasoning_new"),a=o("proposed_rule"),d=o("wta_new"),s=o("wnta_new");return t("div",e({style:{padding:"16px 16px",maxWidth:"100%",border:"1px solid #A78BFA",borderRadius:"8px",backgroundColor:"#F6F4FF"}},{children:[i("div",e({style:{color:"#4B5563",fontSize:"1rem",lineHeight:"1.5rem",marginBottom:"1rem",fontFamily:"inherit",maxWidth:"90%"}},{children:l})),t("div",e({style:{border:"1px solid #ddd",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.05)"}},{children:[t("div",e({style:{paddingLeft:"12px",marginBottom:"12px",fontFamily:"inherit"}},{children:[i("div",e({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"Proposed Rule"})),i("div",e({style:{fontSize:"0.95rem",color:"#374151",fontFamily:"inherit"}},{children:a}))]})),t("div",e({style:{marginBottom:"12px",paddingLeft:"12px",fontFamily:"inherit"}},{children:[i("div",e({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"When to apply"})),i("div",e({style:{fontSize:"0.9rem",color:"#374151",fontFamily:"inherit"}},{children:d}))]})),t("div",e({style:{paddingLeft:"12px",fontFamily:"inherit"}},{children:[i("div",e({style:{fontSize:"14px",fontWeight:"400",color:"#666F8D",fontFamily:"inherit"}},{children:"When NOT to apply"})),i("div",e({style:{fontSize:"0.9rem",color:"#374151",fontFamily:"inherit"}},{children:s}))]}))]}))]}))},l=function(n){var r=n.label,o=n.onToggle,l=n.isSelected,a=n.disabled;return t("div",e({style:{display:"inline-flex",alignItems:"center",cursor:a?"not-allowed":"pointer",margin:"8px 24px 8px 0",userSelect:"none",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"14px",color:a?"#9ca3af":"#000000de",verticalAlign:"middle",opacity:a&&!l?.6:1},onClick:function(){return!a&&o(r,!l)}},{children:[i("div",e({style:{width:"18px",height:"18px",borderRadius:"4px",border:l?"none":"2px solid ".concat(a?"#e5e7eb":"#cfd8dc"),backgroundColor:l?a?"#90caf9":"#2661eb":"transparent",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",transition:"all 0.2s ease",color:"white",flexShrink:0}},{children:l&&i("svg",e({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})),i("span",{children:r})]}))},a=function(t){t.node;var o=t.className,l=t.children,a=t.handleStream,d=t.onAction,s=t.disabled,c=n(t,["node","className","children","handleStream","onAction","disabled"]),f=r(l);return i("button",e("clickable-button"===o?{className:o,onClick:function(e){e.preventDefault(),s||(d?d(f):a(new KeyboardEvent("keydown",{key:"Enter"}),!1,f))},disabled:s,style:{padding:"0.5rem 1rem",margin:"0.5rem 0.5rem 0.5rem 0",backgroundColor:s?"#f3f4f6":"#fbfaff",color:s?"#9ca3af":"#65758c",border:"1px solid ".concat(s?"#e5e7eb":"#bfc6ceff"),borderRadius:"8px",cursor:s?"not-allowed":"pointer",fontSize:"0.85rem",fontWeight:"500",transition:"all 0.2s ease",fontFamily:"Plus Jakarta Sans, sans-serif",display:"inline-block",pointerEvents:s?"none":"auto"},onMouseEnter:function(e){e.currentTarget.style.backgroundColor="#2563EB",e.currentTarget.style.borderColor="#3b82f5",e.currentTarget.style.color="#fff"},onMouseLeave:function(e){e.currentTarget.style.backgroundColor="#fbfaff",e.currentTarget.style.borderColor="#bfc6ceff",e.currentTarget.style.color="#65758c"}}:{className:o},c,{children:l}))},d=function(o){o.node;var a=o.className,d=o.children,s=o.selectedItems,c=o.onToggle,f=o.isSubmitted,p=o.disabled;n(o,["node","className","children","selectedItems","onToggle","isSubmitted","disabled"]);var m=r(d),h=m.trim();return"clickable-box"===a?f?s.includes(h)?t("div",e({style:{display:"inline-flex",alignItems:"center",margin:"4px 24px 4px 0",color:"#2661eb",fontWeight:600,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[i("span",e({style:{marginRight:"6px",fontSize:"16px"}},{children:"✓"}))," ",m]})):null:i(l,{label:m,isSelected:s.includes(h),onToggle:c,disabled:p}):i("span",e({className:a},{children:d}))};export{a as ActionableButton,d as ActionableCheckbox,l as CheckboxSelector,o as RuleDisplay};
|
|
2
|
+
//# sourceMappingURL=CustomComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomComponents.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__rest as e,__assign as t}from"../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as a}from"react/jsx-runtime";import{CognitiveDecisioningCard as i}from"../CognitiveDecisioningCard.js";import n from"../CitationLink.js";import{extractTextFromChildren as r}from"../../helpers/utils.js";var o=function(n){var o=n.className,c=n.children,l=n.openCardIds,s=n.citations,d=n.handleToggleState,m=e(n,["className","children","openCardIds","citations","handleToggleState"]);if("cognitive-card-trigger"===o){var u=r(c),g=m["data-card-id"],h=l.has(g);return a("span",t({style:{display:"inline"}},{children:a(i,{citation:"<ai_reasoning>".concat(u,"</ai_reasoning>"),citations:s,isOpen:h,onToggle:function(){return d(g,!h,"card")}})}))}return a("div",t({className:o},m,{children:c}))},c=function(i){var r,o=i.href,c=i.children,l=i.chatSize,s=i.openCitationIds,d=i.getCitationByNumber,m=i.handleToggleState,u=e(i,["href","children","chatSize","openCitationIds","getCitationByNumber","handleToggleState"]);if(!o)return a("a",t({},u,{children:c}));var g=o.match(/citationNumber=([^&]+)/),h=g?g[1]:null,f=o.match(/uiUniqueId=([^&]+)/),p=f?f[1]:null;if(h){var v=d(h);if(v){var _=(null===(r=v.customMetaData)||void 0===r?void 0:r.citation_type)||"",C=String(_).trim().toLowerCase(),b="rule_book"===C||"advertiser_names"===C,S={headerTitle:v.customMetaData.citation_title,headerBadge:v.customMetaData.citation_relevance_score,footerText:"Referenced from ".concat(v.customMetaData.citation_reference),rightSidebarItems:b?[]:[{label:"Category",value:v.customMetaData.citation_category||""},{label:"Code Name",value:v.customMetaData.citation_source||""}]},T=p?"citation-ui-".concat(p):"citation-".concat(v.id||h),D=s.has(T);return a(n,{citation:v,linkTitle:c,chatSize:l,cardData:S,isOpen:D,onToggle:function(){return m(T,!D,"citation")}},T)}}return a("a",t({href:o,target:"_blank",rel:"noopener noreferrer",className:"md-link inline-flex items-center gap-1 text-purple-700 hover:underline"},u,{children:c}))};export{o as MarkdownDivRenderer,c as MarkdownLinkRenderer};
|
|
2
|
+
//# sourceMappingURL=MarkdownElements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownElements.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as e,__rest as n,__assign as r}from"../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as t,jsxs as o,Fragment as i}from"react/jsx-runtime";import{useState as a,useEffect as l,useCallback as c,useMemo as s}from"react";import{ReactMarkdown as d}from"../../../../node_modules/react-markdown/lib/react-markdown.js";import u from"../../../../node_modules/rehype-raw/lib/index.js";import m from"../../../../node_modules/remark-gfm/index.js";import{RuleDisplay as f,ActionableButton as p,ActionableCheckbox as h}from"./CustomComponents.js";import{extractTextFromChildren as g}from"../../helpers/utils.js";import{MarkdownLinkRenderer as v,MarkdownDivRenderer as b}from"./MarkdownElements.js";var w=function(w){var y=w.index,k=w.content;w.messages;var x=w.handleStream,S=w.scrollToBottom,T=w.isLastMessage,C=w.onSave,j=w.citations,B=w.setChatSize,z=w.chatSize,L=a(k),W=L[0],_=L[1],N=a([]),D=N[0],E=N[1],I=a(!1),M=I[0],A=I[1],P=a(!1),H=P[0],F=P[1],J=a(new Set),K=J[0],q=J[1],O=a(new Set),R=O[0],U=O[1];l(function(){H||_(k)},[k,H]);var Y=c(function(e){var n=e.trim();"save this learning"===n.toLowerCase()&&C?C():x(new KeyboardEvent("keydown",{key:"Enter"}),!1,e),_(function(e){return e.replace(/<button[^>]*class=["']clickable-button["'][^>]*>(.*?)<\/button>/gi,function(e,r){var t=r.trim();return t===n?'<span style="background-color: #2661eb; color: #ffffff; padding: 4px 8px; border-radius: 4px; font-weight: 400; display: inline-block; margin: 2px;">✓ '.concat(t,"</span>"):""})})},[x,C]),G=c(function(e){return j&&j.find(function(n){return n.customMetaData.citation_number&&"Cognitive Decisioning"!==n.customMetaData.citation_title&&String(n.customMetaData.citation_number)===String(e)})||null},[j]),Q=c(function(n,r){var t=Array.isArray(n)?n[0].trim():n.trim();A(!0);var o=["both tiers","all tiers"].includes(t.toLowerCase());E(function(n){var i=e([],n,!0);if(o)i=r?["Both Tiers","Tier 1","Tier 2"]:[];else{r?i.includes(t)||i.push(t):i=i.filter(function(e){return e!==t});var a=i.includes("Tier 1"),l=i.includes("Tier 2");a&&l?i.includes("Both Tiers")||i.push("Both Tiers"):i=i.filter(function(e){return!["Both Tiers","All tiers"].includes(e)})}return i.filter(function(e,n){return i.indexOf(e)===n})}),null==S||S()},[S]),V=c(function(){var e=D.join(" and ");D.some(function(e){return"both tiers"===e.toLowerCase()||"all tiers"===e.toLowerCase()})&&(e="Both Tiers"),x(new KeyboardEvent("keydown",{key:"Enter"}),!1,"".concat(e)),F(!0),A(!1),_(function(e){return e.replace(/<checkbox\s+class=["']clickable-box["'][^>]*>([\s\S]*?)<\/checkbox>/gi,function(e,n){var r=n.trim();return D.includes(r)?e:""})})},[D,x]),X=c(function(e,n,r){var t=function(r){var t=new Set(r);return n?t.add(e):t.delete(e),t};"card"===r?q(function(e){return t(e)}):U(function(e){return t(e)})},[]);l(function(){K.size>0||R.size>0?null==B||B(50):null==B||B(40)},[K,R,B]);var Z=s(function(){return{p:function(e){e.node;var o=n(e,["node"]);return t("span",r({},o,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"inline",fontSize:"1rem",lineHeight:"1.625rem",marginBottom:"1rem",marginTop:"10px"}},{children:null==o?void 0:o.children}))},code:function(e){e.node;var o=n(e,["node"]);return t("span",r({},o,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"inline-flex",fontSize:"1rem",lineHeight:"1.625rem"}},{children:null==o?void 0:o.children}))},ol:function(e){e.node;var o=n(e,["node"]);return t("ol",r({},o,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==o?void 0:o.children}))},ul:function(e){e.node;var o=n(e,["node"]);return t("ul",r({},o,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==o?void 0:o.children}))},rule:function(e){e.node;var r=n(e,["node"]);return t(f,{content:g(r.children)})},button:function(e){var o=e.node,i=e.className,a=n(e,["node","className"]);return t(p,r({node:o,className:i||a.class,handleStream:x,onAction:Y,disabled:!T},a))},checkbox:function(e){var o=e.node,i=e.className,a=n(e,["node","className"]);return t(h,r({node:o,className:i||a.class,selectedItems:D,onToggle:Q,isSubmitted:H,disabled:!T},a))},a:function(e){return t(v,r({},e,{chatSize:z,openCitationIds:R,getCitationByNumber:G,handleToggleState:X}))},div:function(e){return t(b,r({},e,{openCardIds:K,citations:j,handleToggleState:X}))}}},[D,H,x,Y,Q,T,z,j,K,R,G,X]),$=s(function(){return[u]},[]),ee=s(function(){return[m]},[]);return o(i,{children:[t("div",r({style:{lineHeight:"1.625rem",fontSize:"1rem",marginTop:"0.5rem",fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:t(d,r({components:Z,rehypePlugins:$,remarkPlugins:ee},{children:function(e){if(!e)return"";var n=0,r=e.replace(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/gi,function(e,r){var t=r.replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(e,n,r){return"\\[".concat(n,"\\]\\(").concat(r,"\\)")});t=t.replace(/</g,"<").replace(/>/g,">"),n++;var o="card-".concat(n);return'<div class="cognitive-card-trigger" data-card-id="'.concat(o,'">').concat(t,"</div>")}),t=0;return r.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,r,o){var i=r.replace(/\s/g,"%20");if(i.includes("citationNumber=")){t++;var a=i.includes("?")?"&":"?";return"".concat(n).concat(i).concat(a,"uiUniqueId=").concat(t).concat(o)}return"".concat(n).concat(i).concat(o)})}(W)}),y)})),t("div",r({style:{display:"flex",maxWidth:"100%"}},{children:t("div",r({style:{width:"100%"}},{children:(null==D?void 0:D.length)>0&&M&&!H?o("div",r({style:{marginTop:"10px"}},{children:[o("span",{children:["It looks like you've chosen ",D&&0!==D.length?D.some(function(e){return"both tiers"===e.toLowerCase()||"all tiers"===e.toLowerCase()})?"Both Tiers":D.join(", "):"",". Would you like me to proceed?"]}),t("p",{children:t("button",r({style:{padding:"0.5rem 1rem",margin:"0.5rem 0",backgroundColor:"#2661eb",color:"white",border:"none",borderRadius:"8px",cursor:"pointer",fontSize:"0.75rem",fontWeight:"500",fontFamily:"Plus Jakarta Sans, sans-serif"},onClick:V},{children:"Yes"}))})]})):null}))}))]})};export{w as default};
|
|
2
|
+
//# sourceMappingURL=MessageRendering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageRendering.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t}from"../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as e}from"react/jsx-runtime";var o=function(){return e("svg",t({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M12 6L8 10L4 6",stroke:"#4B5563","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})}))};export{o as default};
|
|
2
|
+
//# sourceMappingURL=ChevronDown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronDown.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t}from"../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as e}from"react/jsx-runtime";var o=function(){return e("svg",t({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M12 10L8 6L4 10",stroke:"#4B5563","stroke-width":"1.33333","stroke-linecap":"round","stroke-linejoin":"round"})}))};export{o as default};
|
|
2
|
+
//# sourceMappingURL=ChevronUp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronUp.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as C}from"../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as i,jsx as e}from"react/jsx-runtime";var l=function(){return i("svg",C({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("g",C({"clip-path":"url(#clip0_2637_70886)"},{children:e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3622 0.880771C9.78474 0.00965691 7.9285 -0.207804 6.19243 0.27513C4.45636 0.758063 2.97905 1.90284 2.07804 3.4634C1.17703 5.02396 0.92425 6.87573 1.37402 8.62068C1.82379 10.3656 2.94022 11.8645 4.48333 12.7951V15.2888C4.48333 15.3826 4.5018 15.4755 4.5377 15.5621C4.5736 15.6488 4.62621 15.7275 4.69254 15.7938C4.75886 15.8602 4.83761 15.9128 4.92427 15.9487C5.01093 15.9846 5.10381 16.0031 5.19761 16.0031C5.29141 16.0031 5.3843 15.9846 5.47096 15.9487C5.55762 15.9128 5.63636 15.8602 5.70269 15.7938C5.76902 15.7275 5.82163 15.6488 5.85753 15.5621C5.89342 15.4755 5.9119 15.3826 5.9119 15.2888V12.3745C5.91142 12.243 5.87496 12.1142 5.80646 12.002C5.73796 11.8898 5.64004 11.7984 5.52333 11.7379C4.66017 11.2977 3.92992 10.6355 3.40777 9.81928C2.88563 9.00309 2.59045 8.06249 2.55262 7.09431C2.5148 6.12613 2.73571 5.16536 3.19259 4.31093C3.64948 3.4565 4.32583 2.73928 5.15202 2.2331C5.97821 1.72693 6.92438 1.45011 7.89311 1.43113C8.86184 1.41215 9.81813 1.6517 10.6635 2.12512C11.5089 2.59854 12.2128 3.28872 12.7028 4.1246C13.1928 4.96048 13.4512 5.91186 13.4513 6.88077V11.3653C13.4513 11.4732 13.4085 11.5767 13.3322 11.653C13.2559 11.7293 13.1524 11.7722 13.0445 11.7722H10.8022C10.6127 11.7722 10.4311 11.8475 10.2971 11.9814C10.1632 12.1154 10.0879 12.297 10.0879 12.4865V15.2888C10.0879 15.4782 10.1632 15.6599 10.2971 15.7938C10.4311 15.9278 10.6127 16.0031 10.8022 16.0031C10.9916 16.0031 11.1733 15.9278 11.3073 15.7938C11.4412 15.6599 11.5165 15.4782 11.5165 15.2888V13.2008H13.0445C13.2855 13.2008 13.5242 13.1533 13.7469 13.0611C13.9695 12.9688 14.1719 12.8336 14.3423 12.6632C14.5128 12.4928 14.6479 12.2904 14.7402 12.0677C14.8324 11.845 14.8799 11.6064 14.8799 11.3653V6.88191C14.8797 5.65928 14.5536 4.4588 13.9353 3.40402C13.3171 2.34924 12.4289 1.47828 11.3622 0.880771ZM6.14276 3.5402C6.9417 3.07967 7.87523 2.90934 8.78534 3.05804C9.69545 3.20674 10.5262 3.66533 11.137 4.3562C11.5485 4.82134 11.4342 5.48991 11.0113 5.87049C9.7679 6.99391 7.70733 8.44991 5.65933 8.99277C5.13818 9.12991 4.56676 8.87849 4.3759 8.34134C4.06349 7.46086 4.06914 6.49879 4.39187 5.62204C4.7146 4.74528 5.33405 4.00801 6.14276 3.5402Z",fill:"#6D28D9"})})),e("defs",{children:e("clipPath",C({id:"clip0_2637_70886"},{children:e("rect",{width:"16",height:"16",fill:"white"})}))})]}))};export{l as default};
|
|
2
|
+
//# sourceMappingURL=CognitiveDecisioning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveDecisioning.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|