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.22.0_kdreznvoqpxsq65rzwgw6zo7je/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/Logger.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.22.0_kdreznvoqpxsq65rzwgw6zo7je/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createClientLogger } from '@azure/logger';\n/**\n * @private\n */\nexport const compositeLogger = createClientLogger('communication-react:composite');\n//# sourceMappingURL=Logger.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ErrorBar, useTheme } from \"../../../../react-components/src\";\nimport { NotificationStack } from \"../../../../react-components/src\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { BaseProvider } from '../common/BaseComposite';\nimport { useLocale } from '../localization';\nimport { CallAdapterProvider, useAdapter } from './adapter/CallAdapterProvider';\nimport { CallPage } from './pages/CallPage';\nimport { ConfigurationPage } from './pages/ConfigurationPage';\nimport { NoticePage } from './pages/NoticePage';\nimport { useSelector } from './hooks/useSelector';\nimport { getAlternateCallerId, getEndedCall, getPage, getRole, getTargetCallees } from './selectors/baseSelectors';\nimport { LobbyPage } from './pages/LobbyPage';\nimport { TransferPage } from './pages/TransferPage';\nimport { leavingPageStyle, mainScreenContainerStyleDesktop, mainScreenContainerStyleMobile } from './styles/CallComposite.styles';\nimport { LayerHost, mergeStyles } from '@fluentui/react';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useId } from '@fluentui/react-hooks';\nimport { HoldPage } from './pages/HoldPage';\nimport { SidePaneProvider } from './components/SidePane/SidePaneProvider';\nimport { filterLatestNotifications, getEndedCallPageProps, trackNotificationAsDismissed, updateTrackedNotificationsWithActiveNotifications } from './utils';\nimport { computeComplianceNotification } from './utils';\nimport { usePropsFor } from './hooks/usePropsFor';\nimport { deviceCountSelector } from './selectors/deviceCountSelector';\nimport { capabilitiesChangedInfoAndRoleSelector } from './selectors/capabilitiesChangedInfoAndRoleSelector';\nimport { useTrackedCapabilityChangedNotifications } from './utils/TrackCapabilityChangedNotifications';\nimport { useEndedCallConsoleErrors } from './utils/useConsoleErrors';\nimport { SurveyPage } from './pages/SurveyPage';\nimport { useAudio } from '../common/AudioProvider';\nimport { complianceBannerSelector } from './selectors/complianceBannerSelector';\nimport { devicePermissionSelector } from './selectors/devicePermissionSelector';\nconst isShowing = (overrideSidePane) => {\n return !!(overrideSidePane === null || overrideSidePane === void 0 ? void 0 : overrideSidePane.isActive);\n};\nconst MainScreen = (props) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n const adapter = useAdapter();\n const { camerasCount, microphonesCount } = useSelector(deviceCountSelector);\n const hasCameras = camerasCount > 0;\n const hasMicrophones = microphonesCount > 0;\n const role = useSelector(getRole);\n const { video: cameraHasPermission, audio: micHasPermission } = useSelector(devicePermissionSelector);\n useEffect(() => {\n (() => __awaiter(void 0, void 0, void 0, function* () {\n const constrain = getQueryOptions({\n role\n });\n const permissionsResult = yield adapter.askDevicePermission(constrain);\n if (permissionsResult === null || permissionsResult === void 0 ? void 0 : permissionsResult.audio) {\n adapter.queryMicrophones();\n }\n if (permissionsResult === null || permissionsResult === void 0 ? void 0 : permissionsResult.video) {\n adapter.queryCameras();\n }\n adapter.querySpeakers();\n }))();\n }, [adapter, role,\n // Ensure we re-ask for permissions if the number of devices goes from 0 -> n during a call\n // as we cannot request permissions when there are no devices.\n hasCameras, hasMicrophones,\n // Ensure we re-query for devices when permission for the device is granted.\n cameraHasPermission, micHasPermission]);\n const { callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems } = props;\n const page = useSelector(getPage);\n const endedCall = useSelector(getEndedCall);\n const [sidePaneRenderer, setSidePaneRenderer] = React.useState();\n const [injectedSidePaneProps, setInjectedSidePaneProps] = React.useState();\n const [userSetGalleryLayout, setUserSetGalleryLayout] = useState((_c = (_b = (_a = props.options) === null || _a === void 0 ? void 0 : _a.galleryOptions) === null || _b === void 0 ? void 0 : _b.layout) !== null && _c !== void 0 ? _c : 'floatingLocalVideo');\n const [userSetOverflowGalleryPosition, setUserSetOverflowGalleryPosition] = useState('Responsive');\n const overridePropsRef = useRef(props.overrideSidePane);\n useEffect(() => {\n setInjectedSidePaneProps(props.overrideSidePane);\n // When the injected side pane is opened, clear the previous side pane active state.\n // this ensures when the injected side pane is \"closed\", the previous side pane is not \"re-opened\".\n if (!isShowing(overridePropsRef.current) && isShowing(props.overrideSidePane)) {\n setSidePaneRenderer(undefined);\n }\n overridePropsRef.current = props.overrideSidePane;\n }, [props.overrideSidePane]);\n const onSidePaneIdChange = props.onSidePaneIdChange;\n useEffect(() => {\n onSidePaneIdChange === null || onSidePaneIdChange === void 0 ? void 0 : onSidePaneIdChange(sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id);\n }, [sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id, onSidePaneIdChange]);\n // When the call ends ensure the side pane is set to closed to prevent the side pane being open if the call is re-joined.\n useEffect(() => {\n const closeSidePane = () => {\n setSidePaneRenderer(undefined);\n };\n adapter.on('callEnded', closeSidePane);\n return () => {\n adapter.off('callEnded', closeSidePane);\n };\n }, [adapter]);\n const compositeAudioContext = useAudio();\n const capabilitiesChangedInfoAndRole = useSelector(capabilitiesChangedInfoAndRoleSelector);\n const capabilitiesChangedNotificationBarProps = useTrackedCapabilityChangedNotifications(capabilitiesChangedInfoAndRole);\n // Track the last dismissed errors of any error kind to prevent errors from re-appearing on subsequent page navigation\n // This works by tracking the most recent timestamp of any active error type.\n // And then tracking when that error type was last dismissed.\n const activeErrors = usePropsFor(ErrorBar).activeErrorMessages;\n const activeInCallErrors = usePropsFor(NotificationStack).activeErrorMessages;\n const activeNotifications = usePropsFor(NotificationStack).activeNotifications;\n const complianceProps = useSelector(complianceBannerSelector);\n const cachedProps = useRef({\n latestBooleanState: {\n callTranscribeState: false,\n callRecordState: false\n },\n latestStringState: {\n callTranscribeState: 'off',\n callRecordState: 'off'\n },\n lastUpdated: Date.now()\n });\n const complianceNotification = useMemo(() => {\n return computeComplianceNotification(complianceProps, cachedProps);\n }, [complianceProps, cachedProps]);\n useEffect(() => {\n if (complianceNotification) {\n activeNotifications.forEach((notification, index) => {\n if (['recordingStarted', 'transcriptionStarted', 'recordingStopped', 'transcriptionStopped', 'recordingAndTranscriptionStarted', 'recordingAndTranscriptionStopped', 'recordingStoppedStillTranscribing', 'transcriptionStoppedStillRecording'].includes(notification.type)) {\n activeNotifications.splice(index, 1);\n }\n });\n activeNotifications.push(complianceNotification);\n }\n setTrackedNotifications(prev => updateTrackedNotificationsWithActiveNotifications(prev, activeNotifications));\n }, [complianceNotification, activeNotifications]);\n const [trackedErrors, setTrackedErrors] = useState({});\n const [trackedInCallErrors, setTrackedInCallErrors] = useState({});\n const [trackedNotifications, setTrackedNotifications] = useState({});\n useEffect(() => {\n setTrackedErrors(prev => updateTrackedNotificationsWithActiveNotifications(prev, activeErrors));\n setTrackedInCallErrors(prev => updateTrackedNotificationsWithActiveNotifications(prev, activeInCallErrors));\n }, [activeErrors, activeInCallErrors]);\n const onDismissError = useCallback((error) => {\n setTrackedErrors(prev => trackNotificationAsDismissed(error.type, prev));\n setTrackedInCallErrors(prev => trackNotificationAsDismissed(error.type, prev));\n }, []);\n const onDismissNotification = useCallback((notification) => {\n setTrackedNotifications(prev => trackNotificationAsDismissed(notification.type, prev));\n }, []);\n const latestErrors = useMemo(() => filterLatestNotifications(activeErrors, trackedErrors), [activeErrors, trackedErrors]);\n const latestInCallErrors = useMemo(() => filterLatestNotifications(activeInCallErrors, trackedInCallErrors), [activeInCallErrors, trackedInCallErrors]);\n const latestNotifications = useMemo(() => {\n const result = filterLatestNotifications(activeNotifications, trackedNotifications);\n // sort notifications by timestamp from earliest to latest\n result.sort((a, b) => { var _a, _b; return ((_a = a.timestamp) !== null && _a !== void 0 ? _a : new Date(Date.now())).getTime() - ((_b = b.timestamp) !== null && _b !== void 0 ? _b : new Date(Date.now())).getTime(); });\n return result;\n }, [activeNotifications, trackedNotifications]);\n const callees = useSelector(getTargetCallees);\n const locale = useLocale();\n const palette = useTheme().palette;\n const alternateCallerId = useSelector(getAlternateCallerId);\n const leavePageStyle = useMemo(() => leavingPageStyle(palette), [palette]);\n let pageElement;\n const [pinnedParticipants, setPinnedParticipants] = useState([]);\n switch (page) {\n case 'configuration':\n pageElement = React.createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {\n if (callees) {\n adapter.startCall(callees, alternateCallerId ? {\n alternateCallerId: {\n phoneNumber: alternateCallerId\n }\n } : {});\n }\n else {\n adapter.joinCall({\n microphoneOn: 'keep',\n cameraOn: 'keep'\n });\n }\n }, updateSidePaneRenderer: setSidePaneRenderer, latestErrors: latestErrors, onDismissError: onDismissError, modalLayerHostId: props.modalLayerHostId, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps, logo: (_e = (_d = props.options) === null || _d === void 0 ? void 0 : _d.branding) === null || _e === void 0 ? void 0 : _e.logo, backgroundImage: (_g = (_f = props.options) === null || _f === void 0 ? void 0 : _f.branding) === null || _g === void 0 ? void 0 : _g.backgroundImage });\n break;\n case 'accessDeniedTeamsMeeting':\n pageElement = React.createElement(NoticePage, { iconName: \"NoticePageAccessDeniedTeamsMeeting\", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' });\n break;\n case 'removedFromCall':\n pageElement = React.createElement(NoticePage, { iconName: \"NoticePageRemovedFromCall\", title: locale.strings.call.removedFromCallTitle, moreDetails: locale.strings.call.removedFromCallMoreDetails, dataUiId: 'removed-from-call-page' });\n break;\n case 'joinCallFailedDueToNoNetwork':\n pageElement = React.createElement(NoticePage, { iconName: \"NoticePageJoinCallFailedDueToNoNetwork\", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' });\n break;\n case 'leaving':\n pageElement = React.createElement(NoticePage, { title: (_h = locale.strings.call.leavingCallTitle) !== null && _h !== void 0 ? _h : 'Leaving...', dataUiId: 'leaving-page', pageStyle: leavePageStyle, disableStartCallButton: true });\n break;\n case 'badRequest':\n {\n const { title, moreDetails, disableStartCallButton, iconName } = getEndedCallPageProps(locale, endedCall);\n pageElement = React.createElement(NoticePage, { iconName: iconName, title: title, moreDetails: callees ? '' : moreDetails, dataUiId: 'left-call-page', disableStartCallButton: disableStartCallButton });\n break;\n }\n case 'leftCall':\n {\n const { title, moreDetails, disableStartCallButton, iconName } = getEndedCallPageProps(locale, endedCall);\n if (!((_k = (_j = props.options) === null || _j === void 0 ? void 0 : _j.surveyOptions) === null || _k === void 0 ? void 0 : _k.disableSurvey)) {\n pageElement = React.createElement(SurveyPage, { dataUiId: 'left-call-page', surveyOptions: (_l = props.options) === null || _l === void 0 ? void 0 : _l.surveyOptions, iconName: iconName, title: title, moreDetails: moreDetails, disableStartCallButton: disableStartCallButton, mobileView: props.mobileView });\n break;\n }\n pageElement = React.createElement(NoticePage, { iconName: iconName, title: title, moreDetails: callees ? '' : moreDetails, dataUiId: 'left-call-page', disableStartCallButton: disableStartCallButton });\n break;\n }\n case 'lobby':\n pageElement = React.createElement(LobbyPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestInCallErrors, latestNotifications: latestNotifications, onDismissError: onDismissError, onDismissNotification: onDismissNotification, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps });\n break;\n case 'transferring':\n pageElement = React.createElement(TransferPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onFetchAvatarPersonaData: onFetchAvatarPersonaData, latestErrors: latestInCallErrors, latestNotifications: latestNotifications, onDismissError: onDismissError, onDismissNotification: onDismissNotification, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps });\n break;\n case 'call':\n pageElement = React.createElement(CallPage, { callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: props.onCloseChatPane, latestErrors: latestInCallErrors, latestNotifications: latestNotifications, onDismissError: onDismissError, onDismissNotification: onDismissNotification, galleryLayout: userSetGalleryLayout, onUserSetGalleryLayoutChange: setUserSetGalleryLayout, onSetUserSetOverflowGalleryPosition: setUserSetOverflowGalleryPosition, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants, compositeAudioContext: compositeAudioContext, disableAutoShowDtmfDialer: (_m = props.options) === null || _m === void 0 ? void 0 : _m.disableAutoShowDtmfDialer });\n break;\n case 'hold':\n pageElement = React.createElement(React.Fragment, null, React.createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestInCallErrors, latestNotifications: latestNotifications, onDismissError: onDismissError, onDismissNotification: onDismissNotification, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));\n break;\n }\n useEndedCallConsoleErrors(endedCall);\n if (!pageElement) {\n throw new Error('Invalid call composite page');\n }\n return React.createElement(SidePaneProvider, { sidePaneRenderer: sidePaneRenderer, overrideSidePane: injectedSidePaneProps }, pageElement);\n};\n/**\n * A customizable UI composite for calling experience.\n *\n * @remarks Call composite min width/height are as follow:\n * - mobile: 17.5rem x 21rem (280px x 336px, with default rem at 16px)\n * - desktop: 30rem x 22rem (480px x 352px, with default rem at 16px)\n *\n * @public\n */\nexport const CallComposite = (props) => React.createElement(CallCompositeInner, Object.assign({}, props));\n/** @private */\nexport const CallCompositeInner = (props) => {\n const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;\n const mobileView = formFactor === 'mobile';\n const modalLayerHostId = useId('modalLayerhost');\n const mainScreenContainerClassName = useMemo(() => {\n return mobileView ? mainScreenContainerStyleMobile : mainScreenContainerStyleDesktop;\n }, [mobileView]);\n return React.createElement(\"div\", { className: mainScreenContainerClassName },\n React.createElement(BaseProvider, Object.assign({}, props),\n React.createElement(CallAdapterProvider, { adapter: adapter },\n React.createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, modalLayerHostId: modalLayerHostId, options: options, onSidePaneIdChange: props.onSidePaneIdChange, overrideSidePane: props.overrideSidePane, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: props.onCloseChatPane }),\n // This layer host is for ModalLocalAndRemotePIP in SidePane. This LayerHost cannot be inside the SidePane\n // because when the SidePane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n // Additionally, this layer host cannot be in the Call Arrangement as it needs to be rendered before useMinMaxDragPosition() in\n // common/utils useRef is called.\n // Warning: this is fragile and works because the call arrangement page is only rendered after the call has connected and thus this\n // LayerHost will be guaranteed to have rendered (and subsequently mounted in the DOM). This ensures the DOM element will be available\n // before the call to `document.getElementById(modalLayerHostId)` is made.\n React.createElement(LayerHost, { id: modalLayerHostId, className: mergeStyles(modalLayerHostStyle) }))));\n};\nconst getQueryOptions = (options) => {\n if (options.role === 'Consumer') {\n return {\n video: false,\n audio: true\n };\n }\n return {\n video: true,\n audio: true\n };\n};\n//# sourceMappingURL=CallComposite.js.map"],"names":["compositeLogger","createClientLogger","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","isShowing","overrideSidePane","isActive","MainScreen","props","_a","_b","_c","_d","_e","_f","_g","_h","_j","_k","_l","_m","adapter","camerasCount","microphonesCount","hasCameras","hasMicrophones","role","video","cameraHasPermission","audio","micHasPermission","useEffect","constrain","getQueryOptions","permissionsResult","askDevicePermission","queryMicrophones","queryCameras","querySpeakers","callInvitationUrl","onFetchAvatarPersonaData","onFetchParticipantMenuItems","page","endedCall","sidePaneRenderer","setSidePaneRenderer","injectedSidePaneProps","setInjectedSidePaneProps","userSetGalleryLayout","setUserSetGalleryLayout","useState","options","galleryOptions","layout","userSetOverflowGalleryPosition","setUserSetOverflowGalleryPosition","overridePropsRef","useRef","current","undefined","onSidePaneIdChange","id","closeSidePane","on","off","compositeAudioContext","capabilitiesChangedInfoAndRole","capabilitiesChangedNotificationBarProps","activeErrors","activeErrorMessages","activeInCallErrors","activeNotifications","complianceProps","cachedProps","latestBooleanState","callTranscribeState","callRecordState","latestStringState","lastUpdated","Date","now","complianceNotification","useMemo","forEach","notification","index","includes","type","splice","push","setTrackedNotifications","prev","trackedErrors","setTrackedErrors","trackedInCallErrors","setTrackedInCallErrors","trackedNotifications","onDismissError","useCallback","error","onDismissNotification","latestErrors","latestInCallErrors","latestNotifications","sort","a","b","timestamp","getTime","callees","locale","palette","alternateCallerId","leavePageStyle","pageElement","pinnedParticipants","setPinnedParticipants","mobileView","startCallHandler","startCall","phoneNumber","joinCall","microphoneOn","cameraOn","updateSidePaneRenderer","modalLayerHostId","logo","branding","backgroundImage","iconName","title","strings","call","failedToJoinTeamsMeetingReasonAccessDeniedTitle","moreDetails","failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails","dataUiId","removedFromCallTitle","removedFromCallMoreDetails","failedToJoinCallDueToNoNetworkTitle","failedToJoinCallDueToNoNetworkMoreDetails","leavingCallTitle","pageStyle","disableStartCallButton","surveyOptions","disableSurvey","mobileChatTabHeader","callInvitationURL","onCloseChatPane","galleryLayout","onUserSetGalleryLayoutChange","onSetUserSetOverflowGalleryPosition","disableAutoShowDtmfDialer","H","Error","CallComposite","CallCompositeInner","Object","assign","formFactor","mainScreenContainerClassName","className"],"sourceRoot":""}