@e-llm-studio/requirement-ai 0.0.249 → 0.0.251

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 (447) 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/Icons/Icon.js +1 -1
  19. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  20. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
  21. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  22. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  23. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
  24. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  25. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
  26. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  27. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
  28. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  29. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  30. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  31. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  32. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  33. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  34. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  35. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  36. package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  37. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  38. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  39. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  40. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  41. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  42. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  43. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  44. package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  45. package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
  46. package/dist/cjs/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
  47. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  48. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  49. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  50. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  51. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  52. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  53. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  54. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  55. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  56. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  58. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  59. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  60. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  61. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  62. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  63. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  66. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  67. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  68. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  69. package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
  75. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
  76. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  78. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  79. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  80. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  81. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  84. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  85. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  86. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  87. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  88. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  89. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  90. package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  91. package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  92. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  93. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  94. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  95. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  96. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  97. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  98. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  99. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  100. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  101. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  102. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  103. package/dist/cjs/features/RequirementAI/components/segment/DeleteSegmentsDialog.js +1 -1
  104. package/dist/cjs/features/RequirementAI/components/segment/EditSegmentDialog.js +1 -1
  105. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  106. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  107. package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  108. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  109. package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  110. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
  111. package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  112. package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  113. package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  114. package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  115. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  116. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  117. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  118. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  119. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  120. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  121. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  122. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  123. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  124. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
  125. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  126. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
  127. package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  128. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  129. package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
  130. package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  131. package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  132. package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  133. package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
  134. package/dist/cjs/features/RequirementAI/icons/CDIcon.js +1 -1
  135. package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
  136. package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  137. package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  138. package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  139. package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  140. package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  141. package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
  142. package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  143. package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  144. package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  145. package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  146. package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
  147. package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
  148. package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
  149. package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  150. package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  151. package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
  152. package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
  153. package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  154. package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  155. package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  156. package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
  157. package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
  158. package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  159. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  160. package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  161. package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  162. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
  163. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
  164. package/dist/cjs/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
  165. package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
  166. package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  167. package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
  168. package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
  169. package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  170. package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
  171. package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
  172. package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
  173. package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
  174. package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
  175. package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
  176. package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
  177. package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
  178. package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
  179. package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  180. package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
  181. package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
  182. package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
  183. package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
  184. package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  185. package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  186. package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
  187. package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
  188. package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
  189. package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
  190. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  191. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  192. package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  193. package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  194. package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
  195. package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  196. package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  197. package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
  198. package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
  199. package/dist/cjs/index.js +1 -1
  200. package/dist/features/CitationRenderer/CitationRenderer.js +1 -1
  201. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  202. package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  203. package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  204. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  205. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  206. package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  207. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  208. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  209. package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  210. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  211. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  212. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  213. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  214. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  215. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  216. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  217. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  218. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  219. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +1 -1
  220. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  221. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  222. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
  223. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  224. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +1 -1
  225. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  226. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +1 -1
  227. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  228. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  229. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  230. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  231. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  232. package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  233. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  234. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  235. package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  236. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  237. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  238. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  239. package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  240. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  241. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  242. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  243. package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  244. package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfRendererWrapper.js +1 -1
  245. package/dist/features/RequirementAI/components/ai-reasoning/CitationPdfViewer.js +1 -1
  246. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  247. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  248. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  249. package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  250. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  251. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  252. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  253. package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  254. package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  255. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  256. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  257. package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  258. package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  259. package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  260. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  261. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  262. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  263. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  264. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  265. package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  266. package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  267. package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  268. package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  269. package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  270. package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  271. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  272. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  273. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +1 -1
  274. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +1 -1
  275. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  276. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  277. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  278. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  279. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  280. package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  281. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  282. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  283. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  284. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  285. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  286. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  287. package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  288. package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  289. package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  290. package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  291. package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  292. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  293. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  294. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  295. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  296. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  297. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  298. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  299. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  300. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  301. package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  302. package/dist/features/RequirementAI/components/segment/DeleteSegmentsDialog.js +1 -1
  303. package/dist/features/RequirementAI/components/segment/EditSegmentDialog.js +1 -1
  304. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  305. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  306. package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  307. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  308. package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  309. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
  310. package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  311. package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  312. package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  313. package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  314. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  315. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  316. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  317. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  318. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  319. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  320. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  321. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  322. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  323. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +1 -1
  324. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  325. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
  326. package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  327. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  328. package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
  329. package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  330. package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  331. package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  332. package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
  333. package/dist/features/RequirementAI/icons/CDIcon.js +1 -1
  334. package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
  335. package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  336. package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  337. package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  338. package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  339. package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  340. package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
  341. package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  342. package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  343. package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  344. package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  345. package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
  346. package/dist/features/RequirementAI/shared/Accordian.js +1 -1
  347. package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
  348. package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  349. package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  350. package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
  351. package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
  352. package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  353. package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  354. package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  355. package/dist/features/RequirementAI/store/markdown-context.js +1 -1
  356. package/dist/features/RequirementAI/store/ref.context.js +1 -1
  357. package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  358. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  359. package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  360. package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  361. package/dist/features/RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js +1 -1
  362. package/dist/features/RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js +1 -1
  363. package/dist/features/RequirementAiCitations/AiReasoning/components/icons/RelevanceScoreIcon.js +1 -1
  364. package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
  365. package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  366. package/dist/features/UserStoryImport/components/BackNav.js +1 -1
  367. package/dist/features/UserStoryImport/components/Badge.js +1 -1
  368. package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  369. package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
  370. package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
  371. package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
  372. package/dist/features/UserStoryImport/components/Footer.js +1 -1
  373. package/dist/features/UserStoryImport/components/Header.js +1 -1
  374. package/dist/features/UserStoryImport/components/NavRow.js +1 -1
  375. package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
  376. package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
  377. package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
  378. package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  379. package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
  380. package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
  381. package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
  382. package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
  383. package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  384. package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  385. package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
  386. package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
  387. package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
  388. package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
  389. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  390. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  391. package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  392. package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  393. package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
  394. package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  395. package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  396. package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
  397. package/dist/features/UserStoryImport/lib/dialog.js +1 -1
  398. package/dist/index.js +1 -1
  399. package/dist/types/src/App.d.ts.map +1 -1
  400. package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
  401. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +9 -50
  402. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  403. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts +1 -2
  404. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
  405. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts +4 -1
  406. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts.map +1 -1
  407. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
  408. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +3 -4
  409. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
  410. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +0 -1
  411. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  412. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts +0 -8
  413. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
  414. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +4 -9
  415. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
  416. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +11 -45
  417. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  418. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts +13 -17
  419. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts.map +1 -1
  420. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +5 -29
  421. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  422. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +11 -17
  423. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  424. package/dist/types/src/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.d.ts.map +1 -1
  425. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +2 -3
  426. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
  427. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
  428. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
  429. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +0 -4
  430. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
  431. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts +1 -2
  432. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
  433. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +1 -7
  434. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  435. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +1 -4
  436. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
  437. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +1 -1
  438. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
  439. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +0 -2
  440. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
  441. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +13 -24
  442. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  443. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +1 -7
  444. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
  445. package/dist/types/src/index.d.ts +0 -3
  446. package/dist/types/src/index.d.ts.map +1 -1
  447. package/package.json +1 -24
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";const s=({className:s,style:e})=>t("svg",{className:s,style:e,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})});export{s as SparkleIcon};
1
+ import{jsx as s}from"react/jsx-runtime";const t=({className:t,style:e})=>s("svg",Object.assign({className:t,style:e,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg"},{children:s("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}));export{t as SparkleIcon};
2
2
  //# sourceMappingURL=SparkleIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{memo as t,useState as o,useRef as a,useCallback as n,useEffect as l}from"react";import r from"./searchwaveform.js";import s from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as d}from"./utils/word-segment-util.js";import c from"./components/SegmentByWordsViral.js";import u from"./SearchWaveFromWrapper.module.css.js";import m from"./icons/AudioLinesIcon.js";import v from"./icons/VideoIcon.js";import{CircularProgress as p}from"@mui/material";import{renderCitationAIConfidenceDisplay as g}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as h}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as y}from"./store/autoplay.wavefrom.js";const f=e=>{const i=Math.floor(e/3600),t=Math.floor(e%3600/60),o=Math.floor(e%60),a=e=>String(e).padStart(2,"0");return`${a(i)}:${a(t)}:${o.toFixed(0)}`},S=t(({title:t,segments:S,gsUtilPath:P,citationNumber:w,relevanceScore:N,customStyles:A})=>{const[U,L]=o(0),[j,B]=o(S.length>0),[$,k]=o(!1),[C,M]=o(!1),[T,W]=o(""),[b,I]=o(!0),[x,V]=o("audio"),{queryClient:D,useGetSignedUrlQuery:Q,useGetSignedUrlMutation:q,useExtractAudioPeaksMutation:E,useExtractAudioPeaksQuery:G,useGetVideoSignedUrlQuery:O,useGetVideoSignedUrlMutation:R}=h().apiCachingConfig,_=a(null),z=P.replace(/\.wav$|\.mp3$/i,".mp4"),F=["getSignedUrl",P],H=["extractAudioPeaks",P],J=["getVideoSignedUrl",z],{data:K}=Q(P,F),{data:X}=G(P,H),{data:Y}=O(z,J),{mutate:Z,isPending:ee}=q(P),{mutate:ie,isPending:te}=E(P),{mutate:oe}=R(z),ae=n(e=>{L(e)},[]);l(()=>{if(!P)return void console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL");const e=D.getQueryData(F),i=D.getQueryData(H),t=D.getQueryData(J);e||Z({gsUtilPath:P}),i||ie({gsUtilPath:P}),t||oe({gsUtilPath:z})},[P]),l(()=>{Y&&(async()=>{const e=await fetch(Y);W(e.ok?Y:"")})()},[Y]);return e(y,{children:i("div",{className:u.wrapper,style:null==A?void 0:A.wrapper,children:[i("div",{className:u.header,style:null==A?void 0:A.header,children:[e("h2",{className:u.title,style:null==A?void 0:A.title,children:t||"Audio Snippet"}),g(N,!0,null==A?void 0:A.confidenceDisplay)]}),i("div",{className:u.content,style:null==A?void 0:A.content,children:["audio"!==x&&T?i("div",{className:u.videoSection,style:null==A?void 0:A.videoSection,children:[b&&i("div",{className:u.videoLoader,style:null==A?void 0:A.videoLoader,children:[e(p,{size:40}),e("p",{children:"Loading video..."})]}),e("div",{style:{visibility:b?"hidden":"visible",position:b?"absolute":"relative"},children:e(s,{videoSrc:T,currentTime:U,isWaveformPlaying:C,onBufferingStart:()=>{k(!0),C&&M(!1)},onBufferingEnd:()=>{k(!1)},onVideoPlayPause:e=>{_.current?e?C||_.current.togglePlayPause():C&&_.current.togglePlayPause():M(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:e=>(e=>{I(e)})(e),isUrlPending:ee,isPeaksPending:te,signedUrl:K,AudioData:X,showOnlyMatched:j,wavesurferRef:_,handleAudioTimeUpdate:ae,segments:S,setIsAudioPlaying:M,setShowOnlyMatched:B,customStyles:null==A?void 0:A.videoPlayer,waveformStyles:null==A?void 0:A.waveform},`video-${w}`)})]}):e("div",{className:u.audioSection,style:null==A?void 0:A.audioSection,children:ee||te?i("div",{className:u.audioLoader,style:null==A?void 0:A.audioLoader,children:[e(p,{size:48}),e("span",{children:"Loading audio peaks..."})]}):K&&X&&e(r,{ref:_,audio_file_name:K,matchedSegments:S,peaks:X.peaks,duration:X.duration,setIsAudioPlaying:M,onTimeUpdate:ae,currentAudioTime:U,showOnlyMatched:j,setShowOnlyMatched:B,customStyles:null==A?void 0:A.waveform},`audio-${w}`)}),i("div",{className:u.controls,style:null==A?void 0:A.controls,children:[T&&i("div",{className:u.mediaToggle,style:null==A?void 0:A.mediaToggle,children:[e("span",{className:`\n ${u.mediaButton}\n ${"video"===x&&u.mediaButtonActive}\n `,style:"video"===x?null==A?void 0:A.mediaButtonActive:null==A?void 0:A.mediaButton,onClick:()=>V("video"),children:e(v,{})}),e("span",{className:`\n ${u.mediaButton}\n ${"audio"===x&&u.mediaButtonActive}\n `,style:"audio"===x?null==A?void 0:A.mediaButtonActive:null==A?void 0:A.mediaButton,onClick:()=>V("audio"),children:e(m,{})})]}),e("label",{className:u.switchLabel,style:null==A?void 0:A.switchLabel,children:e("span",{children:"play only matched segments"})})]}),i("div",{className:u.transcript,style:null==A?void 0:A.transcriptContainer,children:[e("div",{className:u.transcriptHeader,style:null==A?void 0:A.transcriptHeader,children:"Transcript"}),(i=>{const t=d(i);return e("div",{className:u.segmentList,style:null==A?void 0:A.segmentList,children:null==t?void 0:t.map(i=>e("div",{id:i.segment_id,className:u.segmentItem,style:null==A?void 0:A.transcriptSegment,children:e(c,{content:i.text,startTime:f(i.start),endTime:f(i.end),words:i.words||[],currentTime:U,containerStyle:null==A?void 0:A.transcriptContainer,customStyles:null==A?void 0:A.segmentWords})},i.segment_id))})})(S)]})]})]})})});export{S as default,f as formatTime};
