tuikit-atomicx-vue3 3.4.1 → 3.5.0-beta.7
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/.eslintrc.cjs +1 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js → MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js} +38 -36
- package/dist/baseComp/Modal/Modal.js +431 -23
- package/dist/chat/index.d.ts +68 -53
- package/dist/chat/server.js +15 -15
- package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
- package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
- package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
- package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
- package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
- package/dist/components/AudioSettingPanel/index.js +81 -73
- package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
- package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
- package/dist/components/BarrageInput/MessageInputState.js +82 -0
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +5 -4
- package/dist/components/BarrageInput/TextEditor/index.js +7 -7
- package/dist/components/BarrageInput/type.d.ts +17 -0
- package/dist/components/BarrageInput/type.js +4 -0
- package/dist/components/BarrageInput/utils.d.ts +30 -0
- package/dist/components/BarrageInput/utils.js +41 -0
- package/dist/components/BarrageList/BarrageList.js +80 -110
- package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListH5.js +95 -122
- package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
- package/dist/components/BarrageList/BarrageListState.js +106 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
- package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
- package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
- package/dist/components/BarrageList/index.d.ts +0 -36
- package/dist/components/CameraButton/index.js +18 -19
- package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +2 -1
- package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
- package/dist/components/CoHostPanel/BattlePanel.js +25 -25
- package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
- package/dist/components/CoHostPanel/ConnectionPanel.js +129 -120
- package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
- package/dist/components/CoHostPanel/constants.d.ts +3 -0
- package/dist/components/CoHostPanel/constants.js +6 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
- package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
- package/dist/components/ContactList/ContactList.js +7 -7
- package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
- package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
- package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +49 -51
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
- package/dist/components/ConversationList/ConversationList.js +4 -4
- package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +31 -29
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
- package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
- package/dist/components/ConversationList/index.d.ts +30 -30
- package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
- package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
- package/dist/components/LiveList/LiveList.js +23 -23
- package/dist/components/LiveList/LiveListH5.js +38 -38
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
- package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
- package/dist/components/LiveScenePanel/index.js +4 -4
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +58 -58
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +6 -6
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
- package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +46 -43
- package/dist/components/LiveView/PlayerControl/AudioControl.js +133 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +10 -6
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +73 -0
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +168 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +2 -2
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +222 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +8 -1
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +132 -0
- package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +4 -3
- package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +4 -3
- package/dist/components/LiveView/index.d.ts +79 -0
- package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +63 -65
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInput.vue.d.ts +5 -2
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +3 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +51 -63
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +6 -2
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.d.ts +19 -0
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +74 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.d.ts +2 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +62 -0
- package/dist/components/MessageInput/TextEditor/index.js +45 -35
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +67 -69
- package/dist/components/MessageInput/i18n/index.d.ts +4 -0
- package/dist/components/MessageInput/i18n/zh-CN.d.ts +4 -0
- package/dist/components/MessageInput/i18n/zh-CN.js +5 -1
- package/dist/components/MessageInput/index.d.ts +36 -6
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -13
- package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +63 -69
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +48 -53
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +8 -8
- package/dist/components/MessageList/MessageList.js +8 -6
- package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
- package/dist/components/MessageList/i18n/en-US.d.ts +65 -1
- package/dist/components/MessageList/i18n/en-US.js +66 -2
- package/dist/components/MessageList/i18n/index.d.ts +128 -0
- package/dist/components/MessageList/i18n/index.js +6 -6
- package/dist/components/MessageList/i18n/zh-CN.d.ts +65 -1
- package/dist/components/MessageList/i18n/zh-CN.js +64 -0
- package/dist/components/MessageList/index.d.ts +20 -20
- package/dist/components/MicButton/index.js +11 -11
- package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +172 -174
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +58 -60
- package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +28 -30
- package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +22 -24
- package/dist/components/Search/SearchAdvanced/Slider/Slider.js +26 -28
- package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +133 -135
- package/dist/components/Search/SearchBar/SearchBar.js +56 -58
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
- package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
- package/dist/components/StreamMixer/index.js +6 -6
- package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
- package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
- package/dist/components/StreamView/Layout/GridLayout.js +5 -5
- package/dist/components/StreamView/index.js +25 -33
- package/dist/components/StreamView/manager/mediaManager.js +54 -60
- package/dist/components/UIKitModal/UIKitModal.d.ts +7 -0
- package/dist/components/UIKitModal/UIKitModal.js +156 -0
- package/dist/components/UIKitModal/index.d.ts +1 -0
- package/dist/components/UIKitModal/index.js +4 -0
- package/dist/components/{BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts → UIKitModal/index.vue.d.ts} +24 -14
- package/dist/components/UIKitModal/type.d.ts +21 -0
- package/dist/components/UIKitModal/type.js +1 -0
- package/dist/components/UserPicker/UserPicker.js +1 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +19 -18
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +2 -2
- package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -31
- package/dist/components/UserPicker/i18n/en-US.d.ts +1 -0
- package/dist/components/UserPicker/i18n/en-US.js +2 -1
- package/dist/components/UserPicker/i18n/index.d.ts +2 -0
- package/dist/components/UserPicker/i18n/zh-CN.d.ts +1 -0
- package/dist/components/UserPicker/i18n/zh-CN.js +2 -1
- package/dist/components/UserPicker/index.d.ts +2 -2
- package/dist/components/UserPicker/type.d.ts +1 -1
- package/dist/components/VideoSetting/CameraSelect.js +8 -8
- package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
- package/dist/components/VideoSetting/VideoPreview.js +9 -9
- package/dist/components/VideoSetting/VideoProfile.js +6 -6
- package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
- package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
- package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
- package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
- package/dist/hooks/useAudioControl.d.ts +3 -3
- package/dist/hooks/useAudioControl.js +32 -30
- package/dist/hooks/useRoomEngine.js +6 -6
- package/dist/index-B_-9wgM4.js +64 -0
- package/dist/{index-D-KJvDvy.js → index-DMfTuy0v.js} +574 -631
- package/dist/{index-D88ja_7_.js → index-DV6o6s43.js} +1691 -1660
- package/dist/index.d.ts +3 -1
- package/dist/index.js +180 -156
- package/dist/report/MetricsKey.d.ts +16 -0
- package/dist/report/MetricsKey.js +4 -0
- package/dist/report/dataReport.d.ts +12 -0
- package/dist/report/dataReport.js +45 -0
- package/dist/report/index.d.ts +4 -0
- package/dist/report/index.js +6 -0
- package/dist/rtc/index.d.ts +6 -81
- package/dist/rtc/index.js +53 -52
- package/dist/rtc/server.js +45 -40
- package/dist/states/BarrageState/BarrageState.d.ts +74 -0
- package/dist/states/BarrageState/BarrageState.js +80 -0
- package/dist/states/BarrageState/index.d.ts +1 -0
- package/dist/states/BarrageState/index.js +5 -0
- package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
- package/dist/states/BattleState/BattleState.js +203 -0
- package/dist/states/BattleState/index.d.ts +1 -0
- package/dist/states/BattleState/index.js +4 -0
- package/dist/states/CoGuestState.d.ts +24 -94
- package/dist/states/CoGuestState.js +297 -189
- package/dist/states/CoHostState/CoHostState.d.ts +2 -2
- package/dist/states/CoHostState/CoHostState.js +135 -131
- package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
- package/dist/states/DeviceState/DeviceState.js +314 -0
- package/dist/states/DeviceState/index.d.ts +1 -0
- package/dist/states/DeviceState/index.js +4 -0
- package/dist/states/LiveAudienceState.d.ts +3 -1
- package/dist/states/LiveAudienceState.js +106 -63
- package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
- package/dist/states/LiveListState/LiveListState.js +285 -0
- package/dist/states/LiveListState/index.d.ts +1 -0
- package/dist/states/LiveListState/index.js +4 -0
- package/dist/states/LiveMonitorState/api/http.js +147 -129
- package/dist/states/LiveMonitorState/index.js +67 -62
- package/dist/states/LiveMonitorState/player/adapters/trtc.js +6 -6
- package/dist/states/LiveSeatState/index.d.ts +46 -11
- package/dist/states/LiveSeatState/index.js +34 -15
- package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
- package/dist/states/LiveSeatState/seatEventManager.js +63 -42
- package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
- package/dist/states/LiveSeatState/seatManager.js +131 -29
- package/dist/states/LiveSeatState/store.d.ts +5 -5
- package/dist/states/LiveSeatState/store.js +12 -10
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
- package/dist/states/LoginState.d.ts +23 -0
- package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
- package/dist/states/MessageInputState/MessageInputState.js +60 -59
- package/dist/states/MessageInputState/utils.d.ts +8 -1
- package/dist/states/MessageInputState/utils.js +30 -10
- package/dist/states/SeatStore.js +82 -83
- package/dist/states/UIKitModalState/UIKitModalState.d.ts +17 -0
- package/dist/states/UIKitModalState/UIKitModalState.js +63 -0
- package/dist/states/UIKitModalState/index.d.ts +1 -0
- package/dist/states/UIKitModalState/index.js +4 -0
- package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
- package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
- package/dist/states/VideoMixerState/index.d.ts +1 -0
- package/dist/states/VideoMixerState/index.js +4 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/audience.d.ts +21 -0
- package/dist/types/audience.js +4 -1
- package/dist/types/battle.d.ts +75 -3
- package/dist/types/battle.js +5 -1
- package/dist/types/coGuest.d.ts +72 -5
- package/dist/types/coGuest.js +4 -2
- package/dist/types/device.d.ts +38 -17
- package/dist/types/device.js +10 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +96 -80
- package/dist/types/live.d.ts +36 -21
- package/dist/types/live.js +6 -4
- package/dist/types/seat.d.ts +23 -4
- package/dist/types/seat.js +7 -1
- package/dist/utils/call.d.ts +1 -1
- package/dist/utils/call.js +78 -79
- package/dist/utils/eventCenter.d.ts +88 -0
- package/dist/utils/eventCenter.js +161 -0
- package/package.json +4 -3
- package/src/chat/server.ts +0 -1
- package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
- package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
- package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
- package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
- package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
- package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
- package/src/components/AudioSettingPanel/index.vue +4 -2
- package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
- package/src/components/BarrageInput/MessageInputState.ts +160 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
- package/src/components/BarrageInput/type.ts +26 -0
- package/src/components/BarrageInput/utils.ts +45 -0
- package/src/components/BarrageList/BarrageList.vue +61 -117
- package/src/components/BarrageList/BarrageListH5.vue +75 -159
- package/src/components/BarrageList/BarrageListState.ts +223 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
- package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
- package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
- package/src/components/CameraButton/index.vue +0 -1
- package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -0
- package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
- package/src/components/CoHostPanel/BattlePanel.vue +4 -7
- package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
- package/src/components/CoHostPanel/ConnectionPanel.vue +41 -37
- package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
- package/src/components/CoHostPanel/constants.ts +3 -0
- package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
- package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
- package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
- package/src/components/ContactList/ContactList.vue +1 -1
- package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
- package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -8
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
- package/src/components/ConversationList/ConversationList.vue +2 -2
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
- package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +4 -4
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -1
- package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
- package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
- package/src/components/LiveList/LiveList.vue +5 -5
- package/src/components/LiveList/LiveListH5.vue +6 -6
- package/src/components/LiveScenePanel/index.vue +2 -2
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +10 -15
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +30 -31
- package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +5 -3
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +72 -80
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +30 -21
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +26 -42
- package/src/components/LiveView/PlayerControl/PlayerControlState.ts +516 -0
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +68 -4
- package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
- package/src/components/{LiveCoreView → LiveView}/index.vue +4 -3
- package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +8 -6
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageInput/MessageInput.vue +3 -1
- package/src/components/MessageInput/TextEditor/EditorCore.ts +17 -28
- package/src/components/MessageInput/TextEditor/TextEditor.vue +24 -4
- package/src/components/MessageInput/TextEditor/extensions/characterCountExtension.ts +159 -0
- package/src/components/MessageInput/TextEditor/extensions/imageExtension.ts +79 -0
- package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +8 -6
- package/src/components/MessageInput/i18n/zh-CN.ts +4 -0
- package/src/components/MessageInput/types.d.ts +1 -0
- package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
- package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +5 -3
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +5 -4
- package/src/components/MessageList/Message/Message.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -8
- package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +46 -43
- package/src/components/MessageList/Message/VideoMessage/index.ts +1 -1
- package/src/components/MessageList/MessageList.vue +2 -0
- package/src/components/MessageList/i18n/en-US.ts +66 -0
- package/src/components/MessageList/i18n/index.ts +4 -4
- package/src/components/MessageList/i18n/zh-CN.ts +66 -0
- package/src/components/MicButton/index.vue +3 -3
- package/src/components/Search/Search.vue +1 -1
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.scss +1 -4
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.scss +1 -4
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
- package/src/components/Search/SearchAdvanced/Slider/Slider.scss +1 -4
- package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.scss +1 -4
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
- package/src/components/Search/SearchBar/SearchBar.scss +3 -6
- package/src/components/Search/SearchBar/SearchBar.vue +1 -1
- package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
- package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
- package/src/components/Search/SearchResults/SearchResults.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
- package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
- package/src/components/StreamMixer/index.vue +1 -1
- package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
- package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
- package/src/components/StreamView/index.vue +28 -14
- package/src/components/StreamView/manager/mediaManager.ts +38 -42
- package/src/components/UIKitModal/UIKitModal.ts +71 -0
- package/src/components/UIKitModal/index.scss +134 -0
- package/src/components/UIKitModal/index.ts +1 -0
- package/src/components/UIKitModal/index.vue +160 -0
- package/src/components/UIKitModal/type.ts +24 -0
- package/src/components/UserPicker/UserPicker.vue +1 -1
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +1 -0
- package/src/components/UserPicker/hooks/useSearchFilter.ts +27 -18
- package/src/components/UserPicker/i18n/en-US.ts +1 -0
- package/src/components/UserPicker/i18n/zh-CN.ts +1 -0
- package/src/components/UserPicker/type.ts +1 -1
- package/src/components/VideoSetting/CameraSelect.vue +1 -2
- package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
- package/src/components/VideoSetting/VideoPreview.vue +1 -2
- package/src/components/VideoSetting/VideoProfile.vue +1 -1
- package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
- package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
- package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
- package/src/hooks/useAudioControl.ts +17 -4
- package/src/hooks/useRoomEngine.ts +1 -1
- package/src/index.ts +3 -0
- package/src/report/MetricsKey.ts +16 -0
- package/src/report/dataReport.ts +55 -0
- package/src/report/index.ts +7 -0
- package/src/rtc/index.ts +8 -10
- package/src/rtc/server.ts +4 -0
- package/src/types/audience.ts +27 -1
- package/src/types/battle.ts +87 -4
- package/src/types/coGuest.ts +87 -5
- package/src/types/device.ts +41 -16
- package/src/types/index.ts +2 -2
- package/src/types/live.ts +41 -22
- package/src/types/seat.ts +28 -4
- package/src/utils/call.ts +26 -27
- package/src/utils/eventCenter.ts +249 -0
- package/dist/DialogPortal-CvJcEAsn.js +0 -417
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
- package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
- package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
- package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
- package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
- package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
- package/dist/components/BarrageList/MessageForward/index.js +0 -4
- package/dist/components/LiveCoreView/PlayerControl/AudioControl.js +0 -129
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +0 -78
- package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -168
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -267
- package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -99
- package/dist/components/LiveCoreView/index.d.ts +0 -4
- package/dist/components/StreamView/Layout/MixLayout.js +0 -89
- package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
- package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
- package/dist/states/BarrageListState/BarrageListState.js +0 -122
- package/dist/states/BarrageListState/index.d.ts +0 -1
- package/dist/states/BarrageListState/index.js +0 -4
- package/dist/states/BattleState.js +0 -117
- package/dist/states/DeviceState.js +0 -296
- package/dist/states/LiveState/index.js +0 -254
- package/dist/states/VideoMixerState.js +0 -260
- package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
- package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
- package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
- package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
- package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
- package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
- package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
- package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
- package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
- package/src/components/BarrageList/MessageForward/index.ts +0 -3
- package/src/components/LiveCoreView/PlayerControl/PlayerControlState.ts +0 -718
- package/src/components/StreamView/Layout/MixLayout.vue +0 -144
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
|
@@ -1,65 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { markRaw as
|
|
3
|
-
const
|
|
4
|
-
name: "image",
|
|
5
|
-
addOptions() {
|
|
6
|
-
return {
|
|
7
|
-
inline: !1,
|
|
8
|
-
allowBase64: !1,
|
|
9
|
-
HTMLAttributes: {}
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
inline() {
|
|
13
|
-
return this.options.inline;
|
|
14
|
-
},
|
|
15
|
-
group() {
|
|
16
|
-
return this.options.inline ? "inline" : "block";
|
|
17
|
-
},
|
|
18
|
-
draggable: !0,
|
|
19
|
-
addAttributes() {
|
|
20
|
-
return {
|
|
21
|
-
src: {
|
|
22
|
-
default: null
|
|
23
|
-
},
|
|
24
|
-
alt: {
|
|
25
|
-
default: null
|
|
26
|
-
},
|
|
27
|
-
title: {
|
|
28
|
-
default: null
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
parseHTML() {
|
|
33
|
-
return [
|
|
34
|
-
{
|
|
35
|
-
tag: this.options.allowBase64 ? "img[src]" : 'img[src]:not([src^="data:"])'
|
|
36
|
-
}
|
|
37
|
-
];
|
|
38
|
-
},
|
|
39
|
-
renderHTML({ HTMLAttributes: t }) {
|
|
40
|
-
return ["img", Qr(this.options.HTMLAttributes, t)];
|
|
41
|
-
},
|
|
42
|
-
addCommands() {
|
|
43
|
-
return {
|
|
44
|
-
setImage: (t) => ({ commands: e }) => e.insertContent({
|
|
45
|
-
type: this.name,
|
|
46
|
-
attrs: t
|
|
47
|
-
})
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
addInputRules() {
|
|
51
|
-
return [
|
|
52
|
-
Zr({
|
|
53
|
-
find: Wi,
|
|
54
|
-
type: this.type,
|
|
55
|
-
getAttributes: (t) => {
|
|
56
|
-
const [, , e, n, r] = t;
|
|
57
|
-
return { src: n, alt: e, title: r };
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
];
|
|
61
|
-
}
|
|
62
|
-
}), nc = cn.create({
|
|
1
|
+
import { E as cn, P as X, a as te, i as Zr, D as or, b as sr, f as Qr, c as un, d as He, S as le, w as ei, e as ti, F as Te, g as dn, T as V, h as $t, s as ni, j as Cn, k as ri, l as ii, o as oi, p as si, q as ai, A as li, r as ci, t as ui, u as di, v as pi, x as fi, y as hi, z as mi, B as ar, C as vi, G as gi, H as yi, I as bi, J as wi, K as xi, L as ki, M as Mi, O as Oi, Q as qt, R as Ti, U as Ei, V as Ai, W as Ci, X as Si, Y as Ii, Z as Li, _ as lr, $ as Pi, a0 as Di, a1 as $i } from "./index-DV6o6s43.js";
|
|
2
|
+
import { markRaw as Bi, customRef as Ri, defineComponent as ht, ref as pn, onMounted as cr, onBeforeUnmount as fn, h as mt, getCurrentInstance as Ni, watchEffect as Hi, nextTick as ji, unref as _i } from "vue";
|
|
3
|
+
const Zl = cn.create({
|
|
63
4
|
name: "placeholder",
|
|
64
5
|
addOptions() {
|
|
65
6
|
return {
|
|
@@ -82,7 +23,7 @@ const Wi = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, tc = Jr.c
|
|
|
82
23
|
return null;
|
|
83
24
|
const o = this.editor.isEmpty;
|
|
84
25
|
return t.descendants((s, a) => {
|
|
85
|
-
const l = r >= a && r <= a + s.nodeSize, c = !s.isLeaf &&
|
|
26
|
+
const l = r >= a && r <= a + s.nodeSize, c = !s.isLeaf && Zr(s);
|
|
86
27
|
if ((l || !this.options.showOnlyCurrent) && c) {
|
|
87
28
|
const u = [this.options.emptyNodeClass];
|
|
88
29
|
o && u.push(this.options.emptyEditorClass);
|
|
@@ -130,7 +71,7 @@ function ur(t) {
|
|
|
130
71
|
}
|
|
131
72
|
};
|
|
132
73
|
}
|
|
133
|
-
class
|
|
74
|
+
class Fi {
|
|
134
75
|
constructor(e) {
|
|
135
76
|
this.editor = e.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = e.state;
|
|
136
77
|
}
|
|
@@ -196,7 +137,7 @@ function F(t, e, n) {
|
|
|
196
137
|
parent: t.parent ? F(t.parent, e, n) : null
|
|
197
138
|
}) : t.config[e];
|
|
198
139
|
}
|
|
199
|
-
function
|
|
140
|
+
function Vi(t) {
|
|
200
141
|
const e = t.filter((i) => i.type === "extension"), n = t.filter((i) => i.type === "node"), r = t.filter((i) => i.type === "mark");
|
|
201
142
|
return {
|
|
202
143
|
baseExtensions: e,
|
|
@@ -237,13 +178,13 @@ function G(...t) {
|
|
|
237
178
|
}), r;
|
|
238
179
|
}, {});
|
|
239
180
|
}
|
|
240
|
-
function
|
|
181
|
+
function Wi(t) {
|
|
241
182
|
return typeof t == "function";
|
|
242
183
|
}
|
|
243
|
-
function
|
|
244
|
-
return
|
|
184
|
+
function R(t, e = void 0, ...n) {
|
|
185
|
+
return Wi(t) ? e ? t.bind(e)(...n) : t(...n) : t;
|
|
245
186
|
}
|
|
246
|
-
function
|
|
187
|
+
function zi(t) {
|
|
247
188
|
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
248
189
|
}
|
|
249
190
|
class Vt {
|
|
@@ -251,11 +192,11 @@ class Vt {
|
|
|
251
192
|
this.find = e.find, this.handler = e.handler;
|
|
252
193
|
}
|
|
253
194
|
}
|
|
254
|
-
function
|
|
195
|
+
function Ki(t) {
|
|
255
196
|
return Object.prototype.toString.call(t).slice(8, -1);
|
|
256
197
|
}
|
|
257
198
|
function St(t) {
|
|
258
|
-
return
|
|
199
|
+
return Ki(t) !== "Object" ? !1 : t.constructor === Object && Object.getPrototypeOf(t) === Object.prototype;
|
|
259
200
|
}
|
|
260
201
|
function Wt(t, e) {
|
|
261
202
|
const n = { ...t };
|
|
@@ -263,7 +204,7 @@ function Wt(t, e) {
|
|
|
263
204
|
St(e[r]) && St(t[r]) ? n[r] = Wt(t[r], e[r]) : n[r] = e[r];
|
|
264
205
|
}), n;
|
|
265
206
|
}
|
|
266
|
-
class
|
|
207
|
+
class Re {
|
|
267
208
|
constructor(e = {}) {
|
|
268
209
|
this.type = "mark", this.name = "mark", this.parent = null, this.child = null, this.config = {
|
|
269
210
|
name: this.name,
|
|
@@ -271,15 +212,15 @@ class Be {
|
|
|
271
212
|
}, this.config = {
|
|
272
213
|
...this.config,
|
|
273
214
|
...e
|
|
274
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options =
|
|
215
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = R(F(this, "addOptions", {
|
|
275
216
|
name: this.name
|
|
276
|
-
}))), this.storage =
|
|
217
|
+
}))), this.storage = R(F(this, "addStorage", {
|
|
277
218
|
name: this.name,
|
|
278
219
|
options: this.options
|
|
279
220
|
})) || {};
|
|
280
221
|
}
|
|
281
222
|
static create(e = {}) {
|
|
282
|
-
return new
|
|
223
|
+
return new Re(e);
|
|
283
224
|
}
|
|
284
225
|
configure(e = {}) {
|
|
285
226
|
const n = this.extend({
|
|
@@ -289,10 +230,10 @@ class Be {
|
|
|
289
230
|
return n.name = this.name, n.parent = this.parent, n;
|
|
290
231
|
}
|
|
291
232
|
extend(e = {}) {
|
|
292
|
-
const n = new
|
|
293
|
-
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options =
|
|
233
|
+
const n = new Re(e);
|
|
234
|
+
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = R(F(n, "addOptions", {
|
|
294
235
|
name: n.name
|
|
295
|
-
})), n.storage =
|
|
236
|
+
})), n.storage = R(F(n, "addStorage", {
|
|
296
237
|
name: n.name,
|
|
297
238
|
options: n.options
|
|
298
239
|
})), n;
|
|
@@ -309,7 +250,7 @@ class Be {
|
|
|
309
250
|
return !1;
|
|
310
251
|
}
|
|
311
252
|
}
|
|
312
|
-
class
|
|
253
|
+
class Ui {
|
|
313
254
|
constructor(e) {
|
|
314
255
|
this.find = e.find, this.handler = e.handler;
|
|
315
256
|
}
|
|
@@ -322,9 +263,9 @@ class K {
|
|
|
322
263
|
}, this.config = {
|
|
323
264
|
...this.config,
|
|
324
265
|
...e
|
|
325
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options =
|
|
266
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = R(F(this, "addOptions", {
|
|
326
267
|
name: this.name
|
|
327
|
-
}))), this.storage =
|
|
268
|
+
}))), this.storage = R(F(this, "addStorage", {
|
|
328
269
|
name: this.name,
|
|
329
270
|
options: this.options
|
|
330
271
|
})) || {};
|
|
@@ -341,15 +282,15 @@ class K {
|
|
|
341
282
|
}
|
|
342
283
|
extend(e = {}) {
|
|
343
284
|
const n = new K({ ...this.config, ...e });
|
|
344
|
-
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options =
|
|
285
|
+
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = R(F(n, "addOptions", {
|
|
345
286
|
name: n.name
|
|
346
|
-
})), n.storage =
|
|
287
|
+
})), n.storage = R(F(n, "addStorage", {
|
|
347
288
|
name: n.name,
|
|
348
289
|
options: n.options
|
|
349
290
|
})), n;
|
|
350
291
|
}
|
|
351
292
|
}
|
|
352
|
-
function
|
|
293
|
+
function qi(t, e, n) {
|
|
353
294
|
const { from: r, to: i } = e, { blockSeparator: o = `
|
|
354
295
|
|
|
355
296
|
`, textSerializers: s = {} } = n || {};
|
|
@@ -369,7 +310,7 @@ function Xi(t, e, n) {
|
|
|
369
310
|
l.isText && (a += (f = l == null ? void 0 : l.text) === null || f === void 0 ? void 0 : f.slice(Math.max(r, c) - c, i - c));
|
|
370
311
|
}), a;
|
|
371
312
|
}
|
|
372
|
-
function
|
|
313
|
+
function Gi(t) {
|
|
373
314
|
return Object.fromEntries(Object.entries(t.nodes).filter(([, e]) => e.spec.toText).map(([e, n]) => [e, n.spec.toText]));
|
|
374
315
|
}
|
|
375
316
|
K.create({
|
|
@@ -385,8 +326,8 @@ K.create({
|
|
|
385
326
|
key: new te("clipboardTextSerializer"),
|
|
386
327
|
props: {
|
|
387
328
|
clipboardTextSerializer: () => {
|
|
388
|
-
const { editor: t } = this, { state: e, schema: n } = t, { doc: r, selection: i } = e, { ranges: o } = i, s = Math.min(...o.map((u) => u.$from.pos)), a = Math.max(...o.map((u) => u.$to.pos)), l =
|
|
389
|
-
return
|
|
329
|
+
const { editor: t } = this, { state: e, schema: n } = t, { doc: r, selection: i } = e, { ranges: o } = i, s = Math.min(...o.map((u) => u.$from.pos)), a = Math.max(...o.map((u) => u.$to.pos)), l = Gi(n);
|
|
330
|
+
return qi(r, { from: s, to: a }, {
|
|
390
331
|
...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
|
|
391
332
|
textSerializers: l
|
|
392
333
|
});
|
|
@@ -396,10 +337,10 @@ K.create({
|
|
|
396
337
|
];
|
|
397
338
|
}
|
|
398
339
|
});
|
|
399
|
-
const
|
|
340
|
+
const Yi = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
400
341
|
var n;
|
|
401
342
|
t.isDestroyed || (e.dom.blur(), (n = window == null ? void 0 : window.getSelection()) === null || n === void 0 || n.removeAllRanges());
|
|
402
|
-
}), !0),
|
|
343
|
+
}), !0), Xi = (t = !1) => ({ commands: e }) => e.setContent("", t), Ji = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
403
344
|
const { selection: r } = e, { ranges: i } = r;
|
|
404
345
|
return n && i.forEach(({ $from: o, $to: s }) => {
|
|
405
346
|
t.doc.nodesBetween(o.pos, s.pos, (a, l) => {
|
|
@@ -408,7 +349,7 @@ const Zi = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
408
349
|
const { doc: c, mapping: u } = e, d = c.resolve(u.map(l)), f = c.resolve(u.map(l + a.nodeSize)), h = d.blockRange(f);
|
|
409
350
|
if (!h)
|
|
410
351
|
return;
|
|
411
|
-
const y =
|
|
352
|
+
const y = ki(h);
|
|
412
353
|
if (a.type.isTextblock) {
|
|
413
354
|
const { defaultType: v } = d.parent.contentMatchAt(d.index());
|
|
414
355
|
e.setNodeMarkup(h.start, v);
|
|
@@ -416,12 +357,12 @@ const Zi = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
416
357
|
(y || y === 0) && e.lift(h, y);
|
|
417
358
|
});
|
|
418
359
|
}), !0;
|
|
419
|
-
},
|
|
360
|
+
}, Zi = (t) => (e) => t(e), Qi = () => ({ state: t, dispatch: e }) => xi(t, e), eo = (t, e) => ({ editor: n, tr: r }) => {
|
|
420
361
|
const { state: i } = n, o = i.doc.slice(t.from, t.to);
|
|
421
362
|
r.deleteRange(t.from, t.to);
|
|
422
363
|
const s = r.mapping.map(e);
|
|
423
364
|
return r.insert(s, o.content), r.setSelection(new V(r.doc.resolve(Math.max(s - 1, 0)))), !0;
|
|
424
|
-
},
|
|
365
|
+
}, to = () => ({ tr: t, dispatch: e }) => {
|
|
425
366
|
const { selection: n } = t, r = n.$anchor.node();
|
|
426
367
|
if (r.content.size > 0)
|
|
427
368
|
return !1;
|
|
@@ -435,7 +376,7 @@ const Zi = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
435
376
|
return !0;
|
|
436
377
|
}
|
|
437
378
|
return !1;
|
|
438
|
-
},
|
|
379
|
+
}, no = (t) => ({ tr: e, state: n, dispatch: r }) => {
|
|
439
380
|
const i = W(t, n.schema), o = e.selection.$anchor;
|
|
440
381
|
for (let s = o.depth; s > 0; s -= 1)
|
|
441
382
|
if (o.node(s).type === i) {
|
|
@@ -446,13 +387,13 @@ const Zi = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
446
387
|
return !0;
|
|
447
388
|
}
|
|
448
389
|
return !1;
|
|
449
|
-
},
|
|
390
|
+
}, ro = (t) => ({ tr: e, dispatch: n }) => {
|
|
450
391
|
const { from: r, to: i } = t;
|
|
451
392
|
return n && e.delete(r, i), !0;
|
|
452
|
-
},
|
|
393
|
+
}, io = () => ({ state: t, dispatch: e }) => wi(t, e), oo = () => ({ commands: t }) => t.keyboardShortcut("Enter"), so = () => ({ state: t, dispatch: e }) => bi(t, e);
|
|
453
394
|
function Ht(t, e, n = { strict: !0 }) {
|
|
454
395
|
const r = Object.keys(e);
|
|
455
|
-
return r.length ? r.every((i) => n.strict ? e[i] === t[i] :
|
|
396
|
+
return r.length ? r.every((i) => n.strict ? e[i] === t[i] : zi(e[i]) ? e[i].test(t[i]) : e[i] === t[i]) : !0;
|
|
456
397
|
}
|
|
457
398
|
function dr(t, e, n = {}) {
|
|
458
399
|
return t.find((r) => r.type === e && Ht(
|
|
@@ -481,7 +422,7 @@ function hn(t, e, n) {
|
|
|
481
422
|
to: c
|
|
482
423
|
};
|
|
483
424
|
}
|
|
484
|
-
function
|
|
425
|
+
function Ee(t, e) {
|
|
485
426
|
if (typeof t == "string") {
|
|
486
427
|
if (!e.marks[t])
|
|
487
428
|
throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);
|
|
@@ -489,8 +430,8 @@ function Ae(t, e) {
|
|
|
489
430
|
}
|
|
490
431
|
return t;
|
|
491
432
|
}
|
|
492
|
-
const
|
|
493
|
-
const o =
|
|
433
|
+
const ao = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
434
|
+
const o = Ee(t, r.schema), { doc: s, selection: a } = n, { $from: l, from: c, to: u } = a;
|
|
494
435
|
if (i) {
|
|
495
436
|
const d = hn(l, o, e);
|
|
496
437
|
if (d && d.from <= c && d.to >= u) {
|
|
@@ -499,7 +440,7 @@ const uo = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
499
440
|
}
|
|
500
441
|
}
|
|
501
442
|
return !0;
|
|
502
|
-
},
|
|
443
|
+
}, lo = (t) => (e) => {
|
|
503
444
|
const n = typeof t == "function" ? t(e) : t;
|
|
504
445
|
for (let r = 0; r < n.length; r += 1)
|
|
505
446
|
if (n[r](e))
|
|
@@ -512,7 +453,7 @@ function pr(t) {
|
|
|
512
453
|
function De(t = 0, e = 0, n = 0) {
|
|
513
454
|
return Math.min(Math.max(t, e), n);
|
|
514
455
|
}
|
|
515
|
-
function
|
|
456
|
+
function co(t, e = null) {
|
|
516
457
|
if (!e)
|
|
517
458
|
return null;
|
|
518
459
|
const n = le.atStart(t), r = le.atEnd(t);
|
|
@@ -523,7 +464,7 @@ function fo(t, e = null) {
|
|
|
523
464
|
const i = n.from, o = r.to;
|
|
524
465
|
return e === "all" ? V.create(t, De(0, i, o), De(t.content.size, i, o)) : V.create(t, De(e, i, o), De(e, i, o));
|
|
525
466
|
}
|
|
526
|
-
function
|
|
467
|
+
function uo() {
|
|
527
468
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
528
469
|
}
|
|
529
470
|
function mn() {
|
|
@@ -536,13 +477,13 @@ function mn() {
|
|
|
536
477
|
"iPod"
|
|
537
478
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
538
479
|
}
|
|
539
|
-
const
|
|
480
|
+
const po = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) => {
|
|
540
481
|
e = {
|
|
541
482
|
scrollIntoView: !0,
|
|
542
483
|
...e
|
|
543
484
|
};
|
|
544
485
|
const s = () => {
|
|
545
|
-
(mn() ||
|
|
486
|
+
(mn() || uo()) && r.dom.focus(), requestAnimationFrame(() => {
|
|
546
487
|
n.isDestroyed || (r.focus(), e != null && e.scrollIntoView && n.commands.scrollIntoView());
|
|
547
488
|
});
|
|
548
489
|
};
|
|
@@ -550,9 +491,9 @@ const mo = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) =>
|
|
|
550
491
|
return !0;
|
|
551
492
|
if (o && t === null && !pr(n.state.selection))
|
|
552
493
|
return s(), !0;
|
|
553
|
-
const a =
|
|
494
|
+
const a = co(i.doc, t) || n.state.selection, l = n.state.selection.eq(a);
|
|
554
495
|
return o && (l || i.setSelection(a), l && i.storedMarks && i.setStoredMarks(i.storedMarks), s()), !0;
|
|
555
|
-
},
|
|
496
|
+
}, fo = (t, e) => (n) => t.every((r, i) => e(r, { ...n, index: i })), ho = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), fr = (t) => {
|
|
556
497
|
const e = t.childNodes;
|
|
557
498
|
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
558
499
|
const r = e[n];
|
|
@@ -565,7 +506,7 @@ function It(t) {
|
|
|
565
506
|
return fr(n);
|
|
566
507
|
}
|
|
567
508
|
function lt(t, e, n) {
|
|
568
|
-
if (t instanceof
|
|
509
|
+
if (t instanceof Mi || t instanceof Te)
|
|
569
510
|
return t;
|
|
570
511
|
n = {
|
|
571
512
|
slice: !0,
|
|
@@ -587,7 +528,7 @@ function lt(t, e, n) {
|
|
|
587
528
|
if (i) {
|
|
588
529
|
if (n.errorOnInvalidContent) {
|
|
589
530
|
let s = !1, a = "";
|
|
590
|
-
const l = new
|
|
531
|
+
const l = new Oi({
|
|
591
532
|
topNode: e.spec.topNode,
|
|
592
533
|
marks: e.spec.marks,
|
|
593
534
|
// Prosemirror's schemas are executed such that: the last to execute, matches last
|
|
@@ -613,12 +554,12 @@ function lt(t, e, n) {
|
|
|
613
554
|
}
|
|
614
555
|
return lt("", e, n);
|
|
615
556
|
}
|
|
616
|
-
function
|
|
557
|
+
function mo(t, e, n) {
|
|
617
558
|
const r = t.steps.length - 1;
|
|
618
559
|
if (r < e)
|
|
619
560
|
return;
|
|
620
561
|
const i = t.steps[r];
|
|
621
|
-
if (!(i instanceof
|
|
562
|
+
if (!(i instanceof Ti || i instanceof Ei))
|
|
622
563
|
return;
|
|
623
564
|
const o = t.mapping.maps[r];
|
|
624
565
|
let s = 0;
|
|
@@ -626,7 +567,7 @@ function yo(t, e, n) {
|
|
|
626
567
|
s === 0 && (s = u);
|
|
627
568
|
}), t.setSelection(le.near(t.doc.resolve(s), n));
|
|
628
569
|
}
|
|
629
|
-
const
|
|
570
|
+
const vo = (t) => !("type" in t), go = (t, e, n) => ({ tr: r, dispatch: i, editor: o }) => {
|
|
630
571
|
var s;
|
|
631
572
|
if (i) {
|
|
632
573
|
n = {
|
|
@@ -667,7 +608,7 @@ const bo = (t) => !("type" in t), wo = (t, e, n) => ({ tr: r, dispatch: i, edito
|
|
|
667
608
|
return l(g), !1;
|
|
668
609
|
}
|
|
669
610
|
let { from: u, to: d } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, f = !0, h = !0;
|
|
670
|
-
if ((
|
|
611
|
+
if ((vo(a) ? a : [a]).forEach((g) => {
|
|
671
612
|
g.check(), f = f ? g.isText && g.marks.length === 0 : !1, h = h ? g.isBlock : !1;
|
|
672
613
|
}), u === d && h) {
|
|
673
614
|
const { parent: g } = r.doc.resolve(u);
|
|
@@ -686,28 +627,28 @@ const bo = (t) => !("type" in t), wo = (t, e, n) => ({ tr: r, dispatch: i, edito
|
|
|
686
627
|
r.insertText(v, u, d);
|
|
687
628
|
} else
|
|
688
629
|
v = a, r.replaceWith(u, d, v);
|
|
689
|
-
n.updateSelection &&
|
|
630
|
+
n.updateSelection && mo(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: u, text: v }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: v });
|
|
690
631
|
}
|
|
691
632
|
return !0;
|
|
692
|
-
},
|
|
633
|
+
}, yo = () => ({ state: t, dispatch: e }) => fi(t, e), bo = () => ({ state: t, dispatch: e }) => gi(t, e), wo = () => ({ state: t, dispatch: e }) => yi(t, e), xo = () => ({ state: t, dispatch: e }) => vi(t, e), ko = () => ({ state: t, dispatch: e, tr: n }) => {
|
|
693
634
|
try {
|
|
694
635
|
const r = ar(t.doc, t.selection.$from.pos, -1);
|
|
695
636
|
return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
|
|
696
637
|
} catch {
|
|
697
638
|
return !1;
|
|
698
639
|
}
|
|
699
|
-
},
|
|
640
|
+
}, Mo = () => ({ state: t, dispatch: e, tr: n }) => {
|
|
700
641
|
try {
|
|
701
642
|
const r = ar(t.doc, t.selection.$from.pos, 1);
|
|
702
643
|
return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
|
|
703
644
|
} catch {
|
|
704
645
|
return !1;
|
|
705
646
|
}
|
|
706
|
-
},
|
|
647
|
+
}, Oo = () => ({ state: t, dispatch: e }) => mi(t, e), To = () => ({ state: t, dispatch: e }) => hi(t, e);
|
|
707
648
|
function hr() {
|
|
708
649
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
709
650
|
}
|
|
710
|
-
function
|
|
651
|
+
function Eo(t) {
|
|
711
652
|
const e = t.split(/-(?!$)/);
|
|
712
653
|
let n = e[e.length - 1];
|
|
713
654
|
n === "Space" && (n = " ");
|
|
@@ -729,8 +670,8 @@ function So(t) {
|
|
|
729
670
|
}
|
|
730
671
|
return r && (n = `Alt-${n}`), i && (n = `Ctrl-${n}`), s && (n = `Meta-${n}`), o && (n = `Shift-${n}`), n;
|
|
731
672
|
}
|
|
732
|
-
const
|
|
733
|
-
const o =
|
|
673
|
+
const Ao = (t) => ({ editor: e, view: n, tr: r, dispatch: i }) => {
|
|
674
|
+
const o = Eo(t).split(/-(?!$)/), s = o.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), a = new KeyboardEvent("keydown", {
|
|
734
675
|
key: s === "Space" ? " " : s,
|
|
735
676
|
altKey: o.includes("Alt"),
|
|
736
677
|
ctrlKey: o.includes("Ctrl"),
|
|
@@ -761,13 +702,13 @@ function vn(t, e, n = {}) {
|
|
|
761
702
|
const l = i - r, c = a.filter((d) => s ? s.name === d.node.type.name : !0).filter((d) => Ht(d.node.attrs, n, { strict: !1 }));
|
|
762
703
|
return o ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= l;
|
|
763
704
|
}
|
|
764
|
-
const
|
|
705
|
+
const Co = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
765
706
|
const i = W(t, n.schema);
|
|
766
|
-
return vn(n, i, e) ?
|
|
767
|
-
},
|
|
707
|
+
return vn(n, i, e) ? pi(n, r) : !1;
|
|
708
|
+
}, So = () => ({ state: t, dispatch: e }) => di(t, e), Io = (t) => ({ state: e, dispatch: n }) => {
|
|
768
709
|
const r = W(t, e.schema);
|
|
769
|
-
return
|
|
770
|
-
},
|
|
710
|
+
return ui(r)(e, n);
|
|
711
|
+
}, Lo = () => ({ state: t, dispatch: e }) => ci(t, e);
|
|
771
712
|
function mr(t, e) {
|
|
772
713
|
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
773
714
|
}
|
|
@@ -775,35 +716,35 @@ function In(t, e) {
|
|
|
775
716
|
const n = typeof e == "string" ? [e] : e;
|
|
776
717
|
return Object.keys(t).reduce((r, i) => (n.includes(i) || (r[i] = t[i]), r), {});
|
|
777
718
|
}
|
|
778
|
-
const
|
|
719
|
+
const Po = (t, e) => ({ tr: n, state: r, dispatch: i }) => {
|
|
779
720
|
let o = null, s = null;
|
|
780
721
|
const a = mr(typeof t == "string" ? t : t.name, r.schema);
|
|
781
|
-
return a ? (a === "node" && (o = W(t, r.schema)), a === "mark" && (s =
|
|
722
|
+
return a ? (a === "node" && (o = W(t, r.schema)), a === "mark" && (s = Ee(t, r.schema)), i && n.selection.ranges.forEach((l) => {
|
|
782
723
|
r.doc.nodesBetween(l.$from.pos, l.$to.pos, (c, u) => {
|
|
783
724
|
o && o === c.type && n.setNodeMarkup(u, void 0, In(c.attrs, e)), s && c.marks.length && c.marks.forEach((d) => {
|
|
784
725
|
s === d.type && n.addMark(u, u + c.nodeSize, s.create(In(d.attrs, e)));
|
|
785
726
|
});
|
|
786
727
|
});
|
|
787
728
|
}), !0) : !1;
|
|
788
|
-
},
|
|
729
|
+
}, Do = () => ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0), $o = () => ({ tr: t, dispatch: e }) => {
|
|
789
730
|
if (e) {
|
|
790
|
-
const n = new
|
|
731
|
+
const n = new li(t.doc);
|
|
791
732
|
t.setSelection(n);
|
|
792
733
|
}
|
|
793
734
|
return !0;
|
|
794
|
-
},
|
|
795
|
-
function
|
|
735
|
+
}, Bo = () => ({ state: t, dispatch: e }) => ai(t, e), Ro = () => ({ state: t, dispatch: e }) => si(t, e), No = () => ({ state: t, dispatch: e }) => oi(t, e), Ho = () => ({ state: t, dispatch: e }) => ii(t, e), jo = () => ({ state: t, dispatch: e }) => ri(t, e);
|
|
736
|
+
function _o(t, e, n = {}, r = {}) {
|
|
796
737
|
return lt(t, e, {
|
|
797
738
|
slice: !1,
|
|
798
739
|
parseOptions: n,
|
|
799
740
|
errorOnInvalidContent: r.errorOnInvalidContent
|
|
800
741
|
});
|
|
801
742
|
}
|
|
802
|
-
const
|
|
743
|
+
const Fo = (t, e = !1, n = {}, r = {}) => ({ editor: i, tr: o, dispatch: s, commands: a }) => {
|
|
803
744
|
var l, c;
|
|
804
745
|
const { doc: u } = o;
|
|
805
746
|
if (n.preserveWhitespace !== "full") {
|
|
806
|
-
const d =
|
|
747
|
+
const d = _o(t, i.schema, n, {
|
|
807
748
|
errorOnInvalidContent: (l = r.errorOnInvalidContent) !== null && l !== void 0 ? l : i.options.enableContentCheck
|
|
808
749
|
});
|
|
809
750
|
return s && o.replaceWith(0, u.content.size, d).setMeta("preventUpdate", !e), !0;
|
|
@@ -813,15 +754,15 @@ const zo = (t, e = !1, n = {}, r = {}) => ({ editor: i, tr: o, dispatch: s, comm
|
|
|
813
754
|
errorOnInvalidContent: (c = r.errorOnInvalidContent) !== null && c !== void 0 ? c : i.options.enableContentCheck
|
|
814
755
|
});
|
|
815
756
|
};
|
|
816
|
-
function
|
|
817
|
-
const n =
|
|
757
|
+
function Vo(t, e) {
|
|
758
|
+
const n = Ee(e, t.schema), { from: r, to: i, empty: o } = t.selection, s = [];
|
|
818
759
|
o ? (t.storedMarks && s.push(...t.storedMarks), s.push(...t.selection.$head.marks())) : t.doc.nodesBetween(r, i, (l) => {
|
|
819
760
|
s.push(...l.marks);
|
|
820
761
|
});
|
|
821
762
|
const a = s.find((l) => l.type.name === n.name);
|
|
822
763
|
return a ? { ...a.attrs } : {};
|
|
823
764
|
}
|
|
824
|
-
function
|
|
765
|
+
function Wo(t) {
|
|
825
766
|
for (let e = 0; e < t.edgeCount; e += 1) {
|
|
826
767
|
const { type: n } = t.edge(e);
|
|
827
768
|
if (n.isTextblock && !n.hasRequiredAttrs())
|
|
@@ -829,7 +770,7 @@ function Uo(t) {
|
|
|
829
770
|
}
|
|
830
771
|
return null;
|
|
831
772
|
}
|
|
832
|
-
function
|
|
773
|
+
function zo(t, e) {
|
|
833
774
|
for (let n = t.depth; n > 0; n -= 1) {
|
|
834
775
|
const r = t.node(n);
|
|
835
776
|
if (e(r))
|
|
@@ -842,7 +783,7 @@ function qo(t, e) {
|
|
|
842
783
|
}
|
|
843
784
|
}
|
|
844
785
|
function gn(t) {
|
|
845
|
-
return (e) =>
|
|
786
|
+
return (e) => zo(e.$from, t);
|
|
846
787
|
}
|
|
847
788
|
function vr(t, e, n) {
|
|
848
789
|
const r = [];
|
|
@@ -860,14 +801,14 @@ function vr(t, e, n) {
|
|
|
860
801
|
})));
|
|
861
802
|
}), r;
|
|
862
803
|
}
|
|
863
|
-
function
|
|
804
|
+
function Bt(t, e, n) {
|
|
864
805
|
return Object.fromEntries(Object.entries(n).filter(([r]) => {
|
|
865
806
|
const i = t.find((o) => o.type === e && o.name === r);
|
|
866
807
|
return i ? i.attribute.keepOnSplit : !1;
|
|
867
808
|
}));
|
|
868
809
|
}
|
|
869
|
-
function
|
|
870
|
-
const { empty: r, ranges: i } = t.selection, o = e ?
|
|
810
|
+
function Ko(t, e, n = {}) {
|
|
811
|
+
const { empty: r, ranges: i } = t.selection, o = e ? Ee(e, t.schema) : null;
|
|
871
812
|
if (r)
|
|
872
813
|
return !!(t.storedMarks || t.selection.$from.marks()).filter((d) => o ? o.name === d.type.name : !0).find((d) => Ht(d.attrs, n, { strict: !1 }));
|
|
873
814
|
let s = 0;
|
|
@@ -890,14 +831,14 @@ function Go(t, e, n = {}) {
|
|
|
890
831
|
return (l > 0 ? l + c : l) >= s;
|
|
891
832
|
}
|
|
892
833
|
function Ln(t, e) {
|
|
893
|
-
const { nodeExtensions: n } =
|
|
834
|
+
const { nodeExtensions: n } = Vi(e), r = n.find((s) => s.name === t);
|
|
894
835
|
if (!r)
|
|
895
836
|
return !1;
|
|
896
837
|
const i = {
|
|
897
838
|
name: r.name,
|
|
898
839
|
options: r.options,
|
|
899
840
|
storage: r.storage
|
|
900
|
-
}, o =
|
|
841
|
+
}, o = R(F(r, "group", i));
|
|
901
842
|
return typeof o != "string" ? !1 : o.split(" ").includes("list");
|
|
902
843
|
}
|
|
903
844
|
function gr(t, { checkChildren: e = !0, ignoreWhitespace: n = !1 } = {}) {
|
|
@@ -922,10 +863,10 @@ function gr(t, { checkChildren: e = !0, ignoreWhitespace: n = !1 } = {}) {
|
|
|
922
863
|
}
|
|
923
864
|
return !1;
|
|
924
865
|
}
|
|
925
|
-
function
|
|
866
|
+
function Uo(t) {
|
|
926
867
|
return t instanceof He;
|
|
927
868
|
}
|
|
928
|
-
function
|
|
869
|
+
function qo(t, e, n) {
|
|
929
870
|
var r;
|
|
930
871
|
const { selection: i } = e;
|
|
931
872
|
let o = null;
|
|
@@ -947,11 +888,11 @@ function Xo(t, e, n) {
|
|
|
947
888
|
}), c;
|
|
948
889
|
});
|
|
949
890
|
}
|
|
950
|
-
const
|
|
951
|
-
const { selection: o } = n, { empty: s, ranges: a } = o, l =
|
|
891
|
+
const Go = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
892
|
+
const { selection: o } = n, { empty: s, ranges: a } = o, l = Ee(t, r.schema);
|
|
952
893
|
if (i)
|
|
953
894
|
if (s) {
|
|
954
|
-
const c =
|
|
895
|
+
const c = Vo(r, l);
|
|
955
896
|
n.addStoredMark(l.create({
|
|
956
897
|
...c,
|
|
957
898
|
...e
|
|
@@ -969,26 +910,26 @@ const Jo = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
969
910
|
}) : n.addMark(y, v, l.create(e));
|
|
970
911
|
});
|
|
971
912
|
});
|
|
972
|
-
return
|
|
973
|
-
},
|
|
913
|
+
return qo(r, n, l);
|
|
914
|
+
}, Yo = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), Xo = (t, e = {}) => ({ state: n, dispatch: r, chain: i }) => {
|
|
974
915
|
const o = W(t, n.schema);
|
|
975
916
|
let s;
|
|
976
917
|
return n.selection.$anchor.sameParent(n.selection.$head) && (s = n.selection.$anchor.parent.attrs), o.isTextblock ? i().command(({ commands: a }) => Cn(o, { ...s, ...e })(n) ? !0 : a.clearNodes()).command(({ state: a }) => Cn(o, { ...s, ...e })(a, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
977
|
-
},
|
|
918
|
+
}, Jo = (t) => ({ tr: e, dispatch: n }) => {
|
|
978
919
|
if (n) {
|
|
979
920
|
const { doc: r } = e, i = De(t, 0, r.content.size), o = He.create(r, i);
|
|
980
921
|
e.setSelection(o);
|
|
981
922
|
}
|
|
982
923
|
return !0;
|
|
983
|
-
},
|
|
924
|
+
}, Zo = (t) => ({ tr: e, dispatch: n }) => {
|
|
984
925
|
if (n) {
|
|
985
926
|
const { doc: r } = e, { from: i, to: o } = typeof t == "number" ? { from: t, to: t } : t, s = V.atStart(r).from, a = V.atEnd(r).to, l = De(i, s, a), c = De(o, s, a), u = V.create(r, l, c);
|
|
986
927
|
e.setSelection(u);
|
|
987
928
|
}
|
|
988
929
|
return !0;
|
|
989
|
-
},
|
|
930
|
+
}, Qo = (t) => ({ state: e, dispatch: n }) => {
|
|
990
931
|
const r = W(t, e.schema);
|
|
991
|
-
return
|
|
932
|
+
return ni(r)(e, n);
|
|
992
933
|
};
|
|
993
934
|
function Pn(t, e) {
|
|
994
935
|
const n = t.storedMarks || t.selection.$to.parentOffset && t.selection.$from.marks();
|
|
@@ -997,13 +938,13 @@ function Pn(t, e) {
|
|
|
997
938
|
t.tr.ensureMarks(r);
|
|
998
939
|
}
|
|
999
940
|
}
|
|
1000
|
-
const
|
|
1001
|
-
const { selection: o, doc: s } = e, { $from: a, $to: l } = o, c = i.extensionManager.attributes, u =
|
|
941
|
+
const es = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: i }) => {
|
|
942
|
+
const { selection: o, doc: s } = e, { $from: a, $to: l } = o, c = i.extensionManager.attributes, u = Bt(c, a.node().type.name, a.node().attrs);
|
|
1002
943
|
if (o instanceof He && o.node.isBlock)
|
|
1003
944
|
return !a.parentOffset || !$t(s, a.pos) ? !1 : (r && (t && Pn(n, i.extensionManager.splittableMarks), e.split(a.pos).scrollIntoView()), !0);
|
|
1004
945
|
if (!a.parent.isBlock)
|
|
1005
946
|
return !1;
|
|
1006
|
-
const d = l.parentOffset === l.parent.content.size, f = a.depth === 0 ? void 0 :
|
|
947
|
+
const d = l.parentOffset === l.parent.content.size, f = a.depth === 0 ? void 0 : Wo(a.node(-1).contentMatchAt(a.indexAfter(-1)));
|
|
1007
948
|
let h = d && f ? [
|
|
1008
949
|
{
|
|
1009
950
|
type: f,
|
|
@@ -1023,7 +964,7 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1023
964
|
t && Pn(n, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
1024
965
|
}
|
|
1025
966
|
return y;
|
|
1026
|
-
},
|
|
967
|
+
}, ts = (t, e = {}) => ({ tr: n, state: r, dispatch: i, editor: o }) => {
|
|
1027
968
|
var s;
|
|
1028
969
|
const a = W(t, r.schema), { $from: l, $to: c } = r.selection, u = r.selection.node;
|
|
1029
970
|
if (u && u.isBlock || l.depth < 2 || !l.sameParent(c))
|
|
@@ -1041,26 +982,26 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1041
982
|
for (let S = l.depth - x; S >= l.depth - 3; S -= 1)
|
|
1042
983
|
w = Te.from(l.node(S).copy(w));
|
|
1043
984
|
const T = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, p = {
|
|
1044
|
-
...
|
|
985
|
+
...Bt(f, l.node().type.name, l.node().attrs),
|
|
1045
986
|
...e
|
|
1046
987
|
}, O = ((s = a.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(p)) || void 0;
|
|
1047
988
|
w = w.append(Te.from(a.createAndFill(null, O) || void 0));
|
|
1048
989
|
const b = l.before(l.depth - (x - 1));
|
|
1049
990
|
n.replace(b, l.after(-T), new dn(w, 4 - x, 0));
|
|
1050
|
-
let
|
|
991
|
+
let E = -1;
|
|
1051
992
|
n.doc.nodesBetween(b, n.doc.content.size, (S, L) => {
|
|
1052
|
-
if (
|
|
993
|
+
if (E > -1)
|
|
1053
994
|
return !1;
|
|
1054
|
-
S.isTextblock && S.content.size === 0 && (
|
|
1055
|
-
}),
|
|
995
|
+
S.isTextblock && S.content.size === 0 && (E = L + 1);
|
|
996
|
+
}), E > -1 && n.setSelection(V.near(n.doc.resolve(E))), n.scrollIntoView();
|
|
1056
997
|
}
|
|
1057
998
|
return !0;
|
|
1058
999
|
}
|
|
1059
1000
|
const h = c.pos === l.end() ? d.contentMatchAt(0).defaultType : null, y = {
|
|
1060
|
-
...
|
|
1001
|
+
...Bt(f, d.type.name, d.attrs),
|
|
1061
1002
|
...e
|
|
1062
1003
|
}, v = {
|
|
1063
|
-
...
|
|
1004
|
+
...Bt(f, l.node().type.name, l.node().attrs),
|
|
1064
1005
|
...e
|
|
1065
1006
|
};
|
|
1066
1007
|
n.delete(l.pos, c.pos);
|
|
@@ -1096,7 +1037,7 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1096
1037
|
return !0;
|
|
1097
1038
|
const i = t.doc.nodeAt(r);
|
|
1098
1039
|
return n.node.type === (i == null ? void 0 : i.type) && un(t.doc, r) && t.join(r), !0;
|
|
1099
|
-
},
|
|
1040
|
+
}, ns = (t, e, n, r = {}) => ({ editor: i, tr: o, state: s, dispatch: a, chain: l, commands: c, can: u }) => {
|
|
1100
1041
|
const { extensions: d, splittableMarks: f } = i.extensionManager, h = W(t, s.schema), y = W(e, s.schema), { selection: v, storedMarks: g } = s, { $from: w, $to: x } = v, T = w.blockRange(x), p = g || v.$to.parentOffset && v.$from.marks();
|
|
1101
1042
|
if (!T)
|
|
1102
1043
|
return !1;
|
|
@@ -1108,20 +1049,20 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1108
1049
|
return l().command(() => (o.setNodeMarkup(O.pos, h), !0)).command(() => Gt(o, h)).command(() => Yt(o, h)).run();
|
|
1109
1050
|
}
|
|
1110
1051
|
return !n || !p || !a ? l().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => Gt(o, h)).command(() => Yt(o, h)).run() : l().command(() => {
|
|
1111
|
-
const b = u().wrapInList(h, r),
|
|
1112
|
-
return o.ensureMarks(
|
|
1052
|
+
const b = u().wrapInList(h, r), E = p.filter((S) => f.includes(S.type.name));
|
|
1053
|
+
return o.ensureMarks(E), b ? !0 : c.clearNodes();
|
|
1113
1054
|
}).wrapInList(h, r).command(() => Gt(o, h)).command(() => Yt(o, h)).run();
|
|
1114
|
-
},
|
|
1115
|
-
const { extendEmptyMarkRange: o = !1 } = n, s =
|
|
1116
|
-
return
|
|
1117
|
-
},
|
|
1055
|
+
}, rs = (t, e = {}, n = {}) => ({ state: r, commands: i }) => {
|
|
1056
|
+
const { extendEmptyMarkRange: o = !1 } = n, s = Ee(t, r.schema);
|
|
1057
|
+
return Ko(r, s, e) ? i.unsetMark(s, { extendEmptyMarkRange: o }) : i.setMark(s, e);
|
|
1058
|
+
}, is = (t, e, n = {}) => ({ state: r, commands: i }) => {
|
|
1118
1059
|
const o = W(t, r.schema), s = W(e, r.schema), a = vn(r, o, n);
|
|
1119
1060
|
let l;
|
|
1120
1061
|
return r.selection.$anchor.sameParent(r.selection.$head) && (l = r.selection.$anchor.parent.attrs), a ? i.setNode(s, l) : i.setNode(o, { ...l, ...n });
|
|
1121
|
-
},
|
|
1062
|
+
}, os = (t, e = {}) => ({ state: n, commands: r }) => {
|
|
1122
1063
|
const i = W(t, n.schema);
|
|
1123
1064
|
return vn(n, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
1124
|
-
},
|
|
1065
|
+
}, ss = () => ({ state: t, dispatch: e }) => {
|
|
1125
1066
|
const n = t.plugins;
|
|
1126
1067
|
for (let r = 0; r < n.length; r += 1) {
|
|
1127
1068
|
const i = n[r];
|
|
@@ -1141,14 +1082,14 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1141
1082
|
}
|
|
1142
1083
|
}
|
|
1143
1084
|
return !1;
|
|
1144
|
-
},
|
|
1085
|
+
}, as = () => ({ tr: t, dispatch: e }) => {
|
|
1145
1086
|
const { selection: n } = t, { empty: r, ranges: i } = n;
|
|
1146
1087
|
return r || e && i.forEach((o) => {
|
|
1147
1088
|
t.removeMark(o.$from.pos, o.$to.pos);
|
|
1148
1089
|
}), !0;
|
|
1149
|
-
},
|
|
1090
|
+
}, ls = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
1150
1091
|
var o;
|
|
1151
|
-
const { extendEmptyMarkRange: s = !1 } = e, { selection: a } = n, l =
|
|
1092
|
+
const { extendEmptyMarkRange: s = !1 } = e, { selection: a } = n, l = Ee(t, r.schema), { $from: c, empty: u, ranges: d } = a;
|
|
1152
1093
|
if (!i)
|
|
1153
1094
|
return !0;
|
|
1154
1095
|
if (u && s) {
|
|
@@ -1160,10 +1101,10 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1160
1101
|
n.removeMark(f.$from.pos, f.$to.pos, l);
|
|
1161
1102
|
});
|
|
1162
1103
|
return n.removeStoredMark(l), !0;
|
|
1163
|
-
},
|
|
1104
|
+
}, cs = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
1164
1105
|
let o = null, s = null;
|
|
1165
1106
|
const a = mr(typeof t == "string" ? t : t.name, r.schema);
|
|
1166
|
-
return a ? (a === "node" && (o = W(t, r.schema)), a === "mark" && (s =
|
|
1107
|
+
return a ? (a === "node" && (o = W(t, r.schema)), a === "mark" && (s = Ee(t, r.schema)), i && n.selection.ranges.forEach((l) => {
|
|
1167
1108
|
const c = l.$from.pos, u = l.$to.pos;
|
|
1168
1109
|
let d, f, h, y;
|
|
1169
1110
|
n.selection.empty ? r.doc.nodesBetween(c, u, (v, g) => {
|
|
@@ -1191,79 +1132,79 @@ const rs = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
1191
1132
|
}));
|
|
1192
1133
|
}));
|
|
1193
1134
|
}), !0) : !1;
|
|
1194
|
-
},
|
|
1135
|
+
}, us = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
1195
1136
|
const i = W(t, n.schema);
|
|
1196
|
-
return
|
|
1197
|
-
},
|
|
1137
|
+
return ti(i, e)(n, r);
|
|
1138
|
+
}, ds = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
1198
1139
|
const i = W(t, n.schema);
|
|
1199
|
-
return
|
|
1140
|
+
return ei(i, e)(n, r);
|
|
1200
1141
|
};
|
|
1201
|
-
var
|
|
1142
|
+
var ps = /* @__PURE__ */ Object.freeze({
|
|
1202
1143
|
__proto__: null,
|
|
1203
|
-
blur:
|
|
1204
|
-
clearContent:
|
|
1205
|
-
clearNodes:
|
|
1206
|
-
command:
|
|
1207
|
-
createParagraphNear:
|
|
1208
|
-
cut:
|
|
1209
|
-
deleteCurrentNode:
|
|
1210
|
-
deleteNode:
|
|
1211
|
-
deleteRange:
|
|
1212
|
-
deleteSelection:
|
|
1213
|
-
enter:
|
|
1214
|
-
exitCode:
|
|
1215
|
-
extendMarkRange:
|
|
1216
|
-
first:
|
|
1217
|
-
focus:
|
|
1218
|
-
forEach:
|
|
1219
|
-
insertContent:
|
|
1220
|
-
insertContentAt:
|
|
1221
|
-
joinBackward:
|
|
1222
|
-
joinDown:
|
|
1223
|
-
joinForward:
|
|
1224
|
-
joinItemBackward:
|
|
1225
|
-
joinItemForward:
|
|
1226
|
-
joinTextblockBackward:
|
|
1227
|
-
joinTextblockForward:
|
|
1228
|
-
joinUp:
|
|
1229
|
-
keyboardShortcut:
|
|
1230
|
-
lift:
|
|
1231
|
-
liftEmptyBlock:
|
|
1232
|
-
liftListItem:
|
|
1233
|
-
newlineInCode:
|
|
1234
|
-
resetAttributes:
|
|
1235
|
-
scrollIntoView:
|
|
1236
|
-
selectAll:
|
|
1237
|
-
selectNodeBackward:
|
|
1238
|
-
selectNodeForward:
|
|
1239
|
-
selectParentNode:
|
|
1240
|
-
selectTextblockEnd:
|
|
1241
|
-
selectTextblockStart:
|
|
1242
|
-
setContent:
|
|
1243
|
-
setMark:
|
|
1244
|
-
setMeta:
|
|
1245
|
-
setNode:
|
|
1246
|
-
setNodeSelection:
|
|
1247
|
-
setTextSelection:
|
|
1248
|
-
sinkListItem:
|
|
1249
|
-
splitBlock:
|
|
1250
|
-
splitListItem:
|
|
1251
|
-
toggleList:
|
|
1252
|
-
toggleMark:
|
|
1253
|
-
toggleNode:
|
|
1254
|
-
toggleWrap:
|
|
1255
|
-
undoInputRule:
|
|
1256
|
-
unsetAllMarks:
|
|
1257
|
-
unsetMark:
|
|
1258
|
-
updateAttributes:
|
|
1259
|
-
wrapIn:
|
|
1260
|
-
wrapInList:
|
|
1144
|
+
blur: Yi,
|
|
1145
|
+
clearContent: Xi,
|
|
1146
|
+
clearNodes: Ji,
|
|
1147
|
+
command: Zi,
|
|
1148
|
+
createParagraphNear: Qi,
|
|
1149
|
+
cut: eo,
|
|
1150
|
+
deleteCurrentNode: to,
|
|
1151
|
+
deleteNode: no,
|
|
1152
|
+
deleteRange: ro,
|
|
1153
|
+
deleteSelection: io,
|
|
1154
|
+
enter: oo,
|
|
1155
|
+
exitCode: so,
|
|
1156
|
+
extendMarkRange: ao,
|
|
1157
|
+
first: lo,
|
|
1158
|
+
focus: po,
|
|
1159
|
+
forEach: fo,
|
|
1160
|
+
insertContent: ho,
|
|
1161
|
+
insertContentAt: go,
|
|
1162
|
+
joinBackward: wo,
|
|
1163
|
+
joinDown: bo,
|
|
1164
|
+
joinForward: xo,
|
|
1165
|
+
joinItemBackward: ko,
|
|
1166
|
+
joinItemForward: Mo,
|
|
1167
|
+
joinTextblockBackward: Oo,
|
|
1168
|
+
joinTextblockForward: To,
|
|
1169
|
+
joinUp: yo,
|
|
1170
|
+
keyboardShortcut: Ao,
|
|
1171
|
+
lift: Co,
|
|
1172
|
+
liftEmptyBlock: So,
|
|
1173
|
+
liftListItem: Io,
|
|
1174
|
+
newlineInCode: Lo,
|
|
1175
|
+
resetAttributes: Po,
|
|
1176
|
+
scrollIntoView: Do,
|
|
1177
|
+
selectAll: $o,
|
|
1178
|
+
selectNodeBackward: Bo,
|
|
1179
|
+
selectNodeForward: Ro,
|
|
1180
|
+
selectParentNode: No,
|
|
1181
|
+
selectTextblockEnd: Ho,
|
|
1182
|
+
selectTextblockStart: jo,
|
|
1183
|
+
setContent: Fo,
|
|
1184
|
+
setMark: Go,
|
|
1185
|
+
setMeta: Yo,
|
|
1186
|
+
setNode: Xo,
|
|
1187
|
+
setNodeSelection: Jo,
|
|
1188
|
+
setTextSelection: Zo,
|
|
1189
|
+
sinkListItem: Qo,
|
|
1190
|
+
splitBlock: es,
|
|
1191
|
+
splitListItem: ts,
|
|
1192
|
+
toggleList: ns,
|
|
1193
|
+
toggleMark: rs,
|
|
1194
|
+
toggleNode: is,
|
|
1195
|
+
toggleWrap: os,
|
|
1196
|
+
undoInputRule: ss,
|
|
1197
|
+
unsetAllMarks: as,
|
|
1198
|
+
unsetMark: ls,
|
|
1199
|
+
updateAttributes: cs,
|
|
1200
|
+
wrapIn: us,
|
|
1201
|
+
wrapInList: ds
|
|
1261
1202
|
});
|
|
1262
1203
|
K.create({
|
|
1263
1204
|
name: "commands",
|
|
1264
1205
|
addCommands() {
|
|
1265
1206
|
return {
|
|
1266
|
-
...
|
|
1207
|
+
...ps
|
|
1267
1208
|
};
|
|
1268
1209
|
}
|
|
1269
1210
|
});
|
|
@@ -1300,14 +1241,14 @@ K.create({
|
|
|
1300
1241
|
];
|
|
1301
1242
|
}
|
|
1302
1243
|
});
|
|
1303
|
-
const
|
|
1244
|
+
const fs = new te("focusEvents");
|
|
1304
1245
|
K.create({
|
|
1305
1246
|
name: "focusEvents",
|
|
1306
1247
|
addProseMirrorPlugins() {
|
|
1307
1248
|
const { editor: t } = this;
|
|
1308
1249
|
return [
|
|
1309
1250
|
new X({
|
|
1310
|
-
key:
|
|
1251
|
+
key: fs,
|
|
1311
1252
|
props: {
|
|
1312
1253
|
handleDOMEvents: {
|
|
1313
1254
|
focus: (e, n) => {
|
|
@@ -1394,7 +1335,7 @@ K.create({
|
|
|
1394
1335
|
const f = n.tr, h = ur({
|
|
1395
1336
|
state: n,
|
|
1396
1337
|
transaction: f
|
|
1397
|
-
}), { commands: y } = new
|
|
1338
|
+
}), { commands: y } = new Fi({
|
|
1398
1339
|
editor: this.editor,
|
|
1399
1340
|
state: h
|
|
1400
1341
|
});
|
|
@@ -1441,7 +1382,7 @@ function Ue(t) {
|
|
|
1441
1382
|
return new Vt({
|
|
1442
1383
|
find: t.find,
|
|
1443
1384
|
handler: ({ state: e, range: n, match: r }) => {
|
|
1444
|
-
const i =
|
|
1385
|
+
const i = R(t.getAttributes, void 0, r);
|
|
1445
1386
|
if (i === !1 || i === null)
|
|
1446
1387
|
return null;
|
|
1447
1388
|
const { tr: o } = e, s = r[r.length - 1], a = r[0];
|
|
@@ -1456,11 +1397,11 @@ function Ue(t) {
|
|
|
1456
1397
|
}
|
|
1457
1398
|
});
|
|
1458
1399
|
}
|
|
1459
|
-
function
|
|
1400
|
+
function hs(t) {
|
|
1460
1401
|
return new Vt({
|
|
1461
1402
|
find: t.find,
|
|
1462
1403
|
handler: ({ state: e, range: n, match: r }) => {
|
|
1463
|
-
const i =
|
|
1404
|
+
const i = R(t.getAttributes, void 0, r) || {}, { tr: o } = e, s = n.from;
|
|
1464
1405
|
let a = n.to;
|
|
1465
1406
|
const l = t.type.create(i);
|
|
1466
1407
|
if (r[1]) {
|
|
@@ -1481,7 +1422,7 @@ function nn(t) {
|
|
|
1481
1422
|
return new Vt({
|
|
1482
1423
|
find: t.find,
|
|
1483
1424
|
handler: ({ state: e, range: n, match: r }) => {
|
|
1484
|
-
const i = e.doc.resolve(n.from), o =
|
|
1425
|
+
const i = e.doc.resolve(n.from), o = R(t.getAttributes, void 0, r) || {};
|
|
1485
1426
|
if (!i.node(-1).canReplaceWith(i.index(-1), i.indexAfter(-1), t.type))
|
|
1486
1427
|
return null;
|
|
1487
1428
|
e.tr.delete(n.from, n.to).setBlockType(n.from, n.from, t.type, o);
|
|
@@ -1492,7 +1433,7 @@ function ct(t) {
|
|
|
1492
1433
|
return new Vt({
|
|
1493
1434
|
find: t.find,
|
|
1494
1435
|
handler: ({ state: e, range: n, match: r, chain: i }) => {
|
|
1495
|
-
const o =
|
|
1436
|
+
const o = R(t.getAttributes, void 0, r) || {}, s = e.tr.delete(n.from, n.to), l = s.doc.resolve(n.from).blockRange(), c = l && Qr(l, t.type, o);
|
|
1496
1437
|
if (!c)
|
|
1497
1438
|
return null;
|
|
1498
1439
|
if (s.wrap(l, c), t.keepMarks && t.editor) {
|
|
@@ -1519,9 +1460,9 @@ class Y {
|
|
|
1519
1460
|
}, this.config = {
|
|
1520
1461
|
...this.config,
|
|
1521
1462
|
...e
|
|
1522
|
-
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options =
|
|
1463
|
+
}, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = R(F(this, "addOptions", {
|
|
1523
1464
|
name: this.name
|
|
1524
|
-
}))), this.storage =
|
|
1465
|
+
}))), this.storage = R(F(this, "addStorage", {
|
|
1525
1466
|
name: this.name,
|
|
1526
1467
|
options: this.options
|
|
1527
1468
|
})) || {};
|
|
@@ -1538,19 +1479,19 @@ class Y {
|
|
|
1538
1479
|
}
|
|
1539
1480
|
extend(e = {}) {
|
|
1540
1481
|
const n = new Y(e);
|
|
1541
|
-
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options =
|
|
1482
|
+
return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = R(F(n, "addOptions", {
|
|
1542
1483
|
name: n.name
|
|
1543
|
-
})), n.storage =
|
|
1484
|
+
})), n.storage = R(F(n, "addStorage", {
|
|
1544
1485
|
name: n.name,
|
|
1545
1486
|
options: n.options
|
|
1546
1487
|
})), n;
|
|
1547
1488
|
}
|
|
1548
1489
|
}
|
|
1549
1490
|
function qe(t) {
|
|
1550
|
-
return new
|
|
1491
|
+
return new Ui({
|
|
1551
1492
|
find: t.find,
|
|
1552
1493
|
handler: ({ state: e, range: n, match: r, pasteEvent: i }) => {
|
|
1553
|
-
const o =
|
|
1494
|
+
const o = R(t.getAttributes, void 0, r, i);
|
|
1554
1495
|
if (o === !1 || o === null)
|
|
1555
1496
|
return null;
|
|
1556
1497
|
const { tr: s } = e, a = r[r.length - 1], l = r[0];
|
|
@@ -1564,7 +1505,7 @@ function qe(t) {
|
|
|
1564
1505
|
}
|
|
1565
1506
|
});
|
|
1566
1507
|
}
|
|
1567
|
-
function
|
|
1508
|
+
function ms(t, e) {
|
|
1568
1509
|
const { selection: n } = t, { $from: r } = n;
|
|
1569
1510
|
if (n instanceof He) {
|
|
1570
1511
|
const o = r.index();
|
|
@@ -1579,7 +1520,7 @@ function ys(t, e) {
|
|
|
1579
1520
|
}
|
|
1580
1521
|
return !1;
|
|
1581
1522
|
}
|
|
1582
|
-
const
|
|
1523
|
+
const vs = /^\s*>\s$/, gs = Y.create({
|
|
1583
1524
|
name: "blockquote",
|
|
1584
1525
|
addOptions() {
|
|
1585
1526
|
return {
|
|
@@ -1612,12 +1553,12 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1612
1553
|
addInputRules() {
|
|
1613
1554
|
return [
|
|
1614
1555
|
ct({
|
|
1615
|
-
find:
|
|
1556
|
+
find: vs,
|
|
1616
1557
|
type: this.type
|
|
1617
1558
|
})
|
|
1618
1559
|
];
|
|
1619
1560
|
}
|
|
1620
|
-
}),
|
|
1561
|
+
}), ys = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, bs = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, ws = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, xs = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, ks = Re.create({
|
|
1621
1562
|
name: "bold",
|
|
1622
1563
|
addOptions() {
|
|
1623
1564
|
return {
|
|
@@ -1662,11 +1603,11 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1662
1603
|
addInputRules() {
|
|
1663
1604
|
return [
|
|
1664
1605
|
Ue({
|
|
1665
|
-
find:
|
|
1606
|
+
find: ys,
|
|
1666
1607
|
type: this.type
|
|
1667
1608
|
}),
|
|
1668
1609
|
Ue({
|
|
1669
|
-
find:
|
|
1610
|
+
find: ws,
|
|
1670
1611
|
type: this.type
|
|
1671
1612
|
})
|
|
1672
1613
|
];
|
|
@@ -1674,16 +1615,16 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1674
1615
|
addPasteRules() {
|
|
1675
1616
|
return [
|
|
1676
1617
|
qe({
|
|
1677
|
-
find:
|
|
1618
|
+
find: bs,
|
|
1678
1619
|
type: this.type
|
|
1679
1620
|
}),
|
|
1680
1621
|
qe({
|
|
1681
|
-
find:
|
|
1622
|
+
find: xs,
|
|
1682
1623
|
type: this.type
|
|
1683
1624
|
})
|
|
1684
1625
|
];
|
|
1685
1626
|
}
|
|
1686
|
-
}),
|
|
1627
|
+
}), Ms = "listItem", Dn = "textStyle", $n = /^\s*([-+*])\s$/, Os = Y.create({
|
|
1687
1628
|
name: "bulletList",
|
|
1688
1629
|
addOptions() {
|
|
1689
1630
|
return {
|
|
@@ -1707,7 +1648,7 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1707
1648
|
},
|
|
1708
1649
|
addCommands() {
|
|
1709
1650
|
return {
|
|
1710
|
-
toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
1651
|
+
toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ms, this.editor.getAttributes(Dn)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
1711
1652
|
};
|
|
1712
1653
|
},
|
|
1713
1654
|
addKeyboardShortcuts() {
|
|
@@ -1731,7 +1672,7 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1731
1672
|
t
|
|
1732
1673
|
];
|
|
1733
1674
|
}
|
|
1734
|
-
}),
|
|
1675
|
+
}), Ts = /(^|[^`])`([^`]+)`(?!`)/, Es = /(^|[^`])`([^`]+)`(?!`)/g, As = Re.create({
|
|
1735
1676
|
name: "code",
|
|
1736
1677
|
addOptions() {
|
|
1737
1678
|
return {
|
|
@@ -1764,7 +1705,7 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1764
1705
|
addInputRules() {
|
|
1765
1706
|
return [
|
|
1766
1707
|
Ue({
|
|
1767
|
-
find:
|
|
1708
|
+
find: Ts,
|
|
1768
1709
|
type: this.type
|
|
1769
1710
|
})
|
|
1770
1711
|
];
|
|
@@ -1772,12 +1713,12 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1772
1713
|
addPasteRules() {
|
|
1773
1714
|
return [
|
|
1774
1715
|
qe({
|
|
1775
|
-
find:
|
|
1716
|
+
find: Es,
|
|
1776
1717
|
type: this.type
|
|
1777
1718
|
})
|
|
1778
1719
|
];
|
|
1779
1720
|
}
|
|
1780
|
-
}),
|
|
1721
|
+
}), Cs = /^```([a-z]+)?[\s\n]$/, Ss = /^~~~([a-z]+)?[\s\n]$/, Is = Y.create({
|
|
1781
1722
|
name: "codeBlock",
|
|
1782
1723
|
addOptions() {
|
|
1783
1724
|
return {
|
|
@@ -1868,14 +1809,14 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1868
1809
|
addInputRules() {
|
|
1869
1810
|
return [
|
|
1870
1811
|
nn({
|
|
1871
|
-
find:
|
|
1812
|
+
find: Cs,
|
|
1872
1813
|
type: this.type,
|
|
1873
1814
|
getAttributes: (t) => ({
|
|
1874
1815
|
language: t[1]
|
|
1875
1816
|
})
|
|
1876
1817
|
}),
|
|
1877
1818
|
nn({
|
|
1878
|
-
find:
|
|
1819
|
+
find: Ss,
|
|
1879
1820
|
type: this.type,
|
|
1880
1821
|
getAttributes: (t) => ({
|
|
1881
1822
|
language: t[1]
|
|
@@ -1904,19 +1845,19 @@ const bs = /^\s*>\s$/, ws = Y.create({
|
|
|
1904
1845
|
})
|
|
1905
1846
|
];
|
|
1906
1847
|
}
|
|
1907
|
-
}),
|
|
1848
|
+
}), Ls = Y.create({
|
|
1908
1849
|
name: "doc",
|
|
1909
1850
|
topNode: !0,
|
|
1910
1851
|
content: "block+"
|
|
1911
1852
|
});
|
|
1912
|
-
function
|
|
1853
|
+
function Ps(t = {}) {
|
|
1913
1854
|
return new X({
|
|
1914
1855
|
view(e) {
|
|
1915
|
-
return new
|
|
1856
|
+
return new Ds(e, t);
|
|
1916
1857
|
}
|
|
1917
1858
|
});
|
|
1918
1859
|
}
|
|
1919
|
-
class
|
|
1860
|
+
class Ds {
|
|
1920
1861
|
constructor(e, n) {
|
|
1921
1862
|
var r;
|
|
1922
1863
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = n.width) !== null && r !== void 0 ? r : 1, this.color = n.color === !1 ? void 0 : n.color || "black", this.class = n.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((i) => {
|
|
@@ -1974,7 +1915,7 @@ class Bs {
|
|
|
1974
1915
|
if (n && !o) {
|
|
1975
1916
|
let s = n.pos;
|
|
1976
1917
|
if (this.editorView.dragging && this.editorView.dragging.slice) {
|
|
1977
|
-
let a =
|
|
1918
|
+
let a = Ai(this.editorView.state.doc, s, this.editorView.dragging.slice);
|
|
1978
1919
|
a != null && (s = a);
|
|
1979
1920
|
}
|
|
1980
1921
|
this.setCursor(s), this.scheduleRemoval(5e3);
|
|
@@ -1990,7 +1931,7 @@ class Bs {
|
|
|
1990
1931
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
1991
1932
|
}
|
|
1992
1933
|
}
|
|
1993
|
-
const
|
|
1934
|
+
const $s = K.create({
|
|
1994
1935
|
name: "dropCursor",
|
|
1995
1936
|
addOptions() {
|
|
1996
1937
|
return {
|
|
@@ -2001,7 +1942,7 @@ const Ns = K.create({
|
|
|
2001
1942
|
},
|
|
2002
1943
|
addProseMirrorPlugins() {
|
|
2003
1944
|
return [
|
|
2004
|
-
|
|
1945
|
+
Ps(this.options)
|
|
2005
1946
|
];
|
|
2006
1947
|
}
|
|
2007
1948
|
});
|
|
@@ -2044,7 +1985,7 @@ class $ extends le {
|
|
|
2044
1985
|
*/
|
|
2045
1986
|
static valid(e) {
|
|
2046
1987
|
let n = e.parent;
|
|
2047
|
-
if (n.isTextblock || !
|
|
1988
|
+
if (n.isTextblock || !Bs(e) || !Rs(e))
|
|
2048
1989
|
return !1;
|
|
2049
1990
|
let r = n.type.spec.allowGapCursor;
|
|
2050
1991
|
if (r != null)
|
|
@@ -2105,7 +2046,10 @@ class yn {
|
|
|
2105
2046
|
return $.valid(n) ? new $(n) : le.near(n);
|
|
2106
2047
|
}
|
|
2107
2048
|
}
|
|
2108
|
-
function
|
|
2049
|
+
function yr(t) {
|
|
2050
|
+
return t.isAtom || t.spec.isolating || t.spec.createGapCursor;
|
|
2051
|
+
}
|
|
2052
|
+
function Bs(t) {
|
|
2109
2053
|
for (let e = t.depth; e >= 0; e--) {
|
|
2110
2054
|
let n = t.index(e), r = t.node(e);
|
|
2111
2055
|
if (n == 0) {
|
|
@@ -2114,7 +2058,7 @@ function Hs(t) {
|
|
|
2114
2058
|
continue;
|
|
2115
2059
|
}
|
|
2116
2060
|
for (let i = r.child(n - 1); ; i = i.lastChild) {
|
|
2117
|
-
if (i.childCount == 0 && !i.inlineContent || i.
|
|
2061
|
+
if (i.childCount == 0 && !i.inlineContent || yr(i.type))
|
|
2118
2062
|
return !0;
|
|
2119
2063
|
if (i.inlineContent)
|
|
2120
2064
|
return !1;
|
|
@@ -2122,7 +2066,7 @@ function Hs(t) {
|
|
|
2122
2066
|
}
|
|
2123
2067
|
return !0;
|
|
2124
2068
|
}
|
|
2125
|
-
function
|
|
2069
|
+
function Rs(t) {
|
|
2126
2070
|
for (let e = t.depth; e >= 0; e--) {
|
|
2127
2071
|
let n = t.indexAfter(e), r = t.node(e);
|
|
2128
2072
|
if (n == r.childCount) {
|
|
@@ -2131,7 +2075,7 @@ function js(t) {
|
|
|
2131
2075
|
continue;
|
|
2132
2076
|
}
|
|
2133
2077
|
for (let i = r.child(n); ; i = i.firstChild) {
|
|
2134
|
-
if (i.childCount == 0 && !i.inlineContent || i.
|
|
2078
|
+
if (i.childCount == 0 && !i.inlineContent || yr(i.type))
|
|
2135
2079
|
return !0;
|
|
2136
2080
|
if (i.inlineContent)
|
|
2137
2081
|
return !1;
|
|
@@ -2139,20 +2083,20 @@ function js(t) {
|
|
|
2139
2083
|
}
|
|
2140
2084
|
return !0;
|
|
2141
2085
|
}
|
|
2142
|
-
function
|
|
2086
|
+
function Ns() {
|
|
2143
2087
|
return new X({
|
|
2144
2088
|
props: {
|
|
2145
|
-
decorations:
|
|
2089
|
+
decorations: Fs,
|
|
2146
2090
|
createSelectionBetween(t, e, n) {
|
|
2147
2091
|
return e.pos == n.pos && $.valid(n) ? new $(n) : null;
|
|
2148
2092
|
},
|
|
2149
|
-
handleClick:
|
|
2150
|
-
handleKeyDown:
|
|
2151
|
-
handleDOMEvents: { beforeinput:
|
|
2093
|
+
handleClick: js,
|
|
2094
|
+
handleKeyDown: Hs,
|
|
2095
|
+
handleDOMEvents: { beforeinput: _s }
|
|
2152
2096
|
}
|
|
2153
2097
|
});
|
|
2154
2098
|
}
|
|
2155
|
-
const
|
|
2099
|
+
const Hs = Ci({
|
|
2156
2100
|
ArrowLeft: Lt("horiz", -1),
|
|
2157
2101
|
ArrowRight: Lt("horiz", 1),
|
|
2158
2102
|
ArrowUp: Lt("vert", -1),
|
|
@@ -2171,7 +2115,7 @@ function Lt(t, e) {
|
|
|
2171
2115
|
return c ? (i && i(r.tr.setSelection(new $(c))), !0) : !1;
|
|
2172
2116
|
};
|
|
2173
2117
|
}
|
|
2174
|
-
function
|
|
2118
|
+
function js(t, e, n) {
|
|
2175
2119
|
if (!t || !t.editable)
|
|
2176
2120
|
return !1;
|
|
2177
2121
|
let r = t.state.doc.resolve(e);
|
|
@@ -2180,7 +2124,7 @@ function Vs(t, e, n) {
|
|
|
2180
2124
|
let i = t.posAtCoords({ left: n.clientX, top: n.clientY });
|
|
2181
2125
|
return i && i.inside > -1 && He.isSelectable(t.state.doc.nodeAt(i.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new $(r))), !0);
|
|
2182
2126
|
}
|
|
2183
|
-
function
|
|
2127
|
+
function _s(t, e) {
|
|
2184
2128
|
if (e.inputType != "insertCompositionText" || !(t.state.selection instanceof $))
|
|
2185
2129
|
return !1;
|
|
2186
2130
|
let { $from: n } = t.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);
|
|
@@ -2192,17 +2136,17 @@ function Ws(t, e) {
|
|
|
2192
2136
|
let o = t.state.tr.replace(n.pos, n.pos, new dn(i, 0, 0));
|
|
2193
2137
|
return o.setSelection(V.near(o.doc.resolve(n.pos + 1))), t.dispatch(o), !1;
|
|
2194
2138
|
}
|
|
2195
|
-
function
|
|
2139
|
+
function Fs(t) {
|
|
2196
2140
|
if (!(t.selection instanceof $))
|
|
2197
2141
|
return null;
|
|
2198
2142
|
let e = document.createElement("div");
|
|
2199
2143
|
return e.className = "ProseMirror-gapcursor", sr.create(t.doc, [or.widget(t.selection.head, e, { key: "gapcursor" })]);
|
|
2200
2144
|
}
|
|
2201
|
-
const
|
|
2145
|
+
const Vs = K.create({
|
|
2202
2146
|
name: "gapCursor",
|
|
2203
2147
|
addProseMirrorPlugins() {
|
|
2204
2148
|
return [
|
|
2205
|
-
|
|
2149
|
+
Ns()
|
|
2206
2150
|
];
|
|
2207
2151
|
},
|
|
2208
2152
|
extendNodeSchema(t) {
|
|
@@ -2213,10 +2157,10 @@ const Ks = K.create({
|
|
|
2213
2157
|
storage: t.storage
|
|
2214
2158
|
};
|
|
2215
2159
|
return {
|
|
2216
|
-
allowGapCursor: (e =
|
|
2160
|
+
allowGapCursor: (e = R(F(t, "allowGapCursor", n))) !== null && e !== void 0 ? e : null
|
|
2217
2161
|
};
|
|
2218
2162
|
}
|
|
2219
|
-
}),
|
|
2163
|
+
}), Ws = Y.create({
|
|
2220
2164
|
name: "hardBreak",
|
|
2221
2165
|
addOptions() {
|
|
2222
2166
|
return {
|
|
@@ -2266,7 +2210,7 @@ const Ks = K.create({
|
|
|
2266
2210
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
2267
2211
|
};
|
|
2268
2212
|
}
|
|
2269
|
-
}),
|
|
2213
|
+
}), zs = Y.create({
|
|
2270
2214
|
name: "heading",
|
|
2271
2215
|
addOptions() {
|
|
2272
2216
|
return {
|
|
@@ -2325,7 +2269,7 @@ N.prototype.prepend = function(e) {
|
|
|
2325
2269
|
return e.length ? N.from(e).append(this) : this;
|
|
2326
2270
|
};
|
|
2327
2271
|
N.prototype.appendInner = function(e) {
|
|
2328
|
-
return new
|
|
2272
|
+
return new Ks(this, e);
|
|
2329
2273
|
};
|
|
2330
2274
|
N.prototype.slice = function(e, n) {
|
|
2331
2275
|
return e === void 0 && (e = 0), n === void 0 && (n = this.length), e >= n ? N.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, n));
|
|
@@ -2345,9 +2289,9 @@ N.prototype.map = function(e, n, r) {
|
|
|
2345
2289
|
}, n, r), i;
|
|
2346
2290
|
};
|
|
2347
2291
|
N.from = function(e) {
|
|
2348
|
-
return e instanceof N ? e : e && e.length ? new
|
|
2292
|
+
return e instanceof N ? e : e && e.length ? new br(e) : N.empty;
|
|
2349
2293
|
};
|
|
2350
|
-
var
|
|
2294
|
+
var br = /* @__PURE__ */ function(t) {
|
|
2351
2295
|
function e(r) {
|
|
2352
2296
|
t.call(this), this.values = r;
|
|
2353
2297
|
}
|
|
@@ -2379,8 +2323,8 @@ var yr = /* @__PURE__ */ function(t) {
|
|
|
2379
2323
|
return 0;
|
|
2380
2324
|
}, Object.defineProperties(e.prototype, n), e;
|
|
2381
2325
|
}(N);
|
|
2382
|
-
N.empty = new
|
|
2383
|
-
var
|
|
2326
|
+
N.empty = new br([]);
|
|
2327
|
+
var Ks = /* @__PURE__ */ function(t) {
|
|
2384
2328
|
function e(n, r) {
|
|
2385
2329
|
t.call(this), this.left = n, this.right = r, this.length = n.length + r.length, this.depth = Math.max(n.depth, r.depth) + 1;
|
|
2386
2330
|
}
|
|
@@ -2413,7 +2357,7 @@ var Gs = /* @__PURE__ */ function(t) {
|
|
|
2413
2357
|
return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
|
|
2414
2358
|
}, e;
|
|
2415
2359
|
}(N);
|
|
2416
|
-
const
|
|
2360
|
+
const Us = 500;
|
|
2417
2361
|
class ae {
|
|
2418
2362
|
constructor(e, n) {
|
|
2419
2363
|
this.items = e, this.eventCount = n;
|
|
@@ -2455,10 +2399,10 @@ class ae {
|
|
|
2455
2399
|
(h = l && l.merge(f)) && (f = h, u ? o.pop() : a = a.slice(0, a.length - 1)), o.push(f), n && (s++, n = void 0), i || (l = f);
|
|
2456
2400
|
}
|
|
2457
2401
|
let c = s - r.depth;
|
|
2458
|
-
return c >
|
|
2402
|
+
return c > Gs && (a = qs(a, c), s -= c), new ae(a.append(o), s);
|
|
2459
2403
|
}
|
|
2460
2404
|
remapping(e, n) {
|
|
2461
|
-
let r = new
|
|
2405
|
+
let r = new Si();
|
|
2462
2406
|
return this.items.forEach((i, o) => {
|
|
2463
2407
|
let s = i.mirrorOffset != null && o - i.mirrorOffset >= e ? r.maps.length - i.mirrorOffset : void 0;
|
|
2464
2408
|
r.appendMap(i.map, s);
|
|
@@ -2495,7 +2439,7 @@ class ae {
|
|
|
2495
2439
|
for (let f = n; f < s; f++)
|
|
2496
2440
|
c.push(new pe(o.maps[f]));
|
|
2497
2441
|
let u = this.items.slice(0, i).append(c).append(r), d = new ae(u, a);
|
|
2498
|
-
return d.emptyItemCount() >
|
|
2442
|
+
return d.emptyItemCount() > Us && (d = d.compress(this.items.length - r.length)), d;
|
|
2499
2443
|
}
|
|
2500
2444
|
emptyItemCount() {
|
|
2501
2445
|
let e = 0;
|
|
@@ -2527,7 +2471,7 @@ class ae {
|
|
|
2527
2471
|
}
|
|
2528
2472
|
}
|
|
2529
2473
|
ae.empty = new ae(N.empty, 0);
|
|
2530
|
-
function
|
|
2474
|
+
function qs(t, e) {
|
|
2531
2475
|
let n;
|
|
2532
2476
|
return t.forEach((r, i) => {
|
|
2533
2477
|
if (r.selection && e-- == 0)
|
|
@@ -2551,23 +2495,23 @@ class Oe {
|
|
|
2551
2495
|
this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = i, this.prevComposition = o;
|
|
2552
2496
|
}
|
|
2553
2497
|
}
|
|
2554
|
-
const
|
|
2555
|
-
function
|
|
2498
|
+
const Gs = 20;
|
|
2499
|
+
function Ys(t, e, n, r) {
|
|
2556
2500
|
let i = n.getMeta($e), o;
|
|
2557
2501
|
if (i)
|
|
2558
2502
|
return i.historyState;
|
|
2559
|
-
n.getMeta(
|
|
2503
|
+
n.getMeta(Zs) && (t = new Oe(t.done, t.undone, null, 0, -1));
|
|
2560
2504
|
let s = n.getMeta("appendedTransaction");
|
|
2561
2505
|
if (n.steps.length == 0)
|
|
2562
2506
|
return t;
|
|
2563
2507
|
if (s && s.getMeta($e))
|
|
2564
|
-
return s.getMeta($e).redo ? new Oe(t.done.addTransform(n, void 0, r,
|
|
2508
|
+
return s.getMeta($e).redo ? new Oe(t.done.addTransform(n, void 0, r, Rt(e)), t.undone, Bn(n.mapping.maps), t.prevTime, t.prevComposition) : new Oe(t.done, t.undone.addTransform(n, void 0, r, Rt(e)), null, t.prevTime, t.prevComposition);
|
|
2565
2509
|
if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
|
|
2566
|
-
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !
|
|
2567
|
-
return new Oe(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r,
|
|
2510
|
+
let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !Xs(n, t.prevRanges)), c = s ? Xt(t.prevRanges, n.mapping) : Bn(n.mapping.maps);
|
|
2511
|
+
return new Oe(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, Rt(e)), ae.empty, c, n.time, a ?? t.prevComposition);
|
|
2568
2512
|
} else return (o = n.getMeta("rebased")) ? new Oe(t.done.rebased(n, o), t.undone.rebased(n, o), Xt(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Oe(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Xt(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
|
|
2569
2513
|
}
|
|
2570
|
-
function
|
|
2514
|
+
function Xs(t, e) {
|
|
2571
2515
|
if (!e)
|
|
2572
2516
|
return !1;
|
|
2573
2517
|
if (!t.docChanged)
|
|
@@ -2578,7 +2522,7 @@ function Qs(t, e) {
|
|
|
2578
2522
|
r <= e[o + 1] && i >= e[o] && (n = !0);
|
|
2579
2523
|
}), n;
|
|
2580
2524
|
}
|
|
2581
|
-
function
|
|
2525
|
+
function Bn(t) {
|
|
2582
2526
|
let e = [];
|
|
2583
2527
|
for (let n = t.length - 1; n >= 0 && e.length == 0; n--)
|
|
2584
2528
|
t[n].forEach((r, i, o, s) => e.push(o, s));
|
|
@@ -2594,18 +2538,18 @@ function Xt(t, e) {
|
|
|
2594
2538
|
}
|
|
2595
2539
|
return n;
|
|
2596
2540
|
}
|
|
2597
|
-
function
|
|
2598
|
-
let r =
|
|
2541
|
+
function Js(t, e, n) {
|
|
2542
|
+
let r = Rt(e), i = $e.get(e).spec.config, o = (n ? t.undone : t.done).popEvent(e, r);
|
|
2599
2543
|
if (!o)
|
|
2600
2544
|
return null;
|
|
2601
2545
|
let s = o.selection.resolve(o.transform.doc), a = (n ? t.done : t.undone).addTransform(o.transform, e.selection.getBookmark(), i, r), l = new Oe(n ? a : o.remaining, n ? o.remaining : a, null, 0, -1);
|
|
2602
2546
|
return o.transform.setSelection(s).setMeta($e, { redo: n, historyState: l });
|
|
2603
2547
|
}
|
|
2604
|
-
let Jt = !1,
|
|
2605
|
-
function
|
|
2548
|
+
let Jt = !1, Rn = null;
|
|
2549
|
+
function Rt(t) {
|
|
2606
2550
|
let e = t.plugins;
|
|
2607
|
-
if (
|
|
2608
|
-
Jt = !1,
|
|
2551
|
+
if (Rn != e) {
|
|
2552
|
+
Jt = !1, Rn = e;
|
|
2609
2553
|
for (let n = 0; n < e.length; n++)
|
|
2610
2554
|
if (e[n].spec.historyPreserveItems) {
|
|
2611
2555
|
Jt = !0;
|
|
@@ -2614,8 +2558,8 @@ function Bt(t) {
|
|
|
2614
2558
|
}
|
|
2615
2559
|
return Jt;
|
|
2616
2560
|
}
|
|
2617
|
-
const $e = new te("history"),
|
|
2618
|
-
function
|
|
2561
|
+
const $e = new te("history"), Zs = new te("closeHistory");
|
|
2562
|
+
function Qs(t = {}) {
|
|
2619
2563
|
return t = {
|
|
2620
2564
|
depth: t.depth || 100,
|
|
2621
2565
|
newGroupDelay: t.newGroupDelay || 500
|
|
@@ -2626,33 +2570,33 @@ function na(t = {}) {
|
|
|
2626
2570
|
return new Oe(ae.empty, ae.empty, null, 0, -1);
|
|
2627
2571
|
},
|
|
2628
2572
|
apply(e, n, r) {
|
|
2629
|
-
return
|
|
2573
|
+
return Ys(n, r, e, t);
|
|
2630
2574
|
}
|
|
2631
2575
|
},
|
|
2632
2576
|
config: t,
|
|
2633
2577
|
props: {
|
|
2634
2578
|
handleDOMEvents: {
|
|
2635
2579
|
beforeinput(e, n) {
|
|
2636
|
-
let r = n.inputType, i = r == "historyUndo" ?
|
|
2637
|
-
return i ? (n.preventDefault(), i(e.state, e.dispatch))
|
|
2580
|
+
let r = n.inputType, i = r == "historyUndo" ? xr : r == "historyRedo" ? kr : null;
|
|
2581
|
+
return !i || !e.editable ? !1 : (n.preventDefault(), i(e.state, e.dispatch));
|
|
2638
2582
|
}
|
|
2639
2583
|
}
|
|
2640
2584
|
}
|
|
2641
2585
|
});
|
|
2642
2586
|
}
|
|
2643
|
-
function
|
|
2587
|
+
function wr(t, e) {
|
|
2644
2588
|
return (n, r) => {
|
|
2645
2589
|
let i = $e.getState(n);
|
|
2646
2590
|
if (!i || (t ? i.undone : i.done).eventCount == 0)
|
|
2647
2591
|
return !1;
|
|
2648
2592
|
if (r) {
|
|
2649
|
-
let o =
|
|
2593
|
+
let o = Js(i, n, t);
|
|
2650
2594
|
o && r(e ? o.scrollIntoView() : o);
|
|
2651
2595
|
}
|
|
2652
2596
|
return !0;
|
|
2653
2597
|
};
|
|
2654
2598
|
}
|
|
2655
|
-
const
|
|
2599
|
+
const xr = wr(!1, !0), kr = wr(!0, !0), ea = K.create({
|
|
2656
2600
|
name: "history",
|
|
2657
2601
|
addOptions() {
|
|
2658
2602
|
return {
|
|
@@ -2662,13 +2606,13 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2662
2606
|
},
|
|
2663
2607
|
addCommands() {
|
|
2664
2608
|
return {
|
|
2665
|
-
undo: () => ({ state: t, dispatch: e }) =>
|
|
2666
|
-
redo: () => ({ state: t, dispatch: e }) =>
|
|
2609
|
+
undo: () => ({ state: t, dispatch: e }) => xr(t, e),
|
|
2610
|
+
redo: () => ({ state: t, dispatch: e }) => kr(t, e)
|
|
2667
2611
|
};
|
|
2668
2612
|
},
|
|
2669
2613
|
addProseMirrorPlugins() {
|
|
2670
2614
|
return [
|
|
2671
|
-
|
|
2615
|
+
Qs(this.options)
|
|
2672
2616
|
];
|
|
2673
2617
|
},
|
|
2674
2618
|
addKeyboardShortcuts() {
|
|
@@ -2681,7 +2625,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2681
2625
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
2682
2626
|
};
|
|
2683
2627
|
}
|
|
2684
|
-
}),
|
|
2628
|
+
}), ta = Y.create({
|
|
2685
2629
|
name: "horizontalRule",
|
|
2686
2630
|
addOptions() {
|
|
2687
2631
|
return {
|
|
@@ -2698,7 +2642,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2698
2642
|
addCommands() {
|
|
2699
2643
|
return {
|
|
2700
2644
|
setHorizontalRule: () => ({ chain: t, state: e }) => {
|
|
2701
|
-
if (!
|
|
2645
|
+
if (!ms(e, e.schema.nodes[this.name]))
|
|
2702
2646
|
return !1;
|
|
2703
2647
|
const { selection: n } = e, { $from: r, $to: i } = n, o = t();
|
|
2704
2648
|
return r.parentOffset === 0 ? o.insertContentAt({
|
|
@@ -2706,7 +2650,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2706
2650
|
to: i.pos
|
|
2707
2651
|
}, {
|
|
2708
2652
|
type: this.name
|
|
2709
|
-
}) :
|
|
2653
|
+
}) : Uo(n) ? o.insertContentAt(i.pos, {
|
|
2710
2654
|
type: this.name
|
|
2711
2655
|
}) : o.insertContent({ type: this.name }), o.command(({ tr: s, dispatch: a }) => {
|
|
2712
2656
|
var l;
|
|
@@ -2727,13 +2671,13 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2727
2671
|
},
|
|
2728
2672
|
addInputRules() {
|
|
2729
2673
|
return [
|
|
2730
|
-
|
|
2674
|
+
hs({
|
|
2731
2675
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
2732
2676
|
type: this.type
|
|
2733
2677
|
})
|
|
2734
2678
|
];
|
|
2735
2679
|
}
|
|
2736
|
-
}),
|
|
2680
|
+
}), na = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, ra = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, ia = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, oa = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, sa = Re.create({
|
|
2737
2681
|
name: "italic",
|
|
2738
2682
|
addOptions() {
|
|
2739
2683
|
return {
|
|
@@ -2777,11 +2721,11 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2777
2721
|
addInputRules() {
|
|
2778
2722
|
return [
|
|
2779
2723
|
Ue({
|
|
2780
|
-
find:
|
|
2724
|
+
find: na,
|
|
2781
2725
|
type: this.type
|
|
2782
2726
|
}),
|
|
2783
2727
|
Ue({
|
|
2784
|
-
find:
|
|
2728
|
+
find: ia,
|
|
2785
2729
|
type: this.type
|
|
2786
2730
|
})
|
|
2787
2731
|
];
|
|
@@ -2789,16 +2733,16 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2789
2733
|
addPasteRules() {
|
|
2790
2734
|
return [
|
|
2791
2735
|
qe({
|
|
2792
|
-
find:
|
|
2736
|
+
find: ra,
|
|
2793
2737
|
type: this.type
|
|
2794
2738
|
}),
|
|
2795
2739
|
qe({
|
|
2796
|
-
find:
|
|
2740
|
+
find: oa,
|
|
2797
2741
|
type: this.type
|
|
2798
2742
|
})
|
|
2799
2743
|
];
|
|
2800
2744
|
}
|
|
2801
|
-
}),
|
|
2745
|
+
}), aa = Y.create({
|
|
2802
2746
|
name: "listItem",
|
|
2803
2747
|
addOptions() {
|
|
2804
2748
|
return {
|
|
@@ -2826,7 +2770,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2826
2770
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
2827
2771
|
};
|
|
2828
2772
|
}
|
|
2829
|
-
}),
|
|
2773
|
+
}), la = "listItem", Nn = "textStyle", Hn = /^(\d+)\.\s$/, ca = Y.create({
|
|
2830
2774
|
name: "orderedList",
|
|
2831
2775
|
addOptions() {
|
|
2832
2776
|
return {
|
|
@@ -2865,7 +2809,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2865
2809
|
},
|
|
2866
2810
|
addCommands() {
|
|
2867
2811
|
return {
|
|
2868
|
-
toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
2812
|
+
toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(la, this.editor.getAttributes(Nn)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
2869
2813
|
};
|
|
2870
2814
|
},
|
|
2871
2815
|
addKeyboardShortcuts() {
|
|
@@ -2892,7 +2836,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2892
2836
|
t
|
|
2893
2837
|
];
|
|
2894
2838
|
}
|
|
2895
|
-
}),
|
|
2839
|
+
}), ua = Y.create({
|
|
2896
2840
|
name: "paragraph",
|
|
2897
2841
|
priority: 1e3,
|
|
2898
2842
|
addOptions() {
|
|
@@ -2920,7 +2864,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2920
2864
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
2921
2865
|
};
|
|
2922
2866
|
}
|
|
2923
|
-
}),
|
|
2867
|
+
}), da = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, pa = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, fa = Re.create({
|
|
2924
2868
|
name: "strike",
|
|
2925
2869
|
addOptions() {
|
|
2926
2870
|
return {
|
|
@@ -2963,7 +2907,7 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2963
2907
|
addInputRules() {
|
|
2964
2908
|
return [
|
|
2965
2909
|
Ue({
|
|
2966
|
-
find:
|
|
2910
|
+
find: da,
|
|
2967
2911
|
type: this.type
|
|
2968
2912
|
})
|
|
2969
2913
|
];
|
|
@@ -2971,27 +2915,27 @@ const wr = br(!1, !0), xr = br(!0, !0), ra = K.create({
|
|
|
2971
2915
|
addPasteRules() {
|
|
2972
2916
|
return [
|
|
2973
2917
|
qe({
|
|
2974
|
-
find:
|
|
2918
|
+
find: pa,
|
|
2975
2919
|
type: this.type
|
|
2976
2920
|
})
|
|
2977
2921
|
];
|
|
2978
2922
|
}
|
|
2979
|
-
}),
|
|
2923
|
+
}), ha = Y.create({
|
|
2980
2924
|
name: "text",
|
|
2981
2925
|
group: "inline"
|
|
2982
|
-
}),
|
|
2926
|
+
}), Ql = K.create({
|
|
2983
2927
|
name: "starterKit",
|
|
2984
2928
|
addExtensions() {
|
|
2985
2929
|
var t, e, n, r, i, o, s, a, l, c, u, d, f, h, y, v, g, w;
|
|
2986
2930
|
const x = [];
|
|
2987
|
-
return this.options.bold !== !1 && x.push(
|
|
2931
|
+
return this.options.bold !== !1 && x.push(ks.configure((t = this.options) === null || t === void 0 ? void 0 : t.bold)), this.options.blockquote !== !1 && x.push(gs.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && x.push(Os.configure((n = this.options) === null || n === void 0 ? void 0 : n.bulletList)), this.options.code !== !1 && x.push(As.configure((r = this.options) === null || r === void 0 ? void 0 : r.code)), this.options.codeBlock !== !1 && x.push(Is.configure((i = this.options) === null || i === void 0 ? void 0 : i.codeBlock)), this.options.document !== !1 && x.push(Ls.configure((o = this.options) === null || o === void 0 ? void 0 : o.document)), this.options.dropcursor !== !1 && x.push($s.configure((s = this.options) === null || s === void 0 ? void 0 : s.dropcursor)), this.options.gapcursor !== !1 && x.push(Vs.configure((a = this.options) === null || a === void 0 ? void 0 : a.gapcursor)), this.options.hardBreak !== !1 && x.push(Ws.configure((l = this.options) === null || l === void 0 ? void 0 : l.hardBreak)), this.options.heading !== !1 && x.push(zs.configure((c = this.options) === null || c === void 0 ? void 0 : c.heading)), this.options.history !== !1 && x.push(ea.configure((u = this.options) === null || u === void 0 ? void 0 : u.history)), this.options.horizontalRule !== !1 && x.push(ta.configure((d = this.options) === null || d === void 0 ? void 0 : d.horizontalRule)), this.options.italic !== !1 && x.push(sa.configure((f = this.options) === null || f === void 0 ? void 0 : f.italic)), this.options.listItem !== !1 && x.push(aa.configure((h = this.options) === null || h === void 0 ? void 0 : h.listItem)), this.options.orderedList !== !1 && x.push(ca.configure((y = this.options) === null || y === void 0 ? void 0 : y.orderedList)), this.options.paragraph !== !1 && x.push(ua.configure((v = this.options) === null || v === void 0 ? void 0 : v.paragraph)), this.options.strike !== !1 && x.push(fa.configure((g = this.options) === null || g === void 0 ? void 0 : g.strike)), this.options.text !== !1 && x.push(ha.configure((w = this.options) === null || w === void 0 ? void 0 : w.text)), x;
|
|
2988
2932
|
}
|
|
2989
2933
|
});
|
|
2990
|
-
var U = "top", ie = "bottom", oe = "right", q = "left", bn = "auto", vt = [U, ie, oe, q], Ge = "start", ut = "end",
|
|
2934
|
+
var U = "top", ie = "bottom", oe = "right", q = "left", bn = "auto", vt = [U, ie, oe, q], Ge = "start", ut = "end", ma = "clippingParents", Mr = "viewport", it = "popper", va = "reference", jn = /* @__PURE__ */ vt.reduce(function(t, e) {
|
|
2991
2935
|
return t.concat([e + "-" + Ge, e + "-" + ut]);
|
|
2992
|
-
}, []),
|
|
2936
|
+
}, []), Or = /* @__PURE__ */ [].concat(vt, [bn]).reduce(function(t, e) {
|
|
2993
2937
|
return t.concat([e, e + "-" + Ge, e + "-" + ut]);
|
|
2994
|
-
}, []),
|
|
2938
|
+
}, []), ga = "beforeRead", ya = "read", ba = "afterRead", wa = "beforeMain", xa = "main", ka = "afterMain", Ma = "beforeWrite", Oa = "write", Ta = "afterWrite", Ea = [ga, ya, ba, wa, xa, ka, Ma, Oa, Ta];
|
|
2995
2939
|
function me(t) {
|
|
2996
2940
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
2997
2941
|
}
|
|
@@ -3018,7 +2962,7 @@ function wn(t) {
|
|
|
3018
2962
|
var e = ee(t).ShadowRoot;
|
|
3019
2963
|
return t instanceof e || t instanceof ShadowRoot;
|
|
3020
2964
|
}
|
|
3021
|
-
function
|
|
2965
|
+
function Aa(t) {
|
|
3022
2966
|
var e = t.state;
|
|
3023
2967
|
Object.keys(e.elements).forEach(function(n) {
|
|
3024
2968
|
var r = e.styles[n] || {}, i = e.attributes[n] || {}, o = e.elements[n];
|
|
@@ -3028,7 +2972,7 @@ function Ia(t) {
|
|
|
3028
2972
|
}));
|
|
3029
2973
|
});
|
|
3030
2974
|
}
|
|
3031
|
-
function
|
|
2975
|
+
function Ca(t) {
|
|
3032
2976
|
var e = t.state, n = {
|
|
3033
2977
|
popper: {
|
|
3034
2978
|
position: e.options.strategy,
|
|
@@ -3052,32 +2996,32 @@ function La(t) {
|
|
|
3052
2996
|
});
|
|
3053
2997
|
};
|
|
3054
2998
|
}
|
|
3055
|
-
const
|
|
2999
|
+
const Tr = {
|
|
3056
3000
|
name: "applyStyles",
|
|
3057
3001
|
enabled: !0,
|
|
3058
3002
|
phase: "write",
|
|
3059
|
-
fn:
|
|
3060
|
-
effect:
|
|
3003
|
+
fn: Aa,
|
|
3004
|
+
effect: Ca,
|
|
3061
3005
|
requires: ["computeStyles"]
|
|
3062
3006
|
};
|
|
3063
3007
|
function he(t) {
|
|
3064
3008
|
return t.split("-")[0];
|
|
3065
3009
|
}
|
|
3066
|
-
var
|
|
3010
|
+
var Be = Math.max, _t = Math.min, Ye = Math.round;
|
|
3067
3011
|
function rn() {
|
|
3068
3012
|
var t = navigator.userAgentData;
|
|
3069
3013
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
3070
3014
|
return e.brand + "/" + e.version;
|
|
3071
3015
|
}).join(" ") : navigator.userAgent;
|
|
3072
3016
|
}
|
|
3073
|
-
function
|
|
3017
|
+
function Er() {
|
|
3074
3018
|
return !/^((?!chrome|android).)*safari/i.test(rn());
|
|
3075
3019
|
}
|
|
3076
3020
|
function Xe(t, e, n) {
|
|
3077
3021
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
3078
3022
|
var r = t.getBoundingClientRect(), i = 1, o = 1;
|
|
3079
3023
|
e && re(t) && (i = t.offsetWidth > 0 && Ye(r.width) / t.offsetWidth || 1, o = t.offsetHeight > 0 && Ye(r.height) / t.offsetHeight || 1);
|
|
3080
|
-
var s = Ne(t) ? ee(t) : window, a = s.visualViewport, l = !
|
|
3024
|
+
var s = Ne(t) ? ee(t) : window, a = s.visualViewport, l = !Er() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / i, u = (r.top + (l && a ? a.offsetTop : 0)) / o, d = r.width / i, f = r.height / o;
|
|
3081
3025
|
return {
|
|
3082
3026
|
width: d,
|
|
3083
3027
|
height: f,
|
|
@@ -3115,10 +3059,10 @@ function Ar(t, e) {
|
|
|
3115
3059
|
function xe(t) {
|
|
3116
3060
|
return ee(t).getComputedStyle(t);
|
|
3117
3061
|
}
|
|
3118
|
-
function
|
|
3062
|
+
function Sa(t) {
|
|
3119
3063
|
return ["table", "td", "th"].indexOf(me(t)) >= 0;
|
|
3120
3064
|
}
|
|
3121
|
-
function
|
|
3065
|
+
function Ae(t) {
|
|
3122
3066
|
return ((Ne(t) ? t.ownerDocument : (
|
|
3123
3067
|
// $FlowFixMe[prop-missing]
|
|
3124
3068
|
t.document
|
|
@@ -3133,14 +3077,14 @@ function zt(t) {
|
|
|
3133
3077
|
t.parentNode || // DOM Element detected
|
|
3134
3078
|
(wn(t) ? t.host : null) || // ShadowRoot detected
|
|
3135
3079
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
3136
|
-
|
|
3080
|
+
Ae(t)
|
|
3137
3081
|
);
|
|
3138
3082
|
}
|
|
3139
3083
|
function _n(t) {
|
|
3140
3084
|
return !re(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
3141
3085
|
xe(t).position === "fixed" ? null : t.offsetParent;
|
|
3142
3086
|
}
|
|
3143
|
-
function
|
|
3087
|
+
function Ia(t) {
|
|
3144
3088
|
var e = /firefox/i.test(rn()), n = /Trident/i.test(rn());
|
|
3145
3089
|
if (n && re(t)) {
|
|
3146
3090
|
var r = xe(t);
|
|
@@ -3157,21 +3101,21 @@ function Da(t) {
|
|
|
3157
3101
|
return null;
|
|
3158
3102
|
}
|
|
3159
3103
|
function gt(t) {
|
|
3160
|
-
for (var e = ee(t), n = _n(t); n &&
|
|
3104
|
+
for (var e = ee(t), n = _n(t); n && Sa(n) && xe(n).position === "static"; )
|
|
3161
3105
|
n = _n(n);
|
|
3162
|
-
return n && (me(n) === "html" || me(n) === "body" && xe(n).position === "static") ? e : n ||
|
|
3106
|
+
return n && (me(n) === "html" || me(n) === "body" && xe(n).position === "static") ? e : n || Ia(t) || e;
|
|
3163
3107
|
}
|
|
3164
3108
|
function kn(t) {
|
|
3165
3109
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
3166
3110
|
}
|
|
3167
3111
|
function ot(t, e, n) {
|
|
3168
|
-
return
|
|
3112
|
+
return Be(t, _t(e, n));
|
|
3169
3113
|
}
|
|
3170
|
-
function
|
|
3114
|
+
function La(t, e, n) {
|
|
3171
3115
|
var r = ot(t, e, n);
|
|
3172
3116
|
return r > n ? n : r;
|
|
3173
3117
|
}
|
|
3174
|
-
function
|
|
3118
|
+
function Cr() {
|
|
3175
3119
|
return {
|
|
3176
3120
|
top: 0,
|
|
3177
3121
|
right: 0,
|
|
@@ -3179,49 +3123,49 @@ function Er() {
|
|
|
3179
3123
|
left: 0
|
|
3180
3124
|
};
|
|
3181
3125
|
}
|
|
3182
|
-
function
|
|
3183
|
-
return Object.assign({},
|
|
3126
|
+
function Sr(t) {
|
|
3127
|
+
return Object.assign({}, Cr(), t);
|
|
3184
3128
|
}
|
|
3185
|
-
function
|
|
3129
|
+
function Ir(t, e) {
|
|
3186
3130
|
return e.reduce(function(n, r) {
|
|
3187
3131
|
return n[r] = t, n;
|
|
3188
3132
|
}, {});
|
|
3189
3133
|
}
|
|
3190
|
-
var
|
|
3134
|
+
var Pa = function(e, n) {
|
|
3191
3135
|
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
3192
3136
|
placement: n.placement
|
|
3193
|
-
})) : e,
|
|
3137
|
+
})) : e, Sr(typeof e != "number" ? e : Ir(e, vt));
|
|
3194
3138
|
};
|
|
3195
|
-
function
|
|
3139
|
+
function Da(t) {
|
|
3196
3140
|
var e, n = t.state, r = t.name, i = t.options, o = n.elements.arrow, s = n.modifiersData.popperOffsets, a = he(n.placement), l = kn(a), c = [q, oe].indexOf(a) >= 0, u = c ? "height" : "width";
|
|
3197
3141
|
if (!(!o || !s)) {
|
|
3198
|
-
var d =
|
|
3199
|
-
n.modifiersData[r] = (e = {}, e[S] =
|
|
3142
|
+
var d = Pa(i.padding, n), f = xn(o), h = l === "y" ? U : q, y = l === "y" ? ie : oe, v = n.rects.reference[u] + n.rects.reference[l] - s[l] - n.rects.popper[u], g = s[l] - n.rects.reference[l], w = gt(o), x = w ? l === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, T = v / 2 - g / 2, p = d[h], O = x - f[u] - d[y], b = x / 2 - f[u] / 2 + T, E = ot(p, b, O), S = l;
|
|
3143
|
+
n.modifiersData[r] = (e = {}, e[S] = E, e.centerOffset = E - b, e);
|
|
3200
3144
|
}
|
|
3201
3145
|
}
|
|
3202
|
-
function
|
|
3146
|
+
function $a(t) {
|
|
3203
3147
|
var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
|
|
3204
3148
|
i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || Ar(e.elements.popper, i) && (e.elements.arrow = i));
|
|
3205
3149
|
}
|
|
3206
|
-
const
|
|
3150
|
+
const Ba = {
|
|
3207
3151
|
name: "arrow",
|
|
3208
3152
|
enabled: !0,
|
|
3209
3153
|
phase: "main",
|
|
3210
|
-
fn:
|
|
3211
|
-
effect:
|
|
3154
|
+
fn: Da,
|
|
3155
|
+
effect: $a,
|
|
3212
3156
|
requires: ["popperOffsets"],
|
|
3213
3157
|
requiresIfExists: ["preventOverflow"]
|
|
3214
3158
|
};
|
|
3215
3159
|
function Je(t) {
|
|
3216
3160
|
return t.split("-")[1];
|
|
3217
3161
|
}
|
|
3218
|
-
var
|
|
3162
|
+
var Ra = {
|
|
3219
3163
|
top: "auto",
|
|
3220
3164
|
right: "auto",
|
|
3221
3165
|
bottom: "auto",
|
|
3222
3166
|
left: "auto"
|
|
3223
3167
|
};
|
|
3224
|
-
function
|
|
3168
|
+
function Na(t, e) {
|
|
3225
3169
|
var n = t.x, r = t.y, i = e.devicePixelRatio || 1;
|
|
3226
3170
|
return {
|
|
3227
3171
|
x: Ye(n * i) / i || 0,
|
|
@@ -3239,12 +3183,12 @@ function Fn(t) {
|
|
|
3239
3183
|
h = g.x, v = g.y;
|
|
3240
3184
|
var w = s.hasOwnProperty("x"), x = s.hasOwnProperty("y"), T = q, p = U, O = window;
|
|
3241
3185
|
if (c) {
|
|
3242
|
-
var b = gt(n),
|
|
3243
|
-
if (b === ee(n) && (b =
|
|
3186
|
+
var b = gt(n), E = "clientHeight", S = "clientWidth";
|
|
3187
|
+
if (b === ee(n) && (b = Ae(n), xe(b).position !== "static" && a === "absolute" && (E = "scrollHeight", S = "scrollWidth")), b = b, i === U || (i === q || i === oe) && o === ut) {
|
|
3244
3188
|
p = ie;
|
|
3245
3189
|
var L = d && b === O && O.visualViewport ? O.visualViewport.height : (
|
|
3246
3190
|
// $FlowFixMe[prop-missing]
|
|
3247
|
-
b[
|
|
3191
|
+
b[E]
|
|
3248
3192
|
);
|
|
3249
3193
|
v -= L - r.height, v *= l ? 1 : -1;
|
|
3250
3194
|
}
|
|
@@ -3257,9 +3201,9 @@ function Fn(t) {
|
|
|
3257
3201
|
h -= P - r.width, h *= l ? 1 : -1;
|
|
3258
3202
|
}
|
|
3259
3203
|
}
|
|
3260
|
-
var
|
|
3204
|
+
var B = Object.assign({
|
|
3261
3205
|
position: a
|
|
3262
|
-
}, c &&
|
|
3206
|
+
}, c && Ra), D = u === !0 ? Na({
|
|
3263
3207
|
x: h,
|
|
3264
3208
|
y: v
|
|
3265
3209
|
}, ee(n)) : {
|
|
@@ -3268,11 +3212,11 @@ function Fn(t) {
|
|
|
3268
3212
|
};
|
|
3269
3213
|
if (h = D.x, v = D.y, l) {
|
|
3270
3214
|
var I;
|
|
3271
|
-
return Object.assign({},
|
|
3215
|
+
return Object.assign({}, B, (I = {}, I[p] = x ? "0" : "", I[T] = w ? "0" : "", I.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", I));
|
|
3272
3216
|
}
|
|
3273
|
-
return Object.assign({},
|
|
3217
|
+
return Object.assign({}, B, (e = {}, e[p] = x ? v + "px" : "", e[T] = w ? h + "px" : "", e.transform = "", e));
|
|
3274
3218
|
}
|
|
3275
|
-
function
|
|
3219
|
+
function Ha(t) {
|
|
3276
3220
|
var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, o = n.adaptive, s = o === void 0 ? !0 : o, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
3277
3221
|
placement: he(e.placement),
|
|
3278
3222
|
variation: Je(e.placement),
|
|
@@ -3295,17 +3239,17 @@ function Fa(t) {
|
|
|
3295
3239
|
"data-popper-placement": e.placement
|
|
3296
3240
|
});
|
|
3297
3241
|
}
|
|
3298
|
-
const
|
|
3242
|
+
const ja = {
|
|
3299
3243
|
name: "computeStyles",
|
|
3300
3244
|
enabled: !0,
|
|
3301
3245
|
phase: "beforeWrite",
|
|
3302
|
-
fn:
|
|
3246
|
+
fn: Ha,
|
|
3303
3247
|
data: {}
|
|
3304
3248
|
};
|
|
3305
3249
|
var Pt = {
|
|
3306
3250
|
passive: !0
|
|
3307
3251
|
};
|
|
3308
|
-
function
|
|
3252
|
+
function _a(t) {
|
|
3309
3253
|
var e = t.state, n = t.instance, r = t.options, i = r.scroll, o = i === void 0 ? !0 : i, s = r.resize, a = s === void 0 ? !0 : s, l = ee(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
3310
3254
|
return o && c.forEach(function(u) {
|
|
3311
3255
|
u.addEventListener("scroll", n.update, Pt);
|
|
@@ -3315,16 +3259,16 @@ function Wa(t) {
|
|
|
3315
3259
|
}), a && l.removeEventListener("resize", n.update, Pt);
|
|
3316
3260
|
};
|
|
3317
3261
|
}
|
|
3318
|
-
const
|
|
3262
|
+
const Fa = {
|
|
3319
3263
|
name: "eventListeners",
|
|
3320
3264
|
enabled: !0,
|
|
3321
3265
|
phase: "write",
|
|
3322
3266
|
fn: function() {
|
|
3323
3267
|
},
|
|
3324
|
-
effect:
|
|
3268
|
+
effect: _a,
|
|
3325
3269
|
data: {}
|
|
3326
3270
|
};
|
|
3327
|
-
var
|
|
3271
|
+
var Va = {
|
|
3328
3272
|
left: "right",
|
|
3329
3273
|
right: "left",
|
|
3330
3274
|
bottom: "top",
|
|
@@ -3332,16 +3276,16 @@ var Ka = {
|
|
|
3332
3276
|
};
|
|
3333
3277
|
function Nt(t) {
|
|
3334
3278
|
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
3335
|
-
return
|
|
3279
|
+
return Va[e];
|
|
3336
3280
|
});
|
|
3337
3281
|
}
|
|
3338
|
-
var
|
|
3282
|
+
var Wa = {
|
|
3339
3283
|
start: "end",
|
|
3340
3284
|
end: "start"
|
|
3341
3285
|
};
|
|
3342
3286
|
function Vn(t) {
|
|
3343
3287
|
return t.replace(/start|end/g, function(e) {
|
|
3344
|
-
return
|
|
3288
|
+
return Wa[e];
|
|
3345
3289
|
});
|
|
3346
3290
|
}
|
|
3347
3291
|
function Mn(t) {
|
|
@@ -3352,13 +3296,13 @@ function Mn(t) {
|
|
|
3352
3296
|
};
|
|
3353
3297
|
}
|
|
3354
3298
|
function On(t) {
|
|
3355
|
-
return Xe(
|
|
3299
|
+
return Xe(Ae(t)).left + Mn(t).scrollLeft;
|
|
3356
3300
|
}
|
|
3357
|
-
function
|
|
3358
|
-
var n = ee(t), r =
|
|
3301
|
+
function za(t, e) {
|
|
3302
|
+
var n = ee(t), r = Ae(t), i = n.visualViewport, o = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
|
|
3359
3303
|
if (i) {
|
|
3360
3304
|
o = i.width, s = i.height;
|
|
3361
|
-
var c =
|
|
3305
|
+
var c = Er();
|
|
3362
3306
|
(c || !c && e === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
|
|
3363
3307
|
}
|
|
3364
3308
|
return {
|
|
@@ -3368,9 +3312,9 @@ function qa(t, e) {
|
|
|
3368
3312
|
y: l
|
|
3369
3313
|
};
|
|
3370
3314
|
}
|
|
3371
|
-
function
|
|
3372
|
-
var e, n =
|
|
3373
|
-
return xe(i || n).direction === "rtl" && (a +=
|
|
3315
|
+
function Ka(t) {
|
|
3316
|
+
var e, n = Ae(t), r = Mn(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, o = Be(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), s = Be(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), a = -r.scrollLeft + On(t), l = -r.scrollTop;
|
|
3317
|
+
return xe(i || n).direction === "rtl" && (a += Be(n.clientWidth, i ? i.clientWidth : 0) - o), {
|
|
3374
3318
|
width: o,
|
|
3375
3319
|
height: s,
|
|
3376
3320
|
x: a,
|
|
@@ -3381,13 +3325,13 @@ function Tn(t) {
|
|
|
3381
3325
|
var e = xe(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
|
|
3382
3326
|
return /auto|scroll|overlay|hidden/.test(n + i + r);
|
|
3383
3327
|
}
|
|
3384
|
-
function
|
|
3385
|
-
return ["html", "body", "#document"].indexOf(me(t)) >= 0 ? t.ownerDocument.body : re(t) && Tn(t) ? t :
|
|
3328
|
+
function Lr(t) {
|
|
3329
|
+
return ["html", "body", "#document"].indexOf(me(t)) >= 0 ? t.ownerDocument.body : re(t) && Tn(t) ? t : Lr(zt(t));
|
|
3386
3330
|
}
|
|
3387
3331
|
function st(t, e) {
|
|
3388
3332
|
var n;
|
|
3389
3333
|
e === void 0 && (e = []);
|
|
3390
|
-
var r =
|
|
3334
|
+
var r = Lr(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), o = ee(r), s = i ? [o].concat(o.visualViewport || [], Tn(r) ? r : []) : r, a = e.concat(s);
|
|
3391
3335
|
return i ? a : (
|
|
3392
3336
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
3393
3337
|
a.concat(st(zt(s)))
|
|
@@ -3401,27 +3345,27 @@ function on(t) {
|
|
|
3401
3345
|
bottom: t.y + t.height
|
|
3402
3346
|
});
|
|
3403
3347
|
}
|
|
3404
|
-
function
|
|
3348
|
+
function Ua(t, e) {
|
|
3405
3349
|
var n = Xe(t, !1, e === "fixed");
|
|
3406
3350
|
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
3407
3351
|
}
|
|
3408
3352
|
function Wn(t, e, n) {
|
|
3409
|
-
return e ===
|
|
3353
|
+
return e === Mr ? on(za(t, n)) : Ne(e) ? Ua(e, n) : on(Ka(Ae(t)));
|
|
3410
3354
|
}
|
|
3411
|
-
function
|
|
3355
|
+
function qa(t) {
|
|
3412
3356
|
var e = st(zt(t)), n = ["absolute", "fixed"].indexOf(xe(t).position) >= 0, r = n && re(t) ? gt(t) : t;
|
|
3413
3357
|
return Ne(r) ? e.filter(function(i) {
|
|
3414
3358
|
return Ne(i) && Ar(i, r) && me(i) !== "body";
|
|
3415
3359
|
}) : [];
|
|
3416
3360
|
}
|
|
3417
|
-
function
|
|
3418
|
-
var i = e === "clippingParents" ?
|
|
3361
|
+
function Ga(t, e, n, r) {
|
|
3362
|
+
var i = e === "clippingParents" ? qa(t) : [].concat(e), o = [].concat(i, [n]), s = o[0], a = o.reduce(function(l, c) {
|
|
3419
3363
|
var u = Wn(t, c, r);
|
|
3420
|
-
return l.top =
|
|
3364
|
+
return l.top = Be(u.top, l.top), l.right = _t(u.right, l.right), l.bottom = _t(u.bottom, l.bottom), l.left = Be(u.left, l.left), l;
|
|
3421
3365
|
}, Wn(t, s, r));
|
|
3422
3366
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
3423
3367
|
}
|
|
3424
|
-
function
|
|
3368
|
+
function Pr(t) {
|
|
3425
3369
|
var e = t.reference, n = t.element, r = t.placement, i = r ? he(r) : null, o = r ? Je(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
|
|
3426
3370
|
switch (i) {
|
|
3427
3371
|
case U:
|
|
@@ -3470,18 +3414,18 @@ function Lr(t) {
|
|
|
3470
3414
|
}
|
|
3471
3415
|
function dt(t, e) {
|
|
3472
3416
|
e === void 0 && (e = {});
|
|
3473
|
-
var n = e, r = n.placement, i = r === void 0 ? t.placement : r, o = n.strategy, s = o === void 0 ? t.strategy : o, a = n.boundary, l = a === void 0 ?
|
|
3417
|
+
var n = e, r = n.placement, i = r === void 0 ? t.placement : r, o = n.strategy, s = o === void 0 ? t.strategy : o, a = n.boundary, l = a === void 0 ? ma : a, c = n.rootBoundary, u = c === void 0 ? Mr : c, d = n.elementContext, f = d === void 0 ? it : d, h = n.altBoundary, y = h === void 0 ? !1 : h, v = n.padding, g = v === void 0 ? 0 : v, w = Sr(typeof g != "number" ? g : Ir(g, vt)), x = f === it ? va : it, T = t.rects.popper, p = t.elements[y ? x : f], O = Ga(Ne(p) ? p : p.contextElement || Ae(t.elements.popper), l, u, s), b = Xe(t.elements.reference), E = Pr({
|
|
3474
3418
|
reference: b,
|
|
3475
3419
|
element: T,
|
|
3476
3420
|
placement: i
|
|
3477
|
-
}), S = on(Object.assign({}, T,
|
|
3421
|
+
}), S = on(Object.assign({}, T, E)), L = f === it ? S : b, P = {
|
|
3478
3422
|
top: O.top - L.top + w.top,
|
|
3479
3423
|
bottom: L.bottom - O.bottom + w.bottom,
|
|
3480
3424
|
left: O.left - L.left + w.left,
|
|
3481
3425
|
right: L.right - O.right + w.right
|
|
3482
|
-
},
|
|
3483
|
-
if (f === it &&
|
|
3484
|
-
var D =
|
|
3426
|
+
}, B = t.modifiersData.offset;
|
|
3427
|
+
if (f === it && B) {
|
|
3428
|
+
var D = B[i];
|
|
3485
3429
|
Object.keys(P).forEach(function(I) {
|
|
3486
3430
|
var J = [oe, ie].indexOf(I) >= 0 ? 1 : -1, Z = [U, ie].indexOf(I) >= 0 ? "y" : "x";
|
|
3487
3431
|
P[I] += D[Z] * J;
|
|
@@ -3489,9 +3433,9 @@ function dt(t, e) {
|
|
|
3489
3433
|
}
|
|
3490
3434
|
return P;
|
|
3491
3435
|
}
|
|
3492
|
-
function
|
|
3436
|
+
function Ya(t, e) {
|
|
3493
3437
|
e === void 0 && (e = {});
|
|
3494
|
-
var n = e, r = n.placement, i = n.boundary, o = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ?
|
|
3438
|
+
var n = e, r = n.placement, i = n.boundary, o = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? Or : l, u = Je(r), d = u ? a ? jn : jn.filter(function(y) {
|
|
3495
3439
|
return Je(y) === u;
|
|
3496
3440
|
}) : vt, f = d.filter(function(y) {
|
|
3497
3441
|
return c.indexOf(y) >= 0;
|
|
@@ -3509,17 +3453,17 @@ function Za(t, e) {
|
|
|
3509
3453
|
return h[y] - h[v];
|
|
3510
3454
|
});
|
|
3511
3455
|
}
|
|
3512
|
-
function
|
|
3456
|
+
function Xa(t) {
|
|
3513
3457
|
if (he(t) === bn)
|
|
3514
3458
|
return [];
|
|
3515
3459
|
var e = Nt(t);
|
|
3516
3460
|
return [Vn(t), e, Vn(e)];
|
|
3517
3461
|
}
|
|
3518
|
-
function
|
|
3462
|
+
function Ja(t) {
|
|
3519
3463
|
var e = t.state, n = t.options, r = t.name;
|
|
3520
3464
|
if (!e.modifiersData[r]._skip) {
|
|
3521
|
-
for (var i = n.mainAxis, o = i === void 0 ? !0 : i, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, u = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, y = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, g = e.options.placement, w = he(g), x = w === g, T = l || (x || !y ? [Nt(g)] :
|
|
3522
|
-
return ve.concat(he(se) === bn ?
|
|
3465
|
+
for (var i = n.mainAxis, o = i === void 0 ? !0 : i, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, u = n.boundary, d = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, y = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, g = e.options.placement, w = he(g), x = w === g, T = l || (x || !y ? [Nt(g)] : Xa(g)), p = [g].concat(T).reduce(function(ve, se) {
|
|
3466
|
+
return ve.concat(he(se) === bn ? Ya(e, {
|
|
3523
3467
|
placement: se,
|
|
3524
3468
|
boundary: u,
|
|
3525
3469
|
rootBoundary: d,
|
|
@@ -3527,9 +3471,9 @@ function el(t) {
|
|
|
3527
3471
|
flipVariations: y,
|
|
3528
3472
|
allowedAutoPlacements: v
|
|
3529
3473
|
}) : se);
|
|
3530
|
-
}, []), O = e.rects.reference, b = e.rects.popper,
|
|
3531
|
-
var
|
|
3532
|
-
placement:
|
|
3474
|
+
}, []), O = e.rects.reference, b = e.rects.popper, E = /* @__PURE__ */ new Map(), S = !0, L = p[0], P = 0; P < p.length; P++) {
|
|
3475
|
+
var B = p[P], D = he(B), I = Je(B) === Ge, J = [U, ie].indexOf(D) >= 0, Z = J ? "width" : "height", j = dt(e, {
|
|
3476
|
+
placement: B,
|
|
3533
3477
|
boundary: u,
|
|
3534
3478
|
rootBoundary: d,
|
|
3535
3479
|
altBoundary: f,
|
|
@@ -3540,15 +3484,15 @@ function el(t) {
|
|
|
3540
3484
|
if (o && ce.push(j[D] <= 0), a && ce.push(j[_] <= 0, j[H] <= 0), ce.every(function(ve) {
|
|
3541
3485
|
return ve;
|
|
3542
3486
|
})) {
|
|
3543
|
-
L =
|
|
3487
|
+
L = B, S = !1;
|
|
3544
3488
|
break;
|
|
3545
3489
|
}
|
|
3546
|
-
|
|
3490
|
+
E.set(B, ce);
|
|
3547
3491
|
}
|
|
3548
3492
|
if (S)
|
|
3549
3493
|
for (var ue = y ? 3 : 1, Ce = function(se) {
|
|
3550
3494
|
var ge = p.find(function(je) {
|
|
3551
|
-
var ye =
|
|
3495
|
+
var ye = E.get(je);
|
|
3552
3496
|
if (ye)
|
|
3553
3497
|
return ye.slice(0, se).every(function(_e) {
|
|
3554
3498
|
return _e;
|
|
@@ -3563,11 +3507,11 @@ function el(t) {
|
|
|
3563
3507
|
e.placement !== L && (e.modifiersData[r]._skip = !0, e.placement = L, e.reset = !0);
|
|
3564
3508
|
}
|
|
3565
3509
|
}
|
|
3566
|
-
const
|
|
3510
|
+
const Za = {
|
|
3567
3511
|
name: "flip",
|
|
3568
3512
|
enabled: !0,
|
|
3569
3513
|
phase: "main",
|
|
3570
|
-
fn:
|
|
3514
|
+
fn: Ja,
|
|
3571
3515
|
requiresIfExists: ["offset"],
|
|
3572
3516
|
data: {
|
|
3573
3517
|
_skip: !1
|
|
@@ -3589,7 +3533,7 @@ function Kn(t) {
|
|
|
3589
3533
|
return t[e] >= 0;
|
|
3590
3534
|
});
|
|
3591
3535
|
}
|
|
3592
|
-
function
|
|
3536
|
+
function Qa(t) {
|
|
3593
3537
|
var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, o = e.modifiersData.preventOverflow, s = dt(e, {
|
|
3594
3538
|
elementContext: "reference"
|
|
3595
3539
|
}), a = dt(e, {
|
|
@@ -3605,14 +3549,14 @@ function nl(t) {
|
|
|
3605
3549
|
"data-popper-escaped": d
|
|
3606
3550
|
});
|
|
3607
3551
|
}
|
|
3608
|
-
const
|
|
3552
|
+
const el = {
|
|
3609
3553
|
name: "hide",
|
|
3610
3554
|
enabled: !0,
|
|
3611
3555
|
phase: "main",
|
|
3612
3556
|
requiresIfExists: ["preventOverflow"],
|
|
3613
|
-
fn:
|
|
3557
|
+
fn: Qa
|
|
3614
3558
|
};
|
|
3615
|
-
function
|
|
3559
|
+
function tl(t, e, n) {
|
|
3616
3560
|
var r = he(t), i = [q, U].indexOf(r) >= 0 ? -1 : 1, o = typeof n == "function" ? n(Object.assign({}, e, {
|
|
3617
3561
|
placement: t
|
|
3618
3562
|
})) : n, s = o[0], a = o[1];
|
|
@@ -3624,44 +3568,44 @@ function il(t, e, n) {
|
|
|
3624
3568
|
y: a
|
|
3625
3569
|
};
|
|
3626
3570
|
}
|
|
3627
|
-
function
|
|
3628
|
-
var e = t.state, n = t.options, r = t.name, i = n.offset, o = i === void 0 ? [0, 0] : i, s =
|
|
3629
|
-
return u[d] =
|
|
3571
|
+
function nl(t) {
|
|
3572
|
+
var e = t.state, n = t.options, r = t.name, i = n.offset, o = i === void 0 ? [0, 0] : i, s = Or.reduce(function(u, d) {
|
|
3573
|
+
return u[d] = tl(d, e.rects, o), u;
|
|
3630
3574
|
}, {}), a = s[e.placement], l = a.x, c = a.y;
|
|
3631
3575
|
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
|
|
3632
3576
|
}
|
|
3633
|
-
const
|
|
3577
|
+
const rl = {
|
|
3634
3578
|
name: "offset",
|
|
3635
3579
|
enabled: !0,
|
|
3636
3580
|
phase: "main",
|
|
3637
3581
|
requires: ["popperOffsets"],
|
|
3638
|
-
fn:
|
|
3582
|
+
fn: nl
|
|
3639
3583
|
};
|
|
3640
|
-
function
|
|
3584
|
+
function il(t) {
|
|
3641
3585
|
var e = t.state, n = t.name;
|
|
3642
|
-
e.modifiersData[n] =
|
|
3586
|
+
e.modifiersData[n] = Pr({
|
|
3643
3587
|
reference: e.rects.reference,
|
|
3644
3588
|
element: e.rects.popper,
|
|
3645
3589
|
placement: e.placement
|
|
3646
3590
|
});
|
|
3647
3591
|
}
|
|
3648
|
-
const
|
|
3592
|
+
const ol = {
|
|
3649
3593
|
name: "popperOffsets",
|
|
3650
3594
|
enabled: !0,
|
|
3651
3595
|
phase: "read",
|
|
3652
|
-
fn:
|
|
3596
|
+
fn: il,
|
|
3653
3597
|
data: {}
|
|
3654
3598
|
};
|
|
3655
|
-
function
|
|
3599
|
+
function sl(t) {
|
|
3656
3600
|
return t === "x" ? "y" : "x";
|
|
3657
3601
|
}
|
|
3658
|
-
function
|
|
3602
|
+
function al(t) {
|
|
3659
3603
|
var e = t.state, n = t.options, r = t.name, i = n.mainAxis, o = i === void 0 ? !0 : i, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, u = n.altBoundary, d = n.padding, f = n.tether, h = f === void 0 ? !0 : f, y = n.tetherOffset, v = y === void 0 ? 0 : y, g = dt(e, {
|
|
3660
3604
|
boundary: l,
|
|
3661
3605
|
rootBoundary: c,
|
|
3662
3606
|
padding: d,
|
|
3663
3607
|
altBoundary: u
|
|
3664
|
-
}), w = he(e.placement), x = Je(e.placement), T = !x, p = kn(w), O =
|
|
3608
|
+
}), w = he(e.placement), x = Je(e.placement), T = !x, p = kn(w), O = sl(p), b = e.modifiersData.popperOffsets, E = e.rects.reference, S = e.rects.popper, L = typeof v == "function" ? v(Object.assign({}, e.rects, {
|
|
3665
3609
|
placement: e.placement
|
|
3666
3610
|
})) : v, P = typeof L == "number" ? {
|
|
3667
3611
|
mainAxis: L,
|
|
@@ -3669,48 +3613,48 @@ function ul(t) {
|
|
|
3669
3613
|
} : Object.assign({
|
|
3670
3614
|
mainAxis: 0,
|
|
3671
3615
|
altAxis: 0
|
|
3672
|
-
}, L),
|
|
3616
|
+
}, L), B = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, D = {
|
|
3673
3617
|
x: 0,
|
|
3674
3618
|
y: 0
|
|
3675
3619
|
};
|
|
3676
3620
|
if (b) {
|
|
3677
3621
|
if (o) {
|
|
3678
|
-
var I, J = p === "y" ? U : q, Z = p === "y" ? ie : oe, j = p === "y" ? "height" : "width", _ = b[p], H = _ + g[J], ce = _ - g[Z], ue = h ? -S[j] / 2 : 0, Ce = x === Ge ?
|
|
3622
|
+
var I, J = p === "y" ? U : q, Z = p === "y" ? ie : oe, j = p === "y" ? "height" : "width", _ = b[p], H = _ + g[J], ce = _ - g[Z], ue = h ? -S[j] / 2 : 0, Ce = x === Ge ? E[j] : S[j], de = x === Ge ? -S[j] : -E[j], Se = e.elements.arrow, ve = h && Se ? xn(Se) : {
|
|
3679
3623
|
width: 0,
|
|
3680
3624
|
height: 0
|
|
3681
|
-
}, se = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding :
|
|
3625
|
+
}, se = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Cr(), ge = se[J], je = se[Z], ye = ot(0, E[j], ve[j]), _e = T ? E[j] / 2 - ue - ye - ge - P.mainAxis : Ce - ye - ge - P.mainAxis, ke = T ? -E[j] / 2 + ue + ye + je + P.mainAxis : de + ye + je + P.mainAxis, Fe = e.elements.arrow && gt(e.elements.arrow), yt = Fe ? p === "y" ? Fe.clientTop || 0 : Fe.clientLeft || 0 : 0, Qe = (I = B == null ? void 0 : B[p]) != null ? I : 0, bt = _ + _e - Qe - yt, wt = _ + ke - Qe, et = ot(h ? _t(H, bt) : H, _, h ? Be(ce, wt) : ce);
|
|
3682
3626
|
b[p] = et, D[p] = et - _;
|
|
3683
3627
|
}
|
|
3684
3628
|
if (a) {
|
|
3685
|
-
var tt, xt = p === "x" ? U : q, kt = p === "x" ? ie : oe, be = b[O], Me = O === "y" ? "height" : "width", nt = be + g[xt], Ie = be - g[kt], rt = [U, q].indexOf(w) !== -1, Mt = (tt =
|
|
3686
|
-
b[O] =
|
|
3629
|
+
var tt, xt = p === "x" ? U : q, kt = p === "x" ? ie : oe, be = b[O], Me = O === "y" ? "height" : "width", nt = be + g[xt], Ie = be - g[kt], rt = [U, q].indexOf(w) !== -1, Mt = (tt = B == null ? void 0 : B[O]) != null ? tt : 0, Ot = rt ? nt : be - E[Me] - S[Me] - Mt + P.altAxis, Tt = rt ? be + E[Me] + S[Me] - Mt - P.altAxis : Ie, Et = h && rt ? La(Ot, be, Tt) : ot(h ? Ot : nt, be, h ? Tt : Ie);
|
|
3630
|
+
b[O] = Et, D[O] = Et - be;
|
|
3687
3631
|
}
|
|
3688
3632
|
e.modifiersData[r] = D;
|
|
3689
3633
|
}
|
|
3690
3634
|
}
|
|
3691
|
-
const
|
|
3635
|
+
const ll = {
|
|
3692
3636
|
name: "preventOverflow",
|
|
3693
3637
|
enabled: !0,
|
|
3694
3638
|
phase: "main",
|
|
3695
|
-
fn:
|
|
3639
|
+
fn: al,
|
|
3696
3640
|
requiresIfExists: ["offset"]
|
|
3697
3641
|
};
|
|
3698
|
-
function
|
|
3642
|
+
function cl(t) {
|
|
3699
3643
|
return {
|
|
3700
3644
|
scrollLeft: t.scrollLeft,
|
|
3701
3645
|
scrollTop: t.scrollTop
|
|
3702
3646
|
};
|
|
3703
3647
|
}
|
|
3704
|
-
function
|
|
3705
|
-
return t === ee(t) || !re(t) ? Mn(t) :
|
|
3648
|
+
function ul(t) {
|
|
3649
|
+
return t === ee(t) || !re(t) ? Mn(t) : cl(t);
|
|
3706
3650
|
}
|
|
3707
|
-
function
|
|
3651
|
+
function dl(t) {
|
|
3708
3652
|
var e = t.getBoundingClientRect(), n = Ye(e.width) / t.offsetWidth || 1, r = Ye(e.height) / t.offsetHeight || 1;
|
|
3709
3653
|
return n !== 1 || r !== 1;
|
|
3710
3654
|
}
|
|
3711
|
-
function
|
|
3655
|
+
function pl(t, e, n) {
|
|
3712
3656
|
n === void 0 && (n = !1);
|
|
3713
|
-
var r = re(e), i = re(e) &&
|
|
3657
|
+
var r = re(e), i = re(e) && dl(e), o = Ae(e), s = Xe(t, i, n), a = {
|
|
3714
3658
|
scrollLeft: 0,
|
|
3715
3659
|
scrollTop: 0
|
|
3716
3660
|
}, l = {
|
|
@@ -3718,14 +3662,14 @@ function ml(t, e, n) {
|
|
|
3718
3662
|
y: 0
|
|
3719
3663
|
};
|
|
3720
3664
|
return (r || !r && !n) && ((me(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
3721
|
-
Tn(o)) && (a =
|
|
3665
|
+
Tn(o)) && (a = ul(e)), re(e) ? (l = Xe(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : o && (l.x = On(o))), {
|
|
3722
3666
|
x: s.left + a.scrollLeft - l.x,
|
|
3723
3667
|
y: s.top + a.scrollTop - l.y,
|
|
3724
3668
|
width: s.width,
|
|
3725
3669
|
height: s.height
|
|
3726
3670
|
};
|
|
3727
3671
|
}
|
|
3728
|
-
function
|
|
3672
|
+
function fl(t) {
|
|
3729
3673
|
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
3730
3674
|
t.forEach(function(o) {
|
|
3731
3675
|
e.set(o.name, o);
|
|
@@ -3744,15 +3688,15 @@ function vl(t) {
|
|
|
3744
3688
|
n.has(o.name) || i(o);
|
|
3745
3689
|
}), r;
|
|
3746
3690
|
}
|
|
3747
|
-
function
|
|
3748
|
-
var e =
|
|
3749
|
-
return
|
|
3691
|
+
function hl(t) {
|
|
3692
|
+
var e = fl(t);
|
|
3693
|
+
return Ea.reduce(function(n, r) {
|
|
3750
3694
|
return n.concat(e.filter(function(i) {
|
|
3751
3695
|
return i.phase === r;
|
|
3752
3696
|
}));
|
|
3753
3697
|
}, []);
|
|
3754
3698
|
}
|
|
3755
|
-
function
|
|
3699
|
+
function ml(t) {
|
|
3756
3700
|
var e;
|
|
3757
3701
|
return function() {
|
|
3758
3702
|
return e || (e = new Promise(function(n) {
|
|
@@ -3762,7 +3706,7 @@ function yl(t) {
|
|
|
3762
3706
|
})), e;
|
|
3763
3707
|
};
|
|
3764
3708
|
}
|
|
3765
|
-
function
|
|
3709
|
+
function vl(t) {
|
|
3766
3710
|
var e = t.reduce(function(n, r) {
|
|
3767
3711
|
var i = n[r.name];
|
|
3768
3712
|
return n[r.name] = i ? Object.assign({}, i, r, {
|
|
@@ -3786,7 +3730,7 @@ function qn() {
|
|
|
3786
3730
|
return !(r && typeof r.getBoundingClientRect == "function");
|
|
3787
3731
|
});
|
|
3788
3732
|
}
|
|
3789
|
-
function
|
|
3733
|
+
function gl(t) {
|
|
3790
3734
|
t === void 0 && (t = {});
|
|
3791
3735
|
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, o = i === void 0 ? Un : i;
|
|
3792
3736
|
return function(a, l, c) {
|
|
@@ -3810,7 +3754,7 @@ function wl(t) {
|
|
|
3810
3754
|
reference: Ne(a) ? st(a) : a.contextElement ? st(a.contextElement) : [],
|
|
3811
3755
|
popper: st(l)
|
|
3812
3756
|
};
|
|
3813
|
-
var T =
|
|
3757
|
+
var T = hl(vl([].concat(r, u.options.modifiers)));
|
|
3814
3758
|
return u.orderedModifiers = T.filter(function(p) {
|
|
3815
3759
|
return p.enabled;
|
|
3816
3760
|
}), y(), h.update();
|
|
@@ -3825,7 +3769,7 @@ function wl(t) {
|
|
|
3825
3769
|
var w = u.elements, x = w.reference, T = w.popper;
|
|
3826
3770
|
if (qn(x, T)) {
|
|
3827
3771
|
u.rects = {
|
|
3828
|
-
reference:
|
|
3772
|
+
reference: pl(x, gt(T), u.options.strategy === "fixed"),
|
|
3829
3773
|
popper: xn(T)
|
|
3830
3774
|
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(P) {
|
|
3831
3775
|
return u.modifiersData[P.name] = Object.assign({}, P.data);
|
|
@@ -3835,7 +3779,7 @@ function wl(t) {
|
|
|
3835
3779
|
u.reset = !1, p = -1;
|
|
3836
3780
|
continue;
|
|
3837
3781
|
}
|
|
3838
|
-
var O = u.orderedModifiers[p], b = O.fn,
|
|
3782
|
+
var O = u.orderedModifiers[p], b = O.fn, E = O.options, S = E === void 0 ? {} : E, L = O.name;
|
|
3839
3783
|
typeof b == "function" && (u = b({
|
|
3840
3784
|
state: u,
|
|
3841
3785
|
options: S,
|
|
@@ -3848,7 +3792,7 @@ function wl(t) {
|
|
|
3848
3792
|
},
|
|
3849
3793
|
// Async and optimistically optimized update – it will not be executed if
|
|
3850
3794
|
// not necessary (debounced to run at most once-per-tick)
|
|
3851
|
-
update:
|
|
3795
|
+
update: ml(function() {
|
|
3852
3796
|
return new Promise(function(g) {
|
|
3853
3797
|
h.forceUpdate(), g(u);
|
|
3854
3798
|
});
|
|
@@ -3885,15 +3829,15 @@ function wl(t) {
|
|
|
3885
3829
|
return h;
|
|
3886
3830
|
};
|
|
3887
3831
|
}
|
|
3888
|
-
var
|
|
3889
|
-
defaultModifiers:
|
|
3890
|
-
}),
|
|
3832
|
+
var yl = [Fa, ol, ja, Tr, rl, Za, ll, Ba, el], bl = /* @__PURE__ */ gl({
|
|
3833
|
+
defaultModifiers: yl
|
|
3834
|
+
}), wl = "tippy-box", Dr = "tippy-content", xl = "tippy-backdrop", $r = "tippy-arrow", Br = "tippy-svg-arrow", Pe = {
|
|
3891
3835
|
passive: !0,
|
|
3892
3836
|
capture: !0
|
|
3893
3837
|
}, Rr = function() {
|
|
3894
3838
|
return document.body;
|
|
3895
3839
|
};
|
|
3896
|
-
function
|
|
3840
|
+
function kl(t, e) {
|
|
3897
3841
|
return {}.hasOwnProperty.call(t, e);
|
|
3898
3842
|
}
|
|
3899
3843
|
function Zt(t, e, n) {
|
|
@@ -3903,11 +3847,11 @@ function Zt(t, e, n) {
|
|
|
3903
3847
|
}
|
|
3904
3848
|
return t;
|
|
3905
3849
|
}
|
|
3906
|
-
function
|
|
3850
|
+
function En(t, e) {
|
|
3907
3851
|
var n = {}.toString.call(t);
|
|
3908
3852
|
return n.indexOf("[object") === 0 && n.indexOf(e + "]") > -1;
|
|
3909
3853
|
}
|
|
3910
|
-
function
|
|
3854
|
+
function Nr(t, e) {
|
|
3911
3855
|
return typeof t == "function" ? t.apply(void 0, e) : t;
|
|
3912
3856
|
}
|
|
3913
3857
|
function Gn(t, e) {
|
|
@@ -3920,13 +3864,13 @@ function Gn(t, e) {
|
|
|
3920
3864
|
}, e);
|
|
3921
3865
|
};
|
|
3922
3866
|
}
|
|
3923
|
-
function
|
|
3867
|
+
function Ml(t, e) {
|
|
3924
3868
|
var n = Object.assign({}, t);
|
|
3925
3869
|
return e.forEach(function(r) {
|
|
3926
3870
|
delete n[r];
|
|
3927
3871
|
}), n;
|
|
3928
3872
|
}
|
|
3929
|
-
function
|
|
3873
|
+
function Ol(t) {
|
|
3930
3874
|
return t.split(/\s+/).filter(Boolean);
|
|
3931
3875
|
}
|
|
3932
3876
|
function Ke(t) {
|
|
@@ -3935,12 +3879,12 @@ function Ke(t) {
|
|
|
3935
3879
|
function Yn(t, e) {
|
|
3936
3880
|
t.indexOf(e) === -1 && t.push(e);
|
|
3937
3881
|
}
|
|
3938
|
-
function
|
|
3882
|
+
function Tl(t) {
|
|
3939
3883
|
return t.filter(function(e, n) {
|
|
3940
3884
|
return t.indexOf(e) === n;
|
|
3941
3885
|
});
|
|
3942
3886
|
}
|
|
3943
|
-
function
|
|
3887
|
+
function El(t) {
|
|
3944
3888
|
return t.split("-")[0];
|
|
3945
3889
|
}
|
|
3946
3890
|
function Ft(t) {
|
|
@@ -3956,20 +3900,20 @@ function at() {
|
|
|
3956
3900
|
}
|
|
3957
3901
|
function pt(t) {
|
|
3958
3902
|
return ["Element", "Fragment"].some(function(e) {
|
|
3959
|
-
return
|
|
3903
|
+
return En(t, e);
|
|
3960
3904
|
});
|
|
3961
3905
|
}
|
|
3962
|
-
function
|
|
3963
|
-
return
|
|
3906
|
+
function Al(t) {
|
|
3907
|
+
return En(t, "NodeList");
|
|
3964
3908
|
}
|
|
3965
|
-
function
|
|
3966
|
-
return
|
|
3909
|
+
function Cl(t) {
|
|
3910
|
+
return En(t, "MouseEvent");
|
|
3967
3911
|
}
|
|
3968
|
-
function
|
|
3912
|
+
function Sl(t) {
|
|
3969
3913
|
return !!(t && t._tippy && t._tippy.reference === t);
|
|
3970
3914
|
}
|
|
3971
|
-
function
|
|
3972
|
-
return pt(t) ? [t] :
|
|
3915
|
+
function Il(t) {
|
|
3916
|
+
return pt(t) ? [t] : Al(t) ? Ft(t) : Array.isArray(t) ? t : Ft(document.querySelectorAll(t));
|
|
3973
3917
|
}
|
|
3974
3918
|
function Qt(t, e) {
|
|
3975
3919
|
t.forEach(function(n) {
|
|
@@ -3981,14 +3925,14 @@ function Jn(t, e) {
|
|
|
3981
3925
|
n && n.setAttribute("data-state", e);
|
|
3982
3926
|
});
|
|
3983
3927
|
}
|
|
3984
|
-
function
|
|
3928
|
+
function Ll(t) {
|
|
3985
3929
|
var e, n = Ke(t), r = n[0];
|
|
3986
3930
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
3987
3931
|
}
|
|
3988
|
-
function
|
|
3932
|
+
function Pl(t, e) {
|
|
3989
3933
|
var n = e.clientX, r = e.clientY;
|
|
3990
3934
|
return t.every(function(i) {
|
|
3991
|
-
var o = i.popperRect, s = i.popperState, a = i.props, l = a.interactiveBorder, c =
|
|
3935
|
+
var o = i.popperRect, s = i.popperState, a = i.props, l = a.interactiveBorder, c = El(s.placement), u = s.modifiersData.offset;
|
|
3992
3936
|
if (!u)
|
|
3993
3937
|
return !0;
|
|
3994
3938
|
var d = c === "bottom" ? u.top.y : 0, f = c === "top" ? u.bottom.y : 0, h = c === "right" ? u.left.x : 0, y = c === "left" ? u.right.x : 0, v = o.top - r + d > l, g = r - o.bottom - f > l, w = o.left - n + h > l, x = n - o.right - y > l;
|
|
@@ -4013,24 +3957,24 @@ function Zn(t, e) {
|
|
|
4013
3957
|
var fe = {
|
|
4014
3958
|
isTouch: !1
|
|
4015
3959
|
}, Qn = 0;
|
|
4016
|
-
function
|
|
4017
|
-
fe.isTouch || (fe.isTouch = !0, window.performance && document.addEventListener("mousemove",
|
|
3960
|
+
function Dl() {
|
|
3961
|
+
fe.isTouch || (fe.isTouch = !0, window.performance && document.addEventListener("mousemove", Hr));
|
|
4018
3962
|
}
|
|
4019
|
-
function
|
|
3963
|
+
function Hr() {
|
|
4020
3964
|
var t = performance.now();
|
|
4021
|
-
t - Qn < 20 && (fe.isTouch = !1, document.removeEventListener("mousemove",
|
|
3965
|
+
t - Qn < 20 && (fe.isTouch = !1, document.removeEventListener("mousemove", Hr)), Qn = t;
|
|
4022
3966
|
}
|
|
4023
|
-
function
|
|
3967
|
+
function $l() {
|
|
4024
3968
|
var t = document.activeElement;
|
|
4025
|
-
if (
|
|
3969
|
+
if (Sl(t)) {
|
|
4026
3970
|
var e = t._tippy;
|
|
4027
3971
|
t.blur && !e.state.isVisible && t.blur();
|
|
4028
3972
|
}
|
|
4029
3973
|
}
|
|
4030
|
-
function
|
|
4031
|
-
document.addEventListener("touchstart",
|
|
3974
|
+
function Bl() {
|
|
3975
|
+
document.addEventListener("touchstart", Dl, Pe), window.addEventListener("blur", $l);
|
|
4032
3976
|
}
|
|
4033
|
-
var
|
|
3977
|
+
var Rl = typeof window < "u" && typeof document < "u", Nl = Rl ? (
|
|
4034
3978
|
// @ts-ignore
|
|
4035
3979
|
!!window.msCrypto
|
|
4036
3980
|
) : !1;
|
|
@@ -4042,7 +3986,7 @@ function er(t) {
|
|
|
4042
3986
|
var e = /[ \t]{2,}/g, n = /^[ \t]*/gm;
|
|
4043
3987
|
return t.replace(e, " ").replace(n, "").trim();
|
|
4044
3988
|
}
|
|
4045
|
-
function
|
|
3989
|
+
function Hl(t) {
|
|
4046
3990
|
return er(`
|
|
4047
3991
|
%ctippy.js
|
|
4048
3992
|
|
|
@@ -4051,9 +3995,9 @@ function Fl(t) {
|
|
|
4051
3995
|
%c👷 This is a development-only message. It will be removed in production.
|
|
4052
3996
|
`);
|
|
4053
3997
|
}
|
|
4054
|
-
function
|
|
3998
|
+
function jr(t) {
|
|
4055
3999
|
return [
|
|
4056
|
-
|
|
4000
|
+
Hl(t),
|
|
4057
4001
|
// title
|
|
4058
4002
|
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
4059
4003
|
// message
|
|
@@ -4063,32 +4007,32 @@ function Hr(t) {
|
|
|
4063
4007
|
];
|
|
4064
4008
|
}
|
|
4065
4009
|
var ft;
|
|
4066
|
-
process.env.NODE_ENV !== "production" &&
|
|
4067
|
-
function
|
|
4010
|
+
process.env.NODE_ENV !== "production" && jl();
|
|
4011
|
+
function jl() {
|
|
4068
4012
|
ft = /* @__PURE__ */ new Set();
|
|
4069
4013
|
}
|
|
4070
4014
|
function we(t, e) {
|
|
4071
4015
|
if (t && !ft.has(e)) {
|
|
4072
4016
|
var n;
|
|
4073
|
-
ft.add(e), (n = console).warn.apply(n,
|
|
4017
|
+
ft.add(e), (n = console).warn.apply(n, jr(e));
|
|
4074
4018
|
}
|
|
4075
4019
|
}
|
|
4076
4020
|
function sn(t, e) {
|
|
4077
4021
|
if (t && !ft.has(e)) {
|
|
4078
4022
|
var n;
|
|
4079
|
-
ft.add(e), (n = console).error.apply(n,
|
|
4023
|
+
ft.add(e), (n = console).error.apply(n, jr(e));
|
|
4080
4024
|
}
|
|
4081
4025
|
}
|
|
4082
|
-
function
|
|
4026
|
+
function _l(t) {
|
|
4083
4027
|
var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
|
|
4084
4028
|
sn(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), sn(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
4085
4029
|
}
|
|
4086
|
-
var
|
|
4030
|
+
var _r = {
|
|
4087
4031
|
animateFill: !1,
|
|
4088
4032
|
followCursor: !1,
|
|
4089
4033
|
inlinePositioning: !1,
|
|
4090
4034
|
sticky: !1
|
|
4091
|
-
},
|
|
4035
|
+
}, Fl = {
|
|
4092
4036
|
allowHTML: !1,
|
|
4093
4037
|
animation: "fade",
|
|
4094
4038
|
arrow: !0,
|
|
@@ -4146,14 +4090,14 @@ var jr = {
|
|
|
4146
4090
|
touch: !0,
|
|
4147
4091
|
trigger: "mouseenter focus",
|
|
4148
4092
|
triggerTarget: null
|
|
4149
|
-
},
|
|
4150
|
-
process.env.NODE_ENV !== "production" &&
|
|
4093
|
+
}, _r, Fl), Vl = Object.keys(Q), Wl = function(e) {
|
|
4094
|
+
process.env.NODE_ENV !== "production" && Vr(e, []);
|
|
4151
4095
|
var n = Object.keys(e);
|
|
4152
4096
|
n.forEach(function(r) {
|
|
4153
4097
|
Q[r] = e[r];
|
|
4154
4098
|
});
|
|
4155
4099
|
};
|
|
4156
|
-
function
|
|
4100
|
+
function Fr(t) {
|
|
4157
4101
|
var e = t.plugins || [], n = e.reduce(function(r, i) {
|
|
4158
4102
|
var o = i.name, s = i.defaultValue;
|
|
4159
4103
|
if (o) {
|
|
@@ -4164,10 +4108,10 @@ function _r(t) {
|
|
|
4164
4108
|
}, {});
|
|
4165
4109
|
return Object.assign({}, t, n);
|
|
4166
4110
|
}
|
|
4167
|
-
function
|
|
4168
|
-
var n = e ? Object.keys(
|
|
4111
|
+
function zl(t, e) {
|
|
4112
|
+
var n = e ? Object.keys(Fr(Object.assign({}, Q, {
|
|
4169
4113
|
plugins: e
|
|
4170
|
-
}))) :
|
|
4114
|
+
}))) : Vl, r = n.reduce(function(i, o) {
|
|
4171
4115
|
var s = (t.getAttribute("data-tippy-" + o) || "").trim();
|
|
4172
4116
|
if (!s)
|
|
4173
4117
|
return i;
|
|
@@ -4185,18 +4129,18 @@ function ql(t, e) {
|
|
|
4185
4129
|
}
|
|
4186
4130
|
function tr(t, e) {
|
|
4187
4131
|
var n = Object.assign({}, e, {
|
|
4188
|
-
content:
|
|
4189
|
-
}, e.ignoreAttributes ? {} :
|
|
4132
|
+
content: Nr(e.content, [t])
|
|
4133
|
+
}, e.ignoreAttributes ? {} : zl(t, e.plugins));
|
|
4190
4134
|
return n.aria = Object.assign({}, Q.aria, n.aria), n.aria = {
|
|
4191
4135
|
expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
|
|
4192
4136
|
content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
|
|
4193
4137
|
}, n;
|
|
4194
4138
|
}
|
|
4195
|
-
function
|
|
4139
|
+
function Vr(t, e) {
|
|
4196
4140
|
t === void 0 && (t = {}), e === void 0 && (e = []);
|
|
4197
4141
|
var n = Object.keys(t);
|
|
4198
4142
|
n.forEach(function(r) {
|
|
4199
|
-
var i =
|
|
4143
|
+
var i = Ml(Q, Object.keys(_r)), o = !kl(i, r);
|
|
4200
4144
|
o && (o = e.filter(function(s) {
|
|
4201
4145
|
return s.name === r;
|
|
4202
4146
|
}).length === 0), we(o, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
@@ -4205,15 +4149,15 @@ function Fr(t, e) {
|
|
|
4205
4149
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
4206
4150
|
});
|
|
4207
4151
|
}
|
|
4208
|
-
var
|
|
4152
|
+
var Kl = function() {
|
|
4209
4153
|
return "innerHTML";
|
|
4210
4154
|
};
|
|
4211
4155
|
function an(t, e) {
|
|
4212
|
-
t[
|
|
4156
|
+
t[Kl()] = e;
|
|
4213
4157
|
}
|
|
4214
4158
|
function nr(t) {
|
|
4215
4159
|
var e = at();
|
|
4216
|
-
return t === !0 ? e.className =
|
|
4160
|
+
return t === !0 ? e.className = $r : (e.className = Br, pt(t) ? e.appendChild(t) : an(e, t)), e;
|
|
4217
4161
|
}
|
|
4218
4162
|
function rr(t, e) {
|
|
4219
4163
|
pt(e.content) ? (an(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? an(t, e.content) : t.textContent = e.content);
|
|
@@ -4223,21 +4167,21 @@ function ln(t) {
|
|
|
4223
4167
|
return {
|
|
4224
4168
|
box: e,
|
|
4225
4169
|
content: n.find(function(r) {
|
|
4226
|
-
return r.classList.contains(
|
|
4170
|
+
return r.classList.contains(Dr);
|
|
4227
4171
|
}),
|
|
4228
4172
|
arrow: n.find(function(r) {
|
|
4229
|
-
return r.classList.contains(
|
|
4173
|
+
return r.classList.contains($r) || r.classList.contains(Br);
|
|
4230
4174
|
}),
|
|
4231
4175
|
backdrop: n.find(function(r) {
|
|
4232
|
-
return r.classList.contains(
|
|
4176
|
+
return r.classList.contains(xl);
|
|
4233
4177
|
})
|
|
4234
4178
|
};
|
|
4235
4179
|
}
|
|
4236
|
-
function
|
|
4180
|
+
function Wr(t) {
|
|
4237
4181
|
var e = at(), n = at();
|
|
4238
|
-
n.className =
|
|
4182
|
+
n.className = wl, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
4239
4183
|
var r = at();
|
|
4240
|
-
r.className =
|
|
4184
|
+
r.className = Dr, r.setAttribute("data-state", "hidden"), rr(r, t.props), e.appendChild(n), n.appendChild(r), i(t.props, t.props);
|
|
4241
4185
|
function i(o, s) {
|
|
4242
4186
|
var a = ln(e), l = a.box, c = a.content, u = a.arrow;
|
|
4243
4187
|
s.theme ? l.setAttribute("data-theme", s.theme) : l.removeAttribute("data-theme"), typeof s.animation == "string" ? l.setAttribute("data-animation", s.animation) : l.removeAttribute("data-animation"), s.inertia ? l.setAttribute("data-inertia", "") : l.removeAttribute("data-inertia"), l.style.maxWidth = typeof s.maxWidth == "number" ? s.maxWidth + "px" : s.maxWidth, s.role ? l.setAttribute("role", s.role) : l.removeAttribute("role"), (o.content !== s.content || o.allowHTML !== s.allowHTML) && rr(c, t.props), s.arrow ? u ? o.arrow !== s.arrow && (l.removeChild(u), l.appendChild(nr(s.arrow))) : l.appendChild(nr(s.arrow)) : u && l.removeChild(u);
|
|
@@ -4247,10 +4191,10 @@ function Vr(t) {
|
|
|
4247
4191
|
onUpdate: i
|
|
4248
4192
|
};
|
|
4249
4193
|
}
|
|
4250
|
-
|
|
4251
|
-
var
|
|
4252
|
-
function
|
|
4253
|
-
var n = tr(t, Object.assign({}, Q,
|
|
4194
|
+
Wr.$$tippy = !0;
|
|
4195
|
+
var Ul = 1, Dt = [], tn = [];
|
|
4196
|
+
function ql(t, e) {
|
|
4197
|
+
var n = tr(t, Object.assign({}, Q, Fr(Xn(e)))), r, i, o, s = !1, a = !1, l = !1, c = !1, u, d, f, h = [], y = Gn(bt, n.interactiveDebounce), v, g = Ul++, w = null, x = Tl(n.plugins), T = {
|
|
4254
4198
|
// Is the instance currently enabled?
|
|
4255
4199
|
isEnabled: !0,
|
|
4256
4200
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -4273,18 +4217,18 @@ function Xl(t, e) {
|
|
|
4273
4217
|
// methods
|
|
4274
4218
|
clearDelayTimeouts: Ot,
|
|
4275
4219
|
setProps: Tt,
|
|
4276
|
-
setContent:
|
|
4277
|
-
show:
|
|
4278
|
-
hide:
|
|
4279
|
-
hideWithInteractivity:
|
|
4220
|
+
setContent: Et,
|
|
4221
|
+
show: Ur,
|
|
4222
|
+
hide: qr,
|
|
4223
|
+
hideWithInteractivity: Gr,
|
|
4280
4224
|
enable: rt,
|
|
4281
4225
|
disable: Mt,
|
|
4282
|
-
unmount:
|
|
4283
|
-
destroy:
|
|
4226
|
+
unmount: Yr,
|
|
4227
|
+
destroy: Xr
|
|
4284
4228
|
};
|
|
4285
4229
|
if (!n.render)
|
|
4286
4230
|
return process.env.NODE_ENV !== "production" && sn(!0, "render() function has not been supplied."), p;
|
|
4287
|
-
var O = n.render(p), b = O.popper,
|
|
4231
|
+
var O = n.render(p), b = O.popper, E = O.onUpdate;
|
|
4288
4232
|
b.setAttribute("data-tippy-root", ""), b.id = "tippy-" + p.id, p.popper = b, t._tippy = p, b._tippy = p;
|
|
4289
4233
|
var S = x.map(function(m) {
|
|
4290
4234
|
return m.fn(p);
|
|
@@ -4298,7 +4242,7 @@ function Xl(t, e) {
|
|
|
4298
4242
|
var m = p.props.touch;
|
|
4299
4243
|
return Array.isArray(m) ? m : [m, 0];
|
|
4300
4244
|
}
|
|
4301
|
-
function
|
|
4245
|
+
function B() {
|
|
4302
4246
|
return P()[0] === "hold";
|
|
4303
4247
|
}
|
|
4304
4248
|
function D() {
|
|
@@ -4310,7 +4254,7 @@ function Xl(t, e) {
|
|
|
4310
4254
|
}
|
|
4311
4255
|
function J() {
|
|
4312
4256
|
var m = I().parentNode;
|
|
4313
|
-
return m ?
|
|
4257
|
+
return m ? Ll(m) : document;
|
|
4314
4258
|
}
|
|
4315
4259
|
function Z() {
|
|
4316
4260
|
return ln(b);
|
|
@@ -4322,8 +4266,8 @@ function Xl(t, e) {
|
|
|
4322
4266
|
m === void 0 && (m = !1), b.style.pointerEvents = p.props.interactive && !m ? "" : "none", b.style.zIndex = "" + p.props.zIndex;
|
|
4323
4267
|
}
|
|
4324
4268
|
function H(m, k, M) {
|
|
4325
|
-
if (M === void 0 && (M = !0), S.forEach(function(
|
|
4326
|
-
|
|
4269
|
+
if (M === void 0 && (M = !0), S.forEach(function(A) {
|
|
4270
|
+
A[m] && A[m].apply(A, k);
|
|
4327
4271
|
}), M) {
|
|
4328
4272
|
var C;
|
|
4329
4273
|
(C = p.props)[m].apply(C, k);
|
|
@@ -4333,13 +4277,13 @@ function Xl(t, e) {
|
|
|
4333
4277
|
var m = p.props.aria;
|
|
4334
4278
|
if (m.content) {
|
|
4335
4279
|
var k = "aria-" + m.content, M = b.id, C = Ke(p.props.triggerTarget || t);
|
|
4336
|
-
C.forEach(function(
|
|
4337
|
-
var z =
|
|
4280
|
+
C.forEach(function(A) {
|
|
4281
|
+
var z = A.getAttribute(k);
|
|
4338
4282
|
if (p.state.isVisible)
|
|
4339
|
-
|
|
4283
|
+
A.setAttribute(k, z ? z + " " + M : M);
|
|
4340
4284
|
else {
|
|
4341
4285
|
var ne = z && z.replace(M, "").trim();
|
|
4342
|
-
ne ?
|
|
4286
|
+
ne ? A.setAttribute(k, ne) : A.removeAttribute(k);
|
|
4343
4287
|
}
|
|
4344
4288
|
});
|
|
4345
4289
|
}
|
|
@@ -4398,8 +4342,8 @@ function Xl(t, e) {
|
|
|
4398
4342
|
}
|
|
4399
4343
|
function _e(m, k) {
|
|
4400
4344
|
var M = Z().box;
|
|
4401
|
-
function C(
|
|
4402
|
-
|
|
4345
|
+
function C(A) {
|
|
4346
|
+
A.target === M && (en(M, "remove", C), k());
|
|
4403
4347
|
}
|
|
4404
4348
|
if (m === 0)
|
|
4405
4349
|
return k();
|
|
@@ -4408,9 +4352,9 @@ function Xl(t, e) {
|
|
|
4408
4352
|
function ke(m, k, M) {
|
|
4409
4353
|
M === void 0 && (M = !1);
|
|
4410
4354
|
var C = Ke(p.props.triggerTarget || t);
|
|
4411
|
-
C.forEach(function(
|
|
4412
|
-
|
|
4413
|
-
node:
|
|
4355
|
+
C.forEach(function(A) {
|
|
4356
|
+
A.addEventListener(m, k, M), h.push({
|
|
4357
|
+
node: A,
|
|
4414
4358
|
eventType: m,
|
|
4415
4359
|
handler: k,
|
|
4416
4360
|
options: M
|
|
@@ -4418,18 +4362,18 @@ function Xl(t, e) {
|
|
|
4418
4362
|
});
|
|
4419
4363
|
}
|
|
4420
4364
|
function Fe() {
|
|
4421
|
-
|
|
4365
|
+
B() && (ke("touchstart", Qe, {
|
|
4422
4366
|
passive: !0
|
|
4423
4367
|
}), ke("touchend", wt, {
|
|
4424
4368
|
passive: !0
|
|
4425
|
-
})),
|
|
4369
|
+
})), Ol(p.props.trigger).forEach(function(m) {
|
|
4426
4370
|
if (m !== "manual")
|
|
4427
4371
|
switch (ke(m, Qe), m) {
|
|
4428
4372
|
case "mouseenter":
|
|
4429
4373
|
ke("mouseleave", wt);
|
|
4430
4374
|
break;
|
|
4431
4375
|
case "focus":
|
|
4432
|
-
ke(
|
|
4376
|
+
ke(Nl ? "focusout" : "blur", et);
|
|
4433
4377
|
break;
|
|
4434
4378
|
case "focusin":
|
|
4435
4379
|
ke("focusout", et);
|
|
@@ -4439,31 +4383,31 @@ function Xl(t, e) {
|
|
|
4439
4383
|
}
|
|
4440
4384
|
function yt() {
|
|
4441
4385
|
h.forEach(function(m) {
|
|
4442
|
-
var k = m.node, M = m.eventType, C = m.handler,
|
|
4443
|
-
k.removeEventListener(M, C,
|
|
4386
|
+
var k = m.node, M = m.eventType, C = m.handler, A = m.options;
|
|
4387
|
+
k.removeEventListener(M, C, A);
|
|
4444
4388
|
}), h = [];
|
|
4445
4389
|
}
|
|
4446
4390
|
function Qe(m) {
|
|
4447
4391
|
var k, M = !1;
|
|
4448
4392
|
if (!(!p.state.isEnabled || tt(m) || a)) {
|
|
4449
4393
|
var C = ((k = u) == null ? void 0 : k.type) === "focus";
|
|
4450
|
-
u = m, v = m.currentTarget, ue(), !p.state.isVisible &&
|
|
4451
|
-
return
|
|
4394
|
+
u = m, v = m.currentTarget, ue(), !p.state.isVisible && Cl(m) && Dt.forEach(function(A) {
|
|
4395
|
+
return A(m);
|
|
4452
4396
|
}), m.type === "click" && (p.props.trigger.indexOf("mouseenter") < 0 || s) && p.props.hideOnClick !== !1 && p.state.isVisible ? M = !0 : nt(m), m.type === "click" && (s = !M), M && !C && Ie(m);
|
|
4453
4397
|
}
|
|
4454
4398
|
}
|
|
4455
4399
|
function bt(m) {
|
|
4456
4400
|
var k = m.target, M = I().contains(k) || b.contains(k);
|
|
4457
4401
|
if (!(m.type === "mousemove" && M)) {
|
|
4458
|
-
var C = Me().concat(b).map(function(
|
|
4459
|
-
var z, ne =
|
|
4402
|
+
var C = Me().concat(b).map(function(A) {
|
|
4403
|
+
var z, ne = A._tippy, Ve = (z = ne.popperInstance) == null ? void 0 : z.state;
|
|
4460
4404
|
return Ve ? {
|
|
4461
|
-
popperRect:
|
|
4405
|
+
popperRect: A.getBoundingClientRect(),
|
|
4462
4406
|
popperState: Ve,
|
|
4463
4407
|
props: n
|
|
4464
4408
|
} : null;
|
|
4465
4409
|
}).filter(Boolean);
|
|
4466
|
-
|
|
4410
|
+
Pl(C, m) && (Ce(), Ie(m));
|
|
4467
4411
|
}
|
|
4468
4412
|
}
|
|
4469
4413
|
function wt(m) {
|
|
@@ -4480,22 +4424,22 @@ function Xl(t, e) {
|
|
|
4480
4424
|
p.props.trigger.indexOf("focusin") < 0 && m.target !== I() || p.props.interactive && m.relatedTarget && b.contains(m.relatedTarget) || Ie(m);
|
|
4481
4425
|
}
|
|
4482
4426
|
function tt(m) {
|
|
4483
|
-
return fe.isTouch ?
|
|
4427
|
+
return fe.isTouch ? B() !== m.type.indexOf("touch") >= 0 : !1;
|
|
4484
4428
|
}
|
|
4485
4429
|
function xt() {
|
|
4486
4430
|
kt();
|
|
4487
|
-
var m = p.props, k = m.popperOptions, M = m.placement, C = m.offset,
|
|
4488
|
-
getBoundingClientRect:
|
|
4489
|
-
contextElement:
|
|
4490
|
-
} : t,
|
|
4431
|
+
var m = p.props, k = m.popperOptions, M = m.placement, C = m.offset, A = m.getReferenceClientRect, z = m.moveTransition, ne = D() ? ln(b).arrow : null, Ve = A ? {
|
|
4432
|
+
getBoundingClientRect: A,
|
|
4433
|
+
contextElement: A.contextElement || I()
|
|
4434
|
+
} : t, An = {
|
|
4491
4435
|
name: "$$tippy",
|
|
4492
4436
|
enabled: !0,
|
|
4493
4437
|
phase: "beforeWrite",
|
|
4494
4438
|
requires: ["computeStyles"],
|
|
4495
|
-
fn: function(
|
|
4496
|
-
var We =
|
|
4439
|
+
fn: function(At) {
|
|
4440
|
+
var We = At.state;
|
|
4497
4441
|
if (D()) {
|
|
4498
|
-
var
|
|
4442
|
+
var Jr = Z(), Ut = Jr.box;
|
|
4499
4443
|
["placement", "reference-hidden", "escaped"].forEach(function(Ct) {
|
|
4500
4444
|
Ct === "placement" ? Ut.setAttribute("data-placement", We.placement) : We.attributes.popper["data-popper-" + Ct] ? Ut.setAttribute("data-" + Ct, "") : Ut.removeAttribute("data-" + Ct);
|
|
4501
4445
|
}), We.attributes.popper = {};
|
|
@@ -4526,14 +4470,14 @@ function Xl(t, e) {
|
|
|
4526
4470
|
options: {
|
|
4527
4471
|
adaptive: !z
|
|
4528
4472
|
}
|
|
4529
|
-
},
|
|
4473
|
+
}, An];
|
|
4530
4474
|
D() && ne && Le.push({
|
|
4531
4475
|
name: "arrow",
|
|
4532
4476
|
options: {
|
|
4533
4477
|
element: ne,
|
|
4534
4478
|
padding: 3
|
|
4535
4479
|
}
|
|
4536
|
-
}), Le.push.apply(Le, (k == null ? void 0 : k.modifiers) || []), p.popperInstance =
|
|
4480
|
+
}), Le.push.apply(Le, (k == null ? void 0 : k.modifiers) || []), p.popperInstance = bl(Ve, b, Object.assign({}, k, {
|
|
4537
4481
|
placement: M,
|
|
4538
4482
|
onFirstUpdate: f,
|
|
4539
4483
|
modifiers: Le
|
|
@@ -4544,7 +4488,7 @@ function Xl(t, e) {
|
|
|
4544
4488
|
}
|
|
4545
4489
|
function be() {
|
|
4546
4490
|
var m = p.props.appendTo, k, M = I();
|
|
4547
|
-
p.props.interactive && m === Rr || m === "parent" ? k = M.parentNode : k =
|
|
4491
|
+
p.props.interactive && m === Rr || m === "parent" ? k = M.parentNode : k = Nr(m, [M]), k.contains(b) || k.appendChild(b), p.state.isMounted = !0, xt(), process.env.NODE_ENV !== "production" && we(p.props.interactive && m === Q.appendTo && M.nextElementSibling !== b, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
4548
4492
|
|
|
4549
4493
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
4550
4494
|
|
|
@@ -4557,8 +4501,8 @@ function Xl(t, e) {
|
|
|
4557
4501
|
}
|
|
4558
4502
|
function nt(m) {
|
|
4559
4503
|
p.clearDelayTimeouts(), m && H("onTrigger", [p, m]), se();
|
|
4560
|
-
var k = j(!0), M = P(), C = M[0],
|
|
4561
|
-
fe.isTouch && C === "hold" &&
|
|
4504
|
+
var k = j(!0), M = P(), C = M[0], A = M[1];
|
|
4505
|
+
fe.isTouch && C === "hold" && A && (k = A), k ? r = setTimeout(function() {
|
|
4562
4506
|
p.show();
|
|
4563
4507
|
}, k) : p.show();
|
|
4564
4508
|
}
|
|
@@ -4593,19 +4537,19 @@ function Xl(t, e) {
|
|
|
4593
4537
|
}));
|
|
4594
4538
|
p.props = M, Fe(), k.interactiveDebounce !== M.interactiveDebounce && (Ce(), y = Gn(bt, M.interactiveDebounce)), k.triggerTarget && !M.triggerTarget ? Ke(k.triggerTarget).forEach(function(C) {
|
|
4595
4539
|
C.removeAttribute("aria-expanded");
|
|
4596
|
-
}) : M.triggerTarget && t.removeAttribute("aria-expanded"), ue(), _(),
|
|
4540
|
+
}) : M.triggerTarget && t.removeAttribute("aria-expanded"), ue(), _(), E && E(k, M), p.popperInstance && (xt(), Me().forEach(function(C) {
|
|
4597
4541
|
requestAnimationFrame(C._tippy.popperInstance.forceUpdate);
|
|
4598
4542
|
})), H("onAfterUpdate", [p, m]);
|
|
4599
4543
|
}
|
|
4600
4544
|
}
|
|
4601
|
-
function
|
|
4545
|
+
function Et(m) {
|
|
4602
4546
|
p.setProps({
|
|
4603
4547
|
content: m
|
|
4604
4548
|
});
|
|
4605
4549
|
}
|
|
4606
|
-
function
|
|
4550
|
+
function Ur() {
|
|
4607
4551
|
process.env.NODE_ENV !== "production" && we(p.state.isDestroyed, ze("show"));
|
|
4608
|
-
var m = p.state.isVisible, k = p.state.isDestroyed, M = !p.state.isEnabled, C = fe.isTouch && !p.props.touch,
|
|
4552
|
+
var m = p.state.isVisible, k = p.state.isDestroyed, M = !p.state.isEnabled, C = fe.isTouch && !p.props.touch, A = Zt(p.props.duration, 0, Q.duration);
|
|
4609
4553
|
if (!(m || k || M || C) && !I().hasAttribute("disabled") && (H("onShow", [p], !1), p.props.onShow(p) !== !1)) {
|
|
4610
4554
|
if (p.state.isVisible = !0, D() && (b.style.visibility = "visible"), _(), se(), p.state.isMounted || (b.style.transition = "none"), D()) {
|
|
4611
4555
|
var z = Z(), ne = z.box, Ve = z.content;
|
|
@@ -4615,48 +4559,48 @@ function Xl(t, e) {
|
|
|
4615
4559
|
var Le;
|
|
4616
4560
|
if (!(!p.state.isVisible || c)) {
|
|
4617
4561
|
if (c = !0, b.style.transition = p.props.moveTransition, D() && p.props.animation) {
|
|
4618
|
-
var Kt = Z(),
|
|
4619
|
-
Qt([
|
|
4562
|
+
var Kt = Z(), At = Kt.box, We = Kt.content;
|
|
4563
|
+
Qt([At, We], A), Jn([At, We], "visible");
|
|
4620
4564
|
}
|
|
4621
|
-
ce(), ue(), Yn(tn, p), (Le = p.popperInstance) == null || Le.forceUpdate(), H("onMount", [p]), p.props.animation && D() && ye(
|
|
4565
|
+
ce(), ue(), Yn(tn, p), (Le = p.popperInstance) == null || Le.forceUpdate(), H("onMount", [p]), p.props.animation && D() && ye(A, function() {
|
|
4622
4566
|
p.state.isShown = !0, H("onShown", [p]);
|
|
4623
4567
|
});
|
|
4624
4568
|
}
|
|
4625
4569
|
}, be();
|
|
4626
4570
|
}
|
|
4627
4571
|
}
|
|
4628
|
-
function
|
|
4572
|
+
function qr() {
|
|
4629
4573
|
process.env.NODE_ENV !== "production" && we(p.state.isDestroyed, ze("hide"));
|
|
4630
4574
|
var m = !p.state.isVisible, k = p.state.isDestroyed, M = !p.state.isEnabled, C = Zt(p.props.duration, 1, Q.duration);
|
|
4631
4575
|
if (!(m || k || M) && (H("onHide", [p], !1), p.props.onHide(p) !== !1)) {
|
|
4632
4576
|
if (p.state.isVisible = !1, p.state.isShown = !1, c = !1, s = !1, D() && (b.style.visibility = "hidden"), Ce(), ge(), _(!0), D()) {
|
|
4633
|
-
var
|
|
4577
|
+
var A = Z(), z = A.box, ne = A.content;
|
|
4634
4578
|
p.props.animation && (Qt([z, ne], C), Jn([z, ne], "hidden"));
|
|
4635
4579
|
}
|
|
4636
4580
|
ce(), ue(), p.props.animation ? D() && je(C, p.unmount) : p.unmount();
|
|
4637
4581
|
}
|
|
4638
4582
|
}
|
|
4639
|
-
function
|
|
4583
|
+
function Gr(m) {
|
|
4640
4584
|
process.env.NODE_ENV !== "production" && we(p.state.isDestroyed, ze("hideWithInteractivity")), J().addEventListener("mousemove", y), Yn(Dt, y), y(m);
|
|
4641
4585
|
}
|
|
4642
|
-
function
|
|
4586
|
+
function Yr() {
|
|
4643
4587
|
process.env.NODE_ENV !== "production" && we(p.state.isDestroyed, ze("unmount")), p.state.isVisible && p.hide(), p.state.isMounted && (kt(), Me().forEach(function(m) {
|
|
4644
4588
|
m._tippy.unmount();
|
|
4645
4589
|
}), b.parentNode && b.parentNode.removeChild(b), tn = tn.filter(function(m) {
|
|
4646
4590
|
return m !== p;
|
|
4647
4591
|
}), p.state.isMounted = !1, H("onHidden", [p]));
|
|
4648
4592
|
}
|
|
4649
|
-
function
|
|
4593
|
+
function Xr() {
|
|
4650
4594
|
process.env.NODE_ENV !== "production" && we(p.state.isDestroyed, ze("destroy")), !p.state.isDestroyed && (p.clearDelayTimeouts(), p.unmount(), yt(), delete t._tippy, p.state.isDestroyed = !0, H("onDestroy", [p]));
|
|
4651
4595
|
}
|
|
4652
4596
|
}
|
|
4653
4597
|
function Ze(t, e) {
|
|
4654
4598
|
e === void 0 && (e = {});
|
|
4655
4599
|
var n = Q.plugins.concat(e.plugins || []);
|
|
4656
|
-
process.env.NODE_ENV !== "production" && (
|
|
4600
|
+
process.env.NODE_ENV !== "production" && (_l(t), Vr(e, n)), Bl();
|
|
4657
4601
|
var r = Object.assign({}, e, {
|
|
4658
4602
|
plugins: n
|
|
4659
|
-
}), i =
|
|
4603
|
+
}), i = Il(t);
|
|
4660
4604
|
if (process.env.NODE_ENV !== "production") {
|
|
4661
4605
|
var o = pt(r.content), s = i.length > 1;
|
|
4662
4606
|
we(o && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
@@ -4667,15 +4611,15 @@ function Ze(t, e) {
|
|
|
4667
4611
|
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
4668
4612
|
}
|
|
4669
4613
|
var a = i.reduce(function(l, c) {
|
|
4670
|
-
var u = c &&
|
|
4614
|
+
var u = c && ql(c, r);
|
|
4671
4615
|
return u && l.push(u), l;
|
|
4672
4616
|
}, []);
|
|
4673
4617
|
return pt(t) ? a[0] : a;
|
|
4674
4618
|
}
|
|
4675
4619
|
Ze.defaultProps = Q;
|
|
4676
|
-
Ze.setDefaultProps =
|
|
4620
|
+
Ze.setDefaultProps = Wl;
|
|
4677
4621
|
Ze.currentInput = fe;
|
|
4678
|
-
Object.assign({},
|
|
4622
|
+
Object.assign({}, Tr, {
|
|
4679
4623
|
effect: function(e) {
|
|
4680
4624
|
var n = e.state, r = {
|
|
4681
4625
|
popper: {
|
|
@@ -4693,12 +4637,12 @@ Object.assign({}, Or, {
|
|
|
4693
4637
|
}
|
|
4694
4638
|
});
|
|
4695
4639
|
Ze.setDefaultProps({
|
|
4696
|
-
render:
|
|
4640
|
+
render: Wr
|
|
4697
4641
|
});
|
|
4698
|
-
class
|
|
4642
|
+
class Gl {
|
|
4699
4643
|
constructor({ editor: e, element: n, view: r, tippyOptions: i = {}, updateDelay: o = 250, shouldShow: s }) {
|
|
4700
4644
|
this.preventHide = !1, this.shouldShow = ({ view: a, state: l, from: c, to: u }) => {
|
|
4701
|
-
const { doc: d, selection: f } = l, { empty: h } = f, y = !d.textBetween(c, u).length &&
|
|
4645
|
+
const { doc: d, selection: f } = l, { empty: h } = f, y = !d.textBetween(c, u).length && Ii(l.selection), v = this.element.contains(document.activeElement);
|
|
4702
4646
|
return !(!(a.hasFocus() || v) || h || y || !this.editor.isEditable);
|
|
4703
4647
|
}, this.mousedownHandler = () => {
|
|
4704
4648
|
this.preventHide = !0;
|
|
@@ -4741,11 +4685,11 @@ class Jl {
|
|
|
4741
4685
|
}
|
|
4742
4686
|
(f = this.tippy) === null || f === void 0 || f.setProps({
|
|
4743
4687
|
getReferenceClientRect: ((h = this.tippyOptions) === null || h === void 0 ? void 0 : h.getReferenceClientRect) || (() => {
|
|
4744
|
-
if (
|
|
4688
|
+
if (Li(y.selection)) {
|
|
4745
4689
|
let b = a.nodeDOM(T);
|
|
4746
4690
|
if (b) {
|
|
4747
|
-
const
|
|
4748
|
-
if (
|
|
4691
|
+
const E = b.dataset.nodeViewWrapper ? b : b.querySelector("[data-node-view-wrapper]");
|
|
4692
|
+
if (E && (b = E.firstChild), b)
|
|
4749
4693
|
return b.getBoundingClientRect();
|
|
4750
4694
|
}
|
|
4751
4695
|
}
|
|
@@ -4789,9 +4733,9 @@ class Jl {
|
|
|
4789
4733
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (n = this.tippy) === null || n === void 0 || n.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
4790
4734
|
}
|
|
4791
4735
|
}
|
|
4792
|
-
const
|
|
4736
|
+
const zr = (t) => new X({
|
|
4793
4737
|
key: typeof t.pluginKey == "string" ? new te(t.pluginKey) : t.pluginKey,
|
|
4794
|
-
view: (e) => new
|
|
4738
|
+
view: (e) => new Gl({ view: e, ...t })
|
|
4795
4739
|
});
|
|
4796
4740
|
cn.create({
|
|
4797
4741
|
name: "bubbleMenu",
|
|
@@ -4806,7 +4750,7 @@ cn.create({
|
|
|
4806
4750
|
},
|
|
4807
4751
|
addProseMirrorPlugins() {
|
|
4808
4752
|
return this.options.element ? [
|
|
4809
|
-
|
|
4753
|
+
zr({
|
|
4810
4754
|
pluginKey: this.options.pluginKey,
|
|
4811
4755
|
editor: this.editor,
|
|
4812
4756
|
element: this.options.element,
|
|
@@ -4817,9 +4761,9 @@ cn.create({
|
|
|
4817
4761
|
] : [];
|
|
4818
4762
|
}
|
|
4819
4763
|
});
|
|
4820
|
-
class
|
|
4764
|
+
class Yl {
|
|
4821
4765
|
getTextContent(e) {
|
|
4822
|
-
return
|
|
4766
|
+
return Pi(e, { textSerializers: Di(this.editor.schema) });
|
|
4823
4767
|
}
|
|
4824
4768
|
constructor({ editor: e, element: n, view: r, tippyOptions: i = {}, shouldShow: o }) {
|
|
4825
4769
|
this.preventHide = !1, this.shouldShow = ({ view: s, state: a }) => {
|
|
@@ -4884,9 +4828,9 @@ class Zl {
|
|
|
4884
4828
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (n = this.tippy) === null || n === void 0 || n.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
4885
4829
|
}
|
|
4886
4830
|
}
|
|
4887
|
-
const
|
|
4831
|
+
const Kr = (t) => new X({
|
|
4888
4832
|
key: typeof t.pluginKey == "string" ? new te(t.pluginKey) : t.pluginKey,
|
|
4889
|
-
view: (e) => new
|
|
4833
|
+
view: (e) => new Yl({ view: e, ...t })
|
|
4890
4834
|
});
|
|
4891
4835
|
cn.create({
|
|
4892
4836
|
name: "floatingMenu",
|
|
@@ -4900,7 +4844,7 @@ cn.create({
|
|
|
4900
4844
|
},
|
|
4901
4845
|
addProseMirrorPlugins() {
|
|
4902
4846
|
return this.options.element ? [
|
|
4903
|
-
|
|
4847
|
+
Kr({
|
|
4904
4848
|
pluginKey: this.options.pluginKey,
|
|
4905
4849
|
editor: this.editor,
|
|
4906
4850
|
element: this.options.element,
|
|
@@ -4938,7 +4882,7 @@ ht({
|
|
|
4938
4882
|
const n = pn(null);
|
|
4939
4883
|
return cr(() => {
|
|
4940
4884
|
const { updateDelay: r, editor: i, pluginKey: o, shouldShow: s, tippyOptions: a } = t;
|
|
4941
|
-
i.registerPlugin(
|
|
4885
|
+
i.registerPlugin(zr({
|
|
4942
4886
|
updateDelay: r,
|
|
4943
4887
|
editor: i,
|
|
4944
4888
|
element: n.value,
|
|
@@ -4956,7 +4900,7 @@ ht({
|
|
|
4956
4900
|
}
|
|
4957
4901
|
});
|
|
4958
4902
|
function ir(t) {
|
|
4959
|
-
return
|
|
4903
|
+
return Ri((e, n) => ({
|
|
4960
4904
|
get() {
|
|
4961
4905
|
return e(), t;
|
|
4962
4906
|
},
|
|
@@ -4969,11 +4913,11 @@ function ir(t) {
|
|
|
4969
4913
|
}
|
|
4970
4914
|
}));
|
|
4971
4915
|
}
|
|
4972
|
-
class
|
|
4916
|
+
class ec extends $i {
|
|
4973
4917
|
constructor(e = {}) {
|
|
4974
4918
|
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = ir(this.view.state), this.reactiveExtensionStorage = ir(this.extensionStorage), this.on("beforeTransaction", ({ nextState: n }) => {
|
|
4975
4919
|
this.reactiveState.value = n, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
4976
|
-
}),
|
|
4920
|
+
}), Bi(this);
|
|
4977
4921
|
}
|
|
4978
4922
|
get state() {
|
|
4979
4923
|
return this.reactiveState ? this.reactiveState.value : this.view.state;
|
|
@@ -5005,13 +4949,13 @@ ht({
|
|
|
5005
4949
|
}
|
|
5006
4950
|
},
|
|
5007
4951
|
setup(t) {
|
|
5008
|
-
const e = pn(), n =
|
|
5009
|
-
return
|
|
4952
|
+
const e = pn(), n = Ni();
|
|
4953
|
+
return Hi(() => {
|
|
5010
4954
|
const r = t.editor;
|
|
5011
|
-
r && r.options.element && e.value &&
|
|
4955
|
+
r && r.options.element && e.value && ji(() => {
|
|
5012
4956
|
if (!e.value || !r.options.element.firstChild)
|
|
5013
4957
|
return;
|
|
5014
|
-
const i =
|
|
4958
|
+
const i = _i(e.value);
|
|
5015
4959
|
e.value.append(...r.options.element.childNodes), r.contentComponent = n.ctx._, n && (r.appContext = {
|
|
5016
4960
|
...n.appContext,
|
|
5017
4961
|
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
@@ -5061,7 +5005,7 @@ ht({
|
|
|
5061
5005
|
const n = pn(null);
|
|
5062
5006
|
return cr(() => {
|
|
5063
5007
|
const { pluginKey: r, editor: i, tippyOptions: o, shouldShow: s } = t;
|
|
5064
|
-
i.registerPlugin(
|
|
5008
|
+
i.registerPlugin(Kr({
|
|
5065
5009
|
pluginKey: r,
|
|
5066
5010
|
editor: i,
|
|
5067
5011
|
element: n.value,
|
|
@@ -5118,8 +5062,7 @@ ht({
|
|
|
5118
5062
|
}
|
|
5119
5063
|
});
|
|
5120
5064
|
export {
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
rc as S
|
|
5065
|
+
ec as E,
|
|
5066
|
+
Zl as P,
|
|
5067
|
+
Ql as S
|
|
5125
5068
|
};
|