@yonus_amire01/chat 1.0.0 → 2.1.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/README.md +8 -8
- package/dist/chat.css +1 -0
- package/dist/index.cjs +7 -5
- package/dist/index.mjs +10827 -8846
- package/dist/signature_pad-BvnS6ckP.cjs +4 -0
- package/dist/signature_pad-CSadMJ3H.js +478 -0
- package/dist/types/app/components/ChatPage.vue.d.ts +3 -0
- package/dist/types/app/components/ChatPage.vue.d.ts.map +1 -0
- package/dist/types/app/components/call/CallBoard.vue.d.ts +33 -0
- package/dist/types/app/components/call/CallBoard.vue.d.ts.map +1 -0
- package/dist/types/app/components/call/CallMemberDisplay.vue.d.ts +16 -0
- package/dist/types/app/components/call/CallMemberDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/call/CallPageOverlay.vue.d.ts +7 -0
- package/dist/types/app/components/call/CallPageOverlay.vue.d.ts.map +1 -0
- package/dist/types/app/components/call/paint-board/BoardColorPicker.vue.d.ts +24 -0
- package/dist/types/app/components/call/paint-board/BoardColorPicker.vue.d.ts.map +1 -0
- package/dist/types/app/components/call/paint-board/BrushSizeSlider.vue.d.ts +19 -0
- package/dist/types/app/components/call/paint-board/BrushSizeSlider.vue.d.ts.map +1 -0
- package/dist/types/app/components/call/paint-board/CallPaintBoard.vue.d.ts +47 -0
- package/dist/types/app/components/call/paint-board/CallPaintBoard.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/ChatBubble.vue.d.ts +164 -0
- package/dist/types/app/components/chat/ChatBubble.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/ChatInput.vue.d.ts +56 -0
- package/dist/types/app/components/chat/ChatInput.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/ChatMessages.vue.d.ts +16 -0
- package/dist/types/app/components/chat/ChatMessages.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/ChatPageBar.vue.d.ts +17 -0
- package/dist/types/app/components/chat/ChatPageBar.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/ChatProfileOverview.vue.d.ts +11 -0
- package/dist/types/app/components/chat/ChatProfileOverview.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/ChatView.vue.d.ts +73 -0
- package/dist/types/app/components/chat/ChatView.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-bubbles/BubbleOptions.vue.d.ts +119 -0
- package/dist/types/app/components/chat/chat-bubbles/BubbleOptions.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-bubbles/BubbleVideo.vue.d.ts +25 -0
- package/dist/types/app/components/chat/chat-bubbles/BubbleVideo.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-bubbles/FileDisplay.vue.d.ts +12 -0
- package/dist/types/app/components/chat/chat-bubbles/FileDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-bubbles/ImageGroupDisplay.vue.d.ts +12 -0
- package/dist/types/app/components/chat/chat-bubbles/ImageGroupDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-bubbles/VoiceDisplay.vue.d.ts +12 -0
- package/dist/types/app/components/chat/chat-bubbles/VoiceDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-input/AttachementFileDisplay.vue.d.ts +12 -0
- package/dist/types/app/components/chat/chat-input/AttachementFileDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-input/InputAttachement.vue.d.ts +15 -0
- package/dist/types/app/components/chat/chat-input/InputAttachement.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-input/PermissionPopup.vue.d.ts +16 -0
- package/dist/types/app/components/chat/chat-input/PermissionPopup.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/chat-input/VideoRecordDisplay.vue.d.ts +26 -0
- package/dist/types/app/components/chat/chat-input/VideoRecordDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/contact/ChatContactDisplay.vue.d.ts +8 -0
- package/dist/types/app/components/chat/contact/ChatContactDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/contact/ChatList.vue.d.ts +5 -0
- package/dist/types/app/components/chat/contact/ChatList.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/contact/ChatListSearch.vue.d.ts +12 -0
- package/dist/types/app/components/chat/contact/ChatListSearch.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/contact/ContactAvatar.vue.d.ts +10 -0
- package/dist/types/app/components/chat/contact/ContactAvatar.vue.d.ts.map +1 -0
- package/dist/types/app/components/chat/profile/FileDisplay.vue.d.ts +9 -0
- package/dist/types/app/components/chat/profile/FileDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/general/FileFormatDisplay.vue.d.ts +16 -0
- package/dist/types/app/components/general/FileFormatDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/general/LoadingStatus.vue.d.ts +16 -0
- package/dist/types/app/components/general/LoadingStatus.vue.d.ts.map +1 -0
- package/dist/types/app/components/general/NoDataDisplay.vue.d.ts +7 -0
- package/dist/types/app/components/general/NoDataDisplay.vue.d.ts.map +1 -0
- package/dist/types/app/components/general/SafeEmojiText.vue.d.ts +10 -0
- package/dist/types/app/components/general/SafeEmojiText.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BButton.vue.d.ts +74 -0
- package/dist/types/app/components/global/BButton.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BCarousel.vue.d.ts +47 -0
- package/dist/types/app/components/global/BCarousel.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BCheckBox.vue.d.ts +30 -0
- package/dist/types/app/components/global/BCheckBox.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BEmojiPicker.vue.d.ts +7 -0
- package/dist/types/app/components/global/BEmojiPicker.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BIcon.vue.d.ts +11 -0
- package/dist/types/app/components/global/BIcon.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BImage.vue.d.ts +51 -0
- package/dist/types/app/components/global/BImage.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BInput.vue.d.ts +65 -0
- package/dist/types/app/components/global/BInput.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BLabel.vue.d.ts +18 -0
- package/dist/types/app/components/global/BLabel.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BMenu.vue.d.ts +54 -0
- package/dist/types/app/components/global/BMenu.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BModal.vue.d.ts +24 -0
- package/dist/types/app/components/global/BModal.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BPopup.vue.d.ts +42 -0
- package/dist/types/app/components/global/BPopup.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BSelect.vue.d.ts +43 -0
- package/dist/types/app/components/global/BSelect.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BTab.vue.d.ts +15 -0
- package/dist/types/app/components/global/BTab.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BToast.vue.d.ts +7 -0
- package/dist/types/app/components/global/BToast.vue.d.ts.map +1 -0
- package/dist/types/app/components/global/BVirtualVerticalList.vue.d.ts +30 -0
- package/dist/types/app/components/global/BVirtualVerticalList.vue.d.ts.map +1 -0
- package/dist/types/{composables → app/composables}/chat/useChatRecording.d.ts +4 -4
- package/dist/types/app/composables/chat/useChatRecording.d.ts.map +1 -0
- package/dist/types/app/composables/useAppPermissions.d.ts.map +1 -0
- package/dist/types/{composables → app/composables}/useAppToast.d.ts +2 -1
- package/dist/types/app/composables/useAppToast.d.ts.map +1 -0
- package/dist/types/app/composables/useClickOutside.d.ts.map +1 -0
- package/dist/types/app/composables/useDate.d.ts +7 -0
- package/dist/types/app/composables/useDate.d.ts.map +1 -0
- package/dist/types/app/composables/useDevice.d.ts.map +1 -0
- package/dist/types/app/composables/useLocalI18n.d.ts +5 -0
- package/dist/types/app/composables/useLocalI18n.d.ts.map +1 -0
- package/dist/types/app/directives/filePicker.d.ts.map +1 -0
- package/dist/types/app/directives/imagePicker.d.ts.map +1 -0
- package/dist/types/app/directives/loading.d.ts.map +1 -0
- package/dist/types/app/index.d.ts +28 -0
- package/dist/types/app/index.d.ts.map +1 -0
- package/dist/types/{stores → app/stores}/callStore.d.ts +451 -102
- package/dist/types/app/stores/callStore.d.ts.map +1 -0
- package/dist/types/app/stores/chatStore.d.ts +969 -0
- package/dist/types/app/stores/chatStore.d.ts.map +1 -0
- package/dist/types/app/stores/mediaStore.d.ts +18 -0
- package/dist/types/app/stores/mediaStore.d.ts.map +1 -0
- package/dist/types/app/stores/messageStores.d.ts +2229 -0
- package/dist/types/{stores/chatStore.d.ts.map → app/stores/messageStores.d.ts.map} +1 -1
- package/dist/types/app/stores/profileStore.d.ts +45 -0
- package/dist/types/app/stores/profileStore.d.ts.map +1 -0
- package/dist/types/app/types/components/chat-input.d.ts.map +1 -0
- package/dist/types/app/types/components/input.d.ts.map +1 -0
- package/dist/types/app/types/components/menu-options.d.ts.map +1 -0
- package/dist/types/app/types/components/menu.d.ts.map +1 -0
- package/dist/types/app/types/components/modal.d.ts.map +1 -0
- package/dist/types/app/types/components/popup.d.ts.map +1 -0
- package/dist/types/app/types/components/select.d.ts.map +1 -0
- package/dist/types/app/types/components/toast.d.ts.map +1 -0
- package/dist/types/app/types/index.d.ts +149 -0
- package/dist/types/app/types/index.d.ts.map +1 -0
- package/dist/types/app/utils/emojiParser.d.ts.map +1 -0
- package/dist/types/app/utils/format.d.ts +4 -0
- package/dist/types/app/utils/format.d.ts.map +1 -0
- package/dist/types/i18n/locales/index.d.ts +2603 -0
- package/dist/types/i18n/locales/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -10
- package/package.json +7 -14
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/style.css +0 -1
- package/dist/types/adapter/HostAdapter.d.ts +0 -13
- package/dist/types/adapter/HostAdapter.d.ts.map +0 -1
- package/dist/types/adapter/PushPort.d.ts +0 -10
- package/dist/types/adapter/PushPort.d.ts.map +0 -1
- package/dist/types/adapter/index.d.ts +0 -7
- package/dist/types/adapter/index.d.ts.map +0 -1
- package/dist/types/adapter/mock/MockCallAdapter.d.ts +0 -14
- package/dist/types/adapter/mock/MockCallAdapter.d.ts.map +0 -1
- package/dist/types/adapter/mock/MockChatActionAdapter.d.ts +0 -9
- package/dist/types/adapter/mock/MockChatActionAdapter.d.ts.map +0 -1
- package/dist/types/adapter/mock/MockChatAdapter.d.ts +0 -7
- package/dist/types/adapter/mock/MockChatAdapter.d.ts.map +0 -1
- package/dist/types/adapter/mock/MockMedicationAdapter.d.ts +0 -7
- package/dist/types/adapter/mock/MockMedicationAdapter.d.ts.map +0 -1
- package/dist/types/adapter/mock/MockServiceAdapter.d.ts +0 -6
- package/dist/types/adapter/mock/MockServiceAdapter.d.ts.map +0 -1
- package/dist/types/adapter/mock/createMockAdapter.d.ts +0 -13
- package/dist/types/adapter/mock/createMockAdapter.d.ts.map +0 -1
- package/dist/types/adapter/mock/index.d.ts +0 -12
- package/dist/types/adapter/mock/index.d.ts.map +0 -1
- package/dist/types/adapter/ports/CallAdapter.d.ts +0 -36
- package/dist/types/adapter/ports/CallAdapter.d.ts.map +0 -1
- package/dist/types/adapter/ports/ChatActionAdapter.d.ts +0 -17
- package/dist/types/adapter/ports/ChatActionAdapter.d.ts.map +0 -1
- package/dist/types/adapter/ports/ChatAdapter.d.ts +0 -22
- package/dist/types/adapter/ports/ChatAdapter.d.ts.map +0 -1
- package/dist/types/adapter/ports/MedicationAdapter.d.ts +0 -6
- package/dist/types/adapter/ports/MedicationAdapter.d.ts.map +0 -1
- package/dist/types/adapter/ports/ServiceAdapter.d.ts +0 -16
- package/dist/types/adapter/ports/ServiceAdapter.d.ts.map +0 -1
- package/dist/types/components/ChatPage.vue.d.ts +0 -8
- package/dist/types/components/ChatPage.vue.d.ts.map +0 -1
- package/dist/types/components/call/CallBoard.vue.d.ts +0 -154
- package/dist/types/components/call/CallBoard.vue.d.ts.map +0 -1
- package/dist/types/components/call/CallMemberDisplay.vue.d.ts +0 -57
- package/dist/types/components/call/CallMemberDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/call/CallPageOverlay.vue.d.ts +0 -1365
- package/dist/types/components/call/CallPageOverlay.vue.d.ts.map +0 -1
- package/dist/types/components/call/paint-board/BoardColorPicker.vue.d.ts +0 -41
- package/dist/types/components/call/paint-board/BoardColorPicker.vue.d.ts.map +0 -1
- package/dist/types/components/call/paint-board/BrushSizeSlider.vue.d.ts +0 -48
- package/dist/types/components/call/paint-board/BrushSizeSlider.vue.d.ts.map +0 -1
- package/dist/types/components/call/paint-board/CallPaintBoard.vue.d.ts +0 -127
- package/dist/types/components/call/paint-board/CallPaintBoard.vue.d.ts.map +0 -1
- package/dist/types/components/chat/ChatBubble.vue.d.ts +0 -12236
- package/dist/types/components/chat/ChatBubble.vue.d.ts.map +0 -1
- package/dist/types/components/chat/ChatInput.vue.d.ts +0 -2477
- package/dist/types/components/chat/ChatInput.vue.d.ts.map +0 -1
- package/dist/types/components/chat/ChatMessages.vue.d.ts +0 -13873
- package/dist/types/components/chat/ChatMessages.vue.d.ts.map +0 -1
- package/dist/types/components/chat/ChatPageBar.vue.d.ts +0 -1204
- package/dist/types/components/chat/ChatPageBar.vue.d.ts.map +0 -1
- package/dist/types/components/chat/ChatProfileOverview.vue.d.ts +0 -327
- package/dist/types/components/chat/ChatProfileOverview.vue.d.ts.map +0 -1
- package/dist/types/components/chat/ChatView.vue.d.ts +0 -4
- package/dist/types/components/chat/ChatView.vue.d.ts.map +0 -1
- package/dist/types/components/chat/PatientReferral.vue.d.ts +0 -33
- package/dist/types/components/chat/PatientReferral.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/BubbleOptions.vue.d.ts +0 -53
- package/dist/types/components/chat/chat-bubbles/BubbleOptions.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/BubbleVideo.vue.d.ts +0 -103
- package/dist/types/components/chat/chat-bubbles/BubbleVideo.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/FileDisplay.vue.d.ts +0 -170
- package/dist/types/components/chat/chat-bubbles/FileDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/ImageGroupDisplay.vue.d.ts +0 -74
- package/dist/types/components/chat/chat-bubbles/ImageGroupDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/RequestCard.vue.d.ts +0 -11449
- package/dist/types/components/chat/chat-bubbles/RequestCard.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/VoiceDisplay.vue.d.ts +0 -107
- package/dist/types/components/chat/chat-bubbles/VoiceDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-bubbles/request-card/ProviderDisplay.vue.d.ts +0 -56
- package/dist/types/components/chat/chat-bubbles/request-card/ProviderDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-input/AttachementFileDisplay.vue.d.ts +0 -28
- package/dist/types/components/chat/chat-input/AttachementFileDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-input/InputAttachement.vue.d.ts +0 -72
- package/dist/types/components/chat/chat-input/InputAttachement.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-input/PermissionPopup.vue.d.ts +0 -15
- package/dist/types/components/chat/chat-input/PermissionPopup.vue.d.ts.map +0 -1
- package/dist/types/components/chat/chat-input/VideoRecordDisplay.vue.d.ts +0 -149
- package/dist/types/components/chat/chat-input/VideoRecordDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/contact/ChatContactDisplay.vue.d.ts +0 -85
- package/dist/types/components/chat/contact/ChatContactDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/contact/ChatList.vue.d.ts +0 -3111
- package/dist/types/components/chat/contact/ChatList.vue.d.ts.map +0 -1
- package/dist/types/components/chat/contact/ChatListSearch.vue.d.ts +0 -24
- package/dist/types/components/chat/contact/ChatListSearch.vue.d.ts.map +0 -1
- package/dist/types/components/chat/contact/ContactAvatar.vue.d.ts +0 -28
- package/dist/types/components/chat/contact/ContactAvatar.vue.d.ts.map +0 -1
- package/dist/types/components/chat/medic-features/MedicDisplay.vue.d.ts +0 -61
- package/dist/types/components/chat/medic-features/MedicDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/medic-features/MedicSelector.vue.d.ts +0 -1113
- package/dist/types/components/chat/medic-features/MedicSelector.vue.d.ts.map +0 -1
- package/dist/types/components/chat/medic-features/MedicSelectorContent.vue.d.ts +0 -1060
- package/dist/types/components/chat/medic-features/MedicSelectorContent.vue.d.ts.map +0 -1
- package/dist/types/components/chat/medic-features/PrescribtionDisplay.vue.d.ts +0 -1431
- package/dist/types/components/chat/medic-features/PrescribtionDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/chat/profile/FileDisplay.vue.d.ts +0 -28
- package/dist/types/components/chat/profile/FileDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/general/FileFormatDisplay.vue.d.ts +0 -60
- package/dist/types/components/general/FileFormatDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/general/LoadingStatus.vue.d.ts +0 -59
- package/dist/types/components/general/LoadingStatus.vue.d.ts.map +0 -1
- package/dist/types/components/general/NoDataDisplay.vue.d.ts +0 -24
- package/dist/types/components/general/NoDataDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/general/SafeEmojiText.vue.d.ts +0 -24
- package/dist/types/components/general/SafeEmojiText.vue.d.ts.map +0 -1
- package/dist/types/components/global/BCarousel.vue.d.ts +0 -48
- package/dist/types/components/global/BCarousel.vue.d.ts.map +0 -1
- package/dist/types/composables/chat/useChatRecording.d.ts.map +0 -1
- package/dist/types/composables/useAppPermissions.d.ts.map +0 -1
- package/dist/types/composables/useAppToast.d.ts.map +0 -1
- package/dist/types/composables/useClickOutside.d.ts.map +0 -1
- package/dist/types/composables/useDate.d.ts +0 -24
- package/dist/types/composables/useDate.d.ts.map +0 -1
- package/dist/types/composables/useDevice.d.ts.map +0 -1
- package/dist/types/composables/useLocale.d.ts +0 -12
- package/dist/types/composables/useLocale.d.ts.map +0 -1
- package/dist/types/composables/useTheme.d.ts +0 -4
- package/dist/types/composables/useTheme.d.ts.map +0 -1
- package/dist/types/composables/useValidation.d.ts +0 -20
- package/dist/types/composables/useValidation.d.ts.map +0 -1
- package/dist/types/composables/useWindowSize.d.ts +0 -5
- package/dist/types/composables/useWindowSize.d.ts.map +0 -1
- package/dist/types/directives/filePicker.d.ts.map +0 -1
- package/dist/types/directives/imagePicker.d.ts.map +0 -1
- package/dist/types/directives/loading.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/install.d.ts +0 -20
- package/dist/types/install.d.ts.map +0 -1
- package/dist/types/mock/chat.seed.d.ts +0 -20
- package/dist/types/mock/chat.seed.d.ts.map +0 -1
- package/dist/types/mock/helpers.d.ts +0 -3
- package/dist/types/mock/helpers.d.ts.map +0 -1
- package/dist/types/mock/index.d.ts +0 -5
- package/dist/types/mock/index.d.ts.map +0 -1
- package/dist/types/mock/medication.seed.d.ts +0 -4
- package/dist/types/mock/medication.seed.d.ts.map +0 -1
- package/dist/types/mock/service.seed.d.ts +0 -13
- package/dist/types/mock/service.seed.d.ts.map +0 -1
- package/dist/types/nuxt-shims.d.ts +0 -43
- package/dist/types/nuxt-shims.d.ts.map +0 -1
- package/dist/types/prime-preset.d.ts +0 -72
- package/dist/types/prime-preset.d.ts.map +0 -1
- package/dist/types/stores/callStore.d.ts.map +0 -1
- package/dist/types/stores/chatActionStore.d.ts +0 -11303
- package/dist/types/stores/chatActionStore.d.ts.map +0 -1
- package/dist/types/stores/chatStore.d.ts +0 -2966
- package/dist/types/stores/createStores.d.ts +0 -19290
- package/dist/types/stores/createStores.d.ts.map +0 -1
- package/dist/types/stores/medicationsStore.d.ts +0 -3542
- package/dist/types/stores/medicationsStore.d.ts.map +0 -1
- package/dist/types/stores/serviceStore.d.ts +0 -953
- package/dist/types/stores/serviceStore.d.ts.map +0 -1
- package/dist/types/themes/factory.d.ts +0 -4
- package/dist/types/themes/factory.d.ts.map +0 -1
- package/dist/types/types/address.d.ts +0 -26
- package/dist/types/types/address.d.ts.map +0 -1
- package/dist/types/types/calendar.d.ts +0 -88
- package/dist/types/types/calendar.d.ts.map +0 -1
- package/dist/types/types/call.d.ts +0 -9
- package/dist/types/types/call.d.ts.map +0 -1
- package/dist/types/types/chat.d.ts +0 -71
- package/dist/types/types/chat.d.ts.map +0 -1
- package/dist/types/types/clinic.d.ts +0 -7
- package/dist/types/types/clinic.d.ts.map +0 -1
- package/dist/types/types/components/chat-input.d.ts.map +0 -1
- package/dist/types/types/components/input.d.ts.map +0 -1
- package/dist/types/types/components/menu-options.d.ts.map +0 -1
- package/dist/types/types/components/menu.d.ts.map +0 -1
- package/dist/types/types/components/modal.d.ts.map +0 -1
- package/dist/types/types/components/nav-item.d.ts +0 -11
- package/dist/types/types/components/nav-item.d.ts.map +0 -1
- package/dist/types/types/components/nav-sub-item.d.ts +0 -9
- package/dist/types/types/components/nav-sub-item.d.ts.map +0 -1
- package/dist/types/types/components/popup.d.ts.map +0 -1
- package/dist/types/types/components/select.d.ts.map +0 -1
- package/dist/types/types/components/toast.d.ts.map +0 -1
- package/dist/types/types/env/runtimeConfig.d.ts +0 -22
- package/dist/types/types/invoice.d.ts +0 -8
- package/dist/types/types/invoice.d.ts.map +0 -1
- package/dist/types/types/medic.d.ts +0 -6
- package/dist/types/types/medic.d.ts.map +0 -1
- package/dist/types/types/medication.d.ts +0 -25
- package/dist/types/types/medication.d.ts.map +0 -1
- package/dist/types/types/notification.d.ts +0 -10
- package/dist/types/types/notification.d.ts.map +0 -1
- package/dist/types/types/service.d.ts +0 -25
- package/dist/types/types/service.d.ts.map +0 -1
- package/dist/types/types/story.d.ts +0 -12
- package/dist/types/types/story.d.ts.map +0 -1
- package/dist/types/types/theme.d.ts +0 -26
- package/dist/types/types/theme.d.ts.map +0 -1
- package/dist/types/utils/emojiParser.d.ts.map +0 -1
- package/dist/types/utils/format.d.ts +0 -52
- package/dist/types/utils/format.d.ts.map +0 -1
- /package/dist/types/{composables → app/composables}/useAppPermissions.d.ts +0 -0
- /package/dist/types/{composables → app/composables}/useClickOutside.d.ts +0 -0
- /package/dist/types/{composables → app/composables}/useDevice.d.ts +0 -0
- /package/dist/types/{directives → app/directives}/filePicker.d.ts +0 -0
- /package/dist/types/{directives → app/directives}/imagePicker.d.ts +0 -0
- /package/dist/types/{directives → app/directives}/loading.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/chat-input.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/input.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/menu-options.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/menu.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/modal.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/popup.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/select.d.ts +0 -0
- /package/dist/types/{types → app/types}/components/toast.d.ts +0 -0
- /package/dist/types/{utils → app/utils}/emojiParser.d.ts +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";var T=Object.defineProperty;var C=(r,s,t)=>s in r?T(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t;var d=(r,s,t)=>C(r,typeof s!="symbol"?s+"":s,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!
|
|
2
|
+
* Signature Pad v5.1.3 | https://github.com/szimek/signature_pad
|
|
3
|
+
* (c) 2025 Szymon Nowak | Released under the MIT license
|
|
4
|
+
*/var P=class{constructor(r,s,t,e){d(this,"x");d(this,"y");d(this,"pressure");d(this,"time");if(isNaN(r)||isNaN(s))throw new Error(`Point is invalid: (${r}, ${s})`);this.x=+r,this.y=+s,this.pressure=t||0,this.time=e||Date.now()}distanceTo(r){return Math.sqrt(Math.pow(this.x-r.x,2)+Math.pow(this.y-r.y,2))}equals(r){return this.x===r.x&&this.y===r.y&&this.pressure===r.pressure&&this.time===r.time}velocityFrom(r){return this.time!==r.time?this.distanceTo(r)/(this.time-r.time):0}},M=class b{constructor(s,t,e,i,n,o){this.startPoint=s,this.control2=t,this.control1=e,this.endPoint=i,this.startWidth=n,this.endWidth=o}static fromPoints(s,t){const e=this.calculateControlPoints(s[0],s[1],s[2]).c2,i=this.calculateControlPoints(s[1],s[2],s[3]).c1;return new b(s[1],e,i,s[2],t.start,t.end)}static calculateControlPoints(s,t,e){const i=s.x-t.x,n=s.y-t.y,o=t.x-e.x,u=t.y-e.y,a={x:(s.x+t.x)/2,y:(s.y+t.y)/2},l={x:(t.x+e.x)/2,y:(t.y+e.y)/2},c=Math.sqrt(i*i+n*n),_=Math.sqrt(o*o+u*u),m=a.x-l.x,x=a.y-l.y,v=c+_==0?0:_/(c+_),g={x:l.x+m*v,y:l.y+x*v},h=t.x-g.x,w=t.y-g.y;return{c1:new P(a.x+h,a.y+w),c2:new P(l.x+h,l.y+w)}}length(){let t=0,e,i;for(let n=0;n<=10;n+=1){const o=n/10,u=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(n>0){const l=u-e,c=a-i;t+=Math.sqrt(l*l+c*c)}e=u,i=a}return t}point(s,t,e,i,n){return t*(1-s)*(1-s)*(1-s)+3*e*(1-s)*(1-s)*s+3*i*(1-s)*s*s+n*s*s*s}},U=class{constructor(){d(this,"_et");try{this._et=new EventTarget}catch{this._et=document}}addEventListener(r,s,t){this._et.addEventListener(r,s,t)}dispatchEvent(r){return this._et.dispatchEvent(r)}removeEventListener(r,s,t){this._et.removeEventListener(r,s,t)}};function W(r,s=250){let t=0,e=null,i,n,o;const u=()=>{t=Date.now(),e=null,i=r.apply(n,o),e||(n=null,o=[])};return function(...l){const c=Date.now(),_=s-(c-t);return n=this,o=l,_<=0||_>s?(e&&(clearTimeout(e),e=null),t=c,i=r.apply(n,o),e||(n=null,o=[])):e||(e=window.setTimeout(u,_)),i}}var D=class S extends U{constructor(t,e={}){super();d(this,"dotSize");d(this,"minWidth");d(this,"maxWidth");d(this,"penColor");d(this,"minDistance");d(this,"velocityFilterWeight");d(this,"compositeOperation");d(this,"backgroundColor");d(this,"throttle");d(this,"canvasContextOptions");d(this,"_ctx");d(this,"_drawingStroke",!1);d(this,"_isEmpty",!0);d(this,"_dataUrl");d(this,"_dataUrlOptions");d(this,"_lastPoints",[]);d(this,"_data",[]);d(this,"_lastVelocity",0);d(this,"_lastWidth",0);d(this,"_strokeMoveUpdate");d(this,"_strokePointerId");this.canvas=t,this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle=e.throttle??16,this.minDistance=e.minDistance??5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=e.canvasContextOptions??{},this._strokeMoveUpdate=this.throttle?W(S.prototype._strokeUpdate,this.throttle):S.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._handlePointerCancel=this._handlePointerCancel.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._dataUrl=void 0,this._dataUrlOptions=void 0,this._strokePointerId=void 0}redraw(){const t=this._data,e=this._dataUrl,i=this._dataUrlOptions;this.clear(),e&&this.fromDataURL(e,i),this.fromData(t,{clear:!1})}fromDataURL(t,e={}){return new Promise((i,n)=>{const o=new Image,u=e.ratio||window.devicePixelRatio||1,a=e.width||this.canvas.width/u,l=e.height||this.canvas.height/u,c=e.xOffset||0,_=e.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,c,_,a,l),i()},o.onerror=m=>{n(m)},o.crossOrigin="anonymous",o.src=t,this._isEmpty=!1,this._dataUrl=t,this._dataUrlOptions={...e}})}toDataURL(t="image/png",e){switch(t){case"image/svg+xml":return typeof e!="object"&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`;default:return typeof e!="number"&&(e=void 0),this.canvas.toDataURL(t,e)}}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none",this.canvas.style.webkitUserSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.style.webkitUserSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){const t=window.document===this.canvas.ownerDocument?window:this.canvas.ownerDocument.defaultView??this.canvas.ownerDocument;return{addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("pointercancel",this._handlePointerCancel),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd),t("touchcancel",this._handleTouchCancel)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?t.buttons===1:(t.buttons&1)===1}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_handleMouseDown(t){!this._isLeftButtonPressed(t,!0)||this._drawingStroke||this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){if(!this._isLeftButtonPressed(t,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(t),!1);return}this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){t.targetTouches.length!==1||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){if(t.targetTouches.length===1){if(t.cancelable&&t.preventDefault(),!this._drawingStroke){this._strokeEnd(this._touchEventToSignatureEvent(t),!1);return}this._strokeMoveUpdate(this._touchEventToSignatureEvent(t))}}_handleTouchEnd(t){t.targetTouches.length===0&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_handlePointerCancel(t){this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handleTouchCancel(t){t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t),!1)}_getPointerId(t){return t.persistentDeviceId||t.pointerId}_allowPointerId(t,e=!1){return typeof this._strokePointerId>"u"?e:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){this._drawingStroke||!this._isLeftButtonPressed(t)||!this._allowPointerId(t,!0)||(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){if(this._allowPointerId(t)){if(!this._isLeftButtonPressed(t,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(t),!1);return}t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))}}_handlePointerUp(t){this._isLeftButtonPressed(t)||!this._allowPointerId(t)||(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;const{addEventListener:i}=this._getListenerFunctions();switch(t.event.type){case"mousedown":i("mousemove",this._handleMouseMove,{passive:!1}),i("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":i("touchmove",this._handleTouchMove,{passive:!1}),i("touchend",this._handleTouchEnd,{passive:!1}),i("touchcancel",this._handleTouchCancel,{passive:!1});break;case"pointerdown":i("pointermove",this._handlePointerMove,{passive:!1}),i("pointerup",this._handlePointerUp,{passive:!1}),i("pointercancel",this._handlePointerCancel,{passive:!1});break}this._drawingStroke=!0;const n=this._getPointGroupOptions(),o={...n,points:[]};this._data.push(o),this._reset(n),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(this._data.length===0){this._strokeBegin(t);return}this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));const e=this._createPoint(t.x,t.y,t.pressure),i=this._data[this._data.length-1],n=i.points,o=n.length>0&&n[n.length-1],u=o?e.distanceTo(o)<=this.minDistance:!1,a=this._getPointGroupOptions(i);if(!o||!(o&&u)){const l=this._addPoint(e,a);o?l&&this._drawCurve(l,a):this._drawDot(e,a),n.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,i){const n=this.canvas.getBoundingClientRect();return new P(t-n.left,e-n.top,i,new Date().getTime())}_addPoint(t,e){const{_lastPoints:i}=this;if(i.push(t),i.length>2){i.length===3&&i.unshift(i[0]);const n=this._calculateCurveWidths(i[1],i[2],e),o=M.fromPoints(i,n);return i.shift(),o}return null}_calculateCurveWidths(t,e,i){const n=i.velocityFilterWeight*e.velocityFrom(t)+(1-i.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(n,i),u={end:o,start:this._lastWidth};return this._lastVelocity=n,this._lastWidth=o,u}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,i){const n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const i=this._ctx,n=t.endWidth-t.startWidth,o=Math.ceil(t.length())*2;i.beginPath(),i.fillStyle=e.penColor;for(let u=0;u<o;u+=1){const a=u/o,l=a*a,c=l*a,_=1-a,m=_*_,x=m*_;let v=x*t.startPoint.x;v+=3*m*a*t.control1.x,v+=3*_*l*t.control2.x,v+=c*t.endPoint.x;let g=x*t.startPoint.y;g+=3*m*a*t.control1.y,g+=3*_*l*t.control2.y,g+=c*t.endPoint.y;const h=Math.min(t.startWidth+c*n,e.maxWidth);this._drawCurveSegment(v,g,h)}i.closePath(),i.fill()}_drawDot(t,e){const i=this._ctx,n=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;i.beginPath(),this._drawCurveSegment(t.x,t.y,n),i.closePath(),i.fillStyle=e.penColor,i.fill()}_fromData(t,e,i){for(const n of t){const{points:o}=n,u=this._getPointGroupOptions(n);if(o.length>1)for(let a=0;a<o.length;a+=1){const l=o[a],c=new P(l.x,l.y,l.pressure,l.time);a===0&&this._reset(u);const _=this._addPoint(c,u);_&&e(_,u)}else this._reset(u),i(o[0],u)}}toSVG({includeBackgroundColor:t=!1,includeDataUrl:e=!1}={}){var _,m,x,v,g;const i=this._data,n=Math.max(window.devicePixelRatio||1,1),o=0,u=0,a=this.canvas.width/n,l=this.canvas.height/n,c=document.createElementNS("http://www.w3.org/2000/svg","svg");if(c.setAttribute("xmlns","http://www.w3.org/2000/svg"),c.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),c.setAttribute("viewBox",`${o} ${u} ${a} ${l}`),c.setAttribute("width",a.toString()),c.setAttribute("height",l.toString()),t&&this.backgroundColor){const h=document.createElement("rect");h.setAttribute("width","100%"),h.setAttribute("height","100%"),h.setAttribute("fill",this.backgroundColor),c.appendChild(h)}if(e&&this._dataUrl){const h=((_=this._dataUrlOptions)==null?void 0:_.ratio)||window.devicePixelRatio||1,w=((m=this._dataUrlOptions)==null?void 0:m.width)||this.canvas.width/h,f=((x=this._dataUrlOptions)==null?void 0:x.height)||this.canvas.height/h,y=((v=this._dataUrlOptions)==null?void 0:v.xOffset)||0,E=((g=this._dataUrlOptions)==null?void 0:g.yOffset)||0,p=document.createElement("image");p.setAttribute("x",y.toString()),p.setAttribute("y",E.toString()),p.setAttribute("width",w.toString()),p.setAttribute("height",f.toString()),p.setAttribute("preserveAspectRatio","none"),p.setAttribute("href",this._dataUrl),c.appendChild(p)}return this._fromData(i,(h,{penColor:w})=>{const f=document.createElement("path");if(!isNaN(h.control1.x)&&!isNaN(h.control1.y)&&!isNaN(h.control2.x)&&!isNaN(h.control2.y)){const y=`M ${h.startPoint.x.toFixed(3)},${h.startPoint.y.toFixed(3)} C ${h.control1.x.toFixed(3)},${h.control1.y.toFixed(3)} ${h.control2.x.toFixed(3)},${h.control2.y.toFixed(3)} ${h.endPoint.x.toFixed(3)},${h.endPoint.y.toFixed(3)}`;f.setAttribute("d",y),f.setAttribute("stroke-width",(h.endWidth*2.25).toFixed(3)),f.setAttribute("stroke",w),f.setAttribute("fill","none"),f.setAttribute("stroke-linecap","round"),c.appendChild(f)}},(h,{penColor:w,dotSize:f,minWidth:y,maxWidth:E})=>{const p=document.createElement("circle"),k=f>0?f:(y+E)/2;p.setAttribute("r",k.toString()),p.setAttribute("cx",h.x.toString()),p.setAttribute("cy",h.y.toString()),p.setAttribute("fill",w),c.appendChild(p)}),c.outerHTML}};exports.default=D;
|
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
var C = Object.defineProperty;
|
|
2
|
+
var T = (r, s, t) => s in r ? C(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
|
|
3
|
+
var d = (r, s, t) => T(r, typeof s != "symbol" ? s + "" : s, t);
|
|
4
|
+
/*!
|
|
5
|
+
* Signature Pad v5.1.3 | https://github.com/szimek/signature_pad
|
|
6
|
+
* (c) 2025 Szymon Nowak | Released under the MIT license
|
|
7
|
+
*/
|
|
8
|
+
var E = class {
|
|
9
|
+
constructor(r, s, t, e) {
|
|
10
|
+
d(this, "x");
|
|
11
|
+
d(this, "y");
|
|
12
|
+
d(this, "pressure");
|
|
13
|
+
d(this, "time");
|
|
14
|
+
if (isNaN(r) || isNaN(s))
|
|
15
|
+
throw new Error(`Point is invalid: (${r}, ${s})`);
|
|
16
|
+
this.x = +r, this.y = +s, this.pressure = t || 0, this.time = e || Date.now();
|
|
17
|
+
}
|
|
18
|
+
distanceTo(r) {
|
|
19
|
+
return Math.sqrt(
|
|
20
|
+
Math.pow(this.x - r.x, 2) + Math.pow(this.y - r.y, 2)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
equals(r) {
|
|
24
|
+
return this.x === r.x && this.y === r.y && this.pressure === r.pressure && this.time === r.time;
|
|
25
|
+
}
|
|
26
|
+
velocityFrom(r) {
|
|
27
|
+
return this.time !== r.time ? this.distanceTo(r) / (this.time - r.time) : 0;
|
|
28
|
+
}
|
|
29
|
+
}, M = class b {
|
|
30
|
+
constructor(s, t, e, i, n, o) {
|
|
31
|
+
this.startPoint = s, this.control2 = t, this.control1 = e, this.endPoint = i, this.startWidth = n, this.endWidth = o;
|
|
32
|
+
}
|
|
33
|
+
static fromPoints(s, t) {
|
|
34
|
+
const e = this.calculateControlPoints(s[0], s[1], s[2]).c2, i = this.calculateControlPoints(s[1], s[2], s[3]).c1;
|
|
35
|
+
return new b(s[1], e, i, s[2], t.start, t.end);
|
|
36
|
+
}
|
|
37
|
+
static calculateControlPoints(s, t, e) {
|
|
38
|
+
const i = s.x - t.x, n = s.y - t.y, o = t.x - e.x, u = t.y - e.y, a = { x: (s.x + t.x) / 2, y: (s.y + t.y) / 2 }, l = { x: (t.x + e.x) / 2, y: (t.y + e.y) / 2 }, c = Math.sqrt(i * i + n * n), _ = Math.sqrt(o * o + u * u), m = a.x - l.x, x = a.y - l.y, v = c + _ == 0 ? 0 : _ / (c + _), g = { x: l.x + m * v, y: l.y + x * v }, h = t.x - g.x, w = t.y - g.y;
|
|
39
|
+
return {
|
|
40
|
+
c1: new E(a.x + h, a.y + w),
|
|
41
|
+
c2: new E(l.x + h, l.y + w)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
// Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.
|
|
45
|
+
length() {
|
|
46
|
+
let t = 0, e, i;
|
|
47
|
+
for (let n = 0; n <= 10; n += 1) {
|
|
48
|
+
const o = n / 10, u = this.point(
|
|
49
|
+
o,
|
|
50
|
+
this.startPoint.x,
|
|
51
|
+
this.control1.x,
|
|
52
|
+
this.control2.x,
|
|
53
|
+
this.endPoint.x
|
|
54
|
+
), a = this.point(
|
|
55
|
+
o,
|
|
56
|
+
this.startPoint.y,
|
|
57
|
+
this.control1.y,
|
|
58
|
+
this.control2.y,
|
|
59
|
+
this.endPoint.y
|
|
60
|
+
);
|
|
61
|
+
if (n > 0) {
|
|
62
|
+
const l = u - e, c = a - i;
|
|
63
|
+
t += Math.sqrt(l * l + c * c);
|
|
64
|
+
}
|
|
65
|
+
e = u, i = a;
|
|
66
|
+
}
|
|
67
|
+
return t;
|
|
68
|
+
}
|
|
69
|
+
// Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.
|
|
70
|
+
point(s, t, e, i, n) {
|
|
71
|
+
return t * (1 - s) * (1 - s) * (1 - s) + 3 * e * (1 - s) * (1 - s) * s + 3 * i * (1 - s) * s * s + n * s * s * s;
|
|
72
|
+
}
|
|
73
|
+
}, U = class {
|
|
74
|
+
/* tslint:enable: variable-name */
|
|
75
|
+
constructor() {
|
|
76
|
+
/* tslint:disable: variable-name */
|
|
77
|
+
d(this, "_et");
|
|
78
|
+
try {
|
|
79
|
+
this._et = new EventTarget();
|
|
80
|
+
} catch {
|
|
81
|
+
this._et = document;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
addEventListener(r, s, t) {
|
|
85
|
+
this._et.addEventListener(r, s, t);
|
|
86
|
+
}
|
|
87
|
+
dispatchEvent(r) {
|
|
88
|
+
return this._et.dispatchEvent(r);
|
|
89
|
+
}
|
|
90
|
+
removeEventListener(r, s, t) {
|
|
91
|
+
this._et.removeEventListener(r, s, t);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
function W(r, s = 250) {
|
|
95
|
+
let t = 0, e = null, i, n, o;
|
|
96
|
+
const u = () => {
|
|
97
|
+
t = Date.now(), e = null, i = r.apply(n, o), e || (n = null, o = []);
|
|
98
|
+
};
|
|
99
|
+
return function(...l) {
|
|
100
|
+
const c = Date.now(), _ = s - (c - t);
|
|
101
|
+
return n = this, o = l, _ <= 0 || _ > s ? (e && (clearTimeout(e), e = null), t = c, i = r.apply(n, o), e || (n = null, o = [])) : e || (e = window.setTimeout(u, _)), i;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
var O = class S extends U {
|
|
105
|
+
/* tslint:enable: variable-name */
|
|
106
|
+
constructor(t, e = {}) {
|
|
107
|
+
super();
|
|
108
|
+
// Public stuff
|
|
109
|
+
d(this, "dotSize");
|
|
110
|
+
d(this, "minWidth");
|
|
111
|
+
d(this, "maxWidth");
|
|
112
|
+
d(this, "penColor");
|
|
113
|
+
d(this, "minDistance");
|
|
114
|
+
d(this, "velocityFilterWeight");
|
|
115
|
+
d(this, "compositeOperation");
|
|
116
|
+
d(this, "backgroundColor");
|
|
117
|
+
d(this, "throttle");
|
|
118
|
+
d(this, "canvasContextOptions");
|
|
119
|
+
// Private stuff
|
|
120
|
+
/* tslint:disable: variable-name */
|
|
121
|
+
d(this, "_ctx");
|
|
122
|
+
d(this, "_drawingStroke", !1);
|
|
123
|
+
d(this, "_isEmpty", !0);
|
|
124
|
+
d(this, "_dataUrl");
|
|
125
|
+
d(this, "_dataUrlOptions");
|
|
126
|
+
d(this, "_lastPoints", []);
|
|
127
|
+
// Stores up to 4 most recent points; used to generate a new curve
|
|
128
|
+
d(this, "_data", []);
|
|
129
|
+
// Stores all points in groups (one group per line or dot)
|
|
130
|
+
d(this, "_lastVelocity", 0);
|
|
131
|
+
d(this, "_lastWidth", 0);
|
|
132
|
+
d(this, "_strokeMoveUpdate");
|
|
133
|
+
d(this, "_strokePointerId");
|
|
134
|
+
this.canvas = t, this.velocityFilterWeight = e.velocityFilterWeight || 0.7, this.minWidth = e.minWidth || 0.5, this.maxWidth = e.maxWidth || 2.5, this.throttle = e.throttle ?? 16, this.minDistance = e.minDistance ?? 5, this.dotSize = e.dotSize || 0, this.penColor = e.penColor || "black", this.backgroundColor = e.backgroundColor || "rgba(0,0,0,0)", this.compositeOperation = e.compositeOperation || "source-over", this.canvasContextOptions = e.canvasContextOptions ?? {}, this._strokeMoveUpdate = this.throttle ? W(S.prototype._strokeUpdate, this.throttle) : S.prototype._strokeUpdate, this._handleMouseDown = this._handleMouseDown.bind(this), this._handleMouseMove = this._handleMouseMove.bind(this), this._handleMouseUp = this._handleMouseUp.bind(this), this._handleTouchStart = this._handleTouchStart.bind(this), this._handleTouchMove = this._handleTouchMove.bind(this), this._handleTouchEnd = this._handleTouchEnd.bind(this), this._handlePointerDown = this._handlePointerDown.bind(this), this._handlePointerMove = this._handlePointerMove.bind(this), this._handlePointerUp = this._handlePointerUp.bind(this), this._handlePointerCancel = this._handlePointerCancel.bind(this), this._handleTouchCancel = this._handleTouchCancel.bind(this), this._ctx = t.getContext(
|
|
135
|
+
"2d",
|
|
136
|
+
this.canvasContextOptions
|
|
137
|
+
), this.clear(), this.on();
|
|
138
|
+
}
|
|
139
|
+
clear() {
|
|
140
|
+
const { _ctx: t, canvas: e } = this;
|
|
141
|
+
t.fillStyle = this.backgroundColor, t.clearRect(0, 0, e.width, e.height), t.fillRect(0, 0, e.width, e.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0, this._dataUrl = void 0, this._dataUrlOptions = void 0, this._strokePointerId = void 0;
|
|
142
|
+
}
|
|
143
|
+
redraw() {
|
|
144
|
+
const t = this._data, e = this._dataUrl, i = this._dataUrlOptions;
|
|
145
|
+
this.clear(), e && this.fromDataURL(e, i), this.fromData(t, { clear: !1 });
|
|
146
|
+
}
|
|
147
|
+
fromDataURL(t, e = {}) {
|
|
148
|
+
return new Promise((i, n) => {
|
|
149
|
+
const o = new Image(), u = e.ratio || window.devicePixelRatio || 1, a = e.width || this.canvas.width / u, l = e.height || this.canvas.height / u, c = e.xOffset || 0, _ = e.yOffset || 0;
|
|
150
|
+
this._reset(this._getPointGroupOptions()), o.onload = () => {
|
|
151
|
+
this._ctx.drawImage(o, c, _, a, l), i();
|
|
152
|
+
}, o.onerror = (m) => {
|
|
153
|
+
n(m);
|
|
154
|
+
}, o.crossOrigin = "anonymous", o.src = t, this._isEmpty = !1, this._dataUrl = t, this._dataUrlOptions = { ...e };
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
toDataURL(t = "image/png", e) {
|
|
158
|
+
switch (t) {
|
|
159
|
+
case "image/svg+xml":
|
|
160
|
+
return typeof e != "object" && (e = void 0), `data:image/svg+xml;base64,${btoa(
|
|
161
|
+
this.toSVG(e)
|
|
162
|
+
)}`;
|
|
163
|
+
default:
|
|
164
|
+
return typeof e != "number" && (e = void 0), this.canvas.toDataURL(t, e);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
on() {
|
|
168
|
+
this.canvas.style.touchAction = "none", this.canvas.style.msTouchAction = "none", this.canvas.style.userSelect = "none", this.canvas.style.webkitUserSelect = "none";
|
|
169
|
+
const t = /Macintosh/.test(navigator.userAgent) && "ontouchstart" in document;
|
|
170
|
+
window.PointerEvent && !t ? this._handlePointerEvents() : (this._handleMouseEvents(), "ontouchstart" in window && this._handleTouchEvents());
|
|
171
|
+
}
|
|
172
|
+
off() {
|
|
173
|
+
this.canvas.style.touchAction = "auto", this.canvas.style.msTouchAction = "auto", this.canvas.style.userSelect = "auto", this.canvas.style.webkitUserSelect = "auto", this.canvas.removeEventListener("pointerdown", this._handlePointerDown), this.canvas.removeEventListener("mousedown", this._handleMouseDown), this.canvas.removeEventListener("touchstart", this._handleTouchStart), this._removeMoveUpEventListeners();
|
|
174
|
+
}
|
|
175
|
+
_getListenerFunctions() {
|
|
176
|
+
const t = window.document === this.canvas.ownerDocument ? window : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;
|
|
177
|
+
return {
|
|
178
|
+
addEventListener: t.addEventListener.bind(
|
|
179
|
+
t
|
|
180
|
+
),
|
|
181
|
+
removeEventListener: t.removeEventListener.bind(
|
|
182
|
+
t
|
|
183
|
+
)
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
_removeMoveUpEventListeners() {
|
|
187
|
+
const { removeEventListener: t } = this._getListenerFunctions();
|
|
188
|
+
t("pointermove", this._handlePointerMove), t("pointerup", this._handlePointerUp), t("pointercancel", this._handlePointerCancel), t("mousemove", this._handleMouseMove), t("mouseup", this._handleMouseUp), t("touchmove", this._handleTouchMove), t("touchend", this._handleTouchEnd), t("touchcancel", this._handleTouchCancel);
|
|
189
|
+
}
|
|
190
|
+
isEmpty() {
|
|
191
|
+
return this._isEmpty;
|
|
192
|
+
}
|
|
193
|
+
fromData(t, { clear: e = !0 } = {}) {
|
|
194
|
+
e && this.clear(), this._fromData(
|
|
195
|
+
t,
|
|
196
|
+
this._drawCurve.bind(this),
|
|
197
|
+
this._drawDot.bind(this)
|
|
198
|
+
), this._data = this._data.concat(t);
|
|
199
|
+
}
|
|
200
|
+
toData() {
|
|
201
|
+
return this._data;
|
|
202
|
+
}
|
|
203
|
+
_isLeftButtonPressed(t, e) {
|
|
204
|
+
return e ? t.buttons === 1 : (t.buttons & 1) === 1;
|
|
205
|
+
}
|
|
206
|
+
_pointerEventToSignatureEvent(t) {
|
|
207
|
+
return {
|
|
208
|
+
event: t,
|
|
209
|
+
type: t.type,
|
|
210
|
+
x: t.clientX,
|
|
211
|
+
y: t.clientY,
|
|
212
|
+
pressure: "pressure" in t ? t.pressure : 0
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
_touchEventToSignatureEvent(t) {
|
|
216
|
+
const e = t.changedTouches[0];
|
|
217
|
+
return {
|
|
218
|
+
event: t,
|
|
219
|
+
type: t.type,
|
|
220
|
+
x: e.clientX,
|
|
221
|
+
y: e.clientY,
|
|
222
|
+
pressure: e.force
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
// Event handlers
|
|
226
|
+
_handleMouseDown(t) {
|
|
227
|
+
!this._isLeftButtonPressed(t, !0) || this._drawingStroke || this._strokeBegin(this._pointerEventToSignatureEvent(t));
|
|
228
|
+
}
|
|
229
|
+
_handleMouseMove(t) {
|
|
230
|
+
if (!this._isLeftButtonPressed(t, !0) || !this._drawingStroke) {
|
|
231
|
+
this._strokeEnd(this._pointerEventToSignatureEvent(t), !1);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t));
|
|
235
|
+
}
|
|
236
|
+
_handleMouseUp(t) {
|
|
237
|
+
this._isLeftButtonPressed(t) || this._strokeEnd(this._pointerEventToSignatureEvent(t));
|
|
238
|
+
}
|
|
239
|
+
_handleTouchStart(t) {
|
|
240
|
+
t.targetTouches.length !== 1 || this._drawingStroke || (t.cancelable && t.preventDefault(), this._strokeBegin(this._touchEventToSignatureEvent(t)));
|
|
241
|
+
}
|
|
242
|
+
_handleTouchMove(t) {
|
|
243
|
+
if (t.targetTouches.length === 1) {
|
|
244
|
+
if (t.cancelable && t.preventDefault(), !this._drawingStroke) {
|
|
245
|
+
this._strokeEnd(this._touchEventToSignatureEvent(t), !1);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
this._strokeMoveUpdate(this._touchEventToSignatureEvent(t));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
_handleTouchEnd(t) {
|
|
252
|
+
t.targetTouches.length === 0 && (t.cancelable && t.preventDefault(), this._strokeEnd(this._touchEventToSignatureEvent(t)));
|
|
253
|
+
}
|
|
254
|
+
_handlePointerCancel(t) {
|
|
255
|
+
this._allowPointerId(t) && (t.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(t), !1));
|
|
256
|
+
}
|
|
257
|
+
_handleTouchCancel(t) {
|
|
258
|
+
t.cancelable && t.preventDefault(), this._strokeEnd(this._touchEventToSignatureEvent(t), !1);
|
|
259
|
+
}
|
|
260
|
+
_getPointerId(t) {
|
|
261
|
+
return t.persistentDeviceId || t.pointerId;
|
|
262
|
+
}
|
|
263
|
+
_allowPointerId(t, e = !1) {
|
|
264
|
+
return typeof this._strokePointerId > "u" ? e : this._getPointerId(t) === this._strokePointerId;
|
|
265
|
+
}
|
|
266
|
+
_handlePointerDown(t) {
|
|
267
|
+
this._drawingStroke || !this._isLeftButtonPressed(t) || !this._allowPointerId(t, !0) || (this._strokePointerId = this._getPointerId(t), t.preventDefault(), this._strokeBegin(this._pointerEventToSignatureEvent(t)));
|
|
268
|
+
}
|
|
269
|
+
_handlePointerMove(t) {
|
|
270
|
+
if (this._allowPointerId(t)) {
|
|
271
|
+
if (!this._isLeftButtonPressed(t, !0) || !this._drawingStroke) {
|
|
272
|
+
this._strokeEnd(this._pointerEventToSignatureEvent(t), !1);
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
t.preventDefault(), this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
_handlePointerUp(t) {
|
|
279
|
+
this._isLeftButtonPressed(t) || !this._allowPointerId(t) || (t.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(t)));
|
|
280
|
+
}
|
|
281
|
+
_getPointGroupOptions(t) {
|
|
282
|
+
return {
|
|
283
|
+
penColor: t && "penColor" in t ? t.penColor : this.penColor,
|
|
284
|
+
dotSize: t && "dotSize" in t ? t.dotSize : this.dotSize,
|
|
285
|
+
minWidth: t && "minWidth" in t ? t.minWidth : this.minWidth,
|
|
286
|
+
maxWidth: t && "maxWidth" in t ? t.maxWidth : this.maxWidth,
|
|
287
|
+
velocityFilterWeight: t && "velocityFilterWeight" in t ? t.velocityFilterWeight : this.velocityFilterWeight,
|
|
288
|
+
compositeOperation: t && "compositeOperation" in t ? t.compositeOperation : this.compositeOperation
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
// Private methods
|
|
292
|
+
_strokeBegin(t) {
|
|
293
|
+
if (!this.dispatchEvent(
|
|
294
|
+
new CustomEvent("beginStroke", { detail: t, cancelable: !0 })
|
|
295
|
+
))
|
|
296
|
+
return;
|
|
297
|
+
const { addEventListener: i } = this._getListenerFunctions();
|
|
298
|
+
switch (t.event.type) {
|
|
299
|
+
case "mousedown":
|
|
300
|
+
i("mousemove", this._handleMouseMove, {
|
|
301
|
+
passive: !1
|
|
302
|
+
}), i("mouseup", this._handleMouseUp, { passive: !1 });
|
|
303
|
+
break;
|
|
304
|
+
case "touchstart":
|
|
305
|
+
i("touchmove", this._handleTouchMove, {
|
|
306
|
+
passive: !1
|
|
307
|
+
}), i("touchend", this._handleTouchEnd, { passive: !1 }), i("touchcancel", this._handleTouchCancel, { passive: !1 });
|
|
308
|
+
break;
|
|
309
|
+
case "pointerdown":
|
|
310
|
+
i("pointermove", this._handlePointerMove, {
|
|
311
|
+
passive: !1
|
|
312
|
+
}), i("pointerup", this._handlePointerUp, {
|
|
313
|
+
passive: !1
|
|
314
|
+
}), i("pointercancel", this._handlePointerCancel, {
|
|
315
|
+
passive: !1
|
|
316
|
+
});
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
this._drawingStroke = !0;
|
|
320
|
+
const n = this._getPointGroupOptions(), o = {
|
|
321
|
+
...n,
|
|
322
|
+
points: []
|
|
323
|
+
};
|
|
324
|
+
this._data.push(o), this._reset(n), this._strokeUpdate(t);
|
|
325
|
+
}
|
|
326
|
+
_strokeUpdate(t) {
|
|
327
|
+
if (!this._drawingStroke)
|
|
328
|
+
return;
|
|
329
|
+
if (this._data.length === 0) {
|
|
330
|
+
this._strokeBegin(t);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
this.dispatchEvent(
|
|
334
|
+
new CustomEvent("beforeUpdateStroke", { detail: t })
|
|
335
|
+
);
|
|
336
|
+
const e = this._createPoint(t.x, t.y, t.pressure), i = this._data[this._data.length - 1], n = i.points, o = n.length > 0 && n[n.length - 1], u = o ? e.distanceTo(o) <= this.minDistance : !1, a = this._getPointGroupOptions(i);
|
|
337
|
+
if (!o || !(o && u)) {
|
|
338
|
+
const l = this._addPoint(e, a);
|
|
339
|
+
o ? l && this._drawCurve(l, a) : this._drawDot(e, a), n.push({
|
|
340
|
+
time: e.time,
|
|
341
|
+
x: e.x,
|
|
342
|
+
y: e.y,
|
|
343
|
+
pressure: e.pressure
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
this.dispatchEvent(new CustomEvent("afterUpdateStroke", { detail: t }));
|
|
347
|
+
}
|
|
348
|
+
_strokeEnd(t, e = !0) {
|
|
349
|
+
this._removeMoveUpEventListeners(), this._drawingStroke && (e && this._strokeUpdate(t), this._drawingStroke = !1, this._strokePointerId = void 0, this.dispatchEvent(new CustomEvent("endStroke", { detail: t })));
|
|
350
|
+
}
|
|
351
|
+
_handlePointerEvents() {
|
|
352
|
+
this._drawingStroke = !1, this.canvas.addEventListener("pointerdown", this._handlePointerDown, {
|
|
353
|
+
passive: !1
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
_handleMouseEvents() {
|
|
357
|
+
this._drawingStroke = !1, this.canvas.addEventListener("mousedown", this._handleMouseDown, {
|
|
358
|
+
passive: !1
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
_handleTouchEvents() {
|
|
362
|
+
this.canvas.addEventListener("touchstart", this._handleTouchStart, {
|
|
363
|
+
passive: !1
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
// Called when a new line is started
|
|
367
|
+
_reset(t) {
|
|
368
|
+
this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (t.minWidth + t.maxWidth) / 2, this._ctx.fillStyle = t.penColor, this._ctx.globalCompositeOperation = t.compositeOperation;
|
|
369
|
+
}
|
|
370
|
+
_createPoint(t, e, i) {
|
|
371
|
+
const n = this.canvas.getBoundingClientRect();
|
|
372
|
+
return new E(
|
|
373
|
+
t - n.left,
|
|
374
|
+
e - n.top,
|
|
375
|
+
i,
|
|
376
|
+
(/* @__PURE__ */ new Date()).getTime()
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
// Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)
|
|
380
|
+
_addPoint(t, e) {
|
|
381
|
+
const { _lastPoints: i } = this;
|
|
382
|
+
if (i.push(t), i.length > 2) {
|
|
383
|
+
i.length === 3 && i.unshift(i[0]);
|
|
384
|
+
const n = this._calculateCurveWidths(
|
|
385
|
+
i[1],
|
|
386
|
+
i[2],
|
|
387
|
+
e
|
|
388
|
+
), o = M.fromPoints(i, n);
|
|
389
|
+
return i.shift(), o;
|
|
390
|
+
}
|
|
391
|
+
return null;
|
|
392
|
+
}
|
|
393
|
+
_calculateCurveWidths(t, e, i) {
|
|
394
|
+
const n = i.velocityFilterWeight * e.velocityFrom(t) + (1 - i.velocityFilterWeight) * this._lastVelocity, o = this._strokeWidth(n, i), u = {
|
|
395
|
+
end: o,
|
|
396
|
+
start: this._lastWidth
|
|
397
|
+
};
|
|
398
|
+
return this._lastVelocity = n, this._lastWidth = o, u;
|
|
399
|
+
}
|
|
400
|
+
_strokeWidth(t, e) {
|
|
401
|
+
return Math.max(e.maxWidth / (t + 1), e.minWidth);
|
|
402
|
+
}
|
|
403
|
+
_drawCurveSegment(t, e, i) {
|
|
404
|
+
const n = this._ctx;
|
|
405
|
+
n.moveTo(t, e), n.arc(t, e, i, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
406
|
+
}
|
|
407
|
+
_drawCurve(t, e) {
|
|
408
|
+
const i = this._ctx, n = t.endWidth - t.startWidth, o = Math.ceil(t.length()) * 2;
|
|
409
|
+
i.beginPath(), i.fillStyle = e.penColor;
|
|
410
|
+
for (let u = 0; u < o; u += 1) {
|
|
411
|
+
const a = u / o, l = a * a, c = l * a, _ = 1 - a, m = _ * _, x = m * _;
|
|
412
|
+
let v = x * t.startPoint.x;
|
|
413
|
+
v += 3 * m * a * t.control1.x, v += 3 * _ * l * t.control2.x, v += c * t.endPoint.x;
|
|
414
|
+
let g = x * t.startPoint.y;
|
|
415
|
+
g += 3 * m * a * t.control1.y, g += 3 * _ * l * t.control2.y, g += c * t.endPoint.y;
|
|
416
|
+
const h = Math.min(
|
|
417
|
+
t.startWidth + c * n,
|
|
418
|
+
e.maxWidth
|
|
419
|
+
);
|
|
420
|
+
this._drawCurveSegment(v, g, h);
|
|
421
|
+
}
|
|
422
|
+
i.closePath(), i.fill();
|
|
423
|
+
}
|
|
424
|
+
_drawDot(t, e) {
|
|
425
|
+
const i = this._ctx, n = e.dotSize > 0 ? e.dotSize : (e.minWidth + e.maxWidth) / 2;
|
|
426
|
+
i.beginPath(), this._drawCurveSegment(t.x, t.y, n), i.closePath(), i.fillStyle = e.penColor, i.fill();
|
|
427
|
+
}
|
|
428
|
+
_fromData(t, e, i) {
|
|
429
|
+
for (const n of t) {
|
|
430
|
+
const { points: o } = n, u = this._getPointGroupOptions(n);
|
|
431
|
+
if (o.length > 1)
|
|
432
|
+
for (let a = 0; a < o.length; a += 1) {
|
|
433
|
+
const l = o[a], c = new E(
|
|
434
|
+
l.x,
|
|
435
|
+
l.y,
|
|
436
|
+
l.pressure,
|
|
437
|
+
l.time
|
|
438
|
+
);
|
|
439
|
+
a === 0 && this._reset(u);
|
|
440
|
+
const _ = this._addPoint(c, u);
|
|
441
|
+
_ && e(_, u);
|
|
442
|
+
}
|
|
443
|
+
else
|
|
444
|
+
this._reset(u), i(o[0], u);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
toSVG({ includeBackgroundColor: t = !1, includeDataUrl: e = !1 } = {}) {
|
|
448
|
+
var _, m, x, v, g;
|
|
449
|
+
const i = this._data, n = Math.max(window.devicePixelRatio || 1, 1), o = 0, u = 0, a = this.canvas.width / n, l = this.canvas.height / n, c = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
450
|
+
if (c.setAttribute("xmlns", "http://www.w3.org/2000/svg"), c.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), c.setAttribute("viewBox", `${o} ${u} ${a} ${l}`), c.setAttribute("width", a.toString()), c.setAttribute("height", l.toString()), t && this.backgroundColor) {
|
|
451
|
+
const h = document.createElement("rect");
|
|
452
|
+
h.setAttribute("width", "100%"), h.setAttribute("height", "100%"), h.setAttribute("fill", this.backgroundColor), c.appendChild(h);
|
|
453
|
+
}
|
|
454
|
+
if (e && this._dataUrl) {
|
|
455
|
+
const h = ((_ = this._dataUrlOptions) == null ? void 0 : _.ratio) || window.devicePixelRatio || 1, w = ((m = this._dataUrlOptions) == null ? void 0 : m.width) || this.canvas.width / h, f = ((x = this._dataUrlOptions) == null ? void 0 : x.height) || this.canvas.height / h, y = ((v = this._dataUrlOptions) == null ? void 0 : v.xOffset) || 0, P = ((g = this._dataUrlOptions) == null ? void 0 : g.yOffset) || 0, p = document.createElement("image");
|
|
456
|
+
p.setAttribute("x", y.toString()), p.setAttribute("y", P.toString()), p.setAttribute("width", w.toString()), p.setAttribute("height", f.toString()), p.setAttribute("preserveAspectRatio", "none"), p.setAttribute("href", this._dataUrl), c.appendChild(p);
|
|
457
|
+
}
|
|
458
|
+
return this._fromData(
|
|
459
|
+
i,
|
|
460
|
+
(h, { penColor: w }) => {
|
|
461
|
+
const f = document.createElement("path");
|
|
462
|
+
if (!isNaN(h.control1.x) && !isNaN(h.control1.y) && !isNaN(h.control2.x) && !isNaN(h.control2.y)) {
|
|
463
|
+
const y = `M ${h.startPoint.x.toFixed(3)},${h.startPoint.y.toFixed(
|
|
464
|
+
3
|
|
465
|
+
)} C ${h.control1.x.toFixed(3)},${h.control1.y.toFixed(3)} ${h.control2.x.toFixed(3)},${h.control2.y.toFixed(3)} ${h.endPoint.x.toFixed(3)},${h.endPoint.y.toFixed(3)}`;
|
|
466
|
+
f.setAttribute("d", y), f.setAttribute("stroke-width", (h.endWidth * 2.25).toFixed(3)), f.setAttribute("stroke", w), f.setAttribute("fill", "none"), f.setAttribute("stroke-linecap", "round"), c.appendChild(f);
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
(h, { penColor: w, dotSize: f, minWidth: y, maxWidth: P }) => {
|
|
470
|
+
const p = document.createElement("circle"), k = f > 0 ? f : (y + P) / 2;
|
|
471
|
+
p.setAttribute("r", k.toString()), p.setAttribute("cx", h.x.toString()), p.setAttribute("cy", h.y.toString()), p.setAttribute("fill", w), c.appendChild(p);
|
|
472
|
+
}
|
|
473
|
+
), c.outerHTML;
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
export {
|
|
477
|
+
O as default
|
|
478
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=ChatPage.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatPage.vue.d.ts","sourceRoot":"","sources":["../../../../app/components/ChatPage.vue"],"names":[],"mappings":";AAyKA,wBAMG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
trigger?(_: {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
}): any;
|
|
7
|
+
trigger?(_: {
|
|
8
|
+
isOpen: any;
|
|
9
|
+
}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
menuRef: unknown;
|
|
13
|
+
popupRef: unknown;
|
|
14
|
+
};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
close: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
21
|
+
onClose?: () => any;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
23
|
+
menuRef: unknown;
|
|
24
|
+
popupRef: unknown;
|
|
25
|
+
}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=CallBoard.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallBoard.vue.d.ts","sourceRoot":"","sources":["../../../../../app/components/call/CallBoard.vue"],"names":[],"mappings":"AAoFA,iBAAS,cAAc;WA6HT,OAAO,IAA6B;;;;YAbrB,GAAG;;;YACH,GAAG;;;;;;;EAiB/B;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CallMember } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
contact: CallMember;
|
|
4
|
+
isFullScreen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"toggle-fullscreen": () => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onToggle-fullscreen"?: () => any;
|
|
10
|
+
}>, {
|
|
11
|
+
isFullScreen: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
+
videoRef: HTMLVideoElement;
|
|
14
|
+
}, HTMLDivElement>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=CallMemberDisplay.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallMemberDisplay.vue.d.ts","sourceRoot":"","sources":["../../../../../app/components/call/CallMemberDisplay.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,UAAU,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;;;;;;kBADe,OAAO;;;;AAoK1B,wBAUG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Contact } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
contacts?: Contact[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=CallPageOverlay.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallPageOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../../app/components/call/CallPageOverlay.vue"],"names":[],"mappings":"AAoYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAqBvC,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB,CAAC;;AAsgBF,wBAOG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface BoardColorPickerExposed {
|
|
2
|
+
open: () => void;
|
|
3
|
+
close: () => void;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<{
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
colors: string[];
|
|
8
|
+
}, {
|
|
9
|
+
open: () => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
14
|
+
modelValue?: string;
|
|
15
|
+
colors: string[];
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
18
|
+
}>, {
|
|
19
|
+
modelValue: string;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
|
+
colorPickerWrapper: HTMLDivElement;
|
|
22
|
+
}, HTMLDivElement>;
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=BoardColorPicker.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardColorPicker.vue.d.ts","sourceRoot":"","sources":["../../../../../../app/components/call/paint-board/BoardColorPicker.vue"],"names":[],"mappings":"AAqJA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;;iBAIgB,MAAM;YACX,MAAM,EAAE;;UAPZ,MAAM,IAAI;WACT,MAAM,IAAI;;;;iBAKF,MAAM;YACX,MAAM,EAAE;;;;gBADH,MAAM;;;;AAFvB,wBAoNK"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: number;
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: number) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: (value: number) => any;
|
|
11
|
+
}>, {
|
|
12
|
+
color: string;
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
16
|
+
sliderRef: HTMLDivElement;
|
|
17
|
+
}, HTMLDivElement>;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=BrushSizeSlider.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrushSizeSlider.vue.d.ts","sourceRoot":"","sources":["../../../../../../app/components/call/paint-board/BrushSizeSlider.vue"],"names":[],"mappings":"AA+GA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;;;;;;WADQ,MAAM;SAFR,MAAM;SACN,MAAM;;;;AA8IhB,wBAUG"}
|