@e-llm-studio/requirement-ai 0.0.224 → 0.0.225

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 (438) hide show
  1. package/dist/cjs/features/CitationRenderer/CitationRenderer.js +1 -1
  2. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  3. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  4. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  5. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  6. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  7. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  8. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  9. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  10. package/dist/cjs/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  11. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  12. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  13. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  14. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  15. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  16. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  17. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  18. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  19. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  20. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  21. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  22. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  23. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  24. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
  25. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  26. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  27. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  28. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  29. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  30. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
  31. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  32. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
  33. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  34. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  35. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  36. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  37. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  38. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  39. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  40. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  41. package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  42. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  43. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  44. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  45. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  46. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  47. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  48. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  49. package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  50. package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
  51. package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
  52. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  53. package/dist/cjs/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js +1 -1
  54. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  55. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  56. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  58. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  59. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  60. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  61. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  62. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  63. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  66. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  67. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  68. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  69. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  75. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  76. package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  78. package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  79. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  80. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  81. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  84. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  85. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  86. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  87. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  88. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  89. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  90. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  91. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  92. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  93. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  94. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  95. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  96. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  97. package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  98. package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  99. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  100. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  101. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  102. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  103. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  104. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  105. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  106. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  107. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  108. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  109. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  110. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  111. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  112. package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  113. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  114. package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  115. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
  116. package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  117. package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  118. package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  119. package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  120. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  121. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  122. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  123. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  124. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  125. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  126. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  127. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  128. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  129. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
  130. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  131. package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  132. package/dist/cjs/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  133. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  134. package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
  135. package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  136. package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  137. package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  138. package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
  139. package/dist/cjs/features/RequirementAI/icons/CDIcon.js +1 -1
  140. package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
  141. package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  142. package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  143. package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  144. package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  145. package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  146. package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
  147. package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  148. package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  149. package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  150. package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  151. package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
  152. package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
  153. package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
  154. package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  155. package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  156. package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
  157. package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
  158. package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  159. package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  160. package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  161. package/dist/cjs/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  162. package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
  163. package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
  164. package/dist/cjs/features/RequirementAI/utils/css.utils.js +1 -1
  165. package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  166. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  167. package/dist/cjs/features/RequirementAI/utils/json-helper.js +1 -1
  168. package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  169. package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  170. package/dist/cjs/features/RequirementAI/utils/user-story.utils.js +1 -1
  171. package/dist/cjs/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  172. package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  173. package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  174. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
  175. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
  176. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
  177. package/dist/cjs/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  178. package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
  179. package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  180. package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
  181. package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
  182. package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  183. package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
  184. package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
  185. package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
  186. package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
  187. package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
  188. package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
  189. package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
  190. package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
  191. package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
  192. package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  193. package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
  194. package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
  195. package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
  196. package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
  197. package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  198. package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  199. package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
  200. package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
  201. package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
  202. package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
  203. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  204. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  205. package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  206. package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  207. package/dist/cjs/features/UserStoryImport/components/usePanelResize.js +1 -1
  208. package/dist/cjs/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  209. package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
  210. package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  211. package/dist/cjs/features/UserStoryImport/index.js +1 -1
  212. package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  213. package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
  214. package/dist/cjs/features/UserStoryImport/lib/cn.js +1 -1
  215. package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
  216. package/dist/cjs/index.js +1 -1
  217. package/dist/features/CitationRenderer/CitationRenderer.js +1 -1
  218. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  219. package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  220. package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  221. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  222. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  223. package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  224. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  225. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  226. package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  227. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  228. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  229. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  230. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  231. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  232. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  233. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  234. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  235. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  236. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  237. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  238. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/objects.js +1 -1
  239. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  240. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  241. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
  242. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  243. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  244. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  245. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
  246. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  247. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  248. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
  249. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  250. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
  251. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  252. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  253. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  254. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  255. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  256. package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  257. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  258. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  259. package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  260. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  261. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  262. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  263. package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  264. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  265. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  266. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  267. package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  268. package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
  269. package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
  270. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  271. package/dist/features/RequirementAI/components/ai-reasoning/pdfCitationUtils.js +1 -1
  272. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  273. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  274. package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  275. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  276. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  277. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  278. package/dist/features/RequirementAI/components/citations/appmod-citation/types.js +1 -1
  279. package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  280. package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  281. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  282. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  283. package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  284. package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  285. package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  286. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  287. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  288. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  289. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  290. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  291. package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  292. package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  293. package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  294. package/dist/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  295. package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  296. package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  297. package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  298. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  299. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  300. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
  301. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
  302. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  303. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  304. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  305. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  306. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  307. package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  308. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  309. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  310. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  311. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  312. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  313. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  314. package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  315. package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  316. package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  317. package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  318. package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  319. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  320. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  321. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  322. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  323. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  324. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  325. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  326. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  327. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  328. package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  329. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  330. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  331. package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  332. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  333. package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  334. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
  335. package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  336. package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  337. package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  338. package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  339. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  340. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  341. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  342. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  343. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  344. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  345. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  346. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  347. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  348. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
  349. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  350. package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  351. package/dist/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  352. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  353. package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
  354. package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  355. package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  356. package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  357. package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
  358. package/dist/features/RequirementAI/icons/CDIcon.js +1 -1
  359. package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
  360. package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  361. package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  362. package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  363. package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  364. package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  365. package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
  366. package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  367. package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  368. package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  369. package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  370. package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
  371. package/dist/features/RequirementAI/shared/Accordian.js +1 -1
  372. package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
  373. package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  374. package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  375. package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
  376. package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
  377. package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  378. package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  379. package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  380. package/dist/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  381. package/dist/features/RequirementAI/store/markdown-context.js +1 -1
  382. package/dist/features/RequirementAI/store/ref.context.js +1 -1
  383. package/dist/features/RequirementAI/utils/css.utils.js +1 -1
  384. package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  385. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  386. package/dist/features/RequirementAI/utils/json-helper.js +1 -1
  387. package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  388. package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  389. package/dist/features/RequirementAI/utils/user-story.utils.js +1 -1
  390. package/dist/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  391. package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  392. package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  393. package/dist/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
  394. package/dist/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
  395. package/dist/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
  396. package/dist/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  397. package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
  398. package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  399. package/dist/features/UserStoryImport/components/BackNav.js +1 -1
  400. package/dist/features/UserStoryImport/components/Badge.js +1 -1
  401. package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  402. package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
  403. package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
  404. package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
  405. package/dist/features/UserStoryImport/components/Footer.js +1 -1
  406. package/dist/features/UserStoryImport/components/Header.js +1 -1
  407. package/dist/features/UserStoryImport/components/NavRow.js +1 -1
  408. package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
  409. package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
  410. package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
  411. package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  412. package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
  413. package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
  414. package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
  415. package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
  416. package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  417. package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  418. package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
  419. package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
  420. package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
  421. package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
  422. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  423. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  424. package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  425. package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  426. package/dist/features/UserStoryImport/components/usePanelResize.js +1 -1
  427. package/dist/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  428. package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
  429. package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  430. package/dist/features/UserStoryImport/index.js +1 -1
  431. package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  432. package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
  433. package/dist/features/UserStoryImport/lib/cn.js +1 -1
  434. package/dist/features/UserStoryImport/lib/dialog.js +1 -1
  435. package/dist/index.js +1 -1
  436. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +11 -2
  437. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  438. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("../../../CitationRenderer/CitationRenderer.js"),i=require("../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js"),o=require("./CitationPdfRendererWrapper.js");exports.default=function(r){var a,c=r.title,s=r.citation,l=r.customIcons,d=r.customStyles,u=r.pdfViewHeaderAction,p=null!==(a=null==l?void 0:l.ScannedDocumentIcon)&&void 0!==a?a:n.jsx(i.default,{});return n.jsx(t.default,{inLineCitation:!0,citationTitle:c,citationId:"scanned-doc-".concat(s.citation_number),citationComponent:n.jsx(o.default,{citation:s,citationId:"".concat(s.citation_number),pdfViewHeaderAction:u}),chevronDownComponent:p,chevronUpComponent:p,styles:{pillButton:e.__assign({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null==d?void 0:d.pill),citationContent:e.__assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null==d?void 0:d.content)}})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../CitationRenderer/CitationRenderer.js"),n=require("../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js"),i=require("./CitationPdfRendererWrapper.js");exports.default=({title:o,citation:r,customIcons:a,customStyles:c,pdfViewHeaderAction:s})=>{var d;const l=null!==(d=null==a?void 0:a.ScannedDocumentIcon)&&void 0!==d?d:e.jsx(n.default,{});return e.jsx(t.default,{inLineCitation:!0,citationTitle:o,citationId:`scanned-doc-${r.citation_number}`,citationComponent:e.jsx(i.default,{citation:r,citationId:`${r.citation_number}`,pdfViewHeaderAction:s}),chevronDownComponent:l,chevronUpComponent:l,styles:{pillButton:Object.assign({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null==c?void 0:c.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null==c?void 0:c.content)}})};
2
2
  //# sourceMappingURL=ScannedCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.citationViewerStyles={pdfViewer:{height:"550px",maxHeight:"550px",display:"flex",flexDirection:"column",backgroundColor:"#FAFAFA",border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"},pdfContainer:{flex:1,overflowY:"auto",padding:"8px"},header:{borderBottom:"1px solid #e5e7eb"}},exports.mapToHighlightAreas=function(e){return void 0===e&&(e=[]),Array.isArray(e)?null==e?void 0:e.flatMap(function(e){var r,i,o=null==e?void 0:e.page_no;return!(null===(r=null==e?void 0:e.highlighted_coordinates)||void 0===r?void 0:r.length)&&o?[{pageNumber:o,pageIndex:o-1}]:o&&(null===(i=null==e?void 0:e.highlighted_coordinates)||void 0===i?void 0:i.length)?e.highlighted_coordinates.map(function(e){return{pageIndex:o-1,pageNumber:o,left:100*e.xmin,top:100*e.ymin,width:100*(e.xmax-e.xmin),height:100*(e.ymax-e.ymin)}}):[]}):[]},exports.stringToNumber=function(e,r){if(void 0===r&&(r=0),"number"==typeof e)return Number.isFinite(e)?e:r;if(!e||"string"!=typeof e||!e.trim())return r;var i="";try{i=e.trim().replace(/[^\d.-]/g,"").replace(/(?!^)-/g,"")}catch(e){return console.error("Regex processing failed",e),r}var o=Number(i);return Number.isFinite(o)?o:r};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.citationViewerStyles={pdfViewer:{height:"550px",maxHeight:"550px",display:"flex",flexDirection:"column",backgroundColor:"#FAFAFA",border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"},pdfContainer:{flex:1,overflowY:"auto",padding:"8px"},header:{borderBottom:"1px solid #e5e7eb"}},exports.mapToHighlightAreas=(e=[])=>Array.isArray(e)?null==e?void 0:e.flatMap(e=>{var r,i;const o=null==e?void 0:e.page_no;return!(null===(r=null==e?void 0:e.highlighted_coordinates)||void 0===r?void 0:r.length)&&o?[{pageNumber:o,pageIndex:o-1}]:o&&(null===(i=null==e?void 0:e.highlighted_coordinates)||void 0===i?void 0:i.length)?e.highlighted_coordinates.map(e=>({pageIndex:o-1,pageNumber:o,left:100*e.xmin,top:100*e.ymin,width:100*(e.xmax-e.xmin),height:100*(e.ymax-e.ymin)})):[]}):[],exports.stringToNumber=function(e,r=0){if("number"==typeof e)return Number.isFinite(e)?e:r;if(!e||"string"!=typeof e||!e.trim())return r;let i="";try{i=e.trim().replace(/[^\d.-]/g,"").replace(/(?!^)-/g,"")}catch(e){return console.error("Regex processing failed",e),r}const o=Number(i);return Number.isFinite(o)?o:r};
2
2
  //# sourceMappingURL=pdfCitationUtils.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("react"),a=require("react-markdown"),i=require("rehype-raw"),l=require("./AppModCitationContent.module.css.js"),r=require("./components/CodeLinkHandler.js"),d=require("./types.js"),t=require("../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js"),o=require("./icons/SparkleIcon.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(a),_=u(i),h=function(s,a,i,t){var o=(null==a?void 0:a.highlight)||d.DEFAULT_HIGHLIGHT_THEME,u=function(){return s?{backgroundColor:o.background,color:o.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{}},c=function(){return e.__assign(e.__assign({},u()),{display:"inline"})};return{h1:function(i){var r,d=i.children;return n.jsx("h1",e.__assign({className:l.default.heading1,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.heading1},{children:s?n.jsx("span",e.__assign({style:u()},{children:d})):d}))},h2:function(i){var r,d=i.children;return n.jsx("h2",e.__assign({className:l.default.heading2,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.heading2},{children:s?n.jsx("span",e.__assign({style:u()},{children:d})):d}))},h3:function(i){var r,d=i.children;return n.jsx("h3",e.__assign({className:l.default.heading3,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.heading3},{children:s?n.jsx("span",e.__assign({style:u()},{children:d})):d}))},h4:function(i){var r,d=i.children;return n.jsx("h4",e.__assign({className:l.default.heading4,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.heading4},{children:s?n.jsx("span",e.__assign({style:u()},{children:d})):d}))},h5:function(i){var r,d=i.children;return n.jsx("h5",e.__assign({className:l.default.heading5,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.heading5},{children:s?n.jsx("span",e.__assign({style:u()},{children:d})):d}))},h6:function(i){var r,d=i.children;return n.jsx("h6",e.__assign({className:l.default.heading6,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.heading6},{children:s?n.jsx("span",e.__assign({style:u()},{children:d})):d}))},p:function(i){var r,d=i.children;return n.jsx("p",e.__assign({className:l.default.paragraph,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.paragraph},{children:s?n.jsx("span",e.__assign({style:c()},{children:d})):d}))},ol:function(s){var i,r=s.children;return n.jsx("ol",e.__assign({className:l.default.orderedList,style:null===(i=null==a?void 0:a.markdown)||void 0===i?void 0:i.list},{children:r}))},ul:function(s){var i,r=s.children;return n.jsx("ul",e.__assign({className:l.default.unorderedList,style:null===(i=null==a?void 0:a.markdown)||void 0===i?void 0:i.list},{children:r}))},li:function(i){var r,d=i.children;return n.jsx("li",e.__assign({className:l.default.listItem,style:null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.listItem},{children:s?n.jsx("span",e.__assign({style:c()},{children:d})):d}))},strong:function(i){var r,d=i.children;return n.jsx("strong",e.__assign({className:l.default.strong,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.strong),s?u():{})},{children:d}))},em:function(i){var r,d=i.children;return n.jsx("em",e.__assign({className:l.default.emphasis,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.emphasis),s?u():{})},{children:d}))},a:function(l){var d=l.children,u=l.href;return n.jsx(r.default,e.__assign({href:u,codeLinkConfig:t,isHighlighted:s,highlightTheme:o,customStyles:null==a?void 0:a.markdown,customIcon:null==i?void 0:i.appModCitationLinkIcon},{children:d}))},code:function(i){var r,d,t=i.children,u=i.className,c=null==u?void 0:u.includes("language-"),_=s?{backgroundColor:o.codeBackground,color:o.codeText,border:"1px solid ".concat(o.codeBorder)}:{};return c?n.jsx("div",{children:n.jsx("code",e.__assign({className:l.default.codeBlock,style:e.__assign(e.__assign({},null===(d=null==a?void 0:a.markdown)||void 0===d?void 0:d.codeBlock),_)},{children:t}))}):n.jsx("code",e.__assign({className:l.default.inlineCode,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.code),_)},{children:t}))},pre:function(s){var a=s.children;return n.jsx("pre",e.__assign({className:l.default.preBlock},{children:a}))},blockquote:function(i){var r,d=i.children;return n.jsx("blockquote",e.__assign({className:l.default.blockquote,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.blockquote),s?{borderColor:o.border}:{})},{children:s?n.jsx("span",e.__assign({style:c()},{children:d})):d}))},table:function(i){var r,d=i.children;return n.jsx("div",e.__assign({className:l.default.tableWrapper},{children:n.jsx("table",e.__assign({className:l.default.table,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.table),s?u():{})},{children:d}))}))},thead:function(s){var a=s.children;return n.jsx("thead",e.__assign({className:l.default.tableHead},{children:a}))},tbody:function(s){var a=s.children;return n.jsx("tbody",e.__assign({className:l.default.tableBody},{children:a}))},tr:function(a){var i=a.children;return n.jsx("tr",e.__assign({className:l.default.tableRow,style:s?u():{}},{children:i}))},th:function(i){var r,d=i.children;return n.jsx("th",e.__assign({className:l.default.tableHeader,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.tableHeader),s?u():{})},{children:d}))},td:function(i){var r,d=i.children;return n.jsx("td",e.__assign({className:l.default.tableCell,style:e.__assign(e.__assign({},null===(r=null==a?void 0:a.markdown)||void 0===r?void 0:r.tableCell),s?u():{})},{children:d}))},details:function(s){var a=s.children;return n.jsx("details",e.__assign({className:l.default.details},{children:a}))},summary:function(a){var i=a.children,r=function(e){var n;return"string"==typeof e?e:Array.isArray(e)?e.map(r).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?r(e.props.children):""},d=r(i).replace(/:$/,"").trim();return n.jsx("summary",e.__assign({className:l.default.summary,style:s?u():{}},{children:d}))}}};exports.default=function(a){var i,r,d=a.citation,u=a.customStyles,m=a.customIcons,v=a.codeLinkConfig,g=a.isLoading,f=void 0!==g&&g,p=a.shouldAutoScroll,x=void 0!==p&&p,y=s.useRef(null),j=s.useRef(null),b=d.description||"",k=d.customMetadata.question||"",N=d.customMetadata.highlighted_text,w=d.customMetadata.relevance_score,q=s.useMemo(function(){return h(!1,u,m,v)},[u,m,v]),C=s.useMemo(function(){return h(!0,u,m,v)},[u,m,v]);s.useEffect(function(){if(x&&(null==N?void 0:N.trim())&&(null==b?void 0:b.trim())&&!f){var e=j.current;if(e){var n=function(){e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},s=window.requestAnimationFrame(function(){n(),window.setTimeout(n,120)});return function(){window.cancelAnimationFrame(s)}}}},[b,N,f,x]);var I=(null==m?void 0:m.appModCitationIcon)||n.jsx("div",{children:n.jsx(o.SparkleIcon,{className:l.default.headerIcon})});return n.jsxs("div",e.__assign({ref:y,className:l.default.container,style:null==u?void 0:u.container},{children:[n.jsxs("div",e.__assign({className:l.default.header,style:null==u?void 0:u.header},{children:[n.jsxs("div",e.__assign({className:l.default.headerLeft,style:null==u?void 0:u.headerLeft},{children:[n.jsx("span",e.__assign({style:null==u?void 0:u.headerIcon},{children:I})),n.jsx("span",e.__assign({className:l.default.headerTitle,style:null==u?void 0:u.headerTitle},{children:"AskMod Response"}))]})),t.renderAIConfidenceDisplay(w,null==u?void 0:u.confidenceDisplay)]})),n.jsxs("div",e.__assign({className:l.default.questionContainer,style:null==u?void 0:u.questionContainer},{children:[n.jsx("p",e.__assign({className:l.default.questionLabel,style:null==u?void 0:u.questionLabel},{children:"Me"})),n.jsx("div",e.__assign({className:l.default.questionText,style:null==u?void 0:u.questionText},{children:k||"Ask question to get response"}))]})),n.jsx("div",e.__assign({className:l.default.answerIconRow,style:null==u?void 0:u.answerIconRow},{children:n.jsxs("p",e.__assign({className:l.default.assistantName,style:null==u?void 0:u.assistantName},{children:["Askmod",n.jsx("span",e.__assign({className:l.default.assistantNameInner,style:null==u?void 0:u.assistantNameInner},{children:".AI"}))]}))})),n.jsx("div",e.__assign({className:l.default.answerContainer,style:null==u?void 0:u.answerContainer},{children:f?n.jsx("span",e.__assign({className:l.default.loadingText,style:null===(i=null==u?void 0:u.loading)||void 0===i?void 0:i.text},{children:"Generating..."})):b?function(s,a){var i,r=(void 0===(i=s.replace(/\\n/g,"\n"))&&(i=""),i.replace(/<details\b([^>]*)>/gi,function(e,n){return/\bopen\b/i.test(n)?"<details open>":"<details>"}).replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,function(e,n){return'<summary class="codebase-summary codebasename">From '.concat(n.trim()," codebase</summary>")}).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,function(e,n){return"<codebasename>".concat(n.trim(),"</codebasename>")}).trim());if(a&&r.includes(a)){var d=r.indexOf(a),t=r.substring(0,d),o=r.substring(d,d+a.length),u=r.substring(d+a.length),h=!o.trim();return n.jsxs("div",e.__assign({className:l.default.markdownContent},{children:[t&&n.jsx(c.default,e.__assign({rehypePlugins:[_.default],components:q},{children:t})),o&&!h&&n.jsx("div",e.__assign({ref:j,"data-appmod-highlight-anchor":"true"},{children:n.jsx(c.default,e.__assign({rehypePlugins:[_.default],components:C},{children:o}))})),o&&h&&o,u&&n.jsx(c.default,e.__assign({rehypePlugins:[_.default],components:q},{children:u}))]}))}return n.jsx(c.default,e.__assign({className:l.default.markdownContent,rehypePlugins:[_.default],components:q},{children:r}))}(b,N):n.jsx("span",e.__assign({className:l.default.errorText,style:null===(r=null==u?void 0:u.error)||void 0===r?void 0:r.text},{children:"Oops! Can't generate your response now."}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),n=require("react-markdown"),l=require("rehype-raw"),a=require("./AppModCitationContent.module.css.js"),i=require("./components/CodeLinkHandler.js"),t=require("./types.js"),d=require("../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js"),r=require("./icons/SparkleIcon.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=c(n),u=c(l);const h=(s,n,l,d)=>{const r=(null==n?void 0:n.highlight)||t.DEFAULT_HIGHLIGHT_THEME,c=()=>s?{backgroundColor:r.background,color:r.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},o=()=>Object.assign(Object.assign({},c()),{display:"inline"});return{h1:({children:l})=>{var i;return e.jsx("h1",Object.assign({className:a.default.heading1,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading1},{children:s?e.jsx("span",Object.assign({style:c()},{children:l})):l}))},h2:({children:l})=>{var i;return e.jsx("h2",Object.assign({className:a.default.heading2,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading2},{children:s?e.jsx("span",Object.assign({style:c()},{children:l})):l}))},h3:({children:l})=>{var i;return e.jsx("h3",Object.assign({className:a.default.heading3,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading3},{children:s?e.jsx("span",Object.assign({style:c()},{children:l})):l}))},h4:({children:l})=>{var i;return e.jsx("h4",Object.assign({className:a.default.heading4,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading4},{children:s?e.jsx("span",Object.assign({style:c()},{children:l})):l}))},h5:({children:l})=>{var i;return e.jsx("h5",Object.assign({className:a.default.heading5,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading5},{children:s?e.jsx("span",Object.assign({style:c()},{children:l})):l}))},h6:({children:l})=>{var i;return e.jsx("h6",Object.assign({className:a.default.heading6,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading6},{children:s?e.jsx("span",Object.assign({style:c()},{children:l})):l}))},p:({children:l})=>{var i;return e.jsx("p",Object.assign({className:a.default.paragraph,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.paragraph},{children:s?e.jsx("span",Object.assign({style:o()},{children:l})):l}))},ol:({children:s})=>{var l;return e.jsx("ol",Object.assign({className:a.default.orderedList,style:null===(l=null==n?void 0:n.markdown)||void 0===l?void 0:l.list},{children:s}))},ul:({children:s})=>{var l;return e.jsx("ul",Object.assign({className:a.default.unorderedList,style:null===(l=null==n?void 0:n.markdown)||void 0===l?void 0:l.list},{children:s}))},li:({children:l})=>{var i;return e.jsx("li",Object.assign({className:a.default.listItem,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.listItem},{children:s?e.jsx("span",Object.assign({style:o()},{children:l})):l}))},strong:({children:l})=>{var i;return e.jsx("strong",Object.assign({className:a.default.strong,style:Object.assign(Object.assign({},null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.strong),s?c():{})},{children:l}))},em:({children:l})=>{var i;return e.jsx("em",Object.assign({className:a.default.emphasis,style:Object.assign(Object.assign({},null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.emphasis),s?c():{})},{children:l}))},a:({children:a,href:t})=>e.jsx(i.default,Object.assign({href:t,codeLinkConfig:d,isHighlighted:s,highlightTheme:r,customStyles:null==n?void 0:n.markdown,customIcon:null==l?void 0:l.appModCitationLinkIcon},{children:a})),code:({children:l,className:i})=>{var t,d;const c=null==i?void 0:i.includes("language-"),o=s?{backgroundColor:r.codeBackground,color:r.codeText,border:`1px solid ${r.codeBorder}`}:{};return c?e.jsx("div",{children:e.jsx("code",Object.assign({className:a.default.codeBlock,style:Object.assign(Object.assign({},null===(d=null==n?void 0:n.markdown)||void 0===d?void 0:d.codeBlock),o)},{children:l}))}):e.jsx("code",Object.assign({className:a.default.inlineCode,style:Object.assign(Object.assign({},null===(t=null==n?void 0:n.markdown)||void 0===t?void 0:t.code),o)},{children:l}))},pre:({children:s})=>e.jsx("pre",Object.assign({className:a.default.preBlock},{children:s})),blockquote:({children:l})=>{var i;return e.jsx("blockquote",Object.assign({className:a.default.blockquote,style:Object.assign(Object.assign({},null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.blockquote),s?{borderColor:r.border}:{})},{children:s?e.jsx("span",Object.assign({style:o()},{children:l})):l}))},table:({children:l})=>{var i;return e.jsx("div",Object.assign({className:a.default.tableWrapper},{children:e.jsx("table",Object.assign({className:a.default.table,style:Object.assign(Object.assign({},null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.table),s?c():{})},{children:l}))}))},thead:({children:s})=>e.jsx("thead",Object.assign({className:a.default.tableHead},{children:s})),tbody:({children:s})=>e.jsx("tbody",Object.assign({className:a.default.tableBody},{children:s})),tr:({children:n})=>e.jsx("tr",Object.assign({className:a.default.tableRow,style:s?c():{}},{children:n})),th:({children:l})=>{var i;return e.jsx("th",Object.assign({className:a.default.tableHeader,style:Object.assign(Object.assign({},null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableHeader),s?c():{})},{children:l}))},td:({children:l})=>{var i;return e.jsx("td",Object.assign({className:a.default.tableCell,style:Object.assign(Object.assign({},null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableCell),s?c():{})},{children:l}))},details:({children:s})=>e.jsx("details",Object.assign({className:a.default.details},{children:s})),summary:({children:n})=>{const l=e=>{var s;return"string"==typeof e?e:Array.isArray(e)?e.map(l).join(""):(null===(s=null==e?void 0:e.props)||void 0===s?void 0:s.children)?l(e.props.children):""},i=l(n).replace(/:$/,"").trim();return e.jsx("summary",Object.assign({className:a.default.summary,style:s?c():{}},{children:i}))}}};exports.default=({citation:n,customStyles:l,customIcons:i,codeLinkConfig:t,isLoading:c=!1,shouldAutoScroll:j=!1})=>{var m,g;const b=s.useRef(null),v=s.useRef(null),p=n.description||"",x=n.customMetadata.question||"",f=n.customMetadata.highlighted_text,O=n.customMetadata.relevance_score,y=s.useMemo(()=>h(!1,l,i,t),[l,i,t]),k=s.useMemo(()=>h(!0,l,i,t),[l,i,t]);s.useEffect(()=>{if(!j||!(null==f?void 0:f.trim())||!(null==p?void 0:p.trim())||c)return;const e=v.current;if(!e)return;const s=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{s(),window.setTimeout(s,120)});return()=>{window.cancelAnimationFrame(n)}},[p,f,c,j]);const N=(null==i?void 0:i.appModCitationIcon)||e.jsx("div",{children:e.jsx(r.SparkleIcon,{className:a.default.headerIcon})});return e.jsxs("div",Object.assign({ref:b,className:a.default.container,style:null==l?void 0:l.container},{children:[e.jsxs("div",Object.assign({className:a.default.header,style:null==l?void 0:l.header},{children:[e.jsxs("div",Object.assign({className:a.default.headerLeft,style:null==l?void 0:l.headerLeft},{children:[e.jsx("span",Object.assign({style:null==l?void 0:l.headerIcon},{children:N})),e.jsx("span",Object.assign({className:a.default.headerTitle,style:null==l?void 0:l.headerTitle},{children:"AskMod Response"}))]})),d.renderAIConfidenceDisplay(O,null==l?void 0:l.confidenceDisplay)]})),e.jsxs("div",Object.assign({className:a.default.questionContainer,style:null==l?void 0:l.questionContainer},{children:[e.jsx("p",Object.assign({className:a.default.questionLabel,style:null==l?void 0:l.questionLabel},{children:"Me"})),e.jsx("div",Object.assign({className:a.default.questionText,style:null==l?void 0:l.questionText},{children:x||"Ask question to get response"}))]})),e.jsx("div",Object.assign({className:a.default.answerIconRow,style:null==l?void 0:l.answerIconRow},{children:e.jsxs("p",Object.assign({className:a.default.assistantName,style:null==l?void 0:l.assistantName},{children:["Askmod",e.jsx("span",Object.assign({className:a.default.assistantNameInner,style:null==l?void 0:l.assistantNameInner},{children:".AI"}))]}))})),e.jsx("div",Object.assign({className:a.default.answerContainer,style:null==l?void 0:l.answerContainer},{children:c?e.jsx("span",Object.assign({className:a.default.loadingText,style:null===(m=null==l?void 0:l.loading)||void 0===m?void 0:m.text},{children:"Generating..."})):p?((s,n)=>{const l=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,s)=>/\bopen\b/i.test(s)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,s)=>`<summary class="codebase-summary codebasename">From ${s.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,s)=>`<codebasename>${s.trim()}</codebasename>`).trim())(s.replace(/\\n/g,"\n"));if(n&&l.includes(n)){const s=l.indexOf(n),i=l.substring(0,s),t=l.substring(s,s+n.length),d=l.substring(s+n.length),r=!t.trim();return e.jsxs("div",Object.assign({className:a.default.markdownContent},{children:[i&&e.jsx(o.default,Object.assign({rehypePlugins:[u.default],components:y},{children:i})),t&&!r&&e.jsx("div",Object.assign({ref:v,"data-appmod-highlight-anchor":"true"},{children:e.jsx(o.default,Object.assign({rehypePlugins:[u.default],components:k},{children:t}))})),t&&r&&t,d&&e.jsx(o.default,Object.assign({rehypePlugins:[u.default],components:y},{children:d}))]}))}return e.jsx(o.default,Object.assign({className:a.default.markdownContent,rehypePlugins:[u.default],components:y},{children:l}))})(p,f):e.jsx("span",Object.assign({className:a.default.errorText,style:null===(g=null==l?void 0:l.error)||void 0===g?void 0:g.text},{children:"Oops! Can't generate your response now."}))}))]}))};
2
2
  //# sourceMappingURL=AppmodCitationContent.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=require("react/jsx-runtime"),n=require("lucide-react"),i=require("react"),o=require("../../../../CitationRenderer/CitationRenderer.js"),r=require("./AppmodCitationContent.js");exports.default=function(a){var l=a.title,s=a.citation,c=a.customStyles,u=a.customIcons,p=a.codeLinkConfig,d=a.isLoading,m=void 0!==d&&d,g=a.isOpen,x=i.useState(!1),f=x[0],C=x[1],b=void 0!==g,h=b?!!g:f,v=i.useCallback(function(){b||C(function(t){return!t})},[b]),j=(null==u?void 0:u.appModCitationIcon)||e.jsx(n.SparkleIcon,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}}),k=l+"⁠";return e.jsx(o.default,{inLineCitation:!0,citationTitle:k,citationIcon:e.jsx(e.Fragment,{}),citationId:"appmod-ai-".concat(s.citation_number),citationComponent:e.jsx(r.default,{citation:s,customStyles:c,customIcons:u,codeLinkConfig:p,isLoading:m,shouldAutoScroll:h}),isOpen:h,onToggle:v,chevronDownComponent:j,chevronUpComponent:j,styles:{pillButton:t.__assign({fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none"},null==c?void 0:c.pill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("lucide-react"),n=require("react"),i=require("../../../../CitationRenderer/CitationRenderer.js"),o=require("./AppmodCitationContent.js");exports.default=({title:a,citation:r,customStyles:s,customIcons:l,codeLinkConfig:c,isLoading:p=!1,isOpen:u})=>{const[d,m]=n.useState(!1),g=void 0!==u,x=g?!!u:d,C=n.useCallback(()=>{g||m(e=>!e)},[g]),b=(null==l?void 0:l.appModCitationIcon)||e.jsx(t.SparkleIcon,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}}),h=a+"⁠";return e.jsx(i.default,{inLineCitation:!0,citationTitle:h,citationIcon:e.jsx(e.Fragment,{}),citationId:`appmod-ai-${r.citation_number}`,citationComponent:e.jsx(o.default,{citation:r,customStyles:s,customIcons:l,codeLinkConfig:c,isLoading:p,shouldAutoScroll:x}),isOpen:x,onToggle:C,chevronDownComponent:b,chevronUpComponent:b,styles:{pillButton:Object.assign({fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none"},null==s?void 0:s.pill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};
2
2
  //# sourceMappingURL=AppmodCitationRenderer.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("./CodeLinkHandler.module.css.js"),t=require("lucide-react"),o=require("@e-llm-studio/citation"),a=require("../types.js");exports.default=function(r){var l,s,d=r.href,c=r.children,u=r.codeLinkConfig,f=r.isHighlighted,h=void 0!==f&&f,p=r.highlightTheme,m=void 0===p?a.DEFAULT_HIGHLIGHT_THEME:p,g=r.customStyles,C=r.customIcon;if(!d)return n.jsx("span",{children:c});var v,k,x=function(e){try{var n=new URL(e,"http://example.com"),i=n.searchParams.get("startLine"),t=n.searchParams.get("endLine"),o=n.searchParams.get("validation");n.searchParams.delete("startLine"),n.searchParams.delete("endLine"),n.searchParams.delete("validation");var a=n.pathname+n.search;return{filePath:decodeURIComponent(a.replace(/^\//,"")),fullPath:decodeURIComponent(e),startLine:i,endLine:t,validation:o}}catch(n){return{filePath:e,fullPath:e,startLine:null,endLine:null,validation:null}}}(d),b="string"==typeof c?c.split("\n").length>1?"Generated Code":c:(null===(l=null==c?void 0:c.props)||void 0===l?void 0:l.children)||d||"Generated Code";if("vscode"===(null==u?void 0:u.mode)){var w=h?{backgroundColor:m.linkBackground,borderColor:m.linkBorder}:void 0,L=h?{color:m.linkText}:void 0,I=h?{color:m.linkIconColor}:null==g?void 0:g.linkIcon,y=C||n.jsx(t.ExternalLinkIcon,{className:i.default.linkIcon,style:I});return n.jsx("a",e.__assign({href:d,title:d,onClick:function(e){e.preventDefault(),(null==u?void 0:u.onCodeLinkClick)&&u.onCodeLinkClick({filePath:x.filePath,startLine:x.startLine,endLine:x.endLine,validation:x.validation})},className:i.default.linkContainer,style:null==g?void 0:g.link},{children:n.jsxs("span",e.__assign({className:i.default.linkWrapper,style:w},{children:[y,n.jsx("span",e.__assign({className:i.default.linkText,style:L},{children:c}))]}))}))}if("web"===(null==u?void 0:u.mode)&&u.webConfig){var P=(v=x.filePath,(k=/\.(\w+)$/.exec(v))?k[1]:"plaintext");return n.jsx(o.CodeCitation,{baseUrlForCodeRetrieval:u.baseUrlForCodeRetrieval||"",filepath:x.fullPath,assistantName:u.webConfig.assistantName,organizationName:u.webConfig.organizationName,userId:u.webConfig.userId,taskId:u.webConfig.taskId,repoUrl:u.webConfig.repoUrl,inLineCitation:!0,citationTitle:b,filename:"Generated Code"!==b?x.filePath:".".concat(P),fileSummarySectionTitle:"File Summary",citationContainerTitle:"Code Preview",showFileSummaryIButton:!0,showFullscreenIcon:!0,showThemeToggle:!0,isDarkModeEnabled:null===(s=u.webConfig.isDarkModeEnabled)||void 0===s||s,chevronUpComponent:u.webConfig.chevronUpComponent||n.jsx(t.ChevronUpIcon,{}),chevronDownComponent:u.webConfig.chevronDownComponent||n.jsx(t.ChevronDownIcon,{}),isHighlightingEnabled:!0,editorHeight:"95%",editorWidth:"100%",startIndex:x.startLine?Number(x.startLine):void 0,endIndex:x.endLine?Number(x.endLine):void 0,datasource:u.webConfig.datasource,styles:{pillButton:e.__assign({display:"inline-flex",alignItems:"center",fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"transparent",padding:"0px",fontSize:"13px",borderRadius:"9999px",cursor:"pointer",color:"#d63384",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},null==g?void 0:g.link),citationWrapper:{justifyContent:"flex-start",width:"100%"},citationContent:{width:"100%",height:"500px",backgroundColor:"#eff6ff",border:"1px solid #000",padding:"8px",borderRadius:"4px"},citationContainerTitle:{fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000",fontSize:"16px",fontWeight:"bold",marginBottom:"8px"}}})}return n.jsx("a",e.__assign({href:d,target:"_blank",rel:"noopener noreferrer",className:i.default.regularLink,style:null==g?void 0:g.link},{children:c}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("./CodeLinkHandler.module.css.js"),t=require("lucide-react"),i=require("@e-llm-studio/citation"),o=require("../types.js");exports.default=({href:a,children:r,codeLinkConfig:l,isHighlighted:s=!1,highlightTheme:d=o.DEFAULT_HIGHLIGHT_THEME,customStyles:c,customIcon:u})=>{var h,f;if(!a)return e.jsx("span",{children:r});const p=(e=>{try{const n=new URL(e,"http://example.com"),t=n.searchParams.get("startLine"),i=n.searchParams.get("endLine"),o=n.searchParams.get("validation");n.searchParams.delete("startLine"),n.searchParams.delete("endLine"),n.searchParams.delete("validation");const a=n.pathname+n.search;return{filePath:decodeURIComponent(a.replace(/^\//,"")),fullPath:decodeURIComponent(e),startLine:t,endLine:i,validation:o}}catch(n){return{filePath:e,fullPath:e,startLine:null,endLine:null,validation:null}}})(a),m="string"==typeof r?r.split("\n").length>1?"Generated Code":r:(null===(h=null==r?void 0:r.props)||void 0===h?void 0:h.children)||a||"Generated Code";if("vscode"===(null==l?void 0:l.mode)){const i=e=>{e.preventDefault(),(null==l?void 0:l.onCodeLinkClick)&&l.onCodeLinkClick({filePath:p.filePath,startLine:p.startLine,endLine:p.endLine,validation:p.validation})},o=s?{backgroundColor:d.linkBackground,borderColor:d.linkBorder}:void 0,h=s?{color:d.linkText}:void 0,f=s?{color:d.linkIconColor}:null==c?void 0:c.linkIcon,m=u||e.jsx(t.ExternalLinkIcon,{className:n.default.linkIcon,style:f});return e.jsx("a",Object.assign({href:a,title:a,onClick:i,className:n.default.linkContainer,style:null==c?void 0:c.link},{children:e.jsxs("span",Object.assign({className:n.default.linkWrapper,style:o},{children:[m,e.jsx("span",Object.assign({className:n.default.linkText,style:h},{children:r}))]}))}))}if("web"===(null==l?void 0:l.mode)&&l.webConfig){const n=(e=>{const n=/\.(\w+)$/.exec(e);return n?n[1]:"plaintext"})(p.filePath);return e.jsx(i.CodeCitation,{baseUrlForCodeRetrieval:l.baseUrlForCodeRetrieval||"",filepath:p.fullPath,assistantName:l.webConfig.assistantName,organizationName:l.webConfig.organizationName,userId:l.webConfig.userId,taskId:l.webConfig.taskId,repoUrl:l.webConfig.repoUrl,inLineCitation:!0,citationTitle:m,filename:"Generated Code"!==m?p.filePath:`.${n}`,fileSummarySectionTitle:"File Summary",citationContainerTitle:"Code Preview",showFileSummaryIButton:!0,showFullscreenIcon:!0,showThemeToggle:!0,isDarkModeEnabled:null===(f=l.webConfig.isDarkModeEnabled)||void 0===f||f,chevronUpComponent:l.webConfig.chevronUpComponent||e.jsx(t.ChevronUpIcon,{}),chevronDownComponent:l.webConfig.chevronDownComponent||e.jsx(t.ChevronDownIcon,{}),isHighlightingEnabled:!0,editorHeight:"95%",editorWidth:"100%",startIndex:p.startLine?Number(p.startLine):void 0,endIndex:p.endLine?Number(p.endLine):void 0,datasource:l.webConfig.datasource,styles:{pillButton:Object.assign({display:"inline-flex",alignItems:"center",fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"transparent",padding:"0px",fontSize:"13px",borderRadius:"9999px",cursor:"pointer",color:"#d63384",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},null==c?void 0:c.link),citationWrapper:{justifyContent:"flex-start",width:"100%"},citationContent:{width:"100%",height:"500px",backgroundColor:"#eff6ff",border:"1px solid #000",padding:"8px",borderRadius:"4px"},citationContainerTitle:{fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000",fontSize:"16px",fontWeight:"bold",marginBottom:"8px"}}})}return e.jsx("a",Object.assign({href:a,target:"_blank",rel:"noopener noreferrer",className:n.default.regularLink,style:null==c?void 0:c.link},{children:r}))};
2
2
  //# sourceMappingURL=CodeLinkHandler.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime");exports.AppModIcon=function(t){var o=t.className,s=t.style;return r.jsxs("svg",e.__assign({className:o,style:s,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[r.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.AppModIcon=({className:r,style:o})=>e.jsxs("svg",Object.assign({className:r,style:o,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}));
2
2
  //# sourceMappingURL=AppmodIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime");exports.ChatBubbleIcon=function(r){var s=r.className,a=r.style;return t.jsx("svg",e.__assign({className:s,style:a,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.ChatBubbleIcon=({className:s,style:t})=>e.jsx("svg",Object.assign({className:s,style:t,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}));
2
2
  //# sourceMappingURL=ChatBubbleIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime");exports.SparkleIcon=function(r){var t=r.className,i=r.style;return s.jsx("svg",e.__assign({className:t,style:i,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg"},{children:s.jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.SparkleIcon=({className:s,style:t})=>e.jsx("svg",Object.assign({className:s,style:t,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}));
2
2
  //# sourceMappingURL=SparkleIcon.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"),s=require("./searchwaveform.js"),a=require("./components/videoPlayer.js"),n=require("./utils/word-segment-util.js"),r=require("./components/SegmentByWordsViral.js"),l=require("./SearchWaveFromWrapper.module.css.js"),o=require("./icons/AudioLinesIcon.js"),d=require("./icons/VideoIcon.js"),u=require("@mui/material"),c=require("../../../shared/CitationAIConfidenceDisplay.js"),m=require("../../RequirementAIWrapper/RequirementAIWrapper.js"),v=require("./store/autoplay.wavefrom.js"),g=function(e){var t=Math.floor(e/3600),i=Math.floor(e%3600/60),s=Math.floor(e%60),a=function(e){return String(e).padStart(2,"0")};return"".concat(a(t),":").concat(a(i),":").concat(s.toFixed(0))},f=i.memo(function(f){var h=f.title,y=f.segments,p=f.gsUtilPath,_=f.citationNumber,j=f.relevanceScore,x=f.customStyles,S=i.useState(0),P=S[0],w=S[1],A=i.useState(y.length>0),q=A[0],N=A[1],C=i.useState(!1);C[0];var U=C[1],L=i.useState(!1),b=L[0],k=L[1],B=i.useState(""),T=B[0],M=B[1],I=i.useState(!0),W=I[0],D=I[1],V=i.useState("audio"),E=V[0],Q=V[1],R=m.useRequirementAI().apiCachingConfig,O=R.queryClient,G=R.useGetSignedUrlQuery,z=R.useGetSignedUrlMutation,F=R.useExtractAudioPeaksMutation,H=R.useExtractAudioPeaksQuery,$=R.useGetVideoSignedUrlQuery,J=R.useGetVideoSignedUrlMutation,K=i.useRef(null),X=p.replace(/\.wav$|\.mp3$/i,".mp4"),Y=["getSignedUrl",p],Z=["extractAudioPeaks",p],ee=["getVideoSignedUrl",X],te=G(p,Y).data,ie=H(p,Z).data,se=$(X,ee).data,ae=z(p),ne=ae.mutate,re=ae.isPending,le=F(p),oe=le.mutate,de=le.isPending,ue=J(X).mutate,ce=i.useCallback(function(e){w(e)},[]);i.useEffect(function(){if(p){var e=O.getQueryData(Y),t=O.getQueryData(Z),i=O.getQueryData(ee);e||ne({gsUtilPath:p}),t||oe({gsUtilPath:p}),i||ue({gsUtilPath:X})}else console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL")},[p]),i.useEffect(function(){se&&e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,fetch(se)];case 1:return t=e.sent(),M(t.ok?se:""),[2]}})})},[se]);return t.jsx(v.AudioPlayProvider,{children:t.jsxs("div",e.__assign({className:l.default.wrapper,style:null==x?void 0:x.wrapper},{children:[t.jsxs("div",e.__assign({className:l.default.header,style:null==x?void 0:x.header},{children:[t.jsx("h2",e.__assign({className:l.default.title,style:null==x?void 0:x.title},{children:h||"Audio Snippet"})),c.renderCitationAIConfidenceDisplay(j,!0,null==x?void 0:x.confidenceDisplay)]})),t.jsxs("div",e.__assign({className:l.default.content,style:null==x?void 0:x.content},{children:["audio"!==E&&T?t.jsxs("div",e.__assign({className:l.default.videoSection,style:null==x?void 0:x.videoSection},{children:[W&&t.jsxs("div",e.__assign({className:l.default.videoLoader,style:null==x?void 0:x.videoLoader},{children:[t.jsx(u.CircularProgress,{size:40}),t.jsx("p",{children:"Loading video..."})]})),t.jsx("div",e.__assign({style:{visibility:W?"hidden":"visible",position:W?"absolute":"relative"}},{children:t.jsx(a.default,{videoSrc:T,currentTime:P,isWaveformPlaying:b,onBufferingStart:function(){U(!0),b&&k(!1)},onBufferingEnd:function(){U(!1)},onVideoPlayPause:function(e){K.current?e?b||K.current.togglePlayPause():b&&K.current.togglePlayPause():k(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:function(e){return function(e){D(e)}(e)},isUrlPending:re,isPeaksPending:de,signedUrl:te,AudioData:ie,showOnlyMatched:q,wavesurferRef:K,handleAudioTimeUpdate:ce,segments:y,setIsAudioPlaying:k,setShowOnlyMatched:N,customStyles:null==x?void 0:x.videoPlayer,waveformStyles:null==x?void 0:x.waveform},"video-".concat(_))}))]})):t.jsx("div",e.__assign({className:l.default.audioSection,style:null==x?void 0:x.audioSection},{children:re||de?t.jsxs("div",e.__assign({className:l.default.audioLoader,style:null==x?void 0:x.audioLoader},{children:[t.jsx(u.CircularProgress,{size:48}),t.jsx("span",{children:"Loading audio peaks..."})]})):te&&ie&&t.jsx(s.default,{ref:K,audio_file_name:te,matchedSegments:y,peaks:ie.peaks,duration:ie.duration,setIsAudioPlaying:k,onTimeUpdate:ce,currentAudioTime:P,showOnlyMatched:q,setShowOnlyMatched:N,customStyles:null==x?void 0:x.waveform},"audio-".concat(_))})),t.jsxs("div",e.__assign({className:l.default.controls,style:null==x?void 0:x.controls},{children:[T&&t.jsxs("div",e.__assign({className:l.default.mediaToggle,style:null==x?void 0:x.mediaToggle},{children:[t.jsx("span",e.__assign({className:"\n ".concat(l.default.mediaButton,"\n ").concat("video"===E&&l.default.mediaButtonActive,"\n "),style:"video"===E?null==x?void 0:x.mediaButtonActive:null==x?void 0:x.mediaButton,onClick:function(){return Q("video")}},{children:t.jsx(d.default,{})})),t.jsx("span",e.__assign({className:"\n ".concat(l.default.mediaButton,"\n ").concat("audio"===E&&l.default.mediaButtonActive,"\n "),style:"audio"===E?null==x?void 0:x.mediaButtonActive:null==x?void 0:x.mediaButton,onClick:function(){return Q("audio")}},{children:t.jsx(o.default,{})}))]})),t.jsx("label",e.__assign({className:l.default.switchLabel,style:null==x?void 0:x.switchLabel},{children:t.jsx("span",{children:"play only matched segments"})}))]})),t.jsxs("div",e.__assign({className:l.default.transcript,style:null==x?void 0:x.transcriptContainer},{children:[t.jsx("div",e.__assign({className:l.default.transcriptHeader,style:null==x?void 0:x.transcriptHeader},{children:"Transcript"})),function(i){var s=n.sortTopicsByCheckedStatus(i);return t.jsx("div",e.__assign({className:l.default.segmentList,style:null==x?void 0:x.segmentList},{children:null==s?void 0:s.map(function(i){return t.jsx("div",e.__assign({id:i.segment_id,className:l.default.segmentItem,style:null==x?void 0:x.transcriptSegment},{children:t.jsx(r.default,{content:i.text,startTime:g(i.start),endTime:g(i.end),words:i.words||[],currentTime:P,containerStyle:null==x?void 0:x.transcriptContainer,customStyles:null==x?void 0:x.segmentWords})}),i.segment_id)})}))}(y)]}))]}))]}))})});exports.default=f,exports.formatTime=g;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),s=require("./searchwaveform.js"),a=require("./components/videoPlayer.js"),n=require("./utils/word-segment-util.js"),l=require("./components/SegmentByWordsViral.js"),d=require("./SearchWaveFromWrapper.module.css.js"),r=require("./icons/AudioLinesIcon.js"),o=require("./icons/VideoIcon.js"),u=require("@mui/material"),c=require("../../../shared/CitationAIConfidenceDisplay.js"),m=require("../../RequirementAIWrapper/RequirementAIWrapper.js"),v=require("./store/autoplay.wavefrom.js");const g=e=>{const t=Math.floor(e/3600),i=Math.floor(e%3600/60),s=Math.floor(e%60),a=e=>String(e).padStart(2,"0");return`${a(t)}:${a(i)}:${s.toFixed(0)}`},f=i.memo(({title:f,segments:h,gsUtilPath:j,citationNumber:y,relevanceScore:p,customStyles:x})=>{const[S,b]=i.useState(0),[P,O]=i.useState(h.length>0),[w,A]=i.useState(!1),[q,N]=i.useState(!1),[C,U]=i.useState(""),[L,k]=i.useState(!0),[B,T]=i.useState("audio"),{queryClient:M,useGetSignedUrlQuery:$,useGetSignedUrlMutation:I,useExtractAudioPeaksMutation:W,useExtractAudioPeaksQuery:_,useGetVideoSignedUrlQuery:D,useGetVideoSignedUrlMutation:V}=m.useRequirementAI().apiCachingConfig,E=i.useRef(null),Q=j.replace(/\.wav$|\.mp3$/i,".mp4"),R=["getSignedUrl",j],G=["extractAudioPeaks",j],z=["getVideoSignedUrl",Q],{data:F}=$(j,R),{data:H}=_(j,G),{data:J}=D(Q,z),{mutate:K,isPending:X}=I(j),{mutate:Y,isPending:Z}=W(j),{mutate:ee}=V(Q),te=i.useCallback(e=>{b(e)},[]);i.useEffect(()=>{if(!j)return void console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL");const e=M.getQueryData(R),t=M.getQueryData(G),i=M.getQueryData(z);e||K({gsUtilPath:j}),t||Y({gsUtilPath:j}),i||ee({gsUtilPath:Q})},[j]),i.useEffect(()=>{J&&e.__awaiter(void 0,void 0,void 0,function*(){const e=yield fetch(J);U(e.ok?J:"")})},[J]);return t.jsx(v.AudioPlayProvider,{children:t.jsxs("div",Object.assign({className:d.default.wrapper,style:null==x?void 0:x.wrapper},{children:[t.jsxs("div",Object.assign({className:d.default.header,style:null==x?void 0:x.header},{children:[t.jsx("h2",Object.assign({className:d.default.title,style:null==x?void 0:x.title},{children:f||"Audio Snippet"})),c.renderCitationAIConfidenceDisplay(p,!0,null==x?void 0:x.confidenceDisplay)]})),t.jsxs("div",Object.assign({className:d.default.content,style:null==x?void 0:x.content},{children:["audio"!==B&&C?t.jsxs("div",Object.assign({className:d.default.videoSection,style:null==x?void 0:x.videoSection},{children:[L&&t.jsxs("div",Object.assign({className:d.default.videoLoader,style:null==x?void 0:x.videoLoader},{children:[t.jsx(u.CircularProgress,{size:40}),t.jsx("p",{children:"Loading video..."})]})),t.jsx("div",Object.assign({style:{visibility:L?"hidden":"visible",position:L?"absolute":"relative"}},{children:t.jsx(a.default,{videoSrc:C,currentTime:S,isWaveformPlaying:q,onBufferingStart:()=>{A(!0),q&&N(!1)},onBufferingEnd:()=>{A(!1)},onVideoPlayPause:e=>{E.current?e?q||E.current.togglePlayPause():q&&E.current.togglePlayPause():N(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:e=>(e=>{k(e)})(e),isUrlPending:X,isPeaksPending:Z,signedUrl:F,AudioData:H,showOnlyMatched:P,wavesurferRef:E,handleAudioTimeUpdate:te,segments:h,setIsAudioPlaying:N,setShowOnlyMatched:O,customStyles:null==x?void 0:x.videoPlayer,waveformStyles:null==x?void 0:x.waveform},`video-${y}`)}))]})):t.jsx("div",Object.assign({className:d.default.audioSection,style:null==x?void 0:x.audioSection},{children:X||Z?t.jsxs("div",Object.assign({className:d.default.audioLoader,style:null==x?void 0:x.audioLoader},{children:[t.jsx(u.CircularProgress,{size:48}),t.jsx("span",{children:"Loading audio peaks..."})]})):F&&H&&t.jsx(s.default,{ref:E,audio_file_name:F,matchedSegments:h,peaks:H.peaks,duration:H.duration,setIsAudioPlaying:N,onTimeUpdate:te,currentAudioTime:S,showOnlyMatched:P,setShowOnlyMatched:O,customStyles:null==x?void 0:x.waveform},`audio-${y}`)})),t.jsxs("div",Object.assign({className:d.default.controls,style:null==x?void 0:x.controls},{children:[C&&t.jsxs("div",Object.assign({className:d.default.mediaToggle,style:null==x?void 0:x.mediaToggle},{children:[t.jsx("span",Object.assign({className:`\n ${d.default.mediaButton}\n ${"video"===B&&d.default.mediaButtonActive}\n `,style:"video"===B?null==x?void 0:x.mediaButtonActive:null==x?void 0:x.mediaButton,onClick:()=>T("video")},{children:t.jsx(o.default,{})})),t.jsx("span",Object.assign({className:`\n ${d.default.mediaButton}\n ${"audio"===B&&d.default.mediaButtonActive}\n `,style:"audio"===B?null==x?void 0:x.mediaButtonActive:null==x?void 0:x.mediaButton,onClick:()=>T("audio")},{children:t.jsx(r.default,{})}))]})),t.jsx("label",Object.assign({className:d.default.switchLabel,style:null==x?void 0:x.switchLabel},{children:t.jsx("span",{children:"play only matched segments"})}))]})),t.jsxs("div",Object.assign({className:d.default.transcript,style:null==x?void 0:x.transcriptContainer},{children:[t.jsx("div",Object.assign({className:d.default.transcriptHeader,style:null==x?void 0:x.transcriptHeader},{children:"Transcript"})),(e=>{const i=n.sortTopicsByCheckedStatus(e);return t.jsx("div",Object.assign({className:d.default.segmentList,style:null==x?void 0:x.segmentList},{children:null==i?void 0:i.map(e=>t.jsx("div",Object.assign({id:e.segment_id,className:d.default.segmentItem,style:null==x?void 0:x.transcriptSegment},{children:t.jsx(l.default,{content:e.text,startTime:g(e.start),endTime:g(e.end),words:e.words||[],currentTime:S,containerStyle:null==x?void 0:x.transcriptContainer,customStyles:null==x?void 0:x.segmentWords})}),e.segment_id))}))})(h)]}))]}))]}))})});exports.default=f,exports.formatTime=g;
2
2
  //# sourceMappingURL=SearchWaveFromWrapper.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),i=require("react/jsx-runtime"),e=require("react"),n=require("./components/AudioCitationIcon.js"),o=require("./SearchWaveFromWrapper.js"),a=require("../../../../CitationRenderer/CitationRenderer.js");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=c(e);exports.default=function(e){var c,u,l,s,d,m,p,v=(null===(c=e.customIcons)||void 0===c?void 0:c.waveformCitationIcon)||i.jsx(n.default,{});return i.jsx(a.default,{inLineCitation:!0,citationTitle:e.title,citationId:"audio-citation-".concat(e.citation.citation_number),citationComponent:i.jsx(o.default,{citationNumber:e.citation.citation_number,gsUtilPath:"audio_transcript"===e.citation.customMetadata.type?null===(u=e.citation.customMetadata)||void 0===u?void 0:u.gs_util_url:"",relevanceScore:"audio_transcript"===e.citation.customMetadata.type?null===(l=e.citation.customMetadata)||void 0===l?void 0:l.relevance_score:0,title:"audio_transcript"===e.citation.customMetadata.type?null===(s=e.citation.customMetadata)||void 0===s?void 0:s.file_name:"",segments:"audio_transcript"===e.citation.customMetadata.type?null===(d=e.citation.customMetadata)||void 0===d?void 0:d.segments:[],customStyles:e.customStyles}),chevronDownComponent:(null==e?void 0:e.citationIcon)?r.default.createElement(e.citationIcon):v,chevronUpComponent:(null==e?void 0:e.citationIcon)?r.default.createElement(e.citationIcon):v,styles:{pillButton:t.__assign({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(m=e.customStyles)||void 0===m?void 0:m.pill),citationContent:t.__assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(p=e.customStyles)||void 0===p?void 0:p.content)}})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("react"),i=require("./components/AudioCitationIcon.js"),o=require("./SearchWaveFromWrapper.js"),n=require("../../../../CitationRenderer/CitationRenderer.js");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=a(e);exports.default=e=>{var a,r,u,l,s,d,m;const p=(null===(a=e.customIcons)||void 0===a?void 0:a.waveformCitationIcon)||t.jsx(i.default,{});return t.jsx(n.default,{inLineCitation:!0,citationTitle:e.title,citationId:`audio-citation-${e.citation.citation_number}`,citationComponent:t.jsx(o.default,{citationNumber:e.citation.citation_number,gsUtilPath:"audio_transcript"===e.citation.customMetadata.type?null===(r=e.citation.customMetadata)||void 0===r?void 0:r.gs_util_url:"",relevanceScore:"audio_transcript"===e.citation.customMetadata.type?null===(u=e.citation.customMetadata)||void 0===u?void 0:u.relevance_score:0,title:"audio_transcript"===e.citation.customMetadata.type?null===(l=e.citation.customMetadata)||void 0===l?void 0:l.file_name:"",segments:"audio_transcript"===e.citation.customMetadata.type?null===(s=e.citation.customMetadata)||void 0===s?void 0:s.segments:[],customStyles:e.customStyles}),chevronDownComponent:(null==e?void 0:e.citationIcon)?c.default.createElement(e.citationIcon):p,chevronUpComponent:(null==e?void 0:e.citationIcon)?c.default.createElement(e.citationIcon):p,styles:{pillButton:Object.assign({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(d=e.customStyles)||void 0===d?void 0:d.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(m=e.customStyles)||void 0===m?void 0:m.content)}})};
2
2
  //# sourceMappingURL=WaveformCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime");exports.default=function(i){return s.jsx("div",e.__assign({className:"mb-2"},{children:s.jsxs("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[s.jsx("path",{d:"M6.00012 4.5C6.00012 3.70435 6.31619 2.94129 6.8788 2.37868C7.44141 1.81607 8.20447 1.5 9.00012 1.5H14.3791C14.9757 1.50053 15.5476 1.73792 15.9691 2.16L20.3416 6.531C20.7631 6.9528 21 7.52468 21.0001 8.121V19.5C21.0001 20.2957 20.684 21.0587 20.1214 21.6213C19.5588 22.1839 18.7958 22.5 18.0001 22.5H10.4561L10.4562 21.063H11.6561L18.0001 21C18.3979 21 18.7795 20.842 19.0608 20.5607C19.3421 20.2794 19.5001 19.8978 19.5001 19.5V9H15.7501C15.1534 9 14.5811 8.76295 14.1591 8.34099C13.7372 7.91903 13.5001 7.34674 13.5001 6.75V3H9.00012C8.60229 3 8.22076 3.15804 7.93946 3.43934C7.65815 3.72064 7.50012 4.10218 7.50012 4.5V8.14383H6.00012V4.5ZM15.7501 7.5H19.1896L15.0001 3.3105V6.75C15.0001 6.94891 15.0791 7.13968 15.2198 7.28033C15.3604 7.42098 15.5512 7.5 15.7501 7.5Z",fill:"#5C75F4"}),s.jsx("path",{d:"M10.0691 14.3961V15.3008C10.0691 17.0495 8.65149 18.4672 6.90273 18.4672M3.73633 14.3961V15.3008C3.73633 17.0495 5.15398 18.4672 6.90273 18.4672M6.90273 18.4672V19.8242M5.09336 19.8242H8.71211M6.90273 16.6578C6.15327 16.6578 5.5457 16.0502 5.5457 15.3008V12.1344C5.5457 11.3849 6.15327 10.7773 6.90273 10.7773C7.6522 10.7773 8.25977 11.3849 8.25977 12.1344V15.3008C8.25977 16.0502 7.6522 16.6578 6.90273 16.6578Z",stroke:"#5C75F4","stroke-linecap":"round","stroke-linejoin":"round"}),s.jsx("g",e.__assign({"clip-path":"url(#clip0_3025_73410)"},{children:s.jsx("path",{d:"M11.7012 13.7758L11.7012 14.9758M13.0512 14.0758V14.6758M14.4012 12.5758V16.1758M15.7512 11.6758V17.0758M17.1012 13.7758V14.9758",stroke:"#5C75F4","stroke-width":"0.837402","stroke-linecap":"round","stroke-linejoin":"round"})})),s.jsx("defs",{children:s.jsx("clipPath",e.__assign({id:"clip0_3025_73410"},{children:s.jsx("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})}))})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=s=>e.jsx("div",Object.assign({className:"mb-2"},{children:e.jsxs("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("path",{d:"M6.00012 4.5C6.00012 3.70435 6.31619 2.94129 6.8788 2.37868C7.44141 1.81607 8.20447 1.5 9.00012 1.5H14.3791C14.9757 1.50053 15.5476 1.73792 15.9691 2.16L20.3416 6.531C20.7631 6.9528 21 7.52468 21.0001 8.121V19.5C21.0001 20.2957 20.684 21.0587 20.1214 21.6213C19.5588 22.1839 18.7958 22.5 18.0001 22.5H10.4561L10.4562 21.063H11.6561L18.0001 21C18.3979 21 18.7795 20.842 19.0608 20.5607C19.3421 20.2794 19.5001 19.8978 19.5001 19.5V9H15.7501C15.1534 9 14.5811 8.76295 14.1591 8.34099C13.7372 7.91903 13.5001 7.34674 13.5001 6.75V3H9.00012C8.60229 3 8.22076 3.15804 7.93946 3.43934C7.65815 3.72064 7.50012 4.10218 7.50012 4.5V8.14383H6.00012V4.5ZM15.7501 7.5H19.1896L15.0001 3.3105V6.75C15.0001 6.94891 15.0791 7.13968 15.2198 7.28033C15.3604 7.42098 15.5512 7.5 15.7501 7.5Z",fill:"#5C75F4"}),e.jsx("path",{d:"M10.0691 14.3961V15.3008C10.0691 17.0495 8.65149 18.4672 6.90273 18.4672M3.73633 14.3961V15.3008C3.73633 17.0495 5.15398 18.4672 6.90273 18.4672M6.90273 18.4672V19.8242M5.09336 19.8242H8.71211M6.90273 16.6578C6.15327 16.6578 5.5457 16.0502 5.5457 15.3008V12.1344C5.5457 11.3849 6.15327 10.7773 6.90273 10.7773C7.6522 10.7773 8.25977 11.3849 8.25977 12.1344V15.3008C8.25977 16.0502 7.6522 16.6578 6.90273 16.6578Z",stroke:"#5C75F4","stroke-linecap":"round","stroke-linejoin":"round"}),e.jsx("g",Object.assign({"clip-path":"url(#clip0_3025_73410)"},{children:e.jsx("path",{d:"M11.7012 13.7758L11.7012 14.9758M13.0512 14.0758V14.6758M14.4012 12.5758V16.1758M15.7512 11.6758V17.0758M17.1012 13.7758V14.9758",stroke:"#5C75F4","stroke-width":"0.837402","stroke-linecap":"round","stroke-linejoin":"round"})})),e.jsx("defs",{children:e.jsx("clipPath",Object.assign({id:"clip0_3025_73410"},{children:e.jsx("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})}))})]}))}));
2
2
  //# sourceMappingURL=AudioCitationIcon.js.map
@@ -1,2 +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("wavesurfer.js"),u=require("wavesurfer.js/dist/plugins/regions"),c=require("../store/autoplay.wavefrom.js"),a=require("./AudioTimeLineSlider.module.css.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(r),l=s(n),o=s(u),d=r.forwardRef(function(n,u){var s=n.audio_file_name,d=n.matchedSegments,f=n.onTimeUpdate;n.peaks;var v=n.duration,g=n.setIsAudioPlaying,m=n.setChevronIndex,p=n.chevronIndex,h=void 0===p?0:p,y=n.onToggleShowMatched,_=n.topicId,S=n.isVideoBuffering,T=n.playOnlyMatched,x=void 0===T||T,k=n.showOnlyMatched,R=n.setShowOnlyMatched,j=n.customStyles,b=r.useState(!1),w=b[0],P=b[1],C=r.useState(!0);C[0];var M=C[1],N=r.useState(!1),I=N[0],q=N[1],E=r.useState(!1),D=E[0],O=E[1],A=r.useState(!1),B=A[0],W=A[1],H=r.useState(!1);H[0];var L=H[1],U=r.useState(0),X=U[0],z=U[1],F=r.useState(!1);F[0];var G=F[1],V=r.useState("00:00:00"),J=V[0],K=V[1],Q=r.useState("00:00:00"),Y=Q[0],Z=Q[1],$=r.useState(0),ee=$[0],te=$[1],re=r.useState(!1),ne=re[0],ue=re[1],ce=r.useState(0),ae=ce[0],se=ce[1],ie=r.useState("00:00:00"),le=ie[0],oe=ie[1],de=r.useRef(null),fe=r.useRef(!1),ve=r.useRef(null),ge=r.useRef(null),me=r.useRef(null),pe=r.useRef(!1),he=r.useRef(null),ye=r.useRef(null),_e=r.useRef(0),Se=r.useRef(0),Te=r.useState(!1),xe=Te[0],ke=Te[1],Re=c.useAudioPlayPause(),je=Re.playTopicId,be=Re.resetTrigger,we=Re.pendingPlayRequest,Pe=Re.setPendingPlayRequest,Ce=Re.triggerPlayForTopic,Me=r.useRef(null),Ne=function(e){try{var t=e.split(":"),r=t[0],n=t[1],u=t[2],c=(t[3],parseInt(r).toString().padStart(2,"0")),a=parseInt(n).toString().padStart(2,"0"),s=parseInt(u).toString().padStart(2,"0");return"".concat(c,":").concat(a,":").concat(s)}catch(e){console.log("Error converting formatTimeToHMS",e)}};r.useEffect(function(){xe&&we===_&&(Pe(null),setTimeout(function(){Ce(_)},100))},[xe,we,_]),r.useEffect(function(){xe&&je===_&&(Me.current&&(Me.current.click(),P(!0)),be())},[je,_,xe]),r.useEffect(function(){return ke(!0),function(){ke(!1)}},[]),r.useEffect(function(){if(s&&ve.current&&!pe.current){M(!0);var e=o.default.create(),t=l.default.create({container:ve.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ge.current=t,me.current=t.registerPlugin(e),pe.current=!0,t.on("decode",function(){G(!0),qe();var e=Ne(Ie(v));Z(e||"00:00:00")}),t.on("ready",function(){M(!1)}),t.on("play",function(){P(!0),g&&g(!0)}),t.on("pause",function(){P(!1),g&&g(!1)}),t.on("finish",function(){P(!1),g&&g(!1),I&&(q(!1),O(!1),W(!0))}),t.on("seeking",function(){k||I&&!D&&Ee()}),t.on("error",function(){M(!1)}),t.on("audioprocess",function(e){(f&&f(e),fe.current)||te(e/v*100);var t=Ne(Ie(e));K(t||"00:00:00"),Se.current=e}),function(){he.current&&clearTimeout(he.current),ye.current,t.destroy(),pe.current=!1,ge.current=null}}},[s]),r.useEffect(function(){ge.current&&(ge.current.setOptions({interact:!k}),w&&ge.current.pause(),k?(q(!0),_e.current=0):Ee(),y&&y(k))},[k]);var Ie=function(e){var t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),u=Math.floor(e%1*1e3);return"".concat(String(t).padStart(2,"0"),":").concat(String(r).padStart(2,"0"),":").concat(String(n).padStart(2,"0"),":").concat(String(u).padStart(3,"0"))},qe=r.useCallback(function(){me.current&&ge.current&&(me.current.clearRegions(),d.forEach(function(e,t){me.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[d]),Ee=r.useCallback(function(){ge.current&&(q(!1),O(!1),W(!1),L(!1),he.current&&(clearTimeout(he.current),he.current=null),ye.current&&(ge.current.un("audioprocess",ye.current),ye.current=null))},[]),De=r.useCallback(function(e){!k&&ge.current&&(ge.current.seekTo(e/v),ge.current.play(),P(!0),g&&g(!0),K(Ne(Ie(e))),q(!1),O(!1),W(!1))},[k,v,g,Ie,Ne]),Oe=r.useRef(!1),Ae=r.useCallback(function(){if(!Oe.current&&ge.current&&d.length){Oe.current=!0,ge.current.pause();var e=_e.current+1;if(console.log("Current segment:",_e.current),console.log("Next index calculated:",e),console.log("Total segments:",d.length),e<d.length){var t=d[e];K(Ne(Ie(t.start_time))),m&&m(e),z(e),_e.current=e;var r=k?0:2e3;he.current=setTimeout(function(){Oe.current=!1,setTimeout(function(){if(ge.current){ge.current.seekTo(t.start_time/v),ge.current.play();var e=t.end_time,r=function(t){var n;t>=e&&(null===(n=ge.current)||void 0===n||n.un("audioprocess",r),ye.current=null,Ae())};ye.current=r,ge.current.on("audioprocess",r)}},100)},r)}else{if(console.log("End of cycle reached, resetting to index 0"),q(k),O(!0),W(!0),_e.current=0,z(0),m&&m(0),d.length>0){var n=d[0];K(Ne(Ie(n.start_time))),ge.current.seekTo(n.start_time/v)}ge.current.isPlaying()&&ge.current.pause(),he.current=setTimeout(function(){Oe.current=!1,ge.current&&ge.current.isPlaying()&&ge.current.pause()},k?0:2e3)}}},[d,v,m,Ie,k]),Be=r.useCallback(function(){if(ge.current&&d.length){var e=_e.current;if(e>=d.length)return q(k),void W(!0);var t=d[e];z(e),K(Ne(Ie(t.start_time))),m&&m(e),setTimeout(function(){if(ge.current){ge.current.seekTo(t.start_time/v),ge.current.play();var e=t.end_time,r=function(t){var n;t>=e&&(null===(n=ge.current)||void 0===n||n.un("audioprocess",r),ye.current=null,Ae())};ye.current=r,ge.current.on("audioprocess",r)}},100)}},[d,v,m,Ae,Ie,k]),We=r.useCallback(function(){if(ge.current&&d.length){ye.current&&(ge.current.un("audioprocess",ye.current),ye.current=null);var e=d[_e.current];if(e){var t=e.end_time,r=function(e){var n;e>=t&&(null===(n=ge.current)||void 0===n||n.un("audioprocess",r),ye.current=null,Ae())};ye.current=r,ge.current.on("audioprocess",r)}}},[d,Ae]),He=r.useCallback(function(){ge.current&&(k?w?(ge.current.pause(),O(!0)):D?(ge.current.play(),O(!1),We()):B?(W(!1),_e.current=0,Be()):Be():w?ge.current.pause():ge.current.play())},[w,k,D,B,Be,We]),Le=r.useCallback(function(e){if(ge.current&&0!==d.length){var t,r=w;w&&(ge.current.pause(),O(!0)),ye.current&&(ge.current.un("audioprocess",ye.current),ye.current=null),t="next"===e?(X+1)%d.length:(X-1+d.length)%d.length,z(t),_e.current=t;var n=d[t];ge.current.seekTo(n.start_time/v),m&&m(t),r&&k&&setTimeout(function(){ge.current&&(ge.current.play(),O(!1),We())},50)}},[X,d,m,v,w,k,We]),Ue=r.useCallback(function(e){ge.current&&(k||(I&&Ee(),ge.current.seekTo(e/v)))},[v,I,Ee,k]);r.useEffect(function(){if(d.length>0&&void 0!==h&&ge.current&&!Oe.current){if(h===_e.current)return;var e=w;ye.current&&(ge.current.un("audioprocess",ye.current),ye.current=null);var t=d[h];t&&(ge.current.seekTo(t.start_time/v),z(h),_e.current=h,e&&k&&setTimeout(function(){ge.current&&We()},50))}},[h,v,d,k,w,We]);var Xe=r.useRef(!1);r.useEffect(function(){S&&ge.current&&ge.current.isPlaying()&&(Xe.current=!0,ge.current.pause(),I&&O(!0)),!S&&Xe.current&&ge.current&&ge.current&&(ge.current.play(),Xe.current=!1,I&&D&&(O(!1),We()))},[S,I,D,We]),i.default.useImperativeHandle(u,function(){return{waveSurfer:ge.current,navigateSegments:Le,togglePlayPause:He,getCurrentSegmentIndex:function(){return X},setCurrentSegmentIndex:z,isPlayingSequence:function(){return I},setPlayingSequence:function(e){return q(e)},seekToTime:Ue,showOnlyMatched:k,setShowOnlyMatched:function(e){return R(e)},handleIndividualSegmentPlay:De,setPlaybackRate:function(e){ge.current&&ge.current.setPlaybackRate(e)}}},[ge.current,Le,He,X,I,Ue,k,De]);return t.jsx("div",e.__assign({className:a.default.container,style:null==j?void 0:j.container},{children:t.jsxs("div",e.__assign({className:a.default.inner,style:null==j?void 0:j.inner},{children:[t.jsx("div",e.__assign({className:a.default.waveformWrapper,style:null==j?void 0:j.waveformRow},{children:t.jsx("div",{ref:ve,className:a.default.waveform,style:null==j?void 0:j.waveform})})),t.jsx("div",e.__assign({className:a.default.timeWrapper,style:null==j?void 0:j.timeRow},{children:t.jsxs("div",e.__assign({className:a.default.timeText,style:null==j?void 0:j.timeText},{children:[t.jsx("span",{children:J}),t.jsx("span",{children:"/"}),t.jsx("span",{children:Y})]}))})),t.jsx("div",e.__assign({className:a.default.sliderRow,style:null==j?void 0:j.sliderRow},{children:t.jsxs("div",e.__assign({className:"".concat(a.default.slider," ").concat([a.default.sliderBase,k?a.default.sliderDisabled:a.default.sliderEnabled,a.default.sliderGroup].join(" ")),ref:de,style:null==j?void 0:j.slider,onClick:k?void 0:function(e){var t;if(!k){var r=null===(t=de.current)||void 0===t?void 0:t.getBoundingClientRect();if(r&&ge.current){var n=(e.clientX-r.left)/r.width*100,u=n/100*v;te(n),ge.current.seekTo(u/v),I&&Ee()}}},onMouseMove:k?void 0:function(e){if(!k&&de.current){var t=de.current.getBoundingClientRect(),r=e.clientX-t.left;if(r>=0&&r<=t.width){var n=r/t.width*100;ue(!0),se(r);var u=Ne(Ie(n/100*v));oe(u||"00:00:00")}}},onMouseLeave:function(){ue(!1)},onMouseDown:k?void 0:function(){k||(fe.current=!0)},onMouseUp:k?void 0:function(){if(!k&&(fe.current=!1,ge.current)){var e=ee/100*v;ge.current.seekTo(e/v),I&&Ee()}}},{children:[t.jsx("div",e.__assign({className:a.default.track,style:null==j?void 0:j.sliderTrack},{children:t.jsx("div",{className:a.default.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})})),d.map(function(e,r){var n=e.start_time/v*100,u=(e.end_time-e.start_time)/v*100,c=r===X&&x;return t.jsx("div",{className:"".concat(a.default.segment," ").concat(c?a.default.segmentActive:a.default.segmentInactive),style:{left:"".concat(n,"%"),width:"".concat(u,"%"),opacity:x&&!c?.3:1}},e.segment_id)}),t.jsx("div",{className:a.default.progress,style:e.__assign({width:"".concat(ee,"%")},null==j?void 0:j.sliderProgress)}),t.jsx("div",e.__assign({className:a.default.thumb,style:e.__assign({left:"".concat(ee,"%")},null==j?void 0:j.sliderThumb)},{children:t.jsx("div",{className:a.default.thumbDot,style:null==j?void 0:j.thumbDot})})),ne&&!k&&t.jsx("div",e.__assign({className:a.default.tooltip,style:e.__assign({left:ae},null==j?void 0:j.timeTooltip)},{children:le}))]}))}))]}))}))});d.displayName="AudioTimelineSlider",exports.default=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("wavesurfer.js"),n=require("wavesurfer.js/dist/plugins/regions"),u=require("../store/autoplay.wavefrom.js"),s=require("./AudioTimeLineSlider.module.css.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=c(t),l=c(r),i=c(n);const o=t.forwardRef(({audio_file_name:r,matchedSegments:n,onTimeUpdate:c,peaks:o,duration:d,setIsAudioPlaying:f,setChevronIndex:g,chevronIndex:m=0,onToggleShowMatched:p,topicId:v,isVideoBuffering:h,playOnlyMatched:y=!0,showOnlyMatched:S,setShowOnlyMatched:j,customStyles:b},T)=>{const[x,k]=t.useState(!1),[R,w]=t.useState(!0),[_,O]=t.useState(!1),[P,C]=t.useState(!1),[M,N]=t.useState(!1),[$,I]=t.useState(!1),[E,q]=t.useState(0),[D,A]=t.useState(!1),[B,W]=t.useState("00:00:00"),[H,L]=t.useState("00:00:00"),[U,X]=t.useState(0),[z,F]=t.useState(!1),[G,V]=t.useState(0),[J,K]=t.useState("00:00:00"),Q=t.useRef(null),Y=t.useRef(!1),Z=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),re=t.useRef(!1),ne=t.useRef(null),ue=t.useRef(null),se=t.useRef(0),ce=t.useRef(0),[ae,le]=t.useState(!1),{playTopicId:ie,resetTrigger:oe,pendingPlayRequest:de,setPendingPlayRequest:fe,triggerPlayForTopic:ge}=u.useAudioPlayPause(),me=t.useRef(null),pe=e=>{try{const[t,r,n,u]=e.split(":"),s=parseInt(t).toString().padStart(2,"0"),c=parseInt(r).toString().padStart(2,"0");return`${s}:${c}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};t.useEffect(()=>{ae&&de===v&&(fe(null),setTimeout(()=>{ge(v)},100))},[ae,de,v]),t.useEffect(()=>{ae&&ie===v&&(me.current&&(me.current.click(),k(!0)),oe())},[ie,v,ae]),t.useEffect(()=>(le(!0),()=>{le(!1)}),[]),t.useEffect(()=>{if(!r||!Z.current||re.current)return;w(!0);const e=i.default.create(),t=l.default.create({container:Z.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ee.current=t,te.current=t.registerPlugin(e),re.current=!0,t.on("decode",()=>{A(!0),he();const e=pe(ve(d));L(e||"00:00:00")}),t.on("ready",()=>{w(!1)}),t.on("play",()=>{k(!0),f&&f(!0)}),t.on("pause",()=>{k(!1),f&&f(!1)}),t.on("finish",()=>{k(!1),f&&f(!1),_&&(O(!1),C(!1),N(!0))}),t.on("seeking",()=>{S||_&&!P&&ye()}),t.on("error",()=>{w(!1)}),t.on("audioprocess",e=>{if(c&&c(e),!Y.current){X(e/d*100)}const t=pe(ve(e));W(t||"00:00:00"),ce.current=e}),()=>{ne.current&&clearTimeout(ne.current),ue.current,t.destroy(),re.current=!1,ee.current=null}},[r]),t.useEffect(()=>{ee.current&&(ee.current.setOptions({interact:!S}),x&&ee.current.pause(),S?(O(!0),se.current=0):ye(),p&&p(S))},[S]);const ve=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),u=Math.floor(e%1*1e3);return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(u).padStart(3,"0")}`},he=t.useCallback(()=>{te.current&&ee.current&&(te.current.clearRegions(),n.forEach((e,t)=>{te.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[n]),ye=t.useCallback(()=>{ee.current&&(O(!1),C(!1),N(!1),I(!1),ne.current&&(clearTimeout(ne.current),ne.current=null),ue.current&&(ee.current.un("audioprocess",ue.current),ue.current=null))},[]),Se=t.useCallback(e=>{!S&&ee.current&&(ee.current.seekTo(e/d),ee.current.play(),k(!0),f&&f(!0),W(pe(ve(e))),O(!1),C(!1),N(!1))},[S,d,f,ve,pe]),je=t.useRef(!1),be=t.useCallback(()=>{if(je.current)return;if(!ee.current||!n.length)return;je.current=!0,ee.current.pause();const e=se.current+1;if(console.log("Current segment:",se.current),console.log("Next index calculated:",e),console.log("Total segments:",n.length),e<n.length){const t=n[e];W(pe(ve(t.start_time))),g&&g(e),q(e),se.current=e;const r=S?0:2e3;ne.current=setTimeout(()=>{je.current=!1,setTimeout(()=>{if(!ee.current)return;ee.current.seekTo(t.start_time/d),ee.current.play();const e=t.end_time,r=t=>{var n;t>=e&&(null===(n=ee.current)||void 0===n||n.un("audioprocess",r),ue.current=null,be())};ue.current=r,ee.current.on("audioprocess",r)},100)},r)}else{if(console.log("End of cycle reached, resetting to index 0"),O(S),C(!0),N(!0),se.current=0,q(0),g&&g(0),n.length>0){const e=n[0];W(pe(ve(e.start_time))),ee.current.seekTo(e.start_time/d)}ee.current.isPlaying()&&ee.current.pause(),ne.current=setTimeout(()=>{je.current=!1,ee.current&&ee.current.isPlaying()&&ee.current.pause()},S?0:2e3)}},[n,d,g,ve,S]),Te=t.useCallback(()=>{if(!ee.current||!n.length)return;const e=se.current;if(e>=n.length)return O(S),void N(!0);const t=n[e];q(e),W(pe(ve(t.start_time))),g&&g(e),setTimeout(()=>{if(!ee.current)return;ee.current.seekTo(t.start_time/d),ee.current.play();const e=t.end_time,r=t=>{var n;t>=e&&(null===(n=ee.current)||void 0===n||n.un("audioprocess",r),ue.current=null,be())};ue.current=r,ee.current.on("audioprocess",r)},100)},[n,d,g,be,ve,S]),xe=t.useCallback(()=>{if(!ee.current||!n.length)return;ue.current&&(ee.current.un("audioprocess",ue.current),ue.current=null);const e=n[se.current];if(!e)return;const t=e.end_time,r=e=>{var n;e>=t&&(null===(n=ee.current)||void 0===n||n.un("audioprocess",r),ue.current=null,be())};ue.current=r,ee.current.on("audioprocess",r)},[n,be]),ke=t.useCallback(()=>{ee.current&&(S?x?(ee.current.pause(),C(!0)):P?(ee.current.play(),C(!1),xe()):M?(N(!1),se.current=0,Te()):Te():x?ee.current.pause():ee.current.play())},[x,S,P,M,Te,xe]),Re=t.useCallback(e=>{if(!ee.current||0===n.length)return;const t=x;let r;x&&(ee.current.pause(),C(!0)),ue.current&&(ee.current.un("audioprocess",ue.current),ue.current=null),r="next"===e?(E+1)%n.length:(E-1+n.length)%n.length,q(r),se.current=r;const u=n[r];ee.current.seekTo(u.start_time/d),g&&g(r),t&&S&&setTimeout(()=>{ee.current&&(ee.current.play(),C(!1),xe())},50)},[E,n,g,d,x,S,xe]),we=t.useCallback(e=>{ee.current&&(S||(_&&ye(),ee.current.seekTo(e/d)))},[d,_,ye,S]);t.useEffect(()=>{if(n.length>0&&void 0!==m&&ee.current&&!je.current){if(m===se.current)return;const e=x;ue.current&&(ee.current.un("audioprocess",ue.current),ue.current=null);const t=n[m];t&&(ee.current.seekTo(t.start_time/d),q(m),se.current=m,e&&S&&setTimeout(()=>{ee.current&&xe()},50))}},[m,d,n,S,x,xe]);const _e=t.useRef(!1);t.useEffect(()=>{h&&ee.current&&ee.current.isPlaying()&&(_e.current=!0,ee.current.pause(),_&&C(!0)),!h&&_e.current&&ee.current&&ee.current&&(ee.current.play(),_e.current=!1,_&&P&&(C(!1),xe()))},[h,_,P,xe]),a.default.useImperativeHandle(T,()=>({waveSurfer:ee.current,navigateSegments:Re,togglePlayPause:ke,getCurrentSegmentIndex:()=>E,setCurrentSegmentIndex:q,isPlayingSequence:()=>_,setPlayingSequence:e=>O(e),seekToTime:we,showOnlyMatched:S,setShowOnlyMatched:e=>j(e),handleIndividualSegmentPlay:Se,setPlaybackRate:e=>{ee.current&&ee.current.setPlaybackRate(e)}}),[ee.current,Re,ke,E,_,we,S,Se]);return e.jsx("div",Object.assign({className:s.default.container,style:null==b?void 0:b.container},{children:e.jsxs("div",Object.assign({className:s.default.inner,style:null==b?void 0:b.inner},{children:[e.jsx("div",Object.assign({className:s.default.waveformWrapper,style:null==b?void 0:b.waveformRow},{children:e.jsx("div",{ref:Z,className:s.default.waveform,style:null==b?void 0:b.waveform})})),e.jsx("div",Object.assign({className:s.default.timeWrapper,style:null==b?void 0:b.timeRow},{children:e.jsxs("div",Object.assign({className:s.default.timeText,style:null==b?void 0:b.timeText},{children:[e.jsx("span",{children:B}),e.jsx("span",{children:"/"}),e.jsx("span",{children:H})]}))})),e.jsx("div",Object.assign({className:s.default.sliderRow,style:null==b?void 0:b.sliderRow},{children:e.jsxs("div",Object.assign({className:`${s.default.slider} ${[s.default.sliderBase,S?s.default.sliderDisabled:s.default.sliderEnabled,s.default.sliderGroup].join(" ")}`,ref:Q,style:null==b?void 0:b.slider,onClick:S?void 0:e=>{var t;if(S)return;const r=null===(t=Q.current)||void 0===t?void 0:t.getBoundingClientRect();if(!r||!ee.current)return;const n=(e.clientX-r.left)/r.width*100,u=n/100*d;X(n),ee.current.seekTo(u/d),_&&ye()},onMouseMove:S?void 0:e=>{if(!S&&Q.current){const t=Q.current.getBoundingClientRect(),r=e.clientX-t.left;if(r>=0&&r<=t.width){const e=r/t.width*100;F(!0),V(r);const n=pe(ve(e/100*d));K(n||"00:00:00")}}},onMouseLeave:()=>{F(!1)},onMouseDown:S?void 0:()=>{S||(Y.current=!0)},onMouseUp:S?void 0:()=>{if(!S&&(Y.current=!1,ee.current)){const e=U/100*d;ee.current.seekTo(e/d),_&&ye()}}},{children:[e.jsx("div",Object.assign({className:s.default.track,style:null==b?void 0:b.sliderTrack},{children:e.jsx("div",{className:s.default.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})})),n.map((t,r)=>{const n=t.start_time/d*100,u=(t.end_time-t.start_time)/d*100,c=r===E&&y;return e.jsx("div",{className:`${s.default.segment} ${c?s.default.segmentActive:s.default.segmentInactive}`,style:{left:`${n}%`,width:`${u}%`,opacity:y&&!c?.3:1}},t.segment_id)}),e.jsx("div",{className:s.default.progress,style:Object.assign({width:`${U}%`},null==b?void 0:b.sliderProgress)}),e.jsx("div",Object.assign({className:s.default.thumb,style:Object.assign({left:`${U}%`},null==b?void 0:b.sliderThumb)},{children:e.jsx("div",{className:s.default.thumbDot,style:null==b?void 0:b.thumbDot})})),z&&!S&&e.jsx("div",Object.assign({className:s.default.tooltip,style:Object.assign({left:G},null==b?void 0:b.timeTooltip)},{children:J}))]}))}))]}))}))});o.displayName="AudioTimelineSlider",exports.default=o;
2
2
  //# sourceMappingURL=AudioTimeLineSlider.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),r=require("./SegmentByWordsViral.module.css.js");function s(e){if("number"==typeof e)return e;if(!e)return 0;var t=e.split(":"),n=t[0],r=t[1],s=t[2];return 3600*parseInt(n)+60*parseInt(r)+parseFloat(s)}exports.default=function(i){var a=i.startTime,l=i.endTime,o=i.words,u=i.currentTime,d=i.content;i.containerStyle;var c=i.customStyles,f=n.useRef([]),m=n.useRef(null),v=s(a),g=s(l),p=u>=v&&u<=g;n.useEffect(function(){if(p){var e=o.findIndex(function(e){return u>=e.start&&u<=e.end});if(-1!==e&&f.current[e]){var t=f.current[e];if(t&&m.current){var n=m.current.getBoundingClientRect(),r=t.getBoundingClientRect(),s=r.top<n.top,i=r.bottom>n.bottom;(s||i)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[u,o,p]);return t.jsx("div",e.__assign({className:r.default.segmentContainer,style:null==c?void 0:c.segmentContainer},{children:t.jsx("div",e.__assign({className:r.default.wrapper,style:null==c?void 0:c.wrapper},{children:t.jsx("div",e.__assign({className:r.default.segmentTextContainer,style:null==c?void 0:c.segmentTextContainer,ref:m},{children:o&&0!==o.length?o.map(function(n,s){var i=u>=n.end;return t.jsxs("span",e.__assign({ref:function(e){return f.current[s]=e},className:r.default.word,style:e.__assign({fontWeight:i?"bold":"normal"},null==c?void 0:c.wordText)},{children:[n.text," "]}),s)}):t.jsx("span",e.__assign({className:r.default.word,style:null==c?void 0:c.word},{children:d}))}))}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("./SegmentByWordsViral.module.css.js");function r(e){if("number"==typeof e)return e;if(!e)return 0;const[t,n,r]=e.split(":");return 3600*parseInt(t)+60*parseInt(n)+parseFloat(r)}exports.default=s=>{const{startTime:i,endTime:l,words:o,currentTime:a,content:c,containerStyle:u,customStyles:d}=s,f=t.useRef([]),m=t.useRef(null),g=r(i),p=r(l),j=a>=g&&a<=p;t.useEffect(()=>{if(j){const e=o.findIndex(e=>a>=e.start&&a<=e.end);if(-1!==e&&f.current[e]){const t=f.current[e];if(t&&m.current){const e=m.current.getBoundingClientRect(),n=t.getBoundingClientRect(),r=n.top<e.top,s=n.bottom>e.bottom;(r||s)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[a,o,j]);return e.jsx("div",Object.assign({className:n.default.segmentContainer,style:null==d?void 0:d.segmentContainer},{children:e.jsx("div",Object.assign({className:n.default.wrapper,style:null==d?void 0:d.wrapper},{children:e.jsx("div",Object.assign({className:n.default.segmentTextContainer,style:null==d?void 0:d.segmentTextContainer,ref:m},{children:o&&0!==o.length?o.map((t,r)=>{const s=a>=t.end;return e.jsxs("span",Object.assign({ref:e=>f.current[r]=e,className:n.default.word,style:Object.assign({fontWeight:s?"bold":"normal"},null==d?void 0:d.wordText)},{children:[t.text," "]}),r)}):e.jsx("span",Object.assign({className:n.default.word,style:null==d?void 0:d.word},{children:c}))}))}))}))};
2
2
  //# sourceMappingURL=SegmentByWordsViral.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),l=require("react"),o=require("video.js");require("video.js/dist/video-js.css");var i=require("./AudioTimeLineSlider.js"),s=require("../icons/MaximizeIcon.js"),t=require("../icons/MinimizeIcon.js"),r=require("../icons/PlayIcon.js"),a=require("../icons/PauseIcon.js"),u=require("../icons/PlaybackSpeedIcon.js"),c=require("./videoPlayer.module.css.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(o);exports.default=function(o){var d,v,g=o.videoSrc,p=o.currentTime,y=o.isWaveformPlaying,m=o.onBufferingStart,j=o.onBufferingEnd,x=o.onVideoPlayPause,h=o.videoType,S=void 0===h?"video/mp4":h,_=o.className,P=void 0===_?"":_,b=o.onVideoLoadingStateChange,k=o.isUrlPending,V=o.isPeaksPending,I=o.signedUrl,q=o.AudioData,J=o.showOnlyMatched,w=o.setShowOnlyMatched,N=o.wavesurferRef,R=o.segments,B=o.setIsAudioPlaying,C=o.handleAudioTimeUpdate,M=o.customStyles,T=o.waveformStyles,E=l.useRef(null),A=l.useRef(null),O=l.useRef(null),F=l.useRef(!1),L=l.useRef(!1),U=l.useState(!1),z=U[0];U[1];var W=l.useState(!0)[0],D=l.useState(!0),H=D[0],G=D[1],K=l.useState("1x"),Q=K[0],X=K[1],Y=l.useState(!1),Z=Y[0],$=Y[1],ee=function(){$(function(e){return!e})};l.useEffect(function(){if(console.log("[VideoJS] useEffect triggered",{videoSrc:g}),E.current){console.log("[VideoJS] Initializing player"),G(!0),null==b||b(!0);var e=f.default(E.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:g,type:S}]});return e.on("loadstart",function(){console.log("[VideoJS] loadstart"),G(!0),null==b||b(!0)}),e.on("canplay",function(){console.log("[VideoJS] canplay",{isVideoLoading:H,isBuffering:F.current}),H&&(console.log("[VideoJS] Video loading finished"),G(!1),null==b||b(!1)),F.current&&(console.log("[VideoJS] Buffering ended"),F.current=!1,setTimeout(function(){console.log("[VideoJS] onBufferingEnd()"),j()},100))}),e.on("waiting",function(){console.log("[VideoJS] waiting (buffering start)"),F.current||(F.current=!0,L.current=y,console.log("[VideoJS] Buffering started",{wasPlaying:L.current}),m())}),e.on("error",function(){console.error("[VideoJS] Player error",e.error()),G(!1),null==b||b(!1)}),A.current=e,console.log("[VideoJS] Player ready"),function(){var e;console.log("[VideoJS] Disposing player"),null===(e=A.current)||void 0===e||e.dispose(),A.current=null}}console.warn("[VideoJS] videoRef is null")},[g]),l.useEffect(function(){if(A.current){var e=A.current.currentTime();Math.abs(e-p)>.2&&A.current.currentTime(p)}},[p]),l.useEffect(function(){A.current&&!F.current&&(y&&A.current.paused()?A.current.play().catch(function(){}):y||A.current.paused()||A.current.pause())},[y]),l.useEffect(function(){var e,n,l,o=parseFloat(Q.replace("x",""));null===(e=A.current)||void 0===e||e.playbackRate(o),null===(l=null===(n=N.current)||void 0===n?void 0:n.setPlaybackRate)||void 0===l||l.call(n,o)},[Q]);return n.jsxs("div",e.__assign({ref:O,className:"".concat(c.default.container," ").concat(P),style:null==M?void 0:M.container},{children:[n.jsx("video",{ref:E,className:"video-js vjs-big-play-centered ".concat(c.default.video),style:null==M?void 0:M.video,playsInline:!0,muted:!0}),n.jsxs("div",e.__assign({className:"".concat(c.default.controlsWrapper," ").concat(W?c.default.visible:c.default.hidden),style:null==M?void 0:M.controlsWrapper},{children:[Z&&n.jsxs("div",e.__assign({className:c.default.speedSelector,style:null==M?void 0:M.speedSelector},{children:[n.jsx("div",e.__assign({className:c.default.speedHeader,style:null==M?void 0:M.speedHeader},{children:"Playback Speed"})),["0.5x","1x","1.5x","2x"].map(function(l){return n.jsx("button",e.__assign({onClick:function(){return function(e){var n,l,o;X(e),$(!1);var i=parseFloat(e.replace("x",""));null===(n=A.current)||void 0===n||n.playbackRate(i),null===(o=null===(l=N.current)||void 0===l?void 0:l.setPlaybackRate)||void 0===o||o.call(l,i)}(l)},className:c.default.speedItem,style:null==M?void 0:M.speedItem},{children:l}),l)})]})),n.jsxs("div",e.__assign({className:c.default.controlBar,style:null==M?void 0:M.controlBar},{children:[n.jsx("div",{children:y?n.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),null==x||x(!1)},style:null==M?void 0:M.pauseIcon},{children:n.jsx(a.default,{})})):n.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),null==x||x(!0)},style:null==M?void 0:M.playIcon},{children:n.jsx(r.default,{})}))}),n.jsxs("div",e.__assign({className:c.default.rightControls,style:null==M?void 0:M.rightControls},{children:["1x"!==Q?n.jsx("span",e.__assign({onClick:ee},{children:Q})):n.jsx("button",e.__assign({onClick:ee,style:null==M?void 0:M.playBackSpeedIcon},{children:n.jsx(u.default,{})})),n.jsx("button",e.__assign({onClick:function(e){var n,l,o;e.stopPropagation(),O.current&&(z?null===(o=document.exitFullscreen)||void 0===o||o.call(document):null===(l=(n=O.current).requestFullscreen)||void 0===l||l.call(n))}},{children:z?n.jsx(t.default,{}):n.jsx(s.default,{})}))]}))]})),n.jsx("div",e.__assign({className:c.default.timeline,style:null==M?void 0:M.timeline},{children:k||V?n.jsx("div",e.__assign({className:c.default.loader,style:null==M?void 0:M.loader},{children:n.jsx("span",{children:"Loading audio-timeline peaks..."})})):I&&q&&n.jsx(i.default,{ref:N,audio_file_name:I,peaks:null!==(d=q.peaks)&&void 0!==d?d:[],duration:null!==(v=q.duration)&&void 0!==v?v:0,matchedSegments:R,showOnlyMatched:J,setShowOnlyMatched:w,setIsAudioPlaying:B,onTimeUpdate:C,onToggleShowMatched:function(){},customStyles:T})}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),n=require("video.js");require("video.js/dist/video-js.css");var s=require("./AudioTimeLineSlider.js"),o=require("../icons/MaximizeIcon.js"),t=require("../icons/MinimizeIcon.js"),i=require("../icons/PlayIcon.js"),r=require("../icons/PauseIcon.js"),a=require("../icons/PlaybackSpeedIcon.js"),d=require("./videoPlayer.module.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(n);exports.default=({videoSrc:n,currentTime:u,isWaveformPlaying:f,onBufferingStart:v,onBufferingEnd:g,onVideoPlayPause:p,videoType:j="video/mp4",className:y="",onVideoLoadingStateChange:m,isUrlPending:x,isPeaksPending:h,signedUrl:S,AudioData:b,showOnlyMatched:P,setShowOnlyMatched:O,wavesurferRef:k,segments:V,setIsAudioPlaying:I,handleAudioTimeUpdate:J,customStyles:q,waveformStyles:w})=>{var N,R;const B=l.useRef(null),C=l.useRef(null),M=l.useRef(null),T=l.useRef(!1),E=l.useRef(!1),[A,$]=l.useState(!1),[F]=l.useState(!0),[L,U]=l.useState(!0),[_,z]=l.useState("1x"),[W,D]=l.useState(!1),H=()=>{D(e=>!e)};l.useEffect(()=>{if(console.log("[VideoJS] useEffect triggered",{videoSrc:n}),!B.current)return void console.warn("[VideoJS] videoRef is null");console.log("[VideoJS] Initializing player"),U(!0),null==m||m(!0);const e=c.default(B.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:n,type:j}]});return e.on("loadstart",()=>{console.log("[VideoJS] loadstart"),U(!0),null==m||m(!0)}),e.on("canplay",()=>{console.log("[VideoJS] canplay",{isVideoLoading:L,isBuffering:T.current}),L&&(console.log("[VideoJS] Video loading finished"),U(!1),null==m||m(!1)),T.current&&(console.log("[VideoJS] Buffering ended"),T.current=!1,setTimeout(()=>{console.log("[VideoJS] onBufferingEnd()"),g()},100))}),e.on("waiting",()=>{console.log("[VideoJS] waiting (buffering start)"),T.current||(T.current=!0,E.current=f,console.log("[VideoJS] Buffering started",{wasPlaying:E.current}),v())}),e.on("error",()=>{console.error("[VideoJS] Player error",e.error()),U(!1),null==m||m(!1)}),C.current=e,console.log("[VideoJS] Player ready"),()=>{var e;console.log("[VideoJS] Disposing player"),null===(e=C.current)||void 0===e||e.dispose(),C.current=null}},[n]),l.useEffect(()=>{if(!C.current)return;const e=C.current.currentTime();Math.abs(e-u)>.2&&C.current.currentTime(u)},[u]),l.useEffect(()=>{C.current&&!T.current&&(f&&C.current.paused()?C.current.play().catch(()=>{}):f||C.current.paused()||C.current.pause())},[f]),l.useEffect(()=>{var e,l,n;const s=parseFloat(_.replace("x",""));null===(e=C.current)||void 0===e||e.playbackRate(s),null===(n=null===(l=k.current)||void 0===l?void 0:l.setPlaybackRate)||void 0===n||n.call(l,s)},[_]);return e.jsxs("div",Object.assign({ref:M,className:`${d.default.container} ${y}`,style:null==q?void 0:q.container},{children:[e.jsx("video",{ref:B,className:`video-js vjs-big-play-centered ${d.default.video}`,style:null==q?void 0:q.video,playsInline:!0,muted:!0}),e.jsxs("div",Object.assign({className:`${d.default.controlsWrapper} ${F?d.default.visible:d.default.hidden}`,style:null==q?void 0:q.controlsWrapper},{children:[W&&e.jsxs("div",Object.assign({className:d.default.speedSelector,style:null==q?void 0:q.speedSelector},{children:[e.jsx("div",Object.assign({className:d.default.speedHeader,style:null==q?void 0:q.speedHeader},{children:"Playback Speed"})),["0.5x","1x","1.5x","2x"].map(l=>e.jsx("button",Object.assign({onClick:()=>(e=>{var l,n,s;z(e),D(!1);const o=parseFloat(e.replace("x",""));null===(l=C.current)||void 0===l||l.playbackRate(o),null===(s=null===(n=k.current)||void 0===n?void 0:n.setPlaybackRate)||void 0===s||s.call(n,o)})(l),className:d.default.speedItem,style:null==q?void 0:q.speedItem},{children:l}),l))]})),e.jsxs("div",Object.assign({className:d.default.controlBar,style:null==q?void 0:q.controlBar},{children:[e.jsx("div",{children:f?e.jsx("button",Object.assign({onClick:e=>{e.stopPropagation(),null==p||p(!1)},style:null==q?void 0:q.pauseIcon},{children:e.jsx(r.default,{})})):e.jsx("button",Object.assign({onClick:e=>{e.stopPropagation(),null==p||p(!0)},style:null==q?void 0:q.playIcon},{children:e.jsx(i.default,{})}))}),e.jsxs("div",Object.assign({className:d.default.rightControls,style:null==q?void 0:q.rightControls},{children:["1x"!==_?e.jsx("span",Object.assign({onClick:H},{children:_})):e.jsx("button",Object.assign({onClick:H,style:null==q?void 0:q.playBackSpeedIcon},{children:e.jsx(a.default,{})})),e.jsx("button",Object.assign({onClick:e=>{var l,n,s;e.stopPropagation(),M.current&&(A?null===(s=document.exitFullscreen)||void 0===s||s.call(document):null===(n=(l=M.current).requestFullscreen)||void 0===n||n.call(l))}},{children:A?e.jsx(t.default,{}):e.jsx(o.default,{})}))]}))]})),e.jsx("div",Object.assign({className:d.default.timeline,style:null==q?void 0:q.timeline},{children:x||h?e.jsx("div",Object.assign({className:d.default.loader,style:null==q?void 0:q.loader},{children:e.jsx("span",{children:"Loading audio-timeline peaks..."})})):S&&b&&e.jsx(s.default,{ref:k,audio_file_name:S,peaks:null!==(N=b.peaks)&&void 0!==N?N:[],duration:null!==(R=b.duration)&&void 0!==R?R:0,matchedSegments:V,showOnlyMatched:P,setShowOnlyMatched:O,setIsAudioPlaying:I,onTimeUpdate:J,onToggleShowMatched:()=>{},customStyles:w})}))]}))]}))};
2
2
  //# sourceMappingURL=videoPlayer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime");exports.default=function(r){var s=r.height,i=void 0===s?24:s,d=r.width,o=void 0===d?24:d;return t.jsx("div",{children:t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:o,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},{children:[t.jsx("path",{d:"M2 10v3"}),t.jsx("path",{d:"M6 6v11"}),t.jsx("path",{d:"M10 3v18"}),t.jsx("path",{d:"M14 8v7"}),t.jsx("path",{d:"M18 5v13"}),t.jsx("path",{d:"M22 10v3"})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=({height:t=24,width:s=24})=>e.jsx("div",{children:e.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:s,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},{children:[e.jsx("path",{d:"M2 10v3"}),e.jsx("path",{d:"M6 6v11"}),e.jsx("path",{d:"M10 3v18"}),e.jsx("path",{d:"M14 8v7"}),e.jsx("path",{d:"M18 5v13"}),e.jsx("path",{d:"M22 10v3"})]}))});
2
2
  //# sourceMappingURL=AudioLinesIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime");exports.default=function(r){var i=r.height,s=void 0===i?24:i,o=r.width,d=void 0===o?24:o;return t.jsx("div",{children:t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:d,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=({height:t=24,width:r=24})=>e.jsx("div",{children:e.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[e.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),e.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),e.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),e.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]}))});
2
2
  //# sourceMappingURL=MaximizeIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime");exports.default=function(r){var i=r.height,s=void 0===i?24:i,o=r.width,d=void 0===o?24:o;return t.jsx("div",{children:t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:d,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),t.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),t.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),t.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=({height:t=24,width:r=24})=>e.jsx("div",{children:e.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[e.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),e.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),e.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),e.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}))});
2
2
  //# sourceMappingURL=MinimizeIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime");exports.default=function(t){var i=t.height,s=void 0===i?24:i,o=t.width,n=void 0===o?24:o;return r.jsx("div",{children:r.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:n,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[r.jsx("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),r.jsx("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=({height:t=24,width:r=24})=>e.jsx("div",{children:e.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[e.jsx("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),e.jsx("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]}))});
2
2
  //# sourceMappingURL=PauseIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime");exports.default=function(t){var i=t.height,o=void 0===i?24:i,s=t.width,n=void 0===s?24:s;return r.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:r.jsx("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=({height:t=24,width:r=24})=>e.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:e.jsx("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}));
2
2
  //# sourceMappingURL=PlayIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),i=require("react/jsx-runtime");exports.default=function(){return i.jsxs("svg",C.__assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none"},{children:[i.jsxs("g",C.__assign({"clip-path":"url(#clip0_3246_74403)"},{children:[i.jsx("path",{d:"M4.80358 0.7585C5.18858 0.671 5.58907 0.625 6.00007 0.625C8.96858 0.625 11.3751 3.0315 11.3751 6C11.3751 8.9685 8.96858 11.375 6.00007 11.375C5.58907 11.375 5.18858 11.329 4.80358 11.2415C4.75554 11.2306 4.71014 11.2103 4.66995 11.1818C4.62975 11.1533 4.59557 11.1172 4.56933 11.0755C4.5431 11.0338 4.52534 10.9874 4.51706 10.9388C4.50878 10.8902 4.51014 10.8405 4.52107 10.7925C4.53201 10.7445 4.55229 10.6991 4.58077 10.6589C4.60926 10.6187 4.64537 10.5845 4.68707 10.5583C4.72876 10.532 4.77521 10.5143 4.82377 10.506C4.87233 10.4977 4.92204 10.4991 4.97007 10.51C5.64726 10.6639 6.35041 10.6633 7.02734 10.5083C7.70427 10.3533 8.33761 10.0479 8.88035 9.61462C9.4231 9.18139 9.86131 8.63149 10.1625 8.00574C10.4636 7.37999 10.62 6.69445 10.62 6C10.62 5.30555 10.4636 4.62001 10.1625 3.99426C9.86131 3.36851 9.4231 2.81861 8.88035 2.38538C8.33761 1.95214 7.70427 1.64668 7.02734 1.49168C6.35041 1.33668 5.64726 1.3361 4.97007 1.49C4.87307 1.51208 4.77127 1.49472 4.68707 1.44174C4.60286 1.38876 4.54315 1.3045 4.52107 1.2075C4.499 1.1105 4.51636 1.0087 4.56933 0.924492C4.62231 0.840289 4.70657 0.780579 4.80358 0.7585Z",fill:"white"}),i.jsx("path",{opacity:"0.5",d:"M3.65722 1.56573C3.71017 1.64988 3.72754 1.75161 3.70551 1.84856C3.68347 1.94551 3.62384 2.02974 3.53972 2.08273C2.95168 2.45316 2.45415 2.95069 2.08372 3.53873C2.03075 3.62294 1.94649 3.68265 1.84948 3.70474C1.75248 3.72682 1.65068 3.70946 1.56647 3.65648C1.48227 3.60351 1.42255 3.51925 1.40047 3.42225C1.37839 3.32524 1.39575 3.22344 1.44872 3.13923C1.87921 2.45616 2.4574 1.87832 3.14072 1.44823C3.22487 1.39528 3.3266 1.37792 3.42355 1.39995C3.5205 1.42199 3.60423 1.48162 3.65722 1.56573ZM1.56672 8.34273C1.65087 8.28978 1.7526 8.27242 1.84955 8.29445C1.9465 8.31649 2.03073 8.37612 2.08372 8.46023C2.45409 9.04846 2.95163 9.54616 3.53972 9.91673C3.58264 9.94237 3.61999 9.97632 3.64959 10.0166C3.67919 10.0569 3.70044 10.1027 3.71209 10.1513C3.72374 10.1999 3.72555 10.2503 3.71742 10.2997C3.70929 10.349 3.69139 10.3962 3.66475 10.4385C3.63812 10.4808 3.6033 10.5173 3.56234 10.546C3.52138 10.5746 3.4751 10.5948 3.42623 10.6053C3.37736 10.6158 3.32688 10.6164 3.27777 10.6071C3.22865 10.5979 3.18189 10.5789 3.14022 10.5512C2.45721 10.1209 1.87937 9.54288 1.44922 8.85973C1.39627 8.77559 1.37891 8.67386 1.40094 8.57691C1.42297 8.47996 1.4826 8.39573 1.56672 8.34273Z",fill:"white"}),i.jsx("path",{opacity:"0.3",d:"M1.48951 4.96617C1.51159 4.86917 1.49423 4.76736 1.44125 4.68316C1.38827 4.59896 1.30401 4.53925 1.20701 4.51717C1.11001 4.49509 1.00821 4.51245 0.924004 4.56543C0.8398 4.61841 0.780091 4.70267 0.758012 4.79967C0.670512 5.18467 0.624512 5.58517 0.624512 5.99617C0.624512 6.40717 0.670512 6.80717 0.758012 7.19217C0.780025 7.28917 0.83967 7.37346 0.923827 7.42648C1.00798 7.47951 1.10976 7.49693 1.20676 7.47492C1.30376 7.45291 1.38805 7.39326 1.44108 7.3091C1.4941 7.22495 1.51152 7.12317 1.48951 7.02617C1.41292 6.68819 1.37434 6.34271 1.37451 5.99617C1.37451 5.64167 1.41451 5.29717 1.48951 4.96617Z",fill:"white"}),i.jsx("path",{d:"M7.707 5.46999C8.0975 5.70099 8.0975 6.29799 7.707 6.52899L5.347 7.92249C4.967 8.14649 4.5 7.85449 4.5 7.39249V4.60649C4.5 4.14449 4.967 3.85299 5.347 4.07699L7.707 5.46999Z",fill:"white"})]})),i.jsx("defs",{children:i.jsx("clipPath",C.__assign({id:"clip0_3246_74403"},{children:i.jsx("rect",{width:"12",height:"12",fill:"white"})}))})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("react/jsx-runtime");exports.default=()=>C.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none"},{children:[C.jsxs("g",Object.assign({"clip-path":"url(#clip0_3246_74403)"},{children:[C.jsx("path",{d:"M4.80358 0.7585C5.18858 0.671 5.58907 0.625 6.00007 0.625C8.96858 0.625 11.3751 3.0315 11.3751 6C11.3751 8.9685 8.96858 11.375 6.00007 11.375C5.58907 11.375 5.18858 11.329 4.80358 11.2415C4.75554 11.2306 4.71014 11.2103 4.66995 11.1818C4.62975 11.1533 4.59557 11.1172 4.56933 11.0755C4.5431 11.0338 4.52534 10.9874 4.51706 10.9388C4.50878 10.8902 4.51014 10.8405 4.52107 10.7925C4.53201 10.7445 4.55229 10.6991 4.58077 10.6589C4.60926 10.6187 4.64537 10.5845 4.68707 10.5583C4.72876 10.532 4.77521 10.5143 4.82377 10.506C4.87233 10.4977 4.92204 10.4991 4.97007 10.51C5.64726 10.6639 6.35041 10.6633 7.02734 10.5083C7.70427 10.3533 8.33761 10.0479 8.88035 9.61462C9.4231 9.18139 9.86131 8.63149 10.1625 8.00574C10.4636 7.37999 10.62 6.69445 10.62 6C10.62 5.30555 10.4636 4.62001 10.1625 3.99426C9.86131 3.36851 9.4231 2.81861 8.88035 2.38538C8.33761 1.95214 7.70427 1.64668 7.02734 1.49168C6.35041 1.33668 5.64726 1.3361 4.97007 1.49C4.87307 1.51208 4.77127 1.49472 4.68707 1.44174C4.60286 1.38876 4.54315 1.3045 4.52107 1.2075C4.499 1.1105 4.51636 1.0087 4.56933 0.924492C4.62231 0.840289 4.70657 0.780579 4.80358 0.7585Z",fill:"white"}),C.jsx("path",{opacity:"0.5",d:"M3.65722 1.56573C3.71017 1.64988 3.72754 1.75161 3.70551 1.84856C3.68347 1.94551 3.62384 2.02974 3.53972 2.08273C2.95168 2.45316 2.45415 2.95069 2.08372 3.53873C2.03075 3.62294 1.94649 3.68265 1.84948 3.70474C1.75248 3.72682 1.65068 3.70946 1.56647 3.65648C1.48227 3.60351 1.42255 3.51925 1.40047 3.42225C1.37839 3.32524 1.39575 3.22344 1.44872 3.13923C1.87921 2.45616 2.4574 1.87832 3.14072 1.44823C3.22487 1.39528 3.3266 1.37792 3.42355 1.39995C3.5205 1.42199 3.60423 1.48162 3.65722 1.56573ZM1.56672 8.34273C1.65087 8.28978 1.7526 8.27242 1.84955 8.29445C1.9465 8.31649 2.03073 8.37612 2.08372 8.46023C2.45409 9.04846 2.95163 9.54616 3.53972 9.91673C3.58264 9.94237 3.61999 9.97632 3.64959 10.0166C3.67919 10.0569 3.70044 10.1027 3.71209 10.1513C3.72374 10.1999 3.72555 10.2503 3.71742 10.2997C3.70929 10.349 3.69139 10.3962 3.66475 10.4385C3.63812 10.4808 3.6033 10.5173 3.56234 10.546C3.52138 10.5746 3.4751 10.5948 3.42623 10.6053C3.37736 10.6158 3.32688 10.6164 3.27777 10.6071C3.22865 10.5979 3.18189 10.5789 3.14022 10.5512C2.45721 10.1209 1.87937 9.54288 1.44922 8.85973C1.39627 8.77559 1.37891 8.67386 1.40094 8.57691C1.42297 8.47996 1.4826 8.39573 1.56672 8.34273Z",fill:"white"}),C.jsx("path",{opacity:"0.3",d:"M1.48951 4.96617C1.51159 4.86917 1.49423 4.76736 1.44125 4.68316C1.38827 4.59896 1.30401 4.53925 1.20701 4.51717C1.11001 4.49509 1.00821 4.51245 0.924004 4.56543C0.8398 4.61841 0.780091 4.70267 0.758012 4.79967C0.670512 5.18467 0.624512 5.58517 0.624512 5.99617C0.624512 6.40717 0.670512 6.80717 0.758012 7.19217C0.780025 7.28917 0.83967 7.37346 0.923827 7.42648C1.00798 7.47951 1.10976 7.49693 1.20676 7.47492C1.30376 7.45291 1.38805 7.39326 1.44108 7.3091C1.4941 7.22495 1.51152 7.12317 1.48951 7.02617C1.41292 6.68819 1.37434 6.34271 1.37451 5.99617C1.37451 5.64167 1.41451 5.29717 1.48951 4.96617Z",fill:"white"}),C.jsx("path",{d:"M7.707 5.46999C8.0975 5.70099 8.0975 6.29799 7.707 6.52899L5.347 7.92249C4.967 8.14649 4.5 7.85449 4.5 7.39249V4.60649C4.5 4.14449 4.967 3.85299 5.347 4.07699L7.707 5.46999Z",fill:"white"})]})),C.jsx("defs",{children:C.jsx("clipPath",Object.assign({id:"clip0_3246_74403"},{children:C.jsx("rect",{width:"12",height:"12",fill:"white"})}))})]}));
2
2
  //# sourceMappingURL=PlaybackSpeedIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime");exports.default=function(t){var i=t.height,s=void 0===i?24:i,o=t.width,n=void 0===o?24:o;return r.jsx("div",{children:r.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:n,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[r.jsx("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),r.jsx("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.default=({height:t=24,width:r=24})=>e.jsx("div",{children:e.jsxs("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[e.jsx("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),e.jsx("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]}))});
2
2
  //# sourceMappingURL=VideoIcon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),n=require("wavesurfer.js"),u=require("wavesurfer.js/dist/plugins/regions"),c=require("./searchwaveform.module.css.js"),a=require("./icons/PauseIcon.js"),s=require("./icons/PlayIcon.js"),i=require("./store/autoplay.wavefrom.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(t),d=l(n),f=l(u),v=t.forwardRef(function(n,u){var l=n.audio_file_name,v=n.showOnlyMatched,g=n.setShowOnlyMatched,p=n.matchedSegments,m=n.onTimeUpdate;n.currentAudioTime;var h=n.peaks,y=n.duration,_=n.setIsAudioPlaying,S=n.setChevronIndex,x=n.chevronIndex,T=void 0===x?0:x,j=n.onToggleShowMatched,w=n.topicId,k=n.isVideoBuffering,R=n.playOnlyMatched,b=void 0===R||R,P=n.customStyles,C=t.useState(!1),N=C[0],M=C[1],I=t.useState(!0),q=I[0],E=I[1],B=t.useState(!1),O=B[0],A=B[1],D=t.useState(!1),F=D[0],W=D[1],z=t.useState(!1),H=z[0],L=z[1],U=t.useState(!1);U[0];var X=U[1],V=t.useState(0),G=V[0],J=V[1],K=t.useState(!1);K[0];var Q=K[1],Y=t.useState("00:00:00"),Z=Y[0],$=Y[1],ee=t.useState("00:00:00"),re=ee[0],te=ee[1],ne=t.useState(0),ue=ne[0],ce=ne[1],ae=t.useState(!1),se=ae[0],ie=ae[1],le=t.useState(0),oe=le[0],de=le[1],fe=t.useState("00:00:00"),ve=fe[0],ge=fe[1],pe=t.useRef(null),me=t.useRef(!1),he=t.useRef(null),ye=t.useRef(null),_e=t.useRef(null),Se=t.useRef(!1),xe=t.useRef(null),Te=t.useRef(null),je=t.useRef(0),we=t.useRef(0),ke=t.useState(!1),Re=ke[0],be=ke[1],Pe=i.useAudioPlayPause(),Ce=Pe.playTopicId,Ne=Pe.resetTrigger,Me=Pe.pendingPlayRequest,Ie=Pe.setPendingPlayRequest,qe=Pe.triggerPlayForTopic,Ee=t.useRef(null),Be=function(e){try{var r=e.split(":"),t=r[0],n=r[1],u=r[2],c=(r[3],parseInt(t).toString().padStart(2,"0")),a=parseInt(n).toString().padStart(2,"0"),s=parseInt(u).toString().padStart(2,"0");return"".concat(c,":").concat(a,":").concat(s)}catch(e){console.log("Error converting formatTimeToHMS",e)}};t.useEffect(function(){null==g||g(b)},[b]),t.useEffect(function(){Re&&Me===w&&(Ie(null),setTimeout(function(){qe(w)},100))},[Re,Me,w]),t.useEffect(function(){Re&&Ce===w&&(Ee.current&&(Ee.current.click(),M(!0)),Ne())},[Ce,w,Re]),t.useEffect(function(){return be(!0),function(){be(!1)}},[]),t.useEffect(function(){if(l&&he.current&&!Se.current){E(!0);var e=f.default.create(),r=d.default.create({container:he.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(h)],duration:y,url:l});return ye.current=r,_e.current=r.registerPlugin(e),Se.current=!0,r.on("decode",function(){Q(!0),Ae();var e=Be(Oe(y));te(e||"00:00:00")}),r.on("ready",function(){E(!1)}),r.on("play",function(){M(!0),_&&_(!0)}),r.on("pause",function(){M(!1),_&&_(!1)}),r.on("finish",function(){M(!1),_&&_(!1),O&&(A(!1),W(!1),L(!0))}),r.on("seeking",function(){v||O&&!F&&De()}),r.on("error",function(){E(!1)}),r.on("audioprocess",function(e){(m&&m(e),me.current)||ce(e/y*100);var r=Be(Oe(e));$(r||"00:00:00"),we.current=e}),function(){xe.current&&clearTimeout(xe.current),Te.current,r.destroy(),Se.current=!1,ye.current=null}}},[l]),t.useEffect(function(){ye.current&&(ye.current.setOptions({interact:!v}),N&&ye.current.pause(),v?(A(!0),je.current=0):De(),j&&j(v))},[v]);var Oe=function(e){var r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),u=Math.floor(e%1*1e3);return"".concat(String(r).padStart(2,"0"),":").concat(String(t).padStart(2,"0"),":").concat(String(n).padStart(2,"0"),":").concat(String(u).padStart(3,"0"))},Ae=t.useCallback(function(){_e.current&&ye.current&&(_e.current.clearRegions(),p.forEach(function(e,r){_e.current.addRegion({start:e.start_time,end:e.end_time,color:"rgba(254, 239, 137, 0.5)",drag:!1,resize:!1,id:e.segment_id})}))},[p]),De=t.useCallback(function(){ye.current&&(A(!1),W(!1),L(!1),X(!1),xe.current&&(clearTimeout(xe.current),xe.current=null),Te.current&&(ye.current.un("audioprocess",Te.current),Te.current=null))},[]),Fe=t.useCallback(function(e){!v&&ye.current&&(ye.current.seekTo(e/y),ye.current.play(),M(!0),_&&_(!0),$(Be(Oe(e))),A(!1),W(!1),L(!1))},[v,y,_,Oe,Be]),We=t.useRef(!1),ze=t.useCallback(function(){if(!We.current&&ye.current&&p.length){We.current=!0,ye.current.pause();var e=je.current+1;if(console.log("Current segment:",je.current),console.log("Next index calculated:",e),console.log("Total segments:",p.length),e<p.length){var r=p[e];$(Be(Oe(r.start_time))),S&&S(e),J(e),je.current=e;var t=v?0:2e3;xe.current=setTimeout(function(){We.current=!1,setTimeout(function(){if(ye.current){ye.current.seekTo(r.start_time/y),ye.current.play();var e=r.end_time,t=function(r){var n;r>=e&&(null===(n=ye.current)||void 0===n||n.un("audioprocess",t),Te.current=null,ze())};Te.current=t,ye.current.on("audioprocess",t)}},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),A(v),W(!0),L(!0),je.current=0,J(0),S&&S(0),p.length>0){var n=p[0];$(Be(Oe(n.start_time))),ye.current.seekTo(n.start_time/y)}ye.current.isPlaying()&&ye.current.pause(),xe.current=setTimeout(function(){We.current=!1,ye.current&&ye.current.isPlaying()&&ye.current.pause()},v?0:2e3)}}},[p,y,S,Oe,v]),He=t.useCallback(function(){if(ye.current&&p.length){var e=je.current;if(e>=p.length)return A(v),void L(!0);var r=p[e];J(e),$(Be(Oe(r.start_time))),S&&S(e),setTimeout(function(){if(ye.current){ye.current.seekTo(r.start_time/y),ye.current.play();var e=r.end_time,t=function(r){var n;r>=e&&(null===(n=ye.current)||void 0===n||n.un("audioprocess",t),Te.current=null,ze())};Te.current=t,ye.current.on("audioprocess",t)}},100)}},[p,y,S,ze,Oe,v]),Le=t.useCallback(function(){if(ye.current&&p.length){Te.current&&(ye.current.un("audioprocess",Te.current),Te.current=null);var e=p[je.current];if(e){var r=e.end_time,t=function(e){var n;e>=r&&(null===(n=ye.current)||void 0===n||n.un("audioprocess",t),Te.current=null,ze())};Te.current=t,ye.current.on("audioprocess",t)}}},[p,ze]),Ue=t.useCallback(function(){ye.current&&(v?N?(ye.current.pause(),W(!0)):F?(ye.current.play(),W(!1),Le()):H?(L(!1),je.current=0,He()):He():N?ye.current.pause():ye.current.play())},[N,v,F,H,He,Le]),Xe=t.useCallback(function(e){if(ye.current&&0!==p.length){var r,t=N;N&&(ye.current.pause(),W(!0)),Te.current&&(ye.current.un("audioprocess",Te.current),Te.current=null),r="next"===e?(G+1)%p.length:(G-1+p.length)%p.length,J(r),je.current=r;var n=p[r];ye.current.seekTo(n.start_time/y),S&&S(r),t&&v&&setTimeout(function(){ye.current&&(ye.current.play(),W(!1),Le())},50)}},[G,p,S,y,N,v,Le]),Ve=t.useCallback(function(e){ye.current&&(v||(O&&De(),ye.current.seekTo(e/y)))},[y,O,De,v]);t.useEffect(function(){if(p.length>0&&void 0!==T&&ye.current&&!We.current){if(T===je.current)return;var e=N;Te.current&&(ye.current.un("audioprocess",Te.current),Te.current=null);var r=p[T];r&&(ye.current.seekTo(r.start_time/y),J(T),je.current=T,e&&v&&setTimeout(function(){ye.current&&Le()},50))}},[T,y,p,v,N,Le]);var Ge=t.useRef(!1);t.useEffect(function(){k&&ye.current&&ye.current.isPlaying()&&(Ge.current=!0,ye.current.pause(),O&&W(!0)),!k&&Ge.current&&ye.current&&ye.current&&(ye.current.play(),Ge.current=!1,O&&F&&(W(!1),Le()))},[k,O,F,Le]),o.default.useImperativeHandle(u,function(){return{waveSurfer:ye.current,navigateSegments:Xe,togglePlayPause:Ue,getCurrentSegmentIndex:function(){return G},setCurrentSegmentIndex:J,isPlayingSequence:function(){return O},setPlayingSequence:function(e){return A(e)},seekToTime:Ve,showOnlyMatched:v,setShowOnlyMatched:function(e){return null==g?void 0:g(e)},handleIndividualSegmentPlay:Fe}},[ye.current,Xe,Ue,G,O,Ve,v,Fe]);return r.jsx("div",e.__assign({className:c.default.container,style:null==P?void 0:P.container},{children:r.jsxs("div",e.__assign({className:c.default.inner,style:null==P?void 0:P.inner},{children:[r.jsxs("div",e.__assign({className:c.default.waveformRow,style:null==P?void 0:P.waveformRow},{children:[r.jsx("div",e.__assign({className:c.default.playButtonWrapper,style:null==P?void 0:P.playButtonWrapper},{children:r.jsx("button",e.__assign({ref:Ee,onClick:Ue,className:c.default.playButton,style:null==P?void 0:P.playButton,title:N?"Pause":"Play",disabled:q},{children:q?r.jsx(r.Fragment,{children:"Loading..."}):N?r.jsx("div",e.__assign({className:c.default.icon,style:null==P?void 0:P.pauseIcon},{children:r.jsx(a.default,{})})):r.jsx("div",e.__assign({className:c.default.icon,style:null==P?void 0:P.playIcon},{children:r.jsx(s.default,{})}))}))})),r.jsx("div",{ref:he,className:c.default.waveform,style:null==P?void 0:P.waveform})]})),r.jsxs("div",e.__assign({className:c.default.sliderRow,style:null==P?void 0:P.sliderRow},{children:[r.jsx("div",{className:c.default.buttonSpacer,style:null==P?void 0:P.buttonSpacer}),r.jsxs("div",e.__assign({className:"".concat(c.default.slider,"\n ").concat(c.default.group,"\n ").concat(v?c.default.disabled:c.default.interactive),ref:pe,style:null==P?void 0:P.slider,onClick:v?void 0:function(e){var r;if(!v){var t=null===(r=pe.current)||void 0===r?void 0:r.getBoundingClientRect();if(t&&ye.current){var n=(e.clientX-t.left)/t.width*100,u=n/100*y;ce(n),ye.current.seekTo(u/y),O&&De()}}},onMouseMove:v?void 0:function(e){if(!v&&pe.current){var r=pe.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){var n=t/r.width*100;ie(!0),de(t);var u=Be(Oe(n/100*y));ge(u||"00:00:00")}}},onMouseLeave:function(){ie(!1)},onMouseDown:v?void 0:function(){v||(me.current=!0)},onMouseUp:v?void 0:function(){if(!v&&(me.current=!1,ye.current)){var e=ue/100*y;ye.current.seekTo(e/y),O&&De()}}},{children:[r.jsx("div",{className:c.default.sliderTrack,style:null==P?void 0:P.sliderTrack}),r.jsx("div",{className:c.default.sliderProgress,style:e.__assign({width:"".concat(ue,"%")},null==P?void 0:P.sliderProgress)}),r.jsx("div",{className:c.default.sliderThumb,style:e.__assign({left:"".concat(ue,"%")},null==P?void 0:P.sliderThumb)}),se&&!v&&r.jsx("div",e.__assign({className:c.default.timeTooltip,style:e.__assign({left:oe},null==P?void 0:P.timeTooltip)},{children:ve}))]}))]})),r.jsxs("div",e.__assign({className:c.default.timeRow,style:null==P?void 0:P.timeRow},{children:[r.jsx("div",{className:c.default.buttonSpacer,style:null==P?void 0:P.buttonSpacer}),r.jsxs("div",e.__assign({className:c.default.timeText,style:null==P?void 0:P.timeText},{children:[r.jsx("span",{children:Z}),r.jsx("span",{children:"/"}),r.jsx("span",{children:re})]}))]}))]}))}))});v.displayName="SearchWaveform",exports.default=v;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("wavesurfer.js"),n=require("wavesurfer.js/dist/plugins/regions"),u=require("./searchwaveform.module.css.js"),s=require("./icons/PauseIcon.js"),c=require("./icons/PlayIcon.js"),l=require("./store/autoplay.wavefrom.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),o=a(r),d=a(n);const f=t.forwardRef(({audio_file_name:r,showOnlyMatched:n,setShowOnlyMatched:a,matchedSegments:f,onTimeUpdate:g,currentAudioTime:p,peaks:m,duration:v,setIsAudioPlaying:h,setChevronIndex:y,chevronIndex:j=0,onToggleShowMatched:S,topicId:b,isVideoBuffering:x,playOnlyMatched:T=!0,customStyles:w},k)=>{const[R,P]=t.useState(!1),[O,C]=t.useState(!0),[N,_]=t.useState(!1),[M,I]=t.useState(!1),[q,$]=t.useState(!1),[E,B]=t.useState(!1),[A,D]=t.useState(0),[F,W]=t.useState(!1),[z,H]=t.useState("00:00:00"),[L,U]=t.useState("00:00:00"),[X,V]=t.useState(0),[G,J]=t.useState(!1),[K,Q]=t.useState(0),[Y,Z]=t.useState("00:00:00"),ee=t.useRef(null),te=t.useRef(!1),re=t.useRef(null),ne=t.useRef(null),ue=t.useRef(null),se=t.useRef(!1),ce=t.useRef(null),le=t.useRef(null),ae=t.useRef(0),ie=t.useRef(0),[oe,de]=t.useState(!1),{playTopicId:fe,resetTrigger:ge,pendingPlayRequest:pe,setPendingPlayRequest:me,triggerPlayForTopic:ve}=l.useAudioPlayPause(),he=t.useRef(null),ye=e=>{try{const[t,r,n,u]=e.split(":"),s=parseInt(t).toString().padStart(2,"0"),c=parseInt(r).toString().padStart(2,"0");return`${s}:${c}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};t.useEffect(()=>{null==a||a(T)},[T]),t.useEffect(()=>{oe&&pe===b&&(me(null),setTimeout(()=>{ve(b)},100))},[oe,pe,b]),t.useEffect(()=>{oe&&fe===b&&(he.current&&(he.current.click(),P(!0)),ge())},[fe,b,oe]),t.useEffect(()=>(de(!0),()=>{de(!1)}),[]),t.useEffect(()=>{if(!r||!re.current||se.current)return;C(!0);const e=d.default.create(),t=o.default.create({container:re.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(m)],duration:v,url:r});return ne.current=t,ue.current=t.registerPlugin(e),se.current=!0,t.on("decode",()=>{W(!0),Se();const e=ye(je(v));U(e||"00:00:00")}),t.on("ready",()=>{C(!1)}),t.on("play",()=>{P(!0),h&&h(!0)}),t.on("pause",()=>{P(!1),h&&h(!1)}),t.on("finish",()=>{P(!1),h&&h(!1),N&&(_(!1),I(!1),$(!0))}),t.on("seeking",()=>{n||N&&!M&&be()}),t.on("error",()=>{C(!1)}),t.on("audioprocess",e=>{if(g&&g(e),!te.current){V(e/v*100)}const t=ye(je(e));H(t||"00:00:00"),ie.current=e}),()=>{ce.current&&clearTimeout(ce.current),le.current,t.destroy(),se.current=!1,ne.current=null}},[r]),t.useEffect(()=>{ne.current&&(ne.current.setOptions({interact:!n}),R&&ne.current.pause(),n?(_(!0),ae.current=0):be(),S&&S(n))},[n]);const je=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),u=Math.floor(e%1*1e3);return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(u).padStart(3,"0")}`},Se=t.useCallback(()=>{ue.current&&ne.current&&(ue.current.clearRegions(),f.forEach((e,t)=>{ue.current.addRegion({start:e.start_time,end:e.end_time,color:"rgba(254, 239, 137, 0.5)",drag:!1,resize:!1,id:e.segment_id})}))},[f]),be=t.useCallback(()=>{ne.current&&(_(!1),I(!1),$(!1),B(!1),ce.current&&(clearTimeout(ce.current),ce.current=null),le.current&&(ne.current.un("audioprocess",le.current),le.current=null))},[]),xe=t.useCallback(e=>{!n&&ne.current&&(ne.current.seekTo(e/v),ne.current.play(),P(!0),h&&h(!0),H(ye(je(e))),_(!1),I(!1),$(!1))},[n,v,h,je,ye]),Te=t.useRef(!1),we=t.useCallback(()=>{if(Te.current)return;if(!ne.current||!f.length)return;Te.current=!0,ne.current.pause();const e=ae.current+1;if(console.log("Current segment:",ae.current),console.log("Next index calculated:",e),console.log("Total segments:",f.length),e<f.length){const t=f[e];H(ye(je(t.start_time))),y&&y(e),D(e),ae.current=e;const r=n?0:2e3;ce.current=setTimeout(()=>{Te.current=!1,setTimeout(()=>{if(!ne.current)return;ne.current.seekTo(t.start_time/v),ne.current.play();const e=t.end_time,r=t=>{var n;t>=e&&(null===(n=ne.current)||void 0===n||n.un("audioprocess",r),le.current=null,we())};le.current=r,ne.current.on("audioprocess",r)},100)},r)}else{if(console.log("End of cycle reached, resetting to index 0"),_(n),I(!0),$(!0),ae.current=0,D(0),y&&y(0),f.length>0){const e=f[0];H(ye(je(e.start_time))),ne.current.seekTo(e.start_time/v)}ne.current.isPlaying()&&ne.current.pause(),ce.current=setTimeout(()=>{Te.current=!1,ne.current&&ne.current.isPlaying()&&ne.current.pause()},n?0:2e3)}},[f,v,y,je,n]),ke=t.useCallback(()=>{if(!ne.current||!f.length)return;const e=ae.current;if(e>=f.length)return _(n),void $(!0);const t=f[e];D(e),H(ye(je(t.start_time))),y&&y(e),setTimeout(()=>{if(!ne.current)return;ne.current.seekTo(t.start_time/v),ne.current.play();const e=t.end_time,r=t=>{var n;t>=e&&(null===(n=ne.current)||void 0===n||n.un("audioprocess",r),le.current=null,we())};le.current=r,ne.current.on("audioprocess",r)},100)},[f,v,y,we,je,n]),Re=t.useCallback(()=>{if(!ne.current||!f.length)return;le.current&&(ne.current.un("audioprocess",le.current),le.current=null);const e=f[ae.current];if(!e)return;const t=e.end_time,r=e=>{var n;e>=t&&(null===(n=ne.current)||void 0===n||n.un("audioprocess",r),le.current=null,we())};le.current=r,ne.current.on("audioprocess",r)},[f,we]),Pe=t.useCallback(()=>{ne.current&&(n?R?(ne.current.pause(),I(!0)):M?(ne.current.play(),I(!1),Re()):q?($(!1),ae.current=0,ke()):ke():R?ne.current.pause():ne.current.play())},[R,n,M,q,ke,Re]),Oe=t.useCallback(e=>{if(!ne.current||0===f.length)return;const t=R;let r;R&&(ne.current.pause(),I(!0)),le.current&&(ne.current.un("audioprocess",le.current),le.current=null),r="next"===e?(A+1)%f.length:(A-1+f.length)%f.length,D(r),ae.current=r;const u=f[r];ne.current.seekTo(u.start_time/v),y&&y(r),t&&n&&setTimeout(()=>{ne.current&&(ne.current.play(),I(!1),Re())},50)},[A,f,y,v,R,n,Re]),Ce=t.useCallback(e=>{ne.current&&(n||(N&&be(),ne.current.seekTo(e/v)))},[v,N,be,n]);t.useEffect(()=>{if(f.length>0&&void 0!==j&&ne.current&&!Te.current){if(j===ae.current)return;const e=R;le.current&&(ne.current.un("audioprocess",le.current),le.current=null);const t=f[j];t&&(ne.current.seekTo(t.start_time/v),D(j),ae.current=j,e&&n&&setTimeout(()=>{ne.current&&Re()},50))}},[j,v,f,n,R,Re]);const Ne=t.useRef(!1);t.useEffect(()=>{x&&ne.current&&ne.current.isPlaying()&&(Ne.current=!0,ne.current.pause(),N&&I(!0)),!x&&Ne.current&&ne.current&&ne.current&&(ne.current.play(),Ne.current=!1,N&&M&&(I(!1),Re()))},[x,N,M,Re]),i.default.useImperativeHandle(k,()=>({waveSurfer:ne.current,navigateSegments:Oe,togglePlayPause:Pe,getCurrentSegmentIndex:()=>A,setCurrentSegmentIndex:D,isPlayingSequence:()=>N,setPlayingSequence:e=>_(e),seekToTime:Ce,showOnlyMatched:n,setShowOnlyMatched:e=>null==a?void 0:a(e),handleIndividualSegmentPlay:xe}),[ne.current,Oe,Pe,A,N,Ce,n,xe]);return e.jsx("div",Object.assign({className:u.default.container,style:null==w?void 0:w.container},{children:e.jsxs("div",Object.assign({className:u.default.inner,style:null==w?void 0:w.inner},{children:[e.jsxs("div",Object.assign({className:u.default.waveformRow,style:null==w?void 0:w.waveformRow},{children:[e.jsx("div",Object.assign({className:u.default.playButtonWrapper,style:null==w?void 0:w.playButtonWrapper},{children:e.jsx("button",Object.assign({ref:he,onClick:Pe,className:u.default.playButton,style:null==w?void 0:w.playButton,title:R?"Pause":"Play",disabled:O},{children:O?e.jsx(e.Fragment,{children:"Loading..."}):R?e.jsx("div",Object.assign({className:u.default.icon,style:null==w?void 0:w.pauseIcon},{children:e.jsx(s.default,{})})):e.jsx("div",Object.assign({className:u.default.icon,style:null==w?void 0:w.playIcon},{children:e.jsx(c.default,{})}))}))})),e.jsx("div",{ref:re,className:u.default.waveform,style:null==w?void 0:w.waveform})]})),e.jsxs("div",Object.assign({className:u.default.sliderRow,style:null==w?void 0:w.sliderRow},{children:[e.jsx("div",{className:u.default.buttonSpacer,style:null==w?void 0:w.buttonSpacer}),e.jsxs("div",Object.assign({className:`${u.default.slider}\n ${u.default.group}\n ${n?u.default.disabled:u.default.interactive}`,ref:ee,style:null==w?void 0:w.slider,onClick:n?void 0:e=>{var t;if(n)return;const r=null===(t=ee.current)||void 0===t?void 0:t.getBoundingClientRect();if(!r||!ne.current)return;const u=(e.clientX-r.left)/r.width*100,s=u/100*v;V(u),ne.current.seekTo(s/v),N&&be()},onMouseMove:n?void 0:e=>{if(!n&&ee.current){const t=ee.current.getBoundingClientRect(),r=e.clientX-t.left;if(r>=0&&r<=t.width){const e=r/t.width*100;J(!0),Q(r);const n=ye(je(e/100*v));Z(n||"00:00:00")}}},onMouseLeave:()=>{J(!1)},onMouseDown:n?void 0:()=>{n||(te.current=!0)},onMouseUp:n?void 0:()=>{if(!n&&(te.current=!1,ne.current)){const e=X/100*v;ne.current.seekTo(e/v),N&&be()}}},{children:[e.jsx("div",{className:u.default.sliderTrack,style:null==w?void 0:w.sliderTrack}),e.jsx("div",{className:u.default.sliderProgress,style:Object.assign({width:`${X}%`},null==w?void 0:w.sliderProgress)}),e.jsx("div",{className:u.default.sliderThumb,style:Object.assign({left:`${X}%`},null==w?void 0:w.sliderThumb)}),G&&!n&&e.jsx("div",Object.assign({className:u.default.timeTooltip,style:Object.assign({left:K},null==w?void 0:w.timeTooltip)},{children:Y}))]}))]})),e.jsxs("div",Object.assign({className:u.default.timeRow,style:null==w?void 0:w.timeRow},{children:[e.jsx("div",{className:u.default.buttonSpacer,style:null==w?void 0:w.buttonSpacer}),e.jsxs("div",Object.assign({className:u.default.timeText,style:null==w?void 0:w.timeText},{children:[e.jsx("span",{children:z}),e.jsx("span",{children:"/"}),e.jsx("span",{children:L})]}))]}))]}))}))});f.displayName="SearchWaveform",exports.default=f;
2
2
  //# sourceMappingURL=searchwaveform.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),u=t.createContext(void 0);exports.AudioPlayProvider=function(n){var i=n.children,a=t.useState(null),s=a[0],l=a[1],o=t.useState(null),d=o[0],P=o[1],c=t.useState(null),y=c[0],p=c[1];return r.jsx(u.Provider,e.__assign({value:{playTopicId:s,pendingPlayRequest:d,currentPlayingSpeakerId:y,triggerPlayForTopic:function(e){return l(e)},setPendingPlayRequest:P,setCurrentPlayingSpeakerId:p,resetTrigger:function(){return l(null)}}},{children:i}))},exports.useAudioPlayPause=function(){var e=t.useContext(u);if(!e)throw new Error("useAudioPlayPause must be used within an AudioPlayProvider");return e};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");const t=r.createContext(void 0);exports.AudioPlayProvider=({children:u})=>{const[s,i]=r.useState(null),[n,a]=r.useState(null),[l,o]=r.useState(null);return e.jsx(t.Provider,Object.assign({value:{playTopicId:s,pendingPlayRequest:n,currentPlayingSpeakerId:l,triggerPlayForTopic:e=>i(e),setPendingPlayRequest:a,setCurrentPlayingSpeakerId:o,resetTrigger:()=>i(null)}},{children:u}))},exports.useAudioPlayPause=()=>{const e=r.useContext(t);if(!e)throw new Error("useAudioPlayPause must be used within an AudioPlayProvider");return e};
2
2
  //# sourceMappingURL=autoplay.wavefrom.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.sortTopicsByCheckedStatus=function(e){return e.sort(function(e,t){var r=e.segmentSelected?1:0;return(t.segmentSelected?1:0)-r})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.sortTopicsByCheckedStatus=e=>e.sort((e,t)=>{const s=e.segmentSelected?1:0;return(t.segmentSelected?1:0)-s});
2
2
  //# sourceMappingURL=word-segment-util.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),n=require("react/jsx-runtime"),e=require("../../../../CitationRenderer/CitationRenderer.js"),i=require("../../ai-reasoning/BigEnoughComponent.js");exports.default=function(o){var r,a,s,c=(null===(r=o.customIcons)||void 0===r?void 0:r.bigEnoughCitationIcon)||n.jsx(n.Fragment,{});return n.jsx(e.default,{inLineCitation:!0,citationTitle:o.title,citationId:"big-enough-".concat(o.citation.citation_number),citationComponent:n.jsx(i.default,{customStyles:o.customStyles,big_enough_decision_factors:o.citation}),chevronDownComponent:c,chevronUpComponent:c,styles:{pillButton:t.__assign({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(a=o.customStyles)||void 0===a?void 0:a.pill),citationContent:t.__assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(s=o.customStyles)||void 0===s?void 0:s.content)}})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../../../CitationRenderer/CitationRenderer.js"),n=require("../../ai-reasoning/BigEnoughComponent.js");exports.default=i=>{var o,r,a;const s=(null===(o=i.customIcons)||void 0===o?void 0:o.bigEnoughCitationIcon)||t.jsx(t.Fragment,{});return t.jsx(e.default,{inLineCitation:!0,citationTitle:i.title,citationId:`big-enough-${i.citation.citation_number}`,citationComponent:t.jsx(n.default,{customStyles:i.customStyles,big_enough_decision_factors:i.citation}),chevronDownComponent:s,chevronUpComponent:s,styles:{pillButton:Object.assign({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(r=i.customStyles)||void 0===r?void 0:r.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(a=i.customStyles)||void 0===a?void 0:a.content)}})};
2
2
  //# sourceMappingURL=BigEnoughCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=require("react/jsx-runtime"),n=require("@e-llm-studio/citation"),i=require("dayjs"),o=require("../../../utils/helpers.js"),r=require("react");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(i),u=a(r),c=function(t){var e,n;return null!==(n=null!==(e=t.message)&&void 0!==e?e:t.content)&&void 0!==n?n:""},s=function(t){var e;return null!==(e=t.highlighted_text)&&void 0!==e?e:""},d=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n+=1){var i=t[n],o=e[n];if(i.role!==o.role)return!1;if(c(i)!==c(o))return!1;if(s(i)!==s(o))return!1;if((i.timeStamp?String(i.timeStamp):"")!==(o.timeStamp?String(o.timeStamp):""))return!1}return!0},m=function(t){var e;return null==t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(m).join(""):u.default.isValidElement(t)?m(null===(e=t.props)||void 0===e?void 0:e.children):""},f=r.memo(function(i){var a,u,m=r.useState(0),f=m[0],p=m[1],h=r.useRef(null),v=r.useCallback(function(){var t;null===(t=i.onCitationClick)||void 0===t||t.call(i,i.isTable)},[i.onCitationClick,i.isTable]),g=i.chatCitationProps,y=null!=g?g:{},C=y.chatContainer,_=y.rootContainer,b=t.__rest(y,["chatContainer","rootContainer"]),x=r.useRef(null),S=r.useRef([]);x.current&&d(x.current,i.chatHistory)||(x.current=i.chatHistory,S.current=i.chatHistory.map(function(e){var n=c(e),i=s(e);return t.__assign(t.__assign({},e),{message:o.stripHtmlAndMetadata(n),timeStamp:l.default(e.timeStamp),highlighted_text:o.stripHtmlAndMetadata(i)})}));var k=S.current,w=r.useMemo(function(){return t.__assign({relevanceScore:100},_)},[_]),j=r.useMemo(function(){return t.__assign(t.__assign({summarizedTab:{chip:{show:!1,isActive:!1}},detailedTab:{chip:{isActive:!0}}},C),{chatData:k})},[C,k]),A=r.useMemo(function(){var e,n;return{pillButton:t.__assign({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null===(e=i.customStyles)||void 0===e?void 0:e.pill),citationContent:t.__assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",color:"black"},null===(n=i.customStyles)||void 0===n?void 0:n.content)}},[i.customStyles]),I=r.useMemo(function(){return e.jsx(n.ChatCitation,t.__assign({rootContainer:w,chatContainer:j},b))},[w,j]);r.useEffect(function(){if(f){var t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight="".concat(t,"px");var e=window.requestAnimationFrame(function(){var t=h.current,e=null==t?void 0:t.querySelector(".lucide-maximize-2, svg[class*='maximize']"),n=null==e?void 0:e.parentElement;null==n||n.click()});return function(){window.cancelAnimationFrame(e),document.body.style.overflow="auto",document.body.style.paddingRight="0px"}}},[f]);var q=r.useCallback(function(t){t.preventDefault(),t.stopPropagation(),v(),p(function(t){return t+1})},[v]);return!0===i.openInFullscreenOnClick?e.jsxs(e.Fragment,{children:[e.jsx("span",t.__assign({onClick:q,style:A.pillButton,role:"button",tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||q(t)}},{children:i.title})),f>0&&e.jsx("div",t.__assign({ref:h,"aria-hidden":"true",style:{position:"fixed",left:-1e4,top:-1e4,width:1,height:1,opacity:0,pointerEvents:"none",overflow:"hidden"}},{children:I}),f)]}):e.jsx("span",t.__assign({onClickCapture:v},{children:e.jsx(n.CitationRenderer,{inLineCitation:!0,citationTitle:i.title,chevronUpComponent:null===(a=i.customIcon)||void 0===a?void 0:a.chevronUp,chevronDownComponent:null===(u=i.customIcon)||void 0===u?void 0:u.chevronDown,citationComponent:I,styles:A})}))},function(t,e){return t.isTable===e.isTable&&(t.onCitationClick===e.onCitationClick&&(t.customIcon===e.customIcon&&(t.customStyles===e.customStyles&&(t.chatCitationProps===e.chatCitationProps&&(t.openInFullscreenOnClick===e.openInFullscreenOnClick&&(!!d(t.chatHistory,e.chatHistory)&&m(t.title)===m(e.title)))))))});exports.default=f;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=require("react/jsx-runtime"),n=require("@e-llm-studio/citation"),i=require("dayjs"),o=require("../../../utils/helpers.js"),r=require("react");function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=l(i),s=l(r);const c=t=>{var e,n;return null!==(n=null!==(e=t.message)&&void 0!==e?e:t.content)&&void 0!==n?n:""},u=t=>{var e;return null!==(e=t.highlighted_text)&&void 0!==e?e:""},d=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1){const i=t[n],o=e[n];if(i.role!==o.role)return!1;if(c(i)!==c(o))return!1;if(u(i)!==u(o))return!1;if((i.timeStamp?String(i.timeStamp):"")!==(o.timeStamp?String(o.timeStamp):""))return!1}return!0},m=t=>{var e;return null==t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(m).join(""):s.default.isValidElement(t)?m(null===(e=t.props)||void 0===e?void 0:e.children):""};var p=r.memo(i=>{var l,s;const[m,p]=r.useState(0),h=r.useRef(null),v=r.useCallback(()=>{var t;null===(t=i.onCitationClick)||void 0===t||t.call(i,i.isTable)},[i.onCitationClick,i.isTable]),f=i.chatCitationProps,g=null!=f?f:{},{chatContainer:y,rootContainer:b}=g,C=t.__rest(g,["chatContainer","rootContainer"]),j=r.useRef(null),x=r.useRef([]);j.current&&d(j.current,i.chatHistory)||(j.current=i.chatHistory,x.current=i.chatHistory.map(t=>{const e=c(t),n=u(t);return Object.assign(Object.assign({},t),{message:o.stripHtmlAndMetadata(e),timeStamp:a.default(t.timeStamp),highlighted_text:o.stripHtmlAndMetadata(n)})}));const S=x.current,k=r.useMemo(()=>Object.assign({relevanceScore:100},b),[b]),w=r.useMemo(()=>Object.assign(Object.assign({summarizedTab:{chip:{show:!1,isActive:!1}},detailedTab:{chip:{isActive:!0}}},y),{chatData:S}),[y,S]),O=r.useMemo(()=>{var t,e;return{pillButton:Object.assign({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null===(t=i.customStyles)||void 0===t?void 0:t.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",color:"black"},null===(e=i.customStyles)||void 0===e?void 0:e.content)}},[i.customStyles]),A=r.useMemo(()=>e.jsx(n.ChatCitation,Object.assign({rootContainer:k,chatContainer:w},C)),[k,w]);r.useEffect(()=>{if(!m)return;const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`;const e=window.requestAnimationFrame(()=>{const t=h.current,e=null==t?void 0:t.querySelector(".lucide-maximize-2, svg[class*='maximize']"),n=null==e?void 0:e.parentElement;null==n||n.click()});return()=>{window.cancelAnimationFrame(e),document.body.style.overflow="auto",document.body.style.paddingRight="0px"}},[m]);const I=r.useCallback(t=>{t.preventDefault(),t.stopPropagation(),v(),p(t=>t+1)},[v]);return!0===i.openInFullscreenOnClick?e.jsxs(e.Fragment,{children:[e.jsx("span",Object.assign({onClick:I,style:O.pillButton,role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||I(t)}},{children:i.title})),m>0&&e.jsx("div",Object.assign({ref:h,"aria-hidden":"true",style:{position:"fixed",left:-1e4,top:-1e4,width:1,height:1,opacity:0,pointerEvents:"none",overflow:"hidden"}},{children:A}),m)]}):e.jsx("span",Object.assign({onClickCapture:v},{children:e.jsx(n.CitationRenderer,{inLineCitation:!0,citationTitle:i.title,chevronUpComponent:null===(l=i.customIcon)||void 0===l?void 0:l.chevronUp,chevronDownComponent:null===(s=i.customIcon)||void 0===s?void 0:s.chevronDown,citationComponent:A,styles:O})}))},(t,e)=>t.isTable===e.isTable&&(t.onCitationClick===e.onCitationClick&&(t.customIcon===e.customIcon&&(t.customStyles===e.customStyles&&(t.chatCitationProps===e.chatCitationProps&&(t.openInFullscreenOnClick===e.openInFullscreenOnClick&&(!!d(t.chatHistory,e.chatHistory)&&m(t.title)===m(e.title))))))));exports.default=p;
2
2
  //# sourceMappingURL=ChatCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("tslib"),e=require("react/jsx-runtime");exports.default=function(s){return e.jsx("div",C.__assign({className:"mb-2"},{children:e.jsxs("svg",C.__assign({},s,{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("path",{d:"M20 19C20 19.7957 19.6839 20.5587 19.1213 21.1213C18.5587 21.6839 17.7956 22 17 22H7C6.20435 22 5.44129 21.6839 4.87868 21.1213C4.31607 20.5587 4 19.7957 4 19V5C4 4.20435 4.31607 3.44129 4.87868 2.87868C5.44129 2.31607 6.20435 2 7 2V4C6.73478 4 6.48043 4.10536 6.29289 4.29289C6.10536 4.48043 6 4.73478 6 5V19C6 19.2652 6.10536 19.5196 6.29289 19.7071C6.48043 19.8946 6.73478 20 7 20H17C17.2652 20 17.5196 19.8946 17.7071 19.7071C17.8946 19.5196 18 19.2652 18 19H20Z",fill:"#5C75F4"}),e.jsx("path",{d:"M7 2V4L14.4726 4V2L7 2Z",fill:"#5C75F4"}),e.jsx("path",{d:"M18 19H20V13H18V19Z",fill:"#5C75F4"}),e.jsx("path",{d:"M15.2209 5.47302C14.2942 5.47302 13.543 6.22424 13.543 7.15091C13.5446 8.05479 14.262 8.79491 15.1653 8.82483L14.1023 11.066H15.2209L16.7369 7.87C16.8441 7.6439 16.8928 7.39945 16.8988 7.15091C16.8988 6.22424 16.1476 5.47302 15.2209 5.47302ZM19.6953 5.47302C18.7686 5.47302 18.0174 6.22424 18.0174 7.15091C18.019 8.05479 18.7363 8.79491 19.6397 8.82483L18.5767 11.066H19.6953L21.2112 7.87C21.3185 7.6439 21.3672 7.39945 21.3731 7.15091C21.3731 6.22424 20.6219 5.47302 19.6953 5.47302Z",fill:"#5C75F4"}),e.jsx("path",{d:"M8.7984 15.5988H14.8447C15.0103 15.5988 15.1692 15.6646 15.2863 15.7817C15.4034 15.8988 15.4692 16.0577 15.4692 16.2233C15.4692 16.389 15.4034 16.5478 15.2863 16.665C15.1692 16.7821 15.0103 16.8479 14.8447 16.8479H8.7984C8.63275 16.8479 8.47389 16.7821 8.35676 16.665C8.23963 16.5478 8.17383 16.389 8.17383 16.2233C8.17383 16.0577 8.23963 15.8988 8.35676 15.7817C8.47389 15.6646 8.63275 15.5988 8.7984 15.5988ZM8.7984 13.1005H14.8447C15.0103 13.1005 15.1692 13.1663 15.2863 13.2834C15.4034 13.4005 15.4692 13.5594 15.4692 13.725C15.4692 13.8907 15.4034 14.0496 15.2863 14.1667C15.1692 14.2838 15.0103 14.3496 14.8447 14.3496H8.7984C8.63275 14.3496 8.47389 14.2838 8.35676 14.1667C8.23963 14.0496 8.17383 13.8907 8.17383 13.725C8.17383 13.5594 8.23963 13.4005 8.35676 13.2834C8.47389 13.1663 8.63275 13.1005 8.7984 13.1005ZM8.7984 10.3672L11.962 10.3672C12.1276 10.3672 12.2865 10.433 12.4036 10.5501C12.5208 10.6673 12.5866 10.8261 12.5866 10.9918C12.5866 11.1574 12.5208 11.3163 12.4036 11.4334C12.2865 11.5505 12.1276 11.6163 11.962 11.6163H8.7984C8.63275 11.6163 8.47389 11.5505 8.35676 11.4334C8.23963 11.3163 8.17383 11.1574 8.17383 10.9918C8.17383 10.8261 8.23963 10.6673 8.35676 10.5501C8.47389 10.433 8.63275 10.3672 8.7984 10.3672Z",fill:"#5C75F4"})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var C=require("react/jsx-runtime");exports.default=e=>C.jsx("div",Object.assign({className:"mb-2"},{children:C.jsxs("svg",Object.assign({},e,{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[C.jsx("path",{d:"M20 19C20 19.7957 19.6839 20.5587 19.1213 21.1213C18.5587 21.6839 17.7956 22 17 22H7C6.20435 22 5.44129 21.6839 4.87868 21.1213C4.31607 20.5587 4 19.7957 4 19V5C4 4.20435 4.31607 3.44129 4.87868 2.87868C5.44129 2.31607 6.20435 2 7 2V4C6.73478 4 6.48043 4.10536 6.29289 4.29289C6.10536 4.48043 6 4.73478 6 5V19C6 19.2652 6.10536 19.5196 6.29289 19.7071C6.48043 19.8946 6.73478 20 7 20H17C17.2652 20 17.5196 19.8946 17.7071 19.7071C17.8946 19.5196 18 19.2652 18 19H20Z",fill:"#5C75F4"}),C.jsx("path",{d:"M7 2V4L14.4726 4V2L7 2Z",fill:"#5C75F4"}),C.jsx("path",{d:"M18 19H20V13H18V19Z",fill:"#5C75F4"}),C.jsx("path",{d:"M15.2209 5.47302C14.2942 5.47302 13.543 6.22424 13.543 7.15091C13.5446 8.05479 14.262 8.79491 15.1653 8.82483L14.1023 11.066H15.2209L16.7369 7.87C16.8441 7.6439 16.8928 7.39945 16.8988 7.15091C16.8988 6.22424 16.1476 5.47302 15.2209 5.47302ZM19.6953 5.47302C18.7686 5.47302 18.0174 6.22424 18.0174 7.15091C18.019 8.05479 18.7363 8.79491 19.6397 8.82483L18.5767 11.066H19.6953L21.2112 7.87C21.3185 7.6439 21.3672 7.39945 21.3731 7.15091C21.3731 6.22424 20.6219 5.47302 19.6953 5.47302Z",fill:"#5C75F4"}),C.jsx("path",{d:"M8.7984 15.5988H14.8447C15.0103 15.5988 15.1692 15.6646 15.2863 15.7817C15.4034 15.8988 15.4692 16.0577 15.4692 16.2233C15.4692 16.389 15.4034 16.5478 15.2863 16.665C15.1692 16.7821 15.0103 16.8479 14.8447 16.8479H8.7984C8.63275 16.8479 8.47389 16.7821 8.35676 16.665C8.23963 16.5478 8.17383 16.389 8.17383 16.2233C8.17383 16.0577 8.23963 15.8988 8.35676 15.7817C8.47389 15.6646 8.63275 15.5988 8.7984 15.5988ZM8.7984 13.1005H14.8447C15.0103 13.1005 15.1692 13.1663 15.2863 13.2834C15.4034 13.4005 15.4692 13.5594 15.4692 13.725C15.4692 13.8907 15.4034 14.0496 15.2863 14.1667C15.1692 14.2838 15.0103 14.3496 14.8447 14.3496H8.7984C8.63275 14.3496 8.47389 14.2838 8.35676 14.1667C8.23963 14.0496 8.17383 13.8907 8.17383 13.725C8.17383 13.5594 8.23963 13.4005 8.35676 13.2834C8.47389 13.1663 8.63275 13.1005 8.7984 13.1005ZM8.7984 10.3672L11.962 10.3672C12.1276 10.3672 12.2865 10.433 12.4036 10.5501C12.5208 10.6673 12.5866 10.8261 12.5866 10.9918C12.5866 11.1574 12.5208 11.3163 12.4036 11.4334C12.2865 11.5505 12.1276 11.6163 11.962 11.6163H8.7984C8.63275 11.6163 8.47389 11.5505 8.35676 11.4334C8.23963 11.3163 8.17383 11.1574 8.17383 10.9918C8.17383 10.8261 8.23963 10.6673 8.35676 10.5501C8.47389 10.433 8.63275 10.3672 8.7984 10.3672Z",fill:"#5C75F4"})]}))}));
2
2
  //# sourceMappingURL=DocumentCitationIcon.js.map