@e-llm-studio/citation 0.0.243 → 0.0.245

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/assests/icons/InfoAlert.js +2 -0
  2. package/dist/assests/icons/InfoAlert.js.map +1 -0
  3. package/dist/cjs/assests/icons/InfoAlert.js +2 -0
  4. package/dist/cjs/assests/icons/InfoAlert.js.map +1 -0
  5. package/dist/cjs/features/PdfViewer/PdfContainer.js +1 -1
  6. package/dist/cjs/features/PdfViewer/PdfStyle.js +1 -1
  7. package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
  8. package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
  9. package/dist/cjs/features/PdfViewer/rotationManager.js +2 -0
  10. package/dist/cjs/features/PdfViewer/rotationManager.js.map +1 -0
  11. package/dist/cjs/features/ReviewPanel/ReviewPanel.js +2 -0
  12. package/dist/cjs/features/ReviewPanel/ReviewPanel.js.map +1 -0
  13. package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +2 -0
  14. package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js.map +1 -0
  15. package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js +2 -0
  16. package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js.map +1 -0
  17. package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
  18. package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
  19. package/dist/cjs/features/SegmentReviewComponents/CognitiveIcon.js +2 -0
  20. package/dist/cjs/features/SegmentReviewComponents/CognitiveIcon.js.map +1 -0
  21. package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js +2 -0
  22. package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js.map +1 -0
  23. package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js +2 -0
  24. package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js.map +1 -0
  25. package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js +2 -0
  26. package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js.map +1 -0
  27. package/dist/cjs/features/SegmentReviewComponents/PageCheck.js +2 -0
  28. package/dist/cjs/features/SegmentReviewComponents/PageCheck.js.map +1 -0
  29. package/dist/cjs/features/SegmentReviewComponents/RevertCard.js +2 -0
  30. package/dist/cjs/features/SegmentReviewComponents/RevertCard.js.map +1 -0
  31. package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
  32. package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
  33. package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
  34. package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
  35. package/dist/cjs/features/SegmentReviewComponents/ReviewedBoundaryActions.js +2 -0
  36. package/dist/cjs/features/SegmentReviewComponents/ReviewedBoundaryActions.js.map +1 -0
  37. package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js +2 -0
  38. package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
  39. package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +2 -0
  40. package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js.map +1 -0
  41. package/dist/cjs/features/SegmentReviewComponents/helper.js +2 -0
  42. package/dist/cjs/features/SegmentReviewComponents/helper.js.map +1 -0
  43. package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js +2 -0
  44. package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js.map +1 -0
  45. package/dist/cjs/index.js +1 -1
  46. package/dist/features/PdfViewer/PdfContainer.js +1 -1
  47. package/dist/features/PdfViewer/PdfStyle.js +1 -1
  48. package/dist/features/PdfViewer/PdfToolbar.js +1 -1
  49. package/dist/features/PdfViewer/PdfViewer.js +1 -1
  50. package/dist/features/PdfViewer/rotationManager.js +2 -0
  51. package/dist/features/PdfViewer/rotationManager.js.map +1 -0
  52. package/dist/features/ReviewPanel/ReviewPanel.js +2 -0
  53. package/dist/features/ReviewPanel/ReviewPanel.js.map +1 -0
  54. package/dist/features/SegmentReviewComponents/BoundaryCard.js +2 -0
  55. package/dist/features/SegmentReviewComponents/BoundaryCard.js.map +1 -0
  56. package/dist/features/SegmentReviewComponents/CardWrapper.js +2 -0
  57. package/dist/features/SegmentReviewComponents/CardWrapper.js.map +1 -0
  58. package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
  59. package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
  60. package/dist/features/SegmentReviewComponents/CognitiveIcon.js +2 -0
  61. package/dist/features/SegmentReviewComponents/CognitiveIcon.js.map +1 -0
  62. package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js +2 -0
  63. package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js.map +1 -0
  64. package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js +2 -0
  65. package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js.map +1 -0
  66. package/dist/features/SegmentReviewComponents/LabelCheck.js +2 -0
  67. package/dist/features/SegmentReviewComponents/LabelCheck.js.map +1 -0
  68. package/dist/features/SegmentReviewComponents/PageCheck.js +2 -0
  69. package/dist/features/SegmentReviewComponents/PageCheck.js.map +1 -0
  70. package/dist/features/SegmentReviewComponents/RevertCard.js +2 -0
  71. package/dist/features/SegmentReviewComponents/RevertCard.js.map +1 -0
  72. package/dist/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
  73. package/dist/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
  74. package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
  75. package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
  76. package/dist/features/SegmentReviewComponents/ReviewedBoundaryActions.js +2 -0
  77. package/dist/features/SegmentReviewComponents/ReviewedBoundaryActions.js.map +1 -0
  78. package/dist/features/SegmentReviewComponents/ReviewedCard.js +2 -0
  79. package/dist/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
  80. package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +2 -0
  81. package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js.map +1 -0
  82. package/dist/features/SegmentReviewComponents/helper.js +2 -0
  83. package/dist/features/SegmentReviewComponents/helper.js.map +1 -0
  84. package/dist/features/SegmentReviewComponents/reviewStepAdapters.js +2 -0
  85. package/dist/features/SegmentReviewComponents/reviewStepAdapters.js.map +1 -0
  86. package/dist/index.js +1 -1
  87. package/dist/types/src/assests/icons/ChartSplitIcon.d.ts +3 -0
  88. package/dist/types/src/assests/icons/ChartSplitIcon.d.ts.map +1 -0
  89. package/dist/types/src/assests/icons/InfoAlert.d.ts +3 -0
  90. package/dist/types/src/assests/icons/InfoAlert.d.ts.map +1 -0
  91. package/dist/types/src/features/PdfViewer/PdfContainer.d.ts +4 -2
  92. package/dist/types/src/features/PdfViewer/PdfContainer.d.ts.map +1 -1
  93. package/dist/types/src/features/PdfViewer/PdfStyle.d.ts.map +1 -1
  94. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts +4 -1
  95. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
  96. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts +19 -2
  97. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
  98. package/dist/types/src/features/PdfViewer/coordinateTransformer.d.ts +41 -0
  99. package/dist/types/src/features/PdfViewer/coordinateTransformer.d.ts.map +1 -0
  100. package/dist/types/src/features/PdfViewer/rotationManager.d.ts +23 -0
  101. package/dist/types/src/features/PdfViewer/rotationManager.d.ts.map +1 -0
  102. package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts +85 -0
  103. package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -0
  104. package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts +26 -0
  105. package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts.map +1 -0
  106. package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts +3 -0
  107. package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts.map +1 -0
  108. package/dist/types/src/features/SegmentReviewComponents/CognitiveIcon.d.ts +3 -0
  109. package/dist/types/src/features/SegmentReviewComponents/CognitiveIcon.d.ts.map +1 -0
  110. package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts +33 -0
  111. package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts.map +1 -0
  112. package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts +7 -0
  113. package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts.map +1 -0
  114. package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts +87 -0
  115. package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts.map +1 -0
  116. package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts +51 -0
  117. package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts.map +1 -0
  118. package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts +37 -0
  119. package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts.map +1 -0
  120. package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts +9 -0
  121. package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts.map +1 -0
  122. package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts +7 -0
  123. package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts.map +1 -0
  124. package/dist/types/src/features/SegmentReviewComponents/ReviewedBoundaryActions.d.ts +17 -0
  125. package/dist/types/src/features/SegmentReviewComponents/ReviewedBoundaryActions.d.ts.map +1 -0
  126. package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts +33 -0
  127. package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts.map +1 -0
  128. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts +124 -0
  129. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -0
  130. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts +13 -0
  131. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts.map +1 -0
  132. package/dist/types/src/features/SegmentReviewComponents/helper.d.ts +53 -0
  133. package/dist/types/src/features/SegmentReviewComponents/helper.d.ts.map +1 -0
  134. package/dist/types/src/features/SegmentReviewComponents/index.d.ts +23 -0
  135. package/dist/types/src/features/SegmentReviewComponents/index.d.ts.map +1 -0
  136. package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts +242 -0
  137. package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts.map +1 -0
  138. package/dist/types/src/index.d.ts +4 -0
  139. package/dist/types/src/index.d.ts.map +1 -1
  140. package/package.json +1 -1
