@mcp-use/inspector 20.0.0-beta.4 → 20.0.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -78
- package/dist/app/inspector.css.gz +0 -0
- package/dist/app/inspector.js.gz +0 -0
- package/dist/app/providers/anthropic.png +0 -0
- package/dist/app/providers/google.png +0 -0
- package/dist/app/providers/openai.png +0 -0
- package/dist/cli.js +74 -1398
- package/dist/client/index.d.ts +1402 -50
- package/dist/client/index.js +165 -24019
- package/dist/server/index.d.ts +79 -7
- package/dist/server/index.js +99 -23
- package/package.json +77 -35
- package/dist/cdn/AnimatePresence-Dcw-FOy8.js +0 -393
- package/dist/cdn/ChatTab-UQAPDRQG.js +0 -6744
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/ConnectionSettingsForm-DrY1p-NO.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-B1cRD7hz.js +0 -150
- package/dist/cdn/ElicitationTab-CL1KJ0bz.js +0 -654
- package/dist/cdn/FormContext-tmgN_Vdr.js +0 -135
- package/dist/cdn/InspectorContext-UjtEbNod.js +0 -123
- package/dist/cdn/JSONDisplay-BFxf5oEu.js +0 -324
- package/dist/cdn/ListTabHeader-Cv-GmtGF.js +0 -88
- package/dist/cdn/ManufactOAuthCallback-B98kSYCj.js +0 -31
- package/dist/cdn/MarkdownRenderer-BoDJE8tP.js +0 -3610
- package/dist/cdn/NotificationsTab-CeImSrhx.js +0 -290
- package/dist/cdn/OAuthCallback-C9AvCkOn.js +0 -58
- package/dist/cdn/PromptsTab-CkAWyWVb.js +0 -901
- package/dist/cdn/ResourcesTab-BtBKxd4c.js +0 -564
- package/dist/cdn/SamplingTab-Czp7Rmhz.js +0 -658
- package/dist/cdn/ServerMetadataTab-CvrKX8fz.js +0 -244
- package/dist/cdn/StatusIcon-D0-ARyOh.js +0 -66
- package/dist/cdn/ToolsTab-Dm4vCB8D.js +0 -2033
- package/dist/cdn/ViewPreview-CZvl_7x-.js +0 -238
- package/dist/cdn/WidgetDebugContext-D4usL_MA.js +0 -324
- package/dist/cdn/WidgetWrapper-DeiogRXV.js +0 -2210
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-CGjAO_0s.js +0 -10
- package/dist/cdn/browser-CbQIH4w2.js +0 -42
- package/dist/cdn/brush-B_mKhyxG.js +0 -17
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-By0FklhG.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-CmUbSx_B.js +0 -12
- package/dist/cdn/code-V_0nf5rg.js +0 -10
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/dialog-BsDpuJd3.js +0 -1028
- package/dist/cdn/dist-3QLh0dt8.js +0 -2306
- package/dist/cdn/dist-DaMB0Su9.js +0 -616
- package/dist/cdn/external-link-CjmfT6rW.js +0 -17
- package/dist/cdn/eye-B7H96av8.js +0 -29
- package/dist/cdn/folder-open-B3lu2rG_.js +0 -7
- package/dist/cdn/hash-BVQnWi7q.js +0 -33
- package/dist/cdn/history-Csw4rb44.js +0 -17
- package/dist/cdn/index-browser-CIoYSwCt.js +0 -1934
- package/dist/cdn/info-CNiOwqkf.js +0 -19
- package/dist/cdn/input-C2OBd4PJ.js +0 -12160
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/inspector.css +0 -2
- package/dist/cdn/inspector.js +0 -24523
- package/dist/cdn/jsx-runtime-CIxvMpEo.js +0 -180
- package/dist/cdn/label-B9Jmm9be.js +0 -60
- package/dist/cdn/loader-circle-BLy9A_pp.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-CH5Lq90B.js +0 -21
- package/dist/cdn/maximize-BALCV_ep.js +0 -21
- package/dist/cdn/message-square-BnxdpJxZ.js +0 -7
- package/dist/cdn/not-found-DEtSM_Wd.js +0 -34
- package/dist/cdn/play-vuZ5PLnI.js +0 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/providers/anthropic.png +0 -0
- package/dist/cdn/providers/google.png +0 -0
- package/dist/cdn/providers/openai.png +0 -0
- package/dist/cdn/react-0oJnFpBS.js +0 -5425
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/refresh-cw-BXY-Pa0U.js +0 -21
- package/dist/cdn/save-Tgil_AJZ.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-DDdiIPR2.js +0 -2594
- package/dist/cdn/servers-Dm72iTpY.js +0 -26
- package/dist/cdn/shared-DaILIQPP.js +0 -1700
- package/dist/cdn/sheet-Br_l2kry.js +0 -2077
- package/dist/cdn/sparkles-BntO2rDR.js +0 -23
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/cdn/square-check-big-BvwQ17Bl.js +0 -10
- package/dist/cdn/switch-C3IyQuid.js +0 -664
- package/dist/cdn/tabs-subtle-CkdI6Mac.js +0 -787
- package/dist/cdn/telemetry-BbhH1Z_E.js +0 -240
- package/dist/cdn/textarea-DSbwcFVt.js +0 -14
- package/dist/cdn/trash-2-RwpJY5SL.js +0 -25
- package/dist/cdn/useAriaLabelledBy-DqAdnppm.js +0 -29
- package/dist/cdn/useCompositeItem-BRqEzYh-.js +0 -26
- package/dist/cdn/useConfig-BNpU7Atw.js +0 -235
- package/dist/cdn/useSavedRequests-Ci2I919u.js +0 -51
- package/dist/cdn/useViewHostProps-ru80AnlT.js +0 -349
- package/dist/cdn/wrench-DzGmCfnb.js +0 -7
- package/dist/cdn/x-C3vRQIYu.js +0 -10
- package/dist/cdn/zap-Mb-pbw2X.js +0 -10
- package/dist/client/auth/manufact-auth.d.ts +0 -32
- package/dist/client/auth/manufact-auth.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryHeader.d.ts +0 -4
- package/dist/client/chat-history/ChatHistoryHeader.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryPanel.d.ts +0 -28
- package/dist/client/chat-history/ChatHistoryPanel.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryRail.d.ts +0 -5
- package/dist/client/chat-history/ChatHistoryRail.d.ts.map +0 -1
- package/dist/client/chat-history/ChatList.d.ts +0 -18
- package/dist/client/chat-history/ChatList.d.ts.map +0 -1
- package/dist/client/chat-history/ChatTitleReveal.d.ts +0 -10
- package/dist/client/chat-history/ChatTitleReveal.d.ts.map +0 -1
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts +0 -13
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts.map +0 -1
- package/dist/client/chat-history/chat-title.d.ts +0 -10
- package/dist/client/chat-history/chat-title.d.ts.map +0 -1
- package/dist/client/chat-history/providers/local-storage.d.ts +0 -21
- package/dist/client/chat-history/providers/local-storage.d.ts.map +0 -1
- package/dist/client/chat-history/types.d.ts +0 -39
- package/dist/client/chat-history/types.d.ts.map +0 -1
- package/dist/client/chat-history/useChatHistory.d.ts +0 -20
- package/dist/client/chat-history/useChatHistory.d.ts.map +0 -1
- package/dist/client/chat-history/useChatTitleGeneration.d.ts +0 -17
- package/dist/client/chat-history/useChatTitleGeneration.d.ts.map +0 -1
- package/dist/client/components/AddToClientDropdown.d.ts +0 -52
- package/dist/client/components/AddToClientDropdown.d.ts.map +0 -1
- package/dist/client/components/ChatTab.d.ts +0 -98
- package/dist/client/components/ChatTab.d.ts.map +0 -1
- package/dist/client/components/IframeConsole.d.ts +0 -7
- package/dist/client/components/IframeConsole.d.ts.map +0 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts +0 -19
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +0 -1
- package/dist/client/components/PromptsTab.d.ts +0 -34
- package/dist/client/components/PromptsTab.d.ts.map +0 -1
- package/dist/client/components/ResourcesTab.d.ts +0 -31
- package/dist/client/components/ResourcesTab.d.ts.map +0 -1
- package/dist/client/components/ToolsTab.d.ts +0 -39
- package/dist/client/components/ToolsTab.d.ts.map +0 -1
- package/dist/client/components/chat/AssistantMessage.d.ts +0 -10
- package/dist/client/components/chat/AssistantMessage.d.ts.map +0 -1
- package/dist/client/components/chat/ChatHeader.d.ts +0 -70
- package/dist/client/components/chat/ChatHeader.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInput.d.ts +0 -29
- package/dist/client/components/chat/ChatInput.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInputArea.d.ts +0 -65
- package/dist/client/components/chat/ChatInputArea.d.ts.map +0 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +0 -15
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +0 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +0 -10
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +0 -1
- package/dist/client/components/chat/ChatTraceView.d.ts +0 -7
- package/dist/client/components/chat/ChatTraceView.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts +0 -42
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +0 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +0 -1
- package/dist/client/components/chat/CopyButton.d.ts +0 -10
- package/dist/client/components/chat/CopyButton.d.ts.map +0 -1
- package/dist/client/components/chat/FloatingChatElicitation.d.ts +0 -10
- package/dist/client/components/chat/FloatingChatElicitation.d.ts.map +0 -1
- package/dist/client/components/chat/McpReconnectBanner.d.ts +0 -10
- package/dist/client/components/chat/McpReconnectBanner.d.ts.map +0 -1
- package/dist/client/components/chat/MessageList.d.ts +0 -47
- package/dist/client/components/chat/MessageList.d.ts.map +0 -1
- package/dist/client/components/chat/MessageMetaActions.d.ts +0 -7
- package/dist/client/components/chat/MessageMetaActions.d.ts.map +0 -1
- package/dist/client/components/chat/PromptResultsList.d.ts +0 -8
- package/dist/client/components/chat/PromptResultsList.d.ts.map +0 -1
- package/dist/client/components/chat/PromptsDropdown.d.ts +0 -11
- package/dist/client/components/chat/PromptsDropdown.d.ts.map +0 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts +0 -7
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +0 -1
- package/dist/client/components/chat/SystemPromptButton.d.ts +0 -11
- package/dist/client/components/chat/SystemPromptButton.d.ts.map +0 -1
- package/dist/client/components/chat/ToolCallDisplay.d.ts +0 -10
- package/dist/client/components/chat/ToolCallDisplay.d.ts.map +0 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts +0 -15
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +0 -1
- package/dist/client/components/chat/ToolSelector.d.ts +0 -13
- package/dist/client/components/chat/ToolSelector.d.ts.map +0 -1
- package/dist/client/components/chat/UserMessage.d.ts +0 -10
- package/dist/client/components/chat/UserMessage.d.ts.map +0 -1
- package/dist/client/components/chat/chat-bar-styles.d.ts +0 -6
- package/dist/client/components/chat/chat-bar-styles.d.ts.map +0 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +0 -11
- package/dist/client/components/chat/chatModeStorage.d.ts.map +0 -1
- package/dist/client/components/chat/conversion.d.ts +0 -19
- package/dist/client/components/chat/conversion.d.ts.map +0 -1
- package/dist/client/components/chat/freeTier.d.ts +0 -32
- package/dist/client/components/chat/freeTier.d.ts.map +0 -1
- package/dist/client/components/chat/managedChatNotice.d.ts +0 -16
- package/dist/client/components/chat/managedChatNotice.d.ts.map +0 -1
- package/dist/client/components/chat/providerMeta.d.ts +0 -27
- package/dist/client/components/chat/providerMeta.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/local-storage.d.ts +0 -5
- package/dist/client/components/chat/system-prompt/local-storage.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/types.d.ts +0 -8
- package/dist/client/components/chat/system-prompt/types.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts +0 -3
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt-default.d.ts +0 -2
- package/dist/client/components/chat/system-prompt-default.d.ts.map +0 -1
- package/dist/client/components/chat/trace.d.ts +0 -84
- package/dist/client/components/chat/trace.d.ts.map +0 -1
- package/dist/client/components/chat/types.d.ts +0 -75
- package/dist/client/components/chat/types.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessages.d.ts +0 -76
- package/dist/client/components/chat/useChatMessages.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +0 -43
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +0 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +0 -14
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +0 -1
- package/dist/client/components/chat/useConfig.d.ts +0 -24
- package/dist/client/components/chat/useConfig.d.ts.map +0 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +0 -14
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +0 -1
- package/dist/client/components/chat/useManagedCloudModel.d.ts +0 -14
- package/dist/client/components/chat/useManagedCloudModel.d.ts.map +0 -1
- package/dist/client/components/chat/utils.d.ts +0 -11
- package/dist/client/components/chat/utils.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts +0 -12
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts +0 -9
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts +0 -8
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts +0 -13
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptInputForm.d.ts +0 -9
- package/dist/client/components/prompts/PromptInputForm.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptMessageCard.d.ts +0 -29
- package/dist/client/components/prompts/PromptMessageCard.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptResultDisplay.d.ts +0 -34
- package/dist/client/components/prompts/PromptResultDisplay.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptsList.d.ts +0 -10
- package/dist/client/components/prompts/PromptsList.d.ts.map +0 -1
- package/dist/client/components/prompts/SavedPromptsList.d.ts +0 -19
- package/dist/client/components/prompts/SavedPromptsList.d.ts.map +0 -1
- package/dist/client/components/resources/PropsConfigDialog.d.ts +0 -16
- package/dist/client/components/resources/PropsConfigDialog.d.ts.map +0 -1
- package/dist/client/components/resources/ResourceResultDisplay.d.ts +0 -30
- package/dist/client/components/resources/ResourceResultDisplay.d.ts.map +0 -1
- package/dist/client/components/resources/ResourcesList.d.ts +0 -10
- package/dist/client/components/resources/ResourcesList.d.ts.map +0 -1
- package/dist/client/components/shared/CollapsibleJSON.d.ts +0 -6
- package/dist/client/components/shared/CollapsibleJSON.d.ts.map +0 -1
- package/dist/client/components/shared/InspectorScrollArea.d.ts +0 -9
- package/dist/client/components/shared/InspectorScrollArea.d.ts.map +0 -1
- package/dist/client/components/shared/JSONDisplay.d.ts +0 -12
- package/dist/client/components/shared/JSONDisplay.d.ts.map +0 -1
- package/dist/client/components/shared/ListItem.d.ts +0 -24
- package/dist/client/components/shared/ListItem.d.ts.map +0 -1
- package/dist/client/components/shared/ListTabHeader.d.ts +0 -47
- package/dist/client/components/shared/ListTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +0 -15
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +0 -1
- package/dist/client/components/shared/SchemaFormField.d.ts +0 -12
- package/dist/client/components/shared/SchemaFormField.d.ts.map +0 -1
- package/dist/client/components/shared/SearchTabHeader.d.ts +0 -28
- package/dist/client/components/shared/SearchTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/StatusIcon.d.ts +0 -12
- package/dist/client/components/shared/StatusIcon.d.ts.map +0 -1
- package/dist/client/components/shared/index.d.ts +0 -7
- package/dist/client/components/shared/index.d.ts.map +0 -1
- package/dist/client/components/tools/SaveRequestDialog.d.ts +0 -11
- package/dist/client/components/tools/SaveRequestDialog.d.ts.map +0 -1
- package/dist/client/components/tools/SavedRequestsList.d.ts +0 -19
- package/dist/client/components/tools/SavedRequestsList.d.ts.map +0 -1
- package/dist/client/components/tools/ToolExecutionPanel.d.ts +0 -20
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/tools/ToolInputForm.d.ts +0 -14
- package/dist/client/components/tools/ToolInputForm.d.ts.map +0 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +0 -24
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +0 -1
- package/dist/client/components/tools/ToolsList.d.ts +0 -10
- package/dist/client/components/tools/ToolsList.d.ts.map +0 -1
- package/dist/client/components/tools/schema-utils.d.ts +0 -13
- package/dist/client/components/tools/schema-utils.d.ts.map +0 -1
- package/dist/client/components/tools/useToolExecution.d.ts +0 -26
- package/dist/client/components/tools/useToolExecution.d.ts.map +0 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts +0 -35
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +0 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +0 -13
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +0 -1
- package/dist/client/components/ui/WidgetWrapper.d.ts +0 -12
- package/dist/client/components/ui/WidgetWrapper.d.ts.map +0 -1
- package/dist/client/components/ui/alert-dialog.d.ts +0 -15
- package/dist/client/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/client/components/ui/ask-user-questions.d.ts +0 -80
- package/dist/client/components/ui/ask-user-questions.d.ts.map +0 -1
- package/dist/client/components/ui/badge.d.ts +0 -34
- package/dist/client/components/ui/badge.d.ts.map +0 -1
- package/dist/client/components/ui/blur-fade.d.ts +0 -25
- package/dist/client/components/ui/blur-fade.d.ts.map +0 -1
- package/dist/client/components/ui/button.d.ts +0 -34
- package/dist/client/components/ui/button.d.ts.map +0 -1
- package/dist/client/components/ui/chat-message.d.ts +0 -23
- package/dist/client/components/ui/chat-message.d.ts.map +0 -1
- package/dist/client/components/ui/checkbox.d.ts +0 -4
- package/dist/client/components/ui/checkbox.d.ts.map +0 -1
- package/dist/client/components/ui/client-icons.d.ts +0 -20
- package/dist/client/components/ui/client-icons.d.ts.map +0 -1
- package/dist/client/components/ui/command.d.ts +0 -17
- package/dist/client/components/ui/command.d.ts.map +0 -1
- package/dist/client/components/ui/dialog.d.ts +0 -37
- package/dist/client/components/ui/dialog.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown-menu.d.ts +0 -25
- package/dist/client/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown.d.ts +0 -30
- package/dist/client/components/ui/dropdown.d.ts.map +0 -1
- package/dist/client/components/ui/file-thumbnail.d.ts +0 -9
- package/dist/client/components/ui/file-thumbnail.d.ts.map +0 -1
- package/dist/client/components/ui/input.d.ts +0 -4
- package/dist/client/components/ui/input.d.ts.map +0 -1
- package/dist/client/components/ui/kbd.d.ts +0 -3
- package/dist/client/components/ui/kbd.d.ts.map +0 -1
- package/dist/client/components/ui/label.d.ts +0 -4
- package/dist/client/components/ui/label.d.ts.map +0 -1
- package/dist/client/components/ui/menu-item.d.ts +0 -52
- package/dist/client/components/ui/menu-item.d.ts.map +0 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +0 -12
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +0 -1
- package/dist/client/components/ui/not-found.d.ts +0 -9
- package/dist/client/components/ui/not-found.d.ts.map +0 -1
- package/dist/client/components/ui/popover.d.ts +0 -6
- package/dist/client/components/ui/popover.d.ts.map +0 -1
- package/dist/client/components/ui/resizable.d.ts +0 -10
- package/dist/client/components/ui/resizable.d.ts.map +0 -1
- package/dist/client/components/ui/scroll-area.d.ts +0 -4
- package/dist/client/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/client/components/ui/select.d.ts +0 -52
- package/dist/client/components/ui/select.d.ts.map +0 -1
- package/dist/client/components/ui/sheet.d.ts +0 -14
- package/dist/client/components/ui/sheet.d.ts.map +0 -1
- package/dist/client/components/ui/skeleton.d.ts +0 -4
- package/dist/client/components/ui/skeleton.d.ts.map +0 -1
- package/dist/client/components/ui/spinner.d.ts +0 -3
- package/dist/client/components/ui/spinner.d.ts.map +0 -1
- package/dist/client/components/ui/switch.d.ts +0 -22
- package/dist/client/components/ui/switch.d.ts.map +0 -1
- package/dist/client/components/ui/table.d.ts +0 -9
- package/dist/client/components/ui/table.d.ts.map +0 -1
- package/dist/client/components/ui/tabs-subtle.d.ts +0 -25
- package/dist/client/components/ui/tabs-subtle.d.ts.map +0 -1
- package/dist/client/components/ui/text-shimmer.d.ts +0 -11
- package/dist/client/components/ui/text-shimmer.d.ts.map +0 -1
- package/dist/client/components/ui/textarea.d.ts +0 -4
- package/dist/client/components/ui/textarea.d.ts.map +0 -1
- package/dist/client/components/ui/tooltip.d.ts +0 -43
- package/dist/client/components/ui/tooltip.d.ts.map +0 -1
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts +0 -19
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts.map +0 -1
- package/dist/client/console-log-bus.d.ts +0 -24
- package/dist/client/console-log-bus.d.ts.map +0 -1
- package/dist/client/constants/debug-options.d.ts +0 -16
- package/dist/client/constants/debug-options.d.ts.map +0 -1
- package/dist/client/context/InspectorContext.d.ts +0 -134
- package/dist/client/context/InspectorContext.d.ts.map +0 -1
- package/dist/client/context/ThemeContext.d.ts +0 -17
- package/dist/client/context/ThemeContext.d.ts.map +0 -1
- package/dist/client/context/WidgetDebugContext.d.ts +0 -121
- package/dist/client/context/WidgetDebugContext.d.ts.map +0 -1
- package/dist/client/hooks/use-merge-split.d.ts +0 -36
- package/dist/client/hooks/use-merge-split.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover-index.d.ts +0 -27
- package/dist/client/hooks/use-proximity-hover-index.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover.d.ts +0 -26
- package/dist/client/hooks/use-proximity-hover.d.ts.map +0 -1
- package/dist/client/hooks/use-touch-primary.d.ts +0 -2
- package/dist/client/hooks/use-touch-primary.d.ts.map +0 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +0 -18
- package/dist/client/hooks/useDeviceViewport.d.ts.map +0 -1
- package/dist/client/hooks/useHostedSession.d.ts +0 -9
- package/dist/client/hooks/useHostedSession.d.ts.map +0 -1
- package/dist/client/hooks/useIframeConsole.d.ts +0 -24
- package/dist/client/hooks/useIframeConsole.d.ts.map +0 -1
- package/dist/client/hooks/useKeyboardShortcuts.d.ts +0 -28
- package/dist/client/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/client/hooks/useMCPPrompts.d.ts +0 -94
- package/dist/client/hooks/useMCPPrompts.d.ts.map +0 -1
- package/dist/client/hooks/useMcpAppsHostContext.d.ts +0 -27
- package/dist/client/hooks/useMcpAppsHostContext.d.ts.map +0 -1
- package/dist/client/hooks/usePropsLLM.d.ts +0 -20
- package/dist/client/hooks/usePropsLLM.d.ts.map +0 -1
- package/dist/client/hooks/useResourceProps.d.ts +0 -14
- package/dist/client/hooks/useResourceProps.d.ts.map +0 -1
- package/dist/client/hooks/useSavedRequests.d.ts +0 -6
- package/dist/client/hooks/useSavedRequests.d.ts.map +0 -1
- package/dist/client/hooks/useViewHostProps.d.ts +0 -19
- package/dist/client/hooks/useViewHostProps.d.ts.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/lib/elevated.d.ts +0 -28
- package/dist/client/lib/elevated.d.ts.map +0 -1
- package/dist/client/lib/font-weight.d.ts +0 -10
- package/dist/client/lib/font-weight.d.ts.map +0 -1
- package/dist/client/lib/icon-context.d.ts +0 -15
- package/dist/client/lib/icon-context.d.ts.map +0 -1
- package/dist/client/lib/shape-context.d.ts +0 -21
- package/dist/client/lib/shape-context.d.ts.map +0 -1
- package/dist/client/lib/springs.d.ts +0 -32
- package/dist/client/lib/springs.d.ts.map +0 -1
- package/dist/client/lib/surface-classes.d.ts +0 -2
- package/dist/client/lib/surface-classes.d.ts.map +0 -1
- package/dist/client/lib/surface-context.d.ts +0 -7
- package/dist/client/lib/surface-context.d.ts.map +0 -1
- package/dist/client/lib/utils.d.ts +0 -3
- package/dist/client/lib/utils.d.ts.map +0 -1
- package/dist/client/mcp-apps/csp.d.ts +0 -26
- package/dist/client/mcp-apps/csp.d.ts.map +0 -1
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts +0 -17
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts.map +0 -1
- package/dist/client/mcp-apps/logging-transport.d.ts +0 -13
- package/dist/client/mcp-apps/logging-transport.d.ts.map +0 -1
- package/dist/client/rpc-traffic-coalesce.d.ts +0 -7
- package/dist/client/rpc-traffic-coalesce.d.ts.map +0 -1
- package/dist/client/rpc-traffic-store.d.ts +0 -37
- package/dist/client/rpc-traffic-store.d.ts.map +0 -1
- package/dist/client/telemetry/capture.d.ts +0 -7
- package/dist/client/telemetry/capture.d.ts.map +0 -1
- package/dist/client/telemetry/events.d.ts +0 -168
- package/dist/client/telemetry/events.d.ts.map +0 -1
- package/dist/client/telemetry/index.d.ts +0 -5
- package/dist/client/telemetry/index.d.ts.map +0 -1
- package/dist/client/telemetry/init.d.ts +0 -2
- package/dist/client/telemetry/init.d.ts.map +0 -1
- package/dist/client/telemetry/utils.d.ts +0 -7
- package/dist/client/telemetry/utils.d.ts.map +0 -1
- package/dist/client/types/message-content-block.d.ts +0 -19
- package/dist/client/types/message-content-block.d.ts.map +0 -1
- package/dist/client/types/pending-requests.d.ts +0 -17
- package/dist/client/types/pending-requests.d.ts.map +0 -1
- package/dist/client/utils/basePath.d.ts +0 -34
- package/dist/client/utils/basePath.d.ts.map +0 -1
- package/dist/client/utils/browser.d.ts +0 -5
- package/dist/client/utils/browser.d.ts.map +0 -1
- package/dist/client/utils/format.d.ts +0 -4
- package/dist/client/utils/format.d.ts.map +0 -1
- package/dist/client/utils/highlightJson.d.ts +0 -11
- package/dist/client/utils/highlightJson.d.ts.map +0 -1
- package/dist/client/utils/jsonUtils.d.ts +0 -24
- package/dist/client/utils/jsonUtils.d.ts.map +0 -1
- package/dist/client/utils/mcpClientUtils.d.ts +0 -131
- package/dist/client/utils/mcpClientUtils.d.ts.map +0 -1
- package/dist/client/utils/servers.d.ts +0 -14
- package/dist/client/utils/servers.d.ts.map +0 -1
- package/dist/server/asset-urls.d.ts +0 -18
- package/dist/server/asset-urls.d.ts.map +0 -1
- package/dist/server/asset-urls.js +0 -17
- package/dist/server/cdn-shell.d.ts +0 -18
- package/dist/server/cdn-shell.d.ts.map +0 -1
- package/dist/server/cdn-shell.js +0 -12
- package/dist/server/chunk-5L3HMC5B.js +0 -72
- package/dist/server/chunk-BEJGHVKM.js +0 -148
- package/dist/server/chunk-H6ZCIKBS.js +0 -63
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/chunk-J4FNYLBF.js +0 -54
- package/dist/server/chunk-K2F2AJOI.js +0 -619
- package/dist/server/chunk-KD7K27XK.js +0 -77
- package/dist/server/chunk-M5TZA42I.js +0 -54
- package/dist/server/chunk-OWR2BIBW.js +0 -40
- package/dist/server/chunk-PGN3B3MQ.js +0 -156
- package/dist/server/chunk-PKBMQBKP.js +0 -7
- package/dist/server/chunk-UJLXHNQP.js +0 -43
- package/dist/server/chunk-WFT4JHYI.js +0 -24
- package/dist/server/chunk-XCNS5CIW.js +0 -199
- package/dist/server/cli.d.ts +0 -3
- package/dist/server/cli.d.ts.map +0 -1
- package/dist/server/cli.js +0 -141
- package/dist/server/create-dev-api-app.d.ts +0 -4
- package/dist/server/create-dev-api-app.d.ts.map +0 -1
- package/dist/server/create-dev-api-app.js +0 -11
- package/dist/server/dev-callback-redirect.d.ts +0 -3
- package/dist/server/dev-callback-redirect.d.ts.map +0 -1
- package/dist/server/dev-callback-redirect.js +0 -18
- package/dist/server/favicon-links.d.ts +0 -12
- package/dist/server/favicon-links.d.ts.map +0 -1
- package/dist/server/favicon-links.js +0 -11
- package/dist/server/favicon-static.d.ts +0 -4
- package/dist/server/favicon-static.d.ts.map +0 -1
- package/dist/server/favicon-static.js +0 -8
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/middleware.d.ts +0 -40
- package/dist/server/middleware.d.ts.map +0 -1
- package/dist/server/middleware.js +0 -17
- package/dist/server/proxy/index.d.ts +0 -3
- package/dist/server/proxy/index.d.ts.map +0 -1
- package/dist/server/proxy/index.js +0 -12
- package/dist/server/proxy/mcp-proxy.d.ts +0 -101
- package/dist/server/proxy/mcp-proxy.d.ts.map +0 -1
- package/dist/server/proxy/mcp-proxy.js +0 -10
- package/dist/server/proxy/oauth-proxy.d.ts +0 -26
- package/dist/server/proxy/oauth-proxy.d.ts.map +0 -1
- package/dist/server/proxy/oauth-proxy.js +0 -9
- package/dist/server/proxy-routes.d.ts +0 -16
- package/dist/server/proxy-routes.d.ts.map +0 -1
- package/dist/server/proxy-routes.js +0 -10
- package/dist/server/rpc-log-bus.d.ts +0 -17
- package/dist/server/rpc-log-bus.d.ts.map +0 -1
- package/dist/server/rpc-log-bus.js +0 -77
- package/dist/server/server.d.ts +0 -15
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/server.js +0 -66
- package/dist/server/static-assets.d.ts +0 -5
- package/dist/server/static-assets.d.ts.map +0 -1
- package/dist/server/static-assets.js +0 -9
- package/dist/server/utils.d.ts +0 -33
- package/dist/server/utils.d.ts.map +0 -1
- package/dist/server/utils.js +0 -17
- package/dist/server/version.d.ts +0 -7
- package/dist/server/version.d.ts.map +0 -1
- package/dist/server/version.js +0 -9
- package/dist/server/vite-dev-api-plugin.d.ts +0 -4
- package/dist/server/vite-dev-api-plugin.d.ts.map +0 -1
- package/dist/server/vite-dev-api-plugin.js +0 -30
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-B_5S87J1.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-XwjwKfsO.js +0 -1
- package/dist/web/assets/ElicitationTab-BD1tfmYR.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/ManufactOAuthCallback-DD3qfIC3.js +0 -1
- package/dist/web/assets/MarkdownRenderer-DH-7vpw0.js +0 -47
- package/dist/web/assets/NotificationsTab-Cg48O6IH.js +0 -1
- package/dist/web/assets/OAuthCallback-4i2i3YpE.js +0 -1
- package/dist/web/assets/PromptsTab-pAR6izrQ.js +0 -15
- package/dist/web/assets/ResourcesTab-CgvfWrsU.js +0 -2
- package/dist/web/assets/SamplingTab-DfIWMQFY.js +0 -1
- package/dist/web/assets/ServerMetadataTab-Dsz8Qhyr.js +0 -1
- package/dist/web/assets/ToolsTab-ln9w58BW.js +0 -8
- package/dist/web/assets/ViewPreview-CQ3G3VP0.js +0 -1
- package/dist/web/assets/WidgetWrapper-A-zaxY5s.js +0 -34
- package/dist/web/assets/brush--0LobUi4.js +0 -1
- package/dist/web/assets/checkbox-DZWS_U_i.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/dist-DxRFPg-B.js +0 -21
- package/dist/web/assets/index-CoRK2C3M.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/label-Cdim77Jw.js +0 -1
- package/dist/web/assets/maximize-2-BTT9QQU9.js +0 -1
- package/dist/web/assets/maximize-_O55kFcr.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-C9wQl8_d.js +0 -1
- package/dist/web/assets/save-B-MsgxX9.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-Dbc2GbRx.js +0 -1
- package/dist/web/assets/sparkles-2OAsc1aP.js +0 -1
- package/dist/web/assets/tabs-subtle-CxMZqhP6.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useConfig-Cg-BtSHA.js +0 -1
- package/dist/web/assets/useViewHostProps-CMgPpdfy.js +0 -1
- package/dist/web/assets/zap-Du2Uc5pa.js +0 -1
- package/dist/web/favicon-96x96.png +0 -0
- package/dist/web/favicon-black.svg +0 -5
- package/dist/web/favicon-white.svg +0 -5
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +0 -5
- package/dist/web/index.html +0 -89
- package/dist/web/providers/anthropic.png +0 -0
- package/dist/web/providers/google.png +0 -0
- package/dist/web/providers/openai.png +0 -0
- package/dist/web/site.webmanifest +0 -21
- package/dist/web/web-app-manifest-192x192.png +0 -0
- package/dist/web/web-app-manifest-512x512.png +0 -0
- /package/dist/{cdn → app}/apple-touch-icon.png +0 -0
- /package/dist/{cdn → app}/favicon-96x96.png +0 -0
- /package/dist/{cdn → app}/favicon-black.svg +0 -0
- /package/dist/{cdn → app}/favicon-white.svg +0 -0
- /package/dist/{cdn → app}/favicon.ico +0 -0
- /package/dist/{cdn → app}/favicon.svg +0 -0
- /package/dist/{cdn → app}/site.webmanifest +0 -0
- /package/dist/{cdn → app}/web-app-manifest-192x192.png +0 -0
- /package/dist/{cdn → app}/web-app-manifest-512x512.png +0 -0
|
@@ -1,2594 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { $t as n, An as r, Ar as i, Bt as a, Cn as o, Dt as s, En as c, Er as l, Et as u, Fn as d, Ft as f, Ht as p, In as m, J as h, Jt as g, Kn as _, Ln as v, Lr as y, Lt as b, Mn as x, Mr as S, Mt as ee, Nn as C, Nr as w, On as te, Or as T, Pt as E, Qt as D, Rr as O, Sn as ne, Sr as k, Tn as A, Tr as j, Tt as M, Un as N, Ut as re, Vt as ie, Wt as ae, X as oe, Xt as P, Yn as F, Yt as I, Z as L, Zt as R, _n as z, _r as B, an as V, bn as H, br as U, bt as se, cn as ce, dn as le, dr as ue, en as de, er as fe, f as W, fn as pe, fr as me, gn as he, gr as ge, hn as _e, hr as ve, in as ye, ir as be, jn as xe, jt as Se, kn as Ce, kr as G, ln as we, mn as K, mr as q, nn as Te, nt as Ee, o as De, on as Oe, or as ke, pn as Ae, pr as je, q as Me, qn as Ne, qt as Pe, rn as Fe, rr as Ie, s as Le, sn as Re, st as ze, tn as Be, tr as Ve, un as He, vn as Ue, wn as We, wr as J, wt as Y, xn as Ge, xr as Ke, xt as X, yn as qe, zn as Je, zr as Ye, zt as Xe } from "./input-C2OBd4PJ.js";
|
|
3
|
-
import { t as Ze } from "./jsx-runtime-CIxvMpEo.js";
|
|
4
|
-
import { n as Qe } from "./label-B9Jmm9be.js";
|
|
5
|
-
import { b as $e, l as et, n as tt, r as nt, t as rt, y as it } from "./AnimatePresence-Dcw-FOy8.js";
|
|
6
|
-
import { c as at, i as ot, l as st, o as ct, r as lt, t as ut } from "./FormContext-tmgN_Vdr.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/utils/enqueueFocus.mjs
|
|
8
|
-
var Z = /* @__PURE__ */ e(t(), 1), dt = 0;
|
|
9
|
-
function ft(e, t = {}) {
|
|
10
|
-
let { preventScroll: n = !1, sync: r = !1, shouldFocus: i } = t;
|
|
11
|
-
cancelAnimationFrame(dt);
|
|
12
|
-
function a() {
|
|
13
|
-
i && !i() || e?.focus({ preventScroll: n });
|
|
14
|
-
}
|
|
15
|
-
if (r) return a(), q;
|
|
16
|
-
let o = requestAnimationFrame(a);
|
|
17
|
-
return dt = o, () => {
|
|
18
|
-
dt === o && (cancelAnimationFrame(o), dt = 0);
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/utils/markOthers.mjs
|
|
23
|
-
var pt = {
|
|
24
|
-
inert: /* @__PURE__ */ new WeakMap(),
|
|
25
|
-
"aria-hidden": /* @__PURE__ */ new WeakMap()
|
|
26
|
-
}, mt = "data-base-ui-inert", ht = {
|
|
27
|
-
inert: /* @__PURE__ */ new WeakSet(),
|
|
28
|
-
"aria-hidden": /* @__PURE__ */ new WeakSet()
|
|
29
|
-
}, gt = /* @__PURE__ */ new WeakMap(), _t = 0;
|
|
30
|
-
function vt(e) {
|
|
31
|
-
return ht[e];
|
|
32
|
-
}
|
|
33
|
-
function yt(e) {
|
|
34
|
-
return e ? w(e) ? e.host : yt(e.parentNode) : null;
|
|
35
|
-
}
|
|
36
|
-
var bt = (e, t) => t.map((t) => {
|
|
37
|
-
if (e.contains(t)) return t;
|
|
38
|
-
let n = yt(t);
|
|
39
|
-
return e.contains(n) ? n : null;
|
|
40
|
-
}).filter((e) => e != null), xt = (e) => {
|
|
41
|
-
let t = /* @__PURE__ */ new Set();
|
|
42
|
-
return e.forEach((e) => {
|
|
43
|
-
let n = e;
|
|
44
|
-
for (; n && !t.has(n);) t.add(n), n = n.parentNode;
|
|
45
|
-
}), t;
|
|
46
|
-
}, St = (e, t, n) => {
|
|
47
|
-
let r = [], i = (e) => {
|
|
48
|
-
!e || n.has(e) || Array.from(e.children).forEach((e) => {
|
|
49
|
-
l(e) !== "script" && (t.has(e) ? i(e) : r.push(e));
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
return i(e), r;
|
|
53
|
-
};
|
|
54
|
-
function Ct(e, t, n, r, { mark: i = !0 }) {
|
|
55
|
-
let a = null;
|
|
56
|
-
r ? a = "inert" : n && (a = "aria-hidden");
|
|
57
|
-
let o = null, s = null, c = bt(t, e), l = i ? St(t, xt(c), new Set(c)) : [], u = [], d = [];
|
|
58
|
-
if (a) {
|
|
59
|
-
let e = pt[a], n = vt(a);
|
|
60
|
-
s = n, o = e;
|
|
61
|
-
let r = bt(t, Array.from(t.querySelectorAll("[aria-live]"))), i = c.concat(r);
|
|
62
|
-
St(t, xt(i), new Set(i)).forEach((t) => {
|
|
63
|
-
let r = t.getAttribute(a), i = r !== null && r !== "false", o = (e.get(t) || 0) + 1;
|
|
64
|
-
e.set(t, o), u.push(t), o === 1 && i && n.add(t), i || t.setAttribute(a, a === "inert" ? "" : "true");
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return i && l.forEach((e) => {
|
|
68
|
-
let t = (gt.get(e) || 0) + 1;
|
|
69
|
-
gt.set(e, t), d.push(e), t === 1 && e.setAttribute(mt, "");
|
|
70
|
-
}), _t += 1, () => {
|
|
71
|
-
o && u.forEach((e) => {
|
|
72
|
-
let t = (o.get(e) || 0) - 1;
|
|
73
|
-
o.set(e, t), t || (!s?.has(e) && a && e.removeAttribute(a), s?.delete(e));
|
|
74
|
-
}), i && d.forEach((e) => {
|
|
75
|
-
let t = (gt.get(e) || 0) - 1;
|
|
76
|
-
gt.set(e, t), t || e.removeAttribute(mt);
|
|
77
|
-
}), --_t, _t || (pt.inert = /* @__PURE__ */ new WeakMap(), pt["aria-hidden"] = /* @__PURE__ */ new WeakMap(), ht.inert = /* @__PURE__ */ new WeakSet(), ht["aria-hidden"] = /* @__PURE__ */ new WeakSet(), gt = /* @__PURE__ */ new WeakMap());
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function wt(e, t = {}) {
|
|
81
|
-
let { ariaHidden: n = !1, inert: r = !1, mark: i = !0 } = t, a = Oe(e[0]).body;
|
|
82
|
-
return Ct(e, a, n, r, { mark: i });
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs
|
|
86
|
-
var Q = Ze();
|
|
87
|
-
function Tt(e, t) {
|
|
88
|
-
let n = T(_e(e));
|
|
89
|
-
return e instanceof n.KeyboardEvent ? "keyboard" : e instanceof n.FocusEvent ? t || "keyboard" : "pointerType" in e ? e.pointerType || "keyboard" : "touches" in e ? "touch" : e instanceof n.MouseEvent ? t || (e.detail === 0 ? "keyboard" : "mouse") : "";
|
|
90
|
-
}
|
|
91
|
-
var Et = 20, Dt = [];
|
|
92
|
-
function Ot() {
|
|
93
|
-
Dt = Dt.filter((e) => e.deref()?.isConnected);
|
|
94
|
-
}
|
|
95
|
-
function kt(e) {
|
|
96
|
-
Ot(), e && l(e) !== "body" && (Dt.push(new WeakRef(e)), Dt.length > Et && (Dt = Dt.slice(-20)));
|
|
97
|
-
}
|
|
98
|
-
function At() {
|
|
99
|
-
return Ot(), Dt[Dt.length - 1]?.deref();
|
|
100
|
-
}
|
|
101
|
-
function jt(e) {
|
|
102
|
-
return e ? g(e) ? e : I(e)[0] || e : null;
|
|
103
|
-
}
|
|
104
|
-
function Mt(e) {
|
|
105
|
-
if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !e.getAttribute("role")?.includes("dialog")) return;
|
|
106
|
-
let t = p(e).filter((e) => {
|
|
107
|
-
let t = e.getAttribute("data-tabindex") || "";
|
|
108
|
-
return g(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
|
|
109
|
-
}), n = e.getAttribute("tabindex");
|
|
110
|
-
t.length === 0 ? n !== "0" && (e.setAttribute("tabindex", "0"), e.setAttribute("data-tabindex", "0")) : (n !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
|
|
111
|
-
}
|
|
112
|
-
function Nt(e) {
|
|
113
|
-
let { context: t, children: r, disabled: s = !1, initialFocus: c = !0, returnFocus: u = !0, restoreFocus: d = !1, modal: p = !0, closeOnFocusOut: h = !0, openInteractionType: _ = "", nextFocusableElement: v, previousFocusableElement: y, beforeContentFocusGuardRef: b, externalTree: S, getInsideElements: C } = e, w = "rootStore" in t ? t.rootStore : t, T = w.useState("open"), E = w.useState("domReferenceElement"), D = w.useState("floatingElement"), { events: O, dataRef: j } = w.context, M = J(() => j.current.floatingContext?.nodeId), oe = c === !1, P = le(E) && oe, F = Re(c), L = Re(u), R = Re(_), z = Re(T), B = ee(S), V = f(), H = Z.useRef(!1), U = Z.useRef(!1), se = Z.useRef(!1), ue = Z.useRef(null), de = Z.useRef(""), fe = Z.useRef(""), W = Z.useRef(null), me = Z.useRef(null), he = ge(W, b, V?.beforeInsideRef), ve = ge(me, V?.afterInsideRef), ye = A(), be = A(), Se = xe(), Ce = V != null, G = He(D), q = J((e = G) => e ? I(e) : []), Te = J(() => C?.().filter((e) => e != null) ?? []);
|
|
114
|
-
Z.useEffect(() => {
|
|
115
|
-
if (s || !p) return;
|
|
116
|
-
function e(e) {
|
|
117
|
-
e.key === "Tab" && K(G, Ae(Oe(G))) && q().length === 0 && !P && o(e);
|
|
118
|
-
}
|
|
119
|
-
return we(Oe(G), "keydown", e);
|
|
120
|
-
}, [
|
|
121
|
-
s,
|
|
122
|
-
G,
|
|
123
|
-
p,
|
|
124
|
-
P,
|
|
125
|
-
q
|
|
126
|
-
]), Z.useEffect(() => {
|
|
127
|
-
if (s || !T) return;
|
|
128
|
-
let e = Oe(G);
|
|
129
|
-
function t() {
|
|
130
|
-
se.current = !1;
|
|
131
|
-
}
|
|
132
|
-
function n(e) {
|
|
133
|
-
let t = _e(e), n = Te();
|
|
134
|
-
se.current = !(K(D, t) || K(E, t) || K(V?.portalNode, t) || n.some((e) => e === t || K(e, t))), fe.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (U.current = !0, be.start(0, () => {
|
|
135
|
-
U.current = !1;
|
|
136
|
-
}));
|
|
137
|
-
}
|
|
138
|
-
function r() {
|
|
139
|
-
fe.current = "keyboard";
|
|
140
|
-
}
|
|
141
|
-
return ce(we(e, "pointerdown", n, !0), we(e, "pointerup", t, !0), we(e, "pointercancel", t, !0), we(e, "keydown", r, !0), t);
|
|
142
|
-
}, [
|
|
143
|
-
s,
|
|
144
|
-
D,
|
|
145
|
-
E,
|
|
146
|
-
G,
|
|
147
|
-
T,
|
|
148
|
-
V,
|
|
149
|
-
be,
|
|
150
|
-
Te
|
|
151
|
-
]), Z.useEffect(() => {
|
|
152
|
-
if (s || !h) return;
|
|
153
|
-
let e = Oe(G);
|
|
154
|
-
function t() {
|
|
155
|
-
U.current = !0, be.start(0, () => {
|
|
156
|
-
U.current = !1;
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function r(e) {
|
|
160
|
-
let t = _e(e);
|
|
161
|
-
g(t) && (ue.current = t);
|
|
162
|
-
}
|
|
163
|
-
function o(t) {
|
|
164
|
-
let r = t.relatedTarget, o = t.currentTarget, s = _e(t);
|
|
165
|
-
p && r == null && s != null && K(D, s) && kt(s), queueMicrotask(() => {
|
|
166
|
-
let c = M(), l = w.context.triggerElements, u = Te(), f = r?.hasAttribute(Xe("focus-guard")) && [
|
|
167
|
-
W.current,
|
|
168
|
-
me.current,
|
|
169
|
-
V?.beforeInsideRef.current,
|
|
170
|
-
V?.afterInsideRef.current,
|
|
171
|
-
V?.beforeOutsideRef.current,
|
|
172
|
-
V?.afterOutsideRef.current,
|
|
173
|
-
te(y),
|
|
174
|
-
te(v)
|
|
175
|
-
].includes(r), m = !(K(E, r) || K(D, r) || K(r, D) || K(V?.portalNode, r) || u.some((e) => e === r || K(e, r)) || r != null && l.hasElement(r) || l.hasMatchingElement((e) => K(e, r)) || f || B && (ie(B.nodesRef.current, c).find((e) => K(e.context?.elements.floating, r) || K(e.context?.elements.domReference, r)) || a(B.nodesRef.current, c).find((e) => [e.context?.elements.floating, He(e.context?.elements.floating)].includes(r) || e.context?.elements.domReference === r)));
|
|
176
|
-
if (o === E && G && Mt(G), d && o !== E && !n(s) && Ae(e) === e.body) {
|
|
177
|
-
if (i(G) && (G.focus(), d === "popup")) {
|
|
178
|
-
Se.request(() => {
|
|
179
|
-
G.focus();
|
|
180
|
-
});
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
let e = q(), t = ue.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || G;
|
|
184
|
-
i(n) && n.focus();
|
|
185
|
-
}
|
|
186
|
-
if (j.current.insideReactTree) {
|
|
187
|
-
j.current.insideReactTree = !1;
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
(P || !p) && r && m && !U.current && (P || r !== At()) && (H.current = !0, w.setOpen(!1, x(N, t)));
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
function c() {
|
|
194
|
-
se.current || (j.current.insideReactTree = !0, ye.start(0, () => {
|
|
195
|
-
j.current.insideReactTree = !1;
|
|
196
|
-
}));
|
|
197
|
-
}
|
|
198
|
-
let l = i(E) ? E : null;
|
|
199
|
-
if (!(!D && !l)) return ce(l && we(l, "focusout", o), l && we(l, "pointerdown", t), D && we(D, "focusin", r), D && we(D, "focusout", o), D && V && we(D, "focusout", c, !0));
|
|
200
|
-
}, [
|
|
201
|
-
s,
|
|
202
|
-
E,
|
|
203
|
-
D,
|
|
204
|
-
G,
|
|
205
|
-
p,
|
|
206
|
-
B,
|
|
207
|
-
V,
|
|
208
|
-
w,
|
|
209
|
-
h,
|
|
210
|
-
d,
|
|
211
|
-
q,
|
|
212
|
-
P,
|
|
213
|
-
M,
|
|
214
|
-
j,
|
|
215
|
-
ye,
|
|
216
|
-
be,
|
|
217
|
-
Se,
|
|
218
|
-
v,
|
|
219
|
-
y,
|
|
220
|
-
Te
|
|
221
|
-
]), Z.useEffect(() => {
|
|
222
|
-
if (s || !D || !T) return;
|
|
223
|
-
let e = Array.from(V?.portalNode?.querySelectorAll(`[${Xe("portal")}]`) || []), t = (B ? a(B.nodesRef.current, M()) : []).find((e) => le(e.context?.elements.domReference || null))?.context?.elements.domReference, n = wt([
|
|
224
|
-
D,
|
|
225
|
-
...e,
|
|
226
|
-
W.current,
|
|
227
|
-
me.current,
|
|
228
|
-
V?.beforeOutsideRef.current,
|
|
229
|
-
V?.afterOutsideRef.current,
|
|
230
|
-
...Te(),
|
|
231
|
-
t,
|
|
232
|
-
te(y),
|
|
233
|
-
te(v),
|
|
234
|
-
P ? E : null
|
|
235
|
-
].filter((e) => e != null), {
|
|
236
|
-
ariaHidden: p || P,
|
|
237
|
-
mark: !1
|
|
238
|
-
}), r = wt([D, ...e].filter((e) => e != null));
|
|
239
|
-
return () => {
|
|
240
|
-
r(), n();
|
|
241
|
-
};
|
|
242
|
-
}, [
|
|
243
|
-
T,
|
|
244
|
-
s,
|
|
245
|
-
E,
|
|
246
|
-
D,
|
|
247
|
-
p,
|
|
248
|
-
V,
|
|
249
|
-
P,
|
|
250
|
-
B,
|
|
251
|
-
M,
|
|
252
|
-
v,
|
|
253
|
-
y,
|
|
254
|
-
Te
|
|
255
|
-
]), k(() => {
|
|
256
|
-
if (!T || s || !i(G)) return;
|
|
257
|
-
let e = Oe(G), t = Ae(e);
|
|
258
|
-
queueMicrotask(() => {
|
|
259
|
-
let n = F.current, r = typeof n == "function" ? n(R.current || "") : n;
|
|
260
|
-
if (r === void 0 || r === !1 || K(G, t)) return;
|
|
261
|
-
let i = null, a = () => (i ??= q(G), i[0] || G), o;
|
|
262
|
-
o = r === !0 || r === null ? a() : te(r), o ||= a();
|
|
263
|
-
let s = K(G, Ae(e));
|
|
264
|
-
ft(o, {
|
|
265
|
-
preventScroll: o === G,
|
|
266
|
-
shouldFocus() {
|
|
267
|
-
if (!z.current) return !1;
|
|
268
|
-
if (s) return !0;
|
|
269
|
-
let t = Ae(e);
|
|
270
|
-
return !(t !== o && K(G, t));
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
});
|
|
274
|
-
}, [
|
|
275
|
-
s,
|
|
276
|
-
T,
|
|
277
|
-
G,
|
|
278
|
-
q,
|
|
279
|
-
F,
|
|
280
|
-
R,
|
|
281
|
-
z
|
|
282
|
-
]), k(() => {
|
|
283
|
-
if (s || !G) return;
|
|
284
|
-
let e = Oe(G), t = Ae(e), n = R.current == null;
|
|
285
|
-
kt(t);
|
|
286
|
-
function r(e) {
|
|
287
|
-
if (e.open || (de.current = Tt(e.nativeEvent, fe.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (H.current = !0), e.reason === "outside-press") if (e.nested) H.current = !1;
|
|
288
|
-
else if (Ge(e.nativeEvent) || ne(e.nativeEvent)) H.current = !1;
|
|
289
|
-
else {
|
|
290
|
-
let e = !1;
|
|
291
|
-
Oe(G).createElement("div").focus({ get preventScroll() {
|
|
292
|
-
return e = !0, !1;
|
|
293
|
-
} }), e ? H.current = !1 : H.current = !0;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
O.on("openchange", r);
|
|
297
|
-
function a() {
|
|
298
|
-
let e = L.current, r = typeof e == "function" ? e(de.current) : e;
|
|
299
|
-
if (r === void 0 || r === !1) return null;
|
|
300
|
-
r === null && (r = !0);
|
|
301
|
-
let i = E?.isConnected ? E : null, a = t?.isConnected && l(t) !== "body" ? t : null, o = n ? a || i : i || a;
|
|
302
|
-
return o ||= At() || null, typeof r == "boolean" ? o : te(r) || o || null;
|
|
303
|
-
}
|
|
304
|
-
return () => {
|
|
305
|
-
O.off("openchange", r);
|
|
306
|
-
let t = Ae(e), n = Te(), o = K(D, t) || n.some((e) => e === t || K(e, t)) || B && ie(B.nodesRef.current, M(), !1).some((e) => K(e.context?.elements.floating, t)), s = L.current, c = a();
|
|
307
|
-
queueMicrotask(() => {
|
|
308
|
-
let n = jt(c), r = typeof s != "boolean";
|
|
309
|
-
s && !H.current && i(n) && (!(!r && n !== t && t !== e.body) || o) && n.focus({ preventScroll: !0 }), H.current = !1;
|
|
310
|
-
});
|
|
311
|
-
};
|
|
312
|
-
}, [
|
|
313
|
-
s,
|
|
314
|
-
D,
|
|
315
|
-
G,
|
|
316
|
-
L,
|
|
317
|
-
R,
|
|
318
|
-
O,
|
|
319
|
-
B,
|
|
320
|
-
E,
|
|
321
|
-
M,
|
|
322
|
-
Te
|
|
323
|
-
]), k(() => {
|
|
324
|
-
if (!m || T || !D) return;
|
|
325
|
-
let e = Ae(Oe(D));
|
|
326
|
-
!i(e) || !pe(e) || K(D, e) && e.blur();
|
|
327
|
-
}, [T, D]), k(() => {
|
|
328
|
-
if (!(s || !V)) return V.setFocusManagerState({
|
|
329
|
-
modal: p,
|
|
330
|
-
closeOnFocusOut: h,
|
|
331
|
-
open: T,
|
|
332
|
-
onOpenChange: w.setOpen,
|
|
333
|
-
domReference: E
|
|
334
|
-
}), () => {
|
|
335
|
-
V.setFocusManagerState(null);
|
|
336
|
-
};
|
|
337
|
-
}, [
|
|
338
|
-
s,
|
|
339
|
-
V,
|
|
340
|
-
p,
|
|
341
|
-
T,
|
|
342
|
-
w,
|
|
343
|
-
h,
|
|
344
|
-
E
|
|
345
|
-
]), k(() => {
|
|
346
|
-
if (!(s || !G)) return Mt(G), () => {
|
|
347
|
-
queueMicrotask(Ot);
|
|
348
|
-
};
|
|
349
|
-
}, [s, G]);
|
|
350
|
-
let Ee = !s && (p ? !P : !0) && (Ce || p);
|
|
351
|
-
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [
|
|
352
|
-
Ee && /*#__PURE__*/ (0, Q.jsx)(Fe, {
|
|
353
|
-
"data-type": "inside",
|
|
354
|
-
ref: he,
|
|
355
|
-
onFocus: (e) => {
|
|
356
|
-
if (p) {
|
|
357
|
-
let e = q();
|
|
358
|
-
ft(e[e.length - 1]);
|
|
359
|
-
} else V?.portalNode && (H.current = !1, Pe(e, V.portalNode) ? re(E)?.focus() : te(y ?? V.beforeOutsideRef)?.focus());
|
|
360
|
-
}
|
|
361
|
-
}),
|
|
362
|
-
r,
|
|
363
|
-
Ee && /*#__PURE__*/ (0, Q.jsx)(Fe, {
|
|
364
|
-
"data-type": "inside",
|
|
365
|
-
ref: ve,
|
|
366
|
-
onFocus: (e) => {
|
|
367
|
-
p ? ft(q()[0]) : V?.portalNode && (h && (H.current = !0), Pe(e, V.portalNode) ? ae(E)?.focus() : te(v ?? V.afterOutsideRef)?.focus());
|
|
368
|
-
}
|
|
369
|
-
})
|
|
370
|
-
] });
|
|
371
|
-
}
|
|
372
|
-
//#endregion
|
|
373
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/hooks/useClick.mjs
|
|
374
|
-
function Pt(e, t = {}) {
|
|
375
|
-
let { enabled: n = !0, event: r = "click", toggle: i = !0, ignoreMouse: a = !1, stickIfOpen: o = !0, touchOpenDelay: s = 0, reason: c = fe } = t, l = "rootStore" in e ? e.rootStore : e, u = l.context.dataRef, d = Z.useRef(void 0), f = xe(), p = A(), m = Z.useMemo(() => {
|
|
376
|
-
function e(e, t, n, r) {
|
|
377
|
-
let i = x(c, t, n);
|
|
378
|
-
e && r === "touch" && s > 0 ? p.start(s, () => {
|
|
379
|
-
l.setOpen(!0, i);
|
|
380
|
-
}) : l.setOpen(e, i);
|
|
381
|
-
}
|
|
382
|
-
function t(e, t, n) {
|
|
383
|
-
let r = u.current.openEvent, a = l.select("domReferenceElement") !== t;
|
|
384
|
-
return e && a || !e || !i ? !0 : r && o ? !n(r.type) : !1;
|
|
385
|
-
}
|
|
386
|
-
return {
|
|
387
|
-
onPointerDown(e) {
|
|
388
|
-
d.current = e.pointerType;
|
|
389
|
-
},
|
|
390
|
-
onMouseDown(n) {
|
|
391
|
-
let i = d.current, o = n.nativeEvent, s = l.select("open");
|
|
392
|
-
if (n.button !== 0 || r === "click" || H(i, !0) && a) return;
|
|
393
|
-
let c = t(s, n.currentTarget, (e) => e === "click" || e === "mousedown"), u = _e(o);
|
|
394
|
-
if (pe(u)) {
|
|
395
|
-
e(c, o, u, i);
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
let p = n.currentTarget;
|
|
399
|
-
f.request(() => {
|
|
400
|
-
e(c, o, p, i);
|
|
401
|
-
});
|
|
402
|
-
},
|
|
403
|
-
onClick(n) {
|
|
404
|
-
if (r === "mousedown-only") return;
|
|
405
|
-
let i = d.current;
|
|
406
|
-
if (r === "mousedown" && i) {
|
|
407
|
-
d.current = void 0;
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
H(i, !0) && a || e(t(l.select("open"), n.currentTarget, (e) => e === "click" || e === "mousedown" || e === "keydown" || e === "keyup"), n.nativeEvent, n.currentTarget, i);
|
|
411
|
-
},
|
|
412
|
-
onKeyDown() {
|
|
413
|
-
d.current = void 0;
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
}, [
|
|
417
|
-
u,
|
|
418
|
-
r,
|
|
419
|
-
a,
|
|
420
|
-
c,
|
|
421
|
-
l,
|
|
422
|
-
o,
|
|
423
|
-
i,
|
|
424
|
-
f,
|
|
425
|
-
p,
|
|
426
|
-
s
|
|
427
|
-
]);
|
|
428
|
-
return Z.useMemo(() => n ? { reference: m } : je, [n, m]);
|
|
429
|
-
}
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs
|
|
432
|
-
var Ft = "Escape";
|
|
433
|
-
function It(e, t, n) {
|
|
434
|
-
switch (e) {
|
|
435
|
-
case "vertical": return t;
|
|
436
|
-
case "horizontal": return n;
|
|
437
|
-
default: return t || n;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
function Lt(e, t) {
|
|
441
|
-
return It(t, e === "ArrowUp" || e === "ArrowDown", e === "ArrowLeft" || e === "ArrowRight");
|
|
442
|
-
}
|
|
443
|
-
function Rt(e, t, n) {
|
|
444
|
-
return It(t, e === "ArrowDown", n ? e === "ArrowLeft" : e === "ArrowRight") || e === "Enter" || e === " " || e === "";
|
|
445
|
-
}
|
|
446
|
-
function zt(e, t, n) {
|
|
447
|
-
return It(t, n ? e === z : e === Ue, e === he);
|
|
448
|
-
}
|
|
449
|
-
function Bt(e, t, n, r) {
|
|
450
|
-
return t === "both" || t === "horizontal" && r ? e === Ft : It(t, n ? e === Ue : e === z, e === qe);
|
|
451
|
-
}
|
|
452
|
-
function Vt(e, t) {
|
|
453
|
-
let { listRef: n, activeIndex: r, onNavigate: a = () => {}, enabled: s = !0, selectedIndex: c = null, allowEscape: l = !1, loopFocus: u = !1, nested: d = !1, rtl: f = !1, virtual: p = !1, focusItemOnOpen: m = "auto", focusItemOnHover: h = !0, openOnArrowKeyDown: g = !0, disabledIndices: _ = void 0, orientation: v = "vertical", parentOrientation: y, id: b, resetOnPointerLeave: S = !0, externalTree: C, grid: w } = t, te = w != null;
|
|
454
|
-
process.env.NODE_ENV !== "production" && (l && (u || console.warn("`useListNavigation` looping must be enabled to allow escaping."), p || console.warn("`useListNavigation` must be virtual to allow escaping.")), v === "vertical" && te && console.warn("In grid list navigation mode, the `orientation` should", "be either \"horizontal\" or \"both\"."));
|
|
455
|
-
let T = "rootStore" in e ? e.rootStore : e, E = T.useState("open"), O = T.useState("floatingElement"), A = T.useState("domReferenceElement"), j = T.context.dataRef, M = He(O), re = le(A), ie = Re(M), ae = Se(), oe = ee(C), F = Z.useRef(m), I = Z.useRef(c ?? -1), L = Z.useRef(null), z = Z.useRef(!0), B = J((e) => {
|
|
456
|
-
a(I.current === -1 ? null : I.current, e);
|
|
457
|
-
}), V = Z.useRef(!!O), H = Z.useRef(E), U = Z.useRef(!1), se = Z.useRef(!1), ce = Z.useRef(null), ue = Re(_), fe = Re(E), W = Re(c), pe = Re(S), me = xe(), he = xe(), ge = J(() => {
|
|
458
|
-
function e(e) {
|
|
459
|
-
p ? oe?.events.emit("virtualfocus", e) : ce.current = ft(e, {
|
|
460
|
-
sync: U.current,
|
|
461
|
-
preventScroll: !0
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
let t = n.current[I.current], r = se.current;
|
|
465
|
-
t && e(t), (U.current ? (e) => e() : (e) => me.request(e))(() => {
|
|
466
|
-
let i = n.current[I.current] || t;
|
|
467
|
-
i && (t || e(i), we && (r || !z.current) && i.scrollIntoView?.({
|
|
468
|
-
block: "nearest",
|
|
469
|
-
inline: "nearest"
|
|
470
|
-
}));
|
|
471
|
-
});
|
|
472
|
-
});
|
|
473
|
-
k(() => {
|
|
474
|
-
j.current.orientation = v;
|
|
475
|
-
}, [j, v]), k(() => {
|
|
476
|
-
s && (E && O ? (I.current = c ?? -1, F.current && c != null && (se.current = !0, B())) : V.current && (I.current = -1, B()));
|
|
477
|
-
}, [
|
|
478
|
-
s,
|
|
479
|
-
E,
|
|
480
|
-
O,
|
|
481
|
-
c,
|
|
482
|
-
B
|
|
483
|
-
]), k(() => {
|
|
484
|
-
if (s) {
|
|
485
|
-
if (!E) {
|
|
486
|
-
U.current = !1;
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
if (O) if (r == null) {
|
|
490
|
-
if (U.current = !1, W.current != null) return;
|
|
491
|
-
if (V.current && (I.current = -1, ge()), (!H.current || !V.current) && F.current && (L.current != null || F.current === !0 && L.current == null)) {
|
|
492
|
-
let e = 0, t = () => {
|
|
493
|
-
n.current[0] == null ? (e < 2 && (e ? (e) => he.request(e) : queueMicrotask)(t), e += 1) : (I.current = L.current == null || Rt(L.current, v, f) || d ? D(n) : R(n), L.current = null, B());
|
|
494
|
-
};
|
|
495
|
-
t();
|
|
496
|
-
}
|
|
497
|
-
} else de(n.current, r) || (I.current = r, ge(), se.current = !1);
|
|
498
|
-
}
|
|
499
|
-
}, [
|
|
500
|
-
s,
|
|
501
|
-
E,
|
|
502
|
-
O,
|
|
503
|
-
r,
|
|
504
|
-
W,
|
|
505
|
-
d,
|
|
506
|
-
n,
|
|
507
|
-
v,
|
|
508
|
-
f,
|
|
509
|
-
B,
|
|
510
|
-
ge,
|
|
511
|
-
he
|
|
512
|
-
]), k(() => {
|
|
513
|
-
if (!s || O || !oe || p || !V.current) return;
|
|
514
|
-
let e = oe.nodesRef.current, t = e.find((e) => e.id === ae)?.context?.elements.floating, n = Ae(Oe(A ?? t ?? null)), r = e.some((e) => e.context && K(e.context.elements.floating, n));
|
|
515
|
-
t && !r && z.current && t.focus({ preventScroll: !0 });
|
|
516
|
-
}, [
|
|
517
|
-
s,
|
|
518
|
-
O,
|
|
519
|
-
A,
|
|
520
|
-
oe,
|
|
521
|
-
ae,
|
|
522
|
-
p
|
|
523
|
-
]), k(() => {
|
|
524
|
-
H.current = E, V.current = !!O;
|
|
525
|
-
}), k(() => {
|
|
526
|
-
E || (L.current = null, F.current = m);
|
|
527
|
-
}, [E, m]);
|
|
528
|
-
let ve = r != null, ye = J((e) => {
|
|
529
|
-
if (!fe.current) return;
|
|
530
|
-
let t = n.current.indexOf(e.currentTarget);
|
|
531
|
-
t !== -1 && (I.current !== t || r !== t) && (I.current = t, B(e));
|
|
532
|
-
}), be = J(() => y ?? oe?.nodesRef.current.find((e) => e.id === ae)?.context?.dataRef?.current.orientation), Ce = J(() => D(n, ue.current)), G = J((e) => {
|
|
533
|
-
if (z.current = !1, U.current = !0, e.which === 229 || !fe.current && e.currentTarget === ie.current) return;
|
|
534
|
-
if (d && Bt(e.key, v, f, te)) {
|
|
535
|
-
Lt(e.key, be()) || o(e), T.setOpen(!1, x(Ne, e.nativeEvent)), i(A) && (p ? oe?.events.emit("virtualfocus", A) : A.focus());
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
let t = I.current, r = D(n, _), a = R(n, _);
|
|
539
|
-
if (re || (e.key === "Home" && (o(e), I.current = r, B(e)), e.key === "End" && (o(e), I.current = a, B(e))), w != null) {
|
|
540
|
-
let t = w(e, I.current, n, v, u, f, _, r, a);
|
|
541
|
-
if (t != null && (I.current = t, B(e)), v === "both") return;
|
|
542
|
-
}
|
|
543
|
-
if (Lt(e.key, v)) {
|
|
544
|
-
if (o(e), E && !p && Ae(e.currentTarget.ownerDocument) === e.currentTarget) {
|
|
545
|
-
I.current = Rt(e.key, v, f) ? r : a, B(e);
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
|
-
Rt(e.key, v, f) ? u ? t >= a ? l && t !== n.current.length ? I.current = -1 : (U.current = !1, I.current = r) : I.current = P(n.current, {
|
|
549
|
-
startingIndex: t,
|
|
550
|
-
disabledIndices: _
|
|
551
|
-
}) : I.current = Math.min(a, P(n.current, {
|
|
552
|
-
startingIndex: t,
|
|
553
|
-
disabledIndices: _
|
|
554
|
-
})) : u ? t <= r ? l && t !== -1 ? I.current = n.current.length : (U.current = !1, I.current = a) : I.current = P(n.current, {
|
|
555
|
-
startingIndex: t,
|
|
556
|
-
decrement: !0,
|
|
557
|
-
disabledIndices: _
|
|
558
|
-
}) : I.current = Math.max(r, P(n.current, {
|
|
559
|
-
startingIndex: t,
|
|
560
|
-
decrement: !0,
|
|
561
|
-
disabledIndices: _
|
|
562
|
-
})), de(n.current, I.current) && (I.current = -1), B(e);
|
|
563
|
-
}
|
|
564
|
-
}), we = Z.useMemo(() => ({
|
|
565
|
-
onFocus(e) {
|
|
566
|
-
U.current = !0, ye(e);
|
|
567
|
-
},
|
|
568
|
-
onClick: ({ currentTarget: e }) => e.focus({ preventScroll: !0 }),
|
|
569
|
-
onMouseMove(e) {
|
|
570
|
-
U.current = !0, se.current = !1, h && ye(e);
|
|
571
|
-
},
|
|
572
|
-
onPointerLeave(e) {
|
|
573
|
-
if (!fe.current || !z.current || e.pointerType === "touch") return;
|
|
574
|
-
U.current = !0;
|
|
575
|
-
let t = e.relatedTarget;
|
|
576
|
-
if (!(!h || n.current.includes(t)) && pe.current && (ce.current?.(), ce.current = null, I.current = -1, B(e), !p)) {
|
|
577
|
-
let e = ie.current, t = Ae(Oe(e));
|
|
578
|
-
e && K(e, t) && e.focus({ preventScroll: !0 });
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}), [
|
|
582
|
-
ye,
|
|
583
|
-
fe,
|
|
584
|
-
ie,
|
|
585
|
-
h,
|
|
586
|
-
n,
|
|
587
|
-
B,
|
|
588
|
-
pe,
|
|
589
|
-
p
|
|
590
|
-
]), q = Z.useMemo(() => p && E && ve && { "aria-activedescendant": `${b}-${r}` }, [
|
|
591
|
-
p,
|
|
592
|
-
E,
|
|
593
|
-
ve,
|
|
594
|
-
b,
|
|
595
|
-
r
|
|
596
|
-
]), Te = Z.useMemo(() => ({
|
|
597
|
-
"aria-orientation": v === "both" ? void 0 : v,
|
|
598
|
-
...re ? {} : q,
|
|
599
|
-
onKeyDown(e) {
|
|
600
|
-
if (e.key === "Tab" && e.shiftKey && E && !p) {
|
|
601
|
-
let t = _e(e.nativeEvent);
|
|
602
|
-
if (t && !K(ie.current, t)) return;
|
|
603
|
-
o(e), T.setOpen(!1, x(N, e.nativeEvent)), i(A) && A.focus();
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
|
-
G(e);
|
|
607
|
-
},
|
|
608
|
-
onPointerMove() {
|
|
609
|
-
z.current = !0;
|
|
610
|
-
}
|
|
611
|
-
}), [
|
|
612
|
-
q,
|
|
613
|
-
G,
|
|
614
|
-
ie,
|
|
615
|
-
v,
|
|
616
|
-
re,
|
|
617
|
-
T,
|
|
618
|
-
E,
|
|
619
|
-
p,
|
|
620
|
-
A
|
|
621
|
-
]), Ee = Z.useMemo(() => {
|
|
622
|
-
function e(e) {
|
|
623
|
-
T.setOpen(!0, x(Ne, e.nativeEvent, e.currentTarget));
|
|
624
|
-
}
|
|
625
|
-
function t(e) {
|
|
626
|
-
m === "auto" && Ge(e.nativeEvent) && (F.current = !p);
|
|
627
|
-
}
|
|
628
|
-
function n(e) {
|
|
629
|
-
F.current = m, m === "auto" && ne(e.nativeEvent) && (F.current = !0);
|
|
630
|
-
}
|
|
631
|
-
return {
|
|
632
|
-
onKeyDown(t) {
|
|
633
|
-
let n = T.select("open");
|
|
634
|
-
z.current = !1;
|
|
635
|
-
let r = t.key.startsWith("Arrow"), i = zt(t.key, be(), f), a = Lt(t.key, v), s = (d ? i : a) || t.key === "Enter" || t.key.trim() === "";
|
|
636
|
-
if (p && n) return G(t);
|
|
637
|
-
if (!(!n && !g && r)) {
|
|
638
|
-
if (s) {
|
|
639
|
-
let e = Lt(t.key, be());
|
|
640
|
-
L.current = d && e ? null : t.key;
|
|
641
|
-
}
|
|
642
|
-
if (d) {
|
|
643
|
-
i && (o(t), n ? (I.current = Ce(), B(t)) : e(t));
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
a && (W.current != null && (I.current = W.current), o(t), !n && g ? e(t) : G(t), n && B(t));
|
|
647
|
-
}
|
|
648
|
-
},
|
|
649
|
-
onFocus(e) {
|
|
650
|
-
T.select("open") && !p && (I.current = -1, B(e));
|
|
651
|
-
},
|
|
652
|
-
onPointerDown: n,
|
|
653
|
-
onPointerEnter: n,
|
|
654
|
-
onMouseDown: t,
|
|
655
|
-
onClick: t
|
|
656
|
-
};
|
|
657
|
-
}, [
|
|
658
|
-
G,
|
|
659
|
-
m,
|
|
660
|
-
Ce,
|
|
661
|
-
d,
|
|
662
|
-
B,
|
|
663
|
-
T,
|
|
664
|
-
g,
|
|
665
|
-
v,
|
|
666
|
-
be,
|
|
667
|
-
f,
|
|
668
|
-
W,
|
|
669
|
-
p
|
|
670
|
-
]), De = Z.useMemo(() => ({
|
|
671
|
-
...q,
|
|
672
|
-
...Ee
|
|
673
|
-
}), [q, Ee]);
|
|
674
|
-
return Z.useMemo(() => s ? {
|
|
675
|
-
reference: De,
|
|
676
|
-
floating: Te,
|
|
677
|
-
item: we,
|
|
678
|
-
trigger: Ee
|
|
679
|
-
} : {}, [
|
|
680
|
-
s,
|
|
681
|
-
De,
|
|
682
|
-
Te,
|
|
683
|
-
Ee,
|
|
684
|
-
we
|
|
685
|
-
]);
|
|
686
|
-
}
|
|
687
|
-
//#endregion
|
|
688
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs
|
|
689
|
-
function Ht(e, t) {
|
|
690
|
-
let { listRef: r, elementsRef: i, activeIndex: a, onMatch: s, disabledIndices: c, onTyping: l, enabled: u = !0, resetMs: d = 750, selectedIndex: f = null } = t, p = "rootStore" in e ? e.rootStore : e, m = p.useState("open"), h = A(), g = Z.useRef(""), _ = Z.useRef(f ?? a ?? -1), v = Z.useRef(null), y = J((e) => {
|
|
691
|
-
function t(e) {
|
|
692
|
-
let t = i?.current[e];
|
|
693
|
-
return !t || n(t);
|
|
694
|
-
}
|
|
695
|
-
function u(e) {
|
|
696
|
-
return t(e) ? c == null || !Be(me, e, c) : !1;
|
|
697
|
-
}
|
|
698
|
-
function p(e, t, n = 0) {
|
|
699
|
-
if (e.length === 0) return -1;
|
|
700
|
-
let r = (n % e.length + e.length) % e.length, i = t.toLowerCase();
|
|
701
|
-
for (let t = 0; t < e.length; t += 1) {
|
|
702
|
-
let n = (r + t) % e.length;
|
|
703
|
-
if (!(!e[n]?.toLowerCase().startsWith(i) || !u(n))) return n;
|
|
704
|
-
}
|
|
705
|
-
return -1;
|
|
706
|
-
}
|
|
707
|
-
let y = r.current;
|
|
708
|
-
if (g.current.length > 0 && e.key === " " && (o(e), l?.(!0)), g.current.length > 0 && g.current[0] !== " " && p(y, g.current) === -1 && e.key !== " " && l?.(!1), y == null || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
709
|
-
m && e.key !== " " && (o(e), l?.(!0));
|
|
710
|
-
let b = g.current === "";
|
|
711
|
-
b && (_.current = f ?? a ?? -1), y.every((e, t) => e && u(t) ? e[0]?.toLowerCase() !== e[1]?.toLowerCase() : !0) && g.current === e.key && (g.current = "", _.current = v.current), g.current += e.key, h.start(d, () => {
|
|
712
|
-
g.current = "", _.current = v.current, l?.(!1);
|
|
713
|
-
});
|
|
714
|
-
let x = ((b ? f ?? a ?? -1 : _.current) ?? 0) + 1, S = p(y, g.current, x);
|
|
715
|
-
S === -1 ? e.key !== " " && (g.current = "", l?.(!1)) : (s?.(S), v.current = S);
|
|
716
|
-
}), b = J((e) => {
|
|
717
|
-
let t = e.relatedTarget, n = p.select("domReferenceElement"), r = p.select("floatingElement");
|
|
718
|
-
K(n, t) || K(r, t) || (h.clear(), g.current = "", _.current = v.current, l?.(!1));
|
|
719
|
-
});
|
|
720
|
-
k(() => {
|
|
721
|
-
!m && f !== null || (h.clear(), v.current = null, g.current !== "" && (g.current = ""));
|
|
722
|
-
}, [
|
|
723
|
-
m,
|
|
724
|
-
f,
|
|
725
|
-
h
|
|
726
|
-
]), k(() => {
|
|
727
|
-
m && g.current === "" && (_.current = f ?? a ?? -1);
|
|
728
|
-
}, [
|
|
729
|
-
m,
|
|
730
|
-
f,
|
|
731
|
-
a
|
|
732
|
-
]);
|
|
733
|
-
let x = Z.useMemo(() => ({
|
|
734
|
-
onKeyDown: y,
|
|
735
|
-
onBlur: b
|
|
736
|
-
}), [y, b]);
|
|
737
|
-
return Z.useMemo(() => u ? {
|
|
738
|
-
reference: x,
|
|
739
|
-
floating: x
|
|
740
|
-
} : {}, [u, x]);
|
|
741
|
-
}
|
|
742
|
-
//#endregion
|
|
743
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs
|
|
744
|
-
var Ut = /*#__PURE__*/ Z.createContext(void 0);
|
|
745
|
-
process.env.NODE_ENV !== "production" && (Ut.displayName = "ToolbarRootContext");
|
|
746
|
-
function Wt(e) {
|
|
747
|
-
let t = Z.useContext(Ut);
|
|
748
|
-
if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? U(69) : "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
|
|
749
|
-
return t;
|
|
750
|
-
}
|
|
751
|
-
//#endregion
|
|
752
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/inertValue.mjs
|
|
753
|
-
function Gt(e) {
|
|
754
|
-
return ve(19) ? e : e ? "true" : void 0;
|
|
755
|
-
}
|
|
756
|
-
//#endregion
|
|
757
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/InternalBackdrop.mjs
|
|
758
|
-
var Kt = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
759
|
-
let { cutout: n, ...r } = e, i;
|
|
760
|
-
if (n) {
|
|
761
|
-
let e = n.getBoundingClientRect();
|
|
762
|
-
i = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`;
|
|
763
|
-
}
|
|
764
|
-
return /*#__PURE__*/ (0, Q.jsx)("div", {
|
|
765
|
-
ref: t,
|
|
766
|
-
role: "presentation",
|
|
767
|
-
"data-base-ui-inert": "",
|
|
768
|
-
...r,
|
|
769
|
-
style: {
|
|
770
|
-
position: "fixed",
|
|
771
|
-
inset: 0,
|
|
772
|
-
userSelect: "none",
|
|
773
|
-
WebkitUserSelect: "none",
|
|
774
|
-
clipPath: i
|
|
775
|
-
}
|
|
776
|
-
});
|
|
777
|
-
});
|
|
778
|
-
process.env.NODE_ENV !== "production" && (Kt.displayName = "InternalBackdrop");
|
|
779
|
-
//#endregion
|
|
780
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/useScrollLock.mjs
|
|
781
|
-
var qt = {}, Jt = {}, Yt = "";
|
|
782
|
-
function Xt(e) {
|
|
783
|
-
if (typeof document > "u") return !1;
|
|
784
|
-
let t = Oe(e);
|
|
785
|
-
return T(t).innerWidth - t.documentElement.clientWidth > 0;
|
|
786
|
-
}
|
|
787
|
-
function Zt(e) {
|
|
788
|
-
if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
|
|
789
|
-
let t = Oe(e), n = t.documentElement, r = t.body, i = S(n) ? n : r, a = i.style.overflowY, o = n.style.scrollbarGutter;
|
|
790
|
-
n.style.scrollbarGutter = "stable", i.style.overflowY = "scroll";
|
|
791
|
-
let s = i.offsetWidth;
|
|
792
|
-
i.style.overflowY = "hidden";
|
|
793
|
-
let c = i.offsetWidth;
|
|
794
|
-
return i.style.overflowY = a, n.style.scrollbarGutter = o, s === c;
|
|
795
|
-
}
|
|
796
|
-
function Qt(e) {
|
|
797
|
-
let t = Oe(e), n = t.documentElement, r = t.body, i = S(n) ? n : r, a = {
|
|
798
|
-
overflowY: i.style.overflowY,
|
|
799
|
-
overflowX: i.style.overflowX
|
|
800
|
-
};
|
|
801
|
-
return Object.assign(i.style, {
|
|
802
|
-
overflowY: "hidden",
|
|
803
|
-
overflowX: "hidden"
|
|
804
|
-
}), () => {
|
|
805
|
-
Object.assign(i.style, a);
|
|
806
|
-
};
|
|
807
|
-
}
|
|
808
|
-
function $t(e) {
|
|
809
|
-
let t = Oe(e), n = t.documentElement, i = t.body, a = T(n), o = 0, s = 0, c = !1, l = r.create();
|
|
810
|
-
if (m && (a.visualViewport?.scale ?? 1) !== 1) return () => {};
|
|
811
|
-
function u() {
|
|
812
|
-
let t = a.getComputedStyle(n), r = a.getComputedStyle(i), l = (t.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
|
|
813
|
-
o = n.scrollTop, s = n.scrollLeft, qt = {
|
|
814
|
-
scrollbarGutter: n.style.scrollbarGutter,
|
|
815
|
-
overflowY: n.style.overflowY,
|
|
816
|
-
overflowX: n.style.overflowX
|
|
817
|
-
}, Yt = n.style.scrollBehavior, Jt = {
|
|
818
|
-
position: i.style.position,
|
|
819
|
-
height: i.style.height,
|
|
820
|
-
width: i.style.width,
|
|
821
|
-
boxSizing: i.style.boxSizing,
|
|
822
|
-
overflowY: i.style.overflowY,
|
|
823
|
-
overflowX: i.style.overflowX,
|
|
824
|
-
scrollBehavior: i.style.scrollBehavior
|
|
825
|
-
};
|
|
826
|
-
let u = n.scrollHeight > n.clientHeight, d = n.scrollWidth > n.clientWidth, f = t.overflowY === "scroll" || r.overflowY === "scroll", p = t.overflowX === "scroll" || r.overflowX === "scroll", m = Math.max(0, a.innerWidth - i.clientWidth), h = Math.max(0, a.innerHeight - i.clientHeight), g = parseFloat(r.marginTop) + parseFloat(r.marginBottom), _ = parseFloat(r.marginLeft) + parseFloat(r.marginRight), v = S(n) ? n : i;
|
|
827
|
-
if (c = Zt(e), c) {
|
|
828
|
-
n.style.scrollbarGutter = l, v.style.overflowY = "hidden", v.style.overflowX = "hidden";
|
|
829
|
-
return;
|
|
830
|
-
}
|
|
831
|
-
Object.assign(n.style, {
|
|
832
|
-
scrollbarGutter: l,
|
|
833
|
-
overflowY: "hidden",
|
|
834
|
-
overflowX: "hidden"
|
|
835
|
-
}), (u || f) && (n.style.overflowY = "scroll"), (d || p) && (n.style.overflowX = "scroll"), Object.assign(i.style, {
|
|
836
|
-
position: "relative",
|
|
837
|
-
height: g || h ? `calc(100dvh - ${g + h}px)` : "100dvh",
|
|
838
|
-
width: _ || m ? `calc(100vw - ${_ + m}px)` : "100vw",
|
|
839
|
-
boxSizing: "border-box",
|
|
840
|
-
overflow: "hidden",
|
|
841
|
-
scrollBehavior: "unset"
|
|
842
|
-
}), i.scrollTop = o, i.scrollLeft = s, n.setAttribute("data-base-ui-scroll-locked", ""), n.style.scrollBehavior = "unset";
|
|
843
|
-
}
|
|
844
|
-
function d() {
|
|
845
|
-
Object.assign(n.style, qt), Object.assign(i.style, Jt), c || (n.scrollTop = o, n.scrollLeft = s, n.removeAttribute("data-base-ui-scroll-locked"), n.style.scrollBehavior = Yt);
|
|
846
|
-
}
|
|
847
|
-
function f() {
|
|
848
|
-
d(), l.request(u);
|
|
849
|
-
}
|
|
850
|
-
u();
|
|
851
|
-
let p = we(a, "resize", f);
|
|
852
|
-
return () => {
|
|
853
|
-
l.cancel(), d(), typeof a.removeEventListener == "function" && p();
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
var en = new class {
|
|
857
|
-
lockCount = 0;
|
|
858
|
-
restore = null;
|
|
859
|
-
timeoutLock = We.create();
|
|
860
|
-
timeoutUnlock = We.create();
|
|
861
|
-
acquire(e) {
|
|
862
|
-
return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
|
|
863
|
-
}
|
|
864
|
-
release = () => {
|
|
865
|
-
--this.lockCount, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
|
|
866
|
-
};
|
|
867
|
-
unlock = () => {
|
|
868
|
-
this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
|
|
869
|
-
};
|
|
870
|
-
lock(e) {
|
|
871
|
-
if (this.lockCount === 0 || this.restore !== null) return;
|
|
872
|
-
let t = Oe(e).documentElement, n = T(t).getComputedStyle(t).overflowY;
|
|
873
|
-
if (n === "hidden" || n === "clip") {
|
|
874
|
-
this.restore = q;
|
|
875
|
-
return;
|
|
876
|
-
}
|
|
877
|
-
let r = v || !Xt(e);
|
|
878
|
-
this.restore = r ? Qt(e) : $t(e);
|
|
879
|
-
}
|
|
880
|
-
}();
|
|
881
|
-
function tn(e = !0, t = null) {
|
|
882
|
-
k(() => {
|
|
883
|
-
if (e) return en.acquire(t);
|
|
884
|
-
}, [e, t]);
|
|
885
|
-
}
|
|
886
|
-
//#endregion
|
|
887
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/useAnchoredPopupScrollLock.mjs
|
|
888
|
-
var nn = 20;
|
|
889
|
-
function rn(e, t, n, r) {
|
|
890
|
-
let [i, a] = Z.useState(!1);
|
|
891
|
-
k(() => {
|
|
892
|
-
if (!e || !t || n == null) {
|
|
893
|
-
a(!1);
|
|
894
|
-
return;
|
|
895
|
-
}
|
|
896
|
-
let r = Oe(n).documentElement.clientWidth, i = n.offsetWidth;
|
|
897
|
-
a(r > 0 && i > 0 && i >= r - nn);
|
|
898
|
-
}, [
|
|
899
|
-
e,
|
|
900
|
-
t,
|
|
901
|
-
n
|
|
902
|
-
]), tn(e && (!t || i), r);
|
|
903
|
-
}
|
|
904
|
-
//#endregion
|
|
905
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/useEnhancedClickHandler.mjs
|
|
906
|
-
function an(e) {
|
|
907
|
-
let t = Z.useRef(""), n = Z.useCallback((n) => {
|
|
908
|
-
n.defaultPrevented || (t.current = n.pointerType, e(n, n.pointerType));
|
|
909
|
-
}, [e]);
|
|
910
|
-
return {
|
|
911
|
-
onClick: Z.useCallback((n) => {
|
|
912
|
-
if (n.detail === 0) {
|
|
913
|
-
e(n, "keyboard");
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
"pointerType" in n ? e(n, n.pointerType) : e(n, t.current), t.current = "";
|
|
917
|
-
}, [e]),
|
|
918
|
-
onPointerDown: n
|
|
919
|
-
};
|
|
920
|
-
}
|
|
921
|
-
//#endregion
|
|
922
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/useOpenInteractionType.mjs
|
|
923
|
-
function on(e, t) {
|
|
924
|
-
let { onClick: n, onPointerDown: r } = an(J((n, r) => {
|
|
925
|
-
(typeof e == "function" ? e() : e) || t(r || (v ? "touch" : ""));
|
|
926
|
-
}));
|
|
927
|
-
return Z.useMemo(() => ({
|
|
928
|
-
onClick: n,
|
|
929
|
-
onPointerDown: r
|
|
930
|
-
}), [n, r]);
|
|
931
|
-
}
|
|
932
|
-
function sn(e) {
|
|
933
|
-
let [t, n] = Z.useState(null), r = on(e, n);
|
|
934
|
-
return st(e, (t) => {
|
|
935
|
-
t && !e && n(null);
|
|
936
|
-
}), Z.useMemo(() => ({
|
|
937
|
-
openMethod: t,
|
|
938
|
-
triggerProps: r
|
|
939
|
-
}), [t, r]);
|
|
940
|
-
}
|
|
941
|
-
//#endregion
|
|
942
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs
|
|
943
|
-
function cn(e) {
|
|
944
|
-
let t = e.getBoundingClientRect(), n = T(e);
|
|
945
|
-
if (d) return t;
|
|
946
|
-
let r = n.getComputedStyle(e, "::before"), i = n.getComputedStyle(e, "::after");
|
|
947
|
-
if (!(r.content !== "none" || i.content !== "none")) return t;
|
|
948
|
-
let a = parseFloat(r.width) || 0, o = parseFloat(r.height) || 0, s = parseFloat(i.width) || 0, c = parseFloat(i.height) || 0, l = Math.max(t.width, a, s), u = Math.max(t.height, o, c), f = l - t.width, p = u - t.height;
|
|
949
|
-
return {
|
|
950
|
-
left: t.left - f / 2,
|
|
951
|
-
right: t.right + f / 2,
|
|
952
|
-
top: t.top - p / 2,
|
|
953
|
-
bottom: t.bottom + p / 2
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
//#endregion
|
|
957
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/utils/usePreviousValue.mjs
|
|
958
|
-
function ln(e) {
|
|
959
|
-
let [t, n] = Z.useState({
|
|
960
|
-
current: e,
|
|
961
|
-
previous: null
|
|
962
|
-
});
|
|
963
|
-
return e !== t.current && n({
|
|
964
|
-
current: e,
|
|
965
|
-
previous: t.current
|
|
966
|
-
}), t.previous;
|
|
967
|
-
}
|
|
968
|
-
//#endregion
|
|
969
|
-
//#region src/client/hooks/use-proximity-hover.ts
|
|
970
|
-
function un(e, t) {
|
|
971
|
-
let n = e.getBoundingClientRect(), r = t === "x" ? e.offsetWidth : e.offsetHeight, i = t === "x" ? n.width : n.height;
|
|
972
|
-
return r > 0 ? i / r : 1;
|
|
973
|
-
}
|
|
974
|
-
function dn(e, t) {
|
|
975
|
-
let n = e.getBoundingClientRect(), r = un(e, "x"), i = un(e, "y"), a = [];
|
|
976
|
-
return t.forEach((t, o) => {
|
|
977
|
-
let s = t.getBoundingClientRect();
|
|
978
|
-
a[o] = {
|
|
979
|
-
top: (s.top - n.top) / i + e.scrollTop,
|
|
980
|
-
left: (s.left - n.left) / r + e.scrollLeft,
|
|
981
|
-
width: t.offsetWidth,
|
|
982
|
-
height: t.offsetHeight
|
|
983
|
-
};
|
|
984
|
-
}), a;
|
|
985
|
-
}
|
|
986
|
-
function fn(e, t, n, r) {
|
|
987
|
-
let i = r === "x" ? t : n, a = null, o = Infinity, s = null;
|
|
988
|
-
return e.forEach((e, t) => {
|
|
989
|
-
let n = e.getBoundingClientRect(), c = r === "x" ? n.left : n.top, l = r === "x" ? n.right : n.bottom;
|
|
990
|
-
i >= c && i <= l && (s = t);
|
|
991
|
-
let u = (c + l) / 2, d = Math.abs(i - u);
|
|
992
|
-
d < o && (o = d, a = t);
|
|
993
|
-
}), s ?? a;
|
|
994
|
-
}
|
|
995
|
-
function pn(e, t) {
|
|
996
|
-
if (e.length !== t.length) return !0;
|
|
997
|
-
for (let n = 0; n < t.length; n++) {
|
|
998
|
-
let r = e[n], i = t[n];
|
|
999
|
-
if (r !== i && (!r || !i || r.top !== i.top || r.left !== i.left || r.width !== i.width || r.height !== i.height)) return !0;
|
|
1000
|
-
}
|
|
1001
|
-
return !1;
|
|
1002
|
-
}
|
|
1003
|
-
function mn(e, t = {}) {
|
|
1004
|
-
let { axis: n = "y" } = t, r = (0, Z.useRef)(/* @__PURE__ */ new Map()), [i, a] = (0, Z.useState)(null), [o, s] = (0, Z.useState)([]), c = (0, Z.useRef)([]), l = (0, Z.useRef)(0), u = (0, Z.useRef)(null), d = (0, Z.useRef)(null), f = (0, Z.useRef)(null), p = (0, Z.useCallback)(() => {
|
|
1005
|
-
let t = e.current;
|
|
1006
|
-
if (!t) return;
|
|
1007
|
-
let n = dn(t, r.current);
|
|
1008
|
-
pn(c.current, n) && (c.current = n, s(n));
|
|
1009
|
-
}, [e]), m = (0, Z.useCallback)((e, t) => {
|
|
1010
|
-
a(fn(r.current, e, t, n));
|
|
1011
|
-
}, [n]), h = (0, Z.useCallback)((e, t) => {
|
|
1012
|
-
t ? r.current.set(e, t) : r.current.delete(e), d.current !== null && cancelAnimationFrame(d.current), d.current = requestAnimationFrame(() => {
|
|
1013
|
-
d.current = null, p();
|
|
1014
|
-
});
|
|
1015
|
-
}, [p]), g = (0, Z.useCallback)((e) => {
|
|
1016
|
-
f.current = {
|
|
1017
|
-
x: e.clientX,
|
|
1018
|
-
y: e.clientY
|
|
1019
|
-
}, u.current !== null && cancelAnimationFrame(u.current), u.current = requestAnimationFrame(() => {
|
|
1020
|
-
u.current = null, p(), m(e.clientX, e.clientY);
|
|
1021
|
-
});
|
|
1022
|
-
}, [p, m]), _ = (0, Z.useCallback)(() => {
|
|
1023
|
-
l.current += 1;
|
|
1024
|
-
}, []), v = (0, Z.useCallback)(() => {
|
|
1025
|
-
u.current !== null && (cancelAnimationFrame(u.current), u.current = null), f.current = null, a(null);
|
|
1026
|
-
}, []);
|
|
1027
|
-
return (0, Z.useEffect)(() => {
|
|
1028
|
-
let t = e.current;
|
|
1029
|
-
if (!t || typeof ResizeObserver > "u") return;
|
|
1030
|
-
let n = new ResizeObserver(() => {
|
|
1031
|
-
d.current !== null && cancelAnimationFrame(d.current), d.current = requestAnimationFrame(() => {
|
|
1032
|
-
d.current = null, p();
|
|
1033
|
-
});
|
|
1034
|
-
});
|
|
1035
|
-
return n.observe(t), () => n.disconnect();
|
|
1036
|
-
}, [e, p]), (0, Z.useEffect)(() => {
|
|
1037
|
-
let t = e.current;
|
|
1038
|
-
if (!t) return;
|
|
1039
|
-
let n = () => {
|
|
1040
|
-
p();
|
|
1041
|
-
let e = f.current;
|
|
1042
|
-
e && m(e.x, e.y);
|
|
1043
|
-
};
|
|
1044
|
-
return t.addEventListener("scroll", n, {
|
|
1045
|
-
capture: !0,
|
|
1046
|
-
passive: !0
|
|
1047
|
-
}), () => t.removeEventListener("scroll", n, { capture: !0 });
|
|
1048
|
-
}, [
|
|
1049
|
-
e,
|
|
1050
|
-
p,
|
|
1051
|
-
m
|
|
1052
|
-
]), (0, Z.useEffect)(() => () => {
|
|
1053
|
-
u.current !== null && cancelAnimationFrame(u.current), d.current !== null && cancelAnimationFrame(d.current);
|
|
1054
|
-
}, []), {
|
|
1055
|
-
activeIndex: i,
|
|
1056
|
-
setActiveIndex: a,
|
|
1057
|
-
itemRects: o,
|
|
1058
|
-
sessionRef: l,
|
|
1059
|
-
handlers: {
|
|
1060
|
-
onMouseMove: g,
|
|
1061
|
-
onMouseEnter: _,
|
|
1062
|
-
onMouseLeave: v
|
|
1063
|
-
},
|
|
1064
|
-
registerItem: h,
|
|
1065
|
-
measureItems: p
|
|
1066
|
-
};
|
|
1067
|
-
}
|
|
1068
|
-
//#endregion
|
|
1069
|
-
//#region src/client/lib/surface-context.tsx
|
|
1070
|
-
var hn = (0, Z.createContext)(1);
|
|
1071
|
-
function gn() {
|
|
1072
|
-
return (0, Z.useContext)(hn);
|
|
1073
|
-
}
|
|
1074
|
-
function _n({ value: e, children: t }) {
|
|
1075
|
-
return /* @__PURE__ */ (0, Q.jsx)(hn.Provider, {
|
|
1076
|
-
value: Math.max(1, Math.min(8, e)),
|
|
1077
|
-
children: t
|
|
1078
|
-
});
|
|
1079
|
-
}
|
|
1080
|
-
//#endregion
|
|
1081
|
-
//#region src/client/lib/surface-classes.ts
|
|
1082
|
-
var vn = {
|
|
1083
|
-
1: "bg-surface-1",
|
|
1084
|
-
2: "bg-surface-2",
|
|
1085
|
-
3: "bg-surface-3",
|
|
1086
|
-
4: "bg-surface-4",
|
|
1087
|
-
5: "bg-surface-5",
|
|
1088
|
-
6: "bg-surface-6",
|
|
1089
|
-
7: "bg-surface-7",
|
|
1090
|
-
8: "bg-surface-8"
|
|
1091
|
-
}, yn = {
|
|
1092
|
-
1: "shadow-surface-1",
|
|
1093
|
-
2: "shadow-surface-2",
|
|
1094
|
-
3: "shadow-surface-3",
|
|
1095
|
-
4: "shadow-surface-4",
|
|
1096
|
-
5: "shadow-surface-5",
|
|
1097
|
-
6: "shadow-surface-6",
|
|
1098
|
-
7: "shadow-surface-7",
|
|
1099
|
-
8: "shadow-surface-8"
|
|
1100
|
-
};
|
|
1101
|
-
function bn(e, t = e) {
|
|
1102
|
-
let n = Math.round(Math.max(1, Math.min(8, e))), r = Math.round(Math.max(1, Math.min(8, t)));
|
|
1103
|
-
return `${vn[n]} ${yn[r]}`;
|
|
1104
|
-
}
|
|
1105
|
-
//#endregion
|
|
1106
|
-
//#region src/client/lib/elevated.tsx
|
|
1107
|
-
var xn = (0, Z.forwardRef)(({ offset: e, shadowLevel: t, className: n, children: r, ...i }, a) => {
|
|
1108
|
-
let o = gn(), s = Math.min(o + e, 8);
|
|
1109
|
-
return /* @__PURE__ */ (0, Q.jsx)(_n, {
|
|
1110
|
-
value: s,
|
|
1111
|
-
children: /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
1112
|
-
ref: a,
|
|
1113
|
-
className: O(bn(s, t ?? s), n),
|
|
1114
|
-
...i,
|
|
1115
|
-
children: r
|
|
1116
|
-
})
|
|
1117
|
-
});
|
|
1118
|
-
});
|
|
1119
|
-
xn.displayName = "Elevated";
|
|
1120
|
-
//#endregion
|
|
1121
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/root/SelectRootContext.mjs
|
|
1122
|
-
var Sn = /*#__PURE__*/ Z.createContext(null);
|
|
1123
|
-
process.env.NODE_ENV !== "production" && (Sn.displayName = "SelectRootContext");
|
|
1124
|
-
var Cn = /*#__PURE__*/ Z.createContext(null);
|
|
1125
|
-
process.env.NODE_ENV !== "production" && (Cn.displayName = "SelectFloatingContext");
|
|
1126
|
-
function wn() {
|
|
1127
|
-
let e = Z.useContext(Sn);
|
|
1128
|
-
if (e === null) throw Error(process.env.NODE_ENV === "production" ? U(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
1129
|
-
return e;
|
|
1130
|
-
}
|
|
1131
|
-
function Tn() {
|
|
1132
|
-
let e = Z.useContext(Cn);
|
|
1133
|
-
if (e === null) throw Error(process.env.NODE_ENV === "production" ? U(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
1134
|
-
return e;
|
|
1135
|
-
}
|
|
1136
|
-
//#endregion
|
|
1137
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
|
|
1138
|
-
function En(e = {}) {
|
|
1139
|
-
let { id: t, implicit: n = !1, controlRef: r } = e, { controlId: i, registerControlId: a } = lt(), o = C(t), s = n ? i : void 0, c = j(() => Symbol("labelable-control")), l = Z.useRef(!1), u = Z.useRef(t != null), d = J(() => {
|
|
1140
|
-
!l.current || a === q || (l.current = !1, a(c.current, void 0));
|
|
1141
|
-
});
|
|
1142
|
-
return k(() => {
|
|
1143
|
-
if (a === q) return;
|
|
1144
|
-
let e;
|
|
1145
|
-
if (n) {
|
|
1146
|
-
let n = r?.current;
|
|
1147
|
-
e = G(n) && n.closest("label") != null ? t ?? null : s ?? o;
|
|
1148
|
-
} else if (t != null) u.current = !0, e = t;
|
|
1149
|
-
else if (u.current) e = o;
|
|
1150
|
-
else {
|
|
1151
|
-
d();
|
|
1152
|
-
return;
|
|
1153
|
-
}
|
|
1154
|
-
if (e === void 0) {
|
|
1155
|
-
d();
|
|
1156
|
-
return;
|
|
1157
|
-
}
|
|
1158
|
-
l.current = !0, a(c.current, e);
|
|
1159
|
-
}, [
|
|
1160
|
-
t,
|
|
1161
|
-
r,
|
|
1162
|
-
s,
|
|
1163
|
-
a,
|
|
1164
|
-
n,
|
|
1165
|
-
o,
|
|
1166
|
-
c,
|
|
1167
|
-
d
|
|
1168
|
-
]), Z.useEffect(() => d, [d]), i ?? o;
|
|
1169
|
-
}
|
|
1170
|
-
//#endregion
|
|
1171
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/itemEquality.mjs
|
|
1172
|
-
var Dn = (e, t) => Object.is(e, t);
|
|
1173
|
-
function On(e, t, n) {
|
|
1174
|
-
return e == null || t == null ? Object.is(e, t) : n(e, t);
|
|
1175
|
-
}
|
|
1176
|
-
function kn(e, t, n) {
|
|
1177
|
-
return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : On(t, e, n));
|
|
1178
|
-
}
|
|
1179
|
-
function An(e, t, n) {
|
|
1180
|
-
return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : On(e, t, n));
|
|
1181
|
-
}
|
|
1182
|
-
function jn(e, t, n) {
|
|
1183
|
-
return e.filter((e) => !On(t, e, n));
|
|
1184
|
-
}
|
|
1185
|
-
//#endregion
|
|
1186
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/serializeValue.mjs
|
|
1187
|
-
function Mn(e) {
|
|
1188
|
-
if (e == null) return "";
|
|
1189
|
-
if (typeof e == "string") return e;
|
|
1190
|
-
try {
|
|
1191
|
-
return JSON.stringify(e);
|
|
1192
|
-
} catch {
|
|
1193
|
-
return String(e);
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
//#endregion
|
|
1197
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/resolveValueLabel.mjs
|
|
1198
|
-
function Nn(e) {
|
|
1199
|
-
return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
|
|
1200
|
-
}
|
|
1201
|
-
function Pn(e) {
|
|
1202
|
-
if (!Array.isArray(e)) return e != null && "null" in e;
|
|
1203
|
-
let t = e;
|
|
1204
|
-
if (Nn(t)) {
|
|
1205
|
-
for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
|
|
1206
|
-
return !1;
|
|
1207
|
-
}
|
|
1208
|
-
for (let e of t) if (e && e.value == null && e.label != null) return !0;
|
|
1209
|
-
return !1;
|
|
1210
|
-
}
|
|
1211
|
-
function Fn(e, t) {
|
|
1212
|
-
if (t && e != null) return t(e) ?? "";
|
|
1213
|
-
if (e && typeof e == "object") {
|
|
1214
|
-
if ("label" in e && e.label != null) return String(e.label);
|
|
1215
|
-
if ("value" in e) return String(e.value);
|
|
1216
|
-
}
|
|
1217
|
-
return Mn(e);
|
|
1218
|
-
}
|
|
1219
|
-
function In(e, t) {
|
|
1220
|
-
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? Mn(e.value) : Mn(e);
|
|
1221
|
-
}
|
|
1222
|
-
function Ln(e, t, n) {
|
|
1223
|
-
function r() {
|
|
1224
|
-
return Fn(e, n);
|
|
1225
|
-
}
|
|
1226
|
-
if (n && e != null) return n(e);
|
|
1227
|
-
if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
|
|
1228
|
-
if (t && !Array.isArray(t)) return t[e] ?? r();
|
|
1229
|
-
if (Array.isArray(t)) {
|
|
1230
|
-
let n = t, i = Nn(n) ? n.flatMap((e) => e.items) : n;
|
|
1231
|
-
if (typeof e != "object" || !e) {
|
|
1232
|
-
let t = i.find((t) => t.value === e);
|
|
1233
|
-
return t && t.label != null ? t.label : r();
|
|
1234
|
-
}
|
|
1235
|
-
if ("value" in e) {
|
|
1236
|
-
let t = i.find((t) => t && t.value === e.value);
|
|
1237
|
-
if (t && t.label != null) return t.label;
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
return r();
|
|
1241
|
-
}
|
|
1242
|
-
function Rn(e, t, n) {
|
|
1243
|
-
return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/*#__PURE__*/ (0, Q.jsx)(Z.Fragment, { children: Ln(r, t, n) }, i)), e), []);
|
|
1244
|
-
}
|
|
1245
|
-
//#endregion
|
|
1246
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/store.mjs
|
|
1247
|
-
var $ = {
|
|
1248
|
-
id: Y((e) => e.id),
|
|
1249
|
-
labelId: Y((e) => e.labelId),
|
|
1250
|
-
modal: Y((e) => e.modal),
|
|
1251
|
-
multiple: Y((e) => e.multiple),
|
|
1252
|
-
items: Y((e) => e.items),
|
|
1253
|
-
itemToStringLabel: Y((e) => e.itemToStringLabel),
|
|
1254
|
-
itemToStringValue: Y((e) => e.itemToStringValue),
|
|
1255
|
-
isItemEqualToValue: Y((e) => e.isItemEqualToValue),
|
|
1256
|
-
value: Y((e) => e.value),
|
|
1257
|
-
hasSelectedValue: Y((e) => {
|
|
1258
|
-
let { value: t, multiple: n, itemToStringValue: r } = e;
|
|
1259
|
-
return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : In(t, r) !== "";
|
|
1260
|
-
}),
|
|
1261
|
-
hasNullItemLabel: Y((e, t) => t ? Pn(e.items) : !1),
|
|
1262
|
-
open: Y((e) => e.open),
|
|
1263
|
-
mounted: Y((e) => e.mounted),
|
|
1264
|
-
forceMount: Y((e) => e.forceMount),
|
|
1265
|
-
transitionStatus: Y((e) => e.transitionStatus),
|
|
1266
|
-
openMethod: Y((e) => e.openMethod),
|
|
1267
|
-
activeIndex: Y((e) => e.activeIndex),
|
|
1268
|
-
selectedIndex: Y((e) => e.selectedIndex),
|
|
1269
|
-
isActive: Y((e, t) => e.activeIndex === t),
|
|
1270
|
-
isSelected: Y((e, t) => {
|
|
1271
|
-
let n = e.isItemEqualToValue, r = e.value;
|
|
1272
|
-
return e.multiple ? Array.isArray(r) && r.some((e) => On(t, e, n)) : On(t, r, n);
|
|
1273
|
-
}),
|
|
1274
|
-
isSelectedByFocus: Y((e, t) => e.selectedIndex === t),
|
|
1275
|
-
popupProps: Y((e) => e.popupProps),
|
|
1276
|
-
triggerProps: Y((e) => e.triggerProps),
|
|
1277
|
-
triggerElement: Y((e) => e.triggerElement),
|
|
1278
|
-
positionerElement: Y((e) => e.positionerElement),
|
|
1279
|
-
listElement: Y((e) => e.listElement),
|
|
1280
|
-
popupSide: Y((e) => e.popupSide),
|
|
1281
|
-
scrollUpArrowVisible: Y((e) => e.scrollUpArrowVisible),
|
|
1282
|
-
scrollDownArrowVisible: Y((e) => e.scrollDownArrowVisible),
|
|
1283
|
-
hasScrollArrows: Y((e) => e.hasScrollArrows)
|
|
1284
|
-
};
|
|
1285
|
-
//#endregion
|
|
1286
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/areArraysEqual.mjs
|
|
1287
|
-
function zn(e, t, n = (e, t) => e === t) {
|
|
1288
|
-
return e.length === t.length && e.every((e, r) => n(e, t[r]));
|
|
1289
|
-
}
|
|
1290
|
-
//#endregion
|
|
1291
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/clamp.mjs
|
|
1292
|
-
function Bn(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
|
|
1293
|
-
return Math.max(t, Math.min(e, n));
|
|
1294
|
-
}
|
|
1295
|
-
function Vn(e, t) {
|
|
1296
|
-
return Math.max(0, e - t);
|
|
1297
|
-
}
|
|
1298
|
-
function Hn(e, t) {
|
|
1299
|
-
if (t <= 0) return 0;
|
|
1300
|
-
let n = Bn(e, 0, t), r = n, i = t - n, a = r <= 1, o = i <= 1;
|
|
1301
|
-
return a && o ? r <= i ? 0 : t : a ? 0 : o ? t : n;
|
|
1302
|
-
}
|
|
1303
|
-
//#endregion
|
|
1304
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/root/SelectRoot.mjs
|
|
1305
|
-
function Un(e) {
|
|
1306
|
-
let { id: t, value: n, defaultValue: r = null, onValueChange: i, open: a, defaultOpen: o = !1, onOpenChange: l, name: u, form: d, autoComplete: f, disabled: p = !1, readOnly: m = !1, required: h = !1, modal: g = !0, actionsRef: _, inputRef: v, onOpenChangeComplete: y, items: b, multiple: S = !1, itemToStringLabel: ee, itemToStringValue: C, isItemEqualToValue: w = Dn, highlightItemOnHover: te = !0, children: T } = e, { clearErrors: E } = ut(), { setDirty: D, setTouched: O, setFocused: ne, validityData: A, setFilled: N, name: re, disabled: ie, validation: ae, validationMode: oe } = ct(), P = En({ id: t }), I = ie || p, L = re ?? u, [R, z] = Qe({
|
|
1307
|
-
controlled: n,
|
|
1308
|
-
default: S ? r ?? me : r,
|
|
1309
|
-
name: "Select",
|
|
1310
|
-
state: "value"
|
|
1311
|
-
}), [B, H] = Qe({
|
|
1312
|
-
controlled: a,
|
|
1313
|
-
default: o,
|
|
1314
|
-
name: "Select",
|
|
1315
|
-
state: "open"
|
|
1316
|
-
}), U = Z.useRef([]), ce = Z.useRef([]), le = Z.useRef(null), ue = Z.useRef(null), de = Z.useRef(0), fe = Z.useRef(null), W = Z.useRef([]), pe = Z.useRef(!1), he = Z.useRef(null), _e = Z.useRef(null), ve = Z.useRef({
|
|
1317
|
-
allowSelectedMouseUp: !1,
|
|
1318
|
-
allowUnselectedMouseUp: !1,
|
|
1319
|
-
dragY: 0
|
|
1320
|
-
}), be = Z.useRef(!1), { mounted: xe, setMounted: Se, transitionStatus: G } = Ce(B), { openMethod: we, triggerProps: K } = sn(B), q = j(() => new se({
|
|
1321
|
-
id: P,
|
|
1322
|
-
labelId: void 0,
|
|
1323
|
-
modal: g,
|
|
1324
|
-
multiple: S,
|
|
1325
|
-
itemToStringLabel: ee,
|
|
1326
|
-
itemToStringValue: C,
|
|
1327
|
-
isItemEqualToValue: w,
|
|
1328
|
-
value: R,
|
|
1329
|
-
open: B,
|
|
1330
|
-
mounted: xe,
|
|
1331
|
-
transitionStatus: G,
|
|
1332
|
-
items: b,
|
|
1333
|
-
forceMount: !1,
|
|
1334
|
-
openMethod: null,
|
|
1335
|
-
activeIndex: null,
|
|
1336
|
-
selectedIndex: null,
|
|
1337
|
-
popupProps: {},
|
|
1338
|
-
triggerProps: {},
|
|
1339
|
-
triggerElement: null,
|
|
1340
|
-
positionerElement: null,
|
|
1341
|
-
listElement: null,
|
|
1342
|
-
popupSide: null,
|
|
1343
|
-
scrollUpArrowVisible: !1,
|
|
1344
|
-
scrollDownArrowVisible: !1,
|
|
1345
|
-
hasScrollArrows: !1
|
|
1346
|
-
})).current, Te = X(q, $.activeIndex), De = X(q, $.selectedIndex), Oe = X(q, $.triggerElement), ke = X(q, $.positionerElement), Ae = ln(we), Me = we ?? Ae ?? null, Ne = Z.useMemo(() => S ? "" : In(R, C), [
|
|
1347
|
-
S,
|
|
1348
|
-
R,
|
|
1349
|
-
C
|
|
1350
|
-
]), Pe = Z.useMemo(() => S && Array.isArray(R) ? R.map((e) => In(e, C)) : In(R, C), [
|
|
1351
|
-
S,
|
|
1352
|
-
R,
|
|
1353
|
-
C
|
|
1354
|
-
]);
|
|
1355
|
-
ot(Re(q.state.triggerElement), P, R, J(() => Pe), !I, u);
|
|
1356
|
-
let Fe = Z.useRef(R), Ie = S ? Array.isArray(R) && R.length > 0 : R != null && In(R, C) !== "";
|
|
1357
|
-
k(() => {
|
|
1358
|
-
R !== Fe.current && q.set("forceMount", !0);
|
|
1359
|
-
}, [q, R]), k(() => {
|
|
1360
|
-
N(Ie);
|
|
1361
|
-
}, [Ie, N]), k(function() {
|
|
1362
|
-
let e = W.current, t;
|
|
1363
|
-
if (S) {
|
|
1364
|
-
let n = Array.isArray(R) ? R : [];
|
|
1365
|
-
if (n.length === 0) t = null;
|
|
1366
|
-
else {
|
|
1367
|
-
let r = n[n.length - 1], i = An(e, r, w);
|
|
1368
|
-
t = i === -1 ? null : i;
|
|
1369
|
-
}
|
|
1370
|
-
} else {
|
|
1371
|
-
let n = An(e, R, w);
|
|
1372
|
-
t = n === -1 ? null : n;
|
|
1373
|
-
}
|
|
1374
|
-
t === null && (_e.current = null), !B && q.set("selectedIndex", t);
|
|
1375
|
-
}, [
|
|
1376
|
-
Ie,
|
|
1377
|
-
S,
|
|
1378
|
-
B,
|
|
1379
|
-
R,
|
|
1380
|
-
W,
|
|
1381
|
-
w,
|
|
1382
|
-
q,
|
|
1383
|
-
_e
|
|
1384
|
-
]);
|
|
1385
|
-
function Le(e) {
|
|
1386
|
-
let t = A.initialValue;
|
|
1387
|
-
return Array.isArray(e) && Array.isArray(t) ? !zn(e, t, (e, t) => On(e, t, w)) : e !== t;
|
|
1388
|
-
}
|
|
1389
|
-
st(R, () => {
|
|
1390
|
-
E(L), D(Le(R)), ae.change(R);
|
|
1391
|
-
});
|
|
1392
|
-
let Be = J((e, t) => {
|
|
1393
|
-
l?.(e, t), !t.isCanceled && (H(e), !e && (t.reason === "focus-out" || t.reason === "outside-press") && (O(!0), ne(!1), oe === "onBlur" && ae.commit(R)));
|
|
1394
|
-
}), Ve = J(() => {
|
|
1395
|
-
Se(!1), q.update({
|
|
1396
|
-
activeIndex: null,
|
|
1397
|
-
openMethod: null
|
|
1398
|
-
}), y?.(!1);
|
|
1399
|
-
});
|
|
1400
|
-
c({
|
|
1401
|
-
enabled: !_,
|
|
1402
|
-
open: B,
|
|
1403
|
-
ref: le,
|
|
1404
|
-
onComplete() {
|
|
1405
|
-
B || Ve();
|
|
1406
|
-
}
|
|
1407
|
-
}), Z.useImperativeHandle(_, () => ({ unmount: Ve }), [Ve]);
|
|
1408
|
-
let He = J((e, t) => {
|
|
1409
|
-
i?.(e, t), !t.isCanceled && z(e);
|
|
1410
|
-
}), Ue = J(() => {
|
|
1411
|
-
let e = q.state.listElement || le.current;
|
|
1412
|
-
if (!e) return;
|
|
1413
|
-
let t = Vn(e.scrollHeight, e.clientHeight), n = Hn(e.scrollTop, t), r = n > 0, i = n < t;
|
|
1414
|
-
q.state.scrollUpArrowVisible !== r && q.set("scrollUpArrowVisible", r), q.state.scrollDownArrowVisible !== i && q.set("scrollDownArrowVisible", i);
|
|
1415
|
-
}), We = Ee({
|
|
1416
|
-
open: B,
|
|
1417
|
-
onOpenChange: Be,
|
|
1418
|
-
elements: {
|
|
1419
|
-
reference: Oe,
|
|
1420
|
-
floating: ke
|
|
1421
|
-
}
|
|
1422
|
-
}), Y = Pt(We, {
|
|
1423
|
-
enabled: !m && !I,
|
|
1424
|
-
event: "mousedown"
|
|
1425
|
-
}), Ge = s(We), qe = Vt(We, {
|
|
1426
|
-
enabled: !m && !I,
|
|
1427
|
-
listRef: U,
|
|
1428
|
-
activeIndex: Te,
|
|
1429
|
-
selectedIndex: De,
|
|
1430
|
-
disabledIndices: me,
|
|
1431
|
-
onNavigate(e) {
|
|
1432
|
-
e === null && !B || q.set("activeIndex", e);
|
|
1433
|
-
},
|
|
1434
|
-
focusItemOnHover: te
|
|
1435
|
-
}), Je = Ht(We, {
|
|
1436
|
-
enabled: !m && !I && (B || !S),
|
|
1437
|
-
listRef: ce,
|
|
1438
|
-
activeIndex: Te,
|
|
1439
|
-
selectedIndex: De,
|
|
1440
|
-
disabledIndices: (e) => tt(U.current[e]),
|
|
1441
|
-
onMatch(e) {
|
|
1442
|
-
B ? q.set("activeIndex", e) : He(W.current[e], x("none"));
|
|
1443
|
-
},
|
|
1444
|
-
onTyping(e) {
|
|
1445
|
-
pe.current = e;
|
|
1446
|
-
}
|
|
1447
|
-
}), Ye = Z.useMemo(() => {
|
|
1448
|
-
let e = Ke(Je.reference, qe.reference, Ge.reference, Y.reference, K);
|
|
1449
|
-
return P && (e.id = P), e;
|
|
1450
|
-
}, [
|
|
1451
|
-
Y.reference,
|
|
1452
|
-
Je.reference,
|
|
1453
|
-
qe.reference,
|
|
1454
|
-
Ge.reference,
|
|
1455
|
-
K,
|
|
1456
|
-
P
|
|
1457
|
-
]), Xe = Z.useMemo(() => Ke(ze, Je.floating, qe.floating, Ge.floating), [
|
|
1458
|
-
Je.floating,
|
|
1459
|
-
qe.floating,
|
|
1460
|
-
Ge.floating
|
|
1461
|
-
]), Ze = qe.item ?? je;
|
|
1462
|
-
M(() => {
|
|
1463
|
-
q.update({
|
|
1464
|
-
popupProps: Xe,
|
|
1465
|
-
triggerProps: Ye
|
|
1466
|
-
});
|
|
1467
|
-
}), k(() => {
|
|
1468
|
-
q.update({
|
|
1469
|
-
id: P,
|
|
1470
|
-
modal: g,
|
|
1471
|
-
multiple: S,
|
|
1472
|
-
value: R,
|
|
1473
|
-
open: B,
|
|
1474
|
-
mounted: xe,
|
|
1475
|
-
transitionStatus: G,
|
|
1476
|
-
popupProps: Xe,
|
|
1477
|
-
triggerProps: Ye,
|
|
1478
|
-
items: b,
|
|
1479
|
-
itemToStringLabel: ee,
|
|
1480
|
-
itemToStringValue: C,
|
|
1481
|
-
isItemEqualToValue: w,
|
|
1482
|
-
openMethod: Me
|
|
1483
|
-
});
|
|
1484
|
-
}, [
|
|
1485
|
-
q,
|
|
1486
|
-
P,
|
|
1487
|
-
g,
|
|
1488
|
-
S,
|
|
1489
|
-
R,
|
|
1490
|
-
B,
|
|
1491
|
-
xe,
|
|
1492
|
-
G,
|
|
1493
|
-
Xe,
|
|
1494
|
-
Ye,
|
|
1495
|
-
b,
|
|
1496
|
-
ee,
|
|
1497
|
-
C,
|
|
1498
|
-
w,
|
|
1499
|
-
Me
|
|
1500
|
-
]);
|
|
1501
|
-
let $e = Z.useMemo(() => ({
|
|
1502
|
-
store: q,
|
|
1503
|
-
name: L,
|
|
1504
|
-
required: h,
|
|
1505
|
-
disabled: I,
|
|
1506
|
-
readOnly: m,
|
|
1507
|
-
multiple: S,
|
|
1508
|
-
highlightItemOnHover: te,
|
|
1509
|
-
setValue: He,
|
|
1510
|
-
setOpen: Be,
|
|
1511
|
-
listRef: U,
|
|
1512
|
-
popupRef: le,
|
|
1513
|
-
scrollHandlerRef: ue,
|
|
1514
|
-
handleScrollArrowVisibility: Ue,
|
|
1515
|
-
scrollArrowsMountedCountRef: de,
|
|
1516
|
-
itemProps: Ze,
|
|
1517
|
-
valueRef: fe,
|
|
1518
|
-
valuesRef: W,
|
|
1519
|
-
labelsRef: ce,
|
|
1520
|
-
typingRef: pe,
|
|
1521
|
-
selectionRef: ve,
|
|
1522
|
-
firstItemTextRef: he,
|
|
1523
|
-
selectedItemTextRef: _e,
|
|
1524
|
-
validation: ae,
|
|
1525
|
-
onOpenChangeComplete: y,
|
|
1526
|
-
alignItemWithTriggerActiveRef: be,
|
|
1527
|
-
initialValueRef: Fe
|
|
1528
|
-
}), [
|
|
1529
|
-
q,
|
|
1530
|
-
L,
|
|
1531
|
-
h,
|
|
1532
|
-
I,
|
|
1533
|
-
m,
|
|
1534
|
-
S,
|
|
1535
|
-
te,
|
|
1536
|
-
He,
|
|
1537
|
-
Be,
|
|
1538
|
-
Ze,
|
|
1539
|
-
ae,
|
|
1540
|
-
y,
|
|
1541
|
-
Ue
|
|
1542
|
-
]), et = ge(v, ae.inputRef), nt = S && Array.isArray(R) && R.length > 0, rt = S ? void 0 : L, it = Z.useMemo(() => !S || !Array.isArray(R) || !L ? null : R.map((e) => {
|
|
1543
|
-
let t = In(e, C);
|
|
1544
|
-
return /*#__PURE__*/ (0, Q.jsx)("input", {
|
|
1545
|
-
type: "hidden",
|
|
1546
|
-
form: d,
|
|
1547
|
-
name: L,
|
|
1548
|
-
value: t,
|
|
1549
|
-
disabled: I
|
|
1550
|
-
}, t);
|
|
1551
|
-
}), [
|
|
1552
|
-
S,
|
|
1553
|
-
R,
|
|
1554
|
-
d,
|
|
1555
|
-
L,
|
|
1556
|
-
C,
|
|
1557
|
-
I
|
|
1558
|
-
]);
|
|
1559
|
-
return /*#__PURE__*/ (0, Q.jsx)(Sn.Provider, {
|
|
1560
|
-
value: $e,
|
|
1561
|
-
children: /*#__PURE__*/ (0, Q.jsxs)(Cn.Provider, {
|
|
1562
|
-
value: We,
|
|
1563
|
-
children: [
|
|
1564
|
-
T,
|
|
1565
|
-
/*#__PURE__*/ (0, Q.jsx)("input", {
|
|
1566
|
-
...ae.getValidationProps(I, {
|
|
1567
|
-
onFocus() {
|
|
1568
|
-
q.state.triggerElement?.focus({ focusVisible: !0 });
|
|
1569
|
-
},
|
|
1570
|
-
onChange(e) {
|
|
1571
|
-
if (e.nativeEvent.defaultPrevented || I || m) return;
|
|
1572
|
-
let t = e.currentTarget.value, n = x(F, e.nativeEvent);
|
|
1573
|
-
function r() {
|
|
1574
|
-
if (S) return;
|
|
1575
|
-
let e = t.toLowerCase(), r = W.current.findIndex((t) => In(t, C).toLowerCase() === e || Fn(t, ee).toLowerCase() === e);
|
|
1576
|
-
r === -1 && (r = W.current.findIndex((t, n) => {
|
|
1577
|
-
let r = ce.current[n];
|
|
1578
|
-
return r != null && r.toLowerCase() === e;
|
|
1579
|
-
}));
|
|
1580
|
-
let i = r === -1 ? void 0 : W.current[r];
|
|
1581
|
-
i != null && He(i, n);
|
|
1582
|
-
}
|
|
1583
|
-
q.set("forceMount", !0), queueMicrotask(r);
|
|
1584
|
-
}
|
|
1585
|
-
}),
|
|
1586
|
-
id: P && rt == null ? `${P}-hidden-input` : void 0,
|
|
1587
|
-
form: d,
|
|
1588
|
-
name: rt,
|
|
1589
|
-
autoComplete: f,
|
|
1590
|
-
value: Ne,
|
|
1591
|
-
disabled: I,
|
|
1592
|
-
required: h && !nt,
|
|
1593
|
-
readOnly: m,
|
|
1594
|
-
ref: et,
|
|
1595
|
-
style: L ? V : ye,
|
|
1596
|
-
tabIndex: -1,
|
|
1597
|
-
"aria-hidden": !0,
|
|
1598
|
-
suppressHydrationWarning: !0
|
|
1599
|
-
}),
|
|
1600
|
-
it
|
|
1601
|
-
]
|
|
1602
|
-
})
|
|
1603
|
-
});
|
|
1604
|
-
}
|
|
1605
|
-
//#endregion
|
|
1606
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs
|
|
1607
|
-
function Wn(e, t) {
|
|
1608
|
-
return e ?? t;
|
|
1609
|
-
}
|
|
1610
|
-
//#endregion
|
|
1611
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs
|
|
1612
|
-
var Gn = 2, Kn = 400, qn = {
|
|
1613
|
-
...be,
|
|
1614
|
-
...at,
|
|
1615
|
-
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
1616
|
-
value: () => null
|
|
1617
|
-
}, Jn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1618
|
-
let { render: n, className: r, id: i, disabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { setTouched: l, setFocused: u, validationMode: d, state: f, disabled: p } = ct(), { labelId: m } = lt(), { store: h, setOpen: g, selectionRef: _, validation: v, readOnly: y, required: b, alignItemWithTriggerActiveRef: S, disabled: ee } = wn(), C = p || ee || a, w = X(h, $.open), te = X(h, $.mounted), T = X(h, $.value), E = X(h, $.triggerProps), D = X(h, $.positionerElement), O = X(h, $.listElement), ne = X(h, $.popupSide), k = X(h, $.id), j = X(h, $.labelId), M = X(h, $.hasSelectedValue), N = te && D ? ne : null, re = i ?? k, ie = Wn(m, j);
|
|
1619
|
-
En({ id: re });
|
|
1620
|
-
let ae = Re(D), oe = Z.useRef(null), { getButtonProps: P, buttonRef: I } = B({
|
|
1621
|
-
disabled: C,
|
|
1622
|
-
native: o
|
|
1623
|
-
}), L = J((e) => {
|
|
1624
|
-
h.set("triggerElement", e);
|
|
1625
|
-
}), R = A(), z = A(), V = A();
|
|
1626
|
-
Z.useEffect(() => {
|
|
1627
|
-
if (w) return V.start(Kn, () => {
|
|
1628
|
-
_.current.allowUnselectedMouseUp = !0, _.current.allowSelectedMouseUp = !0;
|
|
1629
|
-
}), () => {
|
|
1630
|
-
V.clear();
|
|
1631
|
-
};
|
|
1632
|
-
_.current = {
|
|
1633
|
-
allowSelectedMouseUp: !1,
|
|
1634
|
-
allowUnselectedMouseUp: !1,
|
|
1635
|
-
dragY: 0
|
|
1636
|
-
}, z.clear();
|
|
1637
|
-
}, [
|
|
1638
|
-
w,
|
|
1639
|
-
_,
|
|
1640
|
-
z,
|
|
1641
|
-
V
|
|
1642
|
-
]);
|
|
1643
|
-
let H = Ke(E, {
|
|
1644
|
-
id: re,
|
|
1645
|
-
role: "combobox",
|
|
1646
|
-
"aria-expanded": w ? "true" : "false",
|
|
1647
|
-
"aria-haspopup": "listbox",
|
|
1648
|
-
"aria-controls": w ? O?.id ?? He(D)?.id : void 0,
|
|
1649
|
-
"aria-labelledby": ie,
|
|
1650
|
-
"aria-readonly": y || void 0,
|
|
1651
|
-
"aria-required": b || void 0,
|
|
1652
|
-
tabIndex: C ? -1 : 0,
|
|
1653
|
-
onFocus(e) {
|
|
1654
|
-
u(!0), w && S.current && g(!1, x(F, e.nativeEvent)), R.start(0, () => {
|
|
1655
|
-
h.set("forceMount", !0);
|
|
1656
|
-
});
|
|
1657
|
-
},
|
|
1658
|
-
onBlur(e) {
|
|
1659
|
-
K(D, e.relatedTarget) || (l(!0), u(!1), d === "onBlur" && v.commit(T));
|
|
1660
|
-
},
|
|
1661
|
-
onMouseDown(e) {
|
|
1662
|
-
if (w) return;
|
|
1663
|
-
let t = Oe(e.currentTarget);
|
|
1664
|
-
function n(e) {
|
|
1665
|
-
if (!oe.current) return;
|
|
1666
|
-
let t = e.target;
|
|
1667
|
-
if (K(oe.current, t) || K(ae.current, t)) return;
|
|
1668
|
-
let n = cn(oe.current);
|
|
1669
|
-
e.clientX >= n.left - Gn && e.clientX <= n.right + Gn && e.clientY >= n.top - Gn && e.clientY <= n.bottom + Gn || g(!1, x(Je, e));
|
|
1670
|
-
}
|
|
1671
|
-
z.start(0, () => {
|
|
1672
|
-
t.addEventListener("mouseup", n, { once: !0 });
|
|
1673
|
-
});
|
|
1674
|
-
}
|
|
1675
|
-
}, c, P), U = v.getValidationProps(C, H);
|
|
1676
|
-
U.role = "combobox";
|
|
1677
|
-
let se = {
|
|
1678
|
-
...f,
|
|
1679
|
-
open: w,
|
|
1680
|
-
disabled: C,
|
|
1681
|
-
value: T,
|
|
1682
|
-
readOnly: y,
|
|
1683
|
-
popupSide: N,
|
|
1684
|
-
placeholder: !M
|
|
1685
|
-
};
|
|
1686
|
-
return ue("button", e, {
|
|
1687
|
-
ref: [
|
|
1688
|
-
t,
|
|
1689
|
-
oe,
|
|
1690
|
-
I,
|
|
1691
|
-
L
|
|
1692
|
-
],
|
|
1693
|
-
state: se,
|
|
1694
|
-
stateAttributesMapping: qn,
|
|
1695
|
-
props: U
|
|
1696
|
-
});
|
|
1697
|
-
});
|
|
1698
|
-
process.env.NODE_ENV !== "production" && (Jn.displayName = "SelectTrigger");
|
|
1699
|
-
//#endregion
|
|
1700
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/value/SelectValue.mjs
|
|
1701
|
-
var Yn = { value: () => null }, Xn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1702
|
-
let { className: n, render: r, children: i, placeholder: a, style: o, ...s } = e, { store: c, valueRef: l } = wn(), u = X(c, $.value), d = X(c, $.items), f = X(c, $.itemToStringLabel), p = X(c, $.hasSelectedValue), m = !p && a != null && i == null, h = X(c, $.hasNullItemLabel, m), g = {
|
|
1703
|
-
value: u,
|
|
1704
|
-
placeholder: !p
|
|
1705
|
-
}, _ = null;
|
|
1706
|
-
return _ = typeof i == "function" ? i(u) : i ?? (!p && a != null && !h ? a : Array.isArray(u) ? Rn(u, d, f) : Ln(u, d, f)), ue("span", e, {
|
|
1707
|
-
state: g,
|
|
1708
|
-
ref: [t, l],
|
|
1709
|
-
props: [{ children: _ }, s],
|
|
1710
|
-
stateAttributesMapping: Yn
|
|
1711
|
-
});
|
|
1712
|
-
});
|
|
1713
|
-
process.env.NODE_ENV !== "production" && (Xn.displayName = "SelectValue");
|
|
1714
|
-
//#endregion
|
|
1715
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/portal/SelectPortalContext.mjs
|
|
1716
|
-
var Zn = /*#__PURE__*/ Z.createContext(void 0);
|
|
1717
|
-
process.env.NODE_ENV !== "production" && (Zn.displayName = "SelectPortalContext");
|
|
1718
|
-
//#endregion
|
|
1719
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/portal/SelectPortal.mjs
|
|
1720
|
-
var Qn = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1721
|
-
let { store: n } = wn(), r = X(n, $.mounted), i = X(n, $.forceMount);
|
|
1722
|
-
return r || i ? /*#__PURE__*/ (0, Q.jsx)(Zn.Provider, {
|
|
1723
|
-
value: !0,
|
|
1724
|
-
children: /*#__PURE__*/ (0, Q.jsx)(E, {
|
|
1725
|
-
ref: t,
|
|
1726
|
-
...e
|
|
1727
|
-
})
|
|
1728
|
-
}) : null;
|
|
1729
|
-
});
|
|
1730
|
-
process.env.NODE_ENV !== "production" && (Qn.displayName = "SelectPortal");
|
|
1731
|
-
//#endregion
|
|
1732
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs
|
|
1733
|
-
var $n = /*#__PURE__*/ Z.createContext(void 0);
|
|
1734
|
-
process.env.NODE_ENV !== "production" && ($n.displayName = "SelectPositionerContext");
|
|
1735
|
-
function er() {
|
|
1736
|
-
let e = Z.useContext($n);
|
|
1737
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ? U(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
|
|
1738
|
-
return e;
|
|
1739
|
-
}
|
|
1740
|
-
//#endregion
|
|
1741
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/popup/utils.mjs
|
|
1742
|
-
function tr(e, t) {
|
|
1743
|
-
e && Object.assign(e.style, t);
|
|
1744
|
-
}
|
|
1745
|
-
var nr = {
|
|
1746
|
-
position: "relative",
|
|
1747
|
-
maxHeight: "100%",
|
|
1748
|
-
overflowX: "hidden",
|
|
1749
|
-
overflowY: "auto"
|
|
1750
|
-
}, rr = { position: "fixed" }, ir = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1751
|
-
let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o = "bottom", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m, alignItemWithTrigger: g = !0, collisionAvoidance: _ = b, style: v, ...y } = e, { store: S, listRef: ee, labelsRef: C, alignItemWithTriggerActiveRef: w, selectedItemTextRef: te, valuesRef: T, initialValueRef: E, popupRef: D, setValue: O } = wn(), ne = Tn(), A = X(S, $.open), j = X(S, $.mounted), M = X(S, $.modal), N = X(S, $.value), re = X(S, $.openMethod), ie = X(S, $.positionerElement), ae = X(S, $.triggerElement), oe = X(S, $.isItemEqualToValue), P = X(S, $.transitionStatus), I = Z.useRef(null), L = Z.useRef(null), [R, z] = Z.useState(g), B = j && R && re !== "touch";
|
|
1752
|
-
!j && R !== g && z(g), k(() => {
|
|
1753
|
-
j || ($.scrollUpArrowVisible(S.state) && S.set("scrollUpArrowVisible", !1), $.scrollDownArrowVisible(S.state) && S.set("scrollDownArrowVisible", !1));
|
|
1754
|
-
}, [S, j]), Z.useImperativeHandle(w, () => B), rn((B || M) && A, re === "touch", ie, ae);
|
|
1755
|
-
let V = h({
|
|
1756
|
-
anchor: n,
|
|
1757
|
-
floatingRootContext: ne,
|
|
1758
|
-
positionMethod: r,
|
|
1759
|
-
mounted: j,
|
|
1760
|
-
side: o,
|
|
1761
|
-
sideOffset: c,
|
|
1762
|
-
align: s,
|
|
1763
|
-
alignOffset: l,
|
|
1764
|
-
arrowPadding: f,
|
|
1765
|
-
collisionBoundary: u,
|
|
1766
|
-
collisionPadding: d,
|
|
1767
|
-
sticky: p,
|
|
1768
|
-
disableAnchorTracking: m ?? B,
|
|
1769
|
-
collisionAvoidance: _,
|
|
1770
|
-
keepMounted: !0
|
|
1771
|
-
}), H = B ? "none" : V.side, U = B ? rr : V.positionerStyles, se = {
|
|
1772
|
-
open: A,
|
|
1773
|
-
side: H,
|
|
1774
|
-
align: V.align,
|
|
1775
|
-
anchorHidden: V.anchorHidden
|
|
1776
|
-
};
|
|
1777
|
-
k(() => {
|
|
1778
|
-
S.set("popupSide", V.side);
|
|
1779
|
-
}, [S, V.side]);
|
|
1780
|
-
let ce = Me(e, se, {
|
|
1781
|
-
styles: U,
|
|
1782
|
-
transitionStatus: P,
|
|
1783
|
-
props: y,
|
|
1784
|
-
refs: [t, J((e) => {
|
|
1785
|
-
S.set("positionerElement", e);
|
|
1786
|
-
})],
|
|
1787
|
-
hidden: !j,
|
|
1788
|
-
inert: !A
|
|
1789
|
-
}), le = Z.useRef(0), ue = J((e) => {
|
|
1790
|
-
if (e.size === 0 && le.current === 0 || T.current.length === 0) return;
|
|
1791
|
-
let t = le.current;
|
|
1792
|
-
if (le.current = e.size, e.size === t) return;
|
|
1793
|
-
let n = x(F);
|
|
1794
|
-
if (t !== 0 && !S.state.multiple && N !== null && An(T.current, N, oe) === -1) {
|
|
1795
|
-
let e = E.current, t = e != null && An(T.current, e, oe) !== -1 ? e : null;
|
|
1796
|
-
O(t, n), t === null && (S.set("selectedIndex", null), te.current = null);
|
|
1797
|
-
}
|
|
1798
|
-
if (t !== 0 && S.state.multiple && Array.isArray(N)) {
|
|
1799
|
-
let e = (e) => An(T.current, e, oe) !== -1, t = N.filter((t) => e(t));
|
|
1800
|
-
(t.length !== N.length || t.some((e) => !kn(N, e, oe))) && (O(t, n), t.length === 0 && (S.set("selectedIndex", null), te.current = null));
|
|
1801
|
-
}
|
|
1802
|
-
if (A && B) {
|
|
1803
|
-
S.update({
|
|
1804
|
-
scrollUpArrowVisible: !1,
|
|
1805
|
-
scrollDownArrowVisible: !1
|
|
1806
|
-
});
|
|
1807
|
-
let e = { height: "" };
|
|
1808
|
-
tr(ie, e), tr(D.current, e);
|
|
1809
|
-
}
|
|
1810
|
-
}), de = Z.useMemo(() => ({
|
|
1811
|
-
...V,
|
|
1812
|
-
side: H,
|
|
1813
|
-
alignItemWithTriggerActive: B,
|
|
1814
|
-
setControlledAlignItemWithTrigger: z,
|
|
1815
|
-
scrollUpArrowRef: I,
|
|
1816
|
-
scrollDownArrowRef: L
|
|
1817
|
-
}), [
|
|
1818
|
-
V,
|
|
1819
|
-
H,
|
|
1820
|
-
B,
|
|
1821
|
-
z
|
|
1822
|
-
]);
|
|
1823
|
-
return /*#__PURE__*/ (0, Q.jsx)(nt, {
|
|
1824
|
-
elementsRef: ee,
|
|
1825
|
-
labelsRef: C,
|
|
1826
|
-
onMapChange: ue,
|
|
1827
|
-
children: /*#__PURE__*/ (0, Q.jsxs)($n.Provider, {
|
|
1828
|
-
value: de,
|
|
1829
|
-
children: [j && M && /*#__PURE__*/ (0, Q.jsx)(Kt, {
|
|
1830
|
-
inert: Gt(!A),
|
|
1831
|
-
cutout: ae
|
|
1832
|
-
}), ce]
|
|
1833
|
-
})
|
|
1834
|
-
});
|
|
1835
|
-
});
|
|
1836
|
-
process.env.NODE_ENV !== "production" && (ir.displayName = "SelectPositioner");
|
|
1837
|
-
//#endregion
|
|
1838
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/utils/styles.mjs
|
|
1839
|
-
var ar = "base-ui-disable-scrollbar", or = {
|
|
1840
|
-
className: ar,
|
|
1841
|
-
getElement(e) {
|
|
1842
|
-
return /*#__PURE__*/ (0, Q.jsx)("style", {
|
|
1843
|
-
nonce: e,
|
|
1844
|
-
href: ar,
|
|
1845
|
-
precedence: "base-ui:low",
|
|
1846
|
-
children: `.${ar}{scrollbar-width:none}.${ar}::-webkit-scrollbar{display:none}`
|
|
1847
|
-
});
|
|
1848
|
-
}
|
|
1849
|
-
};
|
|
1850
|
-
process.env.NODE_ENV !== "production" && (or.getElement.displayName = "styleDisableScrollbar.getElement");
|
|
1851
|
-
//#endregion
|
|
1852
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
|
|
1853
|
-
var sr = /*#__PURE__*/ Z.createContext(void 0);
|
|
1854
|
-
process.env.NODE_ENV !== "production" && (sr.displayName = "CSPContext");
|
|
1855
|
-
var cr = { disableStyleElements: !1 };
|
|
1856
|
-
function lr() {
|
|
1857
|
-
return Z.useContext(sr) ?? cr;
|
|
1858
|
-
}
|
|
1859
|
-
//#endregion
|
|
1860
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/popup/SelectPopup.mjs
|
|
1861
|
-
var ur = {
|
|
1862
|
-
...Ie,
|
|
1863
|
-
...ke
|
|
1864
|
-
}, dr = /*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
1865
|
-
let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s, popupRef: l, onOpenChangeComplete: u, setOpen: d, valueRef: f, firstItemTextRef: p, selectedItemTextRef: h, multiple: g, handleScrollArrowVisibility: _, scrollHandlerRef: v, listRef: y, highlightItemOnHover: b } = wn(), { side: S, align: ee, alignItemWithTriggerActive: C, isPositioned: w, setControlledAlignItemWithTrigger: te } = er(), E = Wt(!0) != null, D = Tn(), O = oe(), { nonce: ne, disableStyleElements: A } = lr(), j = X(s, $.id), M = X(s, $.open), N = X(s, $.openMethod), re = X(s, $.mounted), ie = X(s, $.popupProps), ae = X(s, $.transitionStatus), P = X(s, $.triggerElement), F = X(s, $.positionerElement), I = X(s, $.listElement), R = Z.useRef(!1), z = Z.useRef(!1), B = Z.useRef({}), V = xe(), H = J((e) => {
|
|
1866
|
-
if (!F || !l.current || !z.current) return;
|
|
1867
|
-
if (R.current || !C) {
|
|
1868
|
-
_();
|
|
1869
|
-
return;
|
|
1870
|
-
}
|
|
1871
|
-
let t = F.style.top === "0px", n = F.style.bottom === "0px";
|
|
1872
|
-
if (!t && !n) {
|
|
1873
|
-
_();
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
let r = mr(F), i = hr(F.getBoundingClientRect().height, "y", r), a = Oe(F), o = T(F), s = o.getComputedStyle(F), c = parseFloat(s.marginTop), u = parseFloat(s.marginBottom), d = fr(o.getComputedStyle(l.current)), f = Math.min(a.documentElement.clientHeight - c - u, d), p = e.scrollTop, m = pr(e), h = 0, g = null, v = !1, y = !1, b = (e) => {
|
|
1877
|
-
F.style.height = `${e}px`;
|
|
1878
|
-
}, x = (t, n) => {
|
|
1879
|
-
let r = Bn(t, 0, f - i);
|
|
1880
|
-
r > 0 && b(i + r), e.scrollTop = n, f - (i + r) <= 1 && (R.current = !0), _();
|
|
1881
|
-
}, S = t ? m - p : p, ee = Math.min(i + S, f);
|
|
1882
|
-
if (h = ee, S <= 1) {
|
|
1883
|
-
x(S, t ? m : 0);
|
|
1884
|
-
return;
|
|
1885
|
-
}
|
|
1886
|
-
if (f - ee > 1 ? t ? y = !0 : g = 0 : (v = !0, n && p < m && (g = p - (S - (i + S - f)))), h = Math.ceil(h), h !== 0 && b(h), y || g != null) {
|
|
1887
|
-
let t = pr(e), n = y ? t : Bn(g, 0, t);
|
|
1888
|
-
Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
|
|
1889
|
-
}
|
|
1890
|
-
(v || h >= f - 1) && (R.current = !0), _();
|
|
1891
|
-
});
|
|
1892
|
-
Z.useImperativeHandle(v, () => H, [H]), c({
|
|
1893
|
-
open: M,
|
|
1894
|
-
ref: l,
|
|
1895
|
-
onComplete() {
|
|
1896
|
-
M && u?.(!0);
|
|
1897
|
-
}
|
|
1898
|
-
});
|
|
1899
|
-
let U = {
|
|
1900
|
-
open: M,
|
|
1901
|
-
transitionStatus: ae,
|
|
1902
|
-
side: S,
|
|
1903
|
-
align: ee
|
|
1904
|
-
};
|
|
1905
|
-
k(() => {
|
|
1906
|
-
!F || !l.current || Object.keys(B.current).length || (B.current = {
|
|
1907
|
-
top: F.style.top || "0",
|
|
1908
|
-
left: F.style.left || "0",
|
|
1909
|
-
right: F.style.right,
|
|
1910
|
-
height: F.style.height,
|
|
1911
|
-
bottom: F.style.bottom,
|
|
1912
|
-
minHeight: F.style.minHeight,
|
|
1913
|
-
maxHeight: F.style.maxHeight,
|
|
1914
|
-
marginTop: F.style.marginTop,
|
|
1915
|
-
marginBottom: F.style.marginBottom
|
|
1916
|
-
});
|
|
1917
|
-
}, [l, F]), k(() => {
|
|
1918
|
-
M || C || (z.current = !1, R.current = !1, tr(F, B.current));
|
|
1919
|
-
}, [
|
|
1920
|
-
M,
|
|
1921
|
-
C,
|
|
1922
|
-
F,
|
|
1923
|
-
l
|
|
1924
|
-
]), k(() => {
|
|
1925
|
-
let e = l.current;
|
|
1926
|
-
if (!M || !P || !F || !e || C && !w || s.state.transitionStatus === "ending") return;
|
|
1927
|
-
if (!C) {
|
|
1928
|
-
z.current = !0, V.request(_), e.style.removeProperty("--transform-origin");
|
|
1929
|
-
return;
|
|
1930
|
-
}
|
|
1931
|
-
let t = vr(e);
|
|
1932
|
-
e.style.removeProperty("--transform-origin");
|
|
1933
|
-
try {
|
|
1934
|
-
let t = h.current;
|
|
1935
|
-
t?.isConnected || (t = !$.hasSelectedValue(s.state) && p.current?.isConnected ? p.current : null);
|
|
1936
|
-
let n = f.current, r = T(F), i = r.getComputedStyle(F), a = r.getComputedStyle(e), o = Oe(P), c = mr(P), l = gr(P.getBoundingClientRect(), c), u = gr(F.getBoundingClientRect(), c), d = l.height, g = I || e, v = g.scrollHeight, x = parseFloat(a.borderBottomWidth), S = parseFloat(i.marginTop) || 10, ee = parseFloat(i.marginBottom) || 10, C = parseFloat(i.minHeight) || 100, w = fr(a), E = o.documentElement.clientHeight - S - ee, D = o.documentElement.clientWidth, ne = E - l.bottom + d, k, A = O === "rtl" ? l.right - u.width : l.left, j = 0;
|
|
1937
|
-
if (t && n) {
|
|
1938
|
-
let e = gr(n.getBoundingClientRect(), c);
|
|
1939
|
-
k = gr(t.getBoundingClientRect(), c), A = u.left + (O === "rtl" ? e.right - k.right : e.left - k.left);
|
|
1940
|
-
let r = e.top - l.top + e.height / 2;
|
|
1941
|
-
j = k.top - u.top + k.height / 2 - r;
|
|
1942
|
-
}
|
|
1943
|
-
let M = ne + j + ee + x, N = Math.min(E, M), re = E - S - ee, ie = M - N, ae = D - 5;
|
|
1944
|
-
F.style.left = `${Bn(A, 5, ae - u.width)}px`, F.style.height = `${N}px`, F.style.maxHeight = "none", F.style.marginTop = `${S}px`, F.style.marginBottom = `${ee}px`, e.style.height = "100%";
|
|
1945
|
-
let oe = pr(g), L = ie >= oe - 1;
|
|
1946
|
-
L && (N = Math.min(E, u.height) - (ie - oe));
|
|
1947
|
-
let V = l.top < 20 || l.bottom > E - 20 || Math.ceil(N) + 1 < Math.min(v, C), H = (r.visualViewport?.scale ?? 1) !== 1 && m;
|
|
1948
|
-
if (V || H) {
|
|
1949
|
-
z.current = !0, tr(F, B.current), te(!1);
|
|
1950
|
-
return;
|
|
1951
|
-
}
|
|
1952
|
-
let U = Math.max(C, N);
|
|
1953
|
-
if (L) {
|
|
1954
|
-
let e = Math.max(0, E - M);
|
|
1955
|
-
F.style.top = u.height >= re ? "0" : `${e}px`, F.style.height = `${N}px`, g.scrollTop = pr(g);
|
|
1956
|
-
} else F.style.bottom = "0", g.scrollTop = ie;
|
|
1957
|
-
if (k) {
|
|
1958
|
-
let t = u.top, n = u.height, r = k.top + k.height / 2, i = Bn(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
|
|
1959
|
-
e.style.setProperty("--transform-origin", `50% ${i}%`);
|
|
1960
|
-
}
|
|
1961
|
-
(U === E || N >= w) && (R.current = !0), _(), b && s.state.selectedIndex === null && s.state.activeIndex === null && y.current[0] != null && s.set("activeIndex", 0), z.current = !0;
|
|
1962
|
-
} finally {
|
|
1963
|
-
t();
|
|
1964
|
-
}
|
|
1965
|
-
}, [
|
|
1966
|
-
s,
|
|
1967
|
-
M,
|
|
1968
|
-
F,
|
|
1969
|
-
P,
|
|
1970
|
-
f,
|
|
1971
|
-
p,
|
|
1972
|
-
h,
|
|
1973
|
-
l,
|
|
1974
|
-
_,
|
|
1975
|
-
C,
|
|
1976
|
-
te,
|
|
1977
|
-
V,
|
|
1978
|
-
I,
|
|
1979
|
-
y,
|
|
1980
|
-
b,
|
|
1981
|
-
O,
|
|
1982
|
-
w
|
|
1983
|
-
]), Z.useEffect(() => {
|
|
1984
|
-
if (!C || !F || !M) return;
|
|
1985
|
-
let e = T(F);
|
|
1986
|
-
function t(e) {
|
|
1987
|
-
d(!1, x(Ve, e));
|
|
1988
|
-
}
|
|
1989
|
-
return we(e, "resize", t);
|
|
1990
|
-
}, [
|
|
1991
|
-
d,
|
|
1992
|
-
C,
|
|
1993
|
-
F,
|
|
1994
|
-
M
|
|
1995
|
-
]);
|
|
1996
|
-
let se = {
|
|
1997
|
-
...I ? {
|
|
1998
|
-
role: "presentation",
|
|
1999
|
-
"aria-orientation": void 0
|
|
2000
|
-
} : {
|
|
2001
|
-
role: "listbox",
|
|
2002
|
-
"aria-multiselectable": g || void 0,
|
|
2003
|
-
id: `${j}-list`
|
|
2004
|
-
},
|
|
2005
|
-
onKeyDown(e) {
|
|
2006
|
-
E && et.has(e.key) && e.stopPropagation();
|
|
2007
|
-
},
|
|
2008
|
-
onScroll(e) {
|
|
2009
|
-
I || H(e.currentTarget);
|
|
2010
|
-
},
|
|
2011
|
-
...C && { style: I ? { height: "100%" } : nr }
|
|
2012
|
-
}, ce = ue("div", e, {
|
|
2013
|
-
ref: [t, l],
|
|
2014
|
-
state: U,
|
|
2015
|
-
stateAttributesMapping: ur,
|
|
2016
|
-
props: [
|
|
2017
|
-
ie,
|
|
2018
|
-
se,
|
|
2019
|
-
L(ae),
|
|
2020
|
-
{ className: !I && C ? or.className : void 0 },
|
|
2021
|
-
o
|
|
2022
|
-
]
|
|
2023
|
-
});
|
|
2024
|
-
return /*#__PURE__*/ (0, Q.jsxs)(Z.Fragment, { children: [!A && or.getElement(ne), /*#__PURE__*/ (0, Q.jsx)(Nt, {
|
|
2025
|
-
context: D,
|
|
2026
|
-
modal: !1,
|
|
2027
|
-
disabled: !re,
|
|
2028
|
-
openInteractionType: N,
|
|
2029
|
-
returnFocus: a,
|
|
2030
|
-
restoreFocus: !0,
|
|
2031
|
-
children: ce
|
|
2032
|
-
})] });
|
|
2033
|
-
});
|
|
2034
|
-
process.env.NODE_ENV !== "production" && (dr.displayName = "SelectPopup");
|
|
2035
|
-
function fr(e) {
|
|
2036
|
-
let t = e.maxHeight || "";
|
|
2037
|
-
return t.endsWith("px") && parseFloat(t) || Infinity;
|
|
2038
|
-
}
|
|
2039
|
-
function pr(e) {
|
|
2040
|
-
return Vn(e.scrollHeight, e.clientHeight);
|
|
2041
|
-
}
|
|
2042
|
-
function mr(e) {
|
|
2043
|
-
return u.getScale(e);
|
|
2044
|
-
}
|
|
2045
|
-
function hr(e, t, n) {
|
|
2046
|
-
return e / n[t];
|
|
2047
|
-
}
|
|
2048
|
-
function gr(e, t) {
|
|
2049
|
-
return Te({
|
|
2050
|
-
x: hr(e.x, "x", t),
|
|
2051
|
-
y: hr(e.y, "y", t),
|
|
2052
|
-
width: hr(e.width, "x", t),
|
|
2053
|
-
height: hr(e.height, "y", t)
|
|
2054
|
-
});
|
|
2055
|
-
}
|
|
2056
|
-
var _r = [
|
|
2057
|
-
["transform", "none"],
|
|
2058
|
-
["scale", "1"],
|
|
2059
|
-
["translate", "0 0"]
|
|
2060
|
-
];
|
|
2061
|
-
function vr(e) {
|
|
2062
|
-
let { style: t } = e, n = {};
|
|
2063
|
-
for (let [e, r] of _r) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
|
|
2064
|
-
return () => {
|
|
2065
|
-
for (let [e] of _r) {
|
|
2066
|
-
let r = n[e];
|
|
2067
|
-
r ? t.setProperty(e, r) : t.removeProperty(e);
|
|
2068
|
-
}
|
|
2069
|
-
};
|
|
2070
|
-
}
|
|
2071
|
-
//#endregion
|
|
2072
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/item/SelectItemContext.mjs
|
|
2073
|
-
var yr = /*#__PURE__*/ Z.createContext(void 0);
|
|
2074
|
-
process.env.NODE_ENV !== "production" && (yr.displayName = "SelectItemContext");
|
|
2075
|
-
function br() {
|
|
2076
|
-
let e = Z.useContext(yr);
|
|
2077
|
-
if (!e) throw Error(process.env.NODE_ENV === "production" ? U(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
|
|
2078
|
-
return e;
|
|
2079
|
-
}
|
|
2080
|
-
//#endregion
|
|
2081
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/item/SelectItem.mjs
|
|
2082
|
-
var xr = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
2083
|
-
let { render: n, className: r, style: i, value: a = null, label: o, disabled: s = !1, nativeButton: c = !1, ...l } = e, u = Z.useRef(null), d = $e({
|
|
2084
|
-
label: o,
|
|
2085
|
-
textRef: u,
|
|
2086
|
-
indexGuessBehavior: it.GuessFromOrder
|
|
2087
|
-
}), { store: f, itemProps: p, setOpen: m, setValue: h, selectionRef: g, typingRef: v, valuesRef: y, multiple: b, selectedItemTextRef: S, disabled: ee, readOnly: C } = wn(), w = X(f, $.isActive, d.index), te = X(f, $.open), T = X(f, $.isSelected, a), E = X(f, $.isSelectedByFocus, d.index), D = X(f, $.isItemEqualToValue), O = d.index, ne = O !== -1, A = Z.useRef(null);
|
|
2088
|
-
k(() => {
|
|
2089
|
-
if (!ne) return;
|
|
2090
|
-
let e = y.current;
|
|
2091
|
-
return e[O] = a, () => {
|
|
2092
|
-
delete e[O];
|
|
2093
|
-
};
|
|
2094
|
-
}, [
|
|
2095
|
-
ne,
|
|
2096
|
-
O,
|
|
2097
|
-
a,
|
|
2098
|
-
y
|
|
2099
|
-
]), k(() => {
|
|
2100
|
-
if (!ne) return;
|
|
2101
|
-
let e = f.state.value, t = e;
|
|
2102
|
-
b && Array.isArray(e) && (t = e.length > 0 ? e[e.length - 1] : void 0), t !== void 0 && On(a, t, D) && (f.set("selectedIndex", O), u.current && (S.current = u.current));
|
|
2103
|
-
}, [
|
|
2104
|
-
ne,
|
|
2105
|
-
O,
|
|
2106
|
-
b,
|
|
2107
|
-
D,
|
|
2108
|
-
f,
|
|
2109
|
-
a,
|
|
2110
|
-
S
|
|
2111
|
-
]);
|
|
2112
|
-
let j = Z.useRef(null), M = Z.useRef("mouse"), N = Z.useRef(!1), { getButtonProps: re, buttonRef: ie } = B({
|
|
2113
|
-
disabled: s,
|
|
2114
|
-
focusableWhenDisabled: !0,
|
|
2115
|
-
native: c,
|
|
2116
|
-
composite: !0
|
|
2117
|
-
}), ae = {
|
|
2118
|
-
disabled: s,
|
|
2119
|
-
selected: T,
|
|
2120
|
-
highlighted: w
|
|
2121
|
-
};
|
|
2122
|
-
function oe(e) {
|
|
2123
|
-
if (ee || C) return;
|
|
2124
|
-
let t = f.state.value;
|
|
2125
|
-
if (b) {
|
|
2126
|
-
let n = Array.isArray(t) ? t : [];
|
|
2127
|
-
h(T ? jn(n, a, D) : [...n, a], x(_, e));
|
|
2128
|
-
} else h(a, x(_, e)), m(!1, x(_, e));
|
|
2129
|
-
}
|
|
2130
|
-
function P() {
|
|
2131
|
-
g.current.dragY = 0;
|
|
2132
|
-
}
|
|
2133
|
-
let F = {
|
|
2134
|
-
role: "option",
|
|
2135
|
-
"aria-selected": T,
|
|
2136
|
-
tabIndex: te && w ? 0 : -1,
|
|
2137
|
-
onKeyDown(e) {
|
|
2138
|
-
j.current = e.key, f.set("activeIndex", O), e.key === " " && v.current && e.preventDefault();
|
|
2139
|
-
},
|
|
2140
|
-
onClick(e) {
|
|
2141
|
-
let t = e.type === "click" && M.current !== "touch", n = e.nativeEvent.pointerType, r = t && Ge(e.nativeEvent) && (n !== void 0 || w), i = t && !r && !N.current;
|
|
2142
|
-
N.current = !1, !(e.type === "keydown" && j.current === null) && (s || e.type === "keydown" && j.current === " " && v.current || i || (j.current = null, oe(e.nativeEvent)));
|
|
2143
|
-
},
|
|
2144
|
-
onPointerEnter(e) {
|
|
2145
|
-
M.current = e.pointerType;
|
|
2146
|
-
},
|
|
2147
|
-
onPointerMove(e) {
|
|
2148
|
-
if (e.pointerType === "mouse" && e.buttons === 1) {
|
|
2149
|
-
let t = g.current;
|
|
2150
|
-
t.dragY += e.movementY, t.dragY ** 2 >= 64 && (t.allowUnselectedMouseUp = !0);
|
|
2151
|
-
}
|
|
2152
|
-
},
|
|
2153
|
-
onPointerDown(e) {
|
|
2154
|
-
M.current = e.pointerType, N.current = !0, P();
|
|
2155
|
-
},
|
|
2156
|
-
onMouseUp() {
|
|
2157
|
-
if (P(), s || M.current === "touch" || N.current) return;
|
|
2158
|
-
let e = !g.current.allowSelectedMouseUp && T, t = !g.current.allowUnselectedMouseUp && !T;
|
|
2159
|
-
e || t || (N.current = !0, A.current?.click(), N.current = !1);
|
|
2160
|
-
}
|
|
2161
|
-
}, I = ue("div", e, {
|
|
2162
|
-
ref: [
|
|
2163
|
-
ie,
|
|
2164
|
-
t,
|
|
2165
|
-
d.ref,
|
|
2166
|
-
A
|
|
2167
|
-
],
|
|
2168
|
-
state: ae,
|
|
2169
|
-
props: [
|
|
2170
|
-
p,
|
|
2171
|
-
F,
|
|
2172
|
-
l,
|
|
2173
|
-
re
|
|
2174
|
-
]
|
|
2175
|
-
}), L = Z.useMemo(() => ({
|
|
2176
|
-
selected: T,
|
|
2177
|
-
index: O,
|
|
2178
|
-
textRef: u,
|
|
2179
|
-
selectedByFocus: E,
|
|
2180
|
-
hasRegistered: ne
|
|
2181
|
-
}), [
|
|
2182
|
-
T,
|
|
2183
|
-
O,
|
|
2184
|
-
u,
|
|
2185
|
-
E,
|
|
2186
|
-
ne
|
|
2187
|
-
]);
|
|
2188
|
-
return /*#__PURE__*/ (0, Q.jsx)(yr.Provider, {
|
|
2189
|
-
value: L,
|
|
2190
|
-
children: I
|
|
2191
|
-
});
|
|
2192
|
-
}));
|
|
2193
|
-
process.env.NODE_ENV !== "production" && (xr.displayName = "SelectItem");
|
|
2194
|
-
//#endregion
|
|
2195
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/select/item-text/SelectItemText.mjs
|
|
2196
|
-
var Sr = /*#__PURE__*/ Z.memo(/*#__PURE__*/ Z.forwardRef(function(e, t) {
|
|
2197
|
-
let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = br(), { firstItemTextRef: o, selectedItemTextRef: s } = wn(), { render: c, className: l, style: u, ...d } = e;
|
|
2198
|
-
return ue("div", e, {
|
|
2199
|
-
ref: [
|
|
2200
|
-
Z.useCallback((e) => {
|
|
2201
|
-
e && (a && n === 0 && (o.current = e), a && i && (s.current = e));
|
|
2202
|
-
}, [
|
|
2203
|
-
o,
|
|
2204
|
-
s,
|
|
2205
|
-
n,
|
|
2206
|
-
i,
|
|
2207
|
-
a
|
|
2208
|
-
]),
|
|
2209
|
-
t,
|
|
2210
|
-
r
|
|
2211
|
-
],
|
|
2212
|
-
props: d
|
|
2213
|
-
});
|
|
2214
|
-
}));
|
|
2215
|
-
process.env.NODE_ENV !== "production" && (Sr.displayName = "SelectItemText");
|
|
2216
|
-
//#endregion
|
|
2217
|
-
//#region src/client/components/ui/select.tsx
|
|
2218
|
-
var Cr = (0, Z.createContext)(null);
|
|
2219
|
-
function wr() {
|
|
2220
|
-
let e = (0, Z.useContext)(Cr);
|
|
2221
|
-
if (!e) throw Error("Select compound components must be inside <Select>");
|
|
2222
|
-
return e;
|
|
2223
|
-
}
|
|
2224
|
-
var Tr = (0, Z.createContext)(null);
|
|
2225
|
-
function Er(e, t = []) {
|
|
2226
|
-
return Z.Children.forEach(e, (e) => {
|
|
2227
|
-
if (!(0, Z.isValidElement)(e)) return;
|
|
2228
|
-
let n = e.props;
|
|
2229
|
-
typeof n.value == "string" ? t.push({
|
|
2230
|
-
value: n.value,
|
|
2231
|
-
label: n.label ?? (typeof n.children == "string" ? n.children : n.value)
|
|
2232
|
-
}) : n.children && Er(n.children, t);
|
|
2233
|
-
}), t;
|
|
2234
|
-
}
|
|
2235
|
-
function Dr({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: i = !1, name: a, required: o }) {
|
|
2236
|
-
let [s, c] = (0, Z.useState)(n ?? ""), [l, u] = (0, Z.useState)(!1), d = (0, Z.useRef)(null), f = t === void 0 ? s : t, p = (0, Z.useMemo)(() => Er(e), [e]), m = (0, Z.useCallback)((e) => {
|
|
2237
|
-
let n = e ?? "";
|
|
2238
|
-
t === void 0 && c(n), r?.(n);
|
|
2239
|
-
}, [t, r]), h = (0, Z.useMemo)(() => ({
|
|
2240
|
-
value: f,
|
|
2241
|
-
open: l,
|
|
2242
|
-
actionsRef: d
|
|
2243
|
-
}), [f, l]);
|
|
2244
|
-
return /* @__PURE__ */ (0, Q.jsx)(Cr.Provider, {
|
|
2245
|
-
value: h,
|
|
2246
|
-
children: /* @__PURE__ */ (0, Q.jsx)(Un, {
|
|
2247
|
-
value: f === "" ? null : f,
|
|
2248
|
-
onValueChange: m,
|
|
2249
|
-
open: l,
|
|
2250
|
-
onOpenChange: u,
|
|
2251
|
-
actionsRef: d,
|
|
2252
|
-
items: p,
|
|
2253
|
-
disabled: i,
|
|
2254
|
-
name: a,
|
|
2255
|
-
required: o,
|
|
2256
|
-
modal: !1,
|
|
2257
|
-
children: e
|
|
2258
|
-
})
|
|
2259
|
-
});
|
|
2260
|
-
}
|
|
2261
|
-
Dr.displayName = "Select";
|
|
2262
|
-
var Or = Ye([
|
|
2263
|
-
"group inline-flex items-center justify-between gap-2 outline-none cursor-pointer",
|
|
2264
|
-
"text-[13px] h-9 px-3 min-w-[160px]",
|
|
2265
|
-
"transition-all duration-80",
|
|
2266
|
-
"disabled:opacity-50 disabled:pointer-events-none",
|
|
2267
|
-
"focus-visible:ring-1 focus-visible:ring-[color:var(--focus-ring,#6B97FF)]"
|
|
2268
|
-
], {
|
|
2269
|
-
variants: { variant: {
|
|
2270
|
-
bordered: "border border-border bg-transparent text-foreground hover:bg-hover",
|
|
2271
|
-
borderless: "border border-transparent bg-transparent text-foreground hover:bg-hover"
|
|
2272
|
-
} },
|
|
2273
|
-
defaultVariants: { variant: "bordered" }
|
|
2274
|
-
}), kr = (0, Z.forwardRef)(({ className: e, variant: t, icon: n, leading: r, placeholder: i = "Select…", error: a, ...o }, s) => {
|
|
2275
|
-
let c = y();
|
|
2276
|
-
return /* @__PURE__ */ (0, Q.jsxs)("div", {
|
|
2277
|
-
className: "flex flex-col gap-1",
|
|
2278
|
-
children: [/* @__PURE__ */ (0, Q.jsxs)(Jn, {
|
|
2279
|
-
ref: s,
|
|
2280
|
-
"aria-invalid": !!a || void 0,
|
|
2281
|
-
className: O(Or({ variant: t }), c.input, a && "border-destructive/50 hover:border-destructive/50", e),
|
|
2282
|
-
...o,
|
|
2283
|
-
children: [/* @__PURE__ */ (0, Q.jsxs)("span", {
|
|
2284
|
-
className: "flex items-center gap-2 min-w-0 flex-1",
|
|
2285
|
-
children: [
|
|
2286
|
-
r,
|
|
2287
|
-
!r && n && /* @__PURE__ */ (0, Q.jsx)(n, {
|
|
2288
|
-
size: 16,
|
|
2289
|
-
strokeWidth: 1.5,
|
|
2290
|
-
className: "shrink-0 text-muted-foreground transition-[color,stroke-width] duration-80 group-hover:text-foreground group-hover:stroke-[2]"
|
|
2291
|
-
}),
|
|
2292
|
-
/* @__PURE__ */ (0, Q.jsx)(Xn, {
|
|
2293
|
-
placeholder: i,
|
|
2294
|
-
className: "min-w-0 flex-1 text-left truncate [text-box:trim-both_cap_alphabetic] py-1 -my-1 data-[placeholder]:text-muted-foreground"
|
|
2295
|
-
})
|
|
2296
|
-
]
|
|
2297
|
-
}), /* @__PURE__ */ (0, Q.jsx)("svg", {
|
|
2298
|
-
width: 16,
|
|
2299
|
-
height: 16,
|
|
2300
|
-
viewBox: "0 0 24 24",
|
|
2301
|
-
fill: "none",
|
|
2302
|
-
stroke: "currentColor",
|
|
2303
|
-
strokeWidth: 2,
|
|
2304
|
-
strokeLinecap: "round",
|
|
2305
|
-
strokeLinejoin: "round",
|
|
2306
|
-
className: "shrink-0 text-muted-foreground transition-colors duration-80 group-hover:text-foreground",
|
|
2307
|
-
children: /* @__PURE__ */ (0, Q.jsx)("path", { d: "M6 9l6 6 6-6" })
|
|
2308
|
-
})]
|
|
2309
|
-
}), a && /* @__PURE__ */ (0, Q.jsx)("span", {
|
|
2310
|
-
className: "text-[12px] text-destructive pl-3",
|
|
2311
|
-
children: a
|
|
2312
|
-
})]
|
|
2313
|
-
});
|
|
2314
|
-
});
|
|
2315
|
-
kr.displayName = "SelectTrigger";
|
|
2316
|
-
var Ar = (0, Z.forwardRef)(({ className: e, children: t }, n) => {
|
|
2317
|
-
let { open: r, value: i, actionsRef: a } = wr(), o = y(), s = (0, Z.useRef)(null), { activeIndex: c, setActiveIndex: l, itemRects: u, sessionRef: d, handlers: f, registerItem: p, measureItems: m } = mn(s), [h, g] = (0, Z.useState)(null), [_, v] = (0, Z.useState)(void 0);
|
|
2318
|
-
(0, Z.useEffect)(() => {
|
|
2319
|
-
if (r) return;
|
|
2320
|
-
let e = setTimeout(() => a.current?.unmount(), De(Le.fast));
|
|
2321
|
-
return () => clearTimeout(e);
|
|
2322
|
-
}, [r, a]), (0, Z.useEffect)(() => {
|
|
2323
|
-
if (!r) return;
|
|
2324
|
-
let e, t = requestAnimationFrame(() => {
|
|
2325
|
-
e = requestAnimationFrame(() => {
|
|
2326
|
-
m();
|
|
2327
|
-
let e = s.current;
|
|
2328
|
-
if (e) {
|
|
2329
|
-
let t = Array.from(e.querySelectorAll("[data-proximity-index]")).findIndex((e) => e.getAttribute("data-value") === i);
|
|
2330
|
-
v(t === -1 ? void 0 : t);
|
|
2331
|
-
}
|
|
2332
|
-
});
|
|
2333
|
-
});
|
|
2334
|
-
return () => {
|
|
2335
|
-
cancelAnimationFrame(t), cancelAnimationFrame(e);
|
|
2336
|
-
};
|
|
2337
|
-
}, [
|
|
2338
|
-
r,
|
|
2339
|
-
m,
|
|
2340
|
-
i
|
|
2341
|
-
]);
|
|
2342
|
-
let b = c === null ? null : u[c], x = _ == null ? null : u[_], S = h === null ? null : u[h], ee = c !== null && c !== _, C = (0, Z.useMemo)(() => ({
|
|
2343
|
-
registerItem: p,
|
|
2344
|
-
activeIndex: c,
|
|
2345
|
-
checkedIndex: _
|
|
2346
|
-
}), [
|
|
2347
|
-
p,
|
|
2348
|
-
c,
|
|
2349
|
-
_
|
|
2350
|
-
]);
|
|
2351
|
-
return /* @__PURE__ */ (0, Q.jsx)(Qn, { children: /* @__PURE__ */ (0, Q.jsx)(ir, {
|
|
2352
|
-
side: "bottom",
|
|
2353
|
-
align: "start",
|
|
2354
|
-
sideOffset: 6,
|
|
2355
|
-
alignItemWithTrigger: !1,
|
|
2356
|
-
className: "z-50 outline-none",
|
|
2357
|
-
children: /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2358
|
-
initial: {
|
|
2359
|
-
opacity: 0,
|
|
2360
|
-
y: -4,
|
|
2361
|
-
scaleY: .96
|
|
2362
|
-
},
|
|
2363
|
-
animate: r ? {
|
|
2364
|
-
opacity: 1,
|
|
2365
|
-
y: 0,
|
|
2366
|
-
scaleY: 1
|
|
2367
|
-
} : {
|
|
2368
|
-
opacity: 0,
|
|
2369
|
-
y: -4,
|
|
2370
|
-
scaleY: .96
|
|
2371
|
-
},
|
|
2372
|
-
transition: r ? Le.fast : Le.fast.exit,
|
|
2373
|
-
style: { transformOrigin: "top center" },
|
|
2374
|
-
onAnimationComplete: () => {
|
|
2375
|
-
r || a.current?.unmount();
|
|
2376
|
-
},
|
|
2377
|
-
children: /* @__PURE__ */ (0, Q.jsx)(Tr.Provider, {
|
|
2378
|
-
value: C,
|
|
2379
|
-
children: /* @__PURE__ */ (0, Q.jsxs)(dr, {
|
|
2380
|
-
render: /* @__PURE__ */ (0, Q.jsx)(xn, {
|
|
2381
|
-
offset: 2,
|
|
2382
|
-
shadowLevel: 3,
|
|
2383
|
-
ref: (e) => {
|
|
2384
|
-
s.current = e, typeof n == "function" ? n(e) : n && (n.current = e);
|
|
2385
|
-
}
|
|
2386
|
-
}),
|
|
2387
|
-
onMouseEnter: () => {
|
|
2388
|
-
f.onMouseEnter(), g(null);
|
|
2389
|
-
},
|
|
2390
|
-
onMouseMove: f.onMouseMove,
|
|
2391
|
-
onMouseLeave: f.onMouseLeave,
|
|
2392
|
-
onFocus: (e) => {
|
|
2393
|
-
let t = e.target.closest("[data-proximity-index]")?.getAttribute("data-proximity-index");
|
|
2394
|
-
if (t != null) {
|
|
2395
|
-
let n = Number(t);
|
|
2396
|
-
l(n), g(e.target.matches(":focus-visible") ? n : null);
|
|
2397
|
-
}
|
|
2398
|
-
},
|
|
2399
|
-
onBlur: (e) => {
|
|
2400
|
-
s.current?.contains(e.relatedTarget) || (g(null), l(null));
|
|
2401
|
-
},
|
|
2402
|
-
className: O(`relative flex flex-col gap-0.5 min-w-[var(--anchor-width)] max-h-[min(300px,var(--available-height))] overflow-y-auto ${o.container} p-1 select-none outline-none`, e),
|
|
2403
|
-
children: [
|
|
2404
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: x && /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2405
|
-
className: `absolute ${o.bg} bg-active pointer-events-none`,
|
|
2406
|
-
initial: !1,
|
|
2407
|
-
animate: {
|
|
2408
|
-
top: x.top,
|
|
2409
|
-
left: x.left,
|
|
2410
|
-
width: x.width,
|
|
2411
|
-
height: x.height,
|
|
2412
|
-
opacity: ee ? .8 : 1
|
|
2413
|
-
},
|
|
2414
|
-
exit: {
|
|
2415
|
-
opacity: 0,
|
|
2416
|
-
transition: Le.moderate.exit
|
|
2417
|
-
},
|
|
2418
|
-
transition: {
|
|
2419
|
-
...Le.moderate,
|
|
2420
|
-
opacity: { duration: .08 }
|
|
2421
|
-
}
|
|
2422
|
-
}) }),
|
|
2423
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: b && /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2424
|
-
className: `absolute ${o.bg} bg-hover pointer-events-none`,
|
|
2425
|
-
initial: {
|
|
2426
|
-
opacity: 0,
|
|
2427
|
-
top: x?.top ?? b.top,
|
|
2428
|
-
left: x?.left ?? b.left,
|
|
2429
|
-
width: x?.width ?? b.width,
|
|
2430
|
-
height: x?.height ?? b.height
|
|
2431
|
-
},
|
|
2432
|
-
animate: {
|
|
2433
|
-
opacity: 1,
|
|
2434
|
-
top: b.top,
|
|
2435
|
-
left: b.left,
|
|
2436
|
-
width: b.width,
|
|
2437
|
-
height: b.height
|
|
2438
|
-
},
|
|
2439
|
-
exit: {
|
|
2440
|
-
opacity: 0,
|
|
2441
|
-
transition: Le.fast.exit
|
|
2442
|
-
},
|
|
2443
|
-
transition: {
|
|
2444
|
-
...Le.fast,
|
|
2445
|
-
opacity: { duration: .08 }
|
|
2446
|
-
}
|
|
2447
|
-
}, d.current) }),
|
|
2448
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: S && /* @__PURE__ */ (0, Q.jsx)(W.div, {
|
|
2449
|
-
className: `absolute ${o.focusRing} pointer-events-none z-20 border border-[color:var(--focus-ring,#6B97FF)]`,
|
|
2450
|
-
initial: !1,
|
|
2451
|
-
animate: {
|
|
2452
|
-
left: S.left - 2,
|
|
2453
|
-
top: S.top - 2,
|
|
2454
|
-
width: S.width + 4,
|
|
2455
|
-
height: S.height + 4
|
|
2456
|
-
},
|
|
2457
|
-
exit: {
|
|
2458
|
-
opacity: 0,
|
|
2459
|
-
transition: Le.fast.exit
|
|
2460
|
-
},
|
|
2461
|
-
transition: {
|
|
2462
|
-
...Le.fast,
|
|
2463
|
-
opacity: { duration: .08 }
|
|
2464
|
-
}
|
|
2465
|
-
}) }),
|
|
2466
|
-
t
|
|
2467
|
-
]
|
|
2468
|
-
})
|
|
2469
|
-
})
|
|
2470
|
-
})
|
|
2471
|
-
}) });
|
|
2472
|
-
});
|
|
2473
|
-
Ar.displayName = "SelectContent";
|
|
2474
|
-
var jr = (0, Z.forwardRef)(({ className: e, children: t, icon: n, value: r, index: i, disabled: a = !1, ...o }, s) => {
|
|
2475
|
-
let c = wr(), l = (0, Z.useContext)(Tr), u = (0, Z.useRef)(null), d = y(), f = (0, Z.useRef)(!1);
|
|
2476
|
-
(0, Z.useEffect)(() => {
|
|
2477
|
-
f.current = !0;
|
|
2478
|
-
}, []), (0, Z.useEffect)(() => (l?.registerItem(i, u.current), () => l?.registerItem(i, null)), [i, l]);
|
|
2479
|
-
let p = l?.activeIndex === i, m = c.value === r, h = !f.current;
|
|
2480
|
-
return /* @__PURE__ */ (0, Q.jsxs)(xr, {
|
|
2481
|
-
value: r,
|
|
2482
|
-
disabled: a,
|
|
2483
|
-
label: typeof t == "string" ? t : void 0,
|
|
2484
|
-
render: /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2485
|
-
ref: (e) => {
|
|
2486
|
-
u.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
2487
|
-
},
|
|
2488
|
-
"data-proximity-index": i,
|
|
2489
|
-
"data-value": r,
|
|
2490
|
-
className: O(`relative z-10 flex h-9 items-center gap-2 ${d.item} px-2 text-[13px] cursor-pointer outline-none select-none`, "transition-[color] duration-80", p || m ? "text-foreground" : "text-muted-foreground", a && "opacity-50 pointer-events-none", e),
|
|
2491
|
-
...o
|
|
2492
|
-
}),
|
|
2493
|
-
children: [
|
|
2494
|
-
n && /* @__PURE__ */ (0, Q.jsx)(n, {
|
|
2495
|
-
size: 16,
|
|
2496
|
-
strokeWidth: p || m ? 2 : 1.5,
|
|
2497
|
-
className: "shrink-0 transition-[color,stroke-width] duration-80"
|
|
2498
|
-
}),
|
|
2499
|
-
/* @__PURE__ */ (0, Q.jsx)(Sr, {
|
|
2500
|
-
render: /* @__PURE__ */ (0, Q.jsx)("span", { className: "flex-1 min-w-0 truncate [text-box:trim-both_cap_alphabetic] py-1 -my-1" }),
|
|
2501
|
-
children: t
|
|
2502
|
-
}),
|
|
2503
|
-
/* @__PURE__ */ (0, Q.jsx)(rt, { children: m && /* @__PURE__ */ (0, Q.jsx)(W.svg, {
|
|
2504
|
-
width: 16,
|
|
2505
|
-
height: 16,
|
|
2506
|
-
viewBox: "0 0 24 24",
|
|
2507
|
-
fill: "none",
|
|
2508
|
-
stroke: "currentColor",
|
|
2509
|
-
strokeWidth: 2,
|
|
2510
|
-
strokeLinecap: "round",
|
|
2511
|
-
strokeLinejoin: "round",
|
|
2512
|
-
className: "shrink-0 text-foreground",
|
|
2513
|
-
initial: { opacity: 1 },
|
|
2514
|
-
animate: { opacity: 1 },
|
|
2515
|
-
exit: { opacity: 1 },
|
|
2516
|
-
children: /* @__PURE__ */ (0, Q.jsx)(W.path, {
|
|
2517
|
-
d: "M4 12L9 17L20 6",
|
|
2518
|
-
initial: { pathLength: +!!h },
|
|
2519
|
-
animate: {
|
|
2520
|
-
pathLength: 1,
|
|
2521
|
-
transition: {
|
|
2522
|
-
duration: .08,
|
|
2523
|
-
ease: "easeOut"
|
|
2524
|
-
}
|
|
2525
|
-
},
|
|
2526
|
-
exit: {
|
|
2527
|
-
pathLength: 0,
|
|
2528
|
-
transition: {
|
|
2529
|
-
duration: .04,
|
|
2530
|
-
ease: "easeIn"
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
})
|
|
2534
|
-
}, "check") })
|
|
2535
|
-
]
|
|
2536
|
-
});
|
|
2537
|
-
});
|
|
2538
|
-
jr.displayName = "SelectItem";
|
|
2539
|
-
function Mr({ children: e, className: t, ...n }) {
|
|
2540
|
-
return /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2541
|
-
role: "group",
|
|
2542
|
-
className: t,
|
|
2543
|
-
...n,
|
|
2544
|
-
children: e
|
|
2545
|
-
});
|
|
2546
|
-
}
|
|
2547
|
-
Mr.displayName = "SelectGroup";
|
|
2548
|
-
var Nr = (0, Z.forwardRef)(({ className: e, ...t }, n) => /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2549
|
-
ref: n,
|
|
2550
|
-
className: O("px-2 py-1.5 text-[11px] text-muted-foreground", e),
|
|
2551
|
-
...t
|
|
2552
|
-
}));
|
|
2553
|
-
Nr.displayName = "SelectLabel";
|
|
2554
|
-
var Pr = (0, Z.forwardRef)(({ className: e, ...t }, n) => /* @__PURE__ */ (0, Q.jsx)("div", {
|
|
2555
|
-
ref: n,
|
|
2556
|
-
role: "separator",
|
|
2557
|
-
className: O("my-1 -mx-1 h-px bg-border/60", e),
|
|
2558
|
-
...t
|
|
2559
|
-
}));
|
|
2560
|
-
Pr.displayName = "SelectSeparator";
|
|
2561
|
-
var Fr = (0, Z.createContext)(null);
|
|
2562
|
-
function Ir({ placeholder: e }) {
|
|
2563
|
-
return null;
|
|
2564
|
-
}
|
|
2565
|
-
Ir.displayName = "SelectValue";
|
|
2566
|
-
function Lr({ children: e, ...t }) {
|
|
2567
|
-
let n = (0, Z.useRef)(0), r = (0, Z.useMemo)(() => ({ next: () => n.current++ }), []);
|
|
2568
|
-
return n.current = 0, /* @__PURE__ */ (0, Q.jsx)(Fr.Provider, {
|
|
2569
|
-
value: r,
|
|
2570
|
-
children: /* @__PURE__ */ (0, Q.jsx)(Ar, {
|
|
2571
|
-
...t,
|
|
2572
|
-
children: e
|
|
2573
|
-
})
|
|
2574
|
-
});
|
|
2575
|
-
}
|
|
2576
|
-
function Rr({ index: e, label: t, children: n, ...r }) {
|
|
2577
|
-
let i = (0, Z.useContext)(Fr);
|
|
2578
|
-
return /* @__PURE__ */ (0, Q.jsx)(jr, {
|
|
2579
|
-
index: e ?? i?.next() ?? 0,
|
|
2580
|
-
...r,
|
|
2581
|
-
children: n
|
|
2582
|
-
});
|
|
2583
|
-
}
|
|
2584
|
-
function zr({ children: e, placeholder: t, ...n }) {
|
|
2585
|
-
let r = t;
|
|
2586
|
-
return Z.Children.forEach(e, (e) => {
|
|
2587
|
-
(0, Z.isValidElement)(e) && e.type === Ir && (r = e.props.placeholder ?? r);
|
|
2588
|
-
}), /* @__PURE__ */ (0, Q.jsx)(kr, {
|
|
2589
|
-
placeholder: r,
|
|
2590
|
-
...n
|
|
2591
|
-
});
|
|
2592
|
-
}
|
|
2593
|
-
//#endregion
|
|
2594
|
-
export { Vt as C, Ht as S, Nt as T, rn as _, Ir as a, Gt as b, En as c, _n as d, gn as f, on as g, sn as h, zr as i, xn as l, cn as m, Lr as n, zn as o, mn as p, Rr as r, Mn as s, Dr as t, bn as u, tn as v, Pt as w, Wt as x, Kt as y };
|