@100mslive/roomkit-react 0.1.9-alpha.1 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/Button/Button.tsx", "../src/Theme/ThemeProvider.tsx", "../src/Theme/useSSR.tsx", "../src/Avatar/Avatar.tsx", "../src/Avatar/getAvatarBg.ts", "../src/Divider/Divider.tsx", "../src/Switch/Switch.tsx", "../src/Select/Select.tsx", "../src/Slider/Slider.tsx", "../src/Modal/Dialog.tsx", "../src/Modal/DialogContent.tsx", "../src/hooks/useDialogContainerSelector.tsx", "../src/context/DialogContext.tsx", "../src/Input/Input.tsx", "../src/VideoTile/StyledVideoTile.tsx", "../src/VideoList/videoListUtils.tsx", "../src/VideoList/StyledVideoList.tsx", "../src/Pagination/StyledPagination.tsx", "../src/Dropdown/Dropdown.tsx", "../src/Video/Video.tsx", "../src/TileMenu/StyledMenuTile.tsx", "../src/AudioLevel/useBorderAudioLevel.tsx", "../src/AudioLevel/AudioLevel.tsx", "../src/Popover/index.tsx", "../src/Stats/Stats.tsx", "../src/Stats/formatBytes.ts", "../src/Stats/StyledStats.tsx", "../src/Checkbox/Checkbox.tsx", "../src/Label/Label.tsx", "../src/RadioGroup/RadioGroup.tsx", "../src/Toast/Toast.tsx", "../src/Accordion/Accordion.tsx", "../src/Accordion/index.ts", "../src/Fieldset/Fieldset.tsx", "../src/Footer/Footer.tsx", "../src/ReactSelect/index.ts", "../src/ReactSelect/ReactSelect.tsx", "../src/Tabs/Tabs.tsx", "../src/QRCode/QRCode.tsx", "../src/Link/Link.tsx", "../src/Collapsible/Collapsible.tsx", "../src/Prebuilt/App.tsx", "../src/Prebuilt/components/AppData/AppData.jsx", "../src/Prebuilt/components/init/initUtils.js", "../src/Prebuilt/components/hooks/useUserPreferences.jsx", "../src/Prebuilt/components/AppData/useSidepane.js", "../src/Prebuilt/components/AppData/useUISettings.js", "../src/Prebuilt/common/constants.js", "../src/Prebuilt/components/AuthToken.jsx", "../src/Prebuilt/AppContext.tsx", "../src/Prebuilt/primitives/DialogContent.jsx", "../src/Prebuilt/components/ConferenceScreen.tsx", "../src/Prebuilt/components/Footer/Footer.tsx", "../src/Prebuilt/components/AudioVideoToggle.jsx", "../src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx", "../src/Prebuilt/components/Toast/ToastManager.js", "../src/Prebuilt/components/EmojiReaction.jsx", "../src/Prebuilt/components/Footer/EmojiCard.jsx", "../src/Prebuilt/components/hooks/useDropdownList.jsx", "../src/Prebuilt/components/Leave/LeaveRoom.tsx", "../src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx", "../src/Prebuilt/components/Leave/EndSessionContent.tsx", "../src/Prebuilt/components/Leave/LeaveAtoms.tsx", "../src/Prebuilt/components/Leave/LeaveCard.tsx", "../src/Prebuilt/components/Leave/LeaveSessionContent.tsx", "../src/Prebuilt/components/Leave/MwebLeaveRoom.tsx", "../src/Sheet/Sheet.tsx", "../src/Prebuilt/components/MoreSettings/MoreSettings.tsx", "../src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx", "../src/Prebuilt/components/PIP/index.jsx", "../src/Prebuilt/components/PIP/PIPComponent.jsx", "../src/Prebuilt/components/PIP/PIPManager.js", "../src/Prebuilt/components/PIP/pipUtils.js", "../src/Prebuilt/components/PIP/SetupMediaSession.js", "../src/Prebuilt/components/RoleChangeModal.jsx", "../src/Prebuilt/components/hooks/useDropdownSelection.jsx", "../src/Prebuilt/common/hooks.js", "../src/Prebuilt/provider/roomLayoutProvider/index.tsx", "../src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts", "../src/Prebuilt/provider/roomLayoutProvider/constants/index.ts", "../src/Prebuilt/components/Settings/SettingsModal.jsx", "../src/Prebuilt/components/Settings/common.js", "../src/Prebuilt/components/Settings/DeviceSettings.jsx", "../src/Prebuilt/primitives/DropdownTrigger.jsx", "../src/Prebuilt/components/Settings/LayoutSettings.jsx", "../src/Prebuilt/components/Settings/SwitchWithLabel.jsx", "../src/Prebuilt/components/Settings/NotificationSettings.jsx", "../src/Prebuilt/components/Settings/StartRecording.jsx", "../src/Prebuilt/components/Streaming/ResolutionInput.jsx", "../src/Prebuilt/components/StatsForNerds.jsx", "../src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx", "../src/Prebuilt/components/MoreSettings/FullScreenItem.jsx", "../src/Prebuilt/components/hooks/useFullscreen.js", "../src/Prebuilt/components/MoreSettings/MuteAllModal.jsx", "../src/Prebuilt/components/MoreSettings/MuteAllContent.jsx", "../src/Prebuilt/components/hooks/useMetadata.jsx", "../src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx", "../src/Prebuilt/components/Header/StreamActions.tsx", "../src/Prebuilt/components/Header/AdditionalRoomState.jsx", "../src/Prebuilt/plugins/whiteboard/useWhiteboardMetadata.js", "../src/Prebuilt/common/utils.js", "../src/Prebuilt/services/FeatureFlags.jsx", "../src/Prebuilt/components/hooks/usePlaylistMusic.js", "../src/Prebuilt/components/hooks/useScreenshareAudio.js", "../src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts", "../src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx", "../src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx", "../src/Prebuilt/components/RaiseHand.jsx", "../src/Prebuilt/components/ScreenShareToggle.jsx", "../src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx", "../src/Prebuilt/components/ShareMenuIcon.jsx", "../src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx", "../src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx", "../src/Prebuilt/components/pdfAnnotator/submitPdf.jsx", "../src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx", "../src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx", "../src/Prebuilt/components/Footer/ChatToggle.tsx", "../src/Prebuilt/components/Footer/ParticipantList.jsx", "../src/Prebuilt/components/Connection/ConnectionIndicator.tsx", "../src/Prebuilt/components/Connection/connectionQualityUtils.js", "../src/Prebuilt/components/Footer/RoleAccordion.tsx", "../src/Prebuilt/components/Footer/RoleOptions.tsx", "../src/Prebuilt/components/Footer/PollsToggle.tsx", "../src/Prebuilt/components/Notifications/HLSFailureModal.tsx", "../src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx", "../src/Prebuilt/components/Preview/PreviewJoin.tsx", "../src/Prebuilt/components/Chip.tsx", "../src/Prebuilt/components/Connection/TileConnection.tsx", "../src/Prebuilt/components/FullPageProgress.jsx", "../src/Prebuilt/components/Header/HeaderComponents.jsx", "../src/Prebuilt/components/Preview/PreviewForm.tsx", "../src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx", "../src/Prebuilt/layouts/VideoStreamingSection.tsx", "../src/Prebuilt/components/VideoLayouts/GridLayout.tsx", "../src/Prebuilt/components/VideoLayouts/EqualProminence.tsx", "../src/Prebuilt/components/InsetTile.tsx", "../src/Prebuilt/components/VideoTile.jsx", "../src/Prebuilt/components/TileMenu/TileMenu.jsx", "../src/Prebuilt/components/TileMenu/TileMenuContent.jsx", "../src/Prebuilt/components/peerTileUtils.jsx", "../src/Prebuilt/components/hooks/useVideoTileLayout.ts", "../src/Prebuilt/components/Pagination.tsx", "../src/Prebuilt/components/VideoLayouts/Grid.tsx", "../src/Prebuilt/components/hooks/useTileLayout.tsx", "../src/Prebuilt/components/VideoLayouts/RoleProminence.tsx", "../src/Prebuilt/components/SecondaryTiles.tsx", "../src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx", "../src/Prebuilt/components/hooks/useRoleProminencePeers.tsx", "../src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx", "../src/Prebuilt/components/ScreenshareTile.jsx", "../src/Prebuilt/components/ScreenshareDisplay.jsx", "../src/Prebuilt/common/PeersSorter.ts", "../src/Prebuilt/layouts/EmbedView.jsx", "../src/Prebuilt/layouts/PDFView.jsx", "../src/Prebuilt/layouts/SidePane.tsx", "../src/Prebuilt/components/Polls/Polls.tsx", "../src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.jsx", "../src/Prebuilt/components/Streaming/Common.jsx", "../src/Prebuilt/components/Polls/common/StatusIndicator.jsx", "../src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx", "../src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.jsx", "../src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.jsx", "../src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx", "../src/Prebuilt/components/Polls/common/OptionInputWithDelete.jsx", "../src/Prebuilt/components/Polls/common/VoteCount.jsx", "../src/Prebuilt/components/Polls/common/VoteProgress.jsx", "../src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx", "../src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.jsx", "../src/Prebuilt/components/Polls/Voting/Voting.jsx", "../src/Prebuilt/components/Polls/Voting/StandardVoting.jsx", "../src/Prebuilt/components/Polls/Voting/QuestionCard.jsx", "../src/Prebuilt/components/Polls/Voting/TimedVoting.jsx", "../src/Prebuilt/components/SidePaneTabs.tsx", "../src/Prebuilt/components/Chat/Chat.jsx", "../src/Prebuilt/components/Chat/ChatBody.jsx", "../src/Prebuilt/components/hooks/useSetPinnedMessage.js", "../src/Prebuilt/components/Chat/useUnreadCount.js", "../src/Prebuilt/components/Chat/ChatFooter.tsx", "../src/Prebuilt/components/AppData/useChatState.js", "../src/Prebuilt/components/Chat/useEmojiPickerStyles.js", "../src/Prebuilt/components/Footer/PaginatedParticipants.tsx", "../src/Prebuilt/layouts/WaitingView.jsx", "../src/Prebuilt/components/Header/Header.tsx", "../src/Prebuilt/components/Header/common.jsx", "../src/Prebuilt/components/ErrorBoundary.jsx", "../src/Prebuilt/components/init/Init.jsx", "../src/Prebuilt/components/Input/KeyboardInputManager.js", "../src/Prebuilt/components/LeaveScreen.tsx", "../src/Prebuilt/AppStateContext.tsx", "../src/Prebuilt/components/hooks/useRedirectToLeave.tsx", "../src/Prebuilt/components/MwebLandscapePrompt.tsx", "../src/Prebuilt/components/Notifications/Notifications.tsx", "../src/Prebuilt/components/Toast/ToastConfig.jsx", "../src/Prebuilt/components/Toast/ToastBatcher.js", "../src/Prebuilt/components/Notifications/AutoplayBlockedModal.tsx", "../src/Prebuilt/components/Notifications/InitErrorModal.tsx", "../src/Prebuilt/components/Notifications/PeerNotifications.tsx", "../src/Prebuilt/components/Notifications/PermissionErrorModal.tsx", "../src/Prebuilt/components/Notifications/ReconnectNotifications.tsx", "../src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx", "../src/Prebuilt/components/Notifications/TrackNotifications.tsx", "../src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx", "../src/Prebuilt/components/Preview/PreviewScreen.tsx", "../src/Prebuilt/components/Toast/ToastContainer.jsx", "../src/Prebuilt/components/Toast/Toast.jsx", "../src/Prebuilt/plugins/FlyingEmoji.jsx", "../src/Prebuilt/plugins/RemoteStopScreenshare.jsx", "../src/Prebuilt/components/hooks/useAutoStartStreaming.tsx", "../src/Progress/index.tsx"],
4
- "sourcesContent": ["import React, { ComponentPropsWithRef, PropsWithChildren } from 'react';\nimport { Flex } from '../Layout';\nimport { Loading } from '../Loading';\nimport { styled } from '../Theme';\nimport { flexCenter } from '../utils/styles';\n\n/**\n * @param base bg color\n * @param hover hover state bg color\n * @param active active state bg color\n * @returns CSS object based on the state\n */\n\nconst getOutlinedVariants = (\n base: string,\n hover: string,\n active: string,\n disabled: string,\n text: string,\n textDisabled: string,\n) => {\n return {\n bg: '$transparent',\n border: `solid $space$px $colors${base}`,\n c: text,\n '&[disabled]': {\n c: textDisabled,\n bg: '$transparent',\n border: `solid $space$px $colors${disabled}`,\n cursor: 'not-allowed',\n },\n '&:not([disabled]):hover': {\n border: `solid $space$px $colors${hover}`,\n bg: '$transparent',\n },\n '&:not([disabled]):active': {\n border: `solid $space$px $colors${active}`,\n bg: '$transparent',\n },\n '&:not([disabled]):focus-visible': {\n boxShadow: `0 0 0 3px $colors${base}`,\n },\n };\n};\n\nconst getButtonVariants = (\n base: string,\n hover: string,\n active: string,\n disabled: string,\n text: string,\n textDisabled: string,\n) => {\n return {\n bg: base,\n border: `1px solid ${base}`,\n c: text,\n '&[disabled]': {\n c: textDisabled,\n cursor: 'not-allowed',\n bg: disabled,\n border: `1px solid ${disabled}`,\n },\n '&:not([disabled]):hover': {\n bg: hover,\n border: `1px solid ${hover}`,\n },\n '&:not([disabled]):active': {\n bg: active,\n border: `1px solid ${active}`,\n },\n '&:not([disabled]):focus-visible': {\n boxShadow: `0 0 0 3px ${base}`,\n },\n };\n};\n\nconst StyledButton = styled('button', {\n ...flexCenter,\n cursor: 'pointer',\n fontFamily: '$sans',\n lineHeight: 'inherit',\n textTransform: 'none',\n position: 'relative',\n outline: 'none',\n border: 'none',\n fs: '$md',\n r: '$1',\n backgroundColor: '$primary_default',\n fontWeight: '500',\n whiteSpace: 'nowrap',\n p: '$4 $8',\n '-webkit-appearance': 'button',\n '&:focus': {\n outline: 'none',\n },\n '&:not([disabled]):focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n transition: 'all 0.2s ease',\n compoundVariants: [\n {\n variant: 'standard',\n outlined: true,\n css: getOutlinedVariants(\n '$secondary_default',\n '$secondary_bright',\n '$secondary_dim',\n '$secondary_disabled',\n '$on_surface_high',\n '$on_surface_low',\n ),\n },\n {\n variant: 'danger',\n outlined: true,\n css: getOutlinedVariants(\n '$alert_error_default',\n '$alert_error_bright',\n '$alert_error_dim',\n '$alert_error_brighter',\n '$on_surface_high',\n '$on_surface_low',\n ),\n },\n {\n variant: 'primary',\n outlined: true,\n css: getOutlinedVariants(\n '$primary_default',\n '$primary_bright',\n '$primary_dim',\n '$primary_disabled',\n '$on_surface_high',\n '$on_surface_low',\n ),\n },\n ],\n variants: {\n variant: {\n standard: getButtonVariants(\n '$surface_brighter',\n '$surface_bright',\n '$surface_default',\n '$surface_dim',\n '$on_surface_high',\n '$on_surface_low',\n ),\n danger: getButtonVariants(\n '$alert_error_default',\n '$alert_error_bright',\n '$alert_error_dim',\n '$alert_error_dim',\n '$alert_error_brighter',\n '$on_primary_low',\n ),\n primary: getButtonVariants(\n '$primary_default',\n '$primary_bright',\n '$primary_dim',\n '$primary_disabled',\n '$on_primary_high',\n '$on_primary_low',\n ),\n },\n outlined: {\n true: {},\n },\n icon: {\n true: {},\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n});\n\nexport const Button = React.forwardRef<\n HTMLButtonElement,\n PropsWithChildren<{ loading?: boolean } & ComponentPropsWithRef<typeof StyledButton>>\n>(({ children, loading = false, icon, ...buttonProps }, ref) => {\n return (\n <StyledButton {...buttonProps} ref={ref}>\n <>\n {loading && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ w: '100%', position: 'absolute', left: '0', color: '$on_primary_low' }}\n >\n <Loading color=\"currentColor\" />\n </Flex>\n )}\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ visibility: loading ? 'hidden' : 'visible', gap: icon ? '$4' : '0' }}\n >\n {children}\n </Flex>\n </>\n </StyledButton>\n );\n});\n", "import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { Theme } from './stitches.config';\nimport { createTheme, theme } from './stitches.config';\nimport useSSR from './useSSR';\n\nconst defaultAspectRatio = {\n width: 1,\n height: 1,\n};\n\nexport enum ThemeTypes {\n // eslint-disable-next-line no-unused-vars\n default = 'default',\n}\n\nexport type ThemeContextValue = {\n themeType: string;\n theme: Theme;\n aspectRatio: { width: number; height: number };\n /**\n * @param {ThemeTypes} themeToUpdateTo - optional\n * Use this to toggle or update the currentTheme.\n * if a param is passed, it will set the theme to passed value, otherwise will toggle between light and dark\n * depending on current applied theme\n */\n toggleTheme: (themeToUpdateTo?: ThemeTypes) => void;\n};\n\nexport type ThemeProviderProps = {\n themeType?: string;\n theme?: Theme;\n aspectRatio?: { width: number; height: number };\n};\n\nconst defaultContext = {\n themeType: ThemeTypes.default,\n theme,\n aspectRatio: { width: 1, height: 1 },\n toggleTheme: (_themeToUpdateTo?: ThemeTypes) => {\n return;\n },\n};\nexport const ThemeContext = React.createContext<ThemeContextValue>(defaultContext);\n\n/**\n * Wrap this around your root component to get access to theme\n * eg:\n * <ThemeProvider type=\"dark\" appBuilder={{ aspectRatio: { width:1, height: 1} }}>\n * <App />\n * </ThemeProvider>\n */\nexport const HMSThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>> = ({\n themeType,\n theme: userTheme,\n aspectRatio = defaultAspectRatio,\n children,\n}) => {\n const systemTheme = ThemeTypes.default;\n const [currentTheme, setCurrentTheme] = useState(themeType || systemTheme);\n const previousClassName = useRef('');\n const { isBrowser } = useSSR();\n const updatedTheme = useMemo(() => {\n const updatedTheme = createTheme({ themeType: currentTheme, theme: userTheme || {} });\n if (!isBrowser) {\n return updatedTheme;\n }\n if (previousClassName.current) {\n document.documentElement.classList.remove(previousClassName.current);\n }\n previousClassName.current = updatedTheme.className;\n document.documentElement.classList.add(updatedTheme);\n return updatedTheme;\n }, [userTheme, currentTheme, isBrowser]);\n\n const toggleTheme = useCallback((themeToUpdateTo?: ThemeTypes) => {\n if (themeToUpdateTo) {\n setCurrentTheme(themeToUpdateTo);\n return;\n }\n setCurrentTheme(ThemeTypes.default);\n }, []);\n\n useEffect(() => {\n if (themeType) {\n setCurrentTheme(themeType);\n }\n }, [themeType]);\n\n return (\n <ThemeContext.Provider\n value={{ themeType: currentTheme, theme: updatedTheme as unknown as Theme, aspectRatio, toggleTheme }}\n >\n {children}\n </ThemeContext.Provider>\n );\n};\n\nexport const useTheme = () => React.useContext(ThemeContext);\n", "import { useEffect, useState } from 'react';\n\nconst isBrowser = (): boolean => {\n return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\n};\n\nexport type SSRState = {\n isBrowser: boolean;\n isServer: boolean;\n};\n\nconst useSSR = (): SSRState => {\n const [browser, setBrowser] = useState<boolean>(false);\n useEffect(() => {\n setBrowser(isBrowser());\n }, []);\n\n return {\n isBrowser: browser,\n isServer: !browser,\n };\n};\n\nexport default useSSR;\n", "import React from 'react';\nimport { VariantProps } from '@stitches/react';\nimport { PersonIcon } from '@100mslive/react-icons';\nimport { styled } from '../Theme';\nimport { getAvatarBg } from './getAvatarBg';\nimport { flexCenter } from '../utils/styles';\n\nconst getAvatarShape = (radii: string) => ({\n borderRadius: radii,\n});\n\nexport const StyledAvatar = styled('div', {\n ...flexCenter,\n color: '$colors$on_primary_high',\n fontFamily: '$sans',\n aspectRatio: 1,\n fontWeight: 600,\n fontSize: '$space$9',\n variants: {\n shape: {\n circle: getAvatarShape('$round'),\n square: getAvatarShape('$1'),\n },\n size: {\n small: {\n height: '$16 !important',\n fontSize: '$space$6',\n },\n medium: {\n height: '$18 !important',\n fontSize: '$space$10',\n },\n large: {\n height: '$20 !important',\n fontSize: '$space$12',\n },\n },\n },\n defaultVariants: {\n shape: 'circle',\n },\n});\n\ntype Props = VariantProps<typeof StyledAvatar> &\n React.ComponentProps<typeof StyledAvatar> & {\n name: string;\n };\n\nexport const Avatar: React.FC<Props> = ({ name, css, ...props }) => {\n const { initials } = getAvatarBg(name);\n let { color } = getAvatarBg(name);\n if (!name) {\n color = '#7E47EB';\n }\n return (\n <StyledAvatar css={{ bg: color, ...css }} {...props}>\n {initials || <PersonIcon height={40} width={40} />}\n </StyledAvatar>\n );\n};\n", "const getInitials = (name: string | undefined) => {\n if (!name) {\n return undefined;\n } else {\n return name\n .trim()\n .match(/(^\\S\\S?|\\b\\S)?/g)\n ?.join('')\n ?.match(/(^\\S|\\S$)?/g)\n ?.join('')\n .toUpperCase();\n }\n};\n\n/**\n calculates the initials of the name and choose a background color based on the first later of the initials\n */\nexport const getAvatarBg = (name: string): { initials: string; color: string } => {\n const initials = getInitials(name);\n const indexFactor = 20;\n const colorIndex = ((initials?.codePointAt(0) || 0) % indexFactor) + 1;\n return { initials: initials || '', color: colorsList[colorIndex - 1] };\n};\n\nconst colorsList = [\n '#616161',\n '#F44336',\n '#3F51B5',\n '#4CAF50',\n '#FFA000',\n '#795548',\n '#E91E63',\n '#2F80FF',\n '#8BC34A',\n '#F57C00',\n '#4E342E',\n '#9C27B0',\n '#00BCD4',\n '#C0CA33',\n '#F4511E',\n '#673AB7',\n '#009688',\n '#FBC02D',\n '#BF360C',\n '#455A64',\n];\n", "import { styled } from '../Theme';\n\nconst getVerticalSpace = (space: string) => ({\n marginLeft: space,\n marginRight: space,\n});\nconst getHorizontalSpace = (space: string) => ({\n marginTop: space,\n marginBottom: space,\n});\n\nexport const VerticalDivider = styled('span', {\n height: '25px',\n width: '1px',\n backgroundColor: '$border_bright',\n variants: {\n space: {\n 1: getVerticalSpace('$1'),\n 2: getVerticalSpace('$2'),\n 3: getVerticalSpace('$3'),\n 4: getVerticalSpace('$4'),\n },\n },\n defaultVariants: {\n space: 1,\n },\n});\n\nexport const HorizontalDivider = styled('span', {\n height: '1px',\n width: '100%',\n display: 'block',\n backgroundColor: '$border_bright',\n variants: {\n space: {\n 1: getHorizontalSpace('$1'),\n 2: getHorizontalSpace('$2'),\n 3: getHorizontalSpace('$3'),\n 4: getHorizontalSpace('$4'),\n },\n },\n defaultVariants: {\n space: 1,\n },\n});\n", "import React from 'react';\nimport * as BaseSwitch from '@radix-ui/react-switch';\nimport { styled } from '../Theme';\n\nconst SwitchRoot = styled(BaseSwitch.Root, {\n all: 'unset',\n width: '30px',\n height: '14px',\n border: 'solid $space$px $secondary_default',\n borderRadius: '$3',\n p: '$2',\n position: 'relative',\n cursor: 'pointer',\n '&[data-state=\"checked\"]': {\n backgroundColor: '$primary_default',\n border: 'solid $space$px $primary_default',\n },\n '&:focus': {\n outline: 'none',\n },\n '&[disabled]': {\n opacity: 0.5,\n cursor: 'not-allowed',\n },\n});\n\nconst SwitchThumb = styled(BaseSwitch.Thumb, {\n display: 'block',\n top: '3px',\n position: 'absolute',\n width: '$md',\n height: '$md',\n backgroundColor: '$secondary_default',\n borderRadius: '$round',\n transition: 'right 500ms ease-in',\n left: '$2',\n '&[data-state=\"checked\"]': {\n left: 'unset',\n right: '$2',\n backgroundColor: '$on_primary_high',\n },\n});\n\ntype SwitchProps = React.ComponentProps<typeof SwitchRoot>;\n\nexport const Switch: React.FC<SwitchProps> = props => (\n <SwitchRoot {...props}>\n <SwitchThumb />\n </SwitchRoot>\n);\n\nSwitch.displayName = 'Switch';\n", "import React from 'react';\nimport { ChevronDownIcon } from '@100mslive/react-icons';\nimport { styled } from '../Theme';\n\nconst Root = styled('div', {\n color: '$on_primary_high',\n display: 'inline-flex',\n position: 'relative',\n outline: 'none',\n overflow: 'hidden',\n borderRadius: '$1',\n backgroundColor: '$surface_default',\n maxWidth: '100%',\n});\n\n// TODO: replace these with tokens\nconst SelectRoot = styled('select', {\n h: '$16',\n fontSize: '$md',\n fontWeight: '500',\n lineHeight: 'inherit',\n textTransform: 'none',\n appearance: 'none',\n color: '$on_secondary_high',\n padding: '5px',\n paddingLeft: '12px',\n paddingRight: '30px',\n border: 'none',\n borderRadius: '8px',\n backgroundColor: '$secondary_default',\n '&:not([disabled]):focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n '&[disabled]': {\n opacity: 0.5,\n cursor: 'not-allowed',\n },\n});\n\nconst Arrow = styled('span', {\n color: '$on_secondary_high',\n width: '30px',\n height: '100%',\n position: 'absolute',\n right: 0,\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n transition: 'border .2s ease 0s',\n});\n\nconst DefaultDownIcon = ({ ...props }) => (\n <Arrow {...props}>\n <ChevronDownIcon />\n </Arrow>\n);\n\nexport const Select = {\n Root,\n DownIcon: Arrow,\n DefaultDownIcon,\n Select: SelectRoot,\n};\n", "import React from 'react';\nimport * as BaseSlider from '@radix-ui/react-slider';\nimport { CSS } from '@stitches/react';\nimport { styled } from '../Theme';\nimport { Tooltip } from '../Tooltip';\n\nconst Root = styled(BaseSlider.Root, {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n userSelect: 'none',\n touchAction: 'none',\n width: '100%',\n '&[data-orientation=\"horizontal\"]': {\n height: 20,\n },\n});\n\nconst Track = styled(BaseSlider.Track, {\n backgroundColor: '$surface_bright',\n position: 'relative',\n flexGrow: 1,\n borderRadius: '$round',\n cursor: 'pointer',\n '&[data-orientation=\"horizontal\"]': { height: 3 },\n});\n\nconst Range = styled(BaseSlider.Range, {\n position: 'absolute',\n backgroundColor: '$primary_default',\n borderRadius: '$round',\n height: '100%',\n});\n\nconst Thumb = styled(BaseSlider.Thumb, {\n all: 'unset',\n display: 'block',\n width: '$8',\n height: '$8',\n backgroundColor: '$primary_default',\n cursor: 'pointer',\n boxShadow: `0 2px 10px $colors$surface_default`,\n borderRadius: 10,\n '&:hover': { backgroundColor: '$primary_default' },\n '&:focus': { boxShadow: 'none' },\n});\n\ntype SliderProps = React.ComponentProps<typeof Root> & {\n thumbStyles?: CSS;\n showTooltip?: boolean;\n};\n\nexport const Slider: React.FC<SliderProps & { showTooltip?: boolean }> = ({\n showTooltip = true,\n thumbStyles,\n ...props\n}) => (\n <Root {...props}>\n <Track>\n <Range />\n </Track>\n {showTooltip ? (\n <Tooltip title={String(props.value?.[0])}>\n <Thumb css={thumbStyles} />\n </Tooltip>\n ) : (\n <Thumb css={thumbStyles} />\n )}\n </Root>\n);\n", "import React, { ReactNode, useRef } from 'react';\nimport { Root } from '@radix-ui/react-dialog';\nimport { styled } from '@stitches/react';\nimport { CSS } from '../Theme';\nimport {\n DialogClose,\n DialogDefaultCloseIcon,\n DialogDescription,\n DialogTitle,\n StyledDialogContent,\n StyledDialogOverlay,\n StyledDialogPortal,\n StyledDialogTrigger,\n} from './DialogContent';\nimport { useDialogContainerSelector } from '../hooks/useDialogContainerSelector';\n\nconst StyledDialog = styled(Root, {});\nconst CustomDialogContent = ({ children, props = {}, css = {} }: { children: ReactNode; props?: any; css?: CSS }) => (\n <StyledDialogContent css={{ ...css, position: 'absolute' }} {...props}>\n {children}\n </StyledDialogContent>\n);\nconst CustomDialogOverlay = ({ css = {} }: { css?: CSS }) => (\n <StyledDialogOverlay css={{ ...css, position: 'absolute' }} />\n);\nconst CustomDialogPortal = ({ children, container }: { children: ReactNode; container?: HTMLElement | null }) => {\n const dialogContainerSelector = useDialogContainerSelector();\n const containerRef = useRef<HTMLElement | null>(null);\n\n if (container) {\n containerRef.current = container;\n } else if (dialogContainerSelector && !containerRef.current) {\n containerRef.current = document.querySelector(dialogContainerSelector) as HTMLElement;\n } else if (!containerRef.current) {\n containerRef.current = document.body;\n }\n return (\n <StyledDialogPortal container={containerRef.current}>\n <>{children}</>\n </StyledDialogPortal>\n );\n};\n\nexport const Dialog = {\n Root: StyledDialog,\n Trigger: StyledDialogTrigger,\n Overlay: CustomDialogOverlay,\n Content: CustomDialogContent,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n DefaultClose: DialogDefaultCloseIcon,\n Portal: CustomDialogPortal,\n};\n", "import React, { ComponentProps } from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { CrossIcon } from '@100mslive/react-icons';\nimport { IconButton } from '../IconButton';\nimport { styled } from '../Theme';\nimport { dialogClose, dialogOpen } from '../utils/animations';\n\nexport const DialogClose = styled(DialogPrimitive.Close, {\n backgroundColor: 'transparent',\n padding: '0',\n margin: '0',\n border: 'none',\n backgroundImage: 'none',\n});\n\nexport const StyledDialogTrigger = styled(DialogPrimitive.Trigger, {\n appearance: 'none !important', // Needed for safari it shows white overlay\n});\n\nexport const StyledDialogOverlay = styled(DialogPrimitive.Overlay, {\n backgroundColor: 'rgba(0, 0, 0, 0.5);',\n position: 'fixed',\n inset: 0,\n});\n\nexport const StyledDialogPortal = styled(DialogPrimitive.Portal, {});\n\nexport const StyledDialogContent = styled(DialogPrimitive.Content, {\n color: '$on_surface_medium',\n backgroundColor: '$surface_default',\n borderRadius: '8px',\n position: 'fixed',\n top: '50%',\n left: '50%',\n border: '$space$px solid $border_bright',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n transform: 'translate(-50%, -50%)',\n zIndex: 999,\n padding: '$12',\n '@allowMotion': {\n '&[data-state=\"open\"]': {\n animation: `${dialogOpen} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,\n },\n '&[data-state=\"closed\"]': {\n animation: `${dialogClose} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,\n },\n },\n '&:focus': { outline: 'none' },\n});\n\nexport const DialogTitle = styled(DialogPrimitive.Title, {\n margin: 0,\n});\n\nexport const DialogDescription = styled(DialogPrimitive.Description, {});\n\nexport const DialogDefaultCloseIcon = (props: ComponentProps<typeof IconButton>) => (\n <DialogClose asChild>\n <IconButton {...props}>\n <CrossIcon />\n </IconButton>\n </DialogClose>\n);\n", "import { useContext } from 'react';\nimport { DialogContainerContext } from '../context/DialogContext';\n\nexport function useDialogContainerSelector() {\n const dialogContainerSelector = useContext(DialogContainerContext);\n return dialogContainerSelector;\n}\n", "import React, { createContext, ReactNode } from 'react';\n\nexport const DialogContainerContext = createContext('');\n\nexport function DialogContainerProvider({\n children,\n dialogContainerSelector,\n}: {\n children: ReactNode;\n dialogContainerSelector: string;\n}) {\n return <DialogContainerContext.Provider value={dialogContainerSelector}>{children}</DialogContainerContext.Provider>;\n}\n", "import React, { ComponentProps, PropsWithChildren, PropsWithRef } from 'react';\nimport { CSS } from '@stitches/react';\nimport { CopyIcon, EyeCloseIcon, EyeOpenIcon } from '@100mslive/react-icons';\nimport { Flex } from '../Layout';\nimport { styled } from '../Theme';\n\nexport const Input = styled('input', {\n fontFamily: '$sans',\n lineHeight: 'inherit',\n backgroundColor: '$surface_default',\n borderRadius: '8px',\n outline: 'none',\n border: '1px solid $border_default',\n padding: '0.5rem 0.75rem',\n minHeight: '30px',\n color: '$on_surface_high',\n fontSize: '$md',\n '&:focus': {\n boxShadow: '0 0 0 1px $colors$primary_default',\n border: '1px solid transparent',\n },\n '&::placeholder': {\n color: '$on_surface_medium',\n },\n variants: {\n alert_error_default: {\n true: {\n '&:focus': {\n boxShadow: '0 0 0 3px $colors$alert_error_default',\n },\n },\n },\n },\n});\n\nconst PasswordRoot = styled('div', {\n w: '100%',\n position: 'relative',\n display: 'flex',\n});\n\nconst PasswordShowIcon: React.FC<ComponentProps<typeof Flex> & { showPassword?: boolean; css?: CSS }> = ({\n showPassword,\n css,\n ...props\n}) => {\n return (\n <Flex css={{ ...css }} {...props}>\n {showPassword ? <EyeOpenIcon /> : <EyeCloseIcon />}\n </Flex>\n );\n};\n\nconst PasswordCopyIcon: React.FC<ComponentProps<typeof Flex & { css?: CSS }>> = ({ css, ...props }) => {\n return (\n <Flex css={{ ...css }} {...props}>\n <CopyIcon />\n </Flex>\n );\n};\n\nconst PasswordIcons = React.forwardRef<HTMLDivElement, PropsWithChildren<ComponentProps<typeof Flex & { css?: CSS }>>>(\n ({ css, ...props }, ref) => {\n return (\n <Flex\n css={{\n position: 'absolute',\n top: 0,\n height: '100%',\n zIndex: 10,\n right: '$4',\n bg: '$surface_bright',\n alignItems: 'center',\n ...css,\n }}\n ref={ref}\n {...props}\n >\n {props.children}\n </Flex>\n );\n },\n);\n\nconst ReactInput: React.FC<PropsWithRef<ComponentProps<typeof Input> & { showPassword?: boolean; css?: CSS }>> =\n React.forwardRef<\n HTMLInputElement,\n PropsWithRef<ComponentProps<typeof Input> & { showPassword?: boolean; css?: CSS }>\n >(({ showPassword = false, css, ...props }, ref) => {\n return (\n <Input\n css={{ flexGrow: 1, width: '100%', ...css }}\n type={showPassword ? 'text' : 'password'}\n {...props}\n ref={ref}\n />\n );\n });\n\nexport const PasswordInput = {\n Root: PasswordRoot,\n Icons: PasswordIcons,\n Input: ReactInput,\n ShowIcon: PasswordShowIcon,\n CopyIcon: PasswordCopyIcon,\n};\n", "import { Box } from '../Layout';\nimport { styled } from '../Theme';\nimport { flexCenter } from '../utils';\n\nexport const Root = styled('div', {\n padding: '0.75rem',\n // show videotile context menu on hover\n // [`&:hover .tile-menu`]: {\n // display: 'inline-block',\n // },\n});\n\nconst Container = styled('div', {\n width: '100%',\n height: '100%',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '$2',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n background: '$background_default',\n variants: {\n transparentBg: {\n true: {\n background: 'transparent',\n },\n },\n noRadius: {\n true: {\n borderRadius: 0,\n },\n },\n },\n});\n\nconst Overlay = styled('div', {\n position: 'absolute',\n width: '100%',\n height: '100%',\n});\n\nconst Info = styled('div', {\n color: '$on_primary_high',\n position: 'absolute',\n bottom: '5px',\n left: '50%',\n fontSize: '$sm',\n transform: 'translateX(-50%)',\n textAlign: 'center',\n width: '80%',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: '$sans',\n});\n\nconst AttributeBox = styled('div', {\n position: 'absolute',\n top: '$4',\n color: '$on_secondary_high',\n bg: '$secondary_dim',\n borderRadius: '$round',\n width: '$14',\n height: '$14',\n mb: '5px',\n ...flexCenter,\n variants: {\n size: {\n small: {\n width: '$10',\n height: '$10',\n '& > svg': {\n width: '$8',\n height: '$8',\n },\n },\n medium: {\n width: '$13',\n height: '$13',\n },\n },\n position: {\n left: { left: '$4' },\n right: { right: '$4' },\n },\n },\n defaultVariants: {\n size: 'medium',\n position: 'left',\n },\n});\n\nconst AudioIndicator = styled(AttributeBox, { defaultVariants: { position: 'right' } });\n\nconst FullScreenButton = styled('button', {\n width: '2.25rem',\n height: '2.25rem',\n color: '$on_surface_high',\n borderRadius: '$round',\n backgroundColor: '$surface_default',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n top: '$2',\n right: '$2',\n zIndex: 5,\n '&:not([disabled]):focus': {\n outline: 'none',\n boxShadow: '0 0 0 3px $colors$primary_bright',\n },\n});\n\nconst AvatarContainer = styled(Box, {\n ...flexCenter,\n flexDirection: 'column',\n position: 'absolute',\n left: '50%',\n top: '50%',\n transform: 'translateX(-50%) translateY(-50%)',\n width: '40%',\n height: '40%',\n '& > div': {\n maxHeight: '$20',\n height: '100%',\n },\n});\n\ninterface VideoTileType {\n Root: typeof Root;\n Container: typeof Container;\n Overlay: typeof Overlay;\n Info: typeof Info;\n AvatarContainer: typeof AvatarContainer;\n AttributeBox: typeof AttributeBox;\n AudioIndicator: typeof AudioIndicator;\n FullScreenButton: typeof FullScreenButton;\n}\n\nexport const StyledVideoTile: VideoTileType = {\n Root,\n Container,\n Overlay,\n Info,\n AvatarContainer,\n AttributeBox,\n AudioIndicator,\n FullScreenButton,\n};\n", "export const getLeft = (index: number, currentPageIndex: number) => {\n //active slide\n if (index === currentPageIndex) {\n return 0;\n }\n //prev slide\n if (index + 1 === currentPageIndex) {\n return '-100%';\n }\n //next slide\n if (index - 1 === currentPageIndex) {\n return '100%';\n }\n //all slides before prev\n if (index < currentPageIndex) {\n return '-200%';\n }\n //all slides after next\n return '200%';\n};\n", "import { styled } from '../Theme';\n\nconst Root = styled('div', {\n height: '100%',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n});\n\nconst Container = styled('div', {\n height: '100%',\n width: '100%',\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n overflow: 'hidden',\n});\n\nconst View = styled('div', {\n height: '100%',\n width: '100%',\n position: 'absolute',\n display: 'flex',\n placeContent: 'center',\n flexWrap: 'wrap',\n alignItems: 'center',\n});\n\ninterface VideoListType {\n Root: typeof Root;\n Container: typeof Container;\n View: typeof View;\n}\n\nexport const StyledVideoList: VideoListType = {\n Root,\n Container,\n View,\n};\n", "import { styled } from '../Theme';\n\nconst Root = styled('div', {\n height: '2rem',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n '& > * + *': {\n marginRight: '0',\n marginLeft: '0.5rem',\n },\n});\n\nconst Chevron = styled('button', {\n color: '$on_surface_high',\n '&:focus': {\n outline: 'none',\n },\n '&[disabled]': {\n color: '$on_surface_low',\n cursor: 'not-allowed',\n },\n backgroundColor: 'transparent',\n display: 'flex',\n});\n\nconst Dots = styled('div', {\n display: 'flex',\n alignItems: 'center',\n '& > * + *': {\n marginRight: '0',\n marginLeft: '0.5rem',\n },\n});\n\nconst Dot = styled('button', {\n '&:focus': {\n outline: 'none',\n },\n borderRadius: '9999px',\n width: '0.5rem',\n height: '0.5rem',\n backgroundColor: '$on_surface_low',\n padding: '0px',\n border: 'none',\n cursor: 'pointer',\n variants: {\n active: {\n true: {\n backgroundColor: '$on_surface_high',\n },\n },\n },\n});\n\ninterface PaginationType {\n Root: typeof Root;\n Chevron: typeof Chevron;\n Dots: typeof Dots;\n Dot: typeof Dot;\n}\n\nexport const StyledPagination: PaginationType = {\n Root,\n Chevron,\n Dots,\n Dot,\n};\n", "import {\n CheckboxItem,\n Content,\n Group,\n Item,\n ItemIndicator,\n Label,\n Portal,\n Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n Trigger,\n} from '@radix-ui/react-dropdown-menu';\nimport { styled } from '../Theme';\n\nconst DropdownRoot = styled(Root, {});\n\nconst DropdownTrigger = styled(Trigger, {\n cursor: 'pointer',\n appearance: 'none !important',\n '&[data-state=\"open\"]': {\n backgroundColor: '$surface_bright',\n },\n '&:focus': {\n outline: 'none',\n },\n '&:focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n});\n\nconst DropdownTriggerItem = styled(SubTrigger, {\n w: '100%',\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_brighter',\n },\n '&:focus-visible': {\n bg: '$surface_brighter',\n outline: 'none',\n },\n});\n\nconst DropdownItem = styled(Item, {\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n outline: 'none',\n backgroundColor: '$surface_dim',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_bright',\n },\n '&:focus-visible': {\n bg: '$surface_bright',\n },\n});\n\nconst DropdownItemSeparator = styled(Separator, {\n h: 1,\n backgroundColor: '$border_bright',\n m: '$4 $8',\n});\n\nconst DropdownContent = styled(Content, {\n w: '$80',\n maxHeight: '$64',\n r: '$1',\n py: '$4',\n backgroundColor: '$surface_dim',\n overflowY: 'auto',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n zIndex: 20,\n fontFamily: '$sans',\n});\n\nconst DropdownLabel = styled(Label, {\n display: 'flex',\n alignItems: 'center',\n h: '$12',\n w: '100%',\n p: '$8 $4',\n});\n\nconst DropdownGroup = styled(Group, {});\n\nconst DropdownSubMenu = styled(Sub, {});\n\nconst DropdownSubMenuContent = styled(SubContent, {\n w: '$80',\n maxHeight: '$64',\n r: '$1',\n py: '$4',\n backgroundColor: '$surface_bright',\n overflowY: 'auto',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n zIndex: 20,\n});\n\nconst DropdownCheckboxItem = styled(CheckboxItem, {\n color: '$on_surface_high',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n outline: 'none',\n '&:hover': {\n cursor: 'pointer',\n bg: '$surface_brighter',\n },\n '&:focus-visible': {\n bg: '$surface_brighter',\n },\n gap: '$2',\n});\n\nconst DropdownItemIndicator = styled(ItemIndicator, {\n w: '$10',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n});\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: DropdownTrigger,\n TriggerItem: DropdownTriggerItem,\n Content: DropdownContent,\n Portal: Portal,\n SubMenu: DropdownSubMenu,\n SubMenuContent: DropdownSubMenuContent,\n Item: DropdownItem,\n Label: DropdownLabel,\n Group: DropdownGroup,\n ItemSeparator: DropdownItemSeparator,\n CheckboxItem: DropdownCheckboxItem,\n ItemIndicator: DropdownItemIndicator,\n};\n", "import React from 'react';\nimport type { VariantProps } from '@stitches/react';\nimport { HMSPeer, useVideo } from '@100mslive/react-sdk';\nimport { styled } from '../Theme';\n\nexport const StyledVideo = styled('video', {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '$2',\n objectFit: 'cover',\n background: '$background_default',\n variants: {\n mirror: {\n true: {\n transform: 'scaleX(-1)',\n },\n },\n screenShare: {\n true: {\n objectFit: 'contain',\n },\n },\n degraded: {\n // send the video behind when it's degraded so avatar can show on top of it. Video will be stuck frame in this case.\n // not hiding by using display none, because it will lead it to be detached as it will no longer be in view.\n true: {\n zIndex: -100,\n },\n },\n noRadius: {\n true: {\n borderRadius: 0,\n },\n },\n },\n defaultVariants: {\n mirror: false,\n },\n});\n\ntype StyledProps = VariantProps<typeof StyledVideo> & React.ComponentProps<typeof StyledVideo>;\n\ninterface Props {\n /**\n * trackID for peer (videoTrack)\n */\n trackId: HMSPeer['videoTrack'];\n /**\n * Boolean stating whether to override the internal behaviour.\n * when attach is false, even if tile is inView or enabled, it won't be rendered\n */\n attach?: boolean;\n}\n\nexport const Video: React.FC<Props & StyledProps> = ({ trackId, attach, ...props }) => {\n const { videoRef } = useVideo({ trackId, attach });\n return <StyledVideo autoPlay muted playsInline controls={false} ref={videoRef} {...props} />;\n};\n", "import * as Popover from '@radix-ui/react-popover';\nimport { styled } from '../Theme';\nimport { popoverAnimation } from '../utils/animations';\nimport { flexCenter } from '../utils/styles';\n\nconst Root = Popover.Root;\n\nconst StyledTrigger = styled(Popover.Trigger, {\n position: 'absolute',\n bottom: '$2',\n right: '$2',\n zIndex: 10,\n width: '$13',\n height: '$13',\n color: '$on_surface_high',\n borderRadius: '$2',\n backgroundColor: '$surface_bright',\n cursor: 'pointer',\n border: 'none',\n ...flexCenter,\n '&:not([disabled]):focus': {\n outline: 'none',\n boxShadow: '0 0 0 3px $colors$primary_bright',\n },\n});\n\nconst StyledContent = styled(Popover.Content, {\n fontFamily: '$sans',\n backgroundColor: '$surface_dim',\n padding: '$5 0',\n display: 'flex',\n flexDirection: 'column',\n borderRadius: '$space$6',\n zIndex: 11,\n width: '$60',\n ...popoverAnimation,\n});\n\nconst styledItem = {\n fontSize: '$sm',\n color: '$on_surface_high',\n display: 'flex',\n alignItems: 'center',\n padding: '$4 $6',\n width: '100%',\n backgroundColor: '$menuBg',\n};\n\nconst StyledItemButton = styled('button', {\n ...styledItem,\n height: '$14',\n '&:hover': {\n backgroundColor: '$surface_brighter',\n },\n cursor: 'pointer',\n // TODO: default focus applied cause issues with this style\n '&:focus': {\n outline: 'none',\n // backgroundColor: '$grey3',\n },\n '& > * + *': {\n marginRight: '0',\n marginLeft: '$4',\n },\n});\n\nconst StyledVolumeItem = styled('div', {\n // TODO: maybe keep this as base comp and extend button variant\n ...styledItem,\n alignItems: 'start',\n flexDirection: 'column',\n marginBottom: '0',\n});\n\nexport const Flex = styled('div', {\n display: 'flex',\n '& > * + *': {\n marginRight: '0',\n marginLeft: '$4',\n },\n});\n\nconst RemoveMenuItem = styled(StyledItemButton, {\n color: '$alert_error_default',\n borderTop: '1px solid $border_bright',\n});\n\ninterface MenuTileType {\n Root: typeof Root;\n Trigger: typeof StyledTrigger;\n Content: typeof StyledContent;\n ItemButton: typeof StyledItemButton;\n VolumeItem: typeof StyledVolumeItem;\n RemoveItem: typeof RemoveMenuItem;\n}\n\nexport const StyledMenuTile: MenuTileType = {\n Root,\n Trigger: StyledTrigger,\n Content: StyledContent,\n ItemButton: StyledItemButton,\n VolumeItem: StyledVolumeItem,\n RemoveItem: RemoveMenuItem,\n};\n", "import { useCallback, useRef } from 'react';\nimport { HMSTrackID } from '@100mslive/hms-video-store';\nimport { useAudioLevelStyles } from '@100mslive/react-sdk';\nimport { useTheme } from '../Theme';\n\n/**\n * pass in a track id and get a ref. That ref can be attached to an element which will have border\n * as per audio level post that.\n */\nexport function useBorderAudioLevel(audioTrackId?: HMSTrackID) {\n const { theme } = useTheme();\n const color = theme.colors.primary_default.value;\n const getStyle = useCallback(\n (level: number) => {\n const style: Record<string, string> = {\n transition: 'outline 0.4s ease-in-out',\n };\n style['outline'] = level ? `${sigmoid(level) * 4}px solid ${color}` : '0px solid transparent';\n return style;\n },\n [color],\n );\n const ref = useRef(null);\n useAudioLevelStyles({\n trackId: audioTrackId,\n getStyle,\n ref,\n });\n return ref;\n}\n\nexport const sigmoid = (z: number) => {\n return 1 / (1 + Math.exp(-z));\n};\n", "import React, { useEffect, useRef } from 'react';\nimport { selectTrackAudioByID, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { Box, Flex } from '../Layout';\nimport { keyframes } from '../Theme';\n//@ts-ignore\nimport bg from './audio-level.png';\n\n// keep the calculated values before hand to avoid recalcuation everytime\nconst positionValues = new Array(101).fill(0).reduce((acc, _, index) => {\n acc[index] = Math.round((index / 100) * 4) / 4; // convert to 0.25 multiples\n return acc;\n}, {});\n\nconst barAnimation = keyframes({\n from: {\n maskSize: '4em .8em',\n '-webkit-mask-position-y': '.1em',\n maskPosition: 'initial .1em',\n },\n\n '50%': {\n maskSize: '4em 1em',\n '-webkit-mask-position-y': 0,\n maskPosition: 'initial 0',\n },\n\n to: {\n maskSize: '4em .8em',\n '-webkit-mask-position-y': '.1em',\n maskPosition: 'initial 0.1em',\n },\n});\n\nconst AudioBar = () => {\n return (\n <Box\n css={{\n width: '.25em',\n height: '1em',\n maskImage: `url(${bg})`,\n '-webkit-mask-repeat': 'no-repeat',\n backgroundColor: '$on_primary_high',\n maskSize: '4em 1em',\n }}\n />\n );\n};\n\nexport const AudioLevel = ({ trackId, size }: { trackId?: string; size?: 'small' | 'medium' }) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const vanillaStore = useHMSVanillaStore();\n\n useEffect(() => {\n const unsubscribe = vanillaStore.subscribe(audioLevel => {\n if (ref.current) {\n let index = 0;\n //@ts-ignore\n for (const child of ref.current.children) {\n const positionX = `-${positionValues[audioLevel] * (index === 1 ? 2.5 : 1.25)}em`;\n child.style['-webkit-mask-position-x'] = positionX;\n child.style['mask-position'] = `${positionX} 0`;\n child.style['animation'] =\n positionValues[audioLevel] > 0 ? `${barAnimation} 0.6s steps(3,jump-none) 0s infinite` : 'none';\n index++;\n }\n }\n }, selectTrackAudioByID(trackId));\n return unsubscribe;\n }, [vanillaStore, trackId]);\n return (\n <Flex\n ref={ref}\n css={{\n fontSize: size === 'small' ? '0.75rem' : '1rem',\n gap: size === 'small' ? '$1' : '$2',\n }}\n >\n <AudioBar />\n <AudioBar />\n <AudioBar />\n </Flex>\n );\n};\n", "import { Arrow, Close, Content, Popover as Root, Portal, Trigger } from '@radix-ui/react-popover';\nimport { styled } from '../Theme';\nimport { popoverAnimation } from '../utils/animations';\n\nconst StyledContent = styled(Content, {\n padding: '$6',\n borderRadius: '$2',\n backgroundColor: '$background_default',\n boxShadow: '$sm',\n zIndex: 12,\n ...popoverAnimation,\n});\n\nconst StyledArrow = styled(Arrow, {\n ...popoverAnimation,\n});\n\nconst StyledTrigger = styled(Trigger, {});\n\nexport const Popover = {\n Root,\n Content: StyledContent,\n Trigger: StyledTrigger,\n Portal: Portal,\n Arrow: StyledArrow,\n Close: Close,\n};\n", "import React, { Fragment } from 'react';\nimport {\n HMSPeerID,\n HMSTrackID,\n HMSTrackStats,\n RID,\n selectConnectionQualityByPeerID,\n selectHMSStats,\n simulcastMapping,\n useHMSStatsStore,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Tooltip } from '../Tooltip';\nimport { formatBytes } from './formatBytes';\nimport { Stats } from './StyledStats';\n\nexport interface VideoTileStatsProps {\n videoTrackID?: HMSTrackID;\n audioTrackID?: HMSTrackID;\n peerID?: HMSPeerID;\n isLocal: boolean;\n}\n\n/**\n * This component can be used to overlay webrtc stats over the Video Tile. For the local tracks it also includes\n * remote inbound stats as sent by the SFU in receiver report.\n */\nexport function VideoTileStats({ videoTrackID, audioTrackID, peerID, isLocal = false }: VideoTileStatsProps) {\n const audioSelector = isLocal ? selectHMSStats.localAudioTrackStatsByID : selectHMSStats.trackStatsByID;\n const audioTrackStats = useHMSStatsStore(audioSelector(audioTrackID));\n const localVideoTrackStats = useHMSStatsStore(selectHMSStats.localVideoTrackStatsByID(videoTrackID));\n const remoteVideoTrackStats = useHMSStatsStore(selectHMSStats.trackStatsByID(videoTrackID));\n const videoTrackStats = isLocal ? localVideoTrackStats?.[0] : remoteVideoTrackStats;\n const downlinkScore = useHMSStore(selectConnectionQualityByPeerID(peerID))?.downlinkQuality;\n const availableOutgoingBitrate = useHMSStatsStore(selectHMSStats.availablePublishBitrate);\n\n // Viewer role - no stats to show\n if (!(audioTrackStats || videoTrackStats)) {\n return null;\n }\n return (\n <Stats.Root>\n <table>\n <tbody>\n {isLocal ? (\n <Fragment>\n <StatsRow\n show={isNotNullishAndNot0(availableOutgoingBitrate)}\n label=\"AOBR\"\n tooltip=\"Available Outgoing Bitrate\"\n value={formatBytes(availableOutgoingBitrate, 'b/s')}\n />\n {localVideoTrackStats?.map(stat => {\n if (!stat) {\n return null;\n }\n const layer = stat.rid ? simulcastMapping[stat.rid as RID] : '';\n return (\n <Fragment>\n {layer && <StatsRow label={layer.toUpperCase()} value=\"\" />}\n <StatsRow\n show={isNotNullishAndNot0(stat.frameWidth)}\n label=\"Width\"\n value={stat.frameWidth?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(stat.frameHeight)}\n label=\"Height\"\n value={stat.frameHeight?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(stat.framesPerSecond)}\n label=\"FPS\"\n value={`${stat.framesPerSecond} ${\n isNotNullishAndNot0(stat.framesDropped) ? `(${stat.framesDropped} dropped)` : ''\n }`}\n />\n <StatsRow\n show={isNotNullish(stat.bitrate)}\n label=\"Bitrate(V)\"\n value={formatBytes(stat.bitrate, 'b/s')}\n />\n <Stats.Gap />\n </Fragment>\n );\n })}\n </Fragment>\n ) : (\n <Fragment>\n <StatsRow\n show={isNotNullishAndNot0(videoTrackStats?.frameWidth)}\n label=\"Width\"\n value={videoTrackStats?.frameWidth?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(videoTrackStats?.frameHeight)}\n label=\"Height\"\n value={videoTrackStats?.frameHeight?.toString()}\n />\n <StatsRow\n show={isNotNullishAndNot0(videoTrackStats?.framesPerSecond)}\n label=\"FPS\"\n value={`${videoTrackStats?.framesPerSecond} ${\n isNotNullishAndNot0(videoTrackStats?.framesDropped)\n ? `(${videoTrackStats?.framesDropped} dropped)`\n : ''\n }`}\n />\n <StatsRow\n show={isNotNullish(videoTrackStats?.bitrate)}\n label=\"Bitrate(V)\"\n value={formatBytes(videoTrackStats?.bitrate, 'b/s')}\n />\n </Fragment>\n )}\n\n <StatsRow\n show={isNotNullish(audioTrackStats?.bitrate)}\n label=\"Bitrate(A)\"\n value={formatBytes(audioTrackStats?.bitrate, 'b/s')}\n />\n\n <StatsRow show={isNotNullish(downlinkScore)} label=\"Downlink\" value={downlinkScore} />\n\n <StatsRow show={isNotNullish(videoTrackStats?.codec)} label=\"Codec(V)\" value={videoTrackStats?.codec} />\n\n <StatsRow show={isNotNullish(audioTrackStats?.codec)} label=\"Codec(A)\" value={audioTrackStats?.codec} />\n\n <PacketLostAndJitter audioTrackStats={audioTrackStats} videoTrackStats={videoTrackStats} />\n </tbody>\n </table>\n </Stats.Root>\n );\n}\n\nconst PacketLostAndJitter = ({\n audioTrackStats,\n videoTrackStats,\n}: {\n audioTrackStats?: HMSTrackStats;\n videoTrackStats?: HMSTrackStats;\n}) => {\n // for local peer, we'll use the remote inbound stats to get packet loss and jitter, to know whether the track is\n // local we check if the stats type has outbound in it as it's being published from local. Both audio and video\n // tracks are checked in case the user has permission to publish only one of them.\n const isLocalPeer = audioTrackStats?.type.includes('outbound') || videoTrackStats?.type.includes('outbound');\n const audioStats = isLocalPeer ? audioTrackStats?.remote : audioTrackStats;\n const videoStats = isLocalPeer ? videoTrackStats?.remote : videoTrackStats;\n return (\n <>\n <TrackPacketsLostRow label=\"Packet Loss(V)\" stats={videoStats} />\n <TrackPacketsLostRow label=\"Packet Loss(A)\" stats={audioStats} />\n <StatsRow show={isNotNullish(videoStats?.jitter)} label=\"Jitter(V)\" value={videoStats?.jitter?.toFixed(4)} />\n <StatsRow show={isNotNullish(audioStats?.jitter)} label=\"Jitter(A)\" value={audioStats?.jitter?.toFixed(4)} />\n </>\n );\n};\n\nconst TrackPacketsLostRow = ({\n stats,\n label,\n}: {\n stats?: Pick<HMSTrackStats, 'packetsLost' | 'packetsLostRate'>;\n label: string;\n}) => {\n const packetsLostRate = `${stats?.packetsLostRate ? stats.packetsLostRate.toFixed(2) : 0}/s`;\n\n return (\n <StatsRow\n show={isNotNullishAndNot0(stats?.packetsLost)}\n label={label}\n value={`${stats?.packetsLost}(${packetsLostRate})`}\n />\n );\n};\n\nconst RawStatsRow = ({\n label = '',\n value = '',\n tooltip = '',\n show = true,\n}: {\n label: string;\n value?: string | number;\n show?: boolean;\n tooltip?: string;\n}) => {\n const statsLabel = <Stats.Label css={{ fontWeight: !value ? '$semiBold' : '$regular' }}>{label}</Stats.Label>;\n\n return (\n <>\n {show ? (\n <Stats.Row>\n {tooltip ? (\n <Tooltip side=\"top\" title={tooltip}>\n {statsLabel}\n </Tooltip>\n ) : (\n statsLabel\n )}\n {value === '' ? <Stats.Value /> : <Stats.Value>{value}</Stats.Value>}\n </Stats.Row>\n ) : null}\n </>\n );\n};\n\n// memoize so only the rows which change rerender\nconst StatsRow = React.memo(RawStatsRow);\n\nexport function isNotNullishAndNot0(value: number | undefined | null) {\n return isNotNullish(value) && value !== 0;\n}\n\n/**\n * Check only for presence(not truthy) of a value.\n * Use in places where 0, false need to be considered valid.\n */\nexport function isNotNullish(value: number | string | undefined | null) {\n return value !== undefined && value !== null;\n}\n", "export const formatBytes = (bytes?: number, unit = 'B', decimals = 2) => {\n if (bytes === 0) {\n return `0 ${unit}`;\n }\n if (!bytes) {\n return '-';\n }\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'].map(size => size + unit);\n\n let i = Math.floor(Math.log(bytes) / Math.log(k));\n\n // B to KB\n i === 0 && i++;\n\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;\n};\n", "import { styled } from '../Theme';\n\nexport const Root = styled('div', {\n backgroundColor: 'rgba(0,0,0,0.75)',\n position: 'absolute',\n top: '$3',\n left: '$3',\n zIndex: 7,\n borderRadius: '$2',\n padding: '$2',\n fontSize: '$xs',\n overflowY: 'auto',\n maxHeight: '75%',\n maxWidth: '85%',\n});\n\nexport const Table = styled('table', {});\n\nexport const Row = styled('tr', {\n width: '100%',\n '& > * + *': {\n px: '$4',\n },\n whiteSpace: 'nowrap',\n textAlign: 'left',\n});\n\nexport const Label = styled('td', {\n color: '$on_primary_high',\n fontWeight: '$regular',\n});\n\nexport const Value = styled('td', {\n color: '$on_primary_high',\n});\n\nexport const Gap = styled('tr', {\n height: '$4',\n});\n\ninterface StatsType {\n Root: typeof Root;\n Row: typeof Row;\n Label: typeof Label;\n Value: typeof Value;\n Table: typeof Table;\n Gap: typeof Gap;\n}\n\nexport const Stats: StatsType = {\n Root,\n Row,\n Label,\n Value,\n Table,\n Gap,\n};\n", "import * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { styled } from '../Theme';\n\nconst CheckboxRoot = styled(CheckboxPrimitive.Root, {\n all: 'unset',\n border: '1px solid $primary_default',\n backgroundColor: '$on_primary_high',\n width: '$8',\n height: '$8',\n borderRadius: '$0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n boxShadow: 'none',\n outline: 'none',\n cursor: 'pointer',\n '&:focus': {\n boxShadow: 'none',\n outline: 'none',\n },\n '&[data-state=\"checked\"]': {\n backgroundColor: '$primary_default',\n },\n});\n\nconst CheckboxIndicator = styled(CheckboxPrimitive.Indicator, {\n color: '$on_primary_high',\n});\n\nexport const Checkbox = {\n Root: CheckboxRoot,\n Indicator: CheckboxIndicator,\n};\n", "import * as LabelPrimitive from '@radix-ui/react-label';\nimport { styled } from '../Theme';\n\nexport const Label = styled(LabelPrimitive.Root, {\n fontFamily: '$sans',\n fontSize: '$md',\n color: '$on_primary_high',\n});\n", "import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { styled } from '../Theme';\n\nconst RadioGroupRoot = styled(RadioGroupPrimitive.Root, {\n display: 'flex',\n alignItems: 'center',\n});\n\nconst RadioGroupItem = styled(RadioGroupPrimitive.Item, {\n bg: '$on_primary_high',\n width: '$8',\n height: '$8',\n border: '1px solid $primary_default',\n cursor: 'pointer',\n borderRadius: '$round',\n '&:focus': {\n boxShadow: 'none',\n outline: 'none',\n },\n '&[data-state=\"checked\"]': {\n borderWidth: '$space$2',\n p: '$1',\n },\n});\nconst RadioGroupIndicator = styled(RadioGroupPrimitive.Indicator, {\n bg: '$primary_default',\n});\n\nexport const RadioGroup = {\n Root: RadioGroupRoot,\n Item: RadioGroupItem,\n Indicator: RadioGroupIndicator,\n};\n", "import React, { ComponentProps } from 'react';\nimport type { ToastProps } from '@radix-ui/react-toast';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { CrossIcon } from '@100mslive/react-icons';\nimport { IconButton } from '../IconButton';\nimport { Box, Flex } from '../Layout';\nimport { Text } from '../Text';\nimport { styled } from '../Theme';\nimport { toastAnimation } from '../utils';\n\nconst getToastVariant = (base: string) => {\n return {\n borderLeftColor: base,\n borderLeft: 0,\n '&:before': {\n position: 'absolute',\n top: '-1px',\n left: '-$4',\n width: '$8',\n borderLeft: `solid $space$px ${base}`,\n borderTop: `solid $space$px ${base}`,\n borderBottom: `solid $space$px ${base}`,\n borderTopLeftRadius: '$3',\n borderBottomLeftRadius: '$3',\n bg: base,\n content: ' ',\n height: '100%',\n zIndex: 10,\n },\n '@sm': {\n '&:before': {\n content: 'none',\n },\n border: `solid $space$px ${base}`,\n },\n };\n};\n\nconst ToastRoot = styled(ToastPrimitives.Root, {\n r: '$3',\n bg: '$surface_default',\n p: '$10',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n fontFamily: '$sans',\n border: 'solid $space$px $border_bright',\n overflow: 'hidden',\n ...toastAnimation,\n '@sm': {\n p: '$8 $11',\n },\n variants: {\n variant: {\n standard: getToastVariant('$secondary_default'),\n warning: getToastVariant('$alert_warning'),\n error: getToastVariant('$alert_error_default'),\n success: getToastVariant('$alert_success'),\n },\n },\n defaultVariants: {\n variant: 'standard',\n },\n});\n\nconst ToastTitle = styled(ToastPrimitives.Title, {\n fontSize: '$md',\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\nconst ToastDescription = styled(ToastPrimitives.Description, {\n color: '$on_surface_medium',\n});\nconst ToastClose = styled(ToastPrimitives.Close, {});\nconst ToastAction = styled(ToastPrimitives.Action, {\n cursor: 'pointer',\n background: 'none',\n});\nconst ToastViewport = styled(ToastPrimitives.Viewport, {\n position: 'fixed',\n bottom: 0,\n left: 0,\n display: 'flex',\n flexDirection: 'column',\n padding: '$8',\n gap: 10,\n width: 390,\n '@sm': {\n width: '100%',\n padding: '$6',\n },\n maxWidth: '100vw',\n margin: 0,\n listStyle: 'none',\n zIndex: 1000,\n});\n\nconst DefaultClose = ({ css }: Pick<ComponentProps<typeof ToastClose>, 'css'>) => {\n return (\n <ToastClose css={css} asChild>\n <IconButton>\n <CrossIcon />\n </IconButton>\n </ToastClose>\n );\n};\n\ninterface HMSToastProps extends ToastProps {\n title: string;\n description?: string;\n isClosable?: boolean;\n icon?: React.ReactNode;\n action?: React.ReactNode;\n inlineAction?: boolean;\n}\n\nconst HMSToast: React.FC<HMSToastProps> = ({\n title,\n description,\n isClosable = true,\n icon,\n action,\n inlineAction = false,\n ...props\n}) => {\n return (\n <>\n <ToastRoot {...props}>\n <ToastTitle>\n <Flex align=\"center\" css={{ gap: '$4', flex: '1 1 0', minWidth: 0 }}>\n {icon ? <Box css={{ w: '$10', h: '$10', alignSelf: 'start', mt: '$2' }}>{icon}</Box> : null}\n <Text variant=\"sub1\" css={{ c: 'inherit', wordBreak: 'break-word' }}>\n {title}\n </Text>\n </Flex>\n {isClosable ? <DefaultClose /> : null}\n {!isClosable && inlineAction && action ? (\n <ToastAction altText={`${title}Action`}>{action}</ToastAction>\n ) : null}\n </ToastTitle>\n {description ? (\n <ToastDescription>\n <Text variant=\"body1\" css={{ fontWeight: '$regular', c: '$on_surface_medium' }}>\n {description}\n </Text>\n </ToastDescription>\n ) : null}\n {!inlineAction && action ? (\n <ToastAction altText={`${title}Action`} css={{ mt: '$10' }}>\n {action}\n </ToastAction>\n ) : null}\n </ToastRoot>\n </>\n );\n};\nexport const Toast = {\n Provider: ToastPrimitives.Provider,\n Root: ToastRoot,\n Title: ToastTitle,\n Description: ToastDescription,\n Close: DefaultClose,\n Action: ToastAction,\n Viewport: ToastViewport,\n HMSToast: HMSToast,\n};\n", "import React, { PropsWithChildren } from 'react';\nimport * as BaseAccordion from '@radix-ui/react-accordion';\nimport { CSS } from '@stitches/react';\nimport { ChevronUpIcon } from '@100mslive/react-icons';\nimport { Box } from '../Layout';\nimport { styled } from '../Theme';\nimport { slideDown, slideUp } from '../utils';\n\nconst StyledAccordion = styled(BaseAccordion.Root, {});\n\nconst StyledItem = styled(BaseAccordion.Item, {\n marginTop: '$px',\n display: 'block',\n '&:first-child': {\n marginTop: 0,\n borderTopLeftRadius: '$0',\n borderTopRightRadius: '$0',\n },\n '&:last-child': {\n borderBottomLeftRadius: '$4',\n borderBottomRightRadius: '$4',\n },\n});\n\nconst StyledHeader = styled(BaseAccordion.Header, {\n all: 'unset',\n display: 'flex',\n fontFamily: '$sans',\n});\n\nconst StyledTrigger = styled(BaseAccordion.Trigger, {\n all: 'unset',\n fontFamily: '$sans',\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n fontSize: '$md',\n lineHeight: '$md',\n color: '$on_surface_high',\n});\n\nconst StyledContent = styled(BaseAccordion.Content, {\n display: 'contents',\n fontSize: '$md',\n fontFamily: '$sans',\n color: '$on_surface_medium',\n '&[data-state=\"open\"]': {\n animation: `${slideDown('--radix-accordion-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n '&[data-state=\"closed\"]': {\n animation: `${slideUp('--radix-accordion-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n});\n\nconst StyledChevron = styled(ChevronUpIcon, {\n color: '$on_primary_high',\n transition: 'transform 300ms cubic-bezier(0.87, 0, 0.13, 1)',\n '[data-state=closed] &': { transform: 'rotate(180deg)' },\n});\n\n// Exports\nexport const AccordionRoot = StyledAccordion;\nexport const AccordionItem = StyledItem;\n\nexport const AccordionHeader: React.FC<\n PropsWithChildren<BaseAccordion.AccordionTriggerProps & { iconStyles?: CSS; css?: CSS }>\n> = React.forwardRef<\n HTMLButtonElement,\n PropsWithChildren<BaseAccordion.AccordionTriggerProps & { iconStyles?: CSS; css?: CSS }>\n>(({ children, iconStyles, css, ...props }, forwardedRef) => (\n <StyledHeader css={css}>\n <StyledTrigger {...props} ref={forwardedRef}>\n {children}\n <StyledChevron aria-hidden css={iconStyles} />\n </StyledTrigger>\n </StyledHeader>\n));\n\nexport const AccordionContent: React.FC<\n PropsWithChildren<BaseAccordion.AccordionContentProps & { contentStyles?: CSS }>\n> = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseAccordion.AccordionContentProps & { contentStyles?: CSS }>>(\n ({ children, contentStyles, ...props }, forwardedRef) => (\n <StyledContent {...props} ref={forwardedRef}>\n <Box css={contentStyles}>{children}</Box>\n </StyledContent>\n ),\n);\n", "import { AccordionContent, AccordionHeader, AccordionItem, AccordionRoot } from './Accordion';\n\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Content: AccordionContent,\n Header: AccordionHeader,\n};\n", "import { styled } from '../Theme';\n\nconst StyledFieldset = styled('fieldset', {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n border: 'none',\n backgroundColor: '$transparent',\n});\n\nexport const Fieldset = StyledFieldset;\n", "import { Flex } from '../Layout';\nimport { styled } from '../Theme';\n\nconst Root = styled(Flex, {\n justifyContent: 'space-between',\n alignItems: 'center',\n py: '$4',\n position: 'relative',\n height: '100%',\n '@md': { flexWrap: 'wrap', gap: '$4' },\n});\n\nconst Left = styled(Flex, {\n alignItems: 'center',\n position: 'absolute',\n left: '$10',\n gap: '$8',\n '@md': {\n position: 'unset',\n justifyContent: 'center',\n w: '100%',\n },\n});\n\nconst Center = styled(Flex, {\n w: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n gap: '$8',\n});\n\nconst Right = styled(Flex, {\n alignItems: 'center',\n position: 'absolute',\n right: '$10',\n gap: '$8',\n '@md': {\n display: 'none',\n },\n});\n\nexport const Footer = {\n Root,\n Left,\n Center,\n Right,\n};\n", "export { Select } from './ReactSelect';\n", "import * as SelectPrimitive from '@radix-ui/react-select';\nimport { styled } from '../Theme';\n\nconst StyledRoot = styled(SelectPrimitive.Root, {});\n\nconst StyledTrigger = styled(SelectPrimitive.SelectTrigger, {\n all: 'unset',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '$2',\n padding: '$8',\n lineHeight: '$px',\n gap: '$8',\n backgroundColor: '$secondary_default',\n color: '$on_primary_high',\n fontSize: '$8',\n cursor: 'pointer',\n r: '$1',\n});\n\nconst StyledContent = styled(SelectPrimitive.Content, {\n overflow: 'hidden',\n backgroundColor: '$surface_bright',\n r: '$1',\n h: '$80',\n});\n\nconst StyledViewport = styled(SelectPrimitive.Viewport, {\n padding: '$3',\n});\n\nconst StyledItem = styled(SelectPrimitive.Item, {\n all: 'unset',\n fontSize: '$7',\n r: '$1',\n display: 'flex',\n p: '$4 $8',\n w: '$52',\n position: 'relative',\n userSelect: 'none',\n cursor: 'pointer',\n});\n\nconst StyledLabel = styled(SelectPrimitive.Label, {\n p: '$4 $8',\n lineHeight: '$10',\n color: '$on_primary_high',\n});\n\nconst StyledSeparator = styled(SelectPrimitive.Separator, {\n height: '$px',\n backgroundColor: '$on_primary_high',\n margin: '$4',\n opacity: 0.4,\n});\n\nconst StyledItemIndicator = styled(SelectPrimitive.ItemIndicator, {\n position: 'absolute',\n right: '$8',\n width: '$8',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '$on_primary_high',\n});\n\nconst scrollButtonStyles = {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n p: '$4',\n backgroundColor: '$surface_bright',\n color: '$on_primary_high',\n cursor: 'default',\n};\n\nconst StyledScrollUpButton = styled(SelectPrimitive.ScrollUpButton, scrollButtonStyles);\n\nconst StyledScrollDownButton = styled(SelectPrimitive.ScrollDownButton, scrollButtonStyles);\n\nexport const Select = {\n Root: StyledRoot,\n Trigger: StyledTrigger,\n Content: StyledContent,\n Viewport: StyledViewport,\n Item: StyledItem,\n Label: StyledLabel,\n Separator: StyledSeparator,\n ItemIndicator: StyledItemIndicator,\n ScrollUpButton: StyledScrollUpButton,\n ScrollDownButton: StyledScrollDownButton,\n Value: SelectPrimitive.Value,\n Icon: SelectPrimitive.Icon,\n ItemText: SelectPrimitive.ItemText,\n Group: SelectPrimitive.Group,\n};\n", "import * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { styled } from '../Theme';\n\nconst StyledTabsRoot = styled(TabsPrimitive.Root, {\n display: 'flex',\n});\n\nconst StyledList = styled(TabsPrimitive.List, {\n flexShrink: 0,\n display: 'flex',\n});\n\nconst StyledTrigger = styled(TabsPrimitive.Trigger, {\n all: 'unset',\n fontFamily: '$sans',\n p: '$8',\n display: 'flex',\n alignItems: 'center',\n fontSize: '$sm',\n lineHeight: '$sm',\n color: '$on_surface_high',\n userSelect: 'none',\n cursor: 'pointer',\n '&[data-state=\"active\"]': {\n bg: '$surface_brighter',\n r: '$1',\n },\n});\n\nconst StyledContent = styled(TabsPrimitive.Content, {\n flex: '1 1 0',\n padding: '$10',\n outline: 'none',\n});\n\nexport const Tabs = {\n Root: StyledTabsRoot,\n List: StyledList,\n Content: StyledContent,\n Trigger: StyledTrigger,\n};\n", "import React, { ComponentProps } from 'react';\nimport { QRCodeSVG } from 'qrcode.react';\n\nexport const QRCode = (props: ComponentProps<typeof QRCodeSVG>) => {\n return <QRCodeSVG style={{ width: '100%', height: '100%' }} {...props} />;\n};\n", "import React from 'react';\nimport * as icons from '@100mslive/react-icons';\nimport { Flex } from '../Layout';\nimport { Text } from '../Text';\nimport { styled } from '../Theme';\n\nconst LinkComponent = styled('a', {\n textDecoration: 'none',\n display: 'flex',\n alignItems: 'center',\n gap: '$5',\n variants: {\n color: {\n highEmp: {\n color: '$on_surface_high',\n '&:hover': {\n color: '$on_surface_medium',\n },\n },\n primary: {\n color: '$primary_default',\n '&:hover': {\n color: '$primary_bright',\n },\n },\n },\n },\n});\n\nexport interface LinkProps extends React.ComponentProps<typeof LinkComponent> {\n as?: React.ElementType;\n iconSide?: 'left' | 'right' | 'none';\n icon?: keyof typeof icons;\n color?: 'highEmp' | 'primary';\n}\n\nexport const Link = ({ iconSide = 'left', icon, color = 'primary', children, ...rest }: LinkProps) => {\n const Icon = icon ? icons[icon] : React.Fragment;\n const renderedIcon = icon ? (\n <Flex as=\"span\">\n <Icon height={13.33} width={13.33} />{' '}\n </Flex>\n ) : null;\n\n return (\n <LinkComponent {...rest} color={color}>\n {iconSide === 'left' && renderedIcon}\n <Text as=\"span\" variant=\"body2\" css={{ color: 'inherit' }}>\n {children}\n </Text>\n {iconSide === 'right' && renderedIcon}\n </LinkComponent>\n );\n};\n", "import { Content, Root, Trigger } from '@radix-ui/react-collapsible';\nimport { styled } from '../Theme';\nimport { slideDown, slideUp } from '../utils';\n\nconst CollapsibleRoot = styled(Root, {});\n\nconst CollapsibleTrigger = styled(Trigger, {\n cursor: 'pointer',\n appearance: 'none !important',\n '&:focus': {\n outline: 'none',\n },\n '&:focus-visible': {\n boxShadow: '0 0 0 3px $colors$primary_default',\n },\n});\n\nconst CollapsibleContent = styled(Content, {\n w: '$80',\n r: '$1',\n overflowY: 'auto',\n '&[data-state=\"open\"]': {\n animation: `${slideDown('--radix-collapsible-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n '&[data-state=\"closed\"]': {\n animation: `${slideUp('--radix-collapsible-content-height')} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,\n },\n});\n\nexport const Collapsible = {\n Root: CollapsibleRoot,\n Trigger: CollapsibleTrigger,\n Content: CollapsibleContent,\n};\n", "import React, { MutableRefObject, useEffect, useRef } from 'react';\nimport { HMSStatsStoreWrapper, HMSStoreWrapper, IHMSNotifications } from '@100mslive/hms-video-store';\nimport { Layout, Logo, Screens, Theme, Typography } from '@100mslive/types-prebuilt';\nimport {\n HMSActions,\n HMSReactiveStore,\n HMSRoomProvider,\n selectIsConnectedToRoom,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { AppData } from './components/AppData/AppData';\n// @ts-ignore: No implicit Any\nimport AuthToken from './components/AuthToken';\nimport { ConferenceScreen } from './components/ConferenceScreen';\n// @ts-ignore: No implicit Any\nimport { ErrorBoundary } from './components/ErrorBoundary';\n// @ts-ignore: No implicit Any\nimport { Init } from './components/init/Init';\n// @ts-ignore: No implicit Any\nimport { KeyboardHandler } from './components/Input/KeyboardInputManager';\nimport { LeaveScreen } from './components/LeaveScreen';\nimport { MwebLandscapePrompt } from './components/MwebLandscapePrompt';\nimport { Notifications } from './components/Notifications';\nimport { PreviewScreen } from './components/Preview/PreviewScreen';\n// @ts-ignore: No implicit Any\nimport { ToastContainer } from './components/Toast/ToastContainer';\nimport { RoomLayoutContext, RoomLayoutProvider, useRoomLayout } from './provider/roomLayoutProvider';\nimport { DialogContainerProvider } from '../context/DialogContext';\nimport { Box } from '../Layout';\nimport { globalStyles, HMSThemeProvider } from '../Theme';\nimport { HMSPrebuiltContext } from './AppContext';\nimport { AppStateContext, PrebuiltStates, useAppStateManager } from './AppStateContext';\n// @ts-ignore: No implicit Any\nimport { FlyingEmoji } from './plugins/FlyingEmoji';\n// @ts-ignore: No implicit Any\nimport { RemoteStopScreenshare } from './plugins/RemoteStopScreenshare';\n// @ts-ignore: No implicit Any\nimport { useIsNotificationDisabled } from './components/AppData/useUISettings';\nimport { useAutoStartStreaming } from './components/hooks/useAutoStartStreaming';\nimport {\n useRoomLayoutLeaveScreen,\n useRoomLayoutPreviewScreen,\n} from './provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { FeatureFlags } from './services/FeatureFlags';\n// @ts-ignore: No implicit Any\nimport { DEFAULT_PORTAL_CONTAINER } from './common/constants';\n\nexport type HMSPrebuiltOptions = {\n userName?: string;\n userId?: string;\n endpoints?: object;\n};\n\nexport type HMSPrebuiltProps = {\n roomCode?: string;\n logo?: Logo;\n typography?: Typography;\n themes?: Theme[];\n options?: HMSPrebuiltOptions;\n screens?: Screens;\n authToken?: string;\n roomId?: string;\n role?: string;\n onLeave?: () => void;\n onJoin?: () => void;\n /**\n * @remarks\n * Specify css selectors for the HTML element to be used as container for dialogs. Affects the positioning and focus of dialogs.\n */\n containerSelector?: string;\n};\n\nexport type HMSPrebuiltRefType = {\n hmsActions: HMSActions;\n hmsStore: HMSStoreWrapper;\n hmsStats: HMSStatsStoreWrapper;\n hmsNotifications: IHMSNotifications;\n};\n\nexport const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps>(\n (\n {\n roomCode = '',\n authToken = '',\n roomId = '',\n role = '',\n containerSelector = DEFAULT_PORTAL_CONTAINER,\n logo,\n typography,\n themes,\n options: { userName = '', userId = '', endpoints } = {},\n screens,\n onLeave,\n onJoin,\n },\n ref,\n ) => {\n const metadata = '';\n const reactiveStore = useRef<HMSPrebuiltRefType>();\n\n const [hydrated, setHydrated] = React.useState(false);\n useEffect(() => {\n setHydrated(true);\n const hms = new HMSReactiveStore();\n const hmsStore = hms.getStore();\n const hmsActions = hms.getActions();\n const hmsNotifications = hms.getNotifications();\n const hmsStats = hms.getStats();\n hms.triggerOnSubscribe();\n\n reactiveStore.current = {\n hmsActions,\n hmsStats,\n hmsStore,\n hmsNotifications,\n };\n }, []);\n\n useEffect(() => {\n if (!ref || !reactiveStore.current) {\n return;\n }\n (ref as MutableRefObject<HMSPrebuiltRefType>).current = { ...reactiveStore.current };\n }, [ref]);\n\n // leave room when component unmounts\n useEffect(\n () => () => {\n reactiveStore?.current?.hmsActions.leave();\n },\n [],\n );\n\n const endpointsObj = endpoints as\n | {\n init: string;\n tokenByRoomCode: string;\n tokenByRoomIdRole: string;\n roomLayout: string;\n }\n | undefined;\n const tokenByRoomCodeEndpoint: string = endpointsObj?.tokenByRoomCode || '';\n const initEndpoint: string = endpointsObj?.init || '';\n const roomLayoutEndpoint: string = endpointsObj?.roomLayout || '';\n const tokenByRoomIdRoleEndpoint: string = endpointsObj?.tokenByRoomIdRole || '';\n\n const overrideLayout: Partial<Layout> = {\n logo,\n themes,\n typography,\n screens,\n };\n\n if (!roomCode && !(authToken && roomId && role)) {\n console.error(`\n HMSPrebuilt can be initialised by providing: \n either just \"roomCode\" or \"authToken\" and \"roomId\" and \"role\".\n Please check if you are providing the above values for initialising prebuilt.\n `);\n throw Error('Incorrect initializing params for HMSPrebuilt component');\n }\n\n if (!hydrated) {\n return null;\n }\n\n globalStyles();\n\n return (\n <ErrorBoundary>\n <HMSPrebuiltContext.Provider\n value={{\n roomCode,\n roomId,\n role,\n containerSelector,\n onLeave,\n onJoin,\n userName,\n userId,\n endpoints: {\n tokenByRoomCode: tokenByRoomCodeEndpoint,\n init: initEndpoint,\n tokenByRoomIdRole: tokenByRoomIdRoleEndpoint,\n roomLayout: roomLayoutEndpoint,\n },\n }}\n >\n <HMSRoomProvider\n isHMSStatsOn={FeatureFlags.enableStatsForNerds}\n actions={reactiveStore.current?.hmsActions}\n store={reactiveStore.current?.hmsStore}\n notifications={reactiveStore.current?.hmsNotifications}\n stats={reactiveStore.current?.hmsStats}\n >\n <RoomLayoutProvider roomLayoutEndpoint={roomLayoutEndpoint} overrideLayout={overrideLayout}>\n <RoomLayoutContext.Consumer>\n {data => {\n const layout = data?.layout;\n const theme: Theme = layout?.themes?.[0] || ({} as Theme);\n const { typography } = layout || {};\n let fontFamily = ['sans-serif'];\n if (typography?.font_family) {\n fontFamily = [`${typography?.font_family}`, ...fontFamily];\n }\n\n return (\n <HMSThemeProvider\n // issue is with stichtes caching the theme using the theme name / class\n // no updates to the themes are fired if the name is same.\n // TODO: cache the theme and do deep check to trigger name change in the theme\n themeType={`${theme.name}-${Date.now()}`}\n theme={{\n //@ts-ignore: Prebuilt theme to match stiches theme\n colors: theme.palette,\n fonts: {\n //@ts-ignore: font list to match token types of stiches\n sans: fontFamily,\n },\n }}\n >\n <AppData appDetails={metadata} tokenEndpoint={tokenByRoomIdRoleEndpoint} />\n <Init />\n <DialogContainerProvider dialogContainerSelector={containerSelector}>\n <Box\n id={DEFAULT_PORTAL_CONTAINER.slice(1)} //Skips the #\n css={{\n bg: '$background_dim',\n size: '100%',\n lineHeight: '1.5',\n '-webkit-text-size-adjust': '100%',\n position: 'relative',\n }}\n >\n <AppRoutes\n authTokenByRoomCodeEndpoint={tokenByRoomCodeEndpoint}\n defaultAuthToken={authToken}\n />\n </Box>\n </DialogContainerProvider>\n </HMSThemeProvider>\n );\n }}\n </RoomLayoutContext.Consumer>\n </RoomLayoutProvider>\n </HMSRoomProvider>\n </HMSPrebuiltContext.Provider>\n </ErrorBoundary>\n );\n },\n);\n\nHMSPrebuilt.displayName = 'HMSPrebuilt';\n\nconst AppStates = ({ activeState }: { activeState: PrebuiltStates }) => {\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();\n useAutoStartStreaming();\n\n if (activeState === PrebuiltStates.PREVIEW && isPreviewScreenEnabled) {\n return <PreviewScreen />;\n } else if (activeState === PrebuiltStates.LEAVE && isLeaveScreenEnabled) {\n return <LeaveScreen />;\n }\n return <ConferenceScreen />;\n};\n\nconst BackSwipe = () => {\n const isConnectedToRoom = useHMSStore(selectIsConnectedToRoom);\n const hmsActions = useHMSActions();\n useEffect(() => {\n const onRouteLeave = async () => {\n if (isConnectedToRoom) {\n await hmsActions.leave();\n }\n };\n window.addEventListener('popstate', onRouteLeave);\n return () => {\n window.removeEventListener('popstate', onRouteLeave);\n };\n }, [hmsActions, isConnectedToRoom]);\n return null;\n};\n\nfunction AppRoutes({\n authTokenByRoomCodeEndpoint,\n defaultAuthToken,\n}: {\n authTokenByRoomCodeEndpoint: string;\n defaultAuthToken?: string;\n}) {\n const roomLayout = useRoomLayout();\n const isNotificationsDisabled = useIsNotificationDisabled();\n const { activeState, rejoin } = useAppStateManager();\n\n return (\n <AppStateContext.Provider value={{ rejoin }}>\n <>\n <ToastContainer />\n <Notifications />\n <MwebLandscapePrompt />\n <BackSwipe />\n {!isNotificationsDisabled && <FlyingEmoji />}\n <RemoteStopScreenshare />\n <KeyboardHandler />\n <AuthToken authTokenByRoomCodeEndpoint={authTokenByRoomCodeEndpoint} defaultAuthToken={defaultAuthToken} />\n {roomLayout && activeState && <AppStates activeState={activeState} />}\n </>\n </AppStateContext.Provider>\n );\n}\n", "import React, { useEffect } from 'react';\nimport {\n HMSRoomState,\n selectAvailableRoleNames,\n selectFullAppData,\n selectHLSState,\n selectIsConnectedToRoom,\n selectLocalPeerRoleName,\n selectRolesMap,\n selectRoomState,\n selectRTMPState,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { normalizeAppPolicyConfig } from '../init/initUtils';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\nimport { useIsSidepaneTypeOpen, useSidepaneReset, useSidepaneState, useSidepaneToggle } from './useSidepane';\nimport { useSetAppDataByKey } from './useUISettings';\nimport {\n APP_DATA,\n CHAT_SELECTOR,\n DEFAULT_WAITING_VIEWER_ROLE,\n POLL_STATE,\n SIDE_PANE_OPTIONS,\n UI_MODE_GRID,\n UI_SETTINGS,\n} from '../../common/constants';\n\nexport const getAppDetails = appDetails => {\n try {\n return !appDetails ? {} : JSON.parse(appDetails);\n } catch (error) {\n return {};\n }\n};\n\nconst initialAppData = {\n [APP_DATA.uiSettings]: {\n [UI_SETTINGS.isAudioOnly]: false,\n [UI_SETTINGS.maxTileCount]: 9,\n [UI_SETTINGS.showStatsOnTiles]: false,\n [UI_SETTINGS.enableAmbientMusic]: false,\n [UI_SETTINGS.uiViewMode]: UI_MODE_GRID,\n [UI_SETTINGS.mirrorLocalVideo]: true,\n },\n [APP_DATA.subscribedNotifications]: {\n PEER_JOINED: false,\n PEER_LEFT: false,\n NEW_MESSAGE: true,\n ERROR: true,\n METADATA_UPDATED: true,\n },\n [APP_DATA.chatOpen]: false,\n [APP_DATA.chatSelector]: {\n [CHAT_SELECTOR.ROLE]: '',\n [CHAT_SELECTOR.PEER_ID]: '',\n },\n [APP_DATA.chatDraft]: '',\n [APP_DATA.sidePane]: '',\n [APP_DATA.hlsStarted]: false,\n [APP_DATA.rtmpStarted]: false,\n [APP_DATA.recordingStarted]: false,\n [APP_DATA.waitingViewerRole]: DEFAULT_WAITING_VIEWER_ROLE,\n [APP_DATA.dropdownList]: [],\n [APP_DATA.authToken]: '',\n [APP_DATA.minimiseInset]: false,\n [APP_DATA.activeScreensharePeerId]: '',\n [APP_DATA.disableNotifications]: false,\n [APP_DATA.pollState]: {\n [POLL_STATE.pollInView]: '',\n [POLL_STATE.view]: '',\n },\n};\n\nexport const AppData = React.memo(({ appDetails, tokenEndpoint }) => {\n const hmsActions = useHMSActions();\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const sidePane = useSidepaneState();\n const resetSidePane = useSidepaneReset();\n const [preferences = {}] = useUserPreferences(UserPreferencesKeys.UI_SETTINGS);\n const roleNames = useHMSStore(selectAvailableRoleNames);\n const rolesMap = useHMSStore(selectRolesMap);\n const localPeerRole = useHMSStore(selectLocalPeerRoleName);\n const appData = useHMSStore(selectFullAppData);\n\n useEffect(() => {\n if (!isConnected && sidePane && sidePane !== SIDE_PANE_OPTIONS.PARTICIPANTS) {\n resetSidePane();\n }\n }, [isConnected, sidePane, resetSidePane]);\n\n useEffect(() => {\n hmsActions.initAppData({\n ...initialAppData,\n ...appData,\n });\n hmsActions.setFrameworkInfo({\n type: 'react-web',\n isPrebuilt: true,\n version: React.version,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hmsActions]);\n\n useEffect(() => {\n const uiSettings = preferences || {};\n const updatedSettings = {\n ...uiSettings,\n [UI_SETTINGS.uiViewMode]: uiSettings.uiViewMode || UI_MODE_GRID,\n };\n hmsActions.setAppData(APP_DATA.uiSettings, updatedSettings, true);\n }, [preferences, hmsActions]);\n\n useEffect(() => {\n const appData = {\n [APP_DATA.tokenEndpoint]: tokenEndpoint,\n [APP_DATA.appConfig]: getAppDetails(appDetails),\n };\n for (const key in appData) {\n hmsActions.setAppData([key], appData[key]);\n }\n }, [appDetails, tokenEndpoint, hmsActions]);\n\n useEffect(() => {\n if (!preferences.subscribedNotifications) {\n return;\n }\n hmsActions.setAppData(APP_DATA.subscribedNotifications, preferences.subscribedNotifications, true);\n }, [preferences.subscribedNotifications, hmsActions]);\n\n useEffect(() => {\n if (localPeerRole) {\n const config = normalizeAppPolicyConfig(roleNames, rolesMap);\n hmsActions.setAppData(APP_DATA.appLayout, config[localPeerRole]);\n }\n }, [roleNames, rolesMap, localPeerRole, hmsActions]);\n\n return <ResetStreamingStart />;\n});\n\n/**\n * reset hlsStarted, rtmpStarted values when streaming starts\n */\nconst ResetStreamingStart = () => {\n const { isHLSRunning, isRTMPRunning, isBrowserRecordingOn } = useRecordingStreaming();\n const hlsError = useHMSStore(selectHLSState).error;\n const rtmpError = useHMSStore(selectRTMPState).error;\n const roomState = useHMSStore(selectRoomState);\n const [hlsStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const [recordingStarted, setRecordingStarted] = useSetAppDataByKey(APP_DATA.recordingStarted);\n const [rtmpStarted, setRTMPStarted] = useSetAppDataByKey(APP_DATA.rtmpStarted);\n const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);\n const isStreamingOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.STREAMING);\n\n useEffect(() => {\n if (isBrowserRecordingOn && recordingStarted) {\n setRecordingStarted(false);\n }\n }, [isBrowserRecordingOn, recordingStarted, setRecordingStarted]);\n /**\n * Reset on leave\n */\n useEffect(() => {\n if (roomState === HMSRoomState.Disconnected) {\n setHLSStarted(false);\n setRecordingStarted(false);\n setRTMPStarted(false);\n }\n }, [roomState, setHLSStarted, setRTMPStarted, setRecordingStarted]);\n useEffect(() => {\n if (isHLSRunning || hlsError) {\n if (hlsStarted) {\n setHLSStarted(false);\n if (isStreamingOpen) {\n toggleStreaming();\n }\n }\n }\n }, [isHLSRunning, hlsStarted, setHLSStarted, hlsError, isStreamingOpen, toggleStreaming]);\n useEffect(() => {\n if (isRTMPRunning || rtmpError || isBrowserRecordingOn) {\n if (rtmpStarted) {\n setRTMPStarted(false);\n if (isStreamingOpen) {\n toggleStreaming();\n }\n }\n }\n }, [isRTMPRunning, setRTMPStarted, rtmpStarted, rtmpError, isBrowserRecordingOn, isStreamingOpen, toggleStreaming]);\n return null;\n};\n", "// interface RoleConfig {\n// center?: HMSRoleName[];\n// sidepane?: HMSRoleName[];\n// selfRoleChangeTo?: HMSRoleName[];\n// remoteRoleChangeFor?: HMSRoleName[];\n// }\n\n// interface PolicyConfig {\n// [role: string]: RoleConfig;\n// }\n\n/**\n * check if a role is allowed to publish either of audio or video\n */\nfunction canPublishAV(role) {\n const params = role?.publishParams;\n if (params?.allowed) {\n return params.allowed.includes('video') || params.allowed.includes('audio');\n }\n return false;\n}\n\n/**\n * Figure out the layout for each role. There is some extra work being done\n * here currently to figure out the layout for roles other than local peer too\n * which can be avoided.\n */\nexport const normalizeAppPolicyConfig = (roleNames, rolesMap, appPolicyConfig = {}) => {\n const newConfig = Object.assign({}, appPolicyConfig);\n // eslint-disable-next-line complexity\n roleNames.forEach(roleName => {\n if (!newConfig[roleName]) {\n newConfig[roleName] = {};\n }\n const subscribedRoles = rolesMap[roleName].subscribeParams?.subscribeToRoles || [];\n\n const isNotSubscribingOrSubscribingToSelf =\n subscribedRoles.length === 0 || (subscribedRoles.length === 1 && subscribedRoles[0] === roleName);\n if (!newConfig[roleName].center) {\n const publishingRoleNames = roleNames.filter(\n roleName => canPublishAV(rolesMap[roleName]) && subscribedRoles.includes(roleName),\n );\n if (isNotSubscribingOrSubscribingToSelf) {\n newConfig[roleName].center = [roleName];\n } else {\n // all other publishing roles apart from local role in center by default\n newConfig[roleName].center = publishingRoleNames.filter(rName => rName !== roleName);\n }\n }\n // everyone from my role is in sidepane by default if they can publish\n if (!newConfig[roleName].sidepane) {\n if (isNotSubscribingOrSubscribingToSelf) {\n newConfig[roleName].sidepane = [];\n } else {\n newConfig[roleName].sidepane = canPublishAV(rolesMap[roleName]) ? [roleName] : [];\n }\n }\n if (!newConfig[roleName].selfRoleChangeTo) {\n newConfig[roleName].selfRoleChangeTo = roleNames;\n }\n if (!newConfig[roleName].remoteRoleChangeFor) {\n newConfig[roleName].remoteRoleChangeFor = roleNames;\n }\n });\n\n return newConfig;\n};\n", "import { useState } from 'react';\nimport { useLocalStorage } from 'react-use';\n\nexport const UserPreferencesKeys = {\n PREVIEW: 'preview',\n NOTIFICATIONS: 'notifications',\n UI_SETTINGS: 'uiSettings',\n RTMP_URLS: 'rtmpUrls',\n};\n\nexport const defaultPreviewPreference = {\n name: '',\n isAudioMuted: false,\n isVideoMuted: false,\n};\n\nexport const useUserPreferences = (key, defaultPreference) => {\n const [localStorageValue, setStorageValue] = useLocalStorage(key, defaultPreference);\n const [preference, setPreference] = useState(localStorageValue || defaultPreference);\n const changePreference = value => {\n setPreference(value);\n setStorageValue(value);\n };\n return [preference, changePreference];\n};\n", "import { useCallback } from 'react';\nimport { selectAppData, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { usePollViewState } from './useUISettings';\nimport { APP_DATA, POLL_STATE, POLL_VIEWS, SIDE_PANE_OPTIONS } from '../../common/constants';\n\n/**\n * Gives a boolean value if the sidepaneType matches current sidepane value in store\n * @param {string} sidepaneType\n * @returns {boolean} - if the sidepaneType is passed returns boolean else the current value\n */\nexport const useIsSidepaneTypeOpen = sidepaneType => {\n if (!sidepaneType) {\n throw Error('Pass one of the side pane options');\n }\n return useHMSStore(selectAppData(APP_DATA.sidePane)) === sidepaneType;\n};\n\n/**\n * Gives the current value of sidepane in store\n * @returns {string} - if the sidepaneType is passed returns boolean else the current value\n */\nexport const useSidepaneState = () => {\n const sidePane = useHMSStore(selectAppData(APP_DATA.sidePane));\n return sidePane;\n};\n\n/**\n * Toggle the sidepane value between passed sidePaneType and '';\n * @param {string} sidepaneType\n */\nexport const useSidepaneToggle = sidepaneType => {\n const hmsActions = useHMSActions();\n const vanillaStore = useHMSVanillaStore();\n const toggleSidepane = useCallback(() => {\n const isOpen = vanillaStore.getState(selectAppData(APP_DATA.sidePane)) === sidepaneType;\n hmsActions.setAppData(APP_DATA.sidePane, !isOpen ? sidepaneType : '');\n }, [vanillaStore, hmsActions, sidepaneType]);\n return toggleSidepane;\n};\n\nexport const usePollViewToggle = () => {\n const { view, setPollState } = usePollViewState();\n const isOpen = useSidepaneState() === SIDE_PANE_OPTIONS.POLLS;\n const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.POLLS);\n\n const togglePollView = useCallback(\n id => {\n id = typeof id === 'string' ? id : undefined;\n setPollState({\n [POLL_STATE.pollInView]: id,\n [POLL_STATE.view]: id ? POLL_VIEWS.VOTE : isOpen && view ? null : POLL_VIEWS.CREATE_POLL_QUIZ,\n });\n toggleSidepane();\n },\n [view, setPollState, isOpen, toggleSidepane],\n );\n\n return togglePollView;\n};\n\n/**\n * reset's the sidepane value\n */\nexport const useSidepaneReset = () => {\n const hmsActions = useHMSActions();\n const resetSidepane = useCallback(() => {\n hmsActions.setAppData(APP_DATA.sidePane, '');\n hmsActions.setAppData(APP_DATA.pollInView, '');\n }, [hmsActions]);\n return resetSidepane;\n};\n", "import { useCallback, useMemo } from 'react';\nimport {\n selectAppData,\n selectAppDataByPath,\n selectAudioTrackByPeerID,\n selectPermissions,\n selectPolls,\n selectSessionStore,\n selectTrackByID,\n selectVideoTrackByPeerID,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\nimport { APP_DATA, POLL_STATE, SESSION_STORE_KEY } from '../../common/constants';\n\n/**\n * fields saved related to UI settings in store's app data can be\n * accessed using this hook. key is optional if not passed\n * the whole UI settings object is returned. Usage -\n * 1. val = useUiSettings(\"isAudioOnly\");\n * console.log(val); // false\n * 2. val = useUISettings();\n * console.log(val); // {isAudioOnly: false}\n * @param {string | undefined} uiSettingKey\n */\nexport const useUISettings = uiSettingKey => {\n const uiSettings = useHMSStore(selectAppDataByPath(APP_DATA.uiSettings, uiSettingKey));\n return uiSettings;\n};\n\n/**\n * fields saved related to UI settings in store's app data can be\n * accessed using this hook. key is optional if not passed\n * the whole UI settings object is returned. Usage -\n * [val, setVal] = useUiSettings(\"isAudioOnly\");\n * console.log(val); // false\n * setVal(true);\n * @param {string} uiSettingKey\n */\nexport const useSetUiSettings = uiSettingKey => {\n const value = useUISettings(uiSettingKey);\n const setValue = useSetAppData({\n key1: APP_DATA.uiSettings,\n key2: uiSettingKey,\n });\n return [value, setValue];\n};\n\nexport const useWaitingViewerRole = () => {\n return useHMSStore(selectAppData(APP_DATA.waitingViewerRole));\n};\nexport const useIsHLSStartedFromUI = () => {\n return useHMSStore(selectAppData(APP_DATA.hlsStarted));\n};\n\nexport const useIsRTMPStartedFromUI = () => {\n return useHMSStore(selectAppData(APP_DATA.rtmpStarted));\n};\n\nexport const useTokenEndpoint = () => {\n return useHMSStore(selectAppData(APP_DATA.tokenEndpoint));\n};\n\nexport const useAuthToken = () => {\n return useHMSStore(selectAppData(APP_DATA.authToken));\n};\n\nexport const useUrlToEmbed = () => {\n return useHMSStore(selectAppData(APP_DATA.embedConfig))?.url;\n};\n\nexport const usePDFConfig = () => {\n return useHMSStore(selectAppData(APP_DATA.pdfConfig));\n};\n\nexport const useResetPDFConfig = () => {\n const [, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);\n return useCallback(() => setPDFConfig(), [setPDFConfig]);\n};\n\nexport const useResetEmbedConfig = () => {\n const [, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);\n return () => setEmbedConfig();\n};\nexport const usePinnedTrack = () => {\n const pinnedTrackId = useHMSStore(selectAppData(APP_DATA.pinnedTrackId));\n const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));\n const spotlightVideoTrackId = useHMSStore(selectVideoTrackByPeerID(spotlightPeerId))?.id;\n const spotlightAudioTrackId = useHMSStore(selectAudioTrackByPeerID(spotlightPeerId))?.id;\n return useHMSStore(selectTrackByID(pinnedTrackId || spotlightVideoTrackId || spotlightAudioTrackId));\n};\n\nexport const useSubscribedNotifications = notificationKey => {\n const notificationPreference = useHMSStore(selectAppDataByPath(APP_DATA.subscribedNotifications, notificationKey));\n return notificationPreference;\n};\n\nexport const useIsNotificationDisabled = () => {\n const notificationPreference = useHMSStore(selectAppDataByPath(APP_DATA.disableNotifications));\n return notificationPreference;\n};\n\nexport const useSetSubscribedNotifications = notificationKey => {\n const value = useSubscribedNotifications(notificationKey);\n const setValue = useSetAppData({\n key1: APP_DATA.subscribedNotifications,\n key2: notificationKey,\n });\n return [value, setValue];\n};\n\nexport const useSubscribeChatSelector = chatSelectorKey => {\n const chatSelectorPreference = useHMSStore(selectAppDataByPath(APP_DATA.chatSelector, chatSelectorKey));\n return chatSelectorPreference;\n};\n\nexport const useSetSubscribedChatSelector = chatSelectorKey => {\n const value = useSubscribeChatSelector(chatSelectorKey);\n const setValue = useSetAppData({\n key1: APP_DATA.chatSelector,\n key2: chatSelectorKey,\n });\n return [value, setValue];\n};\n\nexport const useSetAppDataByKey = appDataKey => {\n const value = useHMSStore(selectAppData(appDataKey));\n const actions = useHMSActions();\n const setValue = useCallback(\n value => {\n actions.setAppData(appDataKey, value);\n },\n [actions, appDataKey],\n );\n return [value, setValue];\n};\n\nconst useSetAppData = ({ key1, key2 }) => {\n const actions = useHMSActions();\n const store = useHMSVanillaStore();\n const [, setPreferences] = useUserPreferences(UserPreferencesKeys.UI_SETTINGS);\n const setValue = useCallback(\n value => {\n if (!key1) {\n return;\n }\n actions.setAppData(\n key1,\n key2\n ? {\n [key2]: value,\n }\n : value,\n true,\n );\n const appData = store.getState(selectAppData());\n setPreferences({\n ...appData.uiSettings,\n subscribedNotifications: appData.subscribedNotifications,\n });\n },\n [actions, key1, key2, store, setPreferences],\n );\n return setValue;\n};\n\nexport const useShowPolls = () => {\n const permissions = useHMSStore(selectPermissions);\n const polls = useHMSStore(selectPolls)?.filter(poll => poll.state === 'started' || poll.state === 'stopped');\n\n const showPolls = useMemo(() => {\n return permissions?.pollWrite || (permissions?.pollRead && polls?.length > 0);\n }, [permissions?.pollRead, permissions?.pollWrite, polls?.length]);\n\n return { showPolls };\n};\n\nexport const usePollViewState = () => {\n const [pollState, setPollState] = useSetAppDataByKey(APP_DATA.pollState);\n\n const setPollView = useCallback(\n view => {\n setPollState({\n [POLL_STATE.pollInView]: pollState?.pollInView,\n [POLL_STATE.view]: view,\n });\n },\n [pollState?.pollInView, setPollState],\n );\n\n return {\n setPollState,\n setPollView,\n pollInView: pollState?.pollInView,\n view: pollState?.view,\n };\n};\n", "import { parsedUserAgent } from '@100mslive/react-sdk';\n\nexport const DEFAULT_WAITING_VIEWER_ROLE = 'waiting-room';\nexport const QUERY_PARAM_SKIP_PREVIEW = 'skip_preview';\nexport const QUERY_PARAM_SKIP_PREVIEW_HEADFUL = 'skip_preview_headful';\nexport const QUERY_PARAM_NAME = 'name';\nexport const QUERY_PARAM_VIEW_MODE = 'ui_mode';\nexport const QUERY_PARAM_PREVIEW_AS_ROLE = 'preview_as_role';\nexport const UI_MODE_GRID = 'grid';\nexport const MAX_TOASTS = 5;\nexport const RTMP_RECORD_RESOLUTION_MIN = 480;\nexport const RTMP_RECORD_RESOLUTION_MAX = 1280;\nexport const RTMP_RECORD_DEFAULT_RESOLUTION = {\n width: 1280,\n height: 720,\n};\nexport const EMOJI_REACTION_TYPE = 'EMOJI_REACTION';\n\nexport const CHAT_SELECTOR = {\n PEER_ID: 'peer_id',\n ROLE: 'role',\n};\n\nexport const APP_DATA = {\n uiSettings: 'uiSettings',\n chatOpen: 'chatOpen',\n chatSelector: 'chatSelector',\n chatDraft: 'chatDraft',\n appConfig: 'appConfig',\n sidePane: 'sidePane',\n hlsStats: 'hlsStats',\n waitingViewerRole: 'waitingViewerRole',\n subscribedNotifications: 'subscribedNotifications',\n logo: 'logo',\n tokenEndpoint: 'tokenEndpoint',\n appLayout: 'appLayout',\n hlsStarted: 'hlsStarted',\n rtmpStarted: 'rtmpStarted',\n recordingStarted: 'recordingStarted',\n embedConfig: 'embedConfig',\n pinnedTrackId: 'pinnedTrackId',\n dropdownList: 'dropdownList',\n authToken: 'authToken',\n pdfConfig: 'pdfConfig',\n minimiseInset: 'minimiseInset',\n activeScreensharePeerId: 'activeScreensharePeerId',\n disableNotifications: 'disableNotifications',\n pollState: 'pollState',\n};\nexport const UI_SETTINGS = {\n isAudioOnly: 'isAudioOnly',\n maxTileCount: 'maxTileCount',\n uiViewMode: 'uiViewMode',\n showStatsOnTiles: 'showStatsOnTiles',\n enableAmbientMusic: 'enableAmbientMusic',\n mirrorLocalVideo: 'mirrorLocalVideo',\n};\n\nexport const SIDE_PANE_OPTIONS = {\n PARTICIPANTS: 'Participants',\n CHAT: 'Chat',\n STREAMING: 'STREAMING',\n POLLS: 'POLLS',\n};\n\nexport const POLL_STATE = {\n pollInView: 'pollInView',\n view: 'view',\n};\n\nexport const POLL_VIEWS = {\n CREATE_POLL_QUIZ: 'CREATE_POLL_QUIZ',\n CREATE_QUESTIONS: 'CREATE_QUESTIONS',\n VOTE: 'VOTE',\n RESULTS: 'RESULTS',\n};\n\nexport const SUBSCRIBED_NOTIFICATIONS = {\n PEER_JOINED: 'PEER_JOINED',\n PEER_LEFT: 'PEER_LEFT',\n METADATA_UPDATED: 'METADATA_UPDATED',\n NEW_MESSAGE: 'NEW_MESSAGE',\n ERROR: 'ERROR',\n};\n\nexport const CREATE_ROOM_DOC_URL = 'https://github.com/100mslive/100ms-web/wiki/Creating-and-joining-a-room';\nexport const HLS_TIMED_METADATA_DOC_URL =\n 'https://www.100ms.live/docs/javascript/v2/how--to-guides/record-and-live-stream/hls/hls-timed-metadata';\n\nexport const REMOTE_STOP_SCREENSHARE_TYPE = 'REMOTE_STOP_SCREENSHARE';\n\nexport const isChrome = parsedUserAgent.getBrowser()?.name?.toLowerCase() === 'chrome';\nexport const isFirefox = parsedUserAgent.getBrowser()?.name?.toLowerCase() === 'firefox';\nexport const isSafari = parsedUserAgent.getBrowser()?.name?.toLowerCase() === 'safari';\nexport const isIOS = parsedUserAgent.getOS()?.name?.toLowerCase() === 'ios';\nexport const isMacOS = parsedUserAgent.getOS()?.name?.toLowerCase() === 'mac os';\nexport const isAndroid = parsedUserAgent.getOS()?.name?.toLowerCase() === 'android';\nexport const isIPadOS = false;\n// typeof navigator !== \"undefined\" &&\n// navigator?.maxTouchPoints &&\n// navigator?.maxTouchPoints > 2 &&\n// navigator?.userAgent?.match(/Mac/);\n\nexport const SESSION_STORE_KEY = {\n TRANSCRIPTION_STATE: 'transcriptionState',\n PINNED_MESSAGE: 'pinnedMessage',\n SPOTLIGHT: 'spotlight',\n};\n\nexport const INTERACTION_TYPE = {\n POLL: 'Poll',\n QUIZ: 'Quiz',\n};\n\nexport const QUESTION_TYPE_TITLE = {\n 'single-choice': 'Single Choice',\n 'multiple-choice': 'Multiple Choice',\n // \"short-answer\": \"Short Answer\",\n // \"long-answer\": \"Long Answer\",\n};\n\nexport const QUESTION_TYPE = {\n SINGLE_CHOICE: 'single-choice',\n MULTIPLE_CHOICE: 'multiple-choice',\n // SHORT_ANSWER: \"short-answer\",\n // LONG_ANSWER: \"long-answer\",\n};\n\nexport const ROLE_CHANGE_DECLINED = 'role_change_declined';\n\nexport const DEFAULT_PORTAL_CONTAINER = '#prebuilt-container';\n", "import React, { useEffect, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { styled } from '../../Theme';\nimport { useHMSPrebuiltContext } from '../AppContext';\nimport { ErrorDialog } from '../primitives/DialogContent';\nimport { useSetAppDataByKey, useTokenEndpoint } from './AppData/useUISettings';\nimport { APP_DATA } from '../common/constants';\n\n/**\n * query params exposed -\n * skip_preview=true => used by recording and streaming service, skips preview and directly joins\n * header and footer don't show up in this case\n * skip_preview_headful=true => used by automation testing to skip preview without impacting the UI\n * name=abc => gives the initial name for the peer joining\n * auth_token=123 => uses the passed in token to join instead of fetching from token endpoint\n * ui_mode=activespeaker => lands in active speaker mode after joining the room\n */\nconst AuthToken = React.memo(({ authTokenByRoomCodeEndpoint, defaultAuthToken }) => {\n const hmsActions = useHMSActions();\n const tokenEndpoint = useTokenEndpoint();\n const { roomCode, userId } = useHMSPrebuiltContext();\n const [error, setError] = useState({ title: '', body: '' });\n let authToken = defaultAuthToken;\n const [, setAuthTokenInAppData] = useSetAppDataByKey(APP_DATA.authToken);\n\n useEffect(() => {\n if (authToken) {\n setAuthTokenInAppData(authToken);\n return;\n }\n if (!tokenEndpoint && !roomCode) {\n return;\n }\n\n hmsActions\n .getAuthTokenByRoomCode({ roomCode, userId }, { endpoint: authTokenByRoomCodeEndpoint })\n .then(token => setAuthTokenInAppData(token))\n .catch(error => setError(convertError(error)));\n }, [hmsActions, tokenEndpoint, authToken, authTokenByRoomCodeEndpoint, setAuthTokenInAppData, roomCode, userId]);\n\n if (error.title) {\n return <ErrorDialog title={error.title}>{error.body}</ErrorDialog>;\n }\n return null;\n});\n\nconst convertError = error => {\n console.error('[error]', { error });\n if (error.action === 'GET_TOKEN' && error.code === 403) {\n return {\n title: 'Room code is disabled',\n body: ErrorWithSupportLink('Room code corresponding to this link is no more active.'),\n };\n } else if (error.action === 'GET_TOKEN' && error.code === 404) {\n return {\n title: 'Room code does not exist',\n body: ErrorWithSupportLink('We could not find a room code corresponding to this link.'),\n };\n } else if (error.action === 'GET_TOKEN' && error.code === 2003) {\n return {\n title: 'Endpoint is not reachable',\n body: ErrorWithSupportLink(`Endpoint is not reachable. ${error.description}.`),\n };\n } else if (error.response && error.response.status === 404) {\n return {\n title: 'Room does not exist',\n body: ErrorWithSupportLink('We could not find a room corresponding to this link.'),\n };\n } else if (error.response && error.response.status === 403) {\n return {\n title: 'Accessing room using this link format is disabled',\n body: ErrorWithSupportLink('You can re-enable this from the developer section in Dashboard.'),\n };\n } else {\n console.error('Token API Error', error);\n return {\n title: 'Error fetching token',\n body: ErrorWithSupportLink(\n 'An error occurred while fetching the app token. Please look into logs for more details.',\n ),\n };\n }\n};\n\nconst Link = styled('a', {\n color: '#2f80e1',\n});\n\nexport const ErrorWithSupportLink = errorMessage => (\n <div>\n {errorMessage} If you think this is a mistake on our side, please create{' '}\n <Link target=\"_blank\" href=\"https://github.com/100mslive/100ms-web/issues\" rel=\"noreferrer\">\n an issue\n </Link>{' '}\n or reach out over{' '}\n <Link target=\"_blank\" href=\"https://discord.com/invite/kGdmszyzq2\" rel=\"noreferrer\">\n Discord\n </Link>\n .\n </div>\n);\n\nexport default AuthToken;\n", "import React, { useContext } from 'react';\n// @ts-ignore\nimport { DEFAULT_PORTAL_CONTAINER } from './common/constants';\n\ntype HMSPrebuiltContextType = {\n roomCode: string;\n roomId?: string;\n role?: string;\n userName?: string;\n userId?: string;\n containerSelector: string;\n endpoints?: Record<string, string>;\n onLeave?: () => void;\n onJoin?: () => void;\n};\n\nexport const HMSPrebuiltContext = React.createContext<HMSPrebuiltContextType>({\n roomCode: '',\n userName: '',\n userId: '',\n containerSelector: DEFAULT_PORTAL_CONTAINER,\n endpoints: {},\n onLeave: undefined,\n onJoin: undefined,\n});\n\nHMSPrebuiltContext.displayName = 'HMSPrebuiltContext';\n\nexport const useHMSPrebuiltContext = () => {\n const context = useContext(HMSPrebuiltContext);\n if (!context) {\n throw Error('Make sure HMSPrebuiltContext.Provider is present at the top level of your application');\n }\n return context;\n};\n", "import React, { useRef } from 'react';\nimport { CheckIcon, CloudUploadIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Checkbox } from '../../Checkbox';\nimport { HorizontalDivider } from '../../Divider';\nimport { IconButton } from '../../IconButton';\nimport { Input } from '../../Input';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Select } from '../../Select';\nimport { Switch } from '../../Switch';\nimport { Text } from '../../Text';\n\nexport const DialogContent = ({ Icon, title, closeable = true, children, css, iconCSS = {}, ...props }) => {\n return (\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ width: 'min(600px, 100%)', ...css }} {...props}>\n <Dialog.Title>\n <Flex justify=\"between\">\n <Flex align=\"center\" css={{ mb: '$1' }}>\n {Icon ? (\n <Box css={{ mr: '$2', color: '$on_primary_high', ...iconCSS }}>\n <Icon />\n </Box>\n ) : null}\n <Text variant=\"h6\" inline>\n {title}\n </Text>\n </Flex>\n {closeable && <Dialog.DefaultClose data-testid=\"dialoge_cross_icon\" />}\n </Flex>\n </Dialog.Title>\n <HorizontalDivider css={{ mt: '0.8rem' }} />\n <Box>{children}</Box>\n </Dialog.Content>\n </Dialog.Portal>\n );\n};\n\nexport const ErrorDialog = ({ open = true, onOpenChange, title, children, ...props }) => {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <DialogContent\n Icon={CrossIcon}\n title={title}\n onInteractOutside={e => e.preventDefault()}\n onEscapeKeyDown={e => e.preventDefault()}\n onPointerDownOutside={e => e.preventDefault()}\n closeable={false}\n iconCSS={{ color: '$alert_error_default' }}\n {...props}\n >\n <Box css={{ mt: '$lg' }}>{children}</Box>\n </DialogContent>\n </Dialog.Root>\n );\n};\n\nexport const RequestDialog = ({ open = true, onOpenChange, title, body, actionText = 'Accept', onAction, Icon }) => (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md' }}>\n {Icon ? Icon : null}\n <Text variant=\"h6\">{title}</Text>\n </Dialog.Title>\n {typeof body === 'string' ? (\n <Text\n variant=\"md\"\n css={{\n fontWeight: 400,\n mt: '$4',\n mb: '$10',\n c: '$on_surface_medium',\n }}\n >\n {body}\n </Text>\n ) : (\n <Box css={{ mt: '$4', mb: '$10' }}>{body}</Box>\n )}\n <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md' }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%' }}>\n <Button variant=\"standard\" outlined css={{ width: '100%' }}>\n Cancel\n </Button>\n </Dialog.Close>\n </Box>\n <Box css={{ width: '50%' }}>\n <Button variant=\"primary\" css={{ width: '100%' }} onClick={onAction}>\n {actionText}\n </Button>\n </Box>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n);\n\n/**\n * a row of items which breaks into column on small screen. For e.g. title on left and options to select\n * from on right for select component.\n */\nexport const DialogRow = ({ children, breakSm = false, css, justify = 'between' }) => {\n let finalCSS = {\n margin: '$10 0',\n w: '100%',\n };\n if (breakSm) {\n finalCSS['@sm'] = {\n flexDirection: 'column',\n alignItems: 'flex-start',\n };\n }\n if (css) {\n finalCSS = Object.assign(finalCSS, css);\n }\n return (\n <Flex align=\"center\" justify={justify} css={finalCSS}>\n {children}\n </Flex>\n );\n};\n\nexport const DialogCol = ({ children, breakSm = false, css, align = 'center', justify = 'between', ...props }) => {\n let finalCSS = {\n margin: '$10 0',\n w: '100%',\n };\n if (breakSm) {\n finalCSS['@sm'] = {\n alignItems: 'flex-start',\n };\n }\n if (css) {\n finalCSS = Object.assign(finalCSS, css);\n }\n return (\n <Flex direction=\"column\" align={align} justify={justify} css={finalCSS} {...props}>\n {children}\n </Flex>\n );\n};\n\n/**\n * key field and label field are optional, option is directly used if not passed\n */\nexport const DialogSelect = ({ title, options, keyField, labelField, selected, onChange, ...props }) => {\n return (\n <DialogRow breakSm>\n <Label>{title}</Label>\n <Select.Root data-testid={`dialog_select_${title}`} css={{ width: '70%', '@sm': { width: '100%' } }} {...props}>\n <Select.DefaultDownIcon />\n <Select.Select onChange={e => onChange(e.target.value)} value={selected} css={{ width: '100%' }}>\n {options.map(option => {\n const id = keyField ? option[keyField] : option;\n const label = labelField ? option[labelField] : option;\n return (\n <option value={id} key={id}>\n {label}\n </option>\n );\n })}\n </Select.Select>\n </Select.Root>\n </DialogRow>\n );\n};\n\nexport const DialogInput = ({ title, value, onChange, placeholder, disabled, type, ...props }) => {\n return (\n <DialogRow breakSm>\n <Label>{title}</Label>\n <Input\n css={{ width: '70%', '@sm': { width: '100%' }, bg: '$surface_bright' }}\n value={value}\n onChange={e => onChange(e.target.value)}\n placeholder={placeholder}\n disabled={disabled}\n type={type}\n {...props}\n />\n </DialogRow>\n );\n};\n\nexport const DialogInputFile = ({ value, onChange, placeholder, disabled, type, ...props }) => {\n const inputRef = useRef();\n return (\n <DialogCol\n breakSm\n onClick={() => inputRef.current?.click()}\n css={{\n justifyContent: 'center',\n position: 'relative',\n cursor: 'pointer',\n py: '$12',\n border: '1px dashed $border_bright',\n r: '$1',\n height: 'max(140px, 30%)',\n alignItems: 'center',\n m: '$6 0',\n }}\n gap=\"8\"\n >\n <IconButton\n variant=\"standard\"\n css={{\n border: 'none',\n background: 'none',\n '&:hover': {\n border: 'none',\n background: 'none',\n bg: '$transparent !important',\n },\n }}\n >\n <CloudUploadIcon\n style={{\n width: '3rem',\n height: '3rem',\n }}\n />\n </IconButton>\n <Flex direction=\"row\">\n <Input\n ref={inputRef}\n css={{ width: '70%', '@sm': { width: '100%' } }}\n value={value}\n onChange={e => onChange(e.target)}\n placeholder={placeholder}\n disabled={disabled}\n type={type}\n hidden={true}\n {...props}\n />\n <IconButton\n variant=\"standard\"\n css={{\n background: 'none',\n border: 'none',\n textDecoration: 'underline',\n '&:hover': {\n background: 'none !important',\n border: 'none !important',\n },\n }}\n >\n <Text variant=\"md\">{placeholder}</Text>\n </IconButton>\n </Flex>\n </DialogCol>\n );\n};\n\nexport const DialogSwitch = ({ title, value, onChange, disabled }) => {\n return (\n <DialogRow>\n <Text>{title}</Text>\n <Flex justify=\"end\" css={{ width: '70%' }}>\n <Switch checked={value} disabled={disabled} onCheckedChange={onChange} />\n </Flex>\n </DialogRow>\n );\n};\n\nexport const DialogCheckbox = ({ title, value, onChange, disabled, css, id }) => {\n return (\n <DialogRow css={css}>\n <Label htmlFor={id} css={{ cursor: 'pointer' }}>\n {title}\n </Label>\n <Checkbox.Root checked={value} onCheckedChange={value => onChange(value)} disabled={disabled} id={id}>\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n </DialogRow>\n );\n};\n", "import React, { useEffect, useRef, useState } from 'react';\nimport { DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport {\n HMSRoomState,\n selectAppData,\n selectIsConnectedToRoom,\n selectRoomState,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Footer } from './Footer/Footer';\nimport { HLSFailureModal } from './Notifications/HLSFailureModal';\n// @ts-ignore: No implicit Any\nimport { ActivatedPIP } from './PIP/PIPComponent';\n// @ts-ignore: No implicit Any\nimport { PictureInPicture } from './PIP/PIPManager';\nimport { RoleChangeRequestModal } from './RoleChangeRequest/RoleChangeRequestModal';\nimport { Box, Flex } from '../../Layout';\nimport { useHMSPrebuiltContext } from '../AppContext';\nimport { VideoStreamingSection } from '../layouts/VideoStreamingSection';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from './FullPageProgress';\nimport { Header } from './Header';\nimport {\n useRoomLayoutConferencingScreen,\n useRoomLayoutPreviewScreen,\n} from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useAuthToken, useSetAppDataByKey } from './AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { APP_DATA, isAndroid, isIOS, isIPadOS } from '../common/constants';\n\nexport const ConferenceScreen = () => {\n const { userName, endpoints, onJoin: onJoinFunc } = useHMSPrebuiltContext();\n const screenProps = useRoomLayoutConferencingScreen();\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const roomState = useHMSStore(selectRoomState);\n const isConnectedToRoom = useHMSStore(selectIsConnectedToRoom);\n const hmsActions = useHMSActions();\n const [hideControls, setHideControls] = useState(false);\n const dropdownList = useHMSStore(selectAppData(APP_DATA.dropdownList));\n const authTokenInAppData = useAuthToken();\n const headerRef = useRef<HTMLDivElement | null>(null);\n const footerRef = useRef<HTMLDivElement | null>(null);\n const isMobileDevice = isAndroid || isIOS || isIPadOS;\n const dropdownListRef = useRef<string[]>();\n const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const toggleControls = () => {\n if (dropdownListRef.current?.length === 0 && isMobileDevice) {\n setHideControls(value => !value);\n }\n };\n const autoRoomJoined = useRef(isPreviewScreenEnabled);\n\n useEffect(() => {\n let timeout: undefined | ReturnType<typeof setTimeout>;\n dropdownListRef.current = dropdownList || [];\n if (dropdownListRef.current && dropdownListRef.current.length === 0) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n if (dropdownListRef.current && dropdownListRef.current.length === 0) {\n setHideControls(isMobileDevice);\n }\n }, 5000);\n }\n return () => {\n clearTimeout(timeout);\n };\n }, [dropdownList, hideControls, isMobileDevice]);\n\n useEffect(() => {\n if (\n authTokenInAppData &&\n !isConnectedToRoom &&\n !isPreviewScreenEnabled &&\n roomState !== HMSRoomState.Connecting &&\n !autoRoomJoined.current\n ) {\n hmsActions\n .join({\n userName: userName || '',\n authToken: authTokenInAppData,\n initEndpoint: endpoints?.init,\n settings: {\n isAudioMuted: !isPreviewScreenEnabled,\n isVideoMuted: !isPreviewScreenEnabled,\n speakerAutoSelectionBlacklist: ['Yeti Stereo Microphone'],\n },\n })\n .catch(console.error);\n autoRoomJoined.current = true;\n }\n }, [authTokenInAppData, endpoints?.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);\n\n useEffect(() => {\n onJoinFunc?.();\n return () => {\n PictureInPicture.stop().catch((error: unknown) => console.error('stopping pip', (error as Error).message));\n };\n }, [onJoinFunc]);\n\n if (!isConnectedToRoom && ![HMSRoomState.Reconnecting, HMSRoomState.Disconnected].includes(roomState)) {\n return <FullPageProgress text={roomState === HMSRoomState.Connecting ? 'Joining...' : ''} />;\n }\n\n return (\n <>\n {isHLSStarted ? (\n <Box css={{ position: 'fixed', zIndex: 100, w: '100%', h: '100%', left: 0, top: 0 }}>\n <FullPageProgress text=\"Starting live stream...\" css={{ opacity: 0.8, bg: '$background_dim' }} />\n </Box>\n ) : null}\n <Flex css={{ size: '100%', overflow: 'hidden' }} direction=\"column\">\n {!screenProps.hideSections.includes('header') && (\n <Box\n ref={headerRef}\n css={{\n h: '$18',\n transition: 'margin 0.3s ease-in-out',\n marginTop: hideControls ? `-${headerRef.current?.clientHeight}px` : 'none',\n '@md': {\n h: '$17',\n },\n }}\n data-testid=\"header\"\n >\n <Header />\n </Box>\n )}\n <Box\n css={{\n w: '100%',\n flex: '1 1 0',\n minHeight: 0,\n // @ts-ignore\n px: (screenProps?.elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid?.edge_to_edge\n ? 0\n : '$10', // TODO: padding to be controlled by section/element\n paddingBottom: 'env(safe-area-inset-bottom)',\n '@lg': {\n px: 0,\n },\n }}\n id=\"conferencing\"\n data-testid=\"conferencing\"\n onClick={toggleControls}\n >\n {screenProps.elements ? (\n <VideoStreamingSection\n screenType={screenProps.screenType}\n elements={screenProps.elements}\n hideControls={hideControls}\n />\n ) : null}\n </Box>\n {!screenProps.hideSections.includes('footer') && screenProps.elements && (\n <Box\n ref={footerRef}\n css={{\n flexShrink: 0,\n maxHeight: '$24',\n transition: 'margin 0.3s ease-in-out',\n bg: '$background_dim',\n marginBottom: hideControls ? `-${footerRef.current?.clientHeight}px` : undefined,\n '@md': {\n maxHeight: 'unset',\n bg: screenProps.screenType === 'hls_live_streaming' ? 'transparent' : '$background_dim',\n },\n }}\n data-testid=\"footer\"\n >\n <Footer elements={screenProps.elements} screenType={screenProps.screenType} />\n </Box>\n )}\n <RoleChangeRequestModal />\n <HLSFailureModal />\n <ActivatedPIP />\n </Flex>\n </>\n );\n};\n", "import React, { Suspense, useEffect } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { Chat_ChatState } from '@100mslive/types-prebuilt/elements/chat';\nimport { useAVToggle } from '@100mslive/react-sdk';\nimport { config as cssConfig, Footer as AppFooter } from '../../..';\n// @ts-ignore: No implicit Any\nimport { AudioVideoToggle } from '../AudioVideoToggle';\n// @ts-ignore: No implicit Any\nimport { EmojiReaction } from '../EmojiReaction';\n// @ts-ignore: No implicit Any\nimport { LeaveRoom } from '../Leave/LeaveRoom';\n// @ts-ignore: No implicit Any\nimport { MoreSettings } from '../MoreSettings/MoreSettings';\n// @ts-ignore: No implicit Any\nimport { RaiseHand } from '../RaiseHand';\n// @ts-ignore: No implicit Any\nimport { ScreenshareToggle } from '../ScreenShareToggle';\n// @ts-ignore: No implicit Any\nimport { ChatToggle } from './ChatToggle';\n// @ts-ignore: No implicit Any\nimport { ParticipantCount } from './ParticipantList';\nimport { PollsToggle } from './PollsToggle';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { useShowPolls } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n// @ts-ignore: No implicit Any\nconst VirtualBackground = React.lazy(() => import('../../plugins/VirtualBackground/VirtualBackground'));\n\nexport const Footer = ({\n screenType,\n elements,\n}: {\n screenType: keyof ConferencingScreen;\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const isOverlayChat = !!elements?.chat?.is_overlay;\n const openByDefault = elements?.chat?.initial_state === Chat_ChatState.CHAT_STATE_OPEN;\n\n const { toggleAudio, toggleVideo } = useAVToggle();\n const noAVPermissions = !(toggleAudio || toggleVideo);\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const { showPolls } = useShowPolls();\n\n useEffect(() => {\n if (!isChatOpen && openByDefault) {\n toggleChat();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [toggleChat, openByDefault]);\n\n return (\n <AppFooter.Root\n css={{\n flexWrap: 'nowrap',\n '@md': {\n justifyContent: 'center',\n gap: '$10',\n position: 'relative',\n // To prevent it from showing over the sidepane if chat type is not overlay\n zIndex: isOverlayChat && isChatOpen ? 20 : 1,\n },\n }}\n >\n <AppFooter.Left\n css={{\n '@md': {\n w: 'unset',\n p: '0',\n gap: '$10',\n },\n }}\n >\n {isMobile ? <LeaveRoom screenType={screenType} /> : null}\n <AudioVideoToggle />\n {isMobile ? null : (\n <Suspense fallback={<></>}>\n <VirtualBackground />\n </Suspense>\n )}\n </AppFooter.Left>\n <AppFooter.Center\n css={{\n '@md': {\n w: 'unset',\n gap: '$10',\n },\n }}\n >\n {isMobile ? (\n <>\n {noAVPermissions ? <RaiseHand /> : null}\n {elements?.chat && <ChatToggle />}\n <MoreSettings elements={elements} screenType={screenType} />\n </>\n ) : (\n <>\n <ScreenshareToggle />\n <RaiseHand />\n {elements?.emoji_reactions && <EmojiReaction />}\n <LeaveRoom screenType={screenType} />\n </>\n )}\n </AppFooter.Center>\n <AppFooter.Right>\n {showPolls && <PollsToggle />}\n {!isMobile && elements?.chat && <ChatToggle />}\n {elements?.participant_list && <ParticipantCount />}\n <MoreSettings elements={elements} screenType={screenType} />\n </AppFooter.Right>\n </AppFooter.Root>\n );\n};\n", "import React, { Fragment } from 'react';\nimport {\n DeviceType,\n HMSRoomState,\n selectLocalVideoTrackID,\n selectRoomState,\n selectVideoTrackByID,\n useAVToggle,\n useDevices,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { CameraFlipIcon, MicOffIcon, MicOnIcon, VideoOffIcon, VideoOnIcon } from '@100mslive/react-icons';\nimport { IconButtonWithOptions } from './IconButtonWithOptions/IconButtonWithOptions';\nimport { ToastManager } from './Toast/ToastManager';\nimport { Text } from '../../Text';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\nimport { isMacOS } from '../common/constants';\n\nconst optionsCSS = { fontWeight: '$semiBold', color: '$on_surface_high', w: '100%', p: '$8' };\n\nexport const AudioVideoToggle = ({ hideOptions = false }) => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n const { videoInput, audioInput } = allDevices;\n\n const formattedVideoInputList = videoInput?.map(videoInput => ({\n active: selectedDeviceIDs.videoInput === videoInput.deviceId,\n content: (\n <Text\n variant=\"sm\"\n onClick={() =>\n updateDevice({\n deviceType: DeviceType.videoInput,\n deviceId: videoInput.deviceId,\n })\n }\n css={optionsCSS}\n >\n {videoInput.label}\n </Text>\n ),\n title: videoInput.label,\n }));\n\n const formattedAudioInputList = audioInput?.map(audioInput => ({\n active: selectedDeviceIDs.audioInput === audioInput.deviceId,\n content: (\n <Text\n variant=\"sm\"\n onClick={() =>\n updateDevice({\n deviceType: DeviceType.audioInput,\n deviceId: audioInput.deviceId,\n })\n }\n css={optionsCSS}\n >\n {audioInput.label}\n </Text>\n ),\n title: audioInput.label,\n }));\n\n const { isLocalVideoEnabled, isLocalAudioEnabled, toggleAudio, toggleVideo } = useAVToggle();\n const actions = useHMSActions();\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const localVideoTrack = useHMSStore(selectVideoTrackByID(videoTrackId));\n const roomState = useHMSStore(selectRoomState);\n const hasAudioDevices = audioInput?.length > 0;\n const hasVideoDevices = videoInput?.length > 0;\n\n return (\n <Fragment>\n {toggleAudio ? (\n hideOptions || !hasAudioDevices ? (\n <Tooltip title={`Turn ${isLocalAudioEnabled ? 'off' : 'on'} audio (${isMacOS ? '\u2318' : 'ctrl'} + d)`}>\n <IconButton\n active={isLocalAudioEnabled}\n disabled={!toggleAudio}\n onClick={toggleAudio}\n key=\"toggleAudio\"\n data-testid=\"audio_btn\"\n className=\"__cancel-drag-event\"\n >\n {!isLocalAudioEnabled ? (\n <MicOffIcon data-testid=\"audio_off_btn\" />\n ) : (\n <MicOnIcon data-testid=\"audio_on_btn\" />\n )}\n </IconButton>\n </Tooltip>\n ) : (\n <IconButtonWithOptions\n options={formattedAudioInputList}\n disabled={!toggleAudio}\n onDisabledClick={toggleAudio}\n tooltipMessage={`Turn ${isLocalAudioEnabled ? 'off' : 'on'} audio (${isMacOS ? '\u2318' : 'ctrl'} + d)`}\n icon={\n !isLocalAudioEnabled ? (\n <MicOffIcon data-testid=\"audio_off_btn\" />\n ) : (\n <MicOnIcon data-testid=\"audio_on_btn\" />\n )\n }\n active={isLocalAudioEnabled}\n onClick={toggleAudio}\n key=\"toggleAudio\"\n />\n )\n ) : null}\n\n {toggleVideo ? (\n hideOptions || !hasVideoDevices ? (\n <Tooltip title={`Turn ${isLocalVideoEnabled ? 'off' : 'on'} video (${isMacOS ? '\u2318' : 'ctrl'} + e)`}>\n <IconButton\n key=\"toggleVideo\"\n active={isLocalVideoEnabled}\n disabled={!toggleVideo}\n onClick={toggleVideo}\n data-testid=\"video_btn\"\n className=\"__cancel-drag-event\"\n >\n {!isLocalVideoEnabled ? (\n <VideoOffIcon data-testid=\"video_off_btn\" />\n ) : (\n <VideoOnIcon data-testid=\"video_on_btn\" />\n )}\n </IconButton>\n </Tooltip>\n ) : (\n <IconButtonWithOptions\n disabled={!toggleVideo}\n onDisabledClick={toggleVideo}\n options={formattedVideoInputList}\n tooltipMessage={`Turn ${isLocalVideoEnabled ? 'off' : 'on'} video (${isMacOS ? '\u2318' : 'ctrl'} + e)`}\n icon={\n !isLocalVideoEnabled ? (\n <VideoOffIcon data-testid=\"video_off_btn\" />\n ) : (\n <VideoOnIcon data-testid=\"video_on_btn\" />\n )\n }\n key=\"toggleVideo\"\n active={isLocalVideoEnabled}\n onClick={toggleVideo}\n />\n )\n ) : null}\n\n {localVideoTrack?.facingMode && roomState === HMSRoomState.Preview ? (\n <Tooltip title=\"Switch Camera\" key=\"switchCamera\">\n <IconButton\n onClick={async () => {\n try {\n await actions.switchCamera();\n } catch (e) {\n ToastManager.addToast({\n title: `Error while flipping camera ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <CameraFlipIcon />\n </IconButton>\n </Tooltip>\n ) : null}\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Box, Flex } from '../../../Layout';\nimport { styled } from '../../../Theme';\nimport { Tooltip } from '../../../Tooltip';\nimport IconButton from '../../IconButton';\n\nconst IconSection = styled(IconButton, {\n w: 'unset',\n h: '$14',\n p: '$4',\n r: '$1',\n borderTopRightRadius: 0,\n borderColor: '$border_default',\n borderBottomRightRadius: 0,\n position: 'relative',\n '&:not([disabled]):focus-visible': {\n zIndex: 1,\n },\n '@md': {\n mx: 0,\n borderTopRightRadius: '$1',\n borderBottomRightRadius: '$1',\n },\n});\n\nconst OptionsSection = styled(IconButton, {\n w: 'unset',\n h: '$14',\n p: '$4',\n r: '$1',\n borderTopLeftRadius: 0,\n borderColor: '$border_default',\n borderBottomLeftRadius: 0,\n borderLeftWidth: 0,\n position: 'relative',\n '&:not([disabled]):focus-visible': {\n zIndex: 1,\n },\n '@md': {\n display: 'none',\n },\n});\n\nexport const IconButtonWithOptions = ({\n disabled = false,\n onDisabledClick = () => {\n return;\n },\n tooltipMessage = '',\n icon,\n options = [],\n active,\n onClick = () => {\n return;\n },\n}) => {\n const bgCss = { backgroundColor: disabled ? '$surface_brighter' : active ? '$transparent' : '$secondary_dim' };\n const iconCss = { color: disabled ? '$on_surface_low' : active ? '$on_surface_high' : '$on_primary_high' };\n\n return (\n <Flex>\n <IconSection css={bgCss} onClick={onClick}>\n <Tooltip disabled={!tooltipMessage} title={tooltipMessage}>\n <Flex align=\"center\" justify=\"center\" css={iconCss}>\n {icon}\n </Flex>\n </Tooltip>\n </IconSection>\n <Dropdown.Root>\n <Dropdown.Trigger\n asChild\n // onClick does not work\n onPointerDown={e => {\n if (disabled) {\n e.preventDefault();\n onDisabledClick();\n }\n }}\n >\n <OptionsSection css={bgCss}>\n <Tooltip title=\"View Options\">\n <Box css={iconCss}>\n <VerticalMenuIcon />\n </Box>\n </Tooltip>\n </OptionsSection>\n </Dropdown.Trigger>\n <Dropdown.Content\n sideOffset={5}\n align=\"center\"\n css={{\n w: '$64',\n maxHeight: '$96',\n p: 0,\n border: 'none',\n }}\n >\n {options.map((option, index) => (\n <Dropdown.Item\n key={option.title}\n css={{\n flexDirection: 'column',\n alignItems: 'flex-start',\n backgroundColor: option.active ? '$surface_bright' : '$surface_dim',\n borderTop: index === 0 ? 'none' : '1px solid $border_default',\n '&:hover': {\n cursor: 'pointer',\n },\n p: '0',\n }}\n >\n {option.content}\n </Dropdown.Item>\n ))}\n </Dropdown.Content>\n </Dropdown.Root>\n </Flex>\n );\n};\n", "import { v4 } from 'uuid';\n\nexport const ToastManager = {\n toasts: new Map(),\n listeners: new Map(),\n addToast(toast) {\n const id = toast.id ? toast.id : v4();\n this.toasts.set(id, { ...toast, id });\n this.onChange();\n return id;\n },\n\n clearAllToast() {\n this.toasts.clear();\n this.onChange();\n },\n\n removeToast(id) {\n this.toasts.delete(id);\n this.onChange();\n },\n replaceToast(id, toast) {\n if (this.isActive(id)) {\n this.toasts.set(id, { ...this.toasts.get(id), ...toast });\n this.onChange();\n return id;\n } else {\n return this.addToast(toast);\n }\n },\n addListener(cb) {\n this.listeners.set(cb, cb);\n },\n removeListener(cb) {\n this.listeners.delete(cb);\n },\n isActive(id) {\n return this.toasts.has(id);\n },\n onChange() {\n const toasts = Array.from(this.toasts.values());\n this.listeners.forEach(listener => listener(toasts));\n },\n};\n", "import React, { Fragment, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport data from '@emoji-mart/data/sets/14/apple.json';\nimport { init } from 'emoji-mart';\nimport {\n selectAvailableRoleNames,\n selectIsConnectedToRoom,\n selectLocalPeerID,\n useCustomEvent,\n // useHMSActions,\n useHMSStore,\n // useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { EmojiIcon } from '@100mslive/react-icons';\nimport { EmojiCard } from './Footer/EmojiCard';\n// import { ToastManager } from './Toast/ToastManager';\nimport { Dropdown } from '../../Dropdown';\nimport { Box } from '../../Layout';\nimport { config as cssConfig } from '../../Theme';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\nimport { useDropdownList } from './hooks/useDropdownList';\nimport { EMOJI_REACTION_TYPE } from '../common/constants';\n\ninit({ data });\n\nexport const EmojiReaction = () => {\n const [open, setOpen] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n useDropdownList({ open: open, name: 'EmojiReaction' });\n // const hmsActions = useHMSActions();\n const roles = useHMSStore(selectAvailableRoleNames);\n const localPeerId = useHMSStore(selectLocalPeerID);\n // const { isStreamingOn } = useRecordingStreaming();\n const isMobile = useMedia(cssConfig.media.md);\n\n const { sendEvent } = useCustomEvent({\n type: EMOJI_REACTION_TYPE,\n });\n\n const sendReaction = async emojiId => {\n const data = {\n type: EMOJI_REACTION_TYPE,\n emojiId: emojiId,\n senderId: localPeerId,\n };\n // TODO: RT find a way to figure out hls-viewer roles\n sendEvent(data, { roleNames: roles });\n window.showFlyingEmoji?.({ emojiId, senderId: localPeerId });\n /* if (isStreamingOn) {\n try {\n await hmsActions.sendHLSTimedMetadata([\n {\n payload: JSON.stringify(data),\n duration: 2,\n },\n ]);\n } catch (error) {\n console.log(error);\n ToastManager.addToast({ title: error.message });\n }\n } */\n };\n\n if (!isConnected) {\n return null;\n }\n return isMobile ? (\n <EmojiCard sendReaction={sendReaction} />\n ) : (\n <Fragment>\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger asChild data-testid=\"emoji_reaction_btn\">\n <IconButton>\n <Tooltip title=\"Emoji reaction\">\n <Box>\n <EmojiIcon />\n </Box>\n </Tooltip>\n </IconButton>\n </Dropdown.Trigger>\n <Dropdown.Content sideOffset={5} align=\"center\" css={{ p: '$8', bg: '$surface_default' }}>\n <EmojiCard sendReaction={sendReaction} />\n </Dropdown.Content>\n </Dropdown.Root>\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { Flex } from '../../../Layout';\nimport { styled } from '../../../Theme';\n\n// When changing emojis in the grid, keep in mind that the payload used in sendHLSTimedMetadata has a limit of 100 characters. Using bigger emoji Ids can cause the limit to be exceeded.\nconst emojiReactionList = [\n [{ emojiId: '+1' }, { emojiId: '-1' }, { emojiId: 'wave' }, { emojiId: 'clap' }, { emojiId: 'fire' }],\n [{ emojiId: 'tada' }, { emojiId: 'heart_eyes' }, { emojiId: 'joy' }, { emojiId: 'open_mouth' }, { emojiId: 'sob' }],\n];\n\nexport const EmojiCard = ({ sendReaction }) => {\n return emojiReactionList.map((emojiLine, index) => (\n <Flex key={index} justify=\"between\" css={{ mb: '$8' }}>\n {emojiLine.map(emoji => (\n <EmojiContainer key={emoji.emojiId} onClick={() => sendReaction(emoji.emojiId)}>\n <em-emoji id={emoji.emojiId} size=\"100%\" set=\"apple\"></em-emoji>\n </EmojiContainer>\n ))}\n </Flex>\n ));\n};\n\nconst EmojiContainer = styled('span', {\n position: 'relative',\n cursor: 'pointer',\n width: '$16',\n height: '$16',\n p: '$4',\n '&:hover': {\n p: '7px',\n bg: '$surface_brighter',\n borderRadius: '$1',\n },\n});\n", "import { useEffect } from 'react';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport const useDropdownList = ({ name, open }) => {\n const [dropdownList = [], setDropdownList] = useSetAppDataByKey(APP_DATA.dropdownList);\n\n useEffect(() => {\n if (open) {\n if (!dropdownList.includes(name)) {\n setDropdownList([...dropdownList, name]);\n }\n } else {\n const index = dropdownList.indexOf(name);\n if (index >= 0) {\n const newDropdownList = [...dropdownList];\n newDropdownList.splice(index, 1);\n setDropdownList(newDropdownList);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, name]);\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\nimport {\n HMSPeer,\n HMSRole,\n selectHLSState,\n selectIsConnectedToRoom,\n selectPeersByCondition,\n selectPermissions,\n selectRolesMap,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\n// @ts-ignore: No implicit Any\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\nimport { DesktopLeaveRoom } from './DesktopLeaveRoom';\nimport { MwebLeaveRoom } from './MwebLeaveRoom';\n\nexport const LeaveRoom = ({ screenType }: { screenType: keyof ConferencingScreen }) => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const permissions = useHMSStore(selectPermissions);\n const isMobile = useMedia(cssConfig.media.md);\n const rolesMap: Record<string, HMSRole> = useHMSStore(selectRolesMap);\n const streamingPermissionRoles = Object.keys(rolesMap).filter(roleName => {\n const roleObj = rolesMap[roleName];\n return roleObj.permissions.hlsStreaming;\n });\n const peersWithStreamingRights = useHMSStore(\n selectPeersByCondition((peer: HMSPeer) => streamingPermissionRoles.includes(peer.roleName || '')),\n );\n const hlsState = useHMSStore(selectHLSState);\n const hmsActions = useHMSActions();\n\n const stopStream = async () => {\n try {\n console.log('Stopping HLS stream');\n await hmsActions.stopHLSStreaming();\n ToastManager.addToast({ title: 'Stopping the stream' });\n } catch (e) {\n console.error('Error stopping stream', e);\n ToastManager.addToast({ title: 'Error in stopping the stream', type: 'error' });\n }\n };\n const endRoom = () => {\n hmsActions.endRoom(false, 'End Room');\n };\n\n const leaveRoom = async ({ endstream = false }) => {\n if (endstream || (hlsState.running && peersWithStreamingRights.length === 1)) {\n await stopStream();\n }\n hmsActions.leave();\n };\n\n if (!permissions || !isConnected) {\n return null;\n }\n return isMobile ? (\n <MwebLeaveRoom leaveRoom={leaveRoom} screenType={screenType} endRoom={endRoom} />\n ) : (\n <DesktopLeaveRoom leaveRoom={leaveRoom} screenType={screenType} endRoom={endRoom} />\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { ExitIcon, StopIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Box, Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Tooltip } from '../../../Tooltip';\nimport { EndSessionContent } from './EndSessionContent';\nimport { LeaveIconButton, MenuTriggerButton } from './LeaveAtoms';\nimport { LeaveCard } from './LeaveCard';\nimport { LeaveSessionContent } from './LeaveSessionContent';\n// @ts-ignore: No implicit Any\nimport { useDropdownList } from '../hooks/useDropdownList';\n\nexport const DesktopLeaveRoom = ({\n leaveRoom,\n screenType,\n endRoom,\n}: {\n leaveRoom: (args: { endstream: boolean }) => void;\n screenType: keyof ConferencingScreen;\n endRoom: () => void;\n}) => {\n const [open, setOpen] = useState(false);\n const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState(false);\n const [showEndStreamAlert, setShowEndStreamAlert] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const permissions = useHMSStore(selectPermissions);\n const { isStreamingOn } = useRecordingStreaming();\n const showStream = screenType !== 'hls_live_streaming' && isStreamingOn;\n const showLeaveOptions = (permissions?.hlsStreaming && isStreamingOn) || permissions?.endRoom;\n\n useDropdownList({ open: open || showEndStreamAlert || showLeaveRoomAlert, name: 'LeaveRoom' });\n\n if (!permissions || !isConnected) {\n return null;\n }\n\n return (\n <Fragment>\n {showLeaveOptions ? (\n <Flex>\n <LeaveIconButton\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n css={{\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }}\n onClick={() => setShowLeaveRoomAlert(true)}\n >\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n <Dropdown.Root open={open} onOpenChange={setOpen} modal={false}>\n <Dropdown.Trigger\n asChild\n css={{\n '&[data-state=\"open\"]': {\n bg: '$alert_error_dim',\n },\n }}\n >\n <MenuTriggerButton data-testid=\"leave_end_dropdown_trigger\">\n <VerticalMenuIcon />\n </MenuTriggerButton>\n </Dropdown.Trigger>\n <Dropdown.Content css={{ p: 0, w: '$100' }} alignOffset={-50} sideOffset={10}>\n <Dropdown.Item\n css={{\n bg: '$surface_dim',\n color: '$on_surface_medium',\n '&:hover': { bg: '$surface_default', color: '$on_surface_high' },\n }}\n onClick={() => leaveRoom({ endstream: false })}\n data-testid=\"just_leave_btn\"\n >\n <LeaveCard\n title={showStream ? 'Leave Stream' : 'Leave Session'}\n subtitle={`Others will continue after you leave. You can join the ${\n showStream ? 'stream' : 'session'\n } again.`}\n bg=\"\"\n titleColor=\"$on_surface_high\"\n icon={<ExitIcon height={24} width={24} style={{ transform: 'rotate(180deg)' }} />}\n onClick={() => leaveRoom({ endstream: false })}\n css={{ p: 0 }}\n />\n </Dropdown.Item>\n\n <Dropdown.Item\n css={{\n bg: '$alert_error_dim',\n color: '$alert_error_bright',\n '&:hover': { bg: '$alert_error_dim', color: '$alert_error_brighter' },\n }}\n data-testid=\"end_room_btn\"\n >\n <LeaveCard\n title={showStream ? 'End Stream' : 'End Session'}\n subtitle={`The ${\n showStream ? 'stream' : 'session'\n } will end for everyone. You can't undo this action.`}\n bg=\"\"\n titleColor=\"$alert_error_brighter\"\n icon={<StopIcon height={24} width={24} />}\n onClick={() => {\n setOpen(false);\n setShowEndStreamAlert(true);\n }}\n css={{ p: 0 }}\n />\n </Dropdown.Item>\n </Dropdown.Content>\n </Dropdown.Root>\n </Flex>\n ) : (\n <LeaveIconButton\n onClick={() => {\n setShowLeaveRoomAlert(true);\n }}\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n >\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n )}\n\n <Dialog.Root open={showEndStreamAlert} modal={false}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(420px, 90%)', p: '$8', bg: '$surface_dim' }}>\n <EndSessionContent\n setShowEndStreamAlert={setShowEndStreamAlert}\n leaveRoom={isStreamingOn ? leaveRoom : endRoom}\n isStreamingOn={isStreamingOn}\n isModal\n />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n\n <Dialog.Root open={showLeaveRoomAlert} modal={false}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(420px, 90%)', p: '$8', bg: '$surface_dim' }}>\n <LeaveSessionContent setShowLeaveRoomAlert={setShowLeaveRoomAlert} leaveRoom={leaveRoom} isModal />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n </Fragment>\n );\n};\n", "import React from 'react';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const EndSessionContent = ({\n setShowEndStreamAlert,\n leaveRoom,\n isModal = false,\n isStreamingOn = false,\n}: {\n setShowEndStreamAlert: (value: boolean) => void;\n leaveRoom: (args: { endstream: boolean }) => void;\n isModal?: boolean;\n isStreamingOn: boolean;\n}) => {\n return (\n <Box>\n <Flex\n css={{\n color: '$alert_error_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: 'inherit', fontWeight: '$semiBold' }}>\n End {isStreamingOn ? 'Stream' : 'Session'}\n </Text>\n {isModal ? null : (\n <Box css={{ color: '$on_surface_high', ml: 'auto' }} onClick={() => setShowEndStreamAlert(false)}>\n <CrossIcon />\n </Box>\n )}\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mb: '$8', mt: '$4' }}>\n The {isStreamingOn ? 'stream' : 'session'} will end for everyone. You can't undo this action.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button\n outlined\n variant=\"standard\"\n css={{ w: '100%', '@md': { display: 'none' } }}\n onClick={() => setShowEndStreamAlert(false)}\n >\n Cancel\n </Button>\n <Button\n variant=\"danger\"\n css={{ w: '100%' }}\n onClick={async () => {\n await leaveRoom({ endstream: true });\n setShowEndStreamAlert(false);\n }}\n id=\"stopStream\"\n data-testid=\"stop_stream_btn\"\n >\n End {isStreamingOn ? 'Stream' : 'Session'}\n </Button>\n </Flex>\n </Box>\n );\n};\n", "import { IconButton } from '../../../IconButton';\nimport { styled } from '../../../Theme';\n\nexport const LeaveIconButton = styled(IconButton, {\n color: '$on_primary_high',\n h: '$14',\n px: '$4',\n r: '$1',\n bg: '$alert_error_default',\n '&:not([disabled]):hover': {\n bg: '$alert_error_bright',\n },\n '&:not([disabled]):active': {\n bg: '$alert_error_default',\n },\n '@md': {\n mx: 0,\n },\n});\n\nexport const MenuTriggerButton = styled(LeaveIconButton, {\n borderLeft: '1px solid $alert_error_dim',\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n px: '$2',\n});\n", "import React from 'react';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { CSS } from '../../../Theme';\n\nexport const LeaveCard = ({\n icon,\n title,\n subtitle,\n onClick,\n bg,\n titleColor,\n css = {},\n}: {\n icon: React.JSX.Element;\n title: string;\n subtitle: string;\n onClick: () => void;\n titleColor: string;\n bg: string;\n css?: CSS;\n}) => {\n return (\n <Flex css={{ p: '$10', flexGrow: 1, gap: '$8', bg, ...css }} onClick={onClick}>\n <Box css={{ color: titleColor }}>{icon}</Box>\n <Box css={{ gap: '$2' }}>\n <Text variant=\"lg\" css={{ color: titleColor }}>\n {title}\n </Text>\n <Text variant=\"sm\" css={{ c: 'inherit' }}>\n {subtitle}\n </Text>\n </Box>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const LeaveSessionContent = ({\n setShowLeaveRoomAlert,\n leaveRoom,\n isModal = false,\n}: {\n setShowLeaveRoomAlert: (value: boolean) => void;\n leaveRoom: (args: { endstream: boolean }) => void;\n isModal?: boolean;\n}) => {\n return (\n <Box>\n <Flex\n css={{\n color: '$alert_error_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: 'inherit', fontWeight: '$semiBold' }}>\n Leave\n </Text>\n {isModal ? null : (\n <Box css={{ color: '$on_surface_high', ml: 'auto' }} onClick={() => setShowLeaveRoomAlert(false)}>\n <CrossIcon />\n </Box>\n )}\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_low', mb: '$8', mt: '$4' }}>\n Others will continue after you leave. You can join the session again.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button\n outlined\n variant=\"standard\"\n css={{ w: '100%', '@md': { display: 'none' } }}\n onClick={() => setShowLeaveRoomAlert(false)}\n >\n Cancel\n </Button>\n <Button\n variant=\"danger\"\n css={{ w: '100%' }}\n onClick={() => leaveRoom({ endstream: false })}\n id=\"leaveRoom\"\n data-testid=\"leave_room\"\n >\n Leave Session\n </Button>\n </Flex>\n </Box>\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { selectIsConnectedToRoom, selectPermissions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { ExitIcon, StopIcon } from '@100mslive/react-icons';\nimport { Box } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Tooltip } from '../../../Tooltip';\nimport { EndSessionContent } from './EndSessionContent';\nimport { LeaveIconButton } from './LeaveAtoms';\nimport { LeaveCard } from './LeaveCard';\nimport { LeaveSessionContent } from './LeaveSessionContent';\n// @ts-ignore: No implicit Any\nimport { useDropdownList } from '../hooks/useDropdownList';\n\nexport const MwebLeaveRoom = ({\n leaveRoom,\n screenType,\n endRoom,\n}: {\n leaveRoom: (args: { endstream: boolean }) => void;\n screenType: keyof ConferencingScreen;\n endRoom: () => void;\n}) => {\n const [open, setOpen] = useState(false);\n const [showLeaveRoomAlert, setShowLeaveRoomAlert] = useState(false);\n const [showEndStreamAlert, setShowEndStreamAlert] = useState(false);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const permissions = useHMSStore(selectPermissions);\n const { isStreamingOn } = useRecordingStreaming();\n const showStream = screenType !== 'hls_live_streaming' && isStreamingOn;\n const showLeaveOptions = (permissions?.hlsStreaming && isStreamingOn) || permissions?.endRoom;\n\n useDropdownList({ open, name: 'LeaveRoom' });\n\n if (!permissions || !isConnected) {\n return null;\n }\n\n return (\n <Fragment>\n {showLeaveOptions ? (\n <Sheet.Root open={open} onOpenChange={setOpen}>\n <Sheet.Trigger asChild>\n <LeaveIconButton\n key=\"LeaveRoom\"\n data-testid=\"leave_room_btn\"\n css={{\n borderTopRightRadius: '$1',\n borderBottomRightRadius: '$1',\n }}\n >\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n </Sheet.Trigger>\n <Sheet.Content>\n <LeaveCard\n title={showStream ? 'Leave Stream' : 'Leave Session'}\n subtitle={`Others will continue after you leave. You can join the ${\n showStream ? 'stream' : 'session'\n } again.`}\n bg=\"$surface_default\"\n titleColor=\"$on_surface_high\"\n icon={<ExitIcon height={24} width={24} style={{ transform: 'rotate(180deg)' }} />}\n onClick={() => leaveRoom({ endstream: false })}\n css={{ pt: 0, mt: '$10', color: '$on_surface_low', '&:hover': { color: '$on_surface_high' } }}\n />\n\n <LeaveCard\n title={showStream ? 'End Stream' : 'End Session'}\n subtitle={`The will end the ${\n showStream ? 'stream' : 'session'\n } for everyone. You can't undo this action.`}\n bg=\"$alert_error_dim\"\n titleColor=\"$alert_error_brighter\"\n css={{ color: '$alert_error_bright', '&:hover': { color: '$alert_error_brighter' } }}\n icon={<StopIcon height={24} width={24} />}\n onClick={() => {\n setOpen(false);\n setShowEndStreamAlert(true);\n }}\n />\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <LeaveIconButton key=\"LeaveRoom\" data-testid=\"leave_room_btn\" onClick={() => setShowLeaveRoomAlert(true)}>\n <Tooltip title=\"Leave Room\">\n <Box>\n <ExitIcon style={{ transform: 'rotate(180deg)' }} />\n </Box>\n </Tooltip>\n </LeaveIconButton>\n )}\n <Sheet.Root open={showEndStreamAlert} onOpenChange={setShowEndStreamAlert}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$10', pb: '$12' }}>\n <EndSessionContent\n setShowEndStreamAlert={setShowEndStreamAlert}\n leaveRoom={isStreamingOn ? leaveRoom : endRoom}\n isStreamingOn={isStreamingOn}\n />\n </Sheet.Content>\n </Sheet.Root>\n\n <Sheet.Root open={showLeaveRoomAlert} onOpenChange={setShowLeaveRoomAlert}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$10', pb: '$12' }}>\n <LeaveSessionContent setShowLeaveRoomAlert={setShowLeaveRoomAlert} leaveRoom={leaveRoom} />\n </Sheet.Content>\n </Sheet.Root>\n </Fragment>\n );\n};\n", "import React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { CSS, VariantProps } from '@stitches/react';\nimport { Dialog } from '../Modal';\nimport { styled } from '../Theme';\nimport { sheetFadeIn, sheetFadeOut, sheetSlideIn, sheetSlideOut } from '../utils';\n\nconst SheetRoot = styled(DialogPrimitive.Root, {\n minHeight: '240px',\n maxWidth: '100%',\n});\nconst SheetTrigger = styled(DialogPrimitive.Trigger, {\n appearance: 'none !important', // Needed for safari it shows white overlay\n});\n\nconst StyledOverlay = styled(Dialog.Overlay, {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n\n '&[data-state=\"open\"]': {\n animation: `${sheetFadeIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${sheetFadeOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n});\n\nconst StyledContent = styled(DialogPrimitive.Content, {\n color: '$on_surface_medium',\n backgroundColor: '$surface_default',\n borderTopLeftRadius: '$3',\n borderTopRightRadius: '$3',\n boxShadow: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',\n position: 'fixed',\n zIndex: 1001,\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n maxHeight: '96%',\n\n // Among other things, prevents text alignment inconsistencies when dialog can't be centered in the viewport evenly.\n // Affects animated and non-animated dialogs alike.\n willChange: 'transform',\n\n '&:focus': {\n outline: 'none',\n },\n '@allowMotion': {\n '&[data-state=\"open\"]': {\n animation: `${sheetSlideIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${sheetSlideOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n },\n\n variants: {\n side: {\n top: {\n $$transformValue: 'translate3d(0,-100%,0)',\n bottom: 'auto',\n },\n right: {\n $$transformValue: 'translate3d(100%,0,0)',\n right: 0,\n },\n bottom: {\n $$transformValue: 'translate3d(0,100%,0)',\n bottom: 0,\n top: 'auto',\n },\n left: {\n $$transformValue: 'translate3d(-100%,0,0)',\n left: 0,\n },\n },\n },\n\n defaultVariants: {\n side: 'bottom',\n },\n});\n\ntype SheetContentVariants = VariantProps<typeof StyledContent>;\ntype DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype SheetContentProps = DialogContentPrimitiveProps & SheetContentVariants & { css?: CSS };\n\nconst SheetContent = React.forwardRef<React.ElementRef<typeof StyledContent>, SheetContentProps>(\n ({ children, ...props }, forwardedRef) => (\n <Dialog.Portal>\n <StyledOverlay />\n <StyledContent {...props} ref={forwardedRef}>\n {children}\n </StyledContent>\n </Dialog.Portal>\n ),\n);\nconst SheetClose = Dialog.Close;\nconst SheetTitle = styled(DialogPrimitive.Title, {\n margin: 0,\n});\nconst SheetDescription = Dialog.Description;\nconst SheetDefaultCloseIcon = Dialog.DefaultClose;\n\nexport const Sheet = {\n Root: SheetRoot,\n Trigger: SheetTrigger,\n Content: SheetContent,\n Description: SheetDescription,\n Title: SheetTitle,\n Close: SheetClose,\n DefaultClose: SheetDefaultCloseIcon,\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\n// @ts-ignore: No implicit Any\nimport { DesktopOptions } from './SplitComponents/DesktopOptions';\n// @ts-ignore: No implicit Any\nimport { MwebOptions } from './SplitComponents/MwebOptions';\nimport { config as cssConfig } from '../../..';\n\nexport const MoreSettings = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n return isMobile ? (\n <MwebOptions elements={elements} screenType={screenType} />\n ) : (\n <DesktopOptions elements={elements} screenType={screenType} />\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { HMSHLSPlayer } from '@100mslive/hls-player';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { selectAppData, selectLocalPeerID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { BrbIcon, CheckIcon, DragHandleIcon, InfoIcon, PipIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { Checkbox, Dropdown, Flex, Text, Tooltip } from '../../../..';\n// @ts-ignore: No implicit any\nimport IconButton from '../../../IconButton';\n// @ts-ignore: No implicit any\nimport { PIP } from '../../PIP';\n// @ts-ignore: No implicit any\nimport { PictureInPicture } from '../../PIP/PIPManager';\n// @ts-ignore: No implicit any\nimport { RoleChangeModal } from '../../RoleChangeModal';\n// @ts-ignore: No implicit any\nimport SettingsModal from '../../Settings/SettingsModal';\n// @ts-ignore: No implicit any\nimport StartRecording from '../../Settings/StartRecording';\n// @ts-ignore: No implicit any\nimport { StatsForNerds } from '../../StatsForNerds';\n// @ts-ignore: No implicit any\nimport { BulkRoleChangeModal } from '../BulkRoleChangeModal';\n// @ts-ignore: No implicit any\nimport { FullScreenItem } from '../FullScreenItem';\n// @ts-ignore: No implicit any\nimport { MuteAllModal } from '../MuteAllModal';\n// @ts-ignore: No implicit any\nimport { useDropdownList } from '../../hooks/useDropdownList';\n// @ts-ignore: No implicit any\nimport { useMyMetadata } from '../../hooks/useMetadata';\n// @ts-ignore: No implicit any\nimport { APP_DATA, isMacOS } from '../../../common/constants';\n\nconst MODALS = {\n CHANGE_NAME: 'changeName',\n SELF_ROLE_CHANGE: 'selfRoleChange',\n MORE_SETTINGS: 'moreSettings',\n START_RECORDING: 'startRecording',\n DEVICE_SETTINGS: 'deviceSettings',\n STATS_FOR_NERDS: 'statsForNerds',\n BULK_ROLE_CHANGE: 'bulkRoleChange',\n MUTE_ALL: 'muteAll',\n EMBED_URL: 'embedUrl',\n};\n\nexport const DesktopOptions = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const localPeerId = useHMSStore(selectLocalPeerID);\n const hmsActions = useHMSActions();\n const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));\n const [openModals, setOpenModals] = useState(new Set());\n const { isBRBOn, toggleBRB } = useMyMetadata();\n const isPipOn = PictureInPicture.isOn();\n const isBRBEnabled = !!elements?.brb;\n\n useDropdownList({ open: openModals.size > 0, name: 'MoreSettings' });\n\n const updateState = (modalName: string, value: boolean) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n // avoiding extra set state trigger which removes currently open dialog by clearing set.\n copy.clear();\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n\n return (\n <Fragment>\n <Dropdown.Root\n open={openModals.has(MODALS.MORE_SETTINGS)}\n onOpenChange={value => updateState(MODALS.MORE_SETTINGS, value)}\n modal={false}\n >\n <Tooltip title=\"More options\">\n <Dropdown.Trigger asChild data-testid=\"more_settings_btn\">\n <IconButton>\n <DragHandleIcon />\n </IconButton>\n </Dropdown.Trigger>\n </Tooltip>\n\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{\n py: '$0',\n maxHeight: 'unset',\n '@md': { w: '$64' },\n \"div[role='separator']:first-child\": {\n display: 'none',\n },\n }}\n >\n {isBRBEnabled && screenType !== 'hls_live_streaming' ? (\n <Dropdown.Item onClick={toggleBRB} data-testid=\"brb_btn\">\n <BrbIcon />\n <Text variant=\"sm\" css={{ ml: '$4', color: '$on_surface_high' }}>\n Be Right Back\n </Text>\n <Flex justify=\"end\" css={{ color: '$on_surface_high', flexGrow: '1' }}>\n {isBRBOn ? <CheckIcon /> : null}\n </Flex>\n </Dropdown.Item>\n ) : null}\n\n {screenType !== 'hls_live_streaming' ? (\n <Dropdown.Item>\n <PIP\n content={\n <Flex css={{ w: '100%' }}>\n <PipIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {isPipOn ? 'Disable' : 'Enable'} Picture-in-Picture\n </Text>\n </Flex>\n }\n />\n </Dropdown.Item>\n ) : null}\n\n <FullScreenItem />\n {/* {isAllowedToPublish.screen && isEmbedEnabled && (\n <EmbedUrl setShowOpenUrl={() => updateState(MODALS.EMBED_URL, true)} />\n )} */}\n\n <Dropdown.ItemSeparator css={{ mx: 0 }} />\n\n <Dropdown.Item onClick={() => updateState(MODALS.DEVICE_SETTINGS, true)} data-testid=\"device_settings_btn\">\n <SettingsIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Settings\n </Text>\n </Dropdown.Item>\n\n {screenType === 'hls_live_streaming' ? (\n HMSHLSPlayer.isSupported() ? (\n <Dropdown.Item\n onClick={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}\n data-testid=\"hls_stats\"\n >\n <Checkbox.Root\n css={{ margin: '$2' }}\n checked={enablHlsStats}\n onCheckedChange={() => hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats)}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n <Flex justify=\"between\" css={{ width: '100%' }}>\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Show HLS Stats\n </Text>\n\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {`${isMacOS ? '\u2318' : 'ctrl'} + ]`}\n </Text>\n </Flex>\n </Dropdown.Item>\n ) : null\n ) : (\n <Dropdown.Item onClick={() => updateState(MODALS.STATS_FOR_NERDS, true)} data-testid=\"stats_for_nreds_btn\">\n <InfoIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Stats for Nerds\n </Text>\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Root>\n {openModals.has(MODALS.BULK_ROLE_CHANGE) && (\n <BulkRoleChangeModal onOpenChange={(value: boolean) => updateState(MODALS.BULK_ROLE_CHANGE, value)} />\n )}\n {openModals.has(MODALS.MUTE_ALL) && (\n <MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} />\n )}\n\n {openModals.has(MODALS.START_RECORDING) && (\n <StartRecording open onOpenChange={(value: boolean) => updateState(MODALS.START_RECORDING, value)} />\n )}\n {openModals.has(MODALS.DEVICE_SETTINGS) && (\n <SettingsModal\n open\n onOpenChange={(value: boolean) => updateState(MODALS.DEVICE_SETTINGS, value)}\n screenType={screenType}\n />\n )}\n {openModals.has(MODALS.STATS_FOR_NERDS) && (\n <StatsForNerds open onOpenChange={(value: boolean) => updateState(MODALS.STATS_FOR_NERDS, value)} />\n )}\n {openModals.has(MODALS.SELF_ROLE_CHANGE) && (\n <RoleChangeModal\n peerId={localPeerId}\n onOpenChange={(value: boolean) => updateState(MODALS.SELF_ROLE_CHANGE, value)}\n />\n )}\n {/* {openModals.has(MODALS.EMBED_URL) && (\n <EmbedUrlModal onOpenChange={value => updateState(MODALS.EMBED_URL, value)} />\n )} */}\n </Fragment>\n );\n};\n", "import React from 'react';\nimport PIPComponent from './PIPComponent';\n\nexport const PIP = ({ content = null }) => {\n return <PIPComponent content={content} />;\n};\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { selectPeers, selectTracksMap, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { PipIcon } from '@100mslive/react-icons';\nimport { Flex, Tooltip } from '../../../';\nimport IconButton from '../../IconButton';\nimport { PictureInPicture } from './PIPManager';\nimport { MediaSession } from './SetupMediaSession';\nimport { usePinnedTrack } from '../AppData/useUISettings';\n\n/**\n * shows a button which when clicked shows some videos in PIP, clicking\n * again turns it off.\n */\nconst PIPComponent = ({ content = null }) => {\n const [isPipOn, setIsPipOn] = useState(PictureInPicture.isOn());\n const hmsActions = useHMSActions();\n const store = useHMSVanillaStore();\n\n const onPipToggle = useCallback(() => {\n if (!isPipOn) {\n PictureInPicture.start(hmsActions, setIsPipOn).catch(err => console.error('error in starting pip', err));\n MediaSession.setup(hmsActions, store);\n } else {\n PictureInPicture.stop().catch(err => console.error('error in stopping pip', err));\n }\n }, [hmsActions, isPipOn, store]);\n\n if (!PictureInPicture.isSupported()) {\n return null;\n }\n return (\n <>\n {content ? (\n <Flex css={{ w: '100%' }} onClick={() => onPipToggle()} data-testid=\"pip_btn\">\n {content}\n </Flex>\n ) : (\n <Tooltip title={`${isPipOn ? 'Deactivate' : 'Activate'} picture in picture view`}>\n <IconButton active={!isPipOn} key=\"pip\" onClick={() => onPipToggle()} data-testid=\"pip_btn\">\n <PipIcon />\n </IconButton>\n </Tooltip>\n )}\n </>\n );\n};\n\n/**\n * this is a separate component so it can be conditionally rendered and\n * the subscriptions to store are done only if required.\n */\nexport const ActivatedPIP = () => {\n const tracksMap = useHMSStore(selectTracksMap);\n const storePeers = useHMSStore(selectPeers);\n const pinnedTrack = usePinnedTrack();\n\n useEffect(() => {\n function updatePIP() {\n if (!PictureInPicture.isOn()) {\n return;\n }\n let pipPeers = storePeers;\n if (pinnedTrack) {\n pipPeers = storePeers.filter(peer => pinnedTrack.peerId === peer.id);\n }\n PictureInPicture.updatePeersAndTracks(pipPeers, tracksMap).catch(err => {\n console.error('error in updating pip', err);\n });\n }\n PictureInPicture.listenToStateChange(updatePIP);\n updatePIP();\n }, [storePeers, tracksMap, pinnedTrack]);\n\n return <></>;\n};\n\nexport default PIPComponent;\n", "import * as workerTimers from 'worker-timers';\nimport { drawVideoElementsOnCanvas, dummyChangeInCanvas, resetPIPCanvasColors } from './pipUtils';\nimport { isIOS, isMacOS, isSafari } from '../../common/constants';\nconst MAX_NUMBER_OF_TILES_IN_PIP = 4;\nconst DEFAULT_FPS = 30;\nconst DEFAULT_CANVAS_WIDTH = 480;\nconst DEFAULT_CANVAS_HEIGHT = 320;\nconst LEAVE_EVENT_NAME = 'leavepictureinpicture';\n\nconst PIPStates = {\n starting: 'starting',\n started: 'started',\n stopping: 'stopping',\n stopped: 'stopped',\n};\n\n/**\n * video elements are stitched together as a canvas which is converted to\n * another video element converted to PIP.\n * The task is split into two parts -\n * 1. a function which gets hit when the input changes and updates the tracks\n * to show\n * 2. an independent loop which updates the canvas periodically based on the current\n * tracks which should be shown.\n */\nclass PipManager {\n listeners = new Set();\n constructor() {\n this.reset();\n }\n\n listenToStateChange(cb) {\n this.listeners.add(cb);\n }\n\n /**\n * @private\n */\n reset() {\n console.debug('resetting PIP state');\n resetPIPCanvasColors();\n this.canvas = null; // where stitching will take place\n this.pipVideo = null; // the element which will be sent in PIP\n this.timeoutRef = null; // setTimeout reference so it can be cancelled\n this.hmsActions = null; // for attaching detaching\n this.videoElements = []; // for attaching tracks\n this.tracksToShow = [];\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n this.onStateChange = () => {}; // for user of this class to listen to changes\n this.state = PIPStates.stopped;\n }\n\n /**\n * check if PIP is supported in this browser env\n */\n isSupported() {\n return !!document.pictureInPictureEnabled && !isIOS && !(isMacOS && isSafari);\n }\n\n /**\n * check if pip is currently turned on\n */\n isOn() {\n return !!document.pictureInPictureElement;\n }\n\n /**\n * request browser to start pip and start the render loop updating the pip\n * video element with peer tracks.\n * @param hmsActions\n * @param onStateChangeFn {function(bool):void} callback called to notify change in pip state\n */\n async start(hmsActions, onStateChangeFn) {\n if (!this.isSupported()) {\n throw new Error('pip is not supported on this browser');\n }\n console.debug('starting PIP, current state', this.state);\n if (this.state === PIPStates.started) {\n await this.stop(); // if anything is already running\n } else if (this.state === PIPStates.starting) {\n return; // ignore double clicks\n }\n this.state = PIPStates.starting;\n try {\n await this.init(hmsActions, onStateChangeFn);\n // when user closes pip, call internal stop\n this.pipVideo.addEventListener(LEAVE_EVENT_NAME, this.stop);\n this.renderLoop();\n if (!this.isOn()) {\n await this.requestPIP();\n }\n console.debug('pip started');\n this.state = PIPStates.started;\n this.onStateChange(true);\n this.callListeners(true);\n } catch (err) {\n console.error('error in request pip', err);\n this.state = PIPStates.stopped;\n }\n }\n\n stop = async () => {\n if (this.state === PIPStates.stopped) {\n return;\n }\n this.state = PIPStates.stopping;\n this.pipVideo?.removeEventListener(LEAVE_EVENT_NAME, this.stop);\n if (this.timeoutRef) {\n workerTimers.clearTimeout(this.timeoutRef);\n this.timeoutRef = null;\n }\n if (this.isOn()) {\n this.exitPIP();\n }\n // detach all to avoid bandwidth consumption\n await this.detachOldAttachNewTracks(this.tracksToShow, []);\n this.onStateChange(false); // notify parent about this\n this.callListeners(false);\n this.reset(); // cleanup\n this.state = PIPStates.stopped;\n };\n\n /**\n * @param peers {Array} All Remote Peers present in call.\n * @param tracksMap {Object} map of track id to track\n * */\n async updatePeersAndTracks(peers, tracksMap) {\n if (!this.canvas) {\n return;\n }\n const newTracksToShowUnordered = this.pickTracksToShow(peers, tracksMap);\n const currentTracksShowing = this.tracksToShow;\n this.tracksToShow = this.orderNewTracksToShow(newTracksToShowUnordered, currentTracksShowing);\n try {\n await this.detachOldAttachNewTracks(currentTracksShowing, this.tracksToShow, tracksMap);\n } catch (error) {\n console.error('error in detaching/attaching tracks', error);\n }\n }\n\n // ------- Private function --------------\n /**\n * @private {boolean} on - whether pip is on/off\n */\n callListeners = on => {\n this.listeners.forEach(listener => listener?.(on));\n };\n\n /**\n * @private\n */\n async init(hmsActions, onStateChangeFn) {\n await this.initMediaElements();\n this.hmsActions = hmsActions;\n this.onStateChange = onStateChangeFn;\n }\n\n async initMediaElements() {\n if (!this.canvas) {\n const { canvas, pipVideo } = this.initializeCanvasAndVideoElement();\n this.canvas = canvas; // where stitching will take place\n this.pipVideo = pipVideo; // the element which will be sent in PIP\n this.videoElements = this.initializeVideoElements(); // for attaching tracks\n const videoPlayPromise = this.pipVideo.play();\n dummyChangeInCanvas(this.canvas);\n await videoPlayPromise;\n }\n }\n\n initializeCanvasAndVideoElement() {\n const canvas = document.createElement('canvas');\n canvas.width = DEFAULT_CANVAS_WIDTH;\n canvas.height = DEFAULT_CANVAS_HEIGHT;\n const pipVideo = document.createElement('video');\n pipVideo.width = DEFAULT_CANVAS_WIDTH;\n pipVideo.height = DEFAULT_CANVAS_HEIGHT;\n pipVideo.muted = true;\n pipVideo.srcObject = canvas.captureStream();\n return { canvas, pipVideo };\n }\n\n initializeVideoElements() {\n let videoElements = [];\n for (let i = 0; i < MAX_NUMBER_OF_TILES_IN_PIP; i++) {\n const videoElement = document.createElement('video');\n videoElement.autoplay = true;\n videoElement.playsinline = true;\n videoElements.push(videoElement);\n }\n return videoElements;\n }\n\n /**\n * render loop is responsible for rendering the video elements on canvas/pip.\n * in each loop current video elements are stitched and painted on canvas\n */\n renderLoop() {\n const delay = 1000 / DEFAULT_FPS;\n this.timeoutRef = workerTimers.setTimeout(() => {\n if (this.state === PIPStates.stopping || this.state === PIPStates.stopped) {\n return;\n }\n if (this.state === PIPStates.started) {\n drawVideoElementsOnCanvas(this.videoElements, this.canvas);\n }\n this.renderLoop();\n }, delay);\n }\n\n async requestPIP() {\n try {\n if (this.isOn()) {\n this.exitPIP(); // is this really needed?\n }\n await this.pipVideo.requestPictureInPicture();\n } catch (error) {\n console.error('error in requestpip', error, 'state', this.state);\n throw error;\n }\n }\n\n exitPIP() {\n document.exitPictureInPicture();\n }\n\n /**\n * Logic - pick only enabled video tracks\n * @param peers {Array<any>}\n * @param tracksMap {Record<string, any>}\n */\n pickTracksToShow(peers, tracksMap) {\n const tracksToShow = [];\n for (const peer of peers) {\n if (tracksToShow.length === MAX_NUMBER_OF_TILES_IN_PIP) {\n break;\n } else if (peer.videoTrack && tracksMap[peer.videoTrack]?.enabled) {\n tracksToShow.push(peer.videoTrack);\n }\n }\n return tracksToShow;\n }\n\n /**\n * there has to be a smart reordering of new tracks based on currently showing\n * ones to reduce unnecessary displacement. If someone was showing up both\n * earlier and now, it's a better UX to keep their position same instead\n * of letting it change.\n * The returned array is a shuffled version of newTracks with position of\n * tracks present in the old tracks intact.\n * eg. old = [1,5,9,3], new = [3,8,2,9], result = [8,2,9,3]\n * @param oldTracks {Array}\n * @param newTracks {Array}\n * @return {Array}\n */\n orderNewTracksToShow(newTracks, oldTracks) {\n const betterNewTracks = [];\n const leftOvers = [];\n // put the common ones in right position\n newTracks.forEach(track => {\n const oldPosition = oldTracks.indexOf(track);\n if (oldPosition !== -1 && oldPosition < newTracks.length) {\n // if track is there currently and we can put it on the same position\n betterNewTracks[oldPosition] = track;\n } else {\n leftOvers.push(track);\n }\n });\n // put the left overs in remaining empty positions\n for (let i = 0; i < newTracks.length; i++) {\n if (!betterNewTracks[i]) {\n betterNewTracks[i] = leftOvers.shift();\n }\n }\n return betterNewTracks;\n }\n\n /**\n * call detach for tracks which no longer need to be shown and attach for\n * new ones which are to be shown now.\n * Note: oldTracks and newTracks are not necessarily of same length\n * @param oldTracks {Array<String>}\n * @param newTracks {Array<String>}\n * @param tracksMap {Record<String, any>}\n */\n // eslint-disable-next-line complexity\n async detachOldAttachNewTracks(oldTracks, newTracks, tracksMap = null) {\n const numTracks = Math.max(oldTracks.length, newTracks.length);\n for (let i = 0; i < numTracks; i++) {\n if (oldTracks[i] === newTracks[i]) {\n continue; // it would already have been attached previously\n } else if (oldTracks[i]) {\n // old track is there but not equal to new track, detach\n // no need to call detach if we know for sure track is no longer in store\n if (!tracksMap || tracksMap[oldTracks[i]]) {\n await this.hmsActions.detachVideo(oldTracks[i], this.videoElements[i]);\n }\n if (this.videoElements[i]) {\n // even if old track got removed from the room, element needs to be cleaned up\n this.videoElements[i].srcObject = null;\n }\n }\n if (newTracks[i]) {\n await this.hmsActions.attachVideo(newTracks[i], this.videoElements[i]);\n }\n }\n }\n}\n\nexport const PictureInPicture = new PipManager();\n// PictureInPicture.initMediaElements().catch(console.error); // for safari, init early\n", "let CANVAS_FILL_COLOR;\nlet CANVAS_STROKE_COLOR;\n\nfunction setPIPCanvasColors() {\n if (!CANVAS_FILL_COLOR) {\n CANVAS_FILL_COLOR = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('--hms-ui-colors-surface_bright');\n }\n if (!CANVAS_STROKE_COLOR) {\n CANVAS_STROKE_COLOR = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('--hms-ui-colors-border_bright');\n }\n}\n\nexport function resetPIPCanvasColors() {\n CANVAS_FILL_COLOR = '';\n CANVAS_STROKE_COLOR = '';\n}\n/**\n * no tile - blank canvas, black image\n * 1 tile - takes full space on canvas\n * 2 tile - stack two video adjacent to each other\n * 3 tile - two rows first row has two tile second row has one tile centered.\n * 4 tiles - two rows two columns - all equal size\n * All videos will respect their aspect ratios.\n */\nexport function drawVideoElementsOnCanvas(videoElements, canvas) {\n let videoTiles = videoElements.filter(videoElement => videoElement.srcObject !== null);\n\n const ctx = canvas.getContext('2d');\n setPIPCanvasColors();\n ctx.fillStyle = CANVAS_FILL_COLOR;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n if (videoTiles.length === 0) {\n // no tile to render, render black image\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n return;\n }\n\n fillGridTiles(videoTiles.slice(0, 4), ctx, canvas);\n}\n\n// this is to send some data for stream and resolve video element's play for a\n// video element rendering this canvas' capture stream\nexport function dummyChangeInCanvas(canvas) {\n const ctx = canvas.getContext('2d');\n setPIPCanvasColors();\n ctx.fillStyle = CANVAS_FILL_COLOR;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * Imagine the canvas as a grid with passed in number of rows and columns. Go\n * over the tiles in the grid in order while drawing the videoElements upon them.\n */\nfunction fillGridTiles(videoElements, ctx, canvas) {\n const offset = 8;\n canvas.width = 480;\n canvas.height = 320;\n\n ctx.fillStyle = CANVAS_FILL_COLOR;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n // Show borders only when there is atleast one video\n if (videoElements.length > 0) {\n ctx.strokeStyle = CANVAS_STROKE_COLOR;\n ctx.lineWidth = offset / 2;\n ctx.strokeRect(0, 0, canvas.width, canvas.height);\n }\n\n if (videoElements.length === 1) {\n const video = videoElements[0];\n const { width, height } = getRenderDimensions(video, canvas.width - offset, canvas.height - offset);\n /**\n * The x and y offset are to center the video tile horizontally and vertically\n * width and height are the aspect ratio constrained video tile dimensions\n */\n const xOffset = (canvas.width - width) / 2;\n const yOffset = (canvas.height - height) / 2;\n ctx.drawImage(video, xOffset, yOffset, width, height);\n }\n\n if (videoElements.length === 2) {\n videoElements.forEach((video, index) => {\n const { width, height } = getRenderDimensions(\n video,\n canvas.width / 2 - offset, // This will be the max available width for each tile\n canvas.height - offset,\n );\n /**\n * (canvas.width / 2 - width) / 2 This is to center width wise within in the box\n * (canvas.width / 2) * index This is the start offset\n * for 1st element it is 0, for second it will be canvas.width/2 which starts from the center\n */\n const xOffset = (canvas.width / 2 - width) / 2 + (canvas.width / 2) * index;\n /**\n * (canvas.height - height) / 2 This is to center height wise\n */\n const yOffset = (canvas.height - height) / 2;\n\n ctx.drawImage(video, xOffset, yOffset, width, height);\n });\n /**\n * Draw a border between tiles\n */\n const path = new Path2D();\n path.moveTo(canvas.width / 2, 0);\n path.lineTo(canvas.width / 2, canvas.height);\n ctx.stroke(path);\n }\n\n if (videoElements.length === 3) {\n videoElements.forEach((video, index) => {\n const { width, height } = getRenderDimensions(video, canvas.width / 2 - offset, canvas.height / 2 - offset);\n /**\n * for first two tiles, xOffset is similar to the 2 tiles calculation with only difference being the height. it is half now.\n */\n const xOffset =\n index < 2 ? (canvas.width / 2 - width) / 2 + (canvas.width / 2) * index : canvas.width / 2 - width / 2;\n const yOffset = (index < 2 ? 0 : canvas.height / 2) + (canvas.height / 2 - height) / 2;\n\n ctx.drawImage(video, xOffset, yOffset, width, height);\n });\n /**\n * Draw borders between tiles\n */\n const path = new Path2D();\n path.moveTo(canvas.width / 2, 0);\n path.lineTo(canvas.width / 2, canvas.height / 2);\n ctx.stroke(path);\n path.moveTo(0, canvas.height / 2);\n path.lineTo(canvas.width, canvas.height / 2);\n ctx.stroke(path);\n }\n if (videoElements.length === 4) {\n videoElements.forEach((video, index) => {\n const { width, height } = getRenderDimensions(video, canvas.width / 2 - offset, canvas.height / 2 - offset);\n /**\n * Similar to two tiles repeat after 2 tiles\n * (canvas.width / 2 - width) / 2 is to center horizontally\n */\n const xOffset = (canvas.width / 2 - width) / 2 + (canvas.width / 2) * (index % 2);\n /**\n * Similar to two tiles with the yOffset being height/2 for the 3rd and 4th tiles\n * (canvas.height / 2 - height) / 2 is to center vertically\n */\n const yOffset = (index < 2 ? 0 : canvas.height / 2) + (canvas.height / 2 - height) / 2;\n\n ctx.drawImage(video, xOffset, yOffset, width, height);\n });\n /**\n * Draw borders between tiles\n */\n const path = new Path2D();\n path.moveTo(canvas.width / 2, 0);\n path.lineTo(canvas.width / 2, canvas.height);\n ctx.stroke(path);\n path.moveTo(0, canvas.height / 2);\n path.lineTo(canvas.width, canvas.height / 2);\n ctx.stroke(path);\n }\n}\n\n/**\n * Restrict the dimensions within the available dimension with aspect ratio\n * constraint applied\n * @param {HTMLVideoElement} video\n * @param {number} width\n * @param {number} height\n * @returns { width: number, height: number }\n */\nfunction getRenderDimensions(video, width, height) {\n let finalWidth = (video.videoWidth / video.videoHeight) * height;\n let finalHeight = height;\n\n if (finalWidth > width) {\n finalWidth = width;\n finalHeight = (video.videoHeight / video.videoWidth) * width;\n }\n return { width: finalWidth, height: finalHeight };\n}\n", "import { selectIsLocalAudioEnabled, selectIsLocalVideoEnabled } from '@100mslive/react-sdk';\n\n/**\n * Media Session API allows for handling control actions on top of pip\n * https://web.dev/media-session/#video-conferencing-actions\n */\nclass SetupMediaSession {\n setup = (actions, store) => {\n this.actions = actions;\n this.store = store;\n this.initState();\n this.setUpHandlers();\n };\n\n initState = () => {\n const isMicActive = this.store.getState(selectIsLocalAudioEnabled);\n const isCamActive = this.store.getState(selectIsLocalVideoEnabled);\n navigator.mediaSession?.setMicrophoneActive?.(isMicActive);\n navigator.mediaSession?.setCameraActive?.(isCamActive);\n\n this.store.subscribe(isMicActive => {\n navigator.mediaSession?.setMicrophoneActive?.(isMicActive);\n }, selectIsLocalAudioEnabled);\n\n this.store.subscribe(isCamActive => {\n navigator.mediaSession?.setCameraActive?.(isCamActive);\n }, selectIsLocalVideoEnabled);\n };\n\n toggleMic = async () => {\n console.log('toggle mic clicked in pip');\n const current = this.store.getState(selectIsLocalAudioEnabled);\n await this.actions.setLocalAudioEnabled(!current);\n };\n\n toggleCam = async () => {\n console.log('toggle cam clicked in pip');\n const current = this.store.getState(selectIsLocalVideoEnabled);\n await this.actions.setLocalVideoEnabled(!current);\n };\n\n leave = () => {\n console.log('leave called from pip');\n this.actions.leave();\n };\n\n setUpHandlers = () => {\n if (navigator.mediaSession) {\n try {\n navigator.mediaSession.setActionHandler('togglemicrophone', this.toggleMic);\n navigator.mediaSession.setActionHandler('togglecamera', this.toggleCam);\n navigator.mediaSession.setActionHandler('hangup', this.leave);\n } catch (err) {\n console.error('error in setting media session handlers', err);\n }\n }\n };\n}\n\nexport const MediaSession = new SetupMediaSession();\n", "import React, { forwardRef, useRef, useState } from 'react';\nimport { selectPeerByID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Checkbox } from '../../Checkbox';\nimport { Dropdown } from '../../Dropdown';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Text } from '../../Text';\nimport { Tooltip } from '../../Tooltip';\nimport { useDropdownSelection } from './hooks/useDropdownSelection';\nimport { useFilteredRoles } from '../common/hooks';\nimport { textEllipsis } from '../../utils';\n\nconst PeerName = forwardRef(({ children, maxWidth, ...rest }, ref) => (\n <Text\n {...rest}\n ref={ref}\n as=\"strong\"\n variant=\"body2\"\n css={{\n ...textEllipsis(maxWidth),\n display: 'inline-block',\n fontWeight: '$semiBold',\n c: 'inherit',\n }}\n >\n {children}\n </Text>\n));\n\nexport const RoleChangeModal = ({ peerId, onOpenChange }) => {\n const peer = useHMSStore(selectPeerByID(peerId));\n const roles = useFilteredRoles();\n const [selectedRole, setRole] = useState(peer?.roleName);\n const [requestPermission, setRequestPermission] = useState(true);\n const hmsActions = useHMSActions();\n const [open, setOpen] = useState(false);\n const selectionBg = useDropdownSelection();\n const [peerNameRef, setPeerNameRef] = useState();\n const ref = useRef();\n if (!peer) {\n return null;\n }\n\n const peerNameMaxWidth = 200;\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title css={{ p: 0 }} asChild>\n <Text as=\"h6\" variant=\"h6\">\n Change Role\n </Text>\n </Dialog.Title>\n <Dialog.Description asChild>\n <Text\n variant=\"body2\"\n css={{\n mt: '$4',\n mb: '$8',\n c: '$on_surface_medium',\n display: 'flex',\n flexWrap: 'wrap',\n columnGap: '4px',\n }}\n >\n Change the role of\n {peerNameRef && peerNameRef.clientWidth === peerNameMaxWidth ? (\n <Tooltip title={peer.name} side=\"top\">\n <PeerName ref={setPeerNameRef} maxWidth={peerNameMaxWidth}>\n {peer.name}\n </PeerName>\n </Tooltip>\n ) : (\n <PeerName ref={setPeerNameRef} maxWidth={peerNameMaxWidth}>\n {peer.name}\n </PeerName>\n )}\n to\n </Text>\n </Dialog.Description>\n <Flex\n align=\"center\"\n css={{\n w: '100%',\n mb: '$10',\n }}\n >\n <Box\n css={{\n position: 'relative',\n flex: '1 1 0',\n minWidth: 0,\n }}\n >\n <Dropdown.Root open={open} onOpenChange={setOpen} css={{ width: '100%' }}>\n <Dropdown.Trigger\n data-testid=\"open_role_selection_dropdown\"\n asChild\n css={{\n border: '1px solid $border_bright',\n bg: '$surface_bright',\n r: '$1',\n p: '$6 $9',\n }}\n ref={ref}\n >\n <Flex align=\"center\" justify=\"between\" css={{ width: '100%' }}>\n <Text>{selectedRole}</Text>\n {open ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Portal>\n <Dropdown.Content\n align=\"start\"\n sideOffset={8}\n css={{ zIndex: 1000, width: ref.current?.clientWidth }}\n >\n {roles.map(role => {\n return (\n <Dropdown.Item\n data-testid={role}\n key={role}\n onSelect={() => setRole(role)}\n css={{\n px: '$9',\n bg: role === selectedRole ? selectionBg : undefined,\n }}\n >\n {role}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Box>\n </Flex>\n {!peer.isLocal && (\n <Flex justify=\"between\" css={{ w: '100%', mb: '$10' }}>\n <Label htmlFor=\"requestRoleChangePermission\" css={{ cursor: 'pointer' }}>\n Request Permission\n </Label>\n <Checkbox.Root\n checked={requestPermission}\n onCheckedChange={value => setRequestPermission(value)}\n id=\"requestRoleChangePermission\"\n data-testid=\"force_role_change_checkbox\"\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n </Flex>\n )}\n <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md' }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%', p: '$4 $8' }} asChild>\n <Button variant=\"standard\" outlined css={{ width: '100%' }} data-testid=\"cancel_button\">\n Cancel\n </Button>\n </Dialog.Close>\n </Box>\n <Box css={{ width: '50%' }}>\n <Button\n data-testid=\"change_button\"\n variant=\"primary\"\n css={{ width: '100%' }}\n onClick={async () => {\n await hmsActions.changeRole(peerId, selectedRole, peer.isLocal ? true : !requestPermission);\n onOpenChange(false);\n }}\n >\n Change\n </Button>\n </Box>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "export const useDropdownSelection = () => {\n return '$surface_bright';\n};\n", "// @ts-check\nimport { useEffect, useRef, useState } from 'react';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\nimport {\n selectAvailableRoleNames,\n selectIsConnectedToRoom,\n selectPeerCount,\n selectPeerMetadata,\n selectPeers,\n selectRemotePeers,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { useRoomLayout } from '../provider/roomLayoutProvider';\n\n/**\n * Hook to execute a callback when alone in room(after a certain 5d of time)\n * @param {number} thresholdMs The threshold(in ms) after which the callback is executed,\n * starting from the instant when alone in room.\n * note: the cb is not called when another peer joins during this period.\n */\nexport const useWhenAloneInRoom = (thresholdMs = 5 * 60 * 1000) => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const peerCount = useHMSStore(selectPeerCount);\n const [aloneForLong, setAloneForLong] = useState(false);\n const cbTimeout = useRef(null);\n const alone = isConnected && peerCount === 1;\n\n useEffect(() => {\n if (alone && !cbTimeout.current) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n cbTimeout.current = setTimeout(() => {\n setAloneForLong(true);\n }, thresholdMs);\n } else if (!alone) {\n cbTimeout.current && clearTimeout(cbTimeout.current);\n cbTimeout.current = null;\n setAloneForLong(false);\n }\n }, [alone, thresholdMs]);\n\n useEffect(() => {\n return () => {\n if (cbTimeout.current) {\n clearTimeout(cbTimeout.current);\n }\n };\n }, []);\n\n return { alone, aloneForLong };\n};\n\nexport const useFilteredRoles = () => {\n const roles = useHMSStore(selectAvailableRoleNames);\n return roles;\n};\n\nexport const useShowStreamingUI = () => {\n const layout = useRoomLayout();\n const { join_form } = layout?.screens?.preview?.default?.elements || {};\n return join_form?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE;\n};\n\n// The search results should not have role name matches\nexport const useParticipants = params => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const peerCount = useHMSStore(selectPeerCount);\n const availableRoles = useHMSStore(selectAvailableRoleNames);\n let participantList = useHMSStore(isConnected ? selectPeers : selectRemotePeers);\n const rolesWithParticipants = Array.from(new Set(participantList.map(peer => peer.roleName)));\n const vanillaStore = useHMSVanillaStore();\n if (params?.metadata?.isHandRaised) {\n participantList = participantList.filter(peer => {\n return vanillaStore.getState(selectPeerMetadata(peer.id)).isHandRaised;\n });\n }\n if (params?.role && availableRoles.includes(params.role)) {\n participantList = participantList.filter(peer => peer.roleName === params.role);\n }\n if (params?.search) {\n const search = params.search;\n // Removed peer.roleName?.toLowerCase().includes(search)\n participantList = participantList.filter(peer => peer.name.toLowerCase().includes(search));\n }\n return { participants: participantList, isConnected, peerCount, rolesWithParticipants };\n};\n", "import React from 'react';\nimport type { Layout } from '@100mslive/types-prebuilt';\nimport merge from 'lodash.merge';\n// @ts-ignore: fix types\nimport { useAuthToken } from '../../components/AppData/useUISettings';\nimport { useFetchRoomLayout, useFetchRoomLayoutResponse } from './hooks/useFetchRoomLayout';\n\nexport type RoomLayoutProviderProps = {\n roomLayoutEndpoint?: string;\n overrideLayout?: Partial<Layout>;\n};\n\nexport const RoomLayoutContext = React.createContext<\n | {\n layout: Layout | undefined;\n updateRoomLayoutForRole: useFetchRoomLayoutResponse['updateRoomLayoutForRole'] | undefined;\n }\n | undefined\n>(undefined);\n\nexport const RoomLayoutProvider: React.FC<React.PropsWithChildren<RoomLayoutProviderProps>> = ({\n children,\n roomLayoutEndpoint,\n overrideLayout,\n}) => {\n const authToken: string = useAuthToken();\n const { layout, updateRoomLayoutForRole } = useFetchRoomLayout({ authToken, endpoint: roomLayoutEndpoint });\n const mergedLayout = authToken && layout ? merge(layout, overrideLayout) : layout;\n return (\n <RoomLayoutContext.Provider value={{ layout: mergedLayout, updateRoomLayoutForRole }}>\n {children}\n </RoomLayoutContext.Provider>\n );\n};\n\nexport const useRoomLayout = () => React.useContext(RoomLayoutContext)?.layout;\nexport const useUpdateRoomLayout = () => React.useContext(RoomLayoutContext)?.updateRoomLayoutForRole;\n", "import { useCallback, useEffect, useRef, useState } from 'react';\nimport type { GetResponse, Layout } from '@100mslive/types-prebuilt';\nimport { defaultLayout } from '../constants';\n\n// TODO: remove this usage\nconst fetchWithRetry = async (url = '', options = {}) => {\n const MAX_RETRIES = 4;\n let error = Error('something went wrong');\n for (let i = 0; i < MAX_RETRIES; i++) {\n try {\n return await fetch(url, options);\n } catch (err) {\n error = err as Error;\n }\n }\n console.error('Fetch failed after max retries', { url, options });\n throw error;\n};\n\n// this should take endpoint and return\nexport type useFetchRoomLayoutProps = {\n endpoint?: string;\n authToken: string;\n};\n\nexport type useFetchRoomLayoutResponse = {\n layout: Layout | undefined;\n updateRoomLayoutForRole: (role: string) => void;\n};\n\nexport const useFetchRoomLayout = ({\n endpoint = '',\n authToken = '',\n}: useFetchRoomLayoutProps): useFetchRoomLayoutResponse => {\n const [layout, setLayout] = useState<Layout | undefined>(undefined);\n const layoutResp = useRef<GetResponse>();\n const isFetchInProgress = useRef(false);\n const updateRoomLayoutForRole = useCallback((role: string) => {\n if (!layoutResp.current) {\n return;\n }\n const [layout] = (layoutResp.current?.data || []).filter(layout => layout.role === role);\n if (layout) {\n setLayout(layout);\n }\n }, []);\n useEffect(() => {\n (async () => {\n if (isFetchInProgress.current || !authToken) {\n return;\n }\n isFetchInProgress.current = true;\n try {\n const resp = await fetchWithRetry(endpoint || 'https://api.100ms.live/v2/layouts/ui', {\n headers: {\n Authorization: `Bearer ${authToken}`,\n },\n });\n layoutResp.current = await resp.json();\n } catch (e) {\n console.error('[Room Layout API]: Failed to fetch / process room layout. Resorting to default layout.', e);\n layoutResp.current = {\n data: [defaultLayout],\n };\n }\n let layoutForRole = layoutResp.current?.data?.[0];\n if (!layoutForRole) {\n console.error(\n '[Room Layout API]: Unable to figure out room layout from API response. Resorting to default layout.',\n );\n layoutForRole = defaultLayout;\n }\n const layout = layoutForRole;\n setLayout(layout);\n isFetchInProgress.current = false;\n })();\n }, [authToken, endpoint]);\n\n return { layout, updateRoomLayoutForRole };\n};\n", "import type { Layout } from '@100mslive/types-prebuilt';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\n\nexport const defaultLayout: Layout = {\n id: '',\n role_id: '',\n template_id: '',\n app_id: '',\n typography: {\n font_family: 'Inter',\n },\n themes: [],\n options: {},\n screens: {\n preview: {\n default: {\n elements: {\n preview_header: {\n title: 'Get Started',\n sub_title: 'Setup your audio and video before joining',\n },\n join_form: {\n join_btn_type: JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_ONLY,\n join_btn_label: 'Join Now',\n go_live_btn_label: 'Go Live',\n },\n },\n },\n },\n conferencing: {\n default: {\n elements: {\n chat: {},\n participant_list: {},\n video_tile_layout: {\n grid: {\n enable_local_tile_inset: true,\n prominent_roles: [],\n enable_spotlighting_peer: true,\n },\n },\n emoji_reactions: {},\n },\n },\n },\n leave: {},\n },\n};\n", "import React, { useCallback, useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { HorizontalDivider } from '../../../Divider';\nimport { IconButton } from '../../../IconButton';\nimport { Box, Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Sheet } from '../../../Sheet';\nimport { Tabs } from '../../../Tabs';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { settingContent, settingsList } from './common.js';\n\nconst SettingsModal = ({ open, onOpenChange, screenType, children = <></> }) => {\n const mediaQueryLg = cssConfig.media.md;\n const isMobile = useMedia(mediaQueryLg);\n\n const [showSetting, setShowSetting] = useState(() =>\n settingsList.reduce((obj, { tabName }) => ({ ...obj, [tabName]: true }), {}),\n );\n\n const hideSettingByTabName = useCallback(\n key => hide => setShowSetting(prev => ({ ...prev, [key]: !hide })),\n [setShowSetting],\n );\n\n useEffect(() => {\n if (screenType === 'hls_live_streaming') {\n hideSettingByTabName('layout')(true);\n }\n }, [screenType, hideSettingByTabName]);\n\n const [selection, setSelection] = useState(() => Object.keys(showSetting).find(key => showSetting[key]) ?? '');\n const resetSelection = useCallback(() => {\n setSelection('');\n }, []);\n\n useEffect(() => {\n if (isMobile) {\n setSelection('');\n } else {\n const firstNotHiddenTabName = Object.keys(showSetting).find(key => showSetting[key]) ?? '';\n setSelection(firstNotHiddenTabName);\n }\n }, [isMobile, showSetting]);\n\n return isMobile ? (\n <MobileSettingModal\n open={open}\n onOpenChange={onOpenChange}\n selection={selection}\n setSelection={setSelection}\n showSetting={showSetting}\n hideSettingByTabName={hideSettingByTabName}\n resetSelection={resetSelection}\n children={children}\n />\n ) : (\n <DesktopSettingModal\n open={open}\n onOpenChange={onOpenChange}\n selection={selection}\n setSelection={setSelection}\n showSetting={showSetting}\n hideSettingByTabName={hideSettingByTabName}\n resetSelection={resetSelection}\n children={children}\n />\n );\n};\n\nconst MobileSettingModal = ({\n open,\n onOpenChange,\n selection,\n setSelection,\n showSetting,\n hideSettingByTabName,\n resetSelection,\n children = <></>,\n}) => {\n return (\n <Sheet.Root open={open} onOpenChange={onOpenChange}>\n <Sheet.Trigger asChild>{children}</Sheet.Trigger>\n <Sheet.Content\n css={{\n bg: '$surface_dim',\n overflowY: 'auto',\n }}\n >\n <Sheet.Title css={{ py: '$10', px: '$8', alignItems: 'center' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%' }}>\n {!selection ? (\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n Settings\n </Text>\n ) : (\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n <Box as=\"span\" css={{ r: '$round', mr: '$2' }} onClick={resetSelection}>\n <ChevronLeftIcon />\n </Box>\n {selection?.charAt(0).toUpperCase() + selection.slice(1)}\n </Text>\n )}\n <Sheet.Close>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n {!selection ? (\n <Flex\n direction=\"column\"\n css={{\n px: '$8',\n pb: '$8',\n overflowY: 'auto',\n }}\n >\n {settingsList\n .filter(({ tabName }) => showSetting[tabName])\n .map(({ icon: Icon, tabName, title }) => {\n return (\n <Box\n key={tabName}\n value={tabName}\n onClick={() => {\n setSelection(tabName);\n }}\n as=\"div\"\n css={{\n all: 'unset',\n fontFamily: '$sans',\n py: '$10',\n display: 'flex',\n alignItems: 'center',\n fontSize: '$sm',\n lineHeight: '$sm',\n color: '$on_surface_high',\n userSelect: 'none',\n gap: '$8',\n cursor: 'pointer',\n '&:hover': {\n bg: '$surface_brighter',\n r: '$1',\n gap: '$8',\n border: 'none',\n },\n borderBottom: '1px solid $border_default',\n }}\n >\n <Icon />\n {title}\n </Box>\n );\n })}\n </Flex>\n ) : (\n <Box\n direction=\"column\"\n css={{ overflowY: 'scroll', px: '$8', py: '$10', maxHeight: '70vh', overflowX: 'hidden' }}\n >\n {settingsList\n .filter(({ tabName }) => showSetting[tabName] && selection === tabName)\n .map(({ content: Content, title, tabName }) => {\n return <Content key={title} setHide={hideSettingByTabName(tabName)} />;\n })}\n </Box>\n )}\n </Sheet.Content>\n </Sheet.Root>\n );\n};\nconst DesktopSettingModal = ({\n open,\n onOpenChange,\n selection,\n setSelection,\n showSetting,\n hideSettingByTabName,\n resetSelection,\n children = <></>,\n}) => {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Trigger asChild>{children}</Dialog.Trigger>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n w: 'min(800px, 90%)',\n height: 'min(656px, 90%)',\n p: 0,\n r: '$4',\n }}\n >\n <Tabs.Root\n value={selection}\n activationMode=\"automatic\"\n onValueChange={setSelection}\n css={{ size: '100%', position: 'relative' }}\n >\n <Tabs.List\n css={{\n w: '18.625rem',\n flexDirection: 'column',\n bg: '$background_default',\n p: '$14 $10',\n borderTopLeftRadius: '$4',\n borderBottomLeftRadius: '$4',\n }}\n >\n <Text variant=\"h5\">Settings </Text>\n <Flex direction=\"column\" css={{ mx: 0, overflowY: 'auto', pt: '$10' }}>\n {settingsList\n .filter(({ tabName }) => showSetting[tabName])\n .map(({ icon: Icon, tabName, title }) => {\n return (\n <Tabs.Trigger key={tabName} value={tabName} css={{ gap: '$8' }}>\n <Icon />\n {title}\n </Tabs.Trigger>\n );\n })}\n </Flex>\n </Tabs.List>\n {selection && (\n <Flex\n direction=\"column\"\n css={{\n flex: '1 1 0',\n minWidth: 0,\n mr: '$4',\n }}\n >\n {settingsList\n .filter(({ tabName }) => showSetting[tabName])\n .map(({ content: Content, title, tabName }) => {\n return (\n <Tabs.Content key={tabName} value={tabName} className={settingContent()}>\n <SettingsContentHeader onBack={resetSelection} isMobile={false}>\n {title}\n </SettingsContentHeader>\n <Content setHide={hideSettingByTabName(tabName)} />\n </Tabs.Content>\n );\n })}\n </Flex>\n )}\n </Tabs.Root>\n <Dialog.Close css={{ position: 'absolute', right: '$10', top: '$10' }}>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Dialog.Close>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\nconst SettingsContentHeader = ({ children, isMobile, onBack }) => {\n return (\n <Text variant=\"h6\" css={{ mb: '$12', display: 'flex', alignItems: 'center' }}>\n {isMobile && (\n <Box as=\"span\" css={{ bg: '$surface_bright', mr: '$4', r: '$round', p: '$2' }} onClick={onBack}>\n <ChevronLeftIcon />\n </Box>\n )}\n {children}\n </Text>\n );\n};\n\nexport default SettingsModal;\n", "import { GridFourIcon, NotificationsIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { css } from '../../..';\nimport DeviceSettings from '../Settings/DeviceSettings';\nimport { LayoutSettings } from '../Settings/LayoutSettings';\nimport { NotificationSettings } from '../Settings/NotificationSettings';\n\nexport const settingOverflow = css({\n flex: '1 1 0',\n pr: '$12',\n mr: '-$12',\n overflowY: 'auto',\n});\n\nexport const settingContent = css({\n display: 'flex',\n flexDirection: 'column',\n '&[hidden]': {\n display: 'none',\n },\n});\n\nexport const settingsList = [\n {\n tabName: 'devices',\n title: 'Device Settings',\n icon: SettingsIcon,\n content: DeviceSettings,\n },\n {\n tabName: 'notifications',\n title: 'Notifications',\n icon: NotificationsIcon,\n content: NotificationSettings,\n },\n {\n tabName: 'layout',\n title: 'Layout',\n icon: GridFourIcon,\n content: LayoutSettings,\n },\n];\n", "import React, { Fragment, useEffect, useRef, useState } from 'react';\nimport {\n DeviceType,\n selectIsLocalVideoEnabled,\n selectLocalVideoTrackID,\n selectVideoTrackByID,\n useDevices,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { MicOnIcon, SpeakerIcon, VideoOnIcon } from '@100mslive/react-icons';\nimport { Box, Button, Dropdown, Flex, StyledVideoTile, Text, Video } from '../../../';\nimport { DialogDropdownTrigger } from '../../primitives/DropdownTrigger';\nimport { useUISettings } from '../AppData/useUISettings';\nimport { useDropdownSelection } from '../hooks/useDropdownSelection';\nimport { settingOverflow } from './common.js';\nimport { UI_SETTINGS } from '../../common/constants';\n\n/**\n * wrap the button on click of whom settings should open, this component will take care of the rest,\n * it'll give the user options to change input/output device as well as check speaker.\n * There is also another controlled way of using this by passing in open and onOpenChange.\n */\nconst Settings = ({ setHide }) => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n const { videoInput, audioInput, audioOutput } = allDevices;\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n // don't show speaker selector where the API is not supported, and use\n // a generic word(\"Audio\") for Mic. In some cases(Chrome Android for e.g.) this changes both mic and speaker keeping them in sync.\n const shouldShowAudioOutput = 'setSinkId' in HTMLMediaElement.prototype;\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const trackSelector = selectVideoTrackByID(videoTrackId);\n const track = useHMSStore(trackSelector);\n\n /**\n * Chromium browsers return an audioOutput with empty label when no permissions are given\n */\n const audioOutputFiltered = audioOutput?.filter(item => !!item.label) ?? [];\n\n if (!videoInput?.length && !audioInput?.length && !audioOutputFiltered?.length) {\n setHide(true);\n }\n\n return (\n <Box className={settingOverflow()}>\n {videoInput?.length ? (\n <Fragment>\n {isVideoOn && (\n <StyledVideoTile.Container\n css={{\n w: '90%',\n px: '$10',\n height: '$48',\n bg: 'transparent',\n m: '$10 auto',\n }}\n >\n <Video trackId={videoTrackId} mirror={track?.facingMode !== 'environment' && mirrorLocalVideo} />\n </StyledVideoTile.Container>\n )}\n <DeviceSelector\n title=\"Video\"\n devices={videoInput}\n icon={<VideoOnIcon />}\n selection={selectedDeviceIDs.videoInput}\n onChange={deviceId =>\n updateDevice({\n deviceId,\n deviceType: DeviceType.videoInput,\n })\n }\n />\n </Fragment>\n ) : null}\n\n {audioInput?.length ? (\n <DeviceSelector\n title={shouldShowAudioOutput ? 'Microphone' : 'Audio'}\n icon={<MicOnIcon />}\n devices={audioInput}\n selection={selectedDeviceIDs.audioInput}\n onChange={deviceId =>\n updateDevice({\n deviceId,\n deviceType: DeviceType.audioInput,\n })\n }\n />\n ) : null}\n\n {audioOutputFiltered?.length && shouldShowAudioOutput ? (\n <DeviceSelector\n title=\"Speaker\"\n icon={<SpeakerIcon />}\n devices={audioOutput}\n selection={selectedDeviceIDs.audioOutput}\n onChange={deviceId =>\n updateDevice({\n deviceId,\n deviceType: DeviceType.audioOutput,\n })\n }\n >\n <TestAudio id={selectedDeviceIDs.audioOutput} />\n </DeviceSelector>\n ) : null}\n </Box>\n );\n};\n\nconst DeviceSelector = ({ title, devices, selection, onChange, icon, children = null }) => {\n const [open, setOpen] = useState(false);\n const selectionBg = useDropdownSelection();\n const ref = useRef(null);\n\n return (\n <Box css={{ mb: '$10' }}>\n <Text css={{ mb: '$4' }}>{title}</Text>\n <Flex\n align=\"center\"\n css={{\n gap: '$4',\n '@md': {\n flexDirection: children ? 'column' : 'row',\n alignItems: children ? 'start' : 'center',\n },\n }}\n >\n <Box\n css={{\n position: 'relative',\n flex: '1 1 0',\n minWidth: 0,\n w: '100%',\n maxWidth: '100%',\n '@md': {\n mb: children ? '$8' : 0,\n },\n }}\n >\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n ref={ref}\n icon={icon}\n title={devices.find(({ deviceId }) => deviceId === selection)?.label || 'Select device from list'}\n open={open}\n />\n <Dropdown.Portal>\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1001 }}>\n {devices.map(device => {\n return (\n <Dropdown.Item\n key={device.label}\n onSelect={() => onChange(device.deviceId)}\n css={{\n px: '$9',\n bg: device.deviceId === selection ? selectionBg : undefined,\n }}\n >\n {device.label}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Box>\n {children}\n </Flex>\n </Box>\n );\n};\n\nconst TEST_AUDIO_URL = 'https://100ms.live/test-audio.wav';\n\nconst TestAudio = ({ id }) => {\n const audioRef = useRef(null);\n const [playing, setPlaying] = useState(false);\n useEffect(() => {\n if (audioRef.current && id) {\n try {\n if (typeof audioRef.current.setSinkId !== 'undefined') {\n audioRef.current.setSinkId(id);\n }\n } catch (error) {\n console.log(error);\n }\n }\n }, [id]);\n return (\n <>\n <Button\n variant=\"standard\"\n css={{\n flexShrink: 0,\n p: '$6 $9',\n '@md': {\n w: '100%',\n },\n }}\n onClick={() => audioRef.current?.play()}\n disabled={playing}\n >\n <SpeakerIcon />\n &nbsp;Test{' '}\n <Text as=\"span\" css={{ display: 'none', '@md': { display: 'inline' } }}>\n &nbsp; speaker\n </Text>\n </Button>\n <audio ref={audioRef} src={TEST_AUDIO_URL} onEnded={() => setPlaying(false)} onPlay={() => setPlaying(true)} />\n </>\n );\n};\n\nexport default Settings;\n", "import React from 'react';\nimport { ChevronDownIcon, ChevronUpIcon } from '@100mslive/react-icons';\nimport { Dropdown, Flex, Text, textEllipsis } from '../../index';\n\nconst DialogDropdownTrigger = React.forwardRef(({ title, css, open, icon, titleCSS = {} }, ref) => {\n return (\n <Dropdown.Trigger\n asChild\n data-testid={`${title}_selector`}\n css={{\n border: '1px solid $border_bright',\n bg: '$surface_bright',\n r: '$1',\n p: '$6 $9',\n zIndex: 10,\n ...css,\n }}\n ref={ref}\n >\n <Flex\n css={{\n display: 'flex',\n justifyContent: 'space-between',\n color: '$on_surface_high',\n w: '100%',\n }}\n >\n {icon}\n <Text\n css={{\n color: 'inherit',\n ...textEllipsis('90%'),\n flex: '1 1 0',\n mx: icon ? '$6' : '0',\n ...titleCSS,\n }}\n >\n {title}\n </Text>\n {open ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Flex>\n </Dropdown.Trigger>\n );\n});\n\nexport { DialogDropdownTrigger };\n", "import React, { useCallback } from 'react';\nimport { selectIsLocalScreenShared, selectIsLocalVideoEnabled, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { Box, Flex, Slider, Text } from '../../../';\nimport SwitchWithLabel from './SwitchWithLabel';\nimport { useSetUiSettings } from '../AppData/useUISettings';\nimport { settingOverflow } from './common.js';\nimport { UI_SETTINGS } from '../../common/constants';\n\nexport const LayoutSettings = () => {\n const hmsActions = useHMSActions();\n const isLocalVideoEnabled = useHMSStore(selectIsLocalVideoEnabled);\n const isLocalScreenShared = useHMSStore(selectIsLocalScreenShared);\n const [{ isAudioOnly, maxTileCount, mirrorLocalVideo }, setUISettings] = useSetUiSettings();\n const toggleIsAudioOnly = useCallback(\n async isAudioOnlyModeOn => {\n if (isAudioOnlyModeOn) {\n // turn off video and screen share if user switches to audio only mode\n isLocalVideoEnabled && (await hmsActions.setLocalVideoEnabled(false));\n isLocalScreenShared && (await hmsActions.setScreenShareEnabled(false));\n }\n setUISettings({ [UI_SETTINGS.isAudioOnly]: isAudioOnlyModeOn });\n },\n [hmsActions, isLocalVideoEnabled, isLocalScreenShared, setUISettings],\n );\n\n return (\n <Box className={settingOverflow()}>\n <SwitchWithLabel label=\"Audio Only Mode\" id=\"audioOnlyMode\" checked={isAudioOnly} onChange={toggleIsAudioOnly} />\n <SwitchWithLabel\n label=\"Mirror Local Video\"\n id=\"mirrorMode\"\n checked={mirrorLocalVideo}\n onChange={value => {\n setUISettings({\n [UI_SETTINGS.mirrorLocalVideo]: value,\n });\n }}\n />\n <Flex align=\"center\" css={{ w: '100%', my: '$2', py: '$8', '@md': { display: 'none' } }}>\n <Text variant=\"md\" css={{ fontWeight: '$semiBold' }}>\n Tiles In View({maxTileCount})\n </Text>\n <Flex justify=\"end\" css={{ flex: '1 1 0' }}>\n <Slider\n step={1}\n value={[maxTileCount]}\n min={1}\n max={49}\n onValueChange={e => {\n setUISettings({ [UI_SETTINGS.maxTileCount]: e[0] });\n }}\n css={{ w: '70%' }}\n />\n </Flex>\n </Flex>\n </Box>\n );\n};\n", "import React from 'react';\nimport { Label } from '../../../Label';\nimport { Flex } from '../../../Layout';\nimport { Switch } from '../../../Switch';\n\nconst SwitchWithLabel = ({ label, icon, id, onChange, checked, hide = false }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n my: '$2',\n py: '$8',\n w: '100%',\n borderBottom: '1px solid $border_default',\n display: hide ? 'none' : 'flex',\n }}\n >\n <Label\n htmlFor={id}\n css={{\n fontSize: '$md',\n fontWeight: '$semiBold',\n color: checked ? '$on_surface_high' : '$on_surface_low',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n flex: '1 1 0',\n }}\n >\n {icon}\n {label}\n </Label>\n <Switch id={id} checked={checked} onCheckedChange={onChange} />\n </Flex>\n );\n};\n\nexport default SwitchWithLabel;\n", "import React from 'react';\nimport { AlertOctagonIcon, HandIcon, PeopleAddIcon, PeopleRemoveIcon } from '@100mslive/react-icons';\nimport { Box } from '../../../';\nimport SwitchWithLabel from './SwitchWithLabel';\nimport { useSetSubscribedNotifications, useSubscribedNotifications } from '../AppData/useUISettings';\nimport { settingOverflow } from './common.js';\nimport { SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';\n\nconst NotificationItem = ({ type, label, icon, checked }) => {\n const [, setSubscribedNotifications] = useSetSubscribedNotifications(type);\n return (\n <SwitchWithLabel\n label={label}\n id={type}\n icon={icon}\n checked={checked}\n onChange={value => {\n setSubscribedNotifications(value);\n }}\n />\n );\n};\n\nexport const NotificationSettings = () => {\n const subscribedNotifications = useSubscribedNotifications();\n\n return (\n <Box className={settingOverflow()}>\n <NotificationItem\n label=\"Peer Joined\"\n type={SUBSCRIBED_NOTIFICATIONS.PEER_JOINED}\n icon={<PeopleAddIcon />}\n checked={subscribedNotifications.PEER_JOINED}\n />\n <NotificationItem\n label=\"Peer Leave\"\n type={SUBSCRIBED_NOTIFICATIONS.PEER_LEFT}\n icon={<PeopleRemoveIcon />}\n checked={subscribedNotifications.PEER_LEFT}\n />\n <NotificationItem\n label=\"Hand Raised\"\n type={SUBSCRIBED_NOTIFICATIONS.METADATA_UPDATED}\n icon={<HandIcon />}\n checked={subscribedNotifications.METADATA_UPDATED}\n />\n <NotificationItem\n label=\"Error\"\n type={SUBSCRIBED_NOTIFICATIONS.ERROR}\n icon={<AlertOctagonIcon />}\n checked={subscribedNotifications.ERROR}\n />\n </Box>\n );\n};\n", "import React, { useState } from 'react';\nimport { selectPermissions, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon } from '@100mslive/react-icons';\nimport { Button, Dialog, Flex, Text } from '../../../';\nimport { ResolutionInput } from '../Streaming/ResolutionInput';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA, RTMP_RECORD_DEFAULT_RESOLUTION } from '../../common/constants';\n\nexport function getResolution(recordingResolution) {\n const resolution = {};\n if (recordingResolution.width) {\n resolution.width = recordingResolution.width;\n }\n if (recordingResolution.height) {\n resolution.height = recordingResolution.height;\n }\n if (Object.keys(resolution).length > 0) {\n return resolution;\n }\n}\n\nconst StartRecording = ({ open, onOpenChange }) => {\n const permissions = useHMSStore(selectPermissions);\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n\n const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const hmsActions = useHMSActions();\n if (!permissions?.browserRecording || isHLSRunning) {\n return null;\n }\n if (isBrowserRecordingOn) {\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Content\n css={{\n width: 'min(400px,80%)',\n p: '$10',\n bg: '#201617',\n }}\n >\n <Dialog.Title>\n <Flex gap={2} css={{ c: '$alert_error_default' }}>\n <AlertTriangleIcon />\n <Text css={{ c: 'inherit' }} variant=\"h6\">\n End Recording\n </Text>\n </Flex>\n </Dialog.Title>\n <Text variant=\"sm\" css={{ c: '$on_surface_medium', my: '$8' }}>\n Are you sure you want to end recording? You can\u2019t undo this action.\n </Text>\n <Flex justify=\"end\" css={{ mt: '$12' }}>\n <Dialog.Close asChild>\n <Button outlined css={{ borderColor: '$secondary_bright', mr: '$4' }}>\n Don't end\n </Button>\n </Dialog.Close>\n <Button\n data-testid=\"stop_recording_confirm_mobile\"\n variant=\"danger\"\n icon\n onClick={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n ToastManager.addToast({\n title: error.message,\n variant: 'error',\n });\n }\n onOpenChange(false);\n }}\n >\n End recording\n </Button>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n }\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Content css={{ width: 'min(400px,80%)', p: '$10' }}>\n <Dialog.Title>\n <Text variant=\"h6\">Start Recording</Text>\n </Dialog.Title>\n <ResolutionInput\n testId=\"recording_resolution_mobile\"\n css={{ flexDirection: 'column', alignItems: 'start' }}\n onResolutionChange={setResolution}\n />\n <Button\n data-testid=\"start_recording_confirm_mobile\"\n variant=\"primary\"\n icon\n css={{ ml: 'auto' }}\n type=\"submit\"\n disabled={recordingStarted || isStreamingOn}\n onClick={async () => {\n try {\n setRecordingState(true);\n await hmsActions.startRTMPOrRecording({\n resolution: getResolution(resolution),\n record: true,\n });\n } catch (error) {\n if (error.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n title: error.message,\n variant: 'error',\n });\n }\n setRecordingState(false);\n }\n onOpenChange(false);\n }}\n >\n Start\n </Button>\n </Dialog.Content>\n </Dialog.Root>\n );\n};\n\nexport default StartRecording;\n", "import React, { useCallback, useState } from 'react';\nimport { InfoIcon } from '@100mslive/react-icons';\nimport { Flex, Input, Label, Text, Tooltip } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\nimport {\n RTMP_RECORD_DEFAULT_RESOLUTION,\n RTMP_RECORD_RESOLUTION_MAX,\n RTMP_RECORD_RESOLUTION_MIN,\n} from '../../common/constants';\n\nexport const ResolutionInput = ({ onResolutionChange, disabled, tooltipText, css, testId }) => {\n const [resolution, setResolution] = useState(RTMP_RECORD_DEFAULT_RESOLUTION);\n\n const resolutionChangeHandler = useCallback(\n event => {\n const { name, value } = event.target;\n let width = name === 'resWidth' ? Number(value) : resolution.width;\n let height = name === 'resHeight' ? Number(value) : resolution.height;\n\n if (width === 0) {\n width = null;\n }\n if (height === 0) {\n height = null;\n }\n const newResolution = {\n width: !isNaN(width) ? width : RTMP_RECORD_DEFAULT_RESOLUTION.width,\n height: !isNaN(height) ? height : RTMP_RECORD_DEFAULT_RESOLUTION.height,\n };\n setResolution(newResolution);\n },\n [resolution],\n );\n\n return (\n <DialogRow breakSm css={css}>\n <Flex gap={1}>\n <Label css={{ mb: '$8' }}>Resolution</Label>\n {tooltipText && (\n <Tooltip title={tooltipText}>\n <div>\n <InfoIcon color=\"#B0C3DB\" />\n </div>\n </Tooltip>\n )}\n </Flex>\n <Flex\n justify=\"between\"\n css={{ width: !tooltipText ? '100%' : '70%', '@sm': { width: '100%' } }}\n gap={2}\n direction=\"column\"\n >\n <Flex justify=\"between\" gap={2}>\n <Flex direction=\"column\" css={{ width: '50%' }}>\n <Text variant=\"xs\">Width</Text>\n <Input\n data-testid={`${testId}_width`}\n css={{ width: '100%', mt: '$4' }}\n name=\"resWidth\"\n value={resolution.width}\n onChange={resolutionChangeHandler}\n readOnly={disabled}\n min={RTMP_RECORD_RESOLUTION_MIN}\n max={RTMP_RECORD_RESOLUTION_MAX}\n onBlur={() => onResolutionChange(resolution)}\n type=\"number\"\n />\n </Flex>\n <Flex direction=\"column\" css={{ width: '50%' }}>\n <Text variant=\"xs\">Height</Text>\n <Input\n data-testid={`${testId}_height`}\n css={{ width: '100%', mt: '$4' }}\n name=\"resHeight\"\n value={resolution.height}\n onChange={resolutionChangeHandler}\n onBlur={() => onResolutionChange(resolution)}\n readOnly={disabled}\n min={RTMP_RECORD_RESOLUTION_MIN}\n max={RTMP_RECORD_RESOLUTION_MAX}\n type=\"number\"\n />\n </Flex>\n </Flex>\n </Flex>\n </DialogRow>\n );\n};\n", "import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport {\n selectHMSStats,\n selectLocalPeerID,\n selectPeersMap,\n selectTracksMap,\n useHMSStatsStore,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { HorizontalDivider } from '../../Divider';\nimport { Dropdown } from '../../Dropdown';\nimport { Label } from '../../Label';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Switch } from '../../Switch';\nimport { Text } from '../../Text';\nimport { DialogDropdownTrigger } from '../primitives/DropdownTrigger';\nimport { useSetUiSettings } from './AppData/useUISettings';\nimport { useDropdownSelection } from './hooks/useDropdownSelection';\nimport { UI_SETTINGS } from '../common/constants';\n\nexport const StatsForNerds = ({ onOpenChange }) => {\n const tracksWithLabels = useTracksWithLabel();\n const statsOptions = useMemo(\n () => [{ id: 'local-peer', label: 'Local Peer Stats' }, ...tracksWithLabels],\n [tracksWithLabels],\n );\n const [selectedStat, setSelectedStat] = useState(statsOptions[0]);\n const [showStatsOnTiles, setShowStatsOnTiles] = useSetUiSettings(UI_SETTINGS.showStatsOnTiles);\n const [open, setOpen] = useState(false);\n const ref = useRef();\n const selectionBg = useDropdownSelection();\n\n useEffect(() => {\n if (selectedStat.id !== 'local-peer' && !tracksWithLabels.find(track => track.id === selectedStat.id)) {\n setSelectedStat('local-peer');\n }\n }, [tracksWithLabels, selectedStat]);\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n width: 'min(500px, 95%)',\n maxHeight: '100%',\n overflowY: 'auto',\n }}\n >\n {/* Title */}\n <Dialog.Title css={{ p: '$4 0' }}>\n <Flex justify=\"between\">\n <Flex align=\"center\" css={{ mb: '$1' }}>\n <Text variant=\"h6\" inline>\n Stats For Nerds\n </Text>\n </Flex>\n <Dialog.DefaultClose data-testid=\"stats_dialog_close_icon\" />\n </Flex>\n </Dialog.Title>\n <HorizontalDivider css={{ mt: '0.8rem' }} />\n {/* Switch */}\n <Flex justify=\"start\" gap={4} css={{ m: '$10 0' }}>\n <Switch checked={showStatsOnTiles} onCheckedChange={setShowStatsOnTiles} />\n <Text variant=\"body2\" css={{ fontWeight: '$semiBold' }}>\n Show Stats on Tiles\n </Text>\n </Flex>\n {/* Select */}\n <Flex\n direction=\"column\"\n css={{\n mb: '$12',\n position: 'relative',\n minWidth: 0,\n }}\n >\n <Label variant=\"body2\" css={{ c: '$on_surface_high' }}>\n Stats For\n </Label>\n <Dropdown.Root data-testid=\"dialog_select_Stats For\" open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n title={selectedStat.label || 'Select Stats'}\n css={{ mt: '$4' }}\n titleCSS={{ mx: 0 }}\n open={open}\n ref={ref}\n />\n <Dropdown.Portal>\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1000 }}>\n {statsOptions.map(option => {\n const isSelected = option.id === selectedStat.id && option.layer === selectedStat.layer;\n return (\n <Dropdown.Item\n key={`${option.id}-${option.layer || ''}`}\n onClick={() => {\n setSelectedStat(option);\n }}\n css={{\n px: '$9',\n bg: isSelected ? selectionBg : undefined,\n c: isSelected ? '$on_primary_high' : '$on_primary_high',\n }}\n >\n {option.label}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n </Flex>\n {/* Stats */}\n {selectedStat.id === 'local-peer' ? (\n <LocalPeerStats />\n ) : (\n <TrackStats trackID={selectedStat.id} layer={selectedStat.layer} local={selectedStat.local} />\n )}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nconst useTracksWithLabel = () => {\n const tracksMap = useHMSStore(selectTracksMap);\n const peersMap = useHMSStore(selectPeersMap);\n const localPeerID = useHMSStore(selectLocalPeerID);\n const tracksWithLabels = useMemo(\n () =>\n Object.values(tracksMap).reduce((res, track) => {\n const peerName = peersMap[track.peerId]?.name;\n const isLocalTrack = track.peerId === localPeerID;\n if (isLocalTrack && track.layerDefinitions?.length) {\n res = res.concat(\n track.layerDefinitions.map(({ layer }) => {\n return {\n id: track.id,\n layer,\n local: true,\n label: `${peerName} ${track.source} ${track.type} - ${layer}`,\n };\n }),\n );\n return res;\n }\n res.push({\n id: track.id,\n local: isLocalTrack,\n label: `${peerName} ${track.source} ${track.type}`,\n });\n return res;\n }, []),\n [tracksMap, peersMap, localPeerID],\n );\n return tracksWithLabels;\n};\n\nconst LocalPeerStats = () => {\n const stats = useHMSStatsStore(selectHMSStats.localPeerStats);\n\n if (!stats) {\n return null;\n }\n\n return (\n <Flex css={{ flexWrap: 'wrap', gap: '$10' }}>\n <StatsRow label=\"Packets Lost\" value={stats.subscribe?.packetsLost} />\n <StatsRow label=\"Jitter\" value={stats.subscribe?.jitter} />\n <StatsRow label=\"Publish Bitrate\" value={formatBytes(stats.publish?.bitrate, 'b/s')} />\n <StatsRow label=\"Subscribe Bitrate\" value={formatBytes(stats.subscribe?.bitrate, 'b/s')} />\n <StatsRow\n label=\"Available Outgoing Bitrate\"\n value={formatBytes(stats.publish?.availableOutgoingBitrate, 'b/s')}\n />\n <StatsRow label=\"Total Bytes Sent\" value={formatBytes(stats.publish?.bytesSent)} />\n <StatsRow label=\"Total Bytes Received\" value={formatBytes(stats.subscribe?.bytesReceived)} />\n <StatsRow\n label=\"Round Trip Time\"\n value={`${\n (((stats.publish?.currentRoundTripTime || 0) + (stats.subscribe?.currentRoundTripTime || 0)) / 2).toFixed(3) *\n 1000\n } ms`}\n />\n </Flex>\n );\n};\n\nconst TrackStats = ({ trackID, layer, local }) => {\n const selector = layer\n ? selectHMSStats.localVideoTrackStatsByLayer(layer)(trackID)\n : local\n ? selectHMSStats.localAudioTrackStatsByID(trackID)\n : selectHMSStats.trackStatsByID(trackID);\n const stats = useHMSStatsStore(selector);\n if (!stats) {\n return null;\n }\n const inbound = stats.type.includes('inbound');\n\n return (\n <Flex css={{ flexWrap: 'wrap', gap: '$10' }}>\n <StatsRow label=\"Type\" value={stats.type + ' ' + stats.kind} />\n <StatsRow label=\"Bitrate\" value={formatBytes(stats.bitrate, 'b/s')} />\n <StatsRow label=\"Packets Lost\" value={stats.packetsLost} />\n <StatsRow label=\"Jitter\" value={stats.jitter?.toFixed(3)} />\n <StatsRow\n label={inbound ? 'Bytes Received' : 'Bytes Sent'}\n value={formatBytes(inbound ? stats.bytesReceived : stats.bytesSent)}\n />\n {stats.kind === 'video' && (\n <>\n <StatsRow label=\"Framerate\" value={stats.framesPerSecond} />\n {!inbound && <StatsRow label=\"Quality Limitation Reason\" value={stats.qualityLimitationReason} />}\n </>\n )}\n <StatsRow label=\"Round Trip Time\" value={stats.roundTripTime ? `${stats.roundTripTime * 1000} ms` : '-'} />\n </Flex>\n );\n};\n\nconst StatsRow = React.memo(({ label, value }) => (\n <Box css={{ bg: '$surface_bright', w: 'calc(50% - $6)', p: '$8', r: '$3' }}>\n <Text\n variant=\"overline\"\n css={{\n fontWeight: '$semiBold',\n color: '$on_surface_medium',\n textTransform: 'uppercase',\n }}\n >\n {label}\n </Text>\n <Text variant=\"sub1\" css={{ fontWeight: '$semiBold', color: '$on_surface_high' }}>\n {value || '-'}\n </Text>\n </Box>\n));\n\nconst formatBytes = (bytes, unit = 'B', decimals = 2) => {\n if (bytes === undefined) return '-';\n if (bytes === 0) return '0 ' + unit;\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'].map(size => size + unit);\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n", "import React, { useCallback, useRef, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, ChangeRoleIcon, CheckIcon } from '@100mslive/react-icons';\nimport { Button, Checkbox, Dialog, Dropdown, Flex, Loading, Text } from '../../../';\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\nimport { DialogDropdownTrigger } from '../../primitives/DropdownTrigger';\nimport { useFilteredRoles } from '../../common/hooks';\n\nexport const BulkRoleChangeModal = ({ onOpenChange }) => {\n const roles = useFilteredRoles();\n const hmsActions = useHMSActions();\n const ref = useRef(null);\n const roleRef = useRef(null);\n const [selectedBulkRole, setBulkRole] = useState([]);\n const [selectedRole, setRole] = useState('');\n const [bulkRoleDialog, setBulkRoleDialog] = useState(false);\n const [roleDialog, setRoleDialog] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n const [isSubmiting, setIsSubmiting] = useState(false);\n\n const changeBulkRole = useCallback(async () => {\n if (selectedBulkRole.length > 0 && selectedRole) {\n try {\n setIsSubmiting(true);\n await hmsActions.changeRoleOfPeersWithRoles(selectedBulkRole, selectedRole);\n setIsSubmiting(false);\n setErrorMessage('');\n onOpenChange(false);\n } catch (err) {\n setErrorMessage(err?.message ? err?.message : 'Unknown error');\n setIsSubmiting(false);\n }\n }\n }, [selectedBulkRole, selectedRole, hmsActions, onOpenChange]);\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <DialogContent title=\"Bulk Role Change\" Icon={ChangeRoleIcon}>\n <DialogRow>\n <Text>For Roles: </Text>\n <Dropdown.Root\n open={bulkRoleDialog}\n onOpenChange={value => {\n if (value) {\n setBulkRoleDialog(value);\n }\n }}\n modal={false}\n >\n <DialogDropdownTrigger\n ref={ref}\n title={selectedBulkRole.length === 0 ? 'Select Multiple Roles' : selectedBulkRole.toString()}\n css={{\n w: '70%',\n p: '$8',\n }}\n open={bulkRoleDialog}\n />\n <Dropdown.Content\n css={{ w: ref.current?.clientWidth, zIndex: 1000 }}\n onInteractOutside={() => {\n if (bulkRoleDialog) {\n setBulkRoleDialog(false);\n }\n }}\n >\n {roles &&\n roles.map(role => {\n return (\n <Dropdown.CheckboxItem\n key={role}\n checked={selectedBulkRole.includes(role)}\n onCheckedChange={value => {\n setBulkRole(selection => {\n return value ? [...selection, role] : selection.filter(selectedRole => selectedRole !== role);\n });\n setErrorMessage('');\n }}\n >\n <Checkbox.Root css={{ margin: '$2' }} checked={selectedBulkRole.includes(role)}>\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n {role}\n </Dropdown.CheckboxItem>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Root>\n </DialogRow>\n <DialogRow>\n <Text>To Role: </Text>\n <Dropdown.Root open={roleDialog} onOpenChange={value => setRoleDialog(value)}>\n <DialogDropdownTrigger\n ref={roleRef}\n title={selectedRole || 'Select Role'}\n css={{\n w: '70%',\n p: '$8',\n }}\n open={roleDialog}\n />\n <Dropdown.Content css={{ w: roleRef.current?.clientWidth, zIndex: 1000 }}>\n {roles &&\n roles.map(role => {\n return (\n <Dropdown.Item\n key={role}\n onSelect={() => {\n setRole(role);\n setErrorMessage('');\n }}\n >\n {role}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Root>\n </DialogRow>\n <DialogRow>\n {errorMessage && (\n <Flex gap={2} css={{ c: '$alert_error_default', w: '70%', ml: 'auto' }}>\n <AlertTriangleIcon />\n <Text css={{ c: 'inherit' }}>{errorMessage}</Text>\n </Flex>\n )}\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button variant=\"primary\" onClick={changeBulkRole} disabled={!(selectedRole && selectedBulkRole.length > 0)}>\n {isSubmiting && <Loading css={{ color: '$on_primary_medium' }} />}\n Apply\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { ExpandIcon } from '@100mslive/react-icons';\nimport { Dropdown, Text } from '../../../';\nimport { useFullscreen } from '../hooks/useFullscreen';\n\nexport const FullScreenItem = () => {\n const { allowed, isFullscreen, toggleFullscreen } = useFullscreen();\n\n if (!allowed) {\n return null;\n }\n\n return (\n <Dropdown.Item\n onClick={() => {\n toggleFullscreen();\n }}\n data-testid=\"full_screen_btn\"\n >\n <ExpandIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n {isFullscreen ? 'Exit ' : 'Go '}Fullscreen\n </Text>\n </Dropdown.Item>\n );\n};\n", "import { useCallback, useEffect, useState } from 'react';\nimport screenfull from 'screenfull';\nimport { ToastManager } from '../Toast/ToastManager';\n\nexport const useFullscreen = () => {\n const [isFullScreenEnabled, setIsFullScreenEnabled] = useState(screenfull.isFullscreen);\n\n const toggle = useCallback(async () => {\n if (!screenfull.isEnabled) {\n ToastManager.addToast({ title: 'Fullscreen feature not supported' });\n return;\n }\n try {\n if (isFullScreenEnabled) {\n await screenfull.exit();\n } else {\n await screenfull.request();\n }\n } catch (err) {\n ToastManager.addToast({ title: err.message });\n }\n }, [isFullScreenEnabled]);\n\n useEffect(() => {\n const onChange = () => {\n setIsFullScreenEnabled(screenfull.isFullscreen);\n };\n if (screenfull.isEnabled) {\n screenfull.on('change', onChange);\n }\n return () => {\n if (screenfull.isEnabled) {\n screenfull.off('change', onChange);\n }\n };\n }, []);\n\n return {\n allowed: screenfull.isEnabled,\n isFullscreen: isFullScreenEnabled,\n toggleFullscreen: toggle,\n };\n};\n", "import React, { useCallback, useState } from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { MicOffIcon } from '@100mslive/react-icons';\nimport { Dialog } from '../../../';\nimport { Sheet } from '../../../Sheet';\nimport { DialogContent } from '../../primitives/DialogContent';\nimport { MuteAllContent } from './MuteAllContent';\nimport { useFilteredRoles } from '../../common/hooks';\n\nconst trackSourceOptions = [\n { label: 'All Track Sources', value: '' },\n { label: 'regular', value: 'regular' },\n { label: 'screen', value: 'screen' },\n { label: 'audioplaylist', value: 'audioplaylist' },\n { label: 'videoplaylist', value: 'videoplaylist' },\n];\nconst trackTypeOptions = [\n { label: 'All Track Types', value: '' },\n { label: 'audio', value: 'audio' },\n { label: 'video', value: 'video' },\n];\nexport const MuteAllModal = ({ onOpenChange, isMobile = false }) => {\n const roles = useFilteredRoles();\n const hmsActions = useHMSActions();\n const [enabled, setEnabled] = useState(false);\n const [trackType, setTrackType] = useState();\n const [selectedRole, setRole] = useState();\n const [selectedSource, setSource] = useState();\n\n const muteAll = useCallback(async () => {\n await hmsActions.setRemoteTracksEnabled({\n enabled: enabled,\n type: trackType,\n source: selectedSource,\n roles: selectedRole ? [selectedRole] : undefined,\n });\n onOpenChange(false);\n }, [selectedRole, enabled, trackType, selectedSource, hmsActions, onOpenChange]);\n\n const props = {\n muteAll,\n roles,\n enabled,\n setEnabled,\n trackType,\n setTrackType,\n selectedRole,\n setRole,\n selectedSource,\n setSource,\n trackSourceOptions,\n trackTypeOptions,\n isMobile,\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ px: '$10' }}>\n <MuteAllContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <DialogContent title=\"Mute/Unmute Remote Tracks\" Icon={MicOffIcon}>\n <MuteAllContent {...props} />\n </DialogContent>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { Button } from '../../../Button';\nimport { Label } from '../../../Label';\nimport { Flex } from '../../../Layout';\nimport { RadioGroup } from '../../../RadioGroup';\nimport { Text } from '../../../Text';\nimport { DialogRow, DialogSelect } from '../../primitives/DialogContent';\n\nexport const MuteAllContent = props => {\n const roles = props.roles || [];\n return (\n <>\n <DialogSelect\n title=\"Role\"\n options={[{ label: 'All Roles', value: '' }, ...roles.map(role => ({ label: role, value: role }))]}\n selected={props.selectedRole}\n keyField=\"value\"\n labelField=\"label\"\n onChange={props.setRole}\n />\n <DialogSelect\n title=\"Track type\"\n options={props.trackTypeOptions}\n selected={props.trackType}\n onChange={props.setTrackType}\n keyField=\"value\"\n labelField=\"label\"\n />\n <DialogSelect\n title=\"Track source\"\n options={props.trackSourceOptions}\n selected={props.selectedSource}\n onChange={props.setSource}\n keyField=\"value\"\n labelField=\"label\"\n />\n <DialogRow>\n <Text variant=\"md\">Track status</Text>\n <RadioGroup.Root value={props.enabled} onValueChange={props.setEnabled}>\n <Flex align=\"center\" css={{ mr: '$8' }}>\n <RadioGroup.Item value={false} id=\"trackDisableRadio\" css={{ mr: '$4' }}>\n <RadioGroup.Indicator />\n </RadioGroup.Item>\n <Label htmlFor=\"trackDisableRadio\">Mute</Label>\n </Flex>\n <Flex align=\"center\" css={{ cursor: 'pointer' }}>\n <RadioGroup.Item value={true} id=\"trackEnableRadio\" css={{ mr: '$4' }}>\n <RadioGroup.Indicator />\n </RadioGroup.Item>\n <Label htmlFor=\"trackEnableRadio\">Request Unmute</Label>\n </Flex>\n </RadioGroup.Root>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button variant=\"primary\" onClick={props.muteAll} css={{ w: props?.isMobile ? '100%' : '' }}>\n Apply\n </Button>\n </DialogRow>\n </>\n );\n};\n", "import { useCallback } from 'react';\nimport {\n selectHasPeerHandRaised,\n selectLocalPeerID,\n selectPeerMetadata,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\n\nexport const useMyMetadata = () => {\n const hmsActions = useHMSActions();\n const localPeerId = useHMSStore(selectLocalPeerID);\n const vanillaStore = useHMSVanillaStore();\n const metaData = useHMSStore(selectPeerMetadata(localPeerId));\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(localPeerId));\n\n const update = async updatedFields => {\n try {\n // get current state from store and merge updated fields\n const currentMetadata = vanillaStore.getState(selectPeerMetadata(localPeerId));\n await hmsActions.changeMetadata(Object.assign(currentMetadata, updatedFields));\n return true;\n } catch (error) {\n console.error('failed to update metadata ', updatedFields);\n }\n };\n\n const toggleHandRaise = useCallback(async () => {\n if (isHandRaised) {\n await hmsActions.lowerLocalPeerHand();\n } else {\n await hmsActions.raiseLocalPeerHand();\n await update({ isBRBOn: false });\n }\n }, [isHandRaised]); //eslint-disable-line\n\n const toggleBRB = useCallback(async () => {\n const newValue = !metaData?.isBRBOn;\n await update({ isBRBOn: newValue });\n if (newValue) {\n await hmsActions.lowerLocalPeerHand();\n }\n }, [metaData?.isBRBOn]); //eslint-disable-line\n\n const setPrevRole = async role => {\n await update({\n prevRole: role,\n });\n };\n\n return {\n isHandRaised,\n isBRBOn: !!metaData?.isBRBOn,\n metaData,\n updateMetaData: update,\n toggleHandRaise,\n toggleBRB,\n setPrevRole,\n };\n};\n", "import React, { useRef, useState } from 'react';\nimport { useClickAway } from 'react-use';\nimport { ConferencingScreen, DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport {\n selectIsConnectedToRoom,\n selectPeerCount,\n selectPermissions,\n useAVToggle,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport {\n BrbIcon,\n CrossIcon,\n DragHandleIcon,\n EmojiIcon,\n HandIcon,\n HandRaiseSlashedIcon,\n PeopleIcon,\n QuizIcon,\n RecordIcon,\n SettingsIcon,\n} from '@100mslive/react-icons';\nimport { Box, Loading, Tooltip } from '../../../..';\nimport { Sheet } from '../../../../Sheet';\n// @ts-ignore: No implicit any\nimport IconButton from '../../../IconButton';\n// @ts-ignore: No implicit any\nimport { EmojiReaction } from '../../EmojiReaction';\n// @ts-ignore: No implicit any\nimport { StopRecordingInSheet } from '../../Header/StreamActions';\n// @ts-ignore: No implicit any\nimport SettingsModal from '../../Settings/SettingsModal';\n// @ts-ignore: No implicit any\nimport { ToastManager } from '../../Toast/ToastManager';\n// @ts-ignore: No implicit any\nimport { ActionTile } from '../ActionTile';\n// @ts-ignore: No implicit any\nimport { ChangeNameModal } from '../ChangeNameModal';\n// @ts-ignore: No implicit any\nimport { MuteAllModal } from '../MuteAllModal';\n// @ts-ignore: No implicit any\nimport { usePollViewToggle, useSidepaneToggle } from '../../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { useShowPolls } from '../../AppData/useUISettings';\n// @ts-ignore: No implicit any\nimport { useDropdownList } from '../../hooks/useDropdownList';\n// @ts-ignore: No implicit any\nimport { useMyMetadata } from '../../hooks/useMetadata';\n// @ts-ignore: No implicit any\nimport { getFormattedCount } from '../../../common/utils';\n// @ts-ignore: No implicit any\nimport { SIDE_PANE_OPTIONS } from '../../../common/constants';\n\n// const VirtualBackground = React.lazy(() => import('../../../plugins/VirtualBackground/VirtualBackground'));\n\nconst MODALS = {\n CHANGE_NAME: 'changeName',\n SELF_ROLE_CHANGE: 'selfRoleChange',\n MORE_SETTINGS: 'moreSettings',\n START_RECORDING: 'startRecording',\n DEVICE_SETTINGS: 'deviceSettings',\n STATS_FOR_NERDS: 'statsForNerds',\n BULK_ROLE_CHANGE: 'bulkRoleChange',\n MUTE_ALL: 'muteAll',\n EMBED_URL: 'embedUrl',\n};\n\nexport const MwebOptions = ({\n elements,\n screenType,\n}: {\n elements: DefaultConferencingScreen_Elements;\n screenType: keyof ConferencingScreen;\n}) => {\n const hmsActions = useHMSActions();\n const permissions = useHMSStore(selectPermissions);\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const [openModals, setOpenModals] = useState(new Set());\n const [openOptionsSheet, setOpenOptionsSheet] = useState(false);\n const [openSettingsSheet, setOpenSettingsSheet] = useState(false);\n const [showEmojiCard, setShowEmojiCard] = useState(false);\n const [showRecordingOn, setShowRecordingOn] = useState(false);\n const [isRecordingLoading, setIsRecordingLoading] = useState(false);\n const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const { showPolls } = useShowPolls();\n const togglePollView = usePollViewToggle();\n const peerCount = useHMSStore(selectPeerCount);\n const emojiCardRef = useRef(null);\n const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();\n const { toggleAudio, toggleVideo } = useAVToggle();\n const noAVPermissions = !(toggleAudio || toggleVideo);\n // const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n\n useDropdownList({ open: openModals.size > 0 || openOptionsSheet || openSettingsSheet, name: 'MoreSettings' });\n\n const updateState = (modalName: string, value: boolean) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n\n useClickAway(emojiCardRef, () => setShowEmojiCard(false));\n\n return (\n <>\n <Sheet.Root open={openOptionsSheet} onOpenChange={setOpenOptionsSheet}>\n <Tooltip title=\"More options\">\n <Sheet.Trigger asChild data-testid=\"more_settings_btn\">\n <IconButton>\n <DragHandleIcon />\n </IconButton>\n </Sheet.Trigger>\n </Tooltip>\n <Sheet.Content css={{ bg: '$surface_dim', pb: '$14' }}>\n <Sheet.Title\n css={{\n display: 'flex',\n color: '$on_surface_high',\n w: '100%',\n justifyContent: 'space-between',\n fontSize: '$md',\n mt: '$8',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_default',\n mb: '$8',\n alignItems: 'center',\n }}\n >\n Options\n <Sheet.Close>\n <Box css={{ color: '$on_surface_high' }}>\n <CrossIcon />\n </Box>\n </Sheet.Close>\n </Sheet.Title>\n <Box\n css={{\n display: 'grid',\n gridTemplateColumns: '1fr 1fr 1fr',\n gridTemplateRows: 'auto',\n gridColumnGap: '$6',\n gridRowGap: '$8',\n px: '$9',\n }}\n >\n {elements?.participant_list && (\n <ActionTile.Root\n onClick={() => {\n toggleParticipants();\n setOpenOptionsSheet(false);\n }}\n >\n <ActionTile.Count>{getFormattedCount(peerCount)}</ActionTile.Count>\n <PeopleIcon />\n <ActionTile.Title>Participants</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {!noAVPermissions ? (\n <ActionTile.Root\n active={isHandRaised}\n onClick={() => {\n toggleHandRaise();\n setOpenOptionsSheet(false);\n }}\n >\n {isHandRaised ? <HandRaiseSlashedIcon /> : <HandIcon />}\n <ActionTile.Title>{isHandRaised ? 'Lower' : 'Raise'} Hand</ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n\n {/* {isVideoOn ? (\n <Suspense fallback=\"\">\n <VirtualBackground asActionTile onVBClick={() => setOpenOptionsSheet(false)} />\n </Suspense>\n ) : null} */}\n\n {elements?.emoji_reactions && (\n <ActionTile.Root\n onClick={() => {\n setShowEmojiCard(true);\n setOpenOptionsSheet(false);\n }}\n >\n <EmojiIcon />\n <ActionTile.Title>Emoji Reactions</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {showPolls && (\n <ActionTile.Root\n onClick={() => {\n togglePollView();\n setOpenOptionsSheet(false);\n }}\n >\n <QuizIcon />\n <ActionTile.Title>Polls and Quizzes</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n {elements?.brb && (\n <ActionTile.Root\n active={isBRBOn}\n onClick={() => {\n toggleBRB();\n setOpenOptionsSheet(false);\n }}\n >\n <BrbIcon />\n <ActionTile.Title>Be Right Back</ActionTile.Title>\n </ActionTile.Root>\n )}\n\n <ActionTile.Root\n onClick={() => {\n setOpenSettingsSheet(true);\n setOpenOptionsSheet(false);\n }}\n >\n <SettingsIcon />\n <ActionTile.Title>Settings</ActionTile.Title>\n </ActionTile.Root>\n\n {isConnected && permissions?.browserRecording ? (\n <ActionTile.Root\n disabled={isHLSRunning}\n onClick={async () => {\n if (isRecordingLoading) {\n return;\n }\n if (isBrowserRecordingOn || isStreamingOn) {\n setOpenOptionsSheet(false);\n setShowRecordingOn(true);\n } else {\n // start recording\n setIsRecordingLoading(true);\n try {\n await hmsActions.startRTMPOrRecording({\n record: true,\n });\n setOpenOptionsSheet(false);\n setIsRecordingLoading(false);\n } catch (error) {\n // @ts-ignore\n if (error.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n // @ts-ignore\n title: error.message,\n variant: 'error',\n });\n }\n setIsRecordingLoading(false);\n }\n }\n if (isHLSRunning) {\n setOpenOptionsSheet(false);\n }\n }}\n >\n {isRecordingLoading ? <Loading /> : <RecordIcon />}\n <ActionTile.Title>\n {isBrowserRecordingOn\n ? 'Recording On'\n : isRecordingLoading\n ? 'Starting Recording'\n : 'Start Recording'}\n </ActionTile.Title>\n </ActionTile.Root>\n ) : null}\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n <SettingsModal open={openSettingsSheet} onOpenChange={setOpenSettingsSheet} screenType={screenType} />\n {openModals.has(MODALS.MUTE_ALL) && (\n <MuteAllModal onOpenChange={(value: boolean) => updateState(MODALS.MUTE_ALL, value)} isMobile />\n )}\n {openModals.has(MODALS.CHANGE_NAME) && (\n <ChangeNameModal\n onOpenChange={(value: boolean) => updateState(MODALS.CHANGE_NAME, value)}\n openParentSheet={() => setOpenOptionsSheet(true)}\n />\n )}\n\n {showEmojiCard && (\n <Box\n ref={emojiCardRef}\n css={{\n maxWidth: '100%',\n w: '100%',\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: '$18',\n bg: '$surface_default',\n zIndex: '10',\n p: '$8',\n pb: 0,\n r: '$1',\n mx: '$4',\n }}\n >\n <EmojiReaction />\n </Box>\n )}\n {showRecordingOn && (\n <StopRecordingInSheet\n onClose={() => setShowRecordingOn(false)}\n onStopRecording={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n setShowRecordingOn(false);\n } catch (error) {\n ToastManager.addToast({\n // @ts-ignore\n title: error.message,\n variant: 'error',\n });\n }\n }}\n />\n )}\n </>\n );\n};\n", "import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n HMSRoomState,\n selectHLSState,\n selectIsConnectedToRoom,\n selectPermissions,\n selectRoomState,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { AlertTriangleIcon, CrossIcon, RecordIcon } from '@100mslive/react-icons';\nimport { Box, Button, config as cssConfig, Flex, HorizontalDivider, Loading, Popover, Text, Tooltip } from '../../..';\nimport { Sheet } from '../../../Sheet';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\n// @ts-ignore\nimport { AdditionalRoomState, getRecordingText } from './AdditionalRoomState';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore\nimport { formatTime } from '../../common/utils';\n// @ts-ignore\nimport { APP_DATA } from '../../common/constants';\n\nexport const LiveStatus = () => {\n const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();\n const hlsState = useHMSStore(selectHLSState);\n const isMobile = useMedia(cssConfig.media.md);\n const intervalRef = useRef<NodeJS.Timeout | null>(null);\n const { screenType } = useRoomLayoutConferencingScreen();\n const [liveTime, setLiveTime] = useState(0);\n\n const startTimer = useCallback(() => {\n intervalRef.current = setInterval(() => {\n const timeStamp = hlsState?.variants[0]?.[screenType === 'hls_live_streaming' ? 'startedAt' : 'initialisedAt'];\n if (hlsState?.running && timeStamp) {\n setLiveTime(Date.now() - timeStamp.getTime());\n }\n }, 1000);\n }, [hlsState?.running, hlsState?.variants]);\n\n useEffect(() => {\n if (hlsState?.running) {\n startTimer();\n }\n if (!hlsState?.running && intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n return () => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n }\n };\n }, [hlsState.running, isMobile, startTimer]);\n\n if (!isHLSRunning && !isRTMPRunning) {\n return null;\n }\n return (\n <Flex\n align=\"center\"\n gap=\"1\"\n css={{\n border: '1px solid $border_default',\n padding: '$4 $6 $4 $6',\n borderRadius: '$1',\n }}\n >\n <Box css={{ w: '$4', h: '$4', r: '$round', bg: '$alert_error_default', mr: '$2' }} />\n <Flex align=\"center\" gap=\"2\">\n <Text variant={!isMobile ? 'button' : 'body2'}>LIVE</Text>\n <Text variant=\"caption\">{hlsState?.variants?.length > 0 ? formatTime(liveTime) : ''}</Text>\n </Flex>\n </Flex>\n );\n};\n\nexport const RecordingStatus = () => {\n const { isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn, isRecordingOn } = useRecordingStreaming();\n const permissions = useHMSStore(selectPermissions);\n const isMobile = useMedia(cssConfig.media.md);\n\n if (\n !isRecordingOn ||\n // if only browser recording is enabled, stop recording is shown\n // so no need to show this as it duplicates\n [permissions?.browserRecording, !isServerRecordingOn, !isHLSRecordingOn, isBrowserRecordingOn].every(\n value => !!value,\n )\n ) {\n // show recording icon in mobile without popover\n if (!(isMobile && isRecordingOn)) return null;\n }\n\n return (\n <Tooltip\n boxCss={{ zIndex: 1 }}\n title={getRecordingText({\n isBrowserRecordingOn,\n isServerRecordingOn,\n isHLSRecordingOn,\n })}\n >\n <Flex\n css={{\n color: '$alert_error_default',\n alignItems: 'center',\n }}\n >\n <RecordIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n );\n};\n\nconst StartRecording = () => {\n const permissions = useHMSStore(selectPermissions);\n const [open, setOpen] = useState(false);\n const [recordingStarted, setRecordingState] = useSetAppDataByKey(APP_DATA.recordingStarted);\n const { isBrowserRecordingOn, isStreamingOn, isHLSRunning } = useRecordingStreaming();\n const hmsActions = useHMSActions();\n if (!permissions?.browserRecording || isHLSRunning) {\n return null;\n }\n if (isBrowserRecordingOn) {\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <Button variant=\"danger\" data-testid=\"stop_recording\" icon outlined onClick={() => setOpen(true)}>\n <RecordIcon />\n <Text as=\"span\" css={{ '@md': { display: 'none' }, color: 'currentColor' }}>\n Stop Recording\n </Text>\n </Button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content align=\"end\" sideOffset={8} css={{ w: '$64' }}>\n <Text variant=\"body1\" css={{ color: '$on_surface_medium' }}>\n Are you sure you want to end the recording?\n </Text>\n <Button\n data-testid=\"stop_recording_confirm\"\n variant=\"danger\"\n icon\n css={{ ml: 'auto' }}\n onClick={async () => {\n try {\n await hmsActions.stopRTMPAndRecording();\n } catch (error) {\n const err = error as Error;\n ToastManager.addToast({\n title: err.message,\n variant: 'error',\n });\n }\n setOpen(false);\n }}\n >\n Stop\n </Button>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n }\n return (\n <Button\n data-testid=\"start_recording\"\n variant=\"standard\"\n icon\n disabled={recordingStarted || isStreamingOn}\n onClick={async () => {\n try {\n setRecordingState(true);\n await hmsActions.startRTMPOrRecording({\n record: true,\n });\n } catch (error) {\n const err = error as Error;\n if (err.message.includes('stream already running')) {\n ToastManager.addToast({\n title: 'Recording already running',\n variant: 'error',\n });\n } else {\n ToastManager.addToast({\n title: err.message,\n variant: 'error',\n });\n }\n setRecordingState(false);\n }\n }}\n >\n {recordingStarted ? <Loading size={24} color=\"currentColor\" /> : <RecordIcon />}\n <Text as=\"span\" css={{ '@md': { display: 'none' }, color: 'currentColor' }}>\n {recordingStarted ? 'Starting' : 'Start'} Recording\n </Text>\n </Button>\n );\n};\n\n/**\n * @description only start recording button will be shown.\n */\nexport const StreamActions = () => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const isMobile = useMedia(cssConfig.media.md);\n const roomState = useHMSStore(selectRoomState);\n\n return (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <AdditionalRoomState />\n {!isMobile && (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <RecordingStatus />\n {roomState !== HMSRoomState.Preview ? <LiveStatus /> : null}\n </Flex>\n )}\n {isConnected && !isMobile ? <StartRecording /> : null}\n </Flex>\n );\n};\n\nexport const StopRecordingInSheet = ({\n onStopRecording,\n onClose,\n}: {\n onStopRecording: () => void;\n onClose: () => void;\n}) => {\n return (\n <Sheet.Root open={true}>\n <Sheet.Content>\n <Sheet.Title css={{ p: '$10' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%', c: '$alert_error_default' }}>\n <Flex justify=\"start\" align=\"center\" gap=\"3\">\n <AlertTriangleIcon />\n <Text variant=\"h5\" css={{ c: '$alert_error_default' }}>\n Stop Recording\n </Text>\n </Flex>\n <Sheet.Close css={{ color: 'white' }} onClick={onClose}>\n <CrossIcon />\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n <Box as=\"div\" css={{ p: '$10', overflowY: 'scroll', maxHeight: '70vh' }}>\n <Text variant=\"caption\" css={{ c: '$on_surface_medium', pb: '$8' }}>\n Are you sure you want to stop recording? You can\u2019t undo this action.\n </Text>\n <Button\n variant=\"danger\"\n css={{ width: '100%' }}\n type=\"submit\"\n data-testid=\"popup_change_btn\"\n onClick={onStopRecording}\n >\n Stop\n </Button>\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n );\n};\n", "import React, { useState } from 'react';\nimport { selectLocalPeerID, selectPeerSharingVideoPlaylist, useHMSStore, useScreenShare } from '@100mslive/react-sdk';\nimport {\n AudioPlayerIcon,\n ChevronDownIcon,\n ChevronUpIcon,\n MusicIcon,\n PencilDrawIcon,\n ShareScreenIcon,\n VideoPlayerIcon,\n} from '@100mslive/react-icons';\nimport { Box, Dropdown, Flex, Text, Tooltip } from '../../../';\nimport { useWhiteboardMetadata } from '../../plugins/whiteboard/useWhiteboardMetadata';\nimport { useUISettings } from '../AppData/useUISettings';\nimport { usePlaylistMusic } from '../hooks/usePlaylistMusic';\nimport { useScreenshareAudio } from '../hooks/useScreenshareAudio';\nimport { UI_SETTINGS } from '../../common/constants';\n\nexport const getRecordingText = ({ isBrowserRecordingOn, isServerRecordingOn, isHLSRecordingOn }, delimiter = ', ') => {\n if (!isBrowserRecordingOn && !isServerRecordingOn && !isHLSRecordingOn) {\n return '';\n }\n const title = [];\n if (isBrowserRecordingOn) {\n title.push('Browser');\n }\n if (isServerRecordingOn) {\n title.push('Server');\n }\n if (isHLSRecordingOn) {\n title.push('HLS');\n }\n return title.join(delimiter);\n};\n\n/**\n * Display state of recording, streaming, playlist, whiteboard\n */\nexport const AdditionalRoomState = () => {\n const playlist = usePlaylistMusic();\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const screenshareAudio = useScreenshareAudio();\n const [open, setOpen] = useState(false);\n const isPlaylistInactive = [\n !playlist.peer || !playlist.track,\n !playlist.peer?.isLocal && !playlist.track?.enabled,\n playlist.peer?.isLocal && !playlist.selection,\n ].some(Boolean);\n const isAudioshareInactive = [\n !screenshareAudio.peer || !screenshareAudio.track,\n !screenshareAudio.peer?.isLocal && !screenshareAudio.track?.enabled,\n ].some(Boolean);\n\n const peerSharingPlaylist = useHMSStore(selectPeerSharingVideoPlaylist);\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isVideoPlayListPlaying = !!peerSharingPlaylist?.id;\n const { screenSharingPeerName, screenSharingPeerId, screenShareVideoTrackId } = useScreenShare();\n\n const isVideoScreenSharingOn = !!screenShareVideoTrackId;\n const { whiteboardOwner, amIWhiteboardOwner, toggleWhiteboard } = useWhiteboardMetadata();\n const shouldShowScreenShareState = isAudioOnly && isVideoScreenSharingOn;\n const shouldShowVideoState = isAudioOnly && isVideoPlayListPlaying;\n if (\n isPlaylistInactive &&\n isAudioshareInactive &&\n !shouldShowScreenShareState &&\n !shouldShowVideoState &&\n !whiteboardOwner\n ) {\n return null;\n }\n\n return (\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger asChild>\n <Flex\n align=\"center\"\n css={{\n color: '$on_primary_high',\n borderRadius: '$1',\n border: '1px solid $on_surface_low',\n padding: '$4',\n '@sm': { display: 'none' },\n }}\n data-testid=\"record_status_dropdown\"\n >\n {!isAudioshareInactive && (\n <Tooltip title=\"Screenshare Audio\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <MusicIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {shouldShowScreenShareState && (\n <Tooltip title=\"Screenshare\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <ShareScreenIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {shouldShowVideoState && (\n <Tooltip title=\"video playlist\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <VideoPlayerIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {!isPlaylistInactive && (\n <Tooltip title=\"Playlist Music\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <AudioPlayerIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n {whiteboardOwner && (\n <Tooltip title=\"Whiteboard\">\n <Flex align=\"center\" css={{ color: '$on_primary_high', mx: '$2' }}>\n <PencilDrawIcon width={24} height={24} />\n </Flex>\n </Tooltip>\n )}\n <Box css={{ '@lg': { display: 'none' }, color: '$on_surface_low' }}>\n {open ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </Box>\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Content sideOffset={5} align=\"end\" css={{ w: '$60' }}>\n {!isPlaylistInactive && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <AudioPlayerIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n Playlist is playing\n </Text>\n {playlist.peer.isLocal ? (\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', cursor: 'pointer', ml: '$2' }}\n onClick={e => {\n e.preventDefault();\n playlist.selection.playing ? playlist.pause() : playlist.play(playlist.selection.id);\n }}\n >\n {playlist.selection.playing ? 'Pause' : 'Play'}\n </Text>\n ) : (\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', ml: '$2', cursor: 'pointer' }}\n onClick={e => {\n e.preventDefault();\n playlist.setVolume(!playlist.track.volume ? 100 : 0);\n }}\n >\n {playlist.track.volume === 0 ? 'Unmute' : 'Mute'}\n </Text>\n )}\n </Dropdown.Item>\n )}\n {!isAudioshareInactive && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <MusicIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n Music is playing\n </Text>\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', ml: '$2', cursor: 'pointer' }}\n onClick={e => {\n e.preventDefault();\n screenshareAudio.onToggle();\n }}\n >\n {screenshareAudio.muted ? 'Unmute' : 'Mute'}\n </Text>\n </Dropdown.Item>\n )}\n {shouldShowScreenShareState && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <ShareScreenIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n {`Shared by: ${screenSharingPeerId === localPeerID ? 'You' : screenSharingPeerName}`}\n </Text>\n </Dropdown.Item>\n )}\n {shouldShowVideoState && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <VideoPlayerIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n {`Shared by: ${peerSharingPlaylist.id === localPeerID ? 'You' : peerSharingPlaylist.name}`}\n </Text>\n </Dropdown.Item>\n )}\n {whiteboardOwner && (\n <Dropdown.Item css={{ color: '$on_primary_high' }}>\n <PencilDrawIcon width={24} height={24} />\n <Text variant=\"sm\" css={{ ml: '$2', flex: '1 1 0' }}>\n Whiteboard Owner - {whiteboardOwner.name}\n {amIWhiteboardOwner && '(You)'}\n </Text>\n {amIWhiteboardOwner && (\n <Text\n variant=\"sm\"\n css={{ color: '$alert_error_default', ml: '$2', cursor: 'pointer' }}\n onClick={e => {\n e.preventDefault();\n toggleWhiteboard();\n }}\n >\n Stop\n </Text>\n )}\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Root>\n );\n};\n", "import { useCallback, useEffect, useMemo } from 'react';\nimport { selectLocalPeerID, selectPeerByCondition, useHMSStore } from '@100mslive/react-sdk';\nimport { useMyMetadata } from '../../components/hooks/useMetadata';\nimport { getMetadata } from '../../common/utils';\nimport { FeatureFlags } from '../../services/FeatureFlags';\n\nconst isWhiteboardOwner = peer => {\n return !!getMetadata(peer?.metadata).whiteboardOwner;\n};\n\nexport const useWhiteboardMetadata = () => {\n const localPeerID = useHMSStore(selectLocalPeerID);\n const { updateMetaData } = useMyMetadata();\n const whiteboardOwner = useHMSStore(selectPeerByCondition(isWhiteboardOwner));\n const amIWhiteboardOwner = useMemo(() => localPeerID === whiteboardOwner?.id, [localPeerID, whiteboardOwner]);\n\n /**\n * @param enabled {boolean}\n */\n const toggleWhiteboard = useCallback(async () => {\n if (!process.env.REACT_APP_PUSHER_APP_KEY) {\n console.error('Cannot start whiteboard - Pusher Key unavailable');\n }\n try {\n if (!whiteboardOwner || amIWhiteboardOwner) {\n await updateMetaData({ whiteboardOwner: !whiteboardOwner });\n } else {\n console.warn('Cannot toggle whiteboard as it was shared by another peer');\n }\n } catch (error) {\n console.error('failed to toggle whiteboard to ', !whiteboardOwner, error);\n }\n }, [whiteboardOwner, updateMetaData, amIWhiteboardOwner]);\n\n useEffect(() => {\n window.toggleWhiteboard = toggleWhiteboard;\n }, [toggleWhiteboard]);\n\n return {\n /** is whiteboard enabled for the room */\n whiteboardEnabled: FeatureFlags.enableWhiteboard,\n /** owner of the active whiteboard, can also be used to check if whiteboard is active */\n whiteboardOwner,\n amIWhiteboardOwner,\n toggleWhiteboard,\n };\n};\n", "import { QUESTION_TYPE } from './constants';\n\n// eslint-disable-next-line complexity\nexport function shadeColor(color, percent) {\n let R = parseInt(color.substring(1, 3), 16);\n let G = parseInt(color.substring(3, 5), 16);\n let B = parseInt(color.substring(5, 7), 16);\n\n R = Math.floor((R * (100 + percent)) / 100);\n G = Math.floor((G * (100 + percent)) / 100);\n B = Math.floor((B * (100 + percent)) / 100);\n\n R = R < 255 ? R : 255;\n G = G < 255 ? G : 255;\n B = B < 255 ? B : 255;\n\n const RR = R.toString(16).length === 1 ? `0${R.toString(16)}` : R.toString(16);\n const GG = G.toString(16).length === 1 ? `0${G.toString(16)}` : G.toString(16);\n const BB = B.toString(16).length === 1 ? `0${B.toString(16)}` : B.toString(16);\n\n return `#${RR}${GG}${BB}`;\n}\n\n/**\n * TODO: this is currently an O(N**2) function, don't use with peer lists, it's currently\n * being used to find intersection between list of role names where the complexity shouldn't matter much.\n */\nexport const arrayIntersection = (a, b) => {\n if (a === undefined || b === undefined) {\n return [];\n }\n // ensure \"a\" is the bigger array\n if (b.length > a.length) {\n let t = b;\n b = a;\n a = t;\n }\n return a.filter(function (e) {\n return b.indexOf(e) > -1;\n });\n};\n\nexport const getMetadata = metadataString => {\n try {\n return !metadataString ? {} : JSON.parse(metadataString);\n } catch (error) {\n return {};\n }\n};\n\nexport const metadataProps = function (peer) {\n return {\n isHandRaised: getMetadata(peer.metadata)?.isHandRaised,\n };\n};\n\nexport const isScreenshareSupported = () => {\n return typeof navigator.mediaDevices.getDisplayMedia !== 'undefined';\n};\n\nexport const metadataPayloadParser = payload => {\n try {\n const data = window.atob(payload);\n const parsedData = JSON.parse(data);\n return parsedData;\n } catch (e) {\n return { payload };\n }\n};\n\n// For bottom action sheet, returns updated height based on drag\nexport const getUpdatedHeight = (e, MINIMUM_HEIGHT) => {\n const heightToPercentage = 100 - ((e?.touches?.[0] || e).pageY / window.innerHeight) * 100;\n // Snap to top if height > 80%, should be at least 40vh\n const sheetHeightInVH = Math.max(MINIMUM_HEIGHT, heightToPercentage > 80 ? 100 : heightToPercentage);\n return `${sheetHeightInVH}vh`;\n};\n\nexport const getFormattedCount = num => {\n const formatter = new Intl.NumberFormat('en', { notation: 'compact', maximumFractionDigits: 2 });\n const formattedNum = formatter.format(num);\n return formattedNum;\n};\n\nexport const formatTime = timeInSeconds => {\n timeInSeconds = Math.floor(timeInSeconds / 1000);\n const hours = Math.floor(timeInSeconds / 3600);\n const minutes = Math.floor((timeInSeconds % 3600) / 60);\n const seconds = timeInSeconds % 60;\n const hour = hours !== 0 ? `${hours < 10 ? '0' : ''}${hours}:` : '';\n return `${hour}${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;\n};\n\nconst compareArrays = (a, b) => {\n if (a.length !== b.length) return false;\n else {\n // Comparing each element of your array\n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n};\n\nexport const checkCorrectAnswer = (answer, localPeerResponse, type) => {\n if (type === QUESTION_TYPE.SINGLE_CHOICE) {\n return answer?.option === localPeerResponse?.option;\n } else if (type === QUESTION_TYPE.MULTIPLE_CHOICE) {\n return answer?.options && localPeerResponse?.options && compareArrays(answer?.options, localPeerResponse?.options);\n }\n};\n\nexport const isValidTextInput = (text, minLength = 1, maxLength = 100) => {\n return text && text.length >= minLength && text.length <= maxLength;\n};\n\nexport const calculateAvatarAndAttribBoxSize = (calculatedWidth, calculatedHeight) => {\n if (!calculatedWidth || !calculatedHeight) {\n return [undefined, undefined];\n }\n\n let avatarSize = 'large';\n if (calculatedWidth <= 150 || calculatedHeight <= 150) {\n avatarSize = 'small';\n } else if (calculatedWidth <= 300 || calculatedHeight <= 300) {\n avatarSize = 'medium';\n }\n\n let attribBoxSize = 'medium';\n if (calculatedWidth <= 180 || calculatedHeight <= 180) {\n attribBoxSize = 'small';\n }\n\n return [avatarSize, attribBoxSize];\n};\n", "import { useEffect } from 'react';\nimport { selectRoomID, useHMSStore } from '@100mslive/react-sdk';\n\nexport class FeatureFlags {\n static enableTranscription = process.env.REACT_APP_ENABLE_TRANSCRIPTION === 'true';\n static enableStatsForNerds = process.env.REACT_APP_ENABLE_STATS_FOR_NERDS === 'true';\n static enableWhiteboard =\n process.env.REACT_APP_ENABLE_WHITEBOARD &&\n process.env.REACT_APP_PUSHER_APP_KEY &&\n process.env.REACT_APP_PUSHER_AUTHENDPOINT;\n\n static init(roomId) {\n if (!window.HMS) {\n window.HMS = {};\n }\n // some extra config to hls js to bring down latency\n window.HMS.OPTIMISE_HLS_LATENCY = false;\n // ask permissions in preview even if role doesn't have it\n window.HMS.ALWAYS_REQUEST_PERMISSIONS = false;\n window.HMS.SHOW_NS = process.env.REACT_APP_ENV !== 'prod';\n\n this.enableTranscription = process.env.REACT_APP_TRANSCRIPTION_ROOM_ID === roomId;\n }\n\n static showNS() {\n return window.HMS.SHOW_NS;\n }\n\n static optimiseHLSLatency() {\n return window.HMS.OPTIMISE_HLS_LATENCY;\n }\n\n static alwaysRequestPermissions() {\n return window.HMS.ALWAYS_REQUEST_PERMISSIONS;\n }\n}\n\nexport function FeatureFlagsInit() {\n const roomId = useHMSStore(selectRoomID);\n useEffect(() => {\n if (roomId) {\n FeatureFlags.init(roomId);\n }\n }, [roomId]);\n return null;\n}\n", "import { useCallback } from 'react';\nimport {\n selectAudioPlaylist,\n selectAudioPlaylistTrackByPeerID,\n selectPeerSharingAudioPlaylist,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const usePlaylistMusic = () => {\n const peer = useHMSStore(selectPeerSharingAudioPlaylist);\n const track = useHMSStore(selectAudioPlaylistTrackByPeerID(peer?.id));\n const selection = useHMSStore(selectAudioPlaylist.selectedItem);\n const hmsActions = useHMSActions();\n\n const play = useCallback(\n async selectedId => {\n await hmsActions.audioPlaylist.play(selectedId);\n },\n [hmsActions],\n );\n\n const pause = useCallback(() => {\n hmsActions.audioPlaylist.pause();\n }, [hmsActions]);\n\n const setVolume = useCallback(\n value => {\n hmsActions.setVolume(value, track?.id);\n },\n [hmsActions, track],\n );\n\n return { selection, peer, track, play, pause, setVolume };\n};\n", "import { useCallback } from 'react';\nimport {\n selectPeerSharingAudio,\n selectScreenShareAudioByPeerID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const useScreenshareAudio = () => {\n const hmsActions = useHMSActions();\n const peer = useHMSStore(selectPeerSharingAudio);\n const track = useHMSStore(selectScreenShareAudioByPeerID(peer?.id));\n\n const handleMute = useCallback(() => {\n if (!peer.isLocal) {\n hmsActions.setVolume(!track.volume ? 100 : 0, track.id);\n } else {\n hmsActions.setEnabledTrack(track.id, !track.enabled).catch(console.error);\n }\n }, [peer, hmsActions, track]);\n\n let muted = undefined;\n if (peer && track) {\n muted = peer.isLocal ? !track.enabled : track.volume === 0;\n }\n\n return { peer, track, muted, onToggle: handleMute };\n};\n", "import {\n ConferencingScreen,\n DefaultPreviewScreen_Elements,\n LeaveScreen,\n PreviewScreen,\n Screens,\n} from '@100mslive/types-prebuilt';\nimport { useRoomLayout } from '..';\n\nexport type useRoomLayoutScreenProps = {\n screen: keyof Screens;\n};\n\ntype useRoomLayoutScreenReturnType<T extends useRoomLayoutScreenProps> = T['screen'] extends 'conferencing'\n ? ConferencingScreen\n : T['screen'] extends 'leave'\n ? LeaveScreen\n : T['screen'] extends 'preview'\n ? PreviewScreen\n : undefined;\n\nfunction useRoomLayoutScreen<T extends useRoomLayoutScreenProps>({\n screen,\n}: T): useRoomLayoutScreenReturnType<T> | undefined {\n const roomLayout = useRoomLayout();\n const screenProps = roomLayout?.screens?.[screen] as useRoomLayoutScreenReturnType<T> | undefined;\n return screenProps;\n}\n\nexport function useRoomLayoutPreviewScreen() {\n const screenProps = useRoomLayoutScreen({ screen: 'preview' });\n const isPreviewScreenEnabled = !!screenProps;\n let elements: DefaultPreviewScreen_Elements | undefined;\n let screenType: keyof PreviewScreen | undefined;\n if (isPreviewScreenEnabled) {\n screenType = Object.keys(screenProps)[0] as keyof PreviewScreen;\n elements = screenProps[screenType]?.elements;\n }\n return {\n isPreviewScreenEnabled,\n elements,\n screenType,\n };\n}\n\nexport function useRoomLayoutConferencingScreen() {\n const screenProps = useRoomLayoutScreen({ screen: 'conferencing' }) || {};\n const screenType = Object.keys(screenProps)[0] as keyof ConferencingScreen;\n const elements = screenProps[screenType]?.elements;\n // @ts-ignore\n const hideSections: string[] = screenProps[screenType]?.hideSections || [];\n return {\n hideSections,\n elements,\n screenType,\n };\n}\n\nexport function useRoomLayoutLeaveScreen() {\n const screenProps = useRoomLayoutScreen({ screen: 'leave' });\n const isLeaveScreenEnabled = !!screenProps;\n return {\n isLeaveScreenEnabled,\n };\n}\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectLocalPeerName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig, Dialog } from '../../../';\nimport { Sheet } from '../../../Sheet';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { ChangeNameContent } from './ChangeNameContent';\nimport { UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\n\nexport const ChangeNameModal = ({ onOpenChange, openParentSheet = null }) => {\n const [previewPreference, setPreviewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW);\n const hmsActions = useHMSActions();\n const localPeerName = useHMSStore(selectLocalPeerName);\n const [currentName, setCurrentName] = useState(localPeerName);\n const isMobile = useMedia(cssConfig.media.md);\n\n const changeName = async () => {\n const name = currentName.trim();\n if (!name || name === localPeerName) {\n return;\n }\n try {\n await hmsActions.changeName(name);\n setPreviewPreference({\n ...(previewPreference || {}),\n name,\n });\n } catch (error) {\n console.error('failed to update name', error);\n ToastManager.addToast({ title: error.message });\n } finally {\n onOpenChange(false);\n }\n };\n\n const props = {\n changeName,\n setCurrentName,\n currentName,\n localPeerName,\n isMobile,\n onExit: () => onOpenChange(false),\n onBackClick: () => {\n onOpenChange(false);\n openParentSheet();\n },\n };\n\n if (isMobile) {\n return (\n <Sheet.Root defaultOpen onOpenChange={onOpenChange}>\n <Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }}>\n <ChangeNameContent {...props} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ bg: '$surface_dim', width: 'min(400px,80%)', p: '$10' }}>\n <ChangeNameContent {...props} />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Input } from '../../../Input';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n\nexport const ChangeNameContent = ({\n changeName,\n setCurrentName,\n currentName,\n localPeerName,\n isMobile,\n onExit,\n onBackClick,\n}) => {\n return (\n <form\n onSubmit={async e => {\n e.preventDefault();\n await changeName();\n }}\n >\n <Text\n variant={isMobile ? 'md' : 'lg'}\n css={{\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'flex',\n pb: '$4',\n '@md': { px: '$8', borderBottom: '1px solid $border_default' },\n }}\n >\n {isMobile ? <ChevronLeftIcon onClick={onBackClick} style={{ marginRight: '0.5rem' }} /> : null}\n Change Name\n <Box\n css={{ color: 'inherit', ml: 'auto', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}\n onClick={onExit}\n >\n <CrossIcon />\n </Box>\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', pb: '$6', mb: '$8', '@md': { px: '$8', mt: '$4' } }}>\n Your name will be visible to other participants in the session.\n </Text>\n <Flex justify=\"center\" align=\"center\" css={{ my: '$8', w: '100%', '@md': { px: '$8' } }}>\n <Input\n css={{ width: '100%', bg: '$surface_default' }}\n value={currentName}\n // Prevents popup from showing up on chrome mweb\n type={isMobile ? 'search' : 'text'}\n onChange={e => {\n setCurrentName(e.target.value);\n }}\n autoComplete=\"name\"\n required\n data-testid=\"change_name_field\"\n onKeyDown={async e => {\n if (e.key === 'Enter' && currentName.trim().length > 0 && currentName !== localPeerName) {\n e.preventDefault();\n if (isMobile) {\n return;\n }\n changeName();\n }\n }}\n />\n </Flex>\n\n <Flex\n justify=\"between\"\n align=\"center\"\n css={{\n width: '100%',\n gap: '$md',\n mt: '$10',\n '@md': { px: '$4' },\n }}\n >\n {isMobile ? null : (\n <Button\n variant=\"standard\"\n css={{ w: '100%' }}\n outlined\n type=\"submit\"\n disabled={!localPeerName}\n onClick={onExit}\n >\n Cancel\n </Button>\n )}\n\n <Button\n variant=\"primary\"\n css={{ width: '100%' }}\n type=\"submit\"\n disabled={!currentName.trim() || currentName.trim() === localPeerName}\n data-testid=\"popup_change_btn\"\n >\n Change\n </Button>\n </Flex>\n </form>\n );\n};\n", "import React from 'react';\nimport { HandIcon } from '@100mslive/react-icons';\nimport { Tooltip } from '../../Tooltip';\nimport IconButton from '../IconButton';\n// @ts-ignore: No implicit Any\nimport { useMyMetadata } from './hooks/useMetadata';\n\nexport const RaiseHand = () => {\n const { isHandRaised, toggleHandRaise } = useMyMetadata();\n return (\n <Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>\n <IconButton data-testid=\"hand_raise_btn\" active={!isHandRaised} onClick={async () => await toggleHandRaise()}>\n <HandIcon />\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { Fragment } from 'react';\nimport { selectIsAllowedToPublish, useHMSStore, useScreenShare } from '@100mslive/react-sdk';\nimport { ShareScreenIcon } from '@100mslive/react-icons';\nimport { ShareScreenOptions } from './pdfAnnotator/shareScreenOptions';\nimport { Box, Flex } from '../../Layout';\nimport { Tooltip } from '../../Tooltip';\nimport { ScreenShareButton } from './ShareMenuIcon';\nimport { useUISettings } from './AppData/useUISettings';\nimport { isScreenshareSupported } from '../common/utils';\nimport { UI_SETTINGS } from '../common/constants';\n\nexport const ScreenshareToggle = ({ css = {} }) => {\n const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n\n const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare();\n const isVideoScreenshare = amIScreenSharing && !!video;\n if (!isAllowedToPublish.screen || !isScreenshareSupported()) {\n return null;\n }\n\n return (\n <Fragment>\n <Flex direction=\"row\" css={{ '@md': { display: 'none' } }}>\n <ScreenShareButton\n variant=\"standard\"\n key=\"ShareScreen\"\n active={!isVideoScreenshare}\n css={css}\n disabled={isAudioOnly}\n onClick={() => {\n toggleScreenShare();\n }}\n >\n <Tooltip title={`${!isVideoScreenshare ? 'Start' : 'Stop'} screen sharing`}>\n <Box>\n <ShareScreenIcon />\n </Box>\n </Tooltip>\n </ScreenShareButton>\n <ShareScreenOptions />\n </Flex>\n </Fragment>\n );\n};\n", "import React, { Fragment, useState } from 'react';\nimport { useScreenShare } from '@100mslive/react-sdk';\nimport { StarIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport PDFShareImg from './../../images/pdf-share.png';\nimport ScreenShareImg from './../../images/screen-share.png';\nimport { Box, Dropdown, Flex, IconButton, Text, Tooltip } from '../../../';\nimport { ShareMenuIcon } from '../ShareMenuIcon';\nimport { PDFFileOptions } from './pdfFileOptions';\n\nconst MODALS = {\n SHARE: 'share',\n SCREEN_SHARE: 'screenShare',\n PDF_SHARE: 'pdfShare',\n};\n\nexport function ShareScreenOptions() {\n const [openModals, setOpenModals] = useState(new Set());\n const { amIScreenSharing } = useScreenShare();\n const updateState = (modalName, value) => {\n setOpenModals(modals => {\n const copy = new Set(modals);\n if (value) {\n copy.add(modalName);\n } else {\n copy.delete(modalName);\n }\n return copy;\n });\n };\n const { toggleScreenShare } = useScreenShare();\n return (\n <Fragment>\n <Dropdown.Root\n open={openModals.has(MODALS.SHARE)}\n onOpenChange={value => updateState(MODALS.SHARE, value)}\n modal={false}\n >\n <Dropdown.Trigger asChild data-testid=\"sharing_btn\" disabled={amIScreenSharing}>\n <ShareMenuIcon disabled={amIScreenSharing}>\n <Tooltip title=\"Share\">\n <Box>\n <VerticalMenuIcon />\n </Box>\n </Tooltip>\n </ShareMenuIcon>\n </Dropdown.Trigger>\n <Dropdown.Content\n sideOffset={5}\n css={{\n w: '$96',\n maxHeight: '$96',\n p: 0,\n bg: '$surface_dim',\n }}\n >\n <Dropdown.Item\n css={{\n flexDirection: 'column',\n alignItems: 'flex-start',\n px: '$10',\n pt: '$10',\n pb: '$6',\n '&:hover': {\n bg: '$transparent',\n cursor: 'default',\n },\n }}\n >\n <Text variant=\"h6\">Start Sharing</Text>\n <Text variant=\"sm\">Choose what you want to share</Text>\n </Dropdown.Item>\n <Dropdown.Item\n css={{\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: '$8',\n px: '$10',\n pt: '$6',\n pb: '$10',\n '&:hover': {\n bg: '$transparent',\n cursor: 'default',\n },\n }}\n >\n <Flex\n direction=\"column\"\n align=\"center\"\n css={{\n gap: '$6',\n }}\n >\n <IconButton\n as=\"div\"\n onClick={() => toggleScreenShare()}\n css={{\n p: '$6',\n display: 'flex',\n justifyContent: 'center',\n border: '1px solid $border_bright',\n r: '$2',\n bg: '$surface_brighter',\n pb: '0',\n }}\n >\n <img\n src={ScreenShareImg}\n alt=\"screen-share\"\n width=\"100%\"\n height=\"100%\"\n style={{\n borderTopLeftRadius: '0.5rem', // TODO: create image component to solve for style hardcoding\n borderTopRightRadius: '0.5rem',\n }}\n />\n </IconButton>\n <Flex direction=\"column\" align=\"center\">\n <Text variant=\"body2\">Share Screen</Text>\n <Text\n variant=\"caption\"\n css={{\n c: '$on_surface_low',\n textAlign: 'center',\n }}\n >\n Share your tab, window or your entire screen\n </Text>\n </Flex>\n </Flex>\n <Flex\n direction=\"column\"\n align=\"center\"\n css={{\n gap: '$6',\n }}\n >\n <IconButton\n onClick={() => {\n updateState(MODALS.PDF_SHARE, true);\n }}\n disabled={amIScreenSharing}\n css={{\n p: '$6',\n display: 'flex',\n justifyContent: 'center',\n border: '$border_bright 1px solid',\n r: '$2',\n bg: '$surface_bright',\n pb: '0',\n }}\n >\n <img\n src={PDFShareImg}\n alt=\"pdf-share\"\n width=\"100%\"\n height=\"100%\"\n style={{\n borderTopLeftRadius: '0.5rem', // TODO: create image component to solve for style hardcoding\n borderTopRightRadius: '0.5rem',\n }}\n />\n <Flex\n direction=\"row\"\n align=\"center\"\n css={{\n position: 'absolute',\n top: '35%',\n left: '54%',\n padding: '$2 $4',\n r: '$2',\n bg: '$primary_bright',\n zIndex: '2',\n gap: '$2',\n }}\n >\n <StarIcon height={14} width={14} />\n\n <Text\n variant=\"xs\"\n css={{\n fontWeight: '$semiBold',\n c: '$on_primary_high',\n pr: '$4',\n }}\n >\n New\n </Text>\n </Flex>\n </IconButton>\n <Flex direction=\"column\" align=\"center\">\n <Text variant=\"body2\">Share PDF</Text>\n <Text\n variant=\"caption\"\n css={{\n c: '$on_surface_low',\n textAlign: 'center',\n }}\n >\n Annotate, draw shapes, and more over PDFs\n </Text>\n </Flex>\n </Flex>\n </Dropdown.Item>\n </Dropdown.Content>\n </Dropdown.Root>\n {openModals.has(MODALS.PDF_SHARE) && (\n <PDFFileOptions onOpenChange={value => updateState(MODALS.PDF_SHARE, value)} />\n )}\n </Fragment>\n );\n}\n", "import { styled } from '../../Theme';\nimport IconButton from '../IconButton';\n\nexport const ScreenShareButton = styled(IconButton, {\n h: '$14',\n px: '$8',\n r: '$1',\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n '@md': {\n px: '$4',\n mx: 0,\n },\n});\n\nexport const ShareMenuIcon = styled(ScreenShareButton, {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n borderTopRightRadius: '$1',\n borderBottomRightRadius: '$1',\n borderLeftWidth: 0,\n w: '$4',\n '@md': {\n w: 'unset',\n px: '$2',\n },\n});\n", "import React, { useState } from 'react';\nimport { Dialog, Flex } from '../../../';\nimport { DialogInputFile } from '../../primitives/DialogContent';\nimport { PDFHeader } from './pdfHeader';\nimport { SubmitPDF } from './submitPdf';\nimport { UploadedFile } from './uploadedFile';\n\nexport function PDFFileOptions({ onOpenChange }) {\n const [pdfFile, setPDFFile] = useState(null);\n\n return !pdfFile ? (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n w: 'min(420px,80%)',\n overflow: 'auto',\n p: '$10',\n bg: '$surface_dim',\n }}\n >\n <Flex direction=\"column\">\n <PDFHeader />\n <DialogInputFile\n onChange={target => {\n setPDFFile(target.files[0]);\n }}\n placeholder=\"Click to upload\"\n type=\"file\"\n accept=\".pdf\"\n />\n\n <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n ) : (\n <UploadedFile pdfFile={pdfFile} setPDFFile={setPDFFile} onOpenChange={onOpenChange} />\n );\n}\n", "import React from 'react';\nimport { Dialog, Text } from '../../../';\nimport { DialogCol } from '../../primitives/DialogContent';\n\nexport const PDFHeader = () => {\n return (\n <DialogCol\n align=\"start\"\n css={{\n mt: 0,\n mb: '$6',\n }}\n >\n <Dialog.Title asChild>\n <Text as=\"h6\" variant=\"h6\">\n Share PDF\n </Text>\n </Dialog.Title>\n <Dialog.Description asChild>\n <Text\n variant=\"sm\"\n css={{\n c: '$on_surface_medium',\n }}\n >\n Choose PDF you want to annotate and share\n </Text>\n </Dialog.Description>\n </DialogCol>\n );\n};\n", "import React from 'react';\nimport { Button, Flex } from '../../../';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { APP_DATA } from '../../common/constants';\n\nexport const SubmitPDF = ({ pdfFile, onOpenChange }) => {\n const [, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);\n\n return (\n <Flex\n direction=\"row\"\n css={{\n mb: '0',\n mt: 'auto',\n gap: '$8',\n }}\n >\n <Button\n variant=\"standard\"\n outlined\n type=\"submit\"\n onClick={() => {\n onOpenChange(false);\n }}\n css={{ w: '50%' }}\n >\n Cancel\n </Button>\n <Button\n variant=\"primary\"\n type=\"submit\"\n onClick={() => {\n if (pdfFile) {\n setPDFConfig(pdfFile);\n onOpenChange(false);\n }\n }}\n disabled={!pdfFile}\n data-testid=\"share_pdf_btn\"\n css={{\n w: '50%',\n }}\n >\n Start Sharing\n </Button>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { TrashIcon } from '@100mslive/react-icons';\nimport { Dialog, Flex, Text } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\nimport { PDFHeader } from './pdfHeader';\nimport { PDFInfo } from './pdfInfo';\nimport { SubmitPDF } from './submitPdf';\n\nexport const UploadedFile = ({ pdfFile, setPDFFile, onOpenChange }) => {\n const [fileName, ext] = pdfFile.name.split('.');\n return (\n <Dialog.Root defaultOpen onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n w: 'min(420px,80%)',\n overflow: 'auto',\n p: '$10',\n bg: '$surface_dim',\n }}\n >\n <Flex direction=\"column\">\n <PDFHeader />\n <DialogRow\n css={{\n fontFamily: '$sans',\n bg: '$surface_bright',\n r: '$1',\n outline: 'none',\n border: '1px solid $border_bright',\n p: '$4 $6',\n minHeight: '$11',\n c: '$on_primary_high',\n fs: '$md',\n w: '100%',\n '&:focus': {\n boxShadow: '0 0 0 1px $colors$primary_default',\n border: '1px solid $transparent',\n },\n mb: 0,\n mt: '$6',\n }}\n >\n <Flex direction=\"row\" css={{ flexGrow: '1', maxWidth: '88%' }}>\n <Text\n css={{\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n }}\n >\n {fileName}\n </Text>\n <Text css={{ whiteSpace: 'nowrap' }}>.{ext}</Text>\n </Flex>\n <TrashIcon\n onClick={() => setPDFFile(null)}\n style={{\n cursor: 'pointer',\n }}\n />\n </DialogRow>\n <PDFInfo />\n <SubmitPDF pdfFile={pdfFile} onOpenChange={onOpenChange} />\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React from 'react';\nimport { InfoIcon } from '@100mslive/react-icons';\nimport { Text } from '../../../';\nimport { DialogRow } from '../../primitives/DialogContent';\n\nexport const PDFInfo = () => {\n return (\n <DialogRow\n css={{\n px: '$8',\n py: '$3',\n bg: '$surface_default',\n r: '$1',\n outline: 'none',\n border: '1px solid $border_bright',\n minHeight: '$11',\n }}\n >\n <InfoIcon\n width=\"64px\"\n height=\"64px\"\n style={{\n paddingRight: '16px',\n }}\n />\n <Text variant=\"caption\">\n On the next screen, ensure you select \u201CThis Tab\u201D and click on share. Only the PDF viewer will be seen by other\n participants\n </Text>\n </DialogRow>\n );\n};\n", "import React from 'react';\nimport { selectUnreadHMSMessagesCount, useHMSStore } from '@100mslive/react-sdk';\nimport { ChatIcon, ChatUnreadIcon } from '@100mslive/react-icons';\nimport { Tooltip } from '../../..';\n// @ts-ignore: No implicit Any\nimport IconButton from '../../IconButton';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const ChatToggle = () => {\n const countUnreadMessages = useHMSStore(selectUnreadHMSMessagesCount);\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n\n return (\n <Tooltip key=\"chat\" title={`${isChatOpen ? 'Close' : 'Open'} chat`}>\n <IconButton onClick={toggleChat} active={!isChatOpen} data-testid=\"chat_btn\">\n {countUnreadMessages === 0 ? <ChatIcon /> : <ChatUnreadIcon data-testid=\"chat_unread_btn\" />}\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useState } from 'react';\nimport { useDebounce, useMedia } from 'react-use';\nimport {\n selectHandRaisedPeers,\n selectHasPeerHandRaised,\n selectIsLargeRoom,\n selectIsPeerAudioEnabled,\n selectLocalPeerID,\n selectPeerCount,\n selectPeerMetadata,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport {\n ChangeRoleIcon,\n HandIcon,\n MicOffIcon,\n PeopleIcon,\n PeopleRemoveIcon,\n SearchIcon,\n VerticalMenuIcon,\n} from '@100mslive/react-icons';\nimport { Accordion, Box, config as cssConfig, Dropdown, Flex, Input, Text, textEllipsis } from '../../..';\nimport IconButton from '../../IconButton';\nimport { ConnectionIndicator } from '../Connection/ConnectionIndicator';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { RoleAccordion } from './RoleAccordion';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\nimport { useParticipants } from '../../common/hooks';\nimport { getFormattedCount } from '../../common/utils';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const ParticipantList = ({ offStageRoles = [], onActive }) => {\n const [filter, setFilter] = useState();\n const { participants, isConnected, peerCount } = useParticipants(filter);\n const isLargeRoom = useHMSStore(selectIsLargeRoom);\n const peersOrderedByRoles = {};\n\n const handRaisedPeers = useHMSStore(selectHandRaisedPeers);\n\n participants.forEach(participant => {\n if (peersOrderedByRoles[participant.roleName] === undefined) {\n peersOrderedByRoles[participant.roleName] = [];\n }\n peersOrderedByRoles[participant.roleName].push(participant);\n });\n\n // prefill off_stage roles of large rooms to load more peers\n if (isLargeRoom) {\n offStageRoles.forEach(role => {\n if (!peersOrderedByRoles[role]) {\n peersOrderedByRoles[role] = [];\n }\n });\n }\n\n const onSearch = useCallback(value => {\n setFilter(filterValue => {\n if (!filterValue) {\n filterValue = {};\n }\n filterValue.search = value.toLowerCase();\n return { ...filterValue };\n });\n }, []);\n if (peerCount === 0) {\n return null;\n }\n\n return (\n <Fragment>\n <Flex direction=\"column\" css={{ size: '100%', gap: '$4' }}>\n {!filter?.search && participants.length === 0 ? null : <ParticipantSearch onSearch={onSearch} inSidePane />}\n {participants.length === 0 ? (\n <Flex align=\"center\" justify=\"center\" css={{ w: '100%', p: '$8 0' }}>\n <Text variant=\"sm\">{!filter ? 'No participants' : 'No matching participants'}</Text>\n </Flex>\n ) : null}\n <VirtualizedParticipants\n peersOrderedByRoles={peersOrderedByRoles}\n handRaisedList={handRaisedPeers}\n isConnected={isConnected}\n filter={filter}\n offStageRoles={offStageRoles}\n isLargeRoom={isLargeRoom}\n onActive={onActive}\n />\n </Flex>\n </Fragment>\n );\n};\n\nexport const ParticipantCount = () => {\n const peerCount = useHMSStore(selectPeerCount);\n const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);\n useEffect(() => {\n if (isParticipantsOpen && peerCount === 0) {\n toggleSidepane();\n }\n }, [isParticipantsOpen, peerCount, toggleSidepane]);\n\n if (peerCount === 0) {\n return null;\n }\n return (\n <IconButton\n css={{\n w: 'auto',\n p: '$4',\n h: 'auto',\n }}\n onClick={() => {\n if (peerCount > 0) {\n toggleSidepane();\n }\n }}\n active={!isParticipantsOpen}\n data-testid=\"participant_list\"\n >\n <PeopleIcon />\n <Text variant=\"sm\" css={{ mx: '$4', c: 'inherit' }}>\n {getFormattedCount(peerCount)}\n </Text>\n </IconButton>\n );\n};\n\nconst VirtualizedParticipants = ({\n peersOrderedByRoles = {},\n isConnected,\n filter,\n handRaisedList = [],\n offStageRoles,\n isLargeRoom,\n onActive,\n}) => {\n return (\n <Flex\n direction=\"column\"\n css={{\n gap: '$8',\n overflowY: 'auto',\n overflowX: 'hidden',\n pr: '$10',\n mr: '-$10',\n flex: '1 1 0',\n }}\n >\n <Accordion.Root type={isLargeRoom ? 'single' : 'multiple'} collapsible>\n {handRaisedList.length > 0 ? (\n <RoleAccordion\n peerList={handRaisedList}\n roleName=\"Hand Raised\"\n filter={filter}\n isConnected={isConnected}\n isHandRaisedAccordion\n offStageRoles={offStageRoles}\n />\n ) : null}\n {Object.keys(peersOrderedByRoles).map(role => (\n <RoleAccordion\n key={role}\n peerList={peersOrderedByRoles[role]}\n roleName={role}\n isConnected={isConnected}\n filter={filter}\n offStageRoles={offStageRoles}\n onActive={onActive}\n />\n ))}\n </Accordion.Root>\n </Flex>\n );\n};\n\nexport const Participant = ({ peer, isConnected, style }) => {\n const localPeerId = useHMSStore(selectLocalPeerID);\n return (\n <Flex\n key={peer.id}\n css={{\n w: '100%',\n p: '$4 $8',\n pr: '$6',\n h: '$16',\n '&:hover .participant_item': { display: 'flex' },\n }}\n align=\"center\"\n justify=\"between\"\n data-testid={'participant_' + peer.name}\n style={style}\n >\n <Text\n variant=\"sm\"\n css={{ ...textEllipsis('100%'), flex: '1 1 0', mr: '$8', fontWeight: '$semiBold', color: '$on_surface_high' }}\n >\n {peer.name} {localPeerId === peer.id ? '(You)' : ''}\n </Text>\n {isConnected ? (\n <ParticipantActions peerId={peer.id} isLocal={peer.id === localPeerId} role={peer.roleName} />\n ) : null}\n </Flex>\n );\n};\n\n/**\n * shows settings to change for a participant like changing their role\n */\nconst ParticipantActions = React.memo(({ peerId, role, isLocal }) => {\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));\n const canChangeRole = useHMSStore(selectPermissions)?.changeRole;\n const canRemoveOthers = useHMSStore(selectPermissions)?.removeOthers;\n const { elements } = useRoomLayoutConferencingScreen();\n const { on_stage_exp } = elements || {};\n const shouldShowMoreActions = (on_stage_exp && canChangeRole) || canRemoveOthers;\n const isAudioMuted = !useHMSStore(selectIsPeerAudioEnabled(peerId));\n\n return (\n <Flex\n align=\"center\"\n css={{\n flexShrink: 0,\n gap: '$8',\n }}\n >\n <ConnectionIndicator peerId={peerId} />\n {isHandRaised && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ p: '$1', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}\n >\n <HandIcon height={19} width={19} />\n </Flex>\n )}\n {isAudioMuted ? (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ p: '$2', c: '$on_surface_high', bg: '$surface_bright', borderRadius: '$round' }}\n >\n <MicOffIcon height={19} width={19} />\n </Flex>\n ) : null}\n\n {shouldShowMoreActions && !isLocal ? (\n <ParticipantMoreActions\n peerId={peerId}\n role={role}\n elements={elements}\n canChangeRole={canChangeRole}\n canRemoveOthers={canRemoveOthers}\n />\n ) : null}\n </Flex>\n );\n});\n\nconst ParticipantMoreActions = ({ peerId, role, elements, canChangeRole, canRemoveOthers }) => {\n const hmsActions = useHMSActions();\n const {\n bring_to_stage_label,\n remove_from_stage_label,\n on_stage_role,\n off_stage_roles = [],\n } = elements.on_stage_exp || {};\n const isInStage = role === on_stage_role;\n const shouldShowStageRoleChange =\n canChangeRole &&\n ((isInStage && remove_from_stage_label) || (off_stage_roles?.includes(role) && bring_to_stage_label));\n const prevRole = useHMSStore(selectPeerMetadata(peerId))?.prevRole;\n const localPeerId = useHMSStore(selectLocalPeerID);\n const isLocal = localPeerId === peerId;\n const [open, setOpen] = useState(false);\n\n const handleStageAction = async () => {\n if (isInStage) {\n prevRole && hmsActions.changeRoleOfPeer(peerId, prevRole, true);\n } else {\n await hmsActions.changeRoleOfPeer(peerId, on_stage_role);\n }\n setOpen(false);\n };\n\n return (\n <Dropdown.Root open={open} onOpenChange={value => setOpen(value)} modal={false}>\n <Dropdown.Trigger\n asChild\n data-testid=\"participant_more_actions\"\n className=\"participant_item\"\n css={{\n p: '$1',\n r: '$0',\n c: '$on_surface_high',\n display: open ? 'flex' : 'none',\n '&:hover': {\n bg: '$surface_bright',\n },\n '@md': {\n display: 'flex',\n },\n }}\n tabIndex={0}\n >\n <Box css={{ my: 'auto' }}>\n <VerticalMenuIcon />\n </Box>\n </Dropdown.Trigger>\n <Dropdown.Portal>\n <Dropdown.Content align=\"end\" sideOffset={8} css={{ w: '$64', bg: '$surface_default' }}>\n {shouldShowStageRoleChange ? (\n <Dropdown.Item css={{ bg: '$surface_default' }} onClick={() => handleStageAction()}>\n <ChangeRoleIcon />\n <Text variant=\"sm\" css={{ ml: '$4', fontWeight: '$semiBold', c: '$on_surface_high' }}>\n {isInStage ? remove_from_stage_label : bring_to_stage_label}\n </Text>\n </Dropdown.Item>\n ) : null}\n\n {!isLocal && canRemoveOthers && (\n <Dropdown.Item\n css={{ color: '$alert_error_default', bg: '$surface_default' }}\n onClick={async () => {\n try {\n await hmsActions.removePeer(peerId, '');\n } catch (error) {\n ToastManager.addToast({ title: error.message, variant: 'error' });\n }\n }}\n >\n <PeopleRemoveIcon />\n <Text variant=\"sm\" css={{ ml: '$4', color: 'inherit', fontWeight: '$semiBold' }}>\n Remove Participant\n </Text>\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n );\n};\n\nexport const ParticipantSearch = ({ onSearch, placeholder, inSidePane = false }) => {\n const [value, setValue] = React.useState('');\n const isMobile = useMedia(cssConfig.media.md);\n\n useDebounce(\n () => {\n onSearch(value);\n },\n 300,\n [value, onSearch],\n );\n return (\n <Flex\n align=\"center\"\n css={{\n p: isMobile ? '0' : '$2 0',\n mb: '$2',\n position: 'relative',\n color: '$on_surface_medium',\n mt: inSidePane ? '$4' : '',\n }}\n >\n <SearchIcon style={{ position: 'absolute', left: isMobile ? '1.25rem' : '0.5rem' }} />\n <Input\n type=\"text\"\n placeholder={placeholder || 'Search for participants'}\n css={{ w: '100%', p: '$6', pl: '$14', bg: inSidePane ? '$surface_default' : '$surface_dim' }}\n value={value}\n onKeyDown={event => {\n event.stopPropagation();\n }}\n onChange={event => {\n setValue(event.currentTarget.value);\n }}\n autoComplete=\"off\"\n aria-autocomplete=\"none\"\n />\n </Flex>\n );\n};\n", "import React from 'react';\nimport { selectConnectionQualityByPeerID, useHMSStore } from '@100mslive/react-sdk';\nimport { PoorConnectivityIcon } from '@100mslive/react-icons';\nimport { styled, Tooltip, useTheme } from '../../..';\n// @ts-ignore\nimport { getColor, getTooltipText } from './connectionQualityUtils';\n\nconst Wrapper = styled('span', {\n width: '28px',\n height: '28px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '$round',\n variants: {\n isTile: {\n true: {\n width: 'unset',\n height: 'unset',\n },\n },\n },\n});\n\nexport const ConnectionIndicator = ({\n peerId,\n isTile = false,\n hideBg = false,\n}: {\n peerId: string;\n isTile?: boolean;\n hideBg?: boolean;\n}) => {\n const downlinkQuality = useHMSStore(selectConnectionQualityByPeerID(peerId))?.downlinkQuality;\n const { theme } = useTheme();\n const defaultColor = theme.colors.surface_brighter;\n if (downlinkQuality === -1 || downlinkQuality === undefined) {\n return null;\n }\n if (downlinkQuality === 0) {\n return (\n <Tooltip title={getTooltipText(downlinkQuality)}>\n <Wrapper isTile={isTile} css={{ color: '#ED4C5A' }} data-testid=\"tile_network\">\n <PoorConnectivityIcon />\n </Wrapper>\n </Tooltip>\n );\n }\n const size = isTile ? 12 : 16;\n return (\n <Tooltip title={getTooltipText(downlinkQuality)}>\n <Wrapper isTile={isTile} data-testid=\"tile_network\" css={{ backgroundColor: hideBg ? '' : '$surface_bright' }}>\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 14 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlSpace=\"preserve\"\n style={{\n fillRule: 'evenodd',\n clipRule: 'evenodd',\n strokeLinejoin: 'round',\n strokeMiterlimit: 2,\n }}\n >\n <path\n d=\"M6.875 0c2.549.035 4.679.902 6.445 2.648.366.362.45.796.216 1.096-.239.306-.714.34-1.142.072a2.28 2.28 0 0 1-.341-.271C9.24.862 4.924.775 1.992 3.346c-.284.249-.594.419-.983.393-.272-.019-.49-.135-.613-.388-.125-.261-.05-.498.114-.713.073-.092.156-.177.245-.254C2.516.804 4.591.039 6.875 0Z\"\n fill={getColor(4, downlinkQuality, defaultColor, theme)}\n transform=\"translate(-.333)\"\n />\n <path\n d=\"M7.056 2.964c1.756.035 3.208.7 4.499 1.763.162.134.277.315.354.512.098.251.114.503-.075.72-.193.222-.452.259-.725.198-.293-.066-.518-.247-.738-.443a4.859 4.859 0 0 0-6.198-.26c-.166.127-.318.271-.475.409-.242.211-.513.343-.843.317-.43-.034-.679-.397-.561-.81.062-.211.181-.4.345-.546 1.265-1.162 2.733-1.836 4.417-1.86Z\"\n fill={getColor(3, downlinkQuality, defaultColor, theme)}\n transform=\"translate(-.333)\"\n />\n <path\n d=\"M7.384,6.052C8.293,6.068 9.157,6.449 9.783,7.108C10.005,7.339 10.157,7.6 10.07,7.942C9.959,8.377 9.435,8.581 9.071,8.243C7.935,7.191 6.356,7.183 5.152,8.183C4.816,8.462 4.6,8.485 4.332,8.27C4.063,8.055 3.998,7.691 4.177,7.358C4.273,7.179 4.414,7.038 4.57,6.911C5.26,6.349 6.149,6.05 7.384,6.052L7.384,6.052Z\"\n fill={getColor(2, downlinkQuality, defaultColor, theme)}\n />\n <path\n d=\"M8.214,9.941C8.214,10.234 8.097,10.515 7.888,10.721C7.68,10.928 7.398,11.042 7.104,11.039C6.471,11.036 5.982,10.541 5.993,9.912C6.004,9.259 6.499,8.766 7.133,8.779C7.744,8.791 8.22,9.301 8.214,9.941Z\"\n fill={getColor(1, downlinkQuality, defaultColor, theme)}\n />\n </svg>\n </Wrapper>\n </Tooltip>\n );\n};\n", "const connectionTooltip = {\n 0: 'Reconnecting',\n 1: 'Very Bad Connection',\n 2: 'Bad Connection',\n 3: 'Moderate Connection',\n 4: 'Good Connection',\n 5: 'Excellent Connection',\n};\nconnectionTooltip[-1] = 'Network Unknown';\n\n/**\n * @param connectionScore -> 1-5 connection score for network quality\n */\nexport const getTooltipText = connectionScore => {\n return connectionTooltip[connectionScore];\n};\n\n/**\n * position is needed here as we don't want all the dots/arcs to be colored,\n * the non colored ones will be passed in the default color. If user is\n * disconnected(score=0), no dot/arc will be colored.\n * @param position -> 1 to 5\n * @param connectionScore -> 0 to 5, 0 means disconnected\n * @param defaultColor -> color for components not taking the connection color\n */\nexport const getColor = (position, connectionScore, defaultColor, theme) => {\n const shouldBeColored = position <= connectionScore;\n if (!shouldBeColored) {\n return defaultColor;\n }\n if (connectionScore >= 4) {\n return theme.colors.alert_success;\n } else if (connectionScore >= 3) {\n return theme.colors.alert_warning;\n } else if (connectionScore >= 1) {\n return theme.colors.alert_default;\n }\n return defaultColor;\n};\n", "import React, { useEffect } from 'react';\nimport { useMeasure } from 'react-use';\nimport { FixedSizeList } from 'react-window';\nimport { HMSPeer, selectIsLargeRoom, useHMSStore, usePaginatedParticipants } from '@100mslive/react-sdk';\nimport { ChevronRightIcon } from '@100mslive/react-icons';\nimport { Accordion } from '../../../Accordion';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit Any\nimport { Participant } from './ParticipantList';\nimport { RoleOptions } from './RoleOptions';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../../common/utils';\n\nexport const ROW_HEIGHT = 50;\nconst ITER_TIMER = 5000;\n\nexport interface ItemData {\n peerList: HMSPeer[];\n isConnected: boolean;\n}\n\nexport function itemKey(index: number, data: ItemData) {\n return data.peerList[index]?.id;\n}\n\nexport const VirtualizedParticipantItem = React.memo(({ index, data }: { index: number; data: ItemData }) => {\n return <Participant key={data.peerList[index].id} peer={data.peerList[index]} isConnected={data.isConnected} />;\n});\n\nexport const RoleAccordion = ({\n peerList = [],\n roleName,\n isConnected,\n filter,\n isHandRaisedAccordion = false,\n offStageRoles,\n onActive,\n}: ItemData & {\n roleName: string;\n isHandRaisedAccordion?: boolean;\n filter?: { search: string };\n offStageRoles: string[];\n onActive?: (role: string) => void;\n}) => {\n const [ref, { width }] = useMeasure<HTMLDivElement>();\n const showAcordion = filter?.search ? peerList.some(peer => peer.name.toLowerCase().includes(filter.search)) : true;\n const isLargeRoom = useHMSStore(selectIsLargeRoom);\n const { peers, total, loadPeers } = usePaginatedParticipants({ role: roleName, limit: 10 });\n const isOffStageRole = roleName && offStageRoles.includes(roleName);\n\n useEffect(() => {\n if (!isOffStageRole || !isLargeRoom) {\n return;\n }\n loadPeers();\n const interval = setInterval(() => {\n loadPeers();\n }, ITER_TIMER);\n return () => clearInterval(interval);\n }, [isOffStageRole, isLargeRoom]); //eslint-disable-line\n\n if (!showAcordion || (isHandRaisedAccordion && filter?.search) || (peerList.length === 0 && filter?.search)) {\n return null;\n }\n\n const peersInAccordion = isOffStageRole && isLargeRoom ? peers : peerList;\n const height = ROW_HEIGHT * peersInAccordion.length;\n const hasNext = total > peersInAccordion.length;\n\n if (peersInAccordion.length === 0) {\n return null;\n }\n\n return (\n <Accordion.Item value={roleName} css={{ '&:hover .role_actions': { visibility: 'visible' }, mb: '$8' }} ref={ref}>\n <Accordion.Header\n iconStyles={{ c: '$on_surface_high' }}\n css={{\n textTransform: 'capitalize',\n p: '$6 $8',\n fontSize: '$sm',\n fontWeight: '$semiBold',\n c: '$on_surface_medium',\n borderRadius: '$1',\n border: '1px solid $border_default',\n '&[data-state=\"open\"]': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n },\n }}\n >\n <Flex justify=\"between\" css={{ flexGrow: 1, pr: '$6' }}>\n <Text\n variant=\"sm\"\n css={{ fontWeight: '$semiBold', textTransform: 'capitalize', color: '$on_surface_medium' }}\n >\n {roleName} {`(${getFormattedCount(isLargeRoom && isOffStageRole ? total : peerList.length)})`}\n </Text>\n <RoleOptions roleName={roleName} peerList={peersInAccordion} />\n </Flex>\n </Accordion.Header>\n <Accordion.Content contentStyles={{ border: '1px solid $border_default', borderTop: 'none' }}>\n <FixedSizeList\n itemSize={ROW_HEIGHT}\n itemData={{ peerList: peersInAccordion, isConnected }}\n itemKey={itemKey}\n itemCount={peersInAccordion.length}\n width={width}\n height={height}\n >\n {VirtualizedParticipantItem}\n </FixedSizeList>\n {offStageRoles?.includes(roleName) && hasNext ? (\n <Flex\n align=\"center\"\n justify=\"end\"\n css={{\n gap: '$1',\n cursor: 'pointer',\n color: '$on_surface_high',\n p: '$6',\n borderTop: '1px solid $border_default',\n }}\n onClick={() => onActive?.(roleName)}\n >\n <Text variant=\"sm\" css={{ color: 'inherit' }}>\n View All\n </Text>\n <ChevronRightIcon />\n </Flex>\n ) : null}\n </Accordion.Content>\n </Accordion.Item>\n );\n};\n", "import React, { useState } from 'react';\nimport { DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { HMSPeer, selectPermissions, useHMSActions, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport {\n MicOffIcon,\n MicOnIcon,\n PersonRectangleIcon,\n RemoveUserIcon,\n VerticalMenuIcon,\n VideoOffIcon,\n VideoOnIcon,\n} from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { getMetadata } from '../../common/utils';\n\nconst dropdownItemCSS = { backgroundColor: '$surface_default', gap: '$4', p: '$8' };\nconst optionTextCSS = { fontWeight: '$semiBold', color: '$on_surface_high', textTransform: 'none' };\n\nexport const RoleOptions = ({ roleName, peerList }: { roleName: string; peerList: HMSPeer[] }) => {\n const [openOptions, setOpenOptions] = useState(false);\n const permissions = useHMSStore(selectPermissions);\n const hmsActions = useHMSActions();\n const { elements } = useRoomLayoutConferencingScreen();\n const { on_stage_role, off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};\n\n const vanillaStore = useHMSVanillaStore();\n const store = vanillaStore.getState();\n\n let allPeersHaveVideoOn = true;\n let allPeersHaveAudioOn = true;\n\n peerList.forEach(peer => {\n const isAudioOn = !!peer.audioTrack && store.tracks[peer.audioTrack]?.enabled;\n const isVideoOn = !!peer.videoTrack && store.tracks[peer.videoTrack]?.enabled;\n allPeersHaveAudioOn = allPeersHaveAudioOn && isAudioOn;\n allPeersHaveVideoOn = allPeersHaveVideoOn && isVideoOn;\n });\n\n const canMuteRole = permissions?.mute && roleName === on_stage_role;\n const canRemoveRoleFromStage = permissions?.changeRole && roleName === on_stage_role;\n // on stage and off stage roles\n const canRemoveRoleFromRoom =\n permissions?.removeOthers && (on_stage_role === roleName || off_stage_roles?.includes(roleName));\n\n if (!(canMuteRole || canRemoveRoleFromStage || canRemoveRoleFromRoom) || peerList.length === 0) {\n return null;\n }\n\n const removeAllFromStage = () => {\n peerList.forEach(peer => {\n const prevRole = getMetadata(peer.metadata).prevRole;\n if (prevRole) {\n hmsActions.changeRoleOfPeer(peer.id, prevRole, true);\n }\n });\n };\n\n const setTrackEnabled = async (type: 'audio' | 'video', enabled = false) => {\n try {\n await hmsActions.setRemoteTracksEnabled({ roles: [roleName], source: 'regular', type, enabled });\n } catch (e) {\n console.error(e);\n }\n };\n\n const removePeersFromRoom = async () => {\n try {\n peerList.forEach(async peer => {\n await hmsActions.removePeer(peer.id, '');\n });\n } catch (e) {\n console.error(e);\n }\n };\n\n return (\n <Dropdown.Root open={openOptions} onOpenChange={setOpenOptions}>\n <Dropdown.Trigger\n onClick={e => e.stopPropagation()}\n className=\"role_actions\"\n asChild\n css={{\n p: '$1',\n r: '$0',\n c: '$on_surface_high',\n visibility: openOptions ? 'visible' : 'hidden',\n '&:hover': {\n c: '$on_surface_medium',\n },\n '@md': {\n visibility: 'visible',\n },\n }}\n >\n <Flex>\n <VerticalMenuIcon />\n </Flex>\n </Dropdown.Trigger>\n <Dropdown.Content\n onClick={e => e.stopPropagation()}\n css={{ w: 'max-content', maxWidth: '$64', bg: '$surface_default', py: 0 }}\n align=\"end\"\n >\n {canRemoveRoleFromStage && (\n <Dropdown.Item\n css={{ ...dropdownItemCSS, borderBottom: '1px solid $border_bright' }}\n onClick={removeAllFromStage}\n >\n <PersonRectangleIcon />\n <Text variant=\"sm\" css={optionTextCSS}>\n Remove all from Stage\n </Text>\n </Dropdown.Item>\n )}\n\n {canMuteRole && (\n <>\n <Dropdown.Item css={dropdownItemCSS} onClick={() => setTrackEnabled('audio', !allPeersHaveAudioOn)}>\n {allPeersHaveAudioOn ? <MicOffIcon /> : <MicOnIcon />}\n <Text variant=\"sm\" css={optionTextCSS}>\n {allPeersHaveAudioOn ? 'Mute' : 'Unmute'} Audio\n </Text>\n </Dropdown.Item>\n\n <Dropdown.Item\n css={{ ...dropdownItemCSS, borderTop: '1px solid $border_bright' }}\n onClick={() => setTrackEnabled('video', !allPeersHaveVideoOn)}\n >\n {allPeersHaveVideoOn ? <VideoOffIcon /> : <VideoOnIcon />}\n <Text variant=\"sm\" css={optionTextCSS}>\n {allPeersHaveVideoOn ? 'Mute' : 'Unmute'} Video\n </Text>\n </Dropdown.Item>\n </>\n )}\n\n {canRemoveRoleFromRoom && (\n <Dropdown.Item\n css={{ ...dropdownItemCSS, borderTop: '1px solid $border_bright', color: '$alert_error_default' }}\n onClick={removePeersFromRoom}\n >\n <RemoveUserIcon />\n <Text variant=\"sm\" css={{ ...optionTextCSS, color: 'inherit' }}>\n Remove all from Room\n </Text>\n </Dropdown.Item>\n )}\n </Dropdown.Content>\n </Dropdown.Root>\n );\n};\n", "import React from 'react';\nimport { QuizIcon } from '@100mslive/react-icons';\nimport { Tooltip } from '../../..';\n// @ts-ignore: No implicit Any\nimport IconButton from '../../IconButton';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, usePollViewToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nexport const PollsToggle = () => {\n const isPollsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.POLLS);\n const togglePollView = usePollViewToggle();\n\n return (\n <Tooltip key=\"polls\" title={`${isPollsOpen ? 'Close' : 'Open'} polls and quizzes`}>\n <IconButton onClick={togglePollView} active={!isPollsOpen} data-testid=\"polls_btn\">\n <QuizIcon />\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { useCallback, useState } from 'react';\nimport { selectHLSState, useHMSActions, useHMSStore, useRecordingStreaming } from '@100mslive/react-sdk';\nimport { Button } from '../../../Button';\nimport { Flex } from '../../../Layout';\nimport { Dialog } from '../../../Modal';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../../common/constants';\n\nexport function HLSFailureModal() {\n const hlsError = useHMSStore(selectHLSState).error || false;\n const [openModal, setOpenModal] = useState(!!hlsError);\n const hmsActions = useHMSActions();\n const { isRTMPRunning } = useRecordingStreaming();\n const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const startHLS = useCallback(async () => {\n try {\n if (isHLSStarted || isRTMPRunning) {\n return;\n }\n setHLSStarted(true);\n await hmsActions.startHLSStreaming({});\n } catch (error) {\n if ((error as Error).message.includes('invalid input')) {\n await startHLS();\n return;\n }\n setHLSStarted(false);\n }\n }, [hmsActions, isHLSStarted, setHLSStarted, isRTMPRunning]);\n\n return hlsError ? (\n <Dialog.Root\n open={openModal}\n onOpenChange={value => {\n if (!value) {\n setOpenModal(false);\n }\n }}\n >\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(360px, 90%)' }}>\n <Dialog.Title\n css={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderBottom: '1px solid $border_default',\n mt: '$4',\n }}\n >\n <Text variant=\"h6\" css={{ fontWeight: '$semiBold' }}>\n Failed to Go Live\n </Text>\n </Dialog.Title>\n <Text variant=\"sm\" css={{ mb: '$10', color: '$on_surface_medium' }}>\n Something went wrong and your live broadcast failed. Please try again.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button outlined variant=\"standard\" css={{ w: '100%' }} onClick={() => setOpenModal(false)}>\n Dismiss\n </Button>\n <Button css={{ w: '100%' }} onClick={startHLS}>\n Go Live\n </Button>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n ) : null;\n}\n", "import React, { useEffect } from 'react';\nimport {\n selectLocalPeerName,\n selectLocalPeerRoleName,\n selectRoleChangeRequest,\n useCustomEvent,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { Flex, Text } from '../../..';\n// @ts-ignore: No implicit Any\nimport { PreviewControls, PreviewTile } from '../Preview/PreviewJoin';\nimport { RequestPrompt } from './RequestPrompt';\n// @ts-ignore: No implicit Any\nimport { useMyMetadata } from '../hooks/useMetadata';\n// @ts-ignore: No implicit Any\nimport { ROLE_CHANGE_DECLINED } from '../../common/constants';\n\nexport const RoleChangeRequestModal = () => {\n const hmsActions = useHMSActions();\n const { updateMetaData } = useMyMetadata();\n const currentRole = useHMSStore(selectLocalPeerRoleName);\n const roleChangeRequest = useHMSStore(selectRoleChangeRequest);\n const name = useHMSStore(selectLocalPeerName);\n const { sendEvent } = useCustomEvent({ type: ROLE_CHANGE_DECLINED });\n\n useEffect(() => {\n if (!roleChangeRequest?.role) {\n return;\n }\n (async () => {\n await hmsActions.preview({ asRole: roleChangeRequest.role.name });\n })();\n }, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);\n\n if (!roleChangeRequest?.role) {\n return null;\n }\n\n const body = (\n <>\n <Text\n variant=\"xs\"\n css={{\n c: '$on_surface_medium',\n textAlign: 'center',\n '@md': { textAlign: 'left', borderBottom: '1px solid $border_bright', pb: '$4', px: '$8' },\n }}\n >\n Setup your audio and video before joining\n </Text>\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n '@sm': { width: '100%' },\n flexDirection: 'column',\n mt: '$6',\n '@md': { px: '$8' },\n }}\n >\n <PreviewTile name={name || ''} />\n\n <PreviewControls hideSettings={true} />\n </Flex>\n </>\n );\n\n return (\n <RequestPrompt\n title=\"You're invited to join the stage\"\n onOpenChange={async value => {\n if (!value) {\n hmsActions.rejectChangeRole(roleChangeRequest);\n sendEvent({ ...roleChangeRequest, peerName: name }, { peerId: roleChangeRequest.requestedBy?.id });\n await hmsActions.cancelMidCallPreview();\n await hmsActions.lowerLocalPeerHand();\n }\n }}\n body={body}\n onAction={async () => {\n await hmsActions.acceptChangeRole(roleChangeRequest);\n await updateMetaData({ prevRole: currentRole });\n await hmsActions.lowerLocalPeerHand();\n }}\n actionText=\"Accept\"\n />\n );\n};\n", "import React, { Fragment, Suspense, useCallback, useEffect, useMemo, useState } from 'react';\nimport { useMeasure, useMedia } from 'react-use';\nimport {\n HMSRoomState,\n selectIsLocalVideoEnabled,\n selectLocalPeer,\n selectRoomState,\n selectVideoTrackByID,\n useAVToggle,\n useHMSStore,\n useParticipants,\n usePreviewJoin,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\nimport { MicOffIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { Avatar, Box, config as cssConfig, Flex, flexCenter, styled, StyledVideoTile, Text, Video } from '../../..';\nimport { AudioLevel } from '../../../AudioLevel';\nimport { useHMSPrebuiltContext } from '../../AppContext';\n// @ts-ignore: No implicit Any\nimport IconButton from '../../IconButton';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport { AudioVideoToggle } from '../AudioVideoToggle';\n// @ts-ignore: No implicit Any\nimport Chip from '../Chip';\n// @ts-ignore: No implicit Any\nimport TileConnection from '../Connection/TileConnection';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from '../FullPageProgress';\n// @ts-ignore: No implicit Any\nimport { Logo } from '../Header/HeaderComponents';\n// @ts-ignore: No implicit Any\nimport SettingsModal from '../Settings/SettingsModal';\n// @ts-ignore: No implicit Any\nimport PreviewForm from './PreviewForm';\n// @ts-ignore: No implicit Any\nimport { useAuthToken, useUISettings } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from '../hooks/useUserPreferences';\n// @ts-ignore: No implicit Any\nimport { calculateAvatarAndAttribBoxSize, getFormattedCount } from '../../common/utils';\n// @ts-ignore: No implicit Any\nimport { UI_SETTINGS } from '../../common/constants';\n\n// @ts-ignore: No implicit Any\nconst VirtualBackground = React.lazy(() => import('../../plugins/VirtualBackground/VirtualBackground'));\n\nconst getParticipantChipContent = (peerCount = 0) => {\n if (peerCount === 0) {\n return 'You are the first to join';\n }\n const formattedNum = getFormattedCount(peerCount);\n return `${formattedNum} other${parseInt(formattedNum) === 1 ? '' : 's'} in the session`;\n};\n\nconst useLocalTileAspectRatio = () => {\n const localPeer = useHMSStore(selectLocalPeer);\n const videoTrack = useHMSStore(selectVideoTrackByID(localPeer?.videoTrack));\n const isMobile = useMedia(cssConfig.media.md);\n let aspectRatio = 0;\n if (videoTrack?.width && videoTrack?.height) {\n aspectRatio = videoTrack.width / videoTrack.height;\n } else {\n aspectRatio = isMobile ? 9 / 16 : 16 / 9;\n }\n return aspectRatio;\n};\n\nconst PreviewJoin = ({\n skipPreview,\n initialName,\n asRole,\n}: {\n skipPreview?: boolean;\n initialName?: string;\n asRole?: string;\n}) => {\n const [previewPreference, setPreviewPreference] = useUserPreferences(\n UserPreferencesKeys.PREVIEW,\n defaultPreviewPreference,\n );\n const { isStreamingOn } = useRecordingStreaming();\n const authToken = useAuthToken();\n const [name, setName] = useState(initialName || previewPreference.name);\n const { toggleAudio, toggleVideo } = useAVToggle();\n const [previewError, setPreviewError] = useState(false);\n const { endpoints } = useHMSPrebuiltContext();\n const { peerCount } = useParticipants();\n const { enableJoin, preview, join } = usePreviewJoin({\n name,\n token: authToken,\n initEndpoint: endpoints?.init,\n initialSettings: {\n isAudioMuted: skipPreview || previewPreference.isAudioMuted,\n isVideoMuted: skipPreview || previewPreference.isVideoMuted,\n speakerAutoSelectionBlacklist: ['Yeti Stereo Microphone'],\n },\n captureNetworkQualityInPreview: true,\n handleError: (_, method) => {\n if (method === 'preview') {\n setPreviewError(true);\n }\n },\n asRole,\n });\n const roomState = useHMSStore(selectRoomState);\n\n const savePreferenceAndJoin = useCallback(() => {\n setPreviewPreference({\n name,\n });\n join();\n }, [join, name, setPreviewPreference]);\n const roomLayout = useRoomLayout();\n\n const { preview_header: previewHeader = {} } = roomLayout?.screens?.preview?.default?.elements || {};\n const aspectRatio = useLocalTileAspectRatio();\n useEffect(() => {\n if (authToken) {\n if (skipPreview) {\n savePreferenceAndJoin();\n } else {\n preview();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [authToken, skipPreview]);\n\n useEffect(() => {\n if (initialName) {\n setName(initialName);\n }\n }, [initialName]);\n\n return roomState === HMSRoomState.Preview ? (\n <Container css={{ h: '100%', pt: '$10', '@md': { justifyContent: 'space-between' } }}>\n {toggleVideo ? null : <Box />}\n <Flex direction=\"column\" justify=\"center\" css={{ w: '100%', maxWidth: '640px' }}>\n <Logo />\n <Text\n variant=\"h4\"\n css={{ wordBreak: 'break-word', textAlign: 'center', mt: '$14', mb: '$4', '@md': { mt: '$8', mb: '$2' } }}\n >\n {previewHeader.title}\n </Text>\n <Text\n css={{ c: '$on_surface_medium', my: '0', textAlign: 'center', maxWidth: '100%', wordWrap: 'break-word' }}\n variant=\"sm\"\n >\n {previewHeader.sub_title}\n </Text>\n <Flex justify=\"center\" css={{ mt: '$14', '@md': { mt: '$8', mb: '0' }, gap: '$4' }}>\n {isStreamingOn ? (\n <Chip\n content=\"LIVE\"\n backgroundColor=\"$alert_error_default\"\n textColor=\"#FFF\"\n icon={<Box css={{ h: '$sm', w: '$sm', backgroundColor: '$on_primary_high', borderRadius: '$round' }} />}\n />\n ) : null}\n <Chip content={getParticipantChipContent(peerCount)} hideIfNoContent />\n </Flex>\n </Flex>\n {toggleVideo ? (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n mt: '$14',\n '@md': { mt: 0 },\n '@sm': { width: '100%' },\n flexDirection: 'column',\n }}\n >\n <PreviewTile name={name} error={previewError} />\n </Flex>\n ) : null}\n <Box css={{ w: '100%', maxWidth: `${Math.max(aspectRatio, 1) * 360}px` }}>\n <PreviewControls hideSettings={!toggleVideo && !toggleAudio} />\n <PreviewForm\n name={name}\n onChange={setName}\n enableJoin={enableJoin}\n onJoin={savePreferenceAndJoin}\n cannotPublishVideo={!toggleVideo}\n cannotPublishAudio={!toggleAudio}\n />\n </Box>\n </Container>\n ) : (\n <FullPageProgress />\n );\n};\n\nconst Container = styled('div', {\n width: '100%',\n ...flexCenter,\n flexDirection: 'column',\n px: '$10',\n});\n\nexport const PreviewTile = ({ name, error }: { name: string; error?: boolean }) => {\n const localPeer = useHMSStore(selectLocalPeer);\n const { isLocalAudioEnabled, toggleAudio } = useAVToggle();\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const trackSelector = selectVideoTrackByID(localPeer?.videoTrack);\n const track = useHMSStore(trackSelector);\n const showMuteIcon = !isLocalAudioEnabled || !toggleAudio;\n const aspectRatio = useLocalTileAspectRatio();\n const [ref, { width: calculatedWidth, height: calculatedHeight }] = useMeasure<HTMLDivElement>();\n const [avatarSize, attribBoxSize] = useMemo(\n () => calculateAvatarAndAttribBoxSize(calculatedWidth, calculatedHeight),\n [calculatedWidth, calculatedHeight],\n );\n\n return (\n <StyledVideoTile.Container\n ref={ref}\n css={{\n bg: '$surface_default',\n aspectRatio,\n height: 'min(360px, 70vh)',\n maxWidth: '640px',\n overflow: 'clip',\n '@md': {\n width: 'min(220px, 70vw)',\n maxWidth: '100%',\n my: '$4',\n },\n }}\n >\n {localPeer ? (\n <>\n <TileConnection name={name} peerId={localPeer.id} hideLabel={true} />\n <Video\n mirror={track?.facingMode !== 'environment' && mirrorLocalVideo}\n trackId={localPeer.videoTrack}\n data-testid=\"preview_tile\"\n />\n\n {!isVideoOn ? (\n <StyledVideoTile.AvatarContainer>\n <Avatar name={name} data-testid=\"preview_avatar_tile\" size={avatarSize} />\n </StyledVideoTile.AvatarContainer>\n ) : null}\n </>\n ) : null}\n {!localPeer && !error ? <FullPageProgress /> : null}\n\n {showMuteIcon ? (\n <StyledVideoTile.AudioIndicator size={attribBoxSize}>\n <MicOffIcon />\n </StyledVideoTile.AudioIndicator>\n ) : (\n <StyledVideoTile.AudioIndicator size={attribBoxSize}>\n <AudioLevel trackId={localPeer?.audioTrack} />\n </StyledVideoTile.AudioIndicator>\n )}\n </StyledVideoTile.Container>\n );\n};\n\nexport const PreviewControls = ({ hideSettings }: { hideSettings: boolean }) => {\n const isMobile = useMedia(cssConfig.media.md);\n\n return (\n <Flex\n justify={hideSettings && isMobile ? 'center' : 'between'}\n css={{\n width: '100%',\n mt: '$8',\n }}\n >\n <Flex css={{ gap: '$4' }}>\n <AudioVideoToggle />\n <Suspense fallback=\"\">{!isMobile ? <VirtualBackground /> : null}</Suspense>\n </Flex>\n {!hideSettings ? <PreviewSettings /> : null}\n </Flex>\n );\n};\n\nexport const PreviewSettings = React.memo(() => {\n const [open, setOpen] = useState(false);\n\n return (\n <Fragment>\n <IconButton data-testid=\"preview_setting_btn\" css={{ flexShrink: 0 }} onClick={() => setOpen(value => !value)}>\n <SettingsIcon />\n </IconButton>\n {open && <SettingsModal open={open} onOpenChange={setOpen} />}\n </Fragment>\n );\n});\n\nexport default PreviewJoin;\n", "import React from 'react';\nimport { Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { CSS } from '../../Theme';\n\nconst Chip = ({\n icon = <></>,\n content = '',\n backgroundColor = '$surface_default',\n textColor = '$on_surface_high',\n hideIfNoContent = false,\n onClick,\n css = {},\n}: {\n icon?: React.JSX.Element;\n content: string;\n backgroundColor?: string;\n textColor?: string;\n hideIfNoContent?: boolean;\n onClick?: () => void | Promise<void>;\n css?: CSS;\n}) => {\n if (hideIfNoContent && !content) {\n return null;\n }\n return (\n <Flex\n align=\"center\"\n css={{ backgroundColor, p: '$4 $6', gap: '$2', borderRadius: '$4', ...css }}\n onClick={() => onClick?.()}\n >\n {icon}\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', color: textColor }}>\n {content}\n </Text>\n </Flex>\n );\n};\n\nexport default Chip;\n", "import React from 'react';\nimport { PinIcon, SpotlightIcon } from '@100mslive/react-icons';\nimport { Flex, styled, Text, textEllipsis } from '../../..';\nimport { ConnectionIndicator } from './ConnectionIndicator';\n\nconst TileConnection = ({\n name,\n peerId,\n hideLabel,\n width,\n spotlighted,\n pinned,\n}: {\n name: string;\n peerId: string;\n hideLabel: boolean;\n width?: number;\n spotlighted?: boolean;\n pinned?: boolean;\n}) => {\n return (\n <Wrapper>\n {!hideLabel ? (\n <>\n <Flex align=\"center\">\n {pinned && (\n <IconWrapper>\n <PinIcon width=\"15\" height=\"15\" />\n </IconWrapper>\n )}\n {spotlighted && (\n <IconWrapper>\n <SpotlightIcon width=\"15\" height=\"15\" />\n </IconWrapper>\n )}\n <Text\n css={{\n c: '$on_surface_high',\n verticalAlign: 'baseline',\n ...(width ? textEllipsis(width - 60) : {}),\n }}\n variant=\"xs\"\n >\n {name}\n </Text>\n </Flex>\n <ConnectionIndicator isTile peerId={peerId} hideBg />\n </>\n ) : null}\n </Wrapper>\n );\n};\n\nconst IconWrapper = styled('div', { c: '$on_surface_high', ml: '$3', mt: '$1' });\n\nconst Wrapper = styled('div', {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n position: 'absolute',\n bottom: '$2',\n left: '$2',\n backgroundColor: '$background_dim',\n borderRadius: '$1',\n maxWidth: '85%',\n '& p,span': {\n p: '$2 $3',\n },\n});\n\nexport default TileConnection;\n", "import React from 'react';\nimport { Flex } from '../../Layout';\nimport { Loading } from '../../Loading';\nimport { Text } from '../../Text';\n\nconst FullPageProgress = ({ loaderColor = '$primary_default', text = '', css = {} }) => (\n <Flex direction=\"column\" justify=\"center\" align=\"center\" css={{ size: '100%', color: loaderColor, ...css }}>\n <Loading color=\"currentColor\" size={100} />\n {text ? <Text css={{ mt: '$10', color: '$on_surface_high' }}>{text}</Text> : null}\n </Flex>\n);\n\nexport default FullPageProgress;\n", "import React, { useEffect, useState } from 'react';\nimport { selectDominantSpeaker, useHMSStore } from '@100mslive/react-sdk';\nimport { VolumeOneIcon } from '@100mslive/react-icons';\nimport { Flex, styled, Text, textEllipsis, VerticalDivider } from '../../../';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n\nexport const SpeakerTag = () => {\n const dominantSpeaker = useHMSStore(selectDominantSpeaker);\n return (\n dominantSpeaker &&\n dominantSpeaker.name && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{ flex: '1 1 0', color: '$on_primary_high', '@md': { display: 'none' } }}\n >\n <VerticalDivider css={{ ml: '$8' }} />\n <VolumeOneIcon />\n <Text variant=\"md\" css={{ ...textEllipsis(200), ml: '$2' }} title={dominantSpeaker.name}>\n {dominantSpeaker.name}\n </Text>\n </Flex>\n )\n );\n};\n\nconst LogoImg = styled('img', {\n maxHeight: '$14',\n w: 'auto',\n objectFit: 'contain',\n '@md': {\n maxHeight: '$12',\n },\n});\n\nexport const Logo = () => {\n const roomLayout = useRoomLayout();\n const logo = roomLayout?.logo?.url;\n const [hideImage, setHideImage] = useState(false);\n // Hide logo for now as there is not enough space\n useEffect(() => {\n if (hideImage) {\n setHideImage(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [logo]);\n\n return logo && !hideImage ? (\n <LogoImg\n src={logo}\n alt=\"Brand Logo\"\n onError={e => {\n e.target.onerror = null;\n setHideImage(true);\n }}\n />\n ) : null;\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { JoinForm_JoinBtnType } from '@100mslive/types-prebuilt/elements/join_form';\nimport { useRecordingStreaming } from '@100mslive/react-sdk';\nimport { RadioIcon } from '@100mslive/react-icons';\nimport { Button, config as cssConfig, Flex, Input, styled } from '../../..';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport { PreviewSettings } from './PreviewJoin';\n\nconst PreviewForm = ({\n name,\n onChange,\n onJoin,\n enableJoin,\n cannotPublishVideo = false,\n cannotPublishAudio = false,\n}: {\n name: string;\n onChange: (name: string) => void;\n onJoin: () => void;\n enableJoin: boolean;\n cannotPublishVideo: boolean;\n cannotPublishAudio: boolean;\n}) => {\n const formSubmit = (e: React.SyntheticEvent) => {\n e.preventDefault();\n };\n const isMobile = useMedia(cssConfig.media.md);\n const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();\n const layout = useRoomLayout();\n const { join_form: joinForm = {} } = layout?.screens?.preview?.default?.elements || {};\n const showGoLive =\n joinForm?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE && !isHLSRunning && !isRTMPRunning;\n\n return (\n <Form\n css={{ flexDirection: cannotPublishVideo ? 'column' : 'row', '@md': { flexDirection: 'row' } }}\n onSubmit={formSubmit}\n >\n <Flex align=\"center\" css={{ gap: '$8', w: '100%' }}>\n <Input\n required\n id=\"name\"\n css={{ w: '100%', boxSizing: 'border-box' }}\n value={name}\n onChange={e => onChange(e.target.value.trimStart())}\n placeholder=\"Enter name\"\n autoFocus\n autoComplete=\"name\"\n onKeyDown={e => {\n if (e.key === 'Enter' && name.trim().length > 0) {\n e.preventDefault();\n if (isMobile) {\n return;\n }\n onJoin();\n }\n }}\n />\n {cannotPublishAudio && cannotPublishVideo && !isMobile ? <PreviewSettings /> : null}\n </Flex>\n\n <Button type=\"submit\" icon disabled={!name || !enableJoin} onClick={onJoin}>\n {/* Conditions to show go live: The first broadcaster joins a streaming kit that is not live */}\n {showGoLive ? <RadioIcon height={18} width={18} /> : null}\n {showGoLive ? joinForm.go_live_btn_label : joinForm.join_btn_label}\n </Button>\n </Form>\n );\n};\n\nconst Form = styled('form', {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n mt: '$10',\n mb: '$10',\n '@md': {\n gap: '$4',\n },\n});\n\nexport default PreviewForm;\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { Box, Button, config as cssConfig, Dialog, Flex, Text } from '../../..';\nimport { Sheet } from '../../../Sheet';\n\nexport const RequestPrompt = ({\n open = true,\n onOpenChange,\n title,\n body,\n actionText = 'Accept',\n onAction,\n}: {\n open?: boolean;\n onOpenChange: (value: boolean) => void;\n title: string;\n body: React.ReactNode;\n actionText?: string;\n onAction: () => void;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n\n if (isMobile) {\n return (\n <Sheet.Root open={open} onOpenChange={onOpenChange}>\n <Sheet.Content css={{ py: '$8' }}>\n <Text css={{ fontWeight: '$semiBold', c: '$on_surface_high', '@md': { px: '$8' } }}>{title}</Text>\n {body}\n <RequestActions actionText={actionText} onAction={onAction} />\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ p: '$10' }}>\n <Dialog.Title css={{ p: 0, display: 'flex', flexDirection: 'row', gap: '$md', justifyContent: 'center' }}>\n <Text variant=\"h6\">{title}</Text>\n </Dialog.Title>\n <Box css={{ mt: '$4', mb: '$10' }}>{body}</Box>\n <RequestActions actionText={actionText} onAction={onAction} />\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nconst RequestActions = ({ onAction, actionText }: { actionText?: string; onAction: () => void }) => (\n <Flex justify=\"center\" align=\"center\" css={{ width: '100%', gap: '$md', '@md': { mt: '$8', px: '$8' } }}>\n <Box css={{ width: '50%' }}>\n <Dialog.Close css={{ width: '100%' }}>\n <Button variant=\"standard\" outlined css={{ width: '100%' }}>\n Decline\n </Button>\n </Dialog.Close>\n </Box>\n <Box css={{ width: '50%' }}>\n <Button variant=\"primary\" css={{ width: '100%' }} onClick={onAction}>\n {actionText}\n </Button>\n </Box>\n </Flex>\n);\n", "import React, { Suspense, useEffect } from 'react';\nimport {\n ConferencingScreen,\n DefaultConferencingScreen_Elements,\n HLSLiveStreamingScreen_Elements,\n} from '@100mslive/types-prebuilt';\nimport { selectIsConnectedToRoom, selectLocalPeerRoleName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from '../components/FullPageProgress';\nimport { GridLayout } from '../components/VideoLayouts/GridLayout';\nimport { Flex } from '../../Layout';\n// @ts-ignore: No implicit Any\nimport { EmbedView } from './EmbedView';\n// @ts-ignore: No implicit Any\nimport { PDFView } from './PDFView';\nimport SidePane from './SidePane';\n// @ts-ignore: No implicit Any\nimport { WaitingView } from './WaitingView';\n// import { useWhiteboardMetadata } from '../plugins/whiteboard';\nimport {\n usePDFConfig,\n useUrlToEmbed,\n useWaitingViewerRole,\n // @ts-ignore: No implicit Any\n} from '../components/AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { SESSION_STORE_KEY } from '../common/constants';\n\n// const WhiteboardView = React.lazy(() => import(\"./WhiteboardView\"));\n// @ts-ignore: No implicit Any\nconst HLSView = React.lazy(() => import('./HLSView'));\n\nexport const VideoStreamingSection = ({\n screenType,\n elements,\n hideControls = false,\n}: {\n screenType: keyof ConferencingScreen;\n elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;\n hideControls: boolean;\n}) => {\n const localPeerRole = useHMSStore(selectLocalPeerRoleName);\n // const { whiteboardOwner: whiteboardShared } = useWhiteboardMetadata();\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const hmsActions = useHMSActions();\n const waitingViewerRole = useWaitingViewerRole();\n const urlToIframe = useUrlToEmbed();\n const pdfAnnotatorActive = usePDFConfig();\n\n useEffect(() => {\n if (!isConnected) {\n return;\n }\n hmsActions.sessionStore.observe([SESSION_STORE_KEY.PINNED_MESSAGE, SESSION_STORE_KEY.SPOTLIGHT]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isConnected, hmsActions]);\n\n if (!localPeerRole) {\n // we don't know the role yet to decide how to render UI\n return null;\n }\n\n let ViewComponent;\n if (screenType === 'hls_live_streaming') {\n ViewComponent = <HLSView />;\n } else if (localPeerRole === waitingViewerRole) {\n ViewComponent = <WaitingView />;\n } else if (pdfAnnotatorActive) {\n ViewComponent = <PDFView />;\n } else if (urlToIframe) {\n ViewComponent = <EmbedView />;\n } else {\n //@ts-ignore\n ViewComponent = <GridLayout {...(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid} />;\n }\n\n return (\n <Suspense fallback={<FullPageProgress />}>\n <Flex\n css={{\n size: '100%',\n position: 'relative',\n gap: '$4',\n }}\n >\n {ViewComponent}\n <SidePane\n screenType={screenType}\n // @ts-ignore\n tileProps={(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid}\n hideControls={hideControls}\n />\n </Flex>\n </Suspense>\n );\n};\n", "import React, { useEffect, useMemo, useState } from 'react';\nimport { GridVideoTileLayout } from '@100mslive/types-prebuilt/elements/video_tile_layout';\nimport { selectPeers, selectPeerScreenSharing, useHMSStore, useHMSVanillaStore } from '@100mslive/react-sdk';\nimport { EqualProminence } from './EqualProminence';\nimport { RoleProminence } from './RoleProminence';\nimport { ScreenshareLayout } from './ScreenshareLayout';\n// @ts-ignore: No implicit Any\nimport { usePinnedTrack } from '../AppData/useUISettings';\nimport { VideoTileContext } from '../hooks/useVideoTileLayout';\nimport PeersSorter from '../../common/PeersSorter';\n\nexport type TileCustomisationProps = {\n hide_participant_name_on_tile: boolean;\n rounded_video_tile: boolean;\n hide_audio_mute_on_tile: boolean;\n video_object_fit: 'contain' | 'cover';\n edge_to_edge: boolean;\n hide_metadata_on_tile: boolean;\n};\n\nexport type GridLayoutProps = GridVideoTileLayout & TileCustomisationProps;\n\nexport const GridLayout = ({\n enable_local_tile_inset: isInsetEnabled = false,\n prominent_roles: prominentRoles = [],\n enable_spotlighting_peer = false,\n hide_participant_name_on_tile = false,\n rounded_video_tile = true,\n hide_audio_mute_on_tile = false,\n video_object_fit = 'contain',\n edge_to_edge = false,\n hide_metadata_on_tile = false,\n}: GridLayoutProps) => {\n const peerSharing = useHMSStore(selectPeerScreenSharing);\n const pinnedTrack = usePinnedTrack();\n const peers = useHMSStore(selectPeers);\n const isRoleProminence =\n (prominentRoles.length &&\n peers.some(\n peer => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack),\n )) ||\n pinnedTrack;\n const updatedPeers = useMemo(() => {\n if (isInsetEnabled && !isRoleProminence && !peerSharing) {\n return peers.filter(peer => !peer.isLocal);\n }\n return peers;\n }, [isInsetEnabled, isRoleProminence, peerSharing, peers]);\n const vanillaStore = useHMSVanillaStore();\n const [sortedPeers, setSortedPeers] = useState(updatedPeers);\n const peersSorter = useMemo(() => new PeersSorter(vanillaStore), [vanillaStore]);\n const [pageSize, setPageSize] = useState(0);\n const [mainPage, setMainPage] = useState(0);\n const tileLayout = {\n enableSpotlightingPeer: enable_spotlighting_peer,\n hideParticipantNameOnTile: hide_participant_name_on_tile,\n roundedVideoTile: rounded_video_tile,\n hideAudioMuteOnTile: hide_audio_mute_on_tile,\n hideMetadataOnTile: hide_metadata_on_tile,\n objectFit: video_object_fit,\n };\n\n useEffect(() => {\n if (mainPage !== 0) {\n return;\n }\n peersSorter.setPeersAndTilesPerPage({\n peers: updatedPeers,\n tilesPerPage: pageSize,\n });\n peersSorter.onUpdate(setSortedPeers);\n }, [mainPage, peersSorter, updatedPeers, pageSize]);\n\n if (peerSharing) {\n return (\n <VideoTileContext.Provider value={tileLayout}>\n <ScreenshareLayout\n peers={sortedPeers}\n onPageSize={setPageSize}\n onPageChange={setMainPage}\n edgeToEdge={edge_to_edge}\n />\n </VideoTileContext.Provider>\n );\n } else if (isRoleProminence) {\n return (\n <VideoTileContext.Provider value={tileLayout}>\n <RoleProminence\n peers={sortedPeers}\n onPageSize={setPageSize}\n onPageChange={setMainPage}\n prominentRoles={prominentRoles}\n isInsetEnabled={isInsetEnabled}\n edgeToEdge={edge_to_edge}\n />\n </VideoTileContext.Provider>\n );\n }\n return (\n <VideoTileContext.Provider value={tileLayout}>\n <EqualProminence\n peers={sortedPeers}\n onPageSize={setPageSize}\n onPageChange={setMainPage}\n isInsetEnabled={isInsetEnabled}\n edgeToEdge={edge_to_edge}\n />\n </VideoTileContext.Provider>\n );\n};\n", "import React, { useEffect, useMemo, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectLocalPeer, useHMSStore } from '@100mslive/react-sdk';\nimport { Flex } from '../../../Layout';\nimport { config as cssConfig } from '../../../Theme';\nimport { InsetTile } from '../InsetTile';\nimport { Pagination } from '../Pagination';\nimport { Grid } from './Grid';\nimport { LayoutProps } from './interface';\n// @ts-ignore: No implicit Any\nimport { useUISettings } from '../AppData/useUISettings';\nimport { usePagesWithTiles, useTileLayout } from '../hooks/useTileLayout';\n// @ts-ignore: No implicit Any\nimport { UI_SETTINGS } from '../../common/constants';\n\nexport function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }: LayoutProps) {\n const localPeer = useHMSStore(selectLocalPeer);\n const isMobile = useMedia(cssConfig.media.md);\n let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);\n maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;\n let pageList = usePagesWithTiles({\n peers,\n maxTileCount,\n });\n // useMemo is needed to prevent recursion as new array is created for localPeer\n const inputPeers = useMemo(\n () => (pageList.length === 0 ? (localPeer ? [localPeer] : []) : peers),\n [pageList.length, peers, localPeer],\n );\n // Pass local peer to main grid if no other peer has tiles\n pageList = usePagesWithTiles({\n peers: inputPeers,\n maxTileCount,\n });\n const { ref, pagesWithTiles } = useTileLayout({\n pageList,\n maxTileCount,\n edgeToEdge,\n });\n const [page, setPage] = useState(0);\n const pageSize = pagesWithTiles[0]?.length || 0;\n\n useEffect(() => {\n if (pageSize > 0) {\n onPageSize?.(pageSize);\n }\n }, [pageSize, onPageSize]);\n\n return (\n <Flex direction=\"column\" css={{ flex: '1 1 0', h: '100%', position: 'relative', minWidth: 0 }}>\n <Grid tiles={pagesWithTiles[page]} ref={ref} edgeToEdge={edgeToEdge} />\n {!edgeToEdge && (\n <Pagination\n page={page}\n onPageChange={page => {\n setPage(page);\n onPageChange?.(page);\n }}\n numPages={pagesWithTiles.length}\n />\n )}\n {isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== localPeer?.id && <InsetTile />}\n </Flex>\n );\n}\n", "import React, { useEffect, useRef } from 'react';\nimport Draggable from 'react-draggable';\nimport { useMedia } from 'react-use';\nimport { selectIsAllowedToPublish, selectLocalPeer, selectVideoTrackByID, useHMSStore } from '@100mslive/react-sdk';\nimport { ExpandIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { config as cssConfig } from '../../Theme';\n// @ts-ignore: No implicit Any\nimport IconButton from '../IconButton';\n// @ts-ignore: No implicit Any\nimport { AudioVideoToggle } from './AudioVideoToggle';\n// @ts-ignore: No implicit Any\nimport VideoTile from './VideoTile';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from './AppData/useUISettings';\nimport { useVideoTileContext } from './hooks/useVideoTileLayout';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../common/constants';\n\nconst MinimisedTile = ({ setMinimised }: { setMinimised: (value: boolean) => void }) => {\n return (\n <Flex align=\"center\" css={{ gap: '$6', r: '$1', bg: '$surface_default', p: '$4', color: '$on_surface_high' }}>\n <AudioVideoToggle hideOptions={true} />\n <Text>You</Text>\n <IconButton\n className=\"__cancel-drag-event\"\n onClick={() => setMinimised(false)}\n css={{ bg: 'transparent', border: 'transparent' }}\n >\n <ExpandIcon />\n </IconButton>\n </Flex>\n );\n};\n\nconst insetHeightPx = 180;\nconst insetMaxWidthPx = 240;\nconst defaultMobileAspectRatio = 9 / 16;\nconst desktopAspectRatio = 1 / defaultMobileAspectRatio;\n\nexport const InsetTile = () => {\n const isMobile = useMedia(cssConfig.media.md);\n const isLandscape = useMedia(cssConfig.media.ls);\n const localPeer = useHMSStore(selectLocalPeer);\n const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);\n const videoTrack = useHMSStore(selectVideoTrackByID(localPeer?.videoTrack));\n const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);\n const videoTileProps = useVideoTileContext();\n let aspectRatio = isMobile ? defaultMobileAspectRatio : desktopAspectRatio;\n if (videoTrack?.width && videoTrack?.height && !isMobile) {\n aspectRatio = videoTrack.width / videoTrack.height;\n }\n let height = insetHeightPx;\n let width = height * aspectRatio;\n // Convert to 16/9 in landscape mode with a max width of 240\n if (isLandscape && width > insetMaxWidthPx) {\n width = 240;\n height = width / aspectRatio;\n }\n\n const nodeRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const node = nodeRef.current;\n if (!node || !window.ResizeObserver) {\n return;\n }\n const resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n if (entry.target === node.parentElement) {\n // reset to original position on resize\n node.style.transform = `translate(0,0)`;\n }\n });\n });\n node.parentElement && resizeObserver.observe(node.parentElement);\n return () => {\n node?.parentElement && resizeObserver?.unobserve(node.parentElement);\n resizeObserver?.disconnect();\n };\n }, []);\n\n if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {\n return null;\n }\n\n return (\n <Draggable bounds=\"parent\" nodeRef={nodeRef} cancel=\".__cancel-drag-event\">\n <Box\n ref={nodeRef}\n css={{\n position: 'absolute',\n bottom: 0,\n right: 0,\n zIndex: 11,\n boxShadow: '0 0 8px 0 rgba(0,0,0,0.3)',\n r: '$2',\n ...(!minimised\n ? {\n aspectRatio: aspectRatio,\n h: height,\n }\n : {}),\n }}\n >\n {minimised ? (\n <MinimisedTile setMinimised={setMinimised} />\n ) : (\n <VideoTile\n peerId={localPeer?.id}\n trackid={localPeer?.videoTrack}\n rootCSS={{\n size: '100%',\n padding: 0,\n }}\n width={width}\n height={height}\n containerCSS={{ background: '$surface_default' }}\n canMinimise\n isDragabble\n {...videoTileProps}\n hideParticipantNameOnTile\n />\n )}\n </Box>\n </Draggable>\n );\n};\n", "import React, { Fragment, useCallback, useMemo, useState } from 'react';\nimport { useMeasure, useMedia } from 'react-use';\nimport {\n selectAudioTrackByPeerID,\n selectHasPeerHandRaised,\n selectIsPeerAudioEnabled,\n selectLocalPeerID,\n selectPeerMetadata,\n selectPeerNameByID,\n selectSessionStore,\n selectVideoTrackByID,\n selectVideoTrackByPeerID,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { BrbTileIcon, HandIcon, MicOffIcon } from '@100mslive/react-icons';\nimport TileConnection from './Connection/TileConnection';\nimport TileMenu, { isSameTile } from './TileMenu/TileMenu';\nimport { AudioLevel } from '../../AudioLevel';\nimport { Avatar } from '../../Avatar';\nimport { VideoTileStats } from '../../Stats';\nimport { config as cssConfig } from '../../Theme';\nimport { Video } from '../../Video';\nimport { StyledVideoTile } from '../../VideoTile';\nimport { getVideoTileLabel } from './peerTileUtils';\nimport { useSetAppDataByKey, useUISettings } from './AppData/useUISettings';\nimport { calculateAvatarAndAttribBoxSize } from '../common/utils';\nimport { APP_DATA, SESSION_STORE_KEY, UI_SETTINGS } from '../common/constants';\n\nconst Tile = ({\n peerId,\n trackId,\n width,\n height,\n objectFit = 'cover',\n canMinimise = false,\n isDragabble = false,\n rootCSS = {},\n containerCSS = {},\n enableSpotlightingPeer = true,\n hideParticipantNameOnTile = false,\n roundedVideoTile = true,\n hideAudioMuteOnTile = false,\n hideMetadataOnTile = false,\n}) => {\n const trackSelector = trackId ? selectVideoTrackByID(trackId) : selectVideoTrackByPeerID(peerId);\n const track = useHMSStore(trackSelector);\n const isMobile = useMedia(cssConfig.media.md);\n const peerName = useHMSStore(selectPeerNameByID(peerId));\n const audioTrack = useHMSStore(selectAudioTrackByPeerID(peerId));\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);\n const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);\n const isAudioMuted = !useHMSStore(selectIsPeerAudioEnabled(peerId));\n const isVideoMuted = !track?.enabled;\n const [isMouseHovered, setIsMouseHovered] = useState(false);\n const isVideoDegraded = track?.degraded;\n const isLocal = localPeerID === peerId;\n const [pinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);\n const pinned = isSameTile({\n trackId: pinnedTrackId,\n videoTrackID: track?.id,\n audioTrackID: audioTrack?.id,\n });\n const spotlighted = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT)) === peerId;\n const label = getVideoTileLabel({\n peerName,\n track,\n isLocal,\n });\n const onHoverHandler = useCallback(event => {\n setIsMouseHovered(event.type === 'mouseenter');\n }, []);\n\n const [ref, { width: calculatedWidth, height: calculatedHeight }] = useMeasure();\n\n const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;\n\n const [avatarSize, attribBoxSize] = useMemo(\n () => calculateAvatarAndAttribBoxSize(calculatedWidth, calculatedHeight),\n [calculatedWidth, calculatedHeight],\n );\n\n return (\n <StyledVideoTile.Root\n ref={ref}\n css={{\n width,\n height,\n ...rootCSS,\n }}\n data-testid={`participant_tile_${peerName}`}\n >\n {peerName !== undefined ? (\n <StyledVideoTile.Container\n onMouseEnter={onHoverHandler}\n onMouseLeave={onHoverHandler}\n noRadius={!roundedVideoTile}\n css={containerCSS}\n >\n {showStatsOnTiles && isTileBigEnoughToShowStats ? (\n <VideoTileStats audioTrackID={audioTrack?.id} videoTrackID={track?.id} peerID={peerId} isLocal={isLocal} />\n ) : null}\n\n <Video\n trackId={track?.id}\n attach={isLocal ? undefined : !isAudioOnly}\n mirror={\n mirrorLocalVideo &&\n peerId === localPeerID &&\n track?.source === 'regular' &&\n track?.facingMode !== 'environment'\n }\n noRadius={!roundedVideoTile}\n data-testid=\"participant_video_tile\"\n css={{\n objectFit,\n filter: isVideoDegraded ? 'blur($space$2)' : undefined,\n bg: 'transparent',\n }}\n />\n {calculatedWidth > 0 && calculatedHeight > 0 ? (\n <>\n {isVideoMuted || (!isLocal && isAudioOnly) ? (\n <StyledVideoTile.AvatarContainer>\n <Avatar name={peerName || ''} data-testid=\"participant_avatar_icon\" size={avatarSize} />\n </StyledVideoTile.AvatarContainer>\n ) : null}\n\n {!hideAudioMuteOnTile ? (\n isAudioMuted ? (\n <StyledVideoTile.AudioIndicator data-testid=\"participant_audio_mute_icon\" size={attribBoxSize}>\n <MicOffIcon />\n </StyledVideoTile.AudioIndicator>\n ) : (\n <StyledVideoTile.AudioIndicator size={attribBoxSize}>\n <AudioLevel trackId={audioTrack?.id} size={attribBoxSize} />\n </StyledVideoTile.AudioIndicator>\n )\n ) : null}\n {!hideMetadataOnTile && <PeerMetadata peerId={peerId} size={attribBoxSize} />}\n </>\n ) : null}\n {isMouseHovered || (isDragabble && isMobile) ? (\n <TileMenu\n peerID={peerId}\n audioTrackID={audioTrack?.id}\n videoTrackID={track?.id}\n canMinimise={canMinimise}\n enableSpotlightingPeer={enableSpotlightingPeer}\n />\n ) : null}\n\n <TileConnection\n hideLabel={hideParticipantNameOnTile}\n name={label}\n isTile\n peerId={peerId}\n width={width}\n pinned={pinned}\n spotlighted={spotlighted}\n />\n </StyledVideoTile.Container>\n ) : null}\n </StyledVideoTile.Root>\n );\n};\n\nconst PeerMetadata = ({ peerId, size }) => {\n const metaData = useHMSStore(selectPeerMetadata(peerId));\n const isBRB = metaData?.isBRBOn || false;\n const isHandRaised = useHMSStore(selectHasPeerHandRaised(peerId));\n\n return (\n <Fragment>\n {isHandRaised ? (\n <StyledVideoTile.AttributeBox size={size} data-testid=\"raiseHand_icon_onTile\">\n <HandIcon width={24} height={24} />\n </StyledVideoTile.AttributeBox>\n ) : null}\n {isBRB ? (\n <StyledVideoTile.AttributeBox size={size} data-testid=\"brb_icon_onTile\">\n <BrbTileIcon width={22} height={22} />\n </StyledVideoTile.AttributeBox>\n ) : null}\n </Fragment>\n );\n};\n\nconst VideoTile = React.memo(Tile);\n\nexport default VideoTile;\n", "import React, { useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectLocalPeerID,\n selectPeerByID,\n selectPermissions,\n selectTrackByID,\n selectVideoTrackByPeerID,\n useHMSStore,\n useRemoteAVToggle,\n} from '@100mslive/react-sdk';\nimport { CrossIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport { config as cssConfig, useTheme } from '../../../Theme';\nimport { StyledMenuTile } from '../../../TileMenu';\nimport { ChangeNameModal } from '../MoreSettings/ChangeNameModal';\nimport { TileMenuContent } from './TileMenuContent';\nimport { useDropdownList } from '../hooks/useDropdownList';\n\n/**\n * Taking peerID as peer won't necesarilly have tracks\n */\nconst TileMenu = ({\n audioTrackID,\n videoTrackID,\n peerID,\n isScreenshare = false,\n canMinimise,\n enableSpotlightingPeer = true,\n}) => {\n const [open, setOpen] = useState(false);\n const { theme } = useTheme();\n\n const localPeerID = useHMSStore(selectLocalPeerID);\n const isLocal = localPeerID === peerID;\n const { removeOthers } = useHMSStore(selectPermissions);\n const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle(audioTrackID, videoTrackID);\n const showSpotlight = enableSpotlightingPeer;\n\n const isPrimaryVideoTrack = useHMSStore(selectVideoTrackByPeerID(peerID))?.id === videoTrackID;\n const showPinAction = audioTrackID || (videoTrackID && isPrimaryVideoTrack);\n\n const track = useHMSStore(selectTrackByID(videoTrackID));\n const hideSimulcastLayers = !track?.layerDefinitions?.length || track.degraded || !track.enabled;\n const isMobile = useMedia(cssConfig.media.md);\n const peer = useHMSStore(selectPeerByID(peerID));\n const [showNameChangeModal, setShowNameChangeModal] = useState(false);\n useDropdownList({ open, name: 'TileMenu' });\n\n if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {\n return null;\n }\n\n const openNameChangeModal = () => setShowNameChangeModal(true);\n\n const props = {\n isLocal,\n isScreenshare,\n audioTrackID,\n videoTrackID,\n peerID,\n isPrimaryVideoTrack,\n showSpotlight,\n showPinAction,\n canMinimise,\n openNameChangeModal,\n };\n\n return (\n <>\n <StyledMenuTile.Root open={open} onOpenChange={setOpen}>\n <StyledMenuTile.Trigger\n data-testid=\"participant_menu_btn\"\n css={{ bg: `${theme.colors.background_dim.value}A3`, p: '$2', w: 'unset', h: 'unset' }}\n onClick={e => e.stopPropagation()}\n className={isMobile ? '__cancel-drag-event' : ''}\n >\n <VerticalMenuIcon width={20} height={20} />\n </StyledMenuTile.Trigger>\n\n {isMobile ? (\n <Sheet.Root open={open} onOpenChange={setOpen}>\n <Sheet.Content css={{ bg: '$surface_dim', pt: '$8' }}>\n <Flex\n css={{\n color: '$on_surface_high',\n display: 'flex',\n w: '100%',\n justifyContent: 'space-between',\n alignItems: 'center',\n px: '$10',\n pb: '$8',\n borderBottom: '1px solid $border_default',\n }}\n >\n <Box>\n <Text css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n {peer.name}\n {isLocal ? ` (You)` : null}\n </Text>\n {peer?.roleName ? (\n <Text variant=\"xs\" css={{ color: '$on_surface_low', mt: '$2' }}>\n {peer.roleName}\n </Text>\n ) : null}\n </Box>\n\n <Sheet.Close css={{ color: 'inherit' }}>\n <CrossIcon />\n </Sheet.Close>\n </Flex>\n <Box css={{ px: '$8', pb: '$8', maxHeight: '80vh', overflowY: 'auto' }}>\n <TileMenuContent {...props} closeSheetOnClick={() => setOpen(false)} />\n </Box>\n </Sheet.Content>\n </Sheet.Root>\n ) : (\n <StyledMenuTile.Content side=\"top\" align=\"end\" css={{ maxHeight: '$80', overflowY: 'auto' }}>\n <TileMenuContent {...props} />\n </StyledMenuTile.Content>\n )}\n </StyledMenuTile.Root>\n {showNameChangeModal && <ChangeNameModal onOpenChange={setShowNameChangeModal} />}\n </>\n );\n};\n\nexport { isSameTile } from './TileMenuContent';\n\nexport default TileMenu;\n", "import React, { Fragment } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectPermissions,\n selectSessionStore,\n selectTrackByID,\n useCustomEvent,\n useHMSActions,\n useHMSStore,\n useRemoteAVToggle,\n} from '@100mslive/react-sdk';\nimport {\n MicOffIcon,\n MicOnIcon,\n PencilIcon,\n PinIcon,\n RemoveUserIcon,\n ShareScreenIcon,\n ShrinkIcon,\n SpeakerIcon,\n StarIcon,\n VideoOffIcon,\n VideoOnIcon,\n} from '@100mslive/react-icons';\nimport { Box, Flex } from '../../../Layout';\nimport { Slider } from '../../../Slider';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { StyledMenuTile } from '../../../TileMenu';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\nimport { useDropdownSelection } from '../hooks/useDropdownSelection';\nimport { APP_DATA, REMOTE_STOP_SCREENSHARE_TYPE, SESSION_STORE_KEY } from '../../common/constants';\n\nexport const isSameTile = ({ trackId, videoTrackID, audioTrackID }) =>\n trackId && ((videoTrackID && videoTrackID === trackId) || (audioTrackID && audioTrackID === trackId));\n\nconst spacingCSS = { '@md': { my: '$8', fontWeight: '$semiBold', fontSize: 'sm' } };\n\nconst SpotlightActions = ({\n peerId,\n onSpotLightClick = () => {\n return;\n },\n}) => {\n const hmsActions = useHMSActions();\n const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT));\n const isTileSpotlighted = spotlightPeerId === peerId;\n\n const setSpotlightPeerId = peer =>\n hmsActions.sessionStore\n .set(SESSION_STORE_KEY.SPOTLIGHT, peer)\n .catch(err => ToastManager.addToast({ title: err.description }));\n\n return (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n if (isTileSpotlighted) {\n setSpotlightPeerId();\n } else {\n setSpotlightPeerId(peerId);\n }\n onSpotLightClick();\n }}\n >\n <StarIcon height={20} width={20} />\n <span>{isTileSpotlighted ? 'Remove from Spotlight' : 'Spotlight Tile for everyone'}</span>\n </StyledMenuTile.ItemButton>\n );\n};\n\nconst PinActions = ({ audioTrackID, videoTrackID }) => {\n const [pinnedTrackId, setPinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);\n\n const isTilePinned = isSameTile({\n trackId: pinnedTrackId,\n videoTrackID,\n audioTrackID,\n });\n\n return (\n <>\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => (isTilePinned ? setPinnedTrackId() : setPinnedTrackId(videoTrackID || audioTrackID))}\n >\n <PinIcon height={20} width={20} />\n <span>{isTilePinned ? 'Unpin' : 'Pin'} Tile for myself</span>\n </StyledMenuTile.ItemButton>\n </>\n );\n};\n\nconst MinimiseInset = () => {\n const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);\n\n return (\n <>\n <StyledMenuTile.ItemButton css={spacingCSS} onClick={() => setMinimised(!minimised)}>\n <ShrinkIcon height={20} width={20} />\n <span>{minimised ? 'Show' : 'Minimise'} your video</span>\n </StyledMenuTile.ItemButton>\n </>\n );\n};\n\nconst SimulcastLayers = ({ trackId }) => {\n const track = useHMSStore(selectTrackByID(trackId));\n const actions = useHMSActions();\n const bg = useDropdownSelection();\n if (!track?.layerDefinitions?.length || track.degraded || !track.enabled) {\n return null;\n }\n const currentLayer = track.layerDefinitions.find(layer => layer.layer === track.layer);\n return (\n <Fragment>\n <StyledMenuTile.ItemButton css={{ color: '$on_surface_medium', cursor: 'default' }}>\n Select maximum resolution\n </StyledMenuTile.ItemButton>\n {track.layerDefinitions.map(layer => {\n return (\n <StyledMenuTile.ItemButton\n key={layer.layer}\n onClick={async () => {\n await actions.setPreferredLayer(trackId, layer.layer);\n }}\n css={{\n justifyContent: 'space-between',\n bg: track.preferredLayer === layer.layer ? bg : undefined,\n '&:hover': {\n bg: track.preferredLayer === layer.layer ? bg : undefined,\n },\n }}\n >\n <Text\n as=\"span\"\n css={{\n textTransform: 'capitalize',\n mr: '$2',\n fontWeight: track.preferredLayer === layer.layer ? '$semiBold' : '$regular',\n color: track.preferredLayer === layer.layer ? '$on_primary_high' : '$on_surface_high',\n }}\n >\n {layer.layer}\n </Text>\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n color: track.preferredLayer === layer.layer ? '$on_primary_high' : '$on_surface_high',\n }}\n >\n {layer.resolution.width}x{layer.resolution.height}\n </Text>\n </StyledMenuTile.ItemButton>\n );\n })}\n <StyledMenuTile.ItemButton>\n <Text as=\"span\" variant=\"xs\" css={{ color: '$on_surface_medium' }}>\n Currently streaming:\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n fontWeight: '$semiBold',\n textTransform: 'capitalize',\n color: '$on_surface_medium',\n ml: '$2',\n }}\n >\n {currentLayer ? (\n <>\n {track.layer} ({currentLayer.resolution.width}x{currentLayer.resolution.height})\n </>\n ) : (\n '-'\n )}\n </Text>\n </Text>\n </StyledMenuTile.ItemButton>\n </Fragment>\n );\n};\n\nexport const TileMenuContent = props => {\n const actions = useHMSActions();\n const { removeOthers } = useHMSStore(selectPermissions);\n const {\n videoTrackID,\n audioTrackID,\n isLocal,\n isScreenshare,\n showSpotlight,\n showPinAction,\n peerID,\n canMinimise,\n closeSheetOnClick = () => {\n return;\n },\n openNameChangeModal = () => {\n return;\n },\n } = props;\n\n const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(\n audioTrackID,\n videoTrackID,\n );\n\n const { sendEvent } = useCustomEvent({\n type: REMOTE_STOP_SCREENSHARE_TYPE,\n });\n\n const isMobile = useMedia(cssConfig.media.md);\n\n return isLocal ? (\n (showPinAction || canMinimise) && (\n <>\n {showPinAction && <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />}\n {showSpotlight && <SpotlightActions peerId={peerID} onSpotLightClick={() => closeSheetOnClick()} />}\n {canMinimise && <MinimiseInset />}\n <StyledMenuTile.ItemButton\n onClick={() => {\n openNameChangeModal();\n closeSheetOnClick();\n }}\n >\n <PencilIcon height={20} width={20} />\n <Text variant=\"sm\" css={{ '@md': { fontWeight: '$semiBold' }, c: '$on_surface_high' }}>\n Change Name\n </Text>\n </StyledMenuTile.ItemButton>\n </>\n )\n ) : (\n <>\n {toggleVideo ? (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n toggleVideo();\n closeSheetOnClick();\n }}\n data-testid={isVideoEnabled ? 'mute_video_participant_btn' : 'unmute_video_participant_btn'}\n >\n {isVideoEnabled ? <VideoOnIcon height={20} width={20} /> : <VideoOffIcon height={20} width={20} />}\n <span>{isVideoEnabled ? 'Mute' : 'Request Unmute'}</span>\n </StyledMenuTile.ItemButton>\n ) : null}\n\n {toggleAudio ? (\n <StyledMenuTile.ItemButton\n css={spacingCSS}\n onClick={() => {\n toggleAudio();\n closeSheetOnClick();\n }}\n data-testid={isVideoEnabled ? 'mute_audio_participant_btn' : 'unmute_audio_participant_btn'}\n >\n {isAudioEnabled ? <MicOnIcon height={20} width={20} /> : <MicOffIcon height={20} width={20} />}\n <span>{isAudioEnabled ? 'Mute' : 'Request Unmute'}</span>\n </StyledMenuTile.ItemButton>\n ) : null}\n\n {audioTrackID ? (\n <StyledMenuTile.VolumeItem data-testid=\"participant_volume_slider\" css={{ ...spacingCSS, mb: '$0' }}>\n <Flex align=\"center\" gap={1}>\n <SpeakerIcon height={20} width={20} />\n <Box as=\"span\" css={{ ml: '$4' }}>\n Volume ({volume})\n </Box>\n </Flex>\n <Slider css={{ my: '0.5rem' }} step={5} value={[volume]} onValueChange={e => setVolume(e[0])} />\n </StyledMenuTile.VolumeItem>\n ) : null}\n\n {showPinAction && (\n <>\n <PinActions audioTrackID={audioTrackID} videoTrackID={videoTrackID} />\n {showSpotlight && <SpotlightActions peerId={peerID} onSpotLightClick={() => closeSheetOnClick()} />}\n </>\n )}\n\n {isMobile ? null : <SimulcastLayers trackId={videoTrackID} />}\n\n {removeOthers ? (\n <StyledMenuTile.RemoveItem\n css={{ ...spacingCSS, borderTop: 'none' }}\n onClick={async () => {\n try {\n await actions.removePeer(peerID, '');\n } catch (error) {\n // TODO: Toast here\n }\n closeSheetOnClick();\n }}\n data-testid=\"remove_participant_btn\"\n >\n <RemoveUserIcon height={20} width={20} />\n <span>Remove Participant</span>\n </StyledMenuTile.RemoveItem>\n ) : null}\n\n {removeOthers && isScreenshare ? (\n <StyledMenuTile.RemoveItem\n onClick={() => {\n sendEvent({});\n closeSheetOnClick();\n }}\n css={spacingCSS}\n >\n <ShareScreenIcon height={20} width={20} />\n <span>Stop Screenshare</span>\n </StyledMenuTile.RemoveItem>\n ) : null}\n </>\n );\n};\n", "const PEER_NAME_PLACEHOLDER = 'peerName';\nconst labelMap = new Map([\n [[true, 'screen'].toString(), 'Your Screen'],\n [[true, 'regular'].toString(), `You (${PEER_NAME_PLACEHOLDER})`],\n [[false, 'screen'].toString(), `${PEER_NAME_PLACEHOLDER}'s Screen`],\n [[false, 'regular'].toString(), PEER_NAME_PLACEHOLDER],\n [[true, undefined].toString(), `You (${PEER_NAME_PLACEHOLDER})`],\n [[false, undefined].toString(), `${PEER_NAME_PLACEHOLDER}`],\n]);\n\nexport const getVideoTileLabel = ({ peerName, isLocal, track }) => {\n const isPeerPresent = peerName !== undefined;\n if (!isPeerPresent || !track) {\n // for peers with only audio track\n return isPeerPresent ? labelMap.get([isLocal, undefined].toString()).replace(PEER_NAME_PLACEHOLDER, peerName) : '';\n }\n const isLocallyMuted = track.volume === 0;\n // Map [isLocal, videoSource] to the label to be displayed.\n let label = labelMap.get([isLocal, track.source].toString());\n if (label) {\n label = label.replace(PEER_NAME_PLACEHOLDER, peerName);\n } else {\n label = `${peerName} ${track.source}`;\n }\n // label = `${label}${track.degraded ? '(Degraded)' : ''}`;\n return `${label}${isLocallyMuted ? ' (Muted for you)' : ''}`;\n};\n", "import React, { useContext } from 'react';\n\ntype TileContextType = {\n enableSpotlightingPeer: boolean;\n hideParticipantNameOnTile?: boolean;\n roundedVideoTile?: boolean;\n hideAudioMuteOnTile?: boolean;\n hideAudioLevelOnTile?: boolean;\n objectFit?: 'cover' | 'contain';\n hideMetadataOnTile?: boolean;\n};\n\nexport const VideoTileContext = React.createContext<TileContextType>({\n enableSpotlightingPeer: true,\n hideParticipantNameOnTile: false,\n roundedVideoTile: true,\n hideAudioMuteOnTile: false,\n hideAudioLevelOnTile: false,\n objectFit: 'contain',\n hideMetadataOnTile: false,\n});\n\nexport const useVideoTileContext = () => {\n const context = useContext(VideoTileContext);\n return context;\n};\n", "import React, { useEffect } from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@100mslive/react-icons';\nimport { StyledPagination } from '../../Pagination';\n\nexport const Pagination = ({\n page,\n onPageChange,\n numPages,\n}: {\n page: number;\n onPageChange: (page: number) => void;\n numPages: number;\n}) => {\n const disableLeft = page === 0;\n const disableRight = page === numPages - 1;\n const nextPage = (e: React.SyntheticEvent) => {\n e.stopPropagation();\n onPageChange(Math.min(page + 1, numPages - 1));\n };\n const prevPage = (e: React.SyntheticEvent) => {\n e.stopPropagation();\n onPageChange(Math.max(page - 1, 0));\n };\n\n useEffect(() => {\n // currentPageIndex should not exceed pages length\n if (page >= numPages) {\n onPageChange(Math.max(0, numPages - 1));\n }\n }, [numPages, onPageChange, page]);\n\n if (numPages <= 1) {\n return null;\n }\n\n return (\n <StyledPagination.Root css={{ flexShrink: 0 }}>\n <StyledPagination.Chevron disabled={disableLeft} onClick={prevPage}>\n <ChevronLeftIcon width={16} height={16} style={{ cursor: disableLeft ? 'not-allowed' : 'pointer' }} />\n </StyledPagination.Chevron>\n {numPages <= 5 ? (\n <StyledPagination.Dots>\n {[...Array(numPages)].map((_, i) => (\n <StyledPagination.Dot\n key={i}\n active={page === i}\n onClick={e => {\n e.stopPropagation();\n onPageChange(i);\n }}\n />\n ))}\n </StyledPagination.Dots>\n ) : null}\n <StyledPagination.Chevron disabled={disableRight} onClick={nextPage}>\n <ChevronRightIcon width={16} height={16} style={{ cursor: disableRight ? 'not-allowed' : 'pointer' }} />\n </StyledPagination.Chevron>\n </StyledPagination.Root>\n );\n};\n", "import React from 'react';\nimport { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';\nimport { Box } from '../../../Layout';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../VideoTile';\nimport { useVideoTileContext } from '../hooks/useVideoTileLayout';\n\nexport const Grid = React.forwardRef<HTMLDivElement, { tiles: TrackWithPeerAndDimensions[]; edgeToEdge?: boolean }>(\n ({ tiles, edgeToEdge }, ref) => {\n const videoTileProps = useVideoTileContext();\n return (\n <Box\n ref={ref}\n css={{\n flex: '1 1 0',\n gap: '$4',\n display: 'flex',\n placeContent: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n flexFlow: 'row wrap',\n minHeight: 0,\n '@md': { gap: edgeToEdge ? 0 : '$4' },\n }}\n >\n {tiles?.map(tile => {\n return (\n <VideoTile\n key={tile.track?.id || tile.peer?.id}\n width={tile.width}\n height={tile.height}\n peerId={tile.peer?.id}\n trackId={tile.track?.id}\n rootCSS={{ padding: 0 }}\n objectFit=\"contain\"\n {...videoTileProps}\n />\n );\n })}\n </Box>\n );\n },\n);\n", "import { useEffect, useMemo, useState } from 'react';\nimport { useMeasure, useMedia } from 'react-use';\nimport {\n getPeersWithTiles,\n HMSPeer,\n selectTracksMap,\n TrackWithPeerAndDimensions,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\n\nconst aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4, 9 / 16] };\n\nexport const usePagesWithTiles = ({ peers, maxTileCount }: { peers: HMSPeer[]; maxTileCount: number }) => {\n const vanillaStore = useHMSVanillaStore();\n const tracksMap = vanillaStore.getState(selectTracksMap);\n const peersWithTiles = useMemo(\n () => getPeersWithTiles(peers, tracksMap, () => false) as TrackWithPeerAndDimensions[],\n [peers, tracksMap],\n );\n const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);\n const pagesList = useMemo(() => {\n let sliceStart = 0;\n let remaining = peersWithTiles.length;\n const list = [];\n // split into pages\n for (let i = 0; i < noOfPages; i++) {\n const count = Math.min(remaining, maxTileCount);\n list.push(peersWithTiles.slice(sliceStart, sliceStart + count));\n remaining = remaining - count;\n sliceStart += count;\n }\n return list;\n }, [peersWithTiles, noOfPages, maxTileCount]);\n return pagesList;\n};\n\nexport const useTileLayout = ({\n pageList,\n maxTileCount,\n edgeToEdge = false,\n}: {\n pageList: TrackWithPeerAndDimensions[][];\n maxTileCount: number;\n edgeToEdge?: boolean;\n}) => {\n const vanillaStore = useHMSVanillaStore();\n const [ref, { width, height }] = useMeasure<HTMLDivElement>();\n const isMobile = useMedia(cssConfig.media.lg);\n const [pagesWithTiles, setPagesWithTiles] = useState<TrackWithPeerAndDimensions[][]>([]);\n\n useEffect(() => {\n if (width === 0 || height === 0) {\n return;\n }\n // calculate dimesions for each page\n for (const page of pageList) {\n const noOfTilesInPage = page.length;\n let maxCols =\n noOfTilesInPage > 2 && noOfTilesInPage < 9\n ? Math.ceil(noOfTilesInPage / 2)\n : Math.ceil(Math.sqrt(noOfTilesInPage));\n if (isMobile) {\n maxCols = noOfTilesInPage < 4 ? 1 : Math.min(maxCols, 2);\n }\n const maxRows = Math.ceil(noOfTilesInPage / maxCols);\n let index = 0;\n // convert the current page to a matrix(grid)\n const matrix = new Array(maxRows).fill(null).map((_, i) => {\n const numCols = Math.min(maxCols, noOfTilesInPage - i * maxCols);\n const rowElements = [];\n for (let j = 0; j < numCols; j++) {\n if (index < page.length) {\n rowElements.push(page[index++]);\n }\n }\n return rowElements;\n });\n\n const gap = edgeToEdge && isMobile ? 0 : 8; // gap between flex items\n const maxHeight = height - (maxRows - 1) * gap;\n const maxRowHeight = maxHeight / matrix.length;\n const aspectRatios =\n isMobile && (noOfTilesInPage === 1 || noOfTilesInPage > 3)\n ? aspectRatioConfig.mobile\n : aspectRatioConfig.default;\n // calculate height and width of each tile in a row\n for (const row of matrix) {\n let tileWidth = (width - (row.length - 1) * gap) / row.length;\n let tileHeight = 0;\n if (edgeToEdge) {\n tileHeight = maxRowHeight;\n } else {\n const calcHeights = aspectRatios.map(aR => tileWidth / aR);\n for (const h of calcHeights) {\n if (h < maxRowHeight) {\n if (tileHeight < h) {\n tileHeight = h;\n }\n }\n }\n\n // tileHeight is not calculated as it could be exceeding the max possible height\n // find the max possible width instead\n if (tileHeight === 0) {\n tileHeight = maxRowHeight;\n const calcWidths = aspectRatios.map(aR => tileHeight * aR);\n tileWidth = 0;\n for (const w of calcWidths) {\n if (w < width) {\n if (tileWidth < w) {\n tileWidth = w;\n }\n }\n }\n }\n }\n for (let i = 0; i < row.length; i++) {\n row[i].width = tileWidth;\n row[i].height = tileHeight;\n }\n }\n }\n setPagesWithTiles([...pageList]);\n }, [width, height, maxTileCount, pageList, vanillaStore, isMobile, edgeToEdge]);\n return { pagesWithTiles, ref };\n};\n", "import React, { useEffect, useState } from 'react';\nimport { selectLocalPeer, useHMSStore } from '@100mslive/react-sdk';\nimport { InsetTile } from '../InsetTile';\nimport { Pagination } from '../Pagination';\nimport { SecondaryTiles } from '../SecondaryTiles';\nimport { Grid } from './Grid';\nimport { LayoutProps } from './interface';\nimport { ProminenceLayout } from './ProminenceLayout';\nimport { useRoleProminencePeers } from '../hooks/useRoleProminencePeers';\nimport { usePagesWithTiles, useTileLayout } from '../hooks/useTileLayout';\n\nexport function RoleProminence({\n isInsetEnabled = false,\n prominentRoles = [],\n peers,\n onPageChange,\n onPageSize,\n edgeToEdge,\n}: LayoutProps) {\n const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);\n const localPeer = useHMSStore(selectLocalPeer);\n const maxTileCount = 4;\n const pageList = usePagesWithTiles({\n peers: prominentPeers,\n maxTileCount,\n });\n const { ref, pagesWithTiles } = useTileLayout({\n pageList,\n maxTileCount,\n });\n const [page, setPage] = useState(0);\n const pageSize = pagesWithTiles[0]?.length || 0;\n\n useEffect(() => {\n if (pageSize > 0) {\n onPageSize?.(pageSize);\n }\n }, [pageSize, onPageSize]);\n\n return (\n <ProminenceLayout.Root>\n <ProminenceLayout.ProminentSection>\n <Grid ref={ref} tiles={pagesWithTiles[page]} />\n </ProminenceLayout.ProminentSection>\n {!edgeToEdge && (\n <Pagination\n page={page}\n onPageChange={page => {\n setPage(page);\n onPageChange?.(page);\n }}\n numPages={pagesWithTiles.length}\n />\n )}\n <SecondaryTiles peers={secondaryPeers} isInsetEnabled={isInsetEnabled} edgeToEdge={edgeToEdge} />\n {isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && <InsetTile />}\n </ProminenceLayout.Root>\n );\n}\n", "import React, { useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { LayoutProps } from './VideoLayouts/interface';\nimport { ProminenceLayout } from './VideoLayouts/ProminenceLayout';\nimport { config as cssConfig } from '../../Theme';\nimport { Pagination } from './Pagination';\nimport { usePagesWithTiles } from './hooks/useTileLayout';\n\nexport const SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }: LayoutProps) => {\n const isMobile = useMedia(cssConfig.media.md);\n const maxTileCount = isMobile ? 2 : 4;\n const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });\n const [page, setPage] = useState(0);\n const pageSize = pagesWithTiles[0]?.length || 0;\n\n useEffect(() => {\n if (pageSize > 0) {\n onPageSize?.(pageSize);\n }\n }, [pageSize, onPageSize]);\n\n return (\n <ProminenceLayout.SecondarySection tiles={pagesWithTiles[page]} edgeToEdge={edgeToEdge}>\n {!edgeToEdge && (\n <Pagination\n page={page}\n onPageChange={page => {\n setPage(page);\n onPageChange?.(page);\n }}\n numPages={pagesWithTiles.length}\n />\n )}\n </ProminenceLayout.SecondarySection>\n );\n};\n", "import React from 'react';\nimport { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';\nimport { Box, Flex } from '../../../Layout';\nimport { CSS } from '../../../Theme';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../VideoTile';\nimport { useVideoTileContext } from '../hooks/useVideoTileLayout';\n\nconst Root = ({ children, edgeToEdge }: React.PropsWithChildren<{ edgeToEdge?: boolean }>) => (\n <Flex\n direction=\"column\"\n css={{ h: '100%', flex: '1 1 0', minWidth: 0, gap: '$6', '@md': { gap: edgeToEdge ? 0 : '$6' } }}\n >\n {children}\n </Flex>\n);\n\nconst ProminentSection = ({ children, css = {} }: React.PropsWithChildren<{ css?: CSS }>) => {\n return (\n <Flex direction=\"column\" css={{ flex: '1 1 0', gap: '$2', minHeight: 0, ...css }}>\n {children}\n </Flex>\n );\n};\n\nconst SecondarySection = ({\n tiles,\n children,\n edgeToEdge,\n}: React.PropsWithChildren<{ tiles: TrackWithPeerAndDimensions[]; edgeToEdge?: boolean }>) => {\n const tileLayoutProps = useVideoTileContext();\n if (!tiles?.length) {\n return null;\n }\n return (\n <Box\n css={{\n display: 'grid',\n gridTemplateRows: React.Children.count(children) > 0 ? '136px auto' : '154px',\n gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`,\n margin: '0 auto',\n gap: '$2 $4',\n placeItems: 'center',\n '@md': { gap: edgeToEdge ? 0 : '$4' },\n }}\n >\n {tiles.map(tile => {\n return (\n <VideoTile\n key={tile.track?.id || tile.peer?.id}\n peerId={tile.peer?.id}\n trackId={tile.track?.id}\n rootCSS={{\n padding: 0,\n maxWidth: 240,\n maxHeight: '100%',\n aspectRatio: 16 / 9,\n '@md': { aspectRatio: 1 },\n }}\n objectFit=\"contain\"\n {...tileLayoutProps}\n />\n );\n })}\n <Box css={{ gridColumn: `1/span ${tiles.length}` }}>{children}</Box>\n </Box>\n );\n};\n\nexport const ProminenceLayout = {\n Root,\n ProminentSection,\n SecondarySection,\n};\n", "import { useMemo } from 'react';\nimport { HMSPeer } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { usePinnedTrack } from '../AppData/useUISettings';\n\nexport const useRoleProminencePeers = (prominentRoles: string[], peers: HMSPeer[], isInsetEnabled: boolean) => {\n const pinnedTrack = usePinnedTrack();\n\n const [prominentPeers, secondaryPeers] = useMemo(() => {\n return peers.reduce<[HMSPeer[], HMSPeer[]]>(\n (acc, peer) => {\n if (pinnedTrack) {\n if (pinnedTrack.peerId === peer.id) {\n acc[0].push(peer);\n } else if (!(isInsetEnabled && peer.isLocal)) {\n acc[1].push(peer);\n }\n return acc;\n }\n if (peer.isLocal && isInsetEnabled) {\n return acc;\n }\n if (prominentRoles?.includes(peer.roleName || '')) {\n acc[0].push(peer);\n } else {\n acc[1].push(peer);\n }\n return acc;\n },\n [[], []],\n );\n }, [peers, isInsetEnabled, prominentRoles, pinnedTrack]);\n\n return {\n prominentPeers,\n secondaryPeers,\n };\n};\n", "import React, { useEffect, useMemo, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { selectPeersScreenSharing, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig } from '../../../Theme';\nimport { Pagination } from '../Pagination';\n// @ts-ignore: No implicit Any\nimport ScreenshareTile from '../ScreenshareTile';\nimport { SecondaryTiles } from '../SecondaryTiles';\nimport { LayoutProps } from './interface';\nimport { ProminenceLayout } from './ProminenceLayout';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../../common/constants';\n\nexport const ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }: LayoutProps) => {\n const peersSharing = useHMSStore(selectPeersScreenSharing);\n const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);\n const [page, setPage] = useState(0);\n const activeSharePeer = peersSharing[page];\n const isMobile = useMedia(cssConfig.media.md);\n const secondaryPeers = useMemo(() => {\n if (isMobile) {\n return activeSharePeer\n ? [activeSharePeer, ...peers.filter(p => p.id !== activeSharePeer?.id)] //keep active sharing peer as first tile\n : peers;\n }\n return peers.filter(p => p.id !== activeSharePeer?.id);\n }, [activeSharePeer, peers, isMobile]);\n useEffect(() => {\n setActiveScreenSharePeer(isMobile ? '' : activeSharePeer?.id);\n return () => {\n setActiveScreenSharePeer('');\n };\n }, [activeSharePeer?.id, isMobile, setActiveScreenSharePeer]);\n\n return (\n <ProminenceLayout.Root edgeToEdge={edgeToEdge}>\n <ProminenceLayout.ProminentSection>\n <ScreenshareTile peerId={peersSharing[page]?.id} />\n {!edgeToEdge && <Pagination page={page} onPageChange={setPage} numPages={peersSharing.length} />}\n </ProminenceLayout.ProminentSection>\n <SecondaryTiles\n peers={secondaryPeers}\n onPageChange={onPageChange}\n onPageSize={onPageSize}\n edgeToEdge={edgeToEdge}\n />\n </ProminenceLayout.Root>\n );\n};\n", "import React, { useRef, useState } from 'react';\nimport { useFullscreen } from 'react-use';\nimport screenfull from 'screenfull';\nimport {\n selectLocalPeerID,\n selectPeerByID,\n selectScreenShareAudioByPeerID,\n selectScreenShareByPeerID,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { ExpandIcon, ShrinkIcon } from '@100mslive/react-icons';\nimport TileMenu from './TileMenu/TileMenu';\nimport { VideoTileStats } from '../../Stats';\nimport { Video } from '../../Video';\nimport { StyledVideoTile } from '../../VideoTile';\nimport { getVideoTileLabel } from './peerTileUtils';\nimport { ScreenshareDisplay } from './ScreenshareDisplay';\nimport { useUISettings } from './AppData/useUISettings';\nimport { UI_SETTINGS } from '../common/constants';\n\nconst labelStyles = {\n position: 'unset',\n width: '100%',\n textAlign: 'center',\n c: '$on_surface_high',\n transform: 'none',\n flexShrink: 0,\n};\n\nconst Tile = ({ peerId, width = '100%', height = '100%' }) => {\n const isLocal = useHMSStore(selectLocalPeerID) === peerId;\n const track = useHMSStore(selectScreenShareByPeerID(peerId));\n const peer = useHMSStore(selectPeerByID(peerId));\n const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);\n const [isMouseHovered, setIsMouseHovered] = useState(false);\n const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);\n const fullscreenRef = useRef(null);\n // fullscreen is for desired state\n const [fullscreen, setFullscreen] = useState(false);\n // isFullscreen is for true state\n const isFullscreen = useFullscreen(fullscreenRef, fullscreen, {\n onClose: () => setFullscreen(false),\n });\n const isFullScreenSupported = screenfull.isEnabled;\n const audioTrack = useHMSStore(selectScreenShareAudioByPeerID(peer?.id));\n\n if (isLocal && !['browser', 'window', 'application'].includes(track?.displaySurface)) {\n return <ScreenshareDisplay />;\n }\n\n if (!peer) {\n return null;\n }\n\n const label = getVideoTileLabel({\n peerName: peer?.name,\n isLocal: false,\n track,\n });\n\n return (\n <StyledVideoTile.Root css={{ width, height, p: 0, minHeight: 0 }} data-testid=\"screenshare_tile\">\n <StyledVideoTile.Container\n transparentBg\n ref={fullscreenRef}\n css={{ flexDirection: 'column', gap: '$2' }}\n onMouseEnter={() => setIsMouseHovered(true)}\n onMouseLeave={() => {\n setIsMouseHovered(false);\n }}\n >\n {showStatsOnTiles ? (\n <VideoTileStats audioTrackID={audioTrack?.id} videoTrackID={track?.id} peerID={peerId} isLocal={isLocal} />\n ) : null}\n {isFullScreenSupported && isMouseHovered ? (\n <StyledVideoTile.FullScreenButton onClick={() => setFullscreen(!fullscreen)}>\n {isFullscreen ? <ShrinkIcon /> : <ExpandIcon />}\n </StyledVideoTile.FullScreenButton>\n ) : null}\n {track ? (\n <Video\n screenShare={true}\n mirror={peer.isLocal && track?.source === 'regular'}\n attach={!isAudioOnly}\n trackId={track.id}\n css={{ minHeight: 0 }}\n />\n ) : null}\n <StyledVideoTile.Info css={labelStyles}>{label}</StyledVideoTile.Info>\n {isMouseHovered && !peer.isLocal ? (\n <TileMenu\n isScreenshare\n peerID={peer.id}\n audioTrackID={audioTrack?.id}\n videoTrackID={track?.id}\n enableSpotlightingPeer={false}\n />\n ) : null}\n </StyledVideoTile.Container>\n </StyledVideoTile.Root>\n );\n};\n\nconst ScreenshareTile = React.memo(Tile);\n\nexport default ScreenshareTile;\n", "import React from 'react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { CrossIcon, ShareScreenIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Flex } from '../../Layout';\nimport { Text } from '../../Text';\n\nexport const ScreenshareDisplay = () => {\n const hmsActions = useHMSActions();\n\n return (\n <Flex\n direction=\"column\"\n align=\"center\"\n justify=\"center\"\n css={{\n size: '100%',\n bg: '$background_default',\n color: '$on_surface_high',\n }}\n >\n <ShareScreenIcon width={48} height={48} />\n <Text variant=\"h5\" css={{ m: '$8 0' }}>\n You are sharing your screen\n </Text>\n <Button\n variant=\"danger\"\n css={{ fontWeight: '$semiBold' }}\n onClick={async () => {\n await hmsActions.setScreenShareEnabled(false);\n }}\n data-testid=\"stop_screen_share_btn\"\n >\n <CrossIcon width={18} height={18} />\n &nbsp; Stop screen share\n </Button>\n </Flex>\n );\n};\n", "import { HMSPeer, HMSPeerID, IStoreReadOnly, selectDominantSpeaker } from '@100mslive/react-sdk';\n\nclass PeersSorter {\n storeUnsubscribe: undefined | (() => void) = undefined;\n store: IStoreReadOnly<any>;\n peers: Map<string, HMSPeer>;\n lruPeers: Set<HMSPeerID>;\n tilesPerPage!: number;\n speaker?: HMSPeer;\n listeners: Set<(peers: HMSPeer[]) => void> = new Set();\n\n constructor(store: IStoreReadOnly<any>) {\n this.store = store;\n this.peers = new Map();\n this.lruPeers = new Set();\n this.speaker = undefined;\n }\n\n setPeersAndTilesPerPage = ({ peers, tilesPerPage }: { peers: HMSPeer[]; tilesPerPage: number }) => {\n this.tilesPerPage = tilesPerPage;\n const peerIds = new Set(peers.map(peer => peer.id));\n // remove existing peers which are no longer provided\n this.peers.forEach((_, key) => {\n if (!peerIds.has(key)) {\n this.peers.delete(key);\n }\n });\n this.lruPeers = new Set([...this.lruPeers].filter(peerId => peerIds.has(peerId)));\n peers.forEach(peer => {\n this.peers.set(peer.id, peer);\n if (this.lruPeers.size < tilesPerPage) {\n this.lruPeers.add(peer.id);\n }\n });\n if (!this.storeUnsubscribe) {\n this.storeUnsubscribe = this.store.subscribe(this.onDominantSpeakerChange, selectDominantSpeaker);\n }\n this.moveSpeakerToFront(this.speaker);\n };\n\n onUpdate = (cb: (peers: HMSPeer[]) => void) => {\n this.listeners.add(cb);\n };\n\n stop = () => {\n this.updateListeners();\n this.listeners.clear();\n this.storeUnsubscribe?.();\n };\n\n moveSpeakerToFront = (speaker?: HMSPeer) => {\n if (!speaker) {\n this.updateListeners();\n return;\n }\n if (this.lruPeers.has(speaker.id) && this.lruPeers.size <= this.tilesPerPage) {\n this.updateListeners();\n return;\n }\n // delete to insert at beginning\n this.lruPeers.delete(speaker.id);\n const lruPeerArray = Array.from(this.lruPeers);\n while (lruPeerArray.length >= this.tilesPerPage && lruPeerArray.length) {\n lruPeerArray.pop();\n }\n this.lruPeers = new Set([speaker.id, ...lruPeerArray]);\n this.updateListeners();\n };\n\n onDominantSpeakerChange = (speaker: HMSPeer | null) => {\n if (speaker && speaker.id !== this?.speaker?.id) {\n this.speaker = speaker;\n this.moveSpeakerToFront(speaker);\n }\n };\n\n updateListeners = () => {\n const orderedPeers: HMSPeer[] = [];\n this.lruPeers.forEach(key => {\n const peer = this.peers.get(key);\n if (peer) {\n orderedPeers.push(peer);\n }\n });\n this.peers.forEach(peer => {\n if (!this.lruPeers.has(peer.id) && peer) {\n orderedPeers.push(peer);\n }\n });\n this.listeners.forEach(listener => listener?.(orderedPeers));\n };\n}\n\nexport default PeersSorter;\n", "import React, { useEffect, useMemo } from 'react';\nimport { selectAppData, selectPeers, selectPeerScreenSharing, useEmbedShare, useHMSStore } from '@100mslive/react-sdk';\nimport { SecondaryTiles } from '../components/SecondaryTiles';\nimport { ToastManager } from '../components/Toast/ToastManager';\nimport { ProminenceLayout } from '../components/VideoLayouts/ProminenceLayout';\nimport { Box } from '../../Layout';\nimport { useResetEmbedConfig, useSetAppDataByKey } from '../components/AppData/useUISettings';\nimport { APP_DATA } from '../common/constants';\n\nexport const EmbedView = () => {\n return (\n <EmbedScreenShareView>\n <EmbedComponent />\n </EmbedScreenShareView>\n );\n};\n\nexport const EmbedScreenShareView = ({ children }) => {\n const peers = useHMSStore(selectPeers);\n\n const peerPresenting = useHMSStore(selectPeerScreenSharing);\n const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);\n\n const smallTilePeers = useMemo(() => {\n const smallTilePeers = peers.filter(peer => peer.id !== peerPresenting?.id);\n return smallTilePeers;\n }, [peers, peerPresenting]);\n\n useEffect(() => {\n setActiveScreenSharePeer(peerPresenting?.id);\n return () => {\n setActiveScreenSharePeer('');\n };\n }, [peerPresenting?.id, setActiveScreenSharePeer]);\n return (\n <ProminenceLayout.Root>\n <ProminenceLayout.ProminentSection>{children}</ProminenceLayout.ProminentSection>\n <SecondaryTiles peers={smallTilePeers} />\n </ProminenceLayout.Root>\n );\n};\n/**\n * EmbedView is responsible for rendering the iframe and managing the screen sharing functionality.\n */\nconst EmbedComponent = () => {\n const embedConfig = useHMSStore(selectAppData(APP_DATA.embedConfig));\n const resetConfig = useResetEmbedConfig();\n\n // need to send resetConfig to clear configuration, if stop screenshare occurs.\n const { iframeRef, startEmbedShare, isEmbedShareInProgress } = useEmbedShare(resetConfig);\n\n useEffect(() => {\n (async () => {\n if (embedConfig && !isEmbedShareInProgress) {\n try {\n await startEmbedShare(embedConfig);\n } catch (err) {\n resetConfig();\n ToastManager.addToast({\n title: `Error while sharing embed url ${err.message || ''}`,\n variant: 'error',\n });\n }\n }\n })();\n }, [isEmbedShareInProgress, embedConfig, startEmbedShare, resetConfig]);\n\n return (\n <Box\n css={{\n mx: '$8',\n flex: '3 1 0',\n '@lg': {\n flex: '2 1 0',\n display: 'flex',\n alignItems: 'center',\n },\n }}\n >\n <iframe\n title=\"Embed View\"\n ref={iframeRef}\n style={{\n width: '100%',\n height: '100%',\n border: 0,\n borderRadius: '0.75rem',\n }}\n allow=\"autoplay; clipboard-write;\"\n referrerPolicy=\"no-referrer\"\n />\n </Box>\n );\n};\n", "import React, { useEffect } from 'react';\nimport { usePDFShare } from '@100mslive/react-sdk';\nimport { ToastManager } from '../components/Toast/ToastManager';\nimport { Box } from '../../Layout';\nimport { EmbedScreenShareView } from './EmbedView';\nimport { usePDFConfig, useResetPDFConfig } from '../components/AppData/useUISettings';\n\n/**\n * PDFView is responsible for rendering the PDF iframe and managing the screen sharing functionality.\n */\nexport const PDFView = () => {\n const pdfConfig = usePDFConfig();\n const resetConfig = useResetPDFConfig();\n\n // need to send resetConfig to clear configuration, if stop screenshare occurs.\n const { iframeRef, startPDFShare, isPDFShareInProgress } = usePDFShare(resetConfig);\n\n useEffect(() => {\n (async () => {\n try {\n if (!isPDFShareInProgress && pdfConfig) {\n await startPDFShare(pdfConfig);\n }\n } catch (err) {\n resetConfig();\n ToastManager.addToast({\n title: `Error while sharing annotator ${err.message || ''}`,\n variant: 'error',\n });\n }\n })();\n }, [isPDFShareInProgress, pdfConfig, resetConfig, startPDFShare]);\n return (\n <EmbedScreenShareView>\n <Box\n css={{\n mx: '$8',\n flex: '3 1 0',\n '@lg': {\n flex: '2 1 0',\n display: 'flex',\n alignItems: 'center',\n },\n }}\n >\n <iframe\n title=\"Embed View\"\n ref={iframeRef}\n style={{\n width: '100%',\n height: '100%',\n border: 0,\n borderRadius: '0.75rem',\n }}\n allow=\"autoplay; clipboard-write;\"\n referrerPolicy=\"no-referrer\"\n />\n </Box>\n </EmbedScreenShareView>\n );\n};\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { ConferencingScreen } from '@100mslive/types-prebuilt';\nimport { selectAppData, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';\nimport { Polls } from '../components/Polls/Polls';\nimport { SidePaneTabs } from '../components/SidePaneTabs';\nimport { TileCustomisationProps } from '../components/VideoLayouts/GridLayout';\n// @ts-ignore: No implicit Any\nimport VideoTile from '../components/VideoTile';\nimport { Box, Flex } from '../../Layout';\nimport { config as cssConfig } from '../../Theme';\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { translateAcross } from '../../utils';\n// @ts-ignore: No implicit Any\nimport { APP_DATA, SIDE_PANE_OPTIONS } from '../common/constants';\n\nconst SidePane = ({\n screenType,\n tileProps,\n hideControls = false,\n}: {\n screenType: keyof ConferencingScreen;\n tileProps: TileCustomisationProps;\n hideControls: boolean;\n}) => {\n const isMobile = useMedia(cssConfig.media.md);\n const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));\n const activeScreensharePeerId = useHMSStore(selectAppData(APP_DATA.activeScreensharePeerId));\n const trackId = useHMSStore(selectVideoTrackByPeerID(activeScreensharePeerId))?.id;\n const { elements } = useRoomLayoutConferencingScreen();\n let ViewComponent;\n if (sidepane === SIDE_PANE_OPTIONS.POLLS) {\n ViewComponent = <Polls />;\n }\n if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {\n ViewComponent = <SidePaneTabs screenType={screenType} hideControls={hideControls} active={sidepane} />;\n }\n if (!ViewComponent && !trackId) {\n return null;\n }\n\n const tileLayout = {\n hideParticipantNameOnTile: tileProps?.hide_participant_name_on_tile,\n roundedVideoTile: tileProps?.rounded_video_tile,\n hideAudioMuteOnTile: tileProps?.hide_audio_mute_on_tile,\n hideMetadataOnTile: tileProps?.hide_metadata_on_tile,\n objectFit: tileProps?.video_object_fit,\n };\n\n const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && elements?.chat?.is_overlay;\n\n return (\n <Flex\n direction=\"column\"\n justify=\"center\"\n css={{\n w: '$100',\n h: '100%',\n flexShrink: 0,\n gap: '$4',\n '@md': { position: mwebStreamingChat ? 'absolute' : '', zIndex: 12 },\n }}\n >\n {trackId && (\n <VideoTile\n peerId={activeScreensharePeerId}\n trackId={trackId}\n width=\"100%\"\n height={225}\n rootCSS={{ p: 0, alignSelf: 'start', flexShrink: 0 }}\n {...tileLayout}\n />\n )}\n {!!ViewComponent && (\n <Box\n css={{\n w: '$100',\n h: mwebStreamingChat ? '0' : '100%',\n p: '$10',\n flex: '1 1 0',\n minHeight: 0,\n maxHeight: mwebStreamingChat ? '300px' : 'unset',\n background: mwebStreamingChat\n ? 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 35.94%, rgba(0, 0, 0, 0.64) 100%)'\n : '$surface_dim',\n r: '$1',\n position: 'relative',\n '@lg': {\n w: '100%',\n h: '100%',\n ml: 0,\n right: 0,\n position: 'fixed',\n bottom: 0,\n borderRadius: 0,\n zIndex: 10,\n },\n '@md': {\n p: '$6 $8',\n pb: mwebStreamingChat ? '$20' : '$12',\n borderTopLeftRadius: sidepane === SIDE_PANE_OPTIONS.POLLS ? '$2' : '0',\n borderTopRightRadius: sidepane === SIDE_PANE_OPTIONS.POLLS ? '$2' : '0',\n animation: `${translateAcross({ yFrom: '100%' })} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n }}\n >\n {ViewComponent}\n </Box>\n )}\n </Flex>\n );\n};\n\nexport default SidePane;\n", "import React from 'react';\n// @ts-ignore: No implicit Any\nimport { PollsQuizMenu } from './CreatePollQuiz/PollsQuizMenu';\n// @ts-ignore: No implicit Any\nimport { CreateQuestions } from './CreateQuestions/CreateQuestions';\n// @ts-ignore: No implicit Any\nimport { Voting } from './Voting/Voting';\n// @ts-ignore: No implicit Any\nimport { usePollViewToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { usePollViewState } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { POLL_VIEWS } from '../../common/constants';\n\nexport const Polls = () => {\n const togglePollView = usePollViewToggle();\n const { pollInView: pollID, view } = usePollViewState();\n\n if (view === POLL_VIEWS.CREATE_POLL_QUIZ) {\n return <PollsQuizMenu />;\n } else if (view === POLL_VIEWS.CREATE_QUESTIONS) {\n return <CreateQuestions />;\n } else if (view === POLL_VIEWS.VOTE) {\n return <Voting toggleVoting={togglePollView} id={pollID} />;\n } else {\n return null;\n }\n};\n", "// @ts-check\nimport React, { useMemo, useState } from 'react';\nimport {\n selectLocalPeerRoleName,\n selectPermissions,\n selectPolls,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { QuestionIcon, StatsIcon } from '@100mslive/react-icons';\nimport { Button, Flex, Input, Switch, Text } from '../../../../';\nimport { Container, ContentHeader, ErrorText } from '../../Streaming/Common';\nimport { usePollViewToggle } from '../../AppData/useSidepane';\nimport { usePollViewState } from '../../AppData/useUISettings';\nimport { isValidTextInput } from '../../../common/utils';\nimport { StatusIndicator } from '../common/StatusIndicator';\nimport { INTERACTION_TYPE, POLL_STATE, POLL_VIEWS } from '../../../common/constants';\n\nexport const PollsQuizMenu = () => {\n const togglePollView = usePollViewToggle();\n const permissions = useHMSStore(selectPermissions);\n\n return (\n <Container rounded>\n <ContentHeader content=\"Polls and Quizzes\" onClose={togglePollView} />\n <Flex direction=\"column\" css={{ px: '$10', pb: '$10', overflowY: 'auto' }}>\n {permissions?.pollWrite && <AddMenu />}\n <PrevMenu />\n </Flex>\n </Container>\n );\n};\n\nfunction InteractionSelectionCard({ title, icon, active, onClick }) {\n const activeBorderStyle = active ? '$space$px solid $primary_default' : '$space$px solid $border_bright';\n return (\n <Flex\n onClick={onClick}\n css={{\n border: activeBorderStyle,\n p: '$4',\n r: '$2',\n w: '100%',\n cursor: 'pointer',\n }}\n align=\"center\"\n >\n <Flex\n css={{\n border: activeBorderStyle,\n p: '$4',\n bg: '$surface_bright',\n c: '$on_surface_high',\n r: '$0',\n }}\n >\n {icon}\n </Flex>\n <Text variant=\"sub1\" css={{ ml: '$md' }}>\n {title}\n </Text>\n </Flex>\n );\n}\n\nconst AddMenu = () => {\n const actions = useHMSActions();\n const [title, setTitle] = useState('');\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n const [anonymous, setAnonymous] = useState(false);\n const [hideVoteCount, setHideVoteCount] = useState(false);\n const [error, setError] = useState();\n const [titleError, setTitleError] = useState('');\n const { setPollState } = usePollViewState();\n const [interactionType, setInteractionType] = useState(INTERACTION_TYPE.POLL);\n\n const handleCreate = id => {\n setPollState({\n [POLL_STATE.pollInView]: id,\n [POLL_STATE.view]: POLL_VIEWS.CREATE_QUESTIONS,\n });\n };\n\n const validateTitle = useMemo(() => {\n if (!isValidTextInput(title)) {\n if (title) {\n setTitleError('The title should have between 2-100 characters');\n }\n return true;\n } else {\n setTitleError('');\n return false;\n }\n }, [title]);\n // const [timer, setTimer] = useState(10);\n // const [showTimerDropDown, setShowTimerDropDown] = useState(false);\n\n return (\n <>\n <Text variant=\"caption\" css={{ c: '$on_surface_medium', mb: '$md' }}>\n Select the type you want to continue with\n </Text>\n <Flex css={{ w: '100%', gap: '$10', mb: '$md' }}>\n <InteractionSelectionCard\n title={INTERACTION_TYPE.POLL}\n icon={<StatsIcon width={32} height={32} />}\n onClick={() => setInteractionType(INTERACTION_TYPE.POLL)}\n active={interactionType === INTERACTION_TYPE.POLL}\n />\n <InteractionSelectionCard\n title={INTERACTION_TYPE.QUIZ}\n icon={<QuestionIcon width={32} height={32} />}\n onClick={() => setInteractionType(INTERACTION_TYPE.QUIZ)}\n active={interactionType === INTERACTION_TYPE.QUIZ}\n />\n </Flex>\n <Flex direction=\"column\">\n <Text variant=\"body2\" css={{ mb: '$4' }}>{`Name this ${interactionType.toLowerCase()}`}</Text>\n <Input\n type=\"text\"\n value={title}\n onChange={event => setTitle(event.target.value)}\n css={{\n backgroundColor: '$surface_bright',\n border: '1px solid $border_default',\n }}\n />\n <Flex align=\"center\" css={{ mt: '$10' }}>\n <Switch onCheckedChange={value => setHideVoteCount(value)} css={{ mr: '$6' }} />\n <Text variant=\"body2\" css={{ c: '$on_surface_medium' }}>\n Hide Vote Count\n </Text>\n </Flex>\n <Flex align=\"center\" css={{ mt: '$10' }}>\n <Switch onCheckedChange={value => setAnonymous(value)} css={{ mr: '$6' }} />\n <Text variant=\"body2\" css={{ c: '$on_surface_medium' }}>\n Make Results Anonymous\n </Text>\n </Flex>\n {/* <Timer\n timer={timer}\n setTimer={setTimer}\n showTimerDropDown={showTimerDropDown}\n setShowTimerDropDown={setShowTimerDropDown}\n /> */}\n\n <Button\n variant=\"primary\"\n disabled={validateTitle}\n css={{ mt: '$10' }}\n onClick={async () => {\n const id = Date.now().toString();\n await actions.interactivityCenter\n .createPoll({\n id,\n title,\n anonymous,\n rolesThatCanViewResponses: hideVoteCount && localPeerRoleName ? [localPeerRoleName] : undefined,\n type: interactionType.toLowerCase(),\n // duration: showTimerDropDown ? timer : undefined,\n })\n .then(() => handleCreate(id))\n .catch(err => setError(err.message));\n }}\n >\n Create {interactionType}\n </Button>\n <ErrorText error={error || titleError} />\n </Flex>\n </>\n );\n};\n\nconst PrevMenu = () => {\n const polls = useHMSStore(selectPolls)?.filter(poll => poll.state === 'started' || poll.state === 'stopped');\n return polls?.length ? (\n <Flex\n css={{\n borderTop: '$space$px solid $border_bright',\n mt: '$10',\n pt: '$10',\n }}\n >\n <Flex direction=\"column\" css={{ w: '100%' }}>\n <Text variant=\"h6\" css={{ c: '$on_surface_high' }}>\n Previous Polls and Quizzes\n </Text>\n <Flex direction=\"column\" css={{ gap: '$10', mt: '$8' }}>\n {polls.map(poll => (\n <InteractionCard\n key={poll.id}\n id={poll.id}\n title={poll.title}\n isLive={poll.state === 'started'}\n isTimed={(poll.duration || 0) > 0}\n />\n ))}\n </Flex>\n </Flex>\n </Flex>\n ) : null;\n};\n\nconst InteractionCard = ({ id, title, isLive, isTimed }) => {\n const { setPollState } = usePollViewState();\n\n const goToVote = id => {\n setPollState({\n [POLL_STATE.pollInView]: id,\n [POLL_STATE.view]: POLL_VIEWS.VOTE,\n });\n };\n\n return (\n <Flex direction=\"column\" css={{ backgroundColor: '$surface_bright', borderRadius: '$1', p: '$8' }}>\n <Flex css={{ w: '100%', justifyContent: 'space-between', mb: '$sm' }}>\n <Text variant=\"sub1\" css={{ c: '$on_surface_high', fontWeight: '$semiBold' }}>\n {title}\n </Text>\n <StatusIndicator isLive={isLive} shouldShowTimer={isLive && isTimed} />\n </Flex>\n <Flex css={{ w: '100%', gap: '$4' }} justify=\"end\">\n <Button variant=\"primary\" onClick={() => goToVote(id)}>\n View\n </Button>\n </Flex>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { selectPermissions, useHMSStore } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, ChevronRightIcon, CrossIcon, RecordIcon } from '@100mslive/react-icons';\nimport { Box, Flex, IconButton, slideLeftAndFade, Switch, Text } from '../../../';\n\nexport const StreamCard = ({ title, subtitle, Icon, imgSrc = '', css = {}, onClick, testId }) => {\n return (\n <Flex\n css={{\n w: '100%',\n p: '$10',\n r: '$1',\n cursor: 'pointer',\n bg: '$surface_bright',\n mb: '$10',\n mt: '$8',\n ...css,\n }}\n data-testid={testId}\n onClick={onClick}\n >\n <Text css={{ alignSelf: 'center', p: '$4' }}>\n {imgSrc ? <img src={imgSrc} height={40} width={40} /> : <Icon width={40} height={40} />}\n </Text>\n <Box css={{ flex: '1 1 0', mx: '$8' }}>\n <Text variant=\"h6\" css={{ mb: '$4' }}>\n {title}\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {subtitle}\n </Text>\n </Box>\n <Text css={{ alignSelf: 'center' }}>\n <ChevronRightIcon />\n </Text>\n </Flex>\n );\n};\n\nexport const ContentHeader = ({ onBack, onClose, title = '', content }) => {\n return (\n <Flex\n css={{ w: '100%', py: '$8', px: '$10', cursor: 'pointer', borderBottom: '1px solid $border_bright', mb: '$8' }}\n >\n {onBack ? (\n <Text\n css={{\n alignSelf: 'center',\n mr: '$8',\n }}\n onClick={onBack}\n data-testid=\"go_back\"\n >\n <ChevronLeftIcon />\n </Text>\n ) : null}\n <Box css={{ flex: '1 1 0' }}>\n {title ? (\n <Text\n variant=\"tiny\"\n css={{\n textTransform: 'uppercase',\n fontWeight: '$semiBold',\n color: '$on_surface_medium',\n }}\n >\n {title}\n </Text>\n ) : null}\n <Text variant=\"h6\">{content}</Text>\n </Box>\n {onClose ? (\n <IconButton onClick={onClose} css={{ alignSelf: 'flex-start' }} data-testid=\"close_stream_section\">\n <CrossIcon />\n </IconButton>\n ) : null}\n </Flex>\n );\n};\nexport const Container = ({ children, rounded = false }) => {\n return (\n <Box\n css={{\n size: '100%',\n zIndex: 2,\n position: 'absolute',\n top: 0,\n left: 0,\n bg: '$surface_dim',\n transform: 'translateX(10%)',\n animation: `${slideLeftAndFade('10%')} 100ms ease-out forwards`,\n display: 'flex',\n flexDirection: 'column',\n borderRadius: rounded ? '$2' : '0',\n }}\n >\n {children}\n </Box>\n );\n};\n\nexport const ContentBody = ({ Icon, title, removeVerticalPadding = false, children }) => {\n return (\n <Box css={{ p: removeVerticalPadding ? '$0 $10' : '$10' }}>\n <Text css={{ display: 'flex', alignItems: 'center', mb: '$4' }}>\n <Icon />\n <Text as=\"span\" css={{ fontWeight: '$semiBold', ml: '$4' }}>\n {title}\n </Text>\n </Text>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {children}\n </Text>\n </Box>\n );\n};\n\nexport const RecordStream = ({ record, setRecord, testId }) => {\n const permissions = useHMSStore(selectPermissions);\n return permissions?.browserRecording ? (\n <Flex align=\"center\" css={{ bg: '$surface_bright', m: '$8 $10', p: '$8', r: '$0' }}>\n <Text css={{ color: '$alert_error_default' }}>\n <RecordIcon />\n </Text>\n <Text variant=\"sm\" css={{ flex: '1 1 0', mx: '$8' }}>\n Record the stream\n </Text>\n <Switch checked={record} onCheckedChange={setRecord} data-testid={testId} />\n </Flex>\n ) : null;\n};\n\nexport const ErrorText = ({ error }) => {\n if (!error) {\n return null;\n }\n return (\n <Text variant=\"sm\" css={{ my: '$4', color: '$alert_error_default' }}>\n {error}\n </Text>\n );\n};\n", "// @ts-check\nimport React from 'react';\nimport { Flex, Text } from '../../../../';\n\nexport const StatusIndicator = ({ isLive, shouldShowTimer }) => {\n return (\n <Flex align=\"center\">\n <Flex\n css={{\n backgroundColor: isLive ? '$alert_error_default' : '$secondary_default',\n p: '$2 $4',\n borderRadius: shouldShowTimer ? '$0 0 0 $0' : '$0',\n }}\n >\n <Text\n variant=\"caption\"\n css={{\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n }}\n >\n {isLive ? 'LIVE' : 'ENDED'}\n </Text>\n </Flex>\n\n {shouldShowTimer ? (\n <Flex\n css={{\n borderRadius: '0 $0 $0 0',\n p: '$2 $4',\n backgroundColor: '$background_default',\n }}\n >\n <Text\n variant=\"caption\"\n css={{\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n }}\n >\n 0:32\n </Text>\n </Flex>\n ) : null}\n </Flex>\n );\n};\n", "// @ts-check\nimport React, { useMemo, useState } from 'react';\nimport { v4 as uuid } from 'uuid';\nimport { selectPollByID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { AddCircleIcon } from '@100mslive/react-icons';\nimport { Button, Flex, Text } from '../../../../';\nimport { Container, ContentHeader } from '../../Streaming/Common';\nimport { isValidQuestion, QuestionForm } from './QuestionForm';\nimport { SavedQuestion } from './SavedQuestion';\nimport { usePollViewToggle } from '../../AppData/useSidepane';\nimport { usePollViewState } from '../../AppData/useUISettings';\nimport { POLL_VIEWS } from '../../../common/constants';\n\nexport function CreateQuestions() {\n const [questions, setQuestions] = useState([{ draftID: uuid() }]);\n const actions = useHMSActions();\n const togglePollView = usePollViewToggle();\n const { pollInView: id, setPollView } = usePollViewState();\n const interaction = useHMSStore(selectPollByID(id));\n\n const isValidPoll = useMemo(\n () => questions.length > 0 && questions.every(question => isValidQuestion(question)),\n [questions],\n );\n\n const launchPoll = async () => {\n const validQuestions = questions\n .filter(question => isValidQuestion(question))\n .map(question => ({\n text: question.text,\n type: question.type,\n options: question.options,\n skippable: question.skippable,\n }));\n await actions.interactivityCenter.addQuestionsToPoll(id, validQuestions);\n await actions.interactivityCenter.startPoll(id);\n setPollView(POLL_VIEWS.VOTE);\n };\n const headingTitle = interaction?.type\n ? interaction?.type?.[0]?.toUpperCase() + interaction?.type?.slice(1)\n : 'Polls and Quizzes';\n const isQuiz = interaction?.type === 'quiz';\n return (\n <Container rounded>\n <ContentHeader\n content={headingTitle}\n onClose={togglePollView}\n onBack={() => setPollView(POLL_VIEWS.CREATE_POLL_QUIZ)}\n />\n <Flex direction=\"column\" css={{ p: '$10', overflowY: 'auto' }}>\n <Flex direction=\"column\">\n {questions.map((question, index) => (\n <QuestionCard\n key={question.draftID}\n question={question}\n index={index}\n length={questions.length}\n onSave={questionParams => {\n setQuestions(questions => [\n ...questions.slice(0, index),\n questionParams,\n ...questions.slice(index + 1),\n ]);\n }}\n isQuiz={isQuiz}\n removeQuestion={questionID =>\n setQuestions(prev => {\n return prev.filter(questionFromSet => questionID !== questionFromSet.draftID);\n })\n }\n convertToDraft={questionID =>\n setQuestions(prev => {\n const copyOfQuestions = [...prev];\n copyOfQuestions.forEach(question => {\n if (questionID && question.draftID === questionID) {\n question.saved = false;\n }\n });\n return copyOfQuestions;\n })\n }\n />\n ))}\n </Flex>\n <Flex\n css={{\n c: '$on_surface_low',\n my: '$sm',\n cursor: 'pointer',\n '&:hover': { c: '$on_surface_medium' },\n }}\n onClick={() => setQuestions([...questions, { draftID: uuid() }])}\n >\n <AddCircleIcon />\n <Text variant=\"body1\" css={{ ml: '$md', c: '$inherit' }}>\n Add another question\n </Text>\n </Flex>\n <Flex css={{ w: '100%' }} justify=\"end\">\n <Button disabled={!isValidPoll} onClick={launchPoll}>\n Launch {interaction.type}\n </Button>\n </Flex>\n </Flex>\n </Container>\n );\n}\n\nconst QuestionCard = ({ question, onSave, index, length, removeQuestion, isQuiz, convertToDraft }) => {\n return (\n <Flex direction=\"column\" css={{ p: '$md', bg: '$surface_default', r: '$1', mb: '$sm' }}>\n {question.saved ? (\n <SavedQuestion\n question={question}\n index={index}\n length={length}\n convertToDraft={convertToDraft}\n removeQuestion={removeQuestion}\n />\n ) : (\n <QuestionForm\n question={question}\n removeQuestion={() => removeQuestion(question.draftID)}\n onSave={params => onSave(params)}\n index={index}\n length={length}\n isQuiz={isQuiz}\n />\n )}\n </Flex>\n );\n};\n", "// @ts-check\nimport React, { useCallback, useRef, useState } from 'react';\nimport { AddCircleIcon, TrashIcon } from '@100mslive/react-icons';\nimport { Box, Button, Dropdown, Flex, Input, Switch, Text, Tooltip } from '../../../../';\nimport { DialogDropdownTrigger } from '../../../primitives/DropdownTrigger';\nimport { DeleteQuestionModal } from './DeleteQuestionModal';\nimport { useDropdownSelection } from '../../hooks/useDropdownSelection';\nimport { isValidTextInput } from '../../../common/utils';\nimport { MultipleChoiceOptionInputs } from '../common/MultipleChoiceOptions';\nimport { SingleChoiceOptionInputs } from '../common/SingleChoiceOptions';\nimport { QUESTION_TYPE, QUESTION_TYPE_TITLE } from '../../../common/constants';\n\nexport const QuestionForm = ({ question, index, length, onSave, removeQuestion, isQuiz }) => {\n const ref = useRef(null);\n const selectionBg = useDropdownSelection();\n const [openDelete, setOpenDelete] = useState(false);\n const [open, setOpen] = useState(false);\n const [type, setType] = useState(question.type || QUESTION_TYPE.SINGLE_CHOICE);\n const [text, setText] = useState(question.text);\n const [options, setOptions] = useState(\n question?.options || [\n { text: '', isCorrectAnswer: false },\n { text: '', isCorrectAnswer: false },\n ],\n );\n const [skippable, setSkippable] = useState(false);\n const isValid = isValidQuestion({\n text,\n type,\n options,\n isQuiz,\n });\n\n const handleOptionTextChange = useCallback(\n (index, text) => {\n setOptions(options => [...options.slice(0, index), { ...options[index], text }, ...options.slice(index + 1)]);\n },\n [setOptions],\n );\n\n const removeOption = useCallback(\n index =>\n setOptions(options => {\n const newOptions = [...options];\n newOptions.splice(index, 1);\n return newOptions;\n }),\n [setOptions],\n );\n\n const selectSingleChoiceAnswer = useCallback(\n answerIndex => {\n if (!isQuiz) {\n return;\n }\n setOptions(options =>\n options.map((option, index) => ({\n ...option,\n isCorrectAnswer: index === answerIndex,\n })),\n );\n },\n [setOptions, isQuiz],\n );\n\n const selectMultipleChoiceAnswer = useCallback(\n (checked, index) => {\n if (!isQuiz) {\n return;\n }\n setOptions(options => [\n ...options.slice(0, index),\n { ...options[index], isCorrectAnswer: checked },\n ...options.slice(index + 1),\n ]);\n },\n [setOptions, isQuiz],\n );\n\n return (\n <>\n <Text variant=\"overline\" css={{ c: '$on_surface_low', textTransform: 'uppercase' }}>\n Question {index + 1} of {length}\n </Text>\n <Text variant=\"body2\" css={{ mt: '$4', mb: '$md' }}>\n Question Type\n </Text>\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <DialogDropdownTrigger\n ref={ref}\n title={QUESTION_TYPE_TITLE[type]}\n css={{\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n }}\n open={open}\n />\n <Dropdown.Portal>\n <Dropdown.Content align=\"start\" sideOffset={8} css={{ w: ref.current?.clientWidth, zIndex: 1000 }}>\n {Object.keys(QUESTION_TYPE_TITLE).map(value => {\n return (\n <Dropdown.Item\n key={value}\n onSelect={() => setType(value)}\n css={{\n px: '$9',\n bg: type === value ? selectionBg : undefined,\n }}\n >\n {QUESTION_TYPE_TITLE[value]}\n </Dropdown.Item>\n );\n })}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n <Input\n placeholder=\"Ask a question\"\n css={{\n mt: '$md',\n backgroundColor: '$surface_bright',\n border: '1px solid $border_bright',\n }}\n type=\"text\"\n value={text}\n onChange={event => setText(event.target.value)}\n />\n {type === QUESTION_TYPE.SINGLE_CHOICE || type === QUESTION_TYPE.MULTIPLE_CHOICE ? (\n <>\n <Text variant=\"body2\" css={{ my: '$6', c: '$on_surface_medium' }}>\n Options\n </Text>\n\n {isQuiz && (\n <Text variant=\"xs\" css={{ c: '$on_surface_medium', mb: '$md' }}>\n {type === QUESTION_TYPE.SINGLE_CHOICE\n ? 'Use the radio buttons to indicate the correct answer'\n : 'Use the checkboxes to indicate the correct answer(s)'}\n </Text>\n )}\n\n {type === QUESTION_TYPE.SINGLE_CHOICE && (\n <SingleChoiceOptionInputs\n isQuiz={isQuiz}\n options={options}\n selectAnswer={selectSingleChoiceAnswer}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n )}\n\n {type === QUESTION_TYPE.MULTIPLE_CHOICE && (\n <MultipleChoiceOptionInputs\n isQuiz={isQuiz}\n options={options}\n selectAnswer={selectMultipleChoiceAnswer}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n )}\n\n {options?.length < 20 && (\n <Flex\n css={{\n c: '$on_surface_medium',\n cursor: 'pointer',\n '&:hover': { c: '$on_surface_high' },\n }}\n onClick={() => setOptions([...options, { text: '', isCorrectAnswer: false }])}\n >\n <AddCircleIcon style={{ position: 'relative', left: '-2px' }} />\n\n <Text\n variant=\"body1\"\n css={{\n ml: '$4',\n c: 'inherit',\n }}\n >\n Add an option\n </Text>\n </Flex>\n )}\n {isQuiz ? (\n <Flex css={{ mt: '$md', gap: '$6' }}>\n <Switch defaultChecked={skippable} onCheckedChange={checked => setSkippable(checked)} />\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n Not required to answer\n </Text>\n </Flex>\n ) : null}\n </>\n ) : null}\n\n <Flex justify=\"between\" align=\"center\" css={{ mt: '$12' }}>\n <Box\n css={{\n color: '$on_surface_medium',\n cursor: 'pointer',\n '&:hover': { color: '$on_surface_high' },\n }}\n >\n <TrashIcon onClick={() => setOpenDelete(!open)} />\n </Box>\n <Tooltip\n disabled={isValid}\n title={`Please fill all the fields ${isQuiz ? 'and mark the correct answer(s)' : ''} to continue`}\n boxCss={{ maxWidth: '$40' }}\n >\n <Button\n variant=\"standard\"\n disabled={!isValid}\n onClick={() => {\n onSave({\n saved: true,\n text,\n type,\n options,\n skippable,\n draftID: question.draftID,\n });\n }}\n >\n Save\n </Button>\n </Tooltip>\n </Flex>\n\n <DeleteQuestionModal open={openDelete} setOpen={setOpenDelete} removeQuestion={removeQuestion} />\n </>\n );\n};\n\nexport const isValidQuestion = ({ text, type, options, isQuiz = false }) => {\n if (!isValidTextInput(text) || !type) {\n return false;\n }\n\n if (![QUESTION_TYPE.SINGLE_CHOICE, QUESTION_TYPE.MULTIPLE_CHOICE].includes(type)) {\n return true;\n }\n\n const everyOptionHasText = options.every(option => option && isValidTextInput(option.text, 1));\n const hasCorrectAnswer = options.some(option => option.isCorrectAnswer);\n\n if (!isQuiz) {\n return everyOptionHasText;\n }\n\n return everyOptionHasText && hasCorrectAnswer;\n};\n", "import React from 'react';\nimport { AlertTriangleIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../../Button';\nimport { Box, Flex } from '../../../../Layout';\nimport { Dialog } from '../../../../Modal';\nimport { Text } from '../../../../Text';\n\nexport const DeleteQuestionModal = ({ open, setOpen, removeQuestion }) => {\n return (\n <Dialog.Root open={open}>\n <Dialog.Overlay />\n <Dialog.Portal>\n <Dialog.Content css={{ p: '$10' }}>\n <Box>\n <Flex\n css={{\n color: '$alert_error_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: 'inherit', fontWeight: '$semiBold' }}>\n Delete Question?\n </Text>\n\n <Box\n css={{\n ml: 'auto',\n color: '$on_surface_medium',\n '&:hover': { color: '$on_surface_high', cursor: 'pointer' },\n }}\n onClick={() => setOpen(false)}\n >\n <CrossIcon />\n </Box>\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mb: '$8', mt: '$4' }}>\n The question will be deleted. You can't undo this action.\n </Text>\n <Flex css={{ w: '100%', mt: '$12', gap: '$md' }}>\n <Button\n variant=\"standard\"\n outlined\n onClick={() => setOpen(false)}\n css={{ w: '100%', fontSize: '$md', fontWeight: '$semiBold' }}\n >\n Cancel\n </Button>\n <Button\n css={{ w: '100%', fontSize: '$md', fontWeight: '$semiBold' }}\n variant=\"danger\"\n onClick={() => {\n removeQuestion();\n setOpen(false);\n }}\n >\n Delete\n </Button>\n </Flex>\n </Box>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "// @ts-check\nimport React from 'react';\nimport { CheckIcon } from '@100mslive/react-icons';\nimport { Checkbox, Flex, Label, Text } from '../../../../';\nimport { OptionInputWithDelete } from './OptionInputWithDelete';\nimport { VoteCount } from './VoteCount';\nimport { VoteProgress } from './VoteProgress';\n\nexport const MultipleChoiceOptions = ({\n questionIndex,\n isQuiz,\n options,\n correctOptionIndexes,\n canRespond,\n response,\n totalResponses,\n selectedOptions,\n setSelectedOptions,\n showVoteCount,\n}) => {\n const handleCheckedChange = (checked, index) => {\n const newSelected = new Set(selectedOptions);\n if (checked) {\n newSelected.add(index);\n } else {\n newSelected.delete(index);\n }\n setSelectedOptions(newSelected);\n };\n\n return (\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map(option => {\n const isCorrectAnswer = isQuiz && correctOptionIndexes?.includes(option.index);\n\n return (\n <Flex align=\"center\" key={`${questionIndex}-${option.index}`} css={{ w: '100%', gap: '$9' }}>\n <Checkbox.Root\n id={`${questionIndex}-${option.index}`}\n disabled={!canRespond}\n checked={response?.options?.includes(option.index)}\n onCheckedChange={checked => handleCheckedChange(checked, option.index)}\n css={{\n cursor: canRespond ? 'pointer' : 'not-allowed',\n }}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n\n <Flex direction=\"column\" css={{ flexGrow: '1' }}>\n <Flex css={{ w: '100%' }}>\n <Text css={{ display: 'flex', flexGrow: '1' }}>\n <Label htmlFor={`${questionIndex}-${option.index}`}>{option.text}</Label>\n </Text>\n {showVoteCount && (\n <VoteCount isQuiz={isQuiz} isCorrectAnswer={isCorrectAnswer} voteCount={option.voteCount} />\n )}\n </Flex>\n {showVoteCount && <VoteProgress option={option} totalResponses={totalResponses} />}\n </Flex>\n </Flex>\n );\n })}\n </Flex>\n );\n};\n\nexport const MultipleChoiceOptionInputs = ({ isQuiz, options, selectAnswer, handleOptionTextChange, removeOption }) => {\n return (\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map((option, index) => {\n return (\n <Flex align=\"center\" key={index} css={{ w: '100%', gap: '$5' }}>\n {isQuiz && (\n <Checkbox.Root\n onCheckedChange={checked => selectAnswer(checked, index)}\n checked={option.isCorrectAnswer}\n css={{\n cursor: 'pointer',\n width: '$9',\n }}\n >\n <Checkbox.Indicator>\n <CheckIcon width={16} height={16} />\n </Checkbox.Indicator>\n </Checkbox.Root>\n )}\n <OptionInputWithDelete\n index={index}\n option={option}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n </Flex>\n );\n })}\n </Flex>\n );\n};\n", "import React from 'react';\nimport { TrashIcon } from '@100mslive/react-icons';\nimport { Input } from '../../../../Input';\nimport IconButton from '../../../IconButton';\n\nexport const OptionInputWithDelete = ({ index, option, handleOptionTextChange, removeOption }) => {\n return (\n <>\n <Input\n placeholder={`Option ${index + 1}`}\n css={{\n w: '100%',\n backgroundColor: '$surface_default',\n border: '1px solid $border_bright',\n }}\n value={option?.text || ''}\n key={index}\n onChange={event => handleOptionTextChange(index, event.target.value)}\n />\n <IconButton onClick={() => removeOption(index)} css={{ bg: '$transparent', border: 'none' }}>\n <TrashIcon />\n </IconButton>\n </>\n );\n};\n", "// @ts-check\nimport React from 'react';\nimport { Flex, Text } from '../../../../';\n\nexport const VoteCount = ({ isQuiz, voteCount, isCorrectAnswer }) => {\n return (\n <Flex css={{ alignItems: 'center' }}>\n {isQuiz && (\n <Text\n variant=\"xs\"\n css={{\n p: '$2',\n mr: '$2',\n color: isCorrectAnswer ? '$alert_success' : '$alert_error_default',\n borderRadius: '$1',\n border: `1px solid ${isCorrectAnswer ? '$alert_success' : '$alert_error_default'}`,\n }}\n >\n {isCorrectAnswer ? 'Correct' : 'Incorrect'}\n </Text>\n )}\n <Text variant=\"sm\" css={{ color: '$on_surface_medium' }}>\n {voteCount}&nbsp;\n {voteCount === 1 ? 'vote' : 'votes'}\n </Text>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { Progress } from '../../../../';\n\nexport const VoteProgress = ({ option, totalResponses }) => {\n const showProgress = typeof option.voteCount === 'number' && typeof totalResponses === 'number' && totalResponses > 0;\n const progressValue = (100 * option.voteCount) / totalResponses;\n\n return showProgress ? (\n <Progress.Root value={progressValue}>\n <Progress.Content\n style={{\n transform: `translateX(-${100 - progressValue}%)`,\n }}\n />\n </Progress.Root>\n ) : null;\n};\n", "// @ts-check\nimport React from 'react';\nimport { Flex, Label, RadioGroup, Text } from '../../../../';\nimport { OptionInputWithDelete } from './OptionInputWithDelete';\nimport { VoteCount } from './VoteCount';\nimport { VoteProgress } from './VoteProgress';\n\nexport const SingleChoiceOptions = ({\n questionIndex,\n isQuiz,\n options,\n response,\n canRespond,\n correctOptionIndex,\n setAnswer,\n totalResponses,\n showVoteCount,\n}) => {\n return (\n <RadioGroup.Root value={response?.option} onValueChange={value => setAnswer(value)}>\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map(option => {\n const isCorrectAnswer = isQuiz && option.index === correctOptionIndex;\n\n return (\n <Flex align=\"center\" key={`${questionIndex}-${option.index}`} css={{ w: '100%', gap: '$5' }}>\n <RadioGroup.Item\n css={{\n background: 'none',\n h: '$9',\n w: '$9',\n border: '2px solid',\n borderColor: '$on_surface_high',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: canRespond ? 'pointer' : 'not-allowed',\n '&[data-state=\"checked\"]': {\n borderColor: '$primary_bright',\n borderWidth: '2px',\n },\n }}\n disabled={!canRespond}\n value={option.index}\n id={`${questionIndex}-${option.index}`}\n >\n <RadioGroup.Indicator\n css={{\n h: '80%',\n w: '80%',\n background: '$primary_bright',\n borderRadius: '$round',\n }}\n />\n </RadioGroup.Item>\n\n <Flex direction=\"column\" css={{ flexGrow: '1' }}>\n <Flex css={{ w: '100%' }}>\n <Text css={{ display: 'flex', flexGrow: '1' }}>\n <Label htmlFor={`${questionIndex}-${option.index}`}>{option.text}</Label>\n </Text>\n {showVoteCount && (\n <VoteCount isQuiz={isQuiz} isCorrectAnswer={isCorrectAnswer} voteCount={option.voteCount} />\n )}\n </Flex>\n {showVoteCount && <VoteProgress option={option} totalResponses={totalResponses} />}\n </Flex>\n </Flex>\n );\n })}\n </Flex>\n </RadioGroup.Root>\n );\n};\n\nexport const SingleChoiceOptionInputs = ({ isQuiz, options, selectAnswer, handleOptionTextChange, removeOption }) => {\n const correctOptionIndex = options.findIndex(option => option.isCorrectAnswer);\n\n return (\n <RadioGroup.Root value={correctOptionIndex} onValueChange={selectAnswer}>\n <Flex direction=\"column\" css={{ gap: '$md', w: '100%', mb: '$md' }}>\n {options.map((option, index) => {\n return (\n <Flex align=\"center\" key={`option-${index}`} css={{ w: '100%', gap: '$5' }}>\n {isQuiz && (\n <RadioGroup.Item\n css={{\n background: 'none',\n w: '$9',\n border: '2px solid',\n borderColor: '$on_surface_high',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer',\n '&[data-state=\"checked\"]': {\n borderColor: '$primary_bright',\n borderWidth: '2px',\n },\n }}\n value={index}\n >\n <RadioGroup.Indicator\n css={{\n h: '80%',\n w: '80%',\n background: '$primary_bright',\n borderRadius: '$round',\n }}\n />\n </RadioGroup.Item>\n )}\n <OptionInputWithDelete\n index={index}\n option={option}\n handleOptionTextChange={handleOptionTextChange}\n removeOption={removeOption}\n />\n </Flex>\n );\n })}\n </Flex>\n </RadioGroup.Root>\n );\n};\n", "// @ts-check\nimport React, { useState } from 'react';\nimport { CheckCircleIcon, TrashIcon } from '@100mslive/react-icons';\nimport { Box, Button, Flex, Text } from '../../../../';\nimport { DeleteQuestionModal } from './DeleteQuestionModal';\nimport { QUESTION_TYPE_TITLE } from '../../../common/constants';\n\nexport const SavedQuestion = ({ question, index, length, convertToDraft, removeQuestion }) => {\n const [openDeleteModal, setOpenDeleteModal] = useState(false);\n return (\n <>\n <Text variant=\"overline\" css={{ c: '$on_surface_low', textTransform: 'uppercase' }}>\n Question {index + 1} of {length}: {QUESTION_TYPE_TITLE[question.type]}\n </Text>\n <Text variant=\"body2\" css={{ mt: '$4', mb: '$md' }}>\n {question.text}\n </Text>\n {question.options.map(option => (\n <Flex css={{ alignItems: 'center', my: '$xs' }}>\n <Text variant=\"body2\" css={{ c: '$on_surface_medium' }}>\n {option.text}\n </Text>\n {option.isCorrectAnswer && (\n <Flex css={{ color: '$alert_success', mx: '$xs' }}>\n <CheckCircleIcon height={24} width={24} />\n </Flex>\n )}\n </Flex>\n ))}\n {question.skippable ? (\n <Text variant=\"sm\" css={{ color: '$on_surface_low', my: '$md' }}>\n Not required to answer\n </Text>\n ) : null}\n <Flex justify=\"between\" css={{ w: '100%', alignItems: 'center' }}>\n <Box\n onClick={() => setOpenDeleteModal(true)}\n css={{ color: '$on_surface_low', '&:hover': { color: '$on_surface_medium', cursor: 'pointer' } }}\n >\n <TrashIcon />\n </Box>\n <Button\n variant=\"standard\"\n css={{ fontWeight: '$semiBold', p: '$4 $8' }}\n onClick={() => convertToDraft(question.draftID)}\n >\n Edit\n </Button>\n </Flex>\n <DeleteQuestionModal\n removeQuestion={() => removeQuestion(question.draftID)}\n open={openDeleteModal}\n setOpen={setOpenDeleteModal}\n />\n </>\n );\n};\n", "// @ts-check\nimport React from 'react';\nimport {\n selectLocalPeerID,\n selectPeerNameByID,\n selectPollByID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { Box, Button, Flex, Text } from '../../../../';\nimport { Container } from '../../Streaming/Common';\n// import { PollResultSummary } from \"./PollResultSummary\";\nimport { StandardView } from './StandardVoting';\nimport { TimedView } from './TimedVoting';\nimport { usePollViewState } from '../../AppData/useUISettings';\nimport { StatusIndicator } from '../common/StatusIndicator';\nimport { POLL_VIEWS } from '../../../common/constants';\n\nexport const Voting = ({ id, toggleVoting }) => {\n const actions = useHMSActions();\n const poll = useHMSStore(selectPollByID(id));\n const pollCreatorName = useHMSStore(selectPeerNameByID(poll?.createdBy));\n const isLocalPeerCreator = useHMSStore(selectLocalPeerID) === poll?.createdBy;\n const { setPollView } = usePollViewState();\n\n if (!poll) {\n return null;\n }\n\n // Sets view - linear or vertical, toggles timer indicator\n const isTimed = (poll.duration || 0) > 0;\n const isLive = poll.state === 'started';\n\n return (\n <Container rounded>\n <Flex\n align=\"center\"\n css={{\n gap: '$6',\n py: '$6',\n px: '$10',\n my: '$4',\n w: '100%',\n color: '$on_surface_high',\n borderBottom: '1px solid $border_default',\n }}\n >\n <Flex\n onClick={() => setPollView(POLL_VIEWS.CREATE_POLL_QUIZ)}\n css={{ cursor: 'pointer', c: '$on_surface_medium', '&:hover': { color: '$on_surface_high' } }}\n >\n <ChevronLeftIcon />\n </Flex>\n <Text variant=\"h6\">{poll?.type?.toUpperCase()}</Text>\n <StatusIndicator isLive={isLive} shouldShowTimer={isLive && isTimed} />\n <Box\n css={{\n marginLeft: 'auto',\n cursor: 'pointer',\n '&:hover': { opacity: '0.8' },\n }}\n >\n <CrossIcon onClick={toggleVoting} />\n </Box>\n </Flex>\n\n <Flex direction=\"column\" css={{ p: '$8 $10' }}>\n <Flex align=\"center\">\n <Box css={{ flex: 'auto' }}>\n <Text css={{ color: '$on_surface_medium', fontWeight: '$semiBold' }}>\n {pollCreatorName || 'Participant'} started a {poll.type}\n </Text>\n </Box>\n {poll.state === 'started' && isLocalPeerCreator && (\n <Box css={{ flex: 'initial' }}>\n <Button\n variant=\"danger\"\n css={{ fontSize: '$sm', fontWeight: '$semiBold', p: '$3 $6' }}\n onClick={() => actions.interactivityCenter.stopPoll(id)}\n >\n End {poll.type}\n </Button>\n </Box>\n )}\n </Flex>\n {/* {poll.state === \"stopped\" && (\n <PollResultSummary\n pollResult={poll.result}\n questions={poll.questions}\n isQuiz={poll.type === \"quiz\"}\n isAdmin={isLocalPeerCreator}\n />\n )} */}\n {isTimed ? <TimedView poll={poll} /> : <StandardView poll={poll} />}\n </Flex>\n </Container>\n );\n};\n", "// @ts-check\nimport React from 'react';\nimport { QuestionCard } from './QuestionCard';\n\n/**\n *\n * @param {{poll: import(\"@100mslive/react-sdk\").HMSPoll}} param0\n * @returns\n */\nexport const StandardView = ({ poll }) => {\n if (!poll?.questions) {\n return null;\n }\n return (\n <>\n {poll.questions?.map((question, index) => (\n <QuestionCard\n pollID={poll.id}\n isQuiz={poll.type === 'quiz'}\n startedBy={poll.startedBy}\n pollState={poll.state}\n key={`${question.text}-${index}`}\n index={question.index}\n text={question.text}\n type={question.type}\n result={question.result}\n totalQuestions={poll.questions?.length || 0}\n options={question.options}\n skippable={question.skippable}\n responses={question.responses}\n answer={question.answer}\n setCurrentIndex={() => {\n return;\n }}\n rolesThatCanViewResponses={poll.rolesThatCanViewResponses}\n />\n ))}\n </>\n );\n};\n", "// @ts-check\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { selectLocalPeerID, selectLocalPeerRoleName, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, ChevronRightIcon } from '@100mslive/react-icons';\nimport { Box, Button, Flex, IconButton, Input, styled, Text } from '../../../../';\nimport { checkCorrectAnswer } from '../../../common/utils';\nimport { MultipleChoiceOptions } from '../common/MultipleChoiceOptions';\nimport { SingleChoiceOptions } from '../common/SingleChoiceOptions';\nimport { QUESTION_TYPE } from '../../../common/constants';\n\nconst TextArea = styled('textarea', {\n backgroundColor: '$surface_brighter',\n border: '1px solid $border_bright',\n borderRadius: '$1',\n mb: '$md',\n color: '$on_surface_high',\n resize: 'none',\n p: '$2',\n w: '100%',\n});\n\nexport const QuestionCard = ({\n pollID,\n isQuiz,\n startedBy,\n pollState,\n index,\n totalQuestions,\n result,\n type,\n text,\n options = [],\n answer,\n setCurrentIndex,\n skippable = false,\n responses = [],\n isTimed = false,\n rolesThatCanViewResponses,\n}) => {\n const actions = useHMSActions();\n const localPeerID = useHMSStore(selectLocalPeerID);\n const localPeerResponse = responses?.find(response => response.peer?.peerid === localPeerID);\n const isLocalPeerCreator = localPeerID === startedBy;\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n const roleCanViewResponse =\n !rolesThatCanViewResponses ||\n rolesThatCanViewResponses.length === 0 ||\n rolesThatCanViewResponses.includes(localPeerRoleName || '');\n const showVoteCount = roleCanViewResponse && (localPeerResponse || (isLocalPeerCreator && pollState === 'stopped'));\n\n const isLive = pollState === 'started';\n const canRespond = isLive && !localPeerResponse;\n\n const isCorrectAnswer = checkCorrectAnswer(answer, localPeerResponse, type);\n\n const prev = index !== 1;\n const next = index !== totalQuestions && (skippable || localPeerResponse);\n\n const moveNext = useCallback(() => {\n setCurrentIndex(curr => Math.min(totalQuestions, curr + 1));\n }, [setCurrentIndex, totalQuestions]);\n\n const movePrev = () => {\n setCurrentIndex(curr => Math.max(1, curr - 1));\n };\n\n const [textAnswer, setTextAnswer] = useState('');\n const [singleOptionAnswer, setSingleOptionAnswer] = useState();\n const [multipleOptionAnswer, setMultipleOptionAnswer] = useState(new Set());\n\n const stringAnswerExpected = [QUESTION_TYPE.LONG_ANSWER, QUESTION_TYPE.SHORT_ANSWER].includes(type);\n\n const isValidVote = useMemo(() => {\n if (stringAnswerExpected) {\n return textAnswer.length > 0;\n } else if (type === QUESTION_TYPE.SINGLE_CHOICE) {\n return singleOptionAnswer !== undefined;\n } else if (type === QUESTION_TYPE.MULTIPLE_CHOICE) {\n return multipleOptionAnswer.size > 0;\n }\n }, [textAnswer, singleOptionAnswer, multipleOptionAnswer, type, stringAnswerExpected]);\n\n const handleVote = useCallback(async () => {\n if (!isValidVote) {\n return;\n }\n await actions.interactivityCenter.addResponsesToPoll(pollID, [\n {\n questionIndex: index,\n text: textAnswer,\n option: singleOptionAnswer,\n options: Array.from(multipleOptionAnswer),\n },\n ]);\n }, [actions, index, pollID, isValidVote, textAnswer, singleOptionAnswer, multipleOptionAnswer]);\n\n const handleSkip = useCallback(async () => {\n await actions.interactivityCenter.addResponsesToPoll(pollID, [\n {\n questionIndex: index,\n skipped: true,\n },\n ]);\n moveNext();\n }, [actions, index, pollID, moveNext]);\n\n return (\n <Box\n css={{\n backgroundColor: '$surface_bright',\n borderRadius: '$1',\n p: '$md',\n mt: '$md',\n border:\n isQuiz && localPeerResponse && !localPeerResponse.skipped\n ? `1px solid ${isCorrectAnswer ? '$alert_success' : '$alert_error_default'}`\n : 'none',\n }}\n >\n <Flex align=\"center\" justify=\"between\">\n <Text variant=\"caption\" css={{ color: '$on_surface_low', fontWeight: '$semiBold' }}>\n QUESTION {index} OF {totalQuestions}: {type.toUpperCase()}\n </Text>\n\n {isTimed ? (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <IconButton\n disabled={!prev}\n onClick={movePrev}\n css={\n prev\n ? { color: '$on_surface_high', cursor: 'pointer' }\n : {\n color: '$on_surface_low',\n cursor: 'not-allowed',\n }\n }\n >\n <ChevronLeftIcon height={16} width={16} />\n </IconButton>\n <IconButton\n disabled={!next}\n onClick={moveNext}\n css={\n next\n ? { color: '$on_surface_high', cursor: 'pointer' }\n : {\n color: '$on_surface_low',\n cursor: 'not-allowed',\n }\n }\n >\n <ChevronRightIcon height={16} width={16} />\n </IconButton>\n </Flex>\n ) : null}\n </Flex>\n\n <Box css={{ my: '$md' }}>\n <Text css={{ color: '$on_surface_high' }}>{text}</Text>\n </Box>\n\n {type === QUESTION_TYPE.SHORT_ANSWER ? (\n <Input\n disabled={!canRespond}\n placeholder=\"Enter your answer\"\n onChange={e => setTextAnswer(e.target.value)}\n css={{\n w: '100%',\n backgroundColor: '$surface_brighter',\n mb: '$md',\n border: '1px solid $border_default',\n cursor: localPeerResponse ? 'not-allowed' : 'text',\n }}\n />\n ) : null}\n\n {type === QUESTION_TYPE.LONG_ANSWER ? (\n <TextArea\n disabled={!canRespond}\n placeholder=\"Enter your answer\"\n onChange={e => setTextAnswer(e.target.value)}\n />\n ) : null}\n\n {type === QUESTION_TYPE.SINGLE_CHOICE ? (\n <SingleChoiceOptions\n questionIndex={index}\n isQuiz={isQuiz}\n canRespond={canRespond}\n response={localPeerResponse}\n correctOptionIndex={answer?.option}\n options={options}\n setAnswer={setSingleOptionAnswer}\n totalResponses={result?.totalResponses}\n showVoteCount={showVoteCount}\n />\n ) : null}\n\n {type === QUESTION_TYPE.MULTIPLE_CHOICE ? (\n <MultipleChoiceOptions\n questionIndex={index}\n isQuiz={isQuiz}\n canRespond={canRespond}\n response={localPeerResponse}\n correctOptionIndexes={answer?.options}\n options={options}\n selectedOptions={multipleOptionAnswer}\n setSelectedOptions={setMultipleOptionAnswer}\n totalResponses={result?.totalResponses}\n showVoteCount={showVoteCount}\n />\n ) : null}\n\n {isLive && (\n <QuestionActions\n isValidVote={isValidVote}\n skippable={skippable}\n onSkip={handleSkip}\n onVote={handleVote}\n response={localPeerResponse}\n stringAnswerExpected={stringAnswerExpected}\n />\n )}\n </Box>\n );\n};\n\nconst QuestionActions = ({ isValidVote, skippable, response, stringAnswerExpected, onVote, onSkip }) => {\n return (\n <Flex align=\"center\" justify=\"end\" css={{ gap: '$4', w: '100%' }}>\n {skippable && !response ? (\n <Button variant=\"standard\" onClick={onSkip} css={{ p: '$xs $10', fontWeight: '$semiBold' }}>\n Skip\n </Button>\n ) : null}\n\n {response ? (\n <Text css={{ fontWeight: '$semiBold', color: '$on_surface_medium' }}>\n {response.skipped ? 'Skipped' : stringAnswerExpected ? 'Submitted' : 'Voted'}\n </Text>\n ) : (\n <Button css={{ p: '$xs $10', fontWeight: '$semiBold' }} disabled={!isValidVote} onClick={onVote}>\n {stringAnswerExpected ? 'Submit' : 'Vote'}\n </Button>\n )}\n </Flex>\n );\n};\n", "// @ts-check\nimport React, { useState } from 'react';\nimport { QuestionCard } from './QuestionCard';\n\n/**\n *\n * @param {{poll: import(\"@100mslive/react-sdk\").HMSPoll}} param0\n * @returns\n */\nexport const TimedView = ({ poll }) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const activeQuestion = poll.questions?.[currentIndex];\n if (!activeQuestion) {\n return null;\n }\n return (\n <QuestionCard\n pollID={poll.id}\n isQuiz={poll.type === 'quiz'}\n startedBy={poll.startedBy}\n pollState={poll.state}\n index={activeQuestion.index}\n text={activeQuestion.text}\n type={activeQuestion.type}\n result={activeQuestion?.result}\n totalQuestions={poll.questions?.length || 0}\n options={activeQuestion.options}\n skippable={activeQuestion.skippable || false}\n responses={activeQuestion.responses}\n answer={activeQuestion.answer}\n setCurrentIndex={setCurrentIndex}\n rolesThatCanViewResponses={poll.rolesThatCanViewResponses}\n isTimed\n />\n );\n};\n", "import React, { useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { ConferencingScreen, DefaultConferencingScreen_Elements } from '@100mslive/types-prebuilt';\nimport { selectPeerCount, useHMSStore } from '@100mslive/react-sdk';\nimport { CrossIcon } from '@100mslive/react-icons';\n// @ts-ignore: No implicit Any\nimport { Chat } from './Chat/Chat';\nimport { PaginatedParticipants } from './Footer/PaginatedParticipants';\n// @ts-ignore: No implicit Any\nimport { ParticipantList } from './Footer/ParticipantList';\nimport { Box, config as cssConfig, Flex, IconButton, Tabs, Text } from '../..';\nimport { Tooltip } from '../../Tooltip';\n// @ts-ignore: No implicit Any\nimport { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useIsSidepaneTypeOpen, useSidepaneReset, useSidepaneToggle } from './AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../common/utils';\n// @ts-ignore: No implicit Any\nimport { SIDE_PANE_OPTIONS } from '../common/constants';\n\nconst tabTriggerCSS = {\n color: '$on_surface_high',\n p: '$4',\n fontWeight: '$semiBold',\n fontSize: '$sm',\n w: '100%',\n justifyContent: 'center',\n};\n\nconst ParticipantCount = ({ count }: { count: number }) => {\n return count < 1000 ? (\n <span>({count})</span>\n ) : (\n <Tooltip title={count}>\n <span>({getFormattedCount(count)})</span>\n </Tooltip>\n );\n};\n\nexport const SidePaneTabs = React.memo<{\n active: 'Participants | Chat';\n screenType: keyof ConferencingScreen;\n hideControls?: boolean;\n}>(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const resetSidePane = useSidepaneReset();\n const [activeTab, setActiveTab] = useState(active);\n const [activeRole, setActiveRole] = useState('');\n const peerCount = useHMSStore(selectPeerCount);\n const { elements } = useRoomLayoutConferencingScreen();\n const showChat = !!elements?.chat;\n const showParticipants = !!elements?.participant_list;\n const hideTabs = !(showChat && showParticipants);\n const isMobile = useMedia(cssConfig.media.md);\n const isOverlayChat = !!elements?.chat?.is_overlay && isMobile;\n const { off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n\n useEffect(() => {\n if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {\n setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);\n } else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {\n setActiveTab(SIDE_PANE_OPTIONS.CHAT);\n } else if (!showChat && !showParticipants) {\n resetSidePane();\n }\n }, [showChat, activeTab, showParticipants, resetSidePane]);\n\n useEffect(() => {\n setActiveTab(active);\n }, [active]);\n\n if (activeRole) {\n return (\n <Flex\n direction=\"column\"\n css={{\n color: '$on_primary_high',\n h: '100%',\n marginTop: hideControls && isOverlayChat ? '$17' : '0',\n transition: 'margin 0.3s ease-in-out',\n position: 'relative',\n }}\n >\n <Box css={{ position: 'absolute', left: 0, top: 0, size: '100%', zIndex: 21, bg: '$surface_dim' }}>\n <PaginatedParticipants roleName={activeRole} onBack={() => setActiveRole('')} />\n </Box>\n </Flex>\n );\n }\n\n return (\n <Flex\n direction=\"column\"\n css={{\n color: '$on_primary_high',\n h: '100%',\n marginTop: hideControls && isOverlayChat ? '$17' : '0',\n transition: 'margin 0.3s ease-in-out',\n }}\n >\n {isOverlayChat && isChatOpen && showChat ? (\n <Chat screenType={screenType} />\n ) : (\n <>\n {hideTabs ? (\n <>\n <Text variant=\"sm\" css={{ fontWeight: '$semiBold', p: '$4', c: '$on_surface_high', pr: '$12' }}>\n {showChat ? (\n 'Chat'\n ) : (\n <span>\n Participants <ParticipantCount count={peerCount} />\n </span>\n )}\n </Text>\n\n {showChat ? (\n <Chat screenType={screenType} />\n ) : (\n <ParticipantList offStageRoles={off_stage_roles} onActive={setActiveRole} />\n )}\n </>\n ) : (\n <Tabs.Root\n value={activeTab}\n onValueChange={setActiveTab}\n css={{\n flexDirection: 'column',\n size: '100%',\n }}\n >\n <Tabs.List css={{ w: 'calc(100% - $12)', p: '$2', borderRadius: '$2', bg: '$surface_default' }}>\n <Tabs.Trigger\n value={SIDE_PANE_OPTIONS.CHAT}\n onClick={toggleChat}\n css={{\n ...tabTriggerCSS,\n color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? '$on_surface_low' : '$on_surface_high',\n }}\n >\n Chat\n </Tabs.Trigger>\n <Tabs.Trigger\n value={SIDE_PANE_OPTIONS.PARTICIPANTS}\n onClick={toggleParticipants}\n css={{\n ...tabTriggerCSS,\n color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? '$on_surface_low' : '$on_surface_high',\n }}\n >\n Participants &nbsp; <ParticipantCount count={peerCount} />\n </Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value={SIDE_PANE_OPTIONS.PARTICIPANTS} css={{ p: 0 }}>\n <ParticipantList offStageRoles={off_stage_roles} onActive={setActiveRole} />\n </Tabs.Content>\n <Tabs.Content value={SIDE_PANE_OPTIONS.CHAT} css={{ p: 0 }}>\n <Chat screenType={screenType} />\n </Tabs.Content>\n </Tabs.Root>\n )}\n </>\n )}\n\n {isOverlayChat && isChatOpen ? null : (\n <IconButton\n css={{ position: 'absolute', right: '$9', top: '$11', '@md': { top: '$8', right: '$6' } }}\n onClick={e => {\n e.stopPropagation();\n if (activeTab === SIDE_PANE_OPTIONS.CHAT) {\n toggleChat();\n } else {\n toggleParticipants();\n }\n }}\n data-testid=\"close_chat\"\n >\n <CrossIcon />\n </IconButton>\n )}\n </Flex>\n );\n});\n", "import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n HMSNotificationTypes,\n selectHMSMessagesCount,\n selectPeerNameByID,\n selectPermissions,\n selectSessionStore,\n useHMSActions,\n useHMSNotifications,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { ChevronDownIcon, CrossIcon, PinIcon } from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig } from '../../../Theme';\nimport { AnnotisedMessage, ChatBody } from './ChatBody';\nimport { ChatFooter } from './ChatFooter';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useSetSubscribedChatSelector } from '../AppData/useUISettings';\nimport { useSetPinnedMessage } from '../hooks/useSetPinnedMessage';\nimport { useUnreadCount } from './useUnreadCount';\nimport { CHAT_SELECTOR, SESSION_STORE_KEY } from '../../common/constants';\n\nconst PINNED_MESSAGE_LENGTH = 80;\n\nconst PinnedMessage = ({ clearPinnedMessage }) => {\n const permissions = useHMSStore(selectPermissions);\n const pinnedMessage = useHMSStore(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGE));\n const formattedPinnedMessage =\n pinnedMessage?.length && pinnedMessage.length > PINNED_MESSAGE_LENGTH\n ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...`\n : pinnedMessage;\n\n return pinnedMessage ? (\n <Flex\n title={pinnedMessage}\n css={{ p: '$4', color: '$on_surface_medium', bg: '$surface_default', r: '$1', gap: '$4', mb: '$8', mt: '$8' }}\n align=\"center\"\n justify=\"between\"\n >\n <PinIcon />\n\n <Box\n css={{\n color: '$on_surface_medium',\n w: '100%',\n maxHeight: '$18',\n overflowY: 'auto',\n }}\n >\n <Text variant=\"sm\">\n <AnnotisedMessage message={formattedPinnedMessage} />\n </Text>\n </Box>\n {permissions.removeOthers && (\n <Flex\n onClick={() => clearPinnedMessage()}\n css={{ cursor: 'pointer', color: '$on_surface_medium', '&:hover': { color: '$on_surface_high' } }}\n >\n <CrossIcon />\n </Flex>\n )}\n </Flex>\n ) : null;\n};\n\nexport const Chat = ({ screenType }) => {\n const notification = useHMSNotifications(HMSNotificationTypes.PEER_LEFT);\n const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);\n const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);\n const peerName = useHMSStore(selectPeerNameByID(peerSelector));\n const [chatOptions, setChatOptions] = useState({\n role: roleSelector || '',\n peerId: peerSelector && peerName ? peerSelector : '',\n selection: roleSelector ? roleSelector : peerSelector && peerName ? peerName : 'Everyone',\n });\n const [isSelectorOpen] = useState(false);\n const listRef = useRef(null);\n const hmsActions = useHMSActions();\n const { setPinnedMessage } = useSetPinnedMessage();\n\n useEffect(() => {\n if (notification && notification.data && peerSelector === notification.data.id) {\n setPeerSelector('');\n setChatOptions({\n role: '',\n peerId: '',\n selection: 'Everyone',\n });\n }\n }, [notification, peerSelector, setPeerSelector]);\n\n const storeMessageSelector = selectHMSMessagesCount;\n const { elements } = useRoomLayoutConferencingScreen();\n const isMobile = useMedia(cssConfig.media.md);\n\n let isScrolledToBottom = false;\n if (listRef.current) {\n const currentRef = listRef.current._outerRef;\n isScrolledToBottom = currentRef.scrollHeight - currentRef.clientHeight - currentRef.scrollTop < 10;\n }\n\n const messagesCount = useHMSStore(storeMessageSelector) || 0;\n const scrollToBottom = useCallback(\n (unreadCount = 0) => {\n if (listRef.current && listRef.current.scrollToItem && unreadCount > 0) {\n listRef.current?.scrollToItem(messagesCount, 'end');\n requestAnimationFrame(() => {\n listRef.current?.scrollToItem(messagesCount, 'end');\n });\n hmsActions.setMessageRead(true);\n }\n },\n [hmsActions, messagesCount],\n );\n\n return (\n <Flex\n direction=\"column\"\n css={{\n size: '100%',\n gap: '$4',\n }}\n >\n {isMobile && elements?.chat?.is_overlay ? null : (\n <>{elements?.chat?.allow_pinning_messages ? <PinnedMessage clearPinnedMessage={setPinnedMessage} /> : null}</>\n )}\n\n <ChatBody\n role={chatOptions.role}\n peerId={chatOptions.peerId}\n ref={listRef}\n scrollToBottom={scrollToBottom}\n screenType={screenType}\n />\n <ChatFooter\n role={chatOptions.role}\n onSend={() => scrollToBottom(1)}\n selection={chatOptions.selection}\n screenType={screenType}\n onSelect={({ role, peerId, selection }) => {\n setChatOptions({\n role,\n peerId,\n selection,\n });\n setPeerSelector(peerId);\n setRoleSelector(role);\n }}\n peerId={chatOptions.peerId}\n >\n {!isSelectorOpen && !isScrolledToBottom && (\n <NewMessageIndicator role={chatOptions.role} peerId={chatOptions.peerId} scrollToBottom={scrollToBottom} />\n )}\n </ChatFooter>\n </Flex>\n );\n};\n\nconst NewMessageIndicator = ({ role, peerId, scrollToBottom }) => {\n const unreadCount = useUnreadCount({ role, peerId });\n if (!unreadCount) {\n return null;\n }\n return (\n <Flex\n justify=\"center\"\n css={{\n width: '100%',\n left: 0,\n bottom: '100%',\n position: 'absolute',\n }}\n >\n <Button\n variant=\"standard\"\n onClick={() => {\n scrollToBottom(unreadCount);\n }}\n icon\n css={{\n p: '$4',\n pl: '$8',\n pr: '$6',\n '& > svg': { ml: '$4' },\n borderRadius: '$round',\n position: 'relative',\n bottom: '$16',\n fontSize: '$xs',\n fontWeight: '$semiBold',\n c: '$on_secondary_high',\n }}\n >\n New {unreadCount === 1 ? 'message' : 'messages'}\n <ChevronDownIcon />\n </Button>\n </Flex>\n );\n};\n", "import React, { Fragment, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { useInView } from 'react-intersection-observer';\nimport { useMedia } from 'react-use';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { VariableSizeList } from 'react-window';\nimport {\n selectHMSMessages,\n selectLocalPeerID,\n selectLocalPeerRoleName,\n selectMessagesByPeerID,\n selectMessagesByRole,\n selectPeerNameByID,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { PinIcon, VerticalMenuIcon } from '@100mslive/react-icons';\nimport { Dropdown } from '../../../Dropdown';\nimport { IconButton } from '../../../IconButton';\nimport { Box, Flex } from '../../../Layout';\nimport { Text } from '../../../Text';\nimport { config as cssConfig, styled } from '../../../Theme';\nimport { Tooltip } from '../../../Tooltip';\nimport emptyChat from '../../images/empty-chat.svg';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\nimport { useSetPinnedMessage } from '../hooks/useSetPinnedMessage';\nimport { useUnreadCount } from './useUnreadCount';\n\nconst formatTime = date => {\n if (!(date instanceof Date)) {\n return '';\n }\n let hours = date.getHours();\n let mins = date.getMinutes();\n const suffix = hours > 11 ? 'PM' : 'AM';\n if (hours < 10) {\n hours = '0' + hours;\n }\n if (mins < 10) {\n mins = '0' + mins;\n }\n return `${hours}:${mins} ${suffix}`;\n};\n\nconst MessageTypeContainer = ({ left, right }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n ml: 'auto',\n mr: '$4',\n p: '$2 $4',\n border: '1px solid $border_bright',\n r: '$0',\n }}\n >\n {left && (\n <SenderName variant=\"tiny\" as=\"span\" css={{ color: '$on_surface_medium' }}>\n {left}\n </SenderName>\n )}\n {left && right && <Box css={{ borderLeft: '1px solid $border_bright', mx: '$4', h: '$8' }} />}\n {right && (\n <SenderName as=\"span\" variant=\"tiny\" css={{ textTransform: 'uppercase' }}>\n {right}\n </SenderName>\n )}\n </Flex>\n );\n};\n\nconst MessageType = ({ roles, hasCurrentUserSent, receiver }) => {\n const peerName = useHMSStore(selectPeerNameByID(receiver));\n const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);\n if (receiver) {\n return (\n <MessageTypeContainer\n left={hasCurrentUserSent ? `${peerName ? `TO ${peerName}` : ''}` : 'TO YOU'}\n right=\"PRIVATE\"\n />\n );\n }\n\n if (roles && roles.length) {\n return <MessageTypeContainer left=\"TO\" right={hasCurrentUserSent ? roles.join(',') : localPeerRoleName} />;\n }\n return null;\n};\n\nconst URL_REGEX =\n /^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;\n\nconst Link = styled('a', {\n color: '$primary_default',\n wordBreak: 'break-word',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const AnnotisedMessage = ({ message }) => {\n if (!message) {\n return <Fragment />;\n }\n\n return (\n <Fragment>\n {message\n .trim()\n .split(/(\\s)/)\n .map(part =>\n URL_REGEX.test(part) ? (\n <Link href={part} key={part} target=\"_blank\" rel=\"noopener noreferrer\">\n {part}\n </Link>\n ) : (\n part\n ),\n )}\n </Fragment>\n );\n};\n\nconst getMessageType = ({ roles, receiver }) => {\n if (roles && roles.length > 0) {\n return 'role';\n }\n return receiver ? 'private' : '';\n};\nconst ChatActions = ({ onPin, showPinAction }) => {\n const [open, setOpen] = useState(false);\n if (!showPinAction) {\n return null;\n }\n\n return (\n <Dropdown.Root open={open} onOpenChange={setOpen}>\n <Dropdown.Trigger className=\"chat_actions\" css={{ opacity: open ? 1 : 0, '@md': { opacity: 1 } }} asChild>\n <IconButton>\n <Tooltip title=\"More options\">\n <VerticalMenuIcon />\n </Tooltip>\n </IconButton>\n </Dropdown.Trigger>\n <Dropdown.Portal>\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{ width: '$48', backgroundColor: '$surface_bright', py: '$0', border: '1px solid $border_bright' }}\n >\n <Dropdown.Item data-testid=\"pin_message_btn\" onClick={onPin}>\n <PinIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Pin Message\n </Text>\n </Dropdown.Item>\n {/* {isMobile ? (\n <Dropdown.Item\n data-testid=\"copy_message_btn\"\n onClick={() => {\n try {\n navigator?.clipboard.writeText(messageContent);\n ToastManager.addToast({\n title: 'Message copied successfully',\n });\n } catch (e) {\n console.log(e);\n ToastManager.addToast({\n title: 'Could not copy message',\n });\n }\n }}\n >\n <CopyIcon />\n <Text variant=\"sm\" css={{ ml: '$4' }}>\n Copy Message\n </Text>\n </Dropdown.Item>\n ) : null} */}\n </Dropdown.Content>\n </Dropdown.Portal>\n </Dropdown.Root>\n );\n};\n\nconst SenderName = styled(Text, {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n maxWidth: '24ch',\n minWidth: 0,\n color: '$on_surface_high',\n fontWeight: '$semiBold',\n});\n\nconst ChatMessage = React.memo(\n ({ index, style = {}, message, setRowHeight, isLast = false, unreadCount = 0, scrollToBottom, onPin }) => {\n const { ref, inView } = useInView({ threshold: 0.5, triggerOnce: true });\n const rowRef = useRef(null);\n useEffect(() => {\n if (rowRef.current) {\n setRowHeight(index, rowRef.current.clientHeight);\n }\n }, [index, setRowHeight]);\n const isMobile = useMedia(cssConfig.media.md);\n const { elements } = useRoomLayoutConferencingScreen();\n const isOverlay = elements?.chat?.is_overlay && isMobile;\n const hmsActions = useHMSActions();\n const localPeerId = useHMSStore(selectLocalPeerID);\n const permissions = useHMSStore(selectPermissions);\n const messageType = getMessageType({\n roles: message.recipientRoles,\n receiver: message.recipientPeer,\n });\n // show pin action only if peer has remove others permission and the message is of broadcast type\n const showPinAction = permissions.removeOthers && !messageType && elements?.chat?.allow_pinning_messages;\n\n useEffect(() => {\n if (message.id && !message.read && inView) {\n hmsActions.setMessageRead(true, message.id);\n }\n }, [message.read, hmsActions, inView, message.id]);\n\n useEffect(() => {\n if (isLast && inView && unreadCount >= 1) {\n scrollToBottom(1);\n }\n }, [inView, isLast, scrollToBottom, unreadCount]);\n\n return (\n <Box\n ref={ref}\n as=\"div\"\n css={{ mb: '$10', pr: '$10', mt: '$8', '&:hover .chat_actions': { opacity: 1 } }}\n style={style}\n >\n <Flex\n ref={rowRef}\n align=\"center\"\n css={{\n flexWrap: 'wrap',\n // Theme independent color, token should not be used for transparent chat\n bg: messageType ? (isOverlay ? 'rgba(0, 0, 0, 0.64)' : '$surface_default') : undefined,\n r: messageType ? '$1' : undefined,\n px: messageType ? '$4' : '$2',\n py: messageType ? '$4' : 0,\n userSelect: 'none',\n }}\n key={message.time}\n data-testid=\"chat_msg\"\n >\n <Text\n css={{\n color: isOverlay ? '#FFF' : '$on_surface_high',\n fontWeight: '$semiBold',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n }}\n as=\"div\"\n >\n <Flex align=\"baseline\">\n {message.senderName === 'You' || !message.senderName ? (\n <SenderName as=\"span\" variant=\"sm\" css={{ color: isOverlay ? '#FFF' : '$on_surface_high' }}>\n {message.senderName || 'Anonymous'}\n </SenderName>\n ) : (\n <Tooltip title={message.senderName} side=\"top\" align=\"start\">\n <SenderName as=\"span\" variant=\"sm\" css={{ color: isOverlay ? '#FFF' : '$on_surface_high' }}>\n {message.senderName}\n </SenderName>\n </Tooltip>\n )}\n {!isOverlay ? (\n <Text\n as=\"span\"\n variant=\"xs\"\n css={{\n ml: '$4',\n color: '$on_surface_medium',\n flexShrink: 0,\n }}\n >\n {formatTime(message.time)}\n </Text>\n ) : null}\n </Flex>\n <MessageType\n hasCurrentUserSent={message.sender === localPeerId}\n receiver={message.recipientPeer}\n roles={message.recipientRoles}\n />\n {!isOverlay ? <ChatActions onPin={onPin} showPinAction={showPinAction} /> : null}\n </Text>\n <Text\n variant=\"sm\"\n css={{\n w: '100%',\n mt: '$2',\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n userSelect: 'all',\n color: isOverlay ? '#FFF' : '$on_surface_high',\n }}\n onClick={e => e.stopPropagation()}\n >\n <AnnotisedMessage message={message.message} />\n </Text>\n </Flex>\n </Box>\n );\n },\n);\nconst ChatList = React.forwardRef(\n ({ width, height, setRowHeight, getRowHeight, messages, unreadCount = 0, scrollToBottom }, listRef) => {\n const { setPinnedMessage } = useSetPinnedMessage();\n useLayoutEffect(() => {\n if (listRef.current && listRef.current.scrollToItem) {\n scrollToBottom(1);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [listRef]);\n\n return (\n <VariableSizeList\n ref={listRef}\n itemCount={messages.length}\n itemSize={getRowHeight}\n width={width}\n height={height - 1}\n style={{\n overflowX: 'hidden',\n }}\n >\n {({ index, style }) => (\n <ChatMessage\n style={style}\n index={index}\n key={messages[index].id}\n message={messages[index]}\n setRowHeight={setRowHeight}\n unreadCount={unreadCount}\n isLast={index >= messages.length - 2}\n scrollToBottom={scrollToBottom}\n onPin={() => setPinnedMessage(messages[index])}\n />\n )}\n </VariableSizeList>\n );\n },\n);\nconst VirtualizedChatMessages = React.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {\n const rowHeights = useRef({});\n\n function getRowHeight(index) {\n // 72 will be default row height for any message length\n // 16 will add margin value as clientHeight don't include margin\n return rowHeights.current[index] + 16 || 72;\n }\n\n const setRowHeight = useCallback(\n (index, size) => {\n listRef.current.resetAfterIndex(0);\n rowHeights.current = { ...rowHeights.current, [index]: size };\n },\n [listRef],\n );\n\n return (\n <Box\n css={{\n mr: '-$10',\n h: '100%',\n }}\n as=\"div\"\n >\n <AutoSizer\n style={{\n width: '90%',\n }}\n >\n {({ height, width }) => (\n <ChatList\n width={width}\n height={height}\n messages={messages}\n setRowHeight={setRowHeight}\n getRowHeight={getRowHeight}\n scrollToBottom={scrollToBottom}\n ref={listRef}\n unreadCount={unreadCount}\n />\n )}\n </AutoSizer>\n </Box>\n );\n});\n\nexport const ChatBody = React.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {\n const storeMessageSelector = role\n ? selectMessagesByRole(role)\n : peerId\n ? selectMessagesByPeerID(peerId)\n : selectHMSMessages;\n let messages = useHMSStore(storeMessageSelector);\n messages = useMemo(() => messages?.filter(message => message.type === 'chat') || [], [messages]);\n const isMobile = useMedia(cssConfig.media.md);\n const { elements } = useRoomLayoutConferencingScreen();\n const unreadCount = useUnreadCount({ role, peerId });\n\n if (messages.length === 0 && !(isMobile && elements?.chat?.is_overlay)) {\n return (\n <Flex\n css={{\n width: '100%',\n flex: '1 1 0',\n textAlign: 'center',\n px: '$4',\n }}\n align=\"center\"\n justify=\"center\"\n >\n <Box>\n <img src={emptyChat} alt=\"Empty Chat\" height={132} width={185} style={{ margin: '0 auto' }} />\n <Text variant=\"h5\" css={{ mt: '$8', c: '$on_surface_high' }}>\n Start a conversation\n </Text>\n <Text\n variant=\"sm\"\n css={{ mt: '$4', maxWidth: '80%', textAlign: 'center', mx: 'auto', c: '$on_surface_medium' }}\n >\n There are no messages here yet. Start a conversation by sending a message.\n </Text>\n </Box>\n </Flex>\n );\n }\n\n return (\n <Fragment>\n <VirtualizedChatMessages\n messages={messages}\n scrollToBottom={scrollToBottom}\n unreadCount={unreadCount}\n ref={listRef}\n />\n </Fragment>\n );\n});\n", "// @ts-check\nimport { useCallback } from 'react';\nimport {\n selectPeerNameByID,\n selectSessionMetadata,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { ToastManager } from '../Toast/ToastManager';\nimport { SESSION_STORE_KEY } from '../../common/constants';\n\n/**\n * set pinned chat message by updating the session store\n */\nexport const useSetPinnedMessage = () => {\n const hmsActions = useHMSActions();\n const vanillaStore = useHMSVanillaStore();\n const pinnedMessage = useHMSStore(selectSessionMetadata);\n\n const setPinnedMessage = useCallback(\n /**\n * @param {import(\"@100mslive/react-sdk\").HMSMessage | undefined} message\n */\n async message => {\n const peerName = vanillaStore.getState(selectPeerNameByID(message?.sender)) || message?.senderName;\n const newPinnedMessage = message ? (peerName ? `${peerName}: ${message.message}` : message.message) : null;\n if (newPinnedMessage !== pinnedMessage) {\n await hmsActions.sessionStore\n .set(SESSION_STORE_KEY.PINNED_MESSAGE, newPinnedMessage)\n .catch(err => ToastManager.addToast({ title: err.description }));\n }\n },\n [hmsActions, vanillaStore, pinnedMessage],\n );\n\n return { setPinnedMessage };\n};\n", "import {\n selectMessagesUnreadCountByPeerID,\n selectMessagesUnreadCountByRole,\n selectUnreadHMSMessagesCount,\n useHMSStore,\n} from '@100mslive/react-sdk';\n\nexport const useUnreadCount = ({ role, peerId }) => {\n const unreadCountSelector = role\n ? selectMessagesUnreadCountByRole(role)\n : peerId\n ? selectMessagesUnreadCountByPeerID(peerId)\n : selectUnreadHMSMessagesCount;\n\n const unreadCount = useHMSStore(unreadCountSelector);\n return unreadCount;\n};\n", "import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport data from '@emoji-mart/data';\nimport Picker from '@emoji-mart/react';\nimport { useHMSActions } from '@100mslive/react-sdk';\nimport { EmojiIcon, SendIcon } from '@100mslive/react-icons';\nimport { Box, config as cssConfig, Flex, IconButton as BaseIconButton, Popover, styled } from '../../..';\n// @ts-ignore\nimport { ToastManager } from '../Toast/ToastManager';\nimport { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// import { ChatSelectorContainer } from './ChatSelectorContainer';\n// @ts-ignore\nimport { useChatDraftMessage } from '../AppData/useChatState';\n// @ts-ignore\nimport { useEmojiPickerStyles } from './useEmojiPickerStyles';\n\nconst TextArea = styled('textarea', {\n width: '100%',\n bg: 'transparent',\n color: '$on_primary_high',\n resize: 'none',\n lineHeight: '1rem',\n position: 'relative',\n fontFamily: '$sans',\n fontSize: '100%',\n margin: 0,\n padding: 0,\n top: '$3',\n '&:focus': {\n boxShadow: 'none',\n outline: 'none',\n },\n});\n\nfunction EmojiPicker({ onSelect }: { onSelect: (emoji: any) => void }) {\n const [showEmoji, setShowEmoji] = useState(false);\n const ref = useEmojiPickerStyles(showEmoji);\n return (\n <Popover.Root open={showEmoji} onOpenChange={setShowEmoji}>\n <Popover.Trigger asChild css={{ appearance: 'none' }}>\n <BaseIconButton as=\"div\">\n <EmojiIcon />\n </BaseIconButton>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content\n alignOffset={-40}\n sideOffset={16}\n align=\"end\"\n css={{\n p: 0,\n }}\n >\n <Box\n css={{\n minWidth: 352,\n minHeight: 435,\n }}\n ref={ref}\n >\n <Picker onEmojiSelect={onSelect} data={data} previewPosition=\"none\" skinPosition=\"search\" />\n </Box>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n\nexport const ChatFooter = ({\n role,\n peerId,\n onSend,\n children /* onSelect, selection, screenType */,\n}: {\n role: any;\n peerId: string;\n onSend: any;\n children: ReactNode;\n}) => {\n const hmsActions = useHMSActions();\n const inputRef = useRef<HTMLTextAreaElement>(null);\n const [draftMessage, setDraftMessage] = useChatDraftMessage();\n const isMobile = useMedia(cssConfig.media.md);\n const { elements } = useRoomLayoutConferencingScreen();\n const isOverlayChat = elements?.chat?.is_overlay;\n\n const sendMessage = useCallback(async () => {\n const message = inputRef?.current?.value;\n if (!message || !message.trim().length) {\n return;\n }\n try {\n if (role) {\n await hmsActions.sendGroupMessage(message, [role]);\n } else if (peerId) {\n await hmsActions.sendDirectMessage(message, peerId);\n } else {\n await hmsActions.sendBroadcastMessage(message);\n }\n inputRef.current.value = '';\n setTimeout(() => {\n onSend();\n }, 0);\n } catch (error) {\n const err = error as Error;\n ToastManager.addToast({ title: err.message });\n }\n }, [role, peerId, hmsActions, onSend]);\n\n useEffect(() => {\n const messageElement = inputRef.current;\n if (messageElement) {\n messageElement.value = draftMessage;\n }\n }, [draftMessage]);\n\n useEffect(() => {\n const messageElement = inputRef.current;\n return () => {\n setDraftMessage(messageElement?.value || '');\n };\n }, [setDraftMessage]);\n\n return (\n <>\n {/* {screenType !== 'hls_live_streaming' ? (\n <ChatSelectorContainer onSelect={onSelect} role={role} peerId={peerId} selection={selection} />\n ) : null} */}\n <Flex align=\"center\" css={{ gap: '$4', w: '100%' }}>\n <Flex\n align=\"center\"\n css={{\n bg: isOverlayChat && isMobile ? '$surface_dim' : '$surface_default',\n minHeight: '$16',\n maxHeight: '$24',\n position: 'relative',\n py: '$6',\n pl: '$8',\n flexGrow: 1,\n r: '$1',\n '@md': {\n minHeight: 'unset',\n h: '$14',\n boxSizing: 'border-box',\n },\n }}\n >\n {children}\n <TextArea\n css={{\n c: '$on_surface_high',\n '&:valid ~ .send-msg': { color: '$on_surface_high' },\n '& ~ .send-msg': { color: '$on_surface_low' },\n '&::placeholder': { color: '$on_surface_medium' },\n }}\n placeholder=\"Send a message....\"\n ref={inputRef}\n required\n autoFocus={!isMobile}\n onKeyPress={async event => {\n if (event.key === 'Enter') {\n if (!event.shiftKey) {\n event.preventDefault();\n await sendMessage();\n }\n }\n }}\n autoComplete=\"off\"\n aria-autocomplete=\"none\"\n onPaste={e => e.stopPropagation()}\n onCut={e => e.stopPropagation()}\n onCopy={e => e.stopPropagation()}\n />\n {!isMobile ? (\n <EmojiPicker\n onSelect={(emoji: any) => {\n if (inputRef.current) {\n inputRef.current.value += ` ${emoji.native} `;\n }\n }}\n />\n ) : null}\n <BaseIconButton\n className=\"send-msg\"\n onClick={sendMessage}\n css={{\n ml: 'auto',\n height: 'max-content',\n mr: '$4',\n '&:hover': { c: isMobile ? '' : '$on_surface_medium' },\n }}\n data-testid=\"send_msg_btn\"\n >\n <SendIcon />\n </BaseIconButton>\n </Flex>\n </Flex>\n </>\n );\n};\n", "import { useCallback } from 'react';\nimport { selectAppData, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport { APP_DATA } from '../../common/constants';\n\nexport const useChatDraftMessage = () => {\n const hmsActions = useHMSActions();\n let chatDraftMessage = useHMSStore(selectAppData(APP_DATA.chatDraft));\n if (chatDraftMessage === undefined || chatDraftMessage === null) {\n chatDraftMessage = '';\n }\n const setDraftMessage = useCallback(\n message => {\n hmsActions.setAppData(APP_DATA.chatDraft, message, true);\n },\n [hmsActions],\n );\n return [chatDraftMessage, setDraftMessage];\n};\n", "import { useEffect, useRef } from 'react';\n\nexport const useEmojiPickerStyles = showing => {\n const ref = useRef(null);\n useEffect(() => {\n if (showing) {\n setTimeout(() => {\n const root = ref.current?.querySelector('em-emoji-picker')?.shadowRoot;\n const style = document.createElement('style');\n style.textContent = `\n #root {\n --em-rgb-color: var(--hms-ui-colors-on_surface_high);\n --em-rgb-input: var(--hms-ui-colors-on_primary_high);\n --em-color-border: var(--hms-ui-colors-surface_bright);\n --color-b: var(--hms-ui-colors-on_surface_high);\n --rgb-background: transparent;\n color: var(--hms-ui-colors-on_surface_high);\n font-family: var(--hms-ui-fonts-sans);\n }\n .sticky {\n top: 0.25rem;\n background-color: var(--hms-ui-colors-surface_bright);\n margin-top: 0.5rem;\n }\n `;\n root?.appendChild(style);\n }, 0);\n }\n }, [showing]);\n\n return ref;\n};\n", "import React, { useEffect, useState } from 'react';\nimport { useInView } from 'react-intersection-observer';\nimport { useMeasure } from 'react-use';\nimport { VariableSizeList } from 'react-window';\nimport { selectIsConnectedToRoom, useHMSStore, usePaginatedParticipants } from '@100mslive/react-sdk';\nimport { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';\nimport { IconButton } from '../../../IconButton';\nimport { Box, Flex } from '../../../Layout';\nimport { Loading } from '../../../Loading';\nimport { Text } from '../../../Text';\n// @ts-ignore: No implicit Any\nimport { Participant, ParticipantSearch } from './ParticipantList';\nimport { ItemData, itemKey, ROW_HEIGHT } from './RoleAccordion';\n// @ts-ignore: No implicit Any\nimport { useSidepaneReset } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { getFormattedCount } from '../../common/utils';\n\nconst LoadMoreParticipants = ({\n hasNext,\n loadMore,\n style,\n}: {\n hasNext: boolean;\n loadMore: () => Promise<void>;\n style: React.CSSProperties;\n}) => {\n const { ref, inView } = useInView();\n const [inProgress, setInProgress] = useState(false);\n\n useEffect(() => {\n if (hasNext && inView && !inProgress) {\n setInProgress(true);\n loadMore()\n .catch(console.error)\n .finally(() => setInProgress(false));\n }\n }, [hasNext, loadMore, inView, inProgress]);\n return (\n <Flex ref={ref} style={style} align=\"center\" justify=\"center\">\n {inProgress ? <Loading size={16} /> : null}\n </Flex>\n );\n};\n\nconst VirtualizedParticipantItem = React.memo(\n ({\n index,\n data,\n style,\n }: {\n index: number;\n data: ItemData & { hasNext: boolean; loadMorePeers: () => Promise<void> };\n style: React.CSSProperties;\n }) => {\n if (!data.peerList[index]) {\n return <LoadMoreParticipants hasNext={data.hasNext} loadMore={data.loadMorePeers} style={style} />;\n }\n return (\n <Participant\n key={data.peerList[index].id}\n peer={data.peerList[index]}\n isConnected={data.isConnected}\n style={style}\n />\n );\n },\n);\n\nexport const PaginatedParticipants = ({ roleName, onBack }: { roleName: string; onBack: () => void }) => {\n const { peers, total, hasNext, loadPeers, loadMorePeers } = usePaginatedParticipants({ role: roleName, limit: 20 });\n const [search, setSearch] = useState<string>('');\n const filteredPeers = peers.filter(p => p.name?.toLowerCase().includes(search));\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const [ref, { width }] = useMeasure<HTMLDivElement>();\n const height = ROW_HEIGHT * (filteredPeers.length + 1);\n const resetSidePane = useSidepaneReset();\n\n useEffect(() => {\n loadPeers();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Flex ref={ref} direction=\"column\" css={{ size: '100%', gap: '$4' }}>\n <Flex align=\"center\">\n <Flex align=\"center\" css={{ flex: '1 1 0', cursor: 'pointer' }} onClick={onBack}>\n <ChevronLeftIcon />\n <Text variant=\"lg\" css={{ flex: '1 1 0' }}>\n Participants\n </Text>\n </Flex>\n <IconButton\n onClick={e => {\n e.stopPropagation();\n resetSidePane();\n }}\n data-testid=\"close_sidepane\"\n >\n <CrossIcon />\n </IconButton>\n </Flex>\n <ParticipantSearch onSearch={(search: string) => setSearch(search)} placeholder={`Search for ${roleName}`} />\n <Flex direction=\"column\" css={{ border: '1px solid $border_default', borderRadius: '$1', flex: '1 1 0' }}>\n <Flex align=\"center\" css={{ height: ROW_HEIGHT, borderBottom: '1px solid $border_default', px: '$8' }}>\n <Text css={{ fontSize: '$space$7' }}>\n {roleName}({getFormattedCount(peers.length)}/{getFormattedCount(total)})\n </Text>\n </Flex>\n <Box css={{ flex: '1 1 0', overflowY: 'auto', overflowX: 'hidden', mr: '-$10' }}>\n <VariableSizeList\n itemSize={index => (index === filteredPeers.length + 1 ? 16 : ROW_HEIGHT)}\n itemData={{ peerList: filteredPeers, hasNext: hasNext(), loadMorePeers, isConnected: isConnected === true }}\n itemKey={itemKey}\n itemCount={filteredPeers.length + 1}\n width={width}\n height={height}\n >\n {VirtualizedParticipantItem}\n </VariableSizeList>\n </Box>\n </Flex>\n </Flex>\n );\n};\n", "import React from 'react';\nimport { ColoredTimeIcon } from '@100mslive/react-icons';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\n\nexport const WaitingView = React.memo(() => {\n return (\n <Box\n css={{\n overflow: 'hidden',\n w: '96%',\n maxWidth: '96%',\n h: '100%',\n m: 'auto',\n background: '$surface_default',\n borderRadius: '$3',\n }}\n data-testid=\"waiting_view\"\n >\n <Flex\n align=\"center\"\n direction=\"column\"\n css={{\n w: '$96',\n textAlign: 'center',\n margin: 'auto',\n h: '100%',\n justifyContent: 'center',\n gap: '$8',\n }}\n >\n <ColoredTimeIcon width=\"80px\" height=\"80px\" />\n <Flex\n direction=\"column\"\n css={{\n w: '$80',\n p: '$1',\n gap: '$4',\n }}\n >\n <Text color=\"white\" variant=\"h6\" css={{ '@md': { fontSize: '$md' } }}>\n Please wait\n </Text>\n <Text color=\"$on_surface_medium\" css={{ mt: '$4', '@md': { fontSize: '$sm' } }}>\n Sit back and relax till others let you join.\n </Text>\n </Flex>\n </Flex>\n </Box>\n );\n});\n", "import React from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSRoomState, selectRoomState, useHMSStore } from '@100mslive/react-sdk';\nimport { config as cssConfig, Flex } from '../../..';\n// @ts-ignore: No implicit any\nimport { Logo, SpeakerTag } from './HeaderComponents';\n// @ts-ignore: No implicit any\nimport { LiveStatus, RecordingStatus, StreamActions } from './StreamActions';\n// @ts-ignore: No implicit any\nimport { AudioOutputActions, CamaraFlipActions } from './common';\n\nexport const Header = () => {\n const roomState = useHMSStore(selectRoomState);\n const isMobile = useMedia(cssConfig.media.md);\n // Header should be present only inside the call - not in preview, leave room states\n if (roomState !== HMSRoomState.Connected) {\n return <></>;\n }\n return (\n <Flex justify=\"between\" align=\"center\" css={{ position: 'relative', height: '100%' }}>\n <Flex align=\"center\" gap=\"2\" css={{ position: 'absolute', left: '$10' }}>\n <Logo />\n <SpeakerTag />\n {isMobile && (\n <Flex align=\"center\" css={{ gap: '$4' }}>\n <LiveStatus />\n <RecordingStatus />\n </Flex>\n )}\n </Flex>\n <Flex\n align=\"center\"\n css={{\n position: 'absolute',\n right: '$10',\n gap: '$4',\n }}\n >\n <StreamActions />\n {isMobile ? (\n <>\n <CamaraFlipActions />\n <AudioOutputActions />\n </>\n ) : null}\n </Flex>\n </Flex>\n );\n};\n", "import React from 'react';\nimport {\n DeviceType,\n selectIsLocalVideoEnabled,\n selectLocalVideoTrackID,\n selectVideoTrackByID,\n useDevices,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { CameraFlipIcon, CheckIcon, CrossIcon, SpeakerIcon } from '@100mslive/react-icons';\nimport { HorizontalDivider } from '../../../Divider';\nimport { Label } from '../../../Label';\nimport { Box, Flex } from '../../../Layout';\nimport { Sheet } from '../../../Sheet';\nimport { Text } from '../../../Text';\nimport IconButton from '../../IconButton';\nimport { ToastManager } from '../Toast/ToastManager';\n\nexport const CamaraFlipActions = () => {\n const actions = useHMSActions();\n const { allDevices } = useDevices();\n const { videoInput } = allDevices;\n const isVideoOn = useHMSStore(selectIsLocalVideoEnabled);\n\n const videoTrackId = useHMSStore(selectLocalVideoTrackID);\n const localVideoTrack = useHMSStore(selectVideoTrackByID(videoTrackId));\n if (!videoInput || !videoInput?.length || !localVideoTrack?.facingMode) {\n return null;\n }\n return (\n <Box>\n <IconButton\n disabled={!isVideoOn}\n onClick={async () => {\n try {\n await actions.switchCamera();\n } catch (e) {\n ToastManager.addToast({\n title: `Error while flipping camera ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <CameraFlipIcon />\n </IconButton>\n </Box>\n );\n};\n\nexport const AudioOutputActions = () => {\n const { allDevices, selectedDeviceIDs, updateDevice } = useDevices();\n const { audioOutput } = allDevices;\n // don't show speaker selector where the API is not supported, and use\n // a generic word(\"Audio\") for Mic. In some cases(Chrome Android for e.g.) this changes both mic and speaker keeping them in sync.\n const shouldShowAudioOutput = 'setSinkId' in HTMLMediaElement.prototype;\n\n /**\n * Chromium browsers return an audioOutput with empty label when no permissions are given\n */\n const audioOutputFiltered = audioOutput?.filter(item => !!item.label) ?? [];\n if (!shouldShowAudioOutput || !audioOutputFiltered?.length > 0) {\n return null;\n }\n return (\n <AudioOutputSelectionSheet\n outputDevices={audioOutput}\n outputSelected={selectedDeviceIDs.outputDevices}\n onChange={async deviceId => {\n try {\n await updateDevice({\n deviceId,\n deviceType: DeviceType.audioOutput,\n });\n } catch (e) {\n ToastManager.addToast({\n title: `Error while changing audio output ${e.message || ''}`,\n variant: 'error',\n });\n }\n }}\n >\n <Box>\n <IconButton>\n <SpeakerIcon />\n </IconButton>\n </Box>\n </AudioOutputSelectionSheet>\n );\n};\n\nconst AudioOutputSelectionSheet = ({ outputDevices, outputSelected, onChange, children }) => {\n return (\n <Sheet.Root>\n <Sheet.Trigger asChild>{children}</Sheet.Trigger>\n <Sheet.Content>\n <Sheet.Title css={{ py: '$10', px: '$8', alignItems: 'center' }}>\n <Flex direction=\"row\" justify=\"between\" css={{ w: '100%' }}>\n <Text variant=\"h6\" css={{ display: 'flex' }}>\n Audio Output\n </Text>\n <Sheet.Close>\n <IconButton as=\"div\" data-testid=\"dialog_cross_icon\">\n <CrossIcon />\n </IconButton>\n </Sheet.Close>\n </Flex>\n </Sheet.Title>\n <HorizontalDivider />\n <Flex\n direction=\"column\"\n css={{\n px: '$8',\n maxHeight: '80vh',\n overflowY: 'scroll',\n }}\n >\n {outputDevices.map(audioDevice => {\n return (\n <SelectWithLabel\n key={audioDevice.deviceId}\n label={audioDevice.label}\n id={audioDevice.deviceId}\n checked={audioDevice.deviceId === outputSelected}\n onChange={() => onChange(audioDevice.deviceId)}\n />\n );\n })}\n </Flex>\n </Sheet.Content>\n </Sheet.Root>\n );\n};\n\nconst SelectWithLabel = ({ label, icon = <></>, checked, id, onChange }) => {\n return (\n <Flex\n align=\"center\"\n css={{\n my: '$2',\n py: '$8',\n w: '100%',\n borderBottom: '1px solid $border_default',\n }}\n onClick={onChange}\n >\n <Label\n htmlFor={id}\n css={{\n fontSize: '$md',\n fontWeight: '$semiBold',\n color: checked ? '$on_surface_high' : '$on_surface_low',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: '$8',\n flex: '1 1 0',\n }}\n >\n {icon}\n {label}\n </Label>\n {checked && <CheckIcon width={24} height={24} />}\n </Flex>\n );\n};\n", "import React, { Component } from 'react';\nimport { CopyIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { Tooltip } from '../../Tooltip';\nimport { ErrorWithSupportLink } from './AuthToken';\n\nexport class ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = { error: null, errorInfo: null, isErrorCopied: false };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(`react error boundary - ${error.message}`, error, errorInfo);\n // Catch errors in any components below and re-render with error message\n this.setState({\n error: error?.message,\n errorInfo: errorInfo,\n });\n }\n\n render() {\n if (this.state.errorInfo) {\n return (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n size: '100%',\n height: '100vh',\n width: '100%',\n color: '$on_primary_high',\n backgroundColor: '$background_default',\n }}\n >\n <Box css={{ position: 'relative', overflow: 'hidden', r: '$3', height: '100%', width: '100%' }}>\n <Flex\n direction=\"column\"\n css={{\n position: 'absolute',\n size: '100%',\n top: '33.33%',\n left: 0,\n }}\n >\n <div style={{ margin: '1.5rem', width: '100%' }}>\n <Text>Something went wrong</Text>\n <Text>Message: ${this.state.error}</Text>\n <br />\n {ErrorWithSupportLink(`Please reload to see if it works.`)}\n </div>\n <Flex>\n <Tooltip title=\"Reload page\">\n <Button\n onClick={() => {\n window.location.reload();\n }}\n css={{ mx: '$8' }}\n data-testid=\"join_again_btn\"\n >\n Reload\n </Button>\n </Tooltip>\n <Tooltip title=\"Copy error details to clipboard\">\n <Button\n onClick={() => {\n const { error, errorInfo } = this.state;\n navigator.clipboard.writeText(\n JSON.stringify({\n error,\n errorInfo,\n }),\n );\n this.setState({ isErrorCopied: true });\n }}\n css={{ mx: '$8' }}\n data-testid=\"join_again_btn\"\n >\n <CopyIcon /> {this.state.isErrorCopied ? 'Copied' : 'Copy Details'}\n </Button>\n </Tooltip>\n </Flex>\n\n <details style={{ whiteSpace: 'pre-wrap', margin: '1.5rem' }}>\n <Text>{this.state.error && this.state.error.toString()}</Text>\n <br />\n <Text>{JSON.stringify(this.state.errorInfo)}</Text>\n </details>\n </Flex>\n </Box>\n </Flex>\n );\n }\n\n return this.props.children;\n }\n}\n", "import React, { useEffect } from 'react';\nimport { useTheme } from '../../../';\nimport { FeatureFlagsInit } from '../../services/FeatureFlags';\n\nconst Init = () => {\n const { toggleTheme } = useTheme();\n\n useEffect(() => {\n window.toggleUiTheme = toggleTheme;\n }, [toggleTheme]);\n\n useEffect(() => {\n function resetHeight() {\n // reset the body height to that of the inner browser\n // The window.innerHeight property returns integer values. When the actual height is in decimal, window.innerHeight returns a larger value than the actual value. This can cause a scrollbar to appear on some screens.\n // Hence using window.visualViewport.height which returns a decimal value.\n document.body.style.height = `${window.visualViewport?.height || window.innerHeight}px`;\n }\n // reset the height whenever the window's resized\n window.addEventListener('resize', resetHeight);\n // called to initially set the height.\n resetHeight();\n return () => {\n window.removeEventListener('resize', resetHeight);\n };\n }, []);\n\n return <FeatureFlagsInit />;\n};\n\nexport { Init };\n", "import { useEffect } from 'react';\nimport {\n selectAppData,\n selectIsLocalAudioEnabled,\n selectIsLocalVideoEnabled,\n useHMSActions,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { APP_DATA, isMacOS } from '../../common/constants';\n\nlet isEvenListenersAttached = false;\nexport class KeyboardInputManager {\n #actions;\n #store;\n constructor(store, actions) {\n this.#actions = actions;\n this.#store = store;\n }\n #toggleAudio = async () => {\n const enabled = this.#store.getState(selectIsLocalAudioEnabled);\n await this.#actions.setLocalAudioEnabled(!enabled);\n };\n\n #toggleVideo = async () => {\n const enabled = this.#store.getState(selectIsLocalVideoEnabled);\n await this.#actions.setLocalVideoEnabled(!enabled);\n };\n\n #hideSidepane = () => {\n if (this.#store.getState(selectAppData(APP_DATA.sidePane))) {\n this.#actions.setAppData(APP_DATA.sidePane, '');\n }\n };\n\n #toggleStatsForNerds = () => {\n const uiSettings = this.#store.getState(selectAppData(APP_DATA.uiSettings));\n const statsEnabled = uiSettings.showStatsOnTiles;\n this.#actions.setAppData(APP_DATA.uiSettings, {\n ...uiSettings,\n showStatsOnTiles: !statsEnabled,\n });\n };\n\n #toggleHlsStats = () => {\n this.#actions.setAppData(APP_DATA.hlsStats, !this.#store.getState(selectAppData(APP_DATA.hlsStats)));\n };\n\n // eslint-disable-next-line complexity\n #keyDownHandler = async e => {\n const CONTROL_KEY = isMacOS ? e.metaKey : e.ctrlKey;\n const D_KEY = e.key === 'd' || e.key === 'D';\n const E_KEY = e.key === 'e' || e.key === 'E';\n const SNF_KEY = e.key === ']' || e.key === '}';\n\n const SHORTCUT_TOGGLE_AUDIO = CONTROL_KEY && D_KEY;\n const SHORTCUT_TOGGLE_VIDEO = CONTROL_KEY && E_KEY;\n const SHORTCUT_SIDEPANE_CLOSE = e.key === 'Escape';\n const SHORTCUT_STATS_FOR_NERDS = CONTROL_KEY && SNF_KEY;\n\n if (SHORTCUT_TOGGLE_AUDIO) {\n e.preventDefault();\n await this.#toggleAudio();\n } else if (SHORTCUT_TOGGLE_VIDEO) {\n e.preventDefault();\n await this.#toggleVideo();\n } else if (SHORTCUT_SIDEPANE_CLOSE) {\n this.#hideSidepane();\n } else if (SHORTCUT_STATS_FOR_NERDS) {\n this.#toggleHlsStats();\n this.#toggleStatsForNerds();\n }\n };\n\n #bind = () => {\n document.addEventListener('keydown', this.#keyDownHandler, false);\n };\n\n #unbind = () => {\n document.removeEventListener('keydown', this.#keyDownHandler, false);\n };\n\n bindAllShortcuts = () => {\n if (!isEvenListenersAttached) {\n this.#bind();\n isEvenListenersAttached = true;\n }\n };\n\n unbindAllShortcuts = () => {\n if (isEvenListenersAttached) {\n this.#unbind();\n isEvenListenersAttached = false;\n }\n };\n}\n\nexport const KeyboardHandler = () => {\n const store = useHMSVanillaStore();\n const actions = useHMSActions();\n\n useEffect(() => {\n const keyboardManager = new KeyboardInputManager(store, actions);\n keyboardManager.bindAllShortcuts();\n return keyboardManager.unbindAllShortcuts;\n }, [actions, store]);\n return null;\n};\n", "import React from 'react';\nimport { ExitIcon } from '@100mslive/react-icons';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from './Toast/ToastManager';\nimport { Button } from '../../Button';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { useHMSAppStateContext } from '../AppStateContext';\nimport { Header } from './Header';\n// @ts-ignore: No implicit Any\nimport { defaultPreviewPreference, UserPreferencesKeys, useUserPreferences } from './hooks/useUserPreferences';\nimport { textEllipsis } from '../../utils';\n\nexport const LeaveScreen = () => {\n const { rejoin } = useHMSAppStateContext();\n const [previewPreference] = useUserPreferences(UserPreferencesKeys.PREVIEW, defaultPreviewPreference);\n return (\n <Flex direction=\"column\" css={{ size: '100%' }}>\n <Box css={{ h: '$18', '@md': { h: '$17' } }} data-testid=\"header\">\n <Header />\n </Box>\n <Flex\n justify=\"center\"\n direction=\"column\"\n align=\"center\"\n css={{ bg: '$background_dim', flex: '1 1 0', position: 'relative' }}\n >\n <Text variant=\"h2\" css={{ fontWeight: '$semiBold' }}>\n \uD83D\uDC4B\n </Text>\n <Text variant=\"h4\" css={{ color: '$on_surface_high', fontWeight: '$semiBold', mt: '$12' }}>\n You left the room\n </Text>\n <Text\n variant=\"body1\"\n css={{\n color: '$on_surface_medium',\n mt: '$8',\n fontWeight: '$regular',\n textAlign: 'center',\n }}\n >\n Have a nice day\n {previewPreference.name && (\n <Box as=\"span\" css={{ ...textEllipsis(100) }}>\n , {previewPreference.name}\n </Box>\n )}\n !\n </Text>\n <Flex css={{ mt: '$14', gap: '$10', alignItems: 'center' }}>\n <Text variant=\"body1\" css={{ color: '$on_surface_medium', fontWeight: '$regular' }}>\n Left by mistake?\n </Text>\n <Button\n onClick={() => {\n rejoin();\n ToastManager.clearAllToast();\n }}\n data-testid=\"join_again_btn\"\n >\n <ExitIcon />\n <Text css={{ ml: '$3', fontWeight: '$semiBold', color: 'inherit' }}>Rejoin</Text>\n </Button>\n </Flex>\n </Flex>\n </Flex>\n );\n};\n", "import React, { useContext, useEffect } from 'react';\nimport { usePreviousDistinct } from 'react-use';\nimport { HMSRoomState, selectRoomState, useHMSStore } from '@100mslive/react-sdk';\nimport { useRoomLayout } from './provider/roomLayoutProvider';\nimport { useRedirectToLeave } from './components/hooks/useRedirectToLeave';\nimport {\n useRoomLayoutLeaveScreen,\n useRoomLayoutPreviewScreen,\n} from './provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n\nexport enum PrebuiltStates {\n MEETING = 'meeting',\n PREVIEW = 'preview',\n LEAVE = 'leave',\n}\n\ntype AppStateContextType = {\n rejoin: () => void;\n};\n\nexport const AppStateContext = React.createContext<AppStateContextType>({\n rejoin: () => {\n console.log('Rejoin');\n },\n});\n\nAppStateContext.displayName = 'AppStateContext';\n\nexport const useHMSAppStateContext = () => {\n const context = useContext(AppStateContext);\n if (!context) {\n throw Error('Make sure AppStateContext.Provider is present at the top level of your application');\n }\n return context;\n};\n\nexport const useAppStateManager = () => {\n const roomLayout = useRoomLayout();\n const [activeState, setActiveState] = React.useState<PrebuiltStates | undefined>();\n const roomState = useHMSStore(selectRoomState);\n const prevRoomState = usePreviousDistinct(roomState);\n const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const { redirectToLeave } = useRedirectToLeave();\n\n const rejoin = () => {\n setActiveState(isPreviewScreenEnabled ? PrebuiltStates.PREVIEW : PrebuiltStates.MEETING);\n };\n\n useEffect(() => {\n if (!roomLayout) {\n return;\n }\n if (roomState === HMSRoomState.Connected) {\n setActiveState(PrebuiltStates.MEETING);\n } else if (\n prevRoomState &&\n [HMSRoomState.Reconnecting, HMSRoomState.Connected].includes(prevRoomState) &&\n [HMSRoomState.Disconnecting, HMSRoomState.Disconnected].includes(roomState)\n ) {\n redirectToLeave().then(() => {\n const goTo = isPreviewScreenEnabled ? PrebuiltStates.PREVIEW : PrebuiltStates.MEETING;\n setActiveState(isLeaveScreenEnabled ? PrebuiltStates.LEAVE : goTo);\n });\n } else if (!prevRoomState && roomState === HMSRoomState.Disconnected) {\n setActiveState(isPreviewScreenEnabled ? PrebuiltStates.PREVIEW : PrebuiltStates.MEETING);\n }\n }, [roomLayout, roomState, isLeaveScreenEnabled, isPreviewScreenEnabled, prevRoomState, redirectToLeave]);\n\n return { activeState, rejoin };\n};\n", "import { useCallback } from 'react';\nimport { useHMSPrebuiltContext } from '../../AppContext';\n// @ts-ignore: No implicit Any\nimport { PictureInPicture } from '../PIP/PIPManager';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\n\nexport const useRedirectToLeave = () => {\n const { onLeave } = useHMSPrebuiltContext();\n\n const redirect = useCallback(\n (timeout = 0) => {\n return new Promise<void>(resolve => {\n setTimeout(() => {\n PictureInPicture.stop().catch(() => console.error('stopping pip'));\n ToastManager.clearAllToast();\n onLeave?.();\n resolve();\n }, timeout);\n });\n },\n [onLeave],\n );\n\n return { redirectToLeave: redirect };\n};\n", "import React, { useEffect, useState } from 'react';\nimport { RefreshIcon } from '@100mslive/react-icons';\nimport { Button } from '../../Button';\nimport { Box, Flex } from '../../Layout';\nimport { Dialog } from '../../Modal';\nimport { Text } from '../../Text';\n\nexport const MwebLandscapePrompt = () => {\n const [showMwebLandscapePrompt, setShowMwebLandscapePrompt] = useState(false);\n\n useEffect(() => {\n const handleRotation = () => {\n const angle = window.screen.orientation.angle;\n const type = window.screen.orientation.type;\n // Angle check needed to diff bw mobile and desktop\n setShowMwebLandscapePrompt(angle >= 90 && type.includes('landscape'));\n };\n handleRotation();\n window.screen.orientation.addEventListener('change', handleRotation);\n\n return () => {\n window.screen.orientation.removeEventListener('change', handleRotation);\n };\n }, []);\n\n return (\n <Dialog.Root open={showMwebLandscapePrompt} onOpenChange={setShowMwebLandscapePrompt}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(420px, 90%)', p: '$8', bg: '$surface_dim' }}>\n <Box>\n <Flex\n css={{\n color: '$primary_default',\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <RefreshIcon style={{ marginRight: '0.5rem' }} />\n <Text variant=\"lg\" css={{ color: '$on_surface_high', fontWeight: '$semiBold' }}>\n Please rotate your device\n </Text>\n </Flex>\n <Text variant=\"sm\" css={{ color: '$on_surface_medium', mb: '$8', mt: '$4' }}>\n We do not support landscape mode as of now, please use the app in portrait mode for the best experience.\n </Text>\n <Flex align=\"center\" justify=\"between\" css={{ w: '100%', gap: '$8' }}>\n <Button outlined variant=\"standard\" css={{ w: '100%' }} onClick={() => setShowMwebLandscapePrompt(false)}>\n Continue anyway\n </Button>\n </Flex>\n </Box>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "/* eslint-disable no-case-declarations */\nimport React, { useCallback, useEffect } from 'react';\nimport {\n HMSNotificationTypes,\n HMSRoleChangeRequest,\n HMSRoomState,\n selectHasPeerHandRaised,\n selectLocalPeerID,\n selectPeerNameByID,\n selectRoomState,\n useCustomEvent,\n useHMSNotifications,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { Button } from '../../..';\nimport { useUpdateRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport { ToastBatcher } from '../Toast/ToastBatcher';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\nimport { AutoplayBlockedModal } from './AutoplayBlockedModal';\nimport { InitErrorModal } from './InitErrorModal';\nimport { PeerNotifications } from './PeerNotifications';\nimport { PermissionErrorModal } from './PermissionErrorModal';\nimport { ReconnectNotifications } from './ReconnectNotifications';\nimport { TrackBulkUnmuteModal } from './TrackBulkUnmuteModal';\nimport { TrackNotifications } from './TrackNotifications';\nimport { TrackUnmuteModal } from './TrackUnmuteModal';\n// @ts-ignore: No implicit Any\nimport { usePollViewToggle } from '../AppData/useSidepane';\n// @ts-ignore: No implicit Any\nimport { useIsNotificationDisabled, useSubscribedNotifications } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { getMetadata } from '../../common/utils';\n// @ts-ignore: No implicit Any\nimport { ROLE_CHANGE_DECLINED } from '../../common/constants';\nexport function Notifications() {\n const localPeerID = useHMSStore(selectLocalPeerID);\n const notification = useHMSNotifications();\n const subscribedNotifications = useSubscribedNotifications() || {};\n const roomState = useHMSStore(selectRoomState);\n const updateRoomLayoutForRole = useUpdateRoomLayout();\n const isNotificationDisabled = useIsNotificationDisabled();\n const vanillaStore = useHMSVanillaStore();\n const togglePollView = usePollViewToggle();\n\n const handleRoleChangeDenied = useCallback((request: HMSRoleChangeRequest & { peerName: string }) => {\n ToastManager.addToast({\n title: `${request.peerName} denied your request to join the ${request.role.name} role`,\n variant: 'error',\n });\n }, []);\n\n useCustomEvent({ type: ROLE_CHANGE_DECLINED, onEvent: handleRoleChangeDenied });\n\n useEffect(() => {\n if (!notification || isNotificationDisabled) {\n return;\n }\n switch (notification.type) {\n case HMSNotificationTypes.HAND_RAISE_CHANGED: {\n if (roomState !== HMSRoomState.Connected || notification.data.isLocal) {\n return;\n }\n const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));\n if (hasPeerHandRaised) {\n ToastBatcher.showToast({ notification, type: 'RAISE_HAND' });\n }\n break;\n }\n case HMSNotificationTypes.METADATA_UPDATED:\n if (roomState !== HMSRoomState.Connected) {\n return;\n }\n // Don't show toast message when metadata is updated and raiseHand is false.\n // Don't show toast message in case of local peer.\n const metadata = getMetadata(notification.data?.metadata);\n if (!metadata?.isHandRaised || notification.data.isLocal) return;\n\n console.debug('Metadata updated', notification.data);\n if (!subscribedNotifications.METADATA_UPDATED) return;\n ToastBatcher.showToast({ notification, type: 'RAISE_HAND' });\n break;\n case HMSNotificationTypes.NAME_UPDATED:\n console.log(notification.data.id + ' changed their name to ' + notification.data.name);\n break;\n case HMSNotificationTypes.ERROR:\n if (notification.data?.isTerminal && notification.data?.action !== 'INIT') {\n if ([500, 6008].includes(notification.data?.code)) {\n ToastManager.addToast({\n title: `Error: ${notification.data?.message}`,\n });\n } else {\n ToastManager.addToast({\n title:\n notification.data?.message ||\n 'We couldn\u2019t reconnect you. When you\u2019re back online, try joining the room.',\n close: false,\n });\n }\n return;\n }\n // Autoplay error or user denied screen share (cancelled browser pop-up)\n if (notification.data?.code === 3008 || notification.data?.code === 3001 || notification.data?.code === 3011) {\n return;\n }\n if (notification.data?.action === 'INIT') {\n return;\n }\n if (!subscribedNotifications.ERROR) return;\n ToastManager.addToast({\n title: `Error: ${notification.data?.message} - ${notification.data?.description}`,\n });\n break;\n case HMSNotificationTypes.ROLE_UPDATED: {\n if (notification.data?.isLocal && notification.data?.roleName) {\n ToastManager.addToast({\n title: `You are now a ${notification.data.roleName}`,\n });\n updateRoomLayoutForRole?.(notification.data.roleName);\n }\n break;\n }\n case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:\n const track = notification.data?.track;\n if (!notification.data.enabled) {\n ToastManager.addToast({\n title: `Your ${track.source} ${track.type} was muted by\n ${notification.data.requestedBy?.name}.`,\n });\n }\n break;\n case HMSNotificationTypes.REMOVED_FROM_ROOM:\n case HMSNotificationTypes.ROOM_ENDED:\n ToastManager.addToast({\n title: `${notification.message}. \n ${notification.data.reason && `Reason: ${notification.data.reason}`}`,\n });\n break;\n case HMSNotificationTypes.DEVICE_CHANGE_UPDATE:\n ToastManager.addToast({\n title: notification.message,\n });\n break;\n\n case HMSNotificationTypes.POLL_STARTED:\n if (notification.data.startedBy !== localPeerID) {\n const pollStartedBy = vanillaStore.getState(selectPeerNameByID(notification.data.startedBy));\n ToastManager.addToast({\n title: `${pollStartedBy} started a ${notification.data.type}: ${notification.data.title}`,\n action: (\n <Button\n onClick={() => togglePollView(notification.data.id)}\n variant=\"standard\"\n css={{\n backgroundColor: '$surface_bright',\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n p: '$xs $md',\n }}\n >\n Vote\n </Button>\n ),\n });\n }\n break;\n default:\n break;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [notification, subscribedNotifications.ERROR, subscribedNotifications.METADATA_UPDATED]);\n\n if (isNotificationDisabled) {\n return null;\n }\n\n return (\n <>\n <TrackUnmuteModal />\n <TrackBulkUnmuteModal />\n <TrackNotifications />\n {roomState === HMSRoomState.Connected ? <PeerNotifications /> : null}\n <ReconnectNotifications />\n <AutoplayBlockedModal />\n <PermissionErrorModal />\n <InitErrorModal />\n </>\n );\n}\n", "import React, { useCallback } from 'react';\nimport { selectPeerByID, useHMSActions, useHMSStore } from '@100mslive/react-sdk';\nimport {\n ChatUnreadIcon,\n ConnectivityIcon,\n HandIcon,\n PeopleAddIcon,\n PeopleRemoveIcon,\n PoorConnectivityIcon,\n} from '@100mslive/react-icons';\nimport { Button } from '../../../Button';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\nimport { useIsSidepaneTypeOpen, useSidepaneToggle } from '../AppData/useSidepane';\nimport { SIDE_PANE_OPTIONS } from '../../common/constants';\n\nconst ChatAction = React.forwardRef((_, ref) => {\n const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);\n const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);\n\n if (isChatOpen) {\n return null;\n }\n\n return (\n <Button outlined as=\"div\" variant=\"standard\" css={{ w: 'max-content' }} onClick={toggleChat} ref={ref}>\n Open Chat\n </Button>\n );\n});\n\nconst HandRaiseAction = React.forwardRef(({ id = '', isSingleHandRaise = true }, ref) => {\n const hmsActions = useHMSActions();\n const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);\n const peer = useHMSStore(selectPeerByID(id));\n const layout = useRoomLayout();\n const {\n bring_to_stage_label,\n on_stage_role,\n off_stage_roles = [],\n } = layout?.screens?.conferencing?.default?.elements.on_stage_exp || {};\n\n const onClickHandler = useCallback(() => {\n if (isSingleHandRaise) {\n hmsActions.changeRoleOfPeer(id, on_stage_role);\n } else {\n !isParticipantsOpen && toggleSidepane();\n }\n }, [hmsActions, id, isParticipantsOpen, isSingleHandRaise, on_stage_role, toggleSidepane]);\n\n // show nothing if handRaise is single and peer role is not hls\n if (isSingleHandRaise && (!peer || !off_stage_roles.includes(peer.roleName))) {\n return null;\n }\n return (\n <Button outlined as=\"div\" variant=\"standard\" css={{ w: 'max-content' }} onClick={onClickHandler} ref={ref}>\n {isSingleHandRaise ? bring_to_stage_label : 'View'}\n </Button>\n );\n});\nexport const ToastConfig = {\n PEER_LIST: {\n single: function (notification) {\n if (notification.data.length === 1) {\n return {\n title: `${notification.data[0]?.name} joined`,\n icon: <PeopleAddIcon />,\n };\n }\n return {\n title: `${notification.data[notification.data.length - 1]?.name} and ${\n notification.data.length - 1\n } others joined`,\n icon: <PeopleAddIcon />,\n };\n },\n multiple: notifications => {\n return {\n title: `${notifications[0].data.name} and ${notifications.length - 1} others joined`,\n icon: <PeopleAddIcon />,\n };\n },\n },\n PEER_JOINED: {\n single: function (notification) {\n return {\n title: `${notification.data?.name} joined`,\n icon: <PeopleAddIcon />,\n };\n },\n multiple: function (notifications) {\n return {\n title: `${notifications[notifications.length - 1].data.name} and ${notifications.length - 1} others joined`,\n icon: <PeopleAddIcon />,\n };\n },\n },\n PEER_LEFT: {\n single: function (notification) {\n return {\n title: `${notification.data?.name} left`,\n icon: <PeopleRemoveIcon />,\n };\n },\n multiple: function (notifications) {\n return {\n title: `${notifications[notifications.length - 1].data.name} and ${notifications.length - 1} others left`,\n icon: <PeopleRemoveIcon />,\n };\n },\n },\n RAISE_HAND: {\n single: notification => {\n return {\n title: `${notification.data?.name} raised hand`,\n icon: <HandIcon />,\n action: <HandRaiseAction id={notification.data?.id} />,\n };\n },\n multiple: notifications => {\n const count = new Set(notifications.map(notification => notification.data?.id)).size;\n return {\n title: `${notifications[notifications.length - 1].data?.name} ${\n count > 1 ? `${count} and others` : ''\n } raised hand`,\n icon: <HandIcon />,\n action: <HandRaiseAction isSingleHandRaise={false} />,\n };\n },\n },\n NEW_MESSAGE: {\n single: notification => {\n return {\n title: `New message from ${notification.data?.senderName}`,\n icon: <ChatUnreadIcon />,\n action: <ChatAction />,\n };\n },\n multiple: notifications => {\n return {\n title: `${notifications.length} new messages`,\n icon: <ChatUnreadIcon />,\n action: <ChatAction />,\n };\n },\n },\n RECONNECTED: {\n single: () => {\n return {\n title: `You are now connected`,\n icon: <ConnectivityIcon />,\n variant: 'success',\n duration: 3000,\n };\n },\n },\n RECONNECTING: {\n single: message => {\n return {\n title: `You are offline for now. while we try to reconnect, please check\n your internet connection. ${message}.\n `,\n icon: <PoorConnectivityIcon />,\n variant: 'warning',\n duration: 30000,\n };\n },\n },\n};\n", "import { ToastConfig } from './ToastConfig';\nimport { ToastManager } from './ToastManager';\n\nexport const ToastBatcher = {\n toastsType: new Map(),\n showToastInternal({ notification, duration, type }) {\n let notificationType = type;\n if (!type) {\n notificationType = notification.type;\n }\n const toastType = this.toastsType.has(notificationType);\n if (toastType) {\n let { notifications } = this.toastsType.get(notificationType);\n const { id } = this.toastsType.get(notificationType);\n notifications.push(notification);\n const toastObject = ToastConfig[notificationType].multiple(notifications);\n const toastId = ToastManager.replaceToast(id, {\n ...toastObject,\n duration: duration,\n });\n this.toastsType.set(notificationType, {\n id: toastId,\n notifications: notifications,\n duration: duration,\n });\n } else {\n const toastObject = ToastConfig[notificationType].single(notification);\n const toastId = ToastManager.addToast({\n ...toastObject,\n duration: duration,\n });\n let notifications = [];\n notifications.push(notification);\n this.toastsType.set(notificationType, {\n id: toastId,\n notifications: [...notifications],\n duration: duration,\n });\n }\n },\n showToast({ notification, duration = 3000, type }) {\n try {\n this.showToastInternal({ notification, duration, type });\n } catch (err) {\n console.debug('Notifications', err);\n }\n },\n syncUItoast(toastsDisplaying) {\n for (const [toastType, toastInfo] of this.toastsType.entries()) {\n if (!toastsDisplaying.find(toast => toast.id === toastInfo.id)) {\n this.toastsType.delete(toastType);\n }\n }\n },\n};\n\nToastManager.addListener(ToastBatcher.syncUItoast.bind(ToastBatcher));\n", "import React from 'react';\nimport { useAutoplayError } from '@100mslive/react-sdk';\nimport { Button, Dialog, Text } from '../../..';\n// @ts-ignore: No implicit Any\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\n\nexport function AutoplayBlockedModal() {\n const { error, resetError, unblockAudio } = useAutoplayError();\n return (\n <Dialog.Root\n open={!!error}\n onOpenChange={value => {\n if (!value) {\n unblockAudio();\n }\n resetError();\n }}\n >\n <DialogContent title=\"Permission Error\" closeable={false}>\n <DialogRow>\n <Text variant=\"md\">\n The browser wants us to get a confirmation for playing the Audio. Please allow audio to proceed.\n </Text>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button\n variant=\"primary\"\n onClick={() => {\n unblockAudio();\n resetError();\n }}\n >\n Allow Audio\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n}\n", "import React, { useEffect, useState } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\nimport { Text } from '../../..';\n// @ts-ignore: No implicit Any\nimport { ErrorDialog } from '../../primitives/DialogContent';\n\nexport const InitErrorModal = () => {\n const notification = useHMSNotifications(HMSNotificationTypes.ERROR);\n const [showModal, setShowModal] = useState(false);\n const [info, setInfo] = useState({ title: 'Init Error', description: '' });\n\n useEffect(() => {\n const data = notification?.data;\n if (!data || data.action !== 'INIT') {\n return;\n }\n let description;\n let title;\n if (data.description.includes('role is invalid')) {\n description = 'This role does not exist for the given room. Try again with a valid role.';\n title = 'Invalid Role';\n } else if (data.description.includes('room is not active')) {\n title = 'Room is disabled';\n description =\n 'This room is disabled and cannot be joined. To enable the room, use the 100ms dashboard or the API.';\n } else {\n description = data.description;\n title = 'Init Error';\n }\n setInfo({ title, description });\n setShowModal(true);\n }, [notification]);\n\n return (\n <ErrorDialog open={showModal} onOpenChange={setShowModal} title={info.title}>\n <Text variant=\"sm\" css={{ wordBreak: 'break-word' }}>\n {info.description} <br />\n Current URL - {window.location.href}\n </Text>\n </ErrorDialog>\n );\n};\n", "import { useEffect } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { ToastBatcher } from '../Toast/ToastBatcher';\n// @ts-ignore: No implicit Any\nimport { useSubscribedNotifications } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { SUBSCRIBED_NOTIFICATIONS } from '../../common/constants';\n\nconst notificationTypes = [\n HMSNotificationTypes.PEER_LIST,\n HMSNotificationTypes.PEER_JOINED,\n HMSNotificationTypes.PEER_LEFT,\n];\n\nexport const PeerNotifications = () => {\n const notification = useHMSNotifications(notificationTypes);\n const isPeerJoinSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_JOINED);\n const isPeerLeftSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_LEFT);\n useEffect(() => {\n if (!notification?.data) {\n return;\n }\n\n console.debug(`[${notification.type}]`, notification);\n switch (notification.type) {\n case HMSNotificationTypes.PEER_LIST:\n if (!isPeerJoinSubscribed || notification.data.length === 0) {\n return;\n }\n break;\n case HMSNotificationTypes.PEER_JOINED:\n if (!isPeerJoinSubscribed) {\n return;\n }\n break;\n case HMSNotificationTypes.PEER_LEFT:\n if (!isPeerLeftSubscribed) {\n return;\n }\n break;\n default:\n return;\n }\n\n ToastBatcher.showToast({ notification });\n }, [notification, isPeerJoinSubscribed, isPeerLeftSubscribed]);\n\n return null;\n};\n", "import React, { useEffect, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\nimport { Button, config as cssConfig, Dialog, Flex, Text } from '../../..';\n// @ts-ignore: No implicit Any\nimport androidPermissionAlert from '../../images/android-perm-1.png';\n// @ts-ignore: No implicit Any\nimport iosPermissions from '../../images/ios-perm-0.png';\n// @ts-ignore: No implicit Any\nimport { isAndroid, isIOS } from '../../common/constants';\n\nexport function PermissionErrorModal() {\n const notification = useHMSNotifications(HMSNotificationTypes.ERROR);\n const [deviceType, setDeviceType] = useState('');\n const [isSystemError, setIsSystemError] = useState(false);\n const isMobile = useMedia(cssConfig.media.md);\n\n useEffect(() => {\n if (\n !notification ||\n (notification.data?.code !== 3001 && notification.data?.code !== 3011) ||\n (notification.data?.code === 3001 && notification.data?.message.includes('screen'))\n ) {\n return;\n }\n console.error(`[${notification.type}]`, notification);\n const errorMessage = notification.data?.message;\n const hasAudio = errorMessage.includes('audio');\n const hasVideo = errorMessage.includes('video');\n const hasScreen = errorMessage.includes('screen');\n if (hasAudio && hasVideo) {\n setDeviceType('camera and microphone');\n } else if (hasAudio) {\n setDeviceType('microphone');\n } else if (hasVideo) {\n setDeviceType('camera');\n } else if (hasScreen) {\n setDeviceType('screen');\n }\n setIsSystemError(notification.data.code === 3011);\n }, [notification]);\n\n return deviceType ? (\n <Dialog.Root open={!!deviceType}>\n <Dialog.Portal>\n <Dialog.Overlay />\n <Dialog.Content css={{ w: 'min(380px, 90%)', p: '$8' }}>\n <Dialog.Title\n css={{\n borderBottom: '1px solid $border_default',\n }}\n >\n {isMobile && isIOS ? (\n <img style={{ maxWidth: '100%', maxHeight: '100%' }} src={iosPermissions} alt=\"iOS Permission flow\" />\n ) : null}\n\n {/* Images for android */}\n {isMobile && isAndroid ? (\n <img\n src={androidPermissionAlert}\n style={{ maxWidth: '100%', maxHeight: '100%' }}\n alt=\"Android Permission flow \"\n />\n ) : null}\n\n <Text variant=\"h6\">We can't access your {deviceType}</Text>\n </Dialog.Title>\n\n <Text variant=\"sm\" css={{ pt: '$4', pb: '$10', color: '$on_surface_medium' }}>\n {/* IOS prompt text */}\n {isMobile && isIOS\n ? 'Enable permissions by reloading this page and clicking \"Allow\" on the pop-up, or change settings from the address bar.'\n : null}\n\n {/* Prompt for android devices */}\n {isMobile && isAndroid\n ? `To allow other users to see and hear you, click the blocked camera icon in your browser's address bar.`\n : null}\n\n {/* Prompt for desktops */}\n {!isMobile ? `Access to ${deviceType} is required. ` : null}\n\n {isSystemError && !isMobile\n ? `Enable permissions for ${deviceType}${deviceType === 'screen' ? 'share' : ''} from sytem settings`\n : null}\n {!isSystemError && !isMobile\n ? `Enable permissions for ${deviceType}${\n deviceType === 'screen' ? 'share' : ''\n } from address bar or browser settings.`\n : null}\n </Text>\n\n {/* CTA section */}\n {isMobile && isIOS ? (\n <>\n <Button onClick={() => window.location.reload()} css={{ w: '100%', mb: '$6' }}>\n Reload\n </Button>\n <Button outlined variant=\"standard\" onClick={() => setDeviceType('')} css={{ w: '100%' }}>\n Continue anyway\n </Button>\n </>\n ) : null}\n\n {isMobile && isAndroid ? (\n <>\n <Button onClick={() => setDeviceType('')} css={{ w: '100%', mb: '$6' }}>\n I've allowed access\n </Button>\n <Button outlined variant=\"standard\" onClick={() => setDeviceType('')} css={{ w: '100%' }}>\n Continue anyway\n </Button>\n </>\n ) : null}\n\n {!isMobile ? (\n <Flex justify=\"end\" css={{ w: '100%' }}>\n <Button outlined variant=\"standard\" onClick={() => setDeviceType('')}>\n Dismiss\n </Button>\n </Flex>\n ) : null}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n ) : null;\n}\n", "import React, { useEffect, useState } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\nimport { Dialog, Flex, Loading, Text } from '../../..';\n// @ts-ignore: No implicit Any\nimport { ToastConfig } from '../Toast/ToastConfig';\n// @ts-ignore: No implicit Any\nimport { ToastManager } from '../Toast/ToastManager';\n\nconst notificationTypes = [\n HMSNotificationTypes.RECONNECTED,\n HMSNotificationTypes.RECONNECTING,\n HMSNotificationTypes.ERROR,\n];\nlet notificationId: string | null = null;\n\nexport const ReconnectNotifications = () => {\n const notification = useHMSNotifications(notificationTypes);\n const [open, setOpen] = useState(false);\n useEffect(() => {\n if (!notification) {\n return;\n }\n if (notification.type === HMSNotificationTypes.ERROR && notification.data?.isTerminal) {\n setOpen(false);\n } else if (notification.type === HMSNotificationTypes.RECONNECTED) {\n notificationId = ToastManager.replaceToast(notificationId, ToastConfig.RECONNECTED.single());\n setOpen(false);\n } else if (notification.type === HMSNotificationTypes.RECONNECTING) {\n notificationId = ToastManager.replaceToast(\n notificationId,\n ToastConfig.RECONNECTING.single(notification.data?.message),\n );\n }\n }, [notification]);\n if (!open) return null;\n return (\n <Dialog.Root open={open} modal={true}>\n <Dialog.Portal container={document.getElementById('conferencing')}>\n <Dialog.Overlay />\n <Dialog.Content\n css={{\n width: 'fit-content',\n maxWidth: '80%',\n p: '$4 $8',\n position: 'relative',\n top: 'unset',\n bottom: '$9',\n transform: 'translate(-50%, -100%)',\n animation: 'none !important',\n }}\n >\n <Flex align=\"center\">\n <div style={{ display: 'inline', margin: '0.25rem' }}>\n <Loading size={16} />\n </div>\n <Text css={{ fontSize: '$space$8', color: '$on_surface_high' }}>\n You lost your network connection. Trying to reconnect.\n </Text>\n </Flex>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n", "import React, { useEffect, useState } from 'react';\nimport {\n HMSChangeMultiTrackStateRequest,\n HMSNotificationTypes,\n useHMSActions,\n useHMSNotifications,\n} from '@100mslive/react-sdk';\nimport { MicOnIcon } from '@100mslive/react-icons';\n// @ts-ignore: No implicit Any\nimport { RequestDialog } from '../../primitives/DialogContent';\n\nexport const TrackBulkUnmuteModal = () => {\n const hmsActions = useHMSActions();\n const [muteNotification, setMuteNotification] = useState<HMSChangeMultiTrackStateRequest | null>(null);\n const notification = useHMSNotifications([\n HMSNotificationTypes.CHANGE_MULTI_TRACK_STATE_REQUEST,\n HMSNotificationTypes.ROOM_ENDED,\n HMSNotificationTypes.REMOVED_FROM_ROOM,\n ]);\n\n useEffect(() => {\n switch (notification?.type) {\n case HMSNotificationTypes.REMOVED_FROM_ROOM:\n case HMSNotificationTypes.ROOM_ENDED:\n setMuteNotification(null);\n break;\n case HMSNotificationTypes.CHANGE_MULTI_TRACK_STATE_REQUEST:\n if (notification?.data.enabled) {\n setMuteNotification(notification.data);\n }\n break;\n default:\n return;\n }\n }, [notification]);\n\n if (!muteNotification) {\n return null;\n }\n\n const { requestedBy: peer, tracks, enabled } = muteNotification;\n\n return (\n <RequestDialog\n title=\"Track Unmute Request\"\n body={`${peer?.name} has requested you to unmute your tracks.`}\n onOpenChange={(value: boolean) => !value && setMuteNotification(null)}\n onAction={() => {\n tracks.forEach(track => {\n hmsActions.setEnabledTrack(track.id, enabled);\n });\n setMuteNotification(null);\n }}\n Icon={MicOnIcon}\n />\n );\n};\n", "import { useEffect } from 'react';\nimport { HMSNotificationTypes, useHMSNotifications } from '@100mslive/react-sdk';\n\nconst notificationTypes = [\n HMSNotificationTypes.TRACK_ADDED,\n HMSNotificationTypes.TRACK_REMOVED,\n HMSNotificationTypes.TRACK_MUTED,\n HMSNotificationTypes.TRACK_UNMUTED,\n];\nexport const TrackNotifications = () => {\n const notification = useHMSNotifications(notificationTypes);\n useEffect(() => {\n if (notification) {\n console.debug(`[${notification.type}]`, notification);\n }\n }, [notification]);\n\n return null;\n};\n", "import React, { useEffect, useState } from 'react';\nimport {\n HMSChangeTrackStateRequest,\n HMSNotificationTypes,\n useHMSActions,\n useHMSNotifications,\n} from '@100mslive/react-sdk';\nimport { MicOnIcon } from '@100mslive/react-icons';\n// @ts-ignore: No implicit Any\nimport { RequestDialog } from '../../primitives/DialogContent';\n\nexport const TrackUnmuteModal = () => {\n const hmsActions = useHMSActions();\n const notification = useHMSNotifications([\n HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST,\n HMSNotificationTypes.ROOM_ENDED,\n HMSNotificationTypes.REMOVED_FROM_ROOM,\n ]);\n const [muteNotification, setMuteNotification] = useState<HMSChangeTrackStateRequest | null>(null);\n\n useEffect(() => {\n switch (notification?.type) {\n case HMSNotificationTypes.REMOVED_FROM_ROOM:\n case HMSNotificationTypes.ROOM_ENDED:\n setMuteNotification(null);\n break;\n case HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST:\n if (notification?.data.enabled) {\n setMuteNotification(notification.data);\n }\n break;\n default:\n return;\n }\n }, [notification]);\n\n if (!muteNotification) {\n return null;\n }\n\n const { requestedBy: peer, track, enabled } = muteNotification;\n\n return (\n <RequestDialog\n title=\"Track Unmute Request\"\n onOpenChange={(value: boolean) => !value && setMuteNotification(null)}\n body={`${peer?.name} has requested you to unmute your ${track?.source} ${track?.type}.`}\n onAction={() => {\n hmsActions.setEnabledTrack(track.id, enabled);\n setMuteNotification(null);\n }}\n Icon={MicOnIcon}\n />\n );\n};\n", "import React from 'react';\nimport { useSearchParam } from 'react-use';\nimport { Flex } from '../../..';\nimport { useHMSPrebuiltContext } from '../../AppContext';\nimport { useRoomLayout } from '../../provider/roomLayoutProvider';\n// @ts-ignore: No implicit Any\nimport FullPageProgress from '../FullPageProgress';\n// @ts-ignore: No implicit Any\nimport PreviewJoin from './PreviewJoin';\nimport { useRoomLayoutPreviewScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';\n// @ts-ignore: No implicit Any\nimport { useAuthToken } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { QUERY_PARAM_PREVIEW_AS_ROLE } from '../../common/constants';\n\nexport const PreviewScreen = () => {\n const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();\n const skipPreview = !isPreviewScreenEnabled;\n const previewAsRole = useSearchParam(QUERY_PARAM_PREVIEW_AS_ROLE);\n const { userName } = useHMSPrebuiltContext();\n const initialName = userName || (skipPreview ? 'Beam' : '');\n const authToken = useAuthToken();\n const roomLayout = useRoomLayout();\n const { preview_header: previewHeader = {} } = roomLayout?.screens?.preview?.default?.elements || {};\n\n return (\n <Flex direction=\"column\" css={{ size: '100%' }}>\n <Flex\n css={{ flex: '1 1 0', position: 'relative', overflowY: 'auto', color: '$primary_default' }}\n justify=\"center\"\n align=\"center\"\n >\n {authToken && Object.keys(previewHeader).length > 0 ? (\n <PreviewJoin initialName={initialName} skipPreview={skipPreview} asRole={previewAsRole ?? undefined} />\n ) : (\n <FullPageProgress />\n )}\n </Flex>\n </Flex>\n );\n};\n", "import React, { useEffect, useState } from 'react';\nimport { selectIsConnectedToRoom, useHMSStore } from '@100mslive/react-sdk';\nimport { Toast as ToastPrimitive } from '../../../Toast';\nimport { Toast } from './Toast';\nimport { ToastManager } from './ToastManager';\nimport { MAX_TOASTS } from '../../common/constants';\n\nexport const ToastContainer = () => {\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const [toasts, setToast] = useState([]);\n useEffect(() => {\n ToastManager.addListener(setToast);\n return () => {\n ToastManager.removeListener(setToast);\n };\n }, []);\n return (\n <ToastPrimitive.Provider swipeDirection=\"left\" duration={3000}>\n {toasts.slice(0, MAX_TOASTS).map(toast => {\n return <Toast key={toast.id} {...toast} onOpenChange={value => !value && ToastManager.removeToast(toast.id)} />;\n })}\n <ToastPrimitive.Viewport\n css={{\n position: 'absolute',\n ...(!isConnected ? {} : { bottom: '$24' }),\n }}\n />\n </ToastPrimitive.Provider>\n );\n};\n", "import React from 'react';\nimport { Toast as ToastPrimitive } from '../../../Toast';\n\nexport const Toast = ({ title, description, close = true, open, duration, onOpenChange, icon, ...props }) => {\n return (\n <ToastPrimitive.HMSToast\n title={title}\n description={description}\n open={open}\n isClosable={close}\n onOpenChange={onOpenChange}\n duration={!close ? 600000 : duration}\n icon={icon}\n {...props}\n />\n );\n};\n", "import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useMedia } from 'react-use';\nimport {\n selectLocalPeerID,\n selectPeerNameByID,\n useCustomEvent,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { Box, Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport { config as cssConfig, keyframes } from '../../Theme';\nimport { EMOJI_REACTION_TYPE } from '../common/constants';\n\nlet emojiCount = 1;\n\nconst flyAndFade = keyframes({\n '20%': { opacity: 1 },\n '100%': { bottom: '60%', opacity: 0 },\n});\n\nconst wiggleLeftRight = keyframes({\n '0%': { marginLeft: '-50px' },\n '100%': { marginLeft: '50px' },\n});\n\nconst wiggleRightLeft = keyframes({\n '0%': { marginLeft: '50px' },\n '100%': { marginLeft: '-50px' },\n});\n\nconst getStartingPoints = isMobile => {\n let arr = [];\n const min = 5;\n const max = isMobile ? 30 : 20;\n const inc = isMobile ? 8 : 5;\n for (let i = min; i <= max; i += inc) {\n arr.push(i);\n }\n return arr;\n};\n\nexport function FlyingEmoji() {\n const localPeerId = useHMSStore(selectLocalPeerID);\n const vanillaStore = useHMSVanillaStore();\n const [emojis, setEmojis] = useState([]);\n const isMobile = useMedia(cssConfig.media.md);\n\n const startingPoints = useMemo(() => getStartingPoints(isMobile), [isMobile]);\n\n const showFlyingEmoji = useCallback(\n ({ emojiId, senderId }) => {\n if (!emojiId || !senderId || document.hidden) {\n return;\n }\n const senderPeerName = vanillaStore.getState(selectPeerNameByID(senderId));\n const nameToShow = localPeerId === senderId ? 'You' : senderPeerName;\n const startingPoint = startingPoints[emojiCount % startingPoints.length];\n const id = emojiCount++;\n\n setEmojis(emojis => {\n return [\n ...emojis,\n {\n id: id,\n emojiId: emojiId,\n senderName: nameToShow,\n startingPoint: `${startingPoint}%`,\n wiggleType: Math.random() < 0.5 ? 0 : 1,\n },\n ];\n });\n },\n [localPeerId, vanillaStore, startingPoints],\n );\n\n useCustomEvent({\n type: EMOJI_REACTION_TYPE,\n onEvent: showFlyingEmoji,\n });\n\n useEffect(() => {\n window.showFlyingEmoji = showFlyingEmoji;\n }, [showFlyingEmoji]);\n\n return (\n <Box\n css={{\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n overflow: 'hidden',\n pointerEvents: 'none',\n userSelect: 'none',\n zIndex: 999,\n }}\n >\n {emojis.map(emoji => {\n return (\n <Flex\n key={emoji.id}\n css={{\n left: emoji.startingPoint,\n flexDirection: 'column',\n alignItems: 'center',\n position: 'absolute',\n bottom: 0,\n animation: `${flyAndFade()} 5s forwards, ${\n emoji.wiggleType === 0 ? wiggleLeftRight() : wiggleRightLeft()\n } 1s ease-in-out infinite alternate`,\n }}\n onAnimationEnd={() => {\n setEmojis(emojis.filter(item => item.id !== emoji.id));\n }}\n >\n <Box>\n <em-emoji id={emoji.emojiId} size=\"48px\" set=\"apple\"></em-emoji>\n </Box>\n <Box\n css={{\n width: 'fit-content',\n padding: '$2 $4',\n background: '$surface_bright',\n borderRadius: '$1',\n }}\n >\n <Text\n css={{\n fontSize: '$space$6',\n lineHeight: '$xs',\n color: '$on_surface_high',\n }}\n >\n {emoji.senderName}\n </Text>\n </Box>\n </Flex>\n );\n })}\n </Box>\n );\n}\n", "import React, { useCallback } from 'react';\nimport { useCustomEvent, useHMSActions } from '@100mslive/react-sdk';\nimport { REMOTE_STOP_SCREENSHARE_TYPE } from '../common/constants';\n\nexport function RemoteStopScreenshare() {\n const actions = useHMSActions();\n\n const onRemoteStopScreenshare = useCallback(async () => {\n await actions.setScreenShareEnabled(false);\n }, [actions]);\n\n useCustomEvent({\n type: REMOTE_STOP_SCREENSHARE_TYPE,\n onEvent: onRemoteStopScreenshare,\n });\n\n return <></>;\n}\n", "import { useCallback, useEffect, useRef } from 'react';\nimport {\n HMSException,\n selectIsConnectedToRoom,\n selectPermissions,\n useHMSActions,\n useHMSStore,\n useRecordingStreaming,\n} from '@100mslive/react-sdk';\n// @ts-ignore: No implicit Any\nimport { useSetAppDataByKey } from '../AppData/useUISettings';\n// @ts-ignore: No implicit Any\nimport { useShowStreamingUI } from '../../common/hooks';\n// @ts-ignore: No implicit Any\nimport { APP_DATA } from '../../common/constants';\n\nexport const useAutoStartStreaming = () => {\n const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);\n const permissions = useHMSStore(selectPermissions);\n const showStreamingUI = useShowStreamingUI();\n const hmsActions = useHMSActions();\n const isConnected = useHMSStore(selectIsConnectedToRoom);\n const { isHLSRunning, isRTMPRunning } = useRecordingStreaming();\n const streamStartedRef = useRef(false);\n\n const startHLS = useCallback(async () => {\n try {\n if (isHLSStarted || !showStreamingUI || isHLSRunning || isRTMPRunning) {\n return;\n }\n setHLSStarted(true);\n streamStartedRef.current = true;\n await hmsActions.startHLSStreaming();\n } catch (error) {\n if ((error as HMSException).message?.includes('beam already started')) {\n return;\n }\n streamStartedRef.current = false;\n setHLSStarted(false);\n }\n }, [hmsActions, isHLSRunning, isHLSStarted, setHLSStarted, showStreamingUI, isRTMPRunning]);\n\n useEffect(() => {\n if (!isHLSStarted && !isHLSRunning) {\n streamStartedRef.current = false;\n }\n }, [isHLSStarted, isHLSRunning]);\n\n useEffect(() => {\n if (!isConnected || streamStartedRef.current || !permissions?.hlsStreaming) {\n return;\n }\n // Is a streaming kit and broadcaster joins\n startHLS();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isConnected]);\n};\n", "import { Indicator, Root } from '@radix-ui/react-progress';\nimport { styled } from '../Theme';\n\nconst StyledIndicator = styled(Indicator, { h: '$4', backgroundColor: '$primary_default' });\n\nconst StyledRoot = styled(Root, {\n w: '100%',\n h: '$4',\n borderRadius: '$round',\n backgroundColor: '$secondary_dim',\n overflow: 'hidden',\n});\n\nexport const Progress = {\n Root: StyledRoot,\n Content: StyledIndicator,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,YAAyD;;;ACAhE,OAAO,SAAS,aAAa,aAAAC,YAAW,SAAS,QAAQ,YAAAC,iBAAgB;;;ACAzE,SAAS,WAAW,gBAAgB;AAEpC,IAAM,YAAY,MAAe;AAC/B,SAAO,QAAQ,OAAO,WAAW,eAAe,OAAO,YAAY,OAAO,SAAS,aAAa;AAClG;AAOA,IAAM,SAAS,MAAgB;AAC7B,QAAM,CAAC,SAAS,UAAU,IAAI,SAAkB,KAAK;AACrD,YAAU,MAAM;AACd,eAAW,UAAU,CAAC;AAAA,EACxB,GAAG,CAAC,CAAC;AAEL,SAAO;AAAA,IACL,WAAW;AAAA,IACX,UAAU,CAAC;AAAA,EACb;AACF;AAEA,IAAO,iBAAQ;;;ADlBf,IAAM,qBAAqB;AAAA,EACzB,OAAO;AAAA,EACP,QAAQ;AACV;AAEO,IAAK,aAAL,kBAAKC,gBAAL;AAEL,EAAAA,YAAA,aAAU;AAFA,SAAAA;AAAA,GAA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AA,cAAC,iBAAY,GAC1C,gBAAAA,SAAA,cAAC,2BAAsB,GACvB,gBAAAA,SAAA,cAAC,qBAAgB,GACjB,gBAAAA,SAAA,cAAC,qBAAU,6BAA0D,kBAAoC,GACxG,cAAc,eAAe,gBAAAA,SAAA,cAAC,aAAU,aAA0B,CACrE,CACF;AAEJ;;;AuKzTA,SAAS,aAAAW,YAAW,QAAAC,cAAY;AAGhC,IAAM,kBAAkB,OAAOC,YAAW,EAAE,GAAG,MAAM,iBAAiB,mBAAmB,CAAC;AAE1F,IAAMC,cAAa,OAAOC,QAAM;AAAA,EAC9B,GAAG;AAAA,EACH,GAAG;AAAA,EACH,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,UAAU;AACZ,CAAC;AAEM,IAAM,WAAW;AAAA,EACtB,MAAMD;AAAA,EACN,SAAS;AACX;",
6
- "names": ["React", "useEffect", "useState", "ThemeTypes", "useState", "isBrowser", "updatedTheme", "useEffect", "React", "_a", "_b", "React", "_a", "_b", "_a", "_b", "css", "React", "React", "React", "React", "Root", "_a", "React", "React", "Root", "Track", "Range", "Thumb", "_a", "_b", "React", "React", "useRef", "Root", "styled", "React", "React", "React", "styled", "Root", "css", "React", "useRef", "React", "_a", "_b", "css", "React", "Root", "Overlay", "Root", "Container", "Root", "Content", "Portal", "Root", "Trigger", "Root", "Trigger", "Content", "Portal", "React", "_a", "_b", "React", "Root", "Flex", "useCallback", "useRef", "theme", "useCallback", "useRef", "React", "useEffect", "useRef", "React", "useRef", "useEffect", "Arrow", "Close", "Content", "Root", "Portal", "Trigger", "StyledContent", "Content", "Arrow", "StyledTrigger", "Trigger", "Popover", "Root", "Portal", "Close", "React", "Root", "Label", "_a", "_b", "React", "Label", "React", "CrossIcon", "css", "React", "CrossIcon", "_a", "_b", "React", "StyledTrigger", "StyledContent", "React", "_a", "_b", "css", "Root", "Select", "StyledTrigger", "StyledContent", "StyledItem", "Select", "StyledTrigger", "StyledContent", "React", "React", "React", "_a", "_b", "Icon", "React", "Content", "Root", "Trigger", "Root", "Trigger", "Content", "React", "useEffect", "useRef", "selectIsConnectedToRoom", "useHMSActions", "useHMSStore", "React", "useEffect", "useHMSActions", "useHMSStore", "_a", "roleName", "useState", "useCallback", "selectAppData", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useCallback", "useMemo", "useHMSStore", "useHMSVanillaStore", "_a", "_b", "useHMSStore", "useHMSStore", "_a", "useCallback", "_b", "value", "useHMSVanillaStore", "useMemo", "useHMSStore", "selectAppData", "useHMSActions", "useHMSVanillaStore", "useCallback", "React", "useHMSActions", "useHMSStore", "useEffect", "appData", "config", "React", "useEffect", "useState", "useHMSActions", "React", "useContext", "React", "useContext", "React", "useRef", "CrossIcon", "_a", "_b", "Icon", "css", "React", "CrossIcon", "Label", "_a", "_b", "useRef", "React", "React", "useHMSActions", "useState", "useEffect", "error", "Link", "React", "useEffect", "useRef", "useState", "HMSRoomState", "selectAppData", "selectIsConnectedToRoom", "selectRoomState", "useHMSActions", "useHMSStore", "React", "useEffect", "useMedia", "useAVToggle", "React", "Fragment", "HMSRoomState", "selectRoomState", "useHMSActions", "useHMSStore", "React", "React", "videoInput", "React", "audioInput", "useHMSActions", "useHMSStore", "selectRoomState", "Fragment", "HMSRoomState", "React", "Fragment", "useState", "selectAvailableRoleNames", "selectIsConnectedToRoom", "useHMSStore", "React", "React", "useEffect", "useEffect", "useState", "useHMSStore", "selectIsConnectedToRoom", "selectAvailableRoleNames", "_a", "data", "React", "Fragment", "React", "useMedia", "selectHLSState", "selectIsConnectedToRoom", "selectPermissions", "selectRolesMap", "useHMSActions", "useHMSStore", "React", "Fragment", "useState", "selectIsConnectedToRoom", "selectPermissions", "useHMSStore", "useRecordingStreaming", "VerticalMenuIcon", "React", "CrossIcon", "React", "CrossIcon", "React", "css", "React", "React", "AlertTriangleIcon", "CrossIcon", "React", "AlertTriangleIcon", "CrossIcon", "useState", "useHMSStore", "selectIsConnectedToRoom", "selectPermissions", "useRecordingStreaming", "React", "Fragment", "VerticalMenuIcon", "React", "Fragment", "useState", "selectIsConnectedToRoom", "selectPermissions", "useHMSStore", "useRecordingStreaming", "ExitIcon", "StopIcon", "React", "DialogPrimitive", "StyledContent", "React", "_a", "_b", "useState", "useHMSStore", "selectIsConnectedToRoom", "selectPermissions", "useRecordingStreaming", "React", "Fragment", "ExitIcon", "StopIcon", "useHMSStore", "selectIsConnectedToRoom", "selectPermissions", "useMedia", "selectRolesMap", "selectHLSState", "useHMSActions", "React", "React", "useMedia", "React", "Fragment", "useState", "selectAppData", "selectLocalPeerID", "useHMSActions", "useHMSStore", "CheckIcon", "InfoIcon", "PipIcon", "SettingsIcon", "React", "React", "useCallback", "useEffect", "useState", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "_a", "_a", "_b", "isMicActive", "isCamActive", "useState", "useHMSActions", "useHMSVanillaStore", "useCallback", "React", "useHMSStore", "useEffect", "React", "React", "useRef", "useState", "useHMSActions", "useHMSStore", "CheckIcon", "ChevronDownIcon", "ChevronUpIcon", "useEffect", "useRef", "useState", "JoinForm_JoinBtnType", "selectAvailableRoleNames", "selectIsConnectedToRoom", "selectPeers", "useHMSStore", "useHMSVanillaStore", "React", "useCallback", "useEffect", "useRef", "useState", "useState", "useRef", "useCallback", "_a", "layout", "useEffect", "_b", "React", "_a", "useHMSStore", "selectAvailableRoleNames", "_a", "_b", "JoinForm_JoinBtnType", "selectIsConnectedToRoom", "selectPeers", "useHMSVanillaStore", "_a", "_b", "React", "useHMSStore", "useState", "useHMSActions", "useRef", "ChevronUpIcon", "ChevronDownIcon", "Label", "CheckIcon", "React", "useCallback", "useEffect", "useState", "useMedia", "CrossIcon", "React", "Fragment", "useEffect", "useRef", "useState", "DeviceType", "selectIsLocalVideoEnabled", "selectLocalVideoTrackID", "selectVideoTrackByID", "useDevices", "useHMSStore", "MicOnIcon", "VideoOnIcon", "React", "ChevronDownIcon", "ChevronUpIcon", "React", "css", "ChevronUpIcon", "ChevronDownIcon", "_a", "useDevices", "useHMSStore", "selectLocalVideoTrackID", "selectIsLocalVideoEnabled", "selectVideoTrackByID", "React", "Fragment", "VideoOnIcon", "DeviceType", "MicOnIcon", "_b", "useState", "useRef", "useEffect", "React", "useCallback", "selectIsLocalVideoEnabled", "useHMSActions", "useHMSStore", "React", "React", "Label", "useHMSActions", "useHMSStore", "selectIsLocalVideoEnabled", "useCallback", "React", "React", "React", "React", "useMedia", "useState", "useCallback", "useEffect", "_a", "CrossIcon", "Icon", "Content", "React", "useState", "selectPermissions", "useHMSActions", "useHMSStore", "useRecordingStreaming", "AlertTriangleIcon", "React", "useCallback", "useState", "css", "useState", "useCallback", "React", "Label", "useHMSStore", "selectPermissions", "useState", "useRecordingStreaming", "useHMSActions", "React", "AlertTriangleIcon", "React", "useEffect", "useMemo", "useRef", "useState", "selectHMSStats", "selectLocalPeerID", "selectTracksMap", "useHMSStatsStore", "useHMSStore", "_a", "useMemo", "useState", "useRef", "useEffect", "React", "Label", "useHMSStore", "selectTracksMap", "selectLocalPeerID", "_b", "useHMSStatsStore", "selectHMSStats", "StatsRow", "formatBytes", "React", "useCallback", "useRef", "useState", "useHMSActions", "AlertTriangleIcon", "CheckIcon", "_a", "_b", "useHMSActions", "useRef", "useState", "useCallback", "React", "selectedRole", "CheckIcon", "AlertTriangleIcon", "React", "useCallback", "useEffect", "useState", "useState", "useCallback", "useEffect", "React", "React", "useCallback", "useState", "useHMSActions", "MicOffIcon", "React", "React", "Label", "useHMSActions", "useState", "useCallback", "React", "MicOffIcon", "useCallback", "selectLocalPeerID", "selectPeerMetadata", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useHMSActions", "useHMSStore", "selectLocalPeerID", "useHMSVanillaStore", "selectPeerMetadata", "useCallback", "useHMSStore", "selectLocalPeerID", "useHMSActions", "selectAppData", "useState", "React", "Fragment", "CheckIcon", "PipIcon", "SettingsIcon", "InfoIcon", "React", "useRef", "useState", "selectIsConnectedToRoom", "selectPeerCount", "selectPermissions", "useAVToggle", "useHMSActions", "useHMSStore", "useRecordingStreaming", "BrbIcon", "CrossIcon", "DragHandleIcon", "EmojiIcon", "HandIcon", "RecordIcon", "SettingsIcon", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "HMSRoomState", "selectHLSState", "selectIsConnectedToRoom", "selectPermissions", "selectRoomState", "useHMSActions", "useHMSStore", "useRecordingStreaming", "AlertTriangleIcon", "CrossIcon", "React", "useState", "selectLocalPeerID", "useHMSStore", "ChevronDownIcon", "ChevronUpIcon", "useCallback", "useEffect", "useMemo", "selectLocalPeerID", "useHMSStore", "useEffect", "useHMSStore", "useHMSStore", "useEffect", "useHMSStore", "selectLocalPeerID", "useMemo", "useCallback", "useEffect", "useCallback", "useHMSActions", "useHMSStore", "useHMSStore", "useHMSActions", "useCallback", "useCallback", "useHMSActions", "useHMSStore", "_a", "_b", "useState", "useHMSStore", "selectLocalPeerID", "React", "ChevronUpIcon", "ChevronDownIcon", "_a", "_b", "_a", "useRecordingStreaming", "useHMSStore", "selectHLSState", "useMedia", "useRef", "useState", "useCallback", "useEffect", "React", "selectPermissions", "StartRecording", "useHMSActions", "Popover", "selectIsConnectedToRoom", "selectRoomState", "HMSRoomState", "AlertTriangleIcon", "CrossIcon", "React", "useState", "useMedia", "useHMSActions", "useHMSStore", "React", "ChevronLeftIcon", "CrossIcon", "React", "ChevronLeftIcon", "CrossIcon", "useHMSActions", "useHMSStore", "useState", "useMedia", "React", "MODALS", "useHMSActions", "useHMSStore", "selectPermissions", "selectIsConnectedToRoom", "useRecordingStreaming", "useState", "selectPeerCount", "useRef", "useAVToggle", "React", "DragHandleIcon", "CrossIcon", "HandIcon", "EmojiIcon", "BrbIcon", "SettingsIcon", "RecordIcon", "useMedia", "React", "React", "HandIcon", "React", "HandIcon", "React", "Fragment", "useHMSStore", "useScreenShare", "ShareScreenIcon", "React", "Fragment", "useState", "useScreenShare", "VerticalMenuIcon", "React", "useState", "React", "React", "React", "React", "React", "React", "InfoIcon", "React", "InfoIcon", "React", "useState", "React", "MODALS", "useState", "useScreenShare", "React", "Fragment", "VerticalMenuIcon", "css", "useHMSStore", "useScreenShare", "React", "Fragment", "ShareScreenIcon", "React", "useHMSStore", "useHMSStore", "React", "React", "Fragment", "useCallback", "useEffect", "useState", "useMedia", "selectHasPeerHandRaised", "selectIsLargeRoom", "selectLocalPeerID", "selectPeerCount", "selectPeerMetadata", "selectPermissions", "useHMSActions", "useHMSStore", "ChangeRoleIcon", "HandIcon", "MicOffIcon", "PeopleIcon", "PeopleRemoveIcon", "VerticalMenuIcon", "React", "selectConnectionQualityByPeerID", "useHMSStore", "theme", "_a", "useHMSStore", "selectConnectionQualityByPeerID", "theme", "React", "React", "useEffect", "useHMSStore", "React", "useState", "selectPermissions", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "MicOffIcon", "MicOnIcon", "VerticalMenuIcon", "VideoOffIcon", "VideoOnIcon", "useState", "useHMSStore", "selectPermissions", "useHMSActions", "useHMSVanillaStore", "_a", "_b", "React", "VerticalMenuIcon", "MicOffIcon", "MicOnIcon", "VideoOffIcon", "VideoOnIcon", "data", "_a", "React", "useHMSStore", "useEffect", "useState", "useHMSStore", "selectIsLargeRoom", "useCallback", "React", "Fragment", "selectPeerCount", "useEffect", "PeopleIcon", "selectLocalPeerID", "_a", "_b", "selectHasPeerHandRaised", "selectPermissions", "HandIcon", "MicOffIcon", "useHMSActions", "selectPeerMetadata", "VerticalMenuIcon", "ChangeRoleIcon", "PeopleRemoveIcon", "useMedia", "React", "QuizIcon", "React", "QuizIcon", "React", "Footer", "_a", "_b", "useMedia", "useAVToggle", "useEffect", "React", "useCallback", "useState", "selectHLSState", "useHMSActions", "useHMSStore", "useRecordingStreaming", "useHMSStore", "selectHLSState", "useState", "useHMSActions", "useRecordingStreaming", "useCallback", "React", "React", "useEffect", "selectLocalPeerName", "selectLocalPeerRoleName", "useCustomEvent", "useHMSActions", "useHMSStore", "React", "Fragment", "Suspense", "useCallback", "useEffect", "useMemo", "useState", "useMeasure", "useMedia", "HMSRoomState", "selectIsLocalVideoEnabled", "selectRoomState", "selectVideoTrackByID", "useAVToggle", "useHMSStore", "useParticipants", "useRecordingStreaming", "MicOffIcon", "SettingsIcon", "React", "React", "css", "React", "React", "Wrapper", "React", "css", "React", "React", "useEffect", "useState", "useHMSStore", "useHMSStore", "React", "_a", "useState", "useEffect", "React", "useMedia", "JoinForm_JoinBtnType", "useRecordingStreaming", "_a", "_b", "useMedia", "useRecordingStreaming", "JoinForm_JoinBtnType", "React", "VirtualBackground", "React", "useHMSStore", "selectVideoTrackByID", "useMedia", "_a", "_b", "useRecordingStreaming", "useState", "useAVToggle", "useParticipants", "selectRoomState", "useCallback", "useEffect", "HMSRoomState", "Container", "selectIsLocalVideoEnabled", "useMeasure", "useMemo", "MicOffIcon", "Suspense", "Fragment", "SettingsIcon", "React", "useMedia", "useMedia", "React", "useHMSActions", "useHMSStore", "selectLocalPeerRoleName", "selectLocalPeerName", "useCustomEvent", "useEffect", "React", "_a", "React", "Suspense", "useEffect", "selectIsConnectedToRoom", "selectLocalPeerRoleName", "useHMSActions", "useHMSStore", "React", "useEffect", "useMemo", "useState", "selectPeers", "useHMSStore", "useHMSVanillaStore", "React", "useEffect", "useMemo", "useState", "useMedia", "selectLocalPeer", "useHMSStore", "React", "useEffect", "useRef", "useMedia", "selectIsAllowedToPublish", "selectLocalPeer", "selectVideoTrackByID", "useHMSStore", "ExpandIcon", "React", "Fragment", "useCallback", "useMemo", "useState", "useMeasure", "useMedia", "selectAudioTrackByPeerID", "selectHasPeerHandRaised", "selectIsPeerAudioEnabled", "selectLocalPeerID", "selectPeerMetadata", "selectSessionStore", "selectVideoTrackByID", "selectVideoTrackByPeerID", "useHMSStore", "HandIcon", "MicOffIcon", "React", "useState", "useMedia", "selectLocalPeerID", "selectPeerByID", "selectPermissions", "selectTrackByID", "selectVideoTrackByPeerID", "useHMSStore", "useRemoteAVToggle", "CrossIcon", "VerticalMenuIcon", "React", "Fragment", "useMedia", "selectPermissions", "selectSessionStore", "selectTrackByID", "useCustomEvent", "useHMSActions", "useHMSStore", "MicOffIcon", "MicOnIcon", "PinIcon", "RemoveUserIcon", "ShareScreenIcon", "SpeakerIcon", "StarIcon", "VideoOffIcon", "VideoOnIcon", "useHMSActions", "useHMSStore", "selectSessionStore", "React", "StarIcon", "PinIcon", "_a", "selectTrackByID", "Fragment", "selectPermissions", "useCustomEvent", "useMedia", "VideoOnIcon", "VideoOffIcon", "MicOnIcon", "MicOffIcon", "SpeakerIcon", "RemoveUserIcon", "ShareScreenIcon", "_a", "_b", "useState", "theme", "useHMSStore", "selectLocalPeerID", "selectPermissions", "useRemoteAVToggle", "selectVideoTrackByPeerID", "selectTrackByID", "useMedia", "selectPeerByID", "React", "VerticalMenuIcon", "CrossIcon", "selectVideoTrackByID", "selectVideoTrackByPeerID", "useHMSStore", "useMedia", "selectAudioTrackByPeerID", "selectLocalPeerID", "selectIsPeerAudioEnabled", "useState", "selectSessionStore", "useCallback", "useMeasure", "useMemo", "React", "MicOffIcon", "selectPeerMetadata", "selectHasPeerHandRaised", "Fragment", "HandIcon", "React", "useContext", "React", "ExpandIcon", "useMedia", "useHMSStore", "selectLocalPeer", "selectVideoTrackByID", "selectIsAllowedToPublish", "useRef", "useEffect", "React", "useEffect", "ChevronLeftIcon", "ChevronRightIcon", "useEffect", "React", "ChevronLeftIcon", "ChevronRightIcon", "React", "React", "_a", "_b", "useEffect", "useMemo", "useState", "useMeasure", "useMedia", "selectTracksMap", "useHMSVanillaStore", "useHMSVanillaStore", "selectTracksMap", "useMemo", "useMeasure", "useMedia", "useState", "useEffect", "_a", "useHMSStore", "selectLocalPeer", "useMedia", "useMemo", "useState", "useEffect", "React", "page", "React", "useEffect", "useState", "selectLocalPeer", "useHMSStore", "React", "useEffect", "useState", "useMedia", "React", "Root", "React", "css", "_a", "_b", "_a", "useMedia", "useState", "useEffect", "React", "page", "useMemo", "useMemo", "_a", "useHMSStore", "selectLocalPeer", "useState", "useEffect", "React", "page", "React", "useEffect", "useMemo", "useState", "useMedia", "useHMSStore", "React", "useRef", "useState", "useFullscreen", "screenfull", "selectLocalPeerID", "selectPeerByID", "selectScreenShareAudioByPeerID", "useHMSStore", "ExpandIcon", "ShrinkIcon", "React", "useHMSActions", "CrossIcon", "ShareScreenIcon", "useHMSActions", "React", "ShareScreenIcon", "CrossIcon", "Tile", "useHMSStore", "selectLocalPeerID", "selectPeerByID", "useState", "useRef", "useFullscreen", "screenfull", "selectScreenShareAudioByPeerID", "React", "ShrinkIcon", "ExpandIcon", "_a", "useHMSStore", "useState", "useMedia", "useMemo", "useEffect", "React", "selectDominantSpeaker", "_a", "useHMSStore", "selectPeers", "useMemo", "useHMSVanillaStore", "useState", "useEffect", "React", "React", "useEffect", "useMemo", "selectAppData", "selectPeers", "selectPeerScreenSharing", "useHMSStore", "React", "useHMSStore", "selectPeers", "selectPeerScreenSharing", "useMemo", "smallTilePeers", "useEffect", "selectAppData", "React", "useEffect", "useEffect", "React", "React", "useMedia", "selectAppData", "selectVideoTrackByPeerID", "useHMSStore", "React", "React", "useMemo", "useState", "selectLocalPeerRoleName", "selectPermissions", "selectPolls", "useHMSActions", "useHMSStore", "React", "selectPermissions", "useHMSStore", "ChevronLeftIcon", "ChevronRightIcon", "CrossIcon", "RecordIcon", "React", "ChevronLeftIcon", "CrossIcon", "Container", "React", "React", "React", "useHMSStore", "selectPermissions", "React", "Container", "useHMSActions", "useState", "selectLocalPeerRoleName", "useMemo", "_a", "selectPolls", "id", "React", "useMemo", "useState", "useHMSActions", "useHMSStore", "AddCircleIcon", "React", "useCallback", "useRef", "useState", "TrashIcon", "React", "AlertTriangleIcon", "CrossIcon", "React", "AlertTriangleIcon", "CrossIcon", "React", "CheckIcon", "React", "TrashIcon", "React", "TrashIcon", "React", "React", "React", "React", "React", "_a", "CheckIcon", "Label", "React", "React", "Label", "_a", "useRef", "useState", "useCallback", "index", "text", "options", "React", "TrashIcon", "React", "useState", "TrashIcon", "useState", "React", "TrashIcon", "_a", "_b", "useState", "useHMSActions", "useHMSStore", "useMemo", "React", "Container", "questions", "question", "AddCircleIcon", "React", "selectLocalPeerID", "selectPeerNameByID", "selectPollByID", "useHMSActions", "useHMSStore", "ChevronLeftIcon", "CrossIcon", "React", "React", "useCallback", "useMemo", "useState", "selectLocalPeerID", "selectLocalPeerRoleName", "useHMSActions", "useHMSStore", "ChevronLeftIcon", "ChevronRightIcon", "QuestionCard", "useHMSActions", "useHMSStore", "selectLocalPeerID", "_a", "selectLocalPeerRoleName", "useCallback", "useState", "useMemo", "React", "ChevronLeftIcon", "ChevronRightIcon", "_a", "React", "QuestionCard", "React", "useState", "_a", "_b", "useState", "React", "QuestionCard", "_a", "useHMSActions", "useHMSStore", "selectPollByID", "selectPeerNameByID", "selectLocalPeerID", "React", "Container", "ChevronLeftIcon", "CrossIcon", "React", "React", "useEffect", "useState", "useMedia", "selectPeerCount", "useHMSStore", "CrossIcon", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "selectPeerNameByID", "selectPermissions", "selectSessionStore", "useHMSActions", "useHMSStore", "ChevronDownIcon", "CrossIcon", "PinIcon", "React", "Fragment", "useCallback", "useEffect", "useMemo", "useRef", "useState", "useMedia", "selectLocalPeerID", "selectLocalPeerRoleName", "selectPeerNameByID", "selectPermissions", "useHMSActions", "useHMSStore", "PinIcon", "VerticalMenuIcon", "useCallback", "selectPeerNameByID", "useHMSActions", "useHMSStore", "useHMSVanillaStore", "useHMSActions", "useHMSVanillaStore", "useHMSStore", "useCallback", "selectPeerNameByID", "selectUnreadHMSMessagesCount", "useHMSStore", "formatTime", "React", "useHMSStore", "selectPeerNameByID", "selectLocalPeerRoleName", "Link", "Fragment", "useState", "VerticalMenuIcon", "PinIcon", "_a", "_b", "useRef", "useEffect", "useMedia", "useHMSActions", "selectLocalPeerID", "selectPermissions", "useCallback", "useMemo", "React", "useCallback", "useEffect", "useRef", "useState", "useMedia", "data", "useHMSActions", "EmojiIcon", "useCallback", "selectAppData", "useHMSActions", "useHMSStore", "useHMSActions", "useHMSStore", "selectAppData", "useCallback", "useEffect", "useRef", "_a", "_b", "TextArea", "useState", "React", "Popover", "EmojiIcon", "data", "_a", "useHMSActions", "useRef", "useMedia", "useCallback", "useEffect", "useHMSStore", "selectPermissions", "selectSessionStore", "React", "PinIcon", "CrossIcon", "_a", "_b", "selectPeerNameByID", "useState", "useRef", "useHMSActions", "useEffect", "useMedia", "useCallback", "ChevronDownIcon", "React", "useEffect", "useState", "useInView", "useMeasure", "VariableSizeList", "selectIsConnectedToRoom", "useHMSStore", "usePaginatedParticipants", "ChevronLeftIcon", "CrossIcon", "useInView", "useState", "useEffect", "React", "VirtualizedParticipantItem", "data", "usePaginatedParticipants", "_a", "useHMSStore", "selectIsConnectedToRoom", "useMeasure", "ChevronLeftIcon", "CrossIcon", "search", "VariableSizeList", "ParticipantCount", "React", "_a", "useState", "useHMSStore", "selectPeerCount", "useMedia", "useEffect", "CrossIcon", "_a", "_b", "useMedia", "useHMSStore", "selectAppData", "selectVideoTrackByPeerID", "React", "React", "React", "React", "_a", "_b", "useHMSStore", "selectLocalPeerRoleName", "selectIsConnectedToRoom", "useHMSActions", "useEffect", "Suspense", "React", "useMedia", "HMSRoomState", "selectRoomState", "useHMSStore", "React", "DeviceType", "selectIsLocalVideoEnabled", "selectLocalVideoTrackID", "selectVideoTrackByID", "useDevices", "useHMSActions", "useHMSStore", "CameraFlipIcon", "CheckIcon", "CrossIcon", "SpeakerIcon", "useHMSActions", "useDevices", "useHMSStore", "selectIsLocalVideoEnabled", "selectLocalVideoTrackID", "selectVideoTrackByID", "React", "CameraFlipIcon", "_a", "DeviceType", "SpeakerIcon", "CrossIcon", "Label", "CheckIcon", "Header", "useHMSStore", "selectRoomState", "useMedia", "HMSRoomState", "React", "_a", "_b", "useHMSStore", "selectRoomState", "selectIsConnectedToRoom", "useHMSActions", "useState", "selectAppData", "useRef", "useEffect", "HMSRoomState", "React", "Header", "Footer", "React", "CopyIcon", "React", "CopyIcon", "React", "useEffect", "useEffect", "_a", "React", "useEffect", "selectAppData", "selectIsLocalAudioEnabled", "selectIsLocalVideoEnabled", "useHMSActions", "useHMSVanillaStore", "selectIsLocalAudioEnabled", "selectIsLocalVideoEnabled", "selectAppData", "useHMSVanillaStore", "useHMSActions", "useEffect", "React", "ExitIcon", "React", "useContext", "useEffect", "HMSRoomState", "selectRoomState", "useHMSStore", "useCallback", "useCallback", "React", "useContext", "useHMSStore", "selectRoomState", "useEffect", "HMSRoomState", "React", "Header", "ExitIcon", "React", "useEffect", "useState", "useState", "useEffect", "React", "React", "useCallback", "useEffect", "HMSNotificationTypes", "HMSRoomState", "selectHasPeerHandRaised", "selectLocalPeerID", "selectPeerNameByID", "selectRoomState", "useCustomEvent", "useHMSNotifications", "useHMSStore", "useHMSVanillaStore", "React", "useCallback", "selectPeerByID", "useHMSActions", "useHMSStore", "ChatUnreadIcon", "HandIcon", "PeopleAddIcon", "PeopleRemoveIcon", "PoorConnectivityIcon", "React", "_a", "_b", "useHMSActions", "useHMSStore", "selectPeerByID", "useCallback", "PeopleAddIcon", "PeopleRemoveIcon", "HandIcon", "ChatUnreadIcon", "PoorConnectivityIcon", "React", "React", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSNotifications", "useHMSNotifications", "HMSNotificationTypes", "useState", "useEffect", "data", "React", "useEffect", "HMSNotificationTypes", "useHMSNotifications", "HMSNotificationTypes", "useHMSNotifications", "useEffect", "React", "useEffect", "useState", "useMedia", "HMSNotificationTypes", "useHMSNotifications", "useHMSNotifications", "HMSNotificationTypes", "useState", "useMedia", "useEffect", "_a", "_b", "React", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSNotifications", "notificationTypes", "HMSNotificationTypes", "useHMSNotifications", "useState", "useEffect", "_a", "_b", "React", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSActions", "useHMSNotifications", "MicOnIcon", "useHMSActions", "useState", "useHMSNotifications", "HMSNotificationTypes", "useEffect", "React", "MicOnIcon", "useEffect", "HMSNotificationTypes", "useHMSNotifications", "notificationTypes", "React", "useEffect", "useState", "HMSNotificationTypes", "useHMSActions", "useHMSNotifications", "MicOnIcon", "useHMSActions", "useHMSNotifications", "HMSNotificationTypes", "useState", "useEffect", "React", "MicOnIcon", "useHMSStore", "selectLocalPeerID", "useHMSNotifications", "selectRoomState", "useHMSVanillaStore", "useCallback", "useCustomEvent", "useEffect", "_a", "_b", "HMSNotificationTypes", "HMSRoomState", "selectHasPeerHandRaised", "selectPeerNameByID", "React", "React", "_a", "_b", "React", "React", "useEffect", "useState", "selectIsConnectedToRoom", "useHMSStore", "React", "Toast", "_a", "_b", "React", "useHMSStore", "selectIsConnectedToRoom", "useState", "useEffect", "React", "Toast", "React", "useCallback", "useEffect", "useMemo", "useState", "useMedia", "selectLocalPeerID", "selectPeerNameByID", "useCustomEvent", "useHMSStore", "useHMSVanillaStore", "useHMSStore", "selectLocalPeerID", "useHMSVanillaStore", "useState", "useMedia", "useMemo", "useCallback", "selectPeerNameByID", "emojis", "useCustomEvent", "useEffect", "React", "React", "useCallback", "useCustomEvent", "useHMSActions", "useHMSActions", "useCallback", "useCustomEvent", "React", "useCallback", "useEffect", "useRef", "selectIsConnectedToRoom", "selectPermissions", "useHMSActions", "useHMSStore", "useRecordingStreaming", "useHMSStore", "selectPermissions", "useHMSActions", "selectIsConnectedToRoom", "useRecordingStreaming", "useRef", "useCallback", "_a", "useEffect", "React", "_a", "_b", "useRef", "useEffect", "data", "theme", "typography", "useHMSStore", "selectIsConnectedToRoom", "useHMSActions", "Indicator", "Root", "Indicator", "StyledRoot", "Root"]
7
- }