@e-llm-studio/citation 0.0.226 → 0.0.228
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/BPACitationRenderer/BPACitationRenderer.js +2 -0
- package/dist/cjs/features/BPACitationRenderer/BPACitationRenderer.js.map +1 -0
- package/dist/cjs/features/BPACitationRenderer/citationTypes.js +2 -0
- package/dist/cjs/features/BPACitationRenderer/citationTypes.js.map +1 -0
- package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
- package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js +1 -1
- package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
- package/dist/cjs/features/DualCitation/RuleBookCitationApiComponent.js +2 -0
- package/dist/cjs/features/DualCitation/RuleBookCitationApiComponent.js.map +1 -0
- package/dist/cjs/features/DualCitation/RuleBookCitationComponent.js +2 -0
- package/dist/cjs/features/DualCitation/RuleBookCitationComponent.js.map +1 -0
- package/dist/cjs/features/DualCitation/SourceBQDataCompnent.js +2 -0
- package/dist/cjs/features/DualCitation/SourceBQDataCompnent.js.map +1 -0
- package/dist/cjs/features/DualCitation/SourceBQDataCompnent.module.css.js +2 -0
- package/dist/cjs/features/DualCitation/SourceBQDataCompnent.module.css.js.map +1 -0
- package/dist/cjs/features/InstantLearningCitation/InstantLearningCitationComponent.js +1 -1
- package/dist/cjs/features/SplitterCitations/SplitterCitationsComponent.js +1 -1
- package/dist/cjs/features/SplitterCitations/icons/icons.js +2 -0
- package/dist/cjs/features/SplitterCitations/icons/icons.js.map +1 -0
- package/dist/cjs/features/TextualGuidelines/TextualGuideLinesComponent.js +1 -1
- package/dist/cjs/features/TextualGuidelines/TextualGuidelines.module.css.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/BPACitationRenderer/BPACitationRenderer.js +2 -0
- package/dist/features/BPACitationRenderer/BPACitationRenderer.js.map +1 -0
- package/dist/features/BPACitationRenderer/citationTypes.js +2 -0
- package/dist/features/BPACitationRenderer/citationTypes.js.map +1 -0
- package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
- package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js +1 -1
- package/dist/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
- package/dist/features/DualCitation/RuleBookCitationApiComponent.js +2 -0
- package/dist/features/DualCitation/RuleBookCitationApiComponent.js.map +1 -0
- package/dist/features/DualCitation/RuleBookCitationComponent.js +2 -0
- package/dist/features/DualCitation/RuleBookCitationComponent.js.map +1 -0
- package/dist/features/DualCitation/SourceBQDataCompnent.js +2 -0
- package/dist/features/DualCitation/SourceBQDataCompnent.js.map +1 -0
- package/dist/features/DualCitation/SourceBQDataCompnent.module.css.js +2 -0
- package/dist/features/DualCitation/SourceBQDataCompnent.module.css.js.map +1 -0
- package/dist/features/InstantLearningCitation/InstantLearningCitationComponent.js +1 -1
- package/dist/features/SplitterCitations/SplitterCitationsComponent.js +1 -1
- package/dist/features/SplitterCitations/icons/icons.js +2 -0
- package/dist/features/SplitterCitations/icons/icons.js.map +1 -0
- package/dist/features/TextualGuidelines/TextualGuideLinesComponent.js +1 -1
- package/dist/features/TextualGuidelines/TextualGuidelines.module.css.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.d.ts +5 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts +229 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRendererTest.d.ts +6 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRendererTest.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/DualRuleBookBqCitationTest.d.ts +4 -0
- package/dist/types/src/features/BPACitationRenderer/DualRuleBookBqCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/DualRuleBookGptCitationTest.d.ts +4 -0
- package/dist/types/src/features/BPACitationRenderer/DualRuleBookGptCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/ILRuleBookCitationTest.d.ts +4 -0
- package/dist/types/src/features/BPACitationRenderer/ILRuleBookCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/citationTypes.d.ts +15 -0
- package/dist/types/src/features/BPACitationRenderer/citationTypes.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.d.ts +2 -0
- package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.d.ts.map +1 -1
- package/dist/types/src/features/DualCitation/RuleBookCitationApiComponent.d.ts +20 -0
- package/dist/types/src/features/DualCitation/RuleBookCitationApiComponent.d.ts.map +1 -0
- package/dist/types/src/features/DualCitation/RuleBookCitationComponent.d.ts +31 -0
- package/dist/types/src/features/DualCitation/RuleBookCitationComponent.d.ts.map +1 -0
- package/dist/types/src/features/DualCitation/SourceBQDataCompnent.d.ts +36 -0
- package/dist/types/src/features/DualCitation/SourceBQDataCompnent.d.ts.map +1 -0
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationComponent.d.ts +15 -2
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationComponent.d.ts.map +1 -1
- package/dist/types/src/features/InstantLearningCitation/InstantLearningCitationTest.d.ts.map +1 -1
- package/dist/types/src/features/InstantLearningCitation/types/Types.d.ts +5 -1
- package/dist/types/src/features/InstantLearningCitation/types/Types.d.ts.map +1 -1
- package/dist/types/src/features/SplitterCitations/SplitterCitationsComponent.d.ts +1 -20
- package/dist/types/src/features/SplitterCitations/SplitterCitationsComponent.d.ts.map +1 -1
- package/dist/types/src/features/SplitterCitations/icons/icons.d.ts +17 -0
- package/dist/types/src/features/SplitterCitations/icons/icons.d.ts.map +1 -0
- package/dist/types/src/features/SplitterCitations/types.d.ts +78 -0
- package/dist/types/src/features/SplitterCitations/types.d.ts.map +1 -0
- package/dist/types/src/features/TextualGuidelines/TextualGuideLinesComponent.d.ts +9 -1
- package/dist/types/src/features/TextualGuidelines/TextualGuideLinesComponent.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js +0 -2
- package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js.map +0 -1
- package/dist/features/ParentCitationComponent/ParentCitationComponent.js +0 -2
- package/dist/features/ParentCitationComponent/ParentCitationComponent.js.map +0 -1
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts +0 -128
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts.map +0 -1
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts +0 -13
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as n,__assign as e}from"tslib";import{jsxs as l,jsx as i,Fragment as o}from"react/jsx-runtime";import{useMemo as t,useState as r,useRef as a,useEffect as d}from"react";import{ExternalLink as s,ChevronUp as c,ChevronDown as u}from"lucide-react";import v from"./CognitiveNonWebSearchReasoning.module.css.js";var h=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.filter(Boolean).join(" ")},m=function(n){return n.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(n,l){return n.startsWith("**")&&n.endsWith("**")||n.startsWith("__")&&n.endsWith("__")?i("strong",e({className:v.boldText},{children:n.slice(2,-2)}),l):n})},g=function(g){var p=g.item,f=g.headerTitle;g.index;var x=g.iconsConfig,y=g.DocumentTitle,b=g.previewCallback,N=g.bodyHeight,C=g.disableMaximize,I=void 0!==C&&C,k=g.splitterCustomStyle,T=void 0!==k&&k,H=g.themeTokens,L=g.classNames,B=g.styles,w=p.dataSource,z=p.confidence_score,S=p.trainingDataTitle,A=null==x?void 0:x.ChevronDownIcon,F=null==x?void 0:x.ChevronUpIcon,_=null==x?void 0:x.MaximizeIcon,D=null==x?void 0:x.CloseIcon,R=t(function(){var e=(w?w.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):"").split(/(<highlight>[\s\S]*?<\/highlight>)/g),l=0,i=e.map(function(n){var e=n.startsWith("<highlight>"),i={text:e?n.replace(/<\/?highlight>/g,""):n,isHighlight:e,highlightIndex:e?l:-1};return e&&l++,i}),o=i.filter(function(n){return n.isHighlight}).length,t=[],r=[];return i.forEach(function(e){var l=e.text,i=e.isHighlight,o=e.highlightIndex;l.split("\n").forEach(function(e,l){l>0&&((r.length>0||t.length>0)&&t.push(n([],r,!0)),r=[]),e&&r.push({text:e,isHighlight:i,highlightIndex:o})})}),r.length>0&&t.push(n([],r,!0)),{processedLines:t.map(function(n){var e=n.map(function(n){return n.text}).join(""),l=e.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/);return{segments:n,isListItem:!!l,isHeader:!!e.match(/^(Title|Description|Training-basis):\s*(.*)$/i),indent:(null==l?void 0:l[1])||"",content:(null==l?void 0:l[3])||e}}),totalHighlights:o}},[w]),W=R.processedLines,j=R.totalHighlights,M=r(0),V=M[0],E=M[1],$=a(null),U=a(null),Y=a(null),q=a([]),G=a([]);d(function(){q.current=q.current.slice(0,j),G.current=G.current.slice(0,j)},[j]),d(function(){if(j>0){E(0);var n=setTimeout(function(){var n;null===(n=q.current[0])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50);return function(){return clearTimeout(n)}}},[j]);var J=function(n,e){setTimeout(function(){var l=e?G.current[n]:q.current[n];null==l||l.scrollIntoView({behavior:"smooth",block:"center"})},50)},K=function(n){if(void 0===n&&(n=!1),j){var e=V>0?V-1:j-1;E(e),J(e,n)}},O=function(n){if(void 0===n&&(n=!1),j){var e=V<j-1?V+1:0;E(e),J(e,n)}},P=function(n){var o=n?G:q,t=0;return W.map(function(n,r){n.isHeader&&(t=0),n.isListItem&&(t+=1);var a=function(){return n.segments.map(function(l,t){var r=l.isHighlight&&l.highlightIndex===V,a=l.text;return n.isListItem&&0===t&&(a=l.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),l.isHighlight?i("span",e({ref:function(n){n&&(o.current[l.highlightIndex]=n)},className:h(v.highlight,r?v.highlightActive:void 0,null==L?void 0:L.highlight,r?null==L?void 0:L.highlightActive:void 0),style:r?e(e({},null==B?void 0:B.highlight),null==B?void 0:B.highlightActive):null==B?void 0:B.highlight},{children:m(a)}),t):i("span",{children:m(a)},t)})};return n.isHeader?i("span",e({className:h(v.headerLine,null==L?void 0:L.headerLine),style:null==B?void 0:B.headerLine},{children:a()}),r):n.isListItem?l("span",e({className:h(v.listItemLine,null==L?void 0:L.listItemLine),style:e({paddingLeft:n.indent?"1rem":"0"},null==B?void 0:B.listItemLine)},{children:[l("span",e({className:h(v.listCounter,null==L?void 0:L.listCounter),style:null==B?void 0:B.listCounter},{children:[t,"."]})),i("span",{children:a()})]}),r):i("span",e({className:h(v.blockLine,null==L?void 0:L.blockLine),style:null==B?void 0:B.blockLine},{children:a()}),r)})},Q=function(n){return j>1?l("div",e({className:h(n?v.modalNavContainer:v.navigationContainer,n?null==L?void 0:L.modalNavContainer:null==L?void 0:L.navigationContainer),style:n?null==B?void 0:B.modalNavContainer:null==B?void 0:B.navigationContainer},{children:[F&&i("button",e({onClick:function(){return K(n)},className:h(n?v.modalNavButton:v.navButton,null==L?void 0:L.navButton),style:null==B?void 0:B.navButton},{children:i(F,{className:h(v.navIcon,null==L?void 0:L.navIcon),style:null==B?void 0:B.navIcon})})),l("span",e({className:h(v.navCounter,null==L?void 0:L.navCounter),style:null==B?void 0:B.navCounter},{children:[V+1,"/",j]})),A&&i("button",e({onClick:function(){return O(n)},className:h(n?v.modalNavButton:v.navButton,null==L?void 0:L.navButton),style:null==B?void 0:B.navButton},{children:i(A,{className:h(v.navIcon,null==L?void 0:L.navIcon),style:null==B?void 0:B.navIcon})}))]})):null},X=null!=z?l("span",e({className:h(v.confidenceBadge,null==L?void 0:L.confidenceBadge),style:null==B?void 0:B.confidenceBadge},{children:[i("span",e({className:v.confidenceStar},{children:"✦"})),l("span",e({className:v.confidenceScore},{children:[z,"%"]}))]})):null,Z=T?{backgroundColor:"white",padding:"1rem 1.5rem"}:void 0,nn=l(o,{children:[S&&i("div",e({className:h(v.footer,null==L?void 0:L.footer),style:e(e({},Z),null==B?void 0:B.footer)},{children:i("span",e({className:h(v.trainingTitle,null==L?void 0:L.trainingTitle),style:null==B?void 0:B.trainingTitle},{children:S}))})),y&&i("div",e({className:h(v.modalFooterSource,null==L?void 0:L.modalFooterSource),style:e(e({},Z),null==B?void 0:B.modalFooterSource)},{children:l("button",e({type:"button",onClick:function(){return null==b?void 0:b()},className:h(v.trainingTitleLink,null==L?void 0:L.trainingTitleLink),style:null==B?void 0:B.trainingTitleLink},{children:[y,i(s,{size:16,color:"#2563eb"})]}))}))]});return l(o,{children:[l("div",e({className:h(v.expandedContainer,null==L?void 0:L.expandedContainer),style:e(e(e(e({},H),N?{height:"".concat(N),display:"flex",flexDirection:"column"}:void 0),T?{border:"none",borderRadius:0,marginLeft:"0px",marginTop:"0px"}:void 0),null==B?void 0:B.expandedContainer)},{children:[l("div",e({className:h(v.expandedHeader,null==L?void 0:L.expandedHeader),style:e(e({},T?{backgroundColor:"white",padding:"0.5rem 1.5rem"}:void 0),null==B?void 0:B.expandedHeader)},{children:[i("span",e({className:h(v.headerTitle,null==L?void 0:L.headerTitle),style:null==B?void 0:B.headerTitle},{children:f})),l("div",e({className:h(v.headerActions,null==L?void 0:L.headerActions),style:null==B?void 0:B.headerActions},{children:[T?j>1&&l(o,{children:[l("span",e({style:{fontSize:"12px",color:"#888"}},{children:[V+1," / ",j]})),i("button",e({onClick:function(){return K(!0)},disabled:V<=0,style:{padding:"2px 4px",cursor:V<=0?"not-allowed":"pointer",opacity:V<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(c,{size:14,color:"#64748b"})})),i("button",e({onClick:function(){return O(!0)},disabled:V>=j-1,style:{padding:"2px 4px",cursor:V>=j-1?"not-allowed":"pointer",opacity:V>=j-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(u,{size:14,color:"#64748b"})}))]}):Q(!1),X,!I&&_&&i("button",e({onClick:function(){var n;return null===(n=Y.current)||void 0===n?void 0:n.showModal()},className:h(v.maximizeButton,null==L?void 0:L.maximizeButton),style:null==B?void 0:B.maximizeButton,title:"View fullscreen"},{children:i(_,{className:v.maximizeIcon})}))]}))]})),i("div",e({ref:$,className:h(v.contentArea,null==L?void 0:L.contentArea),style:e(e(e({},N?{flex:1,maxHeight:"none",overflowY:"auto",minHeight:0}:void 0),T?{padding:"1rem 1.5rem"}:void 0),null==B?void 0:B.contentArea)},{children:i("div",e({className:h(v.contentInner,null==L?void 0:L.contentInner),style:null==B?void 0:B.contentInner},{children:P(!1)}))})),nn]})),!I&&i("dialog",e({ref:Y,className:v.modalDialog,onClick:function(n){var e;n.target===Y.current&&(null===(e=Y.current)||void 0===e||e.close())}},{children:l("div",e({className:h(v.modalContainer,null==L?void 0:L.modalContainer),style:null==B?void 0:B.modalContainer},{children:[l("div",e({className:h(v.modalHeader,null==L?void 0:L.modalHeader),style:null==B?void 0:B.modalHeader},{children:[i("span",e({className:h(v.modalHeaderTitle,null==L?void 0:L.modalHeaderTitle),style:null==B?void 0:B.modalHeaderTitle},{children:f})),l("div",e({className:h(v.modalHeaderActions,null==L?void 0:L.modalHeaderActions),style:null==B?void 0:B.modalHeaderActions},{children:[T?j>1&&l(o,{children:[l("span",e({style:{fontSize:"12px",color:"#888"}},{children:[V+1," / ",j]})),i("button",e({onClick:function(){return K(!0)},disabled:V<=0,style:{padding:"2px 4px",cursor:V<=0?"not-allowed":"pointer",opacity:V<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(c,{size:14,color:"#64748b"})})),i("button",e({onClick:function(){return O(!0)},disabled:V>=j-1,style:{padding:"2px 4px",cursor:V>=j-1?"not-allowed":"pointer",opacity:V>=j-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(u,{size:14,color:"#64748b"})}))]}):Q(!0),X,D&&i("button",e({onClick:function(){var n;return null===(n=Y.current)||void 0===n?void 0:n.close()},className:h(v.closeButton,null==L?void 0:L.closeButton),style:null==B?void 0:B.closeButton,title:"Close"},{children:i(D,{className:h(v.closeIcon,null==L?void 0:L.closeIcon),style:null==B?void 0:B.closeIcon})}))]}))]})),i("div",e({ref:U,className:h(v.modalContent,null==L?void 0:L.modalContent),style:null==B?void 0:B.modalContent},{children:i("div",e({className:h(v.modalContentInner,null==L?void 0:L.modalContentInner),style:null==B?void 0:B.modalContentInner},{children:P(!0)}))})),S&&i("div",e({className:h(v.modalFooter,null==L?void 0:L.modalFooter),style:null==B?void 0:B.modalFooter},{children:i("span",e({className:h(v.trainingTitle,null==L?void 0:L.trainingTitle),style:null==B?void 0:B.trainingTitle},{children:S}))})),y&&i("div",e({className:h(v.modalFooterSource,null==L?void 0:L.modalFooterSource),style:null==B?void 0:B.modalFooterSource},{children:l("button",e({type:"button",onClick:function(){var n;null==b||b(),null===(n=Y.current)||void 0===n||n.close()},className:h(v.trainingTitleLink,null==L?void 0:L.trainingTitleLink),style:null==B?void 0:B.trainingTitleLink},{children:[y,i(s,{size:16,color:"#2563eb"})]}))}))]}))}))]})};export{g as default};
|
|
1
|
+
import{__spreadArray as n,__assign as e}from"tslib";import{jsxs as l,jsx as i,Fragment as o}from"react/jsx-runtime";import{useMemo as t,useState as r,useRef as d,useEffect as a}from"react";import{ExternalLink as s,ChevronUp as c,ChevronDown as u}from"lucide-react";import v from"./CognitiveNonWebSearchReasoning.module.css.js";var h=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.filter(Boolean).join(" ")},m=function(n){return n.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(n,l){return n.startsWith("**")&&n.endsWith("**")||n.startsWith("__")&&n.endsWith("__")?i("strong",e({className:v.boldText},{children:n.slice(2,-2)}),l):n})},g=function(g){var p=g.item,f=g.headerTitle;g.index;var x=g.iconsConfig,y=g.DocumentTitle,b=g.previewCallback,N=g.bodyHeight,C=g.disableMaximize,I=void 0!==C&&C,k=g.splitterCustomStyle,T=void 0!==k&&k,H=g.themeTokens,L=g.classNames,B=g.styles,w=p.dataSource,z=p.confidence_score,S=p.trainingDataTitle,A=null==x?void 0:x.ChevronDownIcon,F=null==x?void 0:x.ChevronUpIcon,_=null==x?void 0:x.MaximizeIcon,D=null==x?void 0:x.CloseIcon,R=t(function(){var e=(w?w.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):"").split(/(<highlight>[\s\S]*?<\/highlight>)/g),l=0,i=e.map(function(n){var e=n.startsWith("<highlight>"),i={text:e?n.replace(/<\/?highlight>/g,""):n,isHighlight:e,highlightIndex:e?l:-1};return e&&l++,i}),o=i.filter(function(n){return n.isHighlight}).length,t=[],r=[];return i.forEach(function(e){var l=e.text,i=e.isHighlight,o=e.highlightIndex;l.split("\n").forEach(function(e,l){l>0&&((r.length>0||t.length>0)&&t.push(n([],r,!0)),r=[]),e&&r.push({text:e,isHighlight:i,highlightIndex:o})})}),r.length>0&&t.push(n([],r,!0)),{processedLines:t.map(function(n){var e=n.map(function(n){return n.text}).join(""),l=e.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/);return{segments:n,isListItem:!!l,isHeader:!!e.match(/^(Title|Description|Training-basis):\s*(.*)$/i),indent:(null==l?void 0:l[1])||"",content:(null==l?void 0:l[3])||e}}),totalHighlights:o}},[w]),W=R.processedLines,j=R.totalHighlights,M=r(0),V=M[0],E=M[1],$=d(null),U=d(null),Y=d(null),q=d([]),G=d([]);a(function(){q.current=q.current.slice(0,j),G.current=G.current.slice(0,j)},[j]),a(function(){if(j>0){E(0);var n=setTimeout(function(){var n;null===(n=q.current[0])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50);return function(){return clearTimeout(n)}}},[j]);var J=function(n,e){setTimeout(function(){var l=e?G.current[n]:q.current[n];null==l||l.scrollIntoView({behavior:"smooth",block:"center"})},50)},K=function(n){if(void 0===n&&(n=!1),j){var e=V>0?V-1:j-1;E(e),J(e,n)}},O=function(n){if(void 0===n&&(n=!1),j){var e=V<j-1?V+1:0;E(e),J(e,n)}},P=function(n){var o=n?G:q,t=0;return W.map(function(n,r){n.isHeader&&(t=0),n.isListItem&&(t+=1);var d=function(){return n.segments.map(function(l,t){var r=l.isHighlight&&l.highlightIndex===V,d=l.text;return n.isListItem&&0===t&&(d=l.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),l.isHighlight?i("span",e({ref:function(n){n&&(o.current[l.highlightIndex]=n)},className:h(v.highlight,r?v.highlightActive:void 0,null==L?void 0:L.highlight,r?null==L?void 0:L.highlightActive:void 0),style:r?e(e({},null==B?void 0:B.highlight),null==B?void 0:B.highlightActive):null==B?void 0:B.highlight},{children:m(d)}),t):i("span",{children:m(d)},t)})};return n.isHeader?i("span",e({className:h(v.headerLine,null==L?void 0:L.headerLine),style:null==B?void 0:B.headerLine},{children:d()}),r):n.isListItem?l("span",e({className:h(v.listItemLine,null==L?void 0:L.listItemLine),style:e({paddingLeft:n.indent?"1rem":"0"},null==B?void 0:B.listItemLine)},{children:[l("span",e({className:h(v.listCounter,null==L?void 0:L.listCounter),style:null==B?void 0:B.listCounter},{children:[t,"."]})),i("span",{children:d()})]}),r):i("span",e({className:h(v.blockLine,null==L?void 0:L.blockLine),style:null==B?void 0:B.blockLine},{children:d()}),r)})},Q=function(n){return j>1?l("div",e({className:h(n?v.modalNavContainer:v.navigationContainer,n?null==L?void 0:L.modalNavContainer:null==L?void 0:L.navigationContainer),style:n?null==B?void 0:B.modalNavContainer:null==B?void 0:B.navigationContainer},{children:[F&&i("button",e({onClick:function(){return K(n)},className:h(n?v.modalNavButton:v.navButton,null==L?void 0:L.navButton),style:null==B?void 0:B.navButton},{children:i(F,{className:h(v.navIcon,null==L?void 0:L.navIcon),style:null==B?void 0:B.navIcon})})),l("span",e({className:h(v.navCounter,null==L?void 0:L.navCounter),style:null==B?void 0:B.navCounter},{children:[V+1,"/",j]})),A&&i("button",e({onClick:function(){return O(n)},className:h(n?v.modalNavButton:v.navButton,null==L?void 0:L.navButton),style:null==B?void 0:B.navButton},{children:i(A,{className:h(v.navIcon,null==L?void 0:L.navIcon),style:null==B?void 0:B.navIcon})}))]})):null},X=null!=z?l("span",e({className:h(v.confidenceBadge,null==L?void 0:L.confidenceBadge),style:null==B?void 0:B.confidenceBadge},{children:[i("span",e({className:v.confidenceStar},{children:"✦"})),l("span",e({className:v.confidenceScore},{children:[z,"%"]}))]})):null,Z=T?{backgroundColor:"white",padding:"1rem 1.5rem"}:void 0,nn=l(o,{children:[S&&i("div",e({className:h(v.footer,null==L?void 0:L.footer),style:e(e({},Z),null==B?void 0:B.footer)},{children:i("span",e({className:h(v.trainingTitle,null==L?void 0:L.trainingTitle),style:null==B?void 0:B.trainingTitle},{children:S}))})),y&&i("div",e({className:h(v.modalFooterSource,null==L?void 0:L.modalFooterSource),style:e(e({},Z),null==B?void 0:B.modalFooterSource)},{children:l("button",e({type:"button",onClick:function(){return null==b?void 0:b()},className:h(v.trainingTitleLink,null==L?void 0:L.trainingTitleLink),style:null==B?void 0:B.trainingTitleLink},{children:[y,i(s,{size:16,color:"#2563eb"})]}))}))]});return l(o,{children:[l("div",e({className:h(v.expandedContainer,null==L?void 0:L.expandedContainer),style:e(e(e(e({},H),N?{height:"".concat(N),display:"flex",flexDirection:"column"}:void 0),T?{border:"none",borderRadius:0,marginLeft:"0px",marginTop:"0px"}:void 0),null==B?void 0:B.expandedContainer)},{children:[l("div",e({className:h(v.expandedHeader,null==L?void 0:L.expandedHeader),style:e(e({},T?{backgroundColor:"white",padding:"0.5rem 1.5rem"}:void 0),null==B?void 0:B.expandedHeader)},{children:[i("span",e({className:h(v.headerTitle,null==L?void 0:L.headerTitle),style:null==B?void 0:B.headerTitle},{children:f})),l("div",e({className:h(v.headerActions,null==L?void 0:L.headerActions),style:null==B?void 0:B.headerActions},{children:[T?j>1&&l(o,{children:[l("span",e({style:{fontSize:"12px",color:"#888"}},{children:[V+1," / ",j]})),i("button",e({onClick:function(){return K(!0)},disabled:V<=0,style:{padding:"2px 4px",cursor:V<=0?"not-allowed":"pointer",opacity:V<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(c,{size:14,color:"#64748b"})})),i("button",e({onClick:function(){return O(!0)},disabled:V>=j-1,style:{padding:"2px 4px",cursor:V>=j-1?"not-allowed":"pointer",opacity:V>=j-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(u,{size:14,color:"#64748b"})}))]}):Q(!1),X,!I&&_&&i("button",e({onClick:function(){var n;return null===(n=Y.current)||void 0===n?void 0:n.showModal()},className:h(v.maximizeButton,null==L?void 0:L.maximizeButton),style:null==B?void 0:B.maximizeButton,title:"View fullscreen"},{children:i(_,{className:v.maximizeIcon})}))]}))]})),i("div",e({ref:$,className:h(v.contentArea,null==L?void 0:L.contentArea),style:e(e(e({},N?{flex:1,maxHeight:"300px",overflowY:"scroll",minHeight:0}:void 0),T?{padding:"1rem 1.5rem"}:void 0),null==B?void 0:B.contentArea)},{children:i("div",e({className:h(v.contentInner,null==L?void 0:L.contentInner),style:null==B?void 0:B.contentInner},{children:P(!1)}))})),nn]})),!I&&i("dialog",e({ref:Y,className:v.modalDialog,onClick:function(n){var e;n.target===Y.current&&(null===(e=Y.current)||void 0===e||e.close())}},{children:l("div",e({className:h(v.modalContainer,null==L?void 0:L.modalContainer),style:null==B?void 0:B.modalContainer},{children:[l("div",e({className:h(v.modalHeader,null==L?void 0:L.modalHeader),style:null==B?void 0:B.modalHeader},{children:[i("span",e({className:h(v.modalHeaderTitle,null==L?void 0:L.modalHeaderTitle),style:null==B?void 0:B.modalHeaderTitle},{children:f})),l("div",e({className:h(v.modalHeaderActions,null==L?void 0:L.modalHeaderActions),style:null==B?void 0:B.modalHeaderActions},{children:[T?j>1&&l(o,{children:[l("span",e({style:{fontSize:"12px",color:"#888"}},{children:[V+1," / ",j]})),i("button",e({onClick:function(){return K(!0)},disabled:V<=0,style:{padding:"2px 4px",cursor:V<=0?"not-allowed":"pointer",opacity:V<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(c,{size:14,color:"#64748b"})})),i("button",e({onClick:function(){return O(!0)},disabled:V>=j-1,style:{padding:"2px 4px",cursor:V>=j-1?"not-allowed":"pointer",opacity:V>=j-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:i(u,{size:14,color:"#64748b"})}))]}):Q(!0),X,D&&i("button",e({onClick:function(){var n;return null===(n=Y.current)||void 0===n?void 0:n.close()},className:h(v.closeButton,null==L?void 0:L.closeButton),style:null==B?void 0:B.closeButton,title:"Close"},{children:i(D,{className:h(v.closeIcon,null==L?void 0:L.closeIcon),style:null==B?void 0:B.closeIcon})}))]}))]})),i("div",e({ref:U,className:h(v.modalContent,null==L?void 0:L.modalContent),style:null==B?void 0:B.modalContent},{children:i("div",e({className:h(v.modalContentInner,null==L?void 0:L.modalContentInner),style:null==B?void 0:B.modalContentInner},{children:P(!0)}))})),S&&i("div",e({className:h(v.modalFooter,null==L?void 0:L.modalFooter),style:null==B?void 0:B.modalFooter},{children:i("span",e({className:h(v.trainingTitle,null==L?void 0:L.trainingTitle),style:null==B?void 0:B.trainingTitle},{children:S}))})),y&&i("div",e({className:h(v.modalFooterSource,null==L?void 0:L.modalFooterSource),style:null==B?void 0:B.modalFooterSource},{children:l("button",e({type:"button",onClick:function(){var n;null==b||b(),null===(n=Y.current)||void 0===n||n.close()},className:h(v.trainingTitleLink,null==L?void 0:L.trainingTitleLink),style:null==B?void 0:B.trainingTitleLink},{children:[y,i(s,{size:16,color:"#2563eb"})]}))}))]}))}))]})};export{g as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveInternalgptCoreComponent.js.map
|
package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as a,jsx as n}from"react/jsx-runtime";import{useState as t}from"react";import i from"./CognitiveNonWebSearchReasoning.module.css.js";import o from"./CognitiveInternalgptCoreComponent.js";var r=function(r){var l=r.item,s=r.index,c=r.iconsConfig,m=r.headerTitle,p=void 0===m?"GPT - Gemini 2.5 Flash":m,d=r.previewCallback,h=r.DocumentTitle,u=r.disableMaximize,v=void 0!==u&&u,C=r.splitterCustomStyle,f=void 0!==C&&C,b=null==c?void 0:c.ChevronDownIcon,N=t(!1),x=N[0],g=N[1];return a("div",e({className:i.container},{children:[a("div",e({className:i.itemRow},{children:["number"==typeof s&&a("span",e({className:i.indexNumber},{children:[s+1,"."]})),a("div",e({className:i.textContent},{children:[n("span",{children:null==l?void 0:l.text}),(null==l?void 0:l.paraphrase)&&a("button",e({type:"button",onClick:function(){return g(!x)},className:i.paraphraseButton},{children:[a("span",e({className:i.paraphraseText},{children:[n("span",e({className:i.paraphraseStar},{children:"✦"})),l.paraphrase]})),b&&n(b,{className:"".concat(i.chevronIcon).concat(x?" ".concat(i.chevronIconRotated):"")})]}))]}))]})),x&&n(o,{item:l,headerTitle:p,iconsConfig:c,DocumentTitle:h,previewCallback:d,disableMaximize:v,splitterCustomStyle:f})]}))};export{r as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveInternalgptReasoningComponent.js.map
|
package/dist/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={container:"CognitiveNonWebSearchReasoning-module_container__koQEN",itemRow:"CognitiveNonWebSearchReasoning-module_itemRow__lRmgs",indexNumber:"CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg",textContent:"CognitiveNonWebSearchReasoning-module_textContent__327fx",paraphraseButton:"CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe",paraphraseText:"CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty",paraphraseStar:"CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR",chevronIcon:"CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw",chevronIconRotated:"CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP",expandedContainer:"CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9",expandedHeader:"CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb",headerTitle:"CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI",headerActions:"CognitiveNonWebSearchReasoning-module_headerActions__j1P4u",navigationContainer:"CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG",navButton:"CognitiveNonWebSearchReasoning-module_navButton__aOaMv",navIcon:"CognitiveNonWebSearchReasoning-module_navIcon__uLme4",navCounter:"CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc",confidenceBadge:"CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3",confidenceStar:"CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S",confidenceScore:"CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK",maximizeButton:"CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-",maximizeIcon:"CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez",contentArea:"CognitiveNonWebSearchReasoning-module_contentArea__hVoLL",contentInner:"CognitiveNonWebSearchReasoning-module_contentInner__df-34",footer:"CognitiveNonWebSearchReasoning-module_footer__CNE8q",trainingTitle:"CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh",trainingTitleLink:"CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U",modalDialog:"CognitiveNonWebSearchReasoning-module_modalDialog__eGApe",modalContainer:"CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01",modalHeader:"CognitiveNonWebSearchReasoning-module_modalHeader__qglof",modalHeaderTitle:"CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X",modalHeaderActions:"CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip",modalNavContainer:"CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP",modalNavButton:"CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24",closeButton:"CognitiveNonWebSearchReasoning-module_closeButton__S23zi",closeIcon:"CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG",modalContent:"CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv",modalContentInner:"CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo",modalFooter:"CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn",modalFooterSource:"CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt",blockLine:"CognitiveNonWebSearchReasoning-module_blockLine__FwGYE",headerLine:"CognitiveNonWebSearchReasoning-module_headerLine__0j5p4",listItemLine:"CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O",listCounter:"CognitiveNonWebSearchReasoning-module_listCounter__esNpx",boldText:"CognitiveNonWebSearchReasoning-module_boldText__suAp2",highlight:"CognitiveNonWebSearchReasoning-module_highlight__EMAz5",highlightActive:"CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU",highlightActiveVariant:"CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp",highlightVariant:"CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ",highlightButton:"CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CognitiveNonWebSearchReasoning-module_container__koQEN{display:flex;flex-direction:column;gap:var(--cr-container-gap,.5rem)}.CognitiveNonWebSearchReasoning-module_itemRow__lRmgs{align-items:flex-start;display:flex;font-size:var(--cr-item-row-font-size,.875rem);gap:.5rem}.CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg{color:var(--cr-index-color,#475467);font-weight:var(--cr-index-font-weight,500)}.CognitiveNonWebSearchReasoning-module_textContent__327fx{color:var(--cr-text-content-color,#475467);flex:1;max-width:none}.CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe{align-items:center;background:var(--cr-paraphrase-button-bg,#0000);border:none;border-radius:var(--cr-paraphrase-button-border-radius,.375rem);cursor:pointer;display:inline-flex;gap:.25rem;justify-content:flex-start;padding:.125rem .375rem}.CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty{color:var(--cr-paraphrase-color,#2563eb);font-weight:var(--cr-paraphrase-font-weight,500);text-align:start}.CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR{color:var(--cr-paraphrase-color,#2563eb);padding-right:.25rem}.CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw{color:var(--cr-chevron-color,#2563eb);height:1rem;transition:transform .2s;width:1rem}.CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP{transform:rotate(180deg)}.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{background-color:var(--cr-expanded-container-bg,#0000);border:solid var(--cr-expanded-container-border,#e5e7eb);border-radius:var(--cr-expanded-container-border-radius,.5rem);border-width:1px 1px 2px;margin-left:var(--cr-expanded-container-margin-left,1.5rem);margin-top:var(--cr-expanded-container-margin-top,.5rem);overflow:hidden}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:center;background-color:var(--cr-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:var(--cr-header-padding,.25rem .75rem)}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{color:var(--cr-header-title-color,inherit);font-size:var(--cr-header-title-font-size,.875rem);font-weight:var(--cr-header-title-font-weight,400)}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{align-items:center;background-color:var(--cr-nav-container-bg,#fff);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv:hover{background-color:var(--cr-nav-button-hover-bg,#f3f4f6)}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{color:var(--cr-nav-icon-color,#6b7280);height:var(--cr-nav-icon-size,1.25rem);width:var(--cr-nav-icon-size,1.25rem)}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{color:var(--cr-nav-counter-color,#4b5563);font-size:var(--cr-nav-counter-font-size,.875rem);min-width:2.25rem;text-align:center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{align-items:center;background-color:var(--cr-confidence-badge-bg,#f0fdf4);border:2px solid var(--cr-confidence-badge-border,#3ac894);border-radius:9999px;display:inline-flex;gap:.25rem;padding:.25rem .5rem}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{color:var(--cr-confidence-star-color,#059669);font-size:.75rem}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{color:var(--cr-confidence-score-color,#059669);font-size:.875rem;font-weight:600}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-:hover{background-color:var(--cr-maximize-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{color:var(--cr-maximize-icon-color,#6b7280);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{background-color:var(--cr-content-area-bg,#0000);color:var(--cr-content-area-color,inherit);font-size:var(--cr-content-area-font-size,.875rem);max-height:var(--cr-content-area-max-height,11rem);overflow-y:auto;padding:var(--cr-content-area-padding,.5rem .75rem);scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_contentInner__df-34{line-height:var(--cr-content-line-height,1.5rem)}.CognitiveNonWebSearchReasoning-module_footer__CNE8q{align-items:center;background-color:var(--cr-footer-bg,#f2f4f7);border-top:1px solid var(--cr-footer-border,#e5e7eb);display:flex;justify-content:flex-end}.CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh{color:var(--cr-training-title-color,inherit);font-size:var(--cr-training-title-font-size,.875rem);font-style:italic;font-weight:300}.CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U{align-items:center;background:none;border:none;color:var(--cr-training-link-color,inherit);cursor:pointer;display:inline-flex;font-size:var(--cr-training-link-font-size,.8rem);font-weight:600;gap:.25rem}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe{background:#0000;border:none;left:50%;margin:0;max-height:none;max-width:none;overflow:visible;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%)}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe::backdrop{background-color:#0006}.CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01{background-color:var(--cr-modal-container-bg,#fff);border-radius:var(--cr-modal-container-border-radius,.75rem);box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;max-height:80vh;max-width:900px;overflow:hidden;width:80vw}.CognitiveNonWebSearchReasoning-module_modalHeader__qglof{align-items:center;background-color:var(--cr-modal-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-modal-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:.75rem .5rem .75rem 1rem;width:100%}.CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X{color:var(--cr-modal-header-title-color,inherit);font-size:var(--cr-modal-header-title-font-size,1rem);font-weight:500}.CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP{align-items:center;background-color:var(--cr-modal-nav-container-bg,#f3f4f6);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24:hover{background-color:var(--cr-modal-nav-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi:hover{background-color:var(--cr-close-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG{color:var(--cr-close-icon-color,#4b5563);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv{background-color:var(--cr-modal-content-bg,#0000);color:var(--cr-modal-content-color,inherit);flex:1;font-size:var(--cr-modal-content-font-size,.875rem);overflow-y:auto;padding:.75rem 1rem;scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo{line-height:var(--cr-modal-content-line-height,1.75rem)}.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{justify-content:flex-end;padding:.5rem 1rem}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt,.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{align-items:center;background-color:var(--cr-modal-footer-bg,#f2f4f7);border-top:1px solid var(--cr-modal-footer-border,#e5e7eb);display:flex;flex-shrink:0}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt{justify-content:flex-start;padding:1rem}.CognitiveNonWebSearchReasoning-module_blockLine__FwGYE{display:block}.CognitiveNonWebSearchReasoning-module_headerLine__0j5p4{display:block;font-weight:var(--cr-header-line-font-weight,400)}.CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O{display:block}.CognitiveNonWebSearchReasoning-module_listCounter__esNpx{display:inline-block;font-weight:var(--cr-list-counter-font-weight,500);text-align:left;width:var(--cr-list-counter-width,1.5rem)}.CognitiveNonWebSearchReasoning-module_boldText__suAp2{font-weight:var(--cr-bold-font-weight,600)}.CognitiveNonWebSearchReasoning-module_highlight__EMAz5{background-color:var(--cr-highlight-bg,#fef08a);border-radius:.25rem;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU{background-color:var(--cr-highlight-active-bg,#fde047);border:1px solid var(--cr-highlight-active-border,#eab308);box-shadow:0 1px 2px 0 #0000000d}.CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp{background-color:#e0e7ff;border:1px solid #5c75f4;box-shadow:0 1px 2px 0 #0000000d;color:#6366f1;font-weight:500}.CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ{background-color:#eef2ff;border-radius:.25rem;color:#6366f1;font-weight:500;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb{border:none;cursor:pointer;display:inline;font:inherit}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
1
|
+
var e={container:"CognitiveNonWebSearchReasoning-module_container__koQEN",itemRow:"CognitiveNonWebSearchReasoning-module_itemRow__lRmgs",indexNumber:"CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg",textContent:"CognitiveNonWebSearchReasoning-module_textContent__327fx",paraphraseButton:"CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe",paraphraseText:"CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty",paraphraseStar:"CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR",chevronIcon:"CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw",chevronIconRotated:"CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP",expandedContainer:"CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9",expandedHeader:"CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb",headerTitle:"CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI",headerActions:"CognitiveNonWebSearchReasoning-module_headerActions__j1P4u",navigationContainer:"CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG",navButton:"CognitiveNonWebSearchReasoning-module_navButton__aOaMv",navIcon:"CognitiveNonWebSearchReasoning-module_navIcon__uLme4",navCounter:"CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc",confidenceBadge:"CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3",confidenceStar:"CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S",confidenceScore:"CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK",maximizeButton:"CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-",maximizeIcon:"CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez",contentArea:"CognitiveNonWebSearchReasoning-module_contentArea__hVoLL",contentInner:"CognitiveNonWebSearchReasoning-module_contentInner__df-34",footer:"CognitiveNonWebSearchReasoning-module_footer__CNE8q",trainingTitle:"CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh",trainingTitleLink:"CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U",modalDialog:"CognitiveNonWebSearchReasoning-module_modalDialog__eGApe",modalContainer:"CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01",modalHeader:"CognitiveNonWebSearchReasoning-module_modalHeader__qglof",modalHeaderTitle:"CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X",modalHeaderActions:"CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip",modalNavContainer:"CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP",modalNavButton:"CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24",closeButton:"CognitiveNonWebSearchReasoning-module_closeButton__S23zi",closeIcon:"CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG",modalContent:"CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv",modalContentInner:"CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo",modalFooter:"CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn",modalFooterSource:"CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt",blockLine:"CognitiveNonWebSearchReasoning-module_blockLine__FwGYE",headerLine:"CognitiveNonWebSearchReasoning-module_headerLine__0j5p4",listItemLine:"CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O",listCounter:"CognitiveNonWebSearchReasoning-module_listCounter__esNpx",boldText:"CognitiveNonWebSearchReasoning-module_boldText__suAp2",highlight:"CognitiveNonWebSearchReasoning-module_highlight__EMAz5",highlightActive:"CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU",highlightActiveVariant:"CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp",highlightVariant:"CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ",highlightButton:"CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CognitiveNonWebSearchReasoning-module_container__koQEN{display:flex;flex-direction:column;gap:var(--cr-container-gap,.5rem)}.CognitiveNonWebSearchReasoning-module_itemRow__lRmgs{align-items:flex-start;display:flex;font-size:var(--cr-item-row-font-size,.875rem);gap:.5rem}.CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg{color:var(--cr-index-color,#475467);font-weight:var(--cr-index-font-weight,500)}.CognitiveNonWebSearchReasoning-module_textContent__327fx{color:var(--cr-text-content-color,#475467);flex:1;max-width:none}.CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe{align-items:center;background:var(--cr-paraphrase-button-bg,#0000);border:none;border-radius:var(--cr-paraphrase-button-border-radius,.375rem);cursor:pointer;display:inline-flex;gap:.25rem;justify-content:flex-start;padding:.125rem .375rem}.CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty{color:var(--cr-paraphrase-color,#2563eb);font-weight:var(--cr-paraphrase-font-weight,500);text-align:start}.CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR{color:var(--cr-paraphrase-color,#2563eb);padding-right:.25rem}.CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw{color:var(--cr-chevron-color,#2563eb);height:1rem;transition:transform .2s;width:1rem}.CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP{transform:rotate(180deg)}.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{background-color:var(--cr-expanded-container-bg,#0000);border:solid var(--cr-expanded-container-border,#e5e7eb);border-radius:var(--cr-expanded-container-border-radius,.5rem);border-width:1px 1px 2px;margin-left:var(--cr-expanded-container-margin-left,1.5rem);margin-top:var(--cr-expanded-container-margin-top,.5rem);overflow:hidden}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:center;background-color:var(--cr-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:var(--cr-header-padding,.25rem .75rem)}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{color:var(--cr-header-title-color,inherit);font-size:var(--cr-header-title-font-size,.875rem);font-weight:var(--cr-header-title-font-weight,400)}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{align-items:center;background-color:var(--cr-nav-container-bg,#fff);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv:hover{background-color:var(--cr-nav-button-hover-bg,#f3f4f6)}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{color:var(--cr-nav-icon-color,#6b7280);height:var(--cr-nav-icon-size,1.25rem);width:var(--cr-nav-icon-size,1.25rem)}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{color:var(--cr-nav-counter-color,#4b5563);font-size:var(--cr-nav-counter-font-size,.875rem);min-width:2.25rem;text-align:center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{align-items:center;background-color:var(--cr-confidence-badge-bg,#f0fdf4);border:2px solid var(--cr-confidence-badge-border,#3ac894);border-radius:9999px;display:inline-flex;gap:.25rem;padding:.25rem .5rem}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{color:var(--cr-confidence-star-color,#059669);font-size:.75rem}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{color:var(--cr-confidence-score-color,#059669);font-size:.875rem;font-weight:600}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-:hover{background-color:var(--cr-maximize-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{color:var(--cr-maximize-icon-color,#6b7280);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{background-color:var(--cr-content-area-bg,#0000);color:var(--cr-content-area-color,inherit);font-size:var(--cr-content-area-font-size,.875rem);max-height:var(--cr-content-area-max-height,11rem);overflow-y:auto;padding:var(--cr-content-area-padding,.5rem .75rem);scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_contentInner__df-34{line-height:var(--cr-content-line-height,1.5rem)}.CognitiveNonWebSearchReasoning-module_footer__CNE8q{align-items:center;background-color:var(--cr-footer-bg,#f2f4f7);border-top:1px solid var(--cr-footer-border,#e5e7eb);display:flex;justify-content:flex-end}.CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh{color:var(--cr-training-title-color,inherit);font-size:var(--cr-training-title-font-size,.875rem);font-style:italic;font-weight:300}.CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U{align-items:center;background:none;border:none;color:var(--cr-training-link-color,inherit);cursor:pointer;display:inline-flex;font-size:var(--cr-training-link-font-size,.8rem);font-weight:600;gap:.25rem}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe{background:#0000;border:none;left:50%;margin:0;max-height:300px;max-width:none;overflow:visible;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%)}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe::backdrop{background-color:#0006}.CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01{background-color:var(--cr-modal-container-bg,#fff);border-radius:var(--cr-modal-container-border-radius,.75rem);box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;max-height:80vh;max-width:900px;overflow:hidden;width:80vw}.CognitiveNonWebSearchReasoning-module_modalHeader__qglof{align-items:center;background-color:var(--cr-modal-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-modal-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:.75rem .5rem .75rem 1rem;width:100%}.CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X{color:var(--cr-modal-header-title-color,inherit);font-size:var(--cr-modal-header-title-font-size,1rem);font-weight:500}.CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP{align-items:center;background-color:var(--cr-modal-nav-container-bg,#f3f4f6);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24:hover{background-color:var(--cr-modal-nav-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi:hover{background-color:var(--cr-close-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG{color:var(--cr-close-icon-color,#4b5563);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv{background-color:var(--cr-modal-content-bg,#0000);color:var(--cr-modal-content-color,inherit);flex:1;font-size:var(--cr-modal-content-font-size,.875rem);overflow-y:scroll;padding:.75rem 1rem;scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo{line-height:var(--cr-modal-content-line-height,1.75rem)}.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{justify-content:flex-end;padding:.5rem 1rem}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt,.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{align-items:center;background-color:var(--cr-modal-footer-bg,#f2f4f7);border-top:1px solid var(--cr-modal-footer-border,#e5e7eb);display:flex;flex-shrink:0}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt{justify-content:flex-start;padding:1rem}.CognitiveNonWebSearchReasoning-module_blockLine__FwGYE{display:block}.CognitiveNonWebSearchReasoning-module_headerLine__0j5p4{display:block;font-weight:var(--cr-header-line-font-weight,400)}.CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O{display:block}.CognitiveNonWebSearchReasoning-module_listCounter__esNpx{display:inline-block;font-weight:var(--cr-list-counter-font-weight,500);text-align:left;width:var(--cr-list-counter-width,1.5rem)}.CognitiveNonWebSearchReasoning-module_boldText__suAp2{font-weight:var(--cr-bold-font-weight,600)}.CognitiveNonWebSearchReasoning-module_highlight__EMAz5{background-color:var(--cr-highlight-bg,#fef08a);border-radius:.25rem;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU{background-color:var(--cr-highlight-active-bg,#fde047);border:1px solid var(--cr-highlight-active-border,#eab308);box-shadow:0 1px 2px 0 #0000000d}.CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp{background-color:#e0e7ff;border:1px solid #5c75f4;box-shadow:0 1px 2px 0 #0000000d;color:#6366f1;font-weight:500}.CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ{background-color:#eef2ff;border-radius:.25rem;color:#6366f1;font-weight:500;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb{border:none;cursor:pointer;display:inline;font:inherit}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveNonWebSearchReasoning.module.css.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as n}from"tslib";var e=function(t){return t.endsWith("/")?t.slice(0,-1):t};function o(t){var n;return null!==(n=null==t?void 0:t.toLowerCase().includes("json"))&&void 0!==n&&n}function r(o,r){return t(this,void 0,void 0,function(){var t,i,l;return n(this,function(n){switch(n.label){case 0:return t=o.startsWith("gs://")?o:"gs://".concat(o),i=e(r),[4,fetch("".concat(i,"/gcs/get-signed-url/"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({gsutil_url:t})})];case 1:if(!(l=n.sent()).ok)throw new Error("Failed to get signed URL: ".concat(l.statusText));return[4,l.json()];case 2:return[2,n.sent()]}})})}function i(o,r){var i,l,s,c,a;return t(this,void 0,void 0,function(){var t,u,d,v;return n(this,function(n){switch(n.label){case 0:return t=e(r),u=o.startsWith("gs://")?o.replace("gs://",""):o,[4,fetch("".concat(t,"/gcs/get-file-content"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({file_path:u})})];case 1:if(!(d=n.sent()).ok)throw new Error("Failed to fetch file content: ".concat(d.statusText));return[4,d.json()];case 2:return v=n.sent(),[2,null!==(a=null!==(s=null!==(l=null===(i=null==v?void 0:v.responseData)||void 0===i?void 0:i.content)&&void 0!==l?l:null==v?void 0:v.content)&&void 0!==s?s:null===(c=null==v?void 0:v.responseData)||void 0===c?void 0:c.file_content)&&void 0!==a?a:""]}})})}function l(t,n){var e;try{for(var o=n.split("."),r=t,i=0,l=o;i<l.length;i++){var s=l[i],c=s.match(/^(\w+)\[(\d+)\]$/);if(c){var a=c[1],u=c[2];r=null===(e=null==r?void 0:r[a])||void 0===e?void 0:e[Number(u)]}else r=null==r?void 0:r[s];if(null==r)return null}return r}catch(t){return console.error("Nested extraction error",t),null}}export{i as getFileContent,l as getNestedValue,r as getSignedUrl,o as isJSONFile};
|
|
2
|
+
//# sourceMappingURL=RuleBookCitationApiComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleBookCitationApiComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i,__awaiter as e,__generator as l}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{Loader2 as a}from"lucide-react";import d from"../TextualGuidelines/TextualGuideLinesComponent.js";import{getNestedValue as u,isJSONFile as s,getFileContent as c,getSignedUrl as v}from"./RuleBookCitationApiComponent.js";var f=function(f){var g,p,h,m,x,b,y=f.data,_=f.msg,C=f.citationIndex,D=f.guidelines,k=void 0===D?[]:D,T=f.url,I=f.additionalClassNames,R=f.headerTitle,w=void 0===R?"Rule Book Citation":R,A=f.InternalGptReasoningData,G=void 0===A?[]:A,H=f.IgptHeaderTitle,L=f.isDataProvided,j=void 0!==L&&L,B=f.textualContent,N=f.phraseToHighlight,S=f.onAccordionToggle,E=f.isInternalGptReasoningLoading,U=void 0!==E&&E,O=Math.max((null!==(p=null!==(g=null==y?void 0:y.citationNumber)&&void 0!==g?g:C)&&void 0!==p?p:1)-1,0),q=(null==_?void 0:_.requestId)||(null==_?void 0:_.id)||"",z=o(null),F=z[0],J=z[1],M=o(null),P=M[0],V=M[1],W=o(null),K=W[0],Q=W[1],X=o(!1),Y=X[0],Z=X[1],$=o(null),ii=$[0],ei=$[1];r(function(){var i,e,l,n;if(!j&&!F){if(null===(i=null==y?void 0:y.fileDetails)||void 0===i?void 0:i.file_id)return ei(null),J(y.fileDetails.file_id),void V(y.fileDetails.phrase_to_highlight||null);var t=(null!==(n=null===(l=null===(e=null==_?void 0:_.artifactSearchData)||void 0===e?void 0:e.ruleBookData)||void 0===l?void 0:l.rulebook_citations)&&void 0!==n?n:[])[O];if(!t)return ei("Citation not found at the specified index."),J(null),void V(null);if(!t.file_id)return ei("Citation data is missing file_id."),J(null),void V(null);Q(null),ei(null),J(t.file_id),V(t.phrase_to_highlight||null)}},[j,q,O,F,null===(h=null==y?void 0:y.fileDetails)||void 0===h?void 0:h.file_id,null===(m=null==y?void 0:y.fileDetails)||void 0===m?void 0:m.phrase_to_highlight,null===(b=null===(x=null==_?void 0:_.artifactSearchData)||void 0===x?void 0:x.ruleBookData)||void 0===b?void 0:b.rulebook_citations]),r(function(){if(!j)if(F){var i=Array.isArray(k)?k:Object.values(k||{}).flat();e(void 0,void 0,void 0,function(){var e,n,t,o,r,a,d,f;return l(this,function(l){switch(l.label){case 0:if(!(null==(e=i.find(function(i){return i.id===F}))?void 0:e.gcsUrl))return ei("File URL not found."),[2];l.label=1;case 1:return l.trys.push([1,4,5,6]),Z(!0),ei(null),[4,v(e.gcsUrl,null!=T?T:"")];case 2:if(null==(n=l.sent())?void 0:n.error)throw new Error(n.error);return t=(null===(f=e.name)||void 0===f?void 0:f.toLowerCase().split(".").pop())||"",s(t)?[4,c(e.gcsUrl,null!=T?T:"")]:[2];case 3:if(!(null==(o=l.sent())?void 0:o.trim()))throw new Error("Empty file content returned from the backend.");return r=JSON.parse(o),a=u(r,"data.artifactData.userStorySnapshot[0].value"),Q(a||""),[3,6];case 4:return d=l.sent(),console.error(d),ei(d.message||"An error occurred while loading file contents."),Q(null),[3,6];case 5:return Z(!1),[7];case 6:return[2]}})})}else Q(null)},[j,F,k,T]);var li=!j&&Y,ni=j?N||null:P,ti=j?B||"":(null==K?void 0:K.replace(/\\\./g,"."))||"",oi=j?!!B:!!K;return n("div",i({className:null==I?void 0:I.container,style:{width:"100%",minHeight:"100px",backgroundColor:"transparent"}},{children:[li&&n("div",i({style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px",gap:"8px"}},{children:[t(a,{style:{animation:"spin 1s linear infinite"},size:24}),t("span",{children:"Loading content..."})]})),ii&&!li&&n("div",i({style:{padding:"12px",backgroundColor:"#fee2e2",border:"1px solid #fca5a5",borderRadius:"4px",color:"#991b1b",marginBottom:"12px"}},{children:[t("strong",{children:"Error:"})," ",ii]})),!li&&!ii&&oi&&t("div",i({style:{marginTop:"12px"}},{children:t(d,{TextualGuideLines:ti,HighlightedWords:ni?[ni]:[],InternalGptReasoningData:G,index:0,headerTitle:w,useVariantHighlight:!1,IgptHeaderTitle:H,onAccordionToggle:S,isInternalGptReasoningLoading:U})})),!li&&!ii&&!oi&&t("div",i({style:{padding:"12px",backgroundColor:"#f3f4f6",border:"1px solid #d1d5db",borderRadius:"4px",color:"#6b7280",textAlign:"center"}},{children:"No content available."})),t("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "})]}))};export{f as default};
|
|
2
|
+
//# sourceMappingURL=RuleBookCitationComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleBookCitationComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t,__spreadArray as e}from"tslib";import{jsx as n,Fragment as r,jsxs as a}from"react/jsx-runtime";import{useState as i,useRef as l,useEffect as c}from"react";import{ChevronUp as o,ChevronDown as s,ChevronLeft as u,ChevronRight as d}from"lucide-react";import h from"./SourceBQDataCompnent.module.css.js";function m(t){if(!t)return null;try{var e=t.startsWith("./")?"relative://"+t.slice(2):t.startsWith("?")?"relative://?"+t.slice(1):t,n=e.indexOf("?"),r=-1===n?e:e.slice(0,n),a=-1===n?"":e.slice(n+1),i=r.match(/columnName=([^&?#]+)/i),l=i?decodeURIComponent(i[1]):"",c=new URLSearchParams(a),o=c.get("citation_type")||"",s=c.get("sku_id")||"",u=c.get("citationNumber")||"";return"bq_data"===o&&s?{columnName:l,citationNumber:u,citationType:o,skuId:s}:null}catch(t){return null}}function f(t,e){if(!t||"object"!=typeof t)return null;for(var n=0,r=Object.entries(t);n<r.length;n++){var a=r[n],i=a[0];if(null==(f=a[1])?void 0:f.citations)for(var l=0,c=Object.values(f.citations);l<c.length;l++)for(var o=c[l],s=0,u=Object.values(o);s<u.length;s++){var d=u[s];if(Array.isArray(d)&&d.some(function(t){return String(t).trim()===String(e).trim()}))return[i,f]}}for(var h=0,m=Object.entries(t);h<m.length;h++){var f,v=m[h];i=v[0];if((null==(f=v[1])?void 0:f.citations)&&"string"==typeof f.gap&&"number"==typeof f.score&&"string"==typeof f.reasoning)return[i,f]}return null}var v=function(r){var o=r.bqData,s=r.highlightedColumns,m=l(null),f=i(0),v=f[0],b=f[1],g=Object.keys(o),p=Math.max.apply(Math,e(e([],Object.values(o).map(function(t){return Array.isArray(t)?t.length:1}),!1),[0],!1)),N=g.map(function(t,e){return s.includes(t)?e:-1}).filter(function(t){return-1!==t}),y=N.length>1,j=0===v,O=v===N.length-1;return c(function(){if(0!==N.length&&m.current){var t=setTimeout(function(){var t=m.current;if(t){var e=N[v],n=t.querySelectorAll("thead th")[e];if(n){var r=Math.max(0,n.offsetLeft-t.clientWidth/2+n.offsetWidth/2);t.scrollTo({left:r,behavior:"smooth"})}}},100);return function(){return clearTimeout(t)}}},[v,N]),a("div",t({className:h.tableCard},{children:[a("div",t({className:h.tableHeader},{children:[n("span",t({className:h.tableTitle},{children:"attributes"})),y&&a("div",t({className:h.tableNav},{children:[n("button",t({onClick:function(){return b(function(t){return Math.max(0,t-1)})},disabled:j,className:"".concat(h.navButton," ").concat(j?h.navButtonDisabled:""),"aria-label":"Previous highlighted column"},{children:n(u,{size:14})})),a("span",t({className:h.navStep},{children:[v+1,"/",N.length]})),n("button",t({onClick:function(){return b(function(t){return Math.min(N.length-1,t+1)})},disabled:O,className:"".concat(h.navButton," ").concat(O?h.navButtonDisabled:""),"aria-label":"Next highlighted column"},{children:n(d,{size:14})}))]}))]})),n("div",t({ref:m,className:h.tableScroll},{children:n("div",t({className:h.tableScrollInner},{children:a("table",t({className:h.table},{children:[n("thead",{children:n("tr",t({className:h.tableHeadRow},{children:g.map(function(e){return n("th",t({className:"".concat(h.th," ").concat(s.includes(e)?h.thHighlighted:"")},{children:e}),e)})}))}),n("tbody",t({className:h.tbody},{children:Array.from({length:p}).map(function(e,r){return n("tr",t({className:h.tr},{children:g.map(function(e){var a,i=o[e],l=Array.isArray(i)?i[r]:0===r?i:"";return n("td",t({className:"".concat(h.td," ").concat(s.includes(e)?h.tdHighlighted:"")},{children:(a=l,null==a?"-":"object"==typeof a?JSON.stringify(a):String(a))}),"".concat(e,"-").concat(r))})}),r)})}))]}))}))})),n("div",t({className:h.tableFooter},{children:a("span",t({className:h.tableFooterText},{children:[p," ",1===p?"row":"rows"," from BigQuery"]}))}))]}))},b=function(e){var l,c,u=e.hrefParams,d=e.sourceObj,m=e.children,f=e.defaultOpen,b=e.showChevron,g=void 0===b||b,p=i(null!=f&&f),N=p[0],y=p[1];if(!u||!d)return n(r,{});var j=u.columnName,O=u.citationNumber,S=u.skuId,A=O.split("".concat(S,"-"))[1],C=null!==(c=null===(l=d.citations)||void 0===l?void 0:l[O])&&void 0!==c?c:null,x=C?Object.fromEntries(Object.entries(C).map(function(t){var e=t[0],n=t[1];return[e,Array.isArray(n)?n:[n]]})):null,k=j?[j]:[];return a("span",t({className:h.wrapper},{children:[a("span",t({className:h.trigger,onClick:function(){return y(function(t){return!t})}},{children:[n("span",{children:m}),g&&n("span",t({className:h.triggerChevron},{children:n(N?o:s,{size:12})}))]})),N&&n("div",t({className:h.content},{children:x?n(v,{bqData:x,highlightedColumns:k}):a("div",t({className:h.emptyState},{children:["No data available for citation ",A,"."]}))}))]}))};export{b as SourcesBQCitation,f as findSourceCitation,m as parseSourcesBQHref};
|
|
2
|
+
//# sourceMappingURL=SourceBQDataCompnent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourceBQDataCompnent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={wrapper:"SourceBQDataCompnent-module_wrapper__Ug2Nc",trigger:"SourceBQDataCompnent-module_trigger__OfOZJ",triggerChevron:"SourceBQDataCompnent-module_triggerChevron__BEgjU",content:"SourceBQDataCompnent-module_content__wxAqE",fadeSlideIn:"SourceBQDataCompnent-module_fadeSlideIn__q-iNK",emptyState:"SourceBQDataCompnent-module_emptyState__urOTX",tableCard:"SourceBQDataCompnent-module_tableCard__AHvn8",tableHeader:"SourceBQDataCompnent-module_tableHeader__bcgFi",tableTitle:"SourceBQDataCompnent-module_tableTitle__BhAhV",tableNav:"SourceBQDataCompnent-module_tableNav__sZVYk",navButton:"SourceBQDataCompnent-module_navButton__8lZgb",navButtonDisabled:"SourceBQDataCompnent-module_navButtonDisabled__M1VaD",navStep:"SourceBQDataCompnent-module_navStep__-htGN",tableScroll:"SourceBQDataCompnent-module_tableScroll__Kwztb",tableScrollInner:"SourceBQDataCompnent-module_tableScrollInner__SW95U",table:"SourceBQDataCompnent-module_table__gQ3Rf",tableHeadRow:"SourceBQDataCompnent-module_tableHeadRow__cR-fA",th:"SourceBQDataCompnent-module_th__Dvqyq",thHighlighted:"SourceBQDataCompnent-module_thHighlighted__UM6n7",tbody:"SourceBQDataCompnent-module_tbody__l5CR8",tr:"SourceBQDataCompnent-module_tr__5--et",td:"SourceBQDataCompnent-module_td__dlEeI",tdHighlighted:"SourceBQDataCompnent-module_tdHighlighted__PrYAy",tableFooter:"SourceBQDataCompnent-module_tableFooter__buQN7",tableFooterText:"SourceBQDataCompnent-module_tableFooterText__po2-A"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".SourceBQDataCompnent-module_wrapper__Ug2Nc{display:inline;margin-left:.25rem;vertical-align:initial}.SourceBQDataCompnent-module_trigger__OfOZJ{align-items:center;color:#3b82f6;cursor:pointer;display:inline-flex;font-size:.875rem;font-weight:400}.SourceBQDataCompnent-module_triggerChevron__BEgjU{align-items:center;display:inline-flex;flex-shrink:0;margin-left:.25rem}.SourceBQDataCompnent-module_content__wxAqE{animation:SourceBQDataCompnent-module_fadeSlideIn__q-iNK .2s ease-out;margin-top:.5rem;width:100%}@keyframes SourceBQDataCompnent-module_fadeSlideIn__q-iNK{0%{opacity:0;transform:translateY(-.25rem)}to{opacity:1;transform:translateY(0)}}.SourceBQDataCompnent-module_emptyState__urOTX{background-color:#f9fafb;border:1px solid #e5e7eb;border-radius:.75rem;color:#9ca3af;font-size:.75rem;font-style:italic;padding:1rem;text-align:center}.SourceBQDataCompnent-module_tableCard__AHvn8{background-color:#fff;border:1px solid #e5e7eb;border-radius:.75rem;box-shadow:0 1px 2px #0000000d}.SourceBQDataCompnent-module_tableHeader__bcgFi{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;justify-content:space-between;padding:.5rem .75rem}.SourceBQDataCompnent-module_tableTitle__BhAhV{color:#4b5563;font-size:.75rem;font-weight:600}.SourceBQDataCompnent-module_tableNav__sZVYk{align-items:center;display:flex;gap:.375rem}.SourceBQDataCompnent-module_navButton__8lZgb{align-items:center;border:1px solid #d1d5db;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#6b7280;cursor:pointer;display:flex;height:1.5rem;justify-content:center;transition:background-color .15s ease;width:1.5rem}.SourceBQDataCompnent-module_navButton__8lZgb:hover{background-color:#f9fafb}.SourceBQDataCompnent-module_navButtonDisabled__M1VaD{border-color:#e5e7eb;box-shadow:none;color:#d1d5db;cursor:not-allowed}.SourceBQDataCompnent-module_navButtonDisabled__M1VaD:hover{background-color:initial}.SourceBQDataCompnent-module_navStep__-htGN{color:#6b7280;font-size:.75rem;font-variant-numeric:tabular-nums;font-weight:500}.SourceBQDataCompnent-module_tableScroll__Kwztb{max-height:260px;overflow:auto;width:100%}.SourceBQDataCompnent-module_tableScrollInner__SW95U{display:inline-block;min-width:100%;vertical-align:middle}.SourceBQDataCompnent-module_table__gQ3Rf{border-collapse:collapse;font-size:.75rem;min-width:100%;text-align:left}.SourceBQDataCompnent-module_tableHeadRow__cR-fA{background-color:#f9fafb;border-bottom:1px solid #e5e7eb;position:sticky;top:0;z-index:10}.SourceBQDataCompnent-module_th__Dvqyq{border-right:1px solid #e5e7eb;color:#374151;font-weight:600;min-width:120px;padding:.75rem 1rem;white-space:nowrap}.SourceBQDataCompnent-module_th__Dvqyq:last-child{border-right:none}.SourceBQDataCompnent-module_thHighlighted__UM6n7{background-color:#fef9c3}.SourceBQDataCompnent-module_tbody__l5CR8,.SourceBQDataCompnent-module_tbody__l5CR8 tr+tr{border-top:1px solid #f3f4f6}.SourceBQDataCompnent-module_tr__5--et:hover{background-color:#f9fafb80}.SourceBQDataCompnent-module_td__dlEeI{border-right:1px solid #e5e7eb;color:#4b5563;min-width:120px;padding:.75rem 1rem;vertical-align:top;white-space:normal;word-break:break-word}.SourceBQDataCompnent-module_td__dlEeI:last-child{border-right:none}.SourceBQDataCompnent-module_tdHighlighted__PrYAy{background-color:#fefce8}.SourceBQDataCompnent-module_tableFooter__buQN7{border-top:1px solid #f3f4f6;padding:.5rem .75rem;text-align:right}.SourceBQDataCompnent-module_tableFooterText__po2-A{color:#9ca3af;font-size:.75rem;font-weight:500}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
|
|
2
|
+
//# sourceMappingURL=SourceBQDataCompnent.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourceBQDataCompnent.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useRef as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsx as i}from"react/jsx-runtime";import{useRef as o,useState as t,useMemo as e,useEffect as r}from"react";import{convertILRuleToCognitiveDecisioningData as l}from"./types/Types.js";import{InstantLearningCitation as a}from"./InstantLearningCitation.js";import c from"../CitationRenderer/CitationRenderer.js";import{CitationIcon as d}from"../../assests/icons/CitationsIcon.js";var s=function(s){var u,p,h,v,f,m=s.ilLearning,g=s.ilLearningHighlights,C=void 0===g?[]:g,b=s.comparisonHighlights,x=void 0===b?[]:b,w=s.decisionStrength,y=void 0===w?"":w,I=s.linkTitle,B=s.onCitationToggle,F=s.config,R=o(null),S=t(!1),T=S[0],k=S[1],A=e(function(){return x.flatMap(function(n){return n.attributesToBehighlighted||[]})},[x]),D=e(function(){return m?n(n({},l(n(n({},m),{decision_strength:y}))),{il_learning_highlights:C}):null},[m,C,y]);r(function(){if(T){var n=setTimeout(function(){var n;null===(n=R.current)||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},100);return function(){return clearTimeout(n)}}},[T]);return i("span",n({className:"citation-span",ref:R},{children:i(c,{inLineCitation:!0,citationTitle:I,citationIcon:null!==(u=null==F?void 0:F.citationIcon)&&void 0!==u?u:D?i(d,{}):null,citationComponent:D?i(a,n({},D)):void 0,chevronDownComponent:null!==(p=null==F?void 0:F.chevronDownIcon)&&void 0!==p?p:i(function(){return i("span",n({"aria-hidden":!0,className:"md-chevron",style:{color:D?"#1A847C":"#6D28D9"}},{children:i("svg",n({viewBox:"0 0 20 20",fill:"currentColor"},{children:i("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 0 1 1.06.02L10 10.128l3.71-2.9a.75.75 0 1 1 .92 1.18l-4.2 3.28a.75.75 0 0 1-.92 0l-4.2-3.28a.75.75 0 0 1-.02-1.12z",clipRule:"evenodd"})}))}))},{}),chevronUpComponent:null!==(h=null==F?void 0:F.chevronUpIcon)&&void 0!==h?h:i(function(){return i("span",n({"aria-hidden":!0,className:"md-chevron",style:{color:D?"#1A847C":"#6D28D9"}},{children:i("svg",n({viewBox:"0 0 20 20",fill:"currentColor"},{children:i("path",{fillRule:"evenodd",d:"M14.77 12.79a.75.75 0 0 1-1.06-.02L10 9.872l-3.71 2.9a.75.75 0 1 1-.92-1.18l4.2-3.28a.75.75 0 0 1 .92 0l4.2 3.28a.75.75 0 0 1 .02 1.12z",clipRule:"evenodd"})}))}))},{}),styles:{pillButton:n({fontFamily:'"Inter", sans-serif',background:"transparent",padding:0,margin:0,marginBottom:"2px",fontSize:"12px",lineHeight:"140%",fontWeight:500,color:D?"#1A847C":"rgb(109, 40, 217)",cursor:"pointer",whiteSpace:"nowrap",border:"none",display:"inline-flex",alignItems:"center",gap:"4px",verticalAlign:"middle"},null===(v=null==F?void 0:F.slotStyles)||void 0===v?void 0:v.pillButton),citationContent:n({backgroundColor:"#F5F3FF66",border:"1px solid #A78BFA",borderRadius:"6px",padding:"0.75rem",fontFamily:'"Inter", sans-serif',fontSize:"12px",fontWeight:400,lineHeight:"140%",color:"#1e293b",boxShadow:"none",width:"100%",height:"fit-content",minHeight:"38vh",margin:"0 auto",overflowWrap:"break-word"},null===(f=null==F?void 0:F.slotStyles)||void 0===f?void 0:f.citationContent)},additionalCallbackForPillButton:function(){var n=!T;k(n),B&&B(A,"",n)}})}))};export{s as default};
|
|
2
2
|
//# sourceMappingURL=InstantLearningCitationComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,Fragment as t,jsx as o}from"react/jsx-runtime";import{useState as i,useRef as c,useEffect as a}from"react";import{FileText as r,X as l}from"lucide-react";import d from"./Splitter.module.css.js";var s=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[o("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),o("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},u=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[o("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),o("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[o("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),o("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},v=function(){return o("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:o("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))},C=function(C){var f=C.left,m=C.right,p=C.defaultLeftWidth,g=void 0===p?50:p,w=C.minLeftWidth,N=void 0===w?250:w,x=C.minRightWidth,H=void 0===x?250:x,L=C.className,k=void 0===L?"":L,A=C.height,M=void 0===A?"400px":A,B=C.width,b=void 0===B?"100%":B,z=C.header,F=C.onLeftWidthChange,y=C.openInFullscreen,E=void 0!==y&&y,S=C.onFullscreenClose,V=i(g),D=V[0],R=V[1],O=i(!1),P=O[0],Z=O[1],I=i(!1),T=I[0],W=I[1],j=i(!1),q=j[0],X=j[1],G=i(0),J=G[0],K=G[1],Q=i(0),U=Q[0],Y=Q[1],$=i(E),_=$[0],ee=$[1],ne=c(null),te=c(null),oe=c(null);a(function(){var e=ne.current;e&&(_?(e.showModal(),requestAnimationFrame(function(){if(oe.current){var e=oe.current.getBoundingClientRect().width;Y(e),R(g),W(!1),X(!1)}})):(e.close(),R(g),W(!1),X(!1),null==S||S()))},[_]),a(function(){var e=oe.current;if(e&&_){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){Y(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[_]),a(function(){var e=te.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){K(t.contentRect.width)})});return t.observe(e),K(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var ie=function(e){e.preventDefault(),Z(!0)};a(function(){var e=function(e){if(P){var n=_?oe.current:te.current;if(n){var t=n.getBoundingClientRect(),o=t.width,i=e.clientX-t.left;if(i>=N&&o-i-4>=H)R(i/o*100),null==F||F(i)}}},n=function(){Z(!1)};return P&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[P,_,N,H,F]);var ce=function(){T?(R(50),W(!1)):W(!0)},ae=function(){q?(R(50),X(!1)):X(!0)},re=_?U:J,le=D/100*re,de=re-le-4,se=_?500:250,ue=q?{flex:1}:{width:"".concat(D,"%")},he=!T&&le<=Math.max(N+10,se),ve=!q&&de<=Math.max(H+10,se),Ce=function(e){return e>=80?d.confidenceScoreHigh:e>=60?d.confidenceScoreMedium:d.confidenceScoreLow},fe="number"==typeof M?"".concat(M,"px"):M,me="number"==typeof b?"".concat(b,"px"):b;return n(t,{children:[n("div",e({ref:te,className:"".concat(d.container," ").concat(d.containerHorizontal," ").concat(k),style:{height:fe,width:me}},{children:[z&&n("div",e({className:d.header},{children:[n("div",e({className:d.headerLeft},{children:[z.showDocIcon&&o(r,{className:d.headerIcon}),o("div",e({className:d.headerTitle},{children:z.title&&o("span",e({className:d.headerTitleText},{children:z.title}))}))]})),n("div",e({className:d.headerActions},{children:[void 0!==z.confidenceScore&&n("div",e({className:"".concat(d.confidenceScore," ").concat(Ce(z.confidenceScore))},{children:[o("div",e({style:{width:"16px",height:"16px"}},{children:o(h,{})})),n("div",{children:[Math.round(z.confidenceScore),"%"]})]})),o("button",e({className:d.fullscreenButton,onClick:function(){return ee(!0)},title:"Open fullscreen"},{children:o(v,{})}))]}))]})),n("div",e({className:"".concat(d.contentArea," ").concat(d.contentAreaHorizontal)},{children:[!T&&o("div",e({className:d.panel,style:ue},{children:f})),T&&o("button",e({onClick:ce,className:"".concat(d.expandButton," ").concat(d.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:o(s,{})})),!T&&!q&&n("div",e({onMouseDown:ie,className:"".concat(d.divider," ").concat(d.dividerHorizontal," ").concat(P?d.dividerDragging:d.dividerIdle)},{children:[o("div",{className:"".concat(d.dividerHitArea," ").concat(d.dividerHitAreaHorizontal)}),he&&o("button",e({onClick:function(e){e.stopPropagation(),ce()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse left panel"},{children:o(u,{})})),ve&&o("button",e({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse right panel"},{children:o(s,{})}))]})),!q&&o("div",e({className:d.panel,style:{flex:1}},{children:m})),q&&o("button",e({onClick:ae,className:"".concat(d.expandButton," ").concat(d.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:o(u,{})})),P&&o("div",{className:"".concat(d.dragOverlay," ").concat(d.dragOverlayHorizontal)})]}))]})),o("dialog",e({ref:ne,className:d.dialogOverlay,onClose:function(){return ee(!1)}},{children:n("div",e({ref:oe,className:d.dialogContent},{children:[z&&n("div",e({className:d.header},{children:[n("div",e({className:d.headerLeft},{children:[z.showDocIcon&&o(r,{className:d.headerIcon}),o("div",e({className:d.headerTitle},{children:z.title&&o(t,{children:o("span",e({className:d.headerTitleText},{children:z.title}))})}))]})),n("div",e({className:d.headerActions},{children:[void 0!==z.confidenceScore&&n("div",e({className:"".concat(d.confidenceScore," ").concat(Ce(z.confidenceScore))},{children:[o("div",e({style:{width:"16px",height:"16px"}},{children:o(h,{})})),n("div",{children:[Math.round(z.confidenceScore),"%"]})]})),o("button",e({className:d.fullscreenButton,onClick:function(){return ee(!1)},title:"Close fullscreen"},{children:o(l,{size:20,color:"#5928ed"})}))]}))]})),n("div",e({className:"".concat(d.contentArea," ").concat(d.contentAreaHorizontal," ").concat(d.dialogContentArea)},{children:[!T&&o("div",e({className:d.panel,style:ue},{children:f})),T&&o("button",e({onClick:ce,className:"".concat(d.expandButton," ").concat(d.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:o(s,{})})),!T&&!q&&n("div",e({onMouseDown:ie,className:"".concat(d.divider," ").concat(d.dividerHorizontal," ").concat(P?d.dividerDragging:d.dividerIdle)},{children:[o("div",{className:"".concat(d.dividerHitArea," ").concat(d.dividerHitAreaHorizontal)}),he&&o("button",e({onClick:function(e){e.stopPropagation(),ce()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse left panel"},{children:o(u,{})})),ve&&o("button",e({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse right panel"},{children:o(s,{})}))]})),!q&&o("div",e({className:d.panel,style:{flex:1}},{children:m})),q&&o("button",e({onClick:ae,className:"".concat(d.expandButton," ").concat(d.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:o(u,{})})),P&&o("div",{className:"".concat(d.dragOverlay," ").concat(d.dragOverlayHorizontal)})]}))]}))}))]})};export{C as default};
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n,jsxs as l,Fragment as o}from"react/jsx-runtime";import{useState as i,useRef as t,useEffect as d}from"react";import{FileText as a,X as c}from"lucide-react";import r from"./Splitter.module.css.js";import{AIMagicIcon as u,SidebarOpenIcon as s,SidebarCloseIcon as v,MaximizeIcon as h}from"./icons/icons.js";var f=function(f){var p,m,g,B,N,y,x,C,w,z,A,H,b,P,I=f.left,S=f.right,M=f.defaultLeftWidth,D=void 0===M?50:M,O=f.minLeftWidth,k=void 0===O?250:O,L=f.minRightWidth,R=void 0===L?250:L,T=f.className,E=void 0===T?"":T,F=f.height,j=void 0===F?"400px":F,W=f.width,q=void 0===W?"100%":W,X=f.header,G=f.onLeftWidthChange,J=f.openInFullscreen,K=void 0!==J&&J,Q=f.onFullscreenClose,U=f.fullscreenOnly,V=void 0!==U&&U,Y=f.classNames,Z=f.customStyles,$=f.iconProps,_=i(D),ee=_[0],ne=_[1],le=i(!1),oe=le[0],ie=le[1],te=i(!1),de=te[0],ae=te[1],ce=i(!1),re=ce[0],ue=ce[1],se=i(0),ve=se[0],he=se[1],fe=i(0),pe=fe[0],me=fe[1],ge=i(V||K),Be=ge[0],Ne=ge[1],ye=t(null),xe=t(null),Ce=t(null),we=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.filter(Boolean).join(" ")},ze=null!==(p=null==$?void 0:$.collapse)&&void 0!==p?p:{};d(function(){var e=ye.current;e&&(Be?(e.showModal(),requestAnimationFrame(function(){if(Ce.current){var e=Ce.current.getBoundingClientRect().width;me(e),ne(D),ae(!1),ue(!1)}})):(e.close(),ne(D),ae(!1),ue(!1),null==Q||Q()))},[Be]),d(function(){var e=Ce.current;if(e&&Be){var n,l=new ResizeObserver(function(e){var l=e[0];n=requestAnimationFrame(function(){me(l.contentRect.width)})});return l.observe(e),function(){cancelAnimationFrame(n),l.disconnect()}}},[Be]),d(function(){var e=xe.current;if(e){var n,l=new ResizeObserver(function(e){var l=e[0];n=requestAnimationFrame(function(){he(l.contentRect.width)})});return l.observe(e),he(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),l.disconnect()}}},[]);var Ae=function(e){e.preventDefault(),ie(!0)};d(function(){var e=function(e){if(oe){var n=Be?Ce.current:xe.current;if(n){var l=n.getBoundingClientRect(),o=l.width,i=e.clientX-l.left;if(i>=k&&o-i-4>=R)ne(i/o*100),null==G||G(i)}}},n=function(){ie(!1)};return oe&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[oe,Be,k,R,G]);var He=function(){de?(ne(50),ae(!1)):ae(!0)},be=function(){re?(ne(50),ue(!1)):ue(!0)},Pe=Be?pe:ve,Ie=ee/100*Pe,Se=Pe-Ie-4,Me=Be?500:250,De=re?{flex:1}:{width:"".concat(ee,"%")},Oe=!de&&Ie<=Math.max(k+10,Me),ke=!re&&Se<=Math.max(R+10,Me),Le=function(e){return(null==Z?void 0:Z.confidenceBadge)?"":e>=80?r.confidenceScoreHigh:e>=60?r.confidenceScoreMedium:r.confidenceScoreLow},Re="number"==typeof j?"".concat(j,"px"):j,Te="number"==typeof q?"".concat(q,"px"):q,Ee=n("dialog",e({ref:ye,className:we(r.dialogOverlay,null==Y?void 0:Y.dialogOverlay),style:null==Z?void 0:Z.dialogOverlay,onClose:function(){return Ne(!1)}},{children:l("div",e({ref:Ce,className:we(r.dialogContent,null==Y?void 0:Y.dialogContent),style:null==Z?void 0:Z.dialogContent},{children:[X&&l("div",e({className:we(r.header,null==Y?void 0:Y.header),style:null==Z?void 0:Z.header},{children:[l("div",e({className:r.headerLeft},{children:[X.showDocIcon&&n(a,{className:we(r.headerIcon,null==Y?void 0:Y.headerIcon),style:e(e({},null==Z?void 0:Z.headerIcon),(null===(m=null==$?void 0:$.headerIcon)||void 0===m?void 0:m.color)?{color:$.headerIcon.color}:{})}),n("div",e({className:r.headerTitle},{children:X.title&&n("span",e({className:we(r.headerTitleText,null==Y?void 0:Y.headerTitle),style:null==Z?void 0:Z.headerTitle},{children:X.title}))}))]})),l("div",e({className:we(r.headerActions,null==Y?void 0:Y.headerActions),style:null==Z?void 0:Z.headerActions},{children:[void 0!==X.confidenceScore&&l("div",e({className:we(r.confidenceScore,Le(X.confidenceScore),null==Y?void 0:Y.confidenceBadge),style:null==Z?void 0:Z.confidenceBadge},{children:[n("div",e({style:{width:"16px",height:"16px"}},{children:n(u,{color:null===(g=null==$?void 0:$.magic)||void 0===g?void 0:g.color,size:null===(B=null==$?void 0:$.magic)||void 0===B?void 0:B.size})})),l("div",{children:[Math.round(X.confidenceScore),"%"]})]})),n("button",e({className:we(r.fullscreenButton,null==Y?void 0:Y.fullscreenButton),style:null==Z?void 0:Z.fullscreenButton,onClick:function(){return Ne(!1)},title:"Close fullscreen"},{children:n(c,{size:20,color:null!==(y=null===(N=null==$?void 0:$.close)||void 0===N?void 0:N.color)&&void 0!==y?y:"#5928ed"})}))]}))]})),l("div",e({className:"".concat(r.contentArea," ").concat(r.contentAreaHorizontal," ").concat(r.dialogContentArea)},{children:[!de&&n("div",e({className:we(r.panel,null!==(x=null==Y?void 0:Y.leftPanel)&&void 0!==x?x:null==Y?void 0:Y.panel),style:e(e({},De),null!==(C=null==Z?void 0:Z.leftPanel)&&void 0!==C?C:null==Z?void 0:Z.panel)},{children:I})),de&&n("button",e({onClick:He,className:"".concat(r.expandButton," ").concat(r.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:n(s,e({},ze))})),!de&&!re&&l("div",e({onMouseDown:Ae,className:we(r.divider,r.dividerHorizontal,oe?r.dividerDragging:r.dividerIdle,null==Y?void 0:Y.divider),style:null==Z?void 0:Z.divider},{children:[n("div",{className:"".concat(r.dividerHitArea," ").concat(r.dividerHitAreaHorizontal)}),Oe&&n("button",e({onClick:function(e){e.stopPropagation(),He()},onMouseDown:function(e){return e.stopPropagation()},className:we(r.collapseButton,null==Y?void 0:Y.collapseButton),style:null==Z?void 0:Z.collapseButton,title:"Collapse left panel"},{children:n(v,e({},ze))})),ke&&n("button",e({onClick:function(e){e.stopPropagation(),be()},onMouseDown:function(e){return e.stopPropagation()},className:we(r.collapseButton,null==Y?void 0:Y.collapseButton),style:null==Z?void 0:Z.collapseButton,title:"Collapse right panel"},{children:n(s,e({},ze))}))]})),!re&&n("div",e({className:we(r.panel,null!==(w=null==Y?void 0:Y.rightPanel)&&void 0!==w?w:null==Y?void 0:Y.panel),style:e({flex:1},null!==(z=null==Z?void 0:Z.rightPanel)&&void 0!==z?z:null==Z?void 0:Z.panel)},{children:S})),re&&n("button",e({onClick:be,className:"".concat(r.expandButton," ").concat(r.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:n(v,e({},ze))})),oe&&n("div",{className:"".concat(r.dragOverlay," ").concat(r.dragOverlayHorizontal)})]}))]}))}));return V?Ee:l(o,{children:[l("div",e({ref:xe,className:we(r.container,r.containerHorizontal,E,null==Y?void 0:Y.container),style:e({height:Re,width:Te},null==Z?void 0:Z.container)},{children:[X&&l("div",e({className:we(r.header,null==Y?void 0:Y.header),style:null==Z?void 0:Z.header},{children:[l("div",e({className:r.headerLeft},{children:[X.showDocIcon&&n(a,{className:we(r.headerIcon,null==Y?void 0:Y.headerIcon),style:e(e({},null==Z?void 0:Z.headerIcon),(null===(A=null==$?void 0:$.headerIcon)||void 0===A?void 0:A.color)?{color:$.headerIcon.color}:{})}),n("div",e({className:r.headerTitle},{children:X.title&&n("span",e({className:we(r.headerTitleText,null==Y?void 0:Y.headerTitle),style:null==Z?void 0:Z.headerTitle},{children:X.title}))}))]})),l("div",e({className:we(r.headerActions,null==Y?void 0:Y.headerActions),style:null==Z?void 0:Z.headerActions},{children:[void 0!==X.confidenceScore&&l("div",e({className:we(r.confidenceScore,Le(X.confidenceScore),null==Y?void 0:Y.confidenceBadge),style:null==Z?void 0:Z.confidenceBadge},{children:[n("div",e({style:{width:"16px",height:"16px"}},{children:n(u,{color:null===(H=null==$?void 0:$.magic)||void 0===H?void 0:H.color,size:null===(b=null==$?void 0:$.magic)||void 0===b?void 0:b.size})})),l("div",{children:[Math.round(X.confidenceScore),"%"]})]})),n("button",e({className:we(r.fullscreenButton,null==Y?void 0:Y.fullscreenButton),style:null==Z?void 0:Z.fullscreenButton,onClick:function(){return Ne(!0)},title:"Open fullscreen"},{children:n(h,{color:null===(P=null==$?void 0:$.maximize)||void 0===P?void 0:P.color})}))]}))]})),function(){var o,i,t,d;return l("div",e({className:"".concat(r.contentArea," ").concat(r.contentAreaHorizontal)},{children:[!de&&n("div",e({className:we(r.panel,null!==(o=null==Y?void 0:Y.leftPanel)&&void 0!==o?o:null==Y?void 0:Y.panel),style:e(e({},De),null!==(i=null==Z?void 0:Z.leftPanel)&&void 0!==i?i:null==Z?void 0:Z.panel)},{children:I})),de&&n("button",e({onClick:He,className:we((null==Z?void 0:Z.collapseButton)?"":r.expandButton,r.expandButtonHorizontal,null==Y?void 0:Y.collapseButton),style:null==Z?void 0:Z.collapseButton,title:"Expand left panel (50/50)"},{children:n(s,e({},ze))})),!de&&!re&&l("div",e({onMouseDown:Ae,className:we(r.divider,r.dividerHorizontal,oe?r.dividerDragging:r.dividerIdle,null==Y?void 0:Y.divider),style:null==Z?void 0:Z.divider},{children:[n("div",{className:"".concat(r.dividerHitArea," ").concat(r.dividerHitAreaHorizontal)}),Oe&&n("button",e({onClick:function(e){e.stopPropagation(),He()},onMouseDown:function(e){return e.stopPropagation()},className:we(r.collapseButton,null==Y?void 0:Y.collapseButton),style:null==Z?void 0:Z.collapseButton,title:"Collapse left panel"},{children:n(v,e({},ze))})),ke&&n("button",e({onClick:function(e){e.stopPropagation(),be()},onMouseDown:function(e){return e.stopPropagation()},className:we(r.collapseButton,null==Y?void 0:Y.collapseButton),style:null==Z?void 0:Z.collapseButton,title:"Collapse right panel"},{children:n(s,e({},ze))}))]})),!re&&n("div",e({className:we(r.panel,null!==(t=null==Y?void 0:Y.rightPanel)&&void 0!==t?t:null==Y?void 0:Y.panel),style:e({flex:1},null!==(d=null==Z?void 0:Z.rightPanel)&&void 0!==d?d:null==Z?void 0:Z.panel)},{children:S})),re&&n("button",e({onClick:be,className:we((null==Z?void 0:Z.collapseButton)?"":r.expandButton,r.expandButtonRightHorizontal,null==Y?void 0:Y.collapseButton),style:null==Z?void 0:Z.collapseButton,title:"Expand right panel (50/50)"},{children:n(v,e({},ze))})),oe&&n("div",{className:"".concat(r.dragOverlay," ").concat(r.dragOverlayHorizontal)})]}))}()]})),Ee]})};export{f as default};
|
|
2
2
|
//# sourceMappingURL=SplitterCitationsComponent.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as C}from"tslib";import{jsxs as o,jsx as t}from"react/jsx-runtime";var i=function(i){var r=i.fill,e=void 0===r?"#F8FAFC":r,n=i.stroke,l=void 0===n?"#E0E0E0":n,d=i.arrowStroke,h=void 0===d?"#111827":d;return o("svg",C({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:e,stroke:l}),t("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:h,strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},r=function(i){var r=i.fill,e=void 0===r?"#F8FAFC":r,n=i.stroke,l=void 0===n?"#E0E0E0":n,d=i.arrowStroke,h=void 0===d?"black":d;return o("svg",C({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:e,stroke:l}),t("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:h,strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},e=function(i){var r=i.color,e=void 0===r?"#087443":r,n=i.size,l=void 0===n?14:n;return o("svg",C({xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 12 12",fill:"none"},{children:[t("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:e}),t("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:e})]}))},n=function(o){var i=o.color,r=void 0===i?"#7A5AF8":i;return t("svg",C({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:t("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:r,stroke:r,strokeWidth:"0.5"})}))};export{e as AIMagicIcon,n as MaximizeIcon,r as SidebarCloseIcon,i as SidebarOpenIcon};
|
|
2
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsxs as e,jsx as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as o,useEffect as a}from"react";import{ChevronUp as h,ChevronDown as r,Maximize2 as c,X as d,Loader2 as s}from"lucide-react";import g from"./TextualGuidelines.module.css.js";import u from"../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";var v=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.filter(Boolean).join(" ")},x=function(n){return n.toLowerCase().replace(/[^a-z0-9]/g,"")},m=function(n,e){var i=n.map(x).filter(Boolean),t=e.map(x).filter(Boolean);if(0===i.length||0===t.length)return 0;var l=new Set(i),o=new Set(t),a=0;return l.forEach(function(n){o.has(n)&&a++}),2*a/(l.size+o.size)},I=function(e){var t=0;return e.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(e){var l="bold-".concat(t);return t+=e.length,e.startsWith("**")&&e.endsWith("**")||e.startsWith("__")&&e.endsWith("__")?i("strong",n({className:g.boldText},{children:e.slice(2,-2)}),l):e})},f=function(x){x.index;var f=x.TextualGuideLines,p=x.HighlightedWords,b=x.InternalGptReasoningData,y=x.headerTitle,C=void 0===y?"Textual Guidelines":y,N=x.IgptHeaderTitle,T=void 0===N?"GPT - Gemini 3.1 Flash Lite":N,L=x.useVariantHighlight,k=void 0!==L&&L,w=x.fuzzyThreshold,A=void 0===w?.8:w,B=x.onAccordionToggle,z=x.isInternalGptReasoningLoading,V=void 0!==z&&z,G=x.themeTokens,_=x.classNames,R=x.styles,E=l(0),M=E[0],D=E[1],H=l(new Set),P=H[0],S=H[1],W=o([]),j=[];p.forEach(function(n){(function(n,e,i){void 0===i&&(i=.8);var t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return[];for(var l,o=[],a=/\S+/g;null!==(l=a.exec(n));)o.push({word:l[0],start:l.index,end:l.index+l[0].length});for(var h=t.length,r=[],c=Math.max(1,h-1);c<=h+2;c++)for(var d=0;d<=o.length-c;d++){var s=o.slice(d,d+c),g=m(t,s.map(function(n){return n.word}));g>=i&&r.push({startIndex:s[0].start,endIndex:s[s.length-1].end,score:g})}if(0===r.length)return[];r.sort(function(n,e){return e.score-n.score||e.endIndex-e.startIndex-(n.endIndex-n.startIndex)});for(var u=[],v=function(n){u.some(function(e){return n.startIndex<e.endIndex&&n.endIndex>e.startIndex})||u.push(n)},x=0,I=r;x<I.length;x++)v(I[x]);return u})(f,n,A).forEach(function(n){return j.push(n)})}),j.sort(function(n,e){return n.startIndex-e.startIndex});for(var F=[],K=0,U=j;K<U.length;K++){var q=U[K],J=F.at(-1);(!J||q.startIndex>=J.endIndex)&&F.push(q)}var O=F.map(function(n,e){return{text:f.substring(n.startIndex,n.endIndex),startIndex:n.startIndex,endIndex:n.endIndex,highlightIndex:e}}),Q=O.length;a(function(){Q>0&&(D(0),setTimeout(function(){var n;null===(n=W.current[0])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50))},[Q]);var X,Y,Z,$,nn=function(n,e){S(function(i){var t=new Set(i),l=!t.has(n);return t.has(n)?t.delete(n):t.add(n),null==B||B({highlightIndex:n,phrase:e,isExpanded:l}),t})};return e("div",n({className:v(g.expandedContainer,null==_?void 0:_.container),style:n(n({},G),null==R?void 0:R.container)},{children:[e("div",n({className:v(g.expandedHeader,null==_?void 0:_.header),style:null==R?void 0:R.header},{children:[i("span",n({className:v(g.headerTitle,null==_?void 0:_.headerTitle),style:null==R?void 0:R.headerTitle},{children:C})),i("div",n({className:v(g.headerActions,null==_?void 0:_.headerActions),style:null==R?void 0:R.headerActions},{children:Q>=1&&e(t,{children:[e("span",n({className:v(g.navCounter,null==_?void 0:_.navCounter),style:null==R?void 0:R.navCounter},{children:[M+1," / ",Q]})),i("button",n({onClick:function(){if(0!==Q){var n=M>0?M-1:Q-1;D(n),setTimeout(function(){var e;null===(e=W.current[n])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)}},disabled:M<=0,className:v(g.navButton,null==_?void 0:_.navButtonPrev),style:null==R?void 0:R.navButtonPrev},{children:i(h,{size:14,className:g.navButtonIcon})})),i("button",n({onClick:function(){if(0!==Q){var n=M<Q-1?M+1:0;D(n),setTimeout(function(){var e;null===(e=W.current[n])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50)}},disabled:M>=Q-1,className:v(g.navButton,null==_?void 0:_.navButtonNext),style:null==R?void 0:R.navButtonNext},{children:i(r,{size:14,className:g.navButtonIcon})}))]})}))]})),i("div",n({className:v(g.contentArea,null==_?void 0:_.contentArea),style:null==R?void 0:R.contentArea},{children:i("div",n({className:v(g.contentInner,null==_?void 0:_.contentInner),style:null==R?void 0:R.contentInner},{children:(X=f.split("\n"),Y=0,Z=0,$=[],X.forEach(function(t){var l=Y,o=Y+t.length;Y+=t.length+1;var a=/^(\s*)(-|\*|\d+\.)\s+/.exec(t),x=/^(Title|Description|Training-basis):\s*/i.exec(t);x&&(Z=0),a&&(Z+=1);var m=!!a,p=!!x,y=a?a[0].length:0,C=l+y,N=O.filter(function(n){return n.startIndex<o&&n.endIndex>C}),L="line-".concat(l),w=function(t,l,o,h){p?$.push(i("span",n({className:v(g.headerLine,null==_?void 0:_.headerLine),style:null==R?void 0:R.headerLine},{children:t}),l)):m?$.push(e("span",n({className:v(g.listItemLine,null==_?void 0:_.listItemLine),style:n({paddingLeft:a[1]?"1rem":"0"},null==R?void 0:R.listItemLine)},{children:[o&&e("span",n({className:v(g.listCounter,null==_?void 0:_.listCounter),style:null==R?void 0:R.listCounter},{children:[Z,"."]})),i("span",{children:t})]}),l)):$.push(i("span",n({className:v(g.blockLine,null==_?void 0:_.blockLine),style:null==R?void 0:R.blockLine},{children:t}),l))},A=m&&1===N.length&&N[0].startIndex<=C&&N[0].endIndex>=o;if(0===N.length)w(I(t.substring(y)),L,!0);else if(A){var B=N[0],z=B.highlightIndex===M,G=P.has(B.highlightIndex),E=k?z?"".concat(g.highlightBlockRow," ").concat(g.highlightActiveVariant):"".concat(g.highlightBlockRow," ").concat(g.highlightVariantRow):z?"".concat(g.highlightBlockRow," ").concat(g.highlightActive):g.highlightBlockRow;$.push(e("span",n({ref:function(n){W.current[B.highlightIndex]=n},className:"".concat(g.listItemLine," ").concat(E),role:"button",tabIndex:0,onClick:function(){return nn(B.highlightIndex,B.text)},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||nn(B.highlightIndex,B.text)},style:{paddingLeft:a[1]?"1rem":"0"}},{children:[e("span",n({className:g.listCounter},{children:[Z,"."]})),i("span",{children:I(f.substring(C,o))}),i(G?h:r,{size:12,style:{verticalAlign:"middle",marginLeft:"2px"}})]}),L)),G&&b[B.highlightIndex]?$.push(i("div",n({style:{marginTop:"0.5rem",marginBottom:"0.5rem"}},{children:i(u,{item:n(n({},b[B.highlightIndex]),{confidence_score:void 0}),headerTitle:T||"GPT - Gemini 3.1 Flash Lite",iconsConfig:{ChevronDownIcon:r,ChevronUpIcon:h,MaximizeIcon:c,CloseIcon:d},bodyHeight:"100%",disableMaximize:!0,index:B.highlightIndex})}),"expanded-".concat(B.highlightIndex))):G&&V&&$.push(e("div",n({className:g.loadingContainer},{children:[i(s,{size:16,className:g.spinnerIcon}),i("span",{children:"Loading..."})]}),"loading-".concat(B.highlightIndex)))}else{var D=C,H=[],S=!0,j=N[0],F=j.highlightIndex===M;k?F?"".concat(g.highlight," ").concat(g.highlightActiveVariant):g.highlightVariant:F?"".concat(g.highlight," ").concat(g.highlightActive):g.highlight,m&&j.startIndex;for(var K=function(t){var l=Math.max(t.startIndex,C),a=Math.min(t.endIndex,o);if(l>=a)return"continue";if(l>D){var x=f.substring(D,l);H.push(i("span",{children:I(x)},"t-".concat(D)))}var m=t.highlightIndex===M,p=k?m?v(g.highlight,g.highlightActiveVariant,null==_?void 0:_.highlight,null==_?void 0:_.highlightActiveVariant):v(g.highlightVariant,null==_?void 0:_.highlightVariant):m?v(g.highlight,g.highlightActive,null==_?void 0:_.highlight,null==_?void 0:_.highlightActive):v(g.highlight,null==_?void 0:_.highlight),y=k?m?n(n({},null==R?void 0:R.highlight),null==R?void 0:R.highlightActiveVariant):n({},null==R?void 0:R.highlightVariant):m?n(n({},null==R?void 0:R.highlight),null==R?void 0:R.highlightActive):n({},null==R?void 0:R.highlight),N=P.has(t.highlightIndex);if(H.push(e("span",n({ref:function(n){W.current[t.highlightIndex]=n},className:p,role:"button",tabIndex:0,onClick:function(){return nn(t.highlightIndex,t.text)},onKeyDown:function(n){"Enter"!==n.key&&" "!==n.key||nn(t.highlightIndex,t.text)},style:n({cursor:"pointer"},y)},{children:[f.substring(l,a),i(N?h:r,{size:12,style:{verticalAlign:"middle",marginLeft:"2px"}})]}),"h-".concat(t.highlightIndex))),D=a,N&&b[t.highlightIndex]){var A=S?L:"".concat(L,"-chunk-").concat(l);w(H,A,S),S=!1,H=[],$.push(i("div",n({style:{marginTop:"0.5rem",marginBottom:"0.5rem"}},{children:i(u,{item:n(n({},b[t.highlightIndex]),{confidence_score:void 0}),headerTitle:T||"GPT - Gemini 3.1 Flash Lite",iconsConfig:{ChevronDownIcon:r,ChevronUpIcon:h,MaximizeIcon:c,CloseIcon:d},bodyHeight:"100%",disableMaximize:!0,index:t.highlightIndex})}),"expanded-".concat(t.highlightIndex)))}else N&&V&&(A=S?L:"".concat(L,"-chunk-").concat(l),w(H,A,S),S=!1,H=[],$.push(e("div",n({className:g.loadingContainer},{children:[i(s,{size:16,className:g.spinnerIcon}),i("span",{children:"Loading..."})]}),"loading-".concat(t.highlightIndex))))},U=0,q=N;U<q.length;U++)K(q[U]);if(D<o&&H.push(i("span",{children:I(f.substring(D,o))},"t-end-".concat(o))),H.length>0||S){var J=S?L:"".concat(L,"-tail");w(H,J,S)}}}),$)}))}))]}))};export{f as default};
|
|
2
2
|
//# sourceMappingURL=TextualGuideLinesComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={expandedContainer:"TextualGuidelines-module_expandedContainer__ku2Qy",expandedHeader:"TextualGuidelines-module_expandedHeader__5OOd1",headerTitle:"TextualGuidelines-module_headerTitle__6vpFm",headerActions:"TextualGuidelines-module_headerActions__tAYsZ",navCounter:"TextualGuidelines-module_navCounter__MbQnG",navButton:"TextualGuidelines-module_navButton__wpCGR",navButtonIcon:"TextualGuidelines-module_navButtonIcon__urm3b",contentArea:"TextualGuidelines-module_contentArea__2k4vh",contentInner:"TextualGuidelines-module_contentInner__2uMSz",blockLine:"TextualGuidelines-module_blockLine__f-gTN",headerLine:"TextualGuidelines-module_headerLine__Ic1ja",listItemLine:"TextualGuidelines-module_listItemLine__2E-57",listCounter:"TextualGuidelines-module_listCounter__Ws3UU",boldText:"TextualGuidelines-module_boldText__vZBdP",highlight:"TextualGuidelines-module_highlight__CGXvE",highlightActive:"TextualGuidelines-module_highlightActive__--Ns5",highlightVariant:"TextualGuidelines-module_highlightVariant__7YZ7W",highlightActiveVariant:"TextualGuidelines-module_highlightActiveVariant__6gPK9",highlightButton:"TextualGuidelines-module_highlightButton__zjZxQ"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".TextualGuidelines-module_expandedContainer__ku2Qy{background-color:var(--tg-container-bg,#0000);border:none;display:flex;flex-direction:column;height:100%;margin-left:var(--tg-container-margin-left,1rem)}.TextualGuidelines-module_expandedHeader__5OOd1{align-items:center;background-color:var(--tg-header-bg,#fff);border:var(--tg-header-border,none);display:flex;justify-content:space-between;padding:var(--tg-header-padding,.25rem .75rem)}.TextualGuidelines-module_headerTitle__6vpFm{background-color:var(--tg-header-title-bg,#fff);color:var(--tg-header-title-color,inherit);font-size:var(--tg-header-title-font-size,.875rem);font-weight:var(--tg-header-title-font-weight,400)}.TextualGuidelines-module_headerActions__tAYsZ{align-items:center;display:flex;gap:.5rem}.TextualGuidelines-module_navCounter__MbQnG{color:var(--tg-nav-counter-color,#888);font-size:var(--tg-nav-counter-font-size,12px)}.TextualGuidelines-module_navButton__wpCGR{align-items:center;background:var(--tg-nav-button-bg,#fff);border:1px solid var(--tg-nav-button-border,#ddd);border-radius:var(--tg-nav-button-border-radius,3px);cursor:pointer;display:flex;padding:2px 4px}.TextualGuidelines-module_navButton__wpCGR:disabled{cursor:not-allowed;opacity:.4}.TextualGuidelines-module_navButtonIcon__urm3b{color:var(--tg-nav-button-icon-color,#64748b)}.TextualGuidelines-module_contentArea__2k4vh{background-color:var(--tg-content-bg,#0000);border:1px solid var(--tg-content-border,#eee);border-radius:var(--tg-content-border-radius,4px);color:var(--tg-content-text-color,inherit);flex:1;height:auto;max-height:none;overflow-y:auto;padding:var(--tg-content-padding,1rem)}.TextualGuidelines-module_contentInner__2uMSz{line-height:var(--tg-content-line-height,1.5rem)}.TextualGuidelines-module_blockLine__f-gTN{display:block}.TextualGuidelines-module_headerLine__Ic1ja{display:block;font-weight:var(--tg-header-line-font-weight,400)}.TextualGuidelines-module_listItemLine__2E-57{display:block}.TextualGuidelines-module_listCounter__Ws3UU{display:inline-block;font-weight:var(--tg-list-counter-font-weight,500);text-align:left;width:var(--tg-list-counter-width,1.5rem)}.TextualGuidelines-module_boldText__vZBdP{font-weight:var(--tg-bold-text-font-weight,600)}.TextualGuidelines-module_highlight__CGXvE{background-color:var(--tg-highlight-bg,#fef08a);border-radius:var(--tg-highlight-border-radius,.25rem);color:var(--tg-highlight-color,inherit);padding:0 .125rem;transition:all .2s}.TextualGuidelines-module_highlightActive__--Ns5{background-color:var(--tg-highlight-active-bg,#fde047);border:1px solid var(--tg-highlight-active-border,#eab308);box-shadow:var(--tg-highlight-active-shadow,0 1px 2px 0 #0000000d);color:var(--tg-highlight-active-color,inherit)}.TextualGuidelines-module_highlightVariant__7YZ7W{background-color:var(--tg-highlight-variant-bg,#eef2ff);border-radius:var(--tg-highlight-border-radius,.25rem);color:var(--tg-highlight-variant-color,#6366f1);font-weight:500;padding:0 .125rem;transition:all .2s}.TextualGuidelines-module_highlightActiveVariant__6gPK9{background-color:var(--tg-highlight-variant-active-bg,#e0e7ff);border:1px solid var(--tg-highlight-variant-active-border,#5c75f4);box-shadow:0 1px 2px 0 #0000000d;color:var(--tg-highlight-variant-active-color,#6366f1);font-weight:500}.TextualGuidelines-module_highlightButton__zjZxQ{border:none;cursor:pointer;display:inline;font:inherit}"));const i=document.head||document.getElementsByTagName("head")[0]||document.documentElement;i&&i.appendChild(e)}();export{e as default};
|
|
1
|
+
var e={expandedContainer:"TextualGuidelines-module_expandedContainer__ku2Qy",expandedHeader:"TextualGuidelines-module_expandedHeader__5OOd1",headerTitle:"TextualGuidelines-module_headerTitle__6vpFm",headerActions:"TextualGuidelines-module_headerActions__tAYsZ",navCounter:"TextualGuidelines-module_navCounter__MbQnG",navButton:"TextualGuidelines-module_navButton__wpCGR",navButtonIcon:"TextualGuidelines-module_navButtonIcon__urm3b",contentArea:"TextualGuidelines-module_contentArea__2k4vh",contentInner:"TextualGuidelines-module_contentInner__2uMSz",blockLine:"TextualGuidelines-module_blockLine__f-gTN",headerLine:"TextualGuidelines-module_headerLine__Ic1ja",listItemLine:"TextualGuidelines-module_listItemLine__2E-57",listCounter:"TextualGuidelines-module_listCounter__Ws3UU",highlightBlockRow:"TextualGuidelines-module_highlightBlockRow__SH9zT",highlightVariantRow:"TextualGuidelines-module_highlightVariantRow__rh6pM",boldText:"TextualGuidelines-module_boldText__vZBdP",loadingContainer:"TextualGuidelines-module_loadingContainer__QbqYw",spinnerIcon:"TextualGuidelines-module_spinnerIcon__a8skc",spin:"TextualGuidelines-module_spin__ZXbNj",highlight:"TextualGuidelines-module_highlight__CGXvE",highlightActive:"TextualGuidelines-module_highlightActive__--Ns5",highlightVariant:"TextualGuidelines-module_highlightVariant__7YZ7W",highlightActiveVariant:"TextualGuidelines-module_highlightActiveVariant__6gPK9",highlightButton:"TextualGuidelines-module_highlightButton__zjZxQ"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".TextualGuidelines-module_expandedContainer__ku2Qy{background-color:var(--tg-container-bg,#0000);border:none;display:flex;flex-direction:column;height:100%;margin-left:var(--tg-container-margin-left,1rem)}.TextualGuidelines-module_expandedHeader__5OOd1{align-items:center;background-color:var(--tg-header-bg,#fff);border:var(--tg-header-border,none);display:flex;justify-content:space-between;padding:var(--tg-header-padding,.25rem .75rem)}.TextualGuidelines-module_headerTitle__6vpFm{background-color:var(--tg-header-title-bg,#fff);color:var(--tg-header-title-color,inherit);font-size:var(--tg-header-title-font-size,.875rem);font-weight:var(--tg-header-title-font-weight,400)}.TextualGuidelines-module_headerActions__tAYsZ{align-items:center;display:flex;gap:.5rem}.TextualGuidelines-module_navCounter__MbQnG{color:var(--tg-nav-counter-color,#888);font-size:var(--tg-nav-counter-font-size,12px)}.TextualGuidelines-module_navButton__wpCGR{align-items:center;background:var(--tg-nav-button-bg,#fff);border:1px solid var(--tg-nav-button-border,#ddd);border-radius:var(--tg-nav-button-border-radius,3px);cursor:pointer;display:flex;padding:2px 4px}.TextualGuidelines-module_navButton__wpCGR:disabled{cursor:not-allowed;opacity:.4}.TextualGuidelines-module_navButtonIcon__urm3b{color:var(--tg-nav-button-icon-color,#64748b)}.TextualGuidelines-module_contentArea__2k4vh{background-color:var(--tg-content-bg,#0000);border:1px solid var(--tg-content-border,#eee);border-radius:var(--tg-content-border-radius,4px);color:var(--tg-content-text-color,inherit);flex:1;height:auto;max-height:none;overflow-y:auto;padding:var(--tg-content-padding,1rem)}.TextualGuidelines-module_contentInner__2uMSz{line-height:var(--tg-content-line-height,1.5rem)}.TextualGuidelines-module_blockLine__f-gTN{display:block}.TextualGuidelines-module_headerLine__Ic1ja{display:block;font-weight:var(--tg-header-line-font-weight,400)}.TextualGuidelines-module_listItemLine__2E-57{display:block}.TextualGuidelines-module_listCounter__Ws3UU{display:inline-block;font-weight:var(--tg-list-counter-font-weight,500);text-align:left;width:var(--tg-list-counter-width,1.5rem)}.TextualGuidelines-module_highlightBlockRow__SH9zT{background-color:#fef08a;border-radius:.375rem;cursor:pointer;margin:.125rem 0;padding:.375rem .5rem;transition:all .2s}.TextualGuidelines-module_highlightVariantRow__rh6pM{background-color:#eef2ff;border-radius:.375rem;color:#6366f1;cursor:pointer;font-weight:500;margin:.125rem 0;padding:.375rem .5rem;transition:all .2s}.TextualGuidelines-module_boldText__vZBdP{font-weight:var(--tg-bold-text-font-weight,600)}.TextualGuidelines-module_loadingContainer__QbqYw{align-items:center;color:#6b7280;display:flex;font-size:.875rem;gap:.5rem;margin-bottom:.5rem;margin-top:.5rem;padding:.75rem 1rem}.TextualGuidelines-module_spinnerIcon__a8skc{animation:TextualGuidelines-module_spin__ZXbNj 1s linear infinite}@keyframes TextualGuidelines-module_spin__ZXbNj{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.TextualGuidelines-module_highlight__CGXvE{background-color:var(--tg-highlight-bg,#fef08a);border-radius:var(--tg-highlight-border-radius,.25rem);color:var(--tg-highlight-color,inherit);padding:0 .125rem;transition:all .2s}.TextualGuidelines-module_highlightActive__--Ns5{background-color:var(--tg-highlight-active-bg,#fde047);border:1px solid var(--tg-highlight-active-border,#eab308);box-shadow:var(--tg-highlight-active-shadow,0 1px 2px 0 #0000000d);color:var(--tg-highlight-active-color,inherit)}.TextualGuidelines-module_highlightVariant__7YZ7W{background-color:var(--tg-highlight-variant-bg,#eef2ff);border-radius:var(--tg-highlight-border-radius,.25rem);box-decoration-break:clone;-webkit-box-decoration-break:clone;color:var(--tg-highlight-variant-color,#6366f1);font-weight:500;padding:0 .125rem;transition:all .2s}.TextualGuidelines-module_highlightActiveVariant__6gPK9{background-color:var(--tg-highlight-variant-active-bg,#e0e7ff);border:1px solid var(--tg-highlight-variant-active-border,#5c75f4);box-shadow:0 1px 2px 0 #0000000d;color:var(--tg-highlight-variant-active-color,#6366f1);font-weight:500}.TextualGuidelines-module_highlightButton__zjZxQ{border:none;cursor:pointer;display:inline;font:inherit}"));const i=document.head||document.getElementsByTagName("head")[0]||document.documentElement;i&&i.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=TextualGuidelines.module.css.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CitationOrchestratorProps } from './BPACitationRenderer.types';
|
|
2
|
+
export * from './BPACitationRenderer.types';
|
|
3
|
+
declare const BPACitationRenderer: ({ href, children, isStreaming, onCitationToggle, chatCitationConfig, scannedDocCitationConfig, ruleBookCitationConfig, ilCitationConfig, gptCitationConfig, scannedDocCitationData, ilCitationData, chatCitationData, gptCitationData, webCitationData, imageCitationData, bqCitationData, title, citationIcon, isDualCitationFlag }: CitationOrchestratorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export default BPACitationRenderer;
|
|
5
|
+
//# sourceMappingURL=BPACitationRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BPACitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/BPACitationRenderer/BPACitationRenderer.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,cAAc,6BAA6B,CAAC;AA2D5C,QAAA,MAAM,mBAAmB,yUAoBtB,yBAAyB,mDAuX3B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|