fmode-ng 0.0.113 → 0.0.115
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/LICENSE.md +8 -0
- package/README.md +37 -37
- package/esm2022/fmode-ng.mjs +10 -5
- package/esm2022/lib/aigc/agent/fm-agent-task/fm-agent-task.component.mjs +8 -92
- package/esm2022/lib/aigc/agent/index.mjs +10 -3
- package/esm2022/lib/aigc/avatar/avatar.module.mjs +10 -45
- package/esm2022/lib/aigc/avatar/comp-avatar-particle/avatar.role.mjs +10 -2
- package/esm2022/lib/aigc/avatar/comp-avatar-particle/comp-avatar-particle.component.mjs +10 -315
- package/esm2022/lib/aigc/avatar/comp-avatar-particle/index.mjs +10 -3
- package/esm2022/lib/aigc/avatar/comp-avatar-particle/role-points.class.mjs +10 -57
- package/esm2022/lib/aigc/avatar/comp-avatar-role-image/comp-avatar-role-image.component.mjs +10 -98
- package/esm2022/lib/aigc/avatar/comp-avatar-role-video/comp-avatar-role-video.component.mjs +10 -107
- package/esm2022/lib/aigc/avatar/comp-avatar-talk/comp-avatar-talk.component.mjs +10 -113
- package/esm2022/lib/aigc/avatar/index.mjs +10 -8
- package/esm2022/lib/aigc/avatar/interface-avatar-role.mjs +10 -2
- package/esm2022/lib/aigc/avatar/modal-chat-voice-input/modal-chat-voice-input.component.mjs +8 -164
- package/esm2022/lib/aigc/chat/chat-header-area/comp-header-area.component.mjs +10 -49
- package/esm2022/lib/aigc/chat/chat-header-area/index.mjs +10 -2
- package/esm2022/lib/aigc/chat/chat-list/chat-list.component.mjs +8 -155
- package/esm2022/lib/aigc/chat/chat-list/index.mjs +10 -2
- package/esm2022/lib/aigc/chat/chat-message-area/comp-message-area.component.mjs +10 -40
- package/esm2022/lib/aigc/chat/chat-message-area/index.mjs +10 -2
- package/esm2022/lib/aigc/chat/chat-message-card/comp-message-card.component.mjs +10 -140
- package/esm2022/lib/aigc/chat/chat-message-card/duration-str.pipe.mjs +10 -29
- package/esm2022/lib/aigc/chat/chat-message-card/index.mjs +10 -3
- package/esm2022/lib/aigc/chat/chat-modal-input/index.mjs +10 -3
- package/esm2022/lib/aigc/chat/chat-modal-input/modal-audio-message/modal-audio-message.component.mjs +8 -193
- package/esm2022/lib/aigc/chat/chat-modal-input/modal-input.component.mjs +10 -331
- package/esm2022/lib/aigc/chat/chat-panel/chat-panel.component.mjs +8 -249
- package/esm2022/lib/aigc/chat/comp-role-prompt/comp-role-prompt.component.mjs +10 -83
- package/esm2022/lib/aigc/chat/comp-role-prompt/index.mjs +10 -2
- package/esm2022/lib/aigc/chat/index.mjs +10 -8
- package/esm2022/lib/aigc/comp-markdown-preview/clipboard.service.mjs +10 -82
- package/esm2022/lib/aigc/comp-markdown-preview/markdown-parse.mjs +8 -367
- package/esm2022/lib/aigc/comp-markdown-preview/markdown-preview.component.mjs +10 -51
- package/esm2022/lib/aigc/comp-markdown-preview/markdown-preview.module.mjs +10 -24
- package/esm2022/lib/aigc/comp-markdown-preview/plugins/md-mathjax/index.mjs +10 -115
- package/esm2022/lib/aigc/index.mjs +10 -14
- package/esm2022/lib/aigc/service-fmai/fmai.service.mjs +10 -21
- package/esm2022/lib/aigc/service-fmai/service-chat/chat-class.mjs +10 -2
- package/esm2022/lib/aigc/service-fmai/service-chat/chat.service.mjs +8 -174
- package/esm2022/lib/aigc/service-fmai/service-chat/index.mjs +10 -7
- package/esm2022/lib/aigc/service-fmai/service-chat/mask-list.mjs +9 -194
- package/esm2022/lib/aigc/service-fmai/service-chat/pipes/chat-content.pipe.mjs +10 -27
- package/esm2022/lib/aigc/service-fmai/service-chat/pipes/hidexml.pipe.mjs +10 -27
- package/esm2022/lib/aigc/service-fmai/service-chat/utilnow.pipe.mjs +10 -68
- package/esm2022/lib/aigc/service-fmai/service-imagine/imagine-func.mjs +9 -162
- package/esm2022/lib/aigc/service-fmai/service-imagine/imagine-work.mjs +10 -68
- package/esm2022/lib/aigc/service-fmai/service-imagine/imagine.service.mjs +8 -313
- package/esm2022/lib/aigc/service-fmai/service-imagine/index.mjs +10 -4
- package/esm2022/lib/aigc/story/fm-office-viewer/fm-office-viewer.component.mjs +10 -62
- package/esm2022/lib/aigc/story/fm-story-card/fm-story-card.component.mjs +10 -87
- package/esm2022/lib/aigc/story/fm-story-list/fm-story-list.component.mjs +10 -345
- package/esm2022/lib/aigc/story/fm-story-list/story-preview.mjs +10 -81
- package/esm2022/lib/aigc/story/fm-story-loader/fm-story-loader.component.mjs +10 -152
- package/esm2022/lib/aigc/story/fm-story-splitter/fm-story-splitter.component.mjs +10 -42
- package/esm2022/lib/aigc/story/index.mjs +10 -6
- package/esm2022/lib/aigc/story/modal-chat-story/comp-chat-story-json/comp-chat-story-json.component.mjs +10 -47
- package/esm2022/lib/aigc/story/modal-chat-story/comp-diary-story/comp-diary-story.component.mjs +10 -95
- package/esm2022/lib/aigc/story/modal-chat-story/modal-chat-story.component.mjs +10 -253
- package/esm2022/lib/aigc/story/story.service.mjs +10 -35
- package/esm2022/lib/aigc/voice/fmode-voice.service.mjs +10 -636
- package/esm2022/lib/aigc/voice/index.mjs +10 -7
- package/esm2022/lib/aigc/voice/lib/audio/audio.player.mjs +10 -55
- package/esm2022/lib/aigc/voice/lib/audio/audio.streamer.mjs +10 -2
- package/esm2022/lib/aigc/voice/lib/audio/streamer.microsoft.mjs +10 -96
- package/esm2022/lib/aigc/voice/lib/audio/streamer.pcm.mjs +8 -177
- package/esm2022/lib/aigc/voice/lib/pcm2wav.mjs +10 -38
- package/esm2022/lib/aigc/voice/lib/recorder/extension-waveview.mjs +10 -215
- package/esm2022/lib/aigc/voice/lib/resample.mjs +10 -34
- package/esm2022/lib/aigc/voice/tts/fmode-tts-class.mjs +10 -189
- package/esm2022/lib/aigc/voice/tts/index.mjs +10 -5
- package/esm2022/lib/aigc/voice/tts/int-tts-provider.mjs +10 -2
- package/esm2022/lib/aigc/voice/tts/provider-doubao.mjs +8 -346
- package/esm2022/lib/code/fm-codemirror/fm-codemirror.component.mjs +8 -342
- package/esm2022/lib/code/index.mjs +10 -2
- package/esm2022/lib/core/agent/chat/completion/fmode-completion.mjs +8 -430
- package/esm2022/lib/core/agent/chat/completion/index.mjs +10 -2
- package/esm2022/lib/core/agent/chat/completion/int-gpt-chat-options.mjs +10 -2
- package/esm2022/lib/core/agent/chat/fmode-chat.mjs +8 -617
- package/esm2022/lib/core/agent/chat/index.mjs +10 -4
- package/esm2022/lib/core/agent/chat/interface.mjs +10 -2
- package/esm2022/lib/core/agent/index.mjs +10 -6
- package/esm2022/lib/core/agent/prompt/agent.prompt.mjs +10 -133
- package/esm2022/lib/core/agent/prompt/index.mjs +10 -2
- package/esm2022/lib/core/agent/prompt/prompt-util.mjs +10 -16
- package/esm2022/lib/core/agent/story/agent.story.mjs +10 -64
- package/esm2022/lib/core/agent/story/index.mjs +10 -2
- package/esm2022/lib/core/agent/task/agent.task.mjs +10 -90
- package/esm2022/lib/core/agent/task/index.mjs +10 -2
- package/esm2022/lib/core/agent/waiting/index.mjs +10 -3
- package/esm2022/lib/core/agent/waiting/loading/loading.ctrl.mjs +10 -279
- package/esm2022/lib/core/agent/waiting/tips/tips.ctrl.mjs +8 -190
- package/esm2022/lib/core/index.mjs +10 -4
- package/esm2022/lib/core/parse/datatype/acl.mjs +10 -57
- package/esm2022/lib/core/parse/datatype/file.mjs +10 -69
- package/esm2022/lib/core/parse/datatype/geopoint.mjs +10 -57
- package/esm2022/lib/core/parse/datatype/relation.mjs +10 -56
- package/esm2022/lib/core/parse/fmode.cloud.mjs +10 -0
- package/esm2022/lib/core/parse/fmode.object.mjs +10 -232
- package/esm2022/lib/core/parse/fmode.parse.mjs +10 -84
- package/esm2022/lib/core/parse/fmode.query.mjs +8 -500
- package/esm2022/lib/core/parse/fmode.user.mjs +10 -275
- package/esm2022/lib/core/parse/index.mjs +10 -5
- package/esm2022/lib/core/parse/types.mjs +10 -2
- package/esm2022/lib/core/voice/index.mjs +10 -3
- package/esm2022/lib/core/voice/tts/index.mjs +10 -2
- package/esm2022/lib/icon/filetype/audio.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/avatar.svg.mjs +10 -14
- package/esm2022/lib/icon/filetype/chat.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/docx.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/file.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/filetype.pipe.mjs +10 -57
- package/esm2022/lib/icon/filetype/index.mjs +10 -12
- package/esm2022/lib/icon/filetype/md.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/pdf.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/pptx.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/svgtoblob.mjs +10 -8
- package/esm2022/lib/icon/filetype/video.svg.mjs +10 -3
- package/esm2022/lib/icon/filetype/xlsx.svg.mjs +10 -3
- package/esm2022/lib/icon/index.mjs +10 -2
- package/esm2022/lib/map/comp-poi-picker/comp-poi-picker.component.mjs +10 -209
- package/esm2022/lib/map/comp-poi-picker/comp-poi-picker.module.mjs +10 -33
- package/esm2022/lib/map/index.mjs +10 -4
- package/esm2022/lib/map/map.module.mjs +10 -61
- package/esm2022/lib/map/page-loca-scatter/page-loca-scatter.component.mjs +10 -132
- package/esm2022/lib/map/page-map.start/page-map.start.component.mjs +8 -115
- package/esm2022/lib/map/page-plan-route/page-plan-route.component.mjs +8 -118
- package/esm2022/lib/nova-cloud/index.mjs +10 -3
- package/esm2022/lib/nova-cloud/ncloud-api-func.mjs +10 -91
- package/esm2022/lib/nova-cloud/nova-cloud.service.mjs +10 -53
- package/esm2022/lib/payment/index.mjs +10 -2
- package/esm2022/lib/payment/payment/payment.component.mjs +10 -543
- package/esm2022/lib/payment/payment.service.mjs +10 -202
- package/esm2022/lib/person/comp-person-gender-icon/comp-person-gender-icon.component.mjs +10 -48
- package/esm2022/lib/person/comp-person-item/comp-person-item.component.mjs +10 -29
- package/esm2022/lib/person/comp-person-story/comp-person-story.component.mjs +10 -211
- package/esm2022/lib/person/edit-upload/edit-upload.component.mjs +8 -412
- package/esm2022/lib/person/edit-upload/edit-upload.module.mjs +10 -50
- package/esm2022/lib/person/index.mjs +10 -5
- package/esm2022/lib/person/modal-person-select/modal-person-select.component.mjs +10 -144
- package/esm2022/lib/person/modal-user-verify/secret-text.pipe.mjs +10 -41
- package/esm2022/lib/person/modal-user-verify/user-verify.component.mjs +10 -595
- package/esm2022/lib/person/person-detail/person-detail.component.mjs +10 -172
- package/esm2022/lib/person/person.service.mjs +8 -193
- package/esm2022/lib/platform/cross.service.mjs +10 -62
- package/esm2022/lib/platform/index.mjs +10 -2
- package/esm2022/lib/social/index.mjs +10 -2
- package/esm2022/lib/social/wechat/wechat-jssdk.service.mjs +8 -230
- package/esm2022/lib/storage/comp-hwobs-manager/hwobs-manager.component.mjs +10 -59
- package/esm2022/lib/storage/index.mjs +10 -5
- package/esm2022/lib/storage/service-hwobs/hwobs.service.mjs +8 -131
- package/esm2022/lib/storage/service-hwobs/index.mjs +10 -3
- package/esm2022/lib/storage/service-hwobs/typings/esdk-obs-browser.mjs +1 -1
- package/esm2022/lib/storage/service-upload/index.mjs +10 -2
- package/esm2022/lib/storage/service-upload/nova-upload.service.mjs +8 -513
- package/esm2022/lib/storage/service-upload/util-file-md5.mjs +10 -28
- package/esm2022/lib/storage/service-upload/util-file-metadata.mjs +10 -93
- package/esm2022/lib/storage/storage.module.mjs +10 -42
- package/esm2022/lib/text/fm-article-editor/article-editor-topbar/article-editor-topbar.component.mjs +10 -72
- package/esm2022/lib/text/fm-article-editor/article.service.mjs +10 -237
- package/esm2022/lib/text/fm-article-editor/comp-upload-book-banners/comp-upload-book-banners.component.mjs +8 -72
- package/esm2022/lib/text/fm-article-editor/draft.service.mjs +10 -207
- package/esm2022/lib/text/fm-article-editor/fm-article-aitool/fm-article-aitool.component.mjs +8 -227
- package/esm2022/lib/text/fm-article-editor/fm-article-draft/fm-article-draft.component.mjs +10 -303
- package/esm2022/lib/text/fm-article-editor/fm-article-editor.component.mjs +8 -371
- package/esm2022/lib/text/fm-article-editor/fm-article-outline/fm-article-outline.component.mjs +10 -94
- package/esm2022/lib/text/fm-article-editor/fm-article-outline-leftitem/fm-article-outline-leftitem.component.mjs +10 -36
- package/esm2022/lib/text/fm-article-editor/fm-article-preview/fm-article-preview.component.mjs +10 -281
- package/esm2022/lib/text/fm-article-editor/fm-article-write-options/fm-article-write-options.component.mjs +10 -72
- package/esm2022/lib/text/fm-article-editor/outline-count.pipe.mjs +10 -22
- package/esm2022/lib/text/fm-article-editor/prompt/prompt-insertion-article.mjs +10 -169
- package/esm2022/lib/text/fm-article-editor/task-article-generation.mjs +10 -69
- package/esm2022/lib/text/fm-article-editor/tasks/task-article-draft-create.mjs +10 -65
- package/esm2022/lib/text/fm-article-editor/tasks/task-article-outline-edit.mjs +10 -55
- package/esm2022/lib/text/fm-article-editor/tasks/task-article-outline.mjs +10 -142
- package/esm2022/lib/text/fm-article-editor/tasks/task-article-preview.mjs +10 -35
- package/esm2022/lib/text/fm-article-editor/tasks/task-article-writing-options.mjs +10 -81
- package/esm2022/lib/text/fm-article-editor/tasks/task-document-select.mjs +10 -50
- package/esm2022/lib/text/fm-text-quill/fm-text-quill.component.mjs +10 -145
- package/esm2022/lib/text/index.mjs +10 -4
- package/esm2022/lib/user/account/account.service.mjs +10 -222
- package/esm2022/lib/user/captcha/captcha.component.mjs +10 -135
- package/esm2022/lib/user/comp-user-avatar/comp-user-avatar.component.mjs +10 -66
- package/esm2022/lib/user/index.mjs +10 -17
- package/esm2022/lib/user/login/auth.guard.mjs +10 -28
- package/esm2022/lib/user/login/auth.service.mjs +8 -433
- package/esm2022/lib/user/login/login.component.mjs +10 -916
- package/esm2022/lib/user/modal-user-login/modal-user-login.component.mjs +10 -311
- package/esm2022/lib/user/profile/auth-profile.guard.mjs +10 -27
- package/esm2022/lib/user/profile/auth-profile.service.mjs +10 -122
- package/esm2022/lib/user/profile/profile-bind/profile-bind.component.mjs +10 -164
- package/esm2022/lib/user/profile/profile-bind/profile-confirm-modal.component.mjs +10 -79
- package/esm2022/lib/user/profile/profile.module.mjs +10 -54
- package/esm2022/lib/user/staff/index.mjs +10 -4
- package/esm2022/lib/user/staff/staff.guard.mjs +10 -26
- package/esm2022/lib/user/staff/staff.module.mjs +10 -18
- package/esm2022/lib/user/staff/staff.service.mjs +10 -85
- package/esm2022/lib/user/user-name.pipe.mjs +10 -29
- package/esm2022/lib/user/user.module.mjs +10 -102
- package/esm2022/lib/video/fm-video/fm-video.component.mjs +10 -67
- package/esm2022/lib/video/index.mjs +10 -2
- package/esm2022/public-api.mjs +10 -21
- package/fesm2022/fmode-ng.mjs +7 -19788
- package/fesm2022/fmode-ng.mjs.map +1 -1
- package/lib/aigc/avatar/comp-avatar-role-image/comp-avatar-role-image.component.d.ts +2 -2
- package/lib/aigc/avatar/comp-avatar-role-video/comp-avatar-role-video.component.d.ts +2 -2
- package/lib/aigc/avatar/comp-avatar-talk/comp-avatar-talk.component.d.ts +2 -2
- package/lib/aigc/chat/chat-list/chat-list.component.d.ts +3 -2
- package/lib/aigc/chat/chat-message-card/comp-message-card.component.d.ts +3 -3
- package/lib/aigc/chat/chat-modal-input/modal-audio-message/modal-audio-message.component.d.ts +2 -2
- package/lib/aigc/chat/chat-modal-input/modal-input.component.d.ts +3 -3
- package/lib/aigc/service-fmai/service-imagine/imagine-func.d.ts +3 -3
- package/lib/aigc/service-fmai/service-imagine/imagine-work.d.ts +4 -4
- package/lib/aigc/service-fmai/service-imagine/imagine.service.d.ts +6 -6
- package/lib/aigc/story/fm-office-viewer/fm-office-viewer.component.d.ts +2 -2
- package/lib/aigc/story/fm-story-card/fm-story-card.component.d.ts +2 -1
- package/lib/aigc/story/fm-story-list/fm-story-list.component.d.ts +6 -6
- package/lib/aigc/story/fm-story-list/story-preview.d.ts +4 -4
- package/lib/aigc/story/fm-story-loader/fm-story-loader.component.d.ts +3 -3
- package/lib/aigc/story/fm-story-splitter/fm-story-splitter.component.d.ts +2 -2
- package/lib/aigc/story/modal-chat-story/comp-chat-story-json/comp-chat-story-json.component.d.ts +3 -2
- package/lib/aigc/story/modal-chat-story/comp-diary-story/comp-diary-story.component.d.ts +3 -2
- package/lib/aigc/story/modal-chat-story/modal-chat-story.component.d.ts +6 -6
- package/lib/aigc/story/story.service.d.ts +3 -2
- package/lib/aigc/voice/tts/fmode-tts-class.d.ts +2 -2
- package/lib/core/agent/chat/fmode-chat.d.ts +11 -11
- package/lib/core/agent/story/agent.story.d.ts +8 -8
- package/lib/core/parse/datatype/geopoint.d.ts +5 -1
- package/lib/core/parse/fmode.cloud.d.ts +32 -0
- package/lib/core/parse/fmode.object.d.ts +2 -2
- package/lib/core/parse/fmode.parse.d.ts +15 -9
- package/lib/core/parse/fmode.query.d.ts +41 -2
- package/lib/core/parse/fmode.user.d.ts +1 -0
- package/lib/core/parse/index.d.ts +1 -0
- package/lib/core/parse/types.d.ts +2 -0
- package/lib/map/comp-poi-picker/comp-poi-picker.component.d.ts +5 -5
- package/lib/payment/payment/payment.component.d.ts +3 -3
- package/lib/payment/payment.service.d.ts +4 -4
- package/lib/person/comp-person-gender-icon/comp-person-gender-icon.component.d.ts +2 -1
- package/lib/person/comp-person-item/comp-person-item.component.d.ts +2 -1
- package/lib/person/comp-person-story/comp-person-story.component.d.ts +13 -13
- package/lib/person/edit-upload/edit-upload.component.d.ts +1 -1
- package/lib/person/modal-person-select/modal-person-select.component.d.ts +5 -5
- package/lib/person/modal-user-verify/user-verify.component.d.ts +5 -5
- package/lib/person/person-detail/person-detail.component.d.ts +4 -4
- package/lib/person/person.service.d.ts +7 -7
- package/lib/storage/service-hwobs/hwobs.service.d.ts +4 -5
- package/lib/storage/service-upload/nova-upload.service.d.ts +5 -5
- package/lib/text/fm-article-editor/article-editor-topbar/article-editor-topbar.component.d.ts +2 -1
- package/lib/text/fm-article-editor/article.service.d.ts +12 -12
- package/lib/text/fm-article-editor/draft.service.d.ts +5 -5
- package/lib/text/fm-article-editor/fm-article-aitool/fm-article-aitool.component.d.ts +3 -2
- package/lib/text/fm-article-editor/fm-article-draft/fm-article-draft.component.d.ts +16 -17
- package/lib/text/fm-article-editor/fm-article-editor.component.d.ts +3 -3
- package/lib/text/fm-article-editor/fm-article-outline/fm-article-outline.component.d.ts +11 -10
- package/lib/text/fm-article-editor/fm-article-preview/fm-article-preview.component.d.ts +2 -2
- package/lib/text/fm-article-editor/prompt/prompt-insertion-article.d.ts +3 -3
- package/lib/text/fm-article-editor/task-article-generation.d.ts +5 -4
- package/lib/text/fm-article-editor/tasks/task-article-draft-create.d.ts +3 -3
- package/lib/text/fm-article-editor/tasks/task-article-outline-edit.d.ts +3 -3
- package/lib/text/fm-article-editor/tasks/task-article-outline.d.ts +3 -3
- package/lib/text/fm-article-editor/tasks/task-article-preview.d.ts +2 -1
- package/lib/text/fm-article-editor/tasks/task-article-writing-options.d.ts +3 -3
- package/lib/text/fm-article-editor/tasks/task-document-select.d.ts +3 -3
- package/lib/user/account/account.service.d.ts +2 -2
- package/lib/user/comp-user-avatar/comp-user-avatar.component.d.ts +2 -2
- package/lib/user/login/auth.service.d.ts +5 -5
- package/lib/user/login/login.component.d.ts +3 -3
- package/lib/user/profile/auth-profile.service.d.ts +8 -8
- package/lib/user/profile/profile-bind/profile-bind.component.d.ts +7 -7
- package/lib/user/profile/profile-bind/profile-confirm-modal.component.d.ts +2 -2
- package/lib/user/staff/staff.service.d.ts +3 -3
- package/lib/user/user-name.pipe.d.ts +2 -2
- package/package.json +12 -18
|
@@ -1,140 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { ClipboardService } from '../../comp-markdown-preview/clipboard.service';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { DurationStrPipe } from './duration-str.pipe';
|
|
12
|
-
import { addIcons } from 'ionicons';
|
|
13
|
-
import { wifiOutline, copyOutline } from 'ionicons/icons';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "../../comp-markdown-preview/clipboard.service";
|
|
16
|
-
import * as i2 from "@angular/common";
|
|
17
|
-
import * as i3 from "../../comp-markdown-preview/markdown-preview.component";
|
|
18
|
-
addIcons({ wifiOutline, copyOutline });
|
|
19
|
-
export class FmChatMessageCard {
|
|
20
|
-
ngOnChanges() {
|
|
21
|
-
if (this.chat?.isTalkMode && this.message?.role === 'assistant' && !this.message?.complete) {
|
|
22
|
-
this.isLoadingText = true;
|
|
23
|
-
this.messageText$.next('正在加载中...');
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this.isLoadingText = false;
|
|
27
|
-
this.messageText$.next(getMessageContentText(this.message?.content));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
constructor(copyServ) {
|
|
31
|
-
this.copyServ = copyServ;
|
|
32
|
-
this.messageText$ = new BehaviorSubject('');
|
|
33
|
-
this.isLoadingText = true;
|
|
34
|
-
this.user = Parse.User.current();
|
|
35
|
-
}
|
|
36
|
-
// 切换播放状态
|
|
37
|
-
// Modify the toggleVoicePlay method:
|
|
38
|
-
async toggleVoicePlay() {
|
|
39
|
-
if (this.message?.voice?.id) {
|
|
40
|
-
if (this.chat.VoiceTTSMap[this.message?.voice?.id]) {
|
|
41
|
-
this.tts = this.chat.VoiceTTSMap[this.message?.voice?.id];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (this.tts?.isPlaying) {
|
|
45
|
-
this.tts?.stop();
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
// Reset loading state when starting new playback
|
|
49
|
-
if (this.chat?.isTalkMode && this.message?.role === 'assistant') {
|
|
50
|
-
this.isLoadingText = true;
|
|
51
|
-
this.messageText$.next('正在加载中...');
|
|
52
|
-
}
|
|
53
|
-
let needUpdate = false;
|
|
54
|
-
let voice;
|
|
55
|
-
if (this.message?.voice?.id) {
|
|
56
|
-
let query = new Parse.Query("ChatVoice");
|
|
57
|
-
query.include("voiceFile");
|
|
58
|
-
voice = await query.get(this.message?.voice?.id);
|
|
59
|
-
}
|
|
60
|
-
if (!voice?.id) {
|
|
61
|
-
let item = await this.chat.getVoiceByContentText(this.message?.content);
|
|
62
|
-
voice = this.chat.voiceMap[item?.id];
|
|
63
|
-
this.message.voice = { id: voice?.id, duration: voice?.get("duration") };
|
|
64
|
-
needUpdate = true;
|
|
65
|
-
}
|
|
66
|
-
if (!this.message?.voice?.duration) {
|
|
67
|
-
this.message.voice.duration = voice?.get("duration");
|
|
68
|
-
needUpdate = true;
|
|
69
|
-
}
|
|
70
|
-
if (needUpdate) {
|
|
71
|
-
this.saveSession();
|
|
72
|
-
}
|
|
73
|
-
await this.chat.playChatVoice(voice, {
|
|
74
|
-
onStart: (playedVoice) => {
|
|
75
|
-
// When voice starts playing, show the full message
|
|
76
|
-
if (this.chat?.isTalkMode && this.message?.role === 'assistant') {
|
|
77
|
-
setTimeout(() => {
|
|
78
|
-
this.isLoadingText = false;
|
|
79
|
-
this.messageText$.next(getMessageContentText(this.message?.content));
|
|
80
|
-
}, 600); // 延迟到开始播放声音后显示文字
|
|
81
|
-
}
|
|
82
|
-
if (voice?.id != playedVoice?.id) {
|
|
83
|
-
// Handle case where wrong voice is playing
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
onLoaded: (audio) => {
|
|
87
|
-
this.message.voice.duration = audio.duration * 1000;
|
|
88
|
-
this.updateVoiceDuration(audio.duration * 1000);
|
|
89
|
-
},
|
|
90
|
-
onResult: (result) => {
|
|
91
|
-
console.log("onResult", result);
|
|
92
|
-
if (result?.duration) {
|
|
93
|
-
this.message.voice.duration = result?.duration;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
onStop: (playedVoice) => {
|
|
97
|
-
if (voice?.id != playedVoice?.id) {
|
|
98
|
-
// Handle stop event
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
this.tts = this.chat.VoiceTTSMap[voice?.id];
|
|
103
|
-
}
|
|
104
|
-
updateVoiceDuration(duration) {
|
|
105
|
-
if (!this.message?.voice?.duration) {
|
|
106
|
-
this.message.voice.duration = duration;
|
|
107
|
-
this.saveSession();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
saveSession() {
|
|
111
|
-
if (this.index >= 2 || this.index === undefined) { // 未定义或序号第三项开始,自动保存Session(0.系统 1.问候 2.用户)
|
|
112
|
-
this.chat?.saveChatSession(); // 保存消息语音
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
async copy() {
|
|
116
|
-
this.copyServ.copyToClipboard(getMessageContentText(this.message?.content));
|
|
117
|
-
}
|
|
118
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FmChatMessageCard, deps: [{ token: i1.ClipboardService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
119
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FmChatMessageCard, isStandalone: true, selector: "fm-chat-message-card", inputs: { index: "index", message: "message", role: "role", chat: "chat" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"message-card\" [class.right]=\"message?.role=='user'\" [class.center]=\"message?.role=='system'\">\r\n <!-- \u7528\u6237\u53CA\u64CD\u4F5C\u533A -->\r\n <div class=\"item-row user\" *ngIf=\"message?.role!='system'\"> <!-- \u7CFB\u7EDF\u6D88\u606F\u4E0D\u663E\u793A\u5934\u50CF -->\r\n <div class=\"avatar-row\">\r\n <div class=\"actions\">\r\n <!-- \u5237\u65B0 -->\r\n <!-- <ion-button fill=\"outline\" slot=\"start\">\r\n <ion-icon name=\"refresh-outline\"></ion-icon> \r\n </ion-button> -->\r\n <!-- \u590D\u5236 -->\r\n <ion-button size=\"small\" fill=\"outline\" slot=\"start\" (click)=\"copy()\">\r\n <ion-icon name=\"copy-outline\"></ion-icon>\r\n </ion-button>\r\n <!-- \u7F16\u8F91 -->\r\n <!-- <ion-button fill=\"outline\" slot=\"start\">\r\n <ion-icon name=\"create-outline\"></ion-icon>\r\n </ion-button> -->\r\n </div>\r\n <!-- \u66F4\u65B0\u97F3\u9891\u6D88\u606F\u533A\u57DF -->\r\n <div *ngIf=\"((message?.role=='assistant' && chat?.role?.get('voiceConfig')?.voice) || (message?.role=='user'&&message?.voice))\" \r\n class=\"play-voice\" \r\n (click)=\"!isLoadingText && toggleVoicePlay()\"\r\n [class.loading-voice]=\"chat?.isTalkMode && isLoadingText\">\r\n\r\n <div class=\"voice-button\">\r\n <!-- \u52A0\u8F7D\u65F6\u663E\u793Aspinner\uFF0C\u5426\u5219\u663E\u793Awifi\u56FE\u6807 -->\r\n <ion-spinner *ngIf=\"chat?.isTalkMode && isLoadingText\" name=\"lines\" class=\"loading-spinner\"></ion-spinner>\r\n <ion-icon *ngIf=\"!(chat?.isTalkMode && isLoadingText)\" name=\"wifi-outline\"\r\n [style.transform]=\"message?.role=='user'?'rotate(-90deg)':'rotate(90deg)'\"\r\n class=\"audio-icon\" \r\n [class.play-voice-playing]=\"tts?.isPlaying\"></ion-icon>\r\n </div>\r\n <div class=\"voice-info\">\r\n <span *ngIf=\"message?.voice?.duration && !isLoadingText\">\r\n {{((message?.voice?.duration||0)/1000) | durationStr}}\r\n </span>\r\n </div>\r\n </div>\r\n <!-- \u5934\u50CF\u533A\u57DF --> \r\n <img class=\"avatar\" *ngIf=\"message?.role!='user'\" [src]=\"(chat?.role?.get('avatar') || chat?.role?.get('thumb') || 'https://file-cloud.fmode.cn/E4KpGvTEto/20230930/l413e6090731854.png')+'?'+'x-image-process=image/resize,m_fixed,w_100'+'&imageView2/1/w/100/h/100'\" >\r\n <app-comp-user-avatar [user]=\"user\" *ngIf=\"message?.role=='user'\"></app-comp-user-avatar>\r\n </div>\r\n </div>\r\n <!-- \u9644\u4EF6\uFF1A\u56FE\u7247 -->\r\n <div class=\"item-row images\" *ngIf=\"message?.content | chatContent:'image_url'\">\r\n <img [src]=\"message?.content | chatContent:'image_url'\" alt=\"\">\r\n </div>\r\n <!-- \u804A\u5929\u6C14\u6CE1 -->\r\n <!-- Replace the bubble section with this: -->\r\n <div class=\"item-row bubble\" [style.fontSize]=\"role?.get('uiConfig')?.message?.bubble?.fontSize || '0.8rem'\">\r\n <!-- \u8BF4\u8BDD\u6A21\u5F0F\uFF1A\u5C55\u793A\u52A0\u8F7D\u72B6\u6001 Show loading state for talk mode when message is not complete -->\r\n \r\n <!-- Show normal content for non-talk mode or when loading is complete -->\r\n <ng-container *ngIf=\"!chat?.isTalkMode || message?.role !== 'assistant' || !isLoadingText\">\r\n <fm-markdown-preview *ngIf=\"!message?.complete\" class=\"content-style\" \r\n [content]=\"message?.content | chatContent\" [render]=\"false\"></fm-markdown-preview>\r\n <fm-markdown-preview *ngIf=\"message?.complete\" \r\n [content]=\"message?.content | chatContent\"></fm-markdown-preview>\r\n </ng-container>\r\n </div>\r\n <!-- \u65F6\u95F4\u663E\u793A -->\r\n <div class=\"item-row loading\" *ngIf=\"message?.role!='system' && !message?.complete\">\r\n \u6B63\u5728\u8F93\u5165<ion-spinner name=\"dots\"></ion-spinner>\r\n </div>\r\n\r\n <div class=\"item-row created\" *ngIf=\"message?.createdAt\">\r\n <span>{{message?.createdAt | date:\"dd/MM/yy HH:mm\"}}</span>\r\n </div>\r\n</div>", styles: ["@charset \"UTF-8\";:host-context(body.dark) .message-card .actions .item-native{background:none!important}:host-context(body.dark) .message-card .bubble{color:#0e101d}:host-context(body.dark) .message-card .bubble .content-style{filter:invert(1)!important}:host-context(body.dark) .message-card .bubble fm-markdown-preview{filter:invert(1)!important}:host-context(body.dark) .message-card .play-voice{background-color:#0e101d}:host-context(body.dark) .message-card .play-voice .voice-info{color:#fff}:host-context(body.dark) .message-card .right .bubble{color:#921f8a!important;background:#921f8a!important}:host-context(body.dark) .message-card .right .play-voice{background:#921f8a!important}:host-context(body.dark) .message-card .created span{color:#fff}@media screen and (max-width: 800px){.message-card:focus .actions{opacity:1!important}}.message-card:hover .actions{opacity:1;transition:opacity .3s ease-in-out}.message-card{display:flex;flex-wrap:wrap;justify-content:start;align-items:flex-start}.message-card .avatar-row{width:300px;height:32px;display:flex;flex-direction:row-reverse;justify-content:start;align-items:center}.message-card .actions{display:flex;opacity:0;padding-left:10px;padding-right:10px}.message-card .item-row{display:flex;flex:100%;justify-content:start;margin-bottom:5px}.message-card .images img{max-width:300px}.message-card .bubble{display:flex;justify-content:center;max-width:100%;padding:.5rem .5rem 0rem;color:#333;flex:none;border-radius:0 1.5em 1.5em/0em 1.5em 1.5em;color:#fff;background-color:currentColor}.message-card .bubble.loading{color:var(--gray-secondary)}.message-card .bubble.loading .content-style{filter:none}.message-card .bubble .content-style{filter:grayscale(1) contrast(999) invert(1)}.message-card .loading{text-align:right;color:#101010}.message-card .created{display:flex}.message-card .created span{font-size:12px;opacity:.4;white-space:nowrap;transition:all .6s ease;color:var(--black);text-align:center;width:100%;box-sizing:border-box;padding-right:10px;pointer-events:none;z-index:1}.right{justify-content:end;align-items:flex-end}.right .avatar-row{flex-direction:row;justify-content:end;width:auto}.right .actions{position:relative;margin-left:0}.right .item-row{justify-content:end}.right .bubble{color:#bbdefb;border-top-left-radius:1.5em;border-top-right-radius:0}.right .play-voice{flex-direction:row-reverse;background-color:#bbdefb}.center{justify-content:center;align-items:center}.center .item-row{justify-content:center}.center .bubble{color:var(--gray-secondary);border-top-left-radius:1.5em;border-top-right-radius:1.5em;font-size:12px;font-weight:100;padding:5px 20px}.play-voice{min-width:100px;height:32px;display:flex;justify-content:space-around;align-items:center;background-color:#fff;border-radius:7px}.play-voice .voice-button{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.play-voice .voice-button span{overflow:hidden;font-size:18px;color:#ff69b4}.play-voice .voice-info{height:32px;display:flex;padding:0 10px;justify-content:end;align-items:center;color:#333}.avatar{border-radius:50%;width:32px;height:32px;object-fit:cover}.audio-icon{color:#ff69b4;font-size:18px}.play-voice-playing{animation:play-voice-animation 1s infinite}@keyframes play-voice-animation{0%{width:0}to{width:32px}}.content-style.loading-text{color:#666;font-style:italic}.play-voice{transition:opacity .3s ease}.play-voice.loading-voice{opacity:.8;cursor:not-allowed}.play-voice.loading-voice .loading-spinner{width:18px;height:18px;color:var(--gray-secondary)}.play-voice.loading-voice .loading-text{font-size:.8em;color:var(--gray-secondary);margin-left:5px}.play-voice .voice-button{display:flex;align-items:center;justify-content:center;width:24px;height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "component", type: CompUserAvatarComponent, selector: "app-comp-user-avatar", inputs: ["user"] }, { kind: "ngmodule", type: MarkdownPreviewModule }, { kind: "component", type: i3.MarkdownPreviewComponent, selector: "fm-markdown-preview", inputs: ["content", "render"] }, { kind: "pipe", type: ChatContentPipe, name: "chatContent" }, { kind: "pipe", type: DurationStrPipe, name: "durationStr" }] }); }
|
|
120
|
-
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FmChatMessageCard, decorators: [{
|
|
122
|
-
type: Component,
|
|
123
|
-
args: [{ selector: 'fm-chat-message-card', standalone: true, imports: [
|
|
124
|
-
CommonModule, IonItem,
|
|
125
|
-
CompUserAvatarComponent, MarkdownPreviewModule,
|
|
126
|
-
IonAvatar,
|
|
127
|
-
ChatContentPipe,
|
|
128
|
-
NzSanitizerPipe,
|
|
129
|
-
DurationStrPipe
|
|
130
|
-
], template: "<div class=\"message-card\" [class.right]=\"message?.role=='user'\" [class.center]=\"message?.role=='system'\">\r\n <!-- \u7528\u6237\u53CA\u64CD\u4F5C\u533A -->\r\n <div class=\"item-row user\" *ngIf=\"message?.role!='system'\"> <!-- \u7CFB\u7EDF\u6D88\u606F\u4E0D\u663E\u793A\u5934\u50CF -->\r\n <div class=\"avatar-row\">\r\n <div class=\"actions\">\r\n <!-- \u5237\u65B0 -->\r\n <!-- <ion-button fill=\"outline\" slot=\"start\">\r\n <ion-icon name=\"refresh-outline\"></ion-icon> \r\n </ion-button> -->\r\n <!-- \u590D\u5236 -->\r\n <ion-button size=\"small\" fill=\"outline\" slot=\"start\" (click)=\"copy()\">\r\n <ion-icon name=\"copy-outline\"></ion-icon>\r\n </ion-button>\r\n <!-- \u7F16\u8F91 -->\r\n <!-- <ion-button fill=\"outline\" slot=\"start\">\r\n <ion-icon name=\"create-outline\"></ion-icon>\r\n </ion-button> -->\r\n </div>\r\n <!-- \u66F4\u65B0\u97F3\u9891\u6D88\u606F\u533A\u57DF -->\r\n <div *ngIf=\"((message?.role=='assistant' && chat?.role?.get('voiceConfig')?.voice) || (message?.role=='user'&&message?.voice))\" \r\n class=\"play-voice\" \r\n (click)=\"!isLoadingText && toggleVoicePlay()\"\r\n [class.loading-voice]=\"chat?.isTalkMode && isLoadingText\">\r\n\r\n <div class=\"voice-button\">\r\n <!-- \u52A0\u8F7D\u65F6\u663E\u793Aspinner\uFF0C\u5426\u5219\u663E\u793Awifi\u56FE\u6807 -->\r\n <ion-spinner *ngIf=\"chat?.isTalkMode && isLoadingText\" name=\"lines\" class=\"loading-spinner\"></ion-spinner>\r\n <ion-icon *ngIf=\"!(chat?.isTalkMode && isLoadingText)\" name=\"wifi-outline\"\r\n [style.transform]=\"message?.role=='user'?'rotate(-90deg)':'rotate(90deg)'\"\r\n class=\"audio-icon\" \r\n [class.play-voice-playing]=\"tts?.isPlaying\"></ion-icon>\r\n </div>\r\n <div class=\"voice-info\">\r\n <span *ngIf=\"message?.voice?.duration && !isLoadingText\">\r\n {{((message?.voice?.duration||0)/1000) | durationStr}}\r\n </span>\r\n </div>\r\n </div>\r\n <!-- \u5934\u50CF\u533A\u57DF --> \r\n <img class=\"avatar\" *ngIf=\"message?.role!='user'\" [src]=\"(chat?.role?.get('avatar') || chat?.role?.get('thumb') || 'https://file-cloud.fmode.cn/E4KpGvTEto/20230930/l413e6090731854.png')+'?'+'x-image-process=image/resize,m_fixed,w_100'+'&imageView2/1/w/100/h/100'\" >\r\n <app-comp-user-avatar [user]=\"user\" *ngIf=\"message?.role=='user'\"></app-comp-user-avatar>\r\n </div>\r\n </div>\r\n <!-- \u9644\u4EF6\uFF1A\u56FE\u7247 -->\r\n <div class=\"item-row images\" *ngIf=\"message?.content | chatContent:'image_url'\">\r\n <img [src]=\"message?.content | chatContent:'image_url'\" alt=\"\">\r\n </div>\r\n <!-- \u804A\u5929\u6C14\u6CE1 -->\r\n <!-- Replace the bubble section with this: -->\r\n <div class=\"item-row bubble\" [style.fontSize]=\"role?.get('uiConfig')?.message?.bubble?.fontSize || '0.8rem'\">\r\n <!-- \u8BF4\u8BDD\u6A21\u5F0F\uFF1A\u5C55\u793A\u52A0\u8F7D\u72B6\u6001 Show loading state for talk mode when message is not complete -->\r\n \r\n <!-- Show normal content for non-talk mode or when loading is complete -->\r\n <ng-container *ngIf=\"!chat?.isTalkMode || message?.role !== 'assistant' || !isLoadingText\">\r\n <fm-markdown-preview *ngIf=\"!message?.complete\" class=\"content-style\" \r\n [content]=\"message?.content | chatContent\" [render]=\"false\"></fm-markdown-preview>\r\n <fm-markdown-preview *ngIf=\"message?.complete\" \r\n [content]=\"message?.content | chatContent\"></fm-markdown-preview>\r\n </ng-container>\r\n </div>\r\n <!-- \u65F6\u95F4\u663E\u793A -->\r\n <div class=\"item-row loading\" *ngIf=\"message?.role!='system' && !message?.complete\">\r\n \u6B63\u5728\u8F93\u5165<ion-spinner name=\"dots\"></ion-spinner>\r\n </div>\r\n\r\n <div class=\"item-row created\" *ngIf=\"message?.createdAt\">\r\n <span>{{message?.createdAt | date:\"dd/MM/yy HH:mm\"}}</span>\r\n </div>\r\n</div>", styles: ["@charset \"UTF-8\";:host-context(body.dark) .message-card .actions .item-native{background:none!important}:host-context(body.dark) .message-card .bubble{color:#0e101d}:host-context(body.dark) .message-card .bubble .content-style{filter:invert(1)!important}:host-context(body.dark) .message-card .bubble fm-markdown-preview{filter:invert(1)!important}:host-context(body.dark) .message-card .play-voice{background-color:#0e101d}:host-context(body.dark) .message-card .play-voice .voice-info{color:#fff}:host-context(body.dark) .message-card .right .bubble{color:#921f8a!important;background:#921f8a!important}:host-context(body.dark) .message-card .right .play-voice{background:#921f8a!important}:host-context(body.dark) .message-card .created span{color:#fff}@media screen and (max-width: 800px){.message-card:focus .actions{opacity:1!important}}.message-card:hover .actions{opacity:1;transition:opacity .3s ease-in-out}.message-card{display:flex;flex-wrap:wrap;justify-content:start;align-items:flex-start}.message-card .avatar-row{width:300px;height:32px;display:flex;flex-direction:row-reverse;justify-content:start;align-items:center}.message-card .actions{display:flex;opacity:0;padding-left:10px;padding-right:10px}.message-card .item-row{display:flex;flex:100%;justify-content:start;margin-bottom:5px}.message-card .images img{max-width:300px}.message-card .bubble{display:flex;justify-content:center;max-width:100%;padding:.5rem .5rem 0rem;color:#333;flex:none;border-radius:0 1.5em 1.5em/0em 1.5em 1.5em;color:#fff;background-color:currentColor}.message-card .bubble.loading{color:var(--gray-secondary)}.message-card .bubble.loading .content-style{filter:none}.message-card .bubble .content-style{filter:grayscale(1) contrast(999) invert(1)}.message-card .loading{text-align:right;color:#101010}.message-card .created{display:flex}.message-card .created span{font-size:12px;opacity:.4;white-space:nowrap;transition:all .6s ease;color:var(--black);text-align:center;width:100%;box-sizing:border-box;padding-right:10px;pointer-events:none;z-index:1}.right{justify-content:end;align-items:flex-end}.right .avatar-row{flex-direction:row;justify-content:end;width:auto}.right .actions{position:relative;margin-left:0}.right .item-row{justify-content:end}.right .bubble{color:#bbdefb;border-top-left-radius:1.5em;border-top-right-radius:0}.right .play-voice{flex-direction:row-reverse;background-color:#bbdefb}.center{justify-content:center;align-items:center}.center .item-row{justify-content:center}.center .bubble{color:var(--gray-secondary);border-top-left-radius:1.5em;border-top-right-radius:1.5em;font-size:12px;font-weight:100;padding:5px 20px}.play-voice{min-width:100px;height:32px;display:flex;justify-content:space-around;align-items:center;background-color:#fff;border-radius:7px}.play-voice .voice-button{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.play-voice .voice-button span{overflow:hidden;font-size:18px;color:#ff69b4}.play-voice .voice-info{height:32px;display:flex;padding:0 10px;justify-content:end;align-items:center;color:#333}.avatar{border-radius:50%;width:32px;height:32px;object-fit:cover}.audio-icon{color:#ff69b4;font-size:18px}.play-voice-playing{animation:play-voice-animation 1s infinite}@keyframes play-voice-animation{0%{width:0}to{width:32px}}.content-style.loading-text{color:#666;font-style:italic}.play-voice{transition:opacity .3s ease}.play-voice.loading-voice{opacity:.8;cursor:not-allowed}.play-voice.loading-voice .loading-spinner{width:18px;height:18px;color:var(--gray-secondary)}.play-voice.loading-voice .loading-text{font-size:.8em;color:var(--gray-secondary);margin-left:5px}.play-voice .voice-button{display:flex;align-items:center;justify-content:center;width:24px;height:24px}\n"] }]
|
|
131
|
-
}], ctorParameters: () => [{ type: i1.ClipboardService }], propDecorators: { index: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], message: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}], role: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}], chat: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}] } });
|
|
140
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcC1tZXNzYWdlLWNhcmQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZm1vZGUtbmcvc3JjL2xpYi9haWdjL2NoYXQvY2hhdC1tZXNzYWdlLWNhcmQvY29tcC1tZXNzYWdlLWNhcmQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZm1vZGUtbmcvc3JjL2xpYi9haWdjL2NoYXQvY2hhdC1tZXNzYWdlLWNhcmQvY29tcC1tZXNzYWdlLWNhcmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6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cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhY3Rpb25zXCI+XHJcbiAgICAgICAgICAgICAgICA8IS0tIOWIt+aWsCAtLT5cclxuICAgICAgICAgICAgICAgIDwhLS0gPGlvbi1idXR0b24gZmlsbD1cIm91dGxpbmVcIiBzbG90PVwic3RhcnRcIj5cclxuICAgICAgICAgICAgICAgICAgICA8aW9uLWljb24gbmFtZT1cInJlZnJlc2gtb3V0bGluZVwiPjwvaW9uLWljb24+IFxyXG4gICAgICAgICAgICAgICAgPC9pb24tYnV0dG9uPiAtLT5cclxuICAgICAgICAgICAgICAgIDwhLS0g5aSN5Yi2IC0tPlxyXG4gICAgICAgICAgICAgICAgPGlvbi1idXR0b24gc2l6ZT1cInNtYWxsXCIgZmlsbD1cIm91dGxpbmVcIiBzbG90PVwic3RhcnRcIiAoY2xpY2spPVwiY29weSgpXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGlvbi1pY29uIG5hbWU9XCJjb3B5LW91dGxpbmVcIj48L2lvbi1pY29uPlxyXG4gICAgICAgICAgICAgICAgPC9pb24tYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgPCEtLSDnvJbovpEgLS0+XHJcbiAgICAgICAgICAgICAgICA8IS0tIDxpb24tYnV0dG9uIGZpbGw9XCJvdXRsaW5lXCIgc2xvdD1cInN0YXJ0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGlvbi1pY29uIG5hbWU9XCJjcmVhdGUtb3V0bGluZVwiPjwvaW9uLWljb24+XHJcbiAgICAgICAgICAgICAgICA8L2lvbi1idXR0b24+IC0tPlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPCEtLSDmm7TmlrDpn7PpopHmtojmga/ljLrln58gLS0+XHJcbiAgICAgICAgICAgIDxkaXYgKm5nSWY9XCIoKG1lc3NhZ2U/LnJvbGU9PSdhc3Npc3RhbnQnICYmIGNoYXQ/LnJvbGU/LmdldCgndm9pY2VDb25maWcnKT8udm9pY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ICAgICAgICAgICAgPGZtLW1hcmtkb3duLXByZXZpZXcgKm5nSWY9XCJtZXNzYWdlPy5jb21wbGV0ZVwiIFxyXG4gICAgICAgICAgICAgICAgW2NvbnRlbnRdPVwibWVzc2FnZT8uY29udGVudCB8IGNoYXRDb250ZW50XCI+PC9mbS1tYXJrZG93bi1wcmV2aWV3PlxyXG4gICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgPC9kaXY+XHJcbiAgICA8IS0tIOaXtumXtOaYvuekuiAtLT5cclxuICAgIDxkaXYgY2xhc3M9XCJpdGVtLXJvdyBsb2FkaW5nXCIgKm5nSWY9XCJtZXNzYWdlPy5yb2xlIT0nc3lzdGVtJyAmJiAhbWVzc2FnZT8uY29tcGxldGVcIj5cclxuICAgICAgICDmraPlnKjovpPlhaU8aW9uLXNwaW5uZXIgbmFtZT1cImRvdHNcIj48L2lvbi1zcGlubmVyPlxyXG4gICAgPC9kaXY+XHJcblxyXG4gICAgPGRpdiBjbGFzcz1cIml0ZW0tcm93IGNyZWF0ZWRcIiAqbmdJZj1cIm1lc3NhZ2U/LmNyZWF0ZWRBdFwiPlxyXG4gICAgICAgIDxzcGFuPnt7bWVzc2FnZT8uY3JlYXRlZEF0IHwgZGF0ZTpcImRkL01NL3l5IEhIOm1tXCJ9fTwvc3Bhbj5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj4iXX0=
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @copyright © 未来飞马 © 未来全栈 www.fmode.cn
|
|
4
|
+
* 版权所有 © 未来飞马 © 江西脑控科技有限公司 Copyright © Fmode Technology Co., Ltd.
|
|
5
|
+
* 保留所有权利 All Rights Reserved.
|
|
6
|
+
* /home/ryan/workspace/nova/nova-admin/dist/fmode-ng/esm2022/lib/aigc/chat/chat-message-card/comp-message-card.component.mjs
|
|
7
|
+
*/
|
|
8
|
+
import{Component,Input}from"@angular/core";import{ChatContentPipe,FmodeChat,getMessageContentText}from"../../service-fmai/service-chat";import{BehaviorSubject}from"rxjs";import{FmodeParse,FmodeObject}from"@fmode/parse";import{CommonModule}from"@angular/common";import{IonAvatar,IonItem}from"@ionic/angular/standalone";import{CompUserAvatarComponent}from"../../../user/comp-user-avatar/comp-user-avatar.component";import{ClipboardService}from"../../comp-markdown-preview/clipboard.service";import{MarkdownPreviewModule}from"../../comp-markdown-preview/markdown-preview.module";import{NzSanitizerPipe}from"ng-zorro-antd/pipes";import{DurationStrPipe}from"./duration-str.pipe";import{addIcons}from"ionicons";import{wifiOutline,copyOutline}from"ionicons/icons";import*as i0 from"@angular/core";import*as i1 from"../../comp-markdown-preview/clipboard.service";import*as i2 from"@angular/common";import*as i3 from"../../comp-markdown-preview/markdown-preview.component";const Parse=FmodeParse.with("nova");addIcons({wifiOutline:wifiOutline,copyOutline:copyOutline});export class FmChatMessageCard{ngOnChanges(){this.chat?.isTalkMode&&"assistant"===this.message?.role&&!this.message?.complete?(this.isLoadingText=!0,this.messageText$.next("正在加载中...")):(this.isLoadingText=!1,this.messageText$.next(getMessageContentText(this.message?.content)))}constructor(e){this.copyServ=e,this.messageText$=new BehaviorSubject(""),this.isLoadingText=!0,this.user=Parse.User.current()}async toggleVoicePlay(){if(this.message?.voice?.id&&this.chat.VoiceTTSMap[this.message?.voice?.id]&&(this.tts=this.chat.VoiceTTSMap[this.message?.voice?.id]),this.tts?.isPlaying)return void this.tts?.stop();this.chat?.isTalkMode&&"assistant"===this.message?.role&&(this.isLoadingText=!0,this.messageText$.next("正在加载中..."));let e,t=!1;if(this.message?.voice?.id){let t=new Parse.Query("ChatVoice");t.include("voiceFile"),e=await t.get(this.message?.voice?.id)}if(!e?.id){let n=await this.chat.getVoiceByContentText(this.message?.content);e=this.chat.voiceMap[n?.id],this.message.voice={id:e?.id,duration:e?.get("duration")},t=!0}this.message?.voice?.duration||(this.message.voice.duration=e?.get("duration"),t=!0),t&&this.saveSession(),await this.chat.playChatVoice(e,{onStart:t=>{this.chat?.isTalkMode&&"assistant"===this.message?.role&&setTimeout((()=>{this.isLoadingText=!1,this.messageText$.next(getMessageContentText(this.message?.content))}),600),e?.id,t?.id},onLoaded:e=>{this.message.voice.duration=1e3*e.duration,this.updateVoiceDuration(1e3*e.duration)},onResult:e=>{console.log("onResult",e),e?.duration&&(this.message.voice.duration=e?.duration)},onStop:t=>{e?.id,t?.id}}),this.tts=this.chat.VoiceTTSMap[e?.id]}updateVoiceDuration(e){this.message?.voice?.duration||(this.message.voice.duration=e,this.saveSession())}saveSession(){(this.index>=2||void 0===this.index)&&this.chat?.saveChatSession()}async copy(){this.copyServ.copyToClipboard(getMessageContentText(this.message?.content))}static{this.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"17.3.12",ngImport:i0,type:FmChatMessageCard,deps:[{token:i1.ClipboardService}],target:i0.ɵɵFactoryTarget.Component})}static{this.ɵcmp=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"17.3.12",type:FmChatMessageCard,isStandalone:!0,selector:"fm-chat-message-card",inputs:{index:"index",message:"message",role:"role",chat:"chat"},usesOnChanges:!0,ngImport:i0,template:'<div class="message-card" [class.right]="message?.role==\'user\'" [class.center]="message?.role==\'system\'">\n \x3c!-- 用户及操作区 --\x3e\n <div class="item-row user" *ngIf="message?.role!=\'system\'"> \x3c!-- 系统消息不显示头像 --\x3e\n <div class="avatar-row">\n <div class="actions">\n \x3c!-- 刷新 --\x3e\n \x3c!-- <ion-button fill="outline" slot="start">\n <ion-icon name="refresh-outline"></ion-icon> \n </ion-button> --\x3e\n \x3c!-- 复制 --\x3e\n <ion-button size="small" fill="outline" slot="start" (click)="copy()">\n <ion-icon name="copy-outline"></ion-icon>\n </ion-button>\n \x3c!-- 编辑 --\x3e\n \x3c!-- <ion-button fill="outline" slot="start">\n <ion-icon name="create-outline"></ion-icon>\n </ion-button> --\x3e\n </div>\n \x3c!-- 更新音频消息区域 --\x3e\n <div *ngIf="((message?.role==\'assistant\' && chat?.role?.get(\'voiceConfig\')?.voice) || (message?.role==\'user\'&&message?.voice))" \n class="play-voice" \n (click)="!isLoadingText && toggleVoicePlay()"\n [class.loading-voice]="chat?.isTalkMode && isLoadingText">\n\n <div class="voice-button">\n \x3c!-- 加载时显示spinner,否则显示wifi图标 --\x3e\n <ion-spinner *ngIf="chat?.isTalkMode && isLoadingText" name="lines" class="loading-spinner"></ion-spinner>\n <ion-icon *ngIf="!(chat?.isTalkMode && isLoadingText)" name="wifi-outline"\n [style.transform]="message?.role==\'user\'?\'rotate(-90deg)\':\'rotate(90deg)\'"\n class="audio-icon" \n [class.play-voice-playing]="tts?.isPlaying"></ion-icon>\n </div>\n <div class="voice-info">\n <span *ngIf="message?.voice?.duration && !isLoadingText">\n {{((message?.voice?.duration||0)/1000) | durationStr}}\n </span>\n </div>\n </div>\n \x3c!-- 头像区域 --\x3e \n <img class="avatar" *ngIf="message?.role!=\'user\'" [src]="(chat?.role?.get(\'avatar\') || chat?.role?.get(\'thumb\') || \'https://file-cloud.fmode.cn/E4KpGvTEto/20230930/l413e6090731854.png\')+\'?\'+\'x-image-process=image/resize,m_fixed,w_100\'+\'&imageView2/1/w/100/h/100\'" >\n <app-comp-user-avatar [user]="user" *ngIf="message?.role==\'user\'"></app-comp-user-avatar>\n </div>\n </div>\n \x3c!-- 附件:图片 --\x3e\n <div class="item-row images" *ngIf="message?.content | chatContent:\'image_url\'">\n <img [src]="message?.content | chatContent:\'image_url\'" alt="">\n </div>\n \x3c!-- 聊天气泡 --\x3e\n \x3c!-- Replace the bubble section with this: --\x3e\n <div class="item-row bubble" [style.fontSize]="role?.get(\'uiConfig\')?.message?.bubble?.fontSize || \'0.8rem\'">\n \x3c!-- 说话模式:展示加载状态 Show loading state for talk mode when message is not complete --\x3e\n \n \x3c!-- Show normal content for non-talk mode or when loading is complete --\x3e\n <ng-container *ngIf="!chat?.isTalkMode || message?.role !== \'assistant\' || !isLoadingText">\n <fm-markdown-preview *ngIf="!message?.complete" class="content-style" \n [content]="message?.content | chatContent" [render]="false"></fm-markdown-preview>\n <fm-markdown-preview *ngIf="message?.complete" \n [content]="message?.content | chatContent"></fm-markdown-preview>\n </ng-container>\n </div>\n \x3c!-- 时间显示 --\x3e\n <div class="item-row loading" *ngIf="message?.role!=\'system\' && !message?.complete">\n 正在输入<ion-spinner name="dots"></ion-spinner>\n </div>\n\n <div class="item-row created" *ngIf="message?.createdAt">\n <span>{{message?.createdAt | date:"dd/MM/yy HH:mm"}}</span>\n </div>\n</div>',styles:['@charset "UTF-8";:host-context(body.dark) .message-card .actions .item-native{background:none!important}:host-context(body.dark) .message-card .bubble{color:#0e101d}:host-context(body.dark) .message-card .bubble .content-style{filter:invert(1)!important}:host-context(body.dark) .message-card .bubble fm-markdown-preview{filter:invert(1)!important}:host-context(body.dark) .message-card .play-voice{background-color:#0e101d}:host-context(body.dark) .message-card .play-voice .voice-info{color:#fff}:host-context(body.dark) .message-card .right .bubble{color:#921f8a!important;background:#921f8a!important}:host-context(body.dark) .message-card .right .play-voice{background:#921f8a!important}:host-context(body.dark) .message-card .created span{color:#fff}@media screen and (max-width: 800px){.message-card:focus .actions{opacity:1!important}}.message-card:hover .actions{opacity:1;transition:opacity .3s ease-in-out}.message-card{display:flex;flex-wrap:wrap;justify-content:start;align-items:flex-start}.message-card .avatar-row{width:300px;height:32px;display:flex;flex-direction:row-reverse;justify-content:start;align-items:center}.message-card .actions{display:flex;opacity:0;padding-left:10px;padding-right:10px}.message-card .item-row{display:flex;flex:100%;justify-content:start;margin-bottom:5px}.message-card .images img{max-width:300px}.message-card .bubble{display:flex;justify-content:center;max-width:100%;padding:.5rem .5rem 0rem;color:#333;flex:none;border-radius:0 1.5em 1.5em/0em 1.5em 1.5em;color:#fff;background-color:currentColor}.message-card .bubble.loading{color:var(--gray-secondary)}.message-card .bubble.loading .content-style{filter:none}.message-card .bubble .content-style{filter:grayscale(1) contrast(999) invert(1)}.message-card .loading{text-align:right;color:#101010}.message-card .created{display:flex}.message-card .created span{font-size:12px;opacity:.4;white-space:nowrap;transition:all .6s ease;color:var(--black);text-align:center;width:100%;box-sizing:border-box;padding-right:10px;pointer-events:none;z-index:1}.right{justify-content:end;align-items:flex-end}.right .avatar-row{flex-direction:row;justify-content:end;width:auto}.right .actions{position:relative;margin-left:0}.right .item-row{justify-content:end}.right .bubble{color:#bbdefb;border-top-left-radius:1.5em;border-top-right-radius:0}.right .play-voice{flex-direction:row-reverse;background-color:#bbdefb}.center{justify-content:center;align-items:center}.center .item-row{justify-content:center}.center .bubble{color:var(--gray-secondary);border-top-left-radius:1.5em;border-top-right-radius:1.5em;font-size:12px;font-weight:100;padding:5px 20px}.play-voice{min-width:100px;height:32px;display:flex;justify-content:space-around;align-items:center;background-color:#fff;border-radius:7px}.play-voice .voice-button{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.play-voice .voice-button span{overflow:hidden;font-size:18px;color:#ff69b4}.play-voice .voice-info{height:32px;display:flex;padding:0 10px;justify-content:end;align-items:center;color:#333}.avatar{border-radius:50%;width:32px;height:32px;object-fit:cover}.audio-icon{color:#ff69b4;font-size:18px}.play-voice-playing{animation:play-voice-animation 1s infinite}@keyframes play-voice-animation{0%{width:0}to{width:32px}}.content-style.loading-text{color:#666;font-style:italic}.play-voice{transition:opacity .3s ease}.play-voice.loading-voice{opacity:.8;cursor:not-allowed}.play-voice.loading-voice .loading-spinner{width:18px;height:18px;color:var(--gray-secondary)}.play-voice.loading-voice .loading-text{font-size:.8em;color:var(--gray-secondary);margin-left:5px}.play-voice .voice-button{display:flex;align-items:center;justify-content:center;width:24px;height:24px}\n'],dependencies:[{kind:"ngmodule",type:CommonModule},{kind:"directive",type:i2.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:i2.DatePipe,name:"date"},{kind:"component",type:CompUserAvatarComponent,selector:"app-comp-user-avatar",inputs:["user"]},{kind:"ngmodule",type:MarkdownPreviewModule},{kind:"component",type:i3.MarkdownPreviewComponent,selector:"fm-markdown-preview",inputs:["content","render"]},{kind:"pipe",type:ChatContentPipe,name:"chatContent"},{kind:"pipe",type:DurationStrPipe,name:"durationStr"}]})}}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"17.3.12",ngImport:i0,type:FmChatMessageCard,decorators:[{type:Component,args:[{selector:"fm-chat-message-card",standalone:!0,imports:[CommonModule,IonItem,CompUserAvatarComponent,MarkdownPreviewModule,IonAvatar,ChatContentPipe,NzSanitizerPipe,DurationStrPipe],template:'<div class="message-card" [class.right]="message?.role==\'user\'" [class.center]="message?.role==\'system\'">\n \x3c!-- 用户及操作区 --\x3e\n <div class="item-row user" *ngIf="message?.role!=\'system\'"> \x3c!-- 系统消息不显示头像 --\x3e\n <div class="avatar-row">\n <div class="actions">\n \x3c!-- 刷新 --\x3e\n \x3c!-- <ion-button fill="outline" slot="start">\n <ion-icon name="refresh-outline"></ion-icon> \n </ion-button> --\x3e\n \x3c!-- 复制 --\x3e\n <ion-button size="small" fill="outline" slot="start" (click)="copy()">\n <ion-icon name="copy-outline"></ion-icon>\n </ion-button>\n \x3c!-- 编辑 --\x3e\n \x3c!-- <ion-button fill="outline" slot="start">\n <ion-icon name="create-outline"></ion-icon>\n </ion-button> --\x3e\n </div>\n \x3c!-- 更新音频消息区域 --\x3e\n <div *ngIf="((message?.role==\'assistant\' && chat?.role?.get(\'voiceConfig\')?.voice) || (message?.role==\'user\'&&message?.voice))" \n class="play-voice" \n (click)="!isLoadingText && toggleVoicePlay()"\n [class.loading-voice]="chat?.isTalkMode && isLoadingText">\n\n <div class="voice-button">\n \x3c!-- 加载时显示spinner,否则显示wifi图标 --\x3e\n <ion-spinner *ngIf="chat?.isTalkMode && isLoadingText" name="lines" class="loading-spinner"></ion-spinner>\n <ion-icon *ngIf="!(chat?.isTalkMode && isLoadingText)" name="wifi-outline"\n [style.transform]="message?.role==\'user\'?\'rotate(-90deg)\':\'rotate(90deg)\'"\n class="audio-icon" \n [class.play-voice-playing]="tts?.isPlaying"></ion-icon>\n </div>\n <div class="voice-info">\n <span *ngIf="message?.voice?.duration && !isLoadingText">\n {{((message?.voice?.duration||0)/1000) | durationStr}}\n </span>\n </div>\n </div>\n \x3c!-- 头像区域 --\x3e \n <img class="avatar" *ngIf="message?.role!=\'user\'" [src]="(chat?.role?.get(\'avatar\') || chat?.role?.get(\'thumb\') || \'https://file-cloud.fmode.cn/E4KpGvTEto/20230930/l413e6090731854.png\')+\'?\'+\'x-image-process=image/resize,m_fixed,w_100\'+\'&imageView2/1/w/100/h/100\'" >\n <app-comp-user-avatar [user]="user" *ngIf="message?.role==\'user\'"></app-comp-user-avatar>\n </div>\n </div>\n \x3c!-- 附件:图片 --\x3e\n <div class="item-row images" *ngIf="message?.content | chatContent:\'image_url\'">\n <img [src]="message?.content | chatContent:\'image_url\'" alt="">\n </div>\n \x3c!-- 聊天气泡 --\x3e\n \x3c!-- Replace the bubble section with this: --\x3e\n <div class="item-row bubble" [style.fontSize]="role?.get(\'uiConfig\')?.message?.bubble?.fontSize || \'0.8rem\'">\n \x3c!-- 说话模式:展示加载状态 Show loading state for talk mode when message is not complete --\x3e\n \n \x3c!-- Show normal content for non-talk mode or when loading is complete --\x3e\n <ng-container *ngIf="!chat?.isTalkMode || message?.role !== \'assistant\' || !isLoadingText">\n <fm-markdown-preview *ngIf="!message?.complete" class="content-style" \n [content]="message?.content | chatContent" [render]="false"></fm-markdown-preview>\n <fm-markdown-preview *ngIf="message?.complete" \n [content]="message?.content | chatContent"></fm-markdown-preview>\n </ng-container>\n </div>\n \x3c!-- 时间显示 --\x3e\n <div class="item-row loading" *ngIf="message?.role!=\'system\' && !message?.complete">\n 正在输入<ion-spinner name="dots"></ion-spinner>\n </div>\n\n <div class="item-row created" *ngIf="message?.createdAt">\n <span>{{message?.createdAt | date:"dd/MM/yy HH:mm"}}</span>\n </div>\n</div>',styles:['@charset "UTF-8";:host-context(body.dark) .message-card .actions .item-native{background:none!important}:host-context(body.dark) .message-card .bubble{color:#0e101d}:host-context(body.dark) .message-card .bubble .content-style{filter:invert(1)!important}:host-context(body.dark) .message-card .bubble fm-markdown-preview{filter:invert(1)!important}:host-context(body.dark) .message-card .play-voice{background-color:#0e101d}:host-context(body.dark) .message-card .play-voice .voice-info{color:#fff}:host-context(body.dark) .message-card .right .bubble{color:#921f8a!important;background:#921f8a!important}:host-context(body.dark) .message-card .right .play-voice{background:#921f8a!important}:host-context(body.dark) .message-card .created span{color:#fff}@media screen and (max-width: 800px){.message-card:focus .actions{opacity:1!important}}.message-card:hover .actions{opacity:1;transition:opacity .3s ease-in-out}.message-card{display:flex;flex-wrap:wrap;justify-content:start;align-items:flex-start}.message-card .avatar-row{width:300px;height:32px;display:flex;flex-direction:row-reverse;justify-content:start;align-items:center}.message-card .actions{display:flex;opacity:0;padding-left:10px;padding-right:10px}.message-card .item-row{display:flex;flex:100%;justify-content:start;margin-bottom:5px}.message-card .images img{max-width:300px}.message-card .bubble{display:flex;justify-content:center;max-width:100%;padding:.5rem .5rem 0rem;color:#333;flex:none;border-radius:0 1.5em 1.5em/0em 1.5em 1.5em;color:#fff;background-color:currentColor}.message-card .bubble.loading{color:var(--gray-secondary)}.message-card .bubble.loading .content-style{filter:none}.message-card .bubble .content-style{filter:grayscale(1) contrast(999) invert(1)}.message-card .loading{text-align:right;color:#101010}.message-card .created{display:flex}.message-card .created span{font-size:12px;opacity:.4;white-space:nowrap;transition:all .6s ease;color:var(--black);text-align:center;width:100%;box-sizing:border-box;padding-right:10px;pointer-events:none;z-index:1}.right{justify-content:end;align-items:flex-end}.right .avatar-row{flex-direction:row;justify-content:end;width:auto}.right .actions{position:relative;margin-left:0}.right .item-row{justify-content:end}.right .bubble{color:#bbdefb;border-top-left-radius:1.5em;border-top-right-radius:0}.right .play-voice{flex-direction:row-reverse;background-color:#bbdefb}.center{justify-content:center;align-items:center}.center .item-row{justify-content:center}.center .bubble{color:var(--gray-secondary);border-top-left-radius:1.5em;border-top-right-radius:1.5em;font-size:12px;font-weight:100;padding:5px 20px}.play-voice{min-width:100px;height:32px;display:flex;justify-content:space-around;align-items:center;background-color:#fff;border-radius:7px}.play-voice .voice-button{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.play-voice .voice-button span{overflow:hidden;font-size:18px;color:#ff69b4}.play-voice .voice-info{height:32px;display:flex;padding:0 10px;justify-content:end;align-items:center;color:#333}.avatar{border-radius:50%;width:32px;height:32px;object-fit:cover}.audio-icon{color:#ff69b4;font-size:18px}.play-voice-playing{animation:play-voice-animation 1s infinite}@keyframes play-voice-animation{0%{width:0}to{width:32px}}.content-style.loading-text{color:#666;font-style:italic}.play-voice{transition:opacity .3s ease}.play-voice.loading-voice{opacity:.8;cursor:not-allowed}.play-voice.loading-voice .loading-spinner{width:18px;height:18px;color:var(--gray-secondary)}.play-voice.loading-voice .loading-text{font-size:.8em;color:var(--gray-secondary);margin-left:5px}.play-voice .voice-button{display:flex;align-items:center;justify-content:center;width:24px;height:24px}\n']}]}],ctorParameters:()=>[{type:i1.ClipboardService}],propDecorators:{index:[{type:Input}],message:[{type:Input}],role:[{type:Input}],chat:[{type:Input}]}});
|
|
9
|
+
var MODULE_PATH_NEED = `6K+l5paH5Lu25piv5pys6aG555uu55qE5LiA6YOo5YiGIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBDb21wb25lbnRzIGluIEZtb2RlIEluYy4KICAgIOeJiOadg+aJgOaciSDCqSDmnKrmnaXpo57pqawgwqkg5rGf6KW/6ISR5o6n56eR5oqA5pyJ6ZmQ5YWs5Y+4IENvcHlyaWdodCDCqSBGbW9kZSBUZWNobm9sb2d5IENvLiwgTHRkLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICDkuKXnpoHlnKjmnKrnu4/mjojmnYPnmoTmg4XlhrXkuIvvvIzpgJrov4fku7vkvZXlqpLku4vlpI3liLbmraTmlofku7YgVW5hdXRob3JpemVkIGNvcHlpbmcgb2YgdGhpcyBmaWxlLCB2aWEgYW55IG1lZGl1bSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkCiAgICDor6Xmlofku7bmmK/kuJPmnInnmoTmnLrlr4bmlofku7YgUHJvcHJpZXRhcnkgYW5kIGNvbmZpZGVudGlhbAogICAKICAgIENvcHlyaWdodCAyMDIxLW5vdyBGbW9kZSBJbmMuIHN1cHBvcnRAZm1vZGUuY24uIDE4NjA3MDA3MDczLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCByaWdodHMgcmVzZXJ2ZWQuCgogICAgUEFUSDovaG9tZS9yeWFuL3dvcmtzcGFjZS9ub3ZhL25vdmEtYWRtaW4vZGlzdC9mbW9kZS1uZy9lc20yMDIyL2xpYi9haWdjL2NoYXQvY2hhdC1tZXNzYWdlLWNhcmQvY29tcC1tZXNzYWdlLWNhcmQuY29tcG9uZW50Lm1qcw==`
|
|
10
|
+
|
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
durationStr += `${secondStr}"`;
|
|
12
|
-
return durationStr;
|
|
13
|
-
// 01:33 计时器形式
|
|
14
|
-
// let minuteStr = String(parseInt(String(duration/60))).padStart(2,"0");
|
|
15
|
-
// let secondStr = String((duration%60).toFixed(0)).padStart(2,"0");
|
|
16
|
-
// let durationStr = minuteStr + ":" + secondStr;
|
|
17
|
-
// return durationStr;
|
|
18
|
-
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DurationStrPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
20
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DurationStrPipe, isStandalone: true, name: "durationStr" }); }
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DurationStrPipe, decorators: [{
|
|
23
|
-
type: Pipe,
|
|
24
|
-
args: [{
|
|
25
|
-
name: 'durationStr',
|
|
26
|
-
standalone: true
|
|
27
|
-
}]
|
|
28
|
-
}] });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHVyYXRpb24tc3RyLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9mbW9kZS1uZy9zcmMvbGliL2FpZ2MvY2hhdC9jaGF0LW1lc3NhZ2UtY2FyZC9kdXJhdGlvbi1zdHIucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7QUFNcEQsTUFBTSxPQUFPLGVBQWU7SUFFMUIsU0FBUyxDQUFDLFFBQWdCLEVBQUUsR0FBRyxJQUFlO1FBQzVDLElBQUksU0FBUyxHQUFHLE1BQU0sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLFFBQVEsR0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDdEQsSUFBSSxTQUFTLEdBQUcsTUFBTSxDQUFDLENBQUMsUUFBUSxHQUFDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2pELElBQUksV0FBVyxHQUFHLEVBQUUsQ0FBQTtRQUNwQixJQUFHLFFBQVEsR0FBQyxFQUFFLEdBQUcsQ0FBQyxFQUFDLENBQUM7WUFDbEIsV0FBVyxJQUFJLEdBQUcsU0FBUyxHQUFHLENBQUE7UUFDaEMsQ0FBQztRQUNELFdBQVcsSUFBSSxHQUFHLFNBQVMsR0FBRyxDQUFBO1FBQzlCLE9BQU8sV0FBVyxDQUFBO1FBQ2xCLGNBQWM7UUFDZCx5RUFBe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FN0YXJ0KDIsXCIwXCIpO1xyXG4gICAgLy8gbGV0IHNlY29uZFN0ciA9IFN0cmluZygoZHVyYXRpb24lNjApLnRvRml4ZWQoMCkpLnBhZFN0YXJ0KDIsXCIwXCIpO1xyXG4gICAgLy8gbGV0IGR1cmF0aW9uU3RyID0gbWludXRlU3RyICsgXCI6XCIgKyBzZWNvbmRTdHI7XHJcbiAgICAvLyByZXR1cm4gZHVyYXRpb25TdHI7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @copyright © 未来飞马 © 未来全栈 www.fmode.cn
|
|
4
|
+
* 版权所有 © 未来飞马 © 江西脑控科技有限公司 Copyright © Fmode Technology Co., Ltd.
|
|
5
|
+
* 保留所有权利 All Rights Reserved.
|
|
6
|
+
* /home/ryan/workspace/nova/nova-admin/dist/fmode-ng/esm2022/lib/aigc/chat/chat-message-card/duration-str.pipe.mjs
|
|
7
|
+
*/
|
|
8
|
+
import{Pipe}from"@angular/core";import*as i0 from"@angular/core";export class DurationStrPipe{transform(r,...t){let i=String(parseInt(String(r/60))),e="";return r/60>1&&(e+=`${i}'`),e+=`${String((r%60).toFixed(0))}"`,e}static{this.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"17.3.12",ngImport:i0,type:DurationStrPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe})}static{this.ɵpipe=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"17.3.12",ngImport:i0,type:DurationStrPipe,isStandalone:!0,name:"durationStr"})}}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"17.3.12",ngImport:i0,type:DurationStrPipe,decorators:[{type:Pipe,args:[{name:"durationStr",standalone:!0}]}]});
|
|
9
|
+
var MODULE_PATH_NEED = `6K+l5paH5Lu25piv5pys6aG555uu55qE5LiA6YOo5YiGIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBDb21wb25lbnRzIGluIEZtb2RlIEluYy4KICAgIOeJiOadg+aJgOaciSDCqSDmnKrmnaXpo57pqawgwqkg5rGf6KW/6ISR5o6n56eR5oqA5pyJ6ZmQ5YWs5Y+4IENvcHlyaWdodCDCqSBGbW9kZSBUZWNobm9sb2d5IENvLiwgTHRkLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICDkuKXnpoHlnKjmnKrnu4/mjojmnYPnmoTmg4XlhrXkuIvvvIzpgJrov4fku7vkvZXlqpLku4vlpI3liLbmraTmlofku7YgVW5hdXRob3JpemVkIGNvcHlpbmcgb2YgdGhpcyBmaWxlLCB2aWEgYW55IG1lZGl1bSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkCiAgICDor6Xmlofku7bmmK/kuJPmnInnmoTmnLrlr4bmlofku7YgUHJvcHJpZXRhcnkgYW5kIGNvbmZpZGVudGlhbAogICAKICAgIENvcHlyaWdodCAyMDIxLW5vdyBGbW9kZSBJbmMuIHN1cHBvcnRAZm1vZGUuY24uIDE4NjA3MDA3MDczLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCByaWdodHMgcmVzZXJ2ZWQuCgogICAgUEFUSDovaG9tZS9yeWFuL3dvcmtzcGFjZS9ub3ZhL25vdmEtYWRtaW4vZGlzdC9mbW9kZS1uZy9lc20yMDIyL2xpYi9haWdjL2NoYXQvY2hhdC1tZXNzYWdlLWNhcmQvZHVyYXRpb24tc3RyLnBpcGUubWpz`
|
|
10
|
+
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @copyright © 未来飞马 © 未来全栈 www.fmode.cn
|
|
4
|
+
* 版权所有 © 未来飞马 © 江西脑控科技有限公司 Copyright © Fmode Technology Co., Ltd.
|
|
5
|
+
* 保留所有权利 All Rights Reserved.
|
|
6
|
+
* /home/ryan/workspace/nova/nova-admin/dist/fmode-ng/esm2022/lib/aigc/chat/chat-message-card/index.mjs
|
|
7
|
+
*/
|
|
8
|
+
export*from"./comp-message-card.component";export*from"./duration-str.pipe";
|
|
9
|
+
var MODULE_PATH_NEED = `6K+l5paH5Lu25piv5pys6aG555uu55qE5LiA6YOo5YiGIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBDb21wb25lbnRzIGluIEZtb2RlIEluYy4KICAgIOeJiOadg+aJgOaciSDCqSDmnKrmnaXpo57pqawgwqkg5rGf6KW/6ISR5o6n56eR5oqA5pyJ6ZmQ5YWs5Y+4IENvcHlyaWdodCDCqSBGbW9kZSBUZWNobm9sb2d5IENvLiwgTHRkLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICDkuKXnpoHlnKjmnKrnu4/mjojmnYPnmoTmg4XlhrXkuIvvvIzpgJrov4fku7vkvZXlqpLku4vlpI3liLbmraTmlofku7YgVW5hdXRob3JpemVkIGNvcHlpbmcgb2YgdGhpcyBmaWxlLCB2aWEgYW55IG1lZGl1bSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkCiAgICDor6Xmlofku7bmmK/kuJPmnInnmoTmnLrlr4bmlofku7YgUHJvcHJpZXRhcnkgYW5kIGNvbmZpZGVudGlhbAogICAKICAgIENvcHlyaWdodCAyMDIxLW5vdyBGbW9kZSBJbmMuIHN1cHBvcnRAZm1vZGUuY24uIDE4NjA3MDA3MDczLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCByaWdodHMgcmVzZXJ2ZWQuCgogICAgUEFUSDovaG9tZS9yeWFuL3dvcmtzcGFjZS9ub3ZhL25vdmEtYWRtaW4vZGlzdC9mbW9kZS1uZy9lc20yMDIyL2xpYi9haWdjL2NoYXQvY2hhdC1tZXNzYWdlLWNhcmQvaW5kZXgubWpz`
|
|
10
|
+
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @copyright © 未来飞马 © 未来全栈 www.fmode.cn
|
|
4
|
+
* 版权所有 © 未来飞马 © 江西脑控科技有限公司 Copyright © Fmode Technology Co., Ltd.
|
|
5
|
+
* 保留所有权利 All Rights Reserved.
|
|
6
|
+
* /home/ryan/workspace/nova/nova-admin/dist/fmode-ng/esm2022/lib/aigc/chat/chat-modal-input/index.mjs
|
|
7
|
+
*/
|
|
8
|
+
export*from"./modal-input.component";export*from"./modal-audio-message/modal-audio-message.component";
|
|
9
|
+
var MODULE_PATH_NEED = `6K+l5paH5Lu25piv5pys6aG555uu55qE5LiA6YOo5YiGIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBDb21wb25lbnRzIGluIEZtb2RlIEluYy4KICAgIOeJiOadg+aJgOaciSDCqSDmnKrmnaXpo57pqawgwqkg5rGf6KW/6ISR5o6n56eR5oqA5pyJ6ZmQ5YWs5Y+4IENvcHlyaWdodCDCqSBGbW9kZSBUZWNobm9sb2d5IENvLiwgTHRkLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICDkuKXnpoHlnKjmnKrnu4/mjojmnYPnmoTmg4XlhrXkuIvvvIzpgJrov4fku7vkvZXlqpLku4vlpI3liLbmraTmlofku7YgVW5hdXRob3JpemVkIGNvcHlpbmcgb2YgdGhpcyBmaWxlLCB2aWEgYW55IG1lZGl1bSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkCiAgICDor6Xmlofku7bmmK/kuJPmnInnmoTmnLrlr4bmlofku7YgUHJvcHJpZXRhcnkgYW5kIGNvbmZpZGVudGlhbAogICAKICAgIENvcHlyaWdodCAyMDIxLW5vdyBGbW9kZSBJbmMuIHN1cHBvcnRAZm1vZGUuY24uIDE4NjA3MDA3MDczLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCByaWdodHMgcmVzZXJ2ZWQuCgogICAgUEFUSDovaG9tZS9yeWFuL3dvcmtzcGFjZS9ub3ZhL25vdmEtYWRtaW4vZGlzdC9mbW9kZS1uZy9lc20yMDIyL2xpYi9haWdjL2NoYXQvY2hhdC1tb2RhbC1pbnB1dC9pbmRleC5tanM=`
|
|
10
|
+
|