tuikit-atomicx-vue3 3.3.4 → 3.4.1
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 +33 -0
- package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-DESfuJPj.js +89 -0
- package/dist/DialogPortal-CvJcEAsn.js +417 -0
- package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-C8oUv-KF.js +36 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js +116 -0
- package/dist/PopoverTrigger-L8abAry7.js +607 -0
- package/dist/PopperContent-XdhqL8Y2.js +1603 -0
- package/dist/Teleport-CSEuZbpM.js +913 -0
- package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-DlROoquV.js +89 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/baseComp/ActionSheep.js +41 -51
- package/dist/baseComp/AudioIcon.js +27 -37
- package/dist/baseComp/Avatar.js +16 -28
- package/dist/baseComp/Dialog/DialogH5.js +56 -82
- package/dist/baseComp/Dialog/DialogPC.js +76 -118
- package/dist/baseComp/Dialog/index.js +2 -2
- package/dist/baseComp/IconButton.js +43 -56
- package/dist/baseComp/Input/InputH5.js +85 -128
- package/dist/baseComp/Input/InputPC.js +85 -128
- package/dist/baseComp/Input/InputWX.js +88 -131
- package/dist/baseComp/Input/index.js +5 -5
- package/dist/baseComp/MessageBox/index.js +120 -150
- package/dist/baseComp/Modal/Modal.js +38 -45
- package/dist/baseComp/Modal/index.js +3 -3
- package/dist/baseComp/ObserverView/ObserverView.js +50 -86
- package/dist/baseComp/ObserverView/index.js +2 -2
- package/dist/baseComp/Option/OptionH5.js +29 -40
- package/dist/baseComp/Option/OptionPC.js +34 -46
- package/dist/baseComp/Option/OptionWX.js +30 -41
- package/dist/baseComp/Option/index.js +2 -2
- package/dist/baseComp/Select/SelectH5.js +54 -86
- package/dist/baseComp/Select/SelectPC.js +78 -120
- package/dist/baseComp/Select/SelectWX.js +48 -79
- package/dist/baseComp/Select/index.js +2 -2
- package/dist/baseComp/SvgIcon.js +17 -22
- package/dist/baseComp/TuiSwitch.js +15 -19
- package/dist/baseComp/View/View.js +2 -2
- package/dist/baseComp/View/index.js +19 -24
- package/dist/baseComp/index.js +2 -2
- package/dist/baseComp/useZIndex.js +7 -12
- package/dist/chat/index.d.ts +1421 -990
- package/dist/chat/index.js +57 -82
- package/dist/chat/server.js +60 -84
- package/dist/components/AudioSetting/AudioMediaControl.js +52 -78
- package/dist/components/AudioSetting/AudioRequestDialog.js +2 -2
- package/dist/components/AudioSetting/AudioSettingTab.js +72 -102
- package/dist/components/AudioSetting/MicrophoneSelect.js +45 -57
- package/dist/components/AudioSetting/SpeakerSelect.js +45 -57
- package/dist/components/AudioSetting/index.js +3 -3
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -2
- package/dist/components/AudioSettingPanel/i18n/index.js +4 -4
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -2
- package/dist/components/AudioSettingPanel/index.js +102 -147
- package/dist/components/Avatar/Avatar.js +88 -140
- package/dist/components/Avatar/Avatar.vue.d.ts +1 -1
- package/dist/components/Avatar/AvatarBadge/AvatarBadge.js +25 -31
- package/dist/components/Avatar/AvatarBadge/index.js +2 -2
- package/dist/components/Avatar/constants/avatar.js +7 -12
- package/dist/components/Avatar/index.js +9 -9
- package/dist/components/BarrageInput/BarrageInput.js +50 -67
- package/dist/components/BarrageInput/BarrageInputH5.js +80 -111
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +84 -97
- package/dist/components/BarrageInput/EmojiPicker/index.js +2 -2
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +34 -62
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +79 -90
- package/dist/components/BarrageInput/TextEditor/TextEditor.js +2 -2
- package/dist/components/BarrageInput/TextEditor/index.js +81 -125
- package/dist/components/BarrageInput/constants.js +2 -2
- package/dist/components/BarrageInput/i18n/en-US/index.js +2 -2
- package/dist/components/BarrageInput/i18n/index.js +4 -4
- package/dist/components/BarrageInput/i18n/zh-CN/index.js +2 -2
- package/dist/components/BarrageInput/index.js +11 -11
- package/dist/components/BarrageList/BarrageList.js +97 -173
- package/dist/components/BarrageList/BarrageListH5.js +96 -171
- package/dist/components/BarrageList/ClickAction/UserActionMenu.js +64 -94
- package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.js +2 -2
- package/dist/components/BarrageList/Message/CustomMessage/index.js +5 -7
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +16 -21
- package/dist/components/BarrageList/Message/FaceMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +2 -2
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +13 -18
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +56 -80
- package/dist/components/BarrageList/Message/ImageMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +5 -5
- package/dist/components/BarrageList/Message/MergerMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/Message.js +2 -2
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +28 -39
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.js +2 -2
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +93 -101
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +26 -32
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +19 -22
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +2 -2
- package/dist/components/BarrageList/Message/MessageLayout/index.js +2 -2
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +31 -39
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +67 -96
- package/dist/components/BarrageList/Message/TextMessage/index.js +2 -2
- package/dist/components/BarrageList/Message/index.js +11 -15
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +34 -43
- package/dist/components/BarrageList/MessageForward/MessageForward.js +158 -210
- package/dist/components/BarrageList/MessageForward/index.js +2 -2
- package/dist/components/BarrageList/MessageListContext.js +9 -10
- package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.js +20 -28
- package/dist/components/BarrageList/MessageTimeDivider/index.js +2 -2
- package/dist/components/BarrageList/i18n/en-US/index.js +3 -3
- package/dist/components/BarrageList/i18n/index.js +4 -4
- package/dist/components/BarrageList/i18n/zh-CN/index.js +3 -3
- package/dist/components/BarrageList/index.js +10 -10
- package/dist/components/CameraButton/index.js +34 -44
- package/dist/components/ChatSetting/C2CChatSetting/C2CChatSetting.js +92 -108
- package/dist/components/ChatSetting/C2CChatSetting/index.js +3 -3
- package/dist/components/ChatSetting/ChatSetting.js +17 -23
- package/dist/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.js +133 -163
- package/dist/components/ChatSetting/GroupChatSetting/GroupActions/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +179 -245
- package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.js +124 -181
- package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.js +195 -259
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagementEntry/GroupManagementEntry.js +23 -32
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagementEntry/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.js +149 -212
- package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/PersonalSettings/PersonalSettings.js +35 -40
- package/dist/components/ChatSetting/GroupChatSetting/PersonalSettings/index.js +2 -2
- package/dist/components/ChatSetting/GroupChatSetting/index.js +2 -2
- package/dist/components/ChatSetting/SettingItem/SettingItem.js +201 -247
- package/dist/components/ChatSetting/SettingItem/index.js +2 -2
- package/dist/components/ChatSetting/i18n/en-US.js +2 -2
- package/dist/components/ChatSetting/i18n/index.js +6 -6
- package/dist/components/ChatSetting/i18n/zh-CN.js +2 -2
- package/dist/components/ChatSetting/index.js +7 -7
- package/dist/components/CoGuestPanel/CoGuestPanel.js +139 -180
- package/dist/components/CoGuestPanel/constants.js +2 -2
- package/dist/components/CoGuestPanel/i18n/en-US/index.js +9 -9
- package/dist/components/CoGuestPanel/i18n/index.js +4 -4
- package/dist/components/CoGuestPanel/i18n/zh-CN/index.js +9 -9
- package/dist/components/CoGuestPanel/index.js +8 -8
- package/dist/components/CoHostPanel/BattlePanel.js +196 -0
- package/dist/components/CoHostPanel/BattlePanel.vue.d.ts +19 -0
- package/dist/components/CoHostPanel/CoHostPanel.js +109 -0
- package/dist/components/CoHostPanel/CoHostPanel.vue.d.ts +19 -0
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +110 -0
- package/dist/components/CoHostPanel/ConfigSettingPanel.vue.d.ts +33 -0
- package/dist/components/CoHostPanel/ConnectionPanel.js +273 -0
- package/dist/components/CoHostPanel/ConnectionPanel.vue.d.ts +19 -0
- package/dist/components/CoHostPanel/RecommendHostList.js +113 -0
- package/dist/components/CoHostPanel/RecommendHostList.vue.d.ts +13 -0
- package/dist/components/CoHostPanel/UserList.js +34 -0
- package/dist/components/CoHostPanel/UserList.vue.d.ts +28 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +74 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.js +81 -0
- package/dist/components/CoHostPanel/i18n/index.d.ts +4 -0
- package/dist/components/CoHostPanel/i18n/index.js +6 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +75 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.js +82 -0
- package/dist/components/CoHostPanel/index.d.ts +16 -0
- package/dist/components/CoHostPanel/index.js +10 -0
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +36 -51
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +141 -196
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +39 -61
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +109 -160
- package/dist/components/ContactList/ContactInfo/FriendInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +58 -86
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +99 -133
- package/dist/components/ContactList/ContactInfo/GroupInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +86 -118
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +72 -101
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/index.js +2 -2
- package/dist/components/ContactList/ContactInfo/index.js +16 -16
- package/dist/components/ContactList/ContactList.js +164 -235
- package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +29 -38
- package/dist/components/ContactList/ContactListItem/BlacklistItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/ContactListItem.js +2 -2
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +46 -61
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +24 -31
- package/dist/components/ContactList/ContactListItem/FriendItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +45 -64
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +29 -38
- package/dist/components/ContactList/ContactListItem/GroupItem/index.js +2 -2
- package/dist/components/ContactList/ContactListItem/index.js +57 -66
- package/dist/components/ContactList/ContactSearch/ContactSearch.js +53 -73
- package/dist/components/ContactList/ContactSearch/index.js +2 -2
- package/dist/components/ContactList/constants/const.js +3 -4
- package/dist/components/ContactList/hooks/index.js +2 -2
- package/dist/components/ContactList/hooks/useContactList.js +11 -15
- package/dist/components/ContactList/i18n/en-US.js +21 -21
- package/dist/components/ContactList/i18n/index.js +4 -4
- package/dist/components/ContactList/i18n/zh-CN.js +21 -21
- package/dist/components/ContactList/index.js +12 -14
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +107 -150
- package/dist/components/ConversationList/ConversationActions/index.js +2 -2
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +116 -193
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.js +65 -80
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.js +108 -126
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.js +40 -52
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.js +61 -79
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/index.js +4 -4
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/type.js +8 -8
- package/dist/components/ConversationList/ConversationCreate/index.js +12 -12
- package/dist/components/ConversationList/ConversationList.js +112 -154
- package/dist/components/ConversationList/ConversationList.vue.d.ts +72 -72
- package/dist/components/ConversationList/ConversationListContent/ConversationListContent.js +27 -33
- package/dist/components/ConversationList/ConversationListContent/index.js +2 -2
- package/dist/components/ConversationList/ConversationListHeader/ConversationListHeader.js +30 -39
- package/dist/components/ConversationList/ConversationListHeader/index.js +2 -2
- package/dist/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.js +65 -81
- package/dist/components/ConversationList/ConversationPlaceHolder/index.js +2 -2
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.js +2 -2
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +72 -72
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +40 -59
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +29 -47
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +25 -42
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -111
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +18 -18
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +36 -51
- package/dist/components/ConversationList/ConversationPreview/index.js +55 -63
- package/dist/components/ConversationList/ConversationPreview/utils.js +36 -42
- package/dist/components/ConversationList/ConversationSearch/ConversationSearch.js +114 -160
- package/dist/components/ConversationList/ConversationSearch/index.js +2 -2
- package/dist/components/ConversationList/hooks/useConversation.js +12 -18
- package/dist/components/ConversationList/hooks/useConversationCreate.js +17 -18
- package/dist/components/ConversationList/i18n/en-US.js +32 -32
- package/dist/components/ConversationList/i18n/index.js +4 -4
- package/dist/components/ConversationList/i18n/zh-CN.js +32 -32
- package/dist/components/ConversationList/index.d.ts +989 -989
- package/dist/components/ConversationList/index.js +24 -32
- package/dist/components/LiveAudienceList/LiveAudienceList.js +85 -120
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +50 -72
- package/dist/components/LiveAudienceList/UserActionMenu.js +82 -124
- package/dist/components/LiveAudienceList/i18n/en-US/index.js +2 -2
- package/dist/components/LiveAudienceList/i18n/index.js +4 -4
- package/dist/components/LiveAudienceList/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveAudienceList/index.js +10 -10
- package/dist/components/LiveCoreView/CoreViewDecorate/BattleDecorate.js +152 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/BattleDecorate.vue.d.ts +2 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/BattleUserDecorate.js +66 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/BattleUserDecorate.vue.d.ts +35 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/CoHostDecorate.js +54 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/CoHostDecorate.vue.d.ts +2 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/LiveCoreDecorate.js +35 -0
- package/dist/components/LiveCoreView/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +35 -0
- package/dist/components/LiveCoreView/DefaultStreamViewUI.js +101 -154
- package/dist/components/LiveCoreView/PlayerControl/AudioControl.js +113 -236
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +78 -0
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.vue.d.ts +2 -0
- package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +150 -261
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.d.ts +11 -0
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +234 -379
- package/dist/components/LiveCoreView/PlayerControl/index.js +6 -6
- package/dist/components/LiveCoreView/PlayerControl/utils/deviceDetection.js +37 -121
- package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +32 -53
- package/dist/components/LiveCoreView/PlayerControl/utils/fullscreenManager.js +107 -177
- package/dist/components/LiveCoreView/i18n/en-US/index.d.ts +6 -0
- package/dist/components/LiveCoreView/i18n/en-US/index.js +14 -8
- package/dist/components/LiveCoreView/i18n/index.js +4 -4
- package/dist/components/LiveCoreView/i18n/zh-CN/index.d.ts +6 -0
- package/dist/components/LiveCoreView/i18n/zh-CN/index.js +14 -8
- package/dist/components/LiveCoreView/index.js +176 -301
- package/dist/components/LiveList/LiveList.js +109 -165
- package/dist/components/LiveList/LiveList.vue.d.ts +15 -3
- package/dist/components/LiveList/LiveListH5.js +109 -169
- package/dist/components/LiveList/i18n/en-US/index.d.ts +1 -1
- package/dist/components/LiveList/i18n/en-US/index.js +4 -4
- package/dist/components/LiveList/i18n/index.js +4 -4
- package/dist/components/LiveList/i18n/zh-CN/index.d.ts +1 -1
- package/dist/components/LiveList/i18n/zh-CN/index.js +4 -4
- package/dist/components/LiveList/index.d.ts +17 -1
- package/dist/components/LiveList/index.js +10 -10
- package/dist/components/LiveList/pullToRefresh.js +88 -163
- package/dist/components/LiveMonitorView/LiveMonitorView.js +72 -110
- package/dist/components/LiveMonitorView/i18n/en-US/index.js +2 -2
- package/dist/components/LiveMonitorView/i18n/index.js +4 -4
- package/dist/components/LiveMonitorView/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveMonitorView/index.js +7 -7
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +126 -188
- package/dist/components/LiveScenePanel/LiveSceneSelect.js +79 -106
- package/dist/components/LiveScenePanel/MaterialDialog.js +78 -98
- package/dist/components/LiveScenePanel/MaterialItem.js +105 -142
- package/dist/components/LiveScenePanel/MaterialRenameDialog.js +2 -2
- package/dist/components/LiveScenePanel/i18n/en-US/index.js +2 -2
- package/dist/components/LiveScenePanel/i18n/index.js +4 -4
- package/dist/components/LiveScenePanel/i18n/zh-CN/index.js +2 -2
- package/dist/components/LiveScenePanel/icons/AddIcon.js +10 -11
- package/dist/components/LiveScenePanel/icons/CameraIcon.js +9 -10
- package/dist/components/LiveScenePanel/icons/CameraMirror.js +13 -14
- package/dist/components/LiveScenePanel/icons/CameraUnmirror.js +11 -12
- package/dist/components/LiveScenePanel/icons/ImageIcon.js +8 -9
- package/dist/components/LiveScenePanel/icons/MoreIcon.js +13 -14
- package/dist/components/LiveScenePanel/icons/ScreenIcon.js +8 -9
- package/dist/components/LiveScenePanel/index.js +142 -190
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.js +2 -2
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +10 -1
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +63 -2
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.vue.d.ts +14 -13
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +63 -2
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.vue.d.ts +14 -13
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +63 -2
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.vue.d.ts +14 -13
- package/dist/components/MessageInput/AttachmentPicker/index.js +70 -72
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.js +155 -0
- package/dist/components/MessageInput/AudioCallPicker/AudioCallPicker.vue.d.ts +45 -0
- package/dist/components/MessageInput/AudioCallPicker/index.d.ts +3 -0
- package/dist/components/MessageInput/AudioCallPicker/index.js +4 -0
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +108 -96
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.vue.d.ts +34 -6
- package/dist/components/MessageInput/EmojiPicker/index.js +2 -2
- package/dist/components/MessageInput/MessageInput.js +2 -2
- package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.js +2 -2
- package/dist/components/MessageInput/QuotedMessagePreview/index.js +60 -74
- package/dist/components/MessageInput/SendButton/SendButton.js +2 -2
- package/dist/components/MessageInput/SendButton/index.js +20 -25
- package/dist/components/MessageInput/TextEditor/EditorCore.js +72 -79
- package/dist/components/MessageInput/TextEditor/TextEditor.js +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +60 -95
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.js +158 -0
- package/dist/components/MessageInput/VideoCallPicker/VideoCallPicker.vue.d.ts +45 -0
- package/dist/components/MessageInput/VideoCallPicker/index.d.ts +3 -0
- package/dist/components/MessageInput/VideoCallPicker/index.js +4 -0
- package/dist/components/MessageInput/i18n/en-US.d.ts +4 -0
- package/dist/components/MessageInput/i18n/en-US.js +7 -3
- package/dist/components/MessageInput/i18n/index.d.ts +4 -0
- package/dist/components/MessageInput/i18n/index.js +6 -6
- package/dist/components/MessageInput/i18n/zh-CN.js +2 -2
- package/dist/components/MessageInput/index.d.ts +462 -191
- package/dist/components/MessageInput/index.js +23 -25
- package/dist/components/MessageList/Message/AudioMessage/AudioMessage.js +50 -65
- package/dist/components/MessageList/Message/AudioMessage/PlayButton.js +31 -37
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +37 -52
- package/dist/components/MessageList/Message/AudioMessage/index.js +2 -2
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +60 -0
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue.d.ts +16 -0
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/index.js +4 -0
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.js +49 -2
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.vue.d.ts +15 -1
- package/dist/components/MessageList/Message/CustomMessage/index.js +2 -10
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +16 -20
- package/dist/components/MessageList/Message/FaceMessage/index.js +2 -2
- package/dist/components/MessageList/Message/FileMessage/FileMessage.js +57 -70
- package/dist/components/MessageList/Message/FileMessage/index.js +2 -2
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.js +2 -2
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +13 -23
- package/dist/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.d.ts +1 -1
- package/dist/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.js +41 -59
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +106 -169
- package/dist/components/MessageList/Message/ImageMessage/index.js +2 -2
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +7 -7
- package/dist/components/MessageList/Message/LocationMessage/index.js +2 -2
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +7 -7
- package/dist/components/MessageList/Message/MergerMessage/index.js +2 -2
- package/dist/components/MessageList/Message/Message.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +800 -1074
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.js +36 -44
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +116 -123
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +47 -73
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +24 -27
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/index.js +2 -2
- package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.js +23 -28
- package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.js +39 -48
- package/dist/components/MessageList/Message/RecalledMessage/index.js +2 -2
- package/dist/components/MessageList/Message/TextMessage/TextMessage.js +80 -102
- package/dist/components/MessageList/Message/TextMessage/index.js +2 -2
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +68 -92
- package/dist/components/MessageList/Message/VideoMessage/index.js +2 -2
- package/dist/components/MessageList/Message/index.js +18 -20
- package/dist/components/MessageList/MessageForward/ForwardListItem.js +46 -53
- package/dist/components/MessageList/MessageForward/MessageForward.js +102 -124
- package/dist/components/MessageList/MessageForward/index.js +2 -2
- package/dist/components/MessageList/MessageList.js +129 -204
- package/dist/components/MessageList/MessageListContext.js +9 -10
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +20 -28
- package/dist/components/MessageList/MessageTimeDivider/index.js +2 -2
- package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.js +294 -379
- package/dist/components/MessageList/ReadReceiptInfo/index.js +2 -2
- package/dist/components/MessageList/ScrollToBottom/ScrollToBottom.js +20 -25
- package/dist/components/MessageList/ScrollToBottom/index.js +2 -2
- package/dist/components/MessageList/i18n/en-US.d.ts +20 -1
- package/dist/components/MessageList/i18n/en-US.js +21 -2
- package/dist/components/MessageList/i18n/index.d.ts +134 -92
- package/dist/components/MessageList/i18n/index.js +6 -6
- package/dist/components/MessageList/i18n/zh-CN.d.ts +20 -1
- package/dist/components/MessageList/i18n/zh-CN.js +21 -2
- package/dist/components/MessageList/index.js +9 -10
- package/dist/components/MicButton/AudioIcon.js +27 -37
- package/dist/components/MicButton/index.js +37 -52
- package/dist/components/Search/Search.js +117 -156
- package/dist/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.js +378 -505
- package/dist/components/Search/SearchAdvanced/DateRangePicker/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.js +147 -211
- package/dist/components/Search/SearchAdvanced/MessageAdvanced/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/SearchAdvanced.js +46 -60
- package/dist/components/Search/SearchAdvanced/SearchTab/SearchTab.js +39 -51
- package/dist/components/Search/SearchAdvanced/SearchTab/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/Slider/Slider.js +53 -82
- package/dist/components/Search/SearchAdvanced/Slider/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.js +247 -317
- package/dist/components/Search/SearchAdvanced/UserAdvanced/index.js +2 -2
- package/dist/components/Search/SearchAdvanced/index.js +12 -12
- package/dist/components/Search/SearchBar/SearchBar.js +98 -122
- package/dist/components/Search/SearchBar/index.js +2 -2
- package/dist/components/Search/SearchResults/EmptyResult/EmptyResult.js +26 -37
- package/dist/components/Search/SearchResults/EmptyResult/index.js +2 -2
- package/dist/components/Search/SearchResults/Loading/Loading.js +13 -19
- package/dist/components/Search/SearchResults/Loading/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResults.js +233 -339
- package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.js +61 -83
- package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/Group/Group.js +40 -52
- package/dist/components/Search/SearchResults/SearchResultsItem/Group/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +134 -181
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.js +40 -46
- package/dist/components/Search/SearchResults/SearchResultsItem/User/User.js +56 -75
- package/dist/components/Search/SearchResults/SearchResultsItem/User/index.js +2 -2
- package/dist/components/Search/SearchResults/SearchResultsItem/index.js +11 -11
- package/dist/components/Search/SearchResults/SearchResultsItem/utils/highlightText.js +17 -36
- package/dist/components/Search/SearchResults/SearchResultsItem/utils/index.js +2 -2
- package/dist/components/Search/SearchResults/index.js +16 -16
- package/dist/components/Search/i18n/en-US/DateRangePicker.js +3 -3
- package/dist/components/Search/i18n/en-US/Search.js +3 -3
- package/dist/components/Search/i18n/en-US/index.js +7 -7
- package/dist/components/Search/i18n/index.js +4 -4
- package/dist/components/Search/i18n/zh-CN/DateRangePicker.js +3 -3
- package/dist/components/Search/i18n/zh-CN/Search.js +3 -3
- package/dist/components/Search/i18n/zh-CN/index.js +7 -7
- package/dist/components/Search/index.js +20 -26
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +68 -100
- package/dist/components/StreamMixer/LocalMixer/index.js +103 -171
- package/dist/components/StreamMixer/i18n/en-US/index.js +2 -2
- package/dist/components/StreamMixer/i18n/index.js +4 -4
- package/dist/components/StreamMixer/i18n/zh-CN/index.js +2 -2
- package/dist/components/StreamMixer/icons/CameraMirror.js +13 -14
- package/dist/components/StreamMixer/icons/Delete.js +13 -14
- package/dist/components/StreamMixer/icons/Down.js +10 -11
- package/dist/components/StreamMixer/icons/Rotation.js +11 -12
- package/dist/components/StreamMixer/icons/Up.js +10 -11
- package/dist/components/StreamMixer/index.js +19 -21
- package/dist/components/StreamView/Layout/CustomLayout.js +132 -209
- package/dist/components/StreamView/Layout/FloatLayout.js +136 -199
- package/dist/components/StreamView/Layout/GridLayout.js +117 -197
- package/dist/components/StreamView/Layout/MeetingLayout.js +129 -231
- package/dist/components/StreamView/Layout/MixLayout.js +70 -98
- package/dist/components/StreamView/common/ArrowStroke.js +26 -29
- package/dist/components/StreamView/common/LocalScreenView/index.js +82 -92
- package/dist/components/StreamView/common/StreamCover/index.js +33 -62
- package/dist/components/StreamView/common/StreamList/index.js +103 -163
- package/dist/components/StreamView/common/StreamPlay/index.js +58 -98
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.js +58 -90
- package/dist/components/StreamView/common/StreamRegion/index.js +2 -2
- package/dist/components/StreamView/index.js +64 -66
- package/dist/components/StreamView/manager/mediaManager.js +125 -236
- package/dist/components/UserList/AllUserActions/index.js +2 -2
- package/dist/components/UserList/AllUserActions/indexH5.js +59 -69
- package/dist/components/UserList/AllUserActions/indexPC.js +61 -73
- package/dist/components/UserList/AllUserActions/useIndexHooks.js +32 -39
- package/dist/components/UserList/UserItem/UserAction/index.js +2 -2
- package/dist/components/UserList/UserItem/UserAction/indexH5.js +47 -61
- package/dist/components/UserList/UserItem/UserAction/indexPC.js +86 -130
- package/dist/components/UserList/UserItem/UserInfo/index.js +67 -117
- package/dist/components/UserList/UserItem/UserInvite/index.js +18 -21
- package/dist/components/UserList/UserItem/index.js +2 -2
- package/dist/components/UserList/UserItem/indexH5.js +42 -54
- package/dist/components/UserList/UserItem/indexPC.js +32 -37
- package/dist/components/UserList/UserListContent/index.js +30 -44
- package/dist/components/UserList/UserListSearch/index.js +20 -26
- package/dist/components/UserList/index.js +50 -63
- package/dist/components/UserPicker/UserPicker.js +110 -148
- package/dist/components/UserPicker/components/ListMode/ListMode.js +70 -96
- package/dist/components/UserPicker/components/ListMode/index.js +2 -2
- package/dist/components/UserPicker/components/SearchBar/SearchBar.js +43 -58
- package/dist/components/UserPicker/components/SearchBar/index.js +2 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +69 -94
- package/dist/components/UserPicker/components/SelectedPanel/index.js +2 -2
- package/dist/components/UserPicker/components/TreeMode/TreeMode.js +33 -42
- package/dist/components/UserPicker/components/TreeMode/TreeNode.js +81 -106
- package/dist/components/UserPicker/components/TreeMode/index.js +2 -2
- package/dist/components/UserPicker/hooks/useSearchFilter.js +39 -80
- package/dist/components/UserPicker/hooks/useSelection.js +155 -313
- package/dist/components/UserPicker/hooks/useTreeState.js +17 -37
- package/dist/components/UserPicker/i18n/en-US.js +2 -2
- package/dist/components/UserPicker/i18n/index.js +6 -6
- package/dist/components/UserPicker/i18n/zh-CN.js +2 -2
- package/dist/components/UserPicker/index.js +7 -7
- package/dist/components/VideoSetting/CameraSelect.js +46 -58
- package/dist/components/VideoSetting/VideoMediaControl.js +45 -65
- package/dist/components/VideoSetting/VideoPreview.js +31 -40
- package/dist/components/VideoSetting/VideoProfile.js +38 -46
- package/dist/components/VideoSetting/VideoRequestDialog.js +2 -2
- package/dist/components/VideoSetting/VideoSettingTab.js +43 -55
- package/dist/components/VideoSetting/index.js +3 -3
- package/dist/components/VideoSettingPanel/CameraSelect.js +45 -57
- package/dist/components/VideoSettingPanel/VideoPreview.js +30 -39
- package/dist/components/VideoSettingPanel/VideoProfile.js +36 -44
- package/dist/components/VideoSettingPanel/i18n/en-US/index.js +5 -5
- package/dist/components/VideoSettingPanel/i18n/index.js +4 -4
- package/dist/components/VideoSettingPanel/i18n/zh-CN/index.js +5 -5
- package/dist/components/VideoSettingPanel/index.js +48 -63
- package/dist/constants/emoji.js +3 -4
- package/dist/directives/vClickOutside.js +9 -23
- package/dist/directives/vDblTouch.js +26 -51
- package/dist/directives/vTap.js +37 -68
- package/dist/directives/vTouchScale.js +83 -155
- package/dist/handler/index.js +4 -4
- package/dist/handler/translator.js +65 -97
- package/dist/handler/voiceConverter.js +21 -30
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/useAudioControl.js +44 -128
- package/dist/hooks/useLongPress.js +41 -75
- package/dist/hooks/useMessageActions.d.ts +1 -1
- package/dist/hooks/useMessageActions.js +46 -57
- package/dist/hooks/useMouseHover.js +16 -26
- package/dist/hooks/useReadReceipt/useReadReceipt.js +66 -114
- package/dist/hooks/useRoomActions/index.js +11 -14
- package/dist/hooks/useRoomActions/useRoomAudioAction.js +39 -44
- package/dist/hooks/useRoomActions/useRoomScreenAction.js +41 -48
- package/dist/hooks/useRoomActions/useRoomVideoAction.js +38 -44
- package/dist/hooks/useRoomEngine.js +14 -17
- package/dist/hooks/useScroll.js +52 -89
- package/dist/hooks/useUserActions/index.js +81 -117
- package/dist/hooks/useUserActions/useAdminAction.js +29 -35
- package/dist/hooks/useUserActions/useAudioAction.js +36 -40
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.js +59 -69
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.js +40 -49
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.js +43 -51
- package/dist/hooks/useUserActions/useChatAction.js +23 -25
- package/dist/hooks/useUserActions/useKickUserAction.js +27 -32
- package/dist/hooks/useUserActions/useMemberInviteAction.js +24 -40
- package/dist/hooks/useUserActions/useSeatAction.js +96 -108
- package/dist/hooks/useUserActions/useTransferOwnerAction.js +40 -47
- package/dist/hooks/useUserActions/useVideoAction.js +35 -38
- package/dist/hooks/useZIndex.js +7 -12
- package/dist/i18n/index.js +4 -4
- package/dist/index-CeQ4nl87.js +44 -0
- package/dist/index-D-KJvDvy.js +5125 -0
- package/dist/index-D88ja_7_.js +12047 -0
- package/dist/index-DPczIrgX.js +42 -0
- package/dist/index-DTq2ybsB.js +33 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +178 -159
- package/dist/index.vue_vue_type_script_setup_true_lang-DZIBxSQ7.js +32 -0
- package/dist/locales/en-US.js +31 -31
- package/dist/locales/index.js +29 -34
- package/dist/locales/zh-CN.js +31 -31
- package/dist/rtc/index.d.ts +34 -2
- package/dist/rtc/index.js +63 -86
- package/dist/rtc/server.js +62 -85
- package/dist/states/BarrageListState/BarrageListState.js +98 -183
- package/dist/states/BarrageListState/index.js +2 -2
- package/dist/states/BattleState.d.ts +46 -0
- package/dist/states/BattleState.js +117 -0
- package/dist/states/C2CSettingState/C2CSettingState.js +52 -92
- package/dist/states/C2CSettingState/index.js +2 -2
- package/dist/states/CoGuestState.d.ts +1 -1
- package/dist/states/CoGuestState.js +191 -291
- package/dist/states/CoHostState/CoHostState.d.ts +30 -0
- package/dist/states/CoHostState/CoHostState.js +209 -0
- package/dist/states/CoHostState/index.d.ts +1 -0
- package/dist/states/CoHostState/index.js +4 -0
- package/dist/states/ContactListState/ContactListState.js +175 -271
- package/dist/states/ContactListState/index.js +2 -2
- package/dist/states/ConversationListState/ConversationListState.js +61 -112
- package/dist/states/ConversationListState/index.js +2 -2
- package/dist/states/DeviceState.js +240 -389
- package/dist/states/GroupSettingState/GroupSettingState.js +220 -378
- package/dist/states/GroupSettingState/index.js +7 -7
- package/dist/states/GroupSettingState/permissions.js +240 -250
- package/dist/states/GroupSettingState/types.js +5 -41
- package/dist/states/LiveAudienceState.js +100 -132
- package/dist/states/LiveMonitorState/api/http.js +1245 -1910
- package/dist/states/LiveMonitorState/index.js +92 -148
- package/dist/states/LiveMonitorState/player/adapters/trtc.js +54 -106
- package/dist/states/LiveMonitorState/player/base/basePlayer.js +111 -169
- package/dist/states/LiveMonitorState/player/index.js +10 -10
- package/dist/states/LiveMonitorState/player/manager/playerManager.js +27 -33
- package/dist/states/LiveMonitorState/player/types/index.js +8 -8
- package/dist/states/LiveMonitorState/player/types/player.js +3 -13
- package/dist/states/LiveMonitorState/player/types/trtc.js +6 -20
- package/dist/states/LiveMonitorState/utils/index.js +17 -22
- package/dist/states/LiveSeatState/index.js +16 -16
- package/dist/states/LiveSeatState/seatEventManager.js +54 -75
- package/dist/states/LiveSeatState/seatManager.js +29 -36
- package/dist/states/LiveSeatState/store.js +18 -25
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +43 -65
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +55 -83
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +59 -97
- package/dist/states/LiveSeatState/usePlayStream/index.js +44 -96
- package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.js +43 -55
- package/dist/states/LiveState/index.js +190 -275
- package/dist/states/LoginState.js +48 -62
- package/dist/states/MessageActionState/MessageActionState.d.ts +6 -6
- package/dist/states/MessageActionState/MessageActionState.js +45 -56
- package/dist/states/MessageActionState/index.js +2 -2
- package/dist/states/MessageInputState/MessageInputState.js +90 -139
- package/dist/states/MessageInputState/index.js +4 -4
- package/dist/states/MessageInputState/type.js +2 -10
- package/dist/states/MessageInputState/utils.js +20 -21
- package/dist/states/MessageListState/MessageListState.js +65 -89
- package/dist/states/MessageListState/index.js +2 -2
- package/dist/states/RoomState.js +223 -332
- package/dist/states/SearchState.d.ts +2 -2
- package/dist/states/SearchState.js +229 -356
- package/dist/states/SeatStore.js +140 -213
- package/dist/states/UserState/index.js +31 -51
- package/dist/states/UserState/store.js +95 -147
- package/dist/states/UserState/userEventManager.js +85 -134
- package/dist/states/UserState/userManager.js +184 -232
- package/dist/states/VideoMixerState.js +181 -228
- package/dist/statistical/const.js +2 -6
- package/dist/statistical/index.js +4 -4
- package/dist/statistical/statistical.js +12 -12
- package/dist/styles/index.css +1 -13145
- package/dist/types/battle.d.ts +11 -0
- package/dist/types/battle.js +1 -0
- package/dist/types/call.d.ts +55 -0
- package/dist/types/call.js +4 -0
- package/dist/types/chatSetting.js +4 -4
- package/dist/types/coGuest.js +2 -8
- package/dist/types/coHost.d.ts +44 -4
- package/dist/types/coHost.js +4 -8
- package/dist/types/contact.js +3 -17
- package/dist/types/conversation.js +6 -36
- package/dist/types/device.d.ts +4 -0
- package/dist/types/device.js +8 -45
- package/dist/types/engine.d.ts +23 -7
- package/dist/types/engine.js +5 -23
- package/dist/types/index.d.ts +9 -6
- package/dist/types/index.js +92 -84
- package/dist/types/live.js +4 -21
- package/dist/types/message.js +4 -29
- package/dist/types/monitor.js +2 -6
- package/dist/types/room.js +3 -16
- package/dist/types/search.js +9 -15
- package/dist/types/seat.d.ts +4 -4
- package/dist/types/stream.js +3 -14
- package/dist/types/types.js +32 -329
- package/dist/types/user.d.ts +0 -3
- package/dist/types/user.js +8 -65
- package/dist/useId-CtirfF0W.js +12 -0
- package/dist/utils/call.d.ts +6 -2
- package/dist/utils/call.js +126 -11
- package/dist/utils/copyText.js +20 -33
- package/dist/utils/documentLink.js +2 -2
- package/dist/utils/domOperation.js +99 -122
- package/dist/utils/downFile.js +11 -19
- package/dist/utils/emoji.js +24 -31
- package/dist/utils/enableSampleTaskStatus.js +5 -8
- package/dist/utils/env.js +8 -13
- package/dist/utils/environment.js +14 -18
- package/dist/utils/index.js +36 -36
- package/dist/utils/json.js +34 -58
- package/dist/utils/lodash.js +63 -109
- package/dist/utils/riseInput.js +19 -36
- package/dist/utils/time.js +640 -934
- package/dist/utils/type-check.js +21 -46
- package/dist/utils/utils.js +131 -235
- package/dist/utils-DaB7eSu5.js +48 -0
- package/package.json +5 -4
- package/src/chat/index.ts +18 -0
- package/src/components/BarrageInput/TextEditor/Editor.scss +2 -2
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +1 -1
- package/src/components/ChatSetting/ChatSetting.vue +3 -3
- package/src/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.vue +3 -0
- package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +1 -0
- package/src/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.vue +1 -0
- package/src/components/CoGuestPanel/CoGuestPanel.vue +2 -1
- package/src/components/CoHostPanel/BattlePanel.vue +271 -0
- package/src/components/CoHostPanel/CoHostPanel.vue +218 -0
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +264 -0
- package/src/components/CoHostPanel/ConnectionPanel.vue +549 -0
- package/src/components/CoHostPanel/RecommendHostList.vue +306 -0
- package/src/components/CoHostPanel/UserList.vue +93 -0
- package/src/components/CoHostPanel/i18n/en-US/index.ts +78 -0
- package/src/components/CoHostPanel/i18n/index.ts +4 -0
- package/src/components/CoHostPanel/i18n/zh-CN/index.ts +79 -0
- package/src/components/CoHostPanel/index.ts +7 -0
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -0
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +1 -0
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -0
- package/src/components/LiveCoreView/CoreViewDecorate/BattleDecorate.vue +420 -0
- package/src/components/LiveCoreView/CoreViewDecorate/BattleUserDecorate.vue +141 -0
- package/src/components/LiveCoreView/CoreViewDecorate/CoHostDecorate.vue +116 -0
- package/src/components/LiveCoreView/CoreViewDecorate/LiveCoreDecorate.vue +70 -0
- package/src/components/LiveCoreView/PlayerControl/MultiResolution.vue +130 -0
- package/src/components/LiveCoreView/PlayerControl/PlayerControl.vue +10 -8
- package/src/components/LiveCoreView/PlayerControl/PlayerControlState.ts +117 -1
- package/src/components/LiveCoreView/assets/img/defeat.png +0 -0
- package/src/components/LiveCoreView/assets/img/draw.png +0 -0
- package/src/components/LiveCoreView/assets/img/victory.png +0 -0
- package/src/components/LiveCoreView/assets/svg/BattleOrdinaryBadge.svg +20 -0
- package/src/components/LiveCoreView/assets/svg/BattleTopBadge.svg +16 -0
- package/src/components/LiveCoreView/assets/svg/blueBkg.svg +9 -0
- package/src/components/LiveCoreView/assets/svg/redBkg.svg +9 -0
- package/src/components/LiveCoreView/assets/svg/s.svg +17 -0
- package/src/components/LiveCoreView/assets/svg/v.svg +17 -0
- package/src/components/LiveCoreView/i18n/en-US/index.ts +6 -0
- package/src/components/LiveCoreView/i18n/zh-CN/index.ts +6 -0
- package/src/components/LiveCoreView/index.vue +4 -1
- package/src/components/LiveList/LiveList.vue +61 -106
- package/src/components/LiveList/LiveListH5.vue +1 -1
- package/src/components/LiveList/i18n/en-US/index.ts +1 -1
- package/src/components/LiveList/i18n/zh-CN/index.ts +1 -1
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +10 -8
- package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +59 -31
- package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +58 -31
- package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +58 -31
- package/src/components/MessageInput/AudioCallPicker/AudioCallPicker.vue +240 -0
- package/src/components/MessageInput/AudioCallPicker/index.ts +3 -0
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +107 -18
- package/src/components/MessageInput/MessageInput.module.scss +1 -1
- package/src/components/MessageInput/MessageInput.vue +6 -2
- package/src/components/MessageInput/VideoCallPicker/VideoCallPicker.vue +246 -0
- package/src/components/MessageInput/VideoCallPicker/index.ts +3 -0
- package/src/components/MessageInput/i18n/en-US.ts +4 -0
- package/src/components/MessageInput/index.ts +10 -4
- package/src/components/MessageInput/types.d.ts +3 -1
- package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +67 -0
- package/src/components/MessageList/Message/CustomMessage/CallMessage/index.ts +3 -0
- package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +59 -2
- package/src/components/MessageList/Message/CustomMessage/index.ts +1 -1
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +9 -10
- package/src/components/MessageList/Message/GroupTipMessage/resolveGroupTipMessage.ts +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +30 -18
- package/src/components/MessageList/i18n/en-US.ts +24 -1
- package/src/components/MessageList/i18n/index.ts +4 -4
- package/src/components/MessageList/i18n/zh-CN.ts +24 -1
- package/src/components/MessageList/index.ts +2 -2
- package/src/components/UserPicker/UserPicker.vue +0 -2
- package/src/hooks/index.ts +1 -2
- package/src/hooks/useMessageActions.ts +3 -3
- package/src/index.ts +2 -1
- package/src/rtc/index.ts +5 -0
- package/src/types/battle.ts +12 -0
- package/src/types/call.ts +62 -0
- package/src/types/coHost.ts +46 -4
- package/src/types/device.ts +5 -0
- package/src/types/engine.ts +45 -21
- package/src/types/index.ts +12 -6
- package/src/types/seat.ts +5 -5
- package/src/types/user.ts +0 -4
- package/src/utils/call.ts +233 -5
- package/src/utils/time.ts +1 -1
- package/dist/AttachmentPicker.module-BesmtGyl.js +0 -11
- package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-BmX-qsat.js +0 -108
- package/dist/DialogPortal-DWeT-J6v.js +0 -496
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js +0 -76
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js +0 -76
- package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-CVh4Regz.js +0 -43
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-wUJPjWbx.js +0 -128
- package/dist/PopoverTrigger-BKOIHfdS.js +0 -679
- package/dist/PopperContent-DtL7HVWz.js +0 -2227
- package/dist/Teleport-CMvGsENT.js +0 -1365
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js +0 -76
- package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-CnE-LwNh.js +0 -108
- package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +0 -10
- package/dist/index-BF6QB9jF.js +0 -63
- package/dist/index-BPFJrNlA.js +0 -15915
- package/dist/index-CX1Zs9En.js +0 -44
- package/dist/index-DRcLhqhU.js +0 -38
- package/dist/index-v15JHz0-.js +0 -7655
- package/dist/index.vue_vue_type_script_setup_true_lang-EcKm3pYY.js +0 -36
- package/dist/states/CoHostState.d.ts +0 -22
- package/dist/states/CoHostState.js +0 -178
- package/dist/useId-CsgLY8y3.js +0 -13
- package/dist/utils-KP1QpeUS.js +0 -59
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +0 -28
|
@@ -1,2227 +0,0 @@
|
|
|
1
|
-
import { watchEffect, getCurrentInstance, toRef, computed, camelize, ref, onMounted, defineComponent, renderSlot, watchPostEffect, createBlock, openBlock, unref, withCtx, shallowRef, watch, getCurrentScope, onScopeDispose, shallowReadonly, mergeDefaults, createElementBlock, normalizeStyle, createVNode, mergeProps } from "vue";
|
|
2
|
-
import { h as isClient, f as useEmitAsProps, j as unrefElement, c as createContext, a as useForwardExpose, e as Primitive, k as computedEager } from "./Teleport-CMvGsENT.js";
|
|
3
|
-
let count = 0;
|
|
4
|
-
function useFocusGuards() {
|
|
5
|
-
watchEffect((cleanupFn) => {
|
|
6
|
-
if (!isClient) return;
|
|
7
|
-
const edgeGuards = document.querySelectorAll("[data-reka-focus-guard]");
|
|
8
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
9
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
10
|
-
count++;
|
|
11
|
-
cleanupFn(() => {
|
|
12
|
-
if (count === 1) document.querySelectorAll("[data-reka-focus-guard]").forEach((node) => node.remove());
|
|
13
|
-
count--;
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function createFocusGuard() {
|
|
18
|
-
const element = document.createElement("span");
|
|
19
|
-
element.setAttribute("data-reka-focus-guard", "");
|
|
20
|
-
element.tabIndex = 0;
|
|
21
|
-
element.style.outline = "none";
|
|
22
|
-
element.style.opacity = "0";
|
|
23
|
-
element.style.position = "fixed";
|
|
24
|
-
element.style.pointerEvents = "none";
|
|
25
|
-
return element;
|
|
26
|
-
}
|
|
27
|
-
function useForwardProps(props) {
|
|
28
|
-
const vm = getCurrentInstance();
|
|
29
|
-
const defaultProps = Object.keys((vm == null ? void 0 : vm.type.props) ?? {}).reduce((prev, curr) => {
|
|
30
|
-
const defaultValue = (vm == null ? void 0 : vm.type.props[curr]).default;
|
|
31
|
-
if (defaultValue !== void 0) prev[curr] = defaultValue;
|
|
32
|
-
return prev;
|
|
33
|
-
}, {});
|
|
34
|
-
const refProps = toRef(props);
|
|
35
|
-
return computed(() => {
|
|
36
|
-
const preservedProps = {};
|
|
37
|
-
const assignedProps = (vm == null ? void 0 : vm.vnode.props) ?? {};
|
|
38
|
-
Object.keys(assignedProps).forEach((key) => {
|
|
39
|
-
preservedProps[camelize(key)] = assignedProps[key];
|
|
40
|
-
});
|
|
41
|
-
return Object.keys({
|
|
42
|
-
...defaultProps,
|
|
43
|
-
...preservedProps
|
|
44
|
-
}).reduce((prev, curr) => {
|
|
45
|
-
if (refProps.value[curr] !== void 0) prev[curr] = refProps.value[curr];
|
|
46
|
-
return prev;
|
|
47
|
-
}, {});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function useForwardPropsEmits(props, emit) {
|
|
51
|
-
const parsedProps = useForwardProps(props);
|
|
52
|
-
const emitsAsProps = emit ? useEmitAsProps(emit) : {};
|
|
53
|
-
return computed(() => ({
|
|
54
|
-
...parsedProps.value,
|
|
55
|
-
...emitsAsProps
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
function useSize(element) {
|
|
59
|
-
const size2 = ref();
|
|
60
|
-
const width = computed(() => {
|
|
61
|
-
var _a;
|
|
62
|
-
return ((_a = size2.value) == null ? void 0 : _a.width) ?? 0;
|
|
63
|
-
});
|
|
64
|
-
const height = computed(() => {
|
|
65
|
-
var _a;
|
|
66
|
-
return ((_a = size2.value) == null ? void 0 : _a.height) ?? 0;
|
|
67
|
-
});
|
|
68
|
-
onMounted(() => {
|
|
69
|
-
const el = unrefElement(element);
|
|
70
|
-
if (el) {
|
|
71
|
-
size2.value = {
|
|
72
|
-
width: el.offsetWidth,
|
|
73
|
-
height: el.offsetHeight
|
|
74
|
-
};
|
|
75
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
76
|
-
if (!Array.isArray(entries)) return;
|
|
77
|
-
if (!entries.length) return;
|
|
78
|
-
const entry = entries[0];
|
|
79
|
-
let width$1;
|
|
80
|
-
let height$1;
|
|
81
|
-
if ("borderBoxSize" in entry) {
|
|
82
|
-
const borderSizeEntry = entry.borderBoxSize;
|
|
83
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
84
|
-
width$1 = borderSize.inlineSize;
|
|
85
|
-
height$1 = borderSize.blockSize;
|
|
86
|
-
} else {
|
|
87
|
-
width$1 = el.offsetWidth;
|
|
88
|
-
height$1 = el.offsetHeight;
|
|
89
|
-
}
|
|
90
|
-
size2.value = {
|
|
91
|
-
width: width$1,
|
|
92
|
-
height: height$1
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
resizeObserver.observe(el, { box: "border-box" });
|
|
96
|
-
return () => resizeObserver.unobserve(el);
|
|
97
|
-
} else size2.value = void 0;
|
|
98
|
-
});
|
|
99
|
-
return {
|
|
100
|
-
width,
|
|
101
|
-
height
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
const [injectPopperRootContext, providePopperRootContext] = createContext("PopperRoot");
|
|
105
|
-
var PopperRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
106
|
-
inheritAttrs: false,
|
|
107
|
-
__name: "PopperRoot",
|
|
108
|
-
setup(__props) {
|
|
109
|
-
const anchor = ref();
|
|
110
|
-
providePopperRootContext({
|
|
111
|
-
anchor,
|
|
112
|
-
onAnchorChange: (element) => anchor.value = element
|
|
113
|
-
});
|
|
114
|
-
return (_ctx, _cache) => {
|
|
115
|
-
return renderSlot(_ctx.$slots, "default");
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
var PopperRoot_default = PopperRoot_vue_vue_type_script_setup_true_lang_default;
|
|
120
|
-
var PopperAnchor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
121
|
-
__name: "PopperAnchor",
|
|
122
|
-
props: {
|
|
123
|
-
reference: {
|
|
124
|
-
type: null,
|
|
125
|
-
required: false
|
|
126
|
-
},
|
|
127
|
-
asChild: {
|
|
128
|
-
type: Boolean,
|
|
129
|
-
required: false
|
|
130
|
-
},
|
|
131
|
-
as: {
|
|
132
|
-
type: null,
|
|
133
|
-
required: false
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
setup(__props) {
|
|
137
|
-
const props = __props;
|
|
138
|
-
const { forwardRef, currentElement } = useForwardExpose();
|
|
139
|
-
const rootContext = injectPopperRootContext();
|
|
140
|
-
watchPostEffect(() => {
|
|
141
|
-
rootContext.onAnchorChange(props.reference ?? currentElement.value);
|
|
142
|
-
});
|
|
143
|
-
return (_ctx, _cache) => {
|
|
144
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
145
|
-
ref: unref(forwardRef),
|
|
146
|
-
as: _ctx.as,
|
|
147
|
-
"as-child": _ctx.asChild
|
|
148
|
-
}, {
|
|
149
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
150
|
-
_: 3
|
|
151
|
-
}, 8, ["as", "as-child"]);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
var PopperAnchor_default = PopperAnchor_vue_vue_type_script_setup_true_lang_default;
|
|
156
|
-
function isNotNull(value) {
|
|
157
|
-
return value !== null;
|
|
158
|
-
}
|
|
159
|
-
function transformOrigin(options) {
|
|
160
|
-
return {
|
|
161
|
-
name: "transformOrigin",
|
|
162
|
-
options,
|
|
163
|
-
fn(data) {
|
|
164
|
-
var _a, _b, _c;
|
|
165
|
-
const { placement, rects, middlewareData } = data;
|
|
166
|
-
const cannotCenterArrow = ((_a = middlewareData.arrow) == null ? void 0 : _a.centerOffset) !== 0;
|
|
167
|
-
const isArrowHidden = cannotCenterArrow;
|
|
168
|
-
const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
|
|
169
|
-
const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
|
|
170
|
-
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
171
|
-
const noArrowAlign = {
|
|
172
|
-
start: "0%",
|
|
173
|
-
center: "50%",
|
|
174
|
-
end: "100%"
|
|
175
|
-
}[placedAlign];
|
|
176
|
-
const arrowXCenter = (((_b = middlewareData.arrow) == null ? void 0 : _b.x) ?? 0) + arrowWidth / 2;
|
|
177
|
-
const arrowYCenter = (((_c = middlewareData.arrow) == null ? void 0 : _c.y) ?? 0) + arrowHeight / 2;
|
|
178
|
-
let x = "";
|
|
179
|
-
let y = "";
|
|
180
|
-
if (placedSide === "bottom") {
|
|
181
|
-
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
182
|
-
y = `${-arrowHeight}px`;
|
|
183
|
-
} else if (placedSide === "top") {
|
|
184
|
-
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
185
|
-
y = `${rects.floating.height + arrowHeight}px`;
|
|
186
|
-
} else if (placedSide === "right") {
|
|
187
|
-
x = `${-arrowHeight}px`;
|
|
188
|
-
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
189
|
-
} else if (placedSide === "left") {
|
|
190
|
-
x = `${rects.floating.width + arrowHeight}px`;
|
|
191
|
-
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
192
|
-
}
|
|
193
|
-
return { data: {
|
|
194
|
-
x,
|
|
195
|
-
y
|
|
196
|
-
} };
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
function getSideAndAlignFromPlacement(placement) {
|
|
201
|
-
const [side, align = "center"] = placement.split("-");
|
|
202
|
-
return [side, align];
|
|
203
|
-
}
|
|
204
|
-
const sides = ["top", "right", "bottom", "left"];
|
|
205
|
-
const min = Math.min;
|
|
206
|
-
const max = Math.max;
|
|
207
|
-
const round = Math.round;
|
|
208
|
-
const floor = Math.floor;
|
|
209
|
-
const createCoords = (v) => ({
|
|
210
|
-
x: v,
|
|
211
|
-
y: v
|
|
212
|
-
});
|
|
213
|
-
const oppositeSideMap = {
|
|
214
|
-
left: "right",
|
|
215
|
-
right: "left",
|
|
216
|
-
bottom: "top",
|
|
217
|
-
top: "bottom"
|
|
218
|
-
};
|
|
219
|
-
const oppositeAlignmentMap = {
|
|
220
|
-
start: "end",
|
|
221
|
-
end: "start"
|
|
222
|
-
};
|
|
223
|
-
function clamp(start, value, end) {
|
|
224
|
-
return max(start, min(value, end));
|
|
225
|
-
}
|
|
226
|
-
function evaluate(value, param) {
|
|
227
|
-
return typeof value === "function" ? value(param) : value;
|
|
228
|
-
}
|
|
229
|
-
function getSide(placement) {
|
|
230
|
-
return placement.split("-")[0];
|
|
231
|
-
}
|
|
232
|
-
function getAlignment(placement) {
|
|
233
|
-
return placement.split("-")[1];
|
|
234
|
-
}
|
|
235
|
-
function getOppositeAxis(axis) {
|
|
236
|
-
return axis === "x" ? "y" : "x";
|
|
237
|
-
}
|
|
238
|
-
function getAxisLength(axis) {
|
|
239
|
-
return axis === "y" ? "height" : "width";
|
|
240
|
-
}
|
|
241
|
-
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
242
|
-
function getSideAxis(placement) {
|
|
243
|
-
return yAxisSides.has(getSide(placement)) ? "y" : "x";
|
|
244
|
-
}
|
|
245
|
-
function getAlignmentAxis(placement) {
|
|
246
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
247
|
-
}
|
|
248
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
249
|
-
if (rtl === void 0) {
|
|
250
|
-
rtl = false;
|
|
251
|
-
}
|
|
252
|
-
const alignment = getAlignment(placement);
|
|
253
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
254
|
-
const length = getAxisLength(alignmentAxis);
|
|
255
|
-
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
256
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
257
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
258
|
-
}
|
|
259
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
260
|
-
}
|
|
261
|
-
function getExpandedPlacements(placement) {
|
|
262
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
263
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
264
|
-
}
|
|
265
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
266
|
-
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
267
|
-
}
|
|
268
|
-
const lrPlacement = ["left", "right"];
|
|
269
|
-
const rlPlacement = ["right", "left"];
|
|
270
|
-
const tbPlacement = ["top", "bottom"];
|
|
271
|
-
const btPlacement = ["bottom", "top"];
|
|
272
|
-
function getSideList(side, isStart, rtl) {
|
|
273
|
-
switch (side) {
|
|
274
|
-
case "top":
|
|
275
|
-
case "bottom":
|
|
276
|
-
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
277
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
278
|
-
case "left":
|
|
279
|
-
case "right":
|
|
280
|
-
return isStart ? tbPlacement : btPlacement;
|
|
281
|
-
default:
|
|
282
|
-
return [];
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
286
|
-
const alignment = getAlignment(placement);
|
|
287
|
-
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
288
|
-
if (alignment) {
|
|
289
|
-
list = list.map((side) => side + "-" + alignment);
|
|
290
|
-
if (flipAlignment) {
|
|
291
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return list;
|
|
295
|
-
}
|
|
296
|
-
function getOppositePlacement(placement) {
|
|
297
|
-
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
298
|
-
}
|
|
299
|
-
function expandPaddingObject(padding) {
|
|
300
|
-
return {
|
|
301
|
-
top: 0,
|
|
302
|
-
right: 0,
|
|
303
|
-
bottom: 0,
|
|
304
|
-
left: 0,
|
|
305
|
-
...padding
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
function getPaddingObject(padding) {
|
|
309
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
310
|
-
top: padding,
|
|
311
|
-
right: padding,
|
|
312
|
-
bottom: padding,
|
|
313
|
-
left: padding
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
function rectToClientRect(rect) {
|
|
317
|
-
const {
|
|
318
|
-
x,
|
|
319
|
-
y,
|
|
320
|
-
width,
|
|
321
|
-
height
|
|
322
|
-
} = rect;
|
|
323
|
-
return {
|
|
324
|
-
width,
|
|
325
|
-
height,
|
|
326
|
-
top: y,
|
|
327
|
-
left: x,
|
|
328
|
-
right: x + width,
|
|
329
|
-
bottom: y + height,
|
|
330
|
-
x,
|
|
331
|
-
y
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
335
|
-
let {
|
|
336
|
-
reference,
|
|
337
|
-
floating
|
|
338
|
-
} = _ref;
|
|
339
|
-
const sideAxis = getSideAxis(placement);
|
|
340
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
341
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
342
|
-
const side = getSide(placement);
|
|
343
|
-
const isVertical = sideAxis === "y";
|
|
344
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
345
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
346
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
347
|
-
let coords;
|
|
348
|
-
switch (side) {
|
|
349
|
-
case "top":
|
|
350
|
-
coords = {
|
|
351
|
-
x: commonX,
|
|
352
|
-
y: reference.y - floating.height
|
|
353
|
-
};
|
|
354
|
-
break;
|
|
355
|
-
case "bottom":
|
|
356
|
-
coords = {
|
|
357
|
-
x: commonX,
|
|
358
|
-
y: reference.y + reference.height
|
|
359
|
-
};
|
|
360
|
-
break;
|
|
361
|
-
case "right":
|
|
362
|
-
coords = {
|
|
363
|
-
x: reference.x + reference.width,
|
|
364
|
-
y: commonY
|
|
365
|
-
};
|
|
366
|
-
break;
|
|
367
|
-
case "left":
|
|
368
|
-
coords = {
|
|
369
|
-
x: reference.x - floating.width,
|
|
370
|
-
y: commonY
|
|
371
|
-
};
|
|
372
|
-
break;
|
|
373
|
-
default:
|
|
374
|
-
coords = {
|
|
375
|
-
x: reference.x,
|
|
376
|
-
y: reference.y
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
switch (getAlignment(placement)) {
|
|
380
|
-
case "start":
|
|
381
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
382
|
-
break;
|
|
383
|
-
case "end":
|
|
384
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
385
|
-
break;
|
|
386
|
-
}
|
|
387
|
-
return coords;
|
|
388
|
-
}
|
|
389
|
-
const computePosition$1 = async (reference, floating, config) => {
|
|
390
|
-
const {
|
|
391
|
-
placement = "bottom",
|
|
392
|
-
strategy = "absolute",
|
|
393
|
-
middleware = [],
|
|
394
|
-
platform: platform2
|
|
395
|
-
} = config;
|
|
396
|
-
const validMiddleware = middleware.filter(Boolean);
|
|
397
|
-
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
|
|
398
|
-
let rects = await platform2.getElementRects({
|
|
399
|
-
reference,
|
|
400
|
-
floating,
|
|
401
|
-
strategy
|
|
402
|
-
});
|
|
403
|
-
let {
|
|
404
|
-
x,
|
|
405
|
-
y
|
|
406
|
-
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
407
|
-
let statefulPlacement = placement;
|
|
408
|
-
let middlewareData = {};
|
|
409
|
-
let resetCount = 0;
|
|
410
|
-
for (let i = 0; i < validMiddleware.length; i++) {
|
|
411
|
-
const {
|
|
412
|
-
name,
|
|
413
|
-
fn
|
|
414
|
-
} = validMiddleware[i];
|
|
415
|
-
const {
|
|
416
|
-
x: nextX,
|
|
417
|
-
y: nextY,
|
|
418
|
-
data,
|
|
419
|
-
reset
|
|
420
|
-
} = await fn({
|
|
421
|
-
x,
|
|
422
|
-
y,
|
|
423
|
-
initialPlacement: placement,
|
|
424
|
-
placement: statefulPlacement,
|
|
425
|
-
strategy,
|
|
426
|
-
middlewareData,
|
|
427
|
-
rects,
|
|
428
|
-
platform: platform2,
|
|
429
|
-
elements: {
|
|
430
|
-
reference,
|
|
431
|
-
floating
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
x = nextX != null ? nextX : x;
|
|
435
|
-
y = nextY != null ? nextY : y;
|
|
436
|
-
middlewareData = {
|
|
437
|
-
...middlewareData,
|
|
438
|
-
[name]: {
|
|
439
|
-
...middlewareData[name],
|
|
440
|
-
...data
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
if (reset && resetCount <= 50) {
|
|
444
|
-
resetCount++;
|
|
445
|
-
if (typeof reset === "object") {
|
|
446
|
-
if (reset.placement) {
|
|
447
|
-
statefulPlacement = reset.placement;
|
|
448
|
-
}
|
|
449
|
-
if (reset.rects) {
|
|
450
|
-
rects = reset.rects === true ? await platform2.getElementRects({
|
|
451
|
-
reference,
|
|
452
|
-
floating,
|
|
453
|
-
strategy
|
|
454
|
-
}) : reset.rects;
|
|
455
|
-
}
|
|
456
|
-
({
|
|
457
|
-
x,
|
|
458
|
-
y
|
|
459
|
-
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
460
|
-
}
|
|
461
|
-
i = -1;
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
return {
|
|
465
|
-
x,
|
|
466
|
-
y,
|
|
467
|
-
placement: statefulPlacement,
|
|
468
|
-
strategy,
|
|
469
|
-
middlewareData
|
|
470
|
-
};
|
|
471
|
-
};
|
|
472
|
-
async function detectOverflow(state, options) {
|
|
473
|
-
var _await$platform$isEle;
|
|
474
|
-
if (options === void 0) {
|
|
475
|
-
options = {};
|
|
476
|
-
}
|
|
477
|
-
const {
|
|
478
|
-
x,
|
|
479
|
-
y,
|
|
480
|
-
platform: platform2,
|
|
481
|
-
rects,
|
|
482
|
-
elements,
|
|
483
|
-
strategy
|
|
484
|
-
} = state;
|
|
485
|
-
const {
|
|
486
|
-
boundary = "clippingAncestors",
|
|
487
|
-
rootBoundary = "viewport",
|
|
488
|
-
elementContext = "floating",
|
|
489
|
-
altBoundary = false,
|
|
490
|
-
padding = 0
|
|
491
|
-
} = evaluate(options, state);
|
|
492
|
-
const paddingObject = getPaddingObject(padding);
|
|
493
|
-
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
494
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
495
|
-
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
496
|
-
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
|
|
497
|
-
boundary,
|
|
498
|
-
rootBoundary,
|
|
499
|
-
strategy
|
|
500
|
-
}));
|
|
501
|
-
const rect = elementContext === "floating" ? {
|
|
502
|
-
x,
|
|
503
|
-
y,
|
|
504
|
-
width: rects.floating.width,
|
|
505
|
-
height: rects.floating.height
|
|
506
|
-
} : rects.reference;
|
|
507
|
-
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
508
|
-
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
509
|
-
x: 1,
|
|
510
|
-
y: 1
|
|
511
|
-
} : {
|
|
512
|
-
x: 1,
|
|
513
|
-
y: 1
|
|
514
|
-
};
|
|
515
|
-
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
516
|
-
elements,
|
|
517
|
-
rect,
|
|
518
|
-
offsetParent,
|
|
519
|
-
strategy
|
|
520
|
-
}) : rect);
|
|
521
|
-
return {
|
|
522
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
523
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
524
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
525
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
const arrow$2 = (options) => ({
|
|
529
|
-
name: "arrow",
|
|
530
|
-
options,
|
|
531
|
-
async fn(state) {
|
|
532
|
-
const {
|
|
533
|
-
x,
|
|
534
|
-
y,
|
|
535
|
-
placement,
|
|
536
|
-
rects,
|
|
537
|
-
platform: platform2,
|
|
538
|
-
elements,
|
|
539
|
-
middlewareData
|
|
540
|
-
} = state;
|
|
541
|
-
const {
|
|
542
|
-
element,
|
|
543
|
-
padding = 0
|
|
544
|
-
} = evaluate(options, state) || {};
|
|
545
|
-
if (element == null) {
|
|
546
|
-
return {};
|
|
547
|
-
}
|
|
548
|
-
const paddingObject = getPaddingObject(padding);
|
|
549
|
-
const coords = {
|
|
550
|
-
x,
|
|
551
|
-
y
|
|
552
|
-
};
|
|
553
|
-
const axis = getAlignmentAxis(placement);
|
|
554
|
-
const length = getAxisLength(axis);
|
|
555
|
-
const arrowDimensions = await platform2.getDimensions(element);
|
|
556
|
-
const isYAxis = axis === "y";
|
|
557
|
-
const minProp = isYAxis ? "top" : "left";
|
|
558
|
-
const maxProp = isYAxis ? "bottom" : "right";
|
|
559
|
-
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
560
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
561
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
562
|
-
const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
|
|
563
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
564
|
-
if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
|
|
565
|
-
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
566
|
-
}
|
|
567
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
568
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
569
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
570
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
571
|
-
const min$1 = minPadding;
|
|
572
|
-
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
573
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
574
|
-
const offset2 = clamp(min$1, center, max2);
|
|
575
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
576
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
577
|
-
return {
|
|
578
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
579
|
-
data: {
|
|
580
|
-
[axis]: offset2,
|
|
581
|
-
centerOffset: center - offset2 - alignmentOffset,
|
|
582
|
-
...shouldAddOffset && {
|
|
583
|
-
alignmentOffset
|
|
584
|
-
}
|
|
585
|
-
},
|
|
586
|
-
reset: shouldAddOffset
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
const flip$1 = function(options) {
|
|
591
|
-
if (options === void 0) {
|
|
592
|
-
options = {};
|
|
593
|
-
}
|
|
594
|
-
return {
|
|
595
|
-
name: "flip",
|
|
596
|
-
options,
|
|
597
|
-
async fn(state) {
|
|
598
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
599
|
-
const {
|
|
600
|
-
placement,
|
|
601
|
-
middlewareData,
|
|
602
|
-
rects,
|
|
603
|
-
initialPlacement,
|
|
604
|
-
platform: platform2,
|
|
605
|
-
elements
|
|
606
|
-
} = state;
|
|
607
|
-
const {
|
|
608
|
-
mainAxis: checkMainAxis = true,
|
|
609
|
-
crossAxis: checkCrossAxis = true,
|
|
610
|
-
fallbackPlacements: specifiedFallbackPlacements,
|
|
611
|
-
fallbackStrategy = "bestFit",
|
|
612
|
-
fallbackAxisSideDirection = "none",
|
|
613
|
-
flipAlignment = true,
|
|
614
|
-
...detectOverflowOptions
|
|
615
|
-
} = evaluate(options, state);
|
|
616
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
617
|
-
return {};
|
|
618
|
-
}
|
|
619
|
-
const side = getSide(placement);
|
|
620
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
621
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
622
|
-
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
623
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
624
|
-
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
625
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
626
|
-
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
627
|
-
}
|
|
628
|
-
const placements = [initialPlacement, ...fallbackPlacements];
|
|
629
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
630
|
-
const overflows = [];
|
|
631
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
632
|
-
if (checkMainAxis) {
|
|
633
|
-
overflows.push(overflow[side]);
|
|
634
|
-
}
|
|
635
|
-
if (checkCrossAxis) {
|
|
636
|
-
const sides2 = getAlignmentSides(placement, rects, rtl);
|
|
637
|
-
overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
|
|
638
|
-
}
|
|
639
|
-
overflowsData = [...overflowsData, {
|
|
640
|
-
placement,
|
|
641
|
-
overflows
|
|
642
|
-
}];
|
|
643
|
-
if (!overflows.every((side2) => side2 <= 0)) {
|
|
644
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
645
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
646
|
-
const nextPlacement = placements[nextIndex];
|
|
647
|
-
if (nextPlacement) {
|
|
648
|
-
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
649
|
-
if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
|
|
650
|
-
// overflows the main axis.
|
|
651
|
-
overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
652
|
-
return {
|
|
653
|
-
data: {
|
|
654
|
-
index: nextIndex,
|
|
655
|
-
overflows: overflowsData
|
|
656
|
-
},
|
|
657
|
-
reset: {
|
|
658
|
-
placement: nextPlacement
|
|
659
|
-
}
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
664
|
-
if (!resetPlacement) {
|
|
665
|
-
switch (fallbackStrategy) {
|
|
666
|
-
case "bestFit": {
|
|
667
|
-
var _overflowsData$filter2;
|
|
668
|
-
const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
669
|
-
if (hasFallbackAxisSideDirection) {
|
|
670
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
671
|
-
return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
|
|
672
|
-
// reading directions favoring greater width.
|
|
673
|
-
currentSideAxis === "y";
|
|
674
|
-
}
|
|
675
|
-
return true;
|
|
676
|
-
}).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
677
|
-
if (placement2) {
|
|
678
|
-
resetPlacement = placement2;
|
|
679
|
-
}
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
case "initialPlacement":
|
|
683
|
-
resetPlacement = initialPlacement;
|
|
684
|
-
break;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
if (placement !== resetPlacement) {
|
|
688
|
-
return {
|
|
689
|
-
reset: {
|
|
690
|
-
placement: resetPlacement
|
|
691
|
-
}
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
return {};
|
|
696
|
-
}
|
|
697
|
-
};
|
|
698
|
-
};
|
|
699
|
-
function getSideOffsets(overflow, rect) {
|
|
700
|
-
return {
|
|
701
|
-
top: overflow.top - rect.height,
|
|
702
|
-
right: overflow.right - rect.width,
|
|
703
|
-
bottom: overflow.bottom - rect.height,
|
|
704
|
-
left: overflow.left - rect.width
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
function isAnySideFullyClipped(overflow) {
|
|
708
|
-
return sides.some((side) => overflow[side] >= 0);
|
|
709
|
-
}
|
|
710
|
-
const hide$1 = function(options) {
|
|
711
|
-
if (options === void 0) {
|
|
712
|
-
options = {};
|
|
713
|
-
}
|
|
714
|
-
return {
|
|
715
|
-
name: "hide",
|
|
716
|
-
options,
|
|
717
|
-
async fn(state) {
|
|
718
|
-
const {
|
|
719
|
-
rects
|
|
720
|
-
} = state;
|
|
721
|
-
const {
|
|
722
|
-
strategy = "referenceHidden",
|
|
723
|
-
...detectOverflowOptions
|
|
724
|
-
} = evaluate(options, state);
|
|
725
|
-
switch (strategy) {
|
|
726
|
-
case "referenceHidden": {
|
|
727
|
-
const overflow = await detectOverflow(state, {
|
|
728
|
-
...detectOverflowOptions,
|
|
729
|
-
elementContext: "reference"
|
|
730
|
-
});
|
|
731
|
-
const offsets = getSideOffsets(overflow, rects.reference);
|
|
732
|
-
return {
|
|
733
|
-
data: {
|
|
734
|
-
referenceHiddenOffsets: offsets,
|
|
735
|
-
referenceHidden: isAnySideFullyClipped(offsets)
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
case "escaped": {
|
|
740
|
-
const overflow = await detectOverflow(state, {
|
|
741
|
-
...detectOverflowOptions,
|
|
742
|
-
altBoundary: true
|
|
743
|
-
});
|
|
744
|
-
const offsets = getSideOffsets(overflow, rects.floating);
|
|
745
|
-
return {
|
|
746
|
-
data: {
|
|
747
|
-
escapedOffsets: offsets,
|
|
748
|
-
escaped: isAnySideFullyClipped(offsets)
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
default: {
|
|
753
|
-
return {};
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
|
-
const originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
760
|
-
async function convertValueToCoords(state, options) {
|
|
761
|
-
const {
|
|
762
|
-
placement,
|
|
763
|
-
platform: platform2,
|
|
764
|
-
elements
|
|
765
|
-
} = state;
|
|
766
|
-
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
767
|
-
const side = getSide(placement);
|
|
768
|
-
const alignment = getAlignment(placement);
|
|
769
|
-
const isVertical = getSideAxis(placement) === "y";
|
|
770
|
-
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
771
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
772
|
-
const rawValue = evaluate(options, state);
|
|
773
|
-
let {
|
|
774
|
-
mainAxis,
|
|
775
|
-
crossAxis,
|
|
776
|
-
alignmentAxis
|
|
777
|
-
} = typeof rawValue === "number" ? {
|
|
778
|
-
mainAxis: rawValue,
|
|
779
|
-
crossAxis: 0,
|
|
780
|
-
alignmentAxis: null
|
|
781
|
-
} : {
|
|
782
|
-
mainAxis: rawValue.mainAxis || 0,
|
|
783
|
-
crossAxis: rawValue.crossAxis || 0,
|
|
784
|
-
alignmentAxis: rawValue.alignmentAxis
|
|
785
|
-
};
|
|
786
|
-
if (alignment && typeof alignmentAxis === "number") {
|
|
787
|
-
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
788
|
-
}
|
|
789
|
-
return isVertical ? {
|
|
790
|
-
x: crossAxis * crossAxisMulti,
|
|
791
|
-
y: mainAxis * mainAxisMulti
|
|
792
|
-
} : {
|
|
793
|
-
x: mainAxis * mainAxisMulti,
|
|
794
|
-
y: crossAxis * crossAxisMulti
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
const offset$1 = function(options) {
|
|
798
|
-
if (options === void 0) {
|
|
799
|
-
options = 0;
|
|
800
|
-
}
|
|
801
|
-
return {
|
|
802
|
-
name: "offset",
|
|
803
|
-
options,
|
|
804
|
-
async fn(state) {
|
|
805
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
806
|
-
const {
|
|
807
|
-
x,
|
|
808
|
-
y,
|
|
809
|
-
placement,
|
|
810
|
-
middlewareData
|
|
811
|
-
} = state;
|
|
812
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
813
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
814
|
-
return {};
|
|
815
|
-
}
|
|
816
|
-
return {
|
|
817
|
-
x: x + diffCoords.x,
|
|
818
|
-
y: y + diffCoords.y,
|
|
819
|
-
data: {
|
|
820
|
-
...diffCoords,
|
|
821
|
-
placement
|
|
822
|
-
}
|
|
823
|
-
};
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
};
|
|
827
|
-
const shift$1 = function(options) {
|
|
828
|
-
if (options === void 0) {
|
|
829
|
-
options = {};
|
|
830
|
-
}
|
|
831
|
-
return {
|
|
832
|
-
name: "shift",
|
|
833
|
-
options,
|
|
834
|
-
async fn(state) {
|
|
835
|
-
const {
|
|
836
|
-
x,
|
|
837
|
-
y,
|
|
838
|
-
placement
|
|
839
|
-
} = state;
|
|
840
|
-
const {
|
|
841
|
-
mainAxis: checkMainAxis = true,
|
|
842
|
-
crossAxis: checkCrossAxis = false,
|
|
843
|
-
limiter = {
|
|
844
|
-
fn: (_ref) => {
|
|
845
|
-
let {
|
|
846
|
-
x: x2,
|
|
847
|
-
y: y2
|
|
848
|
-
} = _ref;
|
|
849
|
-
return {
|
|
850
|
-
x: x2,
|
|
851
|
-
y: y2
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
},
|
|
855
|
-
...detectOverflowOptions
|
|
856
|
-
} = evaluate(options, state);
|
|
857
|
-
const coords = {
|
|
858
|
-
x,
|
|
859
|
-
y
|
|
860
|
-
};
|
|
861
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
862
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
863
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
864
|
-
let mainAxisCoord = coords[mainAxis];
|
|
865
|
-
let crossAxisCoord = coords[crossAxis];
|
|
866
|
-
if (checkMainAxis) {
|
|
867
|
-
const minSide = mainAxis === "y" ? "top" : "left";
|
|
868
|
-
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
869
|
-
const min2 = mainAxisCoord + overflow[minSide];
|
|
870
|
-
const max2 = mainAxisCoord - overflow[maxSide];
|
|
871
|
-
mainAxisCoord = clamp(min2, mainAxisCoord, max2);
|
|
872
|
-
}
|
|
873
|
-
if (checkCrossAxis) {
|
|
874
|
-
const minSide = crossAxis === "y" ? "top" : "left";
|
|
875
|
-
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
876
|
-
const min2 = crossAxisCoord + overflow[minSide];
|
|
877
|
-
const max2 = crossAxisCoord - overflow[maxSide];
|
|
878
|
-
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
879
|
-
}
|
|
880
|
-
const limitedCoords = limiter.fn({
|
|
881
|
-
...state,
|
|
882
|
-
[mainAxis]: mainAxisCoord,
|
|
883
|
-
[crossAxis]: crossAxisCoord
|
|
884
|
-
});
|
|
885
|
-
return {
|
|
886
|
-
...limitedCoords,
|
|
887
|
-
data: {
|
|
888
|
-
x: limitedCoords.x - x,
|
|
889
|
-
y: limitedCoords.y - y,
|
|
890
|
-
enabled: {
|
|
891
|
-
[mainAxis]: checkMainAxis,
|
|
892
|
-
[crossAxis]: checkCrossAxis
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
};
|
|
899
|
-
const limitShift$1 = function(options) {
|
|
900
|
-
if (options === void 0) {
|
|
901
|
-
options = {};
|
|
902
|
-
}
|
|
903
|
-
return {
|
|
904
|
-
options,
|
|
905
|
-
fn(state) {
|
|
906
|
-
const {
|
|
907
|
-
x,
|
|
908
|
-
y,
|
|
909
|
-
placement,
|
|
910
|
-
rects,
|
|
911
|
-
middlewareData
|
|
912
|
-
} = state;
|
|
913
|
-
const {
|
|
914
|
-
offset: offset2 = 0,
|
|
915
|
-
mainAxis: checkMainAxis = true,
|
|
916
|
-
crossAxis: checkCrossAxis = true
|
|
917
|
-
} = evaluate(options, state);
|
|
918
|
-
const coords = {
|
|
919
|
-
x,
|
|
920
|
-
y
|
|
921
|
-
};
|
|
922
|
-
const crossAxis = getSideAxis(placement);
|
|
923
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
924
|
-
let mainAxisCoord = coords[mainAxis];
|
|
925
|
-
let crossAxisCoord = coords[crossAxis];
|
|
926
|
-
const rawOffset = evaluate(offset2, state);
|
|
927
|
-
const computedOffset = typeof rawOffset === "number" ? {
|
|
928
|
-
mainAxis: rawOffset,
|
|
929
|
-
crossAxis: 0
|
|
930
|
-
} : {
|
|
931
|
-
mainAxis: 0,
|
|
932
|
-
crossAxis: 0,
|
|
933
|
-
...rawOffset
|
|
934
|
-
};
|
|
935
|
-
if (checkMainAxis) {
|
|
936
|
-
const len = mainAxis === "y" ? "height" : "width";
|
|
937
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
938
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
939
|
-
if (mainAxisCoord < limitMin) {
|
|
940
|
-
mainAxisCoord = limitMin;
|
|
941
|
-
} else if (mainAxisCoord > limitMax) {
|
|
942
|
-
mainAxisCoord = limitMax;
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
if (checkCrossAxis) {
|
|
946
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
947
|
-
const len = mainAxis === "y" ? "width" : "height";
|
|
948
|
-
const isOriginSide = originSides.has(getSide(placement));
|
|
949
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
950
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
951
|
-
if (crossAxisCoord < limitMin) {
|
|
952
|
-
crossAxisCoord = limitMin;
|
|
953
|
-
} else if (crossAxisCoord > limitMax) {
|
|
954
|
-
crossAxisCoord = limitMax;
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
return {
|
|
958
|
-
[mainAxis]: mainAxisCoord,
|
|
959
|
-
[crossAxis]: crossAxisCoord
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
};
|
|
964
|
-
const size$1 = function(options) {
|
|
965
|
-
if (options === void 0) {
|
|
966
|
-
options = {};
|
|
967
|
-
}
|
|
968
|
-
return {
|
|
969
|
-
name: "size",
|
|
970
|
-
options,
|
|
971
|
-
async fn(state) {
|
|
972
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
973
|
-
const {
|
|
974
|
-
placement,
|
|
975
|
-
rects,
|
|
976
|
-
platform: platform2,
|
|
977
|
-
elements
|
|
978
|
-
} = state;
|
|
979
|
-
const {
|
|
980
|
-
apply = () => {
|
|
981
|
-
},
|
|
982
|
-
...detectOverflowOptions
|
|
983
|
-
} = evaluate(options, state);
|
|
984
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
985
|
-
const side = getSide(placement);
|
|
986
|
-
const alignment = getAlignment(placement);
|
|
987
|
-
const isYAxis = getSideAxis(placement) === "y";
|
|
988
|
-
const {
|
|
989
|
-
width,
|
|
990
|
-
height
|
|
991
|
-
} = rects.floating;
|
|
992
|
-
let heightSide;
|
|
993
|
-
let widthSide;
|
|
994
|
-
if (side === "top" || side === "bottom") {
|
|
995
|
-
heightSide = side;
|
|
996
|
-
widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
|
|
997
|
-
} else {
|
|
998
|
-
widthSide = side;
|
|
999
|
-
heightSide = alignment === "end" ? "top" : "bottom";
|
|
1000
|
-
}
|
|
1001
|
-
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
1002
|
-
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
1003
|
-
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
1004
|
-
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
1005
|
-
const noShift = !state.middlewareData.shift;
|
|
1006
|
-
let availableHeight = overflowAvailableHeight;
|
|
1007
|
-
let availableWidth = overflowAvailableWidth;
|
|
1008
|
-
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
1009
|
-
availableWidth = maximumClippingWidth;
|
|
1010
|
-
}
|
|
1011
|
-
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
1012
|
-
availableHeight = maximumClippingHeight;
|
|
1013
|
-
}
|
|
1014
|
-
if (noShift && !alignment) {
|
|
1015
|
-
const xMin = max(overflow.left, 0);
|
|
1016
|
-
const xMax = max(overflow.right, 0);
|
|
1017
|
-
const yMin = max(overflow.top, 0);
|
|
1018
|
-
const yMax = max(overflow.bottom, 0);
|
|
1019
|
-
if (isYAxis) {
|
|
1020
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
1021
|
-
} else {
|
|
1022
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
await apply({
|
|
1026
|
-
...state,
|
|
1027
|
-
availableWidth,
|
|
1028
|
-
availableHeight
|
|
1029
|
-
});
|
|
1030
|
-
const nextDimensions = await platform2.getDimensions(elements.floating);
|
|
1031
|
-
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
1032
|
-
return {
|
|
1033
|
-
reset: {
|
|
1034
|
-
rects: true
|
|
1035
|
-
}
|
|
1036
|
-
};
|
|
1037
|
-
}
|
|
1038
|
-
return {};
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
};
|
|
1042
|
-
function hasWindow() {
|
|
1043
|
-
return typeof window !== "undefined";
|
|
1044
|
-
}
|
|
1045
|
-
function getNodeName(node) {
|
|
1046
|
-
if (isNode(node)) {
|
|
1047
|
-
return (node.nodeName || "").toLowerCase();
|
|
1048
|
-
}
|
|
1049
|
-
return "#document";
|
|
1050
|
-
}
|
|
1051
|
-
function getWindow(node) {
|
|
1052
|
-
var _node$ownerDocument;
|
|
1053
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
1054
|
-
}
|
|
1055
|
-
function getDocumentElement(node) {
|
|
1056
|
-
var _ref;
|
|
1057
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1058
|
-
}
|
|
1059
|
-
function isNode(value) {
|
|
1060
|
-
if (!hasWindow()) {
|
|
1061
|
-
return false;
|
|
1062
|
-
}
|
|
1063
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1064
|
-
}
|
|
1065
|
-
function isElement(value) {
|
|
1066
|
-
if (!hasWindow()) {
|
|
1067
|
-
return false;
|
|
1068
|
-
}
|
|
1069
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1070
|
-
}
|
|
1071
|
-
function isHTMLElement(value) {
|
|
1072
|
-
if (!hasWindow()) {
|
|
1073
|
-
return false;
|
|
1074
|
-
}
|
|
1075
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1076
|
-
}
|
|
1077
|
-
function isShadowRoot(value) {
|
|
1078
|
-
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
1079
|
-
return false;
|
|
1080
|
-
}
|
|
1081
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1082
|
-
}
|
|
1083
|
-
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1084
|
-
function isOverflowElement(element) {
|
|
1085
|
-
const {
|
|
1086
|
-
overflow,
|
|
1087
|
-
overflowX,
|
|
1088
|
-
overflowY,
|
|
1089
|
-
display
|
|
1090
|
-
} = getComputedStyle$1(element);
|
|
1091
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
1092
|
-
}
|
|
1093
|
-
const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1094
|
-
function isTableElement(element) {
|
|
1095
|
-
return tableElements.has(getNodeName(element));
|
|
1096
|
-
}
|
|
1097
|
-
const topLayerSelectors = [":popover-open", ":modal"];
|
|
1098
|
-
function isTopLayer(element) {
|
|
1099
|
-
return topLayerSelectors.some((selector) => {
|
|
1100
|
-
try {
|
|
1101
|
-
return element.matches(selector);
|
|
1102
|
-
} catch (_e) {
|
|
1103
|
-
return false;
|
|
1104
|
-
}
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
|
|
1108
|
-
const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
|
|
1109
|
-
const containValues = ["paint", "layout", "strict", "content"];
|
|
1110
|
-
function isContainingBlock(elementOrCss) {
|
|
1111
|
-
const webkit = isWebKit();
|
|
1112
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1113
|
-
return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
|
|
1114
|
-
}
|
|
1115
|
-
function getContainingBlock(element) {
|
|
1116
|
-
let currentNode = getParentNode(element);
|
|
1117
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1118
|
-
if (isContainingBlock(currentNode)) {
|
|
1119
|
-
return currentNode;
|
|
1120
|
-
} else if (isTopLayer(currentNode)) {
|
|
1121
|
-
return null;
|
|
1122
|
-
}
|
|
1123
|
-
currentNode = getParentNode(currentNode);
|
|
1124
|
-
}
|
|
1125
|
-
return null;
|
|
1126
|
-
}
|
|
1127
|
-
function isWebKit() {
|
|
1128
|
-
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
1129
|
-
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
1130
|
-
}
|
|
1131
|
-
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1132
|
-
function isLastTraversableNode(node) {
|
|
1133
|
-
return lastTraversableNodeNames.has(getNodeName(node));
|
|
1134
|
-
}
|
|
1135
|
-
function getComputedStyle$1(element) {
|
|
1136
|
-
return getWindow(element).getComputedStyle(element);
|
|
1137
|
-
}
|
|
1138
|
-
function getNodeScroll(element) {
|
|
1139
|
-
if (isElement(element)) {
|
|
1140
|
-
return {
|
|
1141
|
-
scrollLeft: element.scrollLeft,
|
|
1142
|
-
scrollTop: element.scrollTop
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
return {
|
|
1146
|
-
scrollLeft: element.scrollX,
|
|
1147
|
-
scrollTop: element.scrollY
|
|
1148
|
-
};
|
|
1149
|
-
}
|
|
1150
|
-
function getParentNode(node) {
|
|
1151
|
-
if (getNodeName(node) === "html") {
|
|
1152
|
-
return node;
|
|
1153
|
-
}
|
|
1154
|
-
const result = (
|
|
1155
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
1156
|
-
node.assignedSlot || // DOM Element detected.
|
|
1157
|
-
node.parentNode || // ShadowRoot detected.
|
|
1158
|
-
isShadowRoot(node) && node.host || // Fallback.
|
|
1159
|
-
getDocumentElement(node)
|
|
1160
|
-
);
|
|
1161
|
-
return isShadowRoot(result) ? result.host : result;
|
|
1162
|
-
}
|
|
1163
|
-
function getNearestOverflowAncestor(node) {
|
|
1164
|
-
const parentNode = getParentNode(node);
|
|
1165
|
-
if (isLastTraversableNode(parentNode)) {
|
|
1166
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1167
|
-
}
|
|
1168
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1169
|
-
return parentNode;
|
|
1170
|
-
}
|
|
1171
|
-
return getNearestOverflowAncestor(parentNode);
|
|
1172
|
-
}
|
|
1173
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1174
|
-
var _node$ownerDocument2;
|
|
1175
|
-
if (list === void 0) {
|
|
1176
|
-
list = [];
|
|
1177
|
-
}
|
|
1178
|
-
if (traverseIframes === void 0) {
|
|
1179
|
-
traverseIframes = true;
|
|
1180
|
-
}
|
|
1181
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1182
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1183
|
-
const win = getWindow(scrollableAncestor);
|
|
1184
|
-
if (isBody) {
|
|
1185
|
-
const frameElement = getFrameElement(win);
|
|
1186
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1187
|
-
}
|
|
1188
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1189
|
-
}
|
|
1190
|
-
function getFrameElement(win) {
|
|
1191
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1192
|
-
}
|
|
1193
|
-
function getCssDimensions(element) {
|
|
1194
|
-
const css = getComputedStyle$1(element);
|
|
1195
|
-
let width = parseFloat(css.width) || 0;
|
|
1196
|
-
let height = parseFloat(css.height) || 0;
|
|
1197
|
-
const hasOffset = isHTMLElement(element);
|
|
1198
|
-
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1199
|
-
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1200
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1201
|
-
if (shouldFallback) {
|
|
1202
|
-
width = offsetWidth;
|
|
1203
|
-
height = offsetHeight;
|
|
1204
|
-
}
|
|
1205
|
-
return {
|
|
1206
|
-
width,
|
|
1207
|
-
height,
|
|
1208
|
-
$: shouldFallback
|
|
1209
|
-
};
|
|
1210
|
-
}
|
|
1211
|
-
function unwrapElement$1(element) {
|
|
1212
|
-
return !isElement(element) ? element.contextElement : element;
|
|
1213
|
-
}
|
|
1214
|
-
function getScale(element) {
|
|
1215
|
-
const domElement = unwrapElement$1(element);
|
|
1216
|
-
if (!isHTMLElement(domElement)) {
|
|
1217
|
-
return createCoords(1);
|
|
1218
|
-
}
|
|
1219
|
-
const rect = domElement.getBoundingClientRect();
|
|
1220
|
-
const {
|
|
1221
|
-
width,
|
|
1222
|
-
height,
|
|
1223
|
-
$
|
|
1224
|
-
} = getCssDimensions(domElement);
|
|
1225
|
-
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1226
|
-
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1227
|
-
if (!x || !Number.isFinite(x)) {
|
|
1228
|
-
x = 1;
|
|
1229
|
-
}
|
|
1230
|
-
if (!y || !Number.isFinite(y)) {
|
|
1231
|
-
y = 1;
|
|
1232
|
-
}
|
|
1233
|
-
return {
|
|
1234
|
-
x,
|
|
1235
|
-
y
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
const noOffsets = /* @__PURE__ */ createCoords(0);
|
|
1239
|
-
function getVisualOffsets(element) {
|
|
1240
|
-
const win = getWindow(element);
|
|
1241
|
-
if (!isWebKit() || !win.visualViewport) {
|
|
1242
|
-
return noOffsets;
|
|
1243
|
-
}
|
|
1244
|
-
return {
|
|
1245
|
-
x: win.visualViewport.offsetLeft,
|
|
1246
|
-
y: win.visualViewport.offsetTop
|
|
1247
|
-
};
|
|
1248
|
-
}
|
|
1249
|
-
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
1250
|
-
if (isFixed === void 0) {
|
|
1251
|
-
isFixed = false;
|
|
1252
|
-
}
|
|
1253
|
-
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
1254
|
-
return false;
|
|
1255
|
-
}
|
|
1256
|
-
return isFixed;
|
|
1257
|
-
}
|
|
1258
|
-
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
1259
|
-
if (includeScale === void 0) {
|
|
1260
|
-
includeScale = false;
|
|
1261
|
-
}
|
|
1262
|
-
if (isFixedStrategy === void 0) {
|
|
1263
|
-
isFixedStrategy = false;
|
|
1264
|
-
}
|
|
1265
|
-
const clientRect = element.getBoundingClientRect();
|
|
1266
|
-
const domElement = unwrapElement$1(element);
|
|
1267
|
-
let scale = createCoords(1);
|
|
1268
|
-
if (includeScale) {
|
|
1269
|
-
if (offsetParent) {
|
|
1270
|
-
if (isElement(offsetParent)) {
|
|
1271
|
-
scale = getScale(offsetParent);
|
|
1272
|
-
}
|
|
1273
|
-
} else {
|
|
1274
|
-
scale = getScale(element);
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
1278
|
-
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
1279
|
-
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
1280
|
-
let width = clientRect.width / scale.x;
|
|
1281
|
-
let height = clientRect.height / scale.y;
|
|
1282
|
-
if (domElement) {
|
|
1283
|
-
const win = getWindow(domElement);
|
|
1284
|
-
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1285
|
-
let currentWin = win;
|
|
1286
|
-
let currentIFrame = getFrameElement(currentWin);
|
|
1287
|
-
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1288
|
-
const iframeScale = getScale(currentIFrame);
|
|
1289
|
-
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
1290
|
-
const css = getComputedStyle$1(currentIFrame);
|
|
1291
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
1292
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
1293
|
-
x *= iframeScale.x;
|
|
1294
|
-
y *= iframeScale.y;
|
|
1295
|
-
width *= iframeScale.x;
|
|
1296
|
-
height *= iframeScale.y;
|
|
1297
|
-
x += left;
|
|
1298
|
-
y += top;
|
|
1299
|
-
currentWin = getWindow(currentIFrame);
|
|
1300
|
-
currentIFrame = getFrameElement(currentWin);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
return rectToClientRect({
|
|
1304
|
-
width,
|
|
1305
|
-
height,
|
|
1306
|
-
x,
|
|
1307
|
-
y
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
function getWindowScrollBarX(element, rect) {
|
|
1311
|
-
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1312
|
-
if (!rect) {
|
|
1313
|
-
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1314
|
-
}
|
|
1315
|
-
return rect.left + leftScroll;
|
|
1316
|
-
}
|
|
1317
|
-
function getHTMLOffset(documentElement, scroll) {
|
|
1318
|
-
const htmlRect = documentElement.getBoundingClientRect();
|
|
1319
|
-
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
1320
|
-
const y = htmlRect.top + scroll.scrollTop;
|
|
1321
|
-
return {
|
|
1322
|
-
x,
|
|
1323
|
-
y
|
|
1324
|
-
};
|
|
1325
|
-
}
|
|
1326
|
-
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1327
|
-
let {
|
|
1328
|
-
elements,
|
|
1329
|
-
rect,
|
|
1330
|
-
offsetParent,
|
|
1331
|
-
strategy
|
|
1332
|
-
} = _ref;
|
|
1333
|
-
const isFixed = strategy === "fixed";
|
|
1334
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1335
|
-
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
1336
|
-
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
1337
|
-
return rect;
|
|
1338
|
-
}
|
|
1339
|
-
let scroll = {
|
|
1340
|
-
scrollLeft: 0,
|
|
1341
|
-
scrollTop: 0
|
|
1342
|
-
};
|
|
1343
|
-
let scale = createCoords(1);
|
|
1344
|
-
const offsets = createCoords(0);
|
|
1345
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1346
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1347
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
1348
|
-
scroll = getNodeScroll(offsetParent);
|
|
1349
|
-
}
|
|
1350
|
-
if (isHTMLElement(offsetParent)) {
|
|
1351
|
-
const offsetRect = getBoundingClientRect(offsetParent);
|
|
1352
|
-
scale = getScale(offsetParent);
|
|
1353
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1354
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1358
|
-
return {
|
|
1359
|
-
width: rect.width * scale.x,
|
|
1360
|
-
height: rect.height * scale.y,
|
|
1361
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1362
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1363
|
-
};
|
|
1364
|
-
}
|
|
1365
|
-
function getClientRects(element) {
|
|
1366
|
-
return Array.from(element.getClientRects());
|
|
1367
|
-
}
|
|
1368
|
-
function getDocumentRect(element) {
|
|
1369
|
-
const html = getDocumentElement(element);
|
|
1370
|
-
const scroll = getNodeScroll(element);
|
|
1371
|
-
const body = element.ownerDocument.body;
|
|
1372
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
1373
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
1374
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
1375
|
-
const y = -scroll.scrollTop;
|
|
1376
|
-
if (getComputedStyle$1(body).direction === "rtl") {
|
|
1377
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
1378
|
-
}
|
|
1379
|
-
return {
|
|
1380
|
-
width,
|
|
1381
|
-
height,
|
|
1382
|
-
x,
|
|
1383
|
-
y
|
|
1384
|
-
};
|
|
1385
|
-
}
|
|
1386
|
-
const SCROLLBAR_MAX = 25;
|
|
1387
|
-
function getViewportRect(element, strategy) {
|
|
1388
|
-
const win = getWindow(element);
|
|
1389
|
-
const html = getDocumentElement(element);
|
|
1390
|
-
const visualViewport = win.visualViewport;
|
|
1391
|
-
let width = html.clientWidth;
|
|
1392
|
-
let height = html.clientHeight;
|
|
1393
|
-
let x = 0;
|
|
1394
|
-
let y = 0;
|
|
1395
|
-
if (visualViewport) {
|
|
1396
|
-
width = visualViewport.width;
|
|
1397
|
-
height = visualViewport.height;
|
|
1398
|
-
const visualViewportBased = isWebKit();
|
|
1399
|
-
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
1400
|
-
x = visualViewport.offsetLeft;
|
|
1401
|
-
y = visualViewport.offsetTop;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
const windowScrollbarX = getWindowScrollBarX(html);
|
|
1405
|
-
if (windowScrollbarX <= 0) {
|
|
1406
|
-
const doc = html.ownerDocument;
|
|
1407
|
-
const body = doc.body;
|
|
1408
|
-
const bodyStyles = getComputedStyle(body);
|
|
1409
|
-
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
1410
|
-
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
1411
|
-
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
1412
|
-
width -= clippingStableScrollbarWidth;
|
|
1413
|
-
}
|
|
1414
|
-
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
1415
|
-
width += windowScrollbarX;
|
|
1416
|
-
}
|
|
1417
|
-
return {
|
|
1418
|
-
width,
|
|
1419
|
-
height,
|
|
1420
|
-
x,
|
|
1421
|
-
y
|
|
1422
|
-
};
|
|
1423
|
-
}
|
|
1424
|
-
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1425
|
-
function getInnerBoundingClientRect(element, strategy) {
|
|
1426
|
-
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
1427
|
-
const top = clientRect.top + element.clientTop;
|
|
1428
|
-
const left = clientRect.left + element.clientLeft;
|
|
1429
|
-
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
1430
|
-
const width = element.clientWidth * scale.x;
|
|
1431
|
-
const height = element.clientHeight * scale.y;
|
|
1432
|
-
const x = left * scale.x;
|
|
1433
|
-
const y = top * scale.y;
|
|
1434
|
-
return {
|
|
1435
|
-
width,
|
|
1436
|
-
height,
|
|
1437
|
-
x,
|
|
1438
|
-
y
|
|
1439
|
-
};
|
|
1440
|
-
}
|
|
1441
|
-
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
1442
|
-
let rect;
|
|
1443
|
-
if (clippingAncestor === "viewport") {
|
|
1444
|
-
rect = getViewportRect(element, strategy);
|
|
1445
|
-
} else if (clippingAncestor === "document") {
|
|
1446
|
-
rect = getDocumentRect(getDocumentElement(element));
|
|
1447
|
-
} else if (isElement(clippingAncestor)) {
|
|
1448
|
-
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
1449
|
-
} else {
|
|
1450
|
-
const visualOffsets = getVisualOffsets(element);
|
|
1451
|
-
rect = {
|
|
1452
|
-
x: clippingAncestor.x - visualOffsets.x,
|
|
1453
|
-
y: clippingAncestor.y - visualOffsets.y,
|
|
1454
|
-
width: clippingAncestor.width,
|
|
1455
|
-
height: clippingAncestor.height
|
|
1456
|
-
};
|
|
1457
|
-
}
|
|
1458
|
-
return rectToClientRect(rect);
|
|
1459
|
-
}
|
|
1460
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
1461
|
-
const parentNode = getParentNode(element);
|
|
1462
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
1463
|
-
return false;
|
|
1464
|
-
}
|
|
1465
|
-
return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
1466
|
-
}
|
|
1467
|
-
function getClippingElementAncestors(element, cache) {
|
|
1468
|
-
const cachedResult = cache.get(element);
|
|
1469
|
-
if (cachedResult) {
|
|
1470
|
-
return cachedResult;
|
|
1471
|
-
}
|
|
1472
|
-
let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
1473
|
-
let currentContainingBlockComputedStyle = null;
|
|
1474
|
-
const elementIsFixed = getComputedStyle$1(element).position === "fixed";
|
|
1475
|
-
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
1476
|
-
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1477
|
-
const computedStyle = getComputedStyle$1(currentNode);
|
|
1478
|
-
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
1479
|
-
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
1480
|
-
currentContainingBlockComputedStyle = null;
|
|
1481
|
-
}
|
|
1482
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
1483
|
-
if (shouldDropCurrentNode) {
|
|
1484
|
-
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
1485
|
-
} else {
|
|
1486
|
-
currentContainingBlockComputedStyle = computedStyle;
|
|
1487
|
-
}
|
|
1488
|
-
currentNode = getParentNode(currentNode);
|
|
1489
|
-
}
|
|
1490
|
-
cache.set(element, result);
|
|
1491
|
-
return result;
|
|
1492
|
-
}
|
|
1493
|
-
function getClippingRect(_ref) {
|
|
1494
|
-
let {
|
|
1495
|
-
element,
|
|
1496
|
-
boundary,
|
|
1497
|
-
rootBoundary,
|
|
1498
|
-
strategy
|
|
1499
|
-
} = _ref;
|
|
1500
|
-
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
1501
|
-
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
1502
|
-
const firstClippingAncestor = clippingAncestors[0];
|
|
1503
|
-
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
1504
|
-
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
1505
|
-
accRect.top = max(rect.top, accRect.top);
|
|
1506
|
-
accRect.right = min(rect.right, accRect.right);
|
|
1507
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
1508
|
-
accRect.left = max(rect.left, accRect.left);
|
|
1509
|
-
return accRect;
|
|
1510
|
-
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
1511
|
-
return {
|
|
1512
|
-
width: clippingRect.right - clippingRect.left,
|
|
1513
|
-
height: clippingRect.bottom - clippingRect.top,
|
|
1514
|
-
x: clippingRect.left,
|
|
1515
|
-
y: clippingRect.top
|
|
1516
|
-
};
|
|
1517
|
-
}
|
|
1518
|
-
function getDimensions(element) {
|
|
1519
|
-
const {
|
|
1520
|
-
width,
|
|
1521
|
-
height
|
|
1522
|
-
} = getCssDimensions(element);
|
|
1523
|
-
return {
|
|
1524
|
-
width,
|
|
1525
|
-
height
|
|
1526
|
-
};
|
|
1527
|
-
}
|
|
1528
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
1529
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1530
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
1531
|
-
const isFixed = strategy === "fixed";
|
|
1532
|
-
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
1533
|
-
let scroll = {
|
|
1534
|
-
scrollLeft: 0,
|
|
1535
|
-
scrollTop: 0
|
|
1536
|
-
};
|
|
1537
|
-
const offsets = createCoords(0);
|
|
1538
|
-
function setLeftRTLScrollbarOffset() {
|
|
1539
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
1540
|
-
}
|
|
1541
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1542
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
1543
|
-
scroll = getNodeScroll(offsetParent);
|
|
1544
|
-
}
|
|
1545
|
-
if (isOffsetParentAnElement) {
|
|
1546
|
-
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
1547
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1548
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1549
|
-
} else if (documentElement) {
|
|
1550
|
-
setLeftRTLScrollbarOffset();
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
1554
|
-
setLeftRTLScrollbarOffset();
|
|
1555
|
-
}
|
|
1556
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1557
|
-
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1558
|
-
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1559
|
-
return {
|
|
1560
|
-
x,
|
|
1561
|
-
y,
|
|
1562
|
-
width: rect.width,
|
|
1563
|
-
height: rect.height
|
|
1564
|
-
};
|
|
1565
|
-
}
|
|
1566
|
-
function isStaticPositioned(element) {
|
|
1567
|
-
return getComputedStyle$1(element).position === "static";
|
|
1568
|
-
}
|
|
1569
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
1570
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
1571
|
-
return null;
|
|
1572
|
-
}
|
|
1573
|
-
if (polyfill) {
|
|
1574
|
-
return polyfill(element);
|
|
1575
|
-
}
|
|
1576
|
-
let rawOffsetParent = element.offsetParent;
|
|
1577
|
-
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1578
|
-
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1579
|
-
}
|
|
1580
|
-
return rawOffsetParent;
|
|
1581
|
-
}
|
|
1582
|
-
function getOffsetParent(element, polyfill) {
|
|
1583
|
-
const win = getWindow(element);
|
|
1584
|
-
if (isTopLayer(element)) {
|
|
1585
|
-
return win;
|
|
1586
|
-
}
|
|
1587
|
-
if (!isHTMLElement(element)) {
|
|
1588
|
-
let svgOffsetParent = getParentNode(element);
|
|
1589
|
-
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
1590
|
-
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
1591
|
-
return svgOffsetParent;
|
|
1592
|
-
}
|
|
1593
|
-
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
1594
|
-
}
|
|
1595
|
-
return win;
|
|
1596
|
-
}
|
|
1597
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
1598
|
-
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
1599
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
1600
|
-
}
|
|
1601
|
-
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
1602
|
-
return win;
|
|
1603
|
-
}
|
|
1604
|
-
return offsetParent || getContainingBlock(element) || win;
|
|
1605
|
-
}
|
|
1606
|
-
const getElementRects = async function(data) {
|
|
1607
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
1608
|
-
const getDimensionsFn = this.getDimensions;
|
|
1609
|
-
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
1610
|
-
return {
|
|
1611
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
1612
|
-
floating: {
|
|
1613
|
-
x: 0,
|
|
1614
|
-
y: 0,
|
|
1615
|
-
width: floatingDimensions.width,
|
|
1616
|
-
height: floatingDimensions.height
|
|
1617
|
-
}
|
|
1618
|
-
};
|
|
1619
|
-
};
|
|
1620
|
-
function isRTL(element) {
|
|
1621
|
-
return getComputedStyle$1(element).direction === "rtl";
|
|
1622
|
-
}
|
|
1623
|
-
const platform = {
|
|
1624
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
1625
|
-
getDocumentElement,
|
|
1626
|
-
getClippingRect,
|
|
1627
|
-
getOffsetParent,
|
|
1628
|
-
getElementRects,
|
|
1629
|
-
getClientRects,
|
|
1630
|
-
getDimensions,
|
|
1631
|
-
getScale,
|
|
1632
|
-
isElement,
|
|
1633
|
-
isRTL
|
|
1634
|
-
};
|
|
1635
|
-
function rectsAreEqual(a, b) {
|
|
1636
|
-
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1637
|
-
}
|
|
1638
|
-
function observeMove(element, onMove) {
|
|
1639
|
-
let io = null;
|
|
1640
|
-
let timeoutId;
|
|
1641
|
-
const root = getDocumentElement(element);
|
|
1642
|
-
function cleanup() {
|
|
1643
|
-
var _io;
|
|
1644
|
-
clearTimeout(timeoutId);
|
|
1645
|
-
(_io = io) == null || _io.disconnect();
|
|
1646
|
-
io = null;
|
|
1647
|
-
}
|
|
1648
|
-
function refresh(skip, threshold) {
|
|
1649
|
-
if (skip === void 0) {
|
|
1650
|
-
skip = false;
|
|
1651
|
-
}
|
|
1652
|
-
if (threshold === void 0) {
|
|
1653
|
-
threshold = 1;
|
|
1654
|
-
}
|
|
1655
|
-
cleanup();
|
|
1656
|
-
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1657
|
-
const {
|
|
1658
|
-
left,
|
|
1659
|
-
top,
|
|
1660
|
-
width,
|
|
1661
|
-
height
|
|
1662
|
-
} = elementRectForRootMargin;
|
|
1663
|
-
if (!skip) {
|
|
1664
|
-
onMove();
|
|
1665
|
-
}
|
|
1666
|
-
if (!width || !height) {
|
|
1667
|
-
return;
|
|
1668
|
-
}
|
|
1669
|
-
const insetTop = floor(top);
|
|
1670
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
1671
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
1672
|
-
const insetLeft = floor(left);
|
|
1673
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
1674
|
-
const options = {
|
|
1675
|
-
rootMargin,
|
|
1676
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
1677
|
-
};
|
|
1678
|
-
let isFirstUpdate = true;
|
|
1679
|
-
function handleObserve(entries) {
|
|
1680
|
-
const ratio = entries[0].intersectionRatio;
|
|
1681
|
-
if (ratio !== threshold) {
|
|
1682
|
-
if (!isFirstUpdate) {
|
|
1683
|
-
return refresh();
|
|
1684
|
-
}
|
|
1685
|
-
if (!ratio) {
|
|
1686
|
-
timeoutId = setTimeout(() => {
|
|
1687
|
-
refresh(false, 1e-7);
|
|
1688
|
-
}, 1e3);
|
|
1689
|
-
} else {
|
|
1690
|
-
refresh(false, ratio);
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1694
|
-
refresh();
|
|
1695
|
-
}
|
|
1696
|
-
isFirstUpdate = false;
|
|
1697
|
-
}
|
|
1698
|
-
try {
|
|
1699
|
-
io = new IntersectionObserver(handleObserve, {
|
|
1700
|
-
...options,
|
|
1701
|
-
// Handle <iframe>s
|
|
1702
|
-
root: root.ownerDocument
|
|
1703
|
-
});
|
|
1704
|
-
} catch (_e) {
|
|
1705
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
1706
|
-
}
|
|
1707
|
-
io.observe(element);
|
|
1708
|
-
}
|
|
1709
|
-
refresh(true);
|
|
1710
|
-
return cleanup;
|
|
1711
|
-
}
|
|
1712
|
-
function autoUpdate(reference, floating, update, options) {
|
|
1713
|
-
if (options === void 0) {
|
|
1714
|
-
options = {};
|
|
1715
|
-
}
|
|
1716
|
-
const {
|
|
1717
|
-
ancestorScroll = true,
|
|
1718
|
-
ancestorResize = true,
|
|
1719
|
-
elementResize = typeof ResizeObserver === "function",
|
|
1720
|
-
layoutShift = typeof IntersectionObserver === "function",
|
|
1721
|
-
animationFrame = false
|
|
1722
|
-
} = options;
|
|
1723
|
-
const referenceEl = unwrapElement$1(reference);
|
|
1724
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
1725
|
-
ancestors.forEach((ancestor) => {
|
|
1726
|
-
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
1727
|
-
passive: true
|
|
1728
|
-
});
|
|
1729
|
-
ancestorResize && ancestor.addEventListener("resize", update);
|
|
1730
|
-
});
|
|
1731
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
1732
|
-
let reobserveFrame = -1;
|
|
1733
|
-
let resizeObserver = null;
|
|
1734
|
-
if (elementResize) {
|
|
1735
|
-
resizeObserver = new ResizeObserver((_ref) => {
|
|
1736
|
-
let [firstEntry] = _ref;
|
|
1737
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
1738
|
-
resizeObserver.unobserve(floating);
|
|
1739
|
-
cancelAnimationFrame(reobserveFrame);
|
|
1740
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
1741
|
-
var _resizeObserver;
|
|
1742
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
update();
|
|
1746
|
-
});
|
|
1747
|
-
if (referenceEl && !animationFrame) {
|
|
1748
|
-
resizeObserver.observe(referenceEl);
|
|
1749
|
-
}
|
|
1750
|
-
resizeObserver.observe(floating);
|
|
1751
|
-
}
|
|
1752
|
-
let frameId;
|
|
1753
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
1754
|
-
if (animationFrame) {
|
|
1755
|
-
frameLoop();
|
|
1756
|
-
}
|
|
1757
|
-
function frameLoop() {
|
|
1758
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
1759
|
-
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
1760
|
-
update();
|
|
1761
|
-
}
|
|
1762
|
-
prevRefRect = nextRefRect;
|
|
1763
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
1764
|
-
}
|
|
1765
|
-
update();
|
|
1766
|
-
return () => {
|
|
1767
|
-
var _resizeObserver2;
|
|
1768
|
-
ancestors.forEach((ancestor) => {
|
|
1769
|
-
ancestorScroll && ancestor.removeEventListener("scroll", update);
|
|
1770
|
-
ancestorResize && ancestor.removeEventListener("resize", update);
|
|
1771
|
-
});
|
|
1772
|
-
cleanupIo == null || cleanupIo();
|
|
1773
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
1774
|
-
resizeObserver = null;
|
|
1775
|
-
if (animationFrame) {
|
|
1776
|
-
cancelAnimationFrame(frameId);
|
|
1777
|
-
}
|
|
1778
|
-
};
|
|
1779
|
-
}
|
|
1780
|
-
const offset = offset$1;
|
|
1781
|
-
const shift = shift$1;
|
|
1782
|
-
const flip = flip$1;
|
|
1783
|
-
const size = size$1;
|
|
1784
|
-
const hide = hide$1;
|
|
1785
|
-
const arrow$1 = arrow$2;
|
|
1786
|
-
const limitShift = limitShift$1;
|
|
1787
|
-
const computePosition = (reference, floating, options) => {
|
|
1788
|
-
const cache = /* @__PURE__ */ new Map();
|
|
1789
|
-
const mergedOptions = {
|
|
1790
|
-
platform,
|
|
1791
|
-
...options
|
|
1792
|
-
};
|
|
1793
|
-
const platformWithCache = {
|
|
1794
|
-
...mergedOptions.platform,
|
|
1795
|
-
_c: cache
|
|
1796
|
-
};
|
|
1797
|
-
return computePosition$1(reference, floating, {
|
|
1798
|
-
...mergedOptions,
|
|
1799
|
-
platform: platformWithCache
|
|
1800
|
-
});
|
|
1801
|
-
};
|
|
1802
|
-
function isComponentPublicInstance(target) {
|
|
1803
|
-
return target != null && typeof target === "object" && "$el" in target;
|
|
1804
|
-
}
|
|
1805
|
-
function unwrapElement(target) {
|
|
1806
|
-
if (isComponentPublicInstance(target)) {
|
|
1807
|
-
const element = target.$el;
|
|
1808
|
-
return isNode(element) && getNodeName(element) === "#comment" ? null : element;
|
|
1809
|
-
}
|
|
1810
|
-
return target;
|
|
1811
|
-
}
|
|
1812
|
-
function toValue(source) {
|
|
1813
|
-
return typeof source === "function" ? source() : unref(source);
|
|
1814
|
-
}
|
|
1815
|
-
function arrow(options) {
|
|
1816
|
-
return {
|
|
1817
|
-
name: "arrow",
|
|
1818
|
-
options,
|
|
1819
|
-
fn(args) {
|
|
1820
|
-
const element = unwrapElement(toValue(options.element));
|
|
1821
|
-
if (element == null) {
|
|
1822
|
-
return {};
|
|
1823
|
-
}
|
|
1824
|
-
return arrow$1({
|
|
1825
|
-
element,
|
|
1826
|
-
padding: options.padding
|
|
1827
|
-
}).fn(args);
|
|
1828
|
-
}
|
|
1829
|
-
};
|
|
1830
|
-
}
|
|
1831
|
-
function getDPR(element) {
|
|
1832
|
-
if (typeof window === "undefined") {
|
|
1833
|
-
return 1;
|
|
1834
|
-
}
|
|
1835
|
-
const win = element.ownerDocument.defaultView || window;
|
|
1836
|
-
return win.devicePixelRatio || 1;
|
|
1837
|
-
}
|
|
1838
|
-
function roundByDPR(element, value) {
|
|
1839
|
-
const dpr = getDPR(element);
|
|
1840
|
-
return Math.round(value * dpr) / dpr;
|
|
1841
|
-
}
|
|
1842
|
-
function useFloating(reference, floating, options) {
|
|
1843
|
-
if (options === void 0) {
|
|
1844
|
-
options = {};
|
|
1845
|
-
}
|
|
1846
|
-
const whileElementsMountedOption = options.whileElementsMounted;
|
|
1847
|
-
const openOption = computed(() => {
|
|
1848
|
-
var _toValue;
|
|
1849
|
-
return (_toValue = toValue(options.open)) != null ? _toValue : true;
|
|
1850
|
-
});
|
|
1851
|
-
const middlewareOption = computed(() => toValue(options.middleware));
|
|
1852
|
-
const placementOption = computed(() => {
|
|
1853
|
-
var _toValue2;
|
|
1854
|
-
return (_toValue2 = toValue(options.placement)) != null ? _toValue2 : "bottom";
|
|
1855
|
-
});
|
|
1856
|
-
const strategyOption = computed(() => {
|
|
1857
|
-
var _toValue3;
|
|
1858
|
-
return (_toValue3 = toValue(options.strategy)) != null ? _toValue3 : "absolute";
|
|
1859
|
-
});
|
|
1860
|
-
const transformOption = computed(() => {
|
|
1861
|
-
var _toValue4;
|
|
1862
|
-
return (_toValue4 = toValue(options.transform)) != null ? _toValue4 : true;
|
|
1863
|
-
});
|
|
1864
|
-
const referenceElement = computed(() => unwrapElement(reference.value));
|
|
1865
|
-
const floatingElement = computed(() => unwrapElement(floating.value));
|
|
1866
|
-
const x = ref(0);
|
|
1867
|
-
const y = ref(0);
|
|
1868
|
-
const strategy = ref(strategyOption.value);
|
|
1869
|
-
const placement = ref(placementOption.value);
|
|
1870
|
-
const middlewareData = shallowRef({});
|
|
1871
|
-
const isPositioned = ref(false);
|
|
1872
|
-
const floatingStyles = computed(() => {
|
|
1873
|
-
const initialStyles = {
|
|
1874
|
-
position: strategy.value,
|
|
1875
|
-
left: "0",
|
|
1876
|
-
top: "0"
|
|
1877
|
-
};
|
|
1878
|
-
if (!floatingElement.value) {
|
|
1879
|
-
return initialStyles;
|
|
1880
|
-
}
|
|
1881
|
-
const xVal = roundByDPR(floatingElement.value, x.value);
|
|
1882
|
-
const yVal = roundByDPR(floatingElement.value, y.value);
|
|
1883
|
-
if (transformOption.value) {
|
|
1884
|
-
return {
|
|
1885
|
-
...initialStyles,
|
|
1886
|
-
transform: "translate(" + xVal + "px, " + yVal + "px)",
|
|
1887
|
-
...getDPR(floatingElement.value) >= 1.5 && {
|
|
1888
|
-
willChange: "transform"
|
|
1889
|
-
}
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
return {
|
|
1893
|
-
position: strategy.value,
|
|
1894
|
-
left: xVal + "px",
|
|
1895
|
-
top: yVal + "px"
|
|
1896
|
-
};
|
|
1897
|
-
});
|
|
1898
|
-
let whileElementsMountedCleanup;
|
|
1899
|
-
function update() {
|
|
1900
|
-
if (referenceElement.value == null || floatingElement.value == null) {
|
|
1901
|
-
return;
|
|
1902
|
-
}
|
|
1903
|
-
const open = openOption.value;
|
|
1904
|
-
computePosition(referenceElement.value, floatingElement.value, {
|
|
1905
|
-
middleware: middlewareOption.value,
|
|
1906
|
-
placement: placementOption.value,
|
|
1907
|
-
strategy: strategyOption.value
|
|
1908
|
-
}).then((position) => {
|
|
1909
|
-
x.value = position.x;
|
|
1910
|
-
y.value = position.y;
|
|
1911
|
-
strategy.value = position.strategy;
|
|
1912
|
-
placement.value = position.placement;
|
|
1913
|
-
middlewareData.value = position.middlewareData;
|
|
1914
|
-
isPositioned.value = open !== false;
|
|
1915
|
-
});
|
|
1916
|
-
}
|
|
1917
|
-
function cleanup() {
|
|
1918
|
-
if (typeof whileElementsMountedCleanup === "function") {
|
|
1919
|
-
whileElementsMountedCleanup();
|
|
1920
|
-
whileElementsMountedCleanup = void 0;
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
function attach() {
|
|
1924
|
-
cleanup();
|
|
1925
|
-
if (whileElementsMountedOption === void 0) {
|
|
1926
|
-
update();
|
|
1927
|
-
return;
|
|
1928
|
-
}
|
|
1929
|
-
if (referenceElement.value != null && floatingElement.value != null) {
|
|
1930
|
-
whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);
|
|
1931
|
-
return;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
function reset() {
|
|
1935
|
-
if (!openOption.value) {
|
|
1936
|
-
isPositioned.value = false;
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
watch([middlewareOption, placementOption, strategyOption, openOption], update, {
|
|
1940
|
-
flush: "sync"
|
|
1941
|
-
});
|
|
1942
|
-
watch([referenceElement, floatingElement], attach, {
|
|
1943
|
-
flush: "sync"
|
|
1944
|
-
});
|
|
1945
|
-
watch(openOption, reset, {
|
|
1946
|
-
flush: "sync"
|
|
1947
|
-
});
|
|
1948
|
-
if (getCurrentScope()) {
|
|
1949
|
-
onScopeDispose(cleanup);
|
|
1950
|
-
}
|
|
1951
|
-
return {
|
|
1952
|
-
x: shallowReadonly(x),
|
|
1953
|
-
y: shallowReadonly(y),
|
|
1954
|
-
strategy: shallowReadonly(strategy),
|
|
1955
|
-
placement: shallowReadonly(placement),
|
|
1956
|
-
middlewareData: shallowReadonly(middlewareData),
|
|
1957
|
-
isPositioned: shallowReadonly(isPositioned),
|
|
1958
|
-
floatingStyles,
|
|
1959
|
-
update
|
|
1960
|
-
};
|
|
1961
|
-
}
|
|
1962
|
-
const PopperContentPropsDefaultValue = {
|
|
1963
|
-
side: "bottom",
|
|
1964
|
-
sideOffset: 0,
|
|
1965
|
-
sideFlip: true,
|
|
1966
|
-
align: "center",
|
|
1967
|
-
alignOffset: 0,
|
|
1968
|
-
alignFlip: true,
|
|
1969
|
-
arrowPadding: 0,
|
|
1970
|
-
avoidCollisions: true,
|
|
1971
|
-
collisionBoundary: () => [],
|
|
1972
|
-
collisionPadding: 0,
|
|
1973
|
-
sticky: "partial",
|
|
1974
|
-
hideWhenDetached: false,
|
|
1975
|
-
positionStrategy: "fixed",
|
|
1976
|
-
updatePositionStrategy: "optimized",
|
|
1977
|
-
prioritizePosition: false
|
|
1978
|
-
};
|
|
1979
|
-
const [injectPopperContentContext, providePopperContentContext] = createContext("PopperContent");
|
|
1980
|
-
var PopperContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1981
|
-
inheritAttrs: false,
|
|
1982
|
-
__name: "PopperContent",
|
|
1983
|
-
props: /* @__PURE__ */ mergeDefaults({
|
|
1984
|
-
side: {
|
|
1985
|
-
type: null,
|
|
1986
|
-
required: false
|
|
1987
|
-
},
|
|
1988
|
-
sideOffset: {
|
|
1989
|
-
type: Number,
|
|
1990
|
-
required: false
|
|
1991
|
-
},
|
|
1992
|
-
sideFlip: {
|
|
1993
|
-
type: Boolean,
|
|
1994
|
-
required: false
|
|
1995
|
-
},
|
|
1996
|
-
align: {
|
|
1997
|
-
type: null,
|
|
1998
|
-
required: false
|
|
1999
|
-
},
|
|
2000
|
-
alignOffset: {
|
|
2001
|
-
type: Number,
|
|
2002
|
-
required: false
|
|
2003
|
-
},
|
|
2004
|
-
alignFlip: {
|
|
2005
|
-
type: Boolean,
|
|
2006
|
-
required: false
|
|
2007
|
-
},
|
|
2008
|
-
avoidCollisions: {
|
|
2009
|
-
type: Boolean,
|
|
2010
|
-
required: false
|
|
2011
|
-
},
|
|
2012
|
-
collisionBoundary: {
|
|
2013
|
-
type: null,
|
|
2014
|
-
required: false
|
|
2015
|
-
},
|
|
2016
|
-
collisionPadding: {
|
|
2017
|
-
type: [Number, Object],
|
|
2018
|
-
required: false
|
|
2019
|
-
},
|
|
2020
|
-
arrowPadding: {
|
|
2021
|
-
type: Number,
|
|
2022
|
-
required: false
|
|
2023
|
-
},
|
|
2024
|
-
sticky: {
|
|
2025
|
-
type: String,
|
|
2026
|
-
required: false
|
|
2027
|
-
},
|
|
2028
|
-
hideWhenDetached: {
|
|
2029
|
-
type: Boolean,
|
|
2030
|
-
required: false
|
|
2031
|
-
},
|
|
2032
|
-
positionStrategy: {
|
|
2033
|
-
type: String,
|
|
2034
|
-
required: false
|
|
2035
|
-
},
|
|
2036
|
-
updatePositionStrategy: {
|
|
2037
|
-
type: String,
|
|
2038
|
-
required: false
|
|
2039
|
-
},
|
|
2040
|
-
disableUpdateOnLayoutShift: {
|
|
2041
|
-
type: Boolean,
|
|
2042
|
-
required: false
|
|
2043
|
-
},
|
|
2044
|
-
prioritizePosition: {
|
|
2045
|
-
type: Boolean,
|
|
2046
|
-
required: false
|
|
2047
|
-
},
|
|
2048
|
-
reference: {
|
|
2049
|
-
type: null,
|
|
2050
|
-
required: false
|
|
2051
|
-
},
|
|
2052
|
-
asChild: {
|
|
2053
|
-
type: Boolean,
|
|
2054
|
-
required: false
|
|
2055
|
-
},
|
|
2056
|
-
as: {
|
|
2057
|
-
type: null,
|
|
2058
|
-
required: false
|
|
2059
|
-
}
|
|
2060
|
-
}, { ...PopperContentPropsDefaultValue }),
|
|
2061
|
-
emits: ["placed"],
|
|
2062
|
-
setup(__props, { emit: __emit }) {
|
|
2063
|
-
const props = __props;
|
|
2064
|
-
const emits = __emit;
|
|
2065
|
-
const rootContext = injectPopperRootContext();
|
|
2066
|
-
const { forwardRef, currentElement: contentElement } = useForwardExpose();
|
|
2067
|
-
const floatingRef = ref();
|
|
2068
|
-
const arrow$12 = ref();
|
|
2069
|
-
const { width: arrowWidth, height: arrowHeight } = useSize(arrow$12);
|
|
2070
|
-
const desiredPlacement = computed(() => props.side + (props.align !== "center" ? `-${props.align}` : ""));
|
|
2071
|
-
const collisionPadding = computed(() => {
|
|
2072
|
-
return typeof props.collisionPadding === "number" ? props.collisionPadding : {
|
|
2073
|
-
top: 0,
|
|
2074
|
-
right: 0,
|
|
2075
|
-
bottom: 0,
|
|
2076
|
-
left: 0,
|
|
2077
|
-
...props.collisionPadding
|
|
2078
|
-
};
|
|
2079
|
-
});
|
|
2080
|
-
const boundary = computed(() => {
|
|
2081
|
-
return Array.isArray(props.collisionBoundary) ? props.collisionBoundary : [props.collisionBoundary];
|
|
2082
|
-
});
|
|
2083
|
-
const detectOverflowOptions = computed(() => {
|
|
2084
|
-
return {
|
|
2085
|
-
padding: collisionPadding.value,
|
|
2086
|
-
boundary: boundary.value.filter(isNotNull),
|
|
2087
|
-
altBoundary: boundary.value.length > 0
|
|
2088
|
-
};
|
|
2089
|
-
});
|
|
2090
|
-
const flipOptions = computed(() => {
|
|
2091
|
-
return {
|
|
2092
|
-
mainAxis: props.sideFlip,
|
|
2093
|
-
crossAxis: props.alignFlip
|
|
2094
|
-
};
|
|
2095
|
-
});
|
|
2096
|
-
const computedMiddleware = computedEager(() => {
|
|
2097
|
-
return [
|
|
2098
|
-
offset({
|
|
2099
|
-
mainAxis: props.sideOffset + arrowHeight.value,
|
|
2100
|
-
alignmentAxis: props.alignOffset
|
|
2101
|
-
}),
|
|
2102
|
-
props.prioritizePosition && props.avoidCollisions && flip({
|
|
2103
|
-
...detectOverflowOptions.value,
|
|
2104
|
-
...flipOptions.value
|
|
2105
|
-
}),
|
|
2106
|
-
props.avoidCollisions && shift({
|
|
2107
|
-
mainAxis: true,
|
|
2108
|
-
crossAxis: !!props.prioritizePosition,
|
|
2109
|
-
limiter: props.sticky === "partial" ? limitShift() : void 0,
|
|
2110
|
-
...detectOverflowOptions.value
|
|
2111
|
-
}),
|
|
2112
|
-
!props.prioritizePosition && props.avoidCollisions && flip({
|
|
2113
|
-
...detectOverflowOptions.value,
|
|
2114
|
-
...flipOptions.value
|
|
2115
|
-
}),
|
|
2116
|
-
size({
|
|
2117
|
-
...detectOverflowOptions.value,
|
|
2118
|
-
apply: ({ elements, rects, availableWidth, availableHeight }) => {
|
|
2119
|
-
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
2120
|
-
const contentStyle = elements.floating.style;
|
|
2121
|
-
contentStyle.setProperty("--reka-popper-available-width", `${availableWidth}px`);
|
|
2122
|
-
contentStyle.setProperty("--reka-popper-available-height", `${availableHeight}px`);
|
|
2123
|
-
contentStyle.setProperty("--reka-popper-anchor-width", `${anchorWidth}px`);
|
|
2124
|
-
contentStyle.setProperty("--reka-popper-anchor-height", `${anchorHeight}px`);
|
|
2125
|
-
}
|
|
2126
|
-
}),
|
|
2127
|
-
arrow$12.value && arrow({
|
|
2128
|
-
element: arrow$12.value,
|
|
2129
|
-
padding: props.arrowPadding
|
|
2130
|
-
}),
|
|
2131
|
-
transformOrigin({
|
|
2132
|
-
arrowWidth: arrowWidth.value,
|
|
2133
|
-
arrowHeight: arrowHeight.value
|
|
2134
|
-
}),
|
|
2135
|
-
props.hideWhenDetached && hide({
|
|
2136
|
-
strategy: "referenceHidden",
|
|
2137
|
-
...detectOverflowOptions.value
|
|
2138
|
-
})
|
|
2139
|
-
];
|
|
2140
|
-
});
|
|
2141
|
-
const reference = computed(() => props.reference ?? rootContext.anchor.value);
|
|
2142
|
-
const { floatingStyles, placement, isPositioned, middlewareData } = useFloating(reference, floatingRef, {
|
|
2143
|
-
strategy: props.positionStrategy,
|
|
2144
|
-
placement: desiredPlacement,
|
|
2145
|
-
whileElementsMounted: (...args) => {
|
|
2146
|
-
const cleanup = autoUpdate(...args, {
|
|
2147
|
-
layoutShift: !props.disableUpdateOnLayoutShift,
|
|
2148
|
-
animationFrame: props.updatePositionStrategy === "always"
|
|
2149
|
-
});
|
|
2150
|
-
return cleanup;
|
|
2151
|
-
},
|
|
2152
|
-
middleware: computedMiddleware
|
|
2153
|
-
});
|
|
2154
|
-
const placedSide = computed(() => getSideAndAlignFromPlacement(placement.value)[0]);
|
|
2155
|
-
const placedAlign = computed(() => getSideAndAlignFromPlacement(placement.value)[1]);
|
|
2156
|
-
watchPostEffect(() => {
|
|
2157
|
-
if (isPositioned.value) emits("placed");
|
|
2158
|
-
});
|
|
2159
|
-
const cannotCenterArrow = computed(() => {
|
|
2160
|
-
var _a;
|
|
2161
|
-
return ((_a = middlewareData.value.arrow) == null ? void 0 : _a.centerOffset) !== 0;
|
|
2162
|
-
});
|
|
2163
|
-
const contentZIndex = ref("");
|
|
2164
|
-
watchEffect(() => {
|
|
2165
|
-
if (contentElement.value) contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;
|
|
2166
|
-
});
|
|
2167
|
-
const arrowX = computed(() => {
|
|
2168
|
-
var _a;
|
|
2169
|
-
return ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) ?? 0;
|
|
2170
|
-
});
|
|
2171
|
-
const arrowY = computed(() => {
|
|
2172
|
-
var _a;
|
|
2173
|
-
return ((_a = middlewareData.value.arrow) == null ? void 0 : _a.y) ?? 0;
|
|
2174
|
-
});
|
|
2175
|
-
providePopperContentContext({
|
|
2176
|
-
placedSide,
|
|
2177
|
-
onArrowChange: (element) => arrow$12.value = element,
|
|
2178
|
-
arrowX,
|
|
2179
|
-
arrowY,
|
|
2180
|
-
shouldHideArrow: cannotCenterArrow
|
|
2181
|
-
});
|
|
2182
|
-
return (_ctx, _cache) => {
|
|
2183
|
-
var _a, _b, _c;
|
|
2184
|
-
return openBlock(), createElementBlock("div", {
|
|
2185
|
-
ref_key: "floatingRef",
|
|
2186
|
-
ref: floatingRef,
|
|
2187
|
-
"data-reka-popper-content-wrapper": "",
|
|
2188
|
-
style: normalizeStyle({
|
|
2189
|
-
...unref(floatingStyles),
|
|
2190
|
-
transform: unref(isPositioned) ? unref(floatingStyles).transform : "translate(0, -200%)",
|
|
2191
|
-
minWidth: "max-content",
|
|
2192
|
-
zIndex: contentZIndex.value,
|
|
2193
|
-
["--reka-popper-transform-origin"]: [(_a = unref(middlewareData).transformOrigin) == null ? void 0 : _a.x, (_b = unref(middlewareData).transformOrigin) == null ? void 0 : _b.y].join(" "),
|
|
2194
|
-
...((_c = unref(middlewareData).hide) == null ? void 0 : _c.referenceHidden) && {
|
|
2195
|
-
visibility: "hidden",
|
|
2196
|
-
pointerEvents: "none"
|
|
2197
|
-
}
|
|
2198
|
-
})
|
|
2199
|
-
}, [createVNode(unref(Primitive), mergeProps({ ref: unref(forwardRef) }, _ctx.$attrs, {
|
|
2200
|
-
"as-child": props.asChild,
|
|
2201
|
-
as: _ctx.as,
|
|
2202
|
-
"data-side": placedSide.value,
|
|
2203
|
-
"data-align": placedAlign.value,
|
|
2204
|
-
style: { animation: !unref(isPositioned) ? "none" : void 0 }
|
|
2205
|
-
}), {
|
|
2206
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
2207
|
-
_: 3
|
|
2208
|
-
}, 16, [
|
|
2209
|
-
"as-child",
|
|
2210
|
-
"as",
|
|
2211
|
-
"data-side",
|
|
2212
|
-
"data-align",
|
|
2213
|
-
"style"
|
|
2214
|
-
])], 4);
|
|
2215
|
-
};
|
|
2216
|
-
}
|
|
2217
|
-
});
|
|
2218
|
-
var PopperContent_default = PopperContent_vue_vue_type_script_setup_true_lang_default;
|
|
2219
|
-
export {
|
|
2220
|
-
PopperRoot_default as P,
|
|
2221
|
-
useFocusGuards as a,
|
|
2222
|
-
PopperContent_default as b,
|
|
2223
|
-
useForwardPropsEmits as c,
|
|
2224
|
-
PopperAnchor_default as d,
|
|
2225
|
-
PopperContentPropsDefaultValue as e,
|
|
2226
|
-
useForwardProps as u
|
|
2227
|
-
};
|