1
+ import{__awaiter as e}from"tslib";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{memo as n,useState as a,useRef as s,useCallback as o,useEffect as l}from"react";import r from"./searchwaveform.js";import d from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as c}from"./utils/word-segment-util.js";import u from"./components/SegmentByWordsViral.js";import m from"./SearchWaveFromWrapper.module.css.js";import g from"./icons/AudioLinesIcon.js";import v from"./icons/VideoIcon.js";import{CircularProgress as p}from"@mui/material";import{renderCitationAIConfidenceDisplay as h}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as y}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as f}from"./store/autoplay.wavefrom.js";const S=e=>{const i=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),a=e=>String(e).padStart(2,"0");return`${a(i)}:${a(t)}:${n.toFixed(0)}`},j=n(({title:n,segments:j,gsUtilPath:b,citationNumber:P,relevanceScore:O,customStyles:w})=>{const[N,A]=a(0),[U,L]=a(j.length>0),[B,$]=a(!1),[k,C]=a(!1),[M,T]=a(""),[W,I]=a(!0),[x,V]=a("audio"),{queryClient:D,useGetSignedUrlQuery:Q,useGetSignedUrlMutation:q,useExtractAudioPeaksMutation:E,useExtractAudioPeaksQuery:G,useGetVideoSignedUrlQuery:R,useGetVideoSignedUrlMutation:_}=y().apiCachingConfig,z=s(null),F=b.replace(/\.wav$|\.mp3$/i,".mp4"),H=["getSignedUrl",b],J=["extractAudioPeaks",b],K=["getVideoSignedUrl",F],{data:X}=Q(b,H),{data:Y}=G(b,J),{data:Z}=R(F,K),{mutate:ee,isPending:ie}=q(b),{mutate:te,isPending:ne}=E(b),{mutate:ae}=_(F),se=o(e=>{A(e)},[]);l(()=>{if(!b)return void console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL");const e=D.getQueryData(H),i=D.getQueryData(J),t=D.getQueryData(K);e||ee({gsUtilPath:b}),i||te({gsUtilPath:b}),t||ae({gsUtilPath:F})},[b]),l(()=>{Z&&e(void 0,void 0,void 0,function*(){const e=yield fetch(Z);T(e.ok?Z:"")})},[Z]);return i(f,{children:t("div",Object.assign({className:m.wrapper,style:null==w?void 0:w.wrapper},{children:[t("div",Object.assign({className:m.header,style:null==w?void 0:w.header},{children:[i("h2",Object.assign({className:m.title,style:null==w?void 0:w.title},{children:n||"Audio Snippet"})),h(O,!0,null==w?void 0:w.confidenceDisplay)]})),t("div",Object.assign({className:m.content,style:null==w?void 0:w.content},{children:["audio"!==x&&M?t("div",Object.assign({className:m.videoSection,style:null==w?void 0:w.videoSection},{children:[W&&t("div",Object.assign({className:m.videoLoader,style:null==w?void 0:w.videoLoader},{children:[i(p,{size:40}),i("p",{children:"Loading video..."})]})),i("div",Object.assign({style:{visibility:W?"hidden":"visible",position:W?"absolute":"relative"}},{children:i(d,{videoSrc:M,currentTime:N,isWaveformPlaying:k,onBufferingStart:()=>{$(!0),k&&C(!1)},onBufferingEnd:()=>{$(!1)},onVideoPlayPause:e=>{z.current?e?k||z.current.togglePlayPause():k&&z.current.togglePlayPause():C(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:e=>(e=>{I(e)})(e),isUrlPending:ie,isPeaksPending:ne,signedUrl:X,AudioData:Y,showOnlyMatched:U,wavesurferRef:z,handleAudioTimeUpdate:se,segments:j,setIsAudioPlaying:C,setShowOnlyMatched:L,customStyles:null==w?void 0:w.videoPlayer,waveformStyles:null==w?void 0:w.waveform},`video-${P}`)}))]})):i("div",Object.assign({className:m.audioSection,style:null==w?void 0:w.audioSection},{children:ie||ne?t("div",Object.assign({className:m.audioLoader,style:null==w?void 0:w.audioLoader},{children:[i(p,{size:48}),i("span",{children:"Loading audio peaks..."})]})):X&&Y&&i(r,{ref:z,audio_file_name:X,matchedSegments:j,peaks:Y.peaks,duration:Y.duration,setIsAudioPlaying:C,onTimeUpdate:se,currentAudioTime:N,showOnlyMatched:U,setShowOnlyMatched:L,customStyles:null==w?void 0:w.waveform},`audio-${P}`)})),t("div",Object.assign({className:m.controls,style:null==w?void 0:w.controls},{children:[M&&t("div",Object.assign({className:m.mediaToggle,style:null==w?void 0:w.mediaToggle},{children:[i("span",Object.assign({className:`\n ${m.mediaButton}\n ${"video"===x&&m.mediaButtonActive}\n `,style:"video"===x?null==w?void 0:w.mediaButtonActive:null==w?void 0:w.mediaButton,onClick:()=>V("video")},{children:i(v,{})})),i("span",Object.assign({className:`\n ${m.mediaButton}\n ${"audio"===x&&m.mediaButtonActive}\n `,style:"audio"===x?null==w?void 0:w.mediaButtonActive:null==w?void 0:w.mediaButton,onClick:()=>V("audio")},{children:i(g,{})}))]})),i("label",Object.assign({className:m.switchLabel,style:null==w?void 0:w.switchLabel},{children:i("span",{children:"play only matched segments"})}))]})),t("div",Object.assign({className:m.transcript,style:null==w?void 0:w.transcriptContainer},{children:[i("div",Object.assign({className:m.transcriptHeader,style:null==w?void 0:w.transcriptHeader},{children:"Transcript"})),(e=>{const t=c(e);return i("div",Object.assign({className:m.segmentList,style:null==w?void 0:w.segmentList},{children:null==t?void 0:t.map(e=>i("div",Object.assign({id:e.segment_id,className:m.segmentItem,style:null==w?void 0:w.transcriptSegment},{children:i(u,{content:e.text,startTime:S(e.start),endTime:S(e.end),words:e.words||[],currentTime:N,containerStyle:null==w?void 0:w.transcriptContainer,customStyles:null==w?void 0:w.segmentWords})}),e.segment_id))}))})(j)]}))]}))]}))})});export{j as default,S as formatTime};
2
2
  //# sourceMappingURL=SearchWaveFromWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import i from"react";import o from"./components/AudioCitationIcon.js";import n from"./SearchWaveFromWrapper.js";import e from"../../../../CitationRenderer/CitationRenderer.js";const a=a=>{var c,r,l,d,s,m,u;const p=(null===(c=a.customIcons)||void 0===c?void 0:c.waveformCitationIcon)||t(o,{});return t(e,{inLineCitation:!0,citationTitle:a.title,citationId:`audio-citation-${a.citation.citation_number}`,citationComponent:t(n,{citationNumber:a.citation.citation_number,gsUtilPath:"audio_transcript"===a.citation.customMetadata.type?null===(r=a.citation.customMetadata)||void 0===r?void 0:r.gs_util_url:"",relevanceScore:"audio_transcript"===a.citation.customMetadata.type?null===(l=a.citation.customMetadata)||void 0===l?void 0:l.relevance_score:0,title:"audio_transcript"===a.citation.customMetadata.type?null===(d=a.citation.customMetadata)||void 0===d?void 0:d.file_name:"",segments:"audio_transcript"===a.citation.customMetadata.type?null===(s=a.citation.customMetadata)||void 0===s?void 0:s.segments:[],customStyles:a.customStyles}),chevronDownComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,chevronUpComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,styles:{pillButton:{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=a.customStyles)||void 0===m?void 0:m.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",...null===(u=a.customStyles)||void 0===u?void 0:u.content}}})};export{a as default};
1
+ import{jsx as t}from"react/jsx-runtime";import i from"react";import o from"./components/AudioCitationIcon.js";import n from"./SearchWaveFromWrapper.js";import e from"../../../../CitationRenderer/CitationRenderer.js";const a=a=>{var c,r,l,s,d,m,u;const p=(null===(c=a.customIcons)||void 0===c?void 0:c.waveformCitationIcon)||t(o,{});return t(e,{inLineCitation:!0,citationTitle:a.title,citationId:`audio-citation-${a.citation.citation_number}`,citationComponent:t(n,{citationNumber:a.citation.citation_number,gsUtilPath:"audio_transcript"===a.citation.customMetadata.type?null===(r=a.citation.customMetadata)||void 0===r?void 0:r.gs_util_url:"",relevanceScore:"audio_transcript"===a.citation.customMetadata.type?null===(l=a.citation.customMetadata)||void 0===l?void 0:l.relevance_score:0,title:"audio_transcript"===a.citation.customMetadata.type?null===(s=a.citation.customMetadata)||void 0===s?void 0:s.file_name:"",segments:"audio_transcript"===a.citation.customMetadata.type?null===(d=a.citation.customMetadata)||void 0===d?void 0:d.segments:[],customStyles:a.customStyles}),chevronDownComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,chevronUpComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.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===(m=a.customStyles)||void 0===m?void 0:m.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(u=a.customStyles)||void 0===u?void 0:u.content)}})};export{a as default};
2
2
  //# sourceMappingURL=WaveformCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";const i=i=>t("div",{className:"mb-2",children:e("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("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"}),t("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"}),t("g",{"clip-path":"url(#clip0_3025_73410)",children:t("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"})}),t("defs",{children:t("clipPath",{id:"clip0_3025_73410",children:t("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})})})]})});export{i as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const i=i=>t("div",Object.assign({className:"mb-2"},{children:e("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("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"}),t("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"}),t("g",Object.assign({"clip-path":"url(#clip0_3025_73410)"},{children:t("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"})})),t("defs",{children:t("clipPath",Object.assign({id:"clip0_3025_73410"},{children:t("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})}))})]}))}));export{i as default};
2
2
  //# sourceMappingURL=AudioCitationIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import t,{forwardRef as n,useState as c,useRef as u,useEffect as s,useCallback as o}from"react";import i from"wavesurfer.js";import l from"wavesurfer.js/dist/plugins/regions";import{useAudioPlayPause as a}from"../store/autoplay.wavefrom.js";import d from"./AudioTimeLineSlider.module.css.js";const m=n(({audio_file_name:n,matchedSegments:m,onTimeUpdate:p,peaks:g,duration:f,setIsAudioPlaying:v,setChevronIndex:h,chevronIndex:y=0,onToggleShowMatched:T,topicId:S,isVideoBuffering:w,playOnlyMatched:k=!0,showOnlyMatched:_,setShowOnlyMatched:N,customStyles:P},M)=>{const[x,$]=c(!1),[I,b]=c(!0),[R,C]=c(!1),[D,j]=c(!1),[O,q]=c(!1),[A,B]=c(!1),[E,W]=c(0),[H,L]=c(!1),[U,X]=c("00:00:00"),[z,F]=c("00:00:00"),[G,V]=c(0),[J,K]=c(!1),[Q,Y]=c(0),[Z,ee]=c("00:00:00"),re=u(null),te=u(!1),ne=u(null),ce=u(null),ue=u(null),se=u(!1),oe=u(null),ie=u(null),le=u(0),ae=u(0),[de,me]=c(!1),{playTopicId:pe,resetTrigger:ge,pendingPlayRequest:fe,setPendingPlayRequest:ve,triggerPlayForTopic:he}=a(),ye=u(null),Te=e=>{try{const[r,t,n,c]=e.split(":"),u=parseInt(r).toString().padStart(2,"0"),s=parseInt(t).toString().padStart(2,"0");return`${u}:${s}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};s(()=>{de&&fe===S&&(ve(null),setTimeout(()=>{he(S)},100))},[de,fe,S]),s(()=>{de&&pe===S&&(ye.current&&(ye.current.click(),$(!0)),ge())},[pe,S,de]),s(()=>(me(!0),()=>{me(!1)}),[]),s(()=>{if(!n||!ne.current||se.current)return;b(!0);const e=l.create(),r=i.create({container:ne.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ce.current=r,ue.current=r.registerPlugin(e),se.current=!0,r.on("decode",()=>{L(!0),we();const e=Te(Se(f));F(e||"00:00:00")}),r.on("ready",()=>{b(!1)}),r.on("play",()=>{$(!0),v&&v(!0)}),r.on("pause",()=>{$(!1),v&&v(!1)}),r.on("finish",()=>{$(!1),v&&v(!1),R&&(C(!1),j(!1),q(!0))}),r.on("seeking",()=>{_||R&&!D&&ke()}),r.on("error",()=>{b(!1)}),r.on("audioprocess",e=>{if(p&&p(e),!te.current){V(e/f*100)}const r=Te(Se(e));X(r||"00:00:00"),ae.current=e}),()=>{oe.current&&clearTimeout(oe.current),ie.current,r.destroy(),se.current=!1,ce.current=null}},[n]),s(()=>{ce.current&&(ce.current.setOptions({interact:!_}),x&&ce.current.pause(),_?(C(!0),le.current=0):ke(),T&&T(_))},[_]);const Se=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),c=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(c).padStart(3,"0")}`},we=o(()=>{ue.current&&ce.current&&(ue.current.clearRegions(),m.forEach((e,r)=>{ue.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[m]),ke=o(()=>{ce.current&&(C(!1),j(!1),q(!1),B(!1),oe.current&&(clearTimeout(oe.current),oe.current=null),ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null))},[]),_e=o(e=>{!_&&ce.current&&(ce.current.seekTo(e/f),ce.current.play(),$(!0),v&&v(!0),X(Te(Se(e))),C(!1),j(!1),q(!1))},[_,f,v,Se,Te]),Ne=u(!1),Pe=o(()=>{if(Ne.current)return;if(!ce.current||!m.length)return;Ne.current=!0,ce.current.pause();const e=le.current+1;if(console.log("Current segment:",le.current),console.log("Next index calculated:",e),console.log("Total segments:",m.length),e<m.length){const r=m[e];X(Te(Se(r.start_time))),h&&h(e),W(e),le.current=e;const t=_?0:2e3;oe.current=setTimeout(()=>{Ne.current=!1,setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),ie.current=null,Pe())};ie.current=t,ce.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),C(_),j(!0),q(!0),le.current=0,W(0),h&&h(0),m.length>0){const e=m[0];X(Te(Se(e.start_time))),ce.current.seekTo(e.start_time/f)}ce.current.isPlaying()&&ce.current.pause(),oe.current=setTimeout(()=>{Ne.current=!1,ce.current&&ce.current.isPlaying()&&ce.current.pause()},_?0:2e3)}},[m,f,h,Se,_]),Me=o(()=>{if(!ce.current||!m.length)return;const e=le.current;if(e>=m.length)return C(_),void q(!0);const r=m[e];W(e),X(Te(Se(r.start_time))),h&&h(e),setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),ie.current=null,Pe())};ie.current=t,ce.current.on("audioprocess",t)},100)},[m,f,h,Pe,Se,_]),xe=o(()=>{if(!ce.current||!m.length)return;ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null);const e=m[le.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),ie.current=null,Pe())};ie.current=t,ce.current.on("audioprocess",t)},[m,Pe]),$e=o(()=>{ce.current&&(_?x?(ce.current.pause(),j(!0)):D?(ce.current.play(),j(!1),xe()):O?(q(!1),le.current=0,Me()):Me():x?ce.current.pause():ce.current.play())},[x,_,D,O,Me,xe]),Ie=o(e=>{if(!ce.current||0===m.length)return;const r=x;let t;x&&(ce.current.pause(),j(!0)),ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null),t="next"===e?(E+1)%m.length:(E-1+m.length)%m.length,W(t),le.current=t;const n=m[t];ce.current.seekTo(n.start_time/f),h&&h(t),r&&_&&setTimeout(()=>{ce.current&&(ce.current.play(),j(!1),xe())},50)},[E,m,h,f,x,_,xe]),be=o(e=>{ce.current&&(_||(R&&ke(),ce.current.seekTo(e/f)))},[f,R,ke,_]);s(()=>{if(m.length>0&&void 0!==y&&ce.current&&!Ne.current){if(y===le.current)return;const e=x;ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null);const r=m[y];r&&(ce.current.seekTo(r.start_time/f),W(y),le.current=y,e&&_&&setTimeout(()=>{ce.current&&xe()},50))}},[y,f,m,_,x,xe]);const Re=u(!1);s(()=>{w&&ce.current&&ce.current.isPlaying()&&(Re.current=!0,ce.current.pause(),R&&j(!0)),!w&&Re.current&&ce.current&&ce.current&&(ce.current.play(),Re.current=!1,R&&D&&(j(!1),xe()))},[w,R,D,xe]),t.useImperativeHandle(M,()=>({waveSurfer:ce.current,navigateSegments:Ie,togglePlayPause:$e,getCurrentSegmentIndex:()=>E,setCurrentSegmentIndex:W,isPlayingSequence:()=>R,setPlayingSequence:e=>C(e),seekToTime:be,showOnlyMatched:_,setShowOnlyMatched:e=>N(e),handleIndividualSegmentPlay:_e,setPlaybackRate:e=>{ce.current&&ce.current.setPlaybackRate(e)}}),[ce.current,Ie,$e,E,R,be,_,_e]);return e("div",{className:d.container,style:null==P?void 0:P.container,children:r("div",{className:d.inner,style:null==P?void 0:P.inner,children:[e("div",{className:d.waveformWrapper,style:null==P?void 0:P.waveformRow,children:e("div",{ref:ne,className:d.waveform,style:null==P?void 0:P.waveform})}),e("div",{className:d.timeWrapper,style:null==P?void 0:P.timeRow,children:r("div",{className:d.timeText,style:null==P?void 0:P.timeText,children:[e("span",{children:U}),e("span",{children:"/"}),e("span",{children:z})]})}),e("div",{className:d.sliderRow,style:null==P?void 0:P.sliderRow,children:r("div",{className:`${d.slider} ${[d.sliderBase,_?d.sliderDisabled:d.sliderEnabled,d.sliderGroup].join(" ")}`,ref:re,style:null==P?void 0:P.slider,onClick:_?void 0:e=>{var r;if(_)return;const t=null===(r=re.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!ce.current)return;const n=(e.clientX-t.left)/t.width*100,c=n/100*f;V(n),ce.current.seekTo(c/f),R&&ke()},onMouseMove:_?void 0:e=>{if(!_&&re.current){const r=re.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;K(!0),Y(t);const n=Te(Se(e/100*f));ee(n||"00:00:00")}}},onMouseLeave:()=>{K(!1)},onMouseDown:_?void 0:()=>{_||(te.current=!0)},onMouseUp:_?void 0:()=>{if(!_&&(te.current=!1,ce.current)){const e=G/100*f;ce.current.seekTo(e/f),R&&ke()}},children:[e("div",{className:d.track,style:null==P?void 0:P.sliderTrack,children:e("div",{className:d.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})}),m.map((r,t)=>{const n=r.start_time/f*100,c=(r.end_time-r.start_time)/f*100,u=t===E&&k;return e("div",{className:`${d.segment} ${u?d.segmentActive:d.segmentInactive}`,style:{left:`${n}%`,width:`${c}%`,opacity:k&&!u?.3:1}},r.segment_id)}),e("div",{className:d.progress,style:{width:`${G}%`,...null==P?void 0:P.sliderProgress}}),e("div",{className:d.thumb,style:{left:`${G}%`,...null==P?void 0:P.sliderThumb},children:e("div",{className:d.thumbDot,style:null==P?void 0:P.thumbDot})}),J&&!_&&e("div",{className:d.tooltip,style:{left:Q,...null==P?void 0:P.timeTooltip},children:Z})]})})]})})});m.displayName="AudioTimelineSlider";export{m as default};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import t,{forwardRef as n,useState as c,useRef as s,useEffect as u,useCallback as i}from"react";import o from"wavesurfer.js";import l from"wavesurfer.js/dist/plugins/regions";import{useAudioPlayPause as a}from"../store/autoplay.wavefrom.js";import d from"./AudioTimeLineSlider.module.css.js";const m=n(({audio_file_name:n,matchedSegments:m,onTimeUpdate:g,peaks:p,duration:f,setIsAudioPlaying:v,setChevronIndex:h,chevronIndex:y=0,onToggleShowMatched:T,topicId:S,isVideoBuffering:b,playOnlyMatched:w=!0,showOnlyMatched:k,setShowOnlyMatched:_,customStyles:j},O)=>{const[N,P]=c(!1),[M,x]=c(!0),[$,I]=c(!1),[R,C]=c(!1),[D,q]=c(!1),[A,B]=c(!1),[E,W]=c(0),[H,L]=c(!1),[U,X]=c("00:00:00"),[z,F]=c("00:00:00"),[G,V]=c(0),[J,K]=c(!1),[Q,Y]=c(0),[Z,ee]=c("00:00:00"),re=s(null),te=s(!1),ne=s(null),ce=s(null),se=s(null),ue=s(!1),ie=s(null),oe=s(null),le=s(0),ae=s(0),[de,me]=c(!1),{playTopicId:ge,resetTrigger:pe,pendingPlayRequest:fe,setPendingPlayRequest:ve,triggerPlayForTopic:he}=a(),ye=s(null),Te=e=>{try{const[r,t,n,c]=e.split(":"),s=parseInt(r).toString().padStart(2,"0"),u=parseInt(t).toString().padStart(2,"0");return`${s}:${u}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};u(()=>{de&&fe===S&&(ve(null),setTimeout(()=>{he(S)},100))},[de,fe,S]),u(()=>{de&&ge===S&&(ye.current&&(ye.current.click(),P(!0)),pe())},[ge,S,de]),u(()=>(me(!0),()=>{me(!1)}),[]),u(()=>{if(!n||!ne.current||ue.current)return;x(!0);const e=l.create(),r=o.create({container:ne.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ce.current=r,se.current=r.registerPlugin(e),ue.current=!0,r.on("decode",()=>{L(!0),be();const e=Te(Se(f));F(e||"00:00:00")}),r.on("ready",()=>{x(!1)}),r.on("play",()=>{P(!0),v&&v(!0)}),r.on("pause",()=>{P(!1),v&&v(!1)}),r.on("finish",()=>{P(!1),v&&v(!1),$&&(I(!1),C(!1),q(!0))}),r.on("seeking",()=>{k||$&&!R&&we()}),r.on("error",()=>{x(!1)}),r.on("audioprocess",e=>{if(g&&g(e),!te.current){V(e/f*100)}const r=Te(Se(e));X(r||"00:00:00"),ae.current=e}),()=>{ie.current&&clearTimeout(ie.current),oe.current,r.destroy(),ue.current=!1,ce.current=null}},[n]),u(()=>{ce.current&&(ce.current.setOptions({interact:!k}),N&&ce.current.pause(),k?(I(!0),le.current=0):we(),T&&T(k))},[k]);const Se=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),c=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(c).padStart(3,"0")}`},be=i(()=>{se.current&&ce.current&&(se.current.clearRegions(),m.forEach((e,r)=>{se.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[m]),we=i(()=>{ce.current&&(I(!1),C(!1),q(!1),B(!1),ie.current&&(clearTimeout(ie.current),ie.current=null),oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null))},[]),ke=i(e=>{!k&&ce.current&&(ce.current.seekTo(e/f),ce.current.play(),P(!0),v&&v(!0),X(Te(Se(e))),I(!1),C(!1),q(!1))},[k,f,v,Se,Te]),_e=s(!1),je=i(()=>{if(_e.current)return;if(!ce.current||!m.length)return;_e.current=!0,ce.current.pause();const e=le.current+1;if(console.log("Current segment:",le.current),console.log("Next index calculated:",e),console.log("Total segments:",m.length),e<m.length){const r=m[e];X(Te(Se(r.start_time))),h&&h(e),W(e),le.current=e;const t=k?0:2e3;ie.current=setTimeout(()=>{_e.current=!1,setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),oe.current=null,je())};oe.current=t,ce.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),I(k),C(!0),q(!0),le.current=0,W(0),h&&h(0),m.length>0){const e=m[0];X(Te(Se(e.start_time))),ce.current.seekTo(e.start_time/f)}ce.current.isPlaying()&&ce.current.pause(),ie.current=setTimeout(()=>{_e.current=!1,ce.current&&ce.current.isPlaying()&&ce.current.pause()},k?0:2e3)}},[m,f,h,Se,k]),Oe=i(()=>{if(!ce.current||!m.length)return;const e=le.current;if(e>=m.length)return I(k),void q(!0);const r=m[e];W(e),X(Te(Se(r.start_time))),h&&h(e),setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),oe.current=null,je())};oe.current=t,ce.current.on("audioprocess",t)},100)},[m,f,h,je,Se,k]),Ne=i(()=>{if(!ce.current||!m.length)return;oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null);const e=m[le.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),oe.current=null,je())};oe.current=t,ce.current.on("audioprocess",t)},[m,je]),Pe=i(()=>{ce.current&&(k?N?(ce.current.pause(),C(!0)):R?(ce.current.play(),C(!1),Ne()):D?(q(!1),le.current=0,Oe()):Oe():N?ce.current.pause():ce.current.play())},[N,k,R,D,Oe,Ne]),Me=i(e=>{if(!ce.current||0===m.length)return;const r=N;let t;N&&(ce.current.pause(),C(!0)),oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null),t="next"===e?(E+1)%m.length:(E-1+m.length)%m.length,W(t),le.current=t;const n=m[t];ce.current.seekTo(n.start_time/f),h&&h(t),r&&k&&setTimeout(()=>{ce.current&&(ce.current.play(),C(!1),Ne())},50)},[E,m,h,f,N,k,Ne]),xe=i(e=>{ce.current&&(k||($&&we(),ce.current.seekTo(e/f)))},[f,$,we,k]);u(()=>{if(m.length>0&&void 0!==y&&ce.current&&!_e.current){if(y===le.current)return;const e=N;oe.current&&(ce.current.un("audioprocess",oe.current),oe.current=null);const r=m[y];r&&(ce.current.seekTo(r.start_time/f),W(y),le.current=y,e&&k&&setTimeout(()=>{ce.current&&Ne()},50))}},[y,f,m,k,N,Ne]);const $e=s(!1);u(()=>{b&&ce.current&&ce.current.isPlaying()&&($e.current=!0,ce.current.pause(),$&&C(!0)),!b&&$e.current&&ce.current&&ce.current&&(ce.current.play(),$e.current=!1,$&&R&&(C(!1),Ne()))},[b,$,R,Ne]),t.useImperativeHandle(O,()=>({waveSurfer:ce.current,navigateSegments:Me,togglePlayPause:Pe,getCurrentSegmentIndex:()=>E,setCurrentSegmentIndex:W,isPlayingSequence:()=>$,setPlayingSequence:e=>I(e),seekToTime:xe,showOnlyMatched:k,setShowOnlyMatched:e=>_(e),handleIndividualSegmentPlay:ke,setPlaybackRate:e=>{ce.current&&ce.current.setPlaybackRate(e)}}),[ce.current,Me,Pe,E,$,xe,k,ke]);return e("div",Object.assign({className:d.container,style:null==j?void 0:j.container},{children:r("div",Object.assign({className:d.inner,style:null==j?void 0:j.inner},{children:[e("div",Object.assign({className:d.waveformWrapper,style:null==j?void 0:j.waveformRow},{children:e("div",{ref:ne,className:d.waveform,style:null==j?void 0:j.waveform})})),e("div",Object.assign({className:d.timeWrapper,style:null==j?void 0:j.timeRow},{children:r("div",Object.assign({className:d.timeText,style:null==j?void 0:j.timeText},{children:[e("span",{children:U}),e("span",{children:"/"}),e("span",{children:z})]}))})),e("div",Object.assign({className:d.sliderRow,style:null==j?void 0:j.sliderRow},{children:r("div",Object.assign({className:`${d.slider} ${[d.sliderBase,k?d.sliderDisabled:d.sliderEnabled,d.sliderGroup].join(" ")}`,ref:re,style:null==j?void 0:j.slider,onClick:k?void 0:e=>{var r;if(k)return;const t=null===(r=re.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!ce.current)return;const n=(e.clientX-t.left)/t.width*100,c=n/100*f;V(n),ce.current.seekTo(c/f),$&&we()},onMouseMove:k?void 0:e=>{if(!k&&re.current){const r=re.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;K(!0),Y(t);const n=Te(Se(e/100*f));ee(n||"00:00:00")}}},onMouseLeave:()=>{K(!1)},onMouseDown:k?void 0:()=>{k||(te.current=!0)},onMouseUp:k?void 0:()=>{if(!k&&(te.current=!1,ce.current)){const e=G/100*f;ce.current.seekTo(e/f),$&&we()}}},{children:[e("div",Object.assign({className:d.track,style:null==j?void 0:j.sliderTrack},{children:e("div",{className:d.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})})),m.map((r,t)=>{const n=r.start_time/f*100,c=(r.end_time-r.start_time)/f*100,s=t===E&&w;return e("div",{className:`${d.segment} ${s?d.segmentActive:d.segmentInactive}`,style:{left:`${n}%`,width:`${c}%`,opacity:w&&!s?.3:1}},r.segment_id)}),e("div",{className:d.progress,style:Object.assign({width:`${G}%`},null==j?void 0:j.sliderProgress)}),e("div",Object.assign({className:d.thumb,style:Object.assign({left:`${G}%`},null==j?void 0:j.sliderThumb)},{children:e("div",{className:d.thumbDot,style:null==j?void 0:j.thumbDot})})),J&&!k&&e("div",Object.assign({className:d.tooltip,style:Object.assign({left:Q},null==j?void 0:j.timeTooltip)},{children:Z}))]}))}))]}))}))});m.displayName="AudioTimelineSlider";export{m as default};
2
2
  //# sourceMappingURL=AudioTimeLineSlider.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useRef as n,useEffect as r}from"react";import o from"./SegmentByWordsViral.module.css.js";const s=s=>{const{startTime:l,endTime:a,words:c,currentTime:d,content:m,containerStyle:u,customStyles:p}=s,f=n([]),g=n(null),h=i(l),v=i(a),y=d>=h&&d<=v;r(()=>{if(y){const e=c.findIndex(e=>d>=e.start&&d<=e.end);if(-1!==e&&f.current[e]){const t=f.current[e];if(t&&g.current){const e=g.current.getBoundingClientRect(),n=t.getBoundingClientRect(),r=n.top<e.top,o=n.bottom>e.bottom;(r||o)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[d,c,y]);return e("div",{className:o.segmentContainer,style:null==p?void 0:p.segmentContainer,children:e("div",{className:o.wrapper,style:null==p?void 0:p.wrapper,children:e("div",{className:o.segmentTextContainer,style:null==p?void 0:p.segmentTextContainer,ref:g,children:c&&0!==c.length?c.map((e,n)=>{const r=d>=e.end;return t("span",{ref:e=>f.current[n]=e,className:o.word,style:{fontWeight:r?"bold":"normal",...null==p?void 0:p.wordText},children:[e.text," "]},n)}):e("span",{className:o.word,style:null==p?void 0:p.word,children:m})})})})};function i(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)}export{s as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useRef as n,useEffect as r}from"react";import s from"./SegmentByWordsViral.module.css.js";const o=o=>{const{startTime:l,endTime:a,words:c,currentTime:d,content:m,containerStyle:u,customStyles:p}=o,g=n([]),f=n(null),b=i(l),h=i(a),v=d>=b&&d<=h;r(()=>{if(v){const e=c.findIndex(e=>d>=e.start&&d<=e.end);if(-1!==e&&g.current[e]){const t=g.current[e];if(t&&f.current){const e=f.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"})}}}},[d,c,v]);return e("div",Object.assign({className:s.segmentContainer,style:null==p?void 0:p.segmentContainer},{children:e("div",Object.assign({className:s.wrapper,style:null==p?void 0:p.wrapper},{children:e("div",Object.assign({className:s.segmentTextContainer,style:null==p?void 0:p.segmentTextContainer,ref:f},{children:c&&0!==c.length?c.map((e,n)=>{const r=d>=e.end;return t("span",Object.assign({ref:e=>g.current[n]=e,className:s.word,style:Object.assign({fontWeight:r?"bold":"normal"},null==p?void 0:p.wordText)},{children:[e.text," "]}),n)}):e("span",Object.assign({className:s.word,style:null==p?void 0:p.word},{children:m}))}))}))}))};function i(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)}export{o as default};
2
2
  //# sourceMappingURL=SegmentByWordsViral.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as l,useState as n,useEffect as r}from"react";import i from"video.js";import"video.js/dist/video-js.css";import t from"./AudioTimeLineSlider.js";import a from"../icons/MaximizeIcon.js";import s from"../icons/MinimizeIcon.js";import d from"../icons/PlayIcon.js";import c from"../icons/PauseIcon.js";import u from"../icons/PlaybackSpeedIcon.js";import p from"./videoPlayer.module.css.js";const m=({videoSrc:m,currentTime:v,isWaveformPlaying:y,onBufferingStart:g,onBufferingEnd:f,onVideoPlayPause:h,videoType:S="video/mp4",className:P="",onVideoLoadingStateChange:k,isUrlPending:V,isPeaksPending:b,signedUrl:I,AudioData:j,showOnlyMatched:J,setShowOnlyMatched:x,wavesurferRef:w,segments:N,setIsAudioPlaying:B,handleAudioTimeUpdate:C,customStyles:T,waveformStyles:M})=>{var R,A;const $=l(null),F=l(null),L=l(null),O=l(!1),U=l(!1),[z,E]=n(!1),[W]=n(!0),[D,H]=n(!0),[_,q]=n("1x"),[G,K]=n(!1),Q=()=>{K(e=>!e)};r(()=>{if(console.log("[VideoJS] useEffect triggered",{videoSrc:m}),!$.current)return void console.warn("[VideoJS] videoRef is null");console.log("[VideoJS] Initializing player"),H(!0),null==k||k(!0);const e=i($.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:m,type:S}]});return e.on("loadstart",()=>{console.log("[VideoJS] loadstart"),H(!0),null==k||k(!0)}),e.on("canplay",()=>{console.log("[VideoJS] canplay",{isVideoLoading:D,isBuffering:O.current}),D&&(console.log("[VideoJS] Video loading finished"),H(!1),null==k||k(!1)),O.current&&(console.log("[VideoJS] Buffering ended"),O.current=!1,setTimeout(()=>{console.log("[VideoJS] onBufferingEnd()"),f()},100))}),e.on("waiting",()=>{console.log("[VideoJS] waiting (buffering start)"),O.current||(O.current=!0,U.current=y,console.log("[VideoJS] Buffering started",{wasPlaying:U.current}),g())}),e.on("error",()=>{console.error("[VideoJS] Player error",e.error()),H(!1),null==k||k(!1)}),F.current=e,console.log("[VideoJS] Player ready"),()=>{var e;console.log("[VideoJS] Disposing player"),null===(e=F.current)||void 0===e||e.dispose(),F.current=null}},[m]),r(()=>{if(!F.current)return;const e=F.current.currentTime();Math.abs(e-v)>.2&&F.current.currentTime(v)},[v]),r(()=>{F.current&&!O.current&&(y&&F.current.paused()?F.current.play().catch(()=>{}):y||F.current.paused()||F.current.pause())},[y]),r(()=>{var e,o,l;const n=parseFloat(_.replace("x",""));null===(e=F.current)||void 0===e||e.playbackRate(n),null===(l=null===(o=w.current)||void 0===o?void 0:o.setPlaybackRate)||void 0===l||l.call(o,n)},[_]);return e("div",{ref:L,className:`${p.container} ${P}`,style:null==T?void 0:T.container,children:[o("video",{ref:$,className:`video-js vjs-big-play-centered ${p.video}`,style:null==T?void 0:T.video,playsInline:!0,muted:!0}),e("div",{className:`${p.controlsWrapper} ${W?p.visible:p.hidden}`,style:null==T?void 0:T.controlsWrapper,children:[G&&e("div",{className:p.speedSelector,style:null==T?void 0:T.speedSelector,children:[o("div",{className:p.speedHeader,style:null==T?void 0:T.speedHeader,children:"Playback Speed"}),["0.5x","1x","1.5x","2x"].map(e=>o("button",{onClick:()=>(e=>{var o,l,n;q(e),K(!1);const r=parseFloat(e.replace("x",""));null===(o=F.current)||void 0===o||o.playbackRate(r),null===(n=null===(l=w.current)||void 0===l?void 0:l.setPlaybackRate)||void 0===n||n.call(l,r)})(e),className:p.speedItem,style:null==T?void 0:T.speedItem,children:e},e))]}),e("div",{className:p.controlBar,style:null==T?void 0:T.controlBar,children:[o("div",{children:o("button",y?{onClick:e=>{e.stopPropagation(),null==h||h(!1)},style:null==T?void 0:T.pauseIcon,children:o(c,{})}:{onClick:e=>{e.stopPropagation(),null==h||h(!0)},style:null==T?void 0:T.playIcon,children:o(d,{})})}),e("div",{className:p.rightControls,style:null==T?void 0:T.rightControls,children:["1x"!==_?o("span",{onClick:Q,children:_}):o("button",{onClick:Q,style:null==T?void 0:T.playBackSpeedIcon,children:o(u,{})}),o("button",{onClick:e=>{var o,l,n;e.stopPropagation(),L.current&&(z?null===(n=document.exitFullscreen)||void 0===n||n.call(document):null===(l=(o=L.current).requestFullscreen)||void 0===l||l.call(o))},children:o(z?s:a,{})})]})]}),o("div",{className:p.timeline,style:null==T?void 0:T.timeline,children:V||b?o("div",{className:p.loader,style:null==T?void 0:T.loader,children:o("span",{children:"Loading audio-timeline peaks..."})}):I&&j&&o(t,{ref:w,audio_file_name:I,peaks:null!==(R=j.peaks)&&void 0!==R?R:[],duration:null!==(A=j.duration)&&void 0!==A?A:0,matchedSegments:N,showOnlyMatched:J,setShowOnlyMatched:x,setIsAudioPlaying:B,onTimeUpdate:C,onToggleShowMatched:()=>{},customStyles:M})})]})]})};export{m as default};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as n,useState as l,useEffect as i}from"react";import r from"video.js";import"video.js/dist/video-js.css";import s from"./AudioTimeLineSlider.js";import t from"../icons/MaximizeIcon.js";import a from"../icons/MinimizeIcon.js";import c from"../icons/PlayIcon.js";import d from"../icons/PauseIcon.js";import u from"../icons/PlaybackSpeedIcon.js";import p from"./videoPlayer.module.css.js";const m=({videoSrc:m,currentTime:g,isWaveformPlaying:v,onBufferingStart:y,onBufferingEnd:f,onVideoPlayPause:h,videoType:S="video/mp4",className:b="",onVideoLoadingStateChange:j,isUrlPending:P,isPeaksPending:O,signedUrl:k,AudioData:V,showOnlyMatched:I,setShowOnlyMatched:J,wavesurferRef:x,segments:w,setIsAudioPlaying:N,handleAudioTimeUpdate:B,customStyles:C,waveformStyles:T})=>{var M,R;const A=n(null),$=n(null),F=n(null),L=n(!1),U=n(!1),[z,E]=l(!1),[W]=l(!0),[D,H]=l(!0),[_,q]=l("1x"),[G,K]=l(!1),Q=()=>{K(e=>!e)};i(()=>{if(console.log("[VideoJS] useEffect triggered",{videoSrc:m}),!A.current)return void console.warn("[VideoJS] videoRef is null");console.log("[VideoJS] Initializing player"),H(!0),null==j||j(!0);const e=r(A.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:m,type:S}]});return e.on("loadstart",()=>{console.log("[VideoJS] loadstart"),H(!0),null==j||j(!0)}),e.on("canplay",()=>{console.log("[VideoJS] canplay",{isVideoLoading:D,isBuffering:L.current}),D&&(console.log("[VideoJS] Video loading finished"),H(!1),null==j||j(!1)),L.current&&(console.log("[VideoJS] Buffering ended"),L.current=!1,setTimeout(()=>{console.log("[VideoJS] onBufferingEnd()"),f()},100))}),e.on("waiting",()=>{console.log("[VideoJS] waiting (buffering start)"),L.current||(L.current=!0,U.current=v,console.log("[VideoJS] Buffering started",{wasPlaying:U.current}),y())}),e.on("error",()=>{console.error("[VideoJS] Player error",e.error()),H(!1),null==j||j(!1)}),$.current=e,console.log("[VideoJS] Player ready"),()=>{var e;console.log("[VideoJS] Disposing player"),null===(e=$.current)||void 0===e||e.dispose(),$.current=null}},[m]),i(()=>{if(!$.current)return;const e=$.current.currentTime();Math.abs(e-g)>.2&&$.current.currentTime(g)},[g]),i(()=>{$.current&&!L.current&&(v&&$.current.paused()?$.current.play().catch(()=>{}):v||$.current.paused()||$.current.pause())},[v]),i(()=>{var e,o,n;const l=parseFloat(_.replace("x",""));null===(e=$.current)||void 0===e||e.playbackRate(l),null===(n=null===(o=x.current)||void 0===o?void 0:o.setPlaybackRate)||void 0===n||n.call(o,l)},[_]);return e("div",Object.assign({ref:F,className:`${p.container} ${b}`,style:null==C?void 0:C.container},{children:[o("video",{ref:A,className:`video-js vjs-big-play-centered ${p.video}`,style:null==C?void 0:C.video,playsInline:!0,muted:!0}),e("div",Object.assign({className:`${p.controlsWrapper} ${W?p.visible:p.hidden}`,style:null==C?void 0:C.controlsWrapper},{children:[G&&e("div",Object.assign({className:p.speedSelector,style:null==C?void 0:C.speedSelector},{children:[o("div",Object.assign({className:p.speedHeader,style:null==C?void 0:C.speedHeader},{children:"Playback Speed"})),["0.5x","1x","1.5x","2x"].map(e=>o("button",Object.assign({onClick:()=>(e=>{var o,n,l;q(e),K(!1);const i=parseFloat(e.replace("x",""));null===(o=$.current)||void 0===o||o.playbackRate(i),null===(l=null===(n=x.current)||void 0===n?void 0:n.setPlaybackRate)||void 0===l||l.call(n,i)})(e),className:p.speedItem,style:null==C?void 0:C.speedItem},{children:e}),e))]})),e("div",Object.assign({className:p.controlBar,style:null==C?void 0:C.controlBar},{children:[o("div",{children:o("button",v?Object.assign({onClick:e=>{e.stopPropagation(),null==h||h(!1)},style:null==C?void 0:C.pauseIcon},{children:o(d,{})}):Object.assign({onClick:e=>{e.stopPropagation(),null==h||h(!0)},style:null==C?void 0:C.playIcon},{children:o(c,{})}))}),e("div",Object.assign({className:p.rightControls,style:null==C?void 0:C.rightControls},{children:["1x"!==_?o("span",Object.assign({onClick:Q},{children:_})):o("button",Object.assign({onClick:Q,style:null==C?void 0:C.playBackSpeedIcon},{children:o(u,{})})),o("button",Object.assign({onClick:e=>{var o,n,l;e.stopPropagation(),F.current&&(z?null===(l=document.exitFullscreen)||void 0===l||l.call(document):null===(n=(o=F.current).requestFullscreen)||void 0===n||n.call(o))}},{children:o(z?a:t,{})}))]}))]})),o("div",Object.assign({className:p.timeline,style:null==C?void 0:C.timeline},{children:P||O?o("div",Object.assign({className:p.loader,style:null==C?void 0:C.loader},{children:o("span",{children:"Loading audio-timeline peaks..."})})):k&&V&&o(s,{ref:x,audio_file_name:k,peaks:null!==(M=V.peaks)&&void 0!==M?M:[],duration:null!==(R=V.duration)&&void 0!==R?R:0,matchedSegments:w,showOnlyMatched:I,setShowOnlyMatched:J,setIsAudioPlaying:N,onTimeUpdate:B,onToggleShowMatched:()=>{},customStyles:T})}))]}))]}))};export{m as default};
2
2
  //# sourceMappingURL=videoPlayer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:h=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[t("path",{d:"M2 10v3"}),t("path",{d:"M6 6v11"}),t("path",{d:"M10 3v18"}),t("path",{d:"M14 8v7"}),t("path",{d:"M18 5v13"}),t("path",{d:"M22 10v3"})]})});export{r as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:h=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:h,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},{children:[t("path",{d:"M2 10v3"}),t("path",{d:"M6 6v11"}),t("path",{d:"M10 3v18"}),t("path",{d:"M14 8v7"}),t("path",{d:"M18 5v13"}),t("path",{d:"M22 10v3"})]}))});export{r as default};
2
2
  //# sourceMappingURL=AudioLinesIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})});export{h as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]}))});export{h as default};
2
2
  //# sourceMappingURL=MaximizeIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),t("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),t("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),t("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]})});export{h as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),t("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),t("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),t("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}))});export{h as default};
2
2
  //# sourceMappingURL=MinimizeIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),t("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]})});export{r as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),t("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]}))});export{r as default};
2
2
  //# sourceMappingURL=PauseIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";const e=({height:e=24,width:o=24})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t("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"})});export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";const e=({height:e=24,width:o=24})=>t("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:t("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"})}));export{e as default};
2
2
  //# sourceMappingURL=PlayIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as C,jsx as i}from"react/jsx-runtime";const t=()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none",children:[C("g",{"clip-path":"url(#clip0_3246_74403)",children:[i("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("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("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("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("defs",{children:i("clipPath",{id:"clip0_3246_74403",children:i("rect",{width:"12",height:"12",fill:"white"})})})]});export{t as default};
1
+ import{jsxs as C,jsx as i}from"react/jsx-runtime";const t=()=>C("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none"},{children:[C("g",Object.assign({"clip-path":"url(#clip0_3246_74403)"},{children:[i("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("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("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("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("defs",{children:i("clipPath",Object.assign({id:"clip0_3246_74403"},{children:i("rect",{width:"12",height:"12",fill:"white"})}))})]}));export{t as default};
2
2
  //# sourceMappingURL=PlaybackSpeedIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("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"}),t("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]})});export{r as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("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"}),t("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]}))});export{r as default};
2
2
  //# sourceMappingURL=VideoIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import n,{forwardRef as u,useState as c,useRef as o,useEffect as l,useCallback as s}from"react";import i from"wavesurfer.js";import a from"wavesurfer.js/dist/plugins/regions";import d from"./searchwaveform.module.css.js";import m from"./icons/PauseIcon.js";import p from"./icons/PlayIcon.js";import{useAudioPlayPause as g}from"./store/autoplay.wavefrom.js";const v=u(({audio_file_name:u,showOnlyMatched:v,setShowOnlyMatched:h,matchedSegments:y,onTimeUpdate:f,currentAudioTime:T,peaks:S,duration:w,setIsAudioPlaying:N,setChevronIndex:P,chevronIndex:k=0,onToggleShowMatched:I,topicId:M,isVideoBuffering:_,playOnlyMatched:R=!0,customStyles:b},x)=>{const[C,$]=c(!1),[B,j]=c(!0),[O,A]=c(!1),[D,q]=c(!1),[W,E]=c(!1),[F,z]=c(!1),[H,L]=c(0),[U,X]=c(!1),[V,G]=c("00:00:00"),[J,K]=c("00:00:00"),[Q,Y]=c(0),[Z,ee]=c(!1),[re,te]=c(0),[ne,ue]=c("00:00:00"),ce=o(null),oe=o(!1),le=o(null),se=o(null),ie=o(null),ae=o(!1),de=o(null),me=o(null),pe=o(0),ge=o(0),[ve,he]=c(!1),{playTopicId:ye,resetTrigger:fe,pendingPlayRequest:Te,setPendingPlayRequest:Se,triggerPlayForTopic:we}=g(),Ne=o(null),Pe=e=>{try{const[r,t,n,u]=e.split(":"),c=parseInt(r).toString().padStart(2,"0"),o=parseInt(t).toString().padStart(2,"0");return`${c}:${o}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};l(()=>{null==h||h(R)},[R]),l(()=>{ve&&Te===M&&(Se(null),setTimeout(()=>{we(M)},100))},[ve,Te,M]),l(()=>{ve&&ye===M&&(Ne.current&&(Ne.current.click(),$(!0)),fe())},[ye,M,ve]),l(()=>(he(!0),()=>{he(!1)}),[]),l(()=>{if(!u||!le.current||ae.current)return;j(!0);const e=a.create(),r=i.create({container:le.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(S)],duration:w,url:u});return se.current=r,ie.current=r.registerPlugin(e),ae.current=!0,r.on("decode",()=>{X(!0),Ie();const e=Pe(ke(w));K(e||"00:00:00")}),r.on("ready",()=>{j(!1)}),r.on("play",()=>{$(!0),N&&N(!0)}),r.on("pause",()=>{$(!1),N&&N(!1)}),r.on("finish",()=>{$(!1),N&&N(!1),O&&(A(!1),q(!1),E(!0))}),r.on("seeking",()=>{v||O&&!D&&Me()}),r.on("error",()=>{j(!1)}),r.on("audioprocess",e=>{if(f&&f(e),!oe.current){Y(e/w*100)}const r=Pe(ke(e));G(r||"00:00:00"),ge.current=e}),()=>{de.current&&clearTimeout(de.current),me.current,r.destroy(),ae.current=!1,se.current=null}},[u]),l(()=>{se.current&&(se.current.setOptions({interact:!v}),C&&se.current.pause(),v?(A(!0),pe.current=0):Me(),I&&I(v))},[v]);const ke=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),u=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(u).padStart(3,"0")}`},Ie=s(()=>{ie.current&&se.current&&(ie.current.clearRegions(),y.forEach((e,r)=>{ie.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})}))},[y]),Me=s(()=>{se.current&&(A(!1),q(!1),E(!1),z(!1),de.current&&(clearTimeout(de.current),de.current=null),me.current&&(se.current.un("audioprocess",me.current),me.current=null))},[]),_e=s(e=>{!v&&se.current&&(se.current.seekTo(e/w),se.current.play(),$(!0),N&&N(!0),G(Pe(ke(e))),A(!1),q(!1),E(!1))},[v,w,N,ke,Pe]),Re=o(!1),be=s(()=>{if(Re.current)return;if(!se.current||!y.length)return;Re.current=!0,se.current.pause();const e=pe.current+1;if(console.log("Current segment:",pe.current),console.log("Next index calculated:",e),console.log("Total segments:",y.length),e<y.length){const r=y[e];G(Pe(ke(r.start_time))),P&&P(e),L(e),pe.current=e;const t=v?0:2e3;de.current=setTimeout(()=>{Re.current=!1,setTimeout(()=>{if(!se.current)return;se.current.seekTo(r.start_time/w),se.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=se.current)||void 0===n||n.un("audioprocess",t),me.current=null,be())};me.current=t,se.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),A(v),q(!0),E(!0),pe.current=0,L(0),P&&P(0),y.length>0){const e=y[0];G(Pe(ke(e.start_time))),se.current.seekTo(e.start_time/w)}se.current.isPlaying()&&se.current.pause(),de.current=setTimeout(()=>{Re.current=!1,se.current&&se.current.isPlaying()&&se.current.pause()},v?0:2e3)}},[y,w,P,ke,v]),xe=s(()=>{if(!se.current||!y.length)return;const e=pe.current;if(e>=y.length)return A(v),void E(!0);const r=y[e];L(e),G(Pe(ke(r.start_time))),P&&P(e),setTimeout(()=>{if(!se.current)return;se.current.seekTo(r.start_time/w),se.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=se.current)||void 0===n||n.un("audioprocess",t),me.current=null,be())};me.current=t,se.current.on("audioprocess",t)},100)},[y,w,P,be,ke,v]),Ce=s(()=>{if(!se.current||!y.length)return;me.current&&(se.current.un("audioprocess",me.current),me.current=null);const e=y[pe.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=se.current)||void 0===n||n.un("audioprocess",t),me.current=null,be())};me.current=t,se.current.on("audioprocess",t)},[y,be]),$e=s(()=>{se.current&&(v?C?(se.current.pause(),q(!0)):D?(se.current.play(),q(!1),Ce()):W?(E(!1),pe.current=0,xe()):xe():C?se.current.pause():se.current.play())},[C,v,D,W,xe,Ce]),Be=s(e=>{if(!se.current||0===y.length)return;const r=C;let t;C&&(se.current.pause(),q(!0)),me.current&&(se.current.un("audioprocess",me.current),me.current=null),t="next"===e?(H+1)%y.length:(H-1+y.length)%y.length,L(t),pe.current=t;const n=y[t];se.current.seekTo(n.start_time/w),P&&P(t),r&&v&&setTimeout(()=>{se.current&&(se.current.play(),q(!1),Ce())},50)},[H,y,P,w,C,v,Ce]),je=s(e=>{se.current&&(v||(O&&Me(),se.current.seekTo(e/w)))},[w,O,Me,v]);l(()=>{if(y.length>0&&void 0!==k&&se.current&&!Re.current){if(k===pe.current)return;const e=C;me.current&&(se.current.un("audioprocess",me.current),me.current=null);const r=y[k];r&&(se.current.seekTo(r.start_time/w),L(k),pe.current=k,e&&v&&setTimeout(()=>{se.current&&Ce()},50))}},[k,w,y,v,C,Ce]);const Oe=o(!1);l(()=>{_&&se.current&&se.current.isPlaying()&&(Oe.current=!0,se.current.pause(),O&&q(!0)),!_&&Oe.current&&se.current&&se.current&&(se.current.play(),Oe.current=!1,O&&D&&(q(!1),Ce()))},[_,O,D,Ce]),n.useImperativeHandle(x,()=>({waveSurfer:se.current,navigateSegments:Be,togglePlayPause:$e,getCurrentSegmentIndex:()=>H,setCurrentSegmentIndex:L,isPlayingSequence:()=>O,setPlayingSequence:e=>A(e),seekToTime:je,showOnlyMatched:v,setShowOnlyMatched:e=>null==h?void 0:h(e),handleIndividualSegmentPlay:_e}),[se.current,Be,$e,H,O,je,v,_e]);return e("div",{className:d.container,style:null==b?void 0:b.container,children:r("div",{className:d.inner,style:null==b?void 0:b.inner,children:[r("div",{className:d.waveformRow,style:null==b?void 0:b.waveformRow,children:[e("div",{className:d.playButtonWrapper,style:null==b?void 0:b.playButtonWrapper,children:e("button",{ref:Ne,onClick:$e,className:d.playButton,style:null==b?void 0:b.playButton,title:C?"Pause":"Play",disabled:B,children:B?e(t,{children:"Loading..."}):e("div",C?{className:d.icon,style:null==b?void 0:b.pauseIcon,children:e(m,{})}:{className:d.icon,style:null==b?void 0:b.playIcon,children:e(p,{})})})}),e("div",{ref:le,className:d.waveform,style:null==b?void 0:b.waveform})]}),r("div",{className:d.sliderRow,style:null==b?void 0:b.sliderRow,children:[e("div",{className:d.buttonSpacer,style:null==b?void 0:b.buttonSpacer}),r("div",{className:`${d.slider}\n ${d.group}\n ${v?d.disabled:d.interactive}`,ref:ce,style:null==b?void 0:b.slider,onClick:v?void 0:e=>{var r;if(v)return;const t=null===(r=ce.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!se.current)return;const n=(e.clientX-t.left)/t.width*100,u=n/100*w;Y(n),se.current.seekTo(u/w),O&&Me()},onMouseMove:v?void 0:e=>{if(!v&&ce.current){const r=ce.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;ee(!0),te(t);const n=Pe(ke(e/100*w));ue(n||"00:00:00")}}},onMouseLeave:()=>{ee(!1)},onMouseDown:v?void 0:()=>{v||(oe.current=!0)},onMouseUp:v?void 0:()=>{if(!v&&(oe.current=!1,se.current)){const e=Q/100*w;se.current.seekTo(e/w),O&&Me()}},children:[e("div",{className:d.sliderTrack,style:null==b?void 0:b.sliderTrack}),e("div",{className:d.sliderProgress,style:{width:`${Q}%`,...null==b?void 0:b.sliderProgress}}),e("div",{className:d.sliderThumb,style:{left:`${Q}%`,...null==b?void 0:b.sliderThumb}}),Z&&!v&&e("div",{className:d.timeTooltip,style:{left:re,...null==b?void 0:b.timeTooltip},children:ne})]})]}),r("div",{className:d.timeRow,style:null==b?void 0:b.timeRow,children:[e("div",{className:d.buttonSpacer,style:null==b?void 0:b.buttonSpacer}),r("div",{className:d.timeText,style:null==b?void 0:b.timeText,children:[e("span",{children:V}),e("span",{children:"/"}),e("span",{children:J})]})]})]})})});v.displayName="SearchWaveform";export{v as default};
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import n,{forwardRef as c,useState as u,useRef as s,useEffect as o,useCallback as i}from"react";import l from"wavesurfer.js";import a from"wavesurfer.js/dist/plugins/regions";import d from"./searchwaveform.module.css.js";import m from"./icons/PauseIcon.js";import g from"./icons/PlayIcon.js";import{useAudioPlayPause as p}from"./store/autoplay.wavefrom.js";const v=c(({audio_file_name:c,showOnlyMatched:v,setShowOnlyMatched:h,matchedSegments:y,onTimeUpdate:f,currentAudioTime:T,peaks:S,duration:b,setIsAudioPlaying:w,setChevronIndex:j,chevronIndex:O=0,onToggleShowMatched:N,topicId:P,isVideoBuffering:k,playOnlyMatched:I=!0,customStyles:M},_)=>{const[R,x]=u(!1),[C,$]=u(!0),[B,A]=u(!1),[D,q]=u(!1),[W,E]=u(!1),[F,z]=u(!1),[H,L]=u(0),[U,X]=u(!1),[V,G]=u("00:00:00"),[J,K]=u("00:00:00"),[Q,Y]=u(0),[Z,ee]=u(!1),[re,te]=u(0),[ne,ce]=u("00:00:00"),ue=s(null),se=s(!1),oe=s(null),ie=s(null),le=s(null),ae=s(!1),de=s(null),me=s(null),ge=s(0),pe=s(0),[ve,he]=u(!1),{playTopicId:ye,resetTrigger:fe,pendingPlayRequest:Te,setPendingPlayRequest:Se,triggerPlayForTopic:be}=p(),we=s(null),je=e=>{try{const[r,t,n,c]=e.split(":"),u=parseInt(r).toString().padStart(2,"0"),s=parseInt(t).toString().padStart(2,"0");return`${u}:${s}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};o(()=>{null==h||h(I)},[I]),o(()=>{ve&&Te===P&&(Se(null),setTimeout(()=>{be(P)},100))},[ve,Te,P]),o(()=>{ve&&ye===P&&(we.current&&(we.current.click(),x(!0)),fe())},[ye,P,ve]),o(()=>(he(!0),()=>{he(!1)}),[]),o(()=>{if(!c||!oe.current||ae.current)return;$(!0);const e=a.create(),r=l.create({container:oe.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(S)],duration:b,url:c});return ie.current=r,le.current=r.registerPlugin(e),ae.current=!0,r.on("decode",()=>{X(!0),Ne();const e=je(Oe(b));K(e||"00:00:00")}),r.on("ready",()=>{$(!1)}),r.on("play",()=>{x(!0),w&&w(!0)}),r.on("pause",()=>{x(!1),w&&w(!1)}),r.on("finish",()=>{x(!1),w&&w(!1),B&&(A(!1),q(!1),E(!0))}),r.on("seeking",()=>{v||B&&!D&&Pe()}),r.on("error",()=>{$(!1)}),r.on("audioprocess",e=>{if(f&&f(e),!se.current){Y(e/b*100)}const r=je(Oe(e));G(r||"00:00:00"),pe.current=e}),()=>{de.current&&clearTimeout(de.current),me.current,r.destroy(),ae.current=!1,ie.current=null}},[c]),o(()=>{ie.current&&(ie.current.setOptions({interact:!v}),R&&ie.current.pause(),v?(A(!0),ge.current=0):Pe(),N&&N(v))},[v]);const Oe=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),c=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(c).padStart(3,"0")}`},Ne=i(()=>{le.current&&ie.current&&(le.current.clearRegions(),y.forEach((e,r)=>{le.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})}))},[y]),Pe=i(()=>{ie.current&&(A(!1),q(!1),E(!1),z(!1),de.current&&(clearTimeout(de.current),de.current=null),me.current&&(ie.current.un("audioprocess",me.current),me.current=null))},[]),ke=i(e=>{!v&&ie.current&&(ie.current.seekTo(e/b),ie.current.play(),x(!0),w&&w(!0),G(je(Oe(e))),A(!1),q(!1),E(!1))},[v,b,w,Oe,je]),Ie=s(!1),Me=i(()=>{if(Ie.current)return;if(!ie.current||!y.length)return;Ie.current=!0,ie.current.pause();const e=ge.current+1;if(console.log("Current segment:",ge.current),console.log("Next index calculated:",e),console.log("Total segments:",y.length),e<y.length){const r=y[e];G(je(Oe(r.start_time))),j&&j(e),L(e),ge.current=e;const t=v?0:2e3;de.current=setTimeout(()=>{Ie.current=!1,setTimeout(()=>{if(!ie.current)return;ie.current.seekTo(r.start_time/b),ie.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ie.current)||void 0===n||n.un("audioprocess",t),me.current=null,Me())};me.current=t,ie.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),A(v),q(!0),E(!0),ge.current=0,L(0),j&&j(0),y.length>0){const e=y[0];G(je(Oe(e.start_time))),ie.current.seekTo(e.start_time/b)}ie.current.isPlaying()&&ie.current.pause(),de.current=setTimeout(()=>{Ie.current=!1,ie.current&&ie.current.isPlaying()&&ie.current.pause()},v?0:2e3)}},[y,b,j,Oe,v]),_e=i(()=>{if(!ie.current||!y.length)return;const e=ge.current;if(e>=y.length)return A(v),void E(!0);const r=y[e];L(e),G(je(Oe(r.start_time))),j&&j(e),setTimeout(()=>{if(!ie.current)return;ie.current.seekTo(r.start_time/b),ie.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ie.current)||void 0===n||n.un("audioprocess",t),me.current=null,Me())};me.current=t,ie.current.on("audioprocess",t)},100)},[y,b,j,Me,Oe,v]),Re=i(()=>{if(!ie.current||!y.length)return;me.current&&(ie.current.un("audioprocess",me.current),me.current=null);const e=y[ge.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=ie.current)||void 0===n||n.un("audioprocess",t),me.current=null,Me())};me.current=t,ie.current.on("audioprocess",t)},[y,Me]),xe=i(()=>{ie.current&&(v?R?(ie.current.pause(),q(!0)):D?(ie.current.play(),q(!1),Re()):W?(E(!1),ge.current=0,_e()):_e():R?ie.current.pause():ie.current.play())},[R,v,D,W,_e,Re]),Ce=i(e=>{if(!ie.current||0===y.length)return;const r=R;let t;R&&(ie.current.pause(),q(!0)),me.current&&(ie.current.un("audioprocess",me.current),me.current=null),t="next"===e?(H+1)%y.length:(H-1+y.length)%y.length,L(t),ge.current=t;const n=y[t];ie.current.seekTo(n.start_time/b),j&&j(t),r&&v&&setTimeout(()=>{ie.current&&(ie.current.play(),q(!1),Re())},50)},[H,y,j,b,R,v,Re]),$e=i(e=>{ie.current&&(v||(B&&Pe(),ie.current.seekTo(e/b)))},[b,B,Pe,v]);o(()=>{if(y.length>0&&void 0!==O&&ie.current&&!Ie.current){if(O===ge.current)return;const e=R;me.current&&(ie.current.un("audioprocess",me.current),me.current=null);const r=y[O];r&&(ie.current.seekTo(r.start_time/b),L(O),ge.current=O,e&&v&&setTimeout(()=>{ie.current&&Re()},50))}},[O,b,y,v,R,Re]);const Be=s(!1);o(()=>{k&&ie.current&&ie.current.isPlaying()&&(Be.current=!0,ie.current.pause(),B&&q(!0)),!k&&Be.current&&ie.current&&ie.current&&(ie.current.play(),Be.current=!1,B&&D&&(q(!1),Re()))},[k,B,D,Re]),n.useImperativeHandle(_,()=>({waveSurfer:ie.current,navigateSegments:Ce,togglePlayPause:xe,getCurrentSegmentIndex:()=>H,setCurrentSegmentIndex:L,isPlayingSequence:()=>B,setPlayingSequence:e=>A(e),seekToTime:$e,showOnlyMatched:v,setShowOnlyMatched:e=>null==h?void 0:h(e),handleIndividualSegmentPlay:ke}),[ie.current,Ce,xe,H,B,$e,v,ke]);return e("div",Object.assign({className:d.container,style:null==M?void 0:M.container},{children:r("div",Object.assign({className:d.inner,style:null==M?void 0:M.inner},{children:[r("div",Object.assign({className:d.waveformRow,style:null==M?void 0:M.waveformRow},{children:[e("div",Object.assign({className:d.playButtonWrapper,style:null==M?void 0:M.playButtonWrapper},{children:e("button",Object.assign({ref:we,onClick:xe,className:d.playButton,style:null==M?void 0:M.playButton,title:R?"Pause":"Play",disabled:C},{children:C?e(t,{children:"Loading..."}):e("div",R?Object.assign({className:d.icon,style:null==M?void 0:M.pauseIcon},{children:e(m,{})}):Object.assign({className:d.icon,style:null==M?void 0:M.playIcon},{children:e(g,{})}))}))})),e("div",{ref:oe,className:d.waveform,style:null==M?void 0:M.waveform})]})),r("div",Object.assign({className:d.sliderRow,style:null==M?void 0:M.sliderRow},{children:[e("div",{className:d.buttonSpacer,style:null==M?void 0:M.buttonSpacer}),r("div",Object.assign({className:`${d.slider}\n ${d.group}\n ${v?d.disabled:d.interactive}`,ref:ue,style:null==M?void 0:M.slider,onClick:v?void 0:e=>{var r;if(v)return;const t=null===(r=ue.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!ie.current)return;const n=(e.clientX-t.left)/t.width*100,c=n/100*b;Y(n),ie.current.seekTo(c/b),B&&Pe()},onMouseMove:v?void 0:e=>{if(!v&&ue.current){const r=ue.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;ee(!0),te(t);const n=je(Oe(e/100*b));ce(n||"00:00:00")}}},onMouseLeave:()=>{ee(!1)},onMouseDown:v?void 0:()=>{v||(se.current=!0)},onMouseUp:v?void 0:()=>{if(!v&&(se.current=!1,ie.current)){const e=Q/100*b;ie.current.seekTo(e/b),B&&Pe()}}},{children:[e("div",{className:d.sliderTrack,style:null==M?void 0:M.sliderTrack}),e("div",{className:d.sliderProgress,style:Object.assign({width:`${Q}%`},null==M?void 0:M.sliderProgress)}),e("div",{className:d.sliderThumb,style:Object.assign({left:`${Q}%`},null==M?void 0:M.sliderThumb)}),Z&&!v&&e("div",Object.assign({className:d.timeTooltip,style:Object.assign({left:re},null==M?void 0:M.timeTooltip)},{children:ne}))]}))]})),r("div",Object.assign({className:d.timeRow,style:null==M?void 0:M.timeRow},{children:[e("div",{className:d.buttonSpacer,style:null==M?void 0:M.buttonSpacer}),r("div",Object.assign({className:d.timeText,style:null==M?void 0:M.timeText},{children:[e("span",{children:V}),e("span",{children:"/"}),e("span",{children:J})]}))]}))]}))}))});v.displayName="SearchWaveform";export{v as default};
2
2
  //# sourceMappingURL=searchwaveform.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useState as n,useContext as t}from"react";const i=r(void 0),l=({children:r})=>{const[t,l]=n(null),[o,u]=n(null),[a,d]=n(null);return e(i.Provider,{value:{playTopicId:t,pendingPlayRequest:o,currentPlayingSpeakerId:a,triggerPlayForTopic:e=>l(e),setPendingPlayRequest:u,setCurrentPlayingSpeakerId:d,resetTrigger:()=>l(null)},children:r})},o=()=>{const e=t(i);if(!e)throw new Error("useAudioPlayPause must be used within an AudioPlayProvider");return e};export{l as AudioPlayProvider,o as useAudioPlayPause};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useState as n,useContext as t}from"react";const i=r(void 0),l=({children:r})=>{const[t,l]=n(null),[o,u]=n(null),[a,s]=n(null);return e(i.Provider,Object.assign({value:{playTopicId:t,pendingPlayRequest:o,currentPlayingSpeakerId:a,triggerPlayForTopic:e=>l(e),setPendingPlayRequest:u,setCurrentPlayingSpeakerId:s,resetTrigger:()=>l(null)}},{children:r}))},o=()=>{const e=t(i);if(!e)throw new Error("useAudioPlayPause must be used within an AudioPlayProvider");return e};export{l as AudioPlayProvider,o as useAudioPlayPause};
