@e-llm-studio/citation 0.0.245 → 0.0.247
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/README.md +151 -0
- package/dist/cjs/features/BPACitationRenderer/BPACitationRenderer.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/cjs/features/PromptCitation/CitationDependencyGraph.js +2 -0
- package/dist/cjs/features/PromptCitation/CitationDependencyGraph.js.map +1 -0
- package/dist/cjs/features/PromptCitation/PromptCitation.js +2 -0
- package/dist/cjs/features/PromptCitation/PromptCitation.js.map +1 -0
- package/dist/cjs/features/PromptCitation/_components/CodeEditor.js +2 -0
- package/dist/cjs/features/PromptCitation/_components/CodeEditor.js.map +1 -0
- package/dist/cjs/features/PromptCitation/_components/Markdownrenderer.js +2 -0
- package/dist/cjs/features/PromptCitation/_components/Markdownrenderer.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/PageCheck.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/helper.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/reviewScore.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/reviewScore.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/features/BPACitationRenderer/BPACitationRenderer.js +1 -1
- package/dist/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/features/PromptCitation/CitationDependencyGraph.js +2 -0
- package/dist/features/PromptCitation/CitationDependencyGraph.js.map +1 -0
- package/dist/features/PromptCitation/PromptCitation.js +2 -0
- package/dist/features/PromptCitation/PromptCitation.js.map +1 -0
- package/dist/features/PromptCitation/_components/CodeEditor.js +2 -0
- package/dist/features/PromptCitation/_components/CodeEditor.js.map +1 -0
- package/dist/features/PromptCitation/_components/Markdownrenderer.js +2 -0
- package/dist/features/PromptCitation/_components/Markdownrenderer.js.map +1 -0
- package/dist/features/SegmentReviewComponents/BoundaryCard.js +1 -1
- package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js +1 -1
- package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js +1 -1
- package/dist/features/SegmentReviewComponents/PageCheck.js +1 -1
- package/dist/features/SegmentReviewComponents/RevertSuccessCard.js +1 -1
- package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
- package/dist/features/SegmentReviewComponents/helper.js +1 -1
- package/dist/features/SegmentReviewComponents/reviewScore.js +2 -0
- package/dist/features/SegmentReviewComponents/reviewScore.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/CitationDependencyGraphTest.d.ts +4 -0
- package/dist/types/src/CitationDependencyGraphTest.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.d.ts.map +1 -1
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts +1 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts +1 -0
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
- package/dist/types/src/features/PromptCitation/CitationDependencyGraph.d.ts +56 -0
- package/dist/types/src/features/PromptCitation/CitationDependencyGraph.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/PromptCitation.d.ts +326 -0
- package/dist/types/src/features/PromptCitation/PromptCitation.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/PromptCitationTest.d.ts +4 -0
- package/dist/types/src/features/PromptCitation/PromptCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/CodeEditor.d.ts +30 -0
- package/dist/types/src/features/PromptCitation/_components/CodeEditor.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/HighlightedCodeDetails.d.ts +16 -0
- package/dist/types/src/features/PromptCitation/_components/HighlightedCodeDetails.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/Markdownrenderer.d.ts +23 -0
- package/dist/types/src/features/PromptCitation/_components/Markdownrenderer.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/ThemeToggle.d.ts +12 -0
- package/dist/types/src/features/PromptCitation/_components/ThemeToggle.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/TooltipComponent.d.ts +8 -0
- package/dist/types/src/features/PromptCitation/_components/TooltipComponent.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/helper.d.ts +2 -4
- package/dist/types/src/features/SegmentReviewComponents/helper.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts +4 -0
- package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +11 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i,__spreadArray as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import o from"@mui/icons-material/ChevronLeft";import r from"@mui/icons-material/Close";import l from"@mui/material/Box";import a from"@mui/material/Divider";import m from"@mui/material/IconButton";import c from"@mui/material/Paper";import s from"@mui/material/Stack";import h from"@mui/material/Typography";import d from"../CitationRenderer/MarkdownRenderer.js";import
|
|
1
|
+
import{__assign as i,__spreadArray as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import o from"@mui/icons-material/ChevronLeft";import r from"@mui/icons-material/Close";import l from"@mui/material/Box";import a from"@mui/material/Divider";import m from"@mui/material/IconButton";import c from"@mui/material/Paper";import s from"@mui/material/Stack";import h from"@mui/material/Typography";import d from"../CitationRenderer/MarkdownRenderer.js";import f from"./CognitiveIcon.js";import g from"./CognitiveScoreBadge.js";var u=function(i,n){return e([i],Array.isArray(n)?n:null==n?[]:[n],!0)};function p(e){var p=e.reasons,x=e.reason,v=e.gap,y=e.score,H=e.headerName,S=void 0===H?"Cognitive Integrity":H,b=e.onBack,C=e.onClose,z=e.showCloseButton,w=void 0===z||z,k=e.width,W=void 0===k?260:k,D=e.maxWidth,B=void 0===D?260:D,A=e.className,I=e.styles,R=(null!=p?p:[]).filter(function(i){return"evidence"===i.type.trim().toLowerCase()}).map(function(i){return i.text.trim()}).filter(Boolean),j=(null!=p?p:[]).filter(function(i){return"gap"===i.type.trim().toLowerCase()}).map(function(i){return i.text.trim()}).filter(Boolean),F=null==x?void 0:x.trim(),E=null==v?void 0:v.trim();if(0===R.length&&F&&R.push(F),0===j.length&&E&&j.push(E),0===R.length&&0===j.length)return null;var L,M=(L=null==I?void 0:I.markdown,i(i({},L),{containerWrapper:i(i({},null==L?void 0:L.containerWrapper),{display:"block",height:"auto",minHeight:0,maxHeight:"fit-content",flex:"0 0 auto"}),mainCard:i(i({},null==L?void 0:L.mainCard),{height:"auto",minHeight:0,maxHeight:"none",flex:"0 0 auto",padding:0,border:"none",borderRadius:0,boxShadow:"none",backgroundColor:"transparent"}),scrollArea:i({height:"auto",minHeight:0,maxHeight:"none",overflowY:"visible",paddingRight:0,color:"#475467",fontSize:11.5,lineHeight:1.3},null==L?void 0:L.scrollArea),list:i({margin:"0",padding:"0 0 0 18px",fontSize:"11.5px",lineHeight:"1.3"},null==L?void 0:L.list)})),N=i(i({},M),{scrollArea:i(i({},M.scrollArea),{fontSize:"inherit",lineHeight:"inherit"}),summary:i(i({},M.summary),{display:"inline-flex",padding:0,fontSize:"inherit",lineHeight:"inherit"})});return n(c,i({className:A,elevation:4,sx:u({width:W,maxWidth:B,height:"fit-content",minHeight:0,alignSelf:"flex-start",flex:"0 0 auto",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==I?void 0:I.root)},{children:t(s,i({spacing:.75,sx:{p:1,height:"auto",minHeight:0,display:"flex",flexDirection:"column","& > *":{minHeight:0}}},{children:[t(s,i({direction:"row",alignItems:"center",spacing:.75,sx:null==I?void 0:I.header},{children:[b&&n(m,i({size:"small",onClick:b,"aria-label":"Return to review check",sx:{p:0,color:"#6941C6"}},{children:n(o,{sx:{fontSize:17}})})),n(f,{sx:{color:"#6941C6"}}),n(h,i({sx:{flex:1,fontSize:12,fontWeight:500,alignItems:"center",display:"flex",lineHeight:1.25,textTransform:"capitalise"}},{children:S})),n(g,{score:y}),w&&n(m,i({size:"small",onClick:C,disabled:!C,"aria-label":"Close cognitive integrity",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:n(r,{sx:{fontSize:17}})}))]})),n(a,{sx:{m:0}}),n(l,i({sx:u({bgcolor:"#F9FAFB",px:1.5,py:1.25,height:"auto",minHeight:0,flex:"0 0 auto",display:"flex",flexDirection:"column"},null==I?void 0:I.content)},{children:t(s,i({spacing:1.5,sx:{display:"flex",flexDirection:"column",minHeight:0}},{children:[R.length>0&&t(l,i({sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:[n(h,i({sx:{mb:1,color:"#344054",fontSize:12,fontWeight:600,lineHeight:1.4,flexShrink:0}},{children:"Decision Making Factors"})),n(s,i({spacing:.75,sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:R.map(function(e,o){return t(s,i({direction:"row",alignItems:"flex-start",spacing:.75},{children:[t(h,i({component:"span",sx:{flex:"0 0 auto",minWidth:14,color:"#475467",fontSize:11.5,lineHeight:1.65}},{children:[o+1,"."]})),n(l,i({sx:{flex:1,minWidth:0,color:"#667085",fontSize:11.5,lineHeight:1.65,"& p":{m:0,color:"inherit",fontSize:"inherit",lineHeight:"inherit"}}},{children:n(d,{value:"<summary>".concat(e,"</summary>"),styles:N})}))]}),"evidence-".concat(o))})}))]})),R.length>0&&j.length>0&&n(a,{sx:{my:"2px !important",borderColor:"#E4E7EC"}}),j.length>0&&t(l,i({sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:[n(h,i({sx:{mb:1,color:"#344054",fontSize:12,fontWeight:600,lineHeight:1.4,flexShrink:0}},{children:"Gaps in Decision"})),n(s,i({spacing:.75,sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:j.map(function(e,o){return t(s,i({direction:"row",alignItems:"flex-start",spacing:.75},{children:[t(h,i({component:"span",sx:{flex:"0 0 auto",minWidth:14,color:"#475467",fontSize:11.5,lineHeight:1.65}},{children:[o+1,"."]})),n(l,i({sx:{flex:1,minWidth:0,color:"#667085",fontSize:11.5,lineHeight:1.65,"& p":{m:0,color:"inherit",fontSize:"inherit",lineHeight:"inherit"}}},{children:n(d,{value:"<summary>".concat(e,"</summary>"),styles:N})}))]}),"gap-".concat(o))})}))]}))]}))}))]}))}))}export{p as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveIntegrity.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import e from"@mui/material/Box";function
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import e from"@mui/material/Box";import{getReviewScoreBand as t}from"./reviewScore.js";function i(i){var n=i.score;if(null==n||"string"==typeof n&&""===n.trim())return null;var m="number"==typeof n?"".concat(n,"%"):n,l=t("number"==typeof n||"string"==typeof n?n:null),p="low"===l?"#B91C1C":"medium"===l?"#997800":"high"===l?"#4F9E6C":"#374151";return o(e,r({component:"span",sx:{px:.625,py:0,border:"1.5px solid",borderColor:p,borderRadius:10,color:p,fontSize:11,lineHeight:1.25}},{children:m}))}export{i as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveScoreBadge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as o,__spreadArray as e}from"tslib";import{jsx as i,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useCallback as n}from"react";import l from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import d from"@mui/material/Box";import c from"@mui/material/Button";import s from"@mui/material/Divider";import m from"@mui/material/IconButton";import u from"@mui/material/Paper";import p from"@mui/material/Stack";import h from"@mui/material/Typography";import f from"./CognitiveIcon.js";import g from"./CognitiveScoreBadge.js";import x from"../../assests/icons/InfoAlert.js";var b,v=function(o,i){return e([o],Array.isArray(i)?i:null==i?[]:[i],!0)};!function(o){o.YES="YES",o.NO="NO"}(b||(b={}));var C=function(o){return Object.values(b).includes(o)};function y(e){var C,y=e.headerName,F=void 0===y?"Page Type Check":y,S=e.title,w=e.pageNo,k=e.content,D=e.cognitiveScore,z=e.pageType,A=e.metadata,I=e.onActionConfirm,B=e.onCognitiveClick,N=e.onClose,T=e.showCognitiveIntegrity,W=void 0===T||T,E=e.showCloseButton,j=void 0===E||E,O=e.confirmDisabled,R=void 0!==O&&O,Y=e.disableAllActions,H=void 0!==Y&&Y,M=e.width,P=void 0===M?260:M,_=e.maxWidth,q=void 0===_?260:_,G=e.className,J=e.styles,K=null!==(C=null!=z?z:null==A?void 0:A.page_type)&&void 0!==C?C:"table",L=null!=k?k:"We're not fully confident about the
|
|
1
|
+
import{__assign as o,__spreadArray as e}from"tslib";import{jsx as i,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useCallback as n}from"react";import l from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import d from"@mui/material/Box";import c from"@mui/material/Button";import s from"@mui/material/Divider";import m from"@mui/material/IconButton";import u from"@mui/material/Paper";import p from"@mui/material/Stack";import h from"@mui/material/Typography";import f from"./CognitiveIcon.js";import g from"./CognitiveScoreBadge.js";import x from"../../assests/icons/InfoAlert.js";var b,v=function(o,i){return e([o],Array.isArray(i)?i:null==i?[]:[i],!0)};!function(o){o.YES="YES",o.NO="NO"}(b||(b={}));var C=function(o){return Object.values(b).includes(o)};function y(e){var C,y=e.headerName,F=void 0===y?"Page Type Check":y,S=e.title,w=e.pageNo,k=e.content,D=e.cognitiveScore,z=e.pageType,A=e.metadata,I=e.onActionConfirm,B=e.onCognitiveClick,N=e.onClose,T=e.showCognitiveIntegrity,W=void 0===T||T,E=e.showCloseButton,j=void 0===E||E,O=e.confirmDisabled,R=void 0!==O&&O,Y=e.disableAllActions,H=void 0!==Y&&Y,M=e.width,P=void 0===M?260:M,_=e.maxWidth,q=void 0===_?260:_,G=e.className,J=e.styles,K=null!==(C=null!=z?z:null==A?void 0:A.page_type)&&void 0!==C?C:"table",L=null!=k?k:"We're not fully confident about the format of this page. Is this page a ".concat(K,"?"),Q=H||R||!I,U=n(function(){Q||null==I||I(b.YES,{action:b.YES,pageType:K,metadata:A})},[Q,I,K,A]),V=n(function(){Q||null==I||I(b.NO,{action:b.NO,pageType:K,metadata:A})},[Q,I,K,A]);return i(u,o({className:G,elevation:0,sx:v({width:P,maxWidth:q,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.2)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==J?void 0:J.root)},{children:i(d,o({sx:{overflow:"hidden"}},{children:r(p,o({spacing:.75,sx:{p:1}},{children:[r(p,o({direction:"row",alignItems:"center",spacing:.75,sx:null==J?void 0:J.header},{children:[i(x,{color:"error",height:16,width:16}),i(h,o({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:F})),j&&i(m,o({size:"small",onClick:N,disabled:!N,"aria-label":"Close page check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i(a,{sx:{fontSize:17}})}))]})),r(d,{children:[i(h,o({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:S})),null!=w&&i(h,o({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:w})),i(s,{sx:{my:.625}}),null!=L&&i(h,o({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:L}))]}),r(p,o({direction:"row",spacing:.75},{children:[i(c,o({variant:"outlined",fullWidth:!0,disabled:Q,onClick:V,sx:v({minHeight:32,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",borderColor:"#D0D5DD",color:"#475569",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"#F8FAFC",borderColor:"#D0D5DD"},"&.Mui-disabled":{backgroundColor:"#F3F4F6",color:"#9CA3AF",borderColor:"#E5E7EB"}},null==J?void 0:J.noButton)},{children:"No"})),i(c,o({variant:"contained",fullWidth:!0,disabled:Q,onClick:U,sx:v({minHeight:32,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==J?void 0:J.yesButton)},{children:"Yes"}))]})),i(p,o({spacing:.625,sx:null==J?void 0:J.footer},{children:W&&r(t,{children:[i(s,{}),r(d,o({onClick:B,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",borderRadius:1,cursor:B?"pointer":"not-allowed","&:hover":B?{opacity:.8}:{}}},{children:[r(p,o({direction:"row",alignItems:"center",spacing:1},{children:[i(f,{sx:{color:"text.secondary"}}),i(h,o({sx:{color:"text.primary",fontSize:12}},{children:"Cognitive Integrity"}))]})),r(p,o({direction:"row",alignItems:"center",spacing:.75},{children:[i(g,{score:D}),i(l,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))}))}export{b as PageCheckActionEnum,y as default,C as isPageCheckAction};
|
|
2
2
|
//# sourceMappingURL=PageCheck.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as i,jsxs as o}from"react/jsx-runtime";import e from"@mui/icons-material/ArrowForward";import t from"@mui/material/Box";import l from"@mui/material/Button";import n from"@mui/material/Paper";import m from"@mui/material/Stack";import a from"@mui/material/Typography";import{CheckCircleIcon as d}from"lucide-react";function c(c){var s=c.title,h=c.description,p=c.onReview,
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as i,jsxs as o}from"react/jsx-runtime";import e from"@mui/icons-material/ArrowForward";import t from"@mui/material/Box";import l from"@mui/material/Button";import n from"@mui/material/Paper";import m from"@mui/material/Stack";import a from"@mui/material/Typography";import{CheckCircleIcon as d}from"lucide-react";function c(c){var s=c.title,h=c.description,p=c.onReview,u=c.reviewLabel,F=void 0===u?"Review":u;return i(n,r({elevation:0,role:"status",sx:{width:"100%",px:1.5,py:1.5,border:"1.5px solid #86EFAC",borderRadius:2,bgcolor:"#F0FDF4",boxSizing:"border-box"}},{children:o(m,r({alignItems:"center",spacing:1.5,sx:{textAlign:"center"}},{children:[i(t,r({sx:{display:"grid",placeItems:"center",width:58,height:58,border:"8px solid rgba(255, 255, 255, 0.9)",borderRadius:"50%",bgcolor:"#DCFCE7",color:"#0A9B49"}},{children:i(d,{height:36,width:36})})),o(t,{children:[i(a,r({sx:{color:"#166534",fontSize:15,fontWeight:600,lineHeight:1.4}},{children:s})),h?i(a,r({sx:{mt:.75,color:"#07883F",fontSize:14,lineHeight:1.55}},{children:h})):null]}),i(l,r({variant:"outlined",fullWidth:!0,onClick:p,endIcon:i(e,{}),sx:{minHeight:42,border:"1.5px solid #CBD5E1",borderRadius:2,bgcolor:"#FFFFFF",color:"#475569",fontSize:16,fontWeight:700,textTransform:"none","&:hover":{borderColor:"#94A3B8",bgcolor:"#FFFFFF"}}},{children:F}))]}))}))}export{c as default};
|
|
2
2
|
//# sourceMappingURL=RevertSuccessCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as n,__awaiter as t,__generator as i}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as a,useState as l,useEffect as d,useRef as u,useCallback as s}from"react";import{SpecialZoomLevel as c}from"@react-pdf-viewer/core";import g from"../PdfViewer/PdfViewer.js";import v,{BoundaryReviewActionEnum as p,isBoundaryReviewAction as m}from"./BoundaryCard.js";import f from"./CardWrapper.js";import h from"./CognitiveIntegrity.js";import w from"./LabelCheck.js";import b from"./PageCheck.js";import{extractSegmentReviewData as y,getSegmentReviewKey as _}from"./reviewStepAdapters.js";import{CircleCheck as x,Check as S,GitMerge as P}from"lucide-react";import{Typography as k,Tooltip as E,Portal as C,Box as R}from"@mui/material";import I from"./ReviewedCard.js";import M from"./ReviewedBoundaryActions.js";import N from"./RevertCard.js";import A from"./RevertSuccessCard.js";import{getPendingMergeImpactedSegmentKeys as F,hasPolledStructuralAction as B,getOptimisticMergeImpactedSegmentKeys as T,shouldHideStructuralBoundaryReview as W,getResolvedScore as L,getConfidenceColors as z,getBoundaryReviewActionBadgeLabel as q,getTitleReviewActionBadgeLabel as j,getReviewScoreBand as G,isReviewStepResolutionCurrent as O,isReviewStepResolved as D,formatScore as V}from"./helper.js";import H from"./ChartBreakoutCircle.js";var U,X,Y=260;!function(e){e.ActualSize="ActualSize",e.PageFit="PageFit",e.PageWidth="PageWidth"}(X||(X={}));var J=((U={})[X.ActualSize]=c.ActualSize,U[X.PageFit]=c.PageFit,U[X.PageWidth]=c.PageWidth,U),Z=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};function K(U){var X,K,Q,$,ee,ne,te,ie,re,oe,ae,le,de,ue,se,ce,ge,ve,pe,me,fe,he,we,be,ye,_e,xe,Se,Pe,ke,Ee,Ce,Re,Ie,Me=this,Ne=U.pdfUrl,Ae=U.pdfName,Fe=U.segments,Be=U.totalPages,Te=U.styles,We=U.pdfViewerProps,Le=U.specialZoomLevel,ze=U.showBadges,qe=void 0===ze||ze,je=U.sortByConfidence,Ge=void 0===je?"low":je,Oe=U.filterByConfidence,De=void 0===Oe?"all":Oe,Ve=U.showBadgeNavigation,He=void 0===Ve||Ve,Ue=U.autoSelectReviewOnPageChange,Xe=void 0!==Ue&&Ue,Ye=U.autoAdvanceAfterConfirm,Je=void 0===Ye||Ye,Ze=U.autoAdvanceScoreBand,Ke=U.badgePreloadPages,Qe=void 0===Ke?8:Ke,$e=U.badgeOffsetTop,en=void 0===$e?20:$e,nn=U.badgeOffsetRight,tn=void 0===nn?68:nn,rn=U.badgeOffsetLeft,on=void 0===rn?0:rn,an=U.initialReviewId,ln=U.manualPrompt,dn=U.heightBuffer,un=U.onBoundaryAction,sn=U.onLabelAction,cn=U.onPageAction,gn=U.onPageTypeRevert,vn=U.onRevert,pn=U.onActiveReviewChange,mn=U.onCurrentPageChange,fn=U.onActionError,hn=U.disableAllActions,wn=void 0!==hn&&hn,bn=U.disablePdfAnnotations,yn=void 0!==bn&&bn,_n=U.disablePdfTextLayer,xn=void 0===_n||_n,Sn=U.disableTitleCheckUntilBoundaryCheckCompleted,Pn=void 0!==Sn&&Sn,kn=U.onAdjustManually,En=U.onCognitiveClick,Cn=U.className,Rn=U.style,In=U.viewerStyle,Mn=U.railStyle,Nn=U.redirectionData,An=U.onBadgeSelected,Fn=a(function(){return y(Fe)},[Fe]),Bn=Fn.boundaryReviews,Tn=Fn.labelReviews,Wn=Fn.pageReviews,Ln=l(function(){return new Map}),zn=Ln[0],qn=Ln[1],jn=l(function(){return new Set}),Gn=jn[0],On=jn[1],Dn=a(function(){var e=new Map,n=1;return Fe.forEach(function(t,i){var r=_(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[Fe]),Vn=a(function(){return new Set(Tn.map(function(e){return _(e.segment)}))},[Tn]),Hn=a(function(){return F(Fe)},[Fe]);d(function(){qn(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=Fe.find(function(e){return _(e)===i});r&&!B(r,e)||(t.delete(i),n=!0)}),n?t:e})},[Fe]),d(function(){On(function(e){var n=!1,t=new Set(e);return e.forEach(function(e){zn.has(e)||(t.delete(e),n=!0)}),n?t:e})},[zn]);var Un=a(function(){return T(Fe,zn,Gn)},[Gn,zn,Fe]),Xn=u(null),Yn=a(function(){return e(e(e([],Bn.filter(function(e){return!Hn.has(_(e.segment))&&!Un.has(_(e.segment))&&!W(e.review_step,e.segment,Vn.has(_(e.segment)),zn.get(_(e.segment)))}).map(function(e){var t;return n(n({},e),{kind:"boundary",pageNumber:null!==(t=e.metadata.focus_page)&&void 0!==t?t:e.segment.start_page})}),!0),Tn.filter(function(e){return!Hn.has(_(e.segment))&&!Un.has(_(e.segment))}).map(function(e){return n(n({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),Wn.filter(function(e){return!Hn.has(_(e.segment))&&!Un.has(_(e.segment))}).map(function(e){var t;return n(n({},e),{kind:"page",pageNumber:null!==(t=e.metadata.page_num)&&void 0!==t?t:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=Dn.get(_(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=Dn.get(_(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[Bn,Tn,Wn,Un,zn,Hn,Dn,Vn]),Jn=a(function(){return Fe.map(function(e){var t,i;return n(n({},e),{title:(null===(t=e.label)||void 0===t?void 0:t.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[Fe]),Zn=l(1),Kn=Zn[0],Qn=Zn[1],$n=l(null!=an?an:null),et=$n[0],nt=$n[1],tt=l(null!=an?an:null),it=tt[0],rt=tt[1],ot=l(!1),at=ot[0],lt=ot[1],dt=l(null),ut=dt[0],st=dt[1],ct=l(null),gt=ct[0],vt=ct[1],pt=l(function(){return new Set}),mt=pt[0],ft=pt[1],ht=l(null),wt=ht[0],bt=ht[1],yt=l(null),_t=yt[0],xt=yt[1],St=l(null),Pt=St[0],kt=St[1],Et=l(!1),Ct=Et[0],Rt=Et[1],It=u(0),Mt=u(null),Nt=u(null),At=u(new Map),Ft=u(null),Bt=u(null),Tt=u(null),Wt=l(Y),Lt=Wt[0],zt=Wt[1],qt=null!==(K=null===(X=null==Te?void 0:Te.aside)||void 0===X?void 0:X.width)&&void 0!==K?K:"40%",jt="min(".concat("number"==typeof qt?"".concat(qt,"px"):qt,", ").concat(Y,"px, 100%)");d(function(){ft(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return Yn.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[Yn]),d(function(){var e=Xn.current;if(e&&qe){var n=function(){var n=e.getBoundingClientRect().width;n>0&&zt(n)};n();var t="undefined"==typeof ResizeObserver?null:new ResizeObserver(n);return null==t||t.observe(e),function(){return null==t?void 0:t.disconnect()}}},[qe]);var Gt=a(function(){var e=new Set;return Yn.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[Yn]),Ot=a(function(){var e;return null!==(e=Yn.find(function(e){return e.id===et}))&&void 0!==e?e:null},[et,Yn]),Dt=a(function(){return!(!Pn||"label"!==(null==Ot?void 0:Ot.kind))&&Bn.some(function(e){if(_(e.segment)!==_(Ot.segment)||Gt.has(e.id))return!1;var n=L(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[Ot,Bn,Pn,Gt]),Vt=null==Ot?-1:Fe.findIndex(function(e){return _(e)===_(Ot.segment)}),Ht=Vt>0?Fe[Vt-1]:void 0,Ut=Vt>=0?Fe[Vt+1]:void 0,Xt=(null===(Q=null==Ht?void 0:Ht.label)||void 0===Q?void 0:Q.trim())||(null==Ht?void 0:Ht.title),Yt=(null===($=null==Ut?void 0:Ut.label)||void 0===$?void 0:$.trim())||(null==Ut?void 0:Ut.title),Jt=z(null==Ot?void 0:Ot.review_step.score,null==Ot?void 0:Ot.review_step.confidence,null===(ee=null==Ot?void 0:Ot.segment.confidence)||void 0===ee?void 0:ee.awaiting_llm),Zt=(null===(ne=null==Ot?void 0:Ot.review_step.reasons)||void 0===ne?void 0:ne.length)?Ot.review_step.reasons:null!==(ie=null===(te=null==Ot?void 0:Ot.segment.confidence)||void 0===te?void 0:te.reasons)&&void 0!==ie?ie:[],Kt=Boolean(Zt.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(re=null==Ot?void 0:Ot.review_step.reason)||void 0===re?void 0:re.trim())||(null===(oe=null==Ot?void 0:Ot.review_step.gap)||void 0===oe?void 0:oe.trim())),Qt=null==Ot?null:"boundary"===Ot.kind?q(Ot.review_step,Ot.segment,zn.get(null!==(ae=Ot.segment.stable_key)&&void 0!==ae?ae:"")):j(Ot.review_step,Ot.segment,zn.get(null!==(le=Ot.segment.stable_key)&&void 0!==le?le:"")),$t="label"===(null==Ot?void 0:Ot.kind)?[Qt,Ot.review_step.human_action_enum,null===(de=Ot.review_step.review)||void 0===de?void 0:de.action,null===(ue=Ot.review_step.human_resolution)||void 0===ue?void 0:ue.action]:[],ei="label"===(null==Ot?void 0:Ot.kind)&&$t.some(function(e){var n,t=null!==(n=null==e?void 0:e.trim().toUpperCase())&&void 0!==n?n:"";return t.includes("MERGE")||t.includes("SPLIT")}),ni=null!=Ot&&Yn.some(function(e){return"boundary"===e.kind&&_(e.segment)===_(Ot.segment)}),ti=ei&&!ni,ii=("boundary"===(null==Ot?void 0:Ot.kind)||ti)&&null!=Ot?function(){var e,t,i,r,o,a;if("boundary"===Ot.kind)return Ot;var l=Bn.find(function(e){return _(e.segment)===_(Ot.segment)});return l?n(n({},l),{kind:"boundary",pageNumber:null!==(e=l.metadata.focus_page)&&void 0!==e?e:l.segment.start_page}):n(n({},Ot),{kind:"boundary",pageNumber:null!==(i=null===(t=Ot.segment.review_action)||void 0===t?void 0:t.focus_page)&&void 0!==i?i:Ot.segment.start_page,metadata:{focus_page:null!==(o=null===(r=Ot.segment.review_action)||void 0===r?void 0:r.focus_page)&&void 0!==o?o:null,boundary_margin:null!==(a=Ot.segment.boundary_margin)&&void 0!==a?a:null,user_actions:[]}})}():void 0,ri=null==Ot?"":(null===(se=Ot.segment.label)||void 0===se?void 0:se.trim())||Ot.segment.title,oi=null==Ot?void 0:Ot.review_step.revert,ai=null==Ot?void 0:Ot.segment.revert,li=function(e){return null==e?void 0:e.trim().toLowerCase()},di=null==Ot||null===(ge=e([],null!==(ce=Ot.segment.review_steps)&&void 0!==ce?ce:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===li(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===ge?void 0:ge.revert,ui=null!==(ve=null!=oi?oi:null==Ot?void 0:Ot.segment.revert)&&void 0!==ve?ve:di,si=null==ui?void 0:ui.decision.trim().toUpperCase(),ci=null!=Qt?Qt:(null==si?void 0:si.includes("SPLIT"))?"Split":(null==si?void 0:si.includes("MERGE"))?"Merged":null,gi="label"===(null==Ot?void 0:Ot.kind)&&"SET_RANGE"===(null===(pe=null==di?void 0:di.decision)||void 0===pe?void 0:pe.trim().toUpperCase())&&di.current_segment_ids.length!==di.previous_state.length,vi="Merged"===Qt||"Split"===Qt||gi,pi=null==Ot?void 0:vi?"boundary"===li(null==di?void 0:di.type)?di:"boundary"===li(null==ai?void 0:ai.type)?ai:"boundary"===li(null==oi?void 0:oi.type)?oi:void 0:"label"===Ot.kind?"label"===li(null==oi?void 0:oi.type)?oi:void 0:"boundary"===Ot.kind?"boundary"===li(null==oi?void 0:oi.type)?oi:"boundary"===li(null==di?void 0:di.type)?di:"boundary"===li(null==ai?void 0:ai.type)?ai:void 0:void 0,mi=vi&&(null==pi?void 0:pi.operation_id)?Fe.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,a,l,d=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===d||"page boundary review"===d)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===pi.operation_id&&Boolean(null===(l=null===(a=e.human_resolution)||void 0===a?void 0:a.change_summary)||void 0===l?void 0:l.trim()))}):void 0,fi=(null===(me=null==pi?void 0:pi.summary)||void 0===me?void 0:me.trim())||null,hi=vi?(null===(he=null===(fe=null==mi?void 0:mi.human_resolution)||void 0===fe?void 0:fe.change_summary)||void 0===he?void 0:he.trim())||(null===(we=null==pi?void 0:pi.summary)||void 0===we?void 0:we.trim())||"":(null===(_e=null===(ye=null===(be=null==Ot?void 0:Ot.review_step)||void 0===be?void 0:be.human_resolution)||void 0===ye?void 0:ye.change_summary)||void 0===_e?void 0:_e.trim())||(null===(Se=null===(xe=null==Ot?void 0:Ot.review_step)||void 0===xe?void 0:xe.summary)||void 0===Se?void 0:Se.trim())||"",wi=null==Ot?null:pi?{currentSegment:{title:ri,startPage:Ot.segment.start_page,endPage:Ot.segment.end_page},previousSegments:pi.previous_state.map(function(e){var n,t;return{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||(null===(t=e.title)||void 0===t?void 0:t.trim())||"Untitled document",startPage:e.start_page,endPage:e.end_page}})}:"Split"===ci?{currentSegment:{title:ri,startPage:Ot.segment.start_page,endPage:Ot.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:ri,startPage:Ot.segment.start_page,endPage:Ot.segment.end_page}]}:"Merged"===ci?{currentSegment:{title:ri,startPage:Ot.segment.start_page,endPage:Ot.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:"Request for proposal (RFP)",startPage:26,endPage:76}]}:{currentSegment:{title:ri,startPage:Ot.segment.start_page,endPage:Ot.segment.end_page},previousSegments:[]},bi="page"===(null==Ot?void 0:Ot.kind)&&null!==(Pe=Ot.metadata.classification_id)&&void 0!==Pe?Pe:null,yi="page"===(null==Ot?void 0:Ot.kind)?Boolean(gn&&bi):Boolean((null==pi?void 0:pi.operation_id)&&(null==pi?void 0:pi.type)&&!1!==(null==pi?void 0:pi.revertable));Boolean(wi&&yi&&("page"!==(null==Ot?void 0:Ot.kind)||bi));var _i=s(function(e,n){It.current+=1,Mt.current={requestId:It.current,pageNumber:e,reviewId:n},vt({pageNumber:e,requestId:It.current})},[]),xi=s(function(e){var n,t;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(null==An||An({reviewId:e.id,segment_id:null!==(t=e.segment.segment_id)&&void 0!==t?t:null,reviewStepIndex:e.reviewStepIndex,kind:e.kind,pageNumber:e.pageNumber,metadata:e.metadata}),xt(null),kt(null),nt(e.id),rt(e.id),lt(!1),st(null),_i(e.pageNumber,e.id),null==pn||pn(e.id,e.segment))},[pn,An,_i]);d(function(){if(Pt){var e=requestAnimationFrame(function(){return Rt(!0)}),n=window.setTimeout(function(){Rt(!1)},3500),t=window.setTimeout(function(){kt(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[Pt]),d(function(){var e,n,t,i;if(Nn){if("pageGroup"===Nn.type){var r=null!==(e=Nn.pages)&&void 0!==e?e:[],o=null!==(n=Nn.pageIndex)&&void 0!==n?n:0,a=r[o];if(null==a)return;return Si(),xt({pages:r,index:o,label:null!==(t=Nn.groupLabel)&&void 0!==t?t:""}),It.current+=1,void vt({pageNumber:a,requestId:It.current})}if(xt(null),Nn.reviewId){var l=Yn.find(function(e){return e.id===Nn.reviewId&&(!Nn.type||e.kind===Nn.type)});if(l)return void xi(l)}if(Nn.classificationId){var d=Yn.find(function(e){return!("page"!==e.kind||e.metadata.classification_id!==Nn.classificationId||Nn.segmentId&&e.segment.segment_id!==Nn.segmentId||Nn.type&&e.kind!==Nn.type)});if(d)return void xi(d)}if(Nn.pageNumber&&Nn.type){var u=Number(Nn.pageNumber);if(Number.isInteger(u)&&!(u<1)){var s=null===(i=Nn.pageType)||void 0===i?void 0:i.trim().toLowerCase(),c=Yn.find(function(e){var n="page"===e.kind?e.pageNumber:e.segment.start_page,t="page"!==e.kind||!s||e.metadata.page_type===s;return(!Nn.segmentId||e.segment.segment_id===Nn.segmentId)&&n===u&&e.kind===Nn.type&&t});c?xi(c):"page"===Nn.type&&(Si(),It.current+=1,vt({pageNumber:u,requestId:It.current}))}}}},[Nn,xi,Yn]);var Si=s(function(){Mt.current=null,lt(!1),nt(null),st(null),null==pn||pn(null,null)},[pn]),Pi=s(function(e){var n;Rt(!1),kt(null);var t=null!==(n=Yn.find(function(n){return!Gt.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:Yn.find(function(n){return!Gt.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?xi(t):(Si(),It.current+=1,vt({pageNumber:e.startPage,requestId:It.current}))},[Si,Gt,Yn,xi]),ki=s(function(e,n){var t,i=G(e.review_step.score),r=null==Ze||i===Ze,o=mt.has(e.id)&&O(e.review_step,e.segment);return e.id!==n&&r&&!0!==(null===(t=e.segment.confidence)||void 0===t?void 0:t.awaiting_llm)&&!D(e.review_step,e.segment)&&!o},[Ze,mt]),Ei=s(function(e){var n;if(Je){var t=Yn.findIndex(function(n){return n.id===e}),i=null!==(n=Yn.find(function(n,i){return i>t&&ki(n,e)}))&&void 0!==n?n:Yn.find(function(n){return ki(n,e)});i?requestAnimationFrame(function(){return xi(i)}):Si()}else Si()},[Je,Si,ki,Yn,xi]),Ci=s(function(e,n,r){return t(Me,void 0,void 0,function(){var t,o,a,l,d,u,s,c,g,v;return i(this,function(i){switch(i.label){case 0:if(wn)return[2];if("boundary"===e.kind&&!un)return[2];if("label"===e.kind&&!sn)return[2];if("page"===e.kind&&!cn)return[2];t=Z(e),a=r,l=(o=n)===p.SET_RANGE?function(){var n=a.startPage,t=a.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?p.MERGE_PREV:p.MERGE_NEXT:r?p.SPLIT_HERE:null}():o,d="boundary"===e.kind&&null!=un&&Je&&(l===p.SPLIT_HERE||l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),u=d?Fe.findIndex(function(n){return _(n)===_(e.segment)}):-1,d&&u>=0&&l&&(Nt.current={action:l,originalSegmentIndex:u,segmentSignature:JSON.stringify(Fe.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),bt(e.id),i.label=1;case 1:return i.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==un?void 0:un(n,r,t)];case 2:return i.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==sn?void 0:sn(n,r,t)];case 4:return i.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==cn?void 0:cn(n,r,t)];case 6:i.sent(),i.label=7;case 7:return ft(function(n){var t=new Set(n);return t.add(e.id),t}),s="boundary"===e.kind&&(l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),("boundary"===e.kind&&l===p.SPLIT_HERE||s)&&l&&(c=_(e.segment),On(function(e){var n=new Set(e);return o===p.SET_RANGE?n.add(c):n.delete(c),n}),qn(function(e){var n=new Map(e);return n.set(c,l),n})),Nt.current?(Nt.current.ready=!0,s&&(g=Yn.find(function(n){return"label"===n.kind&&_(n.segment)===_(e.segment)}))&&requestAnimationFrame(function(){return xi(g)})):Ei(e.id),[3,10];case 8:return v=i.sent(),d&&(Nt.current=null),null==fn||fn(v,t),[3,10];case 9:return bt(null),[7];case 10:return[2]}})})},[Je,wn,fn,un,sn,cn,gn,Yn,Fe,xi,Ei]);d(function(){var e=Nt.current;if(null==e?void 0:e.ready){var n=JSON.stringify(Fe.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===p.SPLIT_HERE?e.originalSegmentIndex+1:e.action===p.MERGE_PREV||e.action===p.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(Fe.map(function(e,n){return[_(e,n),n]})),r=Yn.find(function(e){var n=i.get(_(e.segment));return null!=n&&n>=t&&ki(e)});if(!r)return Nt.current=null,void Si();requestAnimationFrame(function(){Nt.current=null,xi(r)})}}},[Si,ki,Yn,Fe,xi]),d(function(){Nt.current||et&&!Yn.some(function(e){return e.id===et})&&Si()},[et,Si,Yn]),d(function(){if(Xe&&!Nt.current){var e=Yn.find(function(e){return e.pageNumber===Kn});e&&e.id!==et&&xi(e)}},[et,Xe,Kn,xi,Yn]),d(function(){Nt.current||et&&!Yn.some(function(e){var n;return e.id===et&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&Si()},[et,Si,Yn]);var Ri=a(function(){var n=Yn.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===De)return n;var t=["low","medium","high"].filter(function(e){return e!==Ge}),i=e([Ge],t,!0),r=new Map(i.map(function(e,n){return[e,n]}));return n.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,a,l,d=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),u=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==d?i.length:null!==(a=r.get(d))&&void 0!==a?a:i.length)-(null==u?i.length:null!==(l=r.get(u))&&void 0!==l?l:i.length)||e.index-n.index}).map(function(e){return e.item})},[De,Ge,Yn]),Ii=Ri.findIndex(function(e){return e.id===it}),Mi=l(null),Ni=Mi[0],Ai=Mi[1],Fi=u(!1),Bi=s(function(e){var n=Ri[e];n&&xi(n)},[Ri,xi]);s(function(e){if(!(!_t||e<0||e>=_t.pages.length)){var t=_t.pages[e];null!=t&&(Si(),xt(function(t){return null==t?t:n(n({},t),{index:e})}),It.current+=1,vt({pageNumber:t,requestId:It.current}))}},[_t,Si]),d(function(){it&&!Ri.some(function(e){return e.id===it})&&rt(null)},[Ri,it]),d(function(){Fi.current=!1,Ai(Ii>=0?String(Ii+1):null)},[Ii,Ri.length]),d(function(){if(Fi.current&&null!=Ni){var e=window.setTimeout(function(){var e=Number(Ni.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Ri.length&&(Fi.current=!1,Bi(n))},300);return function(){return window.clearTimeout(e)}}},[Bi,Ni,Ri.length]);var Ti=a(function(){var e=new Map;Yn.forEach(function(n){var t,i=null!==(t=e.get(_(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(_(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=Dn.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[Yn,Dn]),Wi=a(function(){var e=new Map;Yn.forEach(function(n){var t,i=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];i.push(n),e.set(n.pageNumber,i)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.id,t)})}),n},[Yn]),Li=s(function(e){return{startPage:Math.max(0,e.startPage-Qe),endPage:Math.min(e.numPages-1,e.endPage+Qe)}},[Qe]),zi=s(function(){var e,n=Bt.current,t=Tt.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();Yn.forEach(function(e){var n,r=At.current.get(e.id);if(r){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),d=null!==(n=Wi.get(e.id))&&void 0!==n?n:0,u=l.top+en+40*d,s=u+(r.offsetHeight||32),c=u>=o.top&&s<=o.bottom;r.style.top="".concat(u-i.top,"px"),r.style.visibility=c?"visible":"hidden"}else r.style.visibility="hidden"}});var a=Ft.current;if(a){var l=null==_t?void 0:_t.pages[_t.index],d=null==l?null:t.querySelector('[data-testid="core__page-layer-'.concat(l-1,'"]'));if(_t&&d){var u=d.getBoundingClientRect().top+en,s=u+(a.offsetHeight||25),c=u>=o.top&&s<=o.bottom;a.style.top="".concat(u-i.top,"px"),a.style.visibility=c?"visible":"hidden"}else a.style.visibility="hidden"}if(et&&null==Mt.current){var g=At.current.get(et);g&&"hidden"!==g.style.visibility&&st(function(e){return e===g?e:g})}}},[_t,et,en,Wi,Yn]),qi=s(function(e){var n=Mt.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Mt.current=null,zi(),requestAnimationFrame(function(){if(null==Mt.current){var e=At.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&st(e)}}))},[zi]);return d(function(){var e=Tt.current;if(e&&qe){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,zi()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var i=new MutationObserver(t);i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var r="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==r||r.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),i.disconnect(),null==r||r.disconnect()}}},[qe,zi]),r("div",n({ref:Bt,className:Cn,style:n(n({},Rn),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[r("div",n({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[o("div",n({ref:Tt,style:n(n({},In),{flex:"1 1 auto",width:qe?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(g,n({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1,showRotateButton:!0},We,{defaultScale:void 0===Le?null!==(ke=null==We?void 0:We.defaultScale)&&void 0!==ke?ke:c.PageFit:J[Le],disablePdfAnnotations:yn,disablePdfTextLayer:xn,pdfUrl:Ne,pdfName:Ae,segments:Jn,navigationRequest:gt,onNavigationSettled:qi,setRenderRange:Li,onCurrentPageChange:function(e){Qn(e),null==Mt.current&&Ot&&Ot.pageNumber!==e&&Si(),null==mn||mn(e)}}))})),qe&&r("aside",n({"aria-label":"Page review badges",ref:Xn,style:n(n({},Mn),{position:"relative",width:jt,maxWidth:Y,flex:"0 1 ".concat(jt),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[_t&&o("span",n({ref:Ft,style:{position:"absolute",top:0,left:10,visibility:"hidden",zIndex:2,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:4,minHeight:25,padding:"2px 8px",border:"1px solid #E2E8F0",borderRadius:16,backgroundColor:"#F8FAFC",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)",font:"inherit"}},{children:r(k,n({fontFamily:"Inter",sx:{fontSize:11,fontWeight:500,color:"#475569",whiteSpace:"nowrap"}},{children:[_t.label||"Pages"," Pg: ",_t.index+1]}))})),He&&Ri.length>0&&!_t&&r("nav",n({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:tn||"auto",left:on||"auto",zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[o("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Ni?Ni:"-","aria-label":"Review badge number",onChange:function(e){Fi.current=!0,Ai(e.target.value)},style:{width:30,height:28,padding:0,border:"1px solid #A5B4FC",borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}}),r("span",n({"aria-label":"".concat(Ri.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Ri.length]})),["previous","next"].map(function(e){var t="previous"===e,i=Ii+(t?-1:1),r=i<0||i>=Ri.length;return o("button",n({type:"button","aria-label":"".concat(t?"Previous":"Next"," review badge"),disabled:r,onClick:function(){return Bi(i)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:r?"#C7D2FE":"#4F46E5",cursor:r?"default":"pointer"}},{children:o("svg",n({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:o("path",{d:t?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),!_t&&Yn.map(function(e){var t,i,a=et===e.id,l=null!==(t=Ti.get(e.id))&&void 0!==t?t:"1A",d=e.review_step.score,u=e.review_step.confidence,s=V(d,u),c="boundary"===e.kind?q(e.review_step,e.segment,zn.get(_(e.segment))):"label"===e.kind?j(e.review_step,e.segment,zn.get(_(e.segment))):null,g=null!=c?c:"N/A"===s?s:"".concat(s,"%"),v=!0===(null===(i=e.segment.confidence)||void 0===i?void 0:i.awaiting_llm),p=z(d,u,v),m=Gt.has(e.id);return o(E,n({title:v?"data is being processed":"",arrow:!0},{children:o("span",n({ref:function(n){n?At.current.set(e.id,n):At.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:v?"not-allowed":"pointer"}},{children:o("button",n({disabled:v,type:"button","aria-pressed":a,"aria-label":v?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return xi(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:c?m&&!v?115:90:m&&!v?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(m&&!v?"#E2E8F0":p.border),borderRadius:16,backgroundColor:m&&!v?"#F8FAFC":p.background,color:m&&!v?"#475569":p.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:r(k,n({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},m&&!v?{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:g}))]})),r("span",n({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:o(x,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]}:{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:p.divider,strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:g}))]}))]}))}))}))}),e.id)})]}))]})),Ot&&ut&&r(f,n({anchorElement:ut,placement:"bottom-start",offset:{top:8},width:Math.min(Lt,Y),maxWidth:Y,heightBuffer:null!=dn?dn:25},{children:[at&&o(h,{width:"100%",maxWidth:"100%",score:Ot.review_step.score,reasons:Zt,reason:Ot.review_step.reason,gap:Ot.review_step.gap,onBack:function(){return lt(!1)},onClose:Si}),o("div",n({style:{display:at?"none":"block"}},{children:Gt.has(Ot.id)?o(I,{width:"100%",maxWidth:"100%",headerName:"page"===Ot.kind?"Page format approved":"Split"===Qt?"Split approved":"Merged"===Qt?"Merge approved":"User approved",headerIcon:"page"===Ot.kind?o(S,{size:18,strokeWidth:2}):"Merged"===Qt?o(P,{size:18,strokeWidth:2}):"Split"===Qt?o(H,{width:18,height:18}):o(x,{size:18,strokeWidth:2}),title:ri,pageNo:"Page ".concat(Ot.segment.start_page,"-").concat(Ot.segment.end_page),summary:wi?o(N,{icon:o(x,{size:14,strokeWidth:2}),title:ri,pageRange:"Page ".concat(Ot.segment.start_page,"-").concat(Ot.segment.end_page),description:null!=hi?hi:null,revertData:wi,confirmDisabled:"page"===Ot.kind?!yi:null==vn||!yi,showDocumentHeader:!1,onRevert:function(){if("page"===Ot.kind){if(!gn||!bi){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==fn||fn(e,Z(Ot)),Promise.reject(e)}return gn({classification_id:bi,human_verdict:"No"},Z(Ot))}if(!vn)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!pi)throw new Error("There is no valid revert operation for this review.");var n=vi?"boundary":"label"===Ot.kind?"label":"boundary"===Ot.kind?"boundary":null,t=li(pi.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return vn(pi,Z(Ot))},onRevertError:function(e){null==fn||fn(e,Z(Ot))},onRevertComplete:function(e){var n,t,i,r,o,a;ft(function(){return new Set}),"page"!==Ot.kind&&(On(function(){return new Set}),qn(function(){return new Map})),Ot.id;var l=null!==(n=wi.previousSegments[0])&&void 0!==n?n:wi.currentSegment,d=null==ut?void 0:ut.getBoundingClientRect(),u=null===(t=Tt.current)||void 0===t?void 0:t.getBoundingClientRect(),s=Math.min(Y,Math.max(220,Lt)),c=null!==(i=null==d?void 0:d.left)&&void 0!==i?i:(null!==(r=null==u?void 0:u.right)&&void 0!==r?r:window.innerWidth-s-8)+8,g=Math.max(8,Math.min(c,window.innerWidth-s-8)),v=null==(null==d?void 0:d.bottom)?Math.max(8,null!==(o=null==u?void 0:u.top)&&void 0!==o?o:8):d.bottom+8;ft(function(){return new Set}),"page"!==Ot.kind&&(Nt.current=null),Rt(!1),kt({title:"Split"===Qt?"Split reverted":"Merged"===Qt?"Merge reverted":"Approval reverted",description:(null===(a=null==e?void 0:e.message)||void 0===a?void 0:a.trim())||("Split"===Qt?"Pages ".concat(Ot.segment.start_page,"-").concat(Ot.segment.end_page," are now part of “Advice of Award” again. Review the boundary and title to confirm the document."):"Merged"===Qt?"The documents have been separated again. Review their boundaries and titles to confirm them.":"“".concat(ri,"” is pending review again. Review the boundary and title to confirm the document.")),segment:l,position:{top:v,left:g,width:s}}),Si()}},Ot.id):void 0,additionalActions:ii?o(M,{metadata:ii.metadata,reviewAction:null!==(Ee=Ot.segment.review_action)&&void 0!==Ee?Ee:void 0,startPage:Ot.segment.start_page,endPage:Ot.segment.end_page,title:ri,previousSegmentTitle:Xt,nextSegmentTitle:Yt,disabled:wn||!un||wt===Ot.id,onConfirm:function(e,n){Ci(ii,e,n)}}):void 0,cognitiveScore:Ot.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:Kt?function(){lt(!0),null==En||En(Z(Ot))}:void 0,onClose:Si}):"boundary"===Ot.kind?o(v,{width:"100%",maxWidth:"100%",totalPages:Be,title:Ot.segment.label||Ot.segment.title,pageNo:"Page ".concat(Ot.pageNumber),content:null!==(Ce=Ot.review_step.question)&&void 0!==Ce?Ce:null,revertSummary:fi,cognitiveScore:Ot.review_step.score,metadata:Ot.metadata,reviewAction:null!==(Re=Ot.segment.review_action)&&void 0!==Re?Re:void 0,previousSegmentTitle:Xt,nextSegmentTitle:Yt,manualPrompt:null!=ln?ln:"Set a custom boundary",defaultStartPage:Ot.segment.start_page,defaultEndPage:Ot.segment.end_page,styles:{root:{borderColor:Jt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Jt.text}}},confirmDisabled:wn||!un||wt===Ot.id,onConfirm:function(e,n,t){t&&m(n.id)&&Ci(Ot,n.id,t)},onAdjustManually:function(){return null==kn?void 0:kn(Z(Ot))},onCognitiveClick:Kt?function(){lt(!0),null==En||En(Z(Ot))}:void 0,onClose:Si},Ot.id):"label"===Ot.kind?o(w,{width:"100%",maxWidth:"100%",title:Ot.metadata.current_label||Ot.segment.label||Ot.segment.title,pageNo:"Pages ".concat(Ot.segment.start_page,"-").concat(Ot.segment.end_page),content:null!==(Ie=Ot.review_step.question)&&void 0!==Ie?Ie:null,revertSummary:fi,cognitiveScore:Ot.review_step.score,metadata:Ot.metadata,styles:{root:{borderColor:Jt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Jt.text}}},confirmDisabled:wn||!sn||wt===Ot.id,confirmationBlocked:Dt,confirmationWarning:Dt?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){Ci(Ot,e,n)},onAdjustManually:function(){return null==kn?void 0:kn(Z(Ot))},onCognitiveClick:Kt?function(){lt(!0),null==En||En(Z(Ot))}:void 0,onClose:Si},Ot.id):o(b,{width:"100%",maxWidth:"100%",title:Ot.segment.label||Ot.segment.title,pageNo:"Page ".concat(Ot.pageNumber),content:Ot.review_step.reason,cognitiveScore:Ot.review_step.score,pageType:Ot.metadata.page_type,metadata:Ot.metadata,styles:{root:{borderColor:Jt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Jt.text}}},confirmDisabled:wn||!cn||wt===Ot.id,onActionConfirm:function(e,n){Ci(Ot,e,n)},onCognitiveClick:Kt?function(){lt(!0),null==En||En(Z(Ot))}:void 0,onClose:Si},Ot.id)}))]})),Pt&&o(C,{children:o(R,n({"aria-live":"polite",sx:{position:"fixed",top:Pt.position.top,left:Pt.position.left,zIndex:1600,width:Pt.position.width,maxWidth:"calc(100vw - 16px)",opacity:Ct?1:0,transform:Ct?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:Ct?"auto":"none"}},{children:o(A,{title:Pt.title,description:Pt.description,onReview:function(){return Pi(Pt.segment)}})}))})]}))}export{X as SegmentPdfSpecialZoomLevel,K as default};
|
|
1
|
+
import{__spreadArray as e,__assign as n,__awaiter as t,__generator as i}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as l,useState as a,useEffect as d,useRef as u,useCallback as s}from"react";import{SpecialZoomLevel as c}from"@react-pdf-viewer/core";import v from"../PdfViewer/PdfViewer.js";import g,{BoundaryReviewActionEnum as p,isBoundaryReviewAction as m}from"./BoundaryCard.js";import f from"./CardWrapper.js";import h from"./CognitiveIntegrity.js";import w from"./LabelCheck.js";import b from"./PageCheck.js";import{extractSegmentReviewData as y,getSegmentReviewKey as _}from"./reviewStepAdapters.js";import{CircleCheck as x,Check as S,GitMerge as E}from"lucide-react";import{Typography as k,Tooltip as C,Portal as P,Box as I}from"@mui/material";import R from"./ReviewedCard.js";import N from"./ReviewedBoundaryActions.js";import M from"./RevertCard.js";import A from"./RevertSuccessCard.js";import{getPendingMergeImpactedSegmentKeys as F,hasPolledStructuralAction as T,getOptimisticMergeImpactedSegmentKeys as B,shouldHideStructuralBoundaryReview as L,getResolvedScore as W,getConfidenceColors as z,getBoundaryReviewActionBadgeLabel as j,getTitleReviewActionBadgeLabel as q,isReviewStepResolutionCurrent as G,isReviewStepResolved as O,formatScore as D}from"./helper.js";import V from"./ChartBreakoutCircle.js";import{getReviewScoreBand as H}from"./reviewScore.js";var U,X,Y=260;!function(e){e.ActualSize="ActualSize",e.PageFit="PageFit",e.PageWidth="PageWidth"}(X||(X={}));var J=((U={})[X.ActualSize]=c.ActualSize,U[X.PageFit]=c.PageFit,U[X.PageWidth]=c.PageWidth,U),Z=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};function K(U){var X,K,Q,$,ee,ne,te,ie,re,oe,le,ae,de,ue,se,ce,ve,ge,pe,me,fe,he,we,be,ye,_e,xe,Se,Ee,ke,Ce,Pe,Ie,Re,Ne,Me=this,Ae=U.pdfUrl,Fe=U.pdfName,Te=U.segments,Be=U.totalPages,Le=U.styles,We=U.pdfViewerProps,ze=U.specialZoomLevel,je=U.showBadges,qe=void 0===je||je,Ge=U.sortByConfidence,Oe=void 0===Ge?"low":Ge,De=U.filterByConfidence,Ve=void 0===De?"all":De,He=U.showBadgeNavigation,Ue=void 0===He||He,Xe=U.autoSelectReviewOnPageChange,Ye=void 0!==Xe&&Xe,Je=U.autoAdvanceAfterConfirm,Ze=void 0===Je||Je,Ke=U.autoAdvanceScoreBand,Qe=U.badgePreloadPages,$e=void 0===Qe?8:Qe,en=U.badgeOffsetTop,nn=void 0===en?20:en,tn=U.badgeOffsetRight,rn=void 0===tn?68:tn,on=U.badgeOffsetLeft,ln=void 0===on?0:on,an=U.initialReviewId,dn=U.manualPrompt,un=U.heightBuffer,sn=U.onBoundaryAction,cn=U.onLabelAction,vn=U.onPageAction,gn=U.onPageTypeRevert,pn=U.onRevert,mn=U.onActiveReviewChange,fn=U.onCurrentPageChange,hn=U.onActionError,wn=U.disableAllActions,bn=void 0!==wn&&wn,yn=U.disablePdfAnnotations,_n=void 0!==yn&&yn,xn=U.disablePdfTextLayer,Sn=void 0===xn||xn,En=U.disableTitleCheckUntilBoundaryCheckCompleted,kn=void 0!==En&&En,Cn=U.onAdjustManually,Pn=U.onCognitiveClick,In=U.className,Rn=U.style,Nn=U.viewerStyle,Mn=U.railStyle,An=U.redirectionData,Fn=U.onBadgeSelected;console.log("LOG: TOTAL PAGE IN PARENT",Be);var Tn=l(function(){return y(Te)},[Te]),Bn=Tn.boundaryReviews,Ln=Tn.labelReviews,Wn=Tn.pageReviews,zn=a(function(){return new Map}),jn=zn[0],qn=zn[1],Gn=a(function(){return new Set}),On=Gn[0],Dn=Gn[1],Vn=l(function(){var e=new Map,n=1;return Te.forEach(function(t,i){var r=_(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[Te]),Hn=l(function(){return new Set(Ln.map(function(e){return _(e.segment)}))},[Ln]),Un=l(function(){return F(Te)},[Te]);d(function(){qn(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=Te.find(function(e){return _(e)===i});r&&!T(r,e)||(t.delete(i),n=!0)}),n?t:e})},[Te]),d(function(){Dn(function(e){var n=!1,t=new Set(e);return e.forEach(function(e){jn.has(e)||(t.delete(e),n=!0)}),n?t:e})},[jn]);var Xn=l(function(){return B(Te,jn,On)},[On,jn,Te]),Yn=u(null),Jn=l(function(){return e(e(e([],Bn.filter(function(e){return!Un.has(_(e.segment))&&!Xn.has(_(e.segment))&&!L(e.review_step,e.segment,Hn.has(_(e.segment)),jn.get(_(e.segment)))}).map(function(e){var t;return n(n({},e),{kind:"boundary",pageNumber:null!==(t=e.metadata.focus_page)&&void 0!==t?t:e.segment.start_page})}),!0),Ln.filter(function(e){return!Un.has(_(e.segment))&&!Xn.has(_(e.segment))}).map(function(e){return n(n({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),Wn.filter(function(e){return!Un.has(_(e.segment))&&!Xn.has(_(e.segment))}).map(function(e){var t;return n(n({},e),{kind:"page",pageNumber:null!==(t=e.metadata.page_num)&&void 0!==t?t:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=Vn.get(_(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=Vn.get(_(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[Bn,Ln,Wn,Xn,jn,Un,Vn,Hn]),Zn=l(function(){return Te.map(function(e){var t,i;return n(n({},e),{title:(null===(t=e.label)||void 0===t?void 0:t.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[Te]),Kn=a(1),Qn=Kn[0],$n=Kn[1],et=a(null!=an?an:null),nt=et[0],tt=et[1],it=a(null!=an?an:null),rt=it[0],ot=it[1],lt=a(!1),at=lt[0],dt=lt[1],ut=a(null),st=ut[0],ct=ut[1],vt=a(null),gt=vt[0],pt=vt[1],mt=a(function(){return new Set}),ft=mt[0],ht=mt[1],wt=a(null),bt=wt[0],yt=wt[1],_t=a(null),xt=_t[0],St=_t[1],Et=a(null),kt=Et[0],Ct=Et[1],Pt=a(!1),It=Pt[0],Rt=Pt[1],Nt=u(0),Mt=u(null),At=u(null),Ft=u(new Map),Tt=u(null),Bt=u(null),Lt=u(null),Wt=a(Y),zt=Wt[0],jt=Wt[1],qt=null!==(K=null===(X=null==Le?void 0:Le.aside)||void 0===X?void 0:X.width)&&void 0!==K?K:"40%",Gt="min(".concat("number"==typeof qt?"".concat(qt,"px"):qt,", ").concat(Y,"px, 100%)");d(function(){ht(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return Jn.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[Jn]),d(function(){var e=Yn.current;if(e&&qe){var n=function(){var n=e.getBoundingClientRect().width;n>0&&jt(n)};n();var t="undefined"==typeof ResizeObserver?null:new ResizeObserver(n);return null==t||t.observe(e),function(){return null==t?void 0:t.disconnect()}}},[qe]);var Ot=l(function(){var e=new Set;return Jn.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[Jn]),Dt=l(function(){var e;return null!==(e=Jn.find(function(e){return e.id===nt}))&&void 0!==e?e:null},[nt,Jn]),Vt=l(function(){return!(!kn||"label"!==(null==Dt?void 0:Dt.kind))&&Bn.some(function(e){if(_(e.segment)!==_(Dt.segment)||Ot.has(e.id))return!1;var n=W(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[Dt,Bn,kn,Ot]),Ht=null==Dt?-1:Te.findIndex(function(e){return _(e)===_(Dt.segment)}),Ut=Ht>0?Te[Ht-1]:void 0,Xt=Ht>=0?Te[Ht+1]:void 0,Yt=(null===(Q=null==Ut?void 0:Ut.label)||void 0===Q?void 0:Q.trim())||(null==Ut?void 0:Ut.title),Jt=(null===($=null==Xt?void 0:Xt.label)||void 0===$?void 0:$.trim())||(null==Xt?void 0:Xt.title),Zt=z(null==Dt?void 0:Dt.review_step.score,null==Dt?void 0:Dt.review_step.confidence,null===(ee=null==Dt?void 0:Dt.segment.confidence)||void 0===ee?void 0:ee.awaiting_llm),Kt=(null===(ne=null==Dt?void 0:Dt.review_step.reasons)||void 0===ne?void 0:ne.length)?Dt.review_step.reasons:null!==(ie=null===(te=null==Dt?void 0:Dt.segment.confidence)||void 0===te?void 0:te.reasons)&&void 0!==ie?ie:[],Qt=Boolean(Kt.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(re=null==Dt?void 0:Dt.review_step.reason)||void 0===re?void 0:re.trim())||(null===(oe=null==Dt?void 0:Dt.review_step.gap)||void 0===oe?void 0:oe.trim())),$t=null==Dt?null:"boundary"===Dt.kind?j(Dt.review_step,Dt.segment,jn.get(null!==(le=Dt.segment.stable_key)&&void 0!==le?le:"")):q(Dt.review_step,Dt.segment,jn.get(null!==(ae=Dt.segment.stable_key)&&void 0!==ae?ae:"")),ei="label"===(null==Dt?void 0:Dt.kind)?[$t,Dt.review_step.human_action_enum,null===(de=Dt.review_step.review)||void 0===de?void 0:de.action,null===(ue=Dt.review_step.human_resolution)||void 0===ue?void 0:ue.action]:[],ni="label"===(null==Dt?void 0:Dt.kind)&&ei.some(function(e){var n,t=null!==(n=null==e?void 0:e.trim().toUpperCase())&&void 0!==n?n:"";return t.includes("MERGE")||t.includes("SPLIT")}),ti=null!=Dt&&Jn.some(function(e){return"boundary"===e.kind&&_(e.segment)===_(Dt.segment)}),ii=ni&&!ti,ri=("boundary"===(null==Dt?void 0:Dt.kind)||ii)&&null!=Dt?function(){var e,t,i,r,o,l;if("boundary"===Dt.kind)return Dt;var a=Bn.find(function(e){return _(e.segment)===_(Dt.segment)});return a?n(n({},a),{kind:"boundary",pageNumber:null!==(e=a.metadata.focus_page)&&void 0!==e?e:a.segment.start_page}):n(n({},Dt),{kind:"boundary",pageNumber:null!==(i=null===(t=Dt.segment.review_action)||void 0===t?void 0:t.focus_page)&&void 0!==i?i:Dt.segment.start_page,metadata:{focus_page:null!==(o=null===(r=Dt.segment.review_action)||void 0===r?void 0:r.focus_page)&&void 0!==o?o:null,boundary_margin:null!==(l=Dt.segment.boundary_margin)&&void 0!==l?l:null,user_actions:[]}})}():void 0,oi=null==Dt?"":(null===(se=Dt.segment.label)||void 0===se?void 0:se.trim())||Dt.segment.title,li=null==Dt?void 0:Dt.review_step.revert,ai=null==Dt?void 0:Dt.segment.revert,di=function(e){return null==e?void 0:e.trim().toLowerCase()},ui=null==Dt||null===(ve=e([],null!==(ce=Dt.segment.review_steps)&&void 0!==ce?ce:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===di(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===ve?void 0:ve.revert,si=null!==(ge=null!=li?li:null==Dt?void 0:Dt.segment.revert)&&void 0!==ge?ge:ui,ci=null==si?void 0:si.decision.trim().toUpperCase();null!=$t||(null==ci?void 0:ci.includes("SPLIT"))||null==ci||ci.includes("MERGE");var vi="label"===(null==Dt?void 0:Dt.kind)&&"SET_RANGE"===(null===(pe=null==ui?void 0:ui.decision)||void 0===pe?void 0:pe.trim().toUpperCase())&&ui.current_segment_ids.length!==ui.previous_state.length,gi="Merged"===$t||"Split"===$t||vi,pi=null==Dt?void 0:gi?"boundary"===di(null==ui?void 0:ui.type)?ui:"boundary"===di(null==ai?void 0:ai.type)?ai:"boundary"===di(null==li?void 0:li.type)?li:void 0:"label"===Dt.kind?"label"===di(null==li?void 0:li.type)?li:void 0:"boundary"===Dt.kind?"boundary"===di(null==li?void 0:li.type)?li:"boundary"===di(null==ui?void 0:ui.type)?ui:"boundary"===di(null==ai?void 0:ai.type)?ai:void 0:void 0,mi=gi&&(null==pi?void 0:pi.operation_id)?Te.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,l,a,d=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===d||"page boundary review"===d)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===pi.operation_id&&Boolean(null===(a=null===(l=e.human_resolution)||void 0===l?void 0:l.change_summary)||void 0===a?void 0:a.trim()))}):void 0,fi=(null===(me=null==pi?void 0:pi.summary)||void 0===me?void 0:me.trim())||null,hi=gi?(null===(he=null===(fe=null==mi?void 0:mi.human_resolution)||void 0===fe?void 0:fe.change_summary)||void 0===he?void 0:he.trim())||(null===(we=null==pi?void 0:pi.summary)||void 0===we?void 0:we.trim())||"":(null===(_e=null===(ye=null===(be=null==Dt?void 0:Dt.review_step)||void 0===be?void 0:be.human_resolution)||void 0===ye?void 0:ye.change_summary)||void 0===_e?void 0:_e.trim())||(null===(Se=null===(xe=null==Dt?void 0:Dt.review_step)||void 0===xe?void 0:xe.summary)||void 0===Se?void 0:Se.trim())||"",wi=Dt&&pi?{currentSegment:{title:oi,startPage:Dt.segment.start_page,endPage:Dt.segment.end_page},previousSegments:(null!==(Ee=pi.previous_state)&&void 0!==Ee?Ee:[]).flatMap(function(e){var n,t=null===e.label?"Untitled document":null===(n=e.label)||void 0===n?void 0:n.trim();return t?[{title:t,startPage:e.start_page,endPage:e.end_page}]:[]})}:null,bi="page"===(null==Dt?void 0:Dt.kind)&&null!==(ke=Dt.metadata.classification_id)&&void 0!==ke?ke:null,yi="page"===(null==Dt?void 0:Dt.kind)?Boolean(gn&&bi):Boolean((null==pi?void 0:pi.operation_id)&&(null==pi?void 0:pi.type)&&!1!==(null==pi?void 0:pi.revertable)),_i=Boolean(wi&&yi&&("page"!==(null==Dt?void 0:Dt.kind)||bi)),xi=s(function(e,n){Nt.current+=1,Mt.current={requestId:Nt.current,pageNumber:e,reviewId:n},pt({pageNumber:e,requestId:Nt.current})},[]),Si=s(function(e){var n,t;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(null==Fn||Fn({reviewId:e.id,segment_id:null!==(t=e.segment.segment_id)&&void 0!==t?t:null,reviewStepIndex:e.reviewStepIndex,kind:e.kind,pageNumber:e.pageNumber,metadata:e.metadata}),St(null),Ct(null),tt(e.id),ot(e.id),dt(!1),ct(null),xi(e.pageNumber,e.id),null==mn||mn(e.id,e.segment))},[mn,Fn,xi]);d(function(){if(kt){var e=requestAnimationFrame(function(){return Rt(!0)}),n=window.setTimeout(function(){Rt(!1)},3500),t=window.setTimeout(function(){Ct(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[kt]),d(function(){var e,n,t,i;if(An){if("pageGroup"===An.type){var r=null!==(e=An.pages)&&void 0!==e?e:[],o=null!==(n=An.pageIndex)&&void 0!==n?n:0,l=r[o];if(null==l)return;return Ei(),St({pages:r,index:o,label:null!==(t=An.groupLabel)&&void 0!==t?t:""}),Nt.current+=1,void pt({pageNumber:l,requestId:Nt.current})}if(St(null),An.reviewId){var a=Jn.find(function(e){return e.id===An.reviewId&&(!An.type||e.kind===An.type)});if(a)return void Si(a)}if(An.classificationId){var d=Jn.find(function(e){return!("page"!==e.kind||e.metadata.classification_id!==An.classificationId||An.segmentId&&e.segment.segment_id!==An.segmentId||An.type&&e.kind!==An.type)});if(d)return void Si(d)}if(An.pageNumber&&An.type){var u=Number(An.pageNumber);if(Number.isInteger(u)&&!(u<1)){var s=null===(i=An.pageType)||void 0===i?void 0:i.trim().toLowerCase(),c=Jn.find(function(e){var n="page"===e.kind?e.pageNumber:e.segment.start_page,t="page"!==e.kind||!s||e.metadata.page_type===s;return(!An.segmentId||e.segment.segment_id===An.segmentId)&&n===u&&e.kind===An.type&&t});c?Si(c):"page"===An.type&&(Ei(),Nt.current+=1,pt({pageNumber:u,requestId:Nt.current}))}}}},[An,Si,Jn]);var Ei=s(function(){Mt.current=null,dt(!1),tt(null),ct(null),null==mn||mn(null,null)},[mn]),ki=s(function(e){var n;Rt(!1),Ct(null);var t=null!==(n=Jn.find(function(n){return!Ot.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:Jn.find(function(n){return!Ot.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?Si(t):(Ei(),Nt.current+=1,pt({pageNumber:e.startPage,requestId:Nt.current}))},[Ei,Ot,Jn,Si]),Ci=s(function(e,n){var t,i=H(e.review_step.score),r=null==Ke||i===Ke,o=ft.has(e.id)&&G(e.review_step,e.segment);return e.id!==n&&r&&!0!==(null===(t=e.segment.confidence)||void 0===t?void 0:t.awaiting_llm)&&!O(e.review_step,e.segment)&&!o},[Ke,ft]),Pi=s(function(e){var n;if(Ze){var t=Jn.findIndex(function(n){return n.id===e}),i=null!==(n=Jn.find(function(n,i){return i>t&&Ci(n,e)}))&&void 0!==n?n:Jn.find(function(n){return Ci(n,e)});i?requestAnimationFrame(function(){return Si(i)}):Ei()}else Ei()},[Ze,Ei,Ci,Jn,Si]),Ii=s(function(e,n,r){return t(Me,void 0,void 0,function(){var t,o,l,a,d,u,s,c,v,g;return i(this,function(i){switch(i.label){case 0:if(bn)return[2];if("boundary"===e.kind&&!sn)return[2];if("label"===e.kind&&!cn)return[2];if("page"===e.kind&&!vn)return[2];t=Z(e),l=r,a=(o=n)===p.SET_RANGE?function(){var n=l.startPage,t=l.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?p.MERGE_PREV:p.MERGE_NEXT:r?p.SPLIT_HERE:null}():o,d="boundary"===e.kind&&null!=sn&&Ze&&(a===p.SPLIT_HERE||a===p.MERGE_NEXT||a===p.MERGE_PREV||a===p.MERGE_PREVIOUS),u=d?Te.findIndex(function(n){return _(n)===_(e.segment)}):-1,d&&u>=0&&a&&(At.current={action:a,originalSegmentIndex:u,segmentSignature:JSON.stringify(Te.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),yt(e.id),i.label=1;case 1:return i.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==sn?void 0:sn(n,r,t)];case 2:return i.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==cn?void 0:cn(n,r,t)];case 4:return i.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==vn?void 0:vn(n,r,t)];case 6:i.sent(),i.label=7;case 7:return ht(function(n){var t=new Set(n);return t.add(e.id),t}),s="boundary"===e.kind&&(a===p.MERGE_NEXT||a===p.MERGE_PREV||a===p.MERGE_PREVIOUS),("boundary"===e.kind&&a===p.SPLIT_HERE||s)&&a&&(c=_(e.segment),Dn(function(e){var n=new Set(e);return o===p.SET_RANGE?n.add(c):n.delete(c),n}),qn(function(e){var n=new Map(e);return n.set(c,a),n})),At.current?(At.current.ready=!0,s&&(v=Jn.find(function(n){return"label"===n.kind&&_(n.segment)===_(e.segment)}))&&requestAnimationFrame(function(){return Si(v)})):Pi(e.id),[3,10];case 8:return g=i.sent(),d&&(At.current=null),null==hn||hn(g,t),[3,10];case 9:return yt(null),[7];case 10:return[2]}})})},[Ze,bn,hn,sn,cn,vn,gn,Jn,Te,Si,Pi]);d(function(){var e=At.current;if(null==e?void 0:e.ready){var n=JSON.stringify(Te.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===p.SPLIT_HERE?e.originalSegmentIndex+1:e.action===p.MERGE_PREV||e.action===p.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(Te.map(function(e,n){return[_(e,n),n]})),r=Jn.find(function(e){var n=i.get(_(e.segment));return null!=n&&n>=t&&Ci(e)});if(!r)return At.current=null,void Ei();requestAnimationFrame(function(){At.current=null,Si(r)})}}},[Ei,Ci,Jn,Te,Si]),d(function(){At.current||nt&&!Jn.some(function(e){return e.id===nt})&&Ei()},[nt,Ei,Jn]),d(function(){if(Ye&&!At.current){var e=Jn.find(function(e){return e.pageNumber===Qn});e&&e.id!==nt&&Si(e)}},[nt,Ye,Qn,Si,Jn]),d(function(){At.current||nt&&!Jn.some(function(e){var n;return e.id===nt&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&Ei()},[nt,Ei,Jn]);var Ri=l(function(){var n=Jn.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===Ve)return n;var t=["low","medium","high"].filter(function(e){return e!==Oe}),i=e([Oe],t,!0),r=new Map(i.map(function(e,n){return[e,n]}));return n.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,l,a,d=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),u=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==d?i.length:null!==(l=r.get(d))&&void 0!==l?l:i.length)-(null==u?i.length:null!==(a=r.get(u))&&void 0!==a?a:i.length)||e.index-n.index}).map(function(e){return e.item})},[Ve,Oe,Jn]),Ni=Ri.findIndex(function(e){return e.id===rt}),Mi=a(null),Ai=Mi[0],Fi=Mi[1],Ti=u(!1),Bi=s(function(e){var n=Ri[e];n&&Si(n)},[Ri,Si]);s(function(e){if(!(!xt||e<0||e>=xt.pages.length)){var t=xt.pages[e];null!=t&&(Ei(),St(function(t){return null==t?t:n(n({},t),{index:e})}),Nt.current+=1,pt({pageNumber:t,requestId:Nt.current}))}},[xt,Ei]),d(function(){rt&&!Ri.some(function(e){return e.id===rt})&&ot(null)},[Ri,rt]),d(function(){Ti.current=!1,Fi(Ni>=0?String(Ni+1):null)},[Ni,Ri.length]),d(function(){if(Ti.current&&null!=Ai){var e=window.setTimeout(function(){var e=Number(Ai.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Ri.length&&(Ti.current=!1,Bi(n))},300);return function(){return window.clearTimeout(e)}}},[Bi,Ai,Ri.length]);var Li=l(function(){var e=new Map;Jn.forEach(function(n){var t,i=null!==(t=e.get(_(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(_(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=Vn.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[Jn,Vn]),Wi=l(function(){var e=new Map;Jn.forEach(function(n){var t,i=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];i.push(n),e.set(n.pageNumber,i)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.id,t)})}),n},[Jn]),zi=s(function(e){return{startPage:Math.max(0,e.startPage-$e),endPage:Math.min(e.numPages-1,e.endPage+$e)}},[$e]),ji=s(function(){var e,n=Bt.current,t=Lt.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();Jn.forEach(function(e){var n,r=Ft.current.get(e.id);if(r){var l=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(l){var a=l.getBoundingClientRect(),d=null!==(n=Wi.get(e.id))&&void 0!==n?n:0,u=a.top+nn+40*d,s=u+(r.offsetHeight||32),c=u>=o.top&&s<=o.bottom;r.style.top="".concat(u-i.top,"px"),r.style.visibility=c?"visible":"hidden"}else r.style.visibility="hidden"}});var l=Tt.current;if(l){var a=null==xt?void 0:xt.pages[xt.index],d=null==a?null:t.querySelector('[data-testid="core__page-layer-'.concat(a-1,'"]'));if(xt&&d){var u=d.getBoundingClientRect().top+nn,s=u+(l.offsetHeight||25),c=u>=o.top&&s<=o.bottom;l.style.top="".concat(u-i.top,"px"),l.style.visibility=c?"visible":"hidden"}else l.style.visibility="hidden"}if(nt&&null==Mt.current){var v=Ft.current.get(nt);v&&"hidden"!==v.style.visibility&&ct(function(e){return e===v?e:v})}}},[xt,nt,nn,Wi,Jn]),qi=s(function(e){var n=Mt.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Mt.current=null,ji(),requestAnimationFrame(function(){if(null==Mt.current){var e=Ft.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&ct(e)}}))},[ji]);return d(function(){var e=Lt.current;if(e&&qe){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,ji()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var i=new MutationObserver(t);i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var r="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==r||r.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),i.disconnect(),null==r||r.disconnect()}}},[qe,ji]),r("div",n({ref:Bt,className:In,style:n(n({},Rn),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[r("div",n({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[o("div",n({ref:Lt,style:n(n({},Nn),{flex:"1 1 auto",width:qe?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(v,n({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1,showRotateButton:!0},We,{defaultScale:void 0===ze?null!==(Ce=null==We?void 0:We.defaultScale)&&void 0!==Ce?Ce:c.PageFit:J[ze],disablePdfAnnotations:_n,disablePdfTextLayer:Sn,pdfUrl:Ae,pdfName:Fe,segments:Zn,navigationRequest:gt,onNavigationSettled:qi,setRenderRange:zi,onCurrentPageChange:function(e){$n(e),null==Mt.current&&Dt&&Dt.pageNumber!==e&&Ei(),null==fn||fn(e)}}))})),qe&&r("aside",n({"aria-label":"Page review badges",ref:Yn,style:n(n({},Mn),{position:"relative",width:Gt,maxWidth:Y,flex:"0 1 ".concat(Gt),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[xt&&o("span",n({ref:Tt,style:{position:"absolute",top:0,left:10,visibility:"hidden",zIndex:2,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:4,minHeight:25,padding:"2px 8px",border:"1px solid #E2E8F0",borderRadius:16,backgroundColor:"#F8FAFC",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)",font:"inherit"}},{children:r(k,n({fontFamily:"Inter",sx:{fontSize:11,fontWeight:500,color:"#475569",whiteSpace:"nowrap"}},{children:[xt.label||"Pages"," Pg: ",xt.index+1]}))})),Ue&&Ri.length>0&&!xt&&r("nav",n({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:rn||"auto",left:ln||"auto",zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[o("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Ai?Ai:"-","aria-label":"Review badge number",onChange:function(e){Ti.current=!0,Fi(e.target.value)},style:{width:30,height:28,padding:0,border:"1px solid #A5B4FC",borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}}),r("span",n({"aria-label":"".concat(Ri.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Ri.length]})),["previous","next"].map(function(e){var t="previous"===e,i=Ni+(t?-1:1),r=i<0||i>=Ri.length;return o("button",n({type:"button","aria-label":"".concat(t?"Previous":"Next"," review badge"),disabled:r,onClick:function(){return Bi(i)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:r?"#C7D2FE":"#4F46E5",cursor:r?"default":"pointer"}},{children:o("svg",n({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:o("path",{d:t?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),!xt&&Jn.map(function(e){var t,i,l=nt===e.id,a=null!==(t=Li.get(e.id))&&void 0!==t?t:"1A",d=e.review_step.score,u=e.review_step.confidence,s=D(d,u),c="boundary"===e.kind?j(e.review_step,e.segment,jn.get(_(e.segment))):"label"===e.kind?q(e.review_step,e.segment,jn.get(_(e.segment))):null,v=null!=c?c:"N/A"===s?s:"".concat(s,"%"),g=!0===(null===(i=e.segment.confidence)||void 0===i?void 0:i.awaiting_llm),p=z(d,u,g),m=Ot.has(e.id);return o(C,n({title:g?"data is being processed":"",arrow:!0},{children:o("span",n({ref:function(n){n?Ft.current.set(e.id,n):Ft.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:g?"not-allowed":"pointer"}},{children:o("button",n({disabled:g,type:"button","aria-pressed":l,"aria-label":g?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return Si(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:c?m&&!g?115:90:m&&!g?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(m&&!g?"#E2E8F0":p.border),borderRadius:16,backgroundColor:m&&!g?"#F8FAFC":p.background,color:m&&!g?"#475569":p.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:r(k,n({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},m&&!g?{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:a})),r("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:v}))]})),r("span",n({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:o(x,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]}:{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:a})),r("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:p.divider,strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:v}))]}))]}))}))}))}),e.id)})]}))]})),Dt&&st&&r(f,n({anchorElement:st,placement:"bottom-start",offset:{top:8},width:Math.min(zt,Y),maxWidth:Y,heightBuffer:null!=un?un:25},{children:[at&&o(h,{width:"100%",maxWidth:"100%",score:Dt.review_step.score,reasons:Kt,reason:Dt.review_step.reason,gap:Dt.review_step.gap,onBack:function(){return dt(!1)},onClose:Ei}),o("div",n({style:{display:at?"none":"block"}},{children:Ot.has(Dt.id)?o(R,{width:"100%",maxWidth:"100%",headerName:"page"===Dt.kind?"Page format approved":"Split"===$t?"Split approved":"Merged"===$t?"Merge approved":"User approved",headerIcon:"page"===Dt.kind?o(S,{size:18,strokeWidth:2}):"Merged"===$t?o(E,{size:18,strokeWidth:2}):"Split"===$t?o(V,{width:18,height:18}):o(x,{size:18,strokeWidth:2}),title:oi,pageNo:"Page ".concat(Dt.segment.start_page,"-").concat(Dt.segment.end_page),summary:_i&&wi?o(M,{icon:o(x,{size:14,strokeWidth:2}),title:oi,pageRange:"Page ".concat(Dt.segment.start_page,"-").concat(Dt.segment.end_page),description:null!=hi?hi:null,revertData:wi,confirmDisabled:"page"===Dt.kind?!yi:null==pn||!yi,showDocumentHeader:!1,onRevert:function(){if("page"===Dt.kind){if(!gn||!bi){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==hn||hn(e,Z(Dt)),Promise.reject(e)}return gn({classification_id:bi,human_verdict:"No"},Z(Dt))}if(!pn)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!pi)throw new Error("There is no valid revert operation for this review.");var n=gi?"boundary":"label"===Dt.kind?"label":"boundary"===Dt.kind?"boundary":null,t=di(pi.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return pn(pi,Z(Dt))},onRevertError:function(e){null==hn||hn(e,Z(Dt))},onRevertComplete:function(e){var n,t,i,r,o,l;ht(function(){return new Set}),"page"!==Dt.kind&&(Dn(function(){return new Set}),qn(function(){return new Map})),Dt.id;var a=null!==(n=wi.previousSegments[0])&&void 0!==n?n:wi.currentSegment,d=null==st?void 0:st.getBoundingClientRect(),u=null===(t=Lt.current)||void 0===t?void 0:t.getBoundingClientRect(),s=Math.min(Y,Math.max(220,zt)),c=null!==(i=null==d?void 0:d.left)&&void 0!==i?i:(null!==(r=null==u?void 0:u.right)&&void 0!==r?r:window.innerWidth-s-8)+8,v=Math.max(8,Math.min(c,window.innerWidth-s-8)),g=null==(null==d?void 0:d.bottom)?Math.max(8,null!==(o=null==u?void 0:u.top)&&void 0!==o?o:8):d.bottom+8;ht(function(){return new Set}),"page"!==Dt.kind&&(At.current=null),Rt(!1),Ct({title:"Split"===$t?"Split reverted":"Merged"===$t?"Merge reverted":"Approval reverted",description:(null===(l=null==e?void 0:e.message)||void 0===l?void 0:l.trim())||null,segment:a,position:{top:g,left:v,width:s}}),Ei()}},Dt.id):void 0,additionalActions:ri?o(N,{metadata:ri.metadata,reviewAction:null!==(Pe=Dt.segment.review_action)&&void 0!==Pe?Pe:void 0,startPage:Dt.segment.start_page,endPage:Dt.segment.end_page,title:oi,previousSegmentTitle:Yt,nextSegmentTitle:Jt,disabled:bn||!sn||bt===Dt.id,onConfirm:function(e,n){Ii(ri,e,n)}}):void 0,cognitiveScore:Dt.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:Qt?function(){dt(!0),null==Pn||Pn(Z(Dt))}:void 0,onClose:Ei}):"boundary"===Dt.kind?o(g,{width:"100%",maxWidth:"100%",totalPages:Be,title:Dt.segment.label||Dt.segment.title,pageNo:"Page ".concat(Dt.pageNumber),content:null!==(Ie=Dt.review_step.question)&&void 0!==Ie?Ie:null,revertSummary:fi,cognitiveScore:Dt.review_step.score,metadata:Dt.metadata,reviewAction:null!==(Re=Dt.segment.review_action)&&void 0!==Re?Re:void 0,previousSegmentTitle:Yt,nextSegmentTitle:Jt,manualPrompt:null!=dn?dn:"Set a custom boundary",defaultStartPage:Dt.segment.start_page,defaultEndPage:Dt.segment.end_page,styles:{root:{borderColor:Zt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Zt.text}}},confirmDisabled:bn||!sn||bt===Dt.id,onConfirm:function(e,n,t){t&&m(n.id)&&Ii(Dt,n.id,t)},onAdjustManually:function(){return null==Cn?void 0:Cn(Z(Dt))},onCognitiveClick:Qt?function(){dt(!0),null==Pn||Pn(Z(Dt))}:void 0,onClose:Ei},Dt.id):"label"===Dt.kind?o(w,{width:"100%",maxWidth:"100%",title:Dt.metadata.current_label||Dt.segment.label||Dt.segment.title,pageNo:"Pages ".concat(Dt.segment.start_page,"-").concat(Dt.segment.end_page),content:null!==(Ne=Dt.review_step.question)&&void 0!==Ne?Ne:null,revertSummary:fi,cognitiveScore:Dt.review_step.score,metadata:Dt.metadata,styles:{root:{borderColor:Zt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Zt.text}}},confirmDisabled:bn||!cn||bt===Dt.id,confirmationBlocked:Vt,confirmationWarning:Vt?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){Ii(Dt,e,n)},onAdjustManually:function(){return null==Cn?void 0:Cn(Z(Dt))},onCognitiveClick:Qt?function(){dt(!0),null==Pn||Pn(Z(Dt))}:void 0,onClose:Ei},Dt.id):o(b,{width:"100%",maxWidth:"100%",title:Dt.segment.label||Dt.segment.title,pageNo:"Page ".concat(Dt.pageNumber),content:Dt.review_step.reason,cognitiveScore:Dt.review_step.score,pageType:Dt.metadata.page_type,metadata:Dt.metadata,styles:{root:{borderColor:Zt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Zt.text}}},confirmDisabled:bn||!vn||bt===Dt.id,onActionConfirm:function(e,n){Ii(Dt,e,n)},onCognitiveClick:Qt?function(){dt(!0),null==Pn||Pn(Z(Dt))}:void 0,onClose:Ei},Dt.id)}))]})),kt&&o(P,{children:o(I,n({"aria-live":"polite",sx:{position:"fixed",top:kt.position.top,left:kt.position.left,zIndex:1600,width:kt.position.width,maxWidth:"calc(100vw - 16px)",opacity:It?1:0,transform:It?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:It?"auto":"none"}},{children:o(A,{title:kt.title,description:kt.description,onReview:function(){return ki(kt.segment)}})}))})]}))}export{X as SegmentPdfSpecialZoomLevel,K as default};
|
|
2
2
|
//# sourceMappingURL=SegmentReviewPdfWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as n}from"tslib";import{getSegmentReviewKey as e}from"./reviewStepAdapters.js";
|
|
1
|
+
import{__spreadArray as n}from"tslib";import{getSegmentReviewKey as e}from"./reviewStepAdapters.js";import{getNumericScore as r,getReviewScoreBand as t}from"./reviewScore.js";export{getNumericScore,getReviewScoreBand}from"./reviewScore.js";var i=function(n){switch(null==n?void 0:n.trim().toLowerCase()){case"low":return 40;case"medium":return 70;case"high":return 95;default:return null}},u=function(n,e){var t;return null!==(t=r(n))&&void 0!==t?t:i(e)},o=function(n,e){var r=u(n,e);return null==r?"N/A":Number.isInteger(r)?String(r):r.toFixed(2).replace(/\.?0+$/,"")},l=function(n){switch(null==n?void 0:n.trim().toUpperCase()){case"SPLIT":case"SPLIT_HERE":return"Split";case"MERGE":case"MERGE_NEXT":case"MERGE_PREV":case"MERGE_PREVIOUS":return"Merged";default:return null}},a=function(n){var e,r,t,i;if(![n.human_action_enum,null===(e=n.human_resolution)||void 0===e?void 0:e.action,null===(r=n.review)||void 0===r?void 0:r.action].some(function(n){return"SET_RANGE"===(null==n?void 0:n.trim().toUpperCase())}))return null;var u=null===(t=n.human_resolution)||void 0===t?void 0:t.before,o=null===(i=n.human_resolution)||void 0===i?void 0:i.after;if(null==(null==u?void 0:u.start_page)||null==u.end_page||null==(null==o?void 0:o.start_page)||null==o.end_page)return null;var l=o.start_page<u.start_page||o.end_page>u.end_page,a=o.start_page>u.start_page||o.end_page<u.end_page;if(l&&!a)return"Merged";if(a&&!l)return"Split";var d=u.end_page-u.start_page+1,v=o.end_page-o.start_page+1;return v>d?"Merged":v<d?"Split":null},d=function(n){switch(null==n?void 0:n.trim().toUpperCase()){case"SPLIT":case"SPLIT_HERE":return"SPLIT_HERE";case"MERGE_NEXT":return"MERGE_NEXT";case"MERGE_PREV":case"MERGE_PREVIOUS":return"MERGE_PREV";case"SET_RANGE":return"SET_RANGE";default:return null}},v=function(n){var e,r=null===(e=n.type)||void 0===e?void 0:e.trim().toLowerCase();return"page_boundary"===r||"page boundary review"===r},_=function(e){var r,t,i,u=(null!==(r=e.review_steps)&&void 0!==r?r:[]).filter(v);return null!==(i=null!==(t=n([],u,!0).reverse().find(function(n){return null!=l(n.human_action_enum)}))&&void 0!==t?t:n([],u,!0).reverse().find(p))&&void 0!==i?i:u[u.length-1]},s=function(n){var e,r,t,i,u;return null!==(i=null!==(r=null!==(e=a(n))&&void 0!==e?e:l(n.human_action_enum))&&void 0!==r?r:l(null===(t=n.human_resolution)||void 0===t?void 0:t.action))&&void 0!==i?i:l(null===(u=n.review)||void 0===u?void 0:u.action)},c=function(n,e){var r,t=n.type.trim().toLowerCase();if(!("label"===t||"label review"===t))return!0;var i=null===(r=n.human_resolution)||void 0===r?void 0:r.segment_version,u=e.version;return null==i||null==u||i===u},f=function(n,e){var r,t,i;if(!c(n,e))return!1;if(null!=(null===(r=n.review)||void 0===r?void 0:r.action))return!0;var u=null===(i=null===(t=n.human_resolution)||void 0===t?void 0:t.state)||void 0===i?void 0:i.trim().toLowerCase();return"resolved_by_human"===u||"approved"===u||"confirmed"===u},p=function(n){var e,r,t,i;return null!=l(n.human_action_enum)||null!=l(null===(e=n.human_resolution)||void 0===e?void 0:e.action)||null!=l(null===(r=n.review)||void 0===r?void 0:r.action)||!0===(null===(i=null===(t=n.metadata)||void 0===t?void 0:t.performed_actions)||void 0===i?void 0:i.some(function(n){return null!=l(n.action)}))},g=function(e){var r,t,i,u,o,v,s=_(e);if(!s)return null;var c=d(null===(r=s.human_resolution)||void 0===r?void 0:r.action),f=null===(t=s.human_resolution)||void 0===t?void 0:t.after,p=(null==f?void 0:f.start_page)===e.start_page&&(null==f?void 0:f.end_page)===e.end_page,g=a(s);if(g)return p?g:null;if("SPLIT_HERE"===c)return p?null:"Split";if("MERGE_NEXT"===c||"MERGE_PREV"===c)return p?"Merged":null;var E=function(n,e){var r,t,i,u=n.revert,o=e.revert,l="boundary"===(null===(r=null==u?void 0:u.type)||void 0===r?void 0:r.trim().toLowerCase())?u:"boundary"===(null===(t=null==o?void 0:o.type)||void 0===t?void 0:t.trim().toLowerCase())?o:null;if(!l)return null;var a=null===(i=l.decision)||void 0===i?void 0:i.trim().toUpperCase();if(null==a?void 0:a.includes("SPLIT"))return"Split";if(null==a?void 0:a.includes("MERGE"))return"Merged";if("SET_RANGE"===a){if(l.current_segment_ids.length>l.previous_state.length)return"Split";if(l.current_segment_ids.length<l.previous_state.length)return"Merged"}return null}(s,e);if(E)return E;var m=l(s.human_action_enum);if(m)return m;var h=l(null===(i=s.review)||void 0===i?void 0:i.action);if(h)return h;var R=n([],null!==(u=e.human_action_log)&&void 0!==u?u:[],!0).filter(function(n){return null!=l(n.action)}).sort(function(n,e){var r,t;return e.human_revision-n.human_revision||(null===(r=e.performed_at)||void 0===r?void 0:r.localeCompare(null!==(t=n.performed_at)&&void 0!==t?t:""))})[0];if(!R)return null;var S=l(R.action),w=(null===(o=R.after)||void 0===o?void 0:o.start_page)===e.start_page&&(null===(v=R.after)||void 0===v?void 0:v.end_page)===e.end_page;return"Split"===S?w?null:S:w?S:null},E=function(n,e,r){var t=l(r);if(t)return t;var i=s(n);return i||g(e)},m=function(n,e,r){var t,i;return null!==(i=null!==(t=l(r))&&void 0!==t?t:s(n))&&void 0!==i?i:g(e)},h=function(n,e){return null!=l(e)||null!=g(n)},R=function(n,e,r,t){var i=l(t);if("Merged"===i)return r;if("Split"===i)return!0;if(function(n,e){var r,t,i;if("affected"!==(null===(r=e.sensitivity)||void 0===r?void 0:r.trim().toLowerCase()))return!1;var u=null!==(t=n.revert)&&void 0!==t?t:e.revert;if(!u)return!1;var o=null===(i=u.decision)||void 0===i?void 0:i.trim().toUpperCase();return u.current_segment_ids.length>u.previous_state.length&&("SET_RANGE"===o||"SPLIT"===o||"SPLIT_HERE"===o)}(n,e))return!0;var u=s(n);if("Split"===u)return!0;var o=g(e);return"Split"===o||"Merged"===u&&("Merged"!==o||r)},S=function(n,e){var r,t,i,u,o,a,v=d(e),s=_(n),c=null!==(i=null!==(r=d(null==s?void 0:s.human_action_enum))&&void 0!==r?r:d(null===(t=null==s?void 0:s.human_resolution)||void 0===t?void 0:t.action))&&void 0!==i?i:d(null===(u=null==s?void 0:s.review)||void 0===u?void 0:u.action),f=l(e),p=null===(o=null==s?void 0:s.human_resolution)||void 0===o?void 0:o.after,E="SPLIT_HERE"===v&&null!=(null===(a=null==s?void 0:s.human_resolution)||void 0===a?void 0:a.action)&&(null==p?void 0:p.start_page)===n.start_page&&(null==p?void 0:p.end_page)===n.end_page;return null!=v&&c===v&&null!=f&&(E||g(n)===f)},w=function(r,t,i){void 0===i&&(i=new Set);var u=n([],r,!0).sort(function(n,e){return n.start_page-e.start_page||n.end_page-e.end_page}),o=new Set;return t.forEach(function(n,r){if(!i.has(r)){var l=u.findIndex(function(n){return e(n)===r});if(!(l<0)){var a=u[l];if(!S(a,n)){var v=d(n),_=u["MERGE_PREV"===v?l-1:"MERGE_NEXT"===v?l+1:-1];if(_){var s=e(_);h(_,t.get(s))||o.add(s)}}}}}),o},M=function(r){var t=n([],r,!0).sort(function(n,e){return n.start_page-e.start_page||n.end_page-e.end_page}),i=new Set;return t.forEach(function(n,r){var u,o=(null!==(u=n.review_steps)&&void 0!==u?u:[]).find(function(e){var r,t,i;if(!v(e))return!1;var u=d(e.human_action_enum),o=d(null===(r=e.human_resolution)||void 0===r?void 0:r.action),l=null===(t=e.human_resolution)||void 0===t?void 0:t.before,a=null===(i=e.human_resolution)||void 0===i?void 0:i.after,_=null!=(null==l?void 0:l.start_page)&&null!=l.end_page&&null!=(null==a?void 0:a.start_page)&&null!=a.end_page&&(l.start_page!==a.start_page||l.end_page!==a.end_page),s=(null==a?void 0:a.start_page)===n.start_page&&(null==a?void 0:a.end_page)===n.end_page;return("MERGE_NEXT"===u||"MERGE_PREV"===u)&&!(o===u&&_&&s)});if(o){var l=d(o.human_action_enum),a=t["MERGE_PREV"===l?r-1:r+1];a&&!h(a)&&i.add(e(a))}}),i},C=function(n,e,r){var i={border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"};if(r)return i;switch(t(n)){case"low":return{border:"#FECACA",cardBorder:"#B91C1C",background:"#FEF2F2",text:"#B91C1C",divider:"#FCA5A5"};case"medium":return{border:"#d9cda2",cardBorder:"#997800",background:"#fff1bf",text:"#997800",divider:"#e6b400"};case"high":return{border:"#16A34A",cardBorder:"#4F9E6C",background:"#F0FDF4",text:"#4F9E6C",divider:"#00A43C"}}return i};export{o as formatScore,m as getBoundaryReviewActionBadgeLabel,C as getConfidenceColors,i as getFallbackScore,l as getHumanActionBadgeLabel,w as getOptimisticMergeImpactedSegmentKeys,M as getPendingMergeImpactedSegmentKeys,u as getResolvedScore,s as getReviewStepActionBadgeLabel,g as getStructuralResultBadgeLabel,E as getTitleReviewActionBadgeLabel,S as hasPolledStructuralAction,p as hasStructuralBoundaryAction,c as isReviewStepResolutionCurrent,f as isReviewStepResolved,R as shouldHideStructuralBoundaryReview};
|
|
2
2
|
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var r=function(r){if(null==r)return null;if("number"==typeof r)return Number.isFinite(r)?r:null;if("string"!=typeof r)return null;var n=r.trim();if(!n)return null;var u=Number.parseFloat(n);return Number.isFinite(u)?u:null},n=function(n){var u=r(n);if(null==u)return null;return u<60?"low":u<=85?"medium":"high"};export{r as getNumericScore,n as getReviewScoreBand};
|
|
2
|
+
//# sourceMappingURL=reviewScore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewScore.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{createBoundaryCardOptions,isBoundaryReviewAction}from"./features/SegmentReviewComponents/BoundaryCard.js";import"tslib";import"react/jsx-runtime";import"react";import"@mui/material/Box";import"@mui/material/Popper";import"@mui/material/SvgIcon";export{default as CognitiveIntegrity}from"./features/SegmentReviewComponents/CognitiveIntegrity.js";export{createLabelCheckOptions,isLabelReviewAction}from"./features/SegmentReviewComponents/LabelCheck.js";export{default as PageCheck,isPageCheckAction}from"./features/SegmentReviewComponents/PageCheck.js";export{extractSegmentReviewData}from"./features/SegmentReviewComponents/reviewStepAdapters.js";export{default as RevertCard}from"./features/SegmentReviewComponents/RevertCard.js";export{default as RevertSuccessCard}from"./features/SegmentReviewComponents/RevertSuccessCard.js";export{SegmentPdfSpecialZoomLevel,default as SegmentReviewPdfWrapper}from"./features/SegmentReviewComponents/SegmentReviewPdfWrapper.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{ReviewPanel}from"./features/ReviewPanel/ReviewPanel.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{createBoundaryCardOptions,isBoundaryReviewAction}from"./features/SegmentReviewComponents/BoundaryCard.js";import"tslib";import"react/jsx-runtime";import"react";import"@mui/material/Box";import"@mui/material/Popper";import"@mui/material/SvgIcon";export{default as CognitiveIntegrity}from"./features/SegmentReviewComponents/CognitiveIntegrity.js";export{createLabelCheckOptions,isLabelReviewAction}from"./features/SegmentReviewComponents/LabelCheck.js";export{default as PageCheck,isPageCheckAction}from"./features/SegmentReviewComponents/PageCheck.js";export{extractSegmentReviewData}from"./features/SegmentReviewComponents/reviewStepAdapters.js";export{default as RevertCard}from"./features/SegmentReviewComponents/RevertCard.js";export{default as RevertSuccessCard}from"./features/SegmentReviewComponents/RevertSuccessCard.js";export{SegmentPdfSpecialZoomLevel,default as SegmentReviewPdfWrapper}from"./features/SegmentReviewComponents/SegmentReviewPdfWrapper.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{ReviewPanel}from"./features/ReviewPanel/ReviewPanel.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";export{default as PromptCitation}from"./features/PromptCitation/PromptCitation.js";export{default as CitationDependencyGraph}from"./features/PromptCitation/CitationDependencyGraph.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationDependencyGraphTest.d.ts","sourceRoot":"","sources":["../../../src/CitationDependencyGraphTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EA6BxC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BPACitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/BPACitationRenderer/BPACitationRenderer.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,cAAc,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"BPACitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/BPACitationRenderer/BPACitationRenderer.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,cAAc,6BAA6B,CAAC;AA6D5C,QAAA,MAAM,mBAAmB,yUAoBtB,yBAAyB,mDAuX3B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BPACitationRenderer.types.d.ts","sourceRoot":"","sources":["../../../../../src/features/BPACitationRenderer/BPACitationRenderer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAC1I,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAEzF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAOD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,iCAAiC;IAChD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,iCAAiC,CAAC;CACnD;AAKD,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE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gBAAgB,CAAC;IACpC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,kBAAkB,CAAC,EAAC,OAAO,CAAA;CAC5B"}
|
|
1
|
+
{"version":3,"file":"BPACitationRenderer.types.d.ts","sourceRoot":"","sources":["../../../../../src/features/BPACitationRenderer/BPACitationRenderer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAC1I,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAEzF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAOD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MA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,UAAU,EAAE,mBAAmB,CAAC;IAChC,SAAS,EAAE,YAAY,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3E,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,kBAAkB,CAAC,EAAC,OAAO,CAAA;CAC5B"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMpG,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,aAAa,CAAC,EAAE,iBAAi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AC,EAAE,cAAc,CAAC;CACjC;AAoBD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,SAAS,2iBAyCZ,cAAc,4CAwjBhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -19,6 +19,7 @@ export declare const PdfHighlightControls: (highlightText: string[], highlightPa
|
|
|
19
19
|
ZoomInButton: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
20
20
|
ZoomOutButton: () => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
21
21
|
ZoomPopover: (props?: import("@react-pdf-viewer/zoom").ZoomPopoverProps | undefined) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
22
|
+
zoomTo: (scale: number | import("@react-pdf-viewer/core").SpecialZoomLevel) => void;
|
|
22
23
|
goToNext: () => void;
|
|
23
24
|
goToPrevious: () => void;
|
|
24
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePdfHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/usePdfHighlight.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,oBAAoB,kBAChB,MAAM,EAAE,kBACP,OAAO,MAAM,EAAE,MAAM,CAAC,aAC3B,MAAM,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,oBAC9B,IAAI,MAAM,CAAC,kBACb,OAAO,2BACE,aAAa,EAAE;;;;;;;+BAgPP,MAAM,KAAG,MAAM;;;;2CAwmBH,IAAI,MAAM,CAAC;wCAxiBd,MAAM;+BAyuBf,MAAM,OAAO,MAAM
|
|
1
|
+
{"version":3,"file":"usePdfHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/usePdfHighlight.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,oBAAoB,kBAChB,MAAM,EAAE,kBACP,OAAO,MAAM,EAAE,MAAM,CAAC,aAC3B,MAAM,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,oBAC9B,IAAI,MAAM,CAAC,kBACb,OAAO,2BACE,aAAa,EAAE;;;;;;;+BAgPP,MAAM,KAAG,MAAM;;;;2CAwmBH,IAAI,MAAM,CAAC;wCAxiBd,MAAM;+BAyuBf,MAAM,OAAO,MAAM;;;;;;;;;;CA2OtD,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CitationDependencyGraphStyles {
|
|
3
|
+
/** Outermost container */
|
|
4
|
+
root?: React.CSSProperties;
|
|
5
|
+
/** Header bar (last-analyzed text + zoom controls) */
|
|
6
|
+
header?: React.CSSProperties;
|
|
7
|
+
/** "Last analyzed" subtitle text */
|
|
8
|
+
subtitle?: React.CSSProperties;
|
|
9
|
+
/** Zoom controls pill wrapper */
|
|
10
|
+
controls?: React.CSSProperties;
|
|
11
|
+
/** Individual zoom +/−/% button */
|
|
12
|
+
controlButton?: React.CSSProperties;
|
|
13
|
+
/** SVG cluster background rect */
|
|
14
|
+
cluster?: React.CSSProperties;
|
|
15
|
+
/** Cluster label text */
|
|
16
|
+
clusterLabel?: React.CSSProperties;
|
|
17
|
+
/** Node card */
|
|
18
|
+
node?: React.CSSProperties;
|
|
19
|
+
/** Node card when selected */
|
|
20
|
+
selectedNode?: React.CSSProperties;
|
|
21
|
+
/** Cluster icon badge inside a node */
|
|
22
|
+
nodeIcon?: React.CSSProperties;
|
|
23
|
+
/** Default edge path */
|
|
24
|
+
edge?: React.CSSProperties;
|
|
25
|
+
/** Edge path when active (selected node connected) */
|
|
26
|
+
activeEdge?: React.CSSProperties;
|
|
27
|
+
/** Animated dot marker on active edges */
|
|
28
|
+
edgeMarker?: React.CSSProperties;
|
|
29
|
+
/** Node detail popup card */
|
|
30
|
+
nodePopup?: React.CSSProperties;
|
|
31
|
+
/** Node popup gradient header */
|
|
32
|
+
nodePopupHeader?: React.CSSProperties;
|
|
33
|
+
/** Node popup body */
|
|
34
|
+
nodePopupBody?: React.CSSProperties;
|
|
35
|
+
/** Edge detail popup card */
|
|
36
|
+
edgePopup?: React.CSSProperties;
|
|
37
|
+
/** Edge popup gradient header */
|
|
38
|
+
edgePopupHeader?: React.CSSProperties;
|
|
39
|
+
/** Edge popup body */
|
|
40
|
+
edgePopupBody?: React.CSSProperties;
|
|
41
|
+
/** × close button on both popups */
|
|
42
|
+
popupCloseButton?: React.CSSProperties;
|
|
43
|
+
}
|
|
44
|
+
export interface CitationDependencyGraphProps {
|
|
45
|
+
/** Raw dependency_graph data from the API — conversion is handled internally */
|
|
46
|
+
data: any;
|
|
47
|
+
isDarkMode?: boolean;
|
|
48
|
+
/** Height of the graph container (default 500px) */
|
|
49
|
+
height?: number | string;
|
|
50
|
+
/** Width of the graph container (default 100%) */
|
|
51
|
+
width?: number | string;
|
|
52
|
+
styles?: CitationDependencyGraphStyles;
|
|
53
|
+
}
|
|
54
|
+
declare const CitationDependencyGraph: React.FC<CitationDependencyGraphProps>;
|
|
55
|
+
export default CitationDependencyGraph;
|
|
56
|
+
//# sourceMappingURL=CitationDependencyGraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationDependencyGraph.d.ts","sourceRoot":"","sources":["../../../../../src/features/PromptCitation/CitationDependencyGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAmFjF,MAAM,WAAW,6BAA6B;IAC5C,0BAA0B;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,sDAAsD;IACtD,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