@magmamath/students-features 0.11.0-rc.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js +59 -221
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +58 -45
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +34 -14
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +13 -14
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +12 -22
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +4 -4
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +1 -8
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +10 -46
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +1 -2
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -9
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/voice/constants.js +23 -0
- package/dist/commonjs/features/voice/constants.js.map +1 -0
- package/dist/commonjs/features/voice/helpers.js +208 -0
- package/dist/commonjs/features/voice/helpers.js.map +1 -0
- package/dist/commonjs/features/voice/index.js +105 -0
- package/dist/commonjs/features/voice/index.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +215 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js +98 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +39 -0
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +223 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/index.js +20 -0
- package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +63 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js +27 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js +55 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +248 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/commonjs/features/voice/types.js +6 -0
- package/dist/commonjs/features/voice/types.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/components/PlayButton.js +70 -0
- package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +18 -2
- package/dist/commonjs/shared/translation/localization/de.json +18 -2
- package/dist/commonjs/shared/translation/localization/en.json +18 -2
- package/dist/commonjs/shared/translation/localization/gb.json +18 -2
- package/dist/commonjs/shared/translation/localization/sct.json +18 -2
- package/dist/commonjs/shared/translation/localization/sw.json +18 -2
- package/dist/module/features/chatbot/components/Chat/Chat.js +61 -223
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +59 -47
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +36 -17
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +12 -13
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +11 -20
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +5 -5
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +1 -8
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +10 -46
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +1 -2
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotTranslation.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotTranslation.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -9
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/gifCelebrations/helpers.js +1 -0
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/module/features/voice/constants.js +19 -0
- package/dist/module/features/voice/constants.js.map +1 -0
- package/dist/module/features/voice/helpers.js +191 -0
- package/dist/module/features/voice/helpers.js.map +1 -0
- package/dist/module/features/voice/index.js +12 -0
- package/dist/module/features/voice/index.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/module/features/voice/playing/model/Player.model.js +93 -0
- package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +34 -0
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js +218 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/index.js +5 -0
- package/dist/module/features/voice/playing/model/index.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +57 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDivider.js +21 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js +50 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +244 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/module/features/voice/types.js +4 -0
- package/dist/module/features/voice/types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/components/PlayButton.js +64 -0
- package/dist/module/shared/components/PlayButton.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +18 -2
- package/dist/module/shared/translation/localization/de.json +18 -2
- package/dist/module/shared/translation/localization/en.json +18 -2
- package/dist/module/shared/translation/localization/gb.json +18 -2
- package/dist/module/shared/translation/localization/sct.json +18 -2
- package/dist/module/shared/translation/localization/sw.json +18 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +3 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +17 -19
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +13 -8
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/constants.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +23 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +72 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -6
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -2
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +3 -2
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +17 -19
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +13 -8
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/constants.d.ts +16 -0
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/index.d.ts +10 -0
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +23 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts +3 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +72 -0
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +102 -6
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +34 -2
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +3 -0
- package/dist/typescript/module/types/common.types.d.ts.map +1 -1
- package/package.json +11 -6
- package/src/features/chatbot/components/Chat/Chat.tsx +70 -288
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +66 -46
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -2
- package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +2 -2
- package/src/features/chatbot/components/ChatInput/FreeText/SendMessageButton.tsx +1 -1
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +33 -17
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +12 -13
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +1 -1
- package/src/features/chatbot/components/Chatbot.tsx +11 -21
- package/src/features/chatbot/constants.ts +4 -4
- package/src/features/chatbot/helpers.ts +0 -3
- package/src/features/chatbot/index.ts +2 -16
- package/src/features/chatbot/model/ChatBotModel.ts +8 -51
- package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -1
- package/src/features/chatbot/model/ChatbotApi.ts +1 -1
- package/src/features/chatbot/model/ChatbotTranslation.ts +1 -1
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -7
- package/src/features/chatbot/types/api.types.ts +17 -17
- package/src/features/chatbot/types/model.types.ts +15 -8
- package/src/features/chatbot/types/units.types.ts +0 -1
- package/src/features/gifCelebrations/helpers.ts +1 -0
- package/src/features/voice/constants.ts +15 -0
- package/src/features/voice/helpers.ts +251 -0
- package/src/features/voice/index.ts +11 -0
- package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +251 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
- package/src/features/voice/playing/model/Player.model.ts +104 -0
- package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
- package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +42 -0
- package/src/features/voice/playing/model/VoicePlayer.model.ts +255 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +40 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +11 -0
- package/src/features/voice/playing/model/index.ts +2 -0
- package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +64 -0
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
- package/src/features/voice/recording/components/VoiceRecordDivider.tsx +17 -0
- package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
- package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
- package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
- package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
- package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
- package/src/features/voice/recording/model/Recorder.model.ts +63 -0
- package/src/features/voice/recording/model/Uploader.model.ts +48 -0
- package/src/features/voice/recording/model/VoiceRecord.model.ts +302 -0
- package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
- package/src/features/voice/types.ts +84 -0
- package/src/index.ts +1 -0
- package/src/shared/components/PlayButton.tsx +84 -0
- package/src/shared/translation/localization/ca.json +18 -2
- package/src/shared/translation/localization/de.json +18 -2
- package/src/shared/translation/localization/en.json +18 -2
- package/src/shared/translation/localization/gb.json +18 -2
- package/src/shared/translation/localization/sct.json +18 -2
- package/src/shared/translation/localization/sw.json +18 -2
- package/src/types/common.types.ts +1 -0
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js +0 -39
- package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js +0 -44
- package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -41
- package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/components/Chat/CloseButton.js +0 -33
- package/dist/module/features/chatbot/components/Chat/CloseButton.js.map +0 -1
- package/dist/module/features/chatbot/components/Chat/GradientFade.js +0 -39
- package/dist/module/features/chatbot/components/Chat/GradientFade.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -34
- package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
- package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
- package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
- package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/components/Chat/CloseButton.tsx +0 -31
- package/src/features/chatbot/components/Chat/GradientFade.tsx +0 -43
- package/src/features/chatbot/components/ChatMessage/AnimatedMessage.tsx +0 -30
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PlayerState = exports.PlayerModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _expoAudio = require("expo-audio");
|
|
9
|
+
let PlayerState = exports.PlayerState = /*#__PURE__*/function (PlayerState) {
|
|
10
|
+
PlayerState["PLAYING"] = "playing";
|
|
11
|
+
PlayerState["PAUSED"] = "paused";
|
|
12
|
+
PlayerState["LOADING"] = "loading";
|
|
13
|
+
PlayerState["IDLE"] = "idle";
|
|
14
|
+
return PlayerState;
|
|
15
|
+
}({});
|
|
16
|
+
class PlayerModel {
|
|
17
|
+
player = (0, _expoAudio.createAudioPlayer)();
|
|
18
|
+
stopped = false;
|
|
19
|
+
reset = (0, _effector.createEvent)();
|
|
20
|
+
setPlayerState = (0, _effector.createEvent)();
|
|
21
|
+
playbackFinished = (0, _effector.createEvent)();
|
|
22
|
+
$playerState = (0, _effector.restore)(this.setPlayerState, PlayerState.IDLE).reset(this.reset);
|
|
23
|
+
setupAudioMode = (0, _effector.createEffect)(async () => {
|
|
24
|
+
await (0, _expoAudio.setAudioModeAsync)({
|
|
25
|
+
playsInSilentMode: true,
|
|
26
|
+
shouldPlayInBackground: false,
|
|
27
|
+
interruptionMode: 'doNotMix'
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
pause = (0, _effector.createEffect)(() => {
|
|
31
|
+
if (this.player) {
|
|
32
|
+
this.player.pause();
|
|
33
|
+
this.setPlayerState(PlayerState.PAUSED);
|
|
34
|
+
} else {
|
|
35
|
+
console.warn('Cannot pause: audio player not initialized');
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
stop = (0, _effector.createEffect)(() => {
|
|
39
|
+
this.stopped = true;
|
|
40
|
+
if (this.player) {
|
|
41
|
+
this.player.replace('');
|
|
42
|
+
this.setPlayerState(PlayerState.IDLE);
|
|
43
|
+
} else {
|
|
44
|
+
console.warn('Cannot stop: audio player not initialized');
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
resume = (0, _effector.createEffect)(() => {
|
|
48
|
+
if (this.player) {
|
|
49
|
+
this.player.play();
|
|
50
|
+
this.setPlayerState(PlayerState.PLAYING);
|
|
51
|
+
} else {
|
|
52
|
+
console.warn('Cannot resume: audio player not initialized');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
play = (0, _effector.createEffect)(async uri => {
|
|
56
|
+
if (!this.player) {
|
|
57
|
+
console.warn('Audio player not initialized');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.stopped = false;
|
|
61
|
+
this.player.replace(uri);
|
|
62
|
+
const waitForLoad = () => {
|
|
63
|
+
if (this.stopped) return;
|
|
64
|
+
if (this.player && this.player.isLoaded) {
|
|
65
|
+
const unsubscribe = this.player.addListener('playbackStatusUpdate', status => {
|
|
66
|
+
if (status.didJustFinish) {
|
|
67
|
+
this.playbackFinished();
|
|
68
|
+
unsubscribe?.remove?.();
|
|
69
|
+
this.setPlayerState(PlayerState.IDLE);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
this.player.play();
|
|
73
|
+
this.setPlayerState(PlayerState.PLAYING);
|
|
74
|
+
} else {
|
|
75
|
+
setTimeout(waitForLoad, 10);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
waitForLoad();
|
|
79
|
+
});
|
|
80
|
+
reinitialize() {
|
|
81
|
+
if (!this.player) {
|
|
82
|
+
this.player = (0, _expoAudio.createAudioPlayer)();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
release() {
|
|
86
|
+
if (this.player) {
|
|
87
|
+
try {
|
|
88
|
+
this.stop();
|
|
89
|
+
this.player.remove();
|
|
90
|
+
} catch (error) {}
|
|
91
|
+
this.player.release();
|
|
92
|
+
this.player = null;
|
|
93
|
+
}
|
|
94
|
+
this.reset();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.PlayerModel = PlayerModel;
|
|
98
|
+
//# sourceMappingURL=Player.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_expoAudio","PlayerState","exports","PlayerModel","player","createAudioPlayer","stopped","reset","createEvent","setPlayerState","playbackFinished","$playerState","restore","IDLE","setupAudioMode","createEffect","setAudioModeAsync","playsInSilentMode","shouldPlayInBackground","interruptionMode","pause","PAUSED","console","warn","stop","replace","resume","play","PLAYING","uri","waitForLoad","isLoaded","unsubscribe","addListener","status","didJustFinish","remove","setTimeout","reinitialize","release","error"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/Player.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GA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;IAEDA,WAAW,CAAC,CAAC;EACf,CAAC,CAAC;EAEKQ,YAAYA,CAAA,EAAG;IACpB,IAAI,CAAC,IAAI,CAAClC,MAAM,EAAE;MAChB,IAAI,CAACA,MAAM,GAAG,IAAAC,4BAAiB,EAAC,CAAC;IACnC;EACF;EAEOkC,OAAOA,CAAA,EAAG;IACf,IAAI,IAAI,CAACnC,MAAM,EAAE;MACf,IAAI;QACF,IAAI,CAACoB,IAAI,CAAC,CAAC;QACX,IAAI,CAACpB,MAAM,CAACgC,MAAM,CAAC,CAAC;MACtB,CAAC,CAAC,OAAOI,KAAK,EAAE,CAAC;MACjB,IAAI,CAACpC,MAAM,CAACmC,OAAO,CAAC,CAAC;MACrB,IAAI,CAACnC,MAAM,GAAG,IAAI;IACpB;IACA,IAAI,CAACG,KAAK,CAAC,CAAC;EACd;AACF;AAACL,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TranscriptionsDownloaderModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
class TranscriptionsDownloaderModel {
|
|
10
|
+
setTranscriptsLoaded = (0, _effector.createEvent)();
|
|
11
|
+
reset = (0, _effector.createEvent)();
|
|
12
|
+
$transcriptsLoaded = (0, _effector.restore)(this.setTranscriptsLoaded, false).reset(this.reset);
|
|
13
|
+
constructor(collection, api) {
|
|
14
|
+
this.collection = collection;
|
|
15
|
+
this.api = api;
|
|
16
|
+
}
|
|
17
|
+
async fetchTranscriptWithRetry(audioFileId) {
|
|
18
|
+
for (let attempt = 0; attempt < _constants.TRANSCRIPT_MAX_RETRIES; attempt++) {
|
|
19
|
+
const response = await this.api.getAudioFileTranscript(audioFileId);
|
|
20
|
+
if (response.status === 'completed') {
|
|
21
|
+
return response.text;
|
|
22
|
+
}
|
|
23
|
+
if (response.status === 'failed') {
|
|
24
|
+
return _constants.NO_AUDIO_BE_MESSAGE;
|
|
25
|
+
}
|
|
26
|
+
if (attempt < _constants.TRANSCRIPT_MAX_RETRIES - 1) {
|
|
27
|
+
await new Promise(resolve => setTimeout(resolve, _constants.TRANSCRIPT_RETRY_INTERVAL_MS));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return _constants.NO_AUDIO_BE_MESSAGE;
|
|
31
|
+
}
|
|
32
|
+
loadAllTranscripts = (0, _effector.createEffect)(async () => {
|
|
33
|
+
const attempts = this.collection.getAll();
|
|
34
|
+
const transcriptPromises = attempts.map(async item => {
|
|
35
|
+
if (this.collection.hasTranscript(item.attemptNumber)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.collection.update(item.attemptNumber, {
|
|
39
|
+
transcriptLoading: true
|
|
40
|
+
});
|
|
41
|
+
try {
|
|
42
|
+
const text = await this.fetchTranscriptWithRetry(item.audioFileId);
|
|
43
|
+
this.collection.update(item.attemptNumber, {
|
|
44
|
+
transcript: text,
|
|
45
|
+
transcriptLoading: false,
|
|
46
|
+
transcriptError: undefined
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
this.collection.update(item.attemptNumber, {
|
|
50
|
+
transcriptLoading: false,
|
|
51
|
+
transcriptError: error instanceof Error ? error.message : 'Failed to load transcript'
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
await Promise.all(transcriptPromises);
|
|
56
|
+
this.setTranscriptsLoaded(true);
|
|
57
|
+
});
|
|
58
|
+
getTranscript(attemptNumber) {
|
|
59
|
+
return this.collection.get(attemptNumber)?.transcript;
|
|
60
|
+
}
|
|
61
|
+
isTranscriptLoading(attemptNumber) {
|
|
62
|
+
return this.collection.get(attemptNumber)?.transcriptLoading || false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.TranscriptionsDownloaderModel = TranscriptionsDownloaderModel;
|
|
66
|
+
//# sourceMappingURL=TranscriptionsDownloaderModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_constants","TranscriptionsDownloaderModel","setTranscriptsLoaded","createEvent","reset","$transcriptsLoaded","restore","constructor","collection","api","fetchTranscriptWithRetry","audioFileId","attempt","TRANSCRIPT_MAX_RETRIES","response","getAudioFileTranscript","status","text","NO_AUDIO_BE_MESSAGE","Promise","resolve","setTimeout","TRANSCRIPT_RETRY_INTERVAL_MS","loadAllTranscripts","createEffect","attempts","getAll","transcriptPromises","map","item","hasTranscript","attemptNumber","update","transcriptLoading","transcript","transcriptError","undefined","error","Error","message","all","getTranscript","get","isTranscriptLoading","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/TranscriptionsDownloaderModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAMO,MAAME,6BAA6B,CAAC;EAIzBC,oBAAoB,GAAG,IAAAC,qBAAW,EAAU,CAAC;EAC7CC,KAAK,GAAG,IAAAD,qBAAW,EAAC,CAAC;EAErBE,kBAAkB,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACJ,oBAAoB,EAAE,KAAK,CAAC,CAACE,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAEhGG,WAAWA,CAACC,UAAyC,EAAEC,GAAmB,EAAE;IAC1E,IAAI,CAACD,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,GAAG,GAAGA,GAAG;EAChB;EAEA,MAAcC,wBAAwBA,CAACC,WAAmB,EAAmB;IAC3E,KAAK,IAAIC,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAGC,iCAAsB,EAAED,OAAO,EAAE,EAAE;MACjE,MAAME,QAAQ,GAAG,MAAM,IAAI,CAACL,GAAG,CAACM,sBAAsB,CAACJ,WAAW,CAAC;MAEnE,IAAIG,QAA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,CAAC;IAEF,MAAMpB,OAAO,CAACqB,GAAG,CAACb,kBAAkB,CAAC;IACrC,IAAI,CAACzB,oBAAoB,CAAC,IAAI,CAAC;EACjC,CAAC,CAAC;EAEKuC,aAAaA,CAACV,aAAqB,EAAsB;IAC9D,OAAO,IAAI,CAACvB,UAAU,CAACkC,GAAG,CAACX,aAAa,CAAC,EAAEG,UAAU;EACvD;EAEOS,mBAAmBA,CAACZ,aAAqB,EAAW;IACzD,OAAO,IAAI,CAACvB,UAAU,CAACkC,GAAG,CAACX,aAAa,CAAC,EAAEE,iBAAiB,IAAI,KAAK;EACvE;AACF;AAACW,OAAA,CAAA3C,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceFileDownloaderModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _helpers = require("../../helpers.js");
|
|
9
|
+
class VoiceFileDownloaderModel {
|
|
10
|
+
setApi = api => {
|
|
11
|
+
this.api = api;
|
|
12
|
+
};
|
|
13
|
+
download = (0, _effector.createEffect)(async ({
|
|
14
|
+
audioFileId,
|
|
15
|
+
attemptNumber
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
downloadAudio,
|
|
19
|
+
controller
|
|
20
|
+
} = (0, _helpers.downloadAudioFileRequestGenerator)(audioFileId, this.api);
|
|
21
|
+
const downloadPromise = downloadAudio();
|
|
22
|
+
const collectionItem = {
|
|
23
|
+
attemptNumber,
|
|
24
|
+
audioFileId,
|
|
25
|
+
audioLoading: true,
|
|
26
|
+
audioDownloadPromise: downloadPromise,
|
|
27
|
+
controller
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
collectionItem,
|
|
31
|
+
downloadPromise
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
abortDownload = controller => {
|
|
35
|
+
controller?.abort();
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.VoiceFileDownloaderModel = VoiceFileDownloaderModel;
|
|
39
|
+
//# sourceMappingURL=VoiceFileDownloader.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_helpers","VoiceFileDownloaderModel","setApi","api","download","createEffect","audioFileId","attemptNumber","downloadAudio","controller","downloadAudioFileRequestGenerator","downloadPromise","collectionItem","audioLoading","audioDownloadPromise","abortDownload","abort","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceFileDownloader.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAYO,MAAME,wBAAwB,CAAC;EAGpBC,MAAM,GAAIC,GAAmB,IAAK;IAChD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB,CAAC;EAEeC,QAAQ,GAAG,IAAAC,sBAAY,EACrC,OAAO;IAAEC,WAAW;IAAEC;EAA8B,CAAC,KAA8B;IACjF,MAAM;MAAEC,aAAa;MAAEC;IAAW,CAAC,GAAG,IAAAC,0CAAiC,EAACJ,WAAW,EAAE,IAAI,CAACH,GAAG,CAAC;IAC9F,MAAMQ,eAAe,GAAGH,aAAa,CAAC,CAAC;IAEvC,MAAMI,cAA+C,GAAG;MACtDL,aAAa;MACbD,WAAW;MACXO,YAAY,EAAE,IAAI;MAClBC,oBAAoB,EAAEH,eAAe;MACrCF;IACF,CAAC;IAED,OAAO;MAAEG,cAAc;MAAED;IAAgB,CAAC;EAC5C,CACF,CAAC;EAEeI,aAAa,GAAIN,UAA4B,IAAK;IAChEA,UAAU,EAAEO,KAAK,CAAC,CAAC;EACrB,CAAC;AACH;AAACC,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoicePlayerModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _VoiceTranscriptionsCollection = require("./VoiceTranscriptionsCollection.js");
|
|
9
|
+
var _VoiceFileDownloaderModel = require("./VoiceFileDownloader.model.js");
|
|
10
|
+
var _VoiceTranscriptionsDropdownModel = require("./VoiceTranscriptionsDropdown.model.js");
|
|
11
|
+
var _PlayerModel = require("./Player.model.js");
|
|
12
|
+
var _TranscriptionsDownloaderModel = require("./TranscriptionsDownloaderModel.js");
|
|
13
|
+
class VoicePlayerModel {
|
|
14
|
+
collection = new _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection();
|
|
15
|
+
downloader = new _VoiceFileDownloaderModel.VoiceFileDownloaderModel();
|
|
16
|
+
dropdown = new _VoiceTranscriptionsDropdownModel.VoiceTranscriptionsDropdownModel();
|
|
17
|
+
playerModel = new _PlayerModel.PlayerModel();
|
|
18
|
+
currentPlayingAttempt = null;
|
|
19
|
+
shouldPreventPlayback = false;
|
|
20
|
+
setCurrentAttempt = (0, _effector.createEvent)();
|
|
21
|
+
reset = (0, _effector.createEvent)();
|
|
22
|
+
$currentAttempt = (0, _effector.restore)(this.setCurrentAttempt, null).reset(this.reset);
|
|
23
|
+
$playerState = this.playerModel.$playerState;
|
|
24
|
+
pauseAudio = this.playerModel.pause;
|
|
25
|
+
stopAudio = () => {
|
|
26
|
+
this.shouldPreventPlayback = true;
|
|
27
|
+
this.abortAllDownloads();
|
|
28
|
+
this.playerModel.stop();
|
|
29
|
+
this.currentPlayingAttempt = null;
|
|
30
|
+
this.setCurrentAttempt(null);
|
|
31
|
+
};
|
|
32
|
+
resetPlayer = () => {
|
|
33
|
+
this.shouldPreventPlayback = true;
|
|
34
|
+
this.releaseCollectionResources();
|
|
35
|
+
this.playerModel.stop();
|
|
36
|
+
this.currentPlayingAttempt = null;
|
|
37
|
+
this.setCurrentAttempt(null);
|
|
38
|
+
this.collection.clear();
|
|
39
|
+
};
|
|
40
|
+
constructor(params) {
|
|
41
|
+
this.api = params.api;
|
|
42
|
+
this.loader = new _TranscriptionsDownloaderModel.TranscriptionsDownloaderModel(this.collection, params.api);
|
|
43
|
+
this.downloader.setApi(params.api);
|
|
44
|
+
this.playerModel.playbackFinished.watch(() => {
|
|
45
|
+
this.currentPlayingAttempt = null;
|
|
46
|
+
this.setCurrentAttempt(null);
|
|
47
|
+
});
|
|
48
|
+
if (params.audios) {
|
|
49
|
+
this.initializeCollectionFromAudios(params.audios);
|
|
50
|
+
}
|
|
51
|
+
this.playerModel.setupAudioMode();
|
|
52
|
+
}
|
|
53
|
+
initializeWithAudios(answerAudio) {
|
|
54
|
+
this.loader.setTranscriptsLoaded(false);
|
|
55
|
+
this.collection.clear();
|
|
56
|
+
this.initializeCollectionFromAudios(answerAudio);
|
|
57
|
+
}
|
|
58
|
+
initializeCollectionFromAudios(audios) {
|
|
59
|
+
if (!audios) {
|
|
60
|
+
console.warn('VoicePlayerModel: audios is not provided');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
audios.forEach((audio, index) => {
|
|
64
|
+
const attemptNumber = index + 1;
|
|
65
|
+
if (!audio.audioFileId) {
|
|
66
|
+
console.warn('VoicePlayerModel: audioFileId is missing for audio', audio);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.collection.add(attemptNumber, {
|
|
70
|
+
attemptNumber,
|
|
71
|
+
audioFileId: audio.audioFileId,
|
|
72
|
+
_id: audio._id,
|
|
73
|
+
hasDrawing: !!audio.drawing
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
releaseCollectionResources() {
|
|
78
|
+
this.collection.getAll().forEach(item => {
|
|
79
|
+
if (item.controller) {
|
|
80
|
+
this.downloader.abortDownload(item.controller);
|
|
81
|
+
}
|
|
82
|
+
if (item.audioUri?.startsWith('blob:')) {
|
|
83
|
+
try {
|
|
84
|
+
URL.revokeObjectURL(item.audioUri);
|
|
85
|
+
} catch (e) {}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
abortAllDownloads() {
|
|
90
|
+
this.collection.getAll().forEach(item => {
|
|
91
|
+
if (item.controller && item.audioLoading) {
|
|
92
|
+
this.downloader.abortDownload(item.controller);
|
|
93
|
+
this.collection.update(item.attemptNumber, {
|
|
94
|
+
audioLoading: false,
|
|
95
|
+
controller: undefined,
|
|
96
|
+
audioDownloadPromise: undefined
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
handlePlayAttempt = (0, _effector.createEffect)(async attemptNumber => {
|
|
102
|
+
this.shouldPreventPlayback = false;
|
|
103
|
+
const item = this.collection.get(attemptNumber);
|
|
104
|
+
if (!item) return;
|
|
105
|
+
if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
|
|
106
|
+
this.abortAllDownloads();
|
|
107
|
+
}
|
|
108
|
+
if (this.collection.hasAudio(attemptNumber)) {
|
|
109
|
+
this.playAudioFx(attemptNumber);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.LOADING);
|
|
114
|
+
const {
|
|
115
|
+
collectionItem,
|
|
116
|
+
downloadPromise
|
|
117
|
+
} = await this.downloader.download({
|
|
118
|
+
audioFileId: item.audioFileId,
|
|
119
|
+
attemptNumber
|
|
120
|
+
});
|
|
121
|
+
if (this.shouldPreventPlayback) {
|
|
122
|
+
collectionItem.controller?.abort();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.collection.update(attemptNumber, collectionItem);
|
|
126
|
+
const result = await downloadPromise;
|
|
127
|
+
if (this.shouldPreventPlayback) {
|
|
128
|
+
if (result.uri?.startsWith('blob:')) {
|
|
129
|
+
URL.revokeObjectURL(result.uri);
|
|
130
|
+
}
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.collection.update(attemptNumber, {
|
|
134
|
+
audioUri: result.uri,
|
|
135
|
+
audioLoading: false,
|
|
136
|
+
audioError: undefined,
|
|
137
|
+
controller: undefined,
|
|
138
|
+
audioDownloadPromise: undefined
|
|
139
|
+
});
|
|
140
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
141
|
+
this.playAudioFx(attemptNumber);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.error('Audio download error:', error);
|
|
144
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
145
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this.collection.update(attemptNumber, {
|
|
149
|
+
audioLoading: false,
|
|
150
|
+
audioError: error instanceof Error ? error.message : 'Failed to download audio',
|
|
151
|
+
controller: undefined,
|
|
152
|
+
audioDownloadPromise: undefined
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
playAudioFx = (0, _effector.createEffect)(async attemptNumber => {
|
|
157
|
+
if (this.shouldPreventPlayback) return;
|
|
158
|
+
const item = this.collection.get(attemptNumber);
|
|
159
|
+
if (!item?.audioUri) {
|
|
160
|
+
console.warn('No audio URI available for attempt:', attemptNumber);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
try {
|
|
164
|
+
if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
|
|
165
|
+
this.playerModel.player?.remove();
|
|
166
|
+
}
|
|
167
|
+
if (this.currentPlayingAttempt === attemptNumber && this.playerModel.player?.playing) {
|
|
168
|
+
this.playerModel.pause();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (this.currentPlayingAttempt === attemptNumber && !this.playerModel.player?.playing) {
|
|
172
|
+
this.playerModel.resume();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.currentPlayingAttempt = attemptNumber;
|
|
176
|
+
this.setCurrentAttempt(attemptNumber);
|
|
177
|
+
await this.playerModel.play(item.audioUri);
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.error('Error playing audio:', error);
|
|
180
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
181
|
+
this.collection.update(attemptNumber, {
|
|
182
|
+
audioError: error instanceof Error ? error.message : 'Failed to play audio'
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
isAudioLoading(attemptNumber) {
|
|
187
|
+
return this.collection.get(attemptNumber)?.audioLoading || false;
|
|
188
|
+
}
|
|
189
|
+
getAllAttempts() {
|
|
190
|
+
return this.collection.getAll();
|
|
191
|
+
}
|
|
192
|
+
reinitializePlayer() {
|
|
193
|
+
this.playerModel.reinitialize();
|
|
194
|
+
}
|
|
195
|
+
cleanup() {
|
|
196
|
+
this.releaseCollectionResources();
|
|
197
|
+
this.collection.clear();
|
|
198
|
+
this.currentPlayingAttempt = null;
|
|
199
|
+
this.reset();
|
|
200
|
+
this.loader.reset();
|
|
201
|
+
this.dropdown.reset();
|
|
202
|
+
this.playerModel.release();
|
|
203
|
+
}
|
|
204
|
+
togglePlayPause = (0, _effector.attach)({
|
|
205
|
+
source: this.playerModel.$playerState,
|
|
206
|
+
mapParams: (attemptNumber, playerState) => ({
|
|
207
|
+
attemptNumber,
|
|
208
|
+
playerState
|
|
209
|
+
}),
|
|
210
|
+
effect: (0, _effector.createEffect)(({
|
|
211
|
+
attemptNumber,
|
|
212
|
+
playerState
|
|
213
|
+
}) => {
|
|
214
|
+
if (this.currentPlayingAttempt === attemptNumber && playerState === _PlayerModel.PlayerState.PLAYING) {
|
|
215
|
+
this.pauseAudio();
|
|
216
|
+
} else {
|
|
217
|
+
this.handlePlayAttempt(attemptNumber);
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
exports.VoicePlayerModel = VoicePlayerModel;
|
|
223
|
+
//# sourceMappingURL=VoicePlayer.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_VoiceTranscriptionsCollection","_VoiceFileDownloaderModel","_VoiceTranscriptionsDropdownModel","_PlayerModel","_TranscriptionsDownloaderModel","VoicePlayerModel","collection","VoiceTranscriptionsCollection","downloader","VoiceFileDownloaderModel","dropdown","VoiceTranscriptionsDropdownModel","playerModel","PlayerModel","currentPlayingAttempt","shouldPreventPlayback","setCurrentAttempt","createEvent","reset","$currentAttempt","restore","$playerState","pauseAudio","pause","stopAudio","abortAllDownloads","stop","resetPlayer","releaseCollectionResources","clear","constructor","params","api","loader","TranscriptionsDownloaderModel","setApi","playbackFinished","watch","audios","initializeCollectionFromAudios","setupAudioMode","initializeWithAudios","answerAudio","setTranscriptsLoaded","console","warn","forEach","audio","index","attemptNumber","audioFileId","add","_id","hasDrawing","drawing","getAll","item","controller","abortDownload","audioUri","startsWith","URL","revokeObjectURL","e","audioLoading","update","undefined","audioDownloadPromise","handlePlayAttempt","createEffect","get","hasAudio","playAudioFx","setPlayerState","PlayerState","LOADING","collectionItem","downloadPromise","download","abort","result","uri","audioError","IDLE","error","Error","name","message","player","remove","playing","resume","play","isAudioLoading","getAllAttempts","reinitializePlayer","reinitialize","cleanup","release","togglePlayPause","attach","source","mapParams","playerState","effect","PLAYING","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoicePlayer.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,8BAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,8BAAA,GAAAL,OAAA;AAWO,MAAMM,gBAAgB,CAAC;EACZC,UAAU,GAAG,IAAIC,4DAA6B,CAAC,CAAC;EAChDC,UAAU,GAAG,IAAIC,kDAAwB,CAAC,CAAC;EA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IAAY,CAAC,CAAC;IACnFC,MAAM,EAAE,IAAAnC,sBAAY,EAAC,CAAC;MAAEpB,aAAa;MAAEsD;IAAmC,CAAC,KAAK;MAC9E,IAAI,IAAI,CAACzF,qBAAqB,KAAKmC,aAAa,IAAIsD,WAAW,KAAK7B,wBAAW,CAAC+B,OAAO,EAAE;QACvF,IAAI,CAACnF,UAAU,CAAC,CAAC;MACnB,CAAC,MAAM;QACL,IAAI,CAAC8C,iBAAiB,CAACnB,aAAa,CAAC;MACvC;IACF,CAAC;EACH,CAAC,CAAC;AACJ;AAACyD,OAAA,CAAArG,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsCollection = void 0;
|
|
7
|
+
class VoiceTranscriptionsCollection {
|
|
8
|
+
collection = new Map();
|
|
9
|
+
add(attemptNumber, item) {
|
|
10
|
+
this.collection.set(attemptNumber, item);
|
|
11
|
+
}
|
|
12
|
+
update(attemptNumber, item) {
|
|
13
|
+
const existingItem = this.collection.get(attemptNumber) || {};
|
|
14
|
+
this.collection.set(attemptNumber, {
|
|
15
|
+
...existingItem,
|
|
16
|
+
...item
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
delete(attemptNumber) {
|
|
20
|
+
this.collection.delete(attemptNumber);
|
|
21
|
+
}
|
|
22
|
+
get(attemptNumber) {
|
|
23
|
+
return this.collection.get(attemptNumber);
|
|
24
|
+
}
|
|
25
|
+
getAll() {
|
|
26
|
+
return Array.from(this.collection.values());
|
|
27
|
+
}
|
|
28
|
+
clear() {
|
|
29
|
+
this.collection.clear();
|
|
30
|
+
}
|
|
31
|
+
hasTranscript(attemptNumber) {
|
|
32
|
+
const item = this.collection.get(attemptNumber);
|
|
33
|
+
return !!item?.transcript;
|
|
34
|
+
}
|
|
35
|
+
hasAudio(attemptNumber) {
|
|
36
|
+
const item = this.collection.get(attemptNumber);
|
|
37
|
+
return !!item?.audioUri;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.VoiceTranscriptionsCollection = VoiceTranscriptionsCollection;
|
|
41
|
+
//# sourceMappingURL=VoiceTranscriptionsCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VoiceTranscriptionsCollection","collection","Map","add","attemptNumber","item","set","update","existingItem","get","delete","getAll","Array","from","values","clear","hasTranscript","transcript","hasAudio","audioUri","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsCollection.ts"],"mappings":";;;;;;AAEO,MAAMA,6BAA6B,CAAC;EACzBC,UAAU,GAAwC,IAAIC,GAAG,CAAC,CAAC;EAEpEC,GAAGA,CAACC,aAAqB,EAAEC,IAA4B,EAAE;IAC9D,IAAI,CAACJ,UAAU,CAACK,GAAG,CAACF,aAAa,EAAEC,IAAI,CAAC;EAC1C;EAEOE,MAAMA,CAACH,aAAqB,EAAEC,IAAqC,EAAE;IAC1E,MAAMG,YAAY,GAAG,IAAI,CAACP,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC,IAAK,CAAC,CAA4B;IACzF,IAAI,CAACH,UAAU,CAACK,GAAG,CAACF,aAAa,EAAE;MAAE,GAAGI,YAAY;MAAE,GAAGH;IAAK,CAAC,CAAC;EAClE;EAEOK,MAAMA,CAACN,aAAqB,EAAE;IACnC,IAAI,CAACH,UAAU,CAACS,MAAM,CAACN,aAAa,CAAC;EACvC;EAEOK,GAAGA,CAACL,aAAqB,EAAE;IAChC,OAAO,IAAI,CAACH,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;EAC3C;EAEOO,MAAMA,CAAA,EAAG;IACd,OAAOC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACZ,UAAU,CAACa,MAAM,CAAC,CAAC,CAAC;EAC7C;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAACd,UAAU,CAACc,KAAK,CAAC,CAAC;EACzB;EAEOC,aAAaA,CAACZ,aAAqB,EAAE;IAC1C,MAAMC,IAAI,GAAG,IAAI,CAACJ,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;IAC/C,OAAO,CAAC,CAACC,IAAI,EAAEY,UAAU;EAC3B;EAEOC,QAAQA,CAACd,aAAqB,EAAE;IACrC,MAAMC,IAAI,GAAG,IAAI,CAACJ,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;IAC/C,OAAO,CAAC,CAACC,IAAI,EAAEc,QAAQ;EACzB;AACF;AAACC,OAAA,CAAApB,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsDropdownModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
class VoiceTranscriptionsDropdownModel {
|
|
9
|
+
toggleExpand = (0, _effector.createEvent)();
|
|
10
|
+
setExpanded = (0, _effector.createEvent)();
|
|
11
|
+
reset = (0, _effector.createEvent)();
|
|
12
|
+
$isExpanded = (0, _effector.restore)(this.setExpanded, false).on(this.toggleExpand, state => !state).reset(this.reset);
|
|
13
|
+
}
|
|
14
|
+
exports.VoiceTranscriptionsDropdownModel = VoiceTranscriptionsDropdownModel;
|
|
15
|
+
//# sourceMappingURL=VoiceTranscriptionsDropdown.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","VoiceTranscriptionsDropdownModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","restore","on","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,gCAAgC,CAAC;EAC5BC,YAAY,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAC5BC,WAAW,GAAG,IAAAD,qBAAW,EAAU,CAAC;EACpCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,WAAW,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,WAAW,EAAE,KAAK,CAAC,CAC3DI,EAAE,CAAC,IAAI,CAACN,YAAY,EAAGO,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCJ,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACK,OAAA,CAAAT,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PlayerState", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _PlayerModel.PlayerState;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "VoicePlayerModel", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _VoicePlayerModel.VoicePlayerModel;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _VoicePlayerModel = require("./VoicePlayer.model.js");
|
|
19
|
+
var _PlayerModel = require("./Player.model.js");
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_VoicePlayerModel","require","_PlayerModel"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceRecord = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _VoiceRecordButton = require("./VoiceRecordButton.js");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
+
var _VoiceRecordDeleteButton = require("./VoiceRecordDeleteButton.js");
|
|
12
|
+
var _VoiceRecordDivider = require("./VoiceRecordDivider.js");
|
|
13
|
+
var _VoiceRecordTimer = require("./VoiceRecordTimer.js");
|
|
14
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
15
|
+
var _useVoiceRecorder = require("../hooks/useVoiceRecorder.js");
|
|
16
|
+
var _useVoiceRecorderAnimation = require("../hooks/useVoiceRecorderAnimation.js");
|
|
17
|
+
var _effectorReact = require("effector-react");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
const VoiceRecord = ({
|
|
22
|
+
style,
|
|
23
|
+
model
|
|
24
|
+
}) => {
|
|
25
|
+
const {
|
|
26
|
+
recorderState
|
|
27
|
+
} = (0, _useVoiceRecorder.useVoiceRecorder)(model);
|
|
28
|
+
const [isExpanded, isDisabled] = (0, _effectorReact.useUnit)([model.$isExpanded, model.$isButtonDisabled]);
|
|
29
|
+
const {
|
|
30
|
+
containerAnimatedStyle
|
|
31
|
+
} = (0, _useVoiceRecorderAnimation.useVoiceRecorderAnimation)(isExpanded);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
return () => {
|
|
34
|
+
model.cleanup();
|
|
35
|
+
};
|
|
36
|
+
}, [model]);
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
38
|
+
style: [styles.container, style, containerAnimatedStyle],
|
|
39
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordButton.VoiceRecordButton, {
|
|
40
|
+
model: model
|
|
41
|
+
}), isExpanded && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
42
|
+
entering: _reactNativeReanimated.FadeIn,
|
|
43
|
+
exiting: _reactNativeReanimated.FadeOut,
|
|
44
|
+
style: styles.expendedContainer,
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordTimer.VoiceRecordTimer, {
|
|
46
|
+
style: styles.timer,
|
|
47
|
+
model: model,
|
|
48
|
+
recordingFileDurationMs: recorderState.durationMillis
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordDivider.VoiceRecordDivider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordDeleteButton.VoiceRecordDeleteButton, {
|
|
50
|
+
isDisabled: isDisabled,
|
|
51
|
+
onPress: model.events.deleteRecord
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
exports.VoiceRecord = VoiceRecord;
|
|
57
|
+
const styles = _reactNative.StyleSheet.create({
|
|
58
|
+
container: {
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
padding: 3,
|
|
61
|
+
paddingBottom: 6,
|
|
62
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
63
|
+
borderRadius: 32,
|
|
64
|
+
boxShadow: '0 1px 3px 0 rgba(51, 51, 51, 0.10), 0 0 1px 0 rgba(51, 51, 51, 0.40)',
|
|
65
|
+
overflow: 'hidden'
|
|
66
|
+
},
|
|
67
|
+
timer: {
|
|
68
|
+
marginTop: _reactNativeUi.SPACING[400]
|
|
69
|
+
},
|
|
70
|
+
expendedContainer: {
|
|
71
|
+
alignItems: 'center'
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=VoiceRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_VoiceRecordButton","_react","_interopRequireWildcard","_reactNativeUi","_VoiceRecordDeleteButton","_VoiceRecordDivider","_VoiceRecordTimer","_reactNativeReanimated","_useVoiceRecorder","_useVoiceRecorderAnimation","_effectorReact","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceRecord","style","model","recorderState","useVoiceRecorder","isExpanded","isDisabled","useUnit","$isExpanded","$isButtonDisabled","containerAnimatedStyle","useVoiceRecorderAnimation","useEffect","cleanup","jsxs","View","styles","container","children","jsx","VoiceRecordButton","entering","FadeIn","exiting","FadeOut","expendedContainer","VoiceRecordTimer","timer","recordingFileDurationMs","durationMillis","VoiceRecordDivider","VoiceRecordDeleteButton","onPress","events","deleteRecord","exports","StyleSheet","create","alignItems","padding","paddingBottom","backgroundColor","COLORS","NEUTRAL_3","borderRadius","boxShadow","overflow","marginTop","SPACING"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecord.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAA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