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AAW3T,QAAQ8K,UACnB6I,EAAW3T,aAAUC,EAE7B,GAAK,GAEV,IACIhC,CAAO,EAgBLoW,EAAmC,CAACrO,EAAMsN,EAAaC,IACzDF,EAAwCrN,EAAMsN,EAAaC,EAAe,sBAUxEY,EAAgD,CAAClO,EAAYC,EAAW8D,EAASvK,IAAY,OAAU,OAAQ,OAAQ,GAAQ,YACxI,MAAM0G,QAAsBF,EAAWqO,mBAKvC,aAJM3X,QAAQ4X,IAAI,CAACpO,EAAc2G,aAAc3G,EAAc8G,mBACzD9G,EAAcgH,oCACRhH,EAAciH,eAEjB,IAAIrD,EAA8B9D,EAAY+D,EAAS9D,EAAWC,EAA2E1G,EACxJ,IACM2T,EAAelW,QACM+C,IAAhB/C,EAAU,aAAuC+C,IAApB/C,EAAc,U,kCCx5B/C,MAAMsX,EAAiB,CAAC,2BAA4B,+BAAgC,WAAY,kB,0DCHvG,MAAMC,GAAqB,IAAAC,oBAAczU,GAI5B0U,EAAuB/W,IAChC,MAAM,QAAEK,GAAYL,EACpB,OAAO,gBAAoB6W,EAAmBG,SAAU,CAAE7X,MAAOkB,GAAWL,EAAMiX,SAAS,EAKlFC,EAAa,KACtB,MAAM7W,GAAU,IAAA8W,YAAWN,GAC3B,IAAKxW,EACD,KAAM,sDAEV,OAAOA,CAAO,C","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/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.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/ParticipantSubcriber.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+communication-react@1.10.0_6x3ev4d3227te4dl7uene6lmqi/node_modules/@azure/communication-react/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.js"],"sourcesContent":["// 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 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 { getEndedCall, getPage } from './selectors/baseSelectors';\nimport { LobbyPage } from './pages/LobbyPage';\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 { SidePaneProvider } from './components/SidePane/SidePaneProvider';\nimport { filterLatestErrors, trackErrorAsDismissed, updateTrackedErrorsWithActiveErrors } from './utils';\nimport { usePropsFor } from './hooks/usePropsFor';\nimport { deviceCountSelector } from './selectors/deviceCountSelector';\n/* @conditional-compile-remove(capabilities) */\nimport { capabilitiesChangedInfoAndRoleSelector } from './selectors/capabilitiesChangedInfoAndRoleSelector';\n/* @conditional-compile-remove(capabilities) */\nimport { useTrackedCapabilityChangedNotifications } from './utils/TrackCapabilityChangedNotifications';\nconst isShowing = (overrideSidePane) => {\n return !!(overrideSidePane === null || overrideSidePane === void 0 ? void 0 : overrideSidePane.isActive);\n};\nconst MainScreen = (props) => {\n var _a, _b, _c, _d;\n const adapter = useAdapter();\n const { camerasCount, microphonesCount } = useSelector(deviceCountSelector);\n const hasCameras = camerasCount > 0;\n const hasMicrophones = microphonesCount > 0;\n useEffect(() => {\n (() => __awaiter(void 0, void 0, void 0, function* () {\n const constrain = getQueryOptions({});\n yield adapter.askDevicePermission(constrain);\n adapter.queryCameras();\n adapter.queryMicrophones();\n adapter.querySpeakers();\n }))();\n }, [adapter,\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 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 /* @conditional-compile-remove(gallery-layouts) */\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 /* @conditional-compile-remove(gallery-layouts) */\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 /* @conditional-compile-remove(capabilities) */\n const capabilitiesChangedInfoAndRole = useSelector(capabilitiesChangedInfoAndRoleSelector);\n /* @conditional-compile-remove(capabilities) */\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 [trackedErrors, setTrackedErrors] = useState({});\n useEffect(() => {\n setTrackedErrors(prev => updateTrackedErrorsWithActiveErrors(prev, activeErrors));\n }, [activeErrors]);\n const onDismissError = useCallback((error) => {\n setTrackedErrors(prev => trackErrorAsDismissed(error.type, prev));\n }, []);\n const latestErrors = useMemo(() => filterLatestErrors(activeErrors, trackedErrors), [activeErrors, trackedErrors]);\n const locale = useLocale();\n const palette = useTheme().palette;\n const leavePageStyle = useMemo(() => leavingPageStyle(palette), [palette]);\n let pageElement;\n switch (page) {\n case 'configuration':\n pageElement = React.createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {\n adapter.joinCall({\n microphoneOn: 'keep',\n cameraOn: 'keep'\n });\n }, updateSidePaneRenderer: setSidePaneRenderer, latestErrors: latestErrors, onDismissError: onDismissError, modalLayerHostId: props.modalLayerHostId, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps });\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: (_d = locale.strings.call.leavingCallTitle) !== null && _d !== void 0 ? _d : 'Leaving...', dataUiId: 'leaving-page', pageStyle: leavePageStyle, disableStartCallButton: true });\n break;\n case 'leftCall':\n {\n const { title, moreDetails, disableStartCallButton } = getEndedCallStrings(locale, endedCall);\n pageElement = React.createElement(NoticePage, { iconName: \"NoticePageLeftCall\", title: title, moreDetails: 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: latestErrors, onDismissError: onDismissError, \n /* @conditional-compile-remove(capabilities) */ 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: latestErrors, onDismissError: onDismissError, \n /* @conditional-compile-remove(gallery-layouts) */ galleryLayout: userSetGalleryLayout, \n /* @conditional-compile-remove(gallery-layouts) */ onUserSetGalleryLayoutChange: setUserSetGalleryLayout, \n /* @conditional-compile-remove(gallery-layouts) */ onSetUserSetOverflowGalleryPosition: setUserSetOverflowGalleryPosition, \n /* @conditional-compile-remove(gallery-layouts) */ userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, \n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps });\n break;\n }\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 return {\n video: true,\n audio: true\n };\n};\nconst getEndedCallStrings = (locale, endedCall) => {\n let title = locale.strings.call.leftCallTitle;\n let moreDetails = locale.strings.call.leftCallMoreDetails;\n let disableStartCallButton = false;\n return {\n title,\n moreDetails,\n disableStartCallButton\n };\n};\n//# sourceMappingURL=CallComposite.js.map","// 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.\n/**\n * @private\n */\nexport class ParticipantSubscriber {\n constructor(participant, emitter) {\n this.isMutedChangedHandler = () => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.participant.identifier,\n isMuted: this.participant.isMuted\n });\n };\n this.displayNameChangedHandler = () => {\n this.emitter.emit('displayNameChanged', {\n participantId: this.participant.identifier,\n displayName: this.participant.displayName\n });\n };\n this.isSpeakingChangedHandler = () => {\n this.emitter.emit('isSpeakingChanged', {\n participantId: this.participant.identifier,\n isSpeaking: this.participant.isSpeaking\n });\n };\n this.videoStreamsUpdatedHandler = (event) => {\n this.emitter.emit('videoStreamsUpdated', event);\n };\n this.participant = participant;\n this.emitter = emitter;\n this.subscribeParticipantEvents();\n }\n subscribeParticipantEvents() {\n this.participant.on('isMutedChanged', this.isMutedChangedHandler);\n this.participant.on('displayNameChanged', this.displayNameChangedHandler);\n this.participant.on('isSpeakingChanged', this.isSpeakingChangedHandler);\n this.participant.on('videoStreamsUpdated', this.videoStreamsUpdatedHandler);\n }\n unsubscribeAll() {\n this.participant.off('isMutedChanged', this.isMutedChangedHandler);\n this.participant.off('displayNameChanged', this.displayNameChangedHandler);\n this.participant.off('isSpeakingChanged', this.isSpeakingChangedHandler);\n this.participant.off('videoStreamsUpdated', this.videoStreamsUpdatedHandler);\n }\n}\n//# sourceMappingURL=ParticipantSubcriber.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { Features } from '@azure/communication-calling';\n/**\n * @private\n */\nexport class DiagnosticsForwarder {\n constructor(emitter, call) {\n this.unsubscribe = () => {\n this._diagnostics.network.off('diagnosticChanged', this.networkDiagnosticsChanged.bind(this));\n this._diagnostics.media.off('diagnosticChanged', this.mediaDiagnosticsChanged.bind(this));\n };\n this._diagnostics = call.feature(Features.UserFacingDiagnostics);\n this._emitter = emitter;\n this.subscribe();\n }\n subscribe() {\n this._diagnostics.network.on('diagnosticChanged', this.networkDiagnosticsChanged.bind(this));\n this._diagnostics.media.on('diagnosticChanged', this.mediaDiagnosticsChanged.bind(this));\n }\n networkDiagnosticsChanged(args) {\n const event = Object.assign({ type: 'network' }, args);\n this._emitter.emit('diagnosticChanged', event);\n }\n mediaDiagnosticsChanged(args) {\n const event = Object.assign({ type: 'media' }, args);\n this._emitter.emit('diagnosticChanged', event);\n }\n}\n//# sourceMappingURL=DiagnosticsForwarder.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createDefaultCallingHandlers } from \"../../../../../calling-component-bindings/src\";\nimport { _isACSCall, _isACSCallAgent } from \"../../../../../calling-stateful-client/src\";\n/**\n * @private\n *\n * This is used to create correct handler for generic agent type\n */\nexport function createHandlers(callClient, callAgent, deviceManager, call, /* @conditional-compile-remove(video-background-effects) */ options) {\n // Call can be either undefined or ACS Call\n if (_isACSCallAgent(callAgent) && (!call || call && _isACSCall(call))) {\n return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call, /* @conditional-compile-remove(video-background-effects) */ options);\n }\n throw new Error('Unhandled agent type');\n}\n//# sourceMappingURL=createHandlers.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 { createParticipantModifier } from '../utils';\n/**\n * @private\n */\nexport const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {\n const cachedDisplayName = {};\n return (state) => {\n var _a;\n const originalParticipants = (_a = state.call) === null || _a === void 0 ? void 0 : _a.remoteParticipants;\n (() => __awaiter(void 0, void 0, void 0, function* () {\n let shouldNotifyUpdates = false;\n for (const key in originalParticipants) {\n if (cachedDisplayName[key]) {\n continue;\n }\n const profile = yield onFetchProfile(key, {\n displayName: originalParticipants[key].displayName\n });\n if ((profile === null || profile === void 0 ? void 0 : profile.displayName) && originalParticipants[key].displayName !== (profile === null || profile === void 0 ? void 0 : profile.displayName)) {\n cachedDisplayName[key] = profile === null || profile === void 0 ? void 0 : profile.displayName;\n shouldNotifyUpdates = true;\n }\n }\n // notify update only when there is a change, which most likely will trigger modifier and setState again\n shouldNotifyUpdates && notifyUpdate();\n }))();\n const participantsModifier = createParticipantModifier((id, participant) => {\n if (cachedDisplayName[id]) {\n return Object.assign(Object.assign({}, participant), { displayName: cachedDisplayName[id] });\n }\n return undefined;\n });\n return participantsModifier(state);\n };\n};\n//# sourceMappingURL=OnFetchProfileCallback.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 { compositeLogger } from '../../../Logger';\nimport { _isInCall } from \"../../../../../calling-component-bindings/src\";\nimport { createStatefulCallClient } from \"../../../../../calling-stateful-client/src\";\nimport { LocalVideoStream as SDKLocalVideoStream } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(close-captions) */\n/* @conditional-compile-remove(capabilities) */\nimport { Features } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport { getCallCompositePage, IsCallEndedPage, isCameraOn } from '../utils';\nimport { toFlatCommunicationIdentifier, _toCommunicationIdentifier, _isValidIdentifier } from \"../../../../../acs-ui-common/src\";\nimport { ParticipantSubscriber } from './ParticipantSubcriber';\nimport { DiagnosticsForwarder } from './DiagnosticsForwarder';\nimport { useEffect, useRef, useState } from 'react';\nimport { createHandlers } from './createHandlers';\nimport { createProfileStateModifier } from './OnFetchProfileCallback';\n/* @conditional-compile-remove(video-background-effects) */\nimport { getBackgroundEffectFromSelectedEffect } from '../utils';\nimport { getSelectedCameraFromAdapterState } from '../utils';\n/** Context of call, which is a centralized context for all state updates */\nclass CallContext {\n constructor(clientState, isTeamsCall, options) {\n var _a, _b, _c, _d;\n this.emitter = new EventEmitter();\n this.state = {\n isLocalPreviewMicrophoneEnabled: false,\n userId: clientState.userId,\n displayName: (_a = clientState.callAgent) === null || _a === void 0 ? void 0 : _a.displayName,\n devices: clientState.deviceManager,\n call: undefined,\n page: 'configuration',\n latestErrors: clientState.latestErrors,\n isTeamsCall,\n /* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: (_b = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _b === void 0 ? void 0 : _b.videoBackgroundImages,\n /* @conditional-compile-remove(video-background-effects) */\n onResolveVideoEffectDependency: (_c = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _c === void 0 ? void 0 : _c.onResolveDependency,\n /* @conditional-compile-remove(video-background-effects) */ selectedVideoBackgroundEffect: undefined,\n cameraStatus: undefined\n };\n this.emitter.setMaxListeners((_d = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _d !== void 0 ? _d : 50);\n this.bindPublicMethods();\n this.displayNameModifier = (options === null || options === void 0 ? void 0 : options.onFetchProfile) ? createProfileStateModifier(options.onFetchProfile, () => {\n this.setState(this.getState());\n }) : undefined;\n }\n bindPublicMethods() { }\n onStateChange(handler) {\n this.emitter.on('stateChanged', handler);\n }\n offStateChange(handler) {\n this.emitter.off('stateChanged', handler);\n }\n setState(state) {\n this.state = this.displayNameModifier ? this.displayNameModifier(state) : state;\n this.emitter.emit('stateChanged', this.state);\n }\n getState() {\n return this.state;\n }\n setIsLocalMicrophoneEnabled(isLocalPreviewMicrophoneEnabled) {\n this.setState(Object.assign(Object.assign({}, this.state), { isLocalPreviewMicrophoneEnabled }));\n }\n // This is the key to find current call object in client state\n setCurrentCallId(callId) {\n this.callId = callId;\n }\n onCallEnded(handler) {\n this.emitter.on('callEnded', handler);\n }\n offCallEnded(handler) {\n this.emitter.off('callEnded', handler);\n }\n updateClientState(clientState) {\n var _a;\n let call = this.callId ? clientState.calls[this.callId] : undefined;\n const latestEndedCall = clientState.callsEnded ? findLatestEndedCall(clientState.callsEnded) : undefined;\n // As the state is transitioning to a new state, trigger appropriate callback events.\n const oldPage = this.state.page;\n const newPage = getCallCompositePage(call, latestEndedCall);\n if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {\n this.emitter.emit('callEnded', {\n callId: this.callId\n });\n // Reset the callId to undefined as the call has ended.\n this.setCurrentCallId(undefined);\n // Make sure that the call is set to undefined in the state.\n call = undefined;\n }\n if (this.state.page) {\n this.setState(Object.assign(Object.assign({}, this.state), { userId: clientState.userId, displayName: (_a = clientState.callAgent) === null || _a === void 0 ? void 0 : _a.displayName, call, page: newPage, endedCall: latestEndedCall, devices: clientState.deviceManager, latestErrors: clientState.latestErrors, cameraStatus: (call === null || call === void 0 ? void 0 : call.localVideoStreams.find(s => s.mediaStreamType === 'Video')) || clientState.deviceManager.unparentedViews.find(s => s.mediaStreamType === 'Video') ? 'On' : 'Off' }));\n }\n }\n /* @conditional-compile-remove(video-background-effects) */\n setBackroundPickerImages(videoBackgroundImages) {\n this.setState(Object.assign(Object.assign({}, this.state), { videoBackgroundImages }));\n }\n /* @conditional-compile-remove(video-background-effects) */\n setSelectedVideoBackgroundEffect(selectedVideoBackgroundEffect) {\n this.setState(Object.assign(Object.assign({}, this.state), { selectedVideoBackgroundEffect }));\n }\n}\nconst findLatestEndedCall = (calls) => {\n var _a, _b, _c, _d;\n const callStates = Object.values(calls);\n if (callStates.length === 0) {\n return undefined;\n }\n let latestCall = callStates[0];\n for (const call of callStates.slice(1)) {\n if (((_b = (_a = call.endTime) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0) > ((_d = (_c = latestCall.endTime) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0)) {\n latestCall = call;\n }\n }\n return latestCall;\n};\n/**\n * @private\n */\nexport class AzureCommunicationCallAdapter {\n constructor(callClient, locator, callAgent, deviceManager, options) {\n var _a;\n this.participantSubscribers = new Map();\n this.emitter = new EventEmitter();\n this.isMyMutedChanged = () => {\n var _a;\n this.emitter.emit('isMutedChanged', {\n participantId: this.getState().userId,\n isMuted: (_a = this.call) === null || _a === void 0 ? void 0 : _a.isMuted\n });\n };\n this.bindPublicMethods();\n this.callClient = callClient;\n this.callAgent = callAgent;\n this.locator = locator;\n this.deviceManager = deviceManager;\n const isTeamsMeeting = ('meetingLink' in this.locator);\n /* @conditional-compile-remove(video-background-effects) */\n this.onResolveVideoBackgroundEffectsDependency = (_a = options === null || options === void 0 ? void 0 : options.videoBackgroundOptions) === null || _a === void 0 ? void 0 : _a.onResolveDependency;\n this.context = new CallContext(callClient.getState(), isTeamsMeeting, /* @conditional-compile-remove(video-background-effects) */ options);\n this.context.onCallEnded(endCallData => this.emitter.emit('callEnded', endCallData));\n const onStateChange = (clientState) => {\n var _a;\n // unsubscribe when the instance gets disposed\n if (!this) {\n callClient.offStateChange(onStateChange);\n return;\n }\n // `updateClientState` searches for the current call from all the calls in the state using a cached `call.id`\n // from the call object. `call.id` can change during a call. We must update the cached `call.id` before\n // calling `updateClientState` so that we find the correct state object for the call even when `call.id`\n // has changed.\n // https://github.com/Azure/communication-ui-library/pull/1820\n if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.id) {\n this.context.setCurrentCallId(this.call.id);\n }\n this.context.updateClientState(clientState);\n };\n this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined, /* @conditional-compile-remove(video-background-effects) */ {\n onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency\n });\n this.onClientStateChange = onStateChange;\n this.subscribeDeviceManagerEvents();\n this.callClient.onStateChange(onStateChange);\n }\n get call() {\n return this._call;\n }\n set call(newCall) {\n this.resetDiagnosticsForwarder(newCall);\n this._call = newCall;\n }\n // TODO: update this to include the 'selectedCameraChanged' when calling adds it to the device manager\n subscribeDeviceManagerEvents() {\n this.deviceManager.on('selectedMicrophoneChanged', () => {\n this.emitter.emit('selectedMicrophoneChanged');\n });\n this.deviceManager.on('selectedSpeakerChanged', () => {\n this.emitter.emit('selectedSpeakerChanged');\n });\n }\n bindPublicMethods() {\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startCall.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n /* @conditional-compile-remove(raise-hand) */\n this.raiseHand.bind(this);\n /* @conditional-compile-remove(raise-hand) */\n this.lowerHand.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.disposeScreenShareStreamView.bind(this);\n this.disposeRemoteVideoStreamView.bind(this);\n this.disposeLocalVideoStreamView.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.processNewCall.bind(this);\n /* @conditional-compile-remove(close-captions) */\n {\n this.startCaptions.bind(this);\n this.stopCaptions.bind(this);\n this.setSpokenLanguage.bind(this);\n this.setCaptionLanguage.bind(this);\n }\n /* @conditional-compile-remove(video-background-effects) */\n this.startVideoBackgroundEffect.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.stopVideoBackgroundEffects.bind(this);\n /* @conditional-compile-remove(video-background-effects) */\n this.updateBackgroundPickerImages.bind(this);\n }\n dispose() {\n this.resetDiagnosticsForwarder();\n this.callClient.offStateChange(this.onClientStateChange);\n this.callAgent.dispose();\n }\n queryCameras() {\n return __awaiter(this, void 0, void 0, function* () {\n const startTime = new Date().getTime();\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n const cameras = yield this.deviceManager.getCameras();\n const endTime = new Date().getTime();\n compositeLogger.info('time to query cameras', endTime - startTime, 'ms');\n return cameras;\n }));\n });\n }\n queryMicrophones() {\n return __awaiter(this, void 0, void 0, function* () {\n const startTime = new Date().getTime();\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n const microphones = yield this.deviceManager.getMicrophones();\n const endTime = new Date().getTime();\n compositeLogger.info('time to query microphones', endTime - startTime, 'ms');\n return microphones;\n }));\n });\n }\n querySpeakers() {\n return __awaiter(this, void 0, void 0, function* () {\n const startTime = new Date().getTime();\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n const speakers = (yield this.deviceManager.isSpeakerSelectionAvailable) ? this.deviceManager.getSpeakers() : [];\n const endTime = new Date().getTime();\n compositeLogger.info('time to query speakers', endTime - startTime, 'ms');\n return speakers;\n }));\n });\n }\n askDevicePermission(constrain) {\n return __awaiter(this, void 0, void 0, function* () {\n const startTime = new Date().getTime();\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n yield this.deviceManager.askDevicePermission(constrain);\n const endTime = new Date().getTime();\n compositeLogger.info('time to query askDevicePermissions', endTime - startTime, 'ms');\n }));\n });\n }\n joinCall(options) {\n var _a, _b;\n if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {\n throw new Error('You are already in the call!');\n }\n return this.teeErrorToEventEmitter(() => {\n // Default to keeping camera/mic on if no override argument specified\n let shouldCameraBeOnInCall = this.getState().cameraStatus === 'On';\n let shouldMicrophoneBeOnInCall = this.getState().isLocalPreviewMicrophoneEnabled;\n // Apply override arguments\n if (typeof options === 'boolean') {\n // Deprecated joinCall API (boolen)\n shouldMicrophoneBeOnInCall = options;\n }\n else if (typeof options === 'object') {\n // Options bag API\n if (options.microphoneOn && options.microphoneOn !== 'keep') {\n shouldMicrophoneBeOnInCall = options.microphoneOn;\n }\n if (options.cameraOn && options.cameraOn !== 'keep') {\n shouldCameraBeOnInCall = options.cameraOn;\n }\n }\n const audioOptions = {\n muted: !shouldMicrophoneBeOnInCall\n };\n const selectedCamera = getSelectedCameraFromAdapterState(this.getState());\n const videoOptions = selectedCamera && shouldCameraBeOnInCall ? {\n localVideoStreams: [new SDKLocalVideoStream(selectedCamera)]\n } : {};\n const call = this._joinCall(audioOptions, videoOptions);\n this.processNewCall(call);\n return call;\n });\n }\n _joinCall(audioOptions, videoOptions) {\n const isTeamsMeeting = ('meetingLink' in this.locator);\n if (isTeamsMeeting) {\n return this.callAgent.join(this.locator, {\n audioOptions,\n videoOptions\n });\n }\n return this.callAgent.join(this.locator, {\n audioOptions,\n videoOptions\n });\n }\n createStreamView(remoteUserId, options) {\n return __awaiter(this, void 0, void 0, function* () {\n if (remoteUserId === undefined) {\n return yield this.handlers.onCreateLocalStreamView(options);\n }\n else {\n return yield this.handlers.onCreateRemoteStreamView(remoteUserId, options);\n }\n });\n }\n disposeStreamView(remoteUserId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (remoteUserId === undefined) {\n yield this.handlers.onDisposeLocalStreamView();\n }\n else {\n yield this.handlers.onDisposeRemoteStreamView(remoteUserId);\n }\n });\n }\n disposeScreenShareStreamView(remoteUserId) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onDisposeRemoteScreenShareStreamView(remoteUserId);\n });\n }\n disposeRemoteVideoStreamView(remoteUserId) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onDisposeRemoteVideoStreamView(remoteUserId);\n });\n }\n disposeLocalVideoStreamView() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onDisposeLocalStreamView();\n });\n }\n leaveCall(forEveryone) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onHangUp(forEveryone);\n this.unsubscribeCallEvents();\n this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, undefined, /* @conditional-compile-remove(video-background-effects) */ {\n onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency\n });\n // We set the adapter.call object to undefined immediately when a call is ended.\n // We do not set the context.callId to undefined because it is a part of the immutable data flow loop.\n this.call = undefined;\n this.stopCamera();\n this.mute();\n });\n }\n setCamera(device, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onSelectCamera(device, options);\n }));\n });\n }\n setMicrophone(device) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onSelectMicrophone(device);\n }));\n });\n }\n setSpeaker(device) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onSelectSpeaker(device);\n }));\n });\n }\n startCamera(options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n if (!isCameraOn(this.getState())) {\n // First kick off the effect on the local device before starting the camera in the call.\n // This prevents the effect not being applied for a brief moment when the camera is started.\n /* @conditional-compile-remove(video-background-effects) */\n {\n const selectedEffect = this.getState().selectedVideoBackgroundEffect;\n const selectedCamera = getSelectedCameraFromAdapterState(this.getState());\n if (selectedEffect && selectedCamera && this.onResolveVideoBackgroundEffectsDependency) {\n const stream = new SDKLocalVideoStream(selectedCamera);\n const effect = getBackgroundEffectFromSelectedEffect(selectedEffect, yield this.onResolveVideoBackgroundEffectsDependency());\n if (effect) {\n yield stream.feature(Features.VideoEffects).startEffects(effect);\n }\n else {\n yield stream.feature(Features.VideoEffects).stopEffects();\n }\n }\n }\n yield this.handlers.onToggleCamera(options);\n }\n }));\n });\n }\n stopCamera() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n if (isCameraOn(this.getState())) {\n yield this.handlers.onToggleCamera();\n }\n }));\n });\n }\n mute() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n this.context.setIsLocalMicrophoneEnabled(false);\n if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {\n yield this.handlers.onToggleMicrophone();\n }\n }));\n });\n }\n unmute() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n this.context.setIsLocalMicrophoneEnabled(true);\n if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {\n yield this.handlers.onToggleMicrophone();\n }\n }));\n });\n }\n startScreenShare() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {\n yield this.handlers.onToggleScreenShare();\n }\n }));\n });\n }\n stopScreenShare() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {\n yield this.handlers.onToggleScreenShare();\n }\n }));\n });\n }\n /* @conditional-compile-remove(raise-hand) */\n raiseHand() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onToggleRaiseHand();\n }));\n });\n }\n /* @conditional-compile-remove(raise-hand) */\n lowerHand() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onToggleRaiseHand();\n }));\n });\n }\n /* @conditional-compile-remove(video-background-effects) */\n startVideoBackgroundEffect(videoBackgroundEffect) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isBlurEffect(videoBackgroundEffect)) {\n const blurConfig = videoBackgroundEffect;\n yield this.handlers.onBlurVideoBackground(blurConfig);\n }\n else if (this.isReplacementEffect(videoBackgroundEffect)) {\n const replaceConfig = videoBackgroundEffect;\n yield this.handlers.onReplaceVideoBackground(replaceConfig);\n }\n });\n }\n /* @conditional-compile-remove(video-background-effects) */\n stopVideoBackgroundEffects() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handlers.onRemoveVideoBackgroundEffects();\n });\n }\n /* @conditional-compile-remove(video-background-effects) */\n updateBackgroundPickerImages(backgroundImages) {\n this.context.setBackroundPickerImages(backgroundImages);\n }\n /* @conditional-compile-remove(video-background-effects) */\n updateSelectedVideoBackgroundEffect(selectedVideoBackground) {\n this.context.setSelectedVideoBackgroundEffect(selectedVideoBackground);\n }\n startCall(participants, options) {\n var _a, _b;\n if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {\n throw new Error('You are already in the call.');\n }\n const idsToAdd = participants.map(participant => {\n let backendId = participant;\n if (typeof participant === 'string') {\n backendId = _toCommunicationIdentifier(participant);\n }\n if (backendId.phoneNumber) {\n if ((options === null || options === void 0 ? void 0 : options.alternateCallerId) === undefined) {\n throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');\n }\n return backendId;\n }\n return backendId;\n });\n const call = this.handlers.onStartCall(idsToAdd, options);\n if (!call) {\n throw new Error('Unable to start call.');\n }\n this.processNewCall(call);\n return call;\n }\n processNewCall(call) {\n this.call = call;\n this.context.setCurrentCallId(call.id);\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.handlers = createHandlers(this.callClient, this.callAgent, this.deviceManager, this.call, /* @conditional-compile-remove(video-background-effects) */ {\n onResolveVideoBackgroundEffectsDependency: this.onResolveVideoBackgroundEffectsDependency\n });\n this.subscribeCallEvents();\n }\n /* @conditional-compile-remove(video-background-effects) */\n isBlurEffect(effect) {\n return effect.effectName === 'blur';\n }\n /* @conditional-compile-remove(video-background-effects) */\n isReplacementEffect(effect) {\n return effect.effectName === 'replacement';\n }\n removeParticipant(userId) {\n return __awaiter(this, void 0, void 0, function* () {\n let participant = userId;\n this.handlers.onRemoveParticipant(participant);\n });\n }\n /* @conditional-compile-remove(close-captions) */\n startCaptions(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.handlers.onStartCaptions(options);\n });\n }\n /* @conditional-compile-remove(close-captions) */\n stopCaptions() {\n return __awaiter(this, void 0, void 0, function* () {\n this.handlers.onStopCaptions();\n });\n }\n /* @conditional-compile-remove(close-captions) */\n setCaptionLanguage(language) {\n return __awaiter(this, void 0, void 0, function* () {\n this.handlers.onSetCaptionLanguage(language);\n });\n }\n /* @conditional-compile-remove(close-captions) */\n setSpokenLanguage(language) {\n return __awaiter(this, void 0, void 0, function* () {\n this.handlers.onSetSpokenLanguage(language);\n });\n }\n getState() {\n return this.context.getState();\n }\n onStateChange(handler) {\n this.context.onStateChange(handler);\n }\n offStateChange(handler) {\n this.context.offStateChange(handler);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event, listener) {\n this.emitter.on(event, listener);\n }\n /* @conditional-compile-remove(close-captions) */\n subscribeToCaptionEvents() {\n var _a;\n if (this.call && this.call.state === 'Connected' && this.context.getState().isTeamsCall) {\n const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(Features.Captions).captions;\n captionsFeature.on('CaptionsReceived', this.captionsReceived.bind(this));\n captionsFeature.on('CaptionsActiveChanged', this.isCaptionsActiveChanged.bind(this));\n captionsFeature.on('CaptionLanguageChanged', this.isCaptionLanguageChanged.bind(this));\n captionsFeature.on('SpokenLanguageChanged', this.isSpokenLanguageChanged.bind(this));\n }\n }\n /* @conditional-compile-remove(close-captions) */\n unsubscribeFromCaptionEvents() {\n var _a, _b;\n if (this.call && this.call.state === 'Connected' && this.context.getState().isTeamsCall) {\n const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(Features.Captions).captions;\n captionsFeature.off('CaptionsReceived', this.captionsReceived.bind(this));\n captionsFeature.off('CaptionsActiveChanged', this.isCaptionsActiveChanged.bind(this));\n captionsFeature.off('CaptionLanguageChanged', this.isCaptionLanguageChanged.bind(this));\n captionsFeature.off('SpokenLanguageChanged', this.isSpokenLanguageChanged.bind(this));\n (_b = this.call) === null || _b === void 0 ? void 0 : _b.off('stateChanged', this.subscribeToCaptionEvents.bind(this));\n }\n }\n subscribeCallEvents() {\n var _a, _b, _c, _d, _e, _f;\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.on('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n (_b = this.call) === null || _b === void 0 ? void 0 : _b.on('isMutedChanged', this.isMyMutedChanged.bind(this));\n (_c = this.call) === null || _c === void 0 ? void 0 : _c.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n (_d = this.call) === null || _d === void 0 ? void 0 : _d.on('idChanged', this.callIdChanged.bind(this));\n /* @conditional-compile-remove(close-captions) */\n (_e = this.call) === null || _e === void 0 ? void 0 : _e.on('stateChanged', this.subscribeToCaptionEvents.bind(this));\n /* @conditional-compile-remove(capabilities) */\n (_f = this.call) === null || _f === void 0 ? void 0 : _f.feature(Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));\n }\n unsubscribeCallEvents() {\n var _a, _b, _c, _d;\n for (const subscriber of this.participantSubscribers.values()) {\n subscriber.unsubscribeAll();\n }\n this.participantSubscribers.clear();\n (_a = this.call) === null || _a === void 0 ? void 0 : _a.off('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n (_b = this.call) === null || _b === void 0 ? void 0 : _b.off('isMutedChanged', this.isMyMutedChanged.bind(this));\n (_c = this.call) === null || _c === void 0 ? void 0 : _c.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n (_d = this.call) === null || _d === void 0 ? void 0 : _d.off('idChanged', this.callIdChanged.bind(this));\n /* @conditional-compile-remove(close-captions) */\n this.unsubscribeFromCaptionEvents();\n }\n onRemoteParticipantsUpdated({ added, removed }) {\n if (added && added.length > 0) {\n this.emitter.emit('participantsJoined', {\n joined: added\n });\n }\n if (removed && removed.length > 0) {\n this.emitter.emit('participantsLeft', {\n removed: removed\n });\n }\n added.forEach(participant => {\n this.participantSubscribers.set(toFlatCommunicationIdentifier(participant.identifier), new ParticipantSubscriber(participant, this.emitter));\n });\n removed.forEach(participant => {\n const subscriber = this.participantSubscribers.get(toFlatCommunicationIdentifier(participant.identifier));\n subscriber && subscriber.unsubscribeAll();\n this.participantSubscribers.delete(toFlatCommunicationIdentifier(participant.identifier));\n });\n }\n isScreenSharingOnChanged() {\n var _a;\n this.emitter.emit('isLocalScreenSharingActiveChanged', {\n isScreenSharingOn: (_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn\n });\n }\n /* @conditional-compile-remove(close-captions) */\n captionsReceived(captionsInfo) {\n this.emitter.emit('captionsReceived', {\n captionsInfo\n });\n }\n /* @conditional-compile-remove(close-captions) */\n isCaptionsActiveChanged() {\n var _a;\n const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(Features.Captions).captions;\n this.emitter.emit('isCaptionsActiveChanged', {\n isActive: captionsFeature.isCaptionsFeatureActive\n });\n }\n /* @conditional-compile-remove(close-captions) */\n isSpokenLanguageChanged() {\n var _a;\n const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(Features.Captions).captions;\n this.emitter.emit('isSpokenLanguageChanged', {\n activeSpokenLanguage: captionsFeature.activeSpokenLanguage\n });\n }\n /* @conditional-compile-remove(close-captions) */\n isCaptionLanguageChanged() {\n var _a;\n const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(Features.Captions).captions;\n this.emitter.emit('isCaptionLanguageChanged', {\n activeCaptionLanguage: captionsFeature.activeCaptionLanguage\n });\n }\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChanged(data) {\n var _a, _b, _c;\n if (((_a = data.newValue.turnVideoOn) === null || _a === void 0 ? void 0 : _a.isPresent) === false) {\n this.stopCamera();\n }\n if (((_b = data.newValue.unmuteMic) === null || _b === void 0 ? void 0 : _b.isPresent) === false) {\n this.mute();\n }\n if (((_c = data.newValue.shareScreen) === null || _c === void 0 ? void 0 : _c.isPresent) === false) {\n this.stopScreenShare();\n }\n this.emitter.emit('capabilitiesChanged', data);\n }\n callIdChanged() {\n var _a;\n ((_a = this.call) === null || _a === void 0 ? void 0 : _a.id) && this.emitter.emit('callIdChanged', {\n callId: this.call.id\n });\n }\n resetDiagnosticsForwarder(newCall) {\n if (this.diagnosticsForwarder) {\n this.diagnosticsForwarder.unsubscribe();\n }\n if (newCall) {\n this.diagnosticsForwarder = new DiagnosticsForwarder(this.emitter, newCall);\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event, listener) {\n this.emitter.off(event, listener);\n }\n asyncTeeErrorToEventEmitter(f) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield f();\n }\n catch (error) {\n if (isCallError(error)) {\n this.emitter.emit('error', error);\n }\n throw error;\n }\n });\n }\n teeErrorToEventEmitter(f) {\n try {\n return f();\n }\n catch (error) {\n if (isCallError(error)) {\n this.emitter.emit('error', error);\n }\n throw error;\n }\n }\n}\n/**\n * Create a {@link CallAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link CallAdapter} provided by this library.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator, \n/* @conditional-compile-remove(video-background-effects) */ options }) => __awaiter(void 0, void 0, void 0, function* () {\n if (!_isValidIdentifier(userId)) {\n throw new Error('Invalid identifier. Please provide valid identifier object.');\n }\n const callClient = createStatefulCallClient({\n userId\n });\n const callAgent = yield callClient.createCallAgent(credential, {\n displayName\n });\n const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator, /* @conditional-compile-remove(video-background-effects) */ options);\n return adapter;\n});\n/**\n * @private\n */\nconst useAzureCommunicationCallAdapterGeneric = (args, afterCreate, beforeDispose, adapterKind = 'AzureCommunication') => {\n const { credential, locator, userId } = args;\n const displayName = 'displayName' in args ? args.displayName : undefined;\n /* @conditional-compile-remove(video-background-effects) */\n const options = 'options' in args ? args.options : undefined;\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef(undefined);\n const creatingAdapterRef = useRef(false);\n const afterCreateRef = useRef(undefined);\n const beforeDisposeRef = useRef(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n useEffect(() => {\n if (!credential || !locator || !userId) {\n return;\n }\n if (adapterKind === 'AzureCommunication' && !displayName) {\n return;\n }\n (() => __awaiter(void 0, void 0, void 0, function* () {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n yield beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n let newAdapter = undefined;\n if (adapterKind === 'AzureCommunication') {\n // This is just the type check to ensure that displayName is defined.\n if (!displayName) {\n throw new Error('Unreachable code, displayName already checked above.');\n }\n if (creatingAdapterRef.current) {\n console.warn('Adapter is already being created, please see storybook for more information: https://azure.github.io/communication-ui-library/?path=/story/troubleshooting--page');\n return;\n }\n creatingAdapterRef.current = true;\n newAdapter = (yield createAzureCommunicationCallAdapter({\n credential,\n displayName: displayName,\n locator,\n userId: userId,\n /* @conditional-compile-remove(video-background-effects) */ options\n }));\n }\n else if (adapterKind === 'Teams') {\n if (creatingAdapterRef.current) {\n console.warn('Adapter is already being created, skipping creation.');\n return;\n }\n creatingAdapterRef.current = true;\n }\n else {\n throw new Error('Unreachable code, unknown adapterKind');\n }\n if (!newAdapter) {\n throw Error('Unreachable code! Get undefined adapter');\n }\n if (afterCreateRef.current) {\n newAdapter = yield afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n creatingAdapterRef.current = false;\n setAdapter(newAdapter);\n }))();\n }, \n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [adapterRef, afterCreateRef, beforeDisposeRef, adapterKind, credential, locator, userId, displayName]);\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (() => __awaiter(void 0, void 0, void 0, function* () {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n yield beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n }))();\n };\n }, []);\n return adapter;\n};\n/**\n * A custom React hook to simplify the creation of {@link CallAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallAdapter = (args, afterCreate, beforeDispose) => {\n return useAzureCommunicationCallAdapterGeneric(args, afterCreate, beforeDispose, 'AzureCommunication');\n};\n/**\n * Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator, options) => __awaiter(void 0, void 0, void 0, function* () {\n const deviceManager = yield callClient.getDeviceManager();\n yield Promise.all([deviceManager.getCameras(), deviceManager.getMicrophones()]);\n if (deviceManager.isSpeakerSelectionAvailable) {\n yield deviceManager.getSpeakers();\n }\n return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager, /* @conditional-compile-remove(video-background-effects) */ options);\n});\nconst isCallError = (e) => {\n return e['target'] !== undefined && e['innerError'] !== undefined;\n};\n//# sourceMappingURL=AzureCommunicationCallAdapter.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES = ['accessDeniedTeamsMeeting', 'joinCallFailedDueToNoNetwork', 'leftCall', 'removedFromCall'];\n//# sourceMappingURL=CallAdapter.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React, { createContext, useContext } from 'react';\nconst CallAdapterContext = createContext(undefined);\n/**\n * @private\n */\nexport const CallAdapterProvider = (props) => {\n const { adapter } = props;\n return React.createElement(CallAdapterContext.Provider, { value: adapter }, props.children);\n};\n/**\n * @private\n */\nexport const useAdapter = () => {\n const adapter = useContext(CallAdapterContext);\n if (!adapter) {\n throw 'Cannot find adapter please initialize before usage.';\n }\n return adapter;\n};\n//# sourceMappingURL=CallAdapterProvider.js.map"],"names":["__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","adapter","camerasCount","microphonesCount","hasCameras","hasMicrophones","useEffect","constrain","getQueryOptions","askDevicePermission","queryCameras","queryMicrophones","querySpeakers","callInvitationUrl","onFetchAvatarPersonaData","onFetchParticipantMenuItems","page","endedCall","sidePaneRenderer","setSidePaneRenderer","injectedSidePaneProps","setInjectedSidePaneProps","userSetGalleryLayout","setUserSetGalleryLayout","useState","options","galleryOptions","layout","userSetOverflowGalleryPosition","setUserSetOverflowGalleryPosition","overridePropsRef","useRef","current","undefined","onSidePaneIdChange","id","capabilitiesChangedInfoAndRole","capabilitiesChangedNotificationBarProps","activeErrors","activeErrorMessages","trackedErrors","setTrackedErrors","prev","onDismissError","useCallback","error","type","latestErrors","useMemo","locale","palette","leavePageStyle","pageElement","mobileView","startCallHandler","joinCall","microphoneOn","cameraOn","updateSidePaneRenderer","modalLayerHostId","iconName","title","strings","call","failedToJoinTeamsMeetingReasonAccessDeniedTitle","moreDetails","failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails","dataUiId","removedFromCallTitle","removedFromCallMoreDetails","failedToJoinCallDueToNoNetworkTitle","failedToJoinCallDueToNoNetworkMoreDetails","leavingCallTitle","pageStyle","disableStartCallButton","getEndedCallStrings","mobileChatTabHeader","callInvitationURL","onCloseChatPane","galleryLayout","onUserSetGalleryLayoutChange","onSetUserSetOverflowGalleryPosition","Error","CallComposite","CallCompositeInner","Object","assign","formFactor","mainScreenContainerClassName","className","video","audio","leftCallTitle","leftCallMoreDetails","compositeLogger","createClientLogger","ParticipantSubscriber","constructor","participant","emitter","this","isMutedChangedHandler","emit","participantId","identifier","isMuted","displayNameChangedHandler","displayName","isSpeakingChangedHandler","isSpeaking","videoStreamsUpdatedHandler","event","subscribeParticipantEvents","on","unsubscribeAll","off","DiagnosticsForwarder","unsubscribe","_diagnostics","network","networkDiagnosticsChanged","bind","media","mediaDiagnosticsChanged","feature","Features","_emitter","subscribe","args","callClient","callAgent","deviceManager","CallContext","clientState","isTeamsCall","EventEmitter","state","isLocalPreviewMicrophoneEnabled","userId","devices","videoBackgroundImages","videoBackgroundOptions","onResolveVideoEffectDependency","onResolveDependency","selectedVideoBackgroundEffect","cameraStatus","setMaxListeners","maxListeners","bindPublicMethods","displayNameModifier","onFetchProfile","notifyUpdate","cachedDisplayName","originalParticipants","remoteParticipants","shouldNotifyUpdates","key","profile","participantsModifier","createProfileStateModifier","setState","getState","onStateChange","handler","offStateChange","setIsLocalMicrophoneEnabled","setCurrentCallId","callId","onCallEnded","offCallEnded","updateClientState","calls","latestEndedCall","callsEnded","findLatestEndedCall","oldPage","newPage","localVideoStreams","find","s","mediaStreamType","unparentedViews","setBackroundPickerImages","setSelectedVideoBackgroundEffect","callStates","values","length","latestCall","slice","endTime","getTime","AzureCommunicationCallAdapter","locator","participantSubscribers","Map","isMyMutedChanged","isTeamsMeeting","onResolveVideoBackgroundEffectsDependency","context","endCallData","handlers","onClientStateChange","subscribeDeviceManagerEvents","_call","newCall","resetDiagnosticsForwarder","dispose","leaveCall","setCamera","setMicrophone","setSpeaker","startCamera","stopCamera","mute","unmute","startCall","startScreenShare","stopScreenShare","raiseHand","lowerHand","removeParticipant","createStreamView","disposeStreamView","disposeScreenShareStreamView","disposeRemoteVideoStreamView","disposeLocalVideoStreamView","processNewCall","startCaptions","stopCaptions","setSpokenLanguage","setCaptionLanguage","startVideoBackgroundEffect","stopVideoBackgroundEffects","updateBackgroundPickerImages","startTime","Date","asyncTeeErrorToEventEmitter","cameras","getCameras","info","microphones","getMicrophones","speakers","isSpeakerSelectionAvailable","getSpeakers","teeErrorToEventEmitter","shouldCameraBeOnInCall","shouldMicrophoneBeOnInCall","audioOptions","muted","selectedCamera","videoOptions","_joinCall","join","remoteUserId","onCreateLocalStreamView","onCreateRemoteStreamView","onDisposeLocalStreamView","onDisposeRemoteStreamView","onDisposeRemoteScreenShareStreamView","onDisposeRemoteVideoStreamView","forEveryone","onHangUp","unsubscribeCallEvents","device","onSelectCamera","onSelectMicrophone","onSelectSpeaker","selectedEffect","stream","effect","startEffects","stopEffects","onToggleCamera","onToggleMicrophone","isScreenSharingOn","onToggleScreenShare","onToggleRaiseHand","videoBackgroundEffect","isBlurEffect","blurConfig","onBlurVideoBackground","isReplacementEffect","replaceConfig","onReplaceVideoBackground","onRemoveVideoBackgroundEffects","backgroundImages","updateSelectedVideoBackgroundEffect","selectedVideoBackground","participants","idsToAdd","map","backendId","phoneNumber","alternateCallerId","onStartCall","subscribeCallEvents","effectName","onRemoveParticipant","onStartCaptions","onStopCaptions","language","onSetCaptionLanguage","onSetSpokenLanguage","listener","subscribeToCaptionEvents","captionsFeature","captions","captionsReceived","isCaptionsActiveChanged","isCaptionLanguageChanged","isSpokenLanguageChanged","unsubscribeFromCaptionEvents","_e","_f","onRemoteParticipantsUpdated","isScreenSharingOnChanged","callIdChanged","capabilitiesChanged","subscriber","clear","added","removed","joined","forEach","set","get","delete","captionsInfo","isCaptionsFeatureActive","activeSpokenLanguage","activeCaptionLanguage","data","newValue","turnVideoOn","isPresent","unmuteMic","shareScreen","diagnosticsForwarder","f","isCallError","useAzureCommunicationCallAdapterGeneric","afterCreate","beforeDispose","adapterKind","credential","setAdapter","adapterRef","creatingAdapterRef","afterCreateRef","beforeDisposeRef","newAdapter","console","warn","createCallAgent","createAzureCommunicationCallAdapterFromClient","createAzureCommunicationCallAdapter","useAzureCommunicationCallAdapter","getDeviceManager","all","END_CALL_PAGES","CallAdapterContext","createContext","CallAdapterProvider","Provider","children","useAdapter","useContext"],"sourceRoot":""}