@viswa-test/test-citation 0.0.379 → 0.0.382

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 (599) hide show
  1. package/README.md +151 -0
  2. package/dist/assests/icons/InfoAlert.js +2 -0
  3. package/dist/assests/icons/InfoAlert.js.map +1 -0
  4. package/dist/cjs/assests/icons/InfoAlert.js +2 -0
  5. package/dist/cjs/assests/icons/InfoAlert.js.map +1 -0
  6. package/dist/cjs/features/BPACitationRenderer/BPACitationRenderer.js +1 -1
  7. package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
  8. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  9. package/dist/cjs/features/CognitiveCompare/CognitiveCompareConstants.js +1 -1
  10. package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  11. package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +1 -1
  12. package/dist/cjs/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +1 -1
  13. package/dist/cjs/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +1 -1
  14. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +1 -1
  15. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  16. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  17. package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  18. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  19. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  20. package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
  21. package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
  22. package/dist/cjs/features/GptWebCitation/GptWebCitation.js +1 -1
  23. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
  24. package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js +1 -1
  25. package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js +2 -0
  26. package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js.map +1 -0
  27. package/dist/cjs/features/PdfViewer/PdfContainer.js +1 -1
  28. package/dist/cjs/features/PdfViewer/PdfStyle.js +1 -1
  29. package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
  30. package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
  31. package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js +2 -0
  32. package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js.map +1 -0
  33. package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js +2 -0
  34. package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js.map +1 -0
  35. package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js +2 -0
  36. package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js.map +1 -0
  37. package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js +2 -0
  38. package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js.map +1 -0
  39. package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +2 -0
  40. package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +1 -0
  41. package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js +2 -0
  42. package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js.map +1 -0
  43. package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js +2 -0
  44. package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +1 -0
  45. package/dist/cjs/features/PdfViewer/rotationManager.js +2 -0
  46. package/dist/cjs/features/PdfViewer/rotationManager.js.map +1 -0
  47. package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
  48. package/dist/cjs/features/PromptCitation/CitationDependencyGraph.js +2 -0
  49. package/dist/cjs/features/PromptCitation/CitationDependencyGraph.js.map +1 -0
  50. package/dist/cjs/features/PromptCitation/PromptCitation.js +2 -0
  51. package/dist/cjs/features/PromptCitation/PromptCitation.js.map +1 -0
  52. package/dist/cjs/features/PromptCitation/_components/CodeEditor.js +2 -0
  53. package/dist/cjs/features/PromptCitation/_components/CodeEditor.js.map +1 -0
  54. package/dist/cjs/features/PromptCitation/_components/Markdownrenderer.js +2 -0
  55. package/dist/cjs/features/PromptCitation/_components/Markdownrenderer.js.map +1 -0
  56. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  58. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +1 -1
  59. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +1 -1
  60. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  61. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  62. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  63. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/HistoryMenu.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +1 -1
  66. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  67. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  68. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  69. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/SocketManager.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  75. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  76. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.module.css.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  78. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  79. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  80. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  81. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  84. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  85. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  86. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  87. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  88. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  89. package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  90. package/dist/cjs/features/ReviewPanel/ReviewPanel.js +2 -0
  91. package/dist/cjs/features/ReviewPanel/ReviewPanel.js.map +1 -0
  92. package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +2 -0
  93. package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js.map +1 -0
  94. package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js +2 -0
  95. package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js.map +1 -0
  96. package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
  97. package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
  98. package/dist/cjs/features/SegmentReviewComponents/CognitiveIcon.js +2 -0
  99. package/dist/cjs/features/SegmentReviewComponents/CognitiveIcon.js.map +1 -0
  100. package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js +2 -0
  101. package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js.map +1 -0
  102. package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js +2 -0
  103. package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js.map +1 -0
  104. package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js +2 -0
  105. package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js.map +1 -0
  106. package/dist/cjs/features/SegmentReviewComponents/PageCheck.js +2 -0
  107. package/dist/cjs/features/SegmentReviewComponents/PageCheck.js.map +1 -0
  108. package/dist/cjs/features/SegmentReviewComponents/PageTypeChoiceCheck.js +2 -0
  109. package/dist/cjs/features/SegmentReviewComponents/PageTypeChoiceCheck.js.map +1 -0
  110. package/dist/cjs/features/SegmentReviewComponents/RevertCard.js +2 -0
  111. package/dist/cjs/features/SegmentReviewComponents/RevertCard.js.map +1 -0
  112. package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
  113. package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
  114. package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
  115. package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
  116. package/dist/cjs/features/SegmentReviewComponents/ReviewedBoundaryActions.js +2 -0
  117. package/dist/cjs/features/SegmentReviewComponents/ReviewedBoundaryActions.js.map +1 -0
  118. package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js +2 -0
  119. package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
  120. package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +2 -0
  121. package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js.map +1 -0
  122. package/dist/cjs/features/SegmentReviewComponents/helper.js +2 -0
  123. package/dist/cjs/features/SegmentReviewComponents/helper.js.map +1 -0
  124. package/dist/cjs/features/SegmentReviewComponents/reviewScore.js +2 -0
  125. package/dist/cjs/features/SegmentReviewComponents/reviewScore.js.map +1 -0
  126. package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js +2 -0
  127. package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js.map +1 -0
  128. package/dist/cjs/index.js +1 -1
  129. package/dist/cjs/service/redlineService.js +1 -1
  130. package/dist/cjs/utils/tagHelper.js +1 -1
  131. package/dist/features/BPACitationRenderer/BPACitationRenderer.js +1 -1
  132. package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
  133. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  134. package/dist/features/CognitiveCompare/CognitiveCompareConstants.js +1 -1
  135. package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  136. package/dist/features/CognitiveCompare/CognitivePopup.js +1 -1
  137. package/dist/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +1 -1
  138. package/dist/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +1 -1
  139. package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +1 -1
  140. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  141. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  142. package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  143. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  144. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  145. package/dist/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
  146. package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
  147. package/dist/features/GptWebCitation/GptWebCitation.js +1 -1
  148. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
  149. package/dist/features/GptWebCitation/utils/fixedHeight.utils.js +1 -1
  150. package/dist/features/ParentCitationComponent/ParentCitationComponent.js +2 -0
  151. package/dist/features/ParentCitationComponent/ParentCitationComponent.js.map +1 -0
  152. package/dist/features/PdfViewer/PdfContainer.js +1 -1
  153. package/dist/features/PdfViewer/PdfStyle.js +1 -1
  154. package/dist/features/PdfViewer/PdfToolbar.js +1 -1
  155. package/dist/features/PdfViewer/PdfViewer.js +1 -1
  156. package/dist/features/PdfViewer/nyc-components/BoundaryCard.js +2 -0
  157. package/dist/features/PdfViewer/nyc-components/BoundaryCard.js.map +1 -0
  158. package/dist/features/PdfViewer/nyc-components/CardWrapper.js +2 -0
  159. package/dist/features/PdfViewer/nyc-components/CardWrapper.js.map +1 -0
  160. package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js +2 -0
  161. package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js.map +1 -0
  162. package/dist/features/PdfViewer/nyc-components/LabelCheck.js +2 -0
  163. package/dist/features/PdfViewer/nyc-components/LabelCheck.js.map +1 -0
  164. package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +2 -0
  165. package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +1 -0
  166. package/dist/features/PdfViewer/nyc-components/infoAlert.js +2 -0
  167. package/dist/features/PdfViewer/nyc-components/infoAlert.js.map +1 -0
  168. package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js +2 -0
  169. package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +1 -0
  170. package/dist/features/PdfViewer/rotationManager.js +2 -0
  171. package/dist/features/PdfViewer/rotationManager.js.map +1 -0
  172. package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
  173. package/dist/features/PromptCitation/CitationDependencyGraph.js +2 -0
  174. package/dist/features/PromptCitation/CitationDependencyGraph.js.map +1 -0
  175. package/dist/features/PromptCitation/PromptCitation.js +2 -0
  176. package/dist/features/PromptCitation/PromptCitation.js.map +1 -0
  177. package/dist/features/PromptCitation/_components/CodeEditor.js +2 -0
  178. package/dist/features/PromptCitation/_components/CodeEditor.js.map +1 -0
  179. package/dist/features/PromptCitation/_components/Markdownrenderer.js +2 -0
  180. package/dist/features/PromptCitation/_components/Markdownrenderer.js.map +1 -0
  181. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  182. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  183. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +1 -1
  184. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +1 -1
  185. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  186. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  187. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  188. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  189. package/dist/features/RequirementAI/components/UserStoryCard/Popups/HistoryMenu.js +1 -1
  190. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +1 -1
  191. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  192. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  193. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  194. package/dist/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.js +1 -1
  195. package/dist/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.js +1 -1
  196. package/dist/features/RequirementAI/components/UserStoryCard/cws/SocketManager.js +1 -1
  197. package/dist/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.js +1 -1
  198. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  199. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  200. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  201. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.module.css.js +1 -1
  202. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  203. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  204. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  205. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  206. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  207. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  208. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  209. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  210. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  211. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  212. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  213. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  214. package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  215. package/dist/features/ReviewPanel/ReviewPanel.js +2 -0
  216. package/dist/features/ReviewPanel/ReviewPanel.js.map +1 -0
  217. package/dist/features/SegmentReviewComponents/BoundaryCard.js +2 -0
  218. package/dist/features/SegmentReviewComponents/BoundaryCard.js.map +1 -0
  219. package/dist/features/SegmentReviewComponents/CardWrapper.js +2 -0
  220. package/dist/features/SegmentReviewComponents/CardWrapper.js.map +1 -0
  221. package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
  222. package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
  223. package/dist/features/SegmentReviewComponents/CognitiveIcon.js +2 -0
  224. package/dist/features/SegmentReviewComponents/CognitiveIcon.js.map +1 -0
  225. package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js +2 -0
  226. package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js.map +1 -0
  227. package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js +2 -0
  228. package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js.map +1 -0
  229. package/dist/features/SegmentReviewComponents/LabelCheck.js +2 -0
  230. package/dist/features/SegmentReviewComponents/LabelCheck.js.map +1 -0
  231. package/dist/features/SegmentReviewComponents/PageCheck.js +2 -0
  232. package/dist/features/SegmentReviewComponents/PageCheck.js.map +1 -0
  233. package/dist/features/SegmentReviewComponents/PageTypeChoiceCheck.js +2 -0
  234. package/dist/features/SegmentReviewComponents/PageTypeChoiceCheck.js.map +1 -0
  235. package/dist/features/SegmentReviewComponents/RevertCard.js +2 -0
  236. package/dist/features/SegmentReviewComponents/RevertCard.js.map +1 -0
  237. package/dist/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
  238. package/dist/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
  239. package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
  240. package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
  241. package/dist/features/SegmentReviewComponents/ReviewedBoundaryActions.js +2 -0
  242. package/dist/features/SegmentReviewComponents/ReviewedBoundaryActions.js.map +1 -0
  243. package/dist/features/SegmentReviewComponents/ReviewedCard.js +2 -0
  244. package/dist/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
  245. package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +2 -0
  246. package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js.map +1 -0
  247. package/dist/features/SegmentReviewComponents/helper.js +2 -0
  248. package/dist/features/SegmentReviewComponents/helper.js.map +1 -0
  249. package/dist/features/SegmentReviewComponents/reviewScore.js +2 -0
  250. package/dist/features/SegmentReviewComponents/reviewScore.js.map +1 -0
  251. package/dist/features/SegmentReviewComponents/reviewStepAdapters.js +2 -0
  252. package/dist/features/SegmentReviewComponents/reviewStepAdapters.js.map +1 -0
  253. package/dist/index.js +1 -1
  254. package/dist/service/redlineService.js +1 -1
  255. package/dist/types/src/CitationDependencyGraphTest.d.ts +4 -0
  256. package/dist/types/src/CitationDependencyGraphTest.d.ts.map +1 -0
  257. package/dist/types/src/RedlineApprovalCardTest.d.ts +1 -0
  258. package/dist/types/src/RedlineApprovalCardTest.d.ts.map +1 -0
  259. package/dist/types/src/RedlineEditorTest.d.ts.map +1 -1
  260. package/dist/types/src/RedlineEditorTest2.d.ts +3 -0
  261. package/dist/types/src/RedlineEditorTest2.d.ts.map +1 -0
  262. package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
  263. package/dist/types/src/assests/icons/ChartSplitIcon.d.ts +3 -0
  264. package/dist/types/src/assests/icons/ChartSplitIcon.d.ts.map +1 -0
  265. package/dist/types/src/assests/icons/InfoAlert.d.ts +3 -0
  266. package/dist/types/src/assests/icons/InfoAlert.d.ts.map +1 -0
  267. package/dist/types/src/commonConstants.d.ts +31103 -0
  268. package/dist/types/src/commonConstants.d.ts.map +1 -0
  269. package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.d.ts.map +1 -1
  270. package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts +1 -0
  271. package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts.map +1 -1
  272. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
  273. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
  274. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  275. package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts +1 -1
  276. package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts.map +1 -1
  277. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +1 -1
  278. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  279. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +0 -12
  280. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
  281. package/dist/types/src/features/CognitiveCompare/CognitivePopup.d.ts.map +1 -1
  282. package/dist/types/src/features/CognitiveCompare/Guidelines/components/GuidelinePanel.d.ts.map +1 -1
  283. package/dist/types/src/features/CognitiveCompare/Guidelines/components/WebGptPanel.d.ts.map +1 -1
  284. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts +456 -11335
  285. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts.map +1 -1
  286. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts +1 -14
  287. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts.map +1 -1
  288. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  289. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  290. package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts +1 -2
  291. package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -1
  292. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +1 -1
  293. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  294. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +1 -0
  295. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
  296. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
  297. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts.map +1 -1
  298. package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts +2 -0
  299. package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts.map +1 -0
  300. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts +0 -1
  301. package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts.map +1 -1
  302. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -1
  303. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +1 -2
  304. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
  305. package/dist/types/src/features/GptWebCitation/types.d.ts +0 -11
  306. package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
  307. package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +0 -2
  308. package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -1
  309. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts +128 -0
  310. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts.map +1 -0
  311. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts +13 -0
  312. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts.map +1 -0
  313. package/dist/types/src/features/PdfViewer/PdfContainer.d.ts +4 -2
  314. package/dist/types/src/features/PdfViewer/PdfContainer.d.ts.map +1 -1
  315. package/dist/types/src/features/PdfViewer/PdfStyle.d.ts.map +1 -1
  316. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts +4 -1
  317. package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
  318. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts +19 -2
  319. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
  320. package/dist/types/src/features/PdfViewer/coordinateTransformer.d.ts +41 -0
  321. package/dist/types/src/features/PdfViewer/coordinateTransformer.d.ts.map +1 -0
  322. package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts +59 -0
  323. package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts.map +1 -0
  324. package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts +19 -0
  325. package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts.map +1 -0
  326. package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts +3 -0
  327. package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts.map +1 -0
  328. package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts +77 -0
  329. package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts.map +1 -0
  330. package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts +47 -0
  331. package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts.map +1 -0
  332. package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts +15 -0
  333. package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts.map +1 -0
  334. package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts +3 -0
  335. package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts.map +1 -0
  336. package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts +36 -0
  337. package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts.map +1 -0
  338. package/dist/types/src/features/PdfViewer/rotationManager.d.ts +23 -0
  339. package/dist/types/src/features/PdfViewer/rotationManager.d.ts.map +1 -0
  340. package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts +1 -0
  341. package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
  342. package/dist/types/src/features/PromptCitation/CitationDependencyGraph.d.ts +56 -0
  343. package/dist/types/src/features/PromptCitation/CitationDependencyGraph.d.ts.map +1 -0
  344. package/dist/types/src/features/PromptCitation/PromptCitation.d.ts +326 -0
  345. package/dist/types/src/features/PromptCitation/PromptCitation.d.ts.map +1 -0
  346. package/dist/types/src/features/PromptCitation/PromptCitationTest.d.ts +4 -0
  347. package/dist/types/src/features/PromptCitation/PromptCitationTest.d.ts.map +1 -0
  348. package/dist/types/src/features/PromptCitation/_components/CodeEditor.d.ts +30 -0
  349. package/dist/types/src/features/PromptCitation/_components/CodeEditor.d.ts.map +1 -0
  350. package/dist/types/src/features/PromptCitation/_components/HighlightedCodeDetails.d.ts +16 -0
  351. package/dist/types/src/features/PromptCitation/_components/HighlightedCodeDetails.d.ts.map +1 -0
  352. package/dist/types/src/features/PromptCitation/_components/Markdownrenderer.d.ts +23 -0
  353. package/dist/types/src/features/PromptCitation/_components/Markdownrenderer.d.ts.map +1 -0
  354. package/dist/types/src/features/PromptCitation/_components/ThemeToggle.d.ts +12 -0
  355. package/dist/types/src/features/PromptCitation/_components/ThemeToggle.d.ts.map +1 -0
  356. package/dist/types/src/features/PromptCitation/_components/TooltipComponent.d.ts +8 -0
  357. package/dist/types/src/features/PromptCitation/_components/TooltipComponent.d.ts.map +1 -0
  358. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +29 -39
  359. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  360. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
  361. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts +0 -2
  362. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts.map +1 -1
  363. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts +0 -2
  364. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts.map +1 -1
  365. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  366. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
  367. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +1 -1
  368. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
  369. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts +5439 -84
  370. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts.map +1 -1
  371. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +1 -1
  372. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  373. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts +1 -1
  374. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -1
  375. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +2 -2
  376. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  377. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +2 -20
  378. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  379. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.d.ts +2 -7
  380. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.d.ts.map +1 -1
  381. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.d.ts.map +1 -1
  382. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/SocketManager.d.ts +1 -15
  383. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/SocketManager.d.ts.map +1 -1
  384. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.d.ts +1 -2
  385. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.d.ts.map +1 -1
  386. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts +2 -3
  387. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
  388. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts.map +1 -1
  389. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationContent.d.ts +0 -1
  390. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationContent.d.ts.map +1 -1
  391. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationRender.d.ts +0 -1
  392. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationRender.d.ts.map +1 -1
  393. package/dist/types/src/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.d.ts.map +1 -1
  394. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +2 -3
  395. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
  396. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
  397. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
  398. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +1 -3
  399. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
  400. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts +1 -2
  401. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
  402. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts +0 -1
  403. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts.map +1 -1
  404. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +0 -2
  405. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
  406. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +1 -2
  407. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  408. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +1 -2
  409. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
  410. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +1 -1
  411. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
  412. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +0 -2
  413. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
  414. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +0 -7
  415. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  416. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +1 -2
  417. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
  418. package/dist/types/src/features/RequirementAI/utils/helpers.d.ts +0 -2
  419. package/dist/types/src/features/RequirementAI/utils/helpers.d.ts.map +1 -1
  420. package/dist/types/src/features/RequirementAI/utils/proccess-stream.utils.d.ts.map +1 -1
  421. package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts +85 -0
  422. package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -0
  423. package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts +26 -0
  424. package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts.map +1 -0
  425. package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts +3 -0
  426. package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts.map +1 -0
  427. package/dist/types/src/features/SegmentReviewComponents/CognitiveIcon.d.ts +3 -0
  428. package/dist/types/src/features/SegmentReviewComponents/CognitiveIcon.d.ts.map +1 -0
  429. package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts +33 -0
  430. package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts.map +1 -0
  431. package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts +7 -0
  432. package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts.map +1 -0
  433. package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts +87 -0
  434. package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts.map +1 -0
  435. package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts +57 -0
  436. package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts.map +1 -0
  437. package/dist/types/src/features/SegmentReviewComponents/PageTypeChoiceCheck.d.ts +28 -0
  438. package/dist/types/src/features/SegmentReviewComponents/PageTypeChoiceCheck.d.ts.map +1 -0
  439. package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts +37 -0
  440. package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts.map +1 -0
  441. package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts +9 -0
  442. package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts.map +1 -0
  443. package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts +7 -0
  444. package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts.map +1 -0
  445. package/dist/types/src/features/SegmentReviewComponents/ReviewedBoundaryActions.d.ts +17 -0
  446. package/dist/types/src/features/SegmentReviewComponents/ReviewedBoundaryActions.d.ts.map +1 -0
  447. package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts +33 -0
  448. package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts.map +1 -0
  449. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts +124 -0
  450. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -0
  451. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts +13 -0
  452. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts.map +1 -0
  453. package/dist/types/src/features/SegmentReviewComponents/helper.d.ts +51 -0
  454. package/dist/types/src/features/SegmentReviewComponents/helper.d.ts.map +1 -0
  455. package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts +2 -0
  456. package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts.map +1 -0
  457. package/dist/types/src/features/SegmentReviewComponents/index.d.ts +25 -0
  458. package/dist/types/src/features/SegmentReviewComponents/index.d.ts.map +1 -0
  459. package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts +4 -0
  460. package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts.map +1 -0
  461. package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts +243 -0
  462. package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts.map +1 -0
  463. package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts +2 -0
  464. package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts.map +1 -0
  465. package/dist/types/src/index.d.ts +8 -0
  466. package/dist/types/src/index.d.ts.map +1 -1
  467. package/dist/types/src/service/redlineService.d.ts.map +1 -1
  468. package/dist/types/src/utils/tagHelper.d.ts +0 -9
  469. package/dist/types/src/utils/tagHelper.d.ts.map +1 -1
  470. package/dist/utils/tagHelper.js +1 -1
  471. package/package.json +12 -2
  472. package/dist/cjs/features/CognitiveCompare/utils/normalizeInlineMarkdown.js +0 -2
  473. package/dist/cjs/features/CognitiveCompare/utils/normalizeInlineMarkdown.js.map +0 -1
  474. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js +0 -2
  475. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map +0 -1
  476. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js +0 -2
  477. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js.map +0 -1
  478. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js +0 -2
  479. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js.map +0 -1
  480. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
  481. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +0 -1
  482. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js +0 -2
  483. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js.map +0 -1
  484. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js +0 -2
  485. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js.map +0 -1
  486. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js +0 -2
  487. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js.map +0 -1
  488. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js +0 -2
  489. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js.map +0 -1
  490. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js +0 -2
  491. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js.map +0 -1
  492. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js +0 -2
  493. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js.map +0 -1
  494. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +0 -2
  495. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +0 -1
  496. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +0 -2
  497. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +0 -1
  498. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +0 -2
  499. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +0 -1
  500. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +0 -2
  501. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +0 -1
  502. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +0 -2
  503. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +0 -1
  504. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +0 -2
  505. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +0 -1
  506. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +0 -2
  507. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +0 -1
  508. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js +0 -2
  509. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map +0 -1
  510. package/dist/cjs/features/RequirementAI/utils/exponential-retry.js +0 -2
  511. package/dist/cjs/features/RequirementAI/utils/exponential-retry.js.map +0 -1
  512. package/dist/features/CognitiveCompare/utils/normalizeInlineMarkdown.js +0 -2
  513. package/dist/features/CognitiveCompare/utils/normalizeInlineMarkdown.js.map +0 -1
  514. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js +0 -2
  515. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map +0 -1
  516. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js +0 -2
  517. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js.map +0 -1
  518. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js +0 -2
  519. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js.map +0 -1
  520. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
  521. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +0 -1
  522. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js +0 -2
  523. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js.map +0 -1
  524. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js +0 -2
  525. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js.map +0 -1
  526. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js +0 -2
  527. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js.map +0 -1
  528. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js +0 -2
  529. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js.map +0 -1
  530. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js +0 -2
  531. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js.map +0 -1
  532. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js +0 -2
  533. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js.map +0 -1
  534. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +0 -2
  535. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +0 -1
  536. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +0 -2
  537. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +0 -1
  538. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +0 -2
  539. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +0 -1
  540. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +0 -2
  541. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +0 -1
  542. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +0 -2
  543. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +0 -1
  544. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +0 -2
  545. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +0 -1
  546. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +0 -2
  547. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +0 -1
  548. package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js +0 -2
  549. package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map +0 -1
  550. package/dist/features/RequirementAI/utils/exponential-retry.js +0 -2
  551. package/dist/features/RequirementAI/utils/exponential-retry.js.map +0 -1
  552. package/dist/types/src/CitationAccordionTest.d.ts +0 -1
  553. package/dist/types/src/CitationAccordionTest.d.ts.map +0 -1
  554. package/dist/types/src/MockDeviationSummary.d.ts +0 -1
  555. package/dist/types/src/MockDeviationSummary.d.ts.map +0 -1
  556. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/new-guidelines.mockData.d.ts +0 -33
  557. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/new-guidelines.mockData.d.ts.map +0 -1
  558. package/dist/types/src/features/CognitiveCompare/utils/normalizeInlineMarkdown.d.ts +0 -25
  559. package/dist/types/src/features/CognitiveCompare/utils/normalizeInlineMarkdown.d.ts.map +0 -1
  560. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.d.ts +0 -2
  561. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.d.ts.map +0 -1
  562. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.d.ts +0 -3
  563. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.d.ts.map +0 -1
  564. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/reviewBoundaryLexical.test.d.ts +0 -2
  565. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/reviewBoundaryLexical.test.d.ts.map +0 -1
  566. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.d.ts +0 -7
  567. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.d.ts.map +0 -1
  568. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts +0 -2
  569. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts.map +0 -1
  570. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.d.ts +0 -29
  571. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.d.ts.map +0 -1
  572. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.test.d.ts +0 -2
  573. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.test.d.ts.map +0 -1
  574. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.d.ts +0 -7
  575. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.d.ts.map +0 -1
  576. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.d.ts +0 -3
  577. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.d.ts.map +0 -1
  578. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.d.ts +0 -86
  579. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.d.ts.map +0 -1
  580. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.test.d.ts +0 -9
  581. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.test.d.ts.map +0 -1
  582. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.d.ts +0 -7
  583. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.d.ts.map +0 -1
  584. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.d.ts +0 -5
  585. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.d.ts.map +0 -1
  586. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts +0 -10
  587. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts.map +0 -1
  588. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts +0 -17
  589. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts.map +0 -1
  590. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts +0 -23
  591. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts.map +0 -1
  592. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts +0 -3
  593. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts.map +0 -1
  594. package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts +0 -12
  595. package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts.map +0 -1
  596. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.d.ts +0 -9
  597. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.d.ts.map +0 -1
  598. package/dist/types/src/features/RequirementAI/utils/exponential-retry.d.ts +0 -12
  599. package/dist/types/src/features/RequirementAI/utils/exponential-retry.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("../CognitiveComparehelpers.js"),n=require("../Guidelines/utils/guidelineTargets.js");exports.useLinesCalculator=function(i){var r=i.containerRef,c=i.leftContainerRef,l=i.rightContainerRef;i.svgContainerRef;var o=i.pathRefs,u=i.leftHeaderRef,a=i.rightHeaderRef,d=i.proposedSections,s=i.existingSections,v=i.visibleFields,g=i.leftRefs,h=i.rightRefs,f=i.sectionLeftRefs,p=i.sectionRightRefs,b=i.subSectionLeftRefs,A=i.subSectionRightRefs,y=i.lhsBadgeRefs,R=i.rhsBadgeRefs,x=i.sectionRowRefs,m=i.expandedSections,B=i.expandedSubSections,S=i.connectedSections,T=i.isSideBySide,I=i.activeSideBySideSection,C=i.maintainRelativeOrder,E=i.isGuidelineMode,M=i.cognitiveMap,D=i.getSectionCompareStyle,O=i.getSubSectionCompareStyle,L=i.getDeviationStyleByKey,_=i.isArrowVisible,F=i.isAnimatingRef,N=i.isSideBySideRef,H=i.sideBySideCacheRef,P=i.sideBySideLineRef,k=i.activeSideBySideSectionRef,w=i.activeSideBySideRightSectionRef,G=i.connectedLines,V=i.setConnectedLines,Y=i.cachedConnectedPositions,j=i.calculateLinesRef,z=i.resizeTimerRef,Q=i.scrollLock,X=i.scrollSyncLocked,q=i.handleResizeRef,K=i.activeProposed,J=i.existingRule,U=i.analysisData,W=i.pendingScrollTargetRef,Z=i.pendingScrollCallbackRef,$=i.resolvedComparisonConfig,tt=i.getFieldData,et=t.useState([]),nt=et[0],it=et[1],rt=t.useState(null),ct=rt[0],lt=rt[1],ot=t.useState([]),ut=ot[0],at=ot[1],dt=null!=G?G:ut,st=null!=V?V:at,vt=t.useState({width:0,height:0}),gt=vt[0],ht=vt[1],ft=t.useRef(!1),pt=t.useRef(!1),bt=t.useRef(!1),At=t.useRef(null),yt=t.useRef([]),Rt=null!=Y?Y:yt,xt=function(t,e,n,i,r,c,l){if(Math.abs(i-e)<=1)return c&&l?"M ".concat(t,",").concat(e," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r,",").concat(e):!c&&l?"M ".concat(r,",").concat(e," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i);var o=Math.min(15,Math.abs(r-t),Math.abs(i-e)/2),u=Math.min(15,Math.abs(n-r),Math.abs(i-e)/2),a=i>e?o:-o,d=i>e?u:-u,s=n>r?u:-u;return c&&l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i):!c&&l?"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i)},mt=t.useCallback(function(){var t,i,o,x,_,N,H,P,k,w,G,V,Y,j,z,Q,X,q;if(!ft.current&&!F.current){ft.current=!0;try{if(!r.current)return;var K=function(t){var e=t.split("-"),n=e[0];if(!m[n]&&!1===C)return!1;if(C&&!m["left-".concat(n)]&&!m["right-".concat(n)]&&!m[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!B[i])return!1;return!0},J=r.current.getBoundingClientRect();ht({width:J.width,height:J.height});var U=[];if(v.forEach(function(t){var e,n,i=t.key,r=null===(e=g.current[i])||void 0===e?void 0:e.current,c=null===(n=h.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!F.current){for(var W=0;W<Math.max(d.length,s.length);W++){var Z=null===(t=f.current[W])||void 0===t?void 0:t.current,$=null===(i=p.current[W])||void 0===i?void 0:i.current;Z&&(Z.style.height="auto",Z.style.minHeight="0px"),$&&($.style.height="auto",$.style.minHeight="0px")}C||Object.keys(b.current).forEach(function(t){var e,n;if(K(t)){var i=null===(e=b.current[t])||void 0===e?void 0:e.current,r=null===(n=A.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var tt={};v.forEach(function(t){var e,n,i=t.key,r=null===(e=g.current[i])||void 0===e?void 0:e.current,c=null===(n=h.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),o=c.getBoundingClientRect();tt[i]=Math.max(l.height,o.height)}});var et={left:{},right:{}},nt={};if(!F.current)if(C){if(T&&null!==I)if("number"==typeof I){var rt=I,ct=d[rt],ot=null===(_=f.current[rt])||void 0===_?void 0:_.current;ot&&ct&&(ct.refIndexes||[]).forEach(function(t){var e,n=s.findIndex(function(e){return e.selfIndex===t}),i=null===(e=p.current[n])||void 0===e?void 0:e.current;if(i&&(m["left-".concat(rt)]||m["right-".concat(n)])){var r=Math.max(ot.getBoundingClientRect().height,i.getBoundingClientRect().height);et.left[rt]=Math.max(et.left[rt]||0,r),et.right[n]=Math.max(et.right[n]||0,r)}})}else{var ut=I.split(e.DEVIATION_BADGE_SEPARATOR)[2];if(ut){Z=null===(N=b.current[ut])||void 0===N?void 0:N.current,$=null===(H=A.current[ut])||void 0===H?void 0:H.current;if(Z&&$){at=Math.max(Z.getBoundingClientRect().height,$.getBoundingClientRect().height);nt[ut]=Math.max(nt[ut]||0,at)}}}}else{Object.keys(b.current).forEach(function(t){var e,n;if(K(t)){var i=null===(e=b.current[t])||void 0===e?void 0:e.current,r=null===(n=A.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),l=r.getBoundingClientRect(),o=Math.max(c.height,l.height);nt[t]=o,i.style.minHeight="".concat(o,"px"),r.style.minHeight="".concat(o,"px")}}});for(W=0;W<Math.min(d.length,s.length);W++){var Z=null===(o=f.current[W])||void 0===o?void 0:o.current,$=null===(x=p.current[W])||void 0===x?void 0:x.current;if(Z&&$){var at=Math.max(Z.getBoundingClientRect().height,$.getBoundingClientRect().height);et.left[W]=at,et.right[W]=at}}}if(v.forEach(function(t){var e,n,i=t.key,r=null===(e=g.current[i])||void 0===e?void 0:e.current,c=null===(n=h.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=tt[i];r.style.minHeight="".concat(l,"px"),c.style.minHeight="".concat(l,"px")}}),F.current||(Object.entries(et.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=f.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(et.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=p.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),C||Object.keys(nt).forEach(function(t){var e,n,i=null===(e=b.current[t])||void 0===e?void 0:e.current,r=null===(n=A.current[t])||void 0===n?void 0:n.current;if(i&&r&&nt[t]){var c=nt[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),!E){d.forEach(function(t,e){var n,i=t.continuationSourceRowId?d.findIndex(function(e){return e.comparisonRowId===t.continuationSourceRowId}):-1,r=i>=0?i:e,o=null===(n=f.current[r])||void 0===n?void 0:n.current;if(o){var u=function(t,e){if(!C)return s[e]?[e]:[];var n=(t.refIndexes||[]).map(function(t){return s.findIndex(function(e){return e.selfIndex===t})}).filter(function(t){return-1!==t});return!n.length&&s[e]?[e]:Array.from(new Set(n))}(t,e);u.forEach(function(t){var n,u,a,v,g,h,f,b,A,y,R,x,m=null===(n=p.current[t])||void 0===n?void 0:n.current;if(m){var B=o.getBoundingClientRect(),S=m.getBoundingClientRect(),E=B.right-J.left,O=S.left-J.left,L=B.top+18-J.top,_=S.top+18-J.top;if(C&&T&&I===e){var F=null!==(a=null===(u=c.current)||void 0===u?void 0:u.getBoundingClientRect().top)&&void 0!==a?a:0,N=null!==(g=null===(v=l.current)||void 0===v?void 0:v.getBoundingClientRect().top)&&void 0!==g?g:0,H=F+(null!==(f=null===(h=c.current)||void 0===h?void 0:h.clientHeight)&&void 0!==f?f:1/0),P=N+(null!==(A=null===(b=l.current)||void 0===b?void 0:b.clientHeight)&&void 0!==A?A:1/0),k=function(t,e,n){return Math.max(e,Math.min(n,t))};L=k(B.top+18,F,H)-J.top,_=k(S.top+18,N,P)-J.top}var w=D(r);w&&U.push({id:"line-".concat(r,"-").concat(t),x1:E,y1:L,x2:O,y2:_,style:w,sectionIdx:r,targetRightIdx:t,isSubSection:!1,isMappingContinuation:i>=0,hasCognitive:!!((null===(y=d[r])||void 0===y?void 0:y.cognitiveData)||(null===(R=s[t])||void 0===R?void 0:R.cognitiveData)||(null===(x=d[r])||void 0===x?void 0:x.nodeId)&&M[d[r].nodeId])})}})}})}if(!E&&T&&"string"==typeof I&&I.includes(e.DEVIATION_BADGE_SEPARATOR)){var dt=I.split(e.DEVIATION_BADGE_SEPARATOR),vt=dt[0],gt=dt[1],pt=dt[2],bt=(dt[3],"".concat(vt).concat(e.DEVIATION_BADGE_SEPARATOR).concat(gt)),At=null===(P=y.current[bt])||void 0===P?void 0:P.current,yt=null===(k=R.current[bt])||void 0===k?void 0:k.current;if(At&&yt){var mt=At.getBoundingClientRect(),St=yt.getBoundingClientRect(),Tt=mt.right-J.left,It=St.left-J.left,Ct=mt.top+mt.height/2-J.top,Et=St.top+St.height/2-J.top;if(C){var Mt=null!==(G=null===(w=c.current)||void 0===w?void 0:w.getBoundingClientRect().top)&&void 0!==G?G:0,Dt=null!==(Y=null===(V=l.current)||void 0===V?void 0:V.getBoundingClientRect().top)&&void 0!==Y?Y:0,Ot=Mt+(null!==(z=null===(j=c.current)||void 0===j?void 0:j.clientHeight)&&void 0!==z?z:1/0),Lt=Dt+(null!==(X=null===(Q=l.current)||void 0===Q?void 0:Q.clientHeight)&&void 0!==X?X:1/0),_t=function(t,e,n){return Math.max(e,Math.min(n,t))};Ct=_t(mt.top+mt.height/2,Mt,Ot)-J.top,Et=_t(St.top+St.height/2,Dt,Lt)-J.top}var Ft=null!==(q=L(vt,gt))&&void 0!==q?q:O(pt);Ft&&U.push({id:"line-subsec-".concat(bt),x1:Tt,y1:Ct,x2:It,y2:Et,style:Ft,sectionIdx:Number(pt.split("-")[0]),isSubSection:!0,subSectionKeyPath:I})}}if(it(U),u.current&&a.current){var Nt=u.current.getBoundingClientRect(),Ht=a.current.getBoundingClientRect(),Pt=(Nt.top+Nt.height/2-J.top+Ht.top+Ht.height/2-J.top)/2;lt({x1:Nt.right-J.left,x2:Ht.left-J.left,y:Pt})}else lt(null);if(S.size>0){var kt=[],wt=c.current,Gt=l.current;if(wt&&Gt){var Vt=[],Yt=wt.getBoundingClientRect().top,jt=Gt.getBoundingClientRect().top,zt=Yt+wt.clientHeight,Qt=jt+Gt.clientHeight,Xt=wt.scrollTop,qt=Gt.scrollTop,Kt=J.top,Jt=function(t,e,n){return Math.max(e,Math.min(n,t))};S.forEach(function(t){var i,r,c,l,o,u,a,v,g;if(E){var h=null,f=null,p=null;if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var b=t.split(e.DEVIATION_BADGE_SEPARATOR),A=b[0],x=b[1],m=b[2],B="".concat(A).concat(e.DEVIATION_BADGE_SEPARATOR).concat(x);h=null===(i=y.current[B])||void 0===i?void 0:i.current,p=null!==(r=L(A,x))&&void 0!==r?r:O(m),f=Number((null==m?void 0:m.split("-")[0])||0)}else f=Number(t),h=null===(c=y.current[f])||void 0===c?void 0:c.current,p=D(f);if(!h)return;var S=n.getVisibleGuidelineTargets(Gt);S.forEach(function(n,i){var r=h.getBoundingClientRect(),c=n.getBoundingClientRect(),l=r.right-J.left,o=c.left-J.left-0,u=l+75,a=r.top+r.height/2,d=c.top+c.height/2,s=a-Yt+Xt,v=d-jt+qt,g="conn-guide-".concat(t,"-").concat(i),f="";"string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)?f=(t.split(e.DEVIATION_BADGE_SEPARATOR)[2]||"").split("-").map(function(t){return Number(t)+1}).join("."):f=String(Number(t)+1);var b=String.fromCharCode(97+i),A=1===S.length?null:"".concat(f,"(").concat(b,")");Vt.push({lhsScrollY:s,rhsScrollY:v,x1:l,x2:o,containerTop:Kt,leftIdx:t,rhsArrayIdx:i,styleColor:(null==p?void 0:p.badgeBorder)||"#6366F1",styleBg:(null==p?void 0:p.badgeBg)||"#FFFFFF",styleText:(null==p?void 0:p.badgeText)||"#A16207",styleId:g,centerX:u});var y=Jt(a,Yt,zt),R=Jt(d,jt,Qt),x=y-Kt,m=R-Kt,B=xt(l,x,o,m,u,a>=Yt-4&&a<=zt+4,d>=jt-4&&d<=Qt+4);kt.push({id:g,pathD:B,style:p,leftIdx:t,rhsArrayIdx:i,x1:l,x2:o,y1:x,y2:m,centerX:u,matchLabel:A,isGuideline:!0})})}else if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var T=t.split(e.DEVIATION_BADGE_SEPARATOR),I=(A=T[0],x=T[1],m=T[2],T[3],B="".concat(A).concat(e.DEVIATION_BADGE_SEPARATOR).concat(x),null===(l=y.current[B])||void 0===l?void 0:l.current),M=null===(o=R.current[B])||void 0===o?void 0:o.current;if(!I||!M)return;var _=I.getBoundingClientRect(),F=M.getBoundingClientRect(),N=null!==(u=L(A,x))&&void 0!==u?u:O(m),H=_.right-J.left,P=F.left-J.left-0,k=H+75,w=_.top+_.height/2,G=F.top+F.height/2,V=w-Yt+Xt,Y=G-jt+qt,j="conn-subsec-".concat(B),z=((m||"").split("-").map(function(t){return Number(t)+1}).join("."),null);Vt.push({lhsScrollY:V,rhsScrollY:Y,x1:H,x2:P,containerTop:Kt,leftIdx:t,rhsArrayIdx:t,styleColor:(null==N?void 0:N.badgeBorder)||"#6366F1",styleBg:(null==N?void 0:N.badgeBg)||"#FFFFFF",styleText:(null==N?void 0:N.badgeText)||"#A16207",styleId:j,centerX:k});var Q=Jt(w,Yt,zt),X=Jt(G,jt,Qt),q=xt(H,$=Q-Kt,P,tt=X-Kt,k,w>=Yt-4&&w<=zt+4,G>=jt-4&&G<=Qt+4);kt.push({id:j,pathD:q,style:N,leftIdx:t,rhsArrayIdx:t,x1:H,x2:P,y1:$,y2:tt,matchLabel:z})}else if(C){var K=t,U=d[K];if(!(null===(g=null==U?void 0:U.refIndexes)||void 0===g?void 0:g.length))return;U.refIndexes.forEach(function(e,n){var i,r,c=s.findIndex(function(t){return t.selfIndex===e});if(-1!==c){var l=null===(i=y.current[K])||void 0===i?void 0:i.current,o=null===(r=R.current[c])||void 0===r?void 0:r.current;if(l&&o){var u=l.getBoundingClientRect(),a=o.getBoundingClientRect(),d=D(K),v=u.right-J.left,g=a.left-J.left-0,h=v+75,f=u.top+u.height/2,p=a.top+a.height/2,b=f-Yt+Xt,A=p-jt+qt,x="conn-".concat(K,"-").concat(c),m=String(Number(t)+1),B=String.fromCharCode(97+n),S=1===U.refIndexes.length?null:"".concat(m,"(").concat(B,")");Vt.push({lhsScrollY:b,rhsScrollY:A,x1:v,x2:g,containerTop:Kt,leftIdx:K,rhsArrayIdx:c,styleColor:(null==d?void 0:d.badgeBorder)||"#6366F1",styleBg:(null==d?void 0:d.badgeBg)||"#FFFFFF",styleText:(null==d?void 0:d.badgeText)||"#A16207",styleId:x,centerX:h});var T=Jt(f,Yt,zt),I=Jt(p,jt,Qt),C=T-Kt,E=I-Kt,M=xt(v,C,g,E,h,f>=Yt-4&&f<=zt+4,p>=jt-4&&p<=Qt+4);kt.push({id:x,pathD:M,style:d,leftIdx:K,rhsArrayIdx:c,x1:v,x2:g,y1:C,y2:E,matchLabel:S})}}})}else{var W=t,Z=W;I=null===(a=y.current[W])||void 0===a?void 0:a.current,M=null===(v=R.current[Z])||void 0===v?void 0:v.current;if(!I||!M)return;_=I.getBoundingClientRect(),F=M.getBoundingClientRect(),N=D(W),H=_.right-J.left,P=F.left-J.left-0,k=H+75,w=_.top+_.height/2,G=F.top+F.height/2,V=w-Yt+Xt,Y=G-jt+qt,j="conn-".concat(W,"-").concat(Z),String(Number(t)+1),z=null;Vt.push({lhsScrollY:V,rhsScrollY:Y,x1:H,x2:P,containerTop:Kt,leftIdx:W,rhsArrayIdx:Z,styleColor:(null==N?void 0:N.badgeBorder)||"#6366F1",styleBg:(null==N?void 0:N.badgeBg)||"#FFFFFF",styleText:(null==N?void 0:N.badgeText)||"#A16207",styleId:j,centerX:k});var $,tt;Q=Jt(w,Yt,zt),X=Jt(G,jt,Qt),q=xt(H,$=Q-Kt,P,tt=X-Kt,k,w>=Yt-4&&w<=zt+4,G>=jt-4&&G<=Qt+4);kt.push({id:j,pathD:q,style:N,leftIdx:W,rhsArrayIdx:Z,x1:H,x2:P,y1:$,y2:tt,matchLabel:z})}}),Rt.current=Vt}st(kt),setTimeout(function(){return Bt()},10)}else st([]),Rt.current=[],setTimeout(function(){return Bt()},10)}catch(t){console.error("Line render safe fail: ",t)}finally{ft.current=!1}}},[v,d,s,M,$,tt,D,L,C,T,I,S,m,B,E]),Bt=t.useCallback(function(){var t,e,n,i,u,a,d,s,v,g,h,f,p,b,A,y,R,x,m,B=Rt.current;if(!B.length)return null===(t=o.current["guideline-up-stroke"])||void 0===t||t.setAttribute("visibility","hidden"),null===(e=o.current["guideline-up-badge"])||void 0===e||e.setAttribute("visibility","hidden"),null===(n=o.current["guideline-down-stroke"])||void 0===n||n.setAttribute("visibility","hidden"),void(null===(i=o.current["guideline-down-badge"])||void 0===i||i.setAttribute("visibility","hidden"));if(!F.current){var S=null!==(a=null===(u=c.current)||void 0===u?void 0:u.scrollTop)&&void 0!==a?a:0,T=null!==(s=null===(d=l.current)||void 0===d?void 0:d.scrollTop)&&void 0!==s?s:0,I=null!==(g=null===(v=c.current)||void 0===v?void 0:v.clientHeight)&&void 0!==g?g:1/0,C=null!==(f=null===(h=l.current)||void 0===h?void 0:h.clientHeight)&&void 0!==f?f:1/0,E=null!==(b=null===(p=c.current)||void 0===p?void 0:p.getBoundingClientRect().top)&&void 0!==b?b:0,M=null!==(y=null===(A=l.current)||void 0===A?void 0:A.getBoundingClientRect().top)&&void 0!==y?y:0,D=E+I,O=M+C,L=null===(R=r.current)||void 0===R?void 0:R.getBoundingClientRect(),_=null!==(x=null==L?void 0:L.top)&&void 0!==x?x:0,N=null!==(m=null==L?void 0:L.height)&&void 0!==m?m:1/0,H=function(t,e,n){return Math.max(e,Math.min(n,t))},P=0,k=0,w=0,G=0,V="#6366F1",Y="#A16207",j=!1,z=0;if(B.forEach(function(t){var e=t.lhsScrollY-S+E,n=t.rhsScrollY-T+M,i=o.current[t.styleId+"-stroke"],r=o.current[t.styleId+"-bg"],c=o.current[t.styleId+"-btn"],l=o.current[t.styleId+"-number"];if(i||r){var u=H(e,E,D),a=H(n,M,O),d=u-_,s=a-_,v=e>=E-4&&e<=D+4,g=n>=M-4&&n<=O+4,h=!0;j=!0;var f=t.centerX||t.x1+75;0===w&&(w=t.x1,G=d,z=f,V=t.styleColor,t.styleBg,Y=t.styleText||"#A16207"),n<M-4?(P++,h=!1):n>O+4&&(k++,h=!1);var p=xt(t.x1,d,t.x2,s,z,v,g);i&&(h&&p?(i.setAttribute("visibility","visible"),i.setAttribute("d",p)):i.setAttribute("visibility","hidden")),r&&(h&&p?(r.setAttribute("visibility","visible"),r.setAttribute("d",p)):r.setAttribute("visibility","hidden")),c&&(v&&h?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden")),l&&(v&&h?(l.setAttribute("visibility","visible"),l.setAttribute("transform","translate(".concat(t.x2-42,", ").concat(s,")"))):l.setAttribute("visibility","hidden"))}}),j&&z>0){var Q=o.current["guideline-up-stroke"],X=o.current["guideline-up-badge"],q=o.current["guideline-up-arrow"],K=o.current["guideline-up-text"],J=o.current["guideline-up-badge-rect"];if(P>0){var U=Math.max(15,M-_+15),W=Math.min(15,Math.abs(z-w),Math.max(0,G-U)),Z="M ".concat(w,",").concat(G," L ").concat(z-W,",").concat(G," Q ").concat(z,",").concat(G," ").concat(z,",").concat(G-W," L ").concat(z,",").concat(U);null==Q||Q.setAttribute("visibility","visible"),null==Q||Q.setAttribute("d",Z),null==Q||Q.setAttribute("stroke",V),null==X||X.setAttribute("visibility","visible"),null==X||X.setAttribute("transform","translate(".concat(z,", ").concat(U,")")),q&&q.setAttribute("fill",V),K&&(K.textContent="+".concat(P),K.setAttribute("fill",Y)),J&&J.setAttribute("stroke",V)}else null==Q||Q.setAttribute("visibility","hidden"),null==X||X.setAttribute("visibility","hidden");var $=o.current["guideline-down-stroke"],tt=o.current["guideline-down-badge"],et=o.current["guideline-down-arrow"],nt=o.current["guideline-down-text"],it=o.current["guideline-down-badge-rect"];if(k>0){var rt=Math.min(N-15,O-_-15);W=Math.min(15,Math.abs(z-w),Math.max(0,rt-G)),Z="M ".concat(w,",").concat(G," L ").concat(z-W,",").concat(G," Q ").concat(z,",").concat(G," ").concat(z,",").concat(G+W," L ").concat(z,",").concat(rt);null==$||$.setAttribute("visibility","visible"),null==$||$.setAttribute("d",Z),null==$||$.setAttribute("stroke",V),null==tt||tt.setAttribute("visibility","visible"),null==tt||tt.setAttribute("transform","translate(".concat(z,", ").concat(rt,")")),et&&et.setAttribute("fill",V),nt&&(nt.textContent="+".concat(k),nt.setAttribute("fill",Y)),it&&it.setAttribute("stroke",V)}else null==$||$.setAttribute("visibility","hidden"),null==tt||tt.setAttribute("visibility","hidden")}}},[]),St=t.useCallback(function(){Rt.current.length>0&&!F.current||(null!==At.current&&clearTimeout(At.current),At.current=setTimeout(function(){j.current(),At.current=null},50))},[]),Tt=t.useCallback(function(t){if(null!==W.current&&Z.current&&Math.abs(t.currentTarget.scrollTop-W.current)<=2){var n=Z.current;W.current=null,Z.current=null,n()}if(!bt.current&&!Q.current){if(C&&X&&(N.current||S.size>0)){var i=t.currentTarget,o=c.current,u=l.current,a=i===o?u:i===u?o:null;if(i&&a){var d=function(){var t,n,i,r,c,l,o,u,a,d,s,v=k.current,g=w.current;if(null===v)return{leftAnchor:null,rightAnchor:null};if("string"==typeof v&&v.includes(e.DEVIATION_BADGE_SEPARATOR)){var h=v.split(e.DEVIATION_BADGE_SEPARATOR),m="".concat(h[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(h[1]);return{leftAnchor:(null===(t=y.current[m])||void 0===t?void 0:t.current)||(null===(n=b.current[h[2]])||void 0===n?void 0:n.current)||(null===(i=f.current[Number(h[2])])||void 0===i?void 0:i.current)||null,rightAnchor:(null===(r=R.current[m])||void 0===r?void 0:r.current)||(null===(c=A.current[h[3]])||void 0===c?void 0:c.current)||(null===(l=p.current[Number(h[3])])||void 0===l?void 0:l.current)||null}}var B=Number(v),S=null!==g?Number(g):B;return{leftAnchor:(null===(o=y.current[B])||void 0===o?void 0:o.current)||(null===(u=x.current[B])||void 0===u?void 0:u.current)||(null===(a=f.current[B])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=R.current[S])||void 0===d?void 0:d.current)||(null===(s=p.current[S])||void 0===s?void 0:s.current)||null}}(),s=d.leftAnchor,v=d.rightAnchor,g=i===o?s:v,h=i===o?v:s,m=null;if(g&&h){var B=g.getBoundingClientRect(),T=h.getBoundingClientRect(),I=a.getBoundingClientRect(),E=B.top+B.height/2;m=T.top-I.top+a.scrollTop+T.height/2-(E-I.top)}else{var M=Math.max(0,i.scrollHeight-i.clientHeight),D=Math.max(0,a.scrollHeight-a.clientHeight);m=M>0?i.scrollTop/M*D:i.scrollTop}var O=Math.max(0,a.scrollHeight-a.clientHeight);m=Math.max(0,Math.min(m,O)),Math.abs(a.scrollTop-m)>1&&(bt.current=!0,a.scrollTop=m,requestAnimationFrame(function(){bt.current=!1}))}}C||St(),pt.current||(pt.current=!0,requestAnimationFrame(function(){var t,n,i,o,u,a,d;if(N.current){var s=c.current,v=l.current;if(s&&v&&P.current){if(!H.current){var g=k.current,h=void 0;if("string"==typeof g&&g.includes(e.DEVIATION_BADGE_SEPARATOR)){var f=g.split(e.DEVIATION_BADGE_SEPARATOR),p="".concat(f[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(f[1]);h=null===(t=y.current[p])||void 0===t?void 0:t.current}else h=null===(n=y.current[g])||void 0===n?void 0:n.current;if(h){var b=h.getBoundingClientRect();H.current={badgeScreenY:b.top+b.height/2,initialScrollTop:s.scrollTop,leftTop:s.getBoundingClientRect().top,leftBottom:s.getBoundingClientRect().top+s.clientHeight,cTop:null!==(o=null===(i=r.current)||void 0===i?void 0:i.getBoundingClientRect().top)&&void 0!==o?o:0}}}if(H.current){var A=H.current,R=s.scrollTop-A.initialScrollTop,x=A.badgeScreenY-R,m=((u=x,a=A.leftTop,d=A.leftBottom,Math.max(a,Math.min(d,u)))-A.cTop).toString(),B=x>=A.leftTop-4&&x<=A.leftBottom+4;P.current.setAttribute("y1",m),P.current.setAttribute("y2",m),P.current.setAttribute("visibility",B?"visible":"hidden")}}}Bt(),pt.current=!1}))}},[Bt,C,X,S,St]);return t.useEffect(function(){j.current=mt},[mt]),t.useEffect(function(){var t=setTimeout(St,250),e=function(){return q.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==At.current&&clearTimeout(At.current),null!==z.current&&clearTimeout(z.current),window.removeEventListener("resize",e)}},[K,J,U,v,m,B,d,s,$,St,T,I,_,S]),{lines:nt,setLines:it,overallConnector:ct,setOverallConnector:lt,connectedLines:dt,setConnectedLines:st,svgDimensions:gt,cachedConnectedPositions:Rt,calculateLines:mt,calculateLinesRef:j,calculateLinesDebounced:St,handleColumnScroll:Tt}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("../CognitiveComparehelpers.js");exports.useLinesCalculator=function(n){var i=n.containerRef,r=n.leftContainerRef,c=n.rightContainerRef;n.svgContainerRef;var l=n.pathRefs,o=n.leftHeaderRef,u=n.rightHeaderRef,a=n.proposedSections,d=n.existingSections,s=n.visibleFields,v=n.leftRefs,h=n.rightRefs,g=n.sectionLeftRefs,f=n.sectionRightRefs,p=n.subSectionLeftRefs,b=n.subSectionRightRefs,A=n.lhsBadgeRefs,y=n.rhsBadgeRefs,R=n.sectionRowRefs,x=n.expandedSections,m=n.expandedSubSections,B=n.connectedSections,S=n.isSideBySide,I=n.activeSideBySideSection,T=n.maintainRelativeOrder,C=n.isGuidelineMode,E=n.cognitiveMap,M=n.getSectionCompareStyle,D=n.getSubSectionCompareStyle,O=n.getDeviationStyleByKey,L=n.isArrowVisible,_=n.isAnimatingRef,F=n.isSideBySideRef,N=n.sideBySideCacheRef,H=n.sideBySideLineRef,P=n.activeSideBySideSectionRef,k=n.activeSideBySideRightSectionRef,w=n.connectedLines,G=n.setConnectedLines,V=n.cachedConnectedPositions,Y=n.calculateLinesRef,j=n.resizeTimerRef,z=n.scrollLock,Q=n.scrollSyncLocked,X=n.handleResizeRef,q=n.activeProposed,K=n.existingRule,J=n.analysisData,U=n.pendingScrollTargetRef,W=n.pendingScrollCallbackRef,Z=n.resolvedComparisonConfig,$=n.getFieldData,tt=t.useState([]),et=tt[0],nt=tt[1],it=t.useState(null),rt=it[0],ct=it[1],lt=t.useState([]),ot=lt[0],ut=lt[1],at=null!=w?w:ot,dt=null!=G?G:ut,st=t.useState({width:0,height:0}),vt=st[0],ht=st[1],gt=t.useRef(!1),ft=t.useRef(!1),pt=t.useRef(!1),bt=t.useRef(null),At=t.useRef([]),yt=null!=V?V:At,Rt=function(t,e,n,i,r,c,l){if(Math.abs(i-e)<=1)return c&&l?"M ".concat(t,",").concat(e," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r,",").concat(e):!c&&l?"M ".concat(r,",").concat(e," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i);var o=Math.min(15,Math.abs(r-t),Math.abs(i-e)/2),u=Math.min(15,Math.abs(n-r),Math.abs(i-e)/2),a=i>e?o:-o,d=i>e?u:-u,s=n>r?u:-u;return c&&l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i):!c&&l?"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i)},xt=t.useCallback(function(){var t,n,l,R,L,F,N,H,P,k,w,G,V,Y,j,z,Q,X;if(!gt.current&&!_.current){gt.current=!0;try{if(!i.current)return;var q=function(t){var e=t.split("-"),n=e[0];if(!x[n]&&!1===T)return!1;if(T&&!x["left-".concat(n)]&&!x["right-".concat(n)]&&!x[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!m[i])return!1;return!0},K=i.current.getBoundingClientRect();ht({width:K.width,height:K.height});var J=[];if(s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!_.current){for(var U=0;U<Math.max(a.length,d.length);U++){var W=null===(t=g.current[U])||void 0===t?void 0:t.current,Z=null===(n=f.current[U])||void 0===n?void 0:n.current;W&&(W.style.height="auto",W.style.minHeight="0px"),Z&&(Z.style.height="auto",Z.style.minHeight="0px")}T||Object.keys(p.current).forEach(function(t){var e,n;if(q(t)){var i=null===(e=p.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var $={};s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),o=c.getBoundingClientRect();$[i]=Math.max(l.height,o.height)}});var tt={left:{},right:{}},et={};if(!_.current)if(T){if(S&&null!==I)if("number"==typeof I){var it=I,rt=a[it],lt=null===(L=g.current[it])||void 0===L?void 0:L.current;lt&&rt&&(rt.refIndexes||[]).forEach(function(t){var e,n=d.findIndex(function(e){return e.selfIndex===t}),i=null===(e=f.current[n])||void 0===e?void 0:e.current;if(i&&(x["left-".concat(it)]||x["right-".concat(n)])){var r=Math.max(lt.getBoundingClientRect().height,i.getBoundingClientRect().height);tt.left[it]=Math.max(tt.left[it]||0,r),tt.right[n]=Math.max(tt.right[n]||0,r)}})}else{var ot=I.split(e.DEVIATION_BADGE_SEPARATOR)[2];if(ot){W=null===(F=p.current[ot])||void 0===F?void 0:F.current,Z=null===(N=b.current[ot])||void 0===N?void 0:N.current;if(W&&Z){ut=Math.max(W.getBoundingClientRect().height,Z.getBoundingClientRect().height);et[ot]=Math.max(et[ot]||0,ut)}}}}else{Object.keys(p.current).forEach(function(t){var e,n;if(q(t)){var i=null===(e=p.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),l=r.getBoundingClientRect(),o=Math.max(c.height,l.height);et[t]=o,i.style.minHeight="".concat(o,"px"),r.style.minHeight="".concat(o,"px")}}});for(U=0;U<Math.min(a.length,d.length);U++){var W=null===(l=g.current[U])||void 0===l?void 0:l.current,Z=null===(R=f.current[U])||void 0===R?void 0:R.current;if(W&&Z){var ut=Math.max(W.getBoundingClientRect().height,Z.getBoundingClientRect().height);tt.left[U]=ut,tt.right[U]=ut}}}if(s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=$[i];r.style.minHeight="".concat(l,"px"),c.style.minHeight="".concat(l,"px")}}),_.current||(Object.entries(tt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=g.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(tt.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=f.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),T||Object.keys(et).forEach(function(t){var e,n,i=null===(e=p.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;if(i&&r&&et[t]){var c=et[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),!C){a.forEach(function(t,e){var n,i=t.continuationSourceRowId?a.findIndex(function(e){return e.comparisonRowId===t.continuationSourceRowId}):-1,l=i>=0?i:e,o=null===(n=g.current[l])||void 0===n?void 0:n.current;if(o){var u=function(t,e){if(!T)return d[e]?[e]:[];var n=(t.refIndexes||[]).map(function(t){return d.findIndex(function(e){return e.selfIndex===t})}).filter(function(t){return-1!==t});return!n.length&&d[e]?[e]:Array.from(new Set(n))}(t,e);u.forEach(function(t){var n,u,s,v,h,g,p,b,A,y,R,x,m=null===(n=f.current[t])||void 0===n?void 0:n.current;if(m){var B=o.getBoundingClientRect(),C=m.getBoundingClientRect(),D=B.right-K.left,O=C.left-K.left,L=B.top+18-K.top,_=C.top+18-K.top;if(T&&S&&I===e){var F=null!==(s=null===(u=r.current)||void 0===u?void 0:u.getBoundingClientRect().top)&&void 0!==s?s:0,N=null!==(h=null===(v=c.current)||void 0===v?void 0:v.getBoundingClientRect().top)&&void 0!==h?h:0,H=F+(null!==(p=null===(g=r.current)||void 0===g?void 0:g.clientHeight)&&void 0!==p?p:1/0),P=N+(null!==(A=null===(b=c.current)||void 0===b?void 0:b.clientHeight)&&void 0!==A?A:1/0),k=function(t,e,n){return Math.max(e,Math.min(n,t))};L=k(B.top+18,F,H)-K.top,_=k(C.top+18,N,P)-K.top}var w=M(l);w&&J.push({id:"line-".concat(l,"-").concat(t),x1:D,y1:L,x2:O,y2:_,style:w,sectionIdx:l,targetRightIdx:t,isSubSection:!1,isMappingContinuation:i>=0,hasCognitive:!!((null===(y=a[l])||void 0===y?void 0:y.cognitiveData)||(null===(R=d[t])||void 0===R?void 0:R.cognitiveData)||(null===(x=a[l])||void 0===x?void 0:x.nodeId)&&E[a[l].nodeId])})}})}})}if(!C&&S&&"string"==typeof I&&I.includes(e.DEVIATION_BADGE_SEPARATOR)){var at=I.split(e.DEVIATION_BADGE_SEPARATOR),st=at[0],vt=at[1],ft=at[2],pt=(at[3],"".concat(st).concat(e.DEVIATION_BADGE_SEPARATOR).concat(vt)),bt=null===(H=A.current[pt])||void 0===H?void 0:H.current,At=null===(P=y.current[pt])||void 0===P?void 0:P.current;if(bt&&At){var xt=bt.getBoundingClientRect(),Bt=At.getBoundingClientRect(),St=xt.right-K.left,It=Bt.left-K.left,Tt=xt.top+xt.height/2-K.top,Ct=Bt.top+Bt.height/2-K.top;if(T){var Et=null!==(w=null===(k=r.current)||void 0===k?void 0:k.getBoundingClientRect().top)&&void 0!==w?w:0,Mt=null!==(V=null===(G=c.current)||void 0===G?void 0:G.getBoundingClientRect().top)&&void 0!==V?V:0,Dt=Et+(null!==(j=null===(Y=r.current)||void 0===Y?void 0:Y.clientHeight)&&void 0!==j?j:1/0),Ot=Mt+(null!==(Q=null===(z=c.current)||void 0===z?void 0:z.clientHeight)&&void 0!==Q?Q:1/0),Lt=function(t,e,n){return Math.max(e,Math.min(n,t))};Tt=Lt(xt.top+xt.height/2,Et,Dt)-K.top,Ct=Lt(Bt.top+Bt.height/2,Mt,Ot)-K.top}var _t=null!==(X=O(st,vt))&&void 0!==X?X:D(ft);_t&&J.push({id:"line-subsec-".concat(pt),x1:St,y1:Tt,x2:It,y2:Ct,style:_t,sectionIdx:Number(ft.split("-")[0]),isSubSection:!0,subSectionKeyPath:I})}}if(nt(J),o.current&&u.current){var Ft=o.current.getBoundingClientRect(),Nt=u.current.getBoundingClientRect(),Ht=(Ft.top+Ft.height/2-K.top+Nt.top+Nt.height/2-K.top)/2;ct({x1:Ft.right-K.left,x2:Nt.left-K.left,y:Ht})}else ct(null);if(B.size>0){var Pt=[],kt=r.current,wt=c.current;if(kt&&wt){var Gt=[],Vt=kt.getBoundingClientRect().top,Yt=wt.getBoundingClientRect().top,jt=Vt+kt.clientHeight,zt=Yt+wt.clientHeight,Qt=kt.scrollTop,Xt=wt.scrollTop,qt=K.top,Kt=function(t,e,n){return Math.max(e,Math.min(n,t))};B.forEach(function(t){var n,i,r,c,l,o,u,s,v;if(C){var h=null,g=null,f=null;if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var p=t.split(e.DEVIATION_BADGE_SEPARATOR),b=p[0],R=p[1],x=p[2],m="".concat(b).concat(e.DEVIATION_BADGE_SEPARATOR).concat(R);h=null===(n=A.current[m])||void 0===n?void 0:n.current,f=null!==(i=O(b,R))&&void 0!==i?i:D(x),g=Number((null==x?void 0:x.split("-")[0])||0)}else g=Number(t),h=null===(r=A.current[g])||void 0===r?void 0:r.current,f=M(g);if(!h)return;var B=document.querySelectorAll('[id^="guideline-target-"]');B.forEach(function(n,i){var r=h.getBoundingClientRect(),c=n.getBoundingClientRect(),l=r.right-K.left,o=c.left-K.left-0,u=l+75,a=r.top+r.height/2,d=c.top+c.height/2,s=a-Vt+Qt,v=d-Yt+Xt,g="conn-guide-".concat(t,"-").concat(i),p="";"string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)?p=(t.split(e.DEVIATION_BADGE_SEPARATOR)[2]||"").split("-").map(function(t){return Number(t)+1}).join("."):p=String(Number(t)+1);var b=String.fromCharCode(97+i),A=1===B.length?null:"".concat(p,"(").concat(b,")");Gt.push({lhsScrollY:s,rhsScrollY:v,x1:l,x2:o,containerTop:qt,leftIdx:t,rhsArrayIdx:i,styleColor:(null==f?void 0:f.badgeBorder)||"#6366F1",styleBg:(null==f?void 0:f.badgeBg)||"#FFFFFF",styleText:(null==f?void 0:f.badgeText)||"#A16207",styleId:g,centerX:u});var y=Kt(a,Vt,jt),R=Kt(d,Yt,zt),x=y-qt,m=R-qt,S=Rt(l,x,o,m,u,a>=Vt-4&&a<=jt+4,d>=Yt-4&&d<=zt+4);Pt.push({id:g,pathD:S,style:f,leftIdx:t,rhsArrayIdx:i,x1:l,x2:o,y1:x,y2:m,centerX:u,matchLabel:A,isGuideline:!0})})}else if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var S=t.split(e.DEVIATION_BADGE_SEPARATOR),I=(b=S[0],R=S[1],x=S[2],S[3],m="".concat(b).concat(e.DEVIATION_BADGE_SEPARATOR).concat(R),null===(c=A.current[m])||void 0===c?void 0:c.current),E=null===(l=y.current[m])||void 0===l?void 0:l.current;if(!I||!E)return;var L=I.getBoundingClientRect(),_=E.getBoundingClientRect(),F=null!==(o=O(b,R))&&void 0!==o?o:D(x),N=L.right-K.left,H=_.left-K.left-0,P=N+75,k=L.top+L.height/2,w=_.top+_.height/2,G=k-Vt+Qt,V=w-Yt+Xt,Y="conn-subsec-".concat(m),j=((x||"").split("-").map(function(t){return Number(t)+1}).join("."),null);Gt.push({lhsScrollY:G,rhsScrollY:V,x1:N,x2:H,containerTop:qt,leftIdx:t,rhsArrayIdx:t,styleColor:(null==F?void 0:F.badgeBorder)||"#6366F1",styleBg:(null==F?void 0:F.badgeBg)||"#FFFFFF",styleText:(null==F?void 0:F.badgeText)||"#A16207",styleId:Y,centerX:P});var z=Kt(k,Vt,jt),Q=Kt(w,Yt,zt),X=Rt(N,Z=z-qt,H,$=Q-qt,P,k>=Vt-4&&k<=jt+4,w>=Yt-4&&w<=zt+4);Pt.push({id:Y,pathD:X,style:F,leftIdx:t,rhsArrayIdx:t,x1:N,x2:H,y1:Z,y2:$,matchLabel:j})}else if(T){var q=t,J=a[q];if(!(null===(v=null==J?void 0:J.refIndexes)||void 0===v?void 0:v.length))return;J.refIndexes.forEach(function(e,n){var i,r,c=d.findIndex(function(t){return t.selfIndex===e});if(-1!==c){var l=null===(i=A.current[q])||void 0===i?void 0:i.current,o=null===(r=y.current[c])||void 0===r?void 0:r.current;if(l&&o){var u=l.getBoundingClientRect(),a=o.getBoundingClientRect(),s=M(q),v=u.right-K.left,h=a.left-K.left-0,g=v+75,f=u.top+u.height/2,p=a.top+a.height/2,b=f-Vt+Qt,R=p-Yt+Xt,x="conn-".concat(q,"-").concat(c),m=String(Number(t)+1),B=String.fromCharCode(97+n),S=1===J.refIndexes.length?null:"".concat(m,"(").concat(B,")");Gt.push({lhsScrollY:b,rhsScrollY:R,x1:v,x2:h,containerTop:qt,leftIdx:q,rhsArrayIdx:c,styleColor:(null==s?void 0:s.badgeBorder)||"#6366F1",styleBg:(null==s?void 0:s.badgeBg)||"#FFFFFF",styleText:(null==s?void 0:s.badgeText)||"#A16207",styleId:x,centerX:g});var I=Kt(f,Vt,jt),T=Kt(p,Yt,zt),C=I-qt,E=T-qt,D=Rt(v,C,h,E,g,f>=Vt-4&&f<=jt+4,p>=Yt-4&&p<=zt+4);Pt.push({id:x,pathD:D,style:s,leftIdx:q,rhsArrayIdx:c,x1:v,x2:h,y1:C,y2:E,matchLabel:S})}}})}else{var U=t,W=U;I=null===(u=A.current[U])||void 0===u?void 0:u.current,E=null===(s=y.current[W])||void 0===s?void 0:s.current;if(!I||!E)return;L=I.getBoundingClientRect(),_=E.getBoundingClientRect(),F=M(U),N=L.right-K.left,H=_.left-K.left-0,P=N+75,k=L.top+L.height/2,w=_.top+_.height/2,G=k-Vt+Qt,V=w-Yt+Xt,Y="conn-".concat(U,"-").concat(W),String(Number(t)+1),j=null;Gt.push({lhsScrollY:G,rhsScrollY:V,x1:N,x2:H,containerTop:qt,leftIdx:U,rhsArrayIdx:W,styleColor:(null==F?void 0:F.badgeBorder)||"#6366F1",styleBg:(null==F?void 0:F.badgeBg)||"#FFFFFF",styleText:(null==F?void 0:F.badgeText)||"#A16207",styleId:Y,centerX:P});var Z,$;z=Kt(k,Vt,jt),Q=Kt(w,Yt,zt),X=Rt(N,Z=z-qt,H,$=Q-qt,P,k>=Vt-4&&k<=jt+4,w>=Yt-4&&w<=zt+4);Pt.push({id:Y,pathD:X,style:F,leftIdx:U,rhsArrayIdx:W,x1:N,x2:H,y1:Z,y2:$,matchLabel:j})}}),yt.current=Gt}dt(Pt),setTimeout(function(){return mt()},10)}else dt([]),yt.current=[],setTimeout(function(){return mt()},10)}catch(t){console.error("Line render safe fail: ",t)}finally{gt.current=!1}}},[s,a,d,E,Z,$,M,O,T,S,I,B,x,m,C]),mt=t.useCallback(function(){var t,e,n,o,u,a,d,s,v,h,g,f,p,b,A,y,R,x,m,B=yt.current;if(!B.length)return null===(t=l.current["guideline-up-stroke"])||void 0===t||t.setAttribute("visibility","hidden"),null===(e=l.current["guideline-up-badge"])||void 0===e||e.setAttribute("visibility","hidden"),null===(n=l.current["guideline-down-stroke"])||void 0===n||n.setAttribute("visibility","hidden"),void(null===(o=l.current["guideline-down-badge"])||void 0===o||o.setAttribute("visibility","hidden"));if(!_.current){var S=null!==(a=null===(u=r.current)||void 0===u?void 0:u.scrollTop)&&void 0!==a?a:0,I=null!==(s=null===(d=c.current)||void 0===d?void 0:d.scrollTop)&&void 0!==s?s:0,T=null!==(h=null===(v=r.current)||void 0===v?void 0:v.clientHeight)&&void 0!==h?h:1/0,C=null!==(f=null===(g=c.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0,E=null!==(b=null===(p=r.current)||void 0===p?void 0:p.getBoundingClientRect().top)&&void 0!==b?b:0,M=null!==(y=null===(A=c.current)||void 0===A?void 0:A.getBoundingClientRect().top)&&void 0!==y?y:0,D=E+T,O=M+C,L=null===(R=i.current)||void 0===R?void 0:R.getBoundingClientRect(),F=null!==(x=null==L?void 0:L.top)&&void 0!==x?x:0,N=null!==(m=null==L?void 0:L.height)&&void 0!==m?m:1/0,H=function(t,e,n){return Math.max(e,Math.min(n,t))},P=0,k=0,w=0,G=0,V="#6366F1",Y="#A16207",j=!1,z=0;if(B.forEach(function(t){var e=t.lhsScrollY-S+E,n=t.rhsScrollY-I+M,i=l.current[t.styleId+"-stroke"],r=l.current[t.styleId+"-bg"],c=l.current[t.styleId+"-btn"],o=l.current[t.styleId+"-number"];if(i||r){var u=H(e,E,D),a=H(n,M,O),d=u-F,s=a-F,v=e>=E-4&&e<=D+4,h=n>=M-4&&n<=O+4,g=!0;j=!0;var f=t.centerX||t.x1+75;0===w&&(w=t.x1,G=d,z=f,V=t.styleColor,t.styleBg,Y=t.styleText||"#A16207"),n<M-4?(P++,g=!1):n>O+4&&(k++,g=!1);var p=Rt(t.x1,d,t.x2,s,z,v,h);i&&(g&&p?(i.setAttribute("visibility","visible"),i.setAttribute("d",p)):i.setAttribute("visibility","hidden")),r&&(g&&p?(r.setAttribute("visibility","visible"),r.setAttribute("d",p)):r.setAttribute("visibility","hidden")),c&&(v&&g?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden")),o&&(v&&g?(o.setAttribute("visibility","visible"),o.setAttribute("transform","translate(".concat(t.x2-42,", ").concat(s,")"))):o.setAttribute("visibility","hidden"))}}),j&&z>0){var Q=l.current["guideline-up-stroke"],X=l.current["guideline-up-badge"],q=l.current["guideline-up-arrow"],K=l.current["guideline-up-text"],J=l.current["guideline-up-badge-rect"];if(P>0){var U=Math.max(15,M-F+15),W=Math.min(15,Math.abs(z-w),Math.max(0,G-U)),Z="M ".concat(w,",").concat(G," L ").concat(z-W,",").concat(G," Q ").concat(z,",").concat(G," ").concat(z,",").concat(G-W," L ").concat(z,",").concat(U);null==Q||Q.setAttribute("visibility","visible"),null==Q||Q.setAttribute("d",Z),null==Q||Q.setAttribute("stroke",V),null==X||X.setAttribute("visibility","visible"),null==X||X.setAttribute("transform","translate(".concat(z,", ").concat(U,")")),q&&q.setAttribute("fill",V),K&&(K.textContent="+".concat(P),K.setAttribute("fill",Y)),J&&J.setAttribute("stroke",V)}else null==Q||Q.setAttribute("visibility","hidden"),null==X||X.setAttribute("visibility","hidden");var $=l.current["guideline-down-stroke"],tt=l.current["guideline-down-badge"],et=l.current["guideline-down-arrow"],nt=l.current["guideline-down-text"],it=l.current["guideline-down-badge-rect"];if(k>0){var rt=Math.min(N-15,O-F-15);W=Math.min(15,Math.abs(z-w),Math.max(0,rt-G)),Z="M ".concat(w,",").concat(G," L ").concat(z-W,",").concat(G," Q ").concat(z,",").concat(G," ").concat(z,",").concat(G+W," L ").concat(z,",").concat(rt);null==$||$.setAttribute("visibility","visible"),null==$||$.setAttribute("d",Z),null==$||$.setAttribute("stroke",V),null==tt||tt.setAttribute("visibility","visible"),null==tt||tt.setAttribute("transform","translate(".concat(z,", ").concat(rt,")")),et&&et.setAttribute("fill",V),nt&&(nt.textContent="+".concat(k),nt.setAttribute("fill",Y)),it&&it.setAttribute("stroke",V)}else null==$||$.setAttribute("visibility","hidden"),null==tt||tt.setAttribute("visibility","hidden")}}},[]),Bt=t.useCallback(function(){yt.current.length>0&&!_.current||(null!==bt.current&&clearTimeout(bt.current),bt.current=setTimeout(function(){Y.current(),bt.current=null},50))},[]),St=t.useCallback(function(t){if(null!==U.current&&W.current&&Math.abs(t.currentTarget.scrollTop-U.current)<=2){var n=W.current;U.current=null,W.current=null,n()}if(!pt.current&&!z.current){if(T&&Q&&(F.current||B.size>0)){var l=t.currentTarget,o=r.current,u=c.current,a=l===o?u:l===u?o:null;if(l&&a){var d=function(){var t,n,i,r,c,l,o,u,a,d,s,v=P.current,h=k.current;if(null===v)return{leftAnchor:null,rightAnchor:null};if("string"==typeof v&&v.includes(e.DEVIATION_BADGE_SEPARATOR)){var x=v.split(e.DEVIATION_BADGE_SEPARATOR),m="".concat(x[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(x[1]);return{leftAnchor:(null===(t=A.current[m])||void 0===t?void 0:t.current)||(null===(n=p.current[x[2]])||void 0===n?void 0:n.current)||(null===(i=g.current[Number(x[2])])||void 0===i?void 0:i.current)||null,rightAnchor:(null===(r=y.current[m])||void 0===r?void 0:r.current)||(null===(c=b.current[x[3]])||void 0===c?void 0:c.current)||(null===(l=f.current[Number(x[3])])||void 0===l?void 0:l.current)||null}}var B=Number(v),S=null!==h?Number(h):B;return{leftAnchor:(null===(o=A.current[B])||void 0===o?void 0:o.current)||(null===(u=R.current[B])||void 0===u?void 0:u.current)||(null===(a=g.current[B])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=y.current[S])||void 0===d?void 0:d.current)||(null===(s=f.current[S])||void 0===s?void 0:s.current)||null}}(),s=d.leftAnchor,v=d.rightAnchor,h=l===o?s:v,x=l===o?v:s,m=null;if(h&&x){var S=h.getBoundingClientRect(),I=x.getBoundingClientRect(),C=a.getBoundingClientRect(),E=S.top+S.height/2;m=I.top-C.top+a.scrollTop+I.height/2-(E-C.top)}else{var M=Math.max(0,l.scrollHeight-l.clientHeight),D=Math.max(0,a.scrollHeight-a.clientHeight);m=M>0?l.scrollTop/M*D:l.scrollTop}var O=Math.max(0,a.scrollHeight-a.clientHeight);m=Math.max(0,Math.min(m,O)),Math.abs(a.scrollTop-m)>1&&(pt.current=!0,a.scrollTop=m,requestAnimationFrame(function(){pt.current=!1}))}}T||Bt(),ft.current||(ft.current=!0,requestAnimationFrame(function(){var t,n,l,o,u,a,d;if(F.current){var s=r.current,v=c.current;if(s&&v&&H.current){if(!N.current){var h=P.current,g=void 0;if("string"==typeof h&&h.includes(e.DEVIATION_BADGE_SEPARATOR)){var f=h.split(e.DEVIATION_BADGE_SEPARATOR),p="".concat(f[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(f[1]);g=null===(t=A.current[p])||void 0===t?void 0:t.current}else g=null===(n=A.current[h])||void 0===n?void 0:n.current;if(g){var b=g.getBoundingClientRect();N.current={badgeScreenY:b.top+b.height/2,initialScrollTop:s.scrollTop,leftTop:s.getBoundingClientRect().top,leftBottom:s.getBoundingClientRect().top+s.clientHeight,cTop:null!==(o=null===(l=i.current)||void 0===l?void 0:l.getBoundingClientRect().top)&&void 0!==o?o:0}}}if(N.current){var y=N.current,R=s.scrollTop-y.initialScrollTop,x=y.badgeScreenY-R,m=((u=x,a=y.leftTop,d=y.leftBottom,Math.max(a,Math.min(d,u)))-y.cTop).toString(),B=x>=y.leftTop-4&&x<=y.leftBottom+4;H.current.setAttribute("y1",m),H.current.setAttribute("y2",m),H.current.setAttribute("visibility",B?"visible":"hidden")}}}mt(),ft.current=!1}))}},[mt,T,Q,B,Bt]);return t.useEffect(function(){Y.current=xt},[xt]),t.useEffect(function(){var t=setTimeout(Bt,250),e=function(){return X.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==bt.current&&clearTimeout(bt.current),null!==j.current&&clearTimeout(j.current),window.removeEventListener("resize",e)}},[q,K,J,s,x,m,a,d,Z,Bt,S,I,L,B]),{lines:et,setLines:nt,overallConnector:rt,setOverallConnector:ct,connectedLines:at,setConnectedLines:dt,svgDimensions:vt,cachedConnectedPositions:yt,calculateLines:xt,calculateLinesRef:Y,calculateLinesDebounced:Bt,handleColumnScroll:St}};
2
2
  //# sourceMappingURL=useLinesCalculator.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("../CognitiveComparehelpers.js"),t=require("../Guidelines/utils/guidelineTargets.js");exports.useSideBySide=function(r){var i=r.isGuidelineMode,l=r.maintainRelativeOrder,u=r.proposedSections,o=r.existingSections,c=r.leftContainerRef,s=r.rightContainerRef,d=r.scrollContainerRef,a=r.sectionLeftRefs,v=r.sectionRightRefs,f=r.subSectionLeftRefs,p=r.subSectionRightRefs,g=r.lhsBadgeRefs,R=r.rhsBadgeRefs,S=r.sectionRowRefs,h=r.sectionRightRowRefs,T=r.rhsTopSpacerRef,A=r.rhsBottomSpacerRef,y=r.lhsTopSpacerRef,B=r.lhsBottomSpacerRef,m=r.calculateLinesRef,E=r.setConnectedSections,x=r.setConnectedLines,C=r.cachedConnectedPositions,I=r.closeMoreFunctionsPopup,O=r.setErrorToast;r.moreFunctions,r.closeSummaryPopup;var _=e.useState(!1),b=_[0],D=_[1],N=e.useState(!1),P=N[0],G=N[1],V=e.useState(!1),q=V[0],w=V[1],L=e.useState(!1),F=L[0],H=L[1],M=e.useState(null),k=M[0],j=M[1],z=e.useRef(!1),J=e.useRef(null),K=e.useRef(!1),Q=e.useRef(null),U=e.useRef(null),W=e.useRef(null),X=e.useRef(new Set),Y=function(){X.current.forEach(function(e){n.resetClauseHighlight(e)}),X.current.clear()},Z=function(e,t,r){var i,l,u,o,d,T,A,y,B,m,E,x,C=null,I=null,O=null,_=null,b=null,D=null,N=function(e,n){if(!e||!n)return!0;var t=e.getBoundingClientRect(),r=n.getBoundingClientRect();return t.bottom>=r.top&&t.top<=r.bottom};if(e){var P=t.split(n.DEVIATION_BADGE_SEPARATOR),G="".concat(P[0]).concat(n.DEVIATION_BADGE_SEPARATOR).concat(P[1]);C=(null===(i=f.current[P[2]])||void 0===i?void 0:i.current)||(null===(l=a.current[Number(P[2])])||void 0===l?void 0:l.current)||null,I=(null===(u=p.current[P[3]])||void 0===u?void 0:u.current)||(null===(o=v.current[Number(P[3])])||void 0===o?void 0:o.current)||null,O=(null===(d=g.current[G])||void 0===d?void 0:d.current)||C,_=(null===(T=R.current[G])||void 0===T?void 0:T.current)||I}else{var V=Number(t),q=null!==r?Number(r):V;C=(null===(A=a.current[V])||void 0===A?void 0:A.current)||null,I=(null===(y=v.current[q])||void 0===y?void 0:y.current)||null,b=(null===(B=g.current[V])||void 0===B?void 0:B.current)||null,D=(null===(m=R.current[q])||void 0===m?void 0:m.current)||null,O=b||(null===(E=S.current[V])||void 0===E?void 0:E.current)||C,_=D||(null===(x=h.current[q])||void 0===x?void 0:x.current)||I}if(C&&(C.style.paddingTop="0px"),I&&(I.style.paddingTop="0px"),e||(b&&(b.style.marginTop="0px"),D&&(D.style.marginTop="0px")),!e&&b&&D){var w=c.current,L=s.current;if(!N(b,w)||!N(D,L))return;var F=b.getBoundingClientRect(),H=D.getBoundingClientRect(),M=F.top-H.top;if(Math.abs(M)>32)return;M>0&&(D.style.marginTop="".concat(M,"px"))}else if(O&&_&&C&&I){F=O.getBoundingClientRect(),H=_.getBoundingClientRect();(M=F.top-H.top)>0&&(I.style.paddingTop="".concat(M,"px"))}},$=e.useCallback(function(){var e,t,r,i,l,u,o,c,s=Q.current,d=U.current;if(null!==s)if("string"==typeof s&&s.includes(n.DEVIATION_BADGE_SEPARATOR)){var S=s.split(n.DEVIATION_BADGE_SEPARATOR),h=(null===(e=f.current[S[2]])||void 0===e?void 0:e.current)||(null===(t=a.current[Number(S[2])])||void 0===t?void 0:t.current)||null,m=(null===(r=p.current[S[3]])||void 0===r?void 0:r.current)||(null===(i=v.current[Number(S[3])])||void 0===i?void 0:i.current)||null;h&&(h.style.paddingTop="0px"),m&&(m.style.paddingTop="0px")}else{h=(null===(l=a.current[s])||void 0===l?void 0:l.current)||null,m=(null===(u=v.current[null!=d?d:s])||void 0===u?void 0:u.current)||null;h&&(h.style.paddingTop="0px"),m&&(m.style.paddingTop="0px");var E=(null===(o=g.current[s])||void 0===o?void 0:o.current)||null,x=(null===(c=R.current[null!=d?d:s])||void 0===c?void 0:c.current)||null;E&&(E.style.marginTop="0px"),x&&(x.style.marginTop="0px")}T.current&&(T.current.style.height="0px"),A.current&&(A.current.style.height="0px"),y.current&&(y.current.style.height="0px"),B.current&&(B.current.style.height="0px")},[]);e.useEffect(function(){K.current=b},[b]),e.useEffect(function(){Q.current=k},[k]);var ee=e.useCallback(function(){Y(),D(!1),K.current=!1,J.current=null,$(),j(null),Q.current=null,U.current=null,G(!1),H(!1)},[$]),ne=e.useCallback(function(e,r,f){var p,_,N=null===(p=null==f?void 0:f.toggleIfSame)||void 0===p||p,P=null==f?void 0:f.onReady,V=null!==(_=null==f?void 0:f.sourceSide)&&void 0!==_?_:"left";if(I(),null!=e)if(!r||i){Y();var q=b&&k===e;b&&null!==k&&$(),q&&N?ee():(E(new Set([e])),x([]),C.current=[],H(!0),z.current=!0,j(e),Q.current=e,D(!0),K.current=!0,G(!1),T.current&&(T.current.style.height="0px"),A.current&&(A.current.style.height="0px"),y.current&&(y.current.style.height="0px"),B.current&&(B.current.style.height="0px"),requestAnimationFrame(function(){var r=function(){var r,f,p,y,B,E,x,C,I,O,_,b="string"==typeof e&&e.includes(n.DEVIATION_BADGE_SEPARATOR),D=null,N=null,q=null;if(i){if(b){var w=e.split(n.DEVIATION_BADGE_SEPARATOR),L="".concat(w[0]).concat(n.DEVIATION_BADGE_SEPARATOR).concat(w[1]);D=(null===(r=g.current[L])||void 0===r?void 0:r.current)||null}else D=(null===(f=a.current[e])||void 0===f?void 0:f.current)||(null===(p=S.current[e])||void 0===p?void 0:p.current)||null;N=t.getVisibleGuidelineTargets(s.current)[0]||null,q=N?e:null}else if(b){w=e.split(n.DEVIATION_BADGE_SEPARATOR),L="".concat(w[0]).concat(n.DEVIATION_BADGE_SEPARATOR).concat(w[1]);D=(null===(y=g.current[L])||void 0===y?void 0:y.current)||null,N=(null===(B=R.current[L])||void 0===B?void 0:B.current)||null,q=N?e:null}else if(D=(null===(E=a.current[e])||void 0===E?void 0:E.current)||(null===(x=S.current[e])||void 0===x?void 0:x.current)||null,l){var F=u[e],M=(null==F?void 0:F.refIndexes)||[];if(M.length>0){var k=M[0],j=o.findIndex(function(e){return e.selfIndex===k});-1!==j&&(N=(null===(O=v.current[j])||void 0===O?void 0:O.current)||(null===(_=h.current[j])||void 0===_?void 0:_.current)||null,q=j)}}else N=(null===(C=v.current[e])||void 0===C?void 0:C.current)||(null===(I=h.current[e])||void 0===I?void 0:I.current)||null,q=N?e:null;U.current=q;var J=c.current,K=s.current,Q=function(){Z(b,e,q),G(!0),m.current&&m.current(),z.current=!1,"right"===V&&K?K.dispatchEvent(new Event("scroll")):J&&J.dispatchEvent(new Event("scroll")),H(!1),null==P||P()};if(!D||!J)return z.current=!1,H(!1),void(null==P||P());if(N&&K){if(!l){var W=0;W="right"===V?N?N.getBoundingClientRect().top:0:D?D.getBoundingClientRect().top:0;var X=d.current,Y=(null==X?void 0:X.getBoundingClientRect().top)||0,$=X?X.scrollTop+W-Y-150:0;return X?void n.smoothScrollTo(X,$,200,Q):void Q()}var ee=D.getBoundingClientRect().top-J.getBoundingClientRect().top+J.scrollTop,ne=N.getBoundingClientRect().top-K.getBoundingClientRect().top+K.scrollTop,te=200;if("left"===V){var re=ne-(ee-J.scrollTop);re<0&&T.current&&!i&&(T.current.style.height="".concat(Math.abs(re),"px")),requestAnimationFrame(function(){var e,t=K.scrollHeight-K.clientHeight;if(re<0)e=0;else{if(re>t){var r=re-t;return A.current&&!i&&(A.current.style.height="".concat(r+150,"px")),void requestAnimationFrame(function(){n.smoothScrollTo(K,re,te,Q)})}e=re}n.smoothScrollTo(K,e,te,Q)})}else{var ie=ee-(ne-K.scrollTop);requestAnimationFrame(function(){var e,t=J.scrollHeight-J.clientHeight;if(ie<0)e=0;else{if(ie>t)return void requestAnimationFrame(function(){return n.smoothScrollTo(J,t,te,Q)});e=ie}n.smoothScrollTo(J,e,te,Q)})}}else Q()};i?setTimeout(r,100):r()}))}else O("No counterpart exists for this section.")},[k,I,o,b,l,u,$,ee,i]);return{isSideBySide:b,setIsSideBySide:D,isArrowVisible:P,setIsArrowVisible:G,isResizing:q,setIsResizing:w,isSideBySideLoading:F,setIsSideBySideLoading:H,activeSideBySideSection:k,setActiveSideBySideSection:j,scrollLock:z,sideBySideCacheRef:J,isSideBySideRef:K,activeSideBySideSectionRef:Q,activeSideBySideRightSectionRef:U,sideBySideLineRef:W,highlightedClauseRefs:X,clearClauseHighlight:Y,applyAlignmentPadding:Z,resetSideBySide:ee,activateSideBySide:ne}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("../CognitiveComparehelpers.js");exports.useSideBySide=function(t){var r=t.isGuidelineMode,i=t.maintainRelativeOrder,l=t.proposedSections,u=t.existingSections,o=t.leftContainerRef,c=t.rightContainerRef,s=t.scrollContainerRef,d=t.sectionLeftRefs,a=t.sectionRightRefs,v=t.subSectionLeftRefs,f=t.subSectionRightRefs,p=t.lhsBadgeRefs,g=t.rhsBadgeRefs,R=t.sectionRowRefs,S=t.sectionRightRowRefs,h=t.rhsTopSpacerRef,A=t.rhsBottomSpacerRef,T=t.lhsTopSpacerRef,y=t.lhsBottomSpacerRef,B=t.calculateLinesRef,m=t.setConnectedSections,E=t.setConnectedLines,x=t.cachedConnectedPositions,C=t.closeMoreFunctionsPopup,I=t.setErrorToast;t.moreFunctions,t.closeSummaryPopup;var O=e.useState(!1),_=O[0],b=O[1],D=e.useState(!1),N=D[0],P=D[1],V=e.useState(!1),G=V[0],w=V[1],L=e.useState(!1),q=L[0],F=L[1],H=e.useState(null),M=H[0],k=H[1],j=e.useRef(!1),z=e.useRef(null),J=e.useRef(!1),K=e.useRef(null),Q=e.useRef(null),U=e.useRef(null),W=e.useRef(new Set),X=function(){W.current.forEach(function(e){n.resetClauseHighlight(e)}),W.current.clear()},Y=function(e,t,r){var i,l,u,s,h,A,T,y,B,m,E,x,C=null,I=null,O=null,_=null,b=null,D=null,N=function(e,n){if(!e||!n)return!0;var t=e.getBoundingClientRect(),r=n.getBoundingClientRect();return t.bottom>=r.top&&t.top<=r.bottom};if(e){var P=t.split(n.DEVIATION_BADGE_SEPARATOR),V="".concat(P[0]).concat(n.DEVIATION_BADGE_SEPARATOR).concat(P[1]);C=(null===(i=v.current[P[2]])||void 0===i?void 0:i.current)||(null===(l=d.current[Number(P[2])])||void 0===l?void 0:l.current)||null,I=(null===(u=f.current[P[3]])||void 0===u?void 0:u.current)||(null===(s=a.current[Number(P[3])])||void 0===s?void 0:s.current)||null,O=(null===(h=p.current[V])||void 0===h?void 0:h.current)||C,_=(null===(A=g.current[V])||void 0===A?void 0:A.current)||I}else{var G=Number(t),w=null!==r?Number(r):G;C=(null===(T=d.current[G])||void 0===T?void 0:T.current)||null,I=(null===(y=a.current[w])||void 0===y?void 0:y.current)||null,b=(null===(B=p.current[G])||void 0===B?void 0:B.current)||null,D=(null===(m=g.current[w])||void 0===m?void 0:m.current)||null,O=b||(null===(E=R.current[G])||void 0===E?void 0:E.current)||C,_=D||(null===(x=S.current[w])||void 0===x?void 0:x.current)||I}if(C&&(C.style.paddingTop="0px"),I&&(I.style.paddingTop="0px"),e||(b&&(b.style.marginTop="0px"),D&&(D.style.marginTop="0px")),!e&&b&&D){var L=o.current,q=c.current;if(!N(b,L)||!N(D,q))return;var F=b.getBoundingClientRect(),H=D.getBoundingClientRect(),M=F.top-H.top;if(Math.abs(M)>32)return;M>0&&(D.style.marginTop="".concat(M,"px"))}else if(O&&_&&C&&I){F=O.getBoundingClientRect(),H=_.getBoundingClientRect();(M=F.top-H.top)>0&&(I.style.paddingTop="".concat(M,"px"))}},Z=e.useCallback(function(){var e,t,r,i,l,u,o,c,s=K.current,R=Q.current;if(null!==s)if("string"==typeof s&&s.includes(n.DEVIATION_BADGE_SEPARATOR)){var S=s.split(n.DEVIATION_BADGE_SEPARATOR),B=(null===(e=v.current[S[2]])||void 0===e?void 0:e.current)||(null===(t=d.current[Number(S[2])])||void 0===t?void 0:t.current)||null,m=(null===(r=f.current[S[3]])||void 0===r?void 0:r.current)||(null===(i=a.current[Number(S[3])])||void 0===i?void 0:i.current)||null;B&&(B.style.paddingTop="0px"),m&&(m.style.paddingTop="0px")}else{B=(null===(l=d.current[s])||void 0===l?void 0:l.current)||null,m=(null===(u=a.current[null!=R?R:s])||void 0===u?void 0:u.current)||null;B&&(B.style.paddingTop="0px"),m&&(m.style.paddingTop="0px");var E=(null===(o=p.current[s])||void 0===o?void 0:o.current)||null,x=(null===(c=g.current[null!=R?R:s])||void 0===c?void 0:c.current)||null;E&&(E.style.marginTop="0px"),x&&(x.style.marginTop="0px")}h.current&&(h.current.style.height="0px"),A.current&&(A.current.style.height="0px"),T.current&&(T.current.style.height="0px"),y.current&&(y.current.style.height="0px")},[]);e.useEffect(function(){J.current=_},[_]),e.useEffect(function(){K.current=M},[M]);var $=e.useCallback(function(){X(),b(!1),J.current=!1,z.current=null,Z(),k(null),K.current=null,Q.current=null,P(!1),F(!1)},[Z]),ee=e.useCallback(function(e,t,v){var f,O,D=null===(f=null==v?void 0:v.toggleIfSame)||void 0===f||f,N=null==v?void 0:v.onReady,V=null!==(O=null==v?void 0:v.sourceSide)&&void 0!==O?O:"left";if(C(),null!=e)if(!t||r){X();var G=_&&M===e;_&&null!==M&&Z(),G&&D?$():(m(new Set([e])),E([]),x.current=[],F(!0),j.current=!0,k(e),K.current=e,b(!0),J.current=!0,P(!1),h.current&&(h.current.style.height="0px"),A.current&&(A.current.style.height="0px"),T.current&&(T.current.style.height="0px"),y.current&&(y.current.style.height="0px"),requestAnimationFrame(function(){var t=function(){var t,v,f,T,y,m,E,x,C,I,O,_="string"==typeof e&&e.includes(n.DEVIATION_BADGE_SEPARATOR),b=null,D=null,G=null;if(r){if(_){var w=e.split(n.DEVIATION_BADGE_SEPARATOR),L="".concat(w[0]).concat(n.DEVIATION_BADGE_SEPARATOR).concat(w[1]);b=(null===(t=p.current[L])||void 0===t?void 0:t.current)||null}else b=(null===(v=d.current[e])||void 0===v?void 0:v.current)||(null===(f=R.current[e])||void 0===f?void 0:f.current)||null;D=document.getElementById("guideline-target-0"),G=D?e:null}else if(_){w=e.split(n.DEVIATION_BADGE_SEPARATOR),L="".concat(w[0]).concat(n.DEVIATION_BADGE_SEPARATOR).concat(w[1]);b=(null===(T=p.current[L])||void 0===T?void 0:T.current)||null,D=(null===(y=g.current[L])||void 0===y?void 0:y.current)||null,G=D?e:null}else if(b=(null===(m=d.current[e])||void 0===m?void 0:m.current)||(null===(E=R.current[e])||void 0===E?void 0:E.current)||null,i){var q=l[e],H=(null==q?void 0:q.refIndexes)||[];if(H.length>0){var M=H[0],k=u.findIndex(function(e){return e.selfIndex===M});-1!==k&&(D=(null===(I=a.current[k])||void 0===I?void 0:I.current)||(null===(O=S.current[k])||void 0===O?void 0:O.current)||null,G=k)}}else D=(null===(x=a.current[e])||void 0===x?void 0:x.current)||(null===(C=S.current[e])||void 0===C?void 0:C.current)||null,G=D?e:null;Q.current=G;var z=o.current,J=c.current,K=function(){Y(_,e,G),P(!0),B.current&&B.current(),j.current=!1,"right"===V&&J?J.dispatchEvent(new Event("scroll")):z&&z.dispatchEvent(new Event("scroll")),F(!1),null==N||N()};if(!b||!z)return j.current=!1,F(!1),void(null==N||N());if(D&&J){if(!i){var U=0;U="right"===V?D?D.getBoundingClientRect().top:0:b?b.getBoundingClientRect().top:0;var W=s.current,X=(null==W?void 0:W.getBoundingClientRect().top)||0,Z=W?W.scrollTop+U-X-150:0;return W?void n.smoothScrollTo(W,Z,200,K):void K()}var $=b.getBoundingClientRect().top-z.getBoundingClientRect().top+z.scrollTop,ee=D.getBoundingClientRect().top-J.getBoundingClientRect().top+J.scrollTop,ne=200;if("left"===V){var te=ee-($-z.scrollTop);te<0&&h.current&&!r&&(h.current.style.height="".concat(Math.abs(te),"px")),requestAnimationFrame(function(){var e,t=J.scrollHeight-J.clientHeight;if(te<0)e=0;else{if(te>t){var i=te-t;return A.current&&!r&&(A.current.style.height="".concat(i+150,"px")),void requestAnimationFrame(function(){n.smoothScrollTo(J,te,ne,K)})}e=te}n.smoothScrollTo(J,e,ne,K)})}else{var re=$-(ee-J.scrollTop);requestAnimationFrame(function(){var e,t=z.scrollHeight-z.clientHeight;if(re<0)e=0;else{if(re>t)return void requestAnimationFrame(function(){return n.smoothScrollTo(z,t,ne,K)});e=re}n.smoothScrollTo(z,e,ne,K)})}}else K()};r?setTimeout(t,100):t()}))}else I("No counterpart exists for this section.")},[M,C,u,_,i,l,Z,$,r]);return{isSideBySide:_,setIsSideBySide:b,isArrowVisible:N,setIsArrowVisible:P,isResizing:G,setIsResizing:w,isSideBySideLoading:q,setIsSideBySideLoading:F,activeSideBySideSection:M,setActiveSideBySideSection:k,scrollLock:j,sideBySideCacheRef:z,isSideBySideRef:J,activeSideBySideSectionRef:K,activeSideBySideRightSectionRef:Q,sideBySideLineRef:U,highlightedClauseRefs:W,clearClauseHighlight:X,applyAlignmentPadding:Y,resetSideBySide:$,activateSideBySide:ee}};
2
2
  //# sourceMappingURL=useSideBySide.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("react/jsx-runtime"),l=require("react"),i=require("lucide-react"),t=require("./CognitiveNonWebSearchReasoning.module.css.js"),s=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.filter(Boolean).join(" ")},a=function(l){return l.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(l,i){return l.startsWith("**")&&l.endsWith("**")||l.startsWith("__")&&l.endsWith("__")?e.jsx("strong",n.__assign({className:t.default.boldText},{children:l.slice(2,-2)}),i):l})};exports.default=function(o){var d=o.item,r=o.headerTitle;o.index;var u=o.iconsConfig,c=o.DocumentTitle,v=o.previewCallback,g=o.bodyHeight,h=o.disableMaximize,m=void 0!==h&&h,f=o.onFullscreenChange,_=o.splitterCustomStyle,x=void 0!==_&&_,p=o.themeTokens,j=o.classNames,y=o.styles,b=d.dataSource,C=d.confidence_score,N=d.trainingDataTitle,I=null==u?void 0:u.ChevronDownIcon,k=null==u?void 0:u.ChevronUpIcon,T=null==u?void 0:u.MaximizeIcon,H=null==u?void 0:u.CloseIcon,L=l.useMemo(function(){var e=(b?b.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):"").split(/(<highlight>[\s\S]*?<\/highlight>)/g),l=0,i=e.map(function(n){var e=n.startsWith("<highlight>"),i={text:e?n.replace(/<\/?highlight>/g,""):n,isHighlight:e,highlightIndex:e?l:-1};return e&&l++,i}),t=i.filter(function(n){return n.isHighlight}).length,s=[],a=[];return i.forEach(function(e){var l=e.text,i=e.isHighlight,t=e.highlightIndex;l.split("\n").forEach(function(e,l){l>0&&((a.length>0||s.length>0)&&s.push(n.__spreadArray([],a,!0)),a=[]),e&&a.push({text:e,isHighlight:i,highlightIndex:t})})}),a.length>0&&s.push(n.__spreadArray([],a,!0)),{processedLines:s.map(function(n){var e=n.map(function(n){return n.text}).join(""),l=e.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/);return{segments:n,isListItem:!!l,isHeader:!!e.match(/^(Title|Description|Training-basis):\s*(.*)$/i),indent:(null==l?void 0:l[1])||"",content:(null==l?void 0:l[3])||e}}),totalHighlights:t}},[b]),w=L.processedLines,B=L.totalHighlights,S=l.useState(0),z=S[0],A=S[1],F=l.useRef(null),R=l.useRef(null),D=l.useRef(null),E=l.useRef([]),W=l.useRef([]);l.useEffect(function(){E.current=E.current.slice(0,B),W.current=W.current.slice(0,B)},[B]),l.useEffect(function(){if(B>0){A(0);var n=setTimeout(function(){var n;null===(n=E.current[0])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50);return function(){return clearTimeout(n)}}},[B]),l.useEffect(function(){return function(){var n;(null===(n=D.current)||void 0===n?void 0:n.open)&&(null==f||f(!1))}},[f]);var q=function(n,e){setTimeout(function(){var l=e?W.current[n]:E.current[n];null==l||l.scrollIntoView({behavior:"smooth",block:"center"})},50)},M=function(n){if(void 0===n&&(n=!1),B){var e=z>0?z-1:B-1;A(e),q(e,n)}},U=function(n){if(void 0===n&&(n=!1),B){var e=z<B-1?z+1:0;A(e),q(e,n)}},V=function(l){var i=l?W:E,o=0;return w.map(function(l,d){l.isHeader&&(o=0),l.isListItem&&(o+=1);var r=function(){return l.segments.map(function(o,d){var r=o.isHighlight&&o.highlightIndex===z,u=o.text;return l.isListItem&&0===d&&(u=o.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),o.isHighlight?e.jsx("span",n.__assign({ref:function(n){n&&(i.current[o.highlightIndex]=n)},className:s(t.default.highlight,r?t.default.highlightActive:void 0,null==j?void 0:j.highlight,r?null==j?void 0:j.highlightActive:void 0),style:r?n.__assign(n.__assign({},null==y?void 0:y.highlight),null==y?void 0:y.highlightActive):null==y?void 0:y.highlight},{children:a(u)}),d):e.jsx("span",{children:a(u)},d)})};return l.isHeader?e.jsx("span",n.__assign({className:s(t.default.headerLine,null==j?void 0:j.headerLine),style:null==y?void 0:y.headerLine},{children:r()}),d):l.isListItem?e.jsxs("span",n.__assign({className:s(t.default.listItemLine,null==j?void 0:j.listItemLine),style:n.__assign({paddingLeft:l.indent?"1rem":"0"},null==y?void 0:y.listItemLine)},{children:[e.jsxs("span",n.__assign({className:s(t.default.listCounter,null==j?void 0:j.listCounter),style:null==y?void 0:y.listCounter},{children:[o,"."]})),e.jsx("span",{children:r()})]}),d):e.jsx("span",n.__assign({className:s(t.default.blockLine,null==j?void 0:j.blockLine),style:null==y?void 0:y.blockLine},{children:r()}),d)})},$=function(l){return B>1?e.jsxs("div",n.__assign({className:s(l?t.default.modalNavContainer:t.default.navigationContainer,l?null==j?void 0:j.modalNavContainer:null==j?void 0:j.navigationContainer),style:l?null==y?void 0:y.modalNavContainer:null==y?void 0:y.navigationContainer},{children:[k&&e.jsx("button",n.__assign({onClick:function(){return M(l)},className:s(l?t.default.modalNavButton:t.default.navButton,null==j?void 0:j.navButton),style:null==y?void 0:y.navButton},{children:e.jsx(k,{className:s(t.default.navIcon,null==j?void 0:j.navIcon),style:null==y?void 0:y.navIcon})})),e.jsxs("span",n.__assign({className:s(t.default.navCounter,null==j?void 0:j.navCounter),style:null==y?void 0:y.navCounter},{children:[z+1,"/",B]})),I&&e.jsx("button",n.__assign({onClick:function(){return U(l)},className:s(l?t.default.modalNavButton:t.default.navButton,null==j?void 0:j.navButton),style:null==y?void 0:y.navButton},{children:e.jsx(I,{className:s(t.default.navIcon,null==j?void 0:j.navIcon),style:null==y?void 0:y.navIcon})}))]})):null},O=null!=C?e.jsxs("span",n.__assign({className:s(t.default.confidenceBadge,null==j?void 0:j.confidenceBadge),style:null==y?void 0:y.confidenceBadge},{children:[e.jsx("span",n.__assign({className:t.default.confidenceStar},{children:"✦"})),e.jsxs("span",n.__assign({className:t.default.confidenceScore},{children:[C,"%"]}))]})):null,P=x?{backgroundColor:"white",padding:"1rem 1.5rem"}:void 0,Y=e.jsxs(e.Fragment,{children:[N&&e.jsx("div",n.__assign({className:s(t.default.footer,null==j?void 0:j.footer),style:n.__assign(n.__assign({},P),null==y?void 0:y.footer)},{children:e.jsx("span",n.__assign({className:s(t.default.trainingTitle,null==j?void 0:j.trainingTitle),style:null==y?void 0:y.trainingTitle},{children:N}))})),c&&e.jsx("div",n.__assign({className:s(t.default.modalFooterSource,null==j?void 0:j.modalFooterSource),style:n.__assign(n.__assign({},P),null==y?void 0:y.modalFooterSource)},{children:e.jsxs("button",n.__assign({type:"button",onClick:function(){return null==v?void 0:v()},className:s(t.default.trainingTitleLink,null==j?void 0:j.trainingTitleLink),style:null==y?void 0:y.trainingTitleLink},{children:[c,e.jsx(i.ExternalLink,{size:16,color:"#2563eb"})]}))}))]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",n.__assign({className:s(t.default.expandedContainer,null==j?void 0:j.expandedContainer),style:n.__assign(n.__assign(n.__assign(n.__assign({},p),g?{height:"".concat(g),display:"flex",flexDirection:"column"}:void 0),x?{border:"none",borderRadius:0,marginLeft:"0px",marginTop:"0px"}:void 0),null==y?void 0:y.expandedContainer)},{children:[e.jsxs("div",n.__assign({className:s(t.default.expandedHeader,null==j?void 0:j.expandedHeader),style:n.__assign(n.__assign({},x?{backgroundColor:"white",padding:"0.5rem 1.5rem"}:void 0),null==y?void 0:y.expandedHeader)},{children:[e.jsx("span",n.__assign({className:s(t.default.headerTitle,null==j?void 0:j.headerTitle),style:null==y?void 0:y.headerTitle},{children:r})),e.jsxs("div",n.__assign({className:s(t.default.headerActions,null==j?void 0:j.headerActions),style:null==y?void 0:y.headerActions},{children:[x?B>1&&e.jsxs(e.Fragment,{children:[e.jsxs("span",n.__assign({style:{fontSize:"12px",color:"#888"}},{children:[z+1," / ",B]})),e.jsx("button",n.__assign({onClick:function(){return M(!0)},disabled:z<=0,style:{padding:"2px 4px",cursor:z<=0?"not-allowed":"pointer",opacity:z<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(i.ChevronUp,{size:14,color:"#64748b"})})),e.jsx("button",n.__assign({onClick:function(){return U(!0)},disabled:z>=B-1,style:{padding:"2px 4px",cursor:z>=B-1?"not-allowed":"pointer",opacity:z>=B-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(i.ChevronDown,{size:14,color:"#64748b"})}))]}):$(!1),O,!m&&T&&e.jsx("button",n.__assign({onClick:function(){var n;null==f||f(!0),null===(n=D.current)||void 0===n||n.showModal()},className:s(t.default.maximizeButton,null==j?void 0:j.maximizeButton),style:null==y?void 0:y.maximizeButton,title:"View fullscreen"},{children:e.jsx(T,{className:t.default.maximizeIcon})}))]}))]})),e.jsx("div",n.__assign({ref:F,className:s(t.default.contentArea,null==j?void 0:j.contentArea),style:n.__assign(n.__assign(n.__assign({},g?{flex:1,maxHeight:"300px",overflowY:"scroll",minHeight:0}:void 0),x?{padding:"1rem 1.5rem"}:void 0),null==y?void 0:y.contentArea)},{children:e.jsx("div",n.__assign({className:s(t.default.contentInner,null==j?void 0:j.contentInner),style:null==y?void 0:y.contentInner},{children:V(!1)}))})),Y]})),!m&&e.jsx("dialog",n.__assign({ref:D,className:t.default.modalDialog,onClose:function(){return null==f?void 0:f(!1)},onClick:function(n){var e;n.target===D.current&&(null===(e=D.current)||void 0===e||e.close())}},{children:e.jsxs("div",n.__assign({className:s(t.default.modalContainer,null==j?void 0:j.modalContainer),style:null==y?void 0:y.modalContainer},{children:[e.jsxs("div",n.__assign({className:s(t.default.modalHeader,null==j?void 0:j.modalHeader),style:null==y?void 0:y.modalHeader},{children:[e.jsx("span",n.__assign({className:s(t.default.modalHeaderTitle,null==j?void 0:j.modalHeaderTitle),style:null==y?void 0:y.modalHeaderTitle},{children:r})),e.jsxs("div",n.__assign({className:s(t.default.modalHeaderActions,null==j?void 0:j.modalHeaderActions),style:null==y?void 0:y.modalHeaderActions},{children:[x?B>1&&e.jsxs(e.Fragment,{children:[e.jsxs("span",n.__assign({style:{fontSize:"12px",color:"#888"}},{children:[z+1," / ",B]})),e.jsx("button",n.__assign({onClick:function(){return M(!0)},disabled:z<=0,style:{padding:"2px 4px",cursor:z<=0?"not-allowed":"pointer",opacity:z<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(i.ChevronUp,{size:14,color:"#64748b"})})),e.jsx("button",n.__assign({onClick:function(){return U(!0)},disabled:z>=B-1,style:{padding:"2px 4px",cursor:z>=B-1?"not-allowed":"pointer",opacity:z>=B-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(i.ChevronDown,{size:14,color:"#64748b"})}))]}):$(!0),O,H&&e.jsx("button",n.__assign({onClick:function(){var n;return null===(n=D.current)||void 0===n?void 0:n.close()},className:s(t.default.closeButton,null==j?void 0:j.closeButton),style:null==y?void 0:y.closeButton,title:"Close"},{children:e.jsx(H,{className:s(t.default.closeIcon,null==j?void 0:j.closeIcon),style:null==y?void 0:y.closeIcon})}))]}))]})),e.jsx("div",n.__assign({ref:R,className:s(t.default.modalContent,null==j?void 0:j.modalContent),style:null==y?void 0:y.modalContent},{children:e.jsx("div",n.__assign({className:s(t.default.modalContentInner,null==j?void 0:j.modalContentInner),style:null==y?void 0:y.modalContentInner},{children:V(!0)}))})),N&&e.jsx("div",n.__assign({className:s(t.default.modalFooter,null==j?void 0:j.modalFooter),style:null==y?void 0:y.modalFooter},{children:e.jsx("span",n.__assign({className:s(t.default.trainingTitle,null==j?void 0:j.trainingTitle),style:null==y?void 0:y.trainingTitle},{children:N}))})),c&&e.jsx("div",n.__assign({className:s(t.default.modalFooterSource,null==j?void 0:j.modalFooterSource),style:null==y?void 0:y.modalFooterSource},{children:e.jsxs("button",n.__assign({type:"button",onClick:function(){var n;null==v||v(),null===(n=D.current)||void 0===n||n.close()},className:s(t.default.trainingTitleLink,null==j?void 0:j.trainingTitleLink),style:null==y?void 0:y.trainingTitleLink},{children:[c,e.jsx(i.ExternalLink,{size:16,color:"#2563eb"})]}))}))]}))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),l=require("lucide-react"),t=require("./CognitiveNonWebSearchReasoning.module.css.js"),s=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return n.filter(Boolean).join(" ")},a=function(i){return i.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(i,l){return i.startsWith("**")&&i.endsWith("**")||i.startsWith("__")&&i.endsWith("__")?e.jsx("strong",n.__assign({className:t.default.boldText},{children:i.slice(2,-2)}),l):i})};exports.default=function(o){var d=o.item,r=o.headerTitle;o.index;var u=o.iconsConfig,c=o.DocumentTitle,v=o.previewCallback,g=o.bodyHeight,h=o.disableMaximize,m=void 0!==h&&h,_=o.splitterCustomStyle,f=void 0!==_&&_,x=o.themeTokens,p=o.classNames,j=o.styles,y=d.dataSource,b=d.confidence_score,C=d.trainingDataTitle,N=null==u?void 0:u.ChevronDownIcon,I=null==u?void 0:u.ChevronUpIcon,k=null==u?void 0:u.MaximizeIcon,T=null==u?void 0:u.CloseIcon,H=i.useMemo(function(){var e=(y?y.replace(/\\n/g,"\n").replace(/\n+/g,"\n"):"").split(/(<highlight>[\s\S]*?<\/highlight>)/g),i=0,l=e.map(function(n){var e=n.startsWith("<highlight>"),l={text:e?n.replace(/<\/?highlight>/g,""):n,isHighlight:e,highlightIndex:e?i:-1};return e&&i++,l}),t=l.filter(function(n){return n.isHighlight}).length,s=[],a=[];return l.forEach(function(e){var i=e.text,l=e.isHighlight,t=e.highlightIndex;i.split("\n").forEach(function(e,i){i>0&&((a.length>0||s.length>0)&&s.push(n.__spreadArray([],a,!0)),a=[]),e&&a.push({text:e,isHighlight:l,highlightIndex:t})})}),a.length>0&&s.push(n.__spreadArray([],a,!0)),{processedLines:s.map(function(n){var e=n.map(function(n){return n.text}).join(""),i=e.match(/^(\s*)(-|\*|\d+\.)\s+(.*)$/);return{segments:n,isListItem:!!i,isHeader:!!e.match(/^(Title|Description|Training-basis):\s*(.*)$/i),indent:(null==i?void 0:i[1])||"",content:(null==i?void 0:i[3])||e}}),totalHighlights:t}},[y]),L=H.processedLines,w=H.totalHighlights,B=i.useState(0),S=B[0],z=B[1],A=i.useRef(null),F=i.useRef(null),R=i.useRef(null),D=i.useRef([]),E=i.useRef([]);i.useEffect(function(){D.current=D.current.slice(0,w),E.current=E.current.slice(0,w)},[w]),i.useEffect(function(){if(w>0){z(0);var n=setTimeout(function(){var n;null===(n=D.current[0])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50);return function(){return clearTimeout(n)}}},[w]);var W=function(n,e){setTimeout(function(){var i=e?E.current[n]:D.current[n];null==i||i.scrollIntoView({behavior:"smooth",block:"center"})},50)},q=function(n){if(void 0===n&&(n=!1),w){var e=S>0?S-1:w-1;z(e),W(e,n)}},M=function(n){if(void 0===n&&(n=!1),w){var e=S<w-1?S+1:0;z(e),W(e,n)}},U=function(i){var l=i?E:D,o=0;return L.map(function(i,d){i.isHeader&&(o=0),i.isListItem&&(o+=1);var r=function(){return i.segments.map(function(o,d){var r=o.isHighlight&&o.highlightIndex===S,u=o.text;return i.isListItem&&0===d&&(u=o.text.replace(/^(\s*)(-|\*|\d+\.)\s+/,"")),o.isHighlight?e.jsx("span",n.__assign({ref:function(n){n&&(l.current[o.highlightIndex]=n)},className:s(t.default.highlight,r?t.default.highlightActive:void 0,null==p?void 0:p.highlight,r?null==p?void 0:p.highlightActive:void 0),style:r?n.__assign(n.__assign({},null==j?void 0:j.highlight),null==j?void 0:j.highlightActive):null==j?void 0:j.highlight},{children:a(u)}),d):e.jsx("span",{children:a(u)},d)})};return i.isHeader?e.jsx("span",n.__assign({className:s(t.default.headerLine,null==p?void 0:p.headerLine),style:null==j?void 0:j.headerLine},{children:r()}),d):i.isListItem?e.jsxs("span",n.__assign({className:s(t.default.listItemLine,null==p?void 0:p.listItemLine),style:n.__assign({paddingLeft:i.indent?"1rem":"0"},null==j?void 0:j.listItemLine)},{children:[e.jsxs("span",n.__assign({className:s(t.default.listCounter,null==p?void 0:p.listCounter),style:null==j?void 0:j.listCounter},{children:[o,"."]})),e.jsx("span",{children:r()})]}),d):e.jsx("span",n.__assign({className:s(t.default.blockLine,null==p?void 0:p.blockLine),style:null==j?void 0:j.blockLine},{children:r()}),d)})},V=function(i){return w>1?e.jsxs("div",n.__assign({className:s(i?t.default.modalNavContainer:t.default.navigationContainer,i?null==p?void 0:p.modalNavContainer:null==p?void 0:p.navigationContainer),style:i?null==j?void 0:j.modalNavContainer:null==j?void 0:j.navigationContainer},{children:[I&&e.jsx("button",n.__assign({onClick:function(){return q(i)},className:s(i?t.default.modalNavButton:t.default.navButton,null==p?void 0:p.navButton),style:null==j?void 0:j.navButton},{children:e.jsx(I,{className:s(t.default.navIcon,null==p?void 0:p.navIcon),style:null==j?void 0:j.navIcon})})),e.jsxs("span",n.__assign({className:s(t.default.navCounter,null==p?void 0:p.navCounter),style:null==j?void 0:j.navCounter},{children:[S+1,"/",w]})),N&&e.jsx("button",n.__assign({onClick:function(){return M(i)},className:s(i?t.default.modalNavButton:t.default.navButton,null==p?void 0:p.navButton),style:null==j?void 0:j.navButton},{children:e.jsx(N,{className:s(t.default.navIcon,null==p?void 0:p.navIcon),style:null==j?void 0:j.navIcon})}))]})):null},$=null!=b?e.jsxs("span",n.__assign({className:s(t.default.confidenceBadge,null==p?void 0:p.confidenceBadge),style:null==j?void 0:j.confidenceBadge},{children:[e.jsx("span",n.__assign({className:t.default.confidenceStar},{children:"✦"})),e.jsxs("span",n.__assign({className:t.default.confidenceScore},{children:[b,"%"]}))]})):null,O=f?{backgroundColor:"white",padding:"1rem 1.5rem"}:void 0,P=e.jsxs(e.Fragment,{children:[C&&e.jsx("div",n.__assign({className:s(t.default.footer,null==p?void 0:p.footer),style:n.__assign(n.__assign({},O),null==j?void 0:j.footer)},{children:e.jsx("span",n.__assign({className:s(t.default.trainingTitle,null==p?void 0:p.trainingTitle),style:null==j?void 0:j.trainingTitle},{children:C}))})),c&&e.jsx("div",n.__assign({className:s(t.default.modalFooterSource,null==p?void 0:p.modalFooterSource),style:n.__assign(n.__assign({},O),null==j?void 0:j.modalFooterSource)},{children:e.jsxs("button",n.__assign({type:"button",onClick:function(){return null==v?void 0:v()},className:s(t.default.trainingTitleLink,null==p?void 0:p.trainingTitleLink),style:null==j?void 0:j.trainingTitleLink},{children:[c,e.jsx(l.ExternalLink,{size:16,color:"#2563eb"})]}))}))]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",n.__assign({className:s(t.default.expandedContainer,null==p?void 0:p.expandedContainer),style:n.__assign(n.__assign(n.__assign(n.__assign({},x),g?{height:"".concat(g),display:"flex",flexDirection:"column"}:void 0),f?{border:"none",borderRadius:0,marginLeft:"0px",marginTop:"0px"}:void 0),null==j?void 0:j.expandedContainer)},{children:[e.jsxs("div",n.__assign({className:s(t.default.expandedHeader,null==p?void 0:p.expandedHeader),style:n.__assign(n.__assign({},f?{backgroundColor:"white",padding:"0.5rem 1.5rem"}:void 0),null==j?void 0:j.expandedHeader)},{children:[e.jsx("span",n.__assign({className:s(t.default.headerTitle,null==p?void 0:p.headerTitle),style:null==j?void 0:j.headerTitle},{children:r})),e.jsxs("div",n.__assign({className:s(t.default.headerActions,null==p?void 0:p.headerActions),style:null==j?void 0:j.headerActions},{children:[f?w>1&&e.jsxs(e.Fragment,{children:[e.jsxs("span",n.__assign({style:{fontSize:"12px",color:"#888"}},{children:[S+1," / ",w]})),e.jsx("button",n.__assign({onClick:function(){return q(!0)},disabled:S<=0,style:{padding:"2px 4px",cursor:S<=0?"not-allowed":"pointer",opacity:S<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(l.ChevronUp,{size:14,color:"#64748b"})})),e.jsx("button",n.__assign({onClick:function(){return M(!0)},disabled:S>=w-1,style:{padding:"2px 4px",cursor:S>=w-1?"not-allowed":"pointer",opacity:S>=w-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(l.ChevronDown,{size:14,color:"#64748b"})}))]}):V(!1),$,!m&&k&&e.jsx("button",n.__assign({onClick:function(){var n;return null===(n=R.current)||void 0===n?void 0:n.showModal()},className:s(t.default.maximizeButton,null==p?void 0:p.maximizeButton),style:null==j?void 0:j.maximizeButton,title:"View fullscreen"},{children:e.jsx(k,{className:t.default.maximizeIcon})}))]}))]})),e.jsx("div",n.__assign({ref:A,className:s(t.default.contentArea,null==p?void 0:p.contentArea),style:n.__assign(n.__assign(n.__assign({},g?{flex:1,maxHeight:"300px",overflowY:"scroll",minHeight:0}:void 0),f?{padding:"1rem 1.5rem"}:void 0),null==j?void 0:j.contentArea)},{children:e.jsx("div",n.__assign({className:s(t.default.contentInner,null==p?void 0:p.contentInner),style:null==j?void 0:j.contentInner},{children:U(!1)}))})),P]})),!m&&e.jsx("dialog",n.__assign({ref:R,className:t.default.modalDialog,onClick:function(n){var e;n.target===R.current&&(null===(e=R.current)||void 0===e||e.close())}},{children:e.jsxs("div",n.__assign({className:s(t.default.modalContainer,null==p?void 0:p.modalContainer),style:null==j?void 0:j.modalContainer},{children:[e.jsxs("div",n.__assign({className:s(t.default.modalHeader,null==p?void 0:p.modalHeader),style:null==j?void 0:j.modalHeader},{children:[e.jsx("span",n.__assign({className:s(t.default.modalHeaderTitle,null==p?void 0:p.modalHeaderTitle),style:null==j?void 0:j.modalHeaderTitle},{children:r})),e.jsxs("div",n.__assign({className:s(t.default.modalHeaderActions,null==p?void 0:p.modalHeaderActions),style:null==j?void 0:j.modalHeaderActions},{children:[f?w>1&&e.jsxs(e.Fragment,{children:[e.jsxs("span",n.__assign({style:{fontSize:"12px",color:"#888"}},{children:[S+1," / ",w]})),e.jsx("button",n.__assign({onClick:function(){return q(!0)},disabled:S<=0,style:{padding:"2px 4px",cursor:S<=0?"not-allowed":"pointer",opacity:S<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(l.ChevronUp,{size:14,color:"#64748b"})})),e.jsx("button",n.__assign({onClick:function(){return M(!0)},disabled:S>=w-1,style:{padding:"2px 4px",cursor:S>=w-1?"not-allowed":"pointer",opacity:S>=w-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:e.jsx(l.ChevronDown,{size:14,color:"#64748b"})}))]}):V(!0),$,T&&e.jsx("button",n.__assign({onClick:function(){var n;return null===(n=R.current)||void 0===n?void 0:n.close()},className:s(t.default.closeButton,null==p?void 0:p.closeButton),style:null==j?void 0:j.closeButton,title:"Close"},{children:e.jsx(T,{className:s(t.default.closeIcon,null==p?void 0:p.closeIcon),style:null==j?void 0:j.closeIcon})}))]}))]})),e.jsx("div",n.__assign({ref:F,className:s(t.default.modalContent,null==p?void 0:p.modalContent),style:null==j?void 0:j.modalContent},{children:e.jsx("div",n.__assign({className:s(t.default.modalContentInner,null==p?void 0:p.modalContentInner),style:null==j?void 0:j.modalContentInner},{children:U(!0)}))})),C&&e.jsx("div",n.__assign({className:s(t.default.modalFooter,null==p?void 0:p.modalFooter),style:null==j?void 0:j.modalFooter},{children:e.jsx("span",n.__assign({className:s(t.default.trainingTitle,null==p?void 0:p.trainingTitle),style:null==j?void 0:j.trainingTitle},{children:C}))})),c&&e.jsx("div",n.__assign({className:s(t.default.modalFooterSource,null==p?void 0:p.modalFooterSource),style:null==j?void 0:j.modalFooterSource},{children:e.jsxs("button",n.__assign({type:"button",onClick:function(){var n;null==v||v(),null===(n=R.current)||void 0===n||n.close()},className:s(t.default.trainingTitleLink,null==p?void 0:p.trainingTitleLink),style:null==j?void 0:j.trainingTitleLink},{children:[c,e.jsx(l.ExternalLink,{size:16,color:"#2563eb"})]}))}))]}))}))]})};
2
2
  //# sourceMappingURL=CognitiveInternalgptCoreComponent.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),o=require("../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),l=require("./GptWebCitationImageCitation.js"),a=require("./GptWebCitationSkeleton.js"),s=require("./types.js"),r=require("./utils/citationData.utils.js"),u=require("./utils/styleOverrides.utils.js"),d=require("./utils/fixedHeight.utils.js"),g=require("./GptWebCitation.module.css.js"),c=require("../../assests/svg/NeuralNetworkIcon.js"),v=function(t){var o=t.variant,l=t.disabled,a=t.onClick,s=t.title,r=t.style;return i.jsx("button",e.__assign({type:"button",className:g.default.webCitationButton,onClick:a,disabled:l,title:s,style:r},{children:"gpt"===o?i.jsxs(i.Fragment,{children:[i.jsx(c.default,{className:g.default.webCitationButtonIcon}),"View GPT Citation"]}):i.jsxs(i.Fragment,{children:[i.jsx(n.Globe,{size:24,className:g.default.webCitationButtonIcon}),"View Web Citation"]})}))};exports.default=function(c){var p,_,C,b,w=c.gptCitation,f=c.defaultCitationUrl,m=c.citationType,x=c.webCitationData,h=c.topic,y=c.sourceLabel,k=c.relevanceScore,j=c.learnedFrom,F=c.webCitationStatus,S=c.onGenerateWebCitation,H=c.showWebCitation,I=c.onToggleCitationView,B=c.showExpandImageButton,L=void 0===B||B,W=c.onFullscreenChange,T=c.showGptMaximizeButton,N=c.iconsConfig,V=c.isFixedHeight,M=void 0!==V&&V,q=c.useParentHeight,E=void 0!==q&&q,G=c.styles,P=t.useMemo(function(){return function(i){var t,n,o,l,a,s,r,d,g,c,v;return{container:null==i?void 0:i.container,gptWrapper:e.__assign(e.__assign({},null===(t=null==i?void 0:i.gptCitation)||void 0===t?void 0:t.wrapper),null==i?void 0:i.gptCitationWrapper),gptFooterAction:e.__assign(e.__assign({},null===(n=null==i?void 0:i.gptCitation)||void 0===n?void 0:n.footerAction),null==i?void 0:i.footerAction),gptToggleButton:e.__assign(e.__assign({},null===(o=null==i?void 0:i.gptCitation)||void 0===o?void 0:o.toggleButton),null==i?void 0:i.webCitationButton),webPanel:e.__assign(e.__assign({},null==i?void 0:i.container),null===(l=null==i?void 0:i.webCitation)||void 0===l?void 0:l.panel),webHeader:null===(a=null==i?void 0:i.webCitation)||void 0===a?void 0:a.header,webContent:null===(s=null==i?void 0:i.webCitation)||void 0===s?void 0:s.content,webFooter:null===(r=null==i?void 0:i.webCitation)||void 0===r?void 0:r.footer,webToggleButton:e.__assign(e.__assign({},null===(d=null==i?void 0:i.webCitation)||void 0===d?void 0:d.toggleButton),null==i?void 0:i.webCitationButton),webLearnedFrom:null===(g=null==i?void 0:i.webCitation)||void 0===g?void 0:g.learnedFrom,webImage:null===(c=null==i?void 0:i.webCitation)||void 0===c?void 0:c.image,webSkeleton:null===(v=null==i?void 0:i.webCitation)||void 0===v?void 0:v.skeleton,webImageVisitLink:u.resolveWebCitationVisitLinkStyles(null==i?void 0:i.webCitation,"image"),webSkeletonVisitLink:u.resolveWebCitationVisitLinkStyles(null==i?void 0:i.webCitation,"skeleton")}}(G)},[G]),z=s.allowsGptCitationView(m),U=s.allowsWebCitationView(m),A=s.showsCitationViewToggle(m),D=M||E,O=t.useMemo(function(){return M?d.resolveFixedHeightLayout(w.bodyHeight,A):null},[M,w.bodyHeight,A]),R=t.useMemo(function(){return O?d.getFixedPanelStyle(O.panelHeight):void 0},[O]),J=t.useMemo(function(){return E?d.getParentHeightPanelStyle():void 0},[E]),K=null!=J?J:R,Q=t.useMemo(function(){var e,i;return{MaximizeIcon:null!==(e=null==N?void 0:N.MaximizeIcon)&&void 0!==e?e:null===(i=w.iconsConfig)||void 0===i?void 0:i.MaximizeIcon,ExternalLinkIcon:null==N?void 0:N.ExternalLinkIcon}},[N,null===(p=w.iconsConfig)||void 0===p?void 0:p.MaximizeIcon]),X=t.useMemo(function(){var i=E?{bodyHeight:d.getParentHeightGptBodyHeight(A)}:M&&O?{bodyHeight:O.gptBodyHeight}:{};return e.__assign(e.__assign(e.__assign(e.__assign({},w),i),{disableMaximize:void 0!==T?!T:w.disableMaximize}),A||m===s.CitationType.WEB?{DocumentTitle:void 0,previewCallback:void 0}:{})},[w,T,A,m,E,M,O]),Y=t.useState(m!==s.CitationType.GPT),Z=Y[0],$=Y[1],ee=m!==s.CitationType.GPT&&(m===s.CitationType.WEB||(null!=H?H:Z)),ie=void 0!==H,te=t.useMemo(function(){return x?r.mapCitationDataToDisplay(x):null},[x]),ne=null!==(_=null!=h?h:null==te?void 0:te.topic)&&void 0!==_?_:"Web Citation",oe=null!==(C=null!=k?k:null==te?void 0:te.relevanceScore)&&void 0!==C?C:0,le=null!=j?j:null==te?void 0:te.learnedFrom,ae=r.resolveSkeletonVisitUrl(null==te?void 0:te.highlightedUrl,null!==(b=null==te?void 0:te.citationUrl)&&void 0!==b?b:f),se=r.getWebCitationImageUrl(x),re=t.useMemo(function(){return function(e,i,t){return t?"success":e||(i?"error":"pending")}(F,x,se)},[F,x,se]),ue=t.useCallback(function(){I?I():ie||$(!1)},[I,ie]),de=t.useCallback(function(){I?I():ie||$(!0),se||"success"===re||null==S||S()},[I,ie,se,re,S]),ge=null!=y?y:"Source: Web Citation > ".concat(ne),ce=function(t){var n=!!X.DocumentTitle,l=[g.default.gptCitationWrapper,n?g.default.gptCitationWrapperWithSource:"",D?g.default.gptCitationWrapperFixedHeight:""].filter(Boolean).join(" ");return i.jsxs("div",e.__assign({className:l,style:e.__assign(e.__assign({},P.gptWrapper),K)},{children:[i.jsx(o.default,e.__assign({},X,{splitterCustomStyle:!0,onFullscreenChange:W})),t&&(n?i.jsx("div",e.__assign({className:g.default.gptCitationFooterAction,style:P.gptFooterAction},{children:t})):i.jsx("div",e.__assign({className:[g.default.gptCitationToggleFooter,D?g.default.gptCitationToggleFooterFixedHeight:""].filter(Boolean).join(" "),style:P.gptFooterAction},{children:t})))]}))};return z&&!ee?i.jsx("div",e.__assign({className:g.default.overlay,style:e.__assign(e.__assign({},P.container),J)},{children:ce(A?i.jsx(v,{variant:"web",onClick:de,title:"View web-based citation for this source.",style:P.gptToggleButton}):void 0)})):U?i.jsxs("div",e.__assign({className:[g.default.panel,D?g.default.gptCitationWrapperFixedHeight:""].filter(Boolean).join(" "),style:e.__assign(e.__assign({},P.webPanel),K)},{children:[i.jsxs("div",e.__assign({className:g.default.panelHeader,style:P.webHeader},{children:[i.jsx("span",e.__assign({className:g.default.panelSource},{children:ge})),i.jsx("div",e.__assign({className:g.default.panelHeaderActions},{children:oe>0&&i.jsxs("div",e.__assign({className:g.default.confidenceBadge,title:"Decision strength"},{children:[i.jsx(n.Sparkles,{size:14}),oe,"%"]}))}))]})),i.jsx("div",e.__assign({className:[g.default.panelContent,g.default.panelContentExpanded,D?g.default.panelContentFixedHeight:""].filter(Boolean).join(" "),style:e.__assign(e.__assign({},P.webContent),D?d.getFixedWebContentStyle():void 0)},{children:"pending"===re?i.jsx(a.default,{status:"pending",citationUrl:ae,ExternalLinkIcon:Q.ExternalLinkIcon,styles:P.webSkeleton,visitLinkStyles:P.webSkeletonVisitLink,isFixedHeight:D}):"success"===re&&se?i.jsx(l.default,{citationImage:se,citationUrl:ae,showExpandImageButton:L,iconsConfig:Q,styles:P.webImage,visitLinkStyles:P.webImageVisitLink,skeletonStyles:P.webSkeleton,skeletonVisitLinkStyles:P.webSkeletonVisitLink,isFixedHeight:D,onFullscreenChange:W}):i.jsx(a.default,{status:"error",citationUrl:ae,ExternalLinkIcon:Q.ExternalLinkIcon,styles:P.webSkeleton,visitLinkStyles:P.webSkeletonVisitLink,isFixedHeight:D})})),i.jsxs("div",e.__assign({className:g.default.panelFooter,style:P.webFooter},{children:[A?i.jsx(v,{variant:"gpt",onClick:ue,style:P.webToggleButton}):null,le&&i.jsxs("span",e.__assign({className:g.default.learnedFrom,style:P.webLearnedFrom},{children:["Learned From ",le]}))]}))]})):i.jsx("div",e.__assign({className:g.default.overlay,style:e.__assign(e.__assign({},P.container),J)},{children:ce()}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),o=require("../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),l=require("./GptWebCitationImageCitation.js"),a=require("./GptWebCitationSkeleton.js"),s=require("./types.js"),r=require("./utils/citationData.utils.js"),u=require("./utils/styleOverrides.utils.js"),d=require("./utils/fixedHeight.utils.js"),g=require("./GptWebCitation.module.css.js"),c=require("../../assests/svg/NeuralNetworkIcon.js"),v=function(t){var o=t.variant,l=t.disabled,a=t.onClick,s=t.title,r=t.style;return i.jsx("button",e.__assign({type:"button",className:g.default.webCitationButton,onClick:a,disabled:l,title:s,style:r},{children:"gpt"===o?i.jsxs(i.Fragment,{children:[i.jsx(c.default,{className:g.default.webCitationButtonIcon}),"View GPT Citation"]}):i.jsxs(i.Fragment,{children:[i.jsx(n.Globe,{size:24,className:g.default.webCitationButtonIcon}),"View Web Citation"]})}))};exports.default=function(c){var p,C,b,_,w=c.gptCitation,f=c.defaultCitationUrl,m=c.citationType,x=c.webCitationData,y=c.topic,h=c.sourceLabel,k=c.relevanceScore,j=c.learnedFrom,F=c.webCitationStatus,S=c.onGenerateWebCitation,I=c.showWebCitation,L=c.onToggleCitationView,W=c.showExpandImageButton,B=void 0===W||W,H=c.showGptMaximizeButton,T=c.iconsConfig,N=c.isFixedHeight,V=void 0!==N&&N,M=c.styles,q=t.useMemo(function(){return function(i){var t,n,o,l,a,s,r,d,g,c,v;return{container:null==i?void 0:i.container,gptWrapper:e.__assign(e.__assign({},null===(t=null==i?void 0:i.gptCitation)||void 0===t?void 0:t.wrapper),null==i?void 0:i.gptCitationWrapper),gptFooterAction:e.__assign(e.__assign({},null===(n=null==i?void 0:i.gptCitation)||void 0===n?void 0:n.footerAction),null==i?void 0:i.footerAction),gptToggleButton:e.__assign(e.__assign({},null===(o=null==i?void 0:i.gptCitation)||void 0===o?void 0:o.toggleButton),null==i?void 0:i.webCitationButton),webPanel:e.__assign(e.__assign({},null==i?void 0:i.container),null===(l=null==i?void 0:i.webCitation)||void 0===l?void 0:l.panel),webHeader:null===(a=null==i?void 0:i.webCitation)||void 0===a?void 0:a.header,webContent:null===(s=null==i?void 0:i.webCitation)||void 0===s?void 0:s.content,webFooter:null===(r=null==i?void 0:i.webCitation)||void 0===r?void 0:r.footer,webToggleButton:e.__assign(e.__assign({},null===(d=null==i?void 0:i.webCitation)||void 0===d?void 0:d.toggleButton),null==i?void 0:i.webCitationButton),webLearnedFrom:null===(g=null==i?void 0:i.webCitation)||void 0===g?void 0:g.learnedFrom,webImage:null===(c=null==i?void 0:i.webCitation)||void 0===c?void 0:c.image,webSkeleton:null===(v=null==i?void 0:i.webCitation)||void 0===v?void 0:v.skeleton,webImageVisitLink:u.resolveWebCitationVisitLinkStyles(null==i?void 0:i.webCitation,"image"),webSkeletonVisitLink:u.resolveWebCitationVisitLinkStyles(null==i?void 0:i.webCitation,"skeleton")}}(M)},[M]),E=s.allowsGptCitationView(m),G=s.allowsWebCitationView(m),z=s.showsCitationViewToggle(m),U=t.useMemo(function(){return V?d.resolveFixedHeightLayout(w.bodyHeight,z):null},[V,w.bodyHeight,z]),A=t.useMemo(function(){return U?d.getFixedPanelStyle(U.panelHeight):void 0},[U]),D=t.useMemo(function(){var e,i;return{MaximizeIcon:null!==(e=null==T?void 0:T.MaximizeIcon)&&void 0!==e?e:null===(i=w.iconsConfig)||void 0===i?void 0:i.MaximizeIcon,ExternalLinkIcon:null==T?void 0:T.ExternalLinkIcon}},[T,null===(p=w.iconsConfig)||void 0===p?void 0:p.MaximizeIcon]),P=t.useMemo(function(){return e.__assign(e.__assign(e.__assign(e.__assign({},w),V&&U?{bodyHeight:U.gptBodyHeight}:{}),{disableMaximize:void 0!==H?!H:w.disableMaximize}),z||m===s.CitationType.WEB?{DocumentTitle:void 0,previewCallback:void 0}:{})},[w,H,z,m,V,U]),O=t.useState(m!==s.CitationType.GPT),R=O[0],J=O[1],K=m!==s.CitationType.GPT&&(m===s.CitationType.WEB||(null!=I?I:R)),Q=void 0!==I,X=t.useMemo(function(){return x?r.mapCitationDataToDisplay(x):null},[x]),Y=null!==(C=null!=y?y:null==X?void 0:X.topic)&&void 0!==C?C:"Web Citation",Z=null!==(b=null!=k?k:null==X?void 0:X.relevanceScore)&&void 0!==b?b:0,$=null!=j?j:null==X?void 0:X.learnedFrom,ee=r.resolveSkeletonVisitUrl(null==X?void 0:X.highlightedUrl,null!==(_=null==X?void 0:X.citationUrl)&&void 0!==_?_:f),ie=r.getWebCitationImageUrl(x),te=t.useMemo(function(){return function(e,i,t){return t?"success":e||(i?"error":"pending")}(F,x,ie)},[F,x,ie]),ne=t.useCallback(function(){L?L():Q||J(!1)},[L,Q]),oe=t.useCallback(function(){L?L():Q||J(!0),ie||"success"===te||null==S||S()},[L,Q,ie,te,S]),le=null!=h?h:"Source: Web Citation > ".concat(Y),ae=function(t){var n=!!P.DocumentTitle,l=[g.default.gptCitationWrapper,n?g.default.gptCitationWrapperWithSource:"",V?g.default.gptCitationWrapperFixedHeight:""].filter(Boolean).join(" ");return i.jsxs("div",e.__assign({className:l,style:e.__assign(e.__assign({},q.gptWrapper),A)},{children:[i.jsx(o.default,e.__assign({},P,{splitterCustomStyle:!0})),t&&(n?i.jsx("div",e.__assign({className:g.default.gptCitationFooterAction,style:q.gptFooterAction},{children:t})):i.jsx("div",e.__assign({className:[g.default.gptCitationToggleFooter,V?g.default.gptCitationToggleFooterFixedHeight:""].filter(Boolean).join(" "),style:q.gptFooterAction},{children:t})))]}))};return E&&!K?i.jsx("div",e.__assign({className:g.default.overlay,style:q.container},{children:ae(z?i.jsx(v,{variant:"web",onClick:oe,title:"View web-based citation for this source.",style:q.gptToggleButton}):void 0)})):G?i.jsxs("div",e.__assign({className:[g.default.panel,V?g.default.gptCitationWrapperFixedHeight:""].filter(Boolean).join(" "),style:e.__assign(e.__assign({},q.webPanel),A)},{children:[i.jsxs("div",e.__assign({className:g.default.panelHeader,style:q.webHeader},{children:[i.jsx("span",e.__assign({className:g.default.panelSource},{children:le})),i.jsx("div",e.__assign({className:g.default.panelHeaderActions},{children:Z>0&&i.jsxs("div",e.__assign({className:g.default.confidenceBadge,title:"Decision strength"},{children:[i.jsx(n.Sparkles,{size:14}),Z,"%"]}))}))]})),i.jsx("div",e.__assign({className:[g.default.panelContent,g.default.panelContentExpanded,V?g.default.panelContentFixedHeight:""].filter(Boolean).join(" "),style:e.__assign(e.__assign({},q.webContent),V?d.getFixedWebContentStyle():void 0)},{children:"pending"===te?i.jsx(a.default,{status:"pending",citationUrl:ee,ExternalLinkIcon:D.ExternalLinkIcon,styles:q.webSkeleton,visitLinkStyles:q.webSkeletonVisitLink,isFixedHeight:V}):"success"===te&&ie?i.jsx(l.default,{citationImage:ie,citationUrl:ee,showExpandImageButton:B,iconsConfig:D,styles:q.webImage,visitLinkStyles:q.webImageVisitLink,skeletonStyles:q.webSkeleton,skeletonVisitLinkStyles:q.webSkeletonVisitLink,isFixedHeight:V}):i.jsx(a.default,{status:"error",citationUrl:ee,ExternalLinkIcon:D.ExternalLinkIcon,styles:q.webSkeleton,visitLinkStyles:q.webSkeletonVisitLink,isFixedHeight:V})})),i.jsxs("div",e.__assign({className:g.default.panelFooter,style:q.webFooter},{children:[z?i.jsx(v,{variant:"gpt",onClick:ne,style:q.webToggleButton}):null,$&&i.jsxs("span",e.__assign({className:g.default.learnedFrom,style:q.webLearnedFrom},{children:["Learned From ",$]}))]}))]})):i.jsx("div",e.__assign({className:g.default.overlay,style:q.container},{children:ae()}))};
2
2
  //# sourceMappingURL=GptWebCitation.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),l=require("./GptWebCitationImageFullScreenView.js"),a=require("./GptWebCitationSkeleton.js"),r=require("./utils/citationData.utils.js"),s=require("./GptWebCitation.module.css.js");exports.default=function(o){var u,d,c=o.citationImage,f=o.citationUrl,g=o.skeletonVisitUrl,v=o.showExpandImageButton,x=void 0===v||v,m=o.iconsConfig,p=o.styles,j=o.visitLinkStyles,C=o.skeletonStyles,h=o.skeletonVisitLinkStyles,k=o.isFixedHeight,_=void 0!==k&&k,y=o.onFullscreenChange,b=null!==(u=null==m?void 0:m.MaximizeIcon)&&void 0!==u?u:n.Maximize2,w=null!==(d=null==m?void 0:m.ExternalLinkIcon)&&void 0!==d?d:n.ExternalLink,I=t.useState(!1),L=I[0],S=I[1],E=t.useState("loading"),N=E[0],q=E[1],B=t.useRef(!1);t.useEffect(function(){var e=!0;B.current&&(B.current=!1,null==y||y(!1)),q("loading"),S(!1);var i=new Image;return i.onload=function(){e&&q("loaded")},i.onerror=function(){e&&q("error")},i.src=c,function(){e=!1,i.onload=null,i.onerror=null}},[c,y]),t.useEffect(function(){return function(){B.current&&(B.current=!1,null==y||y(!1))}},[y]);var F="loaded"===N,H=r.sanitizeExternalUrl(f);return i.jsxs("div",e.__assign({className:[s.default.imageCitationWrapper,_?s.default.imageCitationWrapperFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.wrapper},{children:[i.jsx("div",e.__assign({className:[s.default.imageCitationCenter,_?s.default.imageCitationCenterFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.center},{children:F?i.jsxs("div",e.__assign({className:[s.default.imageCitationViewport,_?s.default.imageCitationViewportFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.viewport},{children:[i.jsx("div",e.__assign({className:[s.default.imageCitationScrollContainer,_?s.default.imageCitationScrollContainerFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.scrollContainer},{children:i.jsx("img",{src:c,alt:"Web citation snapshot",className:[s.default.citationImage,_?s.default.citationImageContained:""].filter(Boolean).join(" "),style:null==p?void 0:p.image})})),x&&i.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),B.current=!0,null==y||y(!0),S(!0)},className:s.default.expandImageButton,style:null==p?void 0:p.expandButton,"aria-label":"View citation image in full screen",title:"Expand image"},{children:i.jsx(b,{size:16,strokeWidth:2})}))]})):i.jsx(a.default,{status:"error"===N?"error":"pending",citationUrl:null!=g?g:f,ExternalLinkIcon:null==m?void 0:m.ExternalLinkIcon,styles:C,visitLinkStyles:h,isFixedHeight:_})})),H&&F&&i.jsxs("div",e.__assign({className:s.default.visitLinkRow,style:null==j?void 0:j.row},{children:[i.jsx("span",e.__assign({className:s.default.visitLinkHint,style:null==j?void 0:j.hint},{children:"Open link in new tab to read in detail"})),i.jsxs("a",e.__assign({href:H,target:"_blank",rel:"noreferrer",className:s.default.visitLink,style:null==j?void 0:j.link},{children:["Visit Link",i.jsx(w,{size:16})]}))]})),L&&F&&i.jsx(l.default,{src:c,onClose:function(){B.current=!1,null==y||y(!1),S(!1)},styles:null==p?void 0:p.fullScreen})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("lucide-react"),l=require("./GptWebCitationImageFullScreenView.js"),a=require("./GptWebCitationSkeleton.js"),s=require("./utils/citationData.utils.js"),o=require("./GptWebCitation.module.css.js");exports.default=function(r){var d,u,c=r.citationImage,g=r.citationUrl,f=r.skeletonVisitUrl,v=r.showExpandImageButton,x=void 0===v||v,m=r.iconsConfig,p=r.styles,j=r.visitLinkStyles,k=r.skeletonStyles,C=r.skeletonVisitLinkStyles,h=r.isFixedHeight,_=void 0!==h&&h,y=null!==(d=null==m?void 0:m.MaximizeIcon)&&void 0!==d?d:n.Maximize2,b=null!==(u=null==m?void 0:m.ExternalLinkIcon)&&void 0!==u?u:n.ExternalLink,w=t.useState(!1),I=w[0],L=w[1],S=t.useState("loading"),N=S[0],q=S[1];t.useEffect(function(){var e=!0;q("loading"),L(!1);var i=new Image;return i.onload=function(){e&&q("loaded")},i.onerror=function(){e&&q("error")},i.src=c,function(){e=!1,i.onload=null,i.onerror=null}},[c]);var B="loaded"===N,E=s.sanitizeExternalUrl(g);return i.jsxs("div",e.__assign({className:[o.default.imageCitationWrapper,_?o.default.imageCitationWrapperFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.wrapper},{children:[i.jsx("div",e.__assign({className:[o.default.imageCitationCenter,_?o.default.imageCitationCenterFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.center},{children:B?i.jsxs("div",e.__assign({className:[o.default.imageCitationViewport,_?o.default.imageCitationViewportFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.viewport},{children:[i.jsx("div",e.__assign({className:[o.default.imageCitationScrollContainer,_?o.default.imageCitationScrollContainerFixedHeight:""].filter(Boolean).join(" "),style:null==p?void 0:p.scrollContainer},{children:i.jsx("img",{src:c,alt:"Web citation snapshot",className:[o.default.citationImage,_?o.default.citationImageContained:""].filter(Boolean).join(" "),style:null==p?void 0:p.image})})),x&&i.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),L(!0)},className:o.default.expandImageButton,style:null==p?void 0:p.expandButton,"aria-label":"View citation image in full screen",title:"Expand image"},{children:i.jsx(y,{size:16,strokeWidth:2})}))]})):i.jsx(a.default,{status:"error"===N?"error":"pending",citationUrl:null!=f?f:g,ExternalLinkIcon:null==m?void 0:m.ExternalLinkIcon,styles:k,visitLinkStyles:C,isFixedHeight:_})})),E&&B&&i.jsxs("div",e.__assign({className:o.default.visitLinkRow,style:null==j?void 0:j.row},{children:[i.jsx("span",e.__assign({className:o.default.visitLinkHint,style:null==j?void 0:j.hint},{children:"Open link in new tab to read in detail"})),i.jsxs("a",e.__assign({href:E,target:"_blank",rel:"noreferrer",className:o.default.visitLink,style:null==j?void 0:j.link},{children:["Visit Link",i.jsx(b,{size:16})]}))]})),I&&B&&i.jsx(l.default,{src:c,onClose:function(){return L(!1)},styles:null==p?void 0:p.fullScreen})]}))};
2
2
  //# sourceMappingURL=GptWebCitationImageCitation.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="520px",t="3.25rem";exports.getFixedPanelStyle=function(e){return{height:e,minHeight:e,maxHeight:e,width:"100%",display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box"}},exports.getFixedWebContentStyle=function(){return{flex:1,minHeight:0,maxHeight:"none",overflow:"hidden",display:"flex",flexDirection:"column"}},exports.getParentHeightGptBodyHeight=function(e){return void 0===e&&(e=!0),e?"calc(100% - ".concat(t,")"):"100%"},exports.getParentHeightPanelStyle=function(){return{height:"100%",minHeight:0,width:"100%",display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box"}},exports.resolveFixedHeightLayout=function(i,n){if(void 0===n&&(n=!0),!n){var o=null!=i?i:e;return{contentHeight:o,gptBodyHeight:o,panelHeight:o}}if(i)return{contentHeight:i,gptBodyHeight:i,panelHeight:"calc(".concat(i," + ").concat(t,")")};var r="calc(".concat(e," - ").concat(t,")");return{contentHeight:r,gptBodyHeight:r,panelHeight:e}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="520px",t="3.25rem";exports.getFixedPanelStyle=function(e){return{height:e,minHeight:e,maxHeight:e,width:"100%",display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box"}},exports.getFixedWebContentStyle=function(){return{flex:1,minHeight:0,maxHeight:"none",overflow:"hidden",display:"flex",flexDirection:"column"}},exports.resolveFixedHeightLayout=function(n,i){if(void 0===i&&(i=!0),!i){var o=null!=n?n:e;return{contentHeight:o,gptBodyHeight:o,panelHeight:o}}if(n)return{contentHeight:n,gptBodyHeight:n,panelHeight:"calc(".concat(n," + ").concat(t,")")};var r="calc(".concat(e," - ").concat(t,")");return{contentHeight:r,gptBodyHeight:r,panelHeight:e}};
2
2
  //# sourceMappingURL=fixedHeight.utils.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),i=require("react/jsx-runtime"),a=require("lucide-react"),e=require("dayjs"),n=require("../ScannedDocCitation/ScannedDocCitation.js"),o=require("../InstantLearningCitation/InstantLearningCitationComponent.js"),l=require("../InstantLearningCitation/SlashLoader.js"),r=require("../CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),u=require("../RequirementAiCitations/ImageCitation/ImageCitationContent.js"),s=require("../RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),c=require("../ChatCitation/ChatCitationRenderer.js");function d(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var v=d(e),m=function(t,i,a){if(!t)throw new Error("[CitationOrchestratorComponent] ".concat(i,': missing required field "').concat(a,'" in customMetaData'))},g=function(t,i){if(!Object.values(t).some(Boolean))throw new Error("[CitationOrchestratorComponent] ".concat(i,': missing one of "').concat(Object.keys(t).join('", "'),'" in customMetaData'))};exports.default=function(e){var d,_,h,C,D,f,p,M,x,b,j,I,w,S,q,R,k,y,T,P,L,U,O,z,A,E,F,W,B,G,X,H,N,$,J,K,Q,V,Y,Z,tt,it,at=e.href,et=e.citations,nt=e.children,ot=e.isStreaming,lt=e.onCitationToggle,rt=e.chatCitationConfig;if(ot)return i.jsxs("span",t.__assign({style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontWeight:500,color:"#6D28D9"}},{children:[i.jsx("span",{children:nt}),i.jsx(l.default,{})]}));try{var ut=new URL(at,"http://example.com"),st=ut.searchParams.get("citationNumber"),ct=ut.searchParams.get("decisionStrength");if(!st)return null;var dt=(null==et?void 0:et.find(function(t){var i;return String(null===(i=null==t?void 0:t.customMetaData)||void 0===i?void 0:i.citation_number)===st}))||null;if(!dt)return null;var vt=(null===(d=null==dt?void 0:dt.customMetaData)||void 0===d?void 0:d.citation_type)||((null===(_=dt.customMetaData)||void 0===_?void 0:_.type)||"").replace(/s$/,"");if("scanned_doc_citation"===vt){var mt=null==dt?void 0:dt.customMetaData.value;if(null==mt?void 0:mt.length)return i.jsx(n.default,{pages:mt,subHeadingText:dt.customMetaData.artifact_title});m(null===(h=null==dt?void 0:dt.customMetaData)||void 0===h?void 0:h.gs_url,"scanned_doc_citation","gs_url");var gt=[null===(C=null==dt?void 0:dt.customMetaData)||void 0===C?void 0:C.gs_url],_t=(null!==(D=dt.customMetaData.highlighted_coordinates)&&void 0!==D?D:[]).map(function(t,i){return{pageIndex:i,bboxes:[t]}});return i.jsx(n.default,{images:gt,highlights:_t})}if("IL"===vt){m(dt.customMetaData.il_learning,"IL","il_learning");var ht=nt||(null===(f=dt.customMetaData)||void 0===f?void 0:f.link_text)||(null===(p=dt.customMetaData)||void 0===p?void 0:p.citation_source)||String(null!==(M=dt.customMetaData.citation_number)&&void 0!==M?M:1);return i.jsx(o.default,{citation:dt,linkTitle:ht,onCitationToggle:null!=lt?lt:function(){},decisionStrengthFromUrl:ct||(null===(x=dt.customMetaData)||void 0===x?void 0:x.decision_strength)||""})}if("chat_citation"===vt){var Ct=null!=rt?rt:{},Dt=null===(I=null!==(j=null===(b=null==dt?void 0:dt.customMetaData)||void 0===b?void 0:b.chat_data)&&void 0!==j?j:[])||void 0===I?void 0:I.map(function(i){return t.__assign(t.__assign({},i),{timeStamp:v.default(i.timeStamp)})}),ft=!!(null===(w=null==dt?void 0:dt.customMetaData)||void 0===w?void 0:w.rule_book_content);return i.jsx(c.default,{showRootContainer:null===(S=Ct.showRootContainer)||void 0===S||S,reversePanels:Ct.reversePanels,isRenderedCustomComponent:Ct.isRenderedCustomComponent,modalContainerStyle:Ct.modalContainerStyle,additionalData:Ct.additionalData,closePreview:Ct.closePreview,selectedIdFromReason:null!==(q=Ct.selectedIdFromReason)&&void 0!==q?q:void 0,rootContainer:t.__assign(t.__assign({},Ct.rootContainer),{relevanceScore:dt.customMetaData.relevance_score}),chatContainer:t.__assign(t.__assign({},Ct.chatContainer),{chatData:Dt,summarizedTab:null!==(k=null===(R=Ct.chatContainer)||void 0===R?void 0:R.summarizedTab)&&void 0!==k?k:{chip:{isActive:!0,show:!0}},detailedTab:null!==(T=null===(y=Ct.chatContainer)||void 0===y?void 0:y.detailedTab)&&void 0!==T?T:{chip:{isActive:!1}}}),ruleBookContainer:ft?t.__assign(t.__assign({},Ct.ruleBookContainer),{data:{content:dt.customMetaData.rule_book_content,highlighted_texts:null!==(P=dt.customMetaData.rule_book_highlights)&&void 0!==P?P:[]}}):void 0})}if("gpt_citation"===vt){var pt=null===(L=dt.customMetaData)||void 0===L?void 0:L.value,Mt=null!==(U=null==pt?void 0:pt.text)&&void 0!==U?U:null===(z=null===(O=dt.customMetaData)||void 0===O?void 0:O.data_sources)||void 0===z?void 0:z[0],xt=null!==(A=null==pt?void 0:pt.label)&&void 0!==A?A:null===(F=null===(E=dt.customMetaData)||void 0===E?void 0:E.training_data_title)||void 0===F?void 0:F[0],bt=null!==(W=null==pt?void 0:pt.paraphrase)&&void 0!==W?W:null===(G=null===(B=dt.customMetaData)||void 0===B?void 0:B.paraphrase)||void 0===G?void 0:G[0];return g({data_sources:Mt,training_data_title:xt},"gpt_citation"),i.jsx(r.default,{item:{text:"",dataSource:Mt,trainingDataTitle:xt,paraphrase:bt},headerTitle:"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:a.ChevronDown,ChevronUpIcon:a.ChevronUp,MaximizeIcon:a.Maximize2,CloseIcon:a.X}})}if("web_citation"===vt){!function(t,i,a){m(t,i,a);try{new URL(t)}catch(e){throw new Error("[CitationOrchestratorComponent] ".concat(i,': "').concat(a,'" is not a valid URL: "').concat(t,'"'))}}(null===(X=dt.customMetaData)||void 0===X?void 0:X.link,"web_citation","link");var jt=dt.customMetaData.link,It=nt||(null===(H=dt.customMetaData)||void 0===H?void 0:H.citation_source)||jt;return(null===(N=dt.customMetaData)||void 0===N?void 0:N.screenshot_url)?i.jsx(s.default,{url:jt,label:It,gsUtilPath:null===($=dt.customMetaData)||void 0===$?void 0:$.gs_util_path,signedUrl:null===(J=dt.customMetaData)||void 0===J?void 0:J.screenshot_url,relevanceScore:null===(K=dt.customMetaData)||void 0===K?void 0:K.relevance_score,visitIcon:a.ExternalLink,PreviewDialogCloseIcon:a.X}):i.jsx("a",t.__assign({href:jt,target:"_blank",rel:"noreferrer"},{children:It}))}if("image_citation"===vt)return g({gs_util_path:null===(Q=dt.customMetaData)||void 0===Q?void 0:Q.gs_util_path,signed_url:null===(V=dt.customMetaData)||void 0===V?void 0:V.signed_url},"image_citation"),i.jsx(u.default,{citationTitle:nt||(null===(Y=dt.customMetaData)||void 0===Y?void 0:Y.citation_source),gsUtilPath:null===(Z=dt.customMetaData)||void 0===Z?void 0:Z.gs_util_path,signedUrl:null===(tt=dt.customMetaData)||void 0===tt?void 0:tt.signed_url,relevanceScore:null===(it=dt.customMetaData)||void 0===it?void 0:it.relevance_score})}catch(t){return console.error(t),null}return null};
2
+ //# sourceMappingURL=ParentCitationComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParentCitationComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),s=require("@react-pdf-viewer/core"),i=require("./PdfStyle.js"),n="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js";exports.default=function(t){var l=t.pdfUrl,o=t.plugins,a=t.onLoad,d=t.customStyles,u=t.onPageChange,p=t.defaultScale;return r.jsx("div",e.__assign({style:e.__assign(e.__assign({},i.pdfStyles.pdfConatiner),null==d?void 0:d.pdfContainer)},{children:r.jsx(s.Worker,e.__assign({workerUrl:n},{children:r.jsx(s.Viewer,{fileUrl:l,defaultScale:p,plugins:o,onDocumentLoad:a,onPageChange:u})}))}))},exports.pdfWorker=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),n=require("@react-pdf-viewer/core"),s=require("./PdfStyle.js"),t="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js";exports.default=function(i){var a=i.pdfUrl,d=i.plugins,l=i.onLoad,o=i.customStyles,u=i.onPageChange,p=i.defaultScale,f=i.renderPage,g=i.setRenderRange;return r.jsx("div",e.__assign({style:e.__assign(e.__assign({},s.pdfStyles.pdfConatiner),null==o?void 0:o.pdfContainer)},{children:r.jsx(n.Worker,e.__assign({workerUrl:t},{children:r.jsx(n.Viewer,{fileUrl:a,defaultScale:p,plugins:d,onDocumentLoad:l,onPageChange:u,renderPage:f,setRenderRange:g})}))}))},exports.pdfWorker=t;
2
2
  //# sourceMappingURL=PdfContainer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pdfStyles={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",width:"100%",minWidth:0,boxSizing:"border-box"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{height:"100%",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center"}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pdfStyles={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},header:{display:"flex",flexShrink:0,justifyContent:"space-between",alignItems:"center",position:"relative",width:"100%",minWidth:0,boxSizing:"border-box"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{flex:"1 1 0",height:0,minHeight:0,minWidth:0,width:"100%",boxSizing:"border-box",overflow:"hidden",display:"block"}};
2
2
  //# sourceMappingURL=PdfStyle.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("./PdfStyle.js"),s=require("../../assests/svg/PdfViewerIcons.js"),o=require("@mui/material"),r=require("lucide-react");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(i);exports.default=function(i){i.highlightIndex;var l=i.totalHighlights,d=i.controls,c=i.currentPosition,p=i.pdfName,g=i.onClose,x=i.pdfUrl,u=i.viewerRef,h=i.customStyles,f=i.customClasses,_=i.customIcons,v=i.headerAction,y=i.isZoomEnabled,m=void 0===y||y,j=i.showHighlightsAction,b=void 0===j||j,w=i.showFullScreenAction,S=void 0===w||w,k=i.currentSegment,I=i.segmentTooltipText,F=void 0===I?"Details of current segment":I,C=i.currentPage,D=i.totalPages,W=i.onPageNavigate,E=d.ZoomInButton,B=d.ZoomOutButton,P=d.ZoomPopover,T=d.goToPrevious,z=d.goToNext,A=a.default.useState(String(C)),L=A[0],q=A[1];a.default.useEffect(function(){q(String(C))},[C]);var N={padding:"4px",borderRadius:"6px",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",flexShrink:0},R=function(e){return String(e).padStart(2,"0")};return n.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({marginBottom:"12px",background:"#FAFAFA",borderBottom:"1px solid #F3F4F6",borderTopLeftRadius:"12px",borderTopRightRadius:"12px"},t.pdfStyles.header),null==h?void 0:h.header),{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"12px"})},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",minWidth:0}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px",flex:1,minWidth:0,overflow:"hidden"}},{children:[n.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},{borderRadius:"21px",border:"6px solid #E8F3FF",background:"#D5E8FF",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",boxSizing:"content-box"}),null==h?void 0:h.pdfIconWrapper),{flexShrink:0})},{children:(null==_?void 0:_.pdfIcon)||n.jsx(s.DefaultPdfIcon,{})})),n.jsx(o.Tooltip,e.__assign({title:p||"",arrow:!0,placement:"top"},{children:n.jsx("div",e.__assign({style:{flex:1,minWidth:0,overflow:"hidden"}},{children:n.jsx("span",e.__assign({style:e.__assign({display:"block",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:500,cursor:"default"},null==h?void 0:h.pdfName),className:null==f?void 0:f.pdfName},{children:p}))}))}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:b?"16px":"2px",color:"#4B5563",flexShrink:0,whiteSpace:"nowrap",minWidth:"fit-content"}},{children:[D>0&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",color:"#475467",flexShrink:0,whiteSpace:"nowrap"}},{children:[n.jsx("input",{"aria-label":"Current page",inputMode:"numeric",pattern:"[0-9]*",value:L,onChange:function(e){var n=e.target.value.replace(/\D/g,"");q(n)},onBlur:function(){var e=Number(L);if(!Number.isInteger(e)||e<1)q(String(C));else{var n=D?Math.min(e,D):e;W(n),q(String(n))}},onKeyDown:function(e){"Enter"===e.key&&e.currentTarget.blur(),"Escape"===e.key&&(q(String(C)),e.currentTarget.blur())},style:{width:"40px",height:"28px",border:"1px solid #E5E7EB",borderRadius:"4px",background:"#FFFFFF",color:"#111827",fontSize:"14px",fontWeight:500,textAlign:"center",outline:"none",boxSizing:"border-box"}}),n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#111827"}},{children:"/"})),n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#111827"}},{children:String(D)}))]})),m&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx(B,{}),n.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:500,width:"56px",textAlign:"center"}},{children:n.jsx(P,{})})),n.jsx(E,{})]})),!!l&&b&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsxs("span",e.__assign({style:{fontSize:"14px",color:"#475467",fontWeight:500,lineHeight:1}},{children:[c," of ",l]})),n.jsx("button",e.__assign({style:{background:"none",border:"none",cursor:c<=1?"not-allowed":"pointer",padding:"2px 4px",color:c<=1?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:T,disabled:c<=1},{children:n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n.jsx("path",{d:"M2 8L6 4L10 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))})),n.jsx("button",e.__assign({style:{background:"none",border:"none",cursor:c===l?"not-allowed":"pointer",padding:"2px 4px",color:c===l?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:z,disabled:c===l},{children:n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n.jsx("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}))]})),n.jsx("div",{style:{width:"1px",height:"20px",background:"#D1D5DB",margin:"0 4px",flexShrink:0}}),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0,whiteSpace:"nowrap"}},{children:[!1!==S&&((null==v?void 0:v.icon)&&(null==v?void 0:v.onClick)?n.jsx(o.Tooltip,e.__assign({title:(null==v?void 0:v.tooltip)||"",arrow:!0,placement:"top"},{children:n.jsx("div",e.__assign({onClick:v.onClick,style:e.__assign({display:"flex",alignItems:"center",cursor:"pointer"},N)},{children:v.icon}))})):n.jsx("button",e.__assign({onClick:function(){var e=null==u?void 0:u.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(function(e){console.error("Error attempting to enable fullscreen: ".concat(e.message))}))},style:N,title:"Full Screen"},{children:(null==_?void 0:_.fullScreenIcon)||n.jsx(s.DefaultFullScreenIcon,{})}))),x&&n.jsx("a",e.__assign({href:x,target:"_blank",rel:"noopener noreferrer",style:N,title:"Open in new tab"},{children:(null==_?void 0:_.downloadIcon)||n.jsx(s.DefaultDownloadIcon,{})})),g&&n.jsx("button",e.__assign({onClick:g,style:N,title:"Close"},{children:(null==_?void 0:_.closeIcon)||n.jsx(s.DefaultCloseIcon,{})}))]}))]}))]})),k&&n.jsxs("div",e.__assign({style:{background:"#EEF2FF",border:"1px solid #A5B4FC",borderRadius:"8px",color:"#4F46E5",display:"flex",alignItems:"center",gap:"12px",minWidth:0,padding:"10px 16px",fontSize:"12px",fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:[n.jsx(o.Tooltip,e.__assign({title:F,arrow:!0,placement:"top"},{children:n.jsx(r.Info,{size:16,color:"#4F46E5",strokeWidth:2,style:{flexShrink:0}})})),n.jsxs("span",e.__assign({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:["Viewing ",k.title," • Pages ",R(k.start_page),"-",R(k.end_page)]}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("./PdfStyle.js"),o=require("../../assests/svg/PdfViewerIcons.js"),r=require("@mui/material/Tooltip"),s=require("lucide-react"),l=require("@mui/icons-material/RotateRight");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=a(t),c=a(r),u=a(l);exports.default=function(t){t.highlightIndex;var r=t.totalHighlights,l=t.controls,a=t.currentPosition,p=t.pdfName,g=t.onClose,x=t.pdfUrl,h=t.viewerRef,f=t.customStyles,_=t.customClasses,y=t.customIcons,m=t.headerAction,v=t.isZoomEnabled,j=void 0===v||v,b=t.showHighlightsAction,w=void 0===b||b,k=t.showFullScreenAction,S=void 0===k||k,I=t.currentSegment,C=t.segmentTooltipText,F=void 0===C?"Details of current segment":C,T=t.currentPage,W=t.totalPages,D=t.onPageNavigate,E=t.onRotatePage,z=t.currentPageRotation,R=void 0===z?0:z,P=t.showRotateButton,L=void 0===P||P,M=l.ZoomPopover,B=l.goToPrevious,q=l.goToNext,H=d.default.useState(String(T)),N=H[0],A=H[1];d.default.useEffect(function(){A(String(T))},[T]);var O={padding:"4px",borderRadius:"6px",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",flexShrink:0},Z=function(e){return String(e).padStart(2,"0")};return n.jsxs("div",e.__assign({style:e.__assign(e.__assign(e.__assign({marginBottom:"12px",backgroundColor:"#F1F5F9",borderBottom:"1px solid #F3F4F6",borderTopLeftRadius:"12px",borderTopRightRadius:"12px"},i.pdfStyles.header),null==f?void 0:f.header),{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"12px"})},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",columnGap:"16px",rowGap:"12px",minWidth:0}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"12px",flex:"1 1 180px",minWidth:0}},{children:[n.jsx("div",e.__assign({style:e.__assign(e.__assign(e.__assign({},{borderRadius:"21px",border:"6px solid #E8F3FF",background:"#D5E8FF",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",boxSizing:"content-box"}),null==f?void 0:f.pdfIconWrapper),{flexShrink:0})},{children:(null==y?void 0:y.pdfIcon)||n.jsx(o.DefaultPdfIcon,{})})),n.jsx(c.default,e.__assign({title:p||"",arrow:!0,placement:"top"},{children:n.jsx("div",e.__assign({style:{flex:1,minWidth:0,overflow:"hidden"}},{children:n.jsx("span",e.__assign({style:e.__assign({display:"block",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:500,cursor:"default"},null==f?void 0:f.pdfName),className:null==_?void 0:_.pdfName},{children:p}))}))}))]})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:w?"16px":"2px",color:"#4B5563",flex:"0 1 auto",marginLeft:"auto",whiteSpace:"nowrap",minWidth:0,maxWidth:"100%",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin"}},{children:[W>0&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",color:"#475467",flexShrink:0,whiteSpace:"nowrap"}},{children:[n.jsx("input",{"aria-label":"Current page",inputMode:"numeric",pattern:"[0-9]*",value:N,onChange:function(e){var n=e.target.value.replace(/\D/g,"");A(n)},onBlur:function(){var e=Number(N);if(!Number.isInteger(e)||e<1)A(String(T));else{var n=W?Math.min(e,W):e;D(n),A(String(n))}},onKeyDown:function(e){"Enter"===e.key&&e.currentTarget.blur(),"Escape"===e.key&&(A(String(T)),e.currentTarget.blur())},style:{width:"40px",height:"28px",border:"1px solid #E5E7EB",borderRadius:"4px",background:"#FFFFFF",color:"#111827",fontSize:"14px",fontWeight:500,textAlign:"center",outline:"none",boxSizing:"border-box"}}),n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#111827"}},{children:"/"})),n.jsx("span",e.__assign({style:{fontSize:"14px",fontWeight:500,color:"#111827"}},{children:String(W)}))]})),j&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("button",e.__assign({onClick:function(){l&&"function"==typeof l.zoomTo&&l.zoomTo(function(e){return e-.1})},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",color:"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px",transition:"color 0.2s ease"},onMouseEnter:function(e){e.currentTarget&&(e.currentTarget.style.color="#1976d2")},onMouseLeave:function(e){e.currentTarget&&(e.currentTarget.style.color="#475467")},title:"Zoom Out","aria-label":"Zoom out"},{children:n.jsx(s.Minus,{size:16,strokeWidth:2})})),n.jsx("div",e.__assign({style:{fontSize:"14px",fontWeight:500,width:"56px",textAlign:"center"}},{children:n.jsx(M,{})})),n.jsx("button",e.__assign({onClick:function(){l&&"function"==typeof l.zoomTo&&l.zoomTo(function(e){return e+.1})},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",color:"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px",transition:"color 0.2s ease"},onMouseEnter:function(e){e.currentTarget&&(e.currentTarget.style.color="#1976d2")},onMouseLeave:function(e){e.currentTarget&&(e.currentTarget.style.color="#475467")},title:"Zoom In","aria-label":"Zoom in"},{children:n.jsx(s.Plus,{size:16,strokeWidth:2})}))]})),L&&E&&W>0&&n.jsx(c.default,e.__assign({title:"Rotate page (".concat(R,"°)")},{children:n.jsx("button",e.__assign({onClick:function(){E&&"function"==typeof E&&E()},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",color:0!==R?"#1976d2":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px",transition:"color 0.2s ease"},onMouseEnter:function(e){e.currentTarget&&(e.currentTarget.style.color="#1976d2")},onMouseLeave:function(e){e.currentTarget&&(e.currentTarget.style.color=0!==R?"#1976d2":"#475467")},"aria-label":"Rotate current page"},{children:n.jsx(u.default,{sx:{fontSize:"18px"}})}))})),!!r&&w&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsxs("span",e.__assign({style:{fontSize:"14px",color:"#475467",fontWeight:500,lineHeight:1}},{children:[a," of ",r]})),n.jsx("button",e.__assign({style:{background:"none",border:"none",cursor:a<=1?"not-allowed":"pointer",padding:"2px 4px",color:a<=1?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:B,disabled:a<=1},{children:n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n.jsx("path",{d:"M2 8L6 4L10 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))})),n.jsx("button",e.__assign({style:{background:"none",border:"none",cursor:a===r?"not-allowed":"pointer",padding:"2px 4px",color:a===r?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:q,disabled:a===r},{children:n.jsx("svg",e.__assign({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n.jsx("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}))]})),n.jsx("div",{style:{width:"1px",height:"20px",background:"#D1D5DB",margin:"0 4px",flexShrink:0}}),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0,whiteSpace:"nowrap"}},{children:[!1!==S&&((null==m?void 0:m.icon)&&(null==m?void 0:m.onClick)?n.jsx(c.default,e.__assign({title:(null==m?void 0:m.tooltip)||"",arrow:!0,placement:"top"},{children:n.jsx("div",e.__assign({onClick:m.onClick,style:e.__assign({display:"flex",alignItems:"center",cursor:"pointer"},O)},{children:m.icon}))})):n.jsx("button",e.__assign({onClick:function(){var e=null==h?void 0:h.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(function(e){console.error("Error attempting to enable fullscreen: ".concat(e.message))}))},style:O,title:"Full Screen"},{children:(null==y?void 0:y.fullScreenIcon)||n.jsx(s.Expand,{size:20,color:"#475467",strokeWidth:2})}))),x&&n.jsx("a",e.__assign({href:x,target:"_blank",rel:"noopener noreferrer",style:O,title:"Open in new tab"},{children:(null==y?void 0:y.downloadIcon)||n.jsx(o.DefaultDownloadIcon,{})})),g&&n.jsx("button",e.__assign({onClick:g,style:O,title:"Close"},{children:(null==y?void 0:y.closeIcon)||n.jsx(o.DefaultCloseIcon,{})}))]}))]}))]})),I&&n.jsxs("div",e.__assign({style:{background:"#EEF2FF",border:"1px solid #A5B4FC",borderRadius:"8px",color:"#4F46E5",display:"flex",alignItems:"center",gap:"12px",minWidth:0,padding:"10px 16px",fontSize:"12px",fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:[n.jsx(c.default,e.__assign({title:F,arrow:!0,placement:"top"},{children:n.jsx(s.Info,{size:16,color:"#4F46E5",strokeWidth:2,style:{flexShrink:0}})})),n.jsx("span",e.__assign({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:n.jsx(c.default,e.__assign({title:I.title,arrow:!0,placement:"top"},{children:n.jsxs("span",{children:["Viewing ",I.title," • Pages ",Z(I.start_page),"-",Z(I.end_page)]})}))}))]}))]}))};
2
2
  //# sourceMappingURL=PdfToolbar.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("@react-pdf-viewer/core"),o=require("./PdfContainer.js"),n=require("./PdfToolbar.js"),r=require("./PdfStyle.js"),a=require("./usePdfHighlight.js");require("@react-pdf-viewer/zoom/lib/styles/index.css"),require("@react-pdf-viewer/page-navigation/lib/styles/index.css"),require("@react-pdf-viewer/core/lib/styles/index.css"),require("@react-pdf-viewer/search/lib/styles/index.css");var s=require("react"),l=require("../ScannedDocCitation/ScannedDocCitation.js"),u=function(e){switch(e){case"ActualSize":return i.SpecialZoomLevel.ActualSize;case"PageFit":return i.SpecialZoomLevel.PageFit;case"PageWidth":return i.SpecialZoomLevel.PageWidth;default:return null!=e?e:i.SpecialZoomLevel.PageWidth}};exports.default=function(c){var d,g=c.pdfUrl,f=c.highlightText,h=c.highlightPages,v=c.highlightCordinatePages,p=c.highlightColor,m=void 0===p?"yellow":p,x=c.activeHighlightColor,S=void 0===x?"#f7dc51":x,_=c.jumpToPageValue,P=void 0===_?0:_,T=c.pdfName,C=c.onClose,w=c.customStyles,y=c.customClasses,b=c.customIcons,A=c.useCoordinates,q=c.fallbackPages,j=c.activeCitationIndex,H=c.onActiveCitationChange,I=c.headerAction,F=c.isZoomEnabled,Z=void 0===F||F,L=c.showHighlightsAction,N=void 0===L||L,z=c.defaultScale,R=void 0===z?i.SpecialZoomLevel.ActualSize:z,D=c.useRange,E=void 0!==D&&D,M=c.rangeOfPages,V=void 0===M?null:M,W=c.showFullScreenAction,O=void 0===W||W,B=c.segments,U=void 0===B?[{title:"Document 2",start_page:52,end_page:52,page_count:1}]:B,k=c.segmentTooltipText,J=s.useRef(null),K=s.useState(0),G=K[0],Q=K[1],X=s.useState(0),Y=X[0],$=X[1],ee=s.useMemo(function(){if(A)return new Set(v.map(function(e){return e.pageIndex}));var e=new Set;return Object.values(h).forEach(function(t){t>0&&e.add(t-1)}),e},[v,h,A]),te=(d=f)&&0!==d.length?d.filter(function(e){return!d.some(function(t){return t!==e&&t.includes(e)})}):d,ie=a.PdfHighlightControls(te,A?{}:h,J,ee,A,A?v:[],m,S),oe=ie.highlightIndex,ne=ie.cursorIndex,re=ie.setCursorIndex,ae=ie.orderedKeys,se=ie.totalHighlights,le=ie.getValidPosition,ue=ie.tryJump,ce=ie.jumpToPage,de=ie.zoomTo,ge=ie.plugins,fe=ie.controls,he=ie.hideNonTargetHighlights,ve=ie.deduplicateHighlights,pe=le(ne),me=s.useMemo(function(){var e=G+1;return U.find(function(t){return e>=t.start_page&&e<=t.end_page})},[G,U]);s.useEffect(function(){void 0!==j&&j!==ne&&re(j)},[j]);var xe=e.__assign(e.__assign({},fe),{goToNext:function(){ne>=se-1||(fe.goToNext(),H&&H(ne+1))},goToPrevious:function(){ne<=0||(fe.goToPrevious(),H&&H(ne-1))}});if(!g)return t.jsx(l.default,{pages:q,activeCitationIndex:j,onActiveCitationChange:H,headerAction:I});return t.jsxs("div",e.__assign({ref:J,className:(null==y?void 0:y.pdfViewerWrapper)||"",style:e.__assign(e.__assign(e.__assign({height:"100%",minHeight:0,minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column"},r.pdfStyles.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==w?void 0:w.pdfViewer)},{children:[t.jsx(n.default,{highlightIndex:oe,totalHighlights:se,controls:xe,currentPosition:pe,pdfName:T,onClose:C,pdfUrl:g,viewerRef:J,customStyles:w,customClasses:y,customIcons:b,headerAction:I,isZoomEnabled:Z,showHighlightsAction:N,showFullScreenAction:O,currentSegment:me,segmentTooltipText:k,currentPage:G+1,totalPages:Y,onPageNavigate:function(e){var t=Math.min(Math.max(e,1),Y||e);Q(t-1),ce(t-1)}}),t.jsx(o.default,{defaultScale:u(R),pdfUrl:g,plugins:ge,customStyles:w,onLoad:function(t){$(t.doc.numPages);var o=!A&&!E&&P<=0;if(de(i.SpecialZoomLevel.ActualSize),P>0&&!E){var n=P-1,r=ae[n],a=h[r],s=v[n];re(n),console.log(s,"cordinateTargetHighlight"),A&&s.pageIndex>0&&ce(s.pageIndex),a>0&&(setTimeout(function(){he(ee),ve(a-1)},1e3),A||ce(a-1))}else if(E&&V&&2===V.length){e.__awaiter(void 0,void 0,void 0,function(){var t,i,o,n,r;return e.__generator(this,function(e){switch(e.label){case 0:t=V[0],i=V[1],o=t,e.label=1;case 1:return o<=i?(ce(n=o-1),[4,new Promise(function(e){return setTimeout(e,1e3)})]):[3,4];case 2:if(e.sent(),he(ee),(r=ve(n))&&r>0)return[3,4];e.label=3;case 3:return o++,[3,1];case 4:return[2]}})})}else if(!A&&h){var l=ae.find(function(e){return h[e]>0});if(void 0!==l){var u=h[l]-1;ce(u),setTimeout(function(){he(ee),ve(u)},1e3)}}requestAnimationFrame(function(){o&&ue(),!A&&P>0&&!E&&function(){if(J.current){var e=P-1,t=ae[e],i=h[t],o=i>0?i-1:0,n={};ae.forEach(function(e,t){var i=h[e];i>0&&(n[i]||(n[i]=[]),n[i].push(t))});var r=(n[i]||[]).indexOf(e),a=0,s=function(){var e,t;if(!(++a>40)){var i=null===(e=J.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(i){var n=null===(t=J.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(o,'"]'));if(n){var l=i.getBoundingClientRect(),u=n.getBoundingClientRect();if(u.top<l.bottom&&u.bottom>l.top){var c=n.querySelectorAll(".rpv-search__highlight")[r];if(c){var d=c.getBoundingClientRect(),g=i.scrollTop+(d.top-l.top)-i.clientHeight/2+d.height/2;i.scrollTo({top:g,behavior:"smooth"})}else setTimeout(s,100)}else setTimeout(s,100)}else setTimeout(s,100)}else setTimeout(s,100)}};setTimeout(s,500)}}()})},onPageChange:function(e){var t=e.currentPage;Q(t),ee.has(t)?(ve(t),he(ee)):he(ee)}})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("@react-pdf-viewer/core"),r=require("./PdfContainer.js"),i=require("./PdfToolbar.js"),o=require("./PdfStyle.js"),a=require("./usePdfHighlight.js"),u=require("./rotationManager.js");require("@react-pdf-viewer/zoom/lib/styles/index.css"),require("@react-pdf-viewer/page-navigation/lib/styles/index.css"),require("@react-pdf-viewer/core/lib/styles/index.css"),require("@react-pdf-viewer/search/lib/styles/index.css");var l=require("react"),s=require("../ScannedDocCitation/ScannedDocCitation.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(l);exports.default=function(c){var g=c.pdfUrl,f=c.highlightText,v=c.highlightPages,h=c.highlightCordinatePages,p=c.highlightColor,m=void 0===p?"yellow":p,_=c.activeHighlightColor,y=void 0===_?"#f7dc51":_,w=c.jumpToPageValue,x=void 0===w?0:w,P=c.pdfName,b=c.onClose,S=c.customStyles,T=c.customClasses,C=c.customIcons,q=c.useCoordinates,R=c.fallbackPages,A=c.activeCitationIndex,L=c.onActiveCitationChange,M=c.headerAction,j=c.isZoomEnabled,I=void 0===j||j,E=c.showHighlightsAction,F=void 0===E||E,H=c.defaultScale,N=void 0===H?n.SpecialZoomLevel.ActualSize:H,B=c.useRange,Z=void 0!==B&&B,D=c.rangeOfPages,O=void 0===D?null:D,V=c.showFullScreenAction,W=void 0===V||V,k=c.showRotateButton,z=void 0!==k&&k,U=c.segments,J=void 0===U?[{title:"Document 2",start_page:52,end_page:52,page_count:1}]:U,K=c.segmentTooltipText,G=c.onCurrentPageChange,Q=c.navigationRequest,X=c.onNavigationSettled,Y=c.disablePdfAnnotations,$=void 0!==Y&&Y,ee=c.disablePdfTextLayer,te=void 0!==ee&&ee,ne=c.renderPage,re=c.setRenderRange,ie=l.useRef(null),oe=function(e){switch(e){case"ActualSize":return n.SpecialZoomLevel.ActualSize;case"PageFit":return n.SpecialZoomLevel.PageFit;case"PageWidth":return n.SpecialZoomLevel.PageWidth;default:return null!=e?e:n.SpecialZoomLevel.PageWidth}}(N),ae=l.useState(0),ue=ae[0],le=ae[1],se=l.useState(0),ce=se[0],de=se[1],ge=l.useState(0),fe=ge[0],ve=ge[1],he=l.useRef(null),pe=l.useRef(null),me=l.useRef(0),_e=l.useRef(null),ye=l.useMemo(function(){if(!g)return"";try{return new URL(g,window.location.origin).pathname.split("/").pop()||"default"}catch(e){return"default"}},[g]);l.useEffect(function(){ye&&u.rotationManager.setPdfIdentifier(ye)},[ye]);l.useEffect(function(){return u.rotationManager.onRotationChange(function(e,t){e===ue+1&&ve(t)})},[ue]),l.useEffect(function(){var e=new MutationObserver(function(){var e,t=null===(e=ie.current)||void 0===e?void 0:e.querySelectorAll('[data-testid^="core__page-layer-"]'),n=new Set;null==t||t.forEach(function(e){var t,r=null===(t=e.getAttribute("data-testid"))||void 0===t?void 0:t.match(/core__page-layer-(\d+)/);if(r&&r.length>=2){var i=parseInt(r[1],10)+1;n.has(i)||(u.rotationManager.registerPageElement(i,e),n.add(i))}})});return ie.current&&(e.observe(ie.current,{childList:!0,subtree:!0,attributes:!1}),_e.current=e),function(){e.disconnect(),_e.current=null}},[]),l.useEffect(function(){return function(){u.rotationManager.clearAll(),_e.current&&_e.current.disconnect()}},[]),l.useEffect(function(){var e=ue+1;ve(u.rotationManager.getRotation(e))},[ue]);var we,xe=l.useMemo(function(){return $||te?function(n){var r=te?t.jsx("div",e.__assign({"aria-hidden":"true",style:{display:"none"}},{children:n.textLayer.children})):n.textLayer.children,i=e.__assign(e.__assign({},n),{annotationLayer:e.__assign(e.__assign({},n.annotationLayer),{children:$?null:n.annotationLayer.children}),textLayer:e.__assign(e.__assign({},n.textLayer),{children:r})});return ne?ne(i):t.jsxs(t.Fragment,{children:[n.canvasLayer.children,r,!$&&n.annotationLayer.children]})}:ne},[$,te,ne]),Pe=l.useMemo(function(){if(q)return new Set(h.map(function(e){return e.pageIndex}));var e=new Set;return Object.values(v).forEach(function(t){t>0&&e.add(t-1)}),e},[h,v,q]),be=(we=f)&&0!==we.length?we.filter(function(e){return!we.some(function(t){return t!==e&&t.includes(e)})}):we,Se=a.PdfHighlightControls(be,q?{}:v,ie,Pe,q,q?h:[],m,y),Te=Se.highlightIndex,Ce=Se.cursorIndex,qe=Se.setCursorIndex,Re=Se.orderedKeys,Ae=Se.totalHighlights,Le=Se.getValidPosition,Me=Se.tryJump,je=Se.jumpToPage,Ie=Se.plugins,Ee=Se.controls,Fe=Se.hideNonTargetHighlights,He=Se.deduplicateHighlights,Ne=Le(Ce),Be=l.useMemo(function(){var e=ue+1;return J.find(function(t){return e>=t.start_page&&e<=t.end_page})},[ue,J]);l.useEffect(function(){void 0!==A&&A!==Ce&&qe(A)},[A]);var Ze=e.__assign(e.__assign({},Ee),{goToNext:function(){Ce>=Ae-1||(Ee.goToNext(),L&&L(Ce+1))},goToPrevious:function(){Ce<=0||(Ee.goToPrevious(),L&&L(Ce-1))}}),De=d.default.useCallback(function(e,t){me.current+=1;var n=me.current;null!=pe.current&&window.clearTimeout(pe.current);var r=null,i=0,o=0,a=function(){var u,l;if(me.current===n){o+=1;var s=null===(u=ie.current)||void 0===u?void 0:u.querySelector(".rpv-core__inner-pages"),c=null===(l=ie.current)||void 0===l?void 0:l.querySelector('[data-testid="core__page-layer-'.concat(t-1,'"]'));if(!s||!c)return o>=40?(pe.current=null,void(null==X||X({pageNumber:t,requestId:e.requestId}))):void(pe.current=window.setTimeout(a,50));r===s.scrollTop?i+=1:(r=s.scrollTop,i=0);var d=s.getBoundingClientRect(),g=c.getBoundingClientRect(),f=Boolean(d&&g&&g.bottom>d.top&&g.top<d.bottom);if(i>=2&&f||o>=40)return pe.current=null,void(null==X||X({pageNumber:t,requestId:e.requestId}));pe.current=window.setTimeout(a,50)}};pe.current=window.setTimeout(a,50)},[X]);if(l.useEffect(function(){return function(){me.current+=1,null!=pe.current&&window.clearTimeout(pe.current)}},[]),l.useEffect(function(){var e;if(Q&&!(ce<=0)){var t=Math.min(Math.max(Math.trunc(Q.pageNumber),1),ce),n="".concat(null!==(e=Q.requestId)&&void 0!==e?e:t,":").concat(t);he.current!==n&&(he.current=n,le(t-1),je(t-1),De(Q,t))}},[je,Q,ce,De]),!g)return t.jsx(s.default,{pages:R,activeCitationIndex:A,onActiveCitationChange:L,headerAction:M});return t.jsxs("div",e.__assign({ref:ie,className:(null==T?void 0:T.pdfViewerWrapper)||"","data-disable-pdf-annotations":$?"true":void 0,"data-pdf-page-fit":oe===n.SpecialZoomLevel.PageFit?"true":void 0,style:e.__assign(e.__assign(e.__assign(e.__assign({height:"100%",minHeight:0,minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column"},o.pdfStyles.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==S?void 0:S.pdfViewer),{backgroundColor:"#F1F5F9"})},{children:[t.jsx(i.default,{highlightIndex:Te,totalHighlights:Ae,controls:Ze,currentPosition:Ne,pdfName:P,onClose:b,pdfUrl:g,viewerRef:ie,customStyles:S,customClasses:T,customIcons:C,headerAction:M,isZoomEnabled:I,showHighlightsAction:F,showFullScreenAction:W,currentSegment:Be,segmentTooltipText:K,currentPage:ue+1,totalPages:ce,onPageNavigate:function(e){var t=Math.min(Math.max(e,1),ce||e);le(t-1),je(t-1)},onRotatePage:function(){var e=ue+1;u.rotationManager.rotatePageBy90(e),ve(u.rotationManager.getRotation(e))},currentPageRotation:fe,showRotateButton:z}),t.jsx(r.default,{defaultScale:oe,pdfUrl:g,plugins:Ie,customStyles:S,onLoad:function(t){de(t.doc.numPages);var n=!q&&!Z&&x<=0;if(x>0&&!Z){var r=x-1,i=Re[r],o=v[i],a=h[r];qe(r),console.log(a,"cordinateTargetHighlight"),q&&a.pageIndex>0&&je(a.pageIndex),o>0&&(setTimeout(function(){Fe(Pe),He(o-1)},1e3),q||je(o-1))}else if(Z&&O&&2===O.length){e.__awaiter(void 0,void 0,void 0,function(){var t,n,r,i,o;return e.__generator(this,function(e){switch(e.label){case 0:t=O[0],n=O[1],r=t,e.label=1;case 1:return r<=n?(je(i=r-1),[4,new Promise(function(e){return setTimeout(e,1e3)})]):[3,4];case 2:if(e.sent(),Fe(Pe),(o=He(i))&&o>0)return[3,4];e.label=3;case 3:return r++,[3,1];case 4:return[2]}})})}else if(!q&&v){var u=Re.find(function(e){return v[e]>0});if(void 0!==u){var l=v[u]-1;je(l),setTimeout(function(){Fe(Pe),He(l)},1e3)}}requestAnimationFrame(function(){n&&Me(),!q&&x>0&&!Z&&function(){if(ie.current){var e=x-1,t=Re[e],n=v[t],r=n>0?n-1:0,i={};Re.forEach(function(e,t){var n=v[e];n>0&&(i[n]||(i[n]=[]),i[n].push(t))});var o=(i[n]||[]).indexOf(e),a=0,u=function(){var e,t;if(!(++a>40)){var n=null===(e=ie.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(n){var i=null===(t=ie.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(r,'"]'));if(i){var l=n.getBoundingClientRect(),s=i.getBoundingClientRect();if(s.top<l.bottom&&s.bottom>l.top){var c=i.querySelectorAll(".rpv-search__highlight")[o];if(c){var d=c.getBoundingClientRect(),g=n.scrollTop+(d.top-l.top)-n.clientHeight/2+d.height/2;n.scrollTo({top:g,behavior:"smooth"})}else setTimeout(u,100)}else setTimeout(u,100)}else setTimeout(u,100)}else setTimeout(u,100)}};setTimeout(u,500)}}()})},onPageChange:function(e){var t=e.currentPage;le(t),null==G||G(t+1),Pe.has(t)?(He(t),Fe(Pe)):Fe(Pe)},renderPage:xe,setRenderRange:re})]}))};
2
2
  //# sourceMappingURL=PdfViewer.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),o=require("@mui/icons-material/ExpandMore"),a=require("@mui/material/Box"),s=require("@mui/material/Button"),d=require("@mui/material/ButtonBase"),l=require("@mui/material/Divider"),u=require("@mui/material/IconButton"),c=require("@mui/material/Paper"),x=require("@mui/material/Radio"),f=require("@mui/material/Stack"),m=require("@mui/material/Typography"),g=require("./CognitiveIcon.js"),h=require("./infoAlert.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=p(n),j=p(r),v=p(o),b=p(a),y=p(s),C=p(d),E=p(l),S=p(u),w=p(c),R=p(x),q=p(f),A=p(m),M=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)},k=function(e){return"KEEP"===e||"SPLIT_HERE"===e||"MERGE_NEXT"===e||"MERGE_PREVIOUS"===e||"SET_RANGE"===e},z=function(e){return e.user_actions.map(function(i){var t=e.focus_page;switch(i){case"KEEP":return{id:i,title:"Keep as is",description:"Keep the current document boundary unchanged."};case"SPLIT_HERE":return{id:i,title:"Create a separate document",description:t?"Start a new document at page ".concat(t,"."):"Create a new document at this boundary."};case"MERGE_NEXT":return{id:i,title:"Merge into next document",description:t?"Move page ".concat(t," onward into the next document."):"Merge this segment into the next document."};case"MERGE_PREVIOUS":return{id:i,title:"Merge into previous document",description:"Merge this segment into the previous document."};case"SET_RANGE":return{id:i,title:"Adjust page range",description:"Set the start and end pages manually."}}})};exports.createBoundaryCardOptions=z,exports.default=function(n){var r=n.headerName,o=void 0===r?"Boundary Check":r,a=n.title,s=n.pageNo,d=n.content,l=n.cognitiveScore,u=n.config,c=n.metadata,x=n.selectedIndex,f=n.defaultSelectedIndex,m=void 0===f?null:f,p=n.onSelectionChange,I=n.onConfirm,B=n.onActionConfirm,T=n.onCognitiveClick,F=n.onAdjustManually,P=n.onClose,N=n.confirmLabel,W=void 0===N?"Confirm":N,D=n.manualPrompt,G=void 0===D?"Didn't find the right option?":D,H=n.manualActionLabel,L=void 0===H?"Adjust Manually":H,K=n.cognitiveLabel,O=void 0===K?"Cognitive Integrity":K,U=n.showAdjustManually,V=void 0===U||U,X=n.showCognitiveIntegrity,J=void 0===X||X,Q=n.showCloseButton,Y=void 0===Q||Q,Z=n.confirmDisabled,$=void 0!==Z&&Z,ee=n.width,ie=void 0===ee?340:ee,te=n.maxWidth,ne=void 0===te?340:te,re=n.className,oe=n.styles,ae=t.useMemo(function(){return null!=u?u:c?z(c):[]},[u,c]),se=t.useState(m),de=se[0],le=se[1],ue=void 0===x?de:x,ce=null==ue?void 0:ae[ue],xe=$||!ce||!0===ce.disabled||!I&&!B;return i.jsx(w.default,e.__assign({className:re,elevation:4,sx:M({width:ie,maxWidth:ne,borderTop:"4px solid",borderColor:"error.light",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==oe?void 0:oe.root)},{children:i.jsxs(q.default,e.__assign({spacing:1.5,sx:{p:2}},{children:[i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:1,sx:null==oe?void 0:oe.header},{children:[i.jsx(h.default,{color:"error"}),i.jsx(A.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:16,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:o})),Y&&i.jsx(S.default,e.__assign({size:"small",onClick:P,disabled:!P,"aria-label":"Close boundary check",sx:{p:.25,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(j.default,{sx:{fontSize:20}})}))]})),i.jsxs(b.default,{children:[i.jsx(A.default,e.__assign({sx:{color:"text.primary",fontSize:18,fontWeight:500}},{children:a})),null!=s&&i.jsx(A.default,e.__assign({sx:{mt:.25,color:"text.secondary",fontSize:16}},{children:s})),i.jsx(E.default,{sx:{my:1.25}}),null!=d&&i.jsx(A.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:15,lineHeight:1.45}},{children:d}))]}),i.jsxs(q.default,e.__assign({spacing:1,role:"radiogroup","aria-label":"Boundary options"},{children:[ae.map(function(t,n){var r=ue===n;return i.jsx(w.default,e.__assign({variant:"outlined",sx:M({borderColor:r?"secondary.main":"divider",borderRadius:2,overflow:"hidden"},null==oe?void 0:oe.option)},{children:i.jsxs(C.default,e.__assign({role:"radio","aria-checked":r,disabled:t.disabled,onClick:function(){return function(e,i){i.disabled||(void 0===x&&le(e),null==p||p(e,i))}(n,t)},sx:{width:"100%",justifyContent:"flex-start",px:1.25,py:1.125,textAlign:"left"}},{children:[i.jsx(R.default,{checked:r,disabled:t.disabled,tabIndex:-1,size:"small",sx:{p:.5,mr:1}}),i.jsxs(b.default,e.__assign({sx:{minWidth:0}},{children:[i.jsx(A.default,e.__assign({sx:{color:"text.primary",fontSize:15,fontWeight:500}},{children:t.title})),null!=t.description&&i.jsx(A.default,e.__assign({sx:{mt:.25,color:"text.secondary",fontSize:13}},{children:t.description}))]}))]}))}),t.id)}),i.jsx(y.default,e.__assign({variant:"contained",fullWidth:!0,disabled:xe,onClick:function(){!xe&&null!=ue&&ce&&(null==I||I(ue,ce),B&&k(ce.id)&&B(ce.id,{selectedIndex:ue,option:ce,metadata:c}))},sx:M({minHeight:48,mt:.25,borderRadius:2,fontSize:17,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==oe?void 0:oe.confirmButton)},{children:W}))]})),i.jsxs(q.default,e.__assign({spacing:1.25,sx:null==oe?void 0:oe.footer},{children:[V&&i.jsxs(C.default,e.__assign({onClick:F,disabled:!F,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[i.jsxs(b.default,{children:[i.jsx(A.default,e.__assign({sx:{color:"text.primary",fontSize:14}},{children:G})),i.jsx(A.default,e.__assign({sx:{mt:.25,color:"text.primary",fontSize:14}},{children:L}))]}),i.jsx(v.default,{sx:{color:"text.secondary"}})]})),J&&i.jsxs(i.Fragment,{children:[i.jsx(E.default,{}),i.jsxs(C.default,e.__assign({onClick:T,disabled:!0,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:"not-allowed"}},{children:[i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[i.jsx(g.default,{sx:{color:"text.secondary"}}),i.jsx(A.default,e.__assign({sx:{color:"text.primary",fontSize:15}},{children:O}))]})),i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:.5},{children:[null!=l&&i.jsx(b.default,e.__assign({sx:{px:1,py:.125,border:"1.5px solid",borderColor:"secondary.main",borderRadius:10,color:"secondary.main",fontSize:14,lineHeight:1.25}},{children:l})),i.jsx(_.default,{sx:{color:"text.secondary"}})]}))]}))]})]}))]}))}))},exports.isBoundaryReviewAction=k;
2
+ //# sourceMappingURL=BoundaryCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoundaryCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("@mui/material/Box"),o=require("@mui/material/Popper");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(n),u=i(o);exports.default=function(n){var o,i,a=n.anchorRef,s=n.anchorElement,f=n.children,c=n.className,d=n.offset,p=void 0===d?{}:d,m=n.placement,v=void 0===m?"bottom-start":m,x=r.useState(null),h=x[0],_=x[1];return r.useLayoutEffect(function(){var e,t=null!==(e=null!=s?s:null==a?void 0:a.current)&&void 0!==e?e:null;_(function(e){return e===t?e:t})}),t.jsx(u.default,e.__assign({open:Boolean(h),anchorEl:h,placement:v,className:c,popperOptions:{strategy:"fixed"},modifiers:[{name:"offset",options:{offset:[null!==(o=p.left)&&void 0!==o?o:0,null!==(i=p.top)&&void 0!==i?i:0]}}],sx:{zIndex:function(e){return e.zIndex.tooltip}}},{children:t.jsx(l.default,e.__assign({sx:{maxHeight:"calc(85vh - 10px)",overflowY:"auto",pointerEvents:"auto"}},{children:f}))}))};
2
+ //# sourceMappingURL=CardWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");function t(C){return C&&"object"==typeof C&&"default"in C?C:{default:C}}var r=t(require("@mui/material/SvgIcon"));exports.default=function(t){return e.jsxs(r.default,C.__assign({},t,{viewBox:"0 0 12 17",sx:C.__assign({width:12,height:17},t.sx)},{children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.778549 6.35498C0.947509 6.06234 1.14047 5.78701 1.35448 5.53127L1.05841 6.77432C0.87679 7.48466 0.80378 8.17502 1.05378 8.73356C1.09106 8.81682 1.13466 8.8951 1.18403 8.96801C1.17505 9.11859 1.17346 9.27007 1.17938 9.42164C1.21133 10.2394 1.46064 11.0339 1.90165 11.7232C2.34265 12.4126 2.95942 12.9719 3.68845 13.3437C3.78702 13.3948 3.86973 13.4719 3.92758 13.5667C3.98544 13.6614 4.01623 13.7702 4.01664 13.8814V16.3427C4.01664 16.422 4.00103 16.5004 3.97071 16.5736C3.94039 16.6468 3.89595 16.7133 3.83993 16.7693C3.78391 16.8253 3.71741 16.8698 3.64421 16.9001C3.57102 16.9305 3.49257 16.946 3.41335 16.946C3.33412 16.946 3.25567 16.9305 3.18248 16.9001C3.10928 16.8698 3.04278 16.8253 2.98676 16.7693C2.93074 16.7133 2.8863 16.6468 2.85598 16.5736C2.82567 16.5004 2.81006 16.422 2.81006 16.3427V14.2366C1.50675 13.4505 0.563809 12.1847 0.18393 10.7109C-0.195948 9.23705 0.017555 7.67304 0.778549 6.35498ZM2.5956 4.4202C2.58489 4.46583 2.57238 4.51587 2.55818 4.57051L2.10596 6.46709C2.4519 6.00902 2.88178 5.61795 3.37484 5.31587C3.45372 5.26755 3.53389 5.2217 3.61524 5.17836L3.91437 4.02581C3.94069 3.92848 3.96334 3.83471 3.98223 3.74482C3.4887 3.90843 3.02287 4.13636 2.5956 4.4202ZM4.97997 3.50929C4.95187 3.76277 4.89721 4.01844 4.83146 4.26296L4.70096 4.7659C5.02368 4.68809 5.35523 4.64508 5.68997 4.63852C6.50816 4.62249 7.31584 4.82482 8.02986 5.22467C8.74387 5.62452 9.33837 6.20745 9.75227 6.91343C10.1661 7.61942 10.3843 8.42296 10.3845 9.24135V13.029C10.3845 13.1201 10.3483 13.2075 10.2838 13.272C10.2193 13.3365 10.132 13.3726 10.0408 13.3726H8.14698C7.98698 13.3726 7.83353 13.4362 7.72039 13.5493C7.60726 13.6625 7.5437 13.816 7.5437 13.9759V16.3427C7.5437 16.5028 7.60726 16.6562 7.72039 16.7693C7.83353 16.8825 7.98698 16.946 8.14698 16.946C8.30699 16.946 8.46043 16.8825 8.57357 16.7693C8.6867 16.6562 8.75027 16.5028 8.75027 16.3427V14.5792H10.0408C10.2444 14.5792 10.446 14.5391 10.634 14.4612C10.8221 14.3833 10.993 14.2691 11.137 14.1252C11.2809 13.9812 11.3951 13.8103 11.473 13.6223C11.551 13.4342 11.591 13.2326 11.591 13.029V9.24224C11.5909 8.20964 11.3155 7.1957 10.7933 6.30483C10.271 5.41397 9.5209 4.67834 8.61996 4.17369C7.50563 3.55832 6.22659 3.32916 4.97997 3.50929ZM3.31096 7.17824C3.06416 7.47379 2.86777 7.81154 2.73281 8.17818C2.67346 8.33942 2.62681 8.50407 2.59287 8.67068C2.96541 8.66305 3.3259 8.58961 4.09408 7.98043L4.4813 7.65806C4.62698 7.53143 4.68583 7.33671 4.65268 7.14949L4.63322 7.06982C4.53815 6.83998 4.24287 6.77137 4.02738 6.89566C3.80462 7.02416 3.56339 7.12021 3.31096 7.17824ZM5.50956 6.70762C5.39307 6.42581 5.2101 6.22391 4.9955 6.09139C5.4636 5.96152 5.95753 5.9332 6.44355 6.01261C7.21223 6.13821 7.9139 6.52554 8.4298 7.10905C8.7773 7.50191 8.68077 8.0666 8.32362 8.38802C7.27342 9.33691 5.53306 10.5666 3.80331 11.0251C3.36315 11.141 2.88052 10.9286 2.71933 10.4749C2.62076 10.1971 2.55967 9.90972 2.53604 9.62C2.82204 9.61857 3.17908 9.5971 3.63183 9.39587C4.05727 9.20681 4.51985 8.88082 5.10381 8.3732C5.58794 7.95226 5.70675 7.30946 5.5355 6.77894L5.52437 6.74281L5.50956 6.70762Z"}),e.jsx("path",{d:"M2.49253 8.67144C1.98274 8.67144 1.60843 8.35663 1.96545 6.97238L2.55084 4.51665C2.65295 4.12345 2.66944 3.96624 2.55084 3.96624C2.1154 4.07601 2.33401 4.00777 1.9654 4.16485L1.71094 3.73988C2.95167 2.68571 2.97363 2.40709 3.58474 2.40709C4.09454 2.40709 4.17978 3.02062 3.92448 3.96464L3.25466 6.54621C3.13565 7.00253 3.18712 7.15973 3.30531 7.15973C3.56398 7.10114 3.81132 7.00404 4.03939 6.87249C4.25773 6.74655 4.55616 6.81591 4.65239 7.04889C4.72106 7.26145 4.66773 7.49745 4.49914 7.64399C3.36616 8.62885 2.9653 8.67144 2.49253 8.67144ZM3.66602 0.00239655C3.7822 -0.00651177 3.89895 0.00947896 4.00846 0.0493006C4.11797 0.0891223 4.21772 0.151858 4.30105 0.233314C4.38438 0.314771 4.44935 0.413073 4.49165 0.521653C4.53394 0.630232 4.55258 0.746588 4.54631 0.862945V0.860752C4.53258 1.15708 4.40525 1.43674 4.19074 1.64164C3.97623 1.84656 3.69104 1.96097 3.39439 1.96112L3.37064 1.96075C3.25288 1.97358 3.13485 1.95962 3.02324 1.91993C2.91164 1.88024 2.81044 1.81584 2.72723 1.73154C2.64402 1.64723 2.58094 1.54522 2.54271 1.43311C2.50477 1.32187 2.49227 1.20356 2.5061 1.08687C2.51738 0.789536 2.64564 0.508673 2.86299 0.305421C3.08056 0.101963 3.36973 -0.00722427 3.66748 0.00166549L3.66602 0.00239655Z"})]}))};
2
+ //# sourceMappingURL=CognitiveIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CognitiveIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}