@e-llm-studio/citation 0.0.238 → 0.0.240

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
  3. package/dist/cjs/features/SPBAnalysisPanel/Cognitivereasoningpanel.js +1 -1
  4. package/dist/cjs/features/SPBAnalysisPanel/DependencyGraph.js +1 -1
  5. package/dist/cjs/features/SPBAnalysisPanel/Markdownrenderer.js +1 -1
  6. package/dist/cjs/features/SPBAnalysisPanel/Spbanalysispanel.js +1 -1
  7. package/dist/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
  8. package/dist/features/SPBAnalysisPanel/Cognitivereasoningpanel.js +1 -1
  9. package/dist/features/SPBAnalysisPanel/DependencyGraph.js +1 -1
  10. package/dist/features/SPBAnalysisPanel/Markdownrenderer.js +1 -1
  11. package/dist/features/SPBAnalysisPanel/Spbanalysispanel.js +1 -1
  12. package/dist/types/src/features/ChatCitation/InternalChatCitationRenderer.d.ts.map +1 -1
  13. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +1 -0
  14. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
  15. package/dist/types/src/features/SPBAnalysisPanel/Cognitivereasoningpanel.d.ts +31 -1
  16. package/dist/types/src/features/SPBAnalysisPanel/Cognitivereasoningpanel.d.ts.map +1 -1
  17. package/dist/types/src/features/SPBAnalysisPanel/DependencyGraph.d.ts +25 -0
  18. package/dist/types/src/features/SPBAnalysisPanel/DependencyGraph.d.ts.map +1 -1
  19. package/dist/types/src/features/SPBAnalysisPanel/Markdownrenderer.d.ts +3 -1
  20. package/dist/types/src/features/SPBAnalysisPanel/Markdownrenderer.d.ts.map +1 -1
  21. package/dist/types/src/features/SPBAnalysisPanel/Spbanalysispanel.d.ts +8 -1
  22. package/dist/types/src/features/SPBAnalysisPanel/Spbanalysispanel.d.ts.map +1 -1
  23. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as o,useMemo as t}from"react";import{Box as r}from"@mui/system";import{Typography as l,Chip as a,IconButton as c,Accordion as d,AccordionSummary as s,AccordionDetails as h,Divider as f}from"@mui/material";import m from"@mui/icons-material/Close";import u from"@mui/icons-material/ExpandMore";import{LightbulbOutlined as g,ManageSearchOutlined as p,ChatBubbleOutlineOutlined as x}from"@mui/icons-material";import v from"@mui/icons-material/AutoAwesome";import b from"../ChatCitation/ChatCitationRenderer.js";var y=function(e){var n=document.createElement("div");return n.innerHTML=e,Array.from(n.querySelectorAll("li")).map(function(e){return e.innerHTML})},_=function(){return i(r,e({component:"svg",viewBox:"0 0 24 24",sx:{width:14,height:14,fill:"#5928ed"}},{children:i("path",{d:"M12 2a7 7 0 0 0-4 12.74V17a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.26A7 7 0 0 0 12 2zm-1 19h2v1h-2v-1z"})}))},k=function(k){var S,C=k.open,z=k.onClose,w=k.data,I=o(null),A=I[0],R=I[1],B=t(function(){var e;return A&&w&&null!==(e=w.block_cognitive_citations.find(function(e){return String(e.citation_number)===A}))&&void 0!==e?e:null},[A,w]),W=t(function(){return(null==w?void 0:w.block_cognitive_reasoning_html)?y(w.block_cognitive_reasoning_html):[]},[null==w?void 0:w.block_cognitive_reasoning_html]),D=t(function(){return(null==w?void 0:w.block_cognitive_gap_html)?y(w.block_cognitive_gap_html):[]},[null==w?void 0:w.block_cognitive_gap_html]),M=function(o,t){for(var l,a,c=[],d=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g,s=0,h=0,f=function(){var f=a[1].replace(/^.*\$/,""),m=a[2],u=A===f;a.index>s&&c.push(i("span",{children:o.substring(s,a.index)},"txt-".concat(t,"-").concat(h++))),c.push(n("span",{children:[n("span",e({onClick:function(){return R(function(e){return e===f?null:f})},style:{color:"#2563EB",fontWeight:500,cursor:"pointer",textDecoration:"underline"}},{children:[m,i(x,{sx:{fontSize:"12px",ml:.2}})]})),u&&B&&i(r,e({sx:{maxHeight:"35vh",padding:"6px",overflow:"auto",backgroundColor:"#ffffff",mt:1}},{children:i(b,{showRootContainer:!1,rootContainer:{relevanceScore:null!==(l=null==w?void 0:w.block_cognitive_confidence)&&void 0!==l?l:0,slotStyles:{container:{border:"",paddingLeft:"-20px",color:"black"}}},ruleBookContainer:{title:B.title||B.section_ref||"Rule Book",data:{content:B.content||B.paraphrase||"",highlighted_texts:Array.isArray(B.highlight)?B.highlight:B.highlight?[B.highlight]:[]},slotStyles:{outerContainer:{margin:"0",color:"black",minHeight:"350px"}}},additionalData:{RuleBookDetailedViewVerticallyStacked:!0},reversePanels:!0})}))]},"anchor-".concat(t,"-").concat(f))),s=d.lastIndex};null!==(a=d.exec(o));)f();return s<o.length&&c.push(i("span",{children:o.substring(s)},"txt-end-".concat(t,"-").concat(h++))),c};return C?n(r,e({sx:{width:"min(500px, calc(100vw - 16px))",maxWidth:"calc(100vw - 16px)",maxHeight:"80vh",borderRadius:3,display:"flex",flexDirection:"column",overflow:"hidden",border:"1px solid #e0e0e0",backgroundColor:"#fff"}},{children:[n(r,e({sx:{px:2,py:1,borderBottom:"1px solid #e0e0e0",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0,backgroundColor:"#e9ecfd"}},{children:[n(r,e({display:"flex",alignItems:"center",gap:1},{children:[i(_,{}),i(l,e({fontWeight:500,sx:{fontSize:"0.72rem"}},{children:"Cognitive Decisioning AI"}))]})),n(r,e({display:"flex",alignItems:"center",gap:1},{children:[i(a,{icon:i(v,{sx:{fontSize:12}}),label:"AI Relevance: ".concat(null!==(S=null==w?void 0:w.block_cognitive_confidence)&&void 0!==S?S:0,"%"),size:"small",sx:{fontWeight:500,fontSize:"0.68rem",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ac93f6",height:20,"& .MuiChip-label":{fontSize:"0.68rem",px:.75}}}),i(c,e({size:"small",onClick:z},{children:i(m,{fontSize:"small"})}))]}))]})),n(r,e({sx:{flex:1,overflowY:"auto",p:.5}},{children:[n(d,e({defaultExpanded:!0,disableGutters:!0,elevation:0},{children:[i(s,e({expandIcon:i(u,{})},{children:n(l,e({sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},fontWeight:600},{children:[i(r,e({sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:i(g,{sx:{fontSize:14,color:"#5928ed"}})})),"Decision Making Factors"]}))})),i(h,{children:i(r,e({sx:{padding:0,margin:0}},{children:W.length>0?W.map(function(o,t){return n(r,e({sx:{marginBottom:"6px",display:"flex",gap:1}},{children:[n(l,e({variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem"}},{children:[t+1,"."]})),i(r,e({sx:{flex:1}},{children:i(l,e({variant:"body2",component:"span",sx:{fontSize:"0.75rem"}},{children:M(o,t)}))}))]}),t)}):i(l,e({variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem"}},{children:"No Reasons Found"}))}))})]})),i(f,{}),n(d,e({disableGutters:!0,elevation:0},{children:[i(s,e({expandIcon:i(u,{})},{children:n(l,e({sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},fontWeight:600},{children:[i(r,e({sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:i(p,{sx:{fontSize:14,color:"#5928ed"}})})),"Gaps in Decision"]}))})),i(h,{children:i(r,e({sx:{padding:0,margin:0}},{children:D.length>0?D.map(function(o,t){return n(r,e({sx:{marginBottom:"6px",display:"flex",gap:1}},{children:[n(l,e({variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem"}},{children:[t+1,"."]})),i(l,{variant:"body2",component:"span",sx:{fontSize:"0.75rem"},dangerouslySetInnerHTML:{__html:o}})]}),t)}):i(l,e({variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem"}},{children:"No Gaps Found"}))}))})]}))]}))]})):null};export{k as default};
1
+ import{__assign as n}from"tslib";import{jsxs as i,jsx as e}from"react/jsx-runtime";import{useState as o,useMemo as t}from"react";import{Box as l}from"@mui/system";import{Typography as r,Chip as a,IconButton as c,Accordion as d,AccordionSummary as s,AccordionDetails as u,Divider as h}from"@mui/material";import f from"@mui/icons-material/Close";import m from"@mui/icons-material/ExpandMore";import{LightbulbOutlined as v,ManageSearchOutlined as x,ChatBubbleOutlineOutlined as p}from"@mui/icons-material";import g from"@mui/icons-material/AutoAwesome";import b from"../ChatCitation/ChatCitationRenderer.js";var y=function(n){var i=document.createElement("div");return i.innerHTML=n,Array.from(i.querySelectorAll("li")).map(function(n){return n.innerHTML})},C=function(i){var o=i.style;return e(l,n({component:"svg",viewBox:"0 0 24 24",sx:n({width:14,height:14,fill:"#5928ed"},o)},{children:e("path",{d:"M12 2a7 7 0 0 0-4 12.74V17a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.26A7 7 0 0 0 12 2zm-1 19h2v1h-2v-1z"})}))},_=function(_){var S,k=_.open,z=_.onClose,I=_.data,w=_.styles,A=o(null),B=A[0],R=A[1],D=t(function(){var n;return B&&I&&null!==(n=I.block_cognitive_citations.find(function(n){return String(n.citation_number)===B}))&&void 0!==n?n:null},[B,I]),T=t(function(){return(null==I?void 0:I.block_cognitive_reasoning_html)?y(I.block_cognitive_reasoning_html):[]},[null==I?void 0:I.block_cognitive_reasoning_html]),M=t(function(){return(null==I?void 0:I.block_cognitive_gap_html)?y(I.block_cognitive_gap_html):[]},[null==I?void 0:I.block_cognitive_gap_html]),W=function(o,t){for(var r,a,c,d,s,u,h,f=[],m=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g,v=0,x=0,g=function(){var g=h[1].replace(/^.*\$/,""),y=h[2],C=B===g;h.index>v&&f.push(e("span",{children:o.substring(v,h.index)},"txt-".concat(t,"-").concat(x++))),f.push(i("span",{children:[i("span",n({onClick:function(){return R(function(n){return n===g?null:g})},style:n({color:"#2563EB",fontWeight:500,cursor:"pointer",textDecoration:"underline"},null==w?void 0:w.citationLink)},{children:[y,e(p,{sx:{fontSize:"12px",ml:.2}})]})),C&&D&&e(l,n({sx:n({maxHeight:"35vh",padding:"6px",overflow:"auto",backgroundColor:"#ffffff",mt:1},null==w?void 0:w.citationContainer)},{children:e(b,{showRootContainer:!1,modalContainerStyle:null==w?void 0:w.citationModalContainer,rootContainer:{relevanceScore:null!==(r=null==I?void 0:I.block_cognitive_confidence)&&void 0!==r?r:0,slotStyles:{container:n({border:"",paddingLeft:"-20px",color:null!==(c=null===(a=null==w?void 0:w.textContent)||void 0===a?void 0:a.color)&&void 0!==c?c:"black"},null==w?void 0:w.citationRootContainer)}},ruleBookContainer:{title:D.training_data_title||D.title||D.section_ref||"Rule Book",data:{content:(null===(d=D.data_sources)||void 0===d?void 0:d.join("\n\n"))||D.content||D.paraphrase||"",highlighted_texts:D.paraphrase?Array.isArray(D.paraphrase)?D.paraphrase:[D.paraphrase]:Array.isArray(D.highlight)?D.highlight:D.highlight?[D.highlight]:[]},slotStyles:{title:null==w?void 0:w.citationTitle,body:null==w?void 0:w.citationBody,dataContainer:null==w?void 0:w.citationDataContainer,outerContainer:n({margin:"0",color:null!==(u=null===(s=null==w?void 0:w.textContent)||void 0===s?void 0:s.color)&&void 0!==u?u:"black",minHeight:"350px"},null==w?void 0:w.citationRuleBookContainer)}},additionalData:{RuleBookDetailedViewVerticallyStacked:!0},reversePanels:!0})}))]},"anchor-".concat(t,"-").concat(g))),v=m.lastIndex};null!==(h=m.exec(o));)g();return v<o.length&&f.push(e("span",{children:o.substring(v)},"txt-end-".concat(t,"-").concat(x++))),f};return k?i(l,n({sx:n({width:"min(500px, calc(100vw - 16px))",maxWidth:"calc(100vw - 16px)",maxHeight:"80vh",borderRadius:3,display:"flex",flexDirection:"column",overflow:"hidden",border:"1px solid #e0e0e0",backgroundColor:"#fff",color:"#111827"},null==w?void 0:w.container)},{children:[i(l,n({sx:n({px:2,py:1,borderBottom:"1px solid #e0e0e0",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0,backgroundColor:"#e9ecfd"},null==w?void 0:w.header)},{children:[i(l,n({display:"flex",alignItems:"center",gap:1},{children:[e(C,{style:null==w?void 0:w.headerIcon}),e(r,n({fontWeight:500,sx:n({fontSize:"0.72rem"},null==w?void 0:w.headerTitleText)},{children:"Cognitive Decisioning AI"}))]})),i(l,n({display:"flex",alignItems:"center",gap:1},{children:[e(a,{icon:e(g,{sx:{fontSize:12}}),label:"AI Relevance: ".concat(null!==(S=null==I?void 0:I.block_cognitive_confidence)&&void 0!==S?S:0,"%"),size:"small",sx:n({fontWeight:500,fontSize:"0.68rem",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ac93f6",height:20,"& .MuiChip-label":{fontSize:"0.68rem",px:.75}},null==w?void 0:w.badge)}),e(c,n({size:"small",onClick:z,sx:null==w?void 0:w.closeButton},{children:e(f,{fontSize:"small"})}))]}))]})),i(l,n({sx:n({flex:1,overflowY:"auto",p:.5},null==w?void 0:w.body)},{children:[i(d,n({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:null==w?void 0:w.accordion},{children:[e(s,n({expandIcon:e(m,{}),sx:null==w?void 0:w.accordionSummary},{children:i(r,n({sx:n({display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},null==w?void 0:w.sectionTitle),fontWeight:600},{children:[e(l,n({sx:n({width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},null==w?void 0:w.sectionIcon)},{children:e(v,{sx:{fontSize:14,color:"#5928ed"}})})),"Decision Making Factors"]}))})),e(u,n({sx:null==w?void 0:w.accordionDetails},{children:e(l,n({sx:{padding:0,margin:0}},{children:T.length>0?T.map(function(o,t){return i(l,n({sx:n({marginBottom:"6px",display:"flex",gap:1},null==w?void 0:w.sectionItem)},{children:[i(r,n({variant:"body2",sx:n({fontWeight:500,fontSize:"0.75rem"},null==w?void 0:w.indexText)},{children:[t+1,"."]})),e(l,n({sx:{flex:1}},{children:e(r,n({variant:"body2",component:"span",sx:n({fontSize:"0.75rem"},null==w?void 0:w.textContent)},{children:W(o,t)}))}))]}),t)}):e(r,n({variant:"body2",color:"gray",sx:n({mb:.5,pl:3,fontSize:"0.72rem"},null==w?void 0:w.sectionSubtitle)},{children:"No Reasons Found"}))}))}))]})),e(h,{}),i(d,n({disableGutters:!0,elevation:0,sx:null==w?void 0:w.accordion},{children:[e(s,n({expandIcon:e(m,{}),sx:null==w?void 0:w.accordionSummary},{children:i(r,n({sx:n({display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem"},null==w?void 0:w.sectionTitle),fontWeight:600},{children:[e(l,n({sx:n({width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},null==w?void 0:w.sectionIcon)},{children:e(x,{sx:{fontSize:14,color:"#5928ed"}})})),"Gaps in Decision"]}))})),e(u,n({sx:null==w?void 0:w.accordionDetails},{children:e(l,n({sx:{padding:0,margin:0}},{children:M.length>0?M.map(function(o,t){return i(l,n({sx:n({marginBottom:"6px",display:"flex",gap:1},null==w?void 0:w.sectionItem)},{children:[i(r,n({variant:"body2",sx:n({fontWeight:500,fontSize:"0.75rem"},null==w?void 0:w.indexText)},{children:[t+1,"."]})),e(r,{variant:"body2",component:"span",sx:n({fontSize:"0.75rem"},null==w?void 0:w.textContent),dangerouslySetInnerHTML:{__html:o}})]}),t)}):e(r,n({variant:"body2",color:"gray",sx:n({mb:.5,pl:3,fontSize:"0.72rem"},null==w?void 0:w.sectionSubtitle)},{children:"No Gaps Found"}))}))}))]}))]}))]})):null};export{_ as default};
2
2
  //# sourceMappingURL=Cognitivereasoningpanel.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as t,Fragment as r,jsx as i}from"react/jsx-runtime";import a,{useState as o,useCallback as l,useRef as c,useMemo as d,useEffect as s}from"react";import f from"@mui/material/Dialog";import u from"@mui/icons-material/Fullscreen";import h from"@mui/icons-material/CloseFullscreen";var p=170,g=48,y=["#ede9fe","#e0f2fe","#fef3c7","#dcfce7","#ffe4e6","#f0fdf4","#fef9c3","#e0e7ff","#fce7f3","#f1f5f9"],v=["#7c3aed","#0284c7","#b45309","#16a34a","#e11d48","#15803d","#a16207","#4338ca","#db2777","#475569"],x=["⚙","◈","⟐","✦","◎","⬡","◇","⊕","✶","◉"],b=["#a78bfa","#7dd3fc","#fbbf24","#86efac","#fda4af","#6ee7b7","#fde047","#a5b4fc","#f9a8d4","#94a3b8"],m=["linear-gradient(135deg,#7c3aed,#a78bfa)","linear-gradient(135deg,#0284c7,#38bdf8)","linear-gradient(135deg,#b45309,#fbbf24)","linear-gradient(135deg,#16a34a,#86efac)","linear-gradient(135deg,#e11d48,#fda4af)","linear-gradient(135deg,#15803d,#6ee7b7)","linear-gradient(135deg,#a16207,#fde047)","linear-gradient(135deg,#4338ca,#a5b4fc)","linear-gradient(135deg,#db2777,#f9a8d4)","linear-gradient(135deg,#475569,#94a3b8)"];function w(t){var r=Array.isArray(null==t?void 0:t.clusters)?t.clusters:[],i=Array.isArray(null==t?void 0:t.nodes)?t.nodes:[],a=Array.isArray(null==t?void 0:t.edges)?t.edges:[],o=function(e,t,r){var i;void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===r&&(r=[]);var a=Array.isArray(e)?e:[],o=Array.isArray(t)?t:[],l=Array.isArray(r)?r:[],c=a.length;if(0===c)return new Map;var d={};a.forEach(function(e,n){d[e.id]=n});var s={},f={};a.forEach(function(e){s[e.id]=[],f[e.id]=[]}),o.forEach(function(e){s[e.source]&&s[e.source].push(e.target),f[e.target]&&f[e.target].push(e.source)});var u={};a.forEach(function(e){u[e.id]=0});for(var h=0;h<c;h++){for(var p=!1,g=0,y=o;g<y.length;g++){var v=y[g],x=(u[v.source]||0)+1;x>(u[v.target]||0)&&x<c&&(u[v.target]=x,p=!0)}if(!p)break}var b={};l.forEach(function(e,n){b[e.id]=n});var m={};l.forEach(function(e){m[e.id]=[]}),a.forEach(function(e){var n;null===(n=m[e.cluster_id])||void 0===n||n.push(e)}),Object.values(m).forEach(function(e){return e.sort(function(e,n){return(u[e.id]||0)-(u[n.id]||0)})});for(var w=new Float64Array(c),M=new Float64Array(c),k=new Float64Array(c),S=new Float64Array(c),C=function(e){var n=null!==(i=b[e.id])&&void 0!==i?i:0;(m[e.id]||[]).forEach(function(e,t){var r=d[e.id];w[r]=520*n+280,M[r]=200*t+120})},z=0,E=l;z<E.length;z++)C(V=E[z]);for(var A=.0015,F=Math.max.apply(Math,n(n([],a.map(function(e){return u[e.id]||0}),!1),[1],!1)),I=new Float64Array(c),W=0;W<c;W++)I[W]=(u[a[W].id]||0)/F*(200*c*.6)+120;for(var R=0;R<350;R++){var D=Math.max(.015,1-R/350),Y=new Float64Array(c),_=new Float64Array(c);for(W=0;W<c;W++)for(var j=W+1;j<c;j++){var P=(Q=w[W]-w[j])*Q+(U=M[W]-M[j])*U;P<400&&(P=(Q=12*(W-j))*Q+(U=8*(W+j))*U);var B=Q/(O=Math.sqrt(P))*(q=48e4/P),L=U/O*q;Y[W]+=B,_[W]+=L,Y[j]-=B,_[j]-=L}for(var X=0,N=o;X<N.length;X++){v=N[X];var T=d[v.source],H=d[v.target];if(void 0!==T&&void 0!==H){var O,q,Q=w[H]-w[T],U=M[H]-M[T];if(!((O=Math.sqrt(Q*Q+U*U))<1))B=Q/O*(q=.004*(O-380)),L=U/O*q,Y[T]+=B,_[T]+=L,Y[H]-=B,_[H]-=L}}var G={},J={},K={};for(W=0;W<c;W++)G[V=a[W].cluster_id]=(G[V]||0)+w[W],J[V]=(J[V]||0)+M[W],K[V]=(K[V]||0)+1;for(W=0;W<c;W++){var V=a[W].cluster_id;Y[W]+=(G[V]/K[V]-w[W])*A,_[W]+=(J[V]/K[V]-M[W])*A}for(W=0;W<c;W++)_[W]+=.002*(I[W]-M[W]);for(W=0;W<c;W++)k[W]=.84*(k[W]+Y[W])*D,S[W]=.84*(S[W]+_[W])*D,w[W]+=k[W],M[W]+=S[W]}for(h=0;h<40;h++){var Z=!1;for(W=0;W<c;W++)for(j=W+1;j<c;j++){Q=w[W]-w[j],U=M[W]-M[j];var $=270-Math.abs(Q),ee=128-Math.abs(U);if($>0&&ee>0)if(Z=!0,$<ee){var ne=$/2+5;w[W]+=Q>0?ne:-ne,w[j]-=Q>0?ne:-ne}else ne=ee/2+5,M[W]+=U>0?ne:-ne,M[j]-=U>0?ne:-ne}if(!Z)break}var te=1/0,re=1/0;for(W=0;W<c;W++)te=Math.min(te,w[W]),re=Math.min(re,M[W]);var ie=new Map;for(W=0;W<c;W++)ie.set(a[W].id,{x:Math.round(w[W]-te+80),y:Math.round(M[W]-re+80)});return ie}(i,a,r),l=i.map(function(n){var t=o.get(n.id)||{x:0,y:0};return e(e({},n),{x:t.x,y:t.y})}),c={};r.forEach(function(e,n){c[e.id]=n});var d={};r.forEach(function(e){d[e.id]=[]}),l.forEach(function(e){var n;null===(n=d[e.cluster_id])||void 0===n||n.push(e)});var s=36,f=r.map(function(e){var n=d[e.id];if(!n.length)return null;var t=Math.min.apply(Math,n.map(function(e){return e.x})),r=Math.min.apply(Math,n.map(function(e){return e.y})),i=Math.max.apply(Math,n.map(function(e){return e.x+p})),a=Math.max.apply(Math,n.map(function(e){return e.y+g}));return{id:e.id,label:e.label,idx:c[e.id],x:t-s,y:r-s,width:i-t+72,height:a-r+72+22}}).filter(function(e){return null!==e});return{nodes:l.map(function(n){var t;return e(e({},n),{cluster:null!==(t=c[n.cluster_id])&&void 0!==t?t:0})}),edges:a,clusterBounds:f,canvasW:Math.max.apply(Math,l.map(function(e){return e.x+p}))+72,canvasH:Math.max.apply(Math,l.map(function(e){return e.y+g}))+72}}function M(e,n,t){var r=n[e.source],i=n[e.target];if(!r||!i)return"";var a=function(e,n){var t=e.x+85,r=e.y+24,i=n.x+85,a=n.y+24;function o(e,n,t,r){var i=t-e,a=r-n;return Math.abs(a)>.4*Math.abs(i)?a>0?{x:e,y:n+24}:{x:e,y:n-24}:i>0?{x:e+85,y:n}:{x:e-85,y:n}}return{source:o(t,r,i,a),target:o(i,a,t,r)}}(r,i),o=a.source,l=a.target,c=l.x-o.x,d=l.y-o.y,s=Math.sqrt(c*c+d*d);if(s<5)return"M ".concat(o.x," ").concat(o.y," L ").concat(l.x," ").concat(l.y);if(i.y+150<r.y&&i.y<r.y-g){var f=Math.min(r.x,i.x)-110;return"M ".concat(o.x," ").concat(o.y," C ").concat(f," ").concat(o.y,", ").concat(f," ").concat(l.y,", ").concat(l.x," ").concat(l.y)}var u=-d/s,h=c/s;if(t.some(function(n){return n.source===e.target&&n.target===e.source})){var p=e.source<e.target?1:-1,y=Math.max(.18*s,40)*p,v=(o.x+l.x)/2+u*y,x=(o.y+l.y)/2+h*y;return"M ".concat(o.x," ").concat(o.y," Q ").concat(v," ").concat(x," ").concat(l.x," ").concat(l.y)}var b=Math.min(.12*s,55),m=(o.x+l.x)/2+u*b,w=(o.y+l.y)/2+h*b;return"M ".concat(o.x," ").concat(o.y," Q ").concat(m," ").concat(w," ").concat(l.x," ").concat(l.y)}function k(n){var a,f,k=n.data,S=n.onFullscreen,C=n.isFullscreen,z=n.isDarkMode,E=void 0!==z&&z,A=c(null),F=o({x:0,y:0}),I=F[0],W=F[1],R=o(.5),D=R[0],Y=R[1],_=o(!1),j=_[0],P=_[1],B=c({x:0,y:0}),L=c({x:0,y:0}),X=o(null),N=X[0],T=X[1],H=o(null),O=H[0],q=H[1],Q=o(null),U=Q[0],G=Q[1],J=o(null),K=J[0],V=J[1],Z=d(function(){return w(k)},[k]),$=d(function(){var e={};return Z.nodes.forEach(function(n){e[n.id]=n}),e},[Z]),ee=d(function(){var e={};return k.clusters.forEach(function(n,t){e[n.id]=t}),e},[k]),ne=d(function(){return K?new Set(Z.edges.filter(function(e){return e.source===K||e.target===K}).map(function(e){return e.id})):new Set},[K,Z.edges]),te=d(function(){if(!K)return new Set;var e=new Set([K]);return Z.edges.forEach(function(n){n.source===K&&e.add(n.target),n.target===K&&e.add(n.source)}),e},[K,Z.edges]),re=d(function(){return new Date(k.last_analyzed_at).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,day:"numeric",month:"short",year:"numeric"})},[k.last_analyzed_at]),ie=l(function(n){n.target.closest("[data-edge-hit]")||n.target.closest("[data-node]")||(P(!0),B.current={x:n.clientX,y:n.clientY},L.current=e({},I),n.currentTarget.style.cursor="grabbing")},[I]),ae=l(function(e){j&&W({x:L.current.x+(e.clientX-B.current.x),y:L.current.y+(e.clientY-B.current.y)})},[j]),oe=l(function(){P(!1),A.current&&(A.current.style.cursor="grab")},[]),le=l(function(e){e.preventDefault(),Y(function(n){return Math.min(2.5,Math.max(.2,n-.001*e.deltaY))})},[]);s(function(){var e=A.current;return e&&e.addEventListener("wheel",le,{passive:!1}),function(){return null==e?void 0:e.removeEventListener("wheel",le)}},[le]);var ce={width:32,height:32,border:"none",background:"transparent",borderRadius:8,cursor:"pointer",fontSize:16,color:E?"#cbd5e1":"#475569",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500};return t("div",e({style:{width:"100%",height:"100%",background:E?"#090d16":"#ffffff",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",position:"relative",overflow:"hidden"}},{children:[t("div",e({style:{position:"absolute",top:0,left:0,right:0,zIndex:20,borderBottom:C?E?"1px solid #1e293b":"1px solid #f1f5f9":"none",background:E?"#090d16":C?"#fff":"transparent"}},{children:[t("div",e({style:{padding:"10px 14px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",{children:[C&&i("h2",e({style:{margin:0,fontSize:17,fontWeight:700,color:E?"#f8fafc":"#1e293b"}},{children:"Dependency Graph"})),t("p",e({style:{margin:"2px 0 0",fontSize:12,color:"#94a3b8"}},{children:["Last analyzed: ".concat(re||""," · "),"Click a node or connection to explore details and dependencies."]}))]}),t("div",e({style:{display:"flex",gap:6,alignItems:"center"}},{children:[t("div",e({style:{display:"flex",gap:2,background:E?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:E?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"}},{children:[i("button",e({onClick:function(){return Y(function(e){return Math.max(.2,e-.15)})},style:ce},{children:"−"})),t("button",e({onClick:function(){Y(.5),W({x:0,y:0})},style:e(e({},ce),{fontSize:11,width:52,fontWeight:600})},{children:[Math.round(100*D)||0,"%"]})),i("button",e({onClick:function(){return Y(function(e){return Math.min(2.5,e+.15)})},style:ce},{children:"+"}))]})),S&&i("div",e({style:{display:"flex",background:E?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:E?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"}},{children:i("button",e({onClick:S,style:ce},{children:i(C?h:u,{style:{fontSize:16}})}))}))]}))]})),O&&i("div",e({style:{margin:"0 20px 14px",width:"30%",minWidth:280,borderRadius:12,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",border:"1px solid #e2e8f0",animation:"slideDown 0.2s ease-out"}},{children:function(){var n,r,a=O.node,o=null!==(n=ee[a.cluster_id])&&void 0!==n?n:0;return Z.edges.filter(function(e){return e.source===a.id}).length,Z.edges.filter(function(e){return e.target===a.id}).length,t("div",{children:[t("div",e({style:{padding:"10px 14px",background:m[o%m.length||0],color:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[i("span",e({style:{width:28,height:28,borderRadius:8,background:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14}},{children:x[o%x.length||0]})),t("div",{children:[i("div",e({style:{fontSize:9,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.75}},{children:(null===(r=k.clusters[o])||void 0===r?void 0:r.label)||"Cluster Name"})),i("div",e({style:{fontSize:14,fontWeight:700,marginTop:1}},{children:a.label||"Cluster Name"}))]})]})),i("button",e({onClick:function(){q(null),V(null)},style:{background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:"×"}))]})),i("div",e({style:{padding:"10px 14px",fontSize:13,lineHeight:1.6,color:E?"#cbd5e1":"#475569",background:E?"#1e293b":"#fff"}},{children:a.description||"No description available..."}))]})}()}))]})),t("div",e({ref:A,onPointerDown:ie,onPointerMove:ae,onPointerUp:oe,onPointerLeave:oe,onClick:function(){T(null),q(null),V(null)},style:{width:"100%",height:"100%",cursor:j?"grabbing":"grab",position:"relative"}},{children:[i("div",e({style:{transform:"translate(".concat(I.x,"px, ").concat(I.y,"px) scale(").concat(D,")"),transformOrigin:"top left",position:"absolute",top:C?70:50,left:20,transition:j?"none":"transform 0.08s ease-out"}},{children:t("svg",e({width:Z.canvasW,height:Z.canvasH,style:{overflow:"visible"}},{children:[Z.clusterBounds.map(function(n){return t("g",{children:[i("rect",{x:n.x,y:n.y,width:n.width,height:n.height,rx:"16",fill:E?"rgba(30, 41, 59, 0.35)":"none",stroke:E?"#334155":"#e2e8f0",strokeWidth:"1.5",strokeDasharray:"8 4"}),i("text",e({x:n.x+14,y:n.y+n.height-10,fontSize:"11",fill:"#94a3b8",fontFamily:"Inter, sans-serif",fontWeight:"500"},{children:n.label||"Cluster Name"}))]},n.id)}),Z.edges.map(function(n){var a=M(n,$,Z.edges);if(!a)return null;var o=ne.has(n.id),l=(null==N?void 0:N.edge.id)===n.id,c=U===n.id,d=o||l?"#6366f1":c?"#818cf8":E?"#475569":"#cbd5e1",s=o||l?2.5:c?2:1.5;return t("g",e({style:{opacity:!!K&&!o?.1:1,transition:"opacity 0.25s"}},{children:[i("path",{"data-edge-hit":"true",d:a,fill:"none",stroke:"transparent",strokeWidth:18,style:{cursor:"pointer"},onClick:function(e){return function(e,n){e.stopPropagation();var t=A.current.getBoundingClientRect();T({edge:n,screenX:e.clientX-t.left,screenY:e.clientY-t.top}),q(null),V(null)}(e,n)},onMouseEnter:function(){return G(n.id)},onMouseLeave:function(){return G(null)}}),i("path",{d:a,fill:"none",stroke:d,strokeWidth:s,style:{transition:"stroke 0.2s, stroke-width 0.2s",pointerEvents:"none"}}),(o||l)&&t(r,{children:[i("circle",e({r:4,fill:"#6366f1"},{children:i("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:a})})),i("circle",e({r:6,fill:"#6366f1",opacity:.2},{children:i("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:a})}))]})]}),n.id)}),Z.nodes.map(function(n){var r,a=K===n.id,o=te.has(n.id),l=!!K&&!o,c=(null!==(r=ee[n.cluster_id])&&void 0!==r?r:0)%b.length,d=b[c||0];return i("g",e({"data-node":"true",onClick:function(e){return function(e,n){e.stopPropagation();var t=A.current.getBoundingClientRect();K===n.id?(V(null),q(null)):(V(n.id),q({node:n,screenX:e.clientX-t.left,screenY:e.clientY-t.top}),T(null))}(e,n)},style:{cursor:"pointer",opacity:l?.15:1,transition:"opacity 0.25s"}},{children:i("foreignObject",e({x:n.x,y:n.y,width:p,height:g},{children:t("div",e({style:{background:E?"#1e293b":"#fff",border:a?"2.5px solid ".concat(d):E?"1.5px solid #334155":"1.5px solid #e2e8f0",borderRadius:10,padding:"8px 14px",fontSize:13,fontWeight:600,color:E?"#f1f5f9":"#334155",fontFamily:"'Inter', sans-serif",display:"flex",alignItems:"center",gap:8,boxShadow:a?"0 0 0 3px ".concat(d,"33, 0 2px 8px rgba(0,0,0,0.4)"):E?"0 2px 6px rgba(0,0,0,0.3)":"0 1px 3px rgba(0,0,0,0.05)",whiteSpace:"nowrap",userSelect:"none",height:46,boxSizing:"border-box",transition:"border 0.2s, box-shadow 0.2s"}},{children:[i("span",e({style:{width:22,height:22,borderRadius:6,background:y[c],display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,flexShrink:0,color:v[c]}},{children:x[c]})),i("span",e({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:n.label||"Node name"}))]}))}))}),n.id)})]}))})),N&&t("div",e({onClick:function(e){return e.stopPropagation()},style:e(e({position:"absolute"},function(e,n,t,r){if(!A.current)return{};var i=A.current.getBoundingClientRect(),a=e+14,o=n-r/2;return a+t>i.width&&(a=e-t-14),o<8&&(o=8),o+r>i.height&&(o=i.height-r-8),{left:a,top:o}}(N.screenX,N.screenY,320,180)),{width:320,background:"#fff",borderRadius:14,boxShadow:"0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",border:"1px solid #e2e8f0",zIndex:30,animation:"popIn 0.18s ease-out",overflow:"hidden"})},{children:[t("div",e({style:{padding:"12px 16px 10px",background:"linear-gradient(135deg, #6366f1, #8b5cf6)",color:"#fff"}},{children:[i("div",e({style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.8}},{children:"Edge Reasoning"})),t("div",e({style:{fontSize:13,fontWeight:600,marginTop:4}},{children:[(null===(a=$[N.edge.source])||void 0===a?void 0:a.label)||"Source",i("span",e({style:{opacity:.6,margin:"0 6px"}},{children:"→"})),(null===(f=$[N.edge.target])||void 0===f?void 0:f.label)||"Target"]}))]})),i("div",e({style:{padding:"12px 16px 14px",fontSize:13,lineHeight:1.6,color:"#475569",whiteSpace:"pre-line"}},{children:N.edge.reasoning||"No Reasoning available..."})),i("button",e({onClick:function(){return T(null)},style:{position:"absolute",top:8,right:10,background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"}},{children:"×"}))]}))]})),i("style",{children:"\n @keyframes popIn { from { opacity:0; transform:scale(0.95) translateY(4px); } to { opacity:1; transform:scale(1) translateY(0); } }\n @keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }\n "})]}))}var S=a.memo(function(n){var a=n.data,c=n.isDarkMode,d=void 0!==c&&c,s=n.style,u=o(!1),h=u[0],p=u[1],g=l(function(){p(!0)},[]),y=l(function(){p(!1)},[]);return t(r,{children:[i("div",e({style:e({position:"relative",width:"100%",height:"500px"},s)},{children:i(k,{data:a,onFullscreen:g,isDarkMode:d})})),i(f,e({open:h,onClose:y,maxWidth:!1,PaperProps:{style:{width:"95vw",height:"92vh",maxWidth:"none",borderRadius:12,overflow:"hidden",background:d?"#090d16":"#ffffff"}}},{children:i("div",e({style:{width:"100%",height:"100%",position:"relative"}},{children:i(k,{data:a,onFullscreen:y,isFullscreen:!0,isDarkMode:d})}))}))]})});export{S as default};
1
+ import{__rest as e,__assign as n,__spreadArray as r}from"tslib";import{jsxs as t,Fragment as o,jsx as i}from"react/jsx-runtime";import l,{useState as a,useCallback as d,useRef as c,useMemo as u,useEffect as s}from"react";import f from"@mui/material/Dialog";import v from"@mui/icons-material/Fullscreen";import p from"@mui/icons-material/CloseFullscreen";var h=170,g=48,y=["#ede9fe","#e0f2fe","#fef3c7","#dcfce7","#ffe4e6","#f0fdf4","#fef9c3","#e0e7ff","#fce7f3","#f1f5f9"],b=["#7c3aed","#0284c7","#b45309","#16a34a","#e11d48","#15803d","#a16207","#4338ca","#db2777","#475569"],x=["⚙","◈","⟐","✦","◎","⬡","◇","⊕","✶","◉"],m=["#a78bfa","#7dd3fc","#fbbf24","#86efac","#fda4af","#6ee7b7","#fde047","#a5b4fc","#f9a8d4","#94a3b8"],w=["linear-gradient(135deg,#7c3aed,#a78bfa)","linear-gradient(135deg,#0284c7,#38bdf8)","linear-gradient(135deg,#b45309,#fbbf24)","linear-gradient(135deg,#16a34a,#86efac)","linear-gradient(135deg,#e11d48,#fda4af)","linear-gradient(135deg,#15803d,#6ee7b7)","linear-gradient(135deg,#a16207,#fde047)","linear-gradient(135deg,#4338ca,#a5b4fc)","linear-gradient(135deg,#db2777,#f9a8d4)","linear-gradient(135deg,#475569,#94a3b8)"];function k(e){var t=Array.isArray(null==e?void 0:e.clusters)?e.clusters:[],o=Array.isArray(null==e?void 0:e.nodes)?e.nodes:[],i=Array.isArray(null==e?void 0:e.edges)?e.edges:[],l=function(e,n,t){var o;void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===t&&(t=[]);var i=Array.isArray(e)?e:[],l=Array.isArray(n)?n:[],a=Array.isArray(t)?t:[],d=i.length;if(0===d)return new Map;var c={};i.forEach(function(e,n){c[e.id]=n});var u={},s={};i.forEach(function(e){u[e.id]=[],s[e.id]=[]}),l.forEach(function(e){u[e.source]&&u[e.source].push(e.target),s[e.target]&&s[e.target].push(e.source)});var f={};i.forEach(function(e){f[e.id]=0});for(var v=0;v<d;v++){for(var p=!1,h=0,g=l;h<g.length;h++){var y=g[h],b=(f[y.source]||0)+1;b>(f[y.target]||0)&&b<d&&(f[y.target]=b,p=!0)}if(!p)break}var x={};a.forEach(function(e,n){x[e.id]=n});var m={};a.forEach(function(e){m[e.id]=[]}),i.forEach(function(e){var n;null===(n=m[e.cluster_id])||void 0===n||n.push(e)}),Object.values(m).forEach(function(e){return e.sort(function(e,n){return(f[e.id]||0)-(f[n.id]||0)})});for(var w=new Float64Array(d),k=new Float64Array(d),M=new Float64Array(d),C=new Float64Array(d),S=function(e){var n=null!==(o=x[e.id])&&void 0!==o?o:0;(m[e.id]||[]).forEach(function(e,r){var t=c[e.id];w[t]=520*n+280,k[t]=200*r+120})},E=0,z=a;E<z.length;E++)S(V=z[E]);for(var P=.0015,A=Math.max.apply(Math,r(r([],i.map(function(e){return f[e.id]||0}),!1),[1],!1)),F=new Float64Array(d),I=0;I<d;I++)F[I]=(f[i[I].id]||0)/A*(200*d*.6)+120;for(var W=0;W<350;W++){var R=Math.max(.015,1-W/350),B=new Float64Array(d),D=new Float64Array(d);for(I=0;I<d;I++)for(var Y=I+1;Y<d;Y++){var _=(Q=w[I]-w[Y])*Q+(U=k[I]-k[Y])*U;_<400&&(_=(Q=12*(I-Y))*Q+(U=8*(I+Y))*U);var j=Q/(O=Math.sqrt(_))*(q=48e4/_),N=U/O*q;B[I]+=j,D[I]+=N,B[Y]-=j,D[Y]-=N}for(var L=0,X=l;L<X.length;L++){y=X[L];var H=c[y.source],T=c[y.target];if(void 0!==H&&void 0!==T){var O,q,Q=w[T]-w[H],U=k[T]-k[H];if(!((O=Math.sqrt(Q*Q+U*U))<1))j=Q/O*(q=.004*(O-380)),N=U/O*q,B[H]+=j,D[H]+=N,B[T]-=j,D[T]-=N}}var G={},J={},K={};for(I=0;I<d;I++)G[V=i[I].cluster_id]=(G[V]||0)+w[I],J[V]=(J[V]||0)+k[I],K[V]=(K[V]||0)+1;for(I=0;I<d;I++){var V=i[I].cluster_id;B[I]+=(G[V]/K[V]-w[I])*P,D[I]+=(J[V]/K[V]-k[I])*P}for(I=0;I<d;I++)D[I]+=.002*(F[I]-k[I]);for(I=0;I<d;I++)M[I]=.84*(M[I]+B[I])*R,C[I]=.84*(C[I]+D[I])*R,w[I]+=M[I],k[I]+=C[I]}for(v=0;v<40;v++){var Z=!1;for(I=0;I<d;I++)for(Y=I+1;Y<d;Y++){Q=w[I]-w[Y],U=k[I]-k[Y];var $=270-Math.abs(Q),ee=128-Math.abs(U);if($>0&&ee>0)if(Z=!0,$<ee){var ne=$/2+5;w[I]+=Q>0?ne:-ne,w[Y]-=Q>0?ne:-ne}else ne=ee/2+5,k[I]+=U>0?ne:-ne,k[Y]-=U>0?ne:-ne}if(!Z)break}var re=1/0,te=1/0;for(I=0;I<d;I++)re=Math.min(re,w[I]),te=Math.min(te,k[I]);var oe=new Map;for(I=0;I<d;I++)oe.set(i[I].id,{x:Math.round(w[I]-re+80),y:Math.round(k[I]-te+80)});return oe}(o,i,t),a=o.map(function(e){var r=l.get(e.id)||{x:0,y:0};return n(n({},e),{x:r.x,y:r.y})}),d={};t.forEach(function(e,n){d[e.id]=n});var c={};t.forEach(function(e){c[e.id]=[]}),a.forEach(function(e){var n;null===(n=c[e.cluster_id])||void 0===n||n.push(e)});var u=36,s=t.map(function(e){var n=c[e.id];if(!n.length)return null;var r=Math.min.apply(Math,n.map(function(e){return e.x})),t=Math.min.apply(Math,n.map(function(e){return e.y})),o=Math.max.apply(Math,n.map(function(e){return e.x+h})),i=Math.max.apply(Math,n.map(function(e){return e.y+g}));return{id:e.id,label:e.label,idx:d[e.id],x:r-u,y:t-u,width:o-r+72,height:i-t+72+22}}).filter(function(e){return null!==e});return{nodes:a.map(function(e){var r;return n(n({},e),{cluster:null!==(r=d[e.cluster_id])&&void 0!==r?r:0})}),edges:i,clusterBounds:s,canvasW:Math.max.apply(Math,a.map(function(e){return e.x+h}))+72,canvasH:Math.max.apply(Math,a.map(function(e){return e.y+g}))+72}}function M(e,n,r){var t=n[e.source],o=n[e.target];if(!t||!o)return"";var i=function(e,n){var r=e.x+85,t=e.y+24,o=n.x+85,i=n.y+24;function l(e,n,r,t){var o=r-e,i=t-n;return Math.abs(i)>.4*Math.abs(o)?i>0?{x:e,y:n+24}:{x:e,y:n-24}:o>0?{x:e+85,y:n}:{x:e-85,y:n}}return{source:l(r,t,o,i),target:l(o,i,r,t)}}(t,o),l=i.source,a=i.target,d=a.x-l.x,c=a.y-l.y,u=Math.sqrt(d*d+c*c);if(u<5)return"M ".concat(l.x," ").concat(l.y," L ").concat(a.x," ").concat(a.y);if(o.y+150<t.y&&o.y<t.y-g){var s=Math.min(t.x,o.x)-110;return"M ".concat(l.x," ").concat(l.y," C ").concat(s," ").concat(l.y,", ").concat(s," ").concat(a.y,", ").concat(a.x," ").concat(a.y)}var f=-c/u,v=d/u;if(r.some(function(n){return n.source===e.target&&n.target===e.source})){var p=e.source<e.target?1:-1,h=Math.max(.18*u,40)*p,y=(l.x+a.x)/2+f*h,b=(l.y+a.y)/2+v*h;return"M ".concat(l.x," ").concat(l.y," Q ").concat(y," ").concat(b," ").concat(a.x," ").concat(a.y)}var x=Math.min(.12*u,55),m=(l.x+a.x)/2+f*x,w=(l.y+a.y)/2+v*x;return"M ".concat(l.x," ").concat(l.y," Q ").concat(m," ").concat(w," ").concat(a.x," ").concat(a.y)}function C(e){var r,l,f,C=e.data,S=e.onFullscreen,E=e.isFullscreen,z=e.isDarkMode,P=void 0!==z&&z,A=e.style,F=c(null),I=a({x:0,y:0}),W=I[0],R=I[1],B=a(.5),D=B[0],Y=B[1],_=a(!1),j=_[0],N=_[1],L=c({x:0,y:0}),X=c({x:0,y:0}),H=a(null),T=H[0],O=H[1],q=a(null),Q=q[0],U=q[1],G=a(null),J=G[0],K=G[1],V=a(null),Z=V[0],$=V[1],ee=u(function(){return k(C)},[C]),ne=u(function(){var e={};return ee.nodes.forEach(function(n){e[n.id]=n}),e},[ee]),re=u(function(){var e={};return C.clusters.forEach(function(n,r){e[n.id]=r}),e},[C]),te=u(function(){return Z?new Set(ee.edges.filter(function(e){return e.source===Z||e.target===Z}).map(function(e){return e.id})):new Set},[Z,ee.edges]),oe=u(function(){if(!Z)return new Set;var e=new Set([Z]);return ee.edges.forEach(function(n){n.source===Z&&e.add(n.target),n.target===Z&&e.add(n.source)}),e},[Z,ee.edges]),ie=u(function(){return new Date(C.last_analyzed_at).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,day:"numeric",month:"short",year:"numeric"})},[C.last_analyzed_at]),le=d(function(e){e.target.closest("[data-edge-hit]")||e.target.closest("[data-node]")||(N(!0),L.current={x:e.clientX,y:e.clientY},X.current=n({},W),e.currentTarget.style.cursor="grabbing")},[W]),ae=d(function(e){j&&R({x:X.current.x+(e.clientX-L.current.x),y:X.current.y+(e.clientY-L.current.y)})},[j]),de=d(function(){N(!1),F.current&&(F.current.style.cursor="grab")},[]),ce=d(function(e){e.preventDefault(),Y(function(n){return Math.min(2.5,Math.max(.2,n-.001*e.deltaY))})},[]);s(function(){var e=F.current;return e&&e.addEventListener("wheel",ce,{passive:!1}),function(){return null==e?void 0:e.removeEventListener("wheel",ce)}},[ce]);var ue=(null==A?void 0:A.backgroundColor)||(null==A?void 0:A.background)||(P?"#090d16":"#ffffff"),se=(null==A?void 0:A.color)||(P?"#f8fafc":"#1e293b"),fe=(null===(r=null==A?void 0:A.subtitle)||void 0===r?void 0:r.color)||"#94a3b8",ve=function(e,n){return"string"==typeof e?e:n},pe=n({width:32,height:32,border:"none",background:"transparent",borderRadius:8,cursor:"pointer",fontSize:16,color:P?"#cbd5e1":"#475569",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500},null==A?void 0:A.controlButton);return t("div",n({style:n({width:"100%",height:"100%",background:ue,color:se,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",position:"relative",overflow:"hidden"},null==A?void 0:A.root)},{children:[t("div",n({style:n({position:"absolute",top:0,left:0,right:0,zIndex:20,borderBottom:E?P?"1px solid #1e293b":"1px solid #f1f5f9":"none",background:E?ue:"transparent"},null==A?void 0:A.header)},{children:[t("div",n({style:{padding:"10px 14px",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t("div",{children:[E&&i("h2",n({style:n({margin:0,fontSize:17,fontWeight:700,color:se},null==A?void 0:A.title)},{children:"Dependency Graph"})),t("p",n({style:n({margin:"2px 0 0",fontSize:12,color:fe},null==A?void 0:A.subtitle)},{children:["Last analyzed: ".concat(ie||""," · "),"Click a node or connection to explore details and dependencies."]}))]}),t("div",n({style:{display:"flex",gap:6,alignItems:"center"}},{children:[t("div",n({style:n({display:"flex",gap:2,background:P?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:P?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"},null==A?void 0:A.controls)},{children:[i("button",n({onClick:function(){return Y(function(e){return Math.max(.2,e-.15)})},style:pe},{children:"−"})),t("button",n({onClick:function(){Y(.5),R({x:0,y:0})},style:n(n({},pe),{fontSize:11,width:52,fontWeight:600})},{children:[Math.round(100*D)||0,"%"]})),i("button",n({onClick:function(){return Y(function(e){return Math.min(2.5,e+.15)})},style:pe},{children:"+"}))]})),S&&i("div",n({style:n({display:"flex",background:P?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:P?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"},null==A?void 0:A.controls)},{children:i("button",n({onClick:S,style:pe},{children:i(E?p:v,{style:{fontSize:16}})}))}))]}))]})),Q&&i("div",n({style:n({margin:"0 20px 14px",width:"30%",minWidth:280,borderRadius:12,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",border:"1px solid #e2e8f0",animation:"slideDown 0.2s ease-out"},null==A?void 0:A.nodePopup)},{children:function(){var e,r,o=Q.node,l=null!==(e=re[o.cluster_id])&&void 0!==e?e:0;return ee.edges.filter(function(e){return e.source===o.id}).length,ee.edges.filter(function(e){return e.target===o.id}).length,t("div",{children:[t("div",n({style:n({padding:"10px 14px",background:w[l%w.length||0],color:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"},null==A?void 0:A.nodePopupHeader)},{children:[t("div",n({style:{display:"flex",alignItems:"center",gap:10}},{children:[i("span",n({style:{width:28,height:28,borderRadius:8,background:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14}},{children:x[l%x.length||0]})),t("div",{children:[i("div",n({style:{fontSize:9,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.75}},{children:(null===(r=C.clusters[l])||void 0===r?void 0:r.label)||"Cluster Name"})),i("div",n({style:{fontSize:14,fontWeight:700,marginTop:1}},{children:o.label||"Cluster Name"}))]})]})),i("button",n({onClick:function(){U(null),$(null)},style:n({background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},null==A?void 0:A.popupCloseButton)},{children:"×"}))]})),i("div",n({style:n({padding:"10px 14px",fontSize:13,lineHeight:1.6,color:P?"#cbd5e1":"#475569",background:P?"#1e293b":"#fff"},null==A?void 0:A.nodePopupBody)},{children:o.description||"No description available..."}))]})}()}))]})),t("div",n({ref:F,onPointerDown:le,onPointerMove:ae,onPointerUp:de,onPointerLeave:de,onClick:function(){O(null),U(null),$(null)},style:{width:"100%",height:"100%",cursor:j?"grabbing":"grab",position:"relative"}},{children:[i("div",n({style:{transform:"translate(".concat(W.x,"px, ").concat(W.y,"px) scale(").concat(D,")"),transformOrigin:"top left",position:"absolute",top:E?70:50,left:20,transition:j?"none":"transform 0.08s ease-out"}},{children:t("svg",n({width:ee.canvasW,height:ee.canvasH,style:{overflow:"visible"}},{children:[ee.clusterBounds.map(function(e){var r,o,l,a,d;return t("g",{children:[i("rect",{x:e.x,y:e.y,width:e.width,height:e.height,rx:"16",fill:ve((null===(r=null==A?void 0:A.cluster)||void 0===r?void 0:r.backgroundColor)||(null===(o=null==A?void 0:A.cluster)||void 0===o?void 0:o.background),P?"rgba(30, 41, 59, 0.35)":"none"),stroke:ve((null===(l=null==A?void 0:A.cluster)||void 0===l?void 0:l.borderColor)||(null===(a=null==A?void 0:A.cluster)||void 0===a?void 0:a.border),P?"#334155":"#e2e8f0"),strokeWidth:"1.5",strokeDasharray:"8 4"}),i("text",n({x:e.x+14,y:e.y+e.height-10,fontSize:"11",fill:ve(null===(d=null==A?void 0:A.clusterLabel)||void 0===d?void 0:d.color,"#94a3b8"),fontFamily:"Inter, sans-serif",fontWeight:"500"},{children:e.label||"Cluster Name"}))]},e.id)}),ee.edges.map(function(e){var r,l,a,d,c,u,s,f,v,p=M(e,ne,ee.edges);if(!p)return null;var h=te.has(e.id),g=(null==T?void 0:T.edge.id)===e.id,y=J===e.id,b=!!Z&&!h,x=h||g?(null===(r=null==A?void 0:A.activeEdge)||void 0===r?void 0:r.color)||(null===(l=null==A?void 0:A.activeEdge)||void 0===l?void 0:l.borderColor)||"#6366f1":y?(null===(a=null==A?void 0:A.edge)||void 0===a?void 0:a.color)||"#818cf8":(null===(d=null==A?void 0:A.edge)||void 0===d?void 0:d.borderColor)||(null===(c=null==A?void 0:A.edge)||void 0===c?void 0:c.color)||(P?"#475569":"#cbd5e1"),m=h||g?2.5:y?2:1.5;return t("g",n({style:{opacity:b?.1:1,transition:"opacity 0.25s"}},{children:[i("path",{"data-edge-hit":"true",d:p,fill:"none",stroke:"transparent",strokeWidth:18,style:{cursor:"pointer"},onClick:function(n){return function(e,n){e.stopPropagation();var r=F.current.getBoundingClientRect();O({edge:n,screenX:e.clientX-r.left,screenY:e.clientY-r.top}),U(null),$(null)}(n,e)},onMouseEnter:function(){return K(e.id)},onMouseLeave:function(){return K(null)}}),i("path",{d:p,fill:"none",stroke:x,strokeWidth:m,style:{transition:"stroke 0.2s, stroke-width 0.2s",pointerEvents:"none"}}),(h||g)&&t(o,{children:[i("circle",n({r:4,fill:(null===(u=null==A?void 0:A.edgeMarker)||void 0===u?void 0:u.color)||(null===(s=null==A?void 0:A.activeEdge)||void 0===s?void 0:s.color)||"#6366f1"},{children:i("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:p})})),i("circle",n({r:6,fill:(null===(f=null==A?void 0:A.edgeMarker)||void 0===f?void 0:f.color)||(null===(v=null==A?void 0:A.activeEdge)||void 0===v?void 0:v.color)||"#6366f1",opacity:.2},{children:i("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:p})}))]})]}),e.id)}),ee.nodes.map(function(e){var r,o,l,a,d,c,u,s,f,v=Z===e.id,p=oe.has(e.id),w=!!Z&&!p,k=(null!==(r=re[e.cluster_id])&&void 0!==r?r:0)%m.length,M=m[k||0];return i("g",n({"data-node":"true",onClick:function(n){return function(e,n){e.stopPropagation();var r=F.current.getBoundingClientRect();Z===n.id?($(null),U(null)):($(n.id),U({node:n,screenX:e.clientX-r.left,screenY:e.clientY-r.top}),O(null))}(n,e)},style:{cursor:"pointer",opacity:w?.15:1,transition:"opacity 0.25s"}},{children:i("foreignObject",n({x:e.x,y:e.y,width:h,height:g},{children:t("div",n({style:n(n({background:(null===(o=null==A?void 0:A.node)||void 0===o?void 0:o.backgroundColor)||(null===(l=null==A?void 0:A.node)||void 0===l?void 0:l.background)||(P?"#1e293b":"#fff"),border:v?(null===(a=null==A?void 0:A.selectedNode)||void 0===a?void 0:a.border)||"2.5px solid ".concat((null===(d=null==A?void 0:A.selectedNode)||void 0===d?void 0:d.borderColor)||M):(null===(c=null==A?void 0:A.node)||void 0===c?void 0:c.border)||"1.5px solid ".concat((null===(u=null==A?void 0:A.node)||void 0===u?void 0:u.borderColor)||(P?"#334155":"#e2e8f0")),borderRadius:10,padding:"8px 14px",fontSize:13,fontWeight:600,color:P?"#f1f5f9":"#334155",fontFamily:"'Inter', sans-serif",display:"flex",alignItems:"center",gap:8,boxShadow:v?(null===(s=null==A?void 0:A.selectedNode)||void 0===s?void 0:s.boxShadow)||"0 0 0 3px ".concat(M,"33, 0 2px 8px rgba(0,0,0,0.4)"):(null===(f=null==A?void 0:A.node)||void 0===f?void 0:f.boxShadow)||(P?"0 2px 6px rgba(0,0,0,0.3)":"0 1px 3px rgba(0,0,0,0.05)"),whiteSpace:"nowrap",userSelect:"none",height:46,boxSizing:"border-box",transition:"border 0.2s, box-shadow 0.2s"},null==A?void 0:A.node),v?null==A?void 0:A.selectedNode:{})},{children:[i("span",n({style:n({width:22,height:22,borderRadius:6,background:y[k],display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,flexShrink:0,color:b[k]},null==A?void 0:A.nodeIcon)},{children:x[k]})),i("span",n({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:e.label||"Node name"}))]}))}))}),e.id)})]}))})),T&&t("div",n({onClick:function(e){return e.stopPropagation()},style:n(n(n({position:"absolute"},function(e,n,r,t){if(!F.current)return{};var o=F.current.getBoundingClientRect(),i=e+14,l=n-t/2;return i+r>o.width&&(i=e-r-14),l<8&&(l=8),l+t>o.height&&(l=o.height-t-8),{left:i,top:l}}(T.screenX,T.screenY,320,180)),{width:320,background:P?"#1e293b":"#fff",borderRadius:14,boxShadow:"0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",border:"1px solid #e2e8f0",zIndex:30,animation:"popIn 0.18s ease-out",overflow:"hidden"}),null==A?void 0:A.edgePopup)},{children:[t("div",n({style:n({padding:"12px 16px 10px",background:"linear-gradient(135deg, #6366f1, #8b5cf6)",color:"#fff"},null==A?void 0:A.edgePopupHeader)},{children:[i("div",n({style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.8}},{children:"Edge Reasoning"})),t("div",n({style:{fontSize:13,fontWeight:600,marginTop:4}},{children:[(null===(l=ne[T.edge.source])||void 0===l?void 0:l.label)||"Source",i("span",n({style:{opacity:.6,margin:"0 6px"}},{children:"→"})),(null===(f=ne[T.edge.target])||void 0===f?void 0:f.label)||"Target"]}))]})),i("div",n({style:n({padding:"12px 16px 14px",fontSize:13,lineHeight:1.6,color:P?"#cbd5e1":"#475569",whiteSpace:"pre-line"},null==A?void 0:A.edgePopupBody)},{children:T.edge.reasoning||"No Reasoning available..."})),i("button",n({onClick:function(){return O(null)},style:n({position:"absolute",top:8,right:10,background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"},null==A?void 0:A.popupCloseButton)},{children:"×"}))]}))]})),i("style",{children:"\n @keyframes popIn { from { opacity:0; transform:scale(0.95) translateY(4px); } to { opacity:1; transform:scale(1) translateY(0); } }\n @keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }\n "})]}))}var S=l.memo(function(r){var l=r.data,c=r.isDarkMode,u=void 0!==c&&c,s=r.style,v=a(!1),p=v[0],h=v[1],g=s||{};g.fullscreenPaper,g.root,g.header,g.title,g.subtitle,g.controls,g.controlButton,g.nodePopup,g.edgePopup;var y=e(g,["fullscreenPaper","root","header","title","subtitle","controls","controlButton","nodePopup","edgePopup"]),b=s||{},x=d(function(){h(!0)},[]),m=d(function(){h(!1)},[]);return t(o,{children:[i("div",n({style:n({position:"relative",width:"100%",height:"500px"},y)},{children:i(C,{data:l,onFullscreen:x,isDarkMode:u,style:b})})),i(f,n({open:p,onClose:m,maxWidth:!1,PaperProps:{style:n({width:"95vw",height:"92vh",maxWidth:"none",borderRadius:12,overflow:"hidden",background:b.backgroundColor||b.background||(u?"#090d16":"#ffffff"),color:b.color||(u?"#f8fafc":"#1e293b")},b.fullscreenPaper)}},{children:i("div",n({style:{width:"100%",height:"100%",position:"relative",background:b.backgroundColor||b.background||(u?"#090d16":"#ffffff")}},{children:i(C,{data:l,onFullscreen:m,isFullscreen:!0,isDarkMode:u,style:b})}))}))]})});export{S as default};
2
2
  //# sourceMappingURL=DependencyGraph.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as e,__assign as n,__awaiter as o,__generator as r}from"tslib";import{jsxs as i,jsx as t,Fragment as a}from"react/jsx-runtime";import l,{useState as d,useMemo as c,useRef as s,useEffect as p}from"react";import u from"react-markdown";import f from"rehype-raw";import{Box as h,Tooltip as g}from"@mui/material";import{Prism as m}from"react-syntax-highlighter";import{oneLight as v}from"react-syntax-highlighter/dist/esm/styles/prism";import{Check as b,ContentCopy as y,ExpandLess as x,ExpandMore as k}from"@mui/icons-material";import S from"@mui/icons-material/ExpandMoreOutlined";import _ from"./Cognitivereasoningpanel.js";var w=function(e){var n,o,r;void 0===e&&(e="");var i=null==e?void 0:e.replace(/\\`/g,"`");return i=null==(i=null==(i=null===(r=null==(i=null===(o=null===(n=null==(i=null==i?void 0:i.replace(/```json\s*([\s\S]*?)```/g,function(e,n){return"<codebasename>".concat(n.trim(),"</codebasename>")}))?void 0:i.replace(/^```.*\n?/,""))||void 0===n?void 0:n.replace(/\n?```$/,""))||void 0===o?void 0:o.trim())?void 0:i.replace(/^```/,""))||void 0===r?void 0:r.replace(/```$/,""))?void 0:i.replace(/<\/summary>/g,"</summary>\n"))?void 0:i.replace(/<details>/g,"\n<details>")},M=function(e){var a=e.text,l=d(!1),c=l[0],s=l[1];return i("button",n({onClick:function(){return o(void 0,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(a)];case 1:return e.sent(),s(!0),setTimeout(function(){return s(!1)},2e3),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})},"aria-label":"Copy code",style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",fontSize:"0.68rem",fontWeight:500,fontFamily:"inherit",color:c?"#16a34a":"#6B7280",background:c?"#f0fdf4":"#f3f4f6",border:"1px solid ".concat(c?"#bbf7d0":"#e5e7eb"),borderRadius:6,cursor:"pointer",transition:"all 0.2s",opacity:.85},onMouseEnter:function(e){e.currentTarget.style.opacity="1"},onMouseLeave:function(e){e.currentTarget.style.opacity="0.85"}},{children:[t(c?b:y,{style:{fontSize:13}}),c?"Copied":"Copy"]}))},z=function(o){o.node;var r=e(o,["node"]),a=d(!1),c=a[0],u=a[1],f=s(null),h=l.Children.toArray(r.children),g=h.find(function(e){var n;return null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-codebase-name"]}),m=!!g,v=m?g.props["data-codebase-name"]:"",b=h.map(function(e){var n;return"string"==typeof e?e:(null===(n=e.props)||void 0===n?void 0:n.children)||""}).join("").replace(/\*\*/g,"").trim(),y=m?"From ".concat(v," codebase"):b||"Accordion title not found";return p(function(){var e,n=null===(e=f.current)||void 0===e?void 0:e.parentElement;if(n){var o=function(){return u(n.open)};return o(),n.addEventListener("toggle",o),function(){return n.removeEventListener("toggle",o)}}},[]),i("summary",n({ref:f,style:{padding:"8px 12px",listStyleType:"none",cursor:"pointer",fontWeight:600,fontSize:"0.82rem",color:"#6932E2",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,borderRadius:8,background:c?"#f5f3ff":"transparent",transition:"background 0.2s"}},{children:[t("span",{children:y}),t("div",n({style:{display:"flex",alignItems:"center",flexShrink:0,color:"#6932E2"}},{children:t(c?x:k,{sx:{fontSize:"1.1rem"}})}))]}))},C=function(o){var r=o.message,s=o.fontSize,p=o.extraMetaData,b=o.isDarkMode,y=void 0!==b&&b,x=o.style,k=o.sx,C=null!=s?s:"0.88rem",W=y?"#e2e8f0":"#1f2937",R=y?"#f8fafc":"#111827",E=d({open:!1,data:null,activeKey:null}),H=E[0],K=E[1],L=function(){return K({open:!1,data:null,activeKey:null})},T=c(function(){var e=function(e){var n={};return{processed:e.replace(/<!--\s*<ai_reasoning>\s*([\s\S]*?)\s*<\/ai_reasoning>\s*-->/g,function(e,o){try{var r=JSON.parse(o.trim()),i=r.id||"reasoning_".concat(Object.keys(n).length);return n[i]=r,'<aireasoning data-reasoning-key="'.concat(i,'">').concat(i,"</aireasoning>")}catch(e){return console.warn("[ai_reasoning] Failed to parse block:",e),""}}),reasoningMap:n}}(r||"");return{processedMessage:e.processed,inlineReasoningMap:e.reasoningMap}},[r]),j=T.processedMessage,B=T.inlineReasoningMap,F=c(function(){return{aireasoning:function(o){o.node;var r=e(o,["node"])["data-reasoning-key"],a=B[r];if(!a)return null;var l=H.open&&H.activeKey===r;return i("div",n({style:{margin:"6px 0"}},{children:[i("span",n({onClick:function(e){e.stopPropagation();var n=function(e){var n,o,r,i,t,a=[];return(null!==(o=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==o?o:[]).forEach(function(e){var n,o,r,i,t,l,d,c,s,p,u=null!==(o=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==o?o:[],f=null!==(i=null===(r=e.customMetadata)||void 0===r?void 0:r.training_data_title)&&void 0!==i?i:[],h=null!==(l=null===(t=e.customMetadata)||void 0===t?void 0:t.paraphrase)&&void 0!==l?l:[],g=null===(d=u[0])||void 0===d?void 0:d.match(/<highlight>([\s\S]*?)<\/highlight>/),m=g?g[1].trim():null!==(c=u[0])&&void 0!==c?c:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(s=f[0])&&void 0!==s?s:"",paraphrase:null!==(p=h[0])&&void 0!==p?p:"",highlight:m})}),{block_cognitive_reasoning_html:null!==(r=e.reasoning)&&void 0!==r?r:"",block_cognitive_gap_html:null!==(i=e.Gap)&&void 0!==i?i:"",block_cognitive_confidence:Number(null!==(t=e.decision_strength)&&void 0!==t?t:0),block_cognitive_citations:a}}(a);K(function(e){return e.open&&e.activeKey===r?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:r}})},style:{display:"inline-flex",alignItems:"center",gap:6,cursor:"pointer",color:y?"#a78bfa":"#6932E2",fontWeight:500,fontSize:C,transition:"all 0.2s",padding:"2px 0"}},{children:[t("span",{children:r}),t("span",n({style:{display:"inline-flex",alignItems:"center",gap:2,border:y?"1px solid #334155":"1px solid #e2e8f0",borderRadius:5,padding:"4px 2px"}},{children:t(S,{sx:{fontSize:"1rem",color:y?"#94a3b8":"#475569",transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})}))]})),l&&H.data&&t(h,n({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:t(_,{open:!0,onClose:L,data:H.data})}))]}))},codebasename:function(e){var o=e.children,r=("string"==typeof o[0]?o[0]:"").trim();return""!==r?i("div",n({"data-codebase-name":r,style:{position:"relative",margin:"12px 0"}},{children:[t(M,{text:String(o).replace(/\n$/,"")}),t(m,n({style:v,language:"json",PreTag:"div",customStyle:{borderRadius:8,padding:"1rem",fontSize:"0.8rem",border:y?"1px solid #334155":"1px solid #e5e7eb",margin:0,lineHeight:1.6}},{children:String(o).replace(/\n$/,"")}))]})):t(a,{})},details:function(o){o.node;var r=e(o,["node"]);return t("details",n({},r,{style:{borderRadius:8,border:y?"1px solid #334155":"1px solid #e9e5f5",backgroundColor:"transparent",margin:"8px 0",overflow:"hidden"}},{children:r.children}))},summary:z,p:function(o){o.node;var r=e(o,["node"]);return t("p",n({style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"block",maxWidth:"100%",fontSize:C,lineHeight:1.7,margin:"4px 0",color:W}},{children:null==r?void 0:r.children}))},strong:function(o){o.node;var r=e(o,["node"]);return t("strong",n({style:{fontWeight:650,color:R}},{children:null==r?void 0:r.children}))},h1:function(o){o.node;var r=e(o,["node"]);return t("h1",n({style:{fontSize:"1.35rem",fontWeight:700,color:R,margin:"20px 0 8px",lineHeight:1.3,letterSpacing:"-0.01em"}},{children:r.children}))},h2:function(o){o.node;var r=e(o,["node"]);return t("h2",n({style:{fontSize:"1.15rem",fontWeight:650,color:R,margin:"16px 0 6px",lineHeight:1.35}},{children:r.children}))},h3:function(o){o.node;var r=e(o,["node"]);return t("h3",n({style:{fontSize:"1rem",fontWeight:600,color:R,margin:"14px 0 4px",lineHeight:1.4}},{children:r.children}))},h4:function(o){o.node;var r=e(o,["node"]);return t("h4",n({style:{fontSize:"0.92rem",fontWeight:600,color:W,margin:"12px 0 4px",lineHeight:1.4}},{children:r.children}))},ol:function(o){o.node;var r=e(o,["node"]);return t("ol",n({style:{listStyleType:"decimal",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==r?void 0:r.children}))},ul:function(o){o.node;var r=e(o,["node"]);return t("ul",n({style:{listStyleType:"disc",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==r?void 0:r.children}))},li:function(o){o.node;var r=e(o,["node"]);return t("li",n({style:{fontSize:C,lineHeight:1.7,color:W,paddingLeft:4}},{children:r.children}))},blockquote:function(o){o.node;var r=e(o,["node"]);return t("blockquote",n({style:{margin:"12px 0",padding:"8px 16px",borderLeft:"3px solid #8b5cf6",background:y?"#1e1b4b":"#faf5ff",borderRadius:"0 6px 6px 0",color:y?"#cbd5e1":"#4b5563",fontStyle:"italic",fontSize:C,lineHeight:1.65}},{children:r.children}))},hr:function(){return t("hr",{style:{border:"none",height:1,background:y?"linear-gradient(to right, transparent, #334155, transparent)":"linear-gradient(to right, transparent, #d1d5db, transparent)",margin:"16px 0"}})},table:function(o){o.node;var r=e(o,["node"]);return t("div",n({style:{overflowX:"auto",margin:"12px 0",borderRadius:8,border:y?"1px solid #334155":"1px solid #e5e7eb"}},{children:t("table",n({style:{width:"100%",borderCollapse:"collapse",fontSize:"0.8rem",lineHeight:1.5}},{children:r.children}))}))},thead:function(o){o.node;var r=e(o,["node"]);return t("thead",n({style:{background:y?"#1e293b":"#f9fafb",borderBottom:y?"2px solid #334155":"2px solid #e5e7eb"}},{children:r.children}))},th:function(o){o.node;var r=e(o,["node"]);return t("th",n({style:{padding:"8px 12px",textAlign:"left",fontWeight:600,fontSize:"0.76rem",color:y?"#cbd5e1":"#374151",whiteSpace:"nowrap"}},{children:r.children}))},td:function(o){o.node;var r=e(o,["node"]);return t("td",n({style:{padding:"8px 12px",borderTop:y?"1px solid #334155":"1px solid #f3f4f6",color:y?"#94a3b8":"#4b5563",fontSize:"0.8rem"}},{children:r.children}))},a:function(o){var r=o.children;o.node;var l=e(o,["children","node"]),d=l["data-cognitive-reasoning"];if(d&&(null==p?void 0:p[d]))return i(a,{children:[i("span",n({onClick:function(e){e.stopPropagation();var n=function(e){var n,o,r,i,t;if(!e)return null;var a=[];return(null!==(o=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==o?o:[]).forEach(function(e){var n,o,r,i,t,l,d,c,s,p,u=null!==(o=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==o?o:[],f=null!==(i=null===(r=e.customMetadata)||void 0===r?void 0:r.training_data_title)&&void 0!==i?i:[],h=null!==(l=null===(t=e.customMetadata)||void 0===t?void 0:t.paraphrase)&&void 0!==l?l:[],g=null===(d=u[0])||void 0===d?void 0:d.match(/<highlight>([\s\S]*?)<\/highlight>/),m=g?g[1].trim():null!==(c=u[0])&&void 0!==c?c:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(s=f[0])&&void 0!==s?s:"",paraphrase:null!==(p=h[0])&&void 0!==p?p:"",highlight:m})}),{block_cognitive_reasoning_html:null!==(r=e.Reasoning)&&void 0!==r?r:"",block_cognitive_gap_html:null!==(i=e.Gap)&&void 0!==i?i:"",block_cognitive_confidence:Number(null!==(t=e.Confidence_score)&&void 0!==t?t:0),block_cognitive_citations:a}}(p[d]);K(function(e){return e.open&&e.activeKey===d?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:d}})},style:{color:y?"#a78bfa":"#6932E2",fontWeight:500,cursor:"pointer",transition:"all 0.2s",padding:"0 2px",position:"relative",display:"flex",alignItems:"center",gap:6,width:"fit-content"}},{children:[r||"",t("span",n({style:{cursor:"pointer",padding:"4px 2px",display:"flex",alignItems:"center",gap:2,border:y?"1px solid #334155":"1px solid #e2e8f0",borderRadius:"5px",width:"fit-content"}},{children:t(S,{sx:{fontSize:"1rem",color:y?"#94a3b8":"#475569",transition:"transform 0.2s"}})}))]})),H.open&&H.activeKey===d&&H.data&&t(h,n({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:t(_,{open:!0,onClose:L,data:H.data})}))]});var c=!1;try{c=new URL(null==l?void 0:l.href).protocol.startsWith("http")}catch(e){c=!1}return c?t("a",n({href:null==l?void 0:l.href,style:{color:y?"#a78bfa":"#6932E2",textDecoration:"none",fontWeight:500,borderBottom:y?"1px solid #7c3aed":"1px solid #c4b5fd",transition:"border-color 0.2s, color 0.2s"},target:"_blank",rel:"noopener noreferrer",onMouseEnter:function(e){e.currentTarget.style.borderBottomColor=y?"#a78bfa":"#6932E2"},onMouseLeave:function(e){e.currentTarget.style.borderBottomColor=y?"#7c3aed":"#c4b5fd"}},{children:r})):t("span",{children:r})},sup:function(o){o.node;var r=e(o,["node"]);return t(g,n({title:r.children,placement:"top",arrow:!0},{children:t(h,n({component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",background:y?"#3730a3":"#ede9fe",color:y?"#c084fc":"#7c3aed",fontSize:"0.6rem",fontWeight:700,verticalAlign:"super",cursor:"pointer",userSelect:"none",lineHeight:1,transition:"all 0.2s","&:hover":{background:y?"#6d28d9":"#7c3aed",color:"#fff"}},"aria-label":"Info",role:"button"},{children:"i"}))}))},code:function(e){var o=e.children;return t("code",n({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.82em",color:y?"#e9d5ff":"#9333ea",background:y?"#2e1065":"#faf5ff",padding:"1.5px 5px",borderRadius:4,border:y?"1px solid #581c87":"1px solid #f3e8ff",fontWeight:500}},{children:o}))},pre:function(e){var o=e.children,r=function(e){var n;return"string"==typeof e?e:(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?(Array.isArray(e.props.children)?e.props.children:[e.props.children]).map(r).join(""):""},a=l.Children.toArray(o).map(r).join("");return i("div",n({style:{position:"relative",margin:"12px 0"}},{children:[t(M,{text:a}),t("pre",n({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.8rem",lineHeight:1.6,color:W,background:y?"#0f172a":"#f9fafb",border:y?"1px solid #334155":"1px solid #e5e7eb",borderRadius:8,padding:"14px 16px",margin:0,overflowX:"auto",whiteSpace:"pre"}},{children:o}))]}))},img:function(o){o.node;var r=e(o,["node"]);return t("img",n({},r,{style:{maxWidth:"100%",height:"auto",borderRadius:8,margin:"8px 0",border:y?"1px solid #334155":"1px solid #e5e7eb"},loading:"lazy"}))}}},[r,C,p,H.activeKey,H.open,B,y,W,R]);return t(h,n({className:"pg-markdown-renderer",style:x,sx:n(n({fontSize:C,lineHeight:1.7,color:W,wordBreak:"break-word",position:"relative"},k),{"& span[style*='color'], & font[color]":y?{color:"#60a5fa !important"}:{},"& a":{color:y?"#a78bfa !important":"#6932E2 !important"},"& strong":{color:y?"#f8fafc !important":"#111827 !important"},"& h1, & h2, & h3, & h4, & h5, & h6":{color:y?"#f1f5f9 !important":"#111827 !important"}})},{children:t(u,n({components:F,rehypePlugins:[f],className:"react-markdown-renderer-with-overrides"},{children:w(j)}))}))};export{C as MarkdownRenderer,C as default};
1
+ import{__rest as e,__assign as n,__awaiter as o,__generator as r}from"tslib";import{jsxs as i,jsx as t,Fragment as a}from"react/jsx-runtime";import l,{useState as d,useMemo as c,useRef as s,useEffect as p}from"react";import u from"react-markdown";import f from"rehype-raw";import{Box as h,Tooltip as g}from"@mui/material";import{Prism as m}from"react-syntax-highlighter";import{oneLight as v}from"react-syntax-highlighter/dist/esm/styles/prism";import{Check as b,ContentCopy as y,ExpandLess as x,ExpandMore as k}from"@mui/icons-material";import S from"@mui/icons-material/ExpandMoreOutlined";import _ from"./Cognitivereasoningpanel.js";var w=function(e){var n,o,r;void 0===e&&(e="");var i=null==e?void 0:e.replace(/\\`/g,"`");return i=null==(i=null==(i=null===(r=null==(i=null===(o=null===(n=null==(i=null==i?void 0:i.replace(/```json\s*([\s\S]*?)```/g,function(e,n){return"<codebasename>".concat(n.trim(),"</codebasename>")}))?void 0:i.replace(/^```.*\n?/,""))||void 0===n?void 0:n.replace(/\n?```$/,""))||void 0===o?void 0:o.trim())?void 0:i.replace(/^```/,""))||void 0===r?void 0:r.replace(/```$/,""))?void 0:i.replace(/<\/summary>/g,"</summary>\n"))?void 0:i.replace(/<details>/g,"\n<details>")},M=function(e){var a=e.text,l=d(!1),c=l[0],s=l[1];return i("button",n({onClick:function(){return o(void 0,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(a)];case 1:return e.sent(),s(!0),setTimeout(function(){return s(!1)},2e3),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})},"aria-label":"Copy code",style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",fontSize:"0.68rem",fontWeight:500,fontFamily:"inherit",color:c?"#16a34a":"#6B7280",background:c?"#f0fdf4":"#f3f4f6",border:"1px solid ".concat(c?"#bbf7d0":"#e5e7eb"),borderRadius:6,cursor:"pointer",transition:"all 0.2s",opacity:.85},onMouseEnter:function(e){e.currentTarget.style.opacity="1"},onMouseLeave:function(e){e.currentTarget.style.opacity="0.85"}},{children:[t(c?b:y,{style:{fontSize:13}}),c?"Copied":"Copy"]}))},z=function(o){o.node;var r=e(o,["node"]),a=d(!1),c=a[0],u=a[1],f=s(null),h=l.Children.toArray(r.children),g=h.find(function(e){var n;return null===(n=null==e?void 0:e.props)||void 0===n?void 0:n["data-codebase-name"]}),m=!!g,v=m?g.props["data-codebase-name"]:"",b=h.map(function(e){var n;return"string"==typeof e?e:(null===(n=e.props)||void 0===n?void 0:n.children)||""}).join("").replace(/\*\*/g,"").trim(),y=m?"From ".concat(v," codebase"):b||"Accordion title not found";return p(function(){var e,n=null===(e=f.current)||void 0===e?void 0:e.parentElement;if(n){var o=function(){return u(n.open)};return o(),n.addEventListener("toggle",o),function(){return n.removeEventListener("toggle",o)}}},[]),i("summary",n({ref:f,style:{padding:"8px 12px",listStyleType:"none",cursor:"pointer",fontWeight:600,fontSize:"0.82rem",color:"#6932E2",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,borderRadius:8,background:c?"#f5f3ff":"transparent",transition:"background 0.2s"}},{children:[t("span",{children:y}),t("div",n({style:{display:"flex",alignItems:"center",flexShrink:0,color:"#6932E2"}},{children:t(c?x:k,{sx:{fontSize:"1.1rem"}})}))]}))},C=function(o){var r=o.message,s=o.fontSize,p=o.extraMetaData,b=o.isDarkMode,y=void 0!==b&&b,x=o.cognitiveDecisioningStyles,k=o.style,C=o.sx,W=null!=s?s:"0.88rem",R=y?"#e2e8f0":"#1f2937",E=y?"#f8fafc":"#111827",H=d({open:!1,data:null,activeKey:null}),K=H[0],L=H[1],T=function(){return L({open:!1,data:null,activeKey:null})},j=c(function(){var e=function(e){var n={};return{processed:e.replace(/<!--\s*<ai_reasoning>\s*([\s\S]*?)\s*<\/ai_reasoning>\s*-->/g,function(e,o){try{var r=JSON.parse(o.trim()),i=r.id||"reasoning_".concat(Object.keys(n).length);return n[i]=r,'<aireasoning data-reasoning-key="'.concat(i,'">').concat(i,"</aireasoning>")}catch(e){return console.warn("[ai_reasoning] Failed to parse block:",e),""}}),reasoningMap:n}}(r||"");return{processedMessage:e.processed,inlineReasoningMap:e.reasoningMap}},[r]),B=j.processedMessage,F=j.inlineReasoningMap,I=c(function(){return{aireasoning:function(o){o.node;var r=e(o,["node"])["data-reasoning-key"],a=F[r];if(!a)return null;var l=K.open&&K.activeKey===r;return i("div",n({style:{margin:"6px 0"}},{children:[i("span",n({onClick:function(e){e.stopPropagation();var n=function(e){var n,o,r,i,t,a=[];return(null!==(o=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==o?o:[]).forEach(function(e){var n,o,r,i,t,l,d,c,s,p,u=null!==(o=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==o?o:[],f=null!==(i=null===(r=e.customMetadata)||void 0===r?void 0:r.training_data_title)&&void 0!==i?i:[],h=null!==(l=null===(t=e.customMetadata)||void 0===t?void 0:t.paraphrase)&&void 0!==l?l:[],g=null===(d=u[0])||void 0===d?void 0:d.match(/<highlight>([\s\S]*?)<\/highlight>/),m=g?g[1].trim():null!==(c=u[0])&&void 0!==c?c:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(s=f[0])&&void 0!==s?s:"",paraphrase:null!==(p=h[0])&&void 0!==p?p:"",highlight:m})}),{block_cognitive_reasoning_html:null!==(r=e.reasoning)&&void 0!==r?r:"",block_cognitive_gap_html:null!==(i=e.Gap)&&void 0!==i?i:"",block_cognitive_confidence:Number(null!==(t=e.decision_strength)&&void 0!==t?t:0),block_cognitive_citations:a}}(a);L(function(e){return e.open&&e.activeKey===r?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:r}})},style:{display:"inline-flex",alignItems:"center",gap:6,cursor:"pointer",color:y?"#a78bfa":"#6932E2",fontWeight:500,fontSize:W,transition:"all 0.2s",padding:"2px 0"}},{children:[t("span",{children:r}),t("span",n({style:{display:"inline-flex",alignItems:"center",gap:2,border:y?"1px solid #334155":"1px solid #e2e8f0",borderRadius:5,padding:"4px 2px"}},{children:t(S,{sx:{fontSize:"1rem",color:y?"#94a3b8":"#475569",transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"}})}))]})),l&&K.data&&t(h,n({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:t(_,{open:!0,onClose:T,data:K.data,styles:x})}))]}))},codebasename:function(e){var o=e.children,r=("string"==typeof o[0]?o[0]:"").trim();return""!==r?i("div",n({"data-codebase-name":r,style:{position:"relative",margin:"12px 0"}},{children:[t(M,{text:String(o).replace(/\n$/,"")}),t(m,n({style:v,language:"json",PreTag:"div",customStyle:{borderRadius:8,padding:"1rem",fontSize:"0.8rem",border:y?"1px solid #334155":"1px solid #e5e7eb",margin:0,lineHeight:1.6}},{children:String(o).replace(/\n$/,"")}))]})):t(a,{})},details:function(o){o.node;var r=e(o,["node"]);return t("details",n({},r,{style:{borderRadius:8,border:y?"1px solid #334155":"1px solid #e9e5f5",backgroundColor:"transparent",margin:"8px 0",overflow:"hidden"}},{children:r.children}))},summary:z,p:function(o){o.node;var r=e(o,["node"]);return t("p",n({style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"block",maxWidth:"100%",fontSize:W,lineHeight:1.7,margin:"4px 0",color:R}},{children:null==r?void 0:r.children}))},strong:function(o){o.node;var r=e(o,["node"]);return t("strong",n({style:{fontWeight:650,color:E}},{children:null==r?void 0:r.children}))},h1:function(o){o.node;var r=e(o,["node"]);return t("h1",n({style:{fontSize:"1.35rem",fontWeight:700,color:E,margin:"20px 0 8px",lineHeight:1.3,letterSpacing:"-0.01em"}},{children:r.children}))},h2:function(o){o.node;var r=e(o,["node"]);return t("h2",n({style:{fontSize:"1.15rem",fontWeight:650,color:E,margin:"16px 0 6px",lineHeight:1.35}},{children:r.children}))},h3:function(o){o.node;var r=e(o,["node"]);return t("h3",n({style:{fontSize:"1rem",fontWeight:600,color:E,margin:"14px 0 4px",lineHeight:1.4}},{children:r.children}))},h4:function(o){o.node;var r=e(o,["node"]);return t("h4",n({style:{fontSize:"0.92rem",fontWeight:600,color:R,margin:"12px 0 4px",lineHeight:1.4}},{children:r.children}))},ol:function(o){o.node;var r=e(o,["node"]);return t("ol",n({style:{listStyleType:"decimal",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==r?void 0:r.children}))},ul:function(o){o.node;var r=e(o,["node"]);return t("ul",n({style:{listStyleType:"disc",marginLeft:20,paddingLeft:4,display:"flex",flexDirection:"column",gap:2}},{children:null==r?void 0:r.children}))},li:function(o){o.node;var r=e(o,["node"]);return t("li",n({style:{fontSize:W,lineHeight:1.7,color:R,paddingLeft:4}},{children:r.children}))},blockquote:function(o){o.node;var r=e(o,["node"]);return t("blockquote",n({style:{margin:"12px 0",padding:"8px 16px",borderLeft:"3px solid #8b5cf6",background:y?"#1e1b4b":"#faf5ff",borderRadius:"0 6px 6px 0",color:y?"#cbd5e1":"#4b5563",fontStyle:"italic",fontSize:W,lineHeight:1.65}},{children:r.children}))},hr:function(){return t("hr",{style:{border:"none",height:1,background:y?"linear-gradient(to right, transparent, #334155, transparent)":"linear-gradient(to right, transparent, #d1d5db, transparent)",margin:"16px 0"}})},table:function(o){o.node;var r=e(o,["node"]);return t("div",n({style:{overflowX:"auto",margin:"12px 0",borderRadius:8,border:y?"1px solid #334155":"1px solid #e5e7eb"}},{children:t("table",n({style:{width:"100%",borderCollapse:"collapse",fontSize:"0.8rem",lineHeight:1.5}},{children:r.children}))}))},thead:function(o){o.node;var r=e(o,["node"]);return t("thead",n({style:{background:y?"#1e293b":"#f9fafb",borderBottom:y?"2px solid #334155":"2px solid #e5e7eb"}},{children:r.children}))},th:function(o){o.node;var r=e(o,["node"]);return t("th",n({style:{padding:"8px 12px",textAlign:"left",fontWeight:600,fontSize:"0.76rem",color:y?"#cbd5e1":"#374151",whiteSpace:"nowrap"}},{children:r.children}))},td:function(o){o.node;var r=e(o,["node"]);return t("td",n({style:{padding:"8px 12px",borderTop:y?"1px solid #334155":"1px solid #f3f4f6",color:y?"#94a3b8":"#4b5563",fontSize:"0.8rem"}},{children:r.children}))},a:function(o){var r=o.children;o.node;var l=e(o,["children","node"]),d=l["data-cognitive-reasoning"];if(d&&(null==p?void 0:p[d]))return i(a,{children:[i("span",n({onClick:function(e){e.stopPropagation();var n=function(e){var n,o,r,i,t;if(!e)return null;var a=[];return(null!==(o=null===(n=e.aiReasoningCitation)||void 0===n?void 0:n.gpt_citation)&&void 0!==o?o:[]).forEach(function(e){var n,o,r,i,t,l,d,c,s,p,u=null!==(o=null===(n=e.customMetadata)||void 0===n?void 0:n.data_sources)&&void 0!==o?o:[],f=null!==(i=null===(r=e.customMetadata)||void 0===r?void 0:r.training_data_title)&&void 0!==i?i:[],h=null!==(l=null===(t=e.customMetadata)||void 0===t?void 0:t.paraphrase)&&void 0!==l?l:[],g=null===(d=u[0])||void 0===d?void 0:d.match(/<highlight>([\s\S]*?)<\/highlight>/),m=g?g[1].trim():null!==(c=u[0])&&void 0!==c?c:"";a.push({citation_number:Number(e.citation_number),section_ref:null!==(s=f[0])&&void 0!==s?s:"",paraphrase:null!==(p=h[0])&&void 0!==p?p:"",highlight:m})}),{block_cognitive_reasoning_html:null!==(r=e.Reasoning)&&void 0!==r?r:"",block_cognitive_gap_html:null!==(i=e.Gap)&&void 0!==i?i:"",block_cognitive_confidence:Number(null!==(t=e.Confidence_score)&&void 0!==t?t:0),block_cognitive_citations:a}}(p[d]);L(function(e){return e.open&&e.activeKey===d?{open:!1,data:null,activeKey:null}:{open:!0,data:n,activeKey:d}})},style:{color:y?"#a78bfa":"#6932E2",fontWeight:500,cursor:"pointer",transition:"all 0.2s",padding:"0 2px",position:"relative",display:"flex",alignItems:"center",gap:6,width:"fit-content"}},{children:[r||"",t("span",n({style:{cursor:"pointer",padding:"4px 2px",display:"flex",alignItems:"center",gap:2,border:y?"1px solid #334155":"1px solid #e2e8f0",borderRadius:"5px",width:"fit-content"}},{children:t(S,{sx:{fontSize:"1rem",color:y?"#94a3b8":"#475569",transition:"transform 0.2s"}})}))]})),K.open&&K.activeKey===d&&K.data&&t(h,n({component:"div",onClick:function(e){return e.stopPropagation()},sx:{display:"block",width:"fit-content",maxWidth:"100%",mt:1,mb:1,ml:0}},{children:t(_,{open:!0,onClose:T,data:K.data,styles:x})}))]});var c=!1;try{c=new URL(null==l?void 0:l.href).protocol.startsWith("http")}catch(e){c=!1}return c?t("a",n({href:null==l?void 0:l.href,style:{color:y?"#a78bfa":"#6932E2",textDecoration:"none",fontWeight:500,borderBottom:y?"1px solid #7c3aed":"1px solid #c4b5fd",transition:"border-color 0.2s, color 0.2s"},target:"_blank",rel:"noopener noreferrer",onMouseEnter:function(e){e.currentTarget.style.borderBottomColor=y?"#a78bfa":"#6932E2"},onMouseLeave:function(e){e.currentTarget.style.borderBottomColor=y?"#7c3aed":"#c4b5fd"}},{children:r})):t("span",{children:r})},sup:function(o){o.node;var r=e(o,["node"]);return t(g,n({title:r.children,placement:"top",arrow:!0},{children:t(h,n({component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",background:y?"#3730a3":"#ede9fe",color:y?"#c084fc":"#7c3aed",fontSize:"0.6rem",fontWeight:700,verticalAlign:"super",cursor:"pointer",userSelect:"none",lineHeight:1,transition:"all 0.2s","&:hover":{background:y?"#6d28d9":"#7c3aed",color:"#fff"}},"aria-label":"Info",role:"button"},{children:"i"}))}))},code:function(e){var o=e.children;return t("code",n({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.82em",color:y?"#e9d5ff":"#9333ea",background:y?"#2e1065":"#faf5ff",padding:"1.5px 5px",borderRadius:4,border:y?"1px solid #581c87":"1px solid #f3e8ff",fontWeight:500}},{children:o}))},pre:function(e){var o=e.children,r=function(e){var n;return"string"==typeof e?e:(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?(Array.isArray(e.props.children)?e.props.children:[e.props.children]).map(r).join(""):""},a=l.Children.toArray(o).map(r).join("");return i("div",n({style:{position:"relative",margin:"12px 0"}},{children:[t(M,{text:a}),t("pre",n({style:{fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace",fontSize:"0.8rem",lineHeight:1.6,color:R,background:y?"#0f172a":"#f9fafb",border:y?"1px solid #334155":"1px solid #e5e7eb",borderRadius:8,padding:"14px 16px",margin:0,overflowX:"auto",whiteSpace:"pre"}},{children:o}))]}))},img:function(o){o.node;var r=e(o,["node"]);return t("img",n({},r,{style:{maxWidth:"100%",height:"auto",borderRadius:8,margin:"8px 0",border:y?"1px solid #334155":"1px solid #e5e7eb"},loading:"lazy"}))}}},[r,W,p,K.activeKey,K.open,x,F,y,R,E]);return t(h,n({className:"pg-markdown-renderer",style:k,sx:n(n({fontSize:W,lineHeight:1.7,color:R,wordBreak:"break-word",position:"relative"},C),{"& span[style*='color'], & font[color]":y?{color:"#60a5fa !important"}:{},"& a":{color:y?"#a78bfa !important":"#6932E2 !important"},"& strong":{color:y?"#f8fafc !important":"#111827 !important"},"& h1, & h2, & h3, & h4, & h5, & h6":{color:y?"#f1f5f9 !important":"#111827 !important"}})},{children:t(u,n({components:I,rehypePlugins:[f],className:"react-markdown-renderer-with-overrides"},{children:w(B)}))}))};export{C as MarkdownRenderer,C as default};
2
2
  //# sourceMappingURL=Markdownrenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as o,useEffect as r,useRef as l}from"react";import{Box as d,Typography as c,Skeleton as a,Accordion as s,AccordionSummary as h,AccordionDetails as p,Tooltip as f,IconButton as x,Switch as u,Dialog as m,Chip as g}from"@mui/material";import v from"@mui/icons-material/ExpandMore";import b from"@mui/icons-material/Fullscreen";import y from"@mui/icons-material/Close";import S from"@mui/icons-material/NearMeOutlined";import w from"@mui/icons-material/ChevronLeft";import z from"@mui/icons-material/ChevronRight";import E from"./DependencyGraph.js";import{MarkdownRenderer as D}from"./Markdownrenderer.js";import{InternalEditor as k}from"./Internaleditor.js";var B=function(n){var r=n.text,l=n.detailedSummary,a=n.extraMetaData,s=n.isDarkMode,h=void 0!==s&&s,p=n.markdownRendererStyle,f=o(!1),x=f[0],u=f[1],m=function(e,i){void 0===i&&(i=220);var t=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(t.length<=i)return{preview:t,truncated:!1};var n=t.slice(0,i),o=n.lastIndexOf(" ");return{preview:(o>0?n.slice(0,o):n).trim(),truncated:!0}}(r),g=m.preview,v=m.truncated;return t(d,{children:i(d,x?{children:[t(D,{message:r,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),(null==l?void 0:l.trim())&&t(D,{message:l,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),t(c,e({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}:e({sx:{display:"flex",flexDirection:"column"}},{children:[i(c,e({sx:{fontSize:"0.8rem",color:h?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[g,v&&"…"]})),(v||(null==l?void 0:l.trim()))&&t(d,e({sx:{display:"flex",justifyContent:"flex-end"}},{children:t(c,e({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},M=function(n){var a=n.text,s=n.extraMetaData,h=o(!1),p=h[0],f=h[1],x=o(!1),u=x[0],m=x[1],g=l(null);return r(function(){var e=g.current;e&&m(e.scrollWidth>e.clientWidth)},[a]),t(d,e({sx:{pl:1}},{children:i(d,p?e({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[t(D,{message:a,fontSize:"0.68rem",extraMetaData:s}),t(c,e({component:"span",onClick:function(){return f(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]}):e({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[t(c,e({ref:g,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:a})),u&&t(c,e({component:"span",onClick:function(){return f(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))},C=function(C){var R,A=C.promptContent,F=C.promptTitle,W=C.isLoading,I=void 0!==W&&W,H=C.overviewSummary,P=C.functionalityOfSPB,T=void 0===P?[]:P,_=C.spbAdditionalInfo,L=C.extraMetaData,j=C.showCodePanel,O=void 0===j||j,G=C.showCollapseStrip,N=void 0===G||G,X=C.showFullscreenButton,Y=void 0===X||X,q=C.showFullscreenModal,J=void 0===q||q,K=C.showThemeToggle,Q=void 0===K||K,U=C.isDarkMode,V=void 0===U||U,Z=C.styles,$=C.className,ee=C.style,ie=C.sx,te=o(null),ne=te[0],oe=te[1],re=o(null),le=re[0],de=re[1],ce=o(""),ae=ce[0],se=ce[1],he=void 0!==(null==Z?void 0:Z.isDarkMode)?Z.isDarkMode:V,pe=o(he),fe=pe[0],xe=pe[1],ue=o(null),me=ue[0],ge=ue[1];r(function(){void 0!==(null==Z?void 0:Z.isDarkMode)&&xe(Z.isDarkMode)},[null==Z?void 0:Z.isDarkMode]);var ve=o(!1),be=ve[0],ye=ve[1],Se=o(480),we=Se[0],ze=Se[1],Ee=l(!1),De=l(null);r(function(){var e,i,t;T.length>0&&oe((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),t=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(t||"")))},[T]),r(function(){I&&oe(null)},[I]),r(function(){me&&(se(""),setTimeout(function(){return se(me.ref)},500))},[me]);return i(d,e({className:$,style:e(e({},null==Z?void 0:Z.root),ee),sx:e({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},ie)},{children:[t(d,e({sx:e({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==Z?void 0:Z.header)},{children:i(d,e({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[t(c,e({sx:e({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==Z?void 0:Z.headerTitle)},{children:F||"SPB Analysis"})),t(c,e({sx:e({fontSize:"0.7rem",color:"#9CA3AF"},null==Z?void 0:Z.headerSubtitle)},{children:ne?"Last Analyzed at ".concat(ne):""}))]}))})),i(d,e({ref:De,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[t(d,e({sx:e({width:O?be&&N?0:we:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:Ee.current?"none":"width 0.15s",borderRight:!O||be&&N?"none":"1px solid #e5e7eb"},null==Z?void 0:Z.leftPanel)},{children:i(d,e({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i(d,e({sx:e({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==Z?void 0:Z.overviewSection)},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==Z?void 0:Z.overviewTitle)},{children:"Overview"})),t(d,e({sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==Z?void 0:Z.overviewContent)},{children:(null===(R=null==H?void 0:H.overallSummary)||void 0===R?void 0:R.trim())?t(B,{text:H.overallSummary,detailedSummary:H.detailedSummary,extraMetaData:L,isDarkMode:fe,markdownRendererStyle:null==Z?void 0:Z.markdownRenderer}):i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"95%",height:14})]}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==Z?void 0:Z.functionalitySection)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.functionalityTitle)},{children:"Functionality of SPB"}))})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:T.length>0?T.map(function(n,o){return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:0===o,sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==Z?void 0:Z.functionalityItem)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[o+1,". ",n.name||n.section_name]}))})),i(p,e({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[t(D,{fontSize:"0.74rem",message:n.description||n.reason_for_inclusion||"",extraMetaData:L}),t(c,e({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),t(d,e({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:n.apb_references.map(function(n,o){var r="string"==typeof n?n:n.apb_name,l=le===r;return i(d,e({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i(d,e({onClick:function(){return function(e){le===e?(de(null),se("")):(de(e),se(""),setTimeout(function(){return se(e)},50))}(r)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i(c,e({sx:{fontSize:"0.78rem",color:l?"#5928ed":"#DB2877",fontWeight:500}},{children:[o+1,". ",r]})),t(S,{sx:{fontSize:"0.75rem",color:l?"#5928ed":"#DB2877"}})]})),"string"!=typeof n&&(n.description||n.context)&&t(M,{text:n.description||n.context||"",extraMetaData:L})]}),o)})}))]}))]}),o)}):t(d,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(n){return i(d,e({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"40%",height:16}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"80%",height:14}),t(a,{variant:"text",width:"30%",height:14})]}),n)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==Z?void 0:Z.applicabilitySection)},{children:[i(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.applicabilityTitle)},{children:"Applicability"})),t(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:t(d,e({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==_?void 0:_.when_to_apply},{label:"When NOT to apply",content:null==_?void 0:_.when_not_to_apply}].map(function(n){var o=n.label,r=n.content;return i(d,e({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:o})),r?t(D,{fontSize:"0.8rem",message:r,isDarkMode:fe,style:null==Z?void 0:Z.markdownRenderer,extraMetaData:L}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"80%",height:14}),t(a,{variant:"text",width:"90%",height:14})]})):t(c,e({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),o)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==Z?void 0:Z.specificationsSection)},{children:[i(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.specificationsTitle)},{children:"Specifications"})),t(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==_?void 0:_.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==_?void 0:_.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==_?void 0:_.output_analysis}].map(function(o){var r=o.label,l=o.tooltip,u=o.content,m="Output"===r,g=m&&u?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,t){return i.push(t.trim()),""}).trim(),code:i.join("\n\n")}}(u):null,b=g?g.text:u,y=g?g.code:"";return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===r,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i(d,e({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:r})),l&&t(f,e({title:l,placement:"top"},{children:t(d,e({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),t(p,e({sx:{px:1.25,pb:1.25,pt:0}},{children:u?i(n,{children:[b&&t(D,{fontSize:"0.8rem",message:b,isDarkMode:fe,style:null==Z?void 0:Z.markdownRenderer,extraMetaData:L}),m&&y&&i(d,e({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i(d,e({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[t(c,e({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),t(f,e({title:"Copy Code to clipboard"},{children:t(x,e({size:"small",onClick:function(){return e=y,navigator.clipboard.writeText(e);var e}},{children:t(c,e({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),t(d,e({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:t(k,{content:y,isDarkMode:fe,height:"100%",fontSize:10})}))]}))]}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"75%",height:14})]})):t(c,e({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),r)})}))]})),i(s,e({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==Z?void 0:Z.dependencyGraphSection)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.dependencyGraphTitle)},{children:"Dependency Graph"}))})),t(p,e({sx:{px:0,pb:0,pt:0}},{children:(null==_?void 0:_.dependency_graph)?i(d,e({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[t(d,e({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:t(E,{data:_.dependency_graph,isDarkMode:fe,style:null==Z?void 0:Z.dependencyGraph})})),t(c,e({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i(d,e({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[t(a,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),O&&N&&t(d,e({onClick:function(){return ye(function(e){return!e})},sx:e({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==Z?void 0:Z.collapseStrip)},{children:t(c,e({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),O&&N&&t(d,e({onClick:function(){return ye(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),Ee.current=!0;var i=function(e){if(Ee.current&&De.current){var n=De.current.getBoundingClientRect(),o=n.left,r=n.width,l=e.clientX-o;if(l<200)return ye(!0),Ee.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",t);l>.7*r||(ye(!1),ze(l))}},t=function(){Ee.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",t)},sx:e({position:"absolute",left:be?20:we+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==Z?void 0:Z.dragHandle)},{children:t(be?z:w,{sx:{fontSize:12,color:"#6b7280"}})})),O&&i(d,e({sx:e({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==Z?void 0:Z.codePanel)},{children:[i(d,e({sx:e({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==Z?void 0:Z.codePanelHeader)},{children:[t(c,e({sx:e({fontSize:13,fontWeight:600,color:"#374151"},null==Z?void 0:Z.codePanelTitle)},{children:F||"SPB Analysis"})),i(d,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[Q&&t(u,{checked:fe,onChange:function(e){return xe(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),Y&&J&&t(f,e({title:"Fullscreen",placement:"top"},{children:t(x,e({size:"small",onClick:function(){return ge({ref:ae||"",description:""})},sx:{color:"#6b7280"}},{children:t(b,{sx:{fontSize:16}})}))}))]}))]})),t(d,e({sx:e({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==Z?void 0:Z.editorContainer)},{children:t(k,{content:A,selectedTag:ae,isDarkMode:fe,height:"100%",fontSize:13})}))]}))]})),J&&i(m,e({open:!!me,onClose:function(){return ge(null)},maxWidth:!1,PaperProps:{sx:e({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==Z?void 0:Z.fullscreenModal)}},{children:[i(d,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[t(c,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),t(x,e({size:"small",onClick:function(){return ge(null)}},{children:t(y,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i(d,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i(d,e({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[t(f,e({title:"Atomic Prompt Block",placement:"top"},{children:t(g,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),t(c,e({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==me?void 0:me.ref}))]})),i(d,e({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),t(c,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==me?void 0:me.description}))]})),i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[t(c,e({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),t(c,e({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:A.split("\n").length}))]}))]}))]})),i(d,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),t(u,{checked:fe,onChange:function(e){return xe(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),t(d,e({sx:{flex:1,minHeight:0,p:1.5}},{children:t(k,{content:A,selectedTag:ae,isDarkMode:fe,height:"100%",fontSize:13})}))]}))]}))]}))]}))};export{C as default};
1
+ import{__assign as e}from"tslib";import{jsxs as i,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as r,useRef as l}from"react";import{Box as d,Typography as c,Skeleton as a,Accordion as s,AccordionSummary as h,AccordionDetails as p,Tooltip as f,IconButton as u,Switch as x,Dialog as m,Chip as g}from"@mui/material";import v from"@mui/icons-material/ExpandMore";import b from"@mui/icons-material/Fullscreen";import y from"@mui/icons-material/Close";import S from"@mui/icons-material/NearMeOutlined";import w from"@mui/icons-material/ChevronLeft";import D from"@mui/icons-material/ChevronRight";import z from"./DependencyGraph.js";import{MarkdownRenderer as E}from"./Markdownrenderer.js";import{InternalEditor as k}from"./Internaleditor.js";var B=function(t){var r=t.text,l=t.detailedSummary,a=t.extraMetaData,s=t.isDarkMode,h=void 0!==s&&s,p=t.markdownRendererStyle,f=t.cognitiveDecisioningStyles,u=o(!1),x=u[0],m=u[1],g=function(e,i){void 0===i&&(i=220);var n=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(n.length<=i)return{preview:n,truncated:!1};var t=n.slice(0,i),o=t.lastIndexOf(" ");return{preview:(o>0?t.slice(0,o):t).trim(),truncated:!0}}(r),v=g.preview,b=g.truncated;return n(d,{children:i(d,x?{children:[n(E,{message:r,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,cognitiveDecisioningStyles:f,style:p}),(null==l?void 0:l.trim())&&n(E,{message:l,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,cognitiveDecisioningStyles:f,style:p}),n(c,e({component:"span",onClick:function(){return m(!1)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}:e({sx:{display:"flex",flexDirection:"column"}},{children:[i(c,e({sx:{fontSize:"0.8rem",color:h?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[v,b&&"…"]})),(b||(null==l?void 0:l.trim()))&&n(d,e({sx:{display:"flex",justifyContent:"flex-end"}},{children:n(c,e({component:"span",onClick:function(){return m(!0)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},M=function(t){var a=t.text,s=t.extraMetaData,h=t.cognitiveDecisioningStyles,p=o(!1),f=p[0],u=p[1],x=o(!1),m=x[0],g=x[1],v=l(null);return r(function(){var e=v.current;e&&g(e.scrollWidth>e.clientWidth)},[a]),n(d,e({sx:{pl:1}},{children:i(d,f?e({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[n(E,{message:a,fontSize:"0.68rem",extraMetaData:s,cognitiveDecisioningStyles:h}),n(c,e({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]}):e({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[n(c,e({ref:v,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:a})),m&&n(c,e({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))},C=function(C){var R,A=C.promptContent,F=C.promptTitle,W=C.isLoading,I=void 0!==W&&W,H=C.overviewSummary,P=C.functionalityOfSPB,T=void 0===P?[]:P,_=C.spbAdditionalInfo,L=C.extraMetaData,j=C.showCodePanel,O=void 0===j||j,G=C.showInlineApbEditor,N=void 0===G||G,X=C.disableApbNavigation,Y=void 0!==X&&X,q=C.showCollapseStrip,J=void 0===q||q,K=C.showFullscreenButton,Q=void 0===K||K,U=C.showFullscreenModal,V=void 0===U||U,Z=C.showThemeToggle,$=void 0===Z||Z,ee=C.isDarkMode,ie=void 0===ee||ee,ne=C.styles,te=C.className,oe=C.style,re=C.sx,le=o(null),de=le[0],ce=le[1],ae=o(null),se=ae[0],he=ae[1],pe=o(""),fe=pe[0],ue=pe[1],xe=void 0!==(null==ne?void 0:ne.isDarkMode)?ne.isDarkMode:ie,me=o(xe),ge=me[0],ve=me[1],be=o(null),ye=be[0],Se=be[1];r(function(){void 0!==(null==ne?void 0:ne.isDarkMode)&&ve(ne.isDarkMode)},[null==ne?void 0:ne.isDarkMode]);var we=o(!1),De=we[0],ze=we[1],Ee=o(480),ke=Ee[0],Be=Ee[1],Me=l(!1),Ce=l(null);r(function(){var e,i,n;T.length>0&&ce((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),n=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(n||"")))},[T]),r(function(){I&&ce(null)},[I]),r(function(){ye&&(ue(""),setTimeout(function(){return ue(ye.ref)},500))},[ye]);return i(d,e({className:te,style:e(e({},null==ne?void 0:ne.root),oe),sx:e({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},re)},{children:[n(d,e({sx:e({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==ne?void 0:ne.header)},{children:i(d,e({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[n(c,e({sx:e({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==ne?void 0:ne.headerTitle)},{children:F||"SPB Analysis"})),n(c,e({sx:e({fontSize:"0.7rem",color:"#9CA3AF"},null==ne?void 0:ne.headerSubtitle)},{children:de?"Last Analyzed at ".concat(de):""}))]}))})),i(d,e({ref:Ce,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[n(d,e({sx:e({width:O?De&&J?0:ke:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:Me.current?"none":"width 0.15s",borderRight:!O||De&&J?"none":"1px solid #e5e7eb"},null==ne?void 0:ne.leftPanel)},{children:i(d,e({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i(d,e({sx:e({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==ne?void 0:ne.overviewSection)},{children:[n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==ne?void 0:ne.overviewTitle)},{children:"Overview"})),n(d,e({sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==ne?void 0:ne.overviewContent)},{children:(null===(R=null==H?void 0:H.overallSummary)||void 0===R?void 0:R.trim())?n(B,{text:H.overallSummary,detailedSummary:H.detailedSummary,extraMetaData:L,isDarkMode:ge,markdownRendererStyle:null==ne?void 0:ne.markdownRenderer,cognitiveDecisioningStyles:null==ne?void 0:ne.cognitiveDecisioning}):i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"90%",height:14}),n(a,{variant:"text",width:"95%",height:14})]}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==ne?void 0:ne.functionalitySection)},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ne?void 0:ne.functionalityTitle)},{children:"Functionality of SPB"}))})),n(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:T.length>0?T.map(function(t,o){return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:0===o,sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==ne?void 0:ne.functionalityItem)},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[o+1,". ",t.name||t.section_name]}))})),i(p,e({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[n(E,{fontSize:"0.74rem",message:t.description||t.reason_for_inclusion||"",extraMetaData:L,cognitiveDecisioningStyles:null==ne?void 0:ne.cognitiveDecisioning}),n(c,e({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),n(d,e({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:t.apb_references.map(function(t,o){var r="string"==typeof t?t:t.apb_name,l=se===r;return i(d,e({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i(d,e({onClick:Y?void 0:function(){return function(e){se===e?(he(null),ue("")):(he(e),ue(""),setTimeout(function(){return ue(e)},50))}(r)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:Y?"default":"pointer"}},{children:[i(c,e({sx:{fontSize:"0.78rem",color:l?"#5928ed":"#DB2877",fontWeight:500}},{children:[o+1,". ",r]})),!Y&&n(S,{sx:{fontSize:"0.75rem",color:l?"#5928ed":"#DB2877"}})]})),"string"!=typeof t&&(t.description||t.context)&&n(M,{text:t.description||t.context||"",extraMetaData:L,cognitiveDecisioningStyles:null==ne?void 0:ne.cognitiveDecisioning}),N&&l&&n(d,e({sx:{mt:1,height:260,border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:n(k,{content:A,selectedTag:fe,isDarkMode:ge,height:"100%",fontSize:12})}))]}),o)})}))]}))]}),o)}):n(d,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(t){return i(d,e({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"40%",height:16}),n(a,{variant:"text",width:"90%",height:14}),n(a,{variant:"text",width:"80%",height:14}),n(a,{variant:"text",width:"30%",height:14})]}),t)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==ne?void 0:ne.applicabilitySection)},{children:[i(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ne?void 0:ne.applicabilityTitle)},{children:"Applicability"})),n(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),n(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:n(d,e({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==_?void 0:_.when_to_apply},{label:"When NOT to apply",content:null==_?void 0:_.when_not_to_apply}].map(function(t){var o=t.label,r=t.content;return i(d,e({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:o})),r?n(E,{fontSize:"0.8rem",message:r,isDarkMode:ge,style:null==ne?void 0:ne.markdownRenderer,extraMetaData:L,cognitiveDecisioningStyles:null==ne?void 0:ne.cognitiveDecisioning}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"80%",height:14}),n(a,{variant:"text",width:"90%",height:14})]})):n(c,e({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),o)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==ne?void 0:ne.specificationsSection)},{children:[i(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ne?void 0:ne.specificationsTitle)},{children:"Specifications"})),n(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),n(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==_?void 0:_.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==_?void 0:_.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==_?void 0:_.output_analysis}].map(function(o){var r=o.label,l=o.tooltip,x=o.content,m="Output"===r,g=m&&x?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,n){return i.push(n.trim()),""}).trim(),code:i.join("\n\n")}}(x):null,b=g?g.text:x,y=g?g.code:"";return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===r,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i(d,e({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:r})),l&&n(f,e({title:l,placement:"top"},{children:n(d,e({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),n(p,e({sx:{px:1.25,pb:1.25,pt:0}},{children:x?i(t,{children:[b&&n(E,{fontSize:"0.8rem",message:b,isDarkMode:ge,style:null==ne?void 0:ne.markdownRenderer,extraMetaData:L,cognitiveDecisioningStyles:null==ne?void 0:ne.cognitiveDecisioning}),m&&y&&i(d,e({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i(d,e({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[n(c,e({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),n(f,e({title:"Copy Code to clipboard"},{children:n(u,e({size:"small",onClick:function(){return e=y,navigator.clipboard.writeText(e);var e}},{children:n(c,e({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),n(d,e({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:n(k,{content:y,isDarkMode:ge,height:"100%",fontSize:10})}))]}))]}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"90%",height:14}),n(a,{variant:"text",width:"75%",height:14})]})):n(c,e({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),r)})}))]})),i(s,e({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==ne?void 0:ne.dependencyGraphSection)},{children:[n(h,e({expandIcon:n(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:n(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ne?void 0:ne.dependencyGraphTitle)},{children:"Dependency Graph"}))})),n(p,e({sx:{px:0,pb:0,pt:0}},{children:(null==_?void 0:_.dependency_graph)?i(d,e({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[n(d,e({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:n(z,{data:_.dependency_graph,isDarkMode:ge,style:null==ne?void 0:ne.dependencyGraph})})),n(c,e({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i(d,e({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[n(a,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),n(a,{variant:"text",width:"100%",height:14}),n(a,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),O&&J&&n(d,e({onClick:function(){return ze(function(e){return!e})},sx:e({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==ne?void 0:ne.collapseStrip)},{children:n(c,e({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),O&&J&&n(d,e({onClick:function(){return ze(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),Me.current=!0;var i=function(e){if(Me.current&&Ce.current){var t=Ce.current.getBoundingClientRect(),o=t.left,r=t.width,l=e.clientX-o;if(l<200)return ze(!0),Me.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",n);l>.7*r||(ze(!1),Be(l))}},n=function(){Me.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)},sx:e({position:"absolute",left:De?20:ke+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==ne?void 0:ne.dragHandle)},{children:n(De?D:w,{sx:{fontSize:12,color:"#6b7280"}})})),O&&i(d,e({sx:e({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==ne?void 0:ne.codePanel)},{children:[i(d,e({sx:e({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==ne?void 0:ne.codePanelHeader)},{children:[n(c,e({sx:e({fontSize:13,fontWeight:600,color:"#374151"},null==ne?void 0:ne.codePanelTitle)},{children:F||"SPB Analysis"})),i(d,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[$&&n(x,{checked:ge,onChange:function(e){return ve(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),Q&&V&&n(f,e({title:"Fullscreen",placement:"top"},{children:n(u,e({size:"small",onClick:function(){return Se({ref:fe||"",description:""})},sx:{color:"#6b7280"}},{children:n(b,{sx:{fontSize:16}})}))}))]}))]})),n(d,e({sx:e({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==ne?void 0:ne.editorContainer)},{children:n(k,{content:A,selectedTag:fe,isDarkMode:ge,height:"100%",fontSize:13})}))]}))]})),V&&i(m,e({open:!!ye,onClose:function(){return Se(null)},maxWidth:!1,PaperProps:{sx:e({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==ne?void 0:ne.fullscreenModal)}},{children:[i(d,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[n(c,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),n(u,e({size:"small",onClick:function(){return Se(null)}},{children:n(y,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i(d,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i(d,e({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[n(f,e({title:"Atomic Prompt Block",placement:"top"},{children:n(g,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),n(c,e({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==ye?void 0:ye.ref}))]})),i(d,e({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),n(c,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==ye?void 0:ye.description}))]})),i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[n(c,e({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),n(c,e({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:A.split("\n").length}))]}))]}))]})),i(d,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[n(c,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),n(x,{checked:ge,onChange:function(e){return ve(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),n(d,e({sx:{flex:1,minHeight:0,p:1.5}},{children:n(k,{content:A,selectedTag:fe,isDarkMode:ge,height:"100%",fontSize:13})}))]}))]}))]}))]}))};export{C as default};
2
2
  //# sourceMappingURL=Spbanalysispanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/InternalChatCitationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,OAAO,qBAAqB,CAAC;AAM7B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA8CD,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,aAAa,EACb,aAAoC,EACpC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,yBAAiC,EACjC,iBAAwB,EACxB,aAAmB,EACpB,EAAE,iCAAiC,2CAsgBnC"}
1
+ {"version":3,"file":"InternalChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/InternalChatCitationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,OAAO,qBAAqB,CAAC;AAM7B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA8CD,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,aAAa,EACb,aAAoC,EACpC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,yBAAiC,EACjC,iBAAwB,EACxB,aAAmB,EACpB,EAAE,iCAAiC,2CAkhBnC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const useCompareLayout: (initialMaintainOrder: boolean, scrollContainerRef: React.RefObject<HTMLDivElement>, lhsBadgeRefs: any, rhsBadgeRefs: any, proposedSections: any[], existingSections: any[]) => {
2
3
  maintainRelativeOrder: boolean;
3
4
  setMaintainRelativeOrder: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -1 +1 @@
1
- {"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBACL,OAAO,sBACT,MAAM,SAAS,CAAC,cAAc,CAAC,gBACrC,GAAG,gBACH,GAAG,oBACC,GAAG,EAAE,oBACL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
1
+ {"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,gBAAgB,yBACL,OAAO,sBACT,MAAM,SAAS,CAAC,cAAc,CAAC,gBACrC,GAAG,gBACH,GAAG,oBACC,GAAG,EAAE,oBACL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type CSSProperties } from "react";
1
2
  export type BlockCognitiveCitation = {
2
3
  citation_number: number;
3
4
  title?: string;
@@ -5,6 +6,8 @@ export type BlockCognitiveCitation = {
5
6
  content?: string;
6
7
  paraphrase?: string;
7
8
  highlight: string | string[];
9
+ data_sources?: string[];
10
+ training_data_title?: string;
8
11
  };
9
12
  export type CognitiveReasoningData = {
10
13
  block_cognitive_reasoning_html: string;
@@ -12,11 +15,38 @@ export type CognitiveReasoningData = {
12
15
  block_cognitive_confidence: number;
13
16
  block_cognitive_citations: BlockCognitiveCitation[];
14
17
  };
18
+ export interface CognitiveReasoningPanelStyles {
19
+ container?: CSSProperties | any;
20
+ header?: CSSProperties | any;
21
+ headerIcon?: CSSProperties | any;
22
+ headerTitleText?: CSSProperties | any;
23
+ badge?: CSSProperties | any;
24
+ closeButton?: CSSProperties | any;
25
+ body?: CSSProperties | any;
26
+ accordion?: CSSProperties | any;
27
+ accordionSummary?: CSSProperties | any;
28
+ accordionDetails?: CSSProperties | any;
29
+ sectionIcon?: CSSProperties | any;
30
+ sectionTitle?: CSSProperties | any;
31
+ sectionSubtitle?: CSSProperties | any;
32
+ sectionItem?: CSSProperties | any;
33
+ indexText?: CSSProperties | any;
34
+ textContent?: CSSProperties | any;
35
+ citationLink?: CSSProperties | any;
36
+ citationContainer?: CSSProperties | any;
37
+ citationModalContainer?: CSSProperties | any;
38
+ citationRootContainer?: CSSProperties | any;
39
+ citationTitle?: CSSProperties | any;
40
+ citationBody?: CSSProperties | any;
41
+ citationDataContainer?: CSSProperties | any;
42
+ citationRuleBookContainer?: CSSProperties | any;
43
+ }
15
44
  export interface CognitiveReasoningPanelProps {
16
45
  open: boolean;
17
46
  onClose: () => void;
18
47
  data: CognitiveReasoningData | null;
48
+ styles?: CognitiveReasoningPanelStyles;
19
49
  }
20
- declare const CognitiveReasoningPanel: ({ open, onClose, data }: CognitiveReasoningPanelProps) => import("react/jsx-runtime").JSX.Element | null;
50
+ declare const CognitiveReasoningPanel: ({ open, onClose, data, styles }: CognitiveReasoningPanelProps) => import("react/jsx-runtime").JSX.Element | null;
21
51
  export default CognitiveReasoningPanel;
22
52
  //# sourceMappingURL=Cognitivereasoningpanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cognitivereasoningpanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Cognitivereasoningpanel.tsx"],"names":[],"mappings":"AAwBA,MAAM,MAAM,sBAAsB,GAAG;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACjC,8BAA8B,EAAE,MAAM,CAAC;IACvC,wBAAwB,EAAE,MAAM,CAAC;IACjC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,sBAAsB,EAAE,CAAC;CACvD,CAAC;AAEF,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACvC;AAoBD,QAAA,MAAM,uBAAuB,4BAA6B,4BAA4B,mDA2KrF,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"Cognitivereasoningpanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Cognitivereasoningpanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAwB9D,MAAM,MAAM,sBAAsB,GAAG;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACjC,8BAA8B,EAAE,MAAM,CAAC;IACvC,wBAAwB,EAAE,MAAM,CAAC;IACjC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,sBAAsB,EAAE,CAAC;CACvD,CAAC;AAEF,MAAM,WAAW,6BAA6B;IAC1C,SAAS,CAAC,EAAE,aAAa,GAAG,GAAG,CAAC;IAChC,MAAM,CAAC,EAAE,aAAa,GAAG,GAAG,CAAC;IAC7B,UAAU,CAAC,EAAE,aAAa,GAAG,GAAG,CAAC;IACjC,eAAe,CAAC,EAAE,aAAa,GAAG,G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M7F,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -34,11 +34,36 @@ export interface DependencyGraphProps {
34
34
  style?: React.CSSProperties | any;
35
35
  sx?: any;
36
36
  }
37
+ interface DependencyGraphStyles extends React.CSSProperties {
38
+ fullscreenPaper?: React.CSSProperties;
39
+ root?: React.CSSProperties;
40
+ header?: React.CSSProperties;
41
+ title?: React.CSSProperties;
42
+ subtitle?: React.CSSProperties;
43
+ controls?: React.CSSProperties;
44
+ controlButton?: React.CSSProperties;
45
+ cluster?: React.CSSProperties;
46
+ clusterLabel?: React.CSSProperties;
47
+ node?: React.CSSProperties;
48
+ selectedNode?: React.CSSProperties;
49
+ nodeIcon?: React.CSSProperties;
50
+ edge?: React.CSSProperties;
51
+ activeEdge?: React.CSSProperties;
52
+ edgeMarker?: React.CSSProperties;
53
+ nodePopup?: React.CSSProperties;
54
+ nodePopupHeader?: React.CSSProperties;
55
+ nodePopupBody?: React.CSSProperties;
56
+ popupCloseButton?: React.CSSProperties;
57
+ edgePopup?: React.CSSProperties;
58
+ edgePopupHeader?: React.CSSProperties;
59
+ edgePopupBody?: React.CSSProperties;
60
+ }
37
61
  export interface DependencyGraphInnerProps {
38
62
  data: ApiData;
39
63
  onFullscreen?: () => void;
40
64
  isFullscreen?: boolean;
41
65
  isDarkMode?: boolean;
66
+ style?: DependencyGraphStyles;
42
67
  }
43
68
  declare function DependencyGraph({ data, isDarkMode, style }: DependencyGraphProps): React.ReactElement;
44
69
  declare const _default: React.MemoExoticComponent<typeof DependencyGraph>;
@@ -1 +1 @@
1
- {"version":3,"file":"DependencyGraph.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/DependencyGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAKjF,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,OAAO;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AA8CD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,EAAE,CAAC,EAAE,GAAG,CAAC;CACV;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAosBD,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,UAAkB,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAsCtG;;AAED,wBAA2C"}
1
+ {"version":3,"file":"DependencyGraph.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/DependencyGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,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oningPanelStyles } from "./Cognitivereasoningpanel";
2
3
  export interface MarkdownRendererProps {
3
4
  message: string | undefined;
4
5
  fontSize?: React.CSSProperties["fontSize"];
@@ -6,9 +7,10 @@ export interface MarkdownRendererProps {
6
7
  extraMetaData?: Record<string, any> | null;
7
8
  /** Whether dark mode is active */
8
9
  isDarkMode?: boolean;
10
+ cognitiveDecisioningStyles?: CognitiveReasoningPanelStyles;
9
11
  style?: React.CSSProperties | any;
10
12
  sx?: any;
11
13
  }
12
- export declare const MarkdownRenderer: ({ message, fontSize, extraMetaData, isDarkMode, style, sx }: MarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const MarkdownRenderer: ({ message, fontSize, extraMetaData, isDarkMode, cognitiveDecisioningStyles, style, sx }: MarkdownRendererProps) => import("react/jsx-runtime").JSX.Element;
13
15
  export default MarkdownRenderer;
14
16
  //# sourceMappingURL=Markdownrenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdownrenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Markdownrenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAiMpE,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,EAAE,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,eAAO,MAAM,gBAAgB,gEAAyE,qBAAqB,4CA0P1H,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"Markdownrenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Markdownrenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAUpE,OAAgC,EAG5B,KAAK,6BAA6B,EACrC,MAAM,2BAA2B,CAAA;AAoLlC,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,6BAA6B,CAAC;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC;IAClC,EAAE,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,eAAO,MAAM,gBAAgB,4FAAqG,qBAAqB,4CA0PtJ,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { CognitiveReasoningPanelStyles } from "./Cognitivereasoningpanel";
2
3
  export interface SPBApbReference {
3
4
  apb_name: string;
4
5
  description?: string;
@@ -77,6 +78,8 @@ export interface SPBAnalysisPanelStyles {
77
78
  fullscreenModal?: React.CSSProperties | any;
78
79
  /** Markdown renderer custom style overrides */
79
80
  markdownRenderer?: React.CSSProperties | any;
81
+ /** Cognitive decisioning popup style overrides */
82
+ cognitiveDecisioning?: CognitiveReasoningPanelStyles;
80
83
  /** Theme mode flag inside styles object if passed */
81
84
  isDarkMode?: boolean;
82
85
  }
@@ -92,6 +95,10 @@ export interface SPBAnalysisPanelProps {
92
95
  extraMetaData?: Record<string, any> | null;
93
96
  /** Show the persistent right-side code editor panel. Defaults to true. */
94
97
  showCodePanel?: boolean;
98
+ /** Show the inline Monaco editor that expands beneath a clicked APB reference, highlighting that section. Defaults to true. */
99
+ showInlineApbEditor?: boolean;
100
+ /** When true, APB reference items are display-only: no click handler and no NearMe icon. */
101
+ disableApbNavigation?: boolean;
95
102
  /** Show the vertical collapse strip and drag handle pill. Defaults to true. */
96
103
  showCollapseStrip?: boolean;
97
104
  /** Show the Fullscreen button in the code panel header. Defaults to true. */
@@ -111,6 +118,6 @@ export interface SPBAnalysisPanelProps {
111
118
  /** Optional MUI sx prop overrides for the root container */
112
119
  sx?: any;
113
120
  }
114
- declare const SPBAnalysisPanel: ({ promptContent, promptTitle, isLoading, overviewSummary, functionalityOfSPB, spbAdditionalInfo, extraMetaData, showCodePanel, showCollapseStrip, showFullscreenButton, showFullscreenModal, showThemeToggle, isDarkMode: isDarkModeProp, styles, className, style, sx, }: SPBAnalysisPanelProps) => import("react/jsx-runtime").JSX.Element;
121
+ declare const SPBAnalysisPanel: ({ promptContent, promptTitle, isLoading, overviewSummary, functionalityOfSPB, spbAdditionalInfo, extraMetaData, showCodePanel, showInlineApbEditor, disableApbNavigation, showCollapseStrip, showFullscreenButton, showFullscreenModal, showThemeToggle, isDarkMode: isDarkModeProp, styles, className, style, sx, }: SPBAnalysisPanelProps) => import("react/jsx-runtime").JSX.Element;
115
122
  export default SPBAnalysisPanel;
116
123
  //# sourceMappingURL=Spbanalysispanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spbanalysispanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Spbanalysispanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAoB3D,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACt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EAA+E;IAC/E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,gFAAgF;IAChF,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,wHAAwH;IACxH,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAEhC,yGAAyG;IACzG,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,4DAA4D;IAC5D,EAAE,CAAC,EAAE,GAAG,CAAC;CACZ;AAgHD,QAAA,MAAM,gBAAgB,yTAoBnB,qBAAqB,4CAuavB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/citation",
3
- "version": "0.0.238",
3
+ "version": "0.0.240",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",