2
2
  //# sourceMappingURL=autoplay.wavefrom.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,Fragment as n}from"react/jsx-runtime";import o from"../../../../CitationRenderer/CitationRenderer.js";import i from"../../ai-reasoning/BigEnoughComponent.js";const e=e=>{var r,c,a;const l=(null===(r=e.customIcons)||void 0===r?void 0:r.bigEnoughCitationIcon)||t(n,{});return t(o,{inLineCitation:!0,citationTitle:e.title,citationId:`big-enough-${e.citation.citation_number}`,citationComponent:t(i,{customStyles:e.customStyles,big_enough_decision_factors:e.citation}),chevronDownComponent:l,chevronUpComponent:l,styles:{pillButton:{margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none",...null===(c=e.customStyles)||void 0===c?void 0:c.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",...null===(a=e.customStyles)||void 0===a?void 0:a.content}}})};export{e as default};
1
+ import{jsx as t,Fragment as n}from"react/jsx-runtime";import i from"../../../../CitationRenderer/CitationRenderer.js";import o from"../../ai-reasoning/BigEnoughComponent.js";const e=e=>{var r,c,a;const s=(null===(r=e.customIcons)||void 0===r?void 0:r.bigEnoughCitationIcon)||t(n,{});return t(i,{inLineCitation:!0,citationTitle:e.title,citationId:`big-enough-${e.citation.citation_number}`,citationComponent:t(o,{customStyles:e.customStyles,big_enough_decision_factors:e.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===(c=e.customStyles)||void 0===c?void 0:c.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(a=e.customStyles)||void 0===a?void 0:a.content)}})};export{e as default};
2
2
  //# sourceMappingURL=BigEnoughCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as n,Fragment as e}from"react/jsx-runtime";import{ChatCitation as i,CitationRenderer as o}from"@e-llm-studio/citation";import r from"dayjs";import{stripHtmlAndMetadata as l}from"../../../utils/helpers.js";import c,{memo as a,useState as s,useRef as u,useCallback as d,useMemo as m,useEffect as p}from"react";const h=t=>{var n,e;return null!==(e=null!==(n=t.message)&&void 0!==n?n:t.content)&&void 0!==e?e:""},v=t=>{var n;return null!==(n=t.highlighted_text)&&void 0!==n?n:""},f=(t,n)=>{if(t.length!==n.length)return!1;for(let e=0;e<t.length;e+=1){const i=t[e],o=n[e];if(i.role!==o.role)return!1;if(h(i)!==h(o))return!1;if(v(i)!==v(o))return!1;if((i.timeStamp?String(i.timeStamp):"")!==(o.timeStamp?String(o.timeStamp):""))return!1}return!0},y=t=>{var n;return null==t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(y).join(""):c.isValidElement(t)?y(null===(n=t.props)||void 0===n?void 0:n.children):""};var g=a(c=>{var a,y;const[g,C]=s(0),S=u(null),b=d(()=>{var t;null===(t=c.onCitationClick)||void 0===t||t.call(c,c.isTable)},[c.onCitationClick,c.isTable]),w=c.chatCitationProps,{chatContainer:k,rootContainer:x,...I}=null!=w?w:{},A=u(null),T=u([]);A.current&&f(A.current,c.chatHistory)||(A.current=c.chatHistory,T.current=c.chatHistory.map(t=>{const n=h(t),e=v(t);return{...t,message:l(n),timeStamp:r(t.timeStamp),highlighted_text:l(e)}}));const H=T.current,D=m(()=>({relevanceScore:100,...x}),[x]),E=m(()=>({summarizedTab:{chip:{show:!1,isActive:!1}},detailedTab:{chip:{isActive:!0}},...k,chatData:H}),[k,H]),F=m(()=>{var t,n;return{pillButton:{fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none",...null===(t=c.customStyles)||void 0===t?void 0:t.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",color:"black",...null===(n=c.customStyles)||void 0===n?void 0:n.content}}},[c.customStyles]),j=m(()=>t(i,{rootContainer:D,chatContainer:E,...I}),[D,E]);p(()=>{if(!g)return;const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`;const n=window.requestAnimationFrame(()=>{const t=S.current,n=null==t?void 0:t.querySelector(".lucide-maximize-2, svg[class*='maximize']"),e=null==n?void 0:n.parentElement;null==e||e.click()});return()=>{window.cancelAnimationFrame(n),document.body.style.overflow="auto",document.body.style.paddingRight="0px"}},[g]);const z=d(t=>{t.preventDefault(),t.stopPropagation(),b(),C(t=>t+1)},[b]);return!0===c.openInFullscreenOnClick?n(e,{children:[t("span",{onClick:z,style:F.pillButton,role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||z(t)},children:c.title}),g>0&&t("div",{ref:S,"aria-hidden":"true",style:{position:"fixed",left:-1e4,top:-1e4,width:1,height:1,opacity:0,pointerEvents:"none",overflow:"hidden"},children:j},g)]}):t("span",{onClickCapture:b,children:t(o,{inLineCitation:!0,citationTitle:c.title,chevronUpComponent:null===(a=c.customIcon)||void 0===a?void 0:a.chevronUp,chevronDownComponent:null===(y=c.customIcon)||void 0===y?void 0:y.chevronDown,citationComponent:j,styles:F})})},(t,n)=>t.isTable===n.isTable&&(t.onCitationClick===n.onCitationClick&&(t.customIcon===n.customIcon&&(t.customStyles===n.customStyles&&(t.chatCitationProps===n.chatCitationProps&&(t.openInFullscreenOnClick===n.openInFullscreenOnClick&&(!!f(t.chatHistory,n.chatHistory)&&y(t.title)===y(n.title))))))));export{g as default};
