@viswa-test/test-citation 0.0.159 → 0.0.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/CognitiveSummaryPopup.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/LHSSectionRow.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/ScrollLockToggle.js +2 -0
- package/dist/cjs/features/CognitiveCompare/components/ScrollLockToggle.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/features/CognitiveCompare/components/CognitiveSummaryPopup.js +1 -1
- package/dist/features/CognitiveCompare/components/LHSSectionRow.js +1 -1
- package/dist/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
- package/dist/features/CognitiveCompare/components/ScrollLockToggle.js +2 -0
- package/dist/features/CognitiveCompare/components/ScrollLockToggle.js.map +1 -0
- package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
- package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
- package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
- package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
- package/dist/types/src/CommonConstants/CommonConstants.d.ts +488 -6574
- package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +3 -0
- package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/CognitiveSummaryPopup.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/components/CognitiveSummaryPopup.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/LHSSectionRow.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/ScrollLockToggle.d.ts +11 -0
- package/dist/types/src/features/CognitiveCompare/components/ScrollLockToggle.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/types/src/AutopilotStyle.d.ts +0 -2
- package/dist/types/src/AutopilotStyle.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsx as i,jsxs as e}from"react/jsx-runtime";import t,{useRef as o,useEffect as l}from"react";import{Box as r,Accordion as d,AccordionSummary as a,Typography as u,AccordionDetails as c}from"@mui/material";import{ChevronDown as s}from"lucide-react";import{MemoizedMarkdown as v}from"../hooks/memoizedMarkdown.js";import{useCompareContext as f}from"../CompareContext.js";import{hasValue as p,hasMeaningfulRedlineTags as h,stripRedlineTags as m,generateColorPalette as g,isMissingStr as x,DEVIATION_BADGE_SEPARATOR as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsx as i,jsxs as e}from"react/jsx-runtime";import t,{useRef as o,useEffect as l}from"react";import{Box as r,Accordion as d,AccordionSummary as a,Typography as u,AccordionDetails as c}from"@mui/material";import{ChevronDown as s}from"lucide-react";import{MemoizedMarkdown as v}from"../hooks/memoizedMarkdown.js";import{useCompareContext as f}from"../CompareContext.js";import{hasValue as p,hasMeaningfulRedlineTags as h,stripRedlineTags as m,generateColorPalette as g,isMissingStr as x,DEVIATION_BADGE_SEPARATOR as y}from"../CognitiveComparehelpers.js";import{DEFAULT_DEVIAION_COLOR as S}from"../CognitiveCompareConstants.js";var b=t.memo(function(t){var I,_,k,w,C,B,F,P,R,O,M=t.section,E=t.keyPath,j=t.depth,N=void 0===j?0:j,K=t.columnKey,W=void 0===K?"left":K,L=t.parentNodeId,T=void 0===L?"":L,z=t.sectionOffset,A=f(),D=A.expandedSubSections,H=A.setExpandedSubSections,G=A.maintainRelativeOrder,U=A.showDeviationBadges,V=void 0!==U&&U,q=A.proposedSections,J=A.existingSections,Q=A.treeData,X=A.deviationNumberRegistry,Y=A.connectedSections,Z=A.activeSideBySideSection,$=A.isSideBySide,nn=A.scrollSyncLocked,en=A.toggleScrollSyncLocked,tn=A.summaryPopupAnchorEl,on=A.resolvedMarkdownStyles,ln=A.getSubSectionRef,rn=A.getSubSectionCompareStyle,dn=A.getBadgeRef,an=A.openMoreFunctionsPopup,un=A.openSummaryPopup,cn=A.resetSideBySide,sn=A.setConnectedSections,vn=A.setConnectedLines,fn=A.cachedConnectedPositions,pn=A.isProposingFix,hn=A.proposingFixNodeId,mn=A.isRedlineFlow,gn=null!=Z?Z:"",xn=(null===(I=M.displayTitle)||void 0===I||I)&&p(M.title),yn=!!pn&&!!hn&&"left"===W&&M.id===hn,Sn=h(M.content),bn="boolean"==typeof mn?mn:Sn,In=Sn,_n=bn&&Sn,kn=_n?m(M.content):M.content,wn=_n?M.content:void 0,Cn=(null===(_=M.displayContent)||void 0===_||_||Sn)&&p(M.content),Bn=!xn&&!Cn,Fn=xn?M.title:Cn?"No Title Found":"No Matching Section Found",Pn=!!D[E],Rn=ln(W,E),On=E.split("-").map(Number),Mn=On[0],En=q[Mn],jn=J[Mn],Nn=E,Kn=E,Wn=Mn,Ln=Mn,Tn=function(n,i,e){if(!n||!i)return null;if(n.id===i)return{section:n,keyPath:e};for(var t=(n.subsections||[]).map(function(n,i){return{section:n,keyPath:"".concat(e,"-").concat(i)}}),o=function(){var n=t.shift();return(null==n?void 0:n.section)?n.section.id===i?{value:n}:void(n.section.subsections||[]).forEach(function(i,e){t.push({section:i,keyPath:"".concat(n.keyPath,"-").concat(e)})}):"continue"};t.length>0;){var l=o();if("object"==typeof l)return l.value}return null};if(G)if("left"===W){var zn=null===(k=null==En?void 0:En.refIndexes)||void 0===k?void 0:k[0],An=J.findIndex(function(n){return n.selfIndex===zn});-1!==An&&(jn=J[An],Ln=An)}else{var Dn=null===(w=null==jn?void 0:jn.refIndexes)||void 0===w?void 0:w[0],Hn=q.findIndex(function(n){return n.selfIndex===Dn});-1!==Hn&&(En=q[Hn],Wn=Hn)}var Gn=En,Un=jn;if(G)if("left"===W){Gn=M,Nn=E;var Vn=Tn(jn,M.id,String(Ln));if(!Vn)for(var qn=0;qn<J.length&&(qn===Ln||!(Vn=Tn(J[qn],M.id,String(qn))));qn++);Un=(null==Vn?void 0:Vn.section)||null,Kn=(null==Vn?void 0:Vn.keyPath)||""}else{Un=M,Kn=E;var Jn=Tn(En,M.id,String(Wn));if(!Jn)for(var Qn=0;Qn<q.length&&(Qn===Wn||!(Jn=Tn(q[Qn],M.id,String(Qn))));Qn++);Gn=(null==Jn?void 0:Jn.section)||null,Nn=(null==Jn?void 0:Jn.keyPath)||""}else for(var Xn=1;Xn<On.length;Xn++)(null==Gn?void 0:Gn.subsections)&&(Gn=Gn.subsections[On[Xn]]),(null==Un?void 0:Un.subsections)&&(Un=Un.subsections[On[Xn]]);var Yn=(Nn?rn(Nn):null)||rn(E),Zn=null===(C=null==Q?void 0:Q.input_index_map)||void 0===C?void 0:C[0],$n=null===(B=null==Q?void 0:Q.input_index_map)||void 0===B?void 0:B[1],ni="left"===W?$n:Zn,ii="left"===W?!Un:!Gn,ei=M.evaluationResult||(null==Gn?void 0:Gn.evaluationResult)||(null==Un?void 0:Un.evaluationResult),ti=Mn+1,oi=M.id||(null==Gn?void 0:Gn.id)||(null==Un?void 0:Un.id);if(G){var li=1,ri=new Map;if(q.forEach(function(n){!n.title&&!n.content||n.id&&ri.set(n.id,li++)}),"left"===W)ti=ri.get(null==En?void 0:En.id)||Mn+1;else{var di=q.filter(function(n){var i;return null===(i=n.refIndexes)||void 0===i?void 0:i.includes(null==jn?void 0:jn.selfIndex)});if(di.length>0)ti=ri.get(di[0].id)||Mn+1;else for(var ai=li,ui=function(n){if(!n.title&&!n.content)return"continue";var i=q.some(function(i){var e;return null===(e=i.refIndexes)||void 0===e?void 0:e.includes(n.selfIndex)});if(!i){if(n.id===(null==jn?void 0:jn.id))return ti=ai,"break";ai++}},ci=0,si=J;ci<si.length;ci++){if("break"===ui(si[ci]))break}}}var vi=null!==(R=null===(P=null===(F=null==ei?void 0:ei.evaluation_outputs)||void 0===F?void 0:F.metadata)||void 0===P?void 0:P.label_color)&&void 0!==R?R:S,fi=g(vi).highlightBg,pi=(null==ei?void 0:ei.deviations)||{},hi=Object.entries(pi).map(function(n){var i=n[0],e=n[1],t="".concat(oi).concat(y).concat(i);return{deviationKey:i,deviationMap:e,refId:t,currentIndex:X[t]}}).filter(function(n){return void 0!==n.currentIndex&&null!==n.currentIndex});hi.sort(function(n,i){return n.currentIndex-i.currentIndex});var mi=hi.map(function(i){var e,t,o,l=i.deviationKey,r=i.deviationMap,d=i.refId,a=i.currentIndex;G&&void 0!==z&&(a-=z);var u=r[T],c=x(u);if(c)u="";else if(!u)return null;var s=r[ni],v=ii||x(s),f="".concat(ti,".").concat(a),p="".concat(oi).concat(y).concat(l).concat(y).concat(Nn).concat(y).concat(Kn),h=(null==r?void 0:r.evaluation_outputs)||(null==ei?void 0:ei.evaluation_outputs),m=null!==(e=null==h?void 0:h.output_value)&&void 0!==e?e:null,S=null!==(o=null===(t=null==h?void 0:h.metadata)||void 0===t?void 0:t.label_color)&&void 0!==o?o:vi,b=g(S),I=n({},b),_=(null==r?void 0:r.deviation_summary)?{deviation_summary:r.deviation_summary||(null==ei?void 0:ei.deviation_summary),deviation_title:(null==r?void 0:r.deviation_title)||(null==ei?void 0:ei.deviation_title),deviation_impact:(null==r?void 0:r.deviation_impact)||(null==ei?void 0:ei.deviation_impact),deviation_explanation:(null==r?void 0:r.deviation_explanation)||(null==ei?void 0:ei.deviation_explanation),evaluation_outputs:h,cognitive_decisioning:(null==r?void 0:r.cognitive_decisioning)||(null==ei?void 0:ei.cognitive_decisioning)}:null,k=0,w=kn||"";if(u&&w){var C=w.split(/\n{2,}/),B=C.findIndex(function(n){return n.includes(u)});if(-1!==B){var F=Object.entries(pi).filter(function(n){n[0];var i=n[1][T];return i&&C[B].includes(i)}).sort(function(n,i){return C[B].indexOf(n[1][T])-C[B].indexOf(i[1][T])}),P=F.filter(function(n){n[0];var i=n[1][T];return i&&(i.includes(u)||u.includes(i))});P.length>1&&(k=Math.max(0,P.findIndex(function(n){return n[0]===l})))}}var R=dn(W,d);return{id:d,actionId:p,label:f,highlight:u,side:W,style:I,stackIndex:k,score:m,isConnected:Y.has(p),showScrollLockToggle:Y.has(p)||$&&Z===p||!!tn&&tn===R.current,scrollSyncLocked:nn,toggleScrollSyncLocked:en,isOrphan:v,isMissingClause:c,badgeRef:R,onClick:function(i){i.stopPropagation();var e=Gn?n(n({},Gn),{title:(null==En?void 0:En.title)||(null==Gn?void 0:Gn.title)||""}):{id:"orphan-left",title:"",content:""},t=Un?n(n({},Un),{title:(null==jn?void 0:jn.title)||(null==Un?void 0:Un.title)||""}):{id:"orphan-right",title:"",content:""};an(i,e,v,t,p,I)},onSummaryClick:function(n){n.stopPropagation(),un(n,p,v,_)}}}).filter(Boolean).sort(function(n,i){return parseFloat(n.label)-parseFloat(i.label)}),gi=V||!bn&&yn,xi=gi?mi:[],yi=gi?xi.map(function(n){return n.highlight}).filter(Boolean):[],Si=o(!1);l(function(){Pn||(Si.current=!1)},[Pn]),l(function(){if(Pn&&!Si.current){var n=setTimeout(function(){var n,i;Si.current=!0;var e=null===(i=null===(n=mi[0])||void 0===n?void 0:n.badgeRef)||void 0===i?void 0:i.current;e&&e.scrollIntoView({behavior:"smooth",block:"center"})},350);return function(){return clearTimeout(n)}}},[Pn,mi]);var bi=mi.find(function(n){return Y.has(n.actionId)}),Ii=!!bi;if(!(xn||Cn||M.subsections&&0!==M.subsections.length))return null;var _i=(null===(O=null==bi?void 0:bi.style)||void 0===O?void 0:O.badgeBorder)||(null==Yn?void 0:Yn.badgeBorder),ki=Ii&&_i?{borderRadius:"4px",outline:"2px solid ".concat(_i),outlineOffset:"1px"}:{};return i(r,xn?n({ref:Rn,sx:{mt:1,width:"100%",minWidth:0,position:"relative"}},{children:i(r,n({sx:n({width:"100%"},ki)},{children:e(d,n({disableGutters:!0,expanded:!Bn&&Pn,onChange:function(){if(!Bn){if(Pn){var i=String(Z||""),e=i.includes(Nn)||i.includes(Kn);e||Y.forEach(function(n){(String(n).includes(Nn)||String(n).includes(Kn))&&(e=!0)}),e&&(cn(),sn(new Set),vn([]),fn.current=[])}H(function(i){var e;return n(n({},i),((e={})[E]=!i[E],e))})}},sx:{mt:0,boxShadow:"none",border:Bn?"1px dashed #E2E8F0":"1px solid #EEF2F7",borderRadius:"4px !important",bgcolor:"#FFFFFF",minWidth:0,"&:before":{display:"none"}}},{children:[i(a,n({expandIcon:Bn?null:i(s,{size:14}),sx:{minHeight:"32px","& .MuiAccordionSummary-content":{my:.5,display:"grid",alignItems:"center",minWidth:0,width:"100%"}}},{children:i(u,n({component:"div",sx:{fontSize:"11px",fontWeight:600,color:Bn?"#94A3B8":"#19213D",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%",minWidth:0}},{children:Fn||"Untitled Subsection"}))})),!Bn&&e(c,n({sx:{pt:0,pb:1,minWidth:0}},{children:[Cn&&i(v,{content:kn,overlayContent:wn,sxStyles:on,deviationBadges:xi,maintainRelativeOrder:G,highlightBg:fi,suppressHighlightBg:In,highlights:yi,collisionKey:gn}),(M.subsections||[]).map(function(n,e){return i(b,{section:n,keyPath:"".concat(E,"-").concat(e),depth:N+1,columnKey:W,parentNodeId:T},"".concat(E,"-").concat(e))})]}))]}))}))}):n({ref:Rn,sx:{mt:0===N?1:.75,width:"100%",minWidth:0,position:"relative"}},{children:!Bn&&e(r,n({sx:n({width:"100%"},ki)},{children:[Cn&&i(v,{content:kn,overlayContent:wn,sxStyles:on,deviationBadges:xi,maintainRelativeOrder:G,highlightBg:fi,suppressHighlightBg:In,highlights:yi,collisionKey:gn}),(M.subsections||[]).map(function(n,e){return i(b,{section:n,keyPath:"".concat(E,"-").concat(e),depth:N+1,columnKey:W,parentNodeId:T,sectionOffset:z},"".concat(E,"-").concat(e))})]}))}))});export{b as default};
|
|
2
2
|
//# sourceMappingURL=SubSectionAccordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n,__rest as e}from"tslib";import{jsx as t,jsxs as r,Fragment as i}from"react/jsx-runtime";import{Box as o,Typography as a}from"@mui/material";import l,{useRef as c,useMemo as d,useLayoutEffect as s}from"react";import{DEFAULT_DEVIAION_COLOR as u}from"../CognitiveCompareConstants.js";import{EllipsisVertical as h}from"lucide-react";import p from"react-markdown";import{safeStringify as f,mixHexColors as g,areMarkdownPropsEqual as v}from"../CognitiveComparehelpers.js";import m from"rehype-raw";var x=l.memo(function(v){var x=v.content,b=v.overlayContent,y=v.sxStyles,C=v.deviationBadges,E=void 0===C?[]:C,F=v.highlights,S=void 0===F?[]:F,k=v.maintainRelativeOrder,w=void 0===k||k,B=v.highlightBg,A=v.suppressHighlightBg,T=void 0!==A&&A,I=v.collisionKey,O=c(null),z=!!b,D=d(function(){return E.reduce(function(e,t){var r;return n(n({},e),((r={})[t.id]=t,r))},{})},[E]),j=function(e,t){return l.Children.map(e,function(e){var r;if(!l.isValidElement(e))return e;var i=(null===(r=e.props)||void 0===r?void 0:r.children)?j(e.props.children,t):e.props.children,o=l.cloneElement(e,n(n({},e.props),{children:i}));return t(o)})},N=d(function(){return{mark:function(r){var i,o,a,l,c=r.children,d=e(r,["children"]),s=d["data-badge-id"],u=s?D[s]:null,h=d["data-highlight-color"],p=null!==(l=null!==(o=null!=h?h:null===(i=null==u?void 0:u.style)||void 0===i?void 0:i.highlightBg)&&void 0!==o?o:null===(a=null==u?void 0:u.style)||void 0===a?void 0:a.badgeBg)&&void 0!==l?l:B,f=d.isSuggestedDeviationFix||T;return t("span",n({style:n(n(n({},f?{}:{backgroundColor:p}),{borderRadius:"2px",display:"inline",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone",backgroundClip:"padding-box",padding:"0 1px"}),z?{color:"transparent"}:{})},{children:c}))},span:function(i){var a,l,c,d,s,p,f=i.children,g=e(i,["children"]),v=g["data-badge-id"];if(!v)return t("span",n({},g,{children:f}));var m=D[v];if(!m)return t("span",n({},g,{children:f}));var x="number"==typeof m.stackIndex?m.stackIndex:0,b="translateY(calc(-20% + ".concat(12*x,"px + var(--badge-nudge, 0px)))");return r(o,n({component:"span",sx:{position:"static",display:"inline"}},{children:[r(o,n({ref:m.badgeRef,className:"deviation-badge","data-side":m.side||"right",sx:n(n({fontStyle:"normal",position:"absolute",zIndex:30+x,display:"inline-flex",alignItems:"stretch",fontSize:"10px",bgcolor:(null===(a=m.style)||void 0===a?void 0:a.badgeBg)||"#EEF2FF",color:(null===(l=m.style)||void 0===l?void 0:l.badgeText)||u,border:"1px solid ".concat((null===(c=m.style)||void 0===c?void 0:c.badgeBorder)||"#C7D2FE"),borderRadius:"12px",fontWeight:600,whiteSpace:"nowrap",boxShadow:"0 1px 3px rgba(0,0,0,0.07)",overflow:"hidden",transition:"none"},"left"===m.side?{right:"-16px",transform:"".concat(b," translateX(calc(100% + 8px))")}:{left:"-16px",transform:"".concat(b," translateX(calc(-100% - 8px))")}),m.isConnected&&m.style&&{outline:"2px solid ".concat(m.style.badgeBorder),outlineOffset:"1px"})},{children:[r(o,n({onClick:function(n){n.stopPropagation(),m.onSummaryClick&&m.onSummaryClick(n)},sx:{display:"flex",alignItems:"center",px:1,py:.3,cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.04)"}}},{children:[t(o,n({component:"span",sx:{fontSize:"10px",fontWeight:700}},{children:m.label})),("left"===m.side||m.isOrphan)&&t(o,n({component:"span",sx:{fontSize:"10px",pl:.5,ml:.5,borderLeft:"1px solid ".concat((null===(d=m.style)||void 0===d?void 0:d.badgeBorder)||"#C7D2FE")}},{children:null!=m.score&&"N/A"!==m.score&&"NA"!==m.score&&0!==m.score?"".concat(m.score):"N/A"===m.score||"NA"===m.score?"N/A":"Same"}))]})),("left"===m.side||m.isOrphan)&&t(o,n({onClick:function(n){n.stopPropagation(),m.onClick&&m.onClick(n)},sx:{display:"flex",alignItems:"center",px:.5,borderLeft:"1px solid ".concat((null===(s=m.style)||void 0===s?void 0:s.badgeBorder)||"#C7D2FE"),cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.06)"}}},{children:t(h,{size:12,color:(null===(p=m.style)||void 0===p?void 0:p.badgeText)||"#3730A3"})}))]})),f]}))},updated:function(n){var r=n.children;return e(n,["children"]),t(i,{children:r})},deleted:function(r){var i=r.children;e(r,["children"]),console.log("nitish: ",i);var o=j(i,function(n){return l.cloneElement(n,{isSuggestedDeviationFix:!0})});return t("span",n({style:{boxShadow:"inset 0 1px 0 #EF4444, inset 0 -1px 0 #EF4444",backgroundColor:"#FCCCCC",textDecoration:"line-through"}},{children:o}))},changed:function(r){var i=r.children;e(r,["children"]);var o=j(i,function(n){return l.cloneElement(n,{isSuggestedDeviationFix:!0})});return t("span",n({style:{boxShadow:"inset 0 1px 0 #2F59FF, inset 0 -1px 0 #2F59FF",backgroundColor:"#D5E8FF"}},{children:o}))}}},[D,w,B,z,T]),R=function(n){return n?n.replace(/\\([''])/g,"$1").replace(/\\n/g,"\n").replace(/\r\n/g,"\n").split(/(\n{2,})/).map(function(n){return n.startsWith("\n")?n:n.replace(/\n/g," ")}).join(""):""},P=d(function(){return E.map(function(n){return{id:n.id,connected:n.isConnected,stackIndex:n.stackIndex,size:n.size}})},[E]),W=function(n){return n.replace(/[\.,;:]/g," ")},$=d(function(){var e=R(f(x||"")),t=T?W(e):e,r=(E||[]).map(function(n){var e,t;return{id:null==n?void 0:n.id,highlight:R((null==n?void 0:n.highlight)||""),highlightColor:(null===(e=null==n?void 0:n.style)||void 0===e?void 0:e.highlightBg)||(null===(t=null==n?void 0:n.style)||void 0===t?void 0:t.badgeBg)||B}}).filter(function(n){return n.id&&n.highlight}),i={};r.forEach(function(n){i[n.highlight]||(i[n.highlight]=[]),i[n.highlight].push(n)});var o=function(n,e){void 0===n&&(n="");var t=e?' data-highlight-color="'.concat(e,'"'):"";return'<mark data-badge-id="'.concat(n,'"').concat(t,">")},a=function(n){return'<span data-badge-id="'.concat(n,'">')},l=[];Object.entries(i).forEach(function(n){var r=n[0],i=n[1],o=e.indexOf(r),a=!1;if(-1===o&&T){var c=W(r);-1!==(o=t.indexOf(c))&&(a=!0)}if(-1!==o){for(var d=i[0].highlightColor,s=1;s<i.length;s++)d=g(d,i[s].highlightColor);l.push({highlight:r,start:o,end:o+r.length,badges:i,color:d,usedLooseMatch:a})}}),l.sort(function(n,e){return n.start-e.start||e.end-n.end});var c=[],d={};l.forEach(function(n,e){for(var t=n.start,r=n.end,i=0,o=c;i<o.length;i++){var a=o[i],l=a.start,s=a.end,u=t<s&&r>s&&t>=l,h=t<l&&r>l&&r<=s;if(t>=l&&r<=s){n.orphaned=!0,d[e]=a.matchIdx;break}u&&(t=s),h&&(r=l)}n.trimmedStart=t,n.trimmedEnd=r,!n.orphaned&&t<r&&c.push({start:t,end:r,matchIdx:e})});var s={};Object.entries(d).forEach(function(n){var e=n[0],t=n[1],r=Number(e);s[t]||(s[t]=[]),s[t].push(r)});var u=function(n,e,t){void 0===e&&(e="");var r=n.startsWith("\n\n"),i=n.endsWith("\n\n"),a=n.split(/(\n{2,})/).map(function(n,a,l){if(/^\n{2,}$/.test(n))return n;if(!n.trim())return n;var c=0===a||1===a&&/^\n{2,}$/.test(l[0]),d=a===l.length-1||a===l.length-2&&/^\n{2,}$/.test(l[l.length-1]);return r&&c||i&&d?n:function(n,e,t){var r,i,a;void 0===e&&(e="");var l=n.match(/^(\s*)([\s\S]*?)(\s*)$/);if(!l)return n;var c=null!==(r=l[1])&&void 0!==r?r:"",d=null!==(i=l[2])&&void 0!==i?i:"",s=null!==(a=l[3])&&void 0!==a?a:"";return d?c+o(e,t)+d+"</mark>"+s:n}(n,e,t)}).join("");return a.replace(/^\n{2,}/,"").replace(/\n{2,}$/,"")},h=l.map(function(e,t){return n(n({},e),{idx:t})}).filter(function(n){return!n.orphaned}).sort(function(n,e){var t,r;return(null!==(t=e.trimmedStart)&&void 0!==t?t:e.start)-(null!==(r=n.trimmedStart)&&void 0!==r?r:n.start)});h.forEach(function(n){var t,r,i=null!==(t=n.trimmedStart)&&void 0!==t?t:n.start,o=null!==(r=n.trimmedEnd)&&void 0!==r?r:n.end;if(!(i>=o)){var c=e.slice(i,o),d=function(n,e,t,r){if(!t.length)return n;var i=t.map(function(n){return l[n]}).sort(function(n,e){return n.start-e.start}),o="",c=0;return i.forEach(function(t){var i=t.start-e,l=t.end-e,d=g(r,t.color);o+=n.slice(c,i);var s="",h="";t.badges.forEach(function(n){s+=a(n.id),h="</span>"+h}),o+=s+u(n.slice(i,l),t.badges[0].id,d)+h,c=l}),o+=n.slice(c)}(n.usedLooseMatch||i!==n.start||o!==n.end?c:n.highlight,n.start,s[n.idx]||[],n.color),h=u(d,n.badges[0].id,n.color),p="",f="";n.badges.forEach(function(n){p+=a(n.id),f="</span>"+f});var v=p+h+f;e=e.slice(0,i)+v+e.slice(o)}});var p=new Set(Object.keys(i));return S.forEach(function(n){if(n){var r=R(n);if(r&&!p.has(r)){var i=T?t.indexOf(W(r)):e.indexOf(r);if(-1!==i){var a=e.slice(0,i);if((a.match(/</g)||[]).length===(a.match(/>/g)||[]).length){var l=o("","")+r+"</mark>";e=e.slice(0,i)+l+e.slice(i+r.length)}}}}}),e},[x,E,S,B,T]),q=d(function(){return b?R(f(b||"")):""},[b]),L=!!b,M=n(n(n(n({},y),{position:"relative",overflow:"visible",whiteSpace:"pre-wrap",gridArea:"1 / 1",zIndex:2}),L?{color:"transparent"}:{}),{"& p, & li, & ul, & ol":{position:"static",overflow:"visible",whiteSpace:"pre-wrap"},"& *":{fontFamily:"inherit"}}),X=n(n({},y),{position:"relative",overflow:"visible",whiteSpace:"pre-wrap",gridArea:"1 / 1",zIndex:1,pointerEvents:"none","& p, & li, & ul, & ol":{position:"static",overflow:"visible",whiteSpace:"pre-wrap"},"& *":{fontFamily:"inherit"}});return s(function(){if(O.current){var n=function(){var n=Array.from(O.current.querySelectorAll(".deviation-badge"));if(0!==n.length){n.forEach(function(n){n.style.setProperty("--badge-nudge","0px")});var e=n.filter(function(n){return"left"===n.dataset.side}),t=n.filter(function(n){return"left"!==n.dataset.side}),r=O.current.getBoundingClientRect(),i=r.bottom-4,o=r.top+4,a=function(n){if(0!==n.length){var e=n.map(function(n){var e=n.getBoundingClientRect();return{el:n,naturalTop:e.top,height:e.height,currentTop:e.top}});e.sort(function(n,e){return n.naturalTop-e.naturalTop});var t=[],r=[];e.forEach(function(n){if(0===r.length)r.push(n);else{var e=r[r.length-1],i=e.currentTop+e.height;n.naturalTop<i+8?(n.currentTop=i+8,r.push(n)):(t.push(r),r=[n])}}),r.length>0&&t.push(r),t.forEach(function(n){var e=n[n.length-1],t=e.currentTop+e.height;if(t>i){var r=t-i,a=n[0].currentTop-o,l=Math.max(0,Math.min(r,a));n.forEach(function(n){n.currentTop-=l})}}),t.flat().forEach(function(n){var e=n.currentTop-n.naturalTop;n.el.style.setProperty("--badge-nudge","".concat(e,"px"))})}};a(e),a(t)}},e=requestAnimationFrame(function(){requestAnimationFrame(function(){n()})}),t=new ResizeObserver(function(){requestAnimationFrame(n)});return t.observe(O.current),function(){t.disconnect(),cancelAnimationFrame(e)}}},[$,I,P]),r(o,n({ref:O,sx:{position:"relative",display:"grid"}},{children:[t(a,n({component:"div",sx:n(n({},M),{padding:"3px"})},{children:t(p,n({components:N,rehypePlugins:[m]},{children:f($).replace(/\\n/g,"\n")}))})),L&&t(a,n({component:"div",sx:X},{children:t(p,n({components:N,rehypePlugins:[m]},{children:f(q).replace(/\\n/g,"\n")}))}))]}))},v);export{x as MemoizedMarkdown};
|
|
1
|
+
import{__assign as n,__rest as e}from"tslib";import{jsx as r,jsxs as t,Fragment as i}from"react/jsx-runtime";import{Box as o,Typography as l}from"@mui/material";import a,{useRef as c,useMemo as d,useLayoutEffect as s}from"react";import{DEFAULT_DEVIAION_COLOR as u}from"../CognitiveCompareConstants.js";import{EllipsisVertical as h}from"lucide-react";import p from"react-markdown";import{safeStringify as g,mixHexColors as f,areMarkdownPropsEqual as v}from"../CognitiveComparehelpers.js";import m from"rehype-raw";import x from"remark-gfm";import b from"../components/ScrollLockToggle.js";var y=a.memo(function(v){var y=v.content,E=v.overlayContent,C=v.sxStyles,k=v.deviationBadges,S=void 0===k?[]:k,F=v.highlights,w=void 0===F?[]:F,B=v.maintainRelativeOrder,A=void 0===B||B,T=v.highlightBg,z=v.suppressHighlightBg,I=void 0!==z&&z,O=v.collisionKey,D=c(null),j=!!E,L=d(function(){return S.reduce(function(e,r){var t;return n(n({},e),((t={})[r.id]=r,t))},{})},[S]),P=function(e,r){return a.Children.map(e,function(e){var t;if(!a.isValidElement(e))return e;var i=(null===(t=e.props)||void 0===t?void 0:t.children)?P(e.props.children,r):e.props.children,o=a.cloneElement(e,n(n({},e.props),{children:i}));return r(o)})},N=d(function(){return{mark:function(t){var i,o,l,a,c=t.children,d=e(t,["children"]),s=d["data-badge-id"],u=s?L[s]:null,h=d["data-highlight-color"],p=null!==(a=null!==(o=null!=h?h:null===(i=null==u?void 0:u.style)||void 0===i?void 0:i.highlightBg)&&void 0!==o?o:null===(l=null==u?void 0:u.style)||void 0===l?void 0:l.badgeBg)&&void 0!==a?a:T,g=d.isSuggestedDeviationFix||I;return r("span",n({style:n(n(n({},g?{}:{backgroundColor:p}),{borderRadius:"2px",display:"inline",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone",backgroundClip:"padding-box",padding:"0 1px"}),j?{color:"transparent"}:{})},{children:c}))},span:function(i){var l,a,c,d,s,p,g,f,v=i.children,m=e(i,["children"]),x=m["data-badge-id"];if(!x)return r("span",n({},m,{children:v}));var y=L[x];if(!y)return r("span",n({},m,{children:v}));var E="number"==typeof y.stackIndex?y.stackIndex:0,C="translateY(calc(-20% + ".concat(12*E,"px + var(--badge-nudge, 0px)))");return t(o,n({component:"span",sx:{position:"static",display:"inline"}},{children:[t(o,n({ref:y.badgeRef,className:"deviation-badge","data-side":y.side||"right",sx:n(n({fontStyle:"normal",position:"absolute",zIndex:30+E,display:"inline-flex",alignItems:"stretch",fontSize:"10px",bgcolor:(null===(l=y.style)||void 0===l?void 0:l.badgeBg)||"#EEF2FF",color:(null===(a=y.style)||void 0===a?void 0:a.badgeText)||u,border:"1px solid ".concat((null===(c=y.style)||void 0===c?void 0:c.badgeBorder)||"#C7D2FE"),borderRadius:"12px",fontWeight:600,whiteSpace:"nowrap",boxShadow:"0 1px 3px rgba(0,0,0,0.07)",overflow:"hidden",transition:"none"},"left"===y.side?{right:"-16px",transform:"".concat(C," translateX(calc(100% + 8px))")}:{left:"-16px",transform:"".concat(C," translateX(calc(-100% - 8px))")}),y.isConnected&&y.style&&{outline:"2px solid ".concat(y.style.badgeBorder),outlineOffset:"1px"})},{children:[t(o,n({onClick:function(n){n.stopPropagation(),y.onSummaryClick&&y.onSummaryClick(n)},sx:{display:"flex",alignItems:"center",px:1,py:.3,cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.04)"}}},{children:[r(o,n({component:"span",sx:{fontSize:"10px",fontWeight:700}},{children:y.label})),("left"===y.side||y.isOrphan)&&r(o,n({component:"span",sx:{fontSize:"10px",pl:.5,ml:.5,borderLeft:"1px solid ".concat((null===(d=y.style)||void 0===d?void 0:d.badgeBorder)||"#C7D2FE")}},{children:null!=y.score&&"N/A"!==y.score&&"NA"!==y.score&&0!==y.score?"".concat(y.score):"N/A"===y.score||"NA"===y.score?"N/A":"Same"}))]})),("left"===y.side||y.isOrphan)&&t(o,n({onClick:function(n){n.stopPropagation(),y.onClick&&y.onClick(n)},sx:{display:"flex",alignItems:"center",px:.5,borderLeft:"1px solid ".concat((null===(s=y.style)||void 0===s?void 0:s.badgeBorder)||"#C7D2FE"),cursor:"pointer","&:hover":{bgcolor:"rgba(0,0,0,0.06)"}}},{children:[r(h,{size:12,color:(null===(p=y.style)||void 0===p?void 0:p.badgeText)||"#3730A3"}),y.showScrollLockToggle&&r(b,{locked:!!y.scrollSyncLocked,onToggle:y.toggleScrollSyncLocked,color:(null===(g=y.style)||void 0===g?void 0:g.badgeText)||"#3730A3",borderColor:(null===(f=y.style)||void 0===f?void 0:f.badgeBorder)||"#C7D2FE",size:12})]}))]})),v]}))},table:function(e){var t=e.children;return r(o,n({component:"table",sx:{width:"100%",borderCollapse:"collapse",my:1,fontSize:"inherit"}},{children:t}))},thead:function(e){var t=e.children;return r(o,n({component:"thead"},{children:t}))},tbody:function(e){var t=e.children;return r(o,n({component:"tbody"},{children:t}))},tr:function(e){var t=e.children;return r(o,n({component:"tr",sx:{borderBotttom:"1px solid #E5E7EB"}},{children:t}))},th:function(e){var t=e.children;return r(o,n({component:"th",sx:{border:"1px solid #E5E7EB",padding:"8px",textAlign:"left",fontWeight:600,backgroundColor:"#F9FAFB"}},{children:t}))},td:function(e){var t=e.children;return r(o,n({component:"td",sx:{border:"1px solid #E5E7EB",padding:"8px",verticalAlign:"top"}},{children:t}))},updated:function(n){var t=n.children;return e(n,["children"]),r(i,{children:t})},deleted:function(t){var i=t.children;e(t,["children"]),console.log("nitish: ",i);var o=P(i,function(n){return a.cloneElement(n,{isSuggestedDeviationFix:!0})});return r("span",n({style:{boxShadow:"inset 0 1px 0 #EF4444, inset 0 -1px 0 #EF4444",backgroundColor:"#FCCCCC",textDecoration:"line-through"}},{children:o}))},changed:function(t){var i=t.children;e(t,["children"]);var o=P(i,function(n){return a.cloneElement(n,{isSuggestedDeviationFix:!0})});return r("span",n({style:{boxShadow:"inset 0 1px 0 #2F59FF, inset 0 -1px 0 #2F59FF",backgroundColor:"#D5E8FF"}},{children:o}))}}},[L,A,T,j,I]),R=function(n){if(!n)return"";var e=n.replace(/\\([''])/g,"$1").replace(/\\n/g,"\n").replace(/\r\n/g,"\n");return/\|.*\|/.test(e)&&/\|[-:\s]+\|/.test(e)?e.replace(/(\|.*\|)\n\s*\n(?=\|)/g,"$1\n"):e.split(/(\n{2,})/).map(function(n){return n.startsWith("\n")?n:n.replace(/\n/g," ")}).join("")},W=d(function(){return S.map(function(n){return{id:n.id,connected:n.isConnected,stackIndex:n.stackIndex,size:n.size}})},[S]),$=function(n){return n.replace(/[\.,;:]/g," ")},q=d(function(){var e=R(g(y||"")),r=I?$(e):e,t=(S||[]).map(function(n){var e,r;return{id:null==n?void 0:n.id,highlight:R((null==n?void 0:n.highlight)||""),highlightColor:(null===(e=null==n?void 0:n.style)||void 0===e?void 0:e.highlightBg)||(null===(r=null==n?void 0:n.style)||void 0===r?void 0:r.badgeBg)||T}}).filter(function(n){return n.id&&n.highlight}),i={};t.forEach(function(n){i[n.highlight]||(i[n.highlight]=[]),i[n.highlight].push(n)});var o=function(n,e){void 0===n&&(n="");var r=e?' data-highlight-color="'.concat(e,'"'):"";return'<mark data-badge-id="'.concat(n,'"').concat(r,">")},l=function(n){return'<span data-badge-id="'.concat(n,'">')},a=[];Object.entries(i).forEach(function(n){var t=n[0],i=n[1],o=e.indexOf(t),l=!1;if(-1===o&&I){var c=$(t);-1!==(o=r.indexOf(c))&&(l=!0)}if(-1!==o){for(var d=i[0].highlightColor,s=1;s<i.length;s++)d=f(d,i[s].highlightColor);a.push({highlight:t,start:o,end:o+t.length,badges:i,color:d,usedLooseMatch:l})}}),a.sort(function(n,e){return n.start-e.start||e.end-n.end});var c=[],d={};a.forEach(function(n,e){for(var r=n.start,t=n.end,i=0,o=c;i<o.length;i++){var l=o[i],a=l.start,s=l.end,u=r<s&&t>s&&r>=a,h=r<a&&t>a&&t<=s;if(r>=a&&t<=s){n.orphaned=!0,d[e]=l.matchIdx;break}u&&(r=s),h&&(t=a)}n.trimmedStart=r,n.trimmedEnd=t,!n.orphaned&&r<t&&c.push({start:r,end:t,matchIdx:e})});var s={};Object.entries(d).forEach(function(n){var e=n[0],r=n[1],t=Number(e);s[r]||(s[r]=[]),s[r].push(t)});var u=function(n,e,r){void 0===e&&(e="");var t=n.startsWith("\n\n"),i=n.endsWith("\n\n"),l=n.split(/(\n{2,})/).map(function(n,l,a){if(/^\n{2,}$/.test(n))return n;if(!n.trim())return n;var c=0===l||1===l&&/^\n{2,}$/.test(a[0]),d=l===a.length-1||l===a.length-2&&/^\n{2,}$/.test(a[a.length-1]);return t&&c||i&&d?n:function(n,e,r){var t,i,l;void 0===e&&(e="");var a=n.match(/^(\s*)([\s\S]*?)(\s*)$/);if(!a)return n;var c=null!==(t=a[1])&&void 0!==t?t:"",d=null!==(i=a[2])&&void 0!==i?i:"",s=null!==(l=a[3])&&void 0!==l?l:"";return d?c+o(e,r)+d+"</mark>"+s:n}(n,e,r)}).join("");return l.replace(/^\n{2,}/,"").replace(/\n{2,}$/,"")},h=a.map(function(e,r){return n(n({},e),{idx:r})}).filter(function(n){return!n.orphaned}).sort(function(n,e){var r,t;return(null!==(r=e.trimmedStart)&&void 0!==r?r:e.start)-(null!==(t=n.trimmedStart)&&void 0!==t?t:n.start)});h.forEach(function(n){var r,t,i=null!==(r=n.trimmedStart)&&void 0!==r?r:n.start,o=null!==(t=n.trimmedEnd)&&void 0!==t?t:n.end;if(!(i>=o)){var c=e.slice(i,o),d=function(n,e,r,t){if(!r.length)return n;var i=r.map(function(n){return a[n]}).sort(function(n,e){return n.start-e.start}),o="",c=0;return i.forEach(function(r){var i=r.start-e,a=r.end-e,d=f(t,r.color);o+=n.slice(c,i);var s="",h="";r.badges.forEach(function(n){s+=l(n.id),h="</span>"+h}),o+=s+u(n.slice(i,a),r.badges[0].id,d)+h,c=a}),o+=n.slice(c)}(n.usedLooseMatch||i!==n.start||o!==n.end?c:n.highlight,n.start,s[n.idx]||[],n.color),h=u(d,n.badges[0].id,n.color),p="",g="";n.badges.forEach(function(n){p+=l(n.id),g="</span>"+g});var v=p+h+g;e=e.slice(0,i)+v+e.slice(o)}});var p=new Set(Object.keys(i));return w.forEach(function(n){if(n){var t=R(n);if(t&&!p.has(t)){var i=I?r.indexOf($(t)):e.indexOf(t);if(-1!==i){var l=e.slice(0,i);if((l.match(/</g)||[]).length===(l.match(/>/g)||[]).length){var a=o("","")+t+"</mark>";e=e.slice(0,i)+a+e.slice(i+t.length)}}}}}),e},[y,S,w,T,I]),M=d(function(){return E?R(g(E||"")):""},[E]),X=!!E,H=n(n(n(n({},C),{position:"relative",overflow:"visible",whiteSpace:"normal",gridArea:"1 / 1",zIndex:2}),X?{color:"transparent"}:{}),{"& p, & li, & ul, & ol":{position:"static",overflow:"visible",whiteSpace:"pre-wrap"},"& *":{fontFamily:"inherit"}}),K=n(n({},C),{position:"relative",overflow:"visible",whiteSpace:"pre-wrap",gridArea:"1 / 1",zIndex:1,pointerEvents:"none","& p, & li, & ul, & ol":{position:"static",overflow:"visible",whiteSpace:"pre-wrap"},"& *":{fontFamily:"inherit"}});return s(function(){if(D.current){var n=function(){var n=Array.from(D.current.querySelectorAll(".deviation-badge"));if(0!==n.length){n.forEach(function(n){n.style.setProperty("--badge-nudge","0px")});var e=n.filter(function(n){return"left"===n.dataset.side}),r=n.filter(function(n){return"left"!==n.dataset.side}),t=D.current.getBoundingClientRect(),i=t.bottom-4,o=t.top+4,l=function(n){if(0!==n.length){var e=n.map(function(n){var e=n.getBoundingClientRect();return{el:n,naturalTop:e.top,height:e.height,currentTop:e.top}});e.sort(function(n,e){return n.naturalTop-e.naturalTop});var r=[],t=[];e.forEach(function(n){if(0===t.length)t.push(n);else{var e=t[t.length-1],i=e.currentTop+e.height;n.naturalTop<i+8?(n.currentTop=i+8,t.push(n)):(r.push(t),t=[n])}}),t.length>0&&r.push(t),r.forEach(function(n){var e=n[n.length-1],r=e.currentTop+e.height;if(r>i){var t=r-i,l=n[0].currentTop-o,a=Math.max(0,Math.min(t,l));n.forEach(function(n){n.currentTop-=a})}}),r.flat().forEach(function(n){var e=n.currentTop-n.naturalTop;n.el.style.setProperty("--badge-nudge","".concat(e,"px"))})}};l(e),l(r)}},e=requestAnimationFrame(function(){requestAnimationFrame(function(){n()})}),r=new ResizeObserver(function(){requestAnimationFrame(n)});return r.observe(D.current),function(){r.disconnect(),cancelAnimationFrame(e)}}},[q,O,W]),t(o,n({ref:D,sx:{position:"relative",display:"grid"}},{children:[r(l,n({component:"div",sx:n(n({},H),{padding:"3px"})},{children:r(p,n({components:N,remarkPlugins:[x],rehypePlugins:[m]},{children:g(q).replace(/\\n/g,"\n")}))})),X&&r(l,n({component:"div",sx:K},{children:r(p,n({components:N,remarkPlugins:[x],rehypePlugins:[m]},{children:g(M).replace(/\\n/g,"\n")}))}))]}))},v);export{y as MemoizedMarkdown};
|
|
2
2
|
//# sourceMappingURL=memoizedMarkdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as t,useRef as e,useCallback as n,useEffect as i}from"react";import{DEVIATION_BADGE_SEPARATOR as r,hasValue as c,getBentArrowPath as o}from"../CognitiveComparehelpers.js";var l=function(l){var u=l.containerRef,a=l.leftContainerRef,d=l.rightContainerRef;l.svgContainerRef;var v=l.pathRefs,s=l.leftHeaderRef,h=l.rightHeaderRef,g=l.proposedSections,f=l.existingSections,p=l.visibleFields,y=l.leftRefs,x=l.rightRefs,R=l.sectionLeftRefs,m=l.sectionRightRefs,C=l.subSectionLeftRefs,B=l.subSectionRightRefs,S=l.lhsBadgeRefs,b=l.rhsBadgeRefs;l.sectionRowRefs;var M=l.expandedSections,L=l.expandedSubSections,I=l.connectedSections,T=l.isSideBySide,H=l.activeSideBySideSection,E=l.maintainRelativeOrder,A=l.cognitiveMap,D=l.getSectionCompareStyle,k=l.getSubSectionCompareStyle,Y=l.getDeviationStyleByKey,w=l.isArrowVisible,O=l.isAnimatingRef,j=l.isSideBySideRef,P=l.sideBySideCacheRef,F=l.sideBySideLineRef,z=l.activeSideBySideSectionRef;l.activeSideBySideRightSectionRef;var N=l.connectedLines,K=l.setConnectedLines,q=l.cachedConnectedPositions,V=l.calculateLinesRef,G=l.resizeTimerRef,J=l.scrollLock,Q=l.handleResizeRef,U=l.activeProposed,W=l.existingRule,X=l.analysisData,Z=l.pendingScrollTargetRef,$=l.pendingScrollCallbackRef,_=l.resolvedComparisonConfig,tt=l.getFieldData,et=t([]),nt=et[0],it=et[1],rt=t(null),ct=rt[0],ot=rt[1],lt=t([]),ut=lt[0],at=lt[1],dt=null!=N?N:ut,vt=null!=K?K:at,st=t({width:0,height:0}),ht=st[0],gt=st[1],ft=e(!1),pt=e(!1),yt=e(null),xt=e([]),Rt=null!=q?q:xt,mt=n(function(){var t,e,n,i,l,v,w,j,P,F,z,N,K,q,V,G,J,Q,U,W,X,Z,$;if(!ft.current&&!O.current){ft.current=!0;try{if(!u.current)return;var _=function(t){var e=t.split("-"),n=e[0];if(!M[n]&&!1===E)return!1;if(E&&!M["left-".concat(n)]&&!M["right-".concat(n)]&&!M[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!L[i])return!1;return!0},tt=u.current.getBoundingClientRect();gt({width:tt.width,height:tt.height});var et=[];if(p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!O.current){for(var nt=0;nt<Math.max(g.length,f.length);nt++){var rt=null===(t=R.current[nt])||void 0===t?void 0:t.current,ct=null===(e=m.current[nt])||void 0===e?void 0:e.current;rt&&(rt.style.height="auto",rt.style.minHeight="0px"),ct&&(ct.style.height="auto",ct.style.minHeight="0px")}E||Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=B.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var lt={};p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;if(r&&c){var o=r.getBoundingClientRect(),l=c.getBoundingClientRect();lt[i]=Math.max(o.height,l.height)}});var ut={left:{},right:{}},at={};if(!O.current)if(E){if(T&&null!==H)if("number"==typeof H){var dt=H,st=g[dt],ht=null===(l=R.current[dt])||void 0===l?void 0:l.current;ht&&st&&(st.refIndexes||[]).forEach(function(t){var e,n=f.findIndex(function(e){return e.selfIndex===t}),i=null===(e=m.current[n])||void 0===e?void 0:e.current;if(i&&(M["left-".concat(dt)]||M["right-".concat(n)])){var r=Math.max(ht.getBoundingClientRect().height,i.getBoundingClientRect().height);ut.left[dt]=Math.max(ut.left[dt]||0,r),ut.right[n]=Math.max(ut.right[n]||0,r)}})}else{var pt=H.split(r)[2];if(pt){rt=null===(v=C.current[pt])||void 0===v?void 0:v.current,ct=null===(w=B.current[pt])||void 0===w?void 0:w.current;if(rt&&ct){yt=Math.max(rt.getBoundingClientRect().height,ct.getBoundingClientRect().height);at[pt]=Math.max(at[pt]||0,yt)}}}}else{Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=B.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),o=r.getBoundingClientRect(),l=Math.max(c.height,o.height);at[t]=l,i.style.minHeight="".concat(l,"px"),r.style.minHeight="".concat(l,"px")}}});for(nt=0;nt<Math.min(g.length,f.length);nt++){var rt=null===(n=R.current[nt])||void 0===n?void 0:n.current,ct=null===(i=m.current[nt])||void 0===i?void 0:i.current;if(rt&&ct){var yt=Math.max(rt.getBoundingClientRect().height,ct.getBoundingClientRect().height);ut.left[nt]=yt,ut.right[nt]=yt}}}if(p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;if(r&&c){var o=lt[i];r.style.minHeight="".concat(o,"px"),c.style.minHeight="".concat(o,"px")}}),O.current||(Object.entries(ut.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=R.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(ut.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=m.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),E||Object.keys(at).forEach(function(t){var e,n,i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=B.current[t])||void 0===n?void 0:n.current;if(i&&r&&at[t]){var c=at[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),E)g.forEach(function(t,e){var n;(null===(n=R.current[e])||void 0===n?void 0:n.current)&&(t.refIndexes||[]).forEach(function(t){var n,i,r,c,o,l,u,v,s,h,g=f.findIndex(function(e){return e.selfIndex===t});if(-1!==g){var p=null===(n=S.current[e])||void 0===n?void 0:n.current,y=null===(i=b.current[g])||void 0===i?void 0:i.current;if(p&&y){var x=p.getBoundingClientRect(),R=y.getBoundingClientRect(),m=x.right-tt.left,C=R.left-tt.left,B=x.top+x.height/2-tt.top,M=R.top+R.height/2-tt.top;if(T&&H===e){var L=null!==(c=null===(r=a.current)||void 0===r?void 0:r.getBoundingClientRect().top)&&void 0!==c?c:0,I=null!==(l=null===(o=d.current)||void 0===o?void 0:o.getBoundingClientRect().top)&&void 0!==l?l:0,E=L+(null!==(v=null===(u=a.current)||void 0===u?void 0:u.clientHeight)&&void 0!==v?v:1/0),A=I+(null!==(h=null===(s=d.current)||void 0===s?void 0:s.clientHeight)&&void 0!==h?h:1/0),k=x.top+x.height/2,Y=R.top+R.height/2,w=function(t,e,n){return Math.max(e,Math.min(n,t))};B=w(k,L,E)-tt.top,M=w(Y,I,A)-tt.top}var O=D(e);O&&et.push({id:"line-".concat(e,"-").concat(g),x1:m,y1:B,x2:C,y2:M,style:O,sectionIdx:e,targetRightIdx:g})}}})});else{for(nt=0;nt<Math.min(g.length,f.length);nt++){var xt=null===(j=R.current[nt])||void 0===j?void 0:j.current,mt=null===(P=m.current[nt])||void 0===P?void 0:P.current;if(xt&&mt){var Ct=xt.getBoundingClientRect(),Bt=mt.getBoundingClientRect(),St=Math.max(Ct.top,Bt.top)+18-tt.top,bt=(null===(F=f[nt])||void 0===F?void 0:F.id)||"sec-".concat(nt);(Dt=D(nt))&&et.push({id:bt,x1:Ct.right-tt.left,y1:St,x2:Bt.left-tt.left,y2:St,style:Dt,sectionIdx:nt,hasCognitive:!!((null===(z=g[nt])||void 0===z?void 0:z.cognitiveData)||(null===(N=f[nt])||void 0===N?void 0:N.cognitiveData)||bt&&A[bt]),isSubSection:!1})}}Object.keys(C.current).forEach(function(t){var e,n,i,r,o,l;if(_(t)){var u=null===(e=C.current[t])||void 0===e?void 0:e.current,a=null===(n=B.current[t])||void 0===n?void 0:n.current;if(u&&a){for(var d=t.split("-").map(Number),v=g[d[0]],s=f[d[0]],h=1;h<d.length;h++)(null==v?void 0:v.subsections)&&(v=v.subsections[d[h]]),(null==s?void 0:s.subsections)&&(s=s.subsections[d[h]]);var p=!!v&&((null===(i=v.displayTitle)||void 0===i||i)&&c(v.title)),y=!!v&&((null===(r=v.displayContent)||void 0===r||r)&&c(v.content)),x=!!s&&((null===(o=s.displayTitle)||void 0===o||o)&&c(s.title)),R=!!s&&((null===(l=s.displayContent)||void 0===l||l)&&c(s.content));if(p&&y||x&&R){var m=u.getBoundingClientRect(),S=a.getBoundingClientRect(),b=Math.max(m.top,S.top)+16-tt.top,M=k(t);M&&"Not Defined"!==M.label&&et.push({id:"subsec-".concat(t),x1:m.right-tt.left,y1:b,x2:S.left-tt.left,y2:b,style:M,sectionIdx:d[0],isSubSection:!0,subSectionKeyPath:t,hasCognitive:!(!(null==v?void 0:v.cognitiveData)&&!(null==s?void 0:s.cognitiveData))})}}}})}if(T&&"string"==typeof H&&H.includes(r)){var Mt=H.split(r),Lt=Mt[0],It=Mt[1],Tt=Mt[2],Ht=(Mt[3],"".concat(Lt).concat(r).concat(It)),Et=null===(K=S.current[Ht])||void 0===K?void 0:K.current,At=null===(q=b.current[Ht])||void 0===q?void 0:q.current;if(Et&&At){var Dt,kt=Et.getBoundingClientRect(),Yt=At.getBoundingClientRect(),wt=kt.right-tt.left,Ot=Yt.left-tt.left,jt=kt.top+kt.height/2-tt.top,Pt=Yt.top+Yt.height/2-tt.top;if(E){var Ft=null!==(G=null===(V=a.current)||void 0===V?void 0:V.getBoundingClientRect().top)&&void 0!==G?G:0,zt=null!==(Q=null===(J=d.current)||void 0===J?void 0:J.getBoundingClientRect().top)&&void 0!==Q?Q:0,Nt=Ft+(null!==(W=null===(U=a.current)||void 0===U?void 0:U.clientHeight)&&void 0!==W?W:1/0),Kt=zt+(null!==(Z=null===(X=d.current)||void 0===X?void 0:X.clientHeight)&&void 0!==Z?Z:1/0),qt=function(t,e,n){return Math.max(e,Math.min(n,t))};jt=qt(kt.top+kt.height/2,Ft,Nt)-tt.top,Pt=qt(Yt.top+Yt.height/2,zt,Kt)-tt.top}(Dt=null!==($=Y(Lt,It))&&void 0!==$?$:k(Tt))&&et.push({id:"line-subsec-".concat(Ht),x1:wt,y1:jt,x2:Ot,y2:Pt,style:Dt,sectionIdx:Number(Tt.split("-")[0]),isSubSection:!0,subSectionKeyPath:H})}}if(it(et),s.current&&h.current){var Vt=s.current.getBoundingClientRect(),Gt=h.current.getBoundingClientRect(),Jt=(Vt.top+Vt.height/2-tt.top+Gt.top+Gt.height/2-tt.top)/2;ot({x1:Vt.right-tt.left,x2:Gt.left-tt.left,y:Jt})}else ot(null);if(I.size>0){var Qt=[],Ut=a.current,Wt=d.current;if(Ut&&Wt){var Xt=[],Zt=Ut.getBoundingClientRect().top,$t=Wt.getBoundingClientRect().top,_t=Zt+Ut.clientHeight,te=$t+Wt.clientHeight,ee=Ut.scrollTop,ne=Wt.scrollTop,ie=tt.top,re=function(t,e,n){return Math.max(e,Math.min(n,t))};I.forEach(function(t){var e,n,i,c,l,u;if("string"==typeof t&&t.includes(r)){var a=t.split(r),d=a[0],v=a[1],s=a[2],h=(a[3],"".concat(d).concat(r).concat(v)),p=null===(e=S.current[h])||void 0===e?void 0:e.current,y=null===(n=b.current[h])||void 0===n?void 0:n.current;if(!p||!y)return;var x=p.getBoundingClientRect(),R=y.getBoundingClientRect(),m=null!==(i=Y(d,v))&&void 0!==i?i:k(s),C=(q=x.right-tt.left)+.5*((V=R.left-tt.left-0)-q),B=x.top+x.height/2,M=R.top+R.height/2,L=B-Zt+ee,I=M-$t+ne,T="conn-subsec-".concat(h);Xt.push({lhsScrollY:L,rhsScrollY:I,x1:q,x2:V,containerTop:ie,leftIdx:t,rhsArrayIdx:t,styleColor:(null==m?void 0:m.badgeBorder)||"#6366F1",styleId:T});var H=re(B,Zt,_t),A=re(M,$t,te),w=H-ie,O=A-ie,j=M>=$t-4&&M<=te+4,P="";P=(G=B>=Zt-4&&B<=_t+4)&&j?o(q,w,V,O):G&&!j?"M ".concat(q,",").concat(w," L ").concat(C,",").concat(w," L ").concat(C,",").concat(O):!G&&j?"M ".concat(C,",").concat(w," L ").concat(C,",").concat(O," L ").concat(V,",").concat(O):"M ".concat(C,",").concat(w," L ").concat(C,",").concat(O),Qt.push({id:T,pathD:P,style:m,leftIdx:t,rhsArrayIdx:t})}else if(E){var F=t,z=g[F];if(!(null===(u=null==z?void 0:z.refIndexes)||void 0===u?void 0:u.length))return;z.refIndexes.forEach(function(t){var e,n,i=f.findIndex(function(e){return e.selfIndex===t});if(-1!==i){var r=null===(e=S.current[F])||void 0===e?void 0:e.current,c=null===(n=b.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),u=c.getBoundingClientRect(),a=D(F),d=l.right-tt.left,v=u.left-tt.left-0,s=d+.5*(v-d),h=l.top+l.height/2,g=u.top+u.height/2,p=h-Zt+ee,y=g-$t+ne,x="conn-".concat(F,"-").concat(i);Xt.push({lhsScrollY:p,rhsScrollY:y,x1:d,x2:v,containerTop:ie,leftIdx:F,rhsArrayIdx:i,styleColor:(null==a?void 0:a.badgeBorder)||"#6366F1",styleId:x});var R=re(h,Zt,_t),m=re(g,$t,te),C=R-ie,B=m-ie,M=h>=Zt-4&&h<=_t+4,L=g>=$t-4&&g<=te+4,I="";I=M&&L?o(d,C,v,B):M&&!L?"M ".concat(d,",").concat(C," L ").concat(s,",").concat(C," L ").concat(s,",").concat(B):!M&&L?"M ".concat(s,",").concat(C," L ").concat(s,",").concat(B," L ").concat(v,",").concat(B):"M ".concat(s,",").concat(C," L ").concat(s,",").concat(B),Qt.push({id:x,pathD:I,style:a,leftIdx:F,rhsArrayIdx:i})}}})}else{var N=t,K=N;p=null===(c=S.current[N])||void 0===c?void 0:c.current,y=null===(l=b.current[K])||void 0===l?void 0:l.current;if(!p||!y)return;var q,V;x=p.getBoundingClientRect(),R=y.getBoundingClientRect(),m=D(N),C=(q=x.right-tt.left)+.5*((V=R.left-tt.left-0)-q),B=x.top+x.height/2,M=R.top+R.height/2,L=B-Zt+ee,I=M-$t+ne,T="conn-".concat(N,"-").concat(K);Xt.push({lhsScrollY:L,rhsScrollY:I,x1:q,x2:V,containerTop:ie,leftIdx:N,rhsArrayIdx:K,styleColor:(null==m?void 0:m.badgeBorder)||"#6366F1",styleId:T});var G;H=re(B,Zt,_t),A=re(M,$t,te),w=H-ie,O=A-ie,j=M>=$t-4&&M<=te+4,P="";P=(G=B>=Zt-4&&B<=_t+4)&&j?o(q,w,V,O):G&&!j?"M ".concat(q,",").concat(w," L ").concat(C,",").concat(w," L ").concat(C,",").concat(O):!G&&j?"M ".concat(C,",").concat(w," L ").concat(C,",").concat(O," L ").concat(V,",").concat(O):"M ".concat(C,",").concat(w," L ").concat(C,",").concat(O),Qt.push({id:T,pathD:P,style:m,leftIdx:N,rhsArrayIdx:K})}}),Rt.current=Xt}vt(Qt)}else vt([]),Rt.current=[]}catch(t){console.error("Line render safe fail: ",t)}finally{ft.current=!1}}},[p,g,f,A,_,tt,D,Y,E,T,H,I,M,L]),Ct=n(function(){var t,e,n,i,r,c,l,s,h,g,f,p,y,x,R=Rt.current;if(R.length&&!O.current){var m=null!==(e=null===(t=a.current)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0,C=null!==(i=null===(n=d.current)||void 0===n?void 0:n.scrollTop)&&void 0!==i?i:0,B=null!==(c=null===(r=a.current)||void 0===r?void 0:r.clientHeight)&&void 0!==c?c:1/0,S=null!==(s=null===(l=d.current)||void 0===l?void 0:l.clientHeight)&&void 0!==s?s:1/0,b=null!==(g=null===(h=a.current)||void 0===h?void 0:h.getBoundingClientRect().top)&&void 0!==g?g:0,M=null!==(p=null===(f=d.current)||void 0===f?void 0:f.getBoundingClientRect().top)&&void 0!==p?p:0,L=b+B,I=M+S,T=null!==(x=null===(y=u.current)||void 0===y?void 0:y.getBoundingClientRect().top)&&void 0!==x?x:0,H=function(t,e,n){return Math.max(e,Math.min(n,t))};R.forEach(function(t){var e=t.lhsScrollY-m+b,n=t.rhsScrollY-C+M,i=v.current[t.styleId+"-stroke"],r=v.current[t.styleId+"-bg"];if(i||r){var c,l=H(e,b,L),u=H(n,M,I),a=l-T,d=u-T,s=e>=b-4&&e<=L+4,h=n>=M-4&&n<=I+4,g=t.x1+.5*(t.x2-t.x1);c=s&&h?o(t.x1,a,t.x2,d):s&&!h?"M ".concat(t.x1,",").concat(a," L ").concat(g,",").concat(a," L ").concat(g,",").concat(d):!s&&h?"M ".concat(g,",").concat(a," L ").concat(g,",").concat(d," L ").concat(t.x2,",").concat(d):"M ".concat(g,",").concat(a," L ").concat(g,",").concat(d),i&&(i.setAttribute("visibility","visible"),i.setAttribute("d",c)),r&&(r.setAttribute("visibility","visible"),r.setAttribute("d",c))}})}},[]),Bt=n(function(){Rt.current.length>0&&!O.current||(null!==yt.current&&clearTimeout(yt.current),yt.current=setTimeout(function(){V.current(),yt.current=null},50))},[]),St=n(function(t){if(null!==Z.current&&$.current&&Math.abs(t.currentTarget.scrollTop-Z.current)<=2){var e=$.current;Z.current=null,$.current=null,e()}J.current||(E||Bt(),pt.current||(pt.current=!0,requestAnimationFrame(function(){var t,e,n,i,c,o,l;if(j.current){var v=a.current,s=d.current;if(v&&s&&F.current){if(!P.current){var h=z.current,g=void 0;if("string"==typeof h&&h.includes(r)){var f=h.split(r),p="".concat(f[0]).concat(r).concat(f[1]);g=null===(t=S.current[p])||void 0===t?void 0:t.current}else g=null===(e=S.current[h])||void 0===e?void 0:e.current;if(g){var y=g.getBoundingClientRect();P.current={badgeScreenY:y.top+y.height/2,initialScrollTop:v.scrollTop,leftTop:v.getBoundingClientRect().top,leftBottom:v.getBoundingClientRect().top+v.clientHeight,cTop:null!==(i=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect().top)&&void 0!==i?i:0}}}if(P.current){var x=P.current,R=v.scrollTop-x.initialScrollTop,m=x.badgeScreenY-R,C=((c=m,o=x.leftTop,l=x.leftBottom,Math.max(o,Math.min(l,c)))-x.cTop).toString(),B=m>=x.leftTop-4&&m<=x.leftBottom+4;F.current.setAttribute("y1",C),F.current.setAttribute("y2",C),F.current.setAttribute("visibility",B?"visible":"hidden")}}}Rt.current.length>0&&Ct(),pt.current=!1})))},[Ct,E,Bt]);return i(function(){V.current=mt},[mt]),i(function(){var t=setTimeout(Bt,250),e=function(){return Q.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==yt.current&&clearTimeout(yt.current),null!==G.current&&clearTimeout(G.current),window.removeEventListener("resize",e)}},[U,W,X,p,M,L,g,f,_,Bt,T,H,w,I]),{lines:nt,setLines:it,overallConnector:ct,setOverallConnector:ot,connectedLines:dt,setConnectedLines:vt,svgDimensions:ht,cachedConnectedPositions:Rt,calculateLines:mt,calculateLinesRef:V,calculateLinesDebounced:Bt,handleColumnScroll:St}};export{l as useLinesCalculator};
|
|
1
|
+
import{useState as t,useRef as e,useCallback as n,useEffect as r}from"react";import{DEVIATION_BADGE_SEPARATOR as i,hasValue as c,getBentArrowPath as o}from"../CognitiveComparehelpers.js";var l=function(l){var u=l.containerRef,a=l.leftContainerRef,d=l.rightContainerRef;l.svgContainerRef;var v=l.pathRefs,s=l.leftHeaderRef,h=l.rightHeaderRef,g=l.proposedSections,f=l.existingSections,p=l.visibleFields,x=l.leftRefs,y=l.rightRefs,m=l.sectionLeftRefs,R=l.sectionRightRefs,C=l.subSectionLeftRefs,B=l.subSectionRightRefs,b=l.lhsBadgeRefs,S=l.rhsBadgeRefs,M=l.sectionRowRefs,L=l.expandedSections,T=l.expandedSubSections,I=l.connectedSections,H=l.isSideBySide,A=l.activeSideBySideSection,E=l.maintainRelativeOrder,D=l.cognitiveMap,k=l.getSectionCompareStyle,Y=l.getSubSectionCompareStyle,w=l.getDeviationStyleByKey,N=l.isArrowVisible,O=l.isAnimatingRef,j=l.isSideBySideRef,F=l.sideBySideCacheRef,P=l.sideBySideLineRef,z=l.activeSideBySideSectionRef,K=l.activeSideBySideRightSectionRef,q=l.connectedLines,V=l.setConnectedLines,G=l.cachedConnectedPositions,J=l.calculateLinesRef,Q=l.resizeTimerRef,U=l.scrollLock,W=l.scrollSyncLocked,X=l.handleResizeRef,Z=l.activeProposed,$=l.existingRule,_=l.analysisData,tt=l.pendingScrollTargetRef,et=l.pendingScrollCallbackRef,nt=l.resolvedComparisonConfig,rt=l.getFieldData,it=t([]),ct=it[0],ot=it[1],lt=t(null),ut=lt[0],at=lt[1],dt=t([]),vt=dt[0],st=dt[1],ht=null!=q?q:vt,gt=null!=V?V:st,ft=t({width:0,height:0}),pt=ft[0],xt=ft[1],yt=e(!1),mt=e(!1),Rt=e(!1),Ct=e(null),Bt=e([]),bt=null!=G?G:Bt,St=n(function(){var t,e,n,r,l,v,M,N,j,F,P,z,K,q,V,G,J,Q,U,W,X,Z,$;if(!yt.current&&!O.current){yt.current=!0;try{if(!u.current)return;var _=function(t){var e=t.split("-"),n=e[0];if(!L[n]&&!1===E)return!1;if(E&&!L["left-".concat(n)]&&!L["right-".concat(n)]&&!L[n])return!1;for(var r=n,i=1;i<e.length-1;i++)if(r+="-".concat(e[i]),!T[r])return!1;return!0},tt=u.current.getBoundingClientRect();xt({width:tt.width,height:tt.height});var et=[];if(p.forEach(function(t){var e,n,r=t.key,i=null===(e=x.current[r])||void 0===e?void 0:e.current,c=null===(n=y.current[r])||void 0===n?void 0:n.current;i&&c&&(i.style.height="auto",c.style.height="auto",i.style.minHeight="0px",c.style.minHeight="0px")}),!O.current){for(var nt=0;nt<Math.max(g.length,f.length);nt++){var rt=null===(t=m.current[nt])||void 0===t?void 0:t.current,it=null===(e=R.current[nt])||void 0===e?void 0:e.current;rt&&(rt.style.height="auto",rt.style.minHeight="0px"),it&&(it.style.height="auto",it.style.minHeight="0px")}E||Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var r=null===(e=C.current[t])||void 0===e?void 0:e.current,i=null===(n=B.current[t])||void 0===n?void 0:n.current;r&&i&&(r.style.height="auto",i.style.height="auto",r.style.minHeight="0px",i.style.minHeight="0px")}})}var ct={};p.forEach(function(t){var e,n,r=t.key,i=null===(e=x.current[r])||void 0===e?void 0:e.current,c=null===(n=y.current[r])||void 0===n?void 0:n.current;if(i&&c){var o=i.getBoundingClientRect(),l=c.getBoundingClientRect();ct[r]=Math.max(o.height,l.height)}});var lt={left:{},right:{}},ut={};if(!O.current)if(E){if(H&&null!==A)if("number"==typeof A){var dt=A,vt=g[dt],st=null===(l=m.current[dt])||void 0===l?void 0:l.current;st&&vt&&(vt.refIndexes||[]).forEach(function(t){var e,n=f.findIndex(function(e){return e.selfIndex===t}),r=null===(e=R.current[n])||void 0===e?void 0:e.current;if(r&&(L["left-".concat(dt)]||L["right-".concat(n)])){var i=Math.max(st.getBoundingClientRect().height,r.getBoundingClientRect().height);lt.left[dt]=Math.max(lt.left[dt]||0,i),lt.right[n]=Math.max(lt.right[n]||0,i)}})}else{var ht=A.split(i)[2];if(ht){rt=null===(v=C.current[ht])||void 0===v?void 0:v.current,it=null===(M=B.current[ht])||void 0===M?void 0:M.current;if(rt&&it){ft=Math.max(rt.getBoundingClientRect().height,it.getBoundingClientRect().height);ut[ht]=Math.max(ut[ht]||0,ft)}}}}else{Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var r=null===(e=C.current[t])||void 0===e?void 0:e.current,i=null===(n=B.current[t])||void 0===n?void 0:n.current;if(r&&i&&null!==r.offsetParent&&null!==i.offsetParent){var c=r.getBoundingClientRect(),o=i.getBoundingClientRect(),l=Math.max(c.height,o.height);ut[t]=l,r.style.minHeight="".concat(l,"px"),i.style.minHeight="".concat(l,"px")}}});for(nt=0;nt<Math.min(g.length,f.length);nt++){var rt=null===(n=m.current[nt])||void 0===n?void 0:n.current,it=null===(r=R.current[nt])||void 0===r?void 0:r.current;if(rt&&it){var ft=Math.max(rt.getBoundingClientRect().height,it.getBoundingClientRect().height);lt.left[nt]=ft,lt.right[nt]=ft}}}if(p.forEach(function(t){var e,n,r=t.key,i=null===(e=x.current[r])||void 0===e?void 0:e.current,c=null===(n=y.current[r])||void 0===n?void 0:n.current;if(i&&c){var o=ct[r];i.style.minHeight="".concat(o,"px"),c.style.minHeight="".concat(o,"px")}}),O.current||(Object.entries(lt.left).forEach(function(t){var e,n=t[0],r=t[1],i=null===(e=m.current[Number(n)])||void 0===e?void 0:e.current;i&&(i.style.minHeight="".concat(r,"px"))}),Object.entries(lt.right).forEach(function(t){var e,n=t[0],r=t[1],i=null===(e=R.current[Number(n)])||void 0===e?void 0:e.current;i&&(i.style.minHeight="".concat(r,"px"))}),E||Object.keys(ut).forEach(function(t){var e,n,r=null===(e=C.current[t])||void 0===e?void 0:e.current,i=null===(n=B.current[t])||void 0===n?void 0:n.current;if(r&&i&&ut[t]){var c=ut[t];r.style.minHeight="".concat(c,"px"),i.style.minHeight="".concat(c,"px")}})),E)g.forEach(function(t,e){var n;(null===(n=m.current[e])||void 0===n?void 0:n.current)&&(t.refIndexes||[]).forEach(function(t){var n,r,i,c,o,l,u,v,s,h,g=f.findIndex(function(e){return e.selfIndex===t});if(-1!==g){var p=null===(n=b.current[e])||void 0===n?void 0:n.current,x=null===(r=S.current[g])||void 0===r?void 0:r.current;if(p&&x){var y=p.getBoundingClientRect(),m=x.getBoundingClientRect(),R=y.right-tt.left,C=m.left-tt.left,B=y.top+y.height/2-tt.top,M=m.top+m.height/2-tt.top;if(H&&A===e){var L=null!==(c=null===(i=a.current)||void 0===i?void 0:i.getBoundingClientRect().top)&&void 0!==c?c:0,T=null!==(l=null===(o=d.current)||void 0===o?void 0:o.getBoundingClientRect().top)&&void 0!==l?l:0,I=L+(null!==(v=null===(u=a.current)||void 0===u?void 0:u.clientHeight)&&void 0!==v?v:1/0),E=T+(null!==(h=null===(s=d.current)||void 0===s?void 0:s.clientHeight)&&void 0!==h?h:1/0),D=y.top+y.height/2,Y=m.top+m.height/2,w=function(t,e,n){return Math.max(e,Math.min(n,t))};B=w(D,L,I)-tt.top,M=w(Y,T,E)-tt.top}var N=k(e);N&&et.push({id:"line-".concat(e,"-").concat(g),x1:R,y1:B,x2:C,y2:M,style:N,sectionIdx:e,targetRightIdx:g})}}})});else{for(nt=0;nt<Math.min(g.length,f.length);nt++){var pt=null===(N=m.current[nt])||void 0===N?void 0:N.current,mt=null===(j=R.current[nt])||void 0===j?void 0:j.current;if(pt&&mt){var Rt=pt.getBoundingClientRect(),Ct=mt.getBoundingClientRect(),Bt=Math.max(Rt.top,Ct.top)+18-tt.top,St=(null===(F=f[nt])||void 0===F?void 0:F.id)||"sec-".concat(nt);(Dt=k(nt))&&et.push({id:St,x1:Rt.right-tt.left,y1:Bt,x2:Ct.left-tt.left,y2:Bt,style:Dt,sectionIdx:nt,hasCognitive:!!((null===(P=g[nt])||void 0===P?void 0:P.cognitiveData)||(null===(z=f[nt])||void 0===z?void 0:z.cognitiveData)||St&&D[St]),isSubSection:!1})}}Object.keys(C.current).forEach(function(t){var e,n,r,i,o,l;if(_(t)){var u=null===(e=C.current[t])||void 0===e?void 0:e.current,a=null===(n=B.current[t])||void 0===n?void 0:n.current;if(u&&a){for(var d=t.split("-").map(Number),v=g[d[0]],s=f[d[0]],h=1;h<d.length;h++)(null==v?void 0:v.subsections)&&(v=v.subsections[d[h]]),(null==s?void 0:s.subsections)&&(s=s.subsections[d[h]]);var p=!!v&&((null===(r=v.displayTitle)||void 0===r||r)&&c(v.title)),x=!!v&&((null===(i=v.displayContent)||void 0===i||i)&&c(v.content)),y=!!s&&((null===(o=s.displayTitle)||void 0===o||o)&&c(s.title)),m=!!s&&((null===(l=s.displayContent)||void 0===l||l)&&c(s.content));if(p&&x||y&&m){var R=u.getBoundingClientRect(),b=a.getBoundingClientRect(),S=Math.max(R.top,b.top)+16-tt.top,M=Y(t);M&&"Not Defined"!==M.label&&et.push({id:"subsec-".concat(t),x1:R.right-tt.left,y1:S,x2:b.left-tt.left,y2:S,style:M,sectionIdx:d[0],isSubSection:!0,subSectionKeyPath:t,hasCognitive:!(!(null==v?void 0:v.cognitiveData)&&!(null==s?void 0:s.cognitiveData))})}}}})}if(H&&"string"==typeof A&&A.includes(i)){var Mt=A.split(i),Lt=Mt[0],Tt=Mt[1],It=Mt[2],Ht=(Mt[3],"".concat(Lt).concat(i).concat(Tt)),At=null===(K=b.current[Ht])||void 0===K?void 0:K.current,Et=null===(q=S.current[Ht])||void 0===q?void 0:q.current;if(At&&Et){var Dt,kt=At.getBoundingClientRect(),Yt=Et.getBoundingClientRect(),wt=kt.right-tt.left,Nt=Yt.left-tt.left,Ot=kt.top+kt.height/2-tt.top,jt=Yt.top+Yt.height/2-tt.top;if(E){var Ft=null!==(G=null===(V=a.current)||void 0===V?void 0:V.getBoundingClientRect().top)&&void 0!==G?G:0,Pt=null!==(Q=null===(J=d.current)||void 0===J?void 0:J.getBoundingClientRect().top)&&void 0!==Q?Q:0,zt=Ft+(null!==(W=null===(U=a.current)||void 0===U?void 0:U.clientHeight)&&void 0!==W?W:1/0),Kt=Pt+(null!==(Z=null===(X=d.current)||void 0===X?void 0:X.clientHeight)&&void 0!==Z?Z:1/0),qt=function(t,e,n){return Math.max(e,Math.min(n,t))};Ot=qt(kt.top+kt.height/2,Ft,zt)-tt.top,jt=qt(Yt.top+Yt.height/2,Pt,Kt)-tt.top}(Dt=null!==($=w(Lt,Tt))&&void 0!==$?$:Y(It))&&et.push({id:"line-subsec-".concat(Ht),x1:wt,y1:Ot,x2:Nt,y2:jt,style:Dt,sectionIdx:Number(It.split("-")[0]),isSubSection:!0,subSectionKeyPath:A})}}if(ot(et),s.current&&h.current){var Vt=s.current.getBoundingClientRect(),Gt=h.current.getBoundingClientRect(),Jt=(Vt.top+Vt.height/2-tt.top+Gt.top+Gt.height/2-tt.top)/2;at({x1:Vt.right-tt.left,x2:Gt.left-tt.left,y:Jt})}else at(null);if(I.size>0){var Qt=[],Ut=a.current,Wt=d.current;if(Ut&&Wt){var Xt=[],Zt=Ut.getBoundingClientRect().top,$t=Wt.getBoundingClientRect().top,_t=Zt+Ut.clientHeight,te=$t+Wt.clientHeight,ee=Ut.scrollTop,ne=Wt.scrollTop,re=tt.top,ie=function(t,e,n){return Math.max(e,Math.min(n,t))};I.forEach(function(t){var e,n,r,c,l,u;if("string"==typeof t&&t.includes(i)){var a=t.split(i),d=a[0],v=a[1],s=a[2],h=(a[3],"".concat(d).concat(i).concat(v)),p=null===(e=b.current[h])||void 0===e?void 0:e.current,x=null===(n=S.current[h])||void 0===n?void 0:n.current;if(!p||!x)return;var y=p.getBoundingClientRect(),m=x.getBoundingClientRect(),R=null!==(r=w(d,v))&&void 0!==r?r:Y(s),C=(q=y.right-tt.left)+.5*((V=m.left-tt.left-0)-q),B=y.top+y.height/2,M=m.top+m.height/2,L=B-Zt+ee,T=M-$t+ne,I="conn-subsec-".concat(h);Xt.push({lhsScrollY:L,rhsScrollY:T,x1:q,x2:V,containerTop:re,leftIdx:t,rhsArrayIdx:t,styleColor:(null==R?void 0:R.badgeBorder)||"#6366F1",styleId:I});var H=ie(B,Zt,_t),A=ie(M,$t,te),D=H-re,N=A-re,O=M>=$t-4&&M<=te+4,j="";j=(G=B>=Zt-4&&B<=_t+4)&&O?o(q,D,V,N):G&&!O?"M ".concat(q,",").concat(D," L ").concat(C,",").concat(D," L ").concat(C,",").concat(N):!G&&O?"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N," L ").concat(V,",").concat(N):"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N),Qt.push({id:I,pathD:j,style:R,leftIdx:t,rhsArrayIdx:t})}else if(E){var F=t,P=g[F];if(!(null===(u=null==P?void 0:P.refIndexes)||void 0===u?void 0:u.length))return;P.refIndexes.forEach(function(t){var e,n,r=f.findIndex(function(e){return e.selfIndex===t});if(-1!==r){var i=null===(e=b.current[F])||void 0===e?void 0:e.current,c=null===(n=S.current[r])||void 0===n?void 0:n.current;if(i&&c){var l=i.getBoundingClientRect(),u=c.getBoundingClientRect(),a=k(F),d=l.right-tt.left,v=u.left-tt.left-0,s=d+.5*(v-d),h=l.top+l.height/2,g=u.top+u.height/2,p=h-Zt+ee,x=g-$t+ne,y="conn-".concat(F,"-").concat(r);Xt.push({lhsScrollY:p,rhsScrollY:x,x1:d,x2:v,containerTop:re,leftIdx:F,rhsArrayIdx:r,styleColor:(null==a?void 0:a.badgeBorder)||"#6366F1",styleId:y});var m=ie(h,Zt,_t),R=ie(g,$t,te),C=m-re,B=R-re,M=h>=Zt-4&&h<=_t+4,L=g>=$t-4&&g<=te+4,T="";T=M&&L?o(d,C,v,B):M&&!L?"M ".concat(d,",").concat(C," L ").concat(s,",").concat(C," L ").concat(s,",").concat(B):!M&&L?"M ".concat(s,",").concat(C," L ").concat(s,",").concat(B," L ").concat(v,",").concat(B):"M ".concat(s,",").concat(C," L ").concat(s,",").concat(B),Qt.push({id:y,pathD:T,style:a,leftIdx:F,rhsArrayIdx:r})}}})}else{var z=t,K=z;p=null===(c=b.current[z])||void 0===c?void 0:c.current,x=null===(l=S.current[K])||void 0===l?void 0:l.current;if(!p||!x)return;var q,V;y=p.getBoundingClientRect(),m=x.getBoundingClientRect(),R=k(z),C=(q=y.right-tt.left)+.5*((V=m.left-tt.left-0)-q),B=y.top+y.height/2,M=m.top+m.height/2,L=B-Zt+ee,T=M-$t+ne,I="conn-".concat(z,"-").concat(K);Xt.push({lhsScrollY:L,rhsScrollY:T,x1:q,x2:V,containerTop:re,leftIdx:z,rhsArrayIdx:K,styleColor:(null==R?void 0:R.badgeBorder)||"#6366F1",styleId:I});var G;H=ie(B,Zt,_t),A=ie(M,$t,te),D=H-re,N=A-re,O=M>=$t-4&&M<=te+4,j="";j=(G=B>=Zt-4&&B<=_t+4)&&O?o(q,D,V,N):G&&!O?"M ".concat(q,",").concat(D," L ").concat(C,",").concat(D," L ").concat(C,",").concat(N):!G&&O?"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N," L ").concat(V,",").concat(N):"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N),Qt.push({id:I,pathD:j,style:R,leftIdx:z,rhsArrayIdx:K})}}),bt.current=Xt}gt(Qt)}else gt([]),bt.current=[]}catch(t){console.error("Line render safe fail: ",t)}finally{yt.current=!1}}},[p,g,f,D,nt,rt,k,w,E,H,A,I,L,T]),Mt=n(function(){var t,e,n,r,i,c,l,s,h,g,f,p,x,y,m=bt.current;if(m.length&&!O.current){var R=null!==(e=null===(t=a.current)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0,C=null!==(r=null===(n=d.current)||void 0===n?void 0:n.scrollTop)&&void 0!==r?r:0,B=null!==(c=null===(i=a.current)||void 0===i?void 0:i.clientHeight)&&void 0!==c?c:1/0,b=null!==(s=null===(l=d.current)||void 0===l?void 0:l.clientHeight)&&void 0!==s?s:1/0,S=null!==(g=null===(h=a.current)||void 0===h?void 0:h.getBoundingClientRect().top)&&void 0!==g?g:0,M=null!==(p=null===(f=d.current)||void 0===f?void 0:f.getBoundingClientRect().top)&&void 0!==p?p:0,L=S+B,T=M+b,I=null!==(y=null===(x=u.current)||void 0===x?void 0:x.getBoundingClientRect().top)&&void 0!==y?y:0,H=function(t,e,n){return Math.max(e,Math.min(n,t))};m.forEach(function(t){var e=t.lhsScrollY-R+S,n=t.rhsScrollY-C+M,r=v.current[t.styleId+"-stroke"],i=v.current[t.styleId+"-bg"];if(r||i){var c,l=H(e,S,L),u=H(n,M,T),a=l-I,d=u-I,s=e>=S-4&&e<=L+4,h=n>=M-4&&n<=T+4,g=t.x1+.5*(t.x2-t.x1);c=s&&h?o(t.x1,a,t.x2,d):s&&!h?"M ".concat(t.x1,",").concat(a," L ").concat(g,",").concat(a," L ").concat(g,",").concat(d):!s&&h?"M ".concat(g,",").concat(a," L ").concat(g,",").concat(d," L ").concat(t.x2,",").concat(d):"M ".concat(g,",").concat(a," L ").concat(g,",").concat(d),r&&(r.setAttribute("visibility","visible"),r.setAttribute("d",c)),i&&(i.setAttribute("visibility","visible"),i.setAttribute("d",c))}})}},[]),Lt=n(function(){bt.current.length>0&&!O.current||(null!==Ct.current&&clearTimeout(Ct.current),Ct.current=setTimeout(function(){J.current(),Ct.current=null},50))},[]),Tt=n(function(t){if(null!==tt.current&&et.current&&Math.abs(t.currentTarget.scrollTop-tt.current)<=2){var e=et.current;tt.current=null,et.current=null,e()}if(!Rt.current&&!U.current){if(E&&W&&(j.current||I.size>0)){var n=t.currentTarget,r=a.current,c=d.current,o=n===r?c:n===c?r:null;if(n&&o){var l=function(){var t,e,n,r,c,o,l,u,a,d,v,s=z.current,h=K.current;if(null===s)return{leftAnchor:null,rightAnchor:null};if("string"==typeof s&&s.includes(i)){var g=s.split(i),f="".concat(g[0]).concat(i).concat(g[1]);return{leftAnchor:(null===(t=b.current[f])||void 0===t?void 0:t.current)||(null===(e=C.current[g[2]])||void 0===e?void 0:e.current)||(null===(n=m.current[Number(g[2])])||void 0===n?void 0:n.current)||null,rightAnchor:(null===(r=S.current[f])||void 0===r?void 0:r.current)||(null===(c=B.current[g[3]])||void 0===c?void 0:c.current)||(null===(o=R.current[Number(g[3])])||void 0===o?void 0:o.current)||null}}var p=Number(s),x=null!==h?Number(h):p;return{leftAnchor:(null===(l=b.current[p])||void 0===l?void 0:l.current)||(null===(u=M.current[p])||void 0===u?void 0:u.current)||(null===(a=m.current[p])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=S.current[x])||void 0===d?void 0:d.current)||(null===(v=R.current[x])||void 0===v?void 0:v.current)||null}}(),v=l.leftAnchor,s=l.rightAnchor,h=n===r?v:s,g=n===r?s:v,f=null;if(h&&g){var p=h.getBoundingClientRect(),x=g.getBoundingClientRect(),y=o.getBoundingClientRect(),L=p.top+p.height/2;f=x.top-y.top+o.scrollTop+x.height/2-(L-y.top)}else{var T=Math.max(0,n.scrollHeight-n.clientHeight),H=Math.max(0,o.scrollHeight-o.clientHeight);f=T>0?n.scrollTop/T*H:n.scrollTop}var A=Math.max(0,o.scrollHeight-o.clientHeight);f=Math.max(0,Math.min(f,A)),Math.abs(o.scrollTop-f)>1&&(Rt.current=!0,o.scrollTop=f,requestAnimationFrame(function(){Rt.current=!1}))}}E||Lt(),mt.current||(mt.current=!0,requestAnimationFrame(function(){var t,e,n,r,c,o,l;if(j.current){var v=a.current,s=d.current;if(v&&s&&P.current){if(!F.current){var h=z.current,g=void 0;if("string"==typeof h&&h.includes(i)){var f=h.split(i),p="".concat(f[0]).concat(i).concat(f[1]);g=null===(t=b.current[p])||void 0===t?void 0:t.current}else g=null===(e=b.current[h])||void 0===e?void 0:e.current;if(g){var x=g.getBoundingClientRect();F.current={badgeScreenY:x.top+x.height/2,initialScrollTop:v.scrollTop,leftTop:v.getBoundingClientRect().top,leftBottom:v.getBoundingClientRect().top+v.clientHeight,cTop:null!==(r=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect().top)&&void 0!==r?r:0}}}if(F.current){var y=F.current,m=v.scrollTop-y.initialScrollTop,R=y.badgeScreenY-m,C=((c=R,o=y.leftTop,l=y.leftBottom,Math.max(o,Math.min(l,c)))-y.cTop).toString(),B=R>=y.leftTop-4&&R<=y.leftBottom+4;P.current.setAttribute("y1",C),P.current.setAttribute("y2",C),P.current.setAttribute("visibility",B?"visible":"hidden")}}}bt.current.length>0&&Mt(),mt.current=!1}))}},[Mt,E,W,I,Lt]);return r(function(){J.current=St},[St]),r(function(){var t=setTimeout(Lt,250),e=function(){return X.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==Ct.current&&clearTimeout(Ct.current),null!==Q.current&&clearTimeout(Q.current),window.removeEventListener("resize",e)}},[Z,$,_,p,L,T,g,f,nt,Lt,H,A,N,I]),{lines:ct,setLines:ot,overallConnector:ut,setOverallConnector:at,connectedLines:ht,setConnectedLines:gt,svgDimensions:pt,cachedConnectedPositions:bt,calculateLines:St,calculateLinesRef:J,calculateLinesDebounced:Lt,handleColumnScroll:Tt}};export{l as useLinesCalculator};
|
|
2
2
|
//# sourceMappingURL=useLinesCalculator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,oBAAoB,+
|
|
1
|
+
{"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,oBAAoB,+CA6KzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|