@@ -0,0 +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};
2
+ //# sourceMappingURL=SegmentReviewPdfWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentReviewPdfWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__spreadArray as n}from"tslib";import{getSegmentReviewKey as e}from"./reviewStepAdapters.js";var r=function(n){if(null==n)return null;if("number"==typeof n)return Number.isFinite(n)?n:null;var e=n.trim();if(!e)return null;var r=Number.parseFloat(e);return Number.isFinite(r)?r:null},t=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}},i=function(n,e){var i;return null!==(i=r(n))&&void 0!==i?i:t(e)},u=function(n){var e=r(n);return null==e?null:e<=40?"low":e<=70?"medium":"high"},l=function(n,e){var r=i(n,e);return null==r?"N/A":Number.isInteger(r)?String(r):r.toFixed(2).replace(/\.?0+$/,"")},o=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,l=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==l?void 0:l.start_page)||null==l.end_page)return null;var o=l.start_page<u.start_page||l.end_page>u.end_page,a=l.start_page>u.start_page||l.end_page<u.end_page;if(o&&!a)return"Merged";if(a&&!o)return"Split";var d=u.end_page-u.start_page+1,v=l.end_page-l.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!=o(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:o(n.human_action_enum))&&void 0!==r?r:o(null===(t=n.human_resolution)||void 0===t?void 0:t.action))&&void 0!==i?i:o(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!=o(n.human_action_enum)||null!=o(null===(e=n.human_resolution)||void 0===e?void 0:e.action)||null!=o(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!=o(n.action)}))},g=function(e){var r,t,i,u,l,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,l=e.revert,o="boundary"===(null===(r=null==u?void 0:u.type)||void 0===r?void 0:r.trim().toLowerCase())?u:"boundary"===(null===(t=null==l?void 0:l.type)||void 0===t?void 0:t.trim().toLowerCase())?l:null;if(!o)return null;var a=null===(i=o.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(o.current_segment_ids.length>o.previous_state.length)return"Split";if(o.current_segment_ids.length<o.previous_state.length)return"Merged"}return null}(s,e);if(E)return E;var m=o(s.human_action_enum);if(m)return m;var h=o(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!=o(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=o(R.action),w=(null===(l=R.after)||void 0===l?void 0:l.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=o(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=o(r))&&void 0!==t?t:s(n))&&void 0!==i?i:g(e)},h=function(n,e){return null!=o(e)||null!=g(n)},R=function(n,e,r,t){var i=o(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 l=null===(i=u.decision)||void 0===i?void 0:i.trim().toUpperCase();return u.current_segment_ids.length>u.previous_state.length&&("SET_RANGE"===l||"SPLIT"===l||"SPLIT_HERE"===l)}(n,e))return!0;var u=s(n);if("Split"===u)return!0;var l=g(e);return"Split"===l||"Merged"===u&&("Merged"!==l||r)},S=function(n,e){var r,t,i,u,l,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=o(e),p=null===(l=null==s?void 0:s.human_resolution)||void 0===l?void 0:l.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}),l=new Set;return t.forEach(function(n,r){if(!i.has(r)){var o=u.findIndex(function(n){return e(n)===r});if(!(o<0)){var a=u[o];if(!S(a,n)){var v=d(n),_=u["MERGE_PREV"===v?o-1:"MERGE_NEXT"===v?o+1:-1];if(_){var s=e(_);h(_,t.get(s))||l.add(s)}}}}}),l},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,l=(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),l=d(null===(r=e.human_resolution)||void 0===r?void 0:r.action),o=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==o?void 0:o.start_page)&&null!=o.end_page&&null!=(null==a?void 0:a.start_page)&&null!=a.end_page&&(o.start_page!==a.start_page||o.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)&&!(l===u&&_&&s)});if(l){var o=d(l.human_action_enum),a=t["MERGE_PREV"===o?r-1:r+1];a&&!h(a)&&i.add(e(a))}}),i},b=function(n,e,r){var t={border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"};if(r)return t;switch(u(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 t};export{l as formatScore,m as getBoundaryReviewActionBadgeLabel,b as getConfidenceColors,t as getFallbackScore,o as getHumanActionBadgeLabel,r as getNumericScore,w as getOptimisticMergeImpactedSegmentKeys,M as getPendingMergeImpactedSegmentKeys,i as getResolvedScore,u as getReviewScoreBand,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
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as n}from"./LabelCheck.js";import{isPageCheckAction as a}from"./PageCheck.js";var i=function(e){return"object"==typeof e&&null!==e?e:{}},t=function(e){return"string"==typeof e?e:null},o=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},r=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},l=function(e){var n="string"==typeof e?e.trim().toLowerCase():"";return"table"===n||"drawing"===n?n:null},u=function(e,n){return void 0===n&&(n=0),e.stable_key||e.segment_id||"".concat(e.start_page,"-").concat(e.end_page,"-").concat(n)},c=function(e){var a=i(e);return{current_label:t(a.current_label),custom_label:t(a.custom_label),group_id:t(a.group_id),user_actions:r(a.user_actions).filter(n)}},d=function(e){var n=i(e);return{page_type:l(n.page_type),page_num:o(n.page_num),classification_id:t(n.classification_id),user_actions:r(n.user_actions).filter(a)}},s=function(n){var t=[],s=[],v=[];return n.forEach(function(n,p){var f,_,m=u(n,p),g=null!==(f=n.review_steps)&&void 0!==f?f:[];g.forEach(function(a,l){var u,p,f=(u=a.type,"page_boundary"===(p=u.trim().toLowerCase())||"page boundary review"===p?"boundary":"label"===p||"label review"===p?"label":"page"===p?"page":null);if("boundary"===f){var _=function(n){var a=i(n);return{focus_page:o(a.focus_page),boundary_margin:o(a.boundary_margin),user_actions:r(a.user_actions).filter(e)}}(a.metadata);t.push({id:"".concat(m,":boundary:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:_})}"label"===f&&s.push({id:"".concat(m,":label:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:c(a.metadata)}),"page"===f&&v.push({id:"".concat(m,":page:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:d(a.metadata)})});var y=0;null===(_=n.page_classifications)||void 0===_||_.forEach(function(e,i){var t,o,r=null!==(t=e.page_num)&&void 0!==t?t:null,u=null!==(o=e.questions)&&void 0!==o?o:[];(u.length>0?u:e.severity?[e]:[]).forEach(function(t,o){var u,c,s,p;if(l(t.page_type)){var f=function(e,n,i,t){var o,r,u,c,d,s,v,p,f,_,m,g,y,b,w,h=l(e.page_type),C=null===(r=null===(o=e.human_action)||void 0===o?void 0:o.verdict)||void 0===r?void 0:r.trim().toUpperCase(),E=C&&a(C)?C:null,S="drawing"===h?"an engineering drawing":h?"a ".concat(h):null;return{type:"page",confirmed:i,title:"Page Type Check",summary:(null==t?void 0:t.trim())||(E&&null!=n&&S?"Page ".concat(n," was confirmed as ").concat("YES"===E?S:"not ".concat(S),"."):void 0),format:"pdf",confidence:null!==(c=null===(u=e.machine_classification)||void 0===u?void 0:u.confidence)&&void 0!==c?c:null,decided_by:null!==(s=null===(d=e.machine_classification)||void 0===d?void 0:d.decisioning_method)&&void 0!==s?s:null,human_action_enum:null,reason:h?"We're not fully confident about the type of this page. Is this page a ".concat(h,"?"):null,reasons:null!==(v=e.reasons)&&void 0!==v?v:[],score:null!==(_=null!==(p=e.score)&&void 0!==p?p:null===(f=e.machine_classification)||void 0===f?void 0:f.score)&&void 0!==_?_:null,review:null==E?null:{action:E,reviewed_by:null!==(g=null===(m=e.human_action)||void 0===m?void 0:m.reviewed_by)&&void 0!==g?g:"",reviewed_at:null!==(b=null===(y=e.human_action)||void 0===y?void 0:y.reviewed_at)&&void 0!==b?b:""},metadata:{page_type:h,page_num:n,classification_id:null!==(w=e.id)&&void 0!==w?w:null,user_actions:["YES","NO"]}}}(t,r,null!==(c=null!==(u=t.confirmed)&&void 0!==u?u:e.confirmed)&&void 0!==c?c:null,null!==(s=e.summary)&&void 0!==s?s:null);v.push({id:"".concat(m,":page-classification:").concat(null!==(p=t.id)&&void 0!==p?p:"".concat(i,"-").concat(o)),reviewStepIndex:g.length+y,segment:n,review_step:f,metadata:d(f.metadata)}),y+=1}})})}),{boundaryReviews:t,labelReviews:s,pageReviews:v}};export{s as extractSegmentReviewData,u as getSegmentReviewKey};
2
+ //# sourceMappingURL=reviewStepAdapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewStepAdapters.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{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as 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";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export default function ChartSplitIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ChartSplitIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartSplitIcon.d.ts","sourceRoot":"","sources":["../../../../../src/assests/icons/ChartSplitIcon.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,2CAO1E"}
@@ -0,0 +1,3 @@
1
+ import { type SvgIconProps } from '@mui/material/SvgIcon';
2
+ export default function InfoAlert(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=InfoAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoAlert.d.ts","sourceRoot":"","sources":["../../../../../src/assests/icons/InfoAlert.tsx"],"names":[],"mappings":"AAAA,OAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,YAAY,2CAgBpD"}
@@ -1,4 +1,4 @@
1
- import { SpecialZoomLevel, PageChangeEvent, DocumentLoadEvent } from "@react-pdf-viewer/core";
1
+ import { SpecialZoomLevel, PageChangeEvent, DocumentLoadEvent, RenderPage, SetRenderRange } from "@react-pdf-viewer/core";
2
2
  import { CustomStylesType } from "./PdfViewer";
3
3
  export declare const pdfWorker: string;
4
4
  type Props = {
@@ -8,7 +8,9 @@ type Props = {
8
8
  customStyles?: CustomStylesType;
9
9
  onPageChange: (e: PageChangeEvent) => void;
10
10
  defaultScale?: SpecialZoomLevel | number | undefined;
11
+ renderPage?: RenderPage;
12
+ setRenderRange?: SetRenderRange;
11
13
  };
12
- declare const PdfContainer: ({ pdfUrl, plugins, onLoad, customStyles, onPageChange, defaultScale }: Props) => import("react/jsx-runtime").JSX.Element;
14
+ declare const PdfContainer: ({ pdfUrl, plugins, onLoad, customStyles, onPageChange, defaultScale, renderPage, setRenderRange }: Props) => import("react/jsx-runtime").JSX.Element;
13
15
  export default PdfContainer;
14
16
  //# sourceMappingURL=PdfContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdfContainer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,eAAO,MAAM,SAAS,EAAE,MAAwE,CAAC;AAEjG,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAI,CAAC,CAAC,EAAG,eAAe,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAAC;CACtD,CAAC;AAEF,QAAA,MAAM,YAAY,0EAA0E,KAAK,4CAchG,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"PdfContainer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE1I,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,eAAO,MAAM,SAAS,EAAE,MAAwE,CAAC;AAEjG,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,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AAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CA2FrD,CAAC"}
@@ -25,7 +25,10 @@ type Props = {
25
25
  currentPage: number;
26
26
  totalPages: number;
27
27
  onPageNavigate: (pageNumber: number) => void;
28
+ onRotatePage?: () => void;
29
+ currentPageRotation?: number;
30
+ showRotateButton?: boolean;
28
31
  };
29
- declare const PdfToolbar: ({ highlightIndex, totalHighlights, controls, currentPosition, pdfName, onClose, pdfUrl, viewerRef, customStyles, customClasses, customIcons, headerAction, isZoomEnabled, showHighlightsAction, showFullScreenAction, currentSegment, segmentTooltipText, currentPage, totalPages, onPageNavigate, }: Props) => import("react/jsx-runtime").JSX.Element;
32
+ declare const PdfToolbar: ({ highlightIndex, totalHighlights, controls, currentPosition, pdfName, onClose, pdfUrl, viewerRef, customStyles, customClasses, customIcons, headerAction, isZoomEnabled, showHighlightsAction, showFullScreenAction, currentSegment, segmentTooltipText, currentPage, totalPages, onPageNavigate, onRotatePage, currentPageRotation, showRotateButton, }: Props) => import("react/jsx-runtime").JSX.Element;
30
33
  export default PdfToolbar;
31
34
  //# sourceMappingURL=PdfToolbar.d.ts.map
@@ -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;AAKpG,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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AE,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,iBAAiB,CAAC;IAClC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE;QACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,aAAa,EAAE,OAAO,CAAA;IACtB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,UAAU,8VAwBb,KAAK,4CAsZP,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { RenderPage, SetRenderRange } from "@react-pdf-viewer/core";
1
2
  import "@react-pdf-viewer/zoom/lib/styles/index.css";
2
3
  import "@react-pdf-viewer/page-navigation/lib/styles/index.css";
3
4
  import "@react-pdf-viewer/core/lib/styles/index.css";
@@ -32,7 +33,15 @@ export type PdfSegment = {
32
33
  page_count: number;
33
34
  };
34
35
  type PdfScaleOption = "ActualSize" | "PageFit" | "PageWidth" | number;
35
- interface PdfViewerProps {
36
+ export interface PdfNavigationRequest {
37
+ pageNumber: number;
38
+ /** Change this value to navigate to the same page more than once. */
39
+ requestId?: string | number;
40
+ }
41
+ export interface PdfNavigationSettledEvent extends PdfNavigationRequest {
42
+ pageNumber: number;
43
+ }
44
+ export interface PdfViewerProps {
36
45
  pdfUrl?: string;
37
46
  highlightText: string[];
38
47
  highlightPages?: any;
@@ -61,8 +70,16 @@ interface PdfViewerProps {
61
70
  useRange?: boolean;
62
71
  rangeOfPages?: number[] | null;
63
72
  showFullScreenAction?: boolean;
73
+ showRotateButton?: boolean;
64
74
  segments?: PdfSegment[];
65
75
  segmentTooltipText?: string;
76
+ onCurrentPageChange?: (pageNumber: number) => void;
77
+ navigationRequest?: PdfNavigationRequest | null;
78
+ onNavigationSettled?: (event: PdfNavigationSettledEvent) => void;
79
+ disablePdfAnnotations?: boolean;
80
+ disablePdfTextLayer?: boolean;
81
+ renderPage?: RenderPage;
82
+ setRenderRange?: SetRenderRange;
66
83
  }
67
84
  export type HighlightArea = {
68
85
  pageIndex: number;
@@ -72,6 +89,6 @@ export type HighlightArea = {
72
89
  height: number;
73
90
  pageNumber?: number;
74
91
  };
75
- declare const PdfViewer: ({ pdfUrl, highlightText, highlightPages, highlightCordinatePages, highlightColor, activeHighlightColor, jumpToPageValue, pdfName, onClose, customStyles, customClasses, customIcons, useCoordinates, fallbackPages, activeCitationIndex, onActiveCitationChange, headerAction, isZoomEnabled, showHighlightsAction, defaultScale, useRange, rangeOfPages, showFullScreenAction, segments, segmentTooltipText, }: PdfViewerProps) => import("react/jsx-runtime").JSX.Element;
92
+ declare const PdfViewer: ({ pdfUrl, highlightText, highlightPages, highlightCordinatePages, highlightColor, activeHighlightColor, jumpToPageValue, pdfName, onClose, customStyles, customClasses, customIcons, useCoordinates, fallbackPages, activeCitationIndex, onActiveCitationChange, headerAction, isZoomEnabled, showHighlightsAction, defaultScale, useRange, rangeOfPages, showFullScreenAction, showRotateButton, segments, segmentTooltipText, onCurrentPageChange, navigationRequest, onNavigationSettled, disablePdfAnnotations, disablePdfTextLayer, renderPage, setRenderRange, }: PdfViewerProps) => import("react/jsx-runtime").JSX.Element;
76
93
  export default PdfViewer;
77
94
  //# sourceMappingURL=PdfViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/PdfViewer.tsx"],"names":[],"mappings":"AAKA,OAAO,6CAA6C,CAAC;AACrD,OAAO,wDAAwD,CAAC;AAChE,OAAO,6CAA6C,CAAC;AACrD,OAAO,+CAA+C,CAAC;AACvD,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAA2B,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,iBAAiB,CAAC;AAEzB,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,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AM,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,4CAujBhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,41 @@
1
+ export interface HighlightArea {
2
+ pageIndex: number;
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ pageNumber?: number;
8
+ }
9
+ export declare class CoordinateTransformer {
10
+ static transformHighlightCoordinates(coordinates: HighlightArea, rotation: number, pageWidth: number, pageHeight: number): HighlightArea;
11
+ static reverseTransformCoordinates(clickX: number, clickY: number, rotation: number, pageWidth: number, pageHeight: number): {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ static transformRect(rect: {
16
+ x: number;
17
+ y: number;
18
+ width: number;
19
+ height: number;
20
+ }, rotation: number, pageWidth: number, pageHeight: number): {
21
+ x: number;
22
+ y: number;
23
+ width: number;
24
+ height: number;
25
+ };
26
+ static isPointInRotatedRect(pointX: number, pointY: number, rect: {
27
+ x: number;
28
+ y: number;
29
+ width: number;
30
+ height: number;
31
+ }): boolean;
32
+ static getRotatedDimensions(width: number, height: number, rotation: number): {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ static calculateHeightDelta(pageNumbers: number[], getPageDimensions: (pageNum: number) => {
37
+ width: number;
38
+ height: number;
39
+ }, getPageRotation: (pageNum: number) => number): number;
40
+ }
41
+ //# sourceMappingURL=coordinateTransformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinateTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/coordinateTransformer.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;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AE,MAAM,GACf;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAUpC,MAAM,CAAC,oBAAoB,CACzB,WAAW,EAAE,MAAM,EAAE,EACrB,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EACzE,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAC3C,MAAM;CAuBV"}
@@ -0,0 +1,23 @@
1
+ export declare class RotationManager {
2
+ private rotations;
3
+ private pageMap;
4
+ private rotationChangeListeners;
5
+ private pdfIdentifier;
6
+ setPdfIdentifier(identifier: string): void;
7
+ registerPageElement(pageNumber: number, element: HTMLElement): void;
8
+ unregisterPageElement(pageNumber: number): void;
9
+ getRotation(pageNumber: number): number;
10
+ rotatePageBy90(pageNumber: number): void;
11
+ setRotation(pageNumber: number, angle: number): void;
12
+ private applyRotation;
13
+ onRotationChange(callback: (pageNum: number, angle: number) => void): () => void;
14
+ private notifyRotationChange;
15
+ private getPersistedRotation;
16
+ private persistRotation;
17
+ loadPersistedRotations(pageNumbers: number[]): void;
18
+ clearAll(): void;
19
+ resetPage(pageNumber: number): void;
20
+ getRotatedPages(): Map<number, number>;
21
+ }
22
+ export declare const rotationManager: RotationManager;
23
+ //# sourceMappingURL=rotationManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotationManager.d.ts","sourceRoot":"","sources":["../../../../../src/features/PdfViewer/rotationManager.ts"],"names":[],"mappings":"AACA,qBAAa,eAAe;IAC1B,OAAO,CAAC,SAAS,CAA+C;IAChE,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,uBAAuB,CAA4D;IAC3F,OAAO,CAAC,aAAa,CAAc;IAEnC,gBAAgB,CAAC,UAAU,EAAE,MAAM;IAInC,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW;IAgB5D,qBAAqB,CAAC,UAAU,EAAE,MAAM;IAIxC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAMvC,cAAc,CAAC,UAAU,EAAE,MAAM;IAUjC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQ7C,OAAO,CAAC,aAAa;IAsBrB,gBAAgB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAOhF,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,eAAe;IAWvB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE;IAc5C,QAAQ;IAiBR,SAAS,CAAC,UAAU,EAAE,MAAM;IAO5B,eAAe,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;CAUvC;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { SxProps, Theme } from '@mui/material/styles';
3
+ import { SegmentReviewAction } from './reviewStepAdapters';
4
+ export interface BoundaryCardOption {
5
+ id: string;
6
+ title: ReactNode;
7
+ description?: ReactNode;
8
+ disabled?: boolean;
9
+ }
10
+ export declare enum BoundaryReviewActionEnum {
11
+ KEEP = "KEEP",
12
+ SPLIT_HERE = "SPLIT_HERE",
13
+ MERGE_NEXT = "MERGE_NEXT",
14
+ MERGE_PREV = "MERGE_PREV",
15
+ MERGE_PREVIOUS = "MERGE_PREVIOUS",
16
+ SET_RANGE = "SET_RANGE"
17
+ }
18
+ export type BoundaryReviewAction = `${BoundaryReviewActionEnum}`;
19
+ export interface BoundaryReviewMetadata {
20
+ focus_page?: number | null;
21
+ boundary_margin?: number | null;
22
+ user_actions: readonly BoundaryReviewAction[];
23
+ }
24
+ export interface BoundaryReviewConfirmDetails {
25
+ selectedIndex: number;
26
+ option: BoundaryCardOption;
27
+ metadata?: BoundaryReviewMetadata;
28
+ startPage?: number;
29
+ endPage?: number;
30
+ }
31
+ export interface BoundaryCardStyles {
32
+ root?: SxProps<Theme>;
33
+ header?: SxProps<Theme>;
34
+ option?: SxProps<Theme>;
35
+ rangeInput?: SxProps<Theme>;
36
+ confirmButton?: SxProps<Theme>;
37
+ manualSection?: SxProps<Theme>;
38
+ manualConfirmation?: SxProps<Theme>;
39
+ adjacentSelector?: SxProps<Theme>;
40
+ impactWarning?: SxProps<Theme>;
41
+ footer?: SxProps<Theme>;
42
+ }
43
+ export declare const isBoundaryReviewAction: (value: string) => value is "KEEP" | "SPLIT_HERE" | "MERGE_NEXT" | "MERGE_PREV" | "MERGE_PREVIOUS" | "SET_RANGE";
44
+ export declare const createBoundaryCardOptions: (metadata?: BoundaryReviewMetadata, reviewAction?: SegmentReviewAction, startPage?: number | null, endPage?: number | null) => BoundaryCardOption[];
45
+ export interface BoundaryCardProps {
46
+ headerName?: ReactNode;
47
+ title: ReactNode;
48
+ pageNo?: ReactNode;
49
+ content?: ReactNode;
50
+ /** Replaces content when the API provides an operation-level revert summary. */
51
+ revertSummary?: ReactNode;
52
+ cognitiveScore?: ReactNode;
53
+ config?: readonly BoundaryCardOption[];
54
+ metadata?: BoundaryReviewMetadata;
55
+ reviewAction?: SegmentReviewAction;
56
+ previousSegmentTitle?: ReactNode;
57
+ nextSegmentTitle?: ReactNode;
58
+ /** Total number of pages in the document for validating custom page ranges. */
59
+ totalPages?: number;
60
+ selectedIndex?: number | null;
61
+ defaultSelectedIndex?: number | null;
62
+ /** Initial page range shown when SET_RANGE is selected. */
63
+ defaultStartPage?: number | null;
64
+ defaultEndPage?: number | null;
65
+ onSelectionChange?: (selectedIndex: number, option: BoundaryCardOption) => void;
66
+ onConfirm?: (selectedIndex: number, option: BoundaryCardOption, details?: BoundaryReviewConfirmDetails) => void;
67
+ onActionConfirm?: (action: BoundaryReviewAction, details: BoundaryReviewConfirmDetails) => void;
68
+ onCognitiveClick?: () => void;
69
+ onAdjustManually?: () => void;
70
+ onClose?: () => void;
71
+ confirmLabel?: ReactNode;
72
+ manualPrompt?: ReactNode;
73
+ manualActionLabel?: ReactNode;
74
+ cognitiveLabel?: ReactNode;
75
+ showAdjustManually?: boolean;
76
+ showCognitiveIntegrity?: boolean;
77
+ showCloseButton?: boolean;
78
+ confirmDisabled?: boolean;
79
+ width?: number | string;
80
+ maxWidth?: number | string;
81
+ className?: string;
82
+ styles?: BoundaryCardStyles;
83
+ }
84
+ export default function BoundaryCard({ headerName, title, pageNo, content, revertSummary, cognitiveScore, config, metadata, previousSegmentTitle, nextSegmentTitle, selectedIndex, defaultSelectedIndex, defaultStartPage, defaultEndPage, onSelectionChange, onConfirm, onActionConfirm, onCognitiveClick, onAdjustManually, onClose, confirmLabel, manualPrompt, manualActionLabel, cognitiveLabel, showAdjustManually, showCognitiveIntegrity, showCloseButton, confirmDisabled, width, maxWidth, className, styles, reviewAction, totalPages }: BoundaryCardProps): import("react/jsx-runtime").JSX.Element;
85
+ //# sourceMappingURL=BoundaryCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundaryCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/BoundaryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAe1D,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAU3D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAKD,oBAAY,wBAAwB;IAClC,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,cA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AAY,CAAC,EAAE,SAAS,CAAC;IACzB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,UAA6B,EAC7B,KAAK,EACL,MAAM,EACN,OAAO,EACP,aAAa,EACb,cAAc,EACd,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,oBAA2B,EAC3B,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,YAAwB,EACxB,YAA8C,EAC9C,iBAAqC,EACrC,cAAsC,EACtC,kBAAyB,EACzB,sBAA6B,EAC7B,eAAsB,EACtB,eAAuB,EACvB,KAAW,EACX,QAAc,EACd,SAAS,EACT,MAAM,EACN,YAAY,EACZ,UAAU,EACX,EAAE,iBAAiB,2CA0vBnB"}
@@ -0,0 +1,26 @@
1
+ import React, { type ReactNode, type RefObject } from 'react';
2
+ import type { PopperProps } from '@mui/material/Popper';
3
+ export interface CardWrapperProps {
4
+ /** Reference to the element the card is attached to. */
5
+ anchorRef?: RefObject<HTMLElement>;
6
+ /** Anchor element itself (alternative to anchorRef). */
7
+ anchorElement?: HTMLElement | null;
8
+ children?: ReactNode;
9
+ className?: string;
10
+ /** Pixel offset from the anchor's bottom-left corner. */
11
+ offset?: {
12
+ top?: number;
13
+ left?: number;
14
+ };
15
+ placement?: PopperProps['placement'];
16
+ width?: number | string;
17
+ maxWidth?: number | string;
18
+ customStyles?: Record<string, React.CSSProperties>;
19
+ /** Fallback max-height as percentage of viewport when availableHeight is not calculated. Default: '85vh' */
20
+ fallbackMaxHeightVh?: number;
21
+ /** Height buffer to subtract from availableHeight calculation. Default: 100px */
22
+ heightBuffer?: number;
23
+ }
24
+ /** Renders a scrollable card in a portal, anchored below another element. */
25
+ export default function CardWrapper({ anchorRef, anchorElement, children, className, offset, placement, width, maxWidth, customStyles, fallbackMaxHeightVh, heightBuffer, }: CardWrapperProps): import("react/jsx-runtime").JSX.Element;
26
+ //# sourceMappingURL=CardWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CardWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,wDAAwD;IACxD,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,YAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACpD,4GAA4G;IAC5G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,6EAA6E;AAC7E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,SAAS,EACT,aAAa,EACb,QAAQ,EACR,SAAS,EACT,MAAW,EACX,SAA0B,EAC1B,KAAK,EACL,QAAQ,EACR,YAAiB,EACjB,mBAAwB,EACxB,YAAkB,GACnB,EAAE,gBAAgB,2CAqIlB"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export default function ChartBreakoutCircle(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ChartBreakoutCircle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartBreakoutCircle.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/ChartBreakoutCircle.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,2CAO/E"}
@@ -0,0 +1,3 @@
1
+ import { type SvgIconProps } from '@mui/material/SvgIcon';
2
+ export default function CognitiveIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=CognitiveIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CognitiveIcon.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CognitiveIcon.tsx"],"names":[],"mappings":"AAAA,OAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,YAAY,2CAexD"}
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { SxProps, Theme } from '@mui/material/styles';
3
+ import { type MarkdownRendererStyles } from '../CitationRenderer/MarkdownRenderer';
4
+ export interface CognitiveIntegrityStyles {
5
+ root?: SxProps<Theme>;
6
+ header?: SxProps<Theme>;
7
+ content?: SxProps<Theme>;
8
+ section?: SxProps<Theme>;
9
+ markdown?: MarkdownRendererStyles;
10
+ }
11
+ export interface CognitiveIntegrityProps {
12
+ reasons?: readonly CognitiveIntegrityReason[] | null;
13
+ /** @deprecated Use `reasons` with `type: "evidence"` instead. */
14
+ reason?: string | null;
15
+ /** @deprecated Use `reasons` with `type: "gap"` instead. */
16
+ gap?: string | null;
17
+ score?: string | number | null;
18
+ headerName?: ReactNode;
19
+ onBack?: () => void;
20
+ onClose?: () => void;
21
+ showCloseButton?: boolean;
22
+ width?: number | string;
23
+ maxWidth?: number | string;
24
+ className?: string;
25
+ styles?: CognitiveIntegrityStyles;
26
+ }
27
+ export interface CognitiveIntegrityReason {
28
+ text: string;
29
+ type: string;
30
+ }
31
+ /** Compact popup content for displaying review reason and gap as Markdown. */
32
+ export default function CognitiveIntegrity({ reasons, reason, gap, score: cognitiveScore, headerName, onBack, onClose, showCloseButton, width, maxWidth, className, styles, }: CognitiveIntegrityProps): import("react/jsx-runtime").JSX.Element | null;
33
+ //# sourceMappingURL=CognitiveIntegrity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CognitiveIntegrity.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CognitiveIntegrity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAyB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAC;AAY9C,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,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numeric scores as percentages while preserving backend-formatted strings. */
6
+ export default function CognitiveScoreBadge({ score }: CognitiveScoreBadgeProps): import("react/jsx-runtime").JSX.Element | null;
7
+ //# sourceMappingURL=CognitiveScoreBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CognitiveScoreBadge.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CognitiveScoreBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,yFAAyF;AACzF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE,wBAAwB,kDAwB9E"}