1
+ import{__rest as t}from"tslib";import{jsx as n,jsxs as e,Fragment as i}from"react/jsx-runtime";import{ChatCitation as o,CitationRenderer as r}from"@e-llm-studio/citation";import l from"dayjs";import{stripHtmlAndMetadata as c}from"../../../utils/helpers.js";import a,{memo as s,useState as u,useRef as d,useCallback as m,useMemo as p,useEffect as h}from"react";const g=t=>{var n,e;return null!==(e=null!==(n=t.message)&&void 0!==n?n:t.content)&&void 0!==e?e:""},v=t=>{var n;return null!==(n=t.highlighted_text)&&void 0!==n?n:""},f=(t,n)=>{if(t.length!==n.length)return!1;for(let e=0;e<t.length;e+=1){const i=t[e],o=n[e];if(i.role!==o.role)return!1;if(g(i)!==g(o))return!1;if(v(i)!==v(o))return!1;if((i.timeStamp?String(i.timeStamp):"")!==(o.timeStamp?String(o.timeStamp):""))return!1}return!0},y=t=>{var n;return null==t?"":"string"==typeof t||"number"==typeof t?String(t):Array.isArray(t)?t.map(y).join(""):a.isValidElement(t)?y(null===(n=t.props)||void 0===n?void 0:n.children):""};var b=s(a=>{var s,y;const[b,C]=u(0),S=d(null),w=m(()=>{var t;null===(t=a.onCitationClick)||void 0===t||t.call(a,a.isTable)},[a.onCitationClick,a.isTable]),j=a.chatCitationProps,k=null!=j?j:{},{chatContainer:x,rootContainer:O}=k,I=t(k,["chatContainer","rootContainer"]),A=d(null),T=d([]);A.current&&f(A.current,a.chatHistory)||(A.current=a.chatHistory,T.current=a.chatHistory.map(t=>{const n=g(t),e=v(t);return Object.assign(Object.assign({},t),{message:c(n),timeStamp:l(t.timeStamp),highlighted_text:c(e)})}));const H=T.current,D=p(()=>Object.assign({relevanceScore:100},O),[O]),E=p(()=>Object.assign(Object.assign({summarizedTab:{chip:{show:!1,isActive:!1}},detailedTab:{chip:{isActive:!0}}},x),{chatData:H}),[x,H]),F=p(()=>{var t,n;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=a.customStyles)||void 0===t?void 0:t.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",color:"black"},null===(n=a.customStyles)||void 0===n?void 0:n.content)}},[a.customStyles]),z=p(()=>n(o,Object.assign({rootContainer:D,chatContainer:E},I)),[D,E]);h(()=>{if(!b)return;const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`;const n=window.requestAnimationFrame(()=>{const t=S.current,n=null==t?void 0:t.querySelector(".lucide-maximize-2, svg[class*='maximize']"),e=null==n?void 0:n.parentElement;null==e||e.click()});return()=>{window.cancelAnimationFrame(n),document.body.style.overflow="auto",document.body.style.paddingRight="0px"}},[b]);const P=m(t=>{t.preventDefault(),t.stopPropagation(),w(),C(t=>t+1)},[w]);return!0===a.openInFullscreenOnClick?e(i,{children:[n("span",Object.assign({onClick:P,style:F.pillButton,role:"button",tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||P(t)}},{children:a.title})),b>0&&n("div",Object.assign({ref:S,"aria-hidden":"true",style:{position:"fixed",left:-1e4,top:-1e4,width:1,height:1,opacity:0,pointerEvents:"none",overflow:"hidden"}},{children:z}),b)]}):n("span",Object.assign({onClickCapture:w},{children:n(r,{inLineCitation:!0,citationTitle:a.title,chevronUpComponent:null===(s=a.customIcon)||void 0===s?void 0:s.chevronUp,chevronDownComponent:null===(y=a.customIcon)||void 0===y?void 0:y.chevronDown,citationComponent:z,styles:F})}))},(t,n)=>t.isTable===n.isTable&&(t.onCitationClick===n.onCitationClick&&(t.customIcon===n.customIcon&&(t.customStyles===n.customStyles&&(t.chatCitationProps===n.chatCitationProps&&(t.openInFullscreenOnClick===n.openInFullscreenOnClick&&(!!f(t.chatHistory,n.chatHistory)&&y(t.title)===y(n.title))))))));export{b as default};
2
2
  //# sourceMappingURL=ChatCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as C,jsxs as l}from"react/jsx-runtime";const t=t=>C("div",{className:"mb-2",children:l("svg",{...t,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C("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("path",{d:"M7 2V4L14.4726 4V2L7 2Z",fill:"#5C75F4"}),C("path",{d:"M18 19H20V13H18V19Z",fill:"#5C75F4"}),C("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("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"})]})});export{t as default};
1
+ import{jsx as C,jsxs as l}from"react/jsx-runtime";const t=t=>C("div",Object.assign({className:"mb-2"},{children:l("svg",Object.assign({},t,{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[C("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("path",{d:"M7 2V4L14.4726 4V2L7 2Z",fill:"#5C75F4"}),C("path",{d:"M18 19H20V13H18V19Z",fill:"#5C75F4"}),C("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("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"})]}))}));export{t as default};
2
2
  //# sourceMappingURL=DocumentCitationIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useEffect as i}from"react";import l from"./FileCitationContent.module.css.js";import{useRequirementAI as o}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{renderCitationAIConfidenceDisplay as n}from"../../../shared/CitationAIConfidenceDisplay.js";const s=s=>{var a,d,c,u,p,v;const{queryClient:m,useGetSignedUrlQuery:h,useGetSignedUrlMutation:f}=o().apiCachingConfig,y=["getSignedUrl",s.gsUtilPath],{data:g}=h(s.gsUtilPath,y),{mutate:U,isPending:C}=f(s.gsUtilPath),[S,w]=r(null),[P,k]=r(null);i(()=>{import("@react-pdf-viewer/core").then(e=>{w({Worker:e.Worker,Viewer:e.Viewer})}).catch(()=>{k("@react-pdf-viewer/core is not installed. Run: npm install @react-pdf-viewer/core")})},[]),i(()=>{if(!s.gsUtilPath)return void console.error("error","Error","Please provide valid gsUtilPath.");m.getQueryData(y)||C||U({gsUtilPath:s.gsUtilPath})},[s.gsUtilPath,m,y,C]);return e("div",{className:l.bookCitationContentContainer,style:null===(a=s.customStyles)||void 0===a?void 0:a.container,children:[e("div",{className:l.header,style:null===(d=s.customStyles)||void 0===d?void 0:d.header,children:[t("h2",{className:l.title,style:null===(c=s.customStyles)||void 0===c?void 0:c.title,children:s.title}),n(s.relevanceScore,!0,null===(u=s.customStyles)||void 0===u?void 0:u.confidenceDisplay)]}),t("div",{className:l.previewContainer,style:null===(p=s.customStyles)||void 0===p?void 0:p.previewContainer,children:"book_citation_pdf"===s.fileType&&t("div",{className:l.pdfWrapper,style:null===(v=s.customStyles)||void 0===v?void 0:v.pdfWrapper,children:!C&&g&&(e=>{var r;if(P)return t("div",{style:{color:"red",fontSize:"12px",...null===(r=s.customStyles)||void 0===r?void 0:r.errorText},children:P});if(!S)return t("div",{children:"Loading PDF viewer..."});const{Worker:i,Viewer:l}=S;return t(i,{workerUrl:"https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",children:t(l,{fileUrl:e})})})(g)})})]})};export{s as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as i,useEffect as r}from"react";import s from"./FileCitationContent.module.css.js";import{useRequirementAI as l}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{renderCitationAIConfidenceDisplay as o}from"../../../shared/CitationAIConfidenceDisplay.js";const n=n=>{var a,d,c,u,p,v;const{queryClient:m,useGetSignedUrlQuery:g,useGetSignedUrlMutation:h}=l().apiCachingConfig,f=["getSignedUrl",n.gsUtilPath],{data:y}=g(n.gsUtilPath,f),{mutate:j,isPending:U}=h(n.gsUtilPath),[C,S]=i(null),[b,w]=i(null);r(()=>{import("@react-pdf-viewer/core").then(e=>{S({Worker:e.Worker,Viewer:e.Viewer})}).catch(()=>{w("@react-pdf-viewer/core is not installed. Run: npm install @react-pdf-viewer/core")})},[]),r(()=>{if(!n.gsUtilPath)return void console.error("error","Error","Please provide valid gsUtilPath.");m.getQueryData(f)||U||j({gsUtilPath:n.gsUtilPath})},[n.gsUtilPath,m,f,U]);return e("div",Object.assign({className:s.bookCitationContentContainer,style:null===(a=n.customStyles)||void 0===a?void 0:a.container},{children:[e("div",Object.assign({className:s.header,style:null===(d=n.customStyles)||void 0===d?void 0:d.header},{children:[t("h2",Object.assign({className:s.title,style:null===(c=n.customStyles)||void 0===c?void 0:c.title},{children:n.title})),o(n.relevanceScore,!0,null===(u=n.customStyles)||void 0===u?void 0:u.confidenceDisplay)]})),t("div",Object.assign({className:s.previewContainer,style:null===(p=n.customStyles)||void 0===p?void 0:p.previewContainer},{children:"book_citation_pdf"===n.fileType&&t("div",Object.assign({className:s.pdfWrapper,style:null===(v=n.customStyles)||void 0===v?void 0:v.pdfWrapper},{children:!U&&y&&(e=>{var i;if(b)return t("div",Object.assign({style:Object.assign({color:"red",fontSize:"12px"},null===(i=n.customStyles)||void 0===i?void 0:i.errorText)},{children:b}));if(!C)return t("div",{children:"Loading PDF viewer..."});const{Worker:r,Viewer:s}=C;return t(r,Object.assign({workerUrl:"https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js"},{children:t(s,{fileUrl:e})}))})(y)}))}))]}))};export{n as default};
2
2
  //# sourceMappingURL=FileCitationContent.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import o from"../../../../CitationRenderer/CitationRenderer.js";import i from"./FileCitationContent.js";import n from"./DocumentCitationIcon.js";const e=e=>{var a,c,l,r,d,s,m,u;const p=(null===(a=e.customIcons)||void 0===a?void 0:a.fileCitationIcon)||t(n,{});return t(o,{inLineCitation:!0,citationTitle:e.title,citationId:`file-citation-${e.citation.citation_number}`,citationComponent:t(i,{title:"book_citation_doc"===e.citation.customMetadata.type||"book_citation_pdf"===e.citation.customMetadata.type?`${null!==(l=null===(c=e.citation.customMetadata)||void 0===c?void 0:c.file_name)&&void 0!==l?l:""}`:"",gsUtilPath:"book_citation_doc"===e.citation.customMetadata.type||"book_citation_pdf"===e.citation.customMetadata.type?null===(r=e.citation.customMetadata)||void 0===r?void 0:r.gcs_upload_url:"",fileType:null===(d=e.citation.customMetadata)||void 0===d?void 0:d.type,relevanceScore:null===(s=e.citation.customMetadata)||void 0===s?void 0:s.relevance_score,customStyles:e.customStyles}),chevronDownComponent:p,chevronUpComponent:p,styles:{pillButton:{fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none",...null===(m=e.customStyles)||void 0===m?void 0:m.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",...null===(u=e.customStyles)||void 0===u?void 0:u.content}}})};export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import o from"../../../../CitationRenderer/CitationRenderer.js";import i from"./FileCitationContent.js";import n from"./DocumentCitationIcon.js";const e=e=>{var a,c,l,r,d,s,m,u;const p=(null===(a=e.customIcons)||void 0===a?void 0:a.fileCitationIcon)||t(n,{});return t(o,{inLineCitation:!0,citationTitle:e.title,citationId:`file-citation-${e.citation.citation_number}`,citationComponent:t(i,{title:"book_citation_doc"===e.citation.customMetadata.type||"book_citation_pdf"===e.citation.customMetadata.type?`${null!==(l=null===(c=e.citation.customMetadata)||void 0===c?void 0:c.file_name)&&void 0!==l?l:""}`:"",gsUtilPath:"book_citation_doc"===e.citation.customMetadata.type||"book_citation_pdf"===e.citation.customMetadata.type?null===(r=e.citation.customMetadata)||void 0===r?void 0:r.gcs_upload_url:"",fileType:null===(d=e.citation.customMetadata)||void 0===d?void 0:d.type,relevanceScore:null===(s=e.citation.customMetadata)||void 0===s?void 0:s.relevance_score,customStyles:e.customStyles}),chevronDownComponent:p,chevronUpComponent:p,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===(m=e.customStyles)||void 0===m?void 0:m.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(u=e.customStyles)||void 0===u?void 0:u.content)}})};export{e as default};
2
2
  //# sourceMappingURL=FileCitationRender.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import n from"../../../../CitationRenderer/CitationRenderer.js";import i from"../web-citation/WebCitationIcon.js";import o from"./GptWebcitationPanel.js";const e=e=>{var r,c,a;const l=(null===(r=e.customIcons)||void 0===r?void 0:r.webCitationIcon)||t(i,{});return t(n,{inLineCitation:!0,citationTitle:e.title,citationId:`gpt-web-citation-${e.citation.citation_number}`,citationComponent:t(o,{citation:e.citation,content:e.content}),chevronDownComponent:l,chevronUpComponent:l,styles:{pillButton:{margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none",...null===(c=e.customStyles)||void 0===c?void 0:c.pill},citationContent:{width:"100%",background:"transparent",color:"black",minHeight:"10px",height:"fit-content",...null===(a=e.customStyles)||void 0===a?void 0:a.content}}})};export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import n from"../../../../CitationRenderer/CitationRenderer.js";import i from"../web-citation/WebCitationIcon.js";import o from"./GptWebcitationPanel.js";const e=e=>{var c,r,a;const l=(null===(c=e.customIcons)||void 0===c?void 0:c.webCitationIcon)||t(i,{});return t(n,{inLineCitation:!0,citationTitle:e.title,citationId:`gpt-web-citation-${e.citation.citation_number}`,citationComponent:t(o,{citation:e.citation,content:e.content}),chevronDownComponent:l,chevronUpComponent:l,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=e.customStyles)||void 0===r?void 0:r.pill),citationContent:Object.assign({width:"100%",background:"transparent",color:"black",minHeight:"10px",height:"fit-content"},null===(a=e.customStyles)||void 0===a?void 0:a.content)}})};export{e as default};
2
2
  //# sourceMappingURL=GptWebCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import{CitationType as i,GptWebCitation as o}from"@e-llm-studio/citation";import{useState as n,useMemo as e,useEffect as a}from"react";import{ChevronDown as l,ChevronUp as r,Maximize2 as c,X as u,ExternalLink as d}from"lucide-react";import{useRequirementAI as s}from"../../RequirementAIWrapper/RequirementAIWrapper.js";const p={MaximizeIcon:c,ExternalLinkIcon:d},v=({citation:d,content:v})=>{var m,C;const[b,g]=n(),h=null===(m=null==d?void 0:d.customMetadata)||void 0===m?void 0:m.value,w=(null==h?void 0:h.paraphrase)||(null==h?void 0:h.label)||"Web Citation";const f=e(()=>`Source: Web Citation > ${w}`,[w]),x=e(()=>function(t){if(t)try{const i=new URL(t).hostname.replace(/^www\./i,""),o=i.split(".")[0];return o?o.charAt(0).toUpperCase()+o.slice(1):i}catch(t){return}}(null==h?void 0:h.citationUrl),[null==h?void 0:h.citationUrl]),[W,I]=n(!0),[y,T]=n("pending"),U=W,{getGptWebCitation:G,gptWebCitationPartialPayload:M}=s().apiCachingConfig,{displayMode:P}=(null===(C=s().citationConfig)||void 0===C?void 0:C.gptWeb)||{},E={item:{text:"",dataSource:(null==h?void 0:h.text)||"",paraphrase:(null==h?void 0:h.paraphrase)||""},headerTitle:(null==h?void 0:h.label)||"",index:0,iconsConfig:{ChevronDownIcon:l,ChevronUpIcon:r,MaximizeIcon:c,CloseIcon:u}},z=async()=>{var t;try{I(!0);const i={...M,citationId:null==h?void 0:h.citation_uuid,citationUrl:null==h?void 0:h.citationUrl,content:v||(null==h?void 0:h.text),citationType:null==h?void 0:h.citationType,citatioNumber:Number(null===(t=null==d?void 0:d.customMetadata)||void 0===t?void 0:t.citation_number)};console.log("Generating GPT-Web Citation with payload:",i);const o=await(null==G?void 0:G(i));g(null==o?void 0:o.data),T("success")}catch(t){T("error"),console.error("Error in GPT-Web Citation",t)}};a(()=>{P!==i.GPT&&(P!==i.GPT_WEB||U)&&z()},[P,U]);return t(o,{gptCitation:E,defaultCitationUrl:(null==h?void 0:h.citationUrl)||"",citationType:P||"web",webCitationData:b,sourceLabel:f,learnedFrom:x,showWebCitation:U,webCitationStatus:y,onGenerateWebCitation:z,onToggleCitationView:()=>{W?I(!1):z()},showExpandImageButton:!0,showGptMaximizeButton:!0,iconsConfig:p,isFixedHeight:!1})};export{v as default};
1
+ import{__awaiter as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import{CitationType as o,GptWebCitation as n}from"@e-llm-studio/citation";import{useState as e,useMemo as a,useEffect as l}from"react";import{ChevronDown as r,ChevronUp as c,Maximize2 as d,X as u,ExternalLink as s}from"lucide-react";import{useRequirementAI as p}from"../../RequirementAIWrapper/RequirementAIWrapper.js";const v={MaximizeIcon:d,ExternalLinkIcon:s},m=({citation:s,content:m})=>{var C,b;const[g,h]=e(),f=null===(C=null==s?void 0:s.customMetadata)||void 0===C?void 0:C.value,w=(null==f?void 0:f.paraphrase)||(null==f?void 0:f.label)||"Web Citation";const x=a(()=>`Source: Web Citation > ${w}`,[w]),W=a(()=>function(t){if(t)try{const i=new URL(t).hostname.replace(/^www\./i,""),o=i.split(".")[0];return o?o.charAt(0).toUpperCase()+o.slice(1):i}catch(t){return}}(null==f?void 0:f.citationUrl),[null==f?void 0:f.citationUrl]),[I,y]=e(!0),[T,U]=e("pending"),G=I,{getGptWebCitation:M,gptWebCitationPartialPayload:P}=p().apiCachingConfig,{displayMode:j}=(null===(b=p().citationConfig)||void 0===b?void 0:b.gptWeb)||{},E={item:{text:"",dataSource:(null==f?void 0:f.text)||"",paraphrase:(null==f?void 0:f.paraphrase)||""},headerTitle:(null==f?void 0:f.label)||"",index:0,iconsConfig:{ChevronDownIcon:r,ChevronUpIcon:c,MaximizeIcon:d,CloseIcon:u}},z=()=>t(void 0,void 0,void 0,function*(){var t;try{y(!0);const i=Object.assign(Object.assign({},P),{citationId:null==f?void 0:f.citation_uuid,citationUrl:null==f?void 0:f.citationUrl,content:m||(null==f?void 0:f.text),citationType:null==f?void 0:f.citationType,citatioNumber:Number(null===(t=null==s?void 0:s.customMetadata)||void 0===t?void 0:t.citation_number)});console.log("Generating GPT-Web Citation with payload:",i);const o=yield null==M?void 0:M(i);h(null==o?void 0:o.data),U("success")}catch(t){U("error"),console.error("Error in GPT-Web Citation",t)}});l(()=>{j!==o.GPT&&(j!==o.GPT_WEB||G)&&z()},[j,G]);return i(n,{gptCitation:E,defaultCitationUrl:(null==f?void 0:f.citationUrl)||"",citationType:j||"web",webCitationData:g,sourceLabel:x,learnedFrom:W,showWebCitation:G,webCitationStatus:T,onGenerateWebCitation:z,onToggleCitationView:()=>{I?y(!1):z()},showExpandImageButton:!0,showGptMaximizeButton:!0,iconsConfig:v,isFixedHeight:!1})};export{m as default};
2
2
  //# sourceMappingURL=GptWebcitationPanel.js.map
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEffect as i}from"react";import{CircularProgress as s}from"@mui/material";import l from"./ImageCitationContent.module.css.js";import{renderCitationAIConfidenceDisplay as r}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as a}from"../../RequirementAIWrapper/RequirementAIWrapper.js";const o=o=>{var n,d,c,m,u,g,h;const{queryClient:p,useGetSignedUrlQuery:v,useGetSignedUrlMutation:y}=a().apiCachingConfig,f=["getSignedUrl",o.gsUtilPath],{data:U}=v(o.gsUtilPath,f),{mutate:S,isPending:C}=y(o.gsUtilPath);return i(()=>{if(!o.gsUtilPath)return void console.error("Error -> ImageCitationContent: gsUtilPath is required to fetch signed URL");p.getQueryData(f)||S({gsUtilPath:o.gsUtilPath})},[o.gsUtilPath]),e("div",{className:l.container,style:null===(n=o.customStyles)||void 0===n?void 0:n.container,children:[e("div",{className:l.header,style:null===(d=o.customStyles)||void 0===d?void 0:d.header,children:[t("h2",{className:l.title,style:null===(c=o.customStyles)||void 0===c?void 0:c.title,children:"Visual Reference"}),r(o.relevanceScore,!0,null===(m=o.customStyles)||void 0===m?void 0:m.confidenceDisplay)]}),C?e("div",{className:l.loadingWrapper,style:null===(u=o.customStyles)||void 0===u?void 0:u.loadingWrapper,children:[t(s,{size:48,thickness:4,sx:{color:"#4F85FF","& .MuiCircularProgress-circle":{strokeLinecap:"round"}}}),t("span",{className:l.loadingText,style:null===(g=o.customStyles)||void 0===g?void 0:g.loadingText,children:"Loading Image..."})]}):U&&t("img",{className:l.image,src:U,alt:"images",style:null===(h=o.customStyles)||void 0===h?void 0:h.image})]})};export{o as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEffect as i}from"react";import{CircularProgress as s}from"@mui/material";import a from"./ImageCitationContent.module.css.js";import{renderCitationAIConfidenceDisplay as l}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as r}from"../../RequirementAIWrapper/RequirementAIWrapper.js";const o=o=>{var n,c,d,m,g,u,h;const{queryClient:p,useGetSignedUrlQuery:v,useGetSignedUrlMutation:y}=r().apiCachingConfig,f=["getSignedUrl",o.gsUtilPath],{data:U}=v(o.gsUtilPath,f),{mutate:S,isPending:C}=y(o.gsUtilPath);return i(()=>{if(!o.gsUtilPath)return void console.error("Error -> ImageCitationContent: gsUtilPath is required to fetch signed URL");p.getQueryData(f)||S({gsUtilPath:o.gsUtilPath})},[o.gsUtilPath]),e("div",Object.assign({className:a.container,style:null===(n=o.customStyles)||void 0===n?void 0:n.container},{children:[e("div",Object.assign({className:a.header,style:null===(c=o.customStyles)||void 0===c?void 0:c.header},{children:[t("h2",Object.assign({className:a.title,style:null===(d=o.customStyles)||void 0===d?void 0:d.title},{children:"Visual Reference"})),l(o.relevanceScore,!0,null===(m=o.customStyles)||void 0===m?void 0:m.confidenceDisplay)]})),C?e("div",Object.assign({className:a.loadingWrapper,style:null===(g=o.customStyles)||void 0===g?void 0:g.loadingWrapper},{children:[t(s,{size:48,thickness:4,sx:{color:"#4F85FF","& .MuiCircularProgress-circle":{strokeLinecap:"round"}}}),t("span",Object.assign({className:a.loadingText,style:null===(u=o.customStyles)||void 0===u?void 0:u.loadingText},{children:"Loading Image..."}))]})):U&&t("img",{className:a.image,src:U,alt:"images",style:null===(h=o.customStyles)||void 0===h?void 0:h.image})]}))};export{o as default};
2
2
  //# sourceMappingURL=ImageCitationContent.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as C}from"react/jsx-runtime";const t=t=>C("div",{className:"mb-2",children:C("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:C("path",{d:"M18 15.0001V19.0001C18 19.5501 17.55 20.0001 17 20.0001H5C4.45 20.0001 4 19.5501 4 19.0001V7.00015C4 6.45015 4.45 6.00015 5 6.00015H8.02C8.57 6.00015 9.02 5.55015 9.02 5.00015C9.02 4.45015 8.57 4.00015 8.02 4.00015H4C2.9 4.00015 2 4.90015 2 6.00015V20.0001C2 21.1001 2.9 22.0001 4 22.0001H18C19.1 22.0001 20 21.1001 20 20.0001V15.0001C20 14.4501 19.55 14.0001 19 14.0001C18.45 14.0001 18 14.4501 18 15.0001ZM15.5 18.0001H6.52C6.1 18.0001 5.87 17.5201 6.13 17.1901L7.87 14.9601C7.9161 14.9011 7.97486 14.8532 8.04195 14.82C8.10903 14.7867 8.18273 14.769 8.2576 14.768C8.33247 14.7671 8.4066 14.7829 8.47452 14.8144C8.54243 14.846 8.6024 14.8923 8.65 14.9501L10.21 16.8301L12.56 13.8101C12.76 13.5501 13.16 13.5501 13.35 13.8201L15.9 17.2101C16.15 17.5301 15.91 18.0001 15.5 18.0001ZM19.3 8.89015C19.78 8.12015 20.05 7.22015 19.99 6.23015C19.86 4.08015 18.15 2.26015 16.02 2.03015C15.3894 1.95679 14.7504 2.01768 14.145 2.20883C13.5397 2.39999 12.9816 2.71707 12.5075 3.13925C12.0333 3.56142 11.6539 4.07914 11.3941 4.65839C11.1343 5.23764 11 5.8653 11 6.50015C11 8.99015 13.01 11.0001 15.49 11.0001C16.37 11.0001 17.19 10.7401 17.88 10.3001L20.29 12.7101C20.68 13.1001 21.32 13.1001 21.71 12.7101C22.1 12.3201 22.1 11.6801 21.71 11.2901L19.3 8.89015ZM15.5 9.00015C14.837 9.00015 14.2011 8.73675 13.7322 8.26791C13.2634 7.79907 13 7.16319 13 6.50015C13 5.8371 13.2634 5.20122 13.7322 4.73238C14.2011 4.26354 14.837 4.00015 15.5 4.00015C16.163 4.00015 16.7989 4.26354 17.2678 4.73238C17.7366 5.20122 18 5.8371 18 6.50015C18 7.16319 17.7366 7.79907 17.2678 8.26791C16.7989 8.73675 16.163 9.00015 15.5 9.00015Z",fill:"#5C75F4"})})});export{t as default};
1
+ import{jsx as C}from"react/jsx-runtime";const t=t=>C("div",Object.assign({className:"mb-2"},{children:C("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:C("path",{d:"M18 15.0001V19.0001C18 19.5501 17.55 20.0001 17 20.0001H5C4.45 20.0001 4 19.5501 4 19.0001V7.00015C4 6.45015 4.45 6.00015 5 6.00015H8.02C8.57 6.00015 9.02 5.55015 9.02 5.00015C9.02 4.45015 8.57 4.00015 8.02 4.00015H4C2.9 4.00015 2 4.90015 2 6.00015V20.0001C2 21.1001 2.9 22.0001 4 22.0001H18C19.1 22.0001 20 21.1001 20 20.0001V15.0001C20 14.4501 19.55 14.0001 19 14.0001C18.45 14.0001 18 14.4501 18 15.0001ZM15.5 18.0001H6.52C6.1 18.0001 5.87 17.5201 6.13 17.1901L7.87 14.9601C7.9161 14.9011 7.97486 14.8532 8.04195 14.82C8.10903 14.7867 8.18273 14.769 8.2576 14.768C8.33247 14.7671 8.4066 14.7829 8.47452 14.8144C8.54243 14.846 8.6024 14.8923 8.65 14.9501L10.21 16.8301L12.56 13.8101C12.76 13.5501 13.16 13.5501 13.35 13.8201L15.9 17.2101C16.15 17.5301 15.91 18.0001 15.5 18.0001ZM19.3 8.89015C19.78 8.12015 20.05 7.22015 19.99 6.23015C19.86 4.08015 18.15 2.26015 16.02 2.03015C15.3894 1.95679 14.7504 2.01768 14.145 2.20883C13.5397 2.39999 12.9816 2.71707 12.5075 3.13925C12.0333 3.56142 11.6539 4.07914 11.3941 4.65839C11.1343 5.23764 11 5.8653 11 6.50015C11 8.99015 13.01 11.0001 15.49 11.0001C16.37 11.0001 17.19 10.7401 17.88 10.3001L20.29 12.7101C20.68 13.1001 21.32 13.1001 21.71 12.7101C22.1 12.3201 22.1 11.6801 21.71 11.2901L19.3 8.89015ZM15.5 9.00015C14.837 9.00015 14.2011 8.73675 13.7322 8.26791C13.2634 7.79907 13 7.16319 13 6.50015C13 5.8371 13.2634 5.20122 13.7322 4.73238C14.2011 4.26354 14.837 4.00015 15.5 4.00015C16.163 4.00015 16.7989 4.26354 17.2678 4.73238C17.7366 5.20122 18 5.8371 18 6.50015C18 7.16319 17.7366 7.79907 17.2678 8.26791C16.7989 8.73675 16.163 9.00015 15.5 9.00015Z",fill:"#5C75F4"})}))}));export{t as default};
2
2
  //# sourceMappingURL=ImageCitationIcon.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import i from"../../../../CitationRenderer/CitationRenderer.js";import o from"./ImageCitationContent.js";import n from"./ImageCitationIcon.js";const e=e=>{var a,c,r,l;const m=(null===(a=e.customIcons)||void 0===a?void 0:a.imageCitationIcon)||t(n,{});return t(i,{inLineCitation:!0,citationTitle:e.title,citationId:`image-citation-${e.citation.citation_number}`,citationComponent:t(o,{gsUtilPath:"image_citation"===e.citation.customMetadata.type?e.citation.customMetadata.gs_util_url:"",relevanceScore:null===(c=e.citation.customMetadata)||void 0===c?void 0:c.relevance_score,customStyles:e.customStyles}),chevronDownComponent:m,chevronUpComponent:m,styles:{pillButton:{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=e.customStyles)||void 0===r?void 0:r.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",...null===(l=e.customStyles)||void 0===l?void 0:l.content}}})};export{e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import i from"../../../../CitationRenderer/CitationRenderer.js";import o from"./ImageCitationContent.js";import n from"./ImageCitationIcon.js";const e=e=>{var a,c,r,l;const s=(null===(a=e.customIcons)||void 0===a?void 0:a.imageCitationIcon)||t(n,{});return t(i,{inLineCitation:!0,citationTitle:e.title,citationId:`image-citation-${e.citation.citation_number}`,citationComponent:t(o,{gsUtilPath:"image_citation"===e.citation.customMetadata.type?e.citation.customMetadata.gs_util_url:"",relevanceScore:null===(c=e.citation.customMetadata)||void 0===c?void 0:c.relevance_score,customStyles:e.customStyles}),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=e.customStyles)||void 0===r?void 0:r.pill),citationContent:Object.assign({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(l=e.customStyles)||void 0===l?void 0:l.content)}})};export{e as default};
2
2
  //# sourceMappingURL=ImageCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import{NotebookIcon as t,MessageCircleIcon as l}from"lucide-react";import s,{useRef as i}from"react";import{AppModIcon as o}from"../appmod-citation/icons/AppmodIcon.js";import{DEFAULT_HIGHLIGHT_THEME as r}from"../appmod-citation/types.js";import c from"./RCACitationContent.module.css.js";import{renderAIConfidenceDisplay as d}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";const u=(t,l,i)=>{if(!l||!t.includes(l))return t;const o=t.split(l),c={backgroundColor:r.background,color:r.text,padding:"2px 3px",borderRadius:"2px"};return e(a,{children:o.map((a,t)=>n(s.Fragment,{children:[a,t<o.length-1&&e("span",{style:{...c,...i},children:l})]},t))})},m=({extracts:a,customStyles:l,customIcon:s})=>a&&0!==a.length?n("div",{className:c.extractPanel,style:null==l?void 0:l.extractPanel,children:[n("div",{className:c.extractPanelHeader,style:null==l?void 0:l.extractPanelHeader,children:[e("span",{style:null==l?void 0:l.extractPanelHeaderIcon,children:s||e(t,{className:c.extractPanelHeaderIcon})}),e("span",{className:c.extractPanelHeaderTitle,style:null==l?void 0:l.extractPanelHeaderTitle,children:"Extracted from Requirement Finalization"})]}),e("div",{className:c.extractList,style:null==l?void 0:l.extractList,children:a.map((a,t)=>n("div",{className:c.extractItem,style:null==l?void 0:l.extractItem,children:[e("p",{className:c.extractSubheading,style:null==l?void 0:l.extractSubheading,children:a.subheading}),e("p",{className:c.extractContent,style:null==l?void 0:l.extractContent,children:a.content})]},t))})]}):null,v=({citation:a,customStyles:s,customIcons:r,isLoading:v=!1})=>{var h;const p=i(null),x=a.customMetadata.assistant_answer||"",y=a.customMetadata.assistant_question||"",g=a.customMetadata.assistant_answer_highlight_content,N=a.customMetadata.relevance_score,I=a.customMetadata.requirement_plan_extract||[],f=(null==r?void 0:r.rcaNotebookIcon)||e(t,{className:c.headerIcon}),P=(null==r?void 0:r.rcaMessageIcon)||e(l,{className:c.conversationPanelHeaderIcon}),C=(null==r?void 0:r.rcaQuestionIcon)||e(o,{className:c.questionIcon}),q=(null==s?void 0:s.highlight)?{backgroundColor:s.highlight.background,color:s.highlight.text}:void 0;return n("div",{ref:p,className:c.container,style:null==s?void 0:s.container,children:[n("div",{className:c.header,style:null==s?void 0:s.header,children:[n("div",{className:c.headerLeft,style:null==s?void 0:s.headerLeft,children:[e("span",{style:null==s?void 0:s.headerIcon,children:f}),e("span",{className:c.headerTitle,style:null==s?void 0:s.headerTitle,children:"Requirement Clarification"})]}),d(N,null==s?void 0:s.confidenceDisplay)]}),n("div",{className:c.rcaContainer,style:null==s?void 0:s.rcaContainer,children:[n("div",{className:c.conversationPanel,style:null==s?void 0:s.conversationPanel,children:[n("div",{className:c.conversationPanelHeader,style:null==s?void 0:s.conversationPanelHeader,children:[e("span",{style:null==s?void 0:s.conversationPanelHeaderIcon,children:P}),e("span",{className:c.conversationPanelHeaderTitle,style:null==s?void 0:s.conversationPanelHeaderTitle,children:"User Conversation"})]}),n("div",{className:c.questionRow,style:null==s?void 0:s.questionRow,children:[e("span",{style:null==s?void 0:s.questionIcon,children:C}),e("span",{className:c.questionText,style:null==s?void 0:s.questionText,children:y||"Ask question to get response"})]}),e("p",{className:c.answerLabel,style:null==s?void 0:s.answerLabel,children:"Me"}),e("div",{className:c.answerBox,style:null==s?void 0:s.answerBox,children:v?e("span",{className:c.loadingText,style:null===(h=null==s?void 0:s.loading)||void 0===h?void 0:h.text,children:"Generating..."}):u(x,g,q)})]}),I.length>0&&e(m,{extracts:I,customStyles:s,customIcon:f})]})]})};export{v as default};
1
+ import{jsx as e,jsxs as n,Fragment as a}from"react/jsx-runtime";import{NotebookIcon as t,MessageCircleIcon as s}from"lucide-react";import l,{useRef as i}from"react";import{AppModIcon as c}from"../appmod-citation/icons/AppmodIcon.js";import{DEFAULT_HIGHLIGHT_THEME as o}from"../appmod-citation/types.js";import r from"./RCACitationContent.module.css.js";import{renderAIConfidenceDisplay as d}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";const u=(t,s,i)=>{if(!s||!t.includes(s))return t;const c=t.split(s),r={backgroundColor:o.background,color:o.text,padding:"2px 3px",borderRadius:"2px"};return e(a,{children:c.map((a,t)=>n(l.Fragment,{children:[a,t<c.length-1&&e("span",Object.assign({style:Object.assign(Object.assign({},r),i)},{children:s}))]},t))})},m=({extracts:a,customStyles:s,customIcon:l})=>a&&0!==a.length?n("div",Object.assign({className:r.extractPanel,style:null==s?void 0:s.extractPanel},{children:[n("div",Object.assign({className:r.extractPanelHeader,style:null==s?void 0:s.extractPanelHeader},{children:[e("span",Object.assign({style:null==s?void 0:s.extractPanelHeaderIcon},{children:l||e(t,{className:r.extractPanelHeaderIcon})})),e("span",Object.assign({className:r.extractPanelHeaderTitle,style:null==s?void 0:s.extractPanelHeaderTitle},{children:"Extracted from Requirement Finalization"}))]})),e("div",Object.assign({className:r.extractList,style:null==s?void 0:s.extractList},{children:a.map((a,t)=>n("div",Object.assign({className:r.extractItem,style:null==s?void 0:s.extractItem},{children:[e("p",Object.assign({className:r.extractSubheading,style:null==s?void 0:s.extractSubheading},{children:a.subheading})),e("p",Object.assign({className:r.extractContent,style:null==s?void 0:s.extractContent},{children:a.content}))]}),t))}))]})):null,v=({citation:a,customStyles:l,customIcons:o,isLoading:v=!1})=>{var g;const h=i(null),p=a.customMetadata.assistant_answer||"",b=a.customMetadata.assistant_question||"",x=a.customMetadata.assistant_answer_highlight_content,j=a.customMetadata.relevance_score,y=a.customMetadata.requirement_plan_extract||[],O=(null==o?void 0:o.rcaNotebookIcon)||e(t,{className:r.headerIcon}),N=(null==o?void 0:o.rcaMessageIcon)||e(s,{className:r.conversationPanelHeaderIcon}),I=(null==o?void 0:o.rcaQuestionIcon)||e(c,{className:r.questionIcon}),f=(null==l?void 0:l.highlight)?{backgroundColor:l.highlight.background,color:l.highlight.text}:void 0;return n("div",Object.assign({ref:h,className:r.container,style:null==l?void 0:l.container},{children:[n("div",Object.assign({className:r.header,style:null==l?void 0:l.header},{children:[n("div",Object.assign({className:r.headerLeft,style:null==l?void 0:l.headerLeft},{children:[e("span",Object.assign({style:null==l?void 0:l.headerIcon},{children:O})),e("span",Object.assign({className:r.headerTitle,style:null==l?void 0:l.headerTitle},{children:"Requirement Clarification"}))]})),d(j,null==l?void 0:l.confidenceDisplay)]})),n("div",Object.assign({className:r.rcaContainer,style:null==l?void 0:l.rcaContainer},{children:[n("div",Object.assign({className:r.conversationPanel,style:null==l?void 0:l.conversationPanel},{children:[n("div",Object.assign({className:r.conversationPanelHeader,style:null==l?void 0:l.conversationPanelHeader},{children:[e("span",Object.assign({style:null==l?void 0:l.conversationPanelHeaderIcon},{children:N})),e("span",Object.assign({className:r.conversationPanelHeaderTitle,style:null==l?void 0:l.conversationPanelHeaderTitle},{children:"User Conversation"}))]})),n("div",Object.assign({className:r.questionRow,style:null==l?void 0:l.questionRow},{children:[e("span",Object.assign({style:null==l?void 0:l.questionIcon},{children:I})),e("span",Object.assign({className:r.questionText,style:null==l?void 0:l.questionText},{children:b||"Ask question to get response"}))]})),e("p",Object.assign({className:r.answerLabel,style:null==l?void 0:l.answerLabel},{children:"Me"})),e("div",Object.assign({className:r.answerBox,style:null==l?void 0:l.answerBox},{children:v?e("span",Object.assign({className:r.loadingText,style:null===(g=null==l?void 0:l.loading)||void 0===g?void 0:g.text},{children:"Generating..."})):u(p,x,f)}))]})),y.length>0&&e(m,{extracts:y,customStyles:l,customIcon:O})]}))]}))};export{v as default};
2
2
  //# sourceMappingURL=RCACitationContent.js.map
@@ -1,2 +1,2 @@
1
- import{jsx as t,Fragment as n}from"react/jsx-runtime";import i from"../../../../CitationRenderer/CitationRenderer.js";import{ChatBubbleIcon as o}from"../appmod-citation/icons/ChatBubbleIcon.js";import e from"./RCACitationContent.js";const a=({title:a,citation:r,customStyles:c,customIcons:l,isLoading:s=!1})=>{const p=(null==l?void 0:l.rcaCitationIcon)||t(o,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return t(i,{inLineCitation:!0,citationTitle:a+"⁠",citationIcon:t(n,{}),citationId:`rca-${r.citation_number}`,citationComponent:t(e,{citation:r,customStyles:c,customIcons:l,isLoading:s}),chevronDownComponent:p,chevronUpComponent:p,styles:{pillButton:{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"}}})};export{a as default};
1
+ import{jsx as t,Fragment as n}from"react/jsx-runtime";import i from"../../../../CitationRenderer/CitationRenderer.js";import{ChatBubbleIcon as o}from"../appmod-citation/icons/ChatBubbleIcon.js";import e from"./RCACitationContent.js";const a=({title:a,citation:r,customStyles:c,customIcons:s,isLoading:l=!1})=>{const p=(null==s?void 0:s.rcaCitationIcon)||t(o,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return t(i,{inLineCitation:!0,citationTitle:a+"⁠",citationIcon:t(n,{}),citationId:`rca-${r.citation_number}`,citationComponent:t(e,{citation:r,customStyles:c,customIcons:s,isLoading:l}),chevronDownComponent:p,chevronUpComponent:p,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==c?void 0:c.pill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};export{a as default};
2
2
  //# sourceMappingURL=RCACitationRenderer.js.map