mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-02 09:37:47 +01:00
1 line
178 KiB
Plaintext
1 line
178 KiB
Plaintext
{"version":3,"file":"954.47df9dd3ba5b549120bc.js","mappings":";iTAuBAA,EAAAA,EAAAA,IAAiB,kBAAkBC,MAAOC,EAAQC,EAASC,KACzD,MAAM,cACJC,EADI,cACWC,EADX,aAC0BC,EAD1B,OACwCC,GAC1CJ,GAAW,GACTK,GAAYC,EAAAA,EAAAA,IAAsBR,GACnCO,KAILE,EAAAA,EAAAA,KAAUC,EAAAA,EAAAA,IAAsBV,EAAQ,CAAEW,gBAAiB,gBAAkBJ,EAAUK,kBAAoB,UAErGC,EAAAA,EAAAA,IAAQ,iBAAkB,CAC9BC,KAAMP,IAGJH,SACIS,EAAAA,EAAAA,IAAQ,mBAAoB,CAChCC,KAAMP,IAIVP,GAASe,EAAAA,EAAAA,MACLV,IACFL,GAASgB,EAAAA,EAAAA,IAAgBhB,EAAQO,EAAUU,MAG7CC,EAAAA,EAAAA,OAEAT,EAAAA,EAAAA,IAAU,IACLT,EACHmB,WAAY,IACPnB,EAAOmB,WACVC,uBAAmBC,GAErBC,wBAAoBD,IAGjBlB,IACHoB,EAAAA,EAAAA,kBAGEjB,GACFL,EAAQuB,cAAclB,QAI1BR,EAAAA,EAAAA,IAAiB,wBAAwBC,MAAAA,IACvC,MAAMQ,GAAYC,EAAAA,EAAAA,IAAsBR,GAClCyB,GAAOC,EAAAA,EAAAA,IAAW1B,EAAQA,EAAO2B,eAClCF,GAASlB,UAIRqB,EAAAA,EAAAA,cAAa,eAEbf,EAAAA,EAAAA,IAAQ,2BAA4B,CACxCC,KAAMP,EACNsB,eAAeC,EAAAA,EAAAA,iBAAgB,SAC/BC,YAAaN,SAIjB3B,EAAAA,EAAAA,IAAiB,kBAAkB,CAACE,EAAQC,EAASC,KACnD,MAAM,MAAE8B,GAAU9B,GAAW,CAAE8B,OAAO,GAChCzB,GAAYC,EAAAA,EAAAA,IAAsBR,GAClCy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,CAACrlB,MAAM,WAAW0D,OAAOshB,eAAera,EAAE,aAAa,CAAC3K,OAAM,KAAM,IAAIwY,EAAE,GAAG,MAAMH,EAAEpQ,EAAEuQ,GAAGH,EAAEC,EAAEE,EAAE,CAAChV,gCAAgC,IAAImH,EAAEnH,gCAAgC7C,mBAAmB,IAAIgK,EAAEhK,mBAAmBnB,cAAc,IAAImL,EAAEnL,cAAc0iB,WAAW,IAAIvX,EAAEuX,WAAW/T,eAAe,IAAIxD,EAAEwD,eAAe/N,UAAU,IAAIuK,EAAEvK,UAAUN,gBAAgB,IAAI6K,EAAE7K,gBAAgBF,aAAa,IAAI+K,EAAE/K,aAAaL,eAAe,IAAIoL,EAAEpL,eAAe+D,kCAAkC,IAAIqH,EAAErH,kCAAkCkQ,kBAAkB,IAAI7I,EAAE6I,kBAAkBC,cAAc,IAAI9I,EAAE8I,cAAc4O,uBAAuB,IAAI1X,EAAE0X,uBAAuBpd,cAAc,IAAImT,EAAEnT,cAAcK,wBAAwB,IAAI8S,EAAE9S,wBAAwBiQ,WAAW,IAAI6C,EAAE7C,WAAWgB,gBAAgB,IAAI6B,EAAE7B,gBAAgB/T,cAAc,IAAI4V,EAAE5V,cAAcyU,qBAAqB,IAAImB,EAAEnB,qBAAqB/D,yBAAyB,IAAIwF,EAAExF,yBAAyB7G,UAAU,IAAIqM,EAAErM,YAAY,IAAI1B,EAAE0N,EAAE,wBAAwBD,EAAEC,EAAE,gBAAgBK,GAAGL,EAAE,uBAAuBA,EAAE,mBAAmBA,EAAE,mBAA79B,GAAm/B,IAAIK,EAAEX,EAAEgN,EAAQ,IAAIrM,KAAKF,EAAET,EAAEW,GAAGF,EAAEE,GAAGF,EAAE8M,YAAY5hB,OAAOshB,eAAejN,EAAE,aAAa,CAAC/X,OAAM,KAAtvvB","sources":["webpack://telegram-t/./src/global/actions/api/calls.async.ts","webpack://telegram-t/./src/util/phoneCallEmojiConstants.ts","webpack://telegram-t/./src/global/actions/apiUpdaters/calls.async.ts","webpack://telegram-t/./src/util/vibrate.ts","webpack://telegram-t/./src/components/common/AnimatedIcon.tsx","webpack://telegram-t/./src/components/calls/group/MicrophoneButton.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantMenu.tsx","webpack://telegram-t/./src/hooks/useThrottledCallback.ts","webpack://telegram-t/./src/hooks/useRunThrottled.ts","webpack://telegram-t/./src/components/calls/group/OutlinedMicrophoneIcon.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipant.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantList.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantVideo.tsx","webpack://telegram-t/./src/components/calls/group/GroupCallParticipantStreams.tsx","webpack://telegram-t/./src/components/calls/group/GroupCall.tsx","webpack://telegram-t/./src/components/calls/ActiveCallHeader.tsx","webpack://telegram-t/./src/components/calls/phone/PhoneCallButton.module.scss?9dea","webpack://telegram-t/./src/components/calls/phone/PhoneCallButton.tsx","webpack://telegram-t/./src/components/calls/phone/PhoneCall.module.scss?a250","webpack://telegram-t/./src/components/calls/phone/PhoneCall.tsx","webpack://telegram-t/./src/components/calls/phone/RatePhoneCallModal.module.scss?64f6","webpack://telegram-t/./src/components/calls/phone/RatePhoneCallModal.tsx","webpack://telegram-t/./src/lib/secret-sauce/index.js"],"sourcesContent":["import { addActionHandler, getGlobal, setGlobal } from '../../index';\nimport {\n joinGroupCall,\n startSharingScreen,\n leaveGroupCall,\n toggleStream,\n isStreamEnabled,\n setVolume, stopPhoneCall,\n} from '../../../lib/secret-sauce';\n\nimport { GROUP_CALL_VOLUME_MULTIPLIER } from '../../../config';\nimport { callApi } from '../../../api/gramjs';\nimport { selectChat, selectUser } from '../../selectors';\nimport {\n selectActiveGroupCall, selectPhoneCallUser,\n} from '../../selectors/calls';\nimport {\n removeGroupCall,\n updateActiveGroupCall,\n} from '../../reducers/calls';\nimport { getGroupCallAudioContext, getGroupCallAudioElement, removeGroupCallAudioElement } from '../ui/calls';\nimport { loadFullChat } from './chats';\n\naddActionHandler('leaveGroupCall', async (global, actions, payload) => {\n const {\n isFromLibrary, shouldDiscard, shouldRemove, rejoin,\n } = payload || {};\n const groupCall = selectActiveGroupCall(global);\n if (!groupCall) {\n return;\n }\n\n setGlobal(updateActiveGroupCall(global, { connectionState: 'disconnected' }, groupCall.participantsCount - 1));\n\n await callApi('leaveGroupCall', {\n call: groupCall,\n });\n\n if (shouldDiscard) {\n await callApi('discardGroupCall', {\n call: groupCall,\n });\n }\n\n global = getGlobal();\n if (shouldRemove) {\n global = removeGroupCall(global, groupCall.id);\n }\n\n removeGroupCallAudioElement();\n\n setGlobal({\n ...global,\n groupCalls: {\n ...global.groupCalls,\n activeGroupCallId: undefined,\n },\n isCallPanelVisible: undefined,\n });\n\n if (!isFromLibrary) {\n leaveGroupCall();\n }\n\n if (rejoin) {\n actions.joinGroupCall(rejoin);\n }\n});\n\naddActionHandler('toggleGroupCallVideo', async (global) => {\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n await toggleStream('video');\n\n await callApi('editGroupCallParticipant', {\n call: groupCall,\n videoStopped: !isStreamEnabled('video'),\n participant: user,\n });\n});\n\naddActionHandler('requestToSpeak', (global, actions, payload) => {\n const { value } = payload || { value: true };\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n void callApi('editGroupCallParticipant', {\n call: groupCall,\n raiseHand: value,\n participant: user,\n });\n});\n\naddActionHandler('setGroupCallParticipantVolume', (global, actions, payload) => {\n const { participantId, volume } = payload!;\n\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, participantId);\n if (!user || !groupCall) {\n return;\n }\n\n setVolume(participantId, Math.floor(volume / GROUP_CALL_VOLUME_MULTIPLIER) / 100);\n\n void callApi('editGroupCallParticipant', {\n call: groupCall,\n volume: Number(volume),\n participant: user,\n });\n});\n\naddActionHandler('toggleGroupCallMute', async (global, actions, payload) => {\n const { participantId, value } = payload || {};\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, participantId || global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n const muted = value === undefined ? isStreamEnabled('audio', user.id) : value;\n\n if (!participantId) {\n await toggleStream('audio');\n } else {\n setVolume(participantId, muted ? 0 : 1);\n }\n\n await callApi('editGroupCallParticipant', {\n call: groupCall,\n muted,\n participant: user,\n });\n});\n\naddActionHandler('toggleGroupCallPresentation', async (global, actions, payload) => {\n const groupCall = selectActiveGroupCall(global);\n const user = selectUser(global, global.currentUserId!);\n if (!user || !groupCall) {\n return;\n }\n\n const value = payload?.value !== undefined ? payload?.value : !isStreamEnabled('presentation');\n if (value) {\n const params = await startSharingScreen();\n if (!params) {\n return;\n }\n\n await callApi('joinGroupCallPresentation', {\n call: groupCall,\n params,\n });\n } else {\n await toggleStream('presentation', false);\n await callApi('leaveGroupCallPresentation', {\n call: groupCall,\n });\n }\n\n await callApi('editGroupCallParticipant', {\n call: groupCall,\n presentationPaused: !isStreamEnabled('presentation'),\n participant: user,\n });\n});\n\naddActionHandler('connectToActiveGroupCall', async (global, actions) => {\n const groupCall = selectActiveGroupCall(global);\n if (!groupCall) return;\n\n if (groupCall.connectionState === 'discarded') {\n actions.showNotification({ message: 'This voice chat is not active' });\n return;\n }\n\n const audioElement = getGroupCallAudioElement();\n const audioContext = getGroupCallAudioContext();\n\n if (!audioElement || !audioContext) {\n return;\n }\n\n const {\n currentUserId,\n } = global;\n\n if (!currentUserId) return;\n\n const params = await joinGroupCall(currentUserId, audioContext, audioElement, actions.apiUpdate);\n\n const result = await callApi('joinGroupCall', {\n call: groupCall,\n params,\n inviteHash: groupCall.inviteHash,\n });\n\n if (!result) return;\n\n actions.loadMoreGroupCallParticipants();\n\n if (groupCall.chatId) {\n const chat = selectChat(getGlobal(), groupCall.chatId);\n if (!chat) return;\n await loadFullChat(chat);\n }\n});\n\naddActionHandler('connectToActivePhoneCall', async (global) => {\n const { phoneCall } = global;\n\n if (!phoneCall) return;\n\n const user = selectPhoneCallUser(global);\n\n if (!user) return;\n\n const dhConfig = await callApi('getDhConfig');\n\n if (!dhConfig) return;\n\n await callApi('createPhoneCallState', [true]);\n\n const gAHash = await callApi('requestPhoneCall', [dhConfig])!;\n\n await callApi('requestCall', { user, gAHash, isVideo: phoneCall.isVideo });\n});\n\naddActionHandler('acceptCall', async (global) => {\n const { phoneCall } = global;\n\n if (!phoneCall) return;\n\n const dhConfig = await callApi('getDhConfig');\n if (!dhConfig) return;\n\n await callApi('createPhoneCallState', [false]);\n\n const gB = await callApi('acceptPhoneCall', [dhConfig])!;\n callApi('acceptCall', { call: phoneCall, gB });\n});\n\naddActionHandler('sendSignalingData', (global, actions, payload) => {\n const { phoneCall } = global;\n if (!phoneCall) {\n return;\n }\n\n const data = JSON.stringify(payload);\n\n (async () => {\n const encodedData = await callApi('encodePhoneCallData', [data]);\n\n if (!encodedData) return;\n\n callApi('sendSignalingData', { data: encodedData, call: phoneCall });\n })();\n});\n\naddActionHandler('closeCallRatingModal', (global) => {\n return {\n ...global,\n ratingPhoneCall: undefined,\n };\n});\n\naddActionHandler('setCallRating', (global, actions, payload) => {\n const { ratingPhoneCall } = global;\n if (!ratingPhoneCall) {\n return undefined;\n }\n\n const { rating, comment } = payload;\n\n callApi('setCallRating', { call: ratingPhoneCall, rating, comment });\n\n return {\n ...global,\n ratingPhoneCall: undefined,\n };\n});\n\naddActionHandler('hangUp', (global) => {\n const { phoneCall } = global;\n\n if (!phoneCall) return undefined;\n\n if (phoneCall.state === 'discarded') {\n callApi('destroyPhoneCallState');\n stopPhoneCall();\n return {\n ...global,\n phoneCall: undefined,\n isCallPanelVisible: undefined,\n };\n }\n\n callApi('destroyPhoneCallState');\n stopPhoneCall();\n callApi('discardCall', { call: phoneCall });\n\n if (phoneCall.state === 'requesting') {\n return {\n ...global,\n phoneCall: undefined,\n isCallPanelVisible: undefined,\n };\n }\n\n return undefined;\n});\n","export const EMOJI_DATA = new Uint16Array([\n 0xd83d, 0xde09, 0xd83d, 0xde0d, 0xd83d, 0xde1b, 0xd83d, 0xde2d, 0xd83d, 0xde31, 0xd83d, 0xde21,\n 0xd83d, 0xde0e, 0xd83d, 0xde34, 0xd83d, 0xde35, 0xd83d, 0xde08, 0xd83d, 0xde2c, 0xd83d, 0xde07,\n 0xd83d, 0xde0f, 0xd83d, 0xdc6e, 0xd83d, 0xdc77, 0xd83d, 0xdc82, 0xd83d, 0xdc76, 0xd83d, 0xdc68,\n 0xd83d, 0xdc69, 0xd83d, 0xdc74, 0xd83d, 0xdc75, 0xd83d, 0xde3b, 0xd83d, 0xde3d, 0xd83d, 0xde40,\n 0xd83d, 0xdc7a, 0xd83d, 0xde48, 0xd83d, 0xde49, 0xd83d, 0xde4a, 0xd83d, 0xdc80, 0xd83d, 0xdc7d,\n 0xd83d, 0xdca9, 0xd83d, 0xdd25, 0xd83d, 0xdca5, 0xd83d, 0xdca4, 0xd83d, 0xdc42, 0xd83d, 0xdc40,\n 0xd83d, 0xdc43, 0xd83d, 0xdc45, 0xd83d, 0xdc44, 0xd83d, 0xdc4d, 0xd83d, 0xdc4e, 0xd83d, 0xdc4c,\n 0xd83d, 0xdc4a, 0x270c, 0x270b, 0xd83d, 0xdc50, 0xd83d, 0xdc46, 0xd83d, 0xdc47, 0xd83d, 0xdc49,\n 0xd83d, 0xdc48, 0xd83d, 0xde4f, 0xd83d, 0xdc4f, 0xd83d, 0xdcaa, 0xd83d, 0xdeb6, 0xd83c, 0xdfc3,\n 0xd83d, 0xdc83, 0xd83d, 0xdc6b, 0xd83d, 0xdc6a, 0xd83d, 0xdc6c, 0xd83d, 0xdc6d, 0xd83d, 0xdc85,\n 0xd83c, 0xdfa9, 0xd83d, 0xdc51, 0xd83d, 0xdc52, 0xd83d, 0xdc5f, 0xd83d, 0xdc5e, 0xd83d, 0xdc60,\n 0xd83d, 0xdc55, 0xd83d, 0xdc57, 0xd83d, 0xdc56, 0xd83d, 0xdc59, 0xd83d, 0xdc5c, 0xd83d, 0xdc53,\n 0xd83c, 0xdf80, 0xd83d, 0xdc84, 0xd83d, 0xdc9b, 0xd83d, 0xdc99, 0xd83d, 0xdc9c, 0xd83d, 0xdc9a,\n 0xd83d, 0xdc8d, 0xd83d, 0xdc8e, 0xd83d, 0xdc36, 0xd83d, 0xdc3a, 0xd83d, 0xdc31, 0xd83d, 0xdc2d,\n 0xd83d, 0xdc39, 0xd83d, 0xdc30, 0xd83d, 0xdc38, 0xd83d, 0xdc2f, 0xd83d, 0xdc28, 0xd83d, 0xdc3b,\n 0xd83d, 0xdc37, 0xd83d, 0xdc2e, 0xd83d, 0xdc17, 0xd83d, 0xdc34, 0xd83d, 0xdc11, 0xd83d, 0xdc18,\n 0xd83d, 0xdc3c, 0xd83d, 0xdc27, 0xd83d, 0xdc25, 0xd83d, 0xdc14, 0xd83d, 0xdc0d, 0xd83d, 0xdc22,\n 0xd83d, 0xdc1b, 0xd83d, 0xdc1d, 0xd83d, 0xdc1c, 0xd83d, 0xdc1e, 0xd83d, 0xdc0c, 0xd83d, 0xdc19,\n 0xd83d, 0xdc1a, 0xd83d, 0xdc1f, 0xd83d, 0xdc2c, 0xd83d, 0xdc0b, 0xd83d, 0xdc10, 0xd83d, 0xdc0a,\n 0xd83d, 0xdc2b, 0xd83c, 0xdf40, 0xd83c, 0xdf39, 0xd83c, 0xdf3b, 0xd83c, 0xdf41, 0xd83c, 0xdf3e,\n 0xd83c, 0xdf44, 0xd83c, 0xdf35, 0xd83c, 0xdf34, 0xd83c, 0xdf33, 0xd83c, 0xdf1e, 0xd83c, 0xdf1a,\n 0xd83c, 0xdf19, 0xd83c, 0xdf0e, 0xd83c, 0xdf0b, 0x26a1, 0x2614, 0x2744, 0x26c4, 0xd83c, 0xdf00,\n 0xd83c, 0xdf08, 0xd83c, 0xdf0a, 0xd83c, 0xdf93, 0xd83c, 0xdf86, 0xd83c, 0xdf83, 0xd83d, 0xdc7b,\n 0xd83c, 0xdf85, 0xd83c, 0xdf84, 0xd83c, 0xdf81, 0xd83c, 0xdf88, 0xd83d, 0xdd2e, 0xd83c, 0xdfa5,\n 0xd83d, 0xdcf7, 0xd83d, 0xdcbf, 0xd83d, 0xdcbb, 0x260e, 0xd83d, 0xdce1, 0xd83d, 0xdcfa, 0xd83d,\n 0xdcfb, 0xd83d, 0xdd09, 0xd83d, 0xdd14, 0x23f3, 0x23f0, 0x231a, 0xd83d, 0xdd12, 0xd83d, 0xdd11,\n 0xd83d, 0xdd0e, 0xd83d, 0xdca1, 0xd83d, 0xdd26, 0xd83d, 0xdd0c, 0xd83d, 0xdd0b, 0xd83d, 0xdebf,\n 0xd83d, 0xdebd, 0xd83d, 0xdd27, 0xd83d, 0xdd28, 0xd83d, 0xdeaa, 0xd83d, 0xdeac, 0xd83d, 0xdca3,\n 0xd83d, 0xdd2b, 0xd83d, 0xdd2a, 0xd83d, 0xdc8a, 0xd83d, 0xdc89, 0xd83d, 0xdcb0, 0xd83d, 0xdcb5,\n 0xd83d, 0xdcb3, 0x2709, 0xd83d, 0xdceb, 0xd83d, 0xdce6, 0xd83d, 0xdcc5, 0xd83d, 0xdcc1, 0x2702,\n 0xd83d, 0xdccc, 0xd83d, 0xdcce, 0x2712, 0x270f, 0xd83d, 0xdcd0, 0xd83d, 0xdcda, 0xd83d, 0xdd2c,\n 0xd83d, 0xdd2d, 0xd83c, 0xdfa8, 0xd83c, 0xdfac, 0xd83c, 0xdfa4, 0xd83c, 0xdfa7, 0xd83c, 0xdfb5,\n 0xd83c, 0xdfb9, 0xd83c, 0xdfbb, 0xd83c, 0xdfba, 0xd83c, 0xdfb8, 0xd83d, 0xdc7e, 0xd83c, 0xdfae,\n 0xd83c, 0xdccf, 0xd83c, 0xdfb2, 0xd83c, 0xdfaf, 0xd83c, 0xdfc8, 0xd83c, 0xdfc0, 0x26bd, 0x26be,\n 0xd83c, 0xdfbe, 0xd83c, 0xdfb1, 0xd83c, 0xdfc9, 0xd83c, 0xdfb3, 0xd83c, 0xdfc1, 0xd83c, 0xdfc7,\n 0xd83c, 0xdfc6, 0xd83c, 0xdfca, 0xd83c, 0xdfc4, 0x2615, 0xd83c, 0xdf7c, 0xd83c, 0xdf7a, 0xd83c,\n 0xdf77, 0xd83c, 0xdf74, 0xd83c, 0xdf55, 0xd83c, 0xdf54, 0xd83c, 0xdf5f, 0xd83c, 0xdf57, 0xd83c,\n 0xdf71, 0xd83c, 0xdf5a, 0xd83c, 0xdf5c, 0xd83c, 0xdf61, 0xd83c, 0xdf73, 0xd83c, 0xdf5e, 0xd83c,\n 0xdf69, 0xd83c, 0xdf66, 0xd83c, 0xdf82, 0xd83c, 0xdf70, 0xd83c, 0xdf6a, 0xd83c, 0xdf6b, 0xd83c,\n 0xdf6d, 0xd83c, 0xdf6f, 0xd83c, 0xdf4e, 0xd83c, 0xdf4f, 0xd83c, 0xdf4a, 0xd83c, 0xdf4b, 0xd83c,\n 0xdf52, 0xd83c, 0xdf47, 0xd83c, 0xdf49, 0xd83c, 0xdf53, 0xd83c, 0xdf51, 0xd83c, 0xdf4c, 0xd83c,\n 0xdf50, 0xd83c, 0xdf4d, 0xd83c, 0xdf46, 0xd83c, 0xdf45, 0xd83c, 0xdf3d, 0xd83c, 0xdfe1, 0xd83c,\n 0xdfe5, 0xd83c, 0xdfe6, 0x26ea, 0xd83c, 0xdff0, 0x26fa, 0xd83c, 0xdfed, 0xd83d, 0xddfb, 0xd83d,\n 0xddfd, 0xd83c, 0xdfa0, 0xd83c, 0xdfa1, 0x26f2, 0xd83c, 0xdfa2, 0xd83d, 0xdea2, 0xd83d, 0xdea4,\n 0x2693, 0xd83d, 0xde80, 0x2708, 0xd83d, 0xde81, 0xd83d, 0xde82, 0xd83d, 0xde8b, 0xd83d, 0xde8e,\n 0xd83d, 0xde8c, 0xd83d, 0xde99, 0xd83d, 0xde97, 0xd83d, 0xde95, 0xd83d, 0xde9b, 0xd83d, 0xdea8,\n 0xd83d, 0xde94, 0xd83d, 0xde92, 0xd83d, 0xde91, 0xd83d, 0xdeb2, 0xd83d, 0xdea0, 0xd83d, 0xde9c,\n 0xd83d, 0xdea6, 0x26a0, 0xd83d, 0xdea7, 0x26fd, 0xd83c, 0xdfb0, 0xd83d, 0xddff, 0xd83c, 0xdfaa,\n 0xd83c, 0xdfad, 0xd83c, 0xddef, 0xd83c, 0xddf5, 0xd83c, 0xddf0, 0xd83c, 0xddf7, 0xd83c, 0xdde9,\n 0xd83c, 0xddea, 0xd83c, 0xdde8, 0xd83c, 0xddf3, 0xd83c, 0xddfa, 0xd83c, 0xddf8, 0xd83c, 0xddeb,\n 0xd83c, 0xddf7, 0xd83c, 0xddea, 0xd83c, 0xddf8, 0xd83c, 0xddee, 0xd83c, 0xddf9, 0xd83c, 0xddf7,\n 0xd83c, 0xddfa, 0xd83c, 0xddec, 0xd83c, 0xdde7, 0x0031, 0x20e3, 0x0032, 0x20e3, 0x0033, 0x20e3,\n 0x0034, 0x20e3, 0x0035, 0x20e3, 0x0036, 0x20e3, 0x0037, 0x20e3, 0x0038, 0x20e3, 0x0039, 0x20e3,\n 0x0030, 0x20e3, 0xd83d, 0xdd1f, 0x2757, 0x2753, 0x2665, 0x2666, 0xd83d, 0xdcaf, 0xd83d, 0xdd17,\n 0xd83d, 0xdd31, 0xd83d, 0xdd34, 0xd83d, 0xdd35, 0xd83d, 0xdd36, 0xd83d, 0xdd37,\n]);\n\nexport const EMOJI_OFFSETS = [\n 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22,\n 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46,\n 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70,\n 72, 74, 76, 78, 80, 82, 84, 86, 87, 88, 90, 92,\n 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116,\n 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140,\n 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164,\n 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188,\n 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212,\n 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236,\n 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 259,\n 260, 261, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280,\n 282, 284, 286, 288, 290, 292, 294, 295, 297, 299, 301, 303,\n 305, 306, 307, 308, 310, 312, 314, 316, 318, 320, 322, 324,\n 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348,\n 350, 351, 353, 355, 357, 359, 360, 362, 364, 365, 366, 368,\n 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392,\n 394, 396, 398, 400, 402, 404, 406, 407, 408, 410, 412, 414,\n 416, 418, 420, 422, 424, 426, 427, 429, 431, 433, 435, 437,\n 439, 441, 443, 445, 447, 449, 451, 453, 455, 457, 459, 461,\n 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 485,\n 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 508,\n 510, 511, 513, 515, 517, 519, 521, 522, 524, 526, 528, 529,\n 531, 532, 534, 536, 538, 540, 542, 544, 546, 548, 550, 552,\n 554, 556, 558, 560, 562, 564, 566, 567, 569, 570, 572, 574,\n 576, 578, 582, 586, 590, 594, 598, 602, 606, 610, 614, 618,\n 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, 641,\n 642, 643, 644, 646, 648, 650, 652, 654, 656, 658,\n];\n","import { addActionHandler, getGlobal, setGlobal } from '../../index';\nimport { selectActiveGroupCall, selectGroupCallParticipant, selectPhoneCallUser } from '../../selectors/calls';\nimport { updateGroupCall, updateGroupCallParticipant } from '../../reducers/calls';\nimport { omit } from '../../../util/iteratees';\nimport {\n ApiCallProtocol,\n handleUpdateGroupCallConnection,\n handleUpdateGroupCallParticipants,\n joinPhoneCall, processSignalingMessage,\n} from '../../../lib/secret-sauce';\nimport { ApiPhoneCall } from '../../../api/types';\nimport { ARE_CALLS_SUPPORTED } from '../../../util/environment';\nimport { callApi } from '../../../api/gramjs';\nimport * as langProvider from '../../../util/langProvider';\nimport { EMOJI_DATA, EMOJI_OFFSETS } from '../../../util/phoneCallEmojiConstants';\n\naddActionHandler('apiUpdate', (global, actions, update) => {\n const { activeGroupCallId } = global.groupCalls;\n\n switch (update['@type']) {\n case 'updateGroupCallLeavePresentation': {\n actions.toggleGroupCallPresentation({ value: false });\n break;\n }\n case 'updateGroupCallStreams': {\n if (!update.userId || !activeGroupCallId) break;\n if (!selectGroupCallParticipant(global, activeGroupCallId, update.userId)) break;\n\n return updateGroupCallParticipant(global, activeGroupCallId, update.userId, omit(update, ['@type', 'userId']));\n }\n case 'updateGroupCallConnectionState': {\n if (!activeGroupCallId) break;\n\n if (update.connectionState === 'disconnected') {\n actions.leaveGroupCall({ isFromLibrary: true });\n break;\n }\n\n return updateGroupCall(global, activeGroupCallId, {\n connectionState: update.connectionState,\n isSpeakerDisabled: update.isSpeakerDisabled,\n });\n }\n case 'updateGroupCallParticipants': {\n const { groupCallId, participants } = update;\n if (activeGroupCallId === groupCallId) {\n void handleUpdateGroupCallParticipants(participants);\n }\n break;\n }\n case 'updateGroupCallConnection': {\n if (update.data.stream) {\n actions.showNotification({ message: 'Big live streams are not yet supported' });\n actions.leaveGroupCall();\n break;\n }\n void handleUpdateGroupCallConnection(update.data, update.presentation);\n\n const groupCall = selectActiveGroupCall(global);\n if (groupCall?.participants && Object.keys(groupCall.participants).length > 0) {\n void handleUpdateGroupCallParticipants(Object.values(groupCall.participants));\n }\n break;\n }\n case 'updatePhoneCallMediaState':\n return {\n ...global,\n phoneCall: {\n ...global.phoneCall,\n ...omit(update, ['@type']),\n } as ApiPhoneCall,\n };\n case 'updatePhoneCall': {\n if (!ARE_CALLS_SUPPORTED) return undefined;\n const { phoneCall, currentUserId } = global;\n\n const call: ApiPhoneCall = {\n ...phoneCall,\n ...update.call,\n };\n\n const isOutgoing = phoneCall?.adminId === currentUserId;\n\n global = {\n ...global,\n phoneCall: call,\n };\n\n if (phoneCall && phoneCall.id && call.id !== phoneCall.id) {\n if (call.state !== 'discarded') {\n callApi('discardCall', {\n call,\n isBusy: true,\n });\n }\n return undefined;\n }\n\n const {\n accessHash, state, connections, gB,\n } = call;\n\n if (state === 'active' || state === 'accepted') {\n if (!verifyPhoneCallProtocol(call.protocol)) {\n const user = selectPhoneCallUser(global);\n actions.hangUp();\n actions.showNotification({ message: langProvider.getTranslation('VoipPeerIncompatible', user?.firstName) });\n return undefined;\n }\n }\n\n if (state === 'discarded') {\n // Discarded from other device\n if (!phoneCall) return undefined;\n\n return {\n ...global,\n ...(call.needRating && { ratingPhoneCall: call }),\n isCallPanelVisible: undefined,\n };\n } else if (state === 'accepted' && accessHash && gB) {\n (async () => {\n const { gA, keyFingerprint, emojis } = await callApi('confirmPhoneCall', [gB, EMOJI_DATA, EMOJI_OFFSETS])!;\n\n global = getGlobal();\n const newCall = {\n ...global.phoneCall,\n emojis,\n } as ApiPhoneCall;\n\n setGlobal({\n ...global,\n phoneCall: newCall,\n });\n\n callApi('confirmCall', {\n call, gA, keyFingerprint,\n });\n })();\n } else if (state === 'active' && connections && phoneCall?.state !== 'active') {\n if (!isOutgoing) {\n callApi('receivedCall', { call });\n (async () => {\n const { emojis } = await callApi('confirmPhoneCall', [call!.gAOrB!, EMOJI_DATA, EMOJI_OFFSETS])!;\n\n global = getGlobal();\n const newCall = {\n ...global.phoneCall,\n emojis,\n } as ApiPhoneCall;\n\n setGlobal({\n ...global,\n phoneCall: newCall,\n });\n })();\n }\n void joinPhoneCall(\n connections, actions.sendSignalingData, isOutgoing, Boolean(call?.isVideo), actions.apiUpdate,\n );\n }\n\n return global;\n }\n case 'updatePhoneCallConnectionState': {\n const { connectionState } = update;\n\n if (!global.phoneCall) return global;\n\n if (connectionState === 'closed' || connectionState === 'disconnected' || connectionState === 'failed') {\n actions.hangUp();\n return undefined;\n }\n\n return {\n ...global,\n phoneCall: {\n ...global.phoneCall,\n isConnected: connectionState === 'connected',\n },\n };\n }\n case 'updatePhoneCallSignalingData': {\n const { phoneCall } = global;\n\n if (!phoneCall) {\n break;\n }\n\n callApi('decodePhoneCallData', [update.data])?.then(processSignalingMessage);\n break;\n }\n }\n\n return undefined;\n});\n\nfunction verifyPhoneCallProtocol(protocol?: ApiCallProtocol) {\n return protocol?.libraryVersions.some((version) => {\n return version === '4.0.0' || version === '4.0.1';\n });\n}\n","export const vibrateShort = () => {\n navigator.vibrate?.(50);\n};\n","import React, {\n FC, memo, useEffect, useState,\n} from '../../lib/teact/teact';\n\nimport getAnimationData, { ANIMATED_STICKERS_PATHS } from './helpers/animatedAssets';\n\nimport AnimatedSticker from './AnimatedSticker';\n\ntype OwnProps = {\n name: keyof typeof ANIMATED_STICKERS_PATHS;\n size: number;\n playSegment?: [number, number];\n color?: [number, number, number];\n};\n\nconst AnimatedIcon: FC<OwnProps> = ({\n size,\n name,\n playSegment,\n color,\n}) => {\n const [iconData, setIconData] = useState<string>();\n\n useEffect(() => {\n getAnimationData(name).then(setIconData);\n }, [name]);\n\n return (\n <AnimatedSticker\n id={name}\n play\n noLoop\n playSegment={playSegment}\n size={size}\n speed={1}\n animationData={iconData}\n color={color}\n />\n );\n};\n\nexport default memo(AnimatedIcon);\n","import { GroupCallConnectionState } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useEffect, useMemo, useRef, useState,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\n\nimport buildClassName from '../../../util/buildClassName';\nimport { vibrateShort } from '../../../util/vibrate';\nimport usePrevious from '../../../hooks/usePrevious';\nimport { selectActiveGroupCall, selectGroupCallParticipant } from '../../../global/selectors/calls';\nimport useLang from '../../../hooks/useLang';\n\nimport AnimatedIcon from '../../common/AnimatedIcon';\n\nimport './MicrophoneButton.scss';\n\nconst CONNECTION_STATE_DEFAULT = 'discarded';\n\ntype StateProps = {\n connectionState?: GroupCallConnectionState;\n hasRequestedToSpeak: boolean;\n isMuted?: boolean;\n canSelfUnmute?: boolean;\n noAudioStream: boolean;\n};\n\nconst REQUEST_TO_SPEAK_THROTTLE = 3000;\nconst HOLD_TO_SPEAK_TIME = 200;\nconst ICON_SIZE = 48;\n\nconst MicrophoneButton: FC<StateProps> = ({\n noAudioStream,\n canSelfUnmute,\n isMuted,\n hasRequestedToSpeak,\n connectionState,\n}) => {\n const {\n toggleGroupCallMute,\n requestToSpeak,\n playGroupCallSound,\n } = getActions();\n\n const lang = useLang();\n const muteMouseDownState = useRef('up');\n\n const [isRequestingToSpeak, setIsRequestingToSpeak] = useState(false);\n const isConnecting = connectionState !== 'connected';\n const shouldRaiseHand = !canSelfUnmute && isMuted;\n const prevShouldRaiseHand = usePrevious(shouldRaiseHand);\n\n useEffect(() => {\n if (prevShouldRaiseHand && !shouldRaiseHand) {\n playGroupCallSound({ sound: 'allowTalk' });\n }\n }, [playGroupCallSound, prevShouldRaiseHand, shouldRaiseHand]);\n\n // Voice mini\n // unmuted -> muted [69, 99]\n // muted -> unmuted [36, 69]\n // raise -> muted [0, 36]\n // muted -> raise [99, 136]\n // unmuted -> raise [136, 172]\n // TODO should probably move to other component\n const playSegment: [number, number] = useMemo(() => {\n if (isRequestingToSpeak) {\n const r = Math.floor(Math.random() * 100);\n return (r < 32 ? [0, 120]\n : (r < 64 ? [120, 240]\n : (r < 97 ? [240, 420]\n : [420, 540]\n )\n )\n );\n }\n if (!prevShouldRaiseHand && shouldRaiseHand) {\n return noAudioStream ? [99, 135] : [136, 172];\n }\n if (prevShouldRaiseHand && !shouldRaiseHand) {\n return [0, 36];\n }\n if (!shouldRaiseHand) {\n return noAudioStream ? [69, 99] : [36, 69];\n }\n return [0, 0];\n }, [prevShouldRaiseHand, isRequestingToSpeak, noAudioStream, shouldRaiseHand]);\n\n const animatedIconName = isRequestingToSpeak ? 'HandFilled' : 'VoiceMini';\n\n const toggleMute = () => {\n vibrateShort();\n toggleGroupCallMute();\n };\n\n const handleMouseDownMute = () => {\n if (shouldRaiseHand) {\n if (isRequestingToSpeak) return;\n vibrateShort();\n requestToSpeak();\n setIsRequestingToSpeak(true);\n setTimeout(() => {\n setIsRequestingToSpeak(false);\n }, REQUEST_TO_SPEAK_THROTTLE);\n return;\n }\n muteMouseDownState.current = 'down';\n if (noAudioStream) {\n setTimeout(() => {\n if (muteMouseDownState.current === 'down') {\n muteMouseDownState.current = 'hold';\n toggleMute();\n }\n }, HOLD_TO_SPEAK_TIME);\n }\n };\n\n const handleMouseUpMute = () => {\n if (shouldRaiseHand) {\n return;\n }\n toggleMute();\n muteMouseDownState.current = 'up';\n };\n\n const buttonText = useMemo(() => {\n return lang(\n hasRequestedToSpeak ? 'VoipMutedTapedForSpeak' : (\n shouldRaiseHand ? 'VoipMutedByAdmin' : (\n noAudioStream ? 'VoipUnmute' : 'VoipTapToMute'\n )\n ),\n );\n }, [hasRequestedToSpeak, noAudioStream, lang, shouldRaiseHand]);\n\n return (\n <div className=\"button-wrapper microphone-wrapper\">\n <button\n className={buildClassName(\n 'MicrophoneButton',\n noAudioStream && 'crossed',\n canSelfUnmute && 'can-self-unmute',\n isConnecting && 'is-connecting',\n shouldRaiseHand && 'muted-by-admin',\n )}\n onMouseDown={handleMouseDownMute}\n onMouseUp={handleMouseUpMute}\n >\n <AnimatedIcon\n name={animatedIconName}\n size={ICON_SIZE}\n playSegment={playSegment}\n />\n </button>\n <div className=\"button-text\">\n {buttonText}\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => {\n const groupCall = selectActiveGroupCall(global);\n\n const { connectionState } = groupCall || {};\n const meParticipant = groupCall && selectGroupCallParticipant(global, groupCall.id, global.currentUserId!);\n\n const {\n raiseHandRating, hasAudioStream, canSelfUnmute, isMuted,\n } = meParticipant || {};\n\n return {\n connectionState: connectionState || CONNECTION_STATE_DEFAULT,\n hasRequestedToSpeak: Boolean(raiseHandRating),\n noAudioStream: !hasAudioStream,\n canSelfUnmute,\n isMuted,\n };\n },\n)(MicrophoneButton));\n","import { GroupCallParticipant } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useCallback, useEffect, useState,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\n\nimport { IAnchorPosition } from '../../../types';\n\nimport buildClassName from '../../../util/buildClassName';\nimport useRunThrottled from '../../../hooks/useRunThrottled';\nimport useFlag from '../../../hooks/useFlag';\nimport useLang from '../../../hooks/useLang';\nimport { selectIsAdminInActiveGroupCall } from '../../../global/selectors/calls';\nimport { GROUP_CALL_DEFAULT_VOLUME, GROUP_CALL_VOLUME_MULTIPLIER } from '../../../config';\n\nimport Menu from '../../ui/Menu';\nimport MenuItem from '../../ui/MenuItem';\nimport AnimatedIcon from '../../common/AnimatedIcon';\nimport DeleteMemberModal from '../../right/DeleteMemberModal';\n\nimport './GroupCallParticipantMenu.scss';\n\nconst SPEAKER_ICON_DISABLED_SEGMENT: [number, number] = [0, 17];\nconst SPEAKER_ICON_ENABLED_SEGMENT: [number, number] = [17, 34];\n\ntype OwnProps = {\n participant?: GroupCallParticipant;\n closeDropdown: VoidFunction;\n isDropdownOpen: boolean;\n anchor?: IAnchorPosition;\n};\n\ntype StateProps = {\n isAdmin: boolean;\n};\n\nconst VOLUME_ZERO = 0;\nconst VOLUME_LOW = 50;\nconst VOLUME_MEDIUM = 100;\nconst VOLUME_NORMAL = 150;\n\nconst VOLUME_CHANGE_THROTTLE = 500;\n\nconst SPEAKER_ICON_SIZE = 24;\n\nconst GroupCallParticipantMenu: FC<OwnProps & StateProps> = ({\n participant,\n closeDropdown,\n isDropdownOpen,\n anchor,\n isAdmin,\n}) => {\n const {\n toggleGroupCallMute,\n setGroupCallParticipantVolume,\n toggleGroupCallPanel,\n openChat,\n requestToSpeak,\n } = getActions();\n\n const lang = useLang();\n const [isDeleteUserModalOpen, openDeleteUserModal, closeDeleteUserModal] = useFlag();\n\n const id = participant?.id;\n const {\n isMutedByMe, isMuted, isSelf, canSelfUnmute,\n } = participant || {};\n const isRaiseHand = Boolean(participant?.raiseHandRating);\n const shouldRaiseHand = !canSelfUnmute && isMuted;\n\n const [localVolume, setLocalVolume] = useState(\n isMutedByMe ? VOLUME_ZERO : ((participant?.volume || GROUP_CALL_DEFAULT_VOLUME) / GROUP_CALL_VOLUME_MULTIPLIER),\n );\n\n useEffect(() => {\n setLocalVolume(isMutedByMe\n ? VOLUME_ZERO\n : ((participant?.volume || GROUP_CALL_DEFAULT_VOLUME) / GROUP_CALL_VOLUME_MULTIPLIER));\n // We only want to initialize local volume when switching participants and ignore following updates from server\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [id]);\n\n const runThrottled = useRunThrottled(VOLUME_CHANGE_THROTTLE);\n\n const handleRemove = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n openDeleteUserModal();\n closeDropdown();\n }, [openDeleteUserModal, closeDropdown]);\n\n const handleCancelRequestToSpeak = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n requestToSpeak({\n value: false,\n });\n closeDropdown();\n }, [requestToSpeak, closeDropdown]);\n\n const handleMute = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n closeDropdown();\n\n if (!isAdmin) {\n setLocalVolume(isMutedByMe ? GROUP_CALL_DEFAULT_VOLUME / GROUP_CALL_VOLUME_MULTIPLIER : VOLUME_ZERO);\n }\n\n toggleGroupCallMute({\n participantId: id,\n value: isAdmin ? !shouldRaiseHand : !isMutedByMe,\n });\n }, [closeDropdown, toggleGroupCallMute, id, isAdmin, shouldRaiseHand, isMutedByMe]);\n\n const handleOpenProfile = useCallback((e: React.SyntheticEvent<any>) => {\n e.stopPropagation();\n toggleGroupCallPanel();\n openChat({\n id,\n });\n closeDropdown();\n }, [toggleGroupCallPanel, closeDropdown, openChat, id]);\n\n const isLocalVolumeZero = localVolume === VOLUME_ZERO;\n const speakerIconPlaySegment = isLocalVolumeZero ? SPEAKER_ICON_DISABLED_SEGMENT : SPEAKER_ICON_ENABLED_SEGMENT;\n\n const handleChangeVolume = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = Number(e.target.value);\n setLocalVolume(value);\n runThrottled(() => {\n if (value === VOLUME_ZERO) {\n toggleGroupCallMute({\n participantId: id,\n value: true,\n });\n } else {\n setGroupCallParticipantVolume({\n participantId: id,\n volume: Math.floor(value * GROUP_CALL_VOLUME_MULTIPLIER),\n });\n }\n });\n };\n\n return (\n <div>\n <Menu\n isOpen={isDropdownOpen}\n positionX=\"right\"\n autoClose\n style={anchor ? `right: 1rem; top: ${anchor.y}px;` : undefined}\n onClose={closeDropdown}\n className=\"participant-menu\"\n >\n {!isSelf && !shouldRaiseHand && (\n <div className=\"group\">\n <div className={buildClassName(\n 'volume-control',\n localVolume < VOLUME_LOW && 'low',\n localVolume >= VOLUME_LOW && localVolume < VOLUME_MEDIUM && 'medium',\n localVolume >= VOLUME_MEDIUM && localVolume < VOLUME_NORMAL && 'normal',\n localVolume >= VOLUME_NORMAL && 'high',\n )}\n >\n <input\n type=\"range\"\n min=\"0\"\n max=\"200\"\n value={localVolume}\n onChange={handleChangeVolume}\n />\n <div className=\"info\">\n <AnimatedIcon\n name=\"Speaker\"\n playSegment={speakerIconPlaySegment}\n size={SPEAKER_ICON_SIZE}\n />\n <span>{localVolume}%</span>\n </div>\n </div>\n </div>\n )}\n <div className=\"group\">\n {(isRaiseHand && isSelf) && (\n <MenuItem\n icon=\"stop-raising-hand\"\n onClick={handleCancelRequestToSpeak}\n >\n {lang('VoipGroupCancelRaiseHand')}\n </MenuItem>\n )}\n {!isSelf && <MenuItem icon=\"user\" onClick={handleOpenProfile}>{lang('VoipGroupOpenProfile')}</MenuItem>}\n {!isSelf && (\n // TODO cross mic\n <MenuItem\n icon={isMuted ? (isAdmin ? 'allow-speak' : 'microphone-alt') : 'microphone-alt'}\n onClick={handleMute}\n >\n {isAdmin\n ? lang(shouldRaiseHand ? 'VoipGroupAllowToSpeak' : 'VoipMute')\n : lang(isMutedByMe ? 'VoipGroupUnmuteForMe' : 'VoipGroupMuteForMe')}\n </MenuItem>\n )}\n {!isSelf && isAdmin && (\n // TODO replace with hand\n <MenuItem icon=\"delete-user\" destructive onClick={handleRemove}>\n {lang('VoipGroupUserRemove')}\n </MenuItem>\n )}\n </div>\n </Menu>\n\n {!isSelf && isAdmin && (\n <DeleteMemberModal\n isOpen={isDeleteUserModalOpen}\n userId={id}\n onClose={closeDeleteUserModal}\n />\n )}\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global): StateProps => {\n return {\n isAdmin: selectIsAdminInActiveGroupCall(global),\n };\n },\n)(GroupCallParticipantMenu));\n","import { useCallback, useMemo } from '../lib/teact/teact';\n\nimport { throttle } from '../util/schedulers';\n\nexport default function useThrottledCallback<T extends AnyToVoidFunction>(\n fn: T,\n deps: any[],\n ms: number,\n noFirst?: boolean,\n) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const fnMemo = useCallback(fn, deps);\n\n return useMemo(() => {\n return throttle(fnMemo, ms, !noFirst);\n }, [fnMemo, ms, noFirst]);\n}\n","import useThrottledCallback from './useThrottledCallback';\n\nexport default function useRunThrottled(ms: number, noFirst?: boolean) {\n return useThrottledCallback((cb: NoneToVoidFunction) => {\n cb();\n }, [], ms, noFirst);\n}\n","import { GroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';\nimport React, { FC, memo, useMemo } from '../../../lib/teact/teact';\nimport AnimatedIcon from '../../common/AnimatedIcon';\nimport usePrevious from '../../../hooks/usePrevious';\n\ntype OwnProps = {\n participant: GroupCallParticipant;\n noColor?: boolean;\n};\n\nconst OutlinedMicrophoneIcon: FC<OwnProps> = ({\n participant,\n noColor,\n}) => {\n const { isMuted, isMutedByMe } = participant;\n const isSpeaking = (participant.amplitude || 0) > THRESHOLD;\n const isRaiseHand = Boolean(participant.raiseHandRating);\n const prevIsRaiseHand = usePrevious(isRaiseHand);\n const canSelfUnmute = Boolean(participant?.canSelfUnmute);\n const shouldRaiseHand = !canSelfUnmute && isMuted;\n const prevIsMuted = usePrevious(isMuted);\n\n const playSegment: [number, number] = useMemo(() => {\n if (isMuted && !prevIsMuted) {\n return [43, 64];\n }\n\n if (!isMuted && prevIsMuted) {\n return [22, 42];\n }\n\n if (isRaiseHand && !prevIsRaiseHand) {\n return [65, 84];\n }\n\n if (!shouldRaiseHand && prevIsRaiseHand) {\n return [0, 21];\n }\n\n // TODO cancel request to speak should play in reverse\n // if (!isRaiseHand && prevIsRaiseHand) {\n // return [84, 65];\n // }\n\n return isMuted ? [22, 23] : [43, 44];\n // eslint-disable-next-line\n }, [isMuted, shouldRaiseHand, isRaiseHand]);\n\n const microphoneColor: [number, number, number] | undefined = useMemo(() => {\n return noColor ? [0xff, 0xff, 0xff] : (\n isRaiseHand ? [0x4d, 0xa6, 0xe0]\n : (shouldRaiseHand || isMutedByMe ? [0xFF, 0x70, 0x6F] : (\n isSpeaking ? [0x57, 0xBC, 0x6C] : [0x84, 0x8D, 0x94]\n ))\n );\n }, [noColor, isRaiseHand, shouldRaiseHand, isMutedByMe, isSpeaking]);\n\n return (\n <AnimatedIcon\n name=\"VoiceOutlined\"\n playSegment={playSegment}\n size={28}\n color={microphoneColor}\n />\n );\n};\n\nexport default memo(OutlinedMicrophoneIcon);\n","import { GroupCallParticipant as TypeGroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useMemo, useRef,\n} from '../../../lib/teact/teact';\nimport { withGlobal } from '../../../global';\n\nimport { ApiChat, ApiUser } from '../../../api/types';\n\nimport buildClassName from '../../../util/buildClassName';\nimport { selectChat, selectUser } from '../../../global/selectors';\nimport useLang from '../../../hooks/useLang';\nimport { GROUP_CALL_DEFAULT_VOLUME, GROUP_CALL_VOLUME_MULTIPLIER } from '../../../config';\n\nimport Avatar from '../../common/Avatar';\nimport OutlinedMicrophoneIcon from './OutlinedMicrophoneIcon';\n\nimport './GroupCallParticipant.scss';\n\ntype OwnProps = {\n participant: TypeGroupCallParticipant;\n openParticipantMenu: (anchor: HTMLDivElement, participant: TypeGroupCallParticipant) => void;\n};\n\ntype StateProps = {\n user?: ApiUser;\n chat?: ApiChat;\n};\n\nconst GroupCallParticipant: FC<OwnProps & StateProps> = ({\n openParticipantMenu,\n participant,\n user,\n chat,\n}) => {\n // eslint-disable-next-line no-null/no-null\n const anchorRef = useRef<HTMLDivElement>(null);\n const lang = useLang();\n\n const { isSelf, isMutedByMe, isMuted } = participant;\n const isSpeaking = (participant.amplitude || 0) > THRESHOLD;\n const isRaiseHand = Boolean(participant.raiseHandRating);\n\n const handleOnClick = () => {\n if (isSelf) return;\n openParticipantMenu(anchorRef.current!, participant);\n };\n\n const [aboutText, aboutColor] = useMemo(() => {\n if (isSelf) {\n return [lang('ThisIsYou'), 'blue'];\n }\n if (isMutedByMe) {\n return [lang('VoipGroupMutedForMe'), 'red'];\n }\n return isRaiseHand\n ? [lang('WantsToSpeak'), 'blue']\n : (!isMuted && isSpeaking ? [\n participant.volume && participant.volume !== GROUP_CALL_DEFAULT_VOLUME\n ? lang('SpeakingWithVolume',\n (participant.volume / GROUP_CALL_VOLUME_MULTIPLIER).toString())\n .replace('%%', '%') : lang('Speaking'),\n 'green',\n ]\n : (participant.about ? [participant.about, ''] : [lang('Listening'), 'blue']));\n }, [isSpeaking, participant.volume, lang, isSelf, isMutedByMe, isRaiseHand, isMuted, participant.about]);\n\n if (!user && !chat) {\n return undefined;\n }\n\n const name = user ? `${user.firstName || ''} ${user.lastName || ''}` : chat?.title;\n\n return (\n <div\n className={buildClassName(\n 'GroupCallParticipant',\n participant.canSelfUnmute && 'can-self-unmute',\n )}\n onClick={handleOnClick}\n ref={anchorRef}\n >\n <Avatar user={user} chat={chat} size=\"medium\" />\n <div className=\"info\">\n <span className=\"name\">{name}</span>\n <span className={buildClassName('about', aboutColor)}>{aboutText}</span>\n </div>\n <div className=\"microphone\">\n <OutlinedMicrophoneIcon participant={participant} />\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global, { participant }): StateProps => {\n return {\n user: participant.isUser ? selectUser(global, participant.id) : undefined,\n chat: !participant.isUser ? selectChat(global, participant.id) : undefined,\n };\n },\n)(GroupCallParticipant));\n","import { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';\nimport React, { FC, memo, useMemo } from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\n\nimport useLang from '../../../hooks/useLang';\nimport { selectActiveGroupCall } from '../../../global/selectors/calls';\nimport useInfiniteScroll from '../../../hooks/useInfiniteScroll';\n\nimport GroupCallParticipant from './GroupCallParticipant';\nimport InfiniteScroll from '../../ui/InfiniteScroll';\n\ntype OwnProps = {\n openParticipantMenu: (anchor: HTMLDivElement, participant: TypeGroupCallParticipant) => void;\n};\n\ntype StateProps = {\n participantsCount: number;\n participants?: Record<string, TypeGroupCallParticipant>;\n canInvite?: boolean;\n};\n\nconst GroupCallParticipantList: FC<OwnProps & StateProps> = ({\n participants,\n participantsCount,\n openParticipantMenu,\n}) => {\n const {\n createGroupCallInviteLink,\n loadMoreGroupCallParticipants,\n } = getActions();\n\n const lang = useLang();\n\n const participantsIds = useMemo(() => {\n return Object.keys(participants || {});\n }, [participants]);\n\n const [viewportIds, getMore] = useInfiniteScroll(\n loadMoreGroupCallParticipants,\n participantsIds,\n participantsIds.length >= participantsCount,\n );\n\n return (\n <div className=\"participants\">\n <div className=\"invite-btn\" onClick={createGroupCallInviteLink}>\n <div className=\"icon\">\n <i className=\"icon-add-user\" />\n </div>\n <div className=\"text\">{lang('VoipGroupInviteMember')}</div>\n </div>\n\n <InfiniteScroll\n items={viewportIds}\n onLoadMore={getMore}\n >\n {viewportIds?.map(\n (participantId) => (\n participants![participantId] && (\n <GroupCallParticipant\n key={participantId}\n openParticipantMenu={openParticipantMenu}\n participant={participants![participantId]}\n />\n )\n ),\n )}\n </InfiniteScroll>\n\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global): StateProps => {\n const { participantsCount, participants } = selectActiveGroupCall(global) || {};\n\n return {\n participants,\n participantsCount: participantsCount || 0,\n };\n },\n)(GroupCallParticipantList));\n","import { getUserStreams, GroupCallParticipant as TypeGroupCallParticipant, THRESHOLD } from '../../../lib/secret-sauce';\nimport React, { FC, memo, useCallback } from '../../../lib/teact/teact';\nimport { withGlobal } from '../../../global';\n\nimport { ApiChat, ApiUser } from '../../../api/types';\n\nimport buildClassName from '../../../util/buildClassName';\nimport { selectChat, selectUser } from '../../../global/selectors';\nimport useLang from '../../../hooks/useLang';\nimport { ENABLE_THUMBNAIL_VIDEO } from '../../../config';\n\nimport Avatar from '../../common/Avatar';\n\nimport './GroupCallParticipantVideo.scss';\n\ntype OwnProps = {\n participant: TypeGroupCallParticipant;\n type: 'video' | 'presentation';\n onClick?: (id: string, type: 'video' | 'presentation') => void;\n isFullscreen?: boolean;\n};\n\ntype StateProps = {\n user?: ApiUser;\n chat?: ApiChat;\n currentUserId?: string;\n isActive?: boolean;\n};\n\nconst GroupCallParticipantVideo: FC<OwnProps & StateProps> = ({\n type,\n onClick,\n user,\n chat,\n isActive,\n isFullscreen,\n}) => {\n const lang = useLang();\n\n const handleClick = useCallback(() => {\n if (onClick) {\n onClick(user?.id || chat!.id, type);\n }\n }, [chat, onClick, type, user?.id]);\n\n if (!user && !chat) return undefined;\n\n const streams = getUserStreams(user?.id || chat!.id);\n\n return (\n <div\n className={buildClassName('GroupCallParticipantVideo', isActive && 'active')}\n onClick={handleClick}\n >\n {isFullscreen && (\n <button className=\"back-button\">\n <i className=\"icon-arrow-left\" />\n {lang('Back')}\n </button>\n )}\n <Avatar user={user} chat={chat} className=\"thumbnail-avatar\" />\n {ENABLE_THUMBNAIL_VIDEO && (\n <div className=\"thumbnail-wrapper\">\n <video className=\"thumbnail\" muted autoPlay playsInline srcObject={streams?.[type]} />\n </div>\n )}\n <video className=\"video\" muted autoPlay playsInline srcObject={streams?.[type]} />\n <div className=\"info\">\n <i className=\"icon-microphone-alt\" />\n <span className=\"name\">{user?.firstName || chat?.title}</span>\n {type === 'presentation' && <i className=\"last-icon icon-active-sessions\" />}\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global, { participant }): StateProps => {\n return {\n currentUserId: global.currentUserId,\n user: participant.isUser ? selectUser(global, participant.id) : undefined,\n chat: !participant.isUser ? selectChat(global, participant.id) : undefined,\n isActive: (participant.amplitude || 0) > THRESHOLD,\n };\n },\n)(GroupCallParticipantVideo));\n","import { GroupCallParticipant } from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useCallback, useMemo, useState,\n} from '../../../lib/teact/teact';\nimport { withGlobal } from '../../../global';\nimport GroupCallParticipantVideo from './GroupCallParticipantVideo';\nimport { selectActiveGroupCall } from '../../../global/selectors/calls';\nimport buildClassName from '../../../util/buildClassName';\n\ntype OwnProps = {\n onDoubleClick?: VoidFunction;\n};\n\ntype StateProps = {\n participants?: Record<string, GroupCallParticipant>;\n};\n\ntype SelectedVideo = {\n type: 'video' | 'presentation';\n id: string;\n};\n\nconst GroupCallParticipantStreams: FC<OwnProps & StateProps> = ({\n participants,\n onDoubleClick,\n}) => {\n const [selectedVideo, setSelectedVideo] = useState<SelectedVideo | undefined>(undefined);\n const presentationParticipants = useMemo(() => {\n return Object.values(participants || {}).filter((l) => l.hasPresentationStream);\n }, [participants]);\n const videoParticipants = useMemo(() => {\n return Object.values(participants || {}).filter((l) => l.hasVideoStream);\n }, [participants]);\n\n const totalVideoCount = videoParticipants.length + presentationParticipants.length;\n // TODO replace with more adequate solution.\n // There's a max of 30 videos or so right now\n const columnCount = totalVideoCount <= 2 ? 1 : (\n totalVideoCount <= 6 ? 2 : (\n totalVideoCount <= 9 ? 3 : 4\n )\n );\n\n const shouldSpanLastVideo = totalVideoCount === 3 || (columnCount === 2 && totalVideoCount % 2 !== 0);\n\n const handleClickVideo = useCallback((id: string, type: 'video' | 'presentation') => {\n if (!selectedVideo || (id !== selectedVideo.id || type !== selectedVideo.type)) {\n setSelectedVideo({\n id,\n type,\n });\n } else {\n setSelectedVideo(undefined);\n }\n }, [selectedVideo]);\n\n return (\n <div className=\"streams\" onDoubleClick={onDoubleClick}>\n <div\n className={buildClassName(\n 'videos',\n shouldSpanLastVideo && 'span-last-video',\n )}\n style={`--column-count: ${selectedVideo ? 1 : columnCount}`}\n >\n {selectedVideo && (\n <GroupCallParticipantVideo\n key={selectedVideo.id}\n isFullscreen\n onClick={handleClickVideo}\n participant={participants![selectedVideo.id]}\n type={selectedVideo.type}\n />\n )}\n\n {!selectedVideo ? presentationParticipants.map((participant) => (\n <GroupCallParticipantVideo\n key={participant.id}\n onClick={handleClickVideo}\n participant={participant}\n type=\"presentation\"\n />\n )) : undefined}\n {!selectedVideo ? videoParticipants.map((participant) => (\n <GroupCallParticipantVideo\n key={participant.id}\n onClick={handleClickVideo}\n participant={participant}\n type=\"video\"\n />\n )) : undefined}\n </div>\n </div>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global): StateProps => {\n const { participants } = selectActiveGroupCall(global) || {};\n return {\n participants,\n };\n },\n)(GroupCallParticipantStreams));\n","import {\n GroupCallConnectionState, GroupCallParticipant as TypeGroupCallParticipant,\n IS_SCREENSHARE_SUPPORTED, switchCameraInput, toggleSpeaker,\n} from '../../../lib/secret-sauce';\nimport React, {\n FC, memo, useCallback, useEffect, useMemo, useRef, useState,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\nimport '../../../global/actions/calls';\n\nimport { IAnchorPosition } from '../../../types';\n\nimport {\n IS_ANDROID,\n IS_IOS,\n IS_REQUEST_FULLSCREEN_SUPPORTED,\n IS_SINGLE_COLUMN_LAYOUT,\n} from '../../../util/environment';\nimport buildClassName from '../../../util/buildClassName';\nimport {\n selectGroupCall,\n selectGroupCallParticipant,\n selectIsAdminInActiveGroupCall,\n} from '../../../global/selectors/calls';\nimport useFlag from '../../../hooks/useFlag';\nimport useLang from '../../../hooks/useLang';\n\nimport Loading from '../../ui/Loading';\nimport Button from '../../ui/Button';\nimport DropdownMenu from '../../ui/DropdownMenu';\nimport MenuItem from '../../ui/MenuItem';\nimport Modal from '../../ui/Modal';\nimport MicrophoneButton from './MicrophoneButton';\nimport AnimatedIcon from '../../common/AnimatedIcon';\nimport Checkbox from '../../ui/Checkbox';\nimport GroupCallParticipantMenu from './GroupCallParticipantMenu';\nimport GroupCallParticipantList from './GroupCallParticipantList';\nimport GroupCallParticipantStreams from './GroupCallParticipantStreams';\n\nimport './GroupCall.scss';\n\nconst CAMERA_FLIP_PLAY_SEGMENT: [number, number] = [0, 10];\nconst PARTICIPANT_HEIGHT = 60;\n\nexport type OwnProps = {\n groupCallId: string;\n};\n\ntype StateProps = {\n isCallPanelVisible: boolean;\n connectionState: GroupCallConnectionState;\n title?: string;\n meParticipant?: TypeGroupCallParticipant;\n participantsCount?: number;\n isSpeakerEnabled?: boolean;\n isAdmin: boolean;\n participants: Record<string, TypeGroupCallParticipant>;\n};\n\nconst GroupCall: FC<OwnProps & StateProps> = ({\n groupCallId,\n isCallPanelVisible,\n connectionState,\n isSpeakerEnabled,\n title,\n meParticipant,\n isAdmin,\n participants,\n\n}) => {\n const {\n toggleGroupCallVideo,\n toggleGroupCallPresentation,\n leaveGroupCall,\n toggleGroupCallPanel,\n connectToActiveGroupCall,\n playGroupCallSound,\n } = getActions();\n\n const lang = useLang();\n // eslint-disable-next-line no-null/no-null\n const containerRef = useRef<HTMLDivElement>(null);\n\n const [isLeaving, setIsLeaving] = useState(false);\n const [isFullscreen, openFullscreen, closeFullscreen] = useFlag();\n const [isSidebarOpen, openSidebar, closeSidebar] = useFlag(true);\n const hasVideoParticipants = participants && Object.values(participants).some((l) => l.video || l.presentation);\n const isLandscape = isFullscreen && !IS_SINGLE_COLUMN_LAYOUT && hasVideoParticipants;\n\n const [participantMenu, setParticipantMenu] = useState<{\n participant: TypeGroupCallParticipant;\n anchor: IAnchorPosition;\n } | undefined>();\n const [isParticipantMenuOpen, openParticipantMenu, closeParticipantMenu] = useFlag();\n\n const [isConfirmLeaveModalOpen, openConfirmLeaveModal, closeConfirmLeaveModal] = useFlag();\n const [isEndGroupCallModal, setIsEndGroupCallModal] = useState(false);\n const [shouldEndGroupCall, setShouldEndGroupCall] = useState(false);\n\n const hasVideo = meParticipant?.hasVideoStream;\n const hasPresentation = meParticipant?.hasPresentationStream;\n const isConnecting = connectionState !== 'connected';\n const canSelfUnmute = meParticipant?.canSelfUnmute;\n const shouldRaiseHand = !canSelfUnmute && meParticipant?.isMuted;\n\n const handleOpenParticipantMenu = useCallback((anchor: HTMLDivElement, participant: TypeGroupCallParticipant) => {\n const rect = anchor.getBoundingClientRect();\n const container = containerRef.current!;\n\n setParticipantMenu({\n anchor: { x: rect.left, y: rect.top - container.offsetTop + PARTICIPANT_HEIGHT },\n participant,\n });\n\n openParticipantMenu();\n }, [openParticipantMenu]);\n\n useEffect(() => {\n if (connectionState === 'connected') {\n playGroupCallSound({ sound: 'join' });\n } else if (connectionState === 'reconnecting') {\n playGroupCallSound({ sound: 'connecting' });\n }\n }, [connectionState, playGroupCallSound]);\n\n const handleCloseConfirmLeaveModal = useCallback(() => {\n closeConfirmLeaveModal();\n setIsEndGroupCallModal(false);\n }, [closeConfirmLeaveModal]);\n\n const MainButton: FC<{ onTrigger: () => void; isOpen?: boolean }> = useMemo(() => {\n return ({ onTrigger, isOpen }) => (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n className={isOpen ? 'active' : undefined}\n onClick={onTrigger}\n ariaLabel={lang('AccDescrMoreOptions')}\n >\n <i className=\"icon-more\" />\n </Button>\n );\n }, [lang]);\n\n const handleToggleFullscreen = useCallback(() => {\n if (!containerRef.current) return;\n\n if (isFullscreen) {\n document.exitFullscreen().then(closeFullscreen);\n } else {\n containerRef.current.requestFullscreen().then(openFullscreen);\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n const handleToggleSidebar = useCallback(() => {\n if (isSidebarOpen) {\n closeSidebar();\n } else {\n openSidebar();\n }\n }, [closeSidebar, isSidebarOpen, openSidebar]);\n\n const handleStreamsDoubleClick = useCallback(() => {\n if (!IS_REQUEST_FULLSCREEN_SUPPORTED) return;\n\n if (!isFullscreen) {\n closeSidebar();\n handleToggleFullscreen();\n } else {\n handleToggleFullscreen();\n }\n }, [closeSidebar, handleToggleFullscreen, isFullscreen]);\n\n const toggleFullscreen = useCallback(() => {\n if (isFullscreen) {\n closeFullscreen();\n } else {\n openFullscreen();\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n const handleClose = useCallback(() => {\n toggleGroupCallPanel();\n if (isFullscreen) {\n closeFullscreen();\n }\n }, [closeFullscreen, isFullscreen, toggleGroupCallPanel]);\n\n useEffect(() => {\n if (!IS_REQUEST_FULLSCREEN_SUPPORTED) return undefined;\n const container = containerRef.current;\n if (!container) return undefined;\n\n container.addEventListener('fullscreenchange', toggleFullscreen);\n\n return () => {\n container.removeEventListener('fullscreenchange', toggleFullscreen);\n };\n }, [toggleFullscreen]);\n\n const handleClickVideoOrSpeaker = () => {\n if (shouldRaiseHand) {\n toggleSpeaker();\n } else {\n toggleGroupCallVideo();\n }\n };\n\n useEffect(() => {\n connectToActiveGroupCall();\n }, [connectToActiveGroupCall, groupCallId]);\n\n const endGroupCall = useCallback(() => {\n setIsEndGroupCallModal(true);\n setShouldEndGroupCall(true);\n openConfirmLeaveModal();\n if (isFullscreen) {\n handleToggleFullscreen();\n }\n }, [handleToggleFullscreen, isFullscreen, openConfirmLeaveModal]);\n\n const handleLeaveGroupCall = useCallback(() => {\n if (isAdmin && !isConfirmLeaveModalOpen) {\n openConfirmLeaveModal();\n if (isFullscreen) {\n handleToggleFullscreen();\n }\n return;\n }\n playGroupCallSound({ sound: 'leave' });\n setIsLeaving(true);\n closeConfirmLeaveModal();\n }, [\n closeConfirmLeaveModal, handleToggleFullscreen, isAdmin, isConfirmLeaveModalOpen, isFullscreen,\n openConfirmLeaveModal, playGroupCallSound,\n ]);\n\n const handleCloseAnimationEnd = useCallback(() => {\n if (isLeaving) {\n leaveGroupCall({\n shouldDiscard: shouldEndGroupCall,\n });\n }\n }, [isLeaving, leaveGroupCall, shouldEndGroupCall]);\n\n return (\n <Modal\n isOpen={!isCallPanelVisible && !isLeaving}\n onClose={toggleGroupCallPanel}\n className={buildClassName(\n 'GroupCall',\n IS_SINGLE_COLUMN_LAYOUT && 'single-column',\n isLandscape && 'landscape',\n !isSidebarOpen && 'no-sidebar',\n )}\n dialogRef={containerRef}\n onCloseAnimationEnd={handleCloseAnimationEnd}\n >\n <div className=\"header\">\n <h3>{title || lang('VoipGroupVoiceChat')}</h3>\n {IS_REQUEST_FULLSCREEN_SUPPORTED && (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleToggleFullscreen}\n ariaLabel={lang(isFullscreen ? 'AccExitFullscreen' : 'AccSwitchToFullscreen')}\n >\n <i className={isFullscreen ? 'icon-smallscreen' : 'icon-fullscreen'} />\n </Button>\n )}\n {isLandscape && (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleToggleSidebar}\n >\n <i className=\"icon-sidebar\" />\n </Button>\n )}\n {((IS_SCREENSHARE_SUPPORTED && !shouldRaiseHand) || isAdmin) && (\n <DropdownMenu\n positionX=\"right\"\n trigger={MainButton}\n >\n {IS_SCREENSHARE_SUPPORTED && !shouldRaiseHand && (\n <MenuItem\n icon=\"share-screen-outlined\"\n onClick={toggleGroupCallPresentation}\n >\n {lang(hasPresentation ? 'VoipChatStopScreenCapture' : 'VoipChatStartScreenCapture')}\n </MenuItem>\n )}\n {isAdmin && (\n <MenuItem\n icon=\"phone-discard-outline\"\n onClick={endGroupCall}\n destructive\n >\n {lang('VoipGroupLeaveAlertEndChat')}\n </MenuItem>\n )}\n </DropdownMenu>\n )}\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleClose}\n >\n <i className=\"icon-close\" />\n </Button>\n </div>\n\n <div className=\"scrollable custom-scroll\">\n <GroupCallParticipantStreams onDoubleClick={handleStreamsDoubleClick} />\n\n {(!isLandscape || isSidebarOpen)\n && <GroupCallParticipantList openParticipantMenu={handleOpenParticipantMenu} />}\n </div>\n\n <GroupCallParticipantMenu\n participant={participantMenu?.participant}\n anchor={participantMenu?.anchor}\n isDropdownOpen={isParticipantMenuOpen}\n closeDropdown={closeParticipantMenu}\n />\n\n <div className=\"buttons\">\n {isConnecting && <Loading />}\n\n <div className=\"button-wrapper\">\n <div className=\"video-buttons\">\n {hasVideo && (IS_ANDROID || IS_IOS) && (\n <button className=\"smaller-button\" onClick={switchCameraInput}>\n <AnimatedIcon name=\"CameraFlip\" playSegment={CAMERA_FLIP_PLAY_SEGMENT} size={24} />\n </button>\n )}\n <button\n className={buildClassName(\n 'small-button',\n shouldRaiseHand ? 'speaker' : 'camera',\n (hasVideo || (shouldRaiseHand && isSpeakerEnabled)) && 'active',\n )}\n onClick={handleClickVideoOrSpeaker}\n >\n <i className={shouldRaiseHand ? 'icon-speaker' : (hasVideo ? 'icon-video-stop' : 'icon-video')} />\n </button>\n </div>\n\n <div className=\"button-text\">\n {lang(shouldRaiseHand ? 'VoipSpeaker' : 'VoipCamera')}\n </div>\n </div>\n\n <MicrophoneButton />\n\n <div className=\"button-wrapper\">\n <button className=\"small-button leave\" onClick={handleLeaveGroupCall}>\n <i className=\"icon-phone-discard\" />\n </button>\n\n <div className=\"button-text\">\n {lang('VoipGroupLeave')}\n </div>\n </div>\n </div>\n\n <Modal\n isOpen={isConfirmLeaveModalOpen}\n onClose={handleCloseConfirmLeaveModal}\n className=\"error\"\n title={lang(isEndGroupCallModal ? 'VoipGroupEndAlertTitle' : 'VoipGroupLeaveAlertTitle')}\n >\n <p>{lang(isEndGroupCallModal ? 'VoipGroupEndAlertText' : 'VoipGroupLeaveAlertText')}</p>\n {!isEndGroupCallModal && (\n <Checkbox\n label={lang('VoipGroupEndChat')}\n checked={shouldEndGroupCall}\n onCheck={setShouldEndGroupCall}\n />\n )}\n <Button isText className=\"confirm-dialog-button\" onClick={handleLeaveGroupCall}>\n {lang(isEndGroupCallModal ? 'VoipGroupEnd' : 'VoipGroupLeave')}\n </Button>\n <Button isText className=\"confirm-dialog-button\" onClick={handleCloseConfirmLeaveModal}>\n {lang('Cancel')}\n </Button>\n </Modal>\n </Modal>\n );\n};\n\nexport default memo(withGlobal<OwnProps>(\n (global, { groupCallId }): StateProps => {\n const {\n connectionState, title, isSpeakerDisabled, participants, participantsCount,\n } = selectGroupCall(global, groupCallId)! || {};\n\n return {\n connectionState,\n title,\n isSpeakerEnabled: !isSpeakerDisabled,\n participantsCount,\n meParticipant: selectGroupCallParticipant(global, groupCallId, global.currentUserId!),\n isCallPanelVisible: Boolean(global.isCallPanelVisible),\n isAdmin: selectIsAdminInActiveGroupCall(global),\n participants,\n };\n },\n)(GroupCall));\n","import React, {\n FC, memo, useEffect,\n} from '../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../global';\n\nimport { ApiGroupCall, ApiUser } from '../../api/types';\n\nimport { selectActiveGroupCall, selectPhoneCallUser } from '../../global/selectors/calls';\nimport buildClassName from '../../util/buildClassName';\nimport useLang from '../../hooks/useLang';\n\nimport './ActiveCallHeader.scss';\n\ntype StateProps = {\n isCallPanelVisible?: boolean;\n groupCall?: ApiGroupCall;\n phoneCallUser?: ApiUser;\n};\n\nconst ActiveCallHeader: FC<StateProps> = ({\n groupCall,\n phoneCallUser,\n isCallPanelVisible,\n}) => {\n const { toggleGroupCallPanel } = getActions();\n\n const lang = useLang();\n\n useEffect(() => {\n document.body.classList.toggle('has-call-header', Boolean(isCallPanelVisible));\n\n return () => {\n document.body.classList.toggle('has-call-header', false);\n };\n }, [isCallPanelVisible]);\n\n if (!groupCall && !phoneCallUser) return undefined;\n\n return (\n <div\n className={buildClassName(\n 'ActiveCallHeader',\n isCallPanelVisible && 'open',\n )}\n onClick={toggleGroupCallPanel}\n >\n <span className=\"title\">{phoneCallUser?.firstName || groupCall?.title || lang('VoipGroupVoiceChat')}</span>\n </div>\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => {\n return {\n groupCall: selectActiveGroupCall(global),\n isCallPanelVisible: global.isCallPanelVisible,\n phoneCallUser: selectPhoneCallUser(global),\n };\n },\n)(ActiveCallHeader));\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"src-components-calls-phone-PhoneCallButton-module__root\",\"button\":\"src-components-calls-phone-PhoneCallButton-module__button\",\"active\":\"src-components-calls-phone-PhoneCallButton-module__active\",\"button-text\":\"src-components-calls-phone-PhoneCallButton-module__button-text\",\"buttonText\":\"src-components-calls-phone-PhoneCallButton-module__button-text\"};","import React, { FC, memo } from '../../../lib/teact/teact';\n\nimport buildClassName from '../../../util/buildClassName';\n\nimport Button from '../../ui/Button';\n\nimport styles from './PhoneCallButton.module.scss';\n\ntype OwnProps = {\n onClick: VoidFunction;\n label: string;\n icon?: string;\n iconClassName?: string;\n customIcon?: React.ReactNode;\n className?: string;\n isDisabled?: boolean;\n isActive?: boolean;\n};\n\nconst PhoneCallButton: FC<OwnProps> = ({\n onClick,\n label,\n customIcon,\n icon,\n iconClassName,\n className,\n isDisabled,\n isActive,\n}) => {\n return (\n <div className={styles.root}>\n <Button\n round\n className={buildClassName(className, styles.button, isActive && styles.active)}\n onClick={onClick}\n disabled={isDisabled}\n >\n {customIcon || <i className={buildClassName(iconClassName, `icon-${icon}`)} />}\n </Button>\n <div className={styles.buttonText}>{label}</div>\n </div>\n );\n};\n\nexport default memo(PhoneCallButton);\n","// extracted by mini-css-extract-plugin\nexport default {\"root\":\"src-components-calls-phone-PhoneCall-module__root\",\"blurred\":\"src-components-calls-phone-PhoneCall-module__blurred\",\"single-column\":\"src-components-calls-phone-PhoneCall-module__single-column\",\"singleColumn\":\"src-components-calls-phone-PhoneCall-module__single-column\",\"header\":\"src-components-calls-phone-PhoneCall-module__header\",\"close-button\":\"src-components-calls-phone-PhoneCall-module__close-button\",\"closeButton\":\"src-components-calls-phone-PhoneCall-module__close-button\",\"emojis-backdrop\":\"src-components-calls-phone-PhoneCall-module__emojis-backdrop\",\"emojisBackdrop\":\"src-components-calls-phone-PhoneCall-module__emojis-backdrop\",\"open\":\"src-components-calls-phone-PhoneCall-module__open\",\"emojis\":\"src-components-calls-phone-PhoneCall-module__emojis\",\"emoji-tooltip\":\"src-components-calls-phone-PhoneCall-module__emoji-tooltip\",\"emojiTooltip\":\"src-components-calls-phone-PhoneCall-module__emoji-tooltip\",\"user-info\":\"src-components-calls-phone-PhoneCall-module__user-info\",\"userInfo\":\"src-components-calls-phone-PhoneCall-module__user-info\",\"buttons\":\"src-components-calls-phone-PhoneCall-module__buttons\",\"leave\":\"src-components-calls-phone-PhoneCall-module__leave\",\"accept\":\"src-components-calls-phone-PhoneCall-module__accept\",\"accept-icon\":\"src-components-calls-phone-PhoneCall-module__accept-icon\",\"acceptIcon\":\"src-components-calls-phone-PhoneCall-module__accept-icon\",\"main-video\":\"src-components-calls-phone-PhoneCall-module__main-video\",\"mainVideo\":\"src-components-calls-phone-PhoneCall-module__main-video\",\"second-video\":\"src-components-calls-phone-PhoneCall-module__second-video\",\"secondVideo\":\"src-components-calls-phone-PhoneCall-module__second-video\",\"visible\":\"src-components-calls-phone-PhoneCall-module__visible\",\"fullscreen\":\"src-components-calls-phone-PhoneCall-module__fullscreen\"};","import React, {\n FC, memo, useCallback, useEffect, useMemo, useRef,\n} from '../../../lib/teact/teact';\nimport { getActions, withGlobal } from '../../../global';\nimport '../../../global/actions/calls';\n\nimport { ApiPhoneCall, ApiUser } from '../../../api/types';\n\nimport {\n IS_ANDROID,\n IS_IOS,\n IS_REQUEST_FULLSCREEN_SUPPORTED,\n IS_SINGLE_COLUMN_LAYOUT,\n} from '../../../util/environment';\nimport buildClassName from '../../../util/buildClassName';\nimport { selectPhoneCallUser } from '../../../global/selectors/calls';\nimport useLang from '../../../hooks/useLang';\nimport renderText from '../../common/helpers/renderText';\nimport useFlag from '../../../hooks/useFlag';\nimport { formatMediaDuration } from '../../../util/dateFormat';\nimport {\n getStreams, IS_SCREENSHARE_SUPPORTED, switchCameraInputP2p, toggleStreamP2p,\n} from '../../../lib/secret-sauce';\nimport useInterval from '../../../hooks/useInterval';\nimport useForceUpdate from '../../../hooks/useForceUpdate';\n\nimport Modal from '../../ui/Modal';\nimport Avatar from '../../common/Avatar';\nimport Button from '../../ui/Button';\nimport PhoneCallButton from './PhoneCallButton';\nimport AnimatedIcon from '../../common/AnimatedIcon';\n\nimport styles from './PhoneCall.module.scss';\n\ntype StateProps = {\n user?: ApiUser;\n phoneCall?: ApiPhoneCall;\n isOutgoing: boolean;\n isCallPanelVisible?: boolean;\n};\n\nconst PhoneCall: FC<StateProps> = ({\n user,\n isOutgoing,\n phoneCall,\n isCallPanelVisible,\n}) => {\n const lang = useLang();\n const {\n hangUp, acceptCall, playGroupCallSound, toggleGroupCallPanel, connectToActivePhoneCall,\n } = getActions();\n // eslint-disable-next-line no-null/no-null\n const containerRef = useRef<HTMLDivElement>(null);\n\n const [isFullscreen, openFullscreen, closeFullscreen] = useFlag();\n\n const toggleFullscreen = useCallback(() => {\n if (isFullscreen) {\n closeFullscreen();\n } else {\n openFullscreen();\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n const handleToggleFullscreen = useCallback(() => {\n if (!containerRef.current) return;\n\n if (isFullscreen) {\n document.exitFullscreen().then(closeFullscreen);\n } else {\n containerRef.current.requestFullscreen().then(openFullscreen);\n }\n }, [closeFullscreen, isFullscreen, openFullscreen]);\n\n useEffect(() => {\n if (!IS_REQUEST_FULLSCREEN_SUPPORTED) return undefined;\n const container = containerRef.current;\n if (!container) return undefined;\n\n container.addEventListener('fullscreenchange', toggleFullscreen);\n\n return () => {\n container.removeEventListener('fullscreenchange', toggleFullscreen);\n };\n }, [toggleFullscreen]);\n\n const handleClose = useCallback(() => {\n toggleGroupCallPanel();\n if (isFullscreen) {\n closeFullscreen();\n }\n }, [closeFullscreen, isFullscreen, toggleGroupCallPanel]);\n\n const isDiscarded = phoneCall?.state === 'discarded';\n const isBusy = phoneCall?.reason === 'busy';\n\n const isIncomingRequested = phoneCall?.state === 'requested' && !isOutgoing;\n const isOutgoingRequested = (phoneCall?.state === 'requested' || phoneCall?.state === 'waiting') && isOutgoing;\n const isActive = phoneCall?.state === 'active';\n const isConnected = phoneCall?.isConnected;\n\n useEffect(() => {\n if (isIncomingRequested) {\n playGroupCallSound({ sound: 'incoming' });\n } else if (isBusy) {\n playGroupCallSound({ sound: 'busy' });\n } else if (isDiscarded) {\n playGroupCallSound({ sound: 'end' });\n } else if (isOutgoingRequested) {\n playGroupCallSound({ sound: 'ringing' });\n } else if (isConnected) {\n playGroupCallSound({ sound: 'connect' });\n }\n }, [isBusy, isDiscarded, isIncomingRequested, isOutgoingRequested, isConnected, playGroupCallSound]);\n\n const [isHangingUp, startHangingUp, stopHangingUp] = useFlag();\n const handleHangUp = useCallback(() => {\n startHangingUp();\n hangUp();\n }, [hangUp, startHangingUp]);\n\n useEffect(() => {\n if (phoneCall?.id) {\n stopHangingUp();\n } else {\n connectToActivePhoneCall();\n }\n }, [connectToActivePhoneCall, phoneCall?.id, stopHangingUp]);\n\n const forceUpdate = useForceUpdate();\n\n useInterval(() => {\n forceUpdate();\n }, isConnected ? 1000 : undefined);\n\n const callStatus = useMemo(() => {\n const state = phoneCall?.state;\n if (isHangingUp) {\n return lang('lng_call_status_hanging');\n }\n if (isBusy) return 'busy';\n if (state === 'requesting') {\n return lang('lng_call_status_requesting');\n } else if (state === 'requested') {\n return isOutgoing ? lang('lng_call_status_ringing') : lang('lng_call_status_incoming');\n } else if (state === 'waiting') {\n return lang('lng_call_status_waiting');\n } else if (state === 'active' && isConnected) {\n return undefined;\n } else {\n return lang('lng_call_status_exchanging');\n }\n }, [isBusy, isConnected, isHangingUp, isOutgoing, lang, phoneCall?.state]);\n\n const hasVideo = phoneCall?.videoState === 'active';\n const hasPresentation = phoneCall?.screencastState === 'active';\n\n const streams = getStreams();\n const hasOwnAudio = streams?.ownAudio?.getTracks()[0].enabled;\n const hasOwnPresentation = streams?.ownPresentation?.getTracks()[0].enabled;\n const hasOwnVideo = streams?.ownVideo?.getTracks()[0].enabled;\n\n const [isHidingPresentation, startHidingPresentation, stopHidingPresentation] = useFlag();\n const [isHidingVideo, startHidingVideo, stopHidingVideo] = useFlag();\n\n const handleTogglePresentation = useCallback(() => {\n if (hasOwnPresentation) {\n startHidingPresentation();\n }\n if (hasOwnVideo) {\n startHidingVideo();\n }\n setTimeout(async () => {\n await toggleStreamP2p('presentation');\n stopHidingPresentation();\n stopHidingVideo();\n }, 250);\n }, [\n hasOwnPresentation, hasOwnVideo, startHidingPresentation, startHidingVideo, stopHidingPresentation, stopHidingVideo,\n ]);\n\n const handleToggleVideo = useCallback(() => {\n if (hasOwnVideo) {\n startHidingVideo();\n }\n if (hasOwnPresentation) {\n startHidingPresentation();\n }\n setTimeout(async () => {\n await toggleStreamP2p('video');\n stopHidingPresentation();\n stopHidingVideo();\n }, 250);\n }, [\n hasOwnPresentation, hasOwnVideo, startHidingPresentation, startHidingVideo, stopHidingPresentation, stopHidingVideo,\n ]);\n\n const handleToggleAudio = useCallback(() => {\n void toggleStreamP2p('audio');\n }, []);\n\n const [isEmojiOpen, openEmoji, closeEmoji] = useFlag();\n\n const [isFlipping, startFlipping, stopFlipping] = useFlag();\n\n const handleFlipCamera = useCallback(() => {\n startFlipping();\n switchCameraInputP2p();\n setTimeout(stopFlipping, 250);\n }, [startFlipping, stopFlipping]);\n\n const timeElapsed = phoneCall?.startDate && (Number(new Date()) / 1000 - phoneCall.startDate);\n\n useEffect(() => {\n if (phoneCall?.state === 'discarded') {\n setTimeout(hangUp, 250);\n }\n }, [hangUp, phoneCall?.reason, phoneCall?.state]);\n\n return (\n <Modal\n isOpen={phoneCall && phoneCall?.state !== 'discarded' && !isCallPanelVisible}\n onClose={handleClose}\n className={buildClassName(\n styles.root,\n IS_SINGLE_COLUMN_LAYOUT && styles.singleColumn,\n )}\n dialogRef={containerRef}\n >\n <Avatar user={user} size=\"jumbo\" className={hasVideo || hasPresentation ? styles.blurred : ''} />\n {phoneCall?.screencastState === 'active' && streams?.presentation\n && <video className={styles.mainVideo} muted autoPlay playsInline srcObject={streams.presentation} />}\n {phoneCall?.videoState === 'active' && streams?.video\n && <video className={styles.mainVideo} muted autoPlay playsInline srcObject={streams.video} />}\n <video\n className={buildClassName(\n styles.secondVideo,\n !isHidingPresentation && hasOwnPresentation && styles.visible,\n isFullscreen && styles.fullscreen,\n )}\n muted\n autoPlay\n playsInline\n srcObject={streams?.ownPresentation}\n />\n <video\n className={buildClassName(\n styles.secondVideo,\n !isHidingVideo && hasOwnVideo && styles.visible,\n isFullscreen && styles.fullscreen,\n )}\n muted\n autoPlay\n playsInline\n srcObject={streams?.ownVideo}\n />\n <div className={styles.header}>\n {IS_REQUEST_FULLSCREEN_SUPPORTED && (\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleToggleFullscreen}\n ariaLabel={lang(isFullscreen ? 'AccExitFullscreen' : 'AccSwitchToFullscreen')}\n >\n <i className={isFullscreen ? 'icon-smallscreen' : 'icon-fullscreen'} />\n </Button>\n )}\n\n <Button\n round\n size=\"smaller\"\n color=\"translucent\"\n onClick={handleClose}\n className={styles.closeButton}\n >\n <i className=\"icon-close\" />\n </Button>\n </div>\n <div\n className={buildClassName(styles.emojisBackdrop, isEmojiOpen && styles.open)}\n onClick={!isEmojiOpen ? openEmoji : closeEmoji}\n >\n <div className={buildClassName(styles.emojis, isEmojiOpen && styles.open)}>\n {phoneCall?.isConnected && phoneCall?.emojis && renderText(phoneCall.emojis, ['emoji'])}\n </div>\n <div className={buildClassName(styles.emojiTooltip, isEmojiOpen && styles.open)}>\n {lang('CallEmojiKeyTooltip', user?.firstName).replace('%%', '%')}\n </div>\n </div>\n <div className={styles.userInfo}>\n <h1>{user?.firstName}</h1>\n <span className={styles.status}>{callStatus || formatMediaDuration(timeElapsed || 0)}</span>\n </div>\n <div className={styles.buttons}>\n <PhoneCallButton\n onClick={handleToggleAudio}\n icon=\"microphone\"\n isDisabled={!isActive}\n isActive={hasOwnAudio}\n label={lang(hasOwnAudio ? 'lng_call_mute_audio' : 'lng_call_unmute_audio')}\n />\n <PhoneCallButton\n onClick={handleToggleVideo}\n icon=\"video\"\n isDisabled={!isActive}\n isActive={hasOwnVideo}\n label={lang(hasOwnVideo ? 'lng_call_stop_video' : 'lng_call_start_video')}\n />\n {hasOwnVideo && (IS_ANDROID || IS_IOS) && (\n <PhoneCallButton\n onClick={handleFlipCamera}\n customIcon={\n <AnimatedIcon name=\"CameraFlip\" playSegment={!isFlipping ? [0, 1] : [0, 10]} size={32} />\n }\n isDisabled={!isActive}\n label={lang('VoipFlip')}\n />\n )}\n {IS_SCREENSHARE_SUPPORTED && (\n <PhoneCallButton\n onClick={handleTogglePresentation}\n icon=\"share-screen\"\n isDisabled={!isActive}\n isActive={hasOwnPresentation}\n label={lang('lng_call_screencast')}\n />\n )}\n {isIncomingRequested && (\n <PhoneCallButton\n onClick={acceptCall}\n icon=\"phone-discard\"\n isDisabled={isDiscarded}\n label={lang('lng_call_accept')}\n className={styles.accept}\n iconClassName={styles.acceptIcon}\n />\n )}\n <PhoneCallButton\n onClick={handleHangUp}\n icon=\"phone-discard\"\n isDisabled={isDiscarded}\n label={lang(isIncomingRequested ? 'lng_call_decline' : 'lng_call_end_call')}\n className={styles.leave}\n />\n </div>\n </Modal>\n );\n};\n\nexport default memo(withGlobal(\n (global): StateProps => {\n const { phoneCall, currentUserId } = global;\n\n return {\n isCallPanelVisible: Boolean(global.isCallPanelVisible),\n user: selectPhoneCallUser(global),\n isOutgoing: phoneCall?.adminId === currentUserId,\n phoneCall,\n };\n },\n)(PhoneCall));\n","// extracted by mini-css-extract-plugin\nexport default {\"stars\":\"src-components-calls-phone-RatePhoneCallModal-module__stars\",\"star\":\"src-components-calls-phone-RatePhoneCallModal-module__star\",\"isFilled\":\"src-components-calls-phone-RatePhoneCallModal-module__isFilled\",\"comment\":\"src-components-calls-phone-RatePhoneCallModal-module__comment\",\"visible\":\"src-components-calls-phone-RatePhoneCallModal-module__visible\"};","import React, {\n FC, memo, useRef, useState,\n} from '../../../lib/teact/teact';\nimport { getActions } from '../../../global';\n\nimport useLang from '../../../hooks/useLang';\nimport buildClassName from '../../../util/buildClassName';\n\nimport Modal from '../../ui/Modal';\nimport Button from '../../ui/Button';\nimport InputText from '../../ui/InputText';\n\nimport styles from './RatePhoneCallModal.module.scss';\n\nexport type OwnProps = {\n isOpen?: boolean;\n};\n\nconst RatePhoneCallModal: FC<OwnProps> = ({\n isOpen,\n}) => {\n const { closeCallRatingModal, setCallRating } = getActions();\n\n // eslint-disable-next-line no-null/no-null\n const inputRef = useRef<HTMLInputElement>(null);\n\n const lang = useLang();\n const [rating, setRating] = useState<number | undefined>();\n\n function handleSend() {\n if (!rating) {\n closeCallRatingModal();\n return;\n }\n setCallRating({\n rating: rating + 1,\n comment: inputRef.current?.value || '',\n });\n }\n\n function handleClickStar(index: number) {\n return () => setRating(rating === index ? undefined : index);\n }\n\n return (\n <Modal title={lang('lng_call_rate_label')} className=\"narrow\" onClose={closeCallRatingModal} isOpen={isOpen}>\n <div className={styles.stars}>\n {new Array(5).fill(undefined).map((_, i) => {\n const isFilled = rating !== undefined && rating >= i;\n return (\n <i\n className={buildClassName(\n isFilled ? 'icon-favorite-filled' : 'icon-favorite',\n isFilled && styles.isFilled,\n styles.star,\n )}\n onClick={handleClickStar(i)}\n />\n );\n })}\n </div>\n <InputText\n ref={inputRef}\n placeholder={lang('lng_call_rate_comment')}\n className={buildClassName(styles.comment, rating !== 4 && rating !== undefined && styles.visible)}\n />\n\n {/* eslint-disable-next-line react/jsx-no-bind */}\n <Button className=\"confirm-dialog-button\" isText onClick={handleSend}>\n {lang('Send')}\n </Button>\n <Button className=\"confirm-dialog-button\" isText onClick={closeCallRatingModal}>{lang('Cancel')}</Button>\n </Modal>\n );\n};\n\nexport default memo(RatePhoneCallModal);\n","/*! For license information please see index.js.LICENSE.txt */\n(()=>{\"use strict\";var e={\"./src/blacksilence.ts\":(e,t,a)=>{a.r(t),a.d(t,{silence:()=>n,black:()=>s});const n=e=>{const t=e.createOscillator(),a=t.connect(e.createMediaStreamDestination());return t.start(),new MediaStream([Object.assign(a.stream.getAudioTracks()[0],{enabled:!1})])},s=({width:e=640,height:t=480}={})=>{const a=Object.assign(document.createElement(\"canvas\"),{width:e,height:t}),n=a.getContext(\"2d\");if(!n)throw Error(\"Cannot create canvas ctx\");n.fillRect(0,0,e,t);const s=a.captureStream();return new MediaStream([Object.assign(s.getVideoTracks()[0],{enabled:!1})])}},\"./src/buildSdp.ts\":(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var n=a(\"./src/utils.ts\");const s=(e,t=!1,a=!1,s=!1)=>{const i=[],r=e=>{i.push(e)},{sessionId:o,ssrcs:c,audioExtensions:d,videoExtensions:p,audioPayloadTypes:u,videoPayloadTypes:l,transport:{ufrag:m,pwd:f,fingerprints:g,candidates:v}}=e;r(\"v=0\"),r(`o=- ${o} 2 IN IP4 0.0.0.0`),r(\"s=-\"),r(\"t=0 0\"),r(\"a=ice-options:trickle\"),r(\"a=msid-semantic:WMS *\"),r(`a=group:BUNDLE ${c.map((e=>e.endpoint)).join(\" \")}${a?\"\":\" \"+(s?\"3\":\"2\")}`),s||r(\"a=ice-lite\");const S=e=>{if(e.sdpString)r(`a=${e.sdpString}`);else{let t=\"\";t+=\"a=candidate:\",t+=`${e.foundation} ${e.component} ${e.protocol} ${e.priority} ${e.ip} ${e.port} typ ${e.type}`,\"rel-addr\"in e&&(t+=` raddr ${e[\"rel-addr\"]} rport ${e[\"rel-port\"]}`),t+=` generation ${e.generation}`,r(t)}},y=()=>{r(`a=ice-ufrag:${m}`),r(`a=ice-pwd:${f}`),g.forEach((e=>{r(`a=fingerprint:${e.hash} ${e.fingerprint}`),r(`a=setup:${s?e.setup:\"passive\"}`)})),v.forEach(S)},h=e=>{const{channels:t,id:a,name:n,clockrate:s,parameters:i}=e;var o=t?`/${t}`:\"\";r(`a=rtpmap:${a} ${n}/${s}${o}`),i&&(o=Object.keys(i).map((e=>`${e}=${i[e]};`)).join(\" \"),r(`a=fmtp:${a} ${o}`)),e[\"rtcp-fbs\"]?.forEach((e=>{r(`a=rtcp-fb:${a} ${e.type}${e.subtype?` ${e.subtype}`:\"\"}`)}))};return e=e=>{const a=e.isVideo?l:u;var i=e.isVideo?\"video\":\"audio\";if(r(`m=${i} ${e.isMain?1:0} RTP/SAVPF ${a.map((e=>e.id)).join(\" \")}`),r(\"c=IN IP4 0.0.0.0\"),r(\"b=AS:1300\"),r(`a=mid:${e.endpoint}`),r(\"a=rtcp-mux\"),a.forEach(h),r(\"a=rtcp:1 IN IP4 0.0.0.0\"),e.isVideo&&r(\"a=rtcp-rsize\"),(e.isVideo?p:d).forEach((({id:e,uri:t})=>{r(`a=extmap:${e} ${t}`)})),e.isRemoved)r(\"a=inactive\");else{if(y(),s)r(\"a=sendrecv\"),r(\"a=bundle-only\");else{if(t)return void r(\"a=recvonly\");e.isMain?r(\"a=sendrecv\"):(r(\"a=sendonly\"),r(\"a=bundle-only\"))}e.sourceGroups.forEach((t=>{r(`a=ssrc-group:${t.semantics} ${t.sources.map(n.fromTelegramSource).join(\" \")}`),t.sources.forEach((t=>{t=(0,n.fromTelegramSource)(t),r(`a=ssrc:${t} cname:${e.endpoint}`),r(`a=ssrc:${t} msid:${e.endpoint} ${e.endpoint}`),r(`a=ssrc:${t} mslabel:${e.endpoint}`),r(`a=ssrc:${t} label:${e.endpoint}`)}))}))}},s?c.filter(e):c.filter((e=>\"0\"===e.endpoint||\"1\"===e.endpoint)).map(e),a||(r(\"m=application 1 UDP/DTLS/SCTP webrtc-datachannel\"),r(\"c=IN IP4 0.0.0.0\"),y(),r(\"a=ice-options:trickle\"),r(\"a=mid:\"+(s?\"3\":a?\"1\":\"2\")),r(\"a=sctp-port:5000\"),r(\"a=max-message-size:262144\")),s||c.filter((e=>\"0\"!==e.endpoint&&\"1\"!==e.endpoint)).map(e),`${i.join(\"\\n\")}\\n`}},\"./src/p2p.ts\":(e,t,a)=>{a.r(t),a.d(t,{getStreams:()=>function(){return o?.streams},switchCameraInputP2p:()=>async function(){if(o&&o.facingMode){const e=o.streams.ownVideo;if(e){const t=e.getTracks()[0];if(t){const e=o.connection.getSenders().find((e=>t.id===e.track?.id));if(e){o.facingMode=\"environment\"===o.facingMode?\"user\":\"environment\";try{const t=await d(\"video\",o.facingMode);await e.replaceTrack(t.getTracks()[0]),o.streams.ownVideo=t,c()}catch(e){}}}}}},toggleStreamP2p:()=>p,joinPhoneCall:()=>async function(e,t,a,i,r){const d=new RTCPeerConnection({iceServers:e.map((e=>({urls:[e.isTurn&&`turn:${e.ip}:${e.port}`,e.isStun&&`stun:${e.ip}:${e.port}`].filter(Boolean),username:e.username,credentialType:\"password\",credential:e.password}))),iceCandidatePoolSize:2}),u=(0,n.silence)(new AudioContext),l=(0,n.black)({width:640,height:480}),g=(0,n.black)({width:640,height:480});d.addTrack(u.getTracks()[0],u),d.addTrack(l.getTracks()[0],l),d.addTrack(g.getTracks()[0],g),d.onicecandidate=e=>{e.candidate&&t({\"@type\":\"Candidates\",candidates:[{sdpString:e.candidate.candidate}]})},d.onconnectionstatechange=()=>{r({\"@type\":\"updatePhoneCallConnectionState\",connectionState:d.connectionState})},d.ontrack=e=>{var t;o&&(t=e.streams[0],\"audio\"===e.track.kind?(o.audio.srcObject=t,o.audio.play().catch(),o.streams.audio=t):\"1\"===e.transceiver.mid?o.streams.video=t:o.streams.presentation=t,c())};const v=d.createDataChannel(\"data\",{id:0,negotiated:!0});v.onmessage=e=>{f(JSON.parse(e.data))},e=new Audio,o={audio:e,connection:d,emitSignalingData:t,isOutgoing:a,candidates:[],onUpdate:r,streams:{ownVideo:l,ownAudio:u,ownPresentation:g},mediaState:{isBatteryLow:!1,screencastState:\"inactive\",videoState:\"inactive\",videoRotation:0,isMuted:!0},blackVideo:l,blackPresentation:g,silence:u,dataChannel:v};try{i&&p(\"video\",!0),p(\"audio\",!0)}catch(e){}a&&(a=await d.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0}),await d.setLocalDescription(a),m((0,s.default)(a,!0)))},stopPhoneCall:()=>function(){o&&(o.streams.ownVideo?.getTracks().forEach((e=>e.stop())),o.streams.ownPresentation?.getTracks().forEach((e=>e.stop())),o.streams.ownAudio?.getTracks().forEach((e=>e.stop())),o.dataChannel.close(),o.connection.close(),o=void 0)},processSignalingMessage:()=>f});var n=a(\"./src/blacksilence.ts\"),s=a(\"./src/parseSdp.ts\"),i=a(\"./src/utils.ts\"),r=a(\"./src/buildSdp.ts\");let o;function c(){o?.onUpdate({...o.mediaState,\"@type\":\"updatePhoneCallMediaState\"})}function d(e,t=\"user\"){return\"presentation\"===e?navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0}):navigator.mediaDevices.getUserMedia({audio:\"audio\"===e&&{...i.IS_ECHO_CANCELLATION_SUPPORTED&&{echoCancellation:!0},...i.IS_NOISE_SUPPRESSION_SUPPORTED&&{noiseSuppression:!0}},video:\"video\"===e&&{facingMode:t}})}async function p(e,t){if(o){const a=\"audio\"===e?o.streams.ownAudio:\"video\"===e?o.streams.ownVideo:o.streams.ownPresentation;if(a){const n=a.getTracks()[0];if(n){const a=o.connection.getSenders().find((e=>n.id===e.track?.id));if(a){t=void 0===t?!n.enabled:t;try{if(t&&!n.enabled){const t=await d(e);t.getTracks()[0].onended=()=>{p(e,!1)},await a.replaceTrack(t.getTracks()[0]),\"audio\"===e?o.streams.ownAudio=t:\"video\"===e?(o.streams.ownVideo=t,o.facingMode=\"user\"):o.streams.ownPresentation=t,\"video\"!==e&&\"presentation\"!==e||p(\"video\"===e?\"presentation\":\"video\",!1)}else if(!t&&n.enabled){n.stop();const t=\"audio\"===e?o.silence:\"video\"===e?o.blackVideo:o.blackPresentation;if(!t)return;await a.replaceTrack(t.getTracks()[0]),\"audio\"===e?o.streams.ownAudio=t:\"video\"===e?o.streams.ownVideo=t:o.streams.ownPresentation=t}c(),u()}catch(e){}}}}}}function u(){if(o){const{emitSignalingData:e,streams:t}=o;e({\"@type\":\"MediaState\",videoRotation:0,isMuted:!t.ownAudio?.getTracks()[0].enabled,isBatteryLow:!0,videoState:t.ownVideo?.getTracks()[0].enabled?\"active\":\"inactive\",screencastState:t.ownPresentation?.getTracks()[0].enabled?\"active\":\"inactive\"})}}function l(e){if(!o||o.isOutgoing)return e;const t=e.payloadTypes;var a=t.findIndex((e=>\"VP8\"===e.name));const n=t[a];var s=t.findIndex((e=>Number(e.parameters?.apt)===n.id));return e.payloadTypes=[t[a],t[s]],e}function m(e){if(o){const t=o.emitSignalingData;e.ssrc&&e[\"ssrc-groups\"]&&e[\"ssrc-groups\"][0]&&e[\"ssrc-groups\"][1]&&t({\"@type\":\"InitialSetup\",fingerprints:e.fingerprints,ufrag:e.ufrag,pwd:e.pwd,audio:{ssrc:(0,i.fromTelegramSource)(e.ssrc).toString(),ssrcGroups:[],payloadTypes:e.audioPayloadTypes,rtpExtensions:e.audioExtmap},video:l({ssrc:(0,i.fromTelegramSource)(e[\"ssrc-groups\"][0].sources[0]).toString(),ssrcGroups:[{semantics:e[\"ssrc-groups\"][0].semantics,ssrcs:e[\"ssrc-groups\"][0].sources.map(i.fromTelegramSource)}],payloadTypes:e.videoPayloadTypes,rtpExtensions:e.videoExtmap}),screencast:l({ssrc:(0,i.fromTelegramSource)(e[\"ssrc-groups\"][1].sources[0]).toString(),ssrcGroups:[{semantics:e[\"ssrc-groups\"][1].semantics,ssrcs:e[\"ssrc-groups\"][1].sources.map(i.fromTelegramSource)}],payloadTypes:e.screencastPayloadTypes,rtpExtensions:e.screencastExtmap})})}}async function f(e){if(o&&o.connection)switch(e[\"@type\"]){case\"MediaState\":o.mediaState=e,c(),u();break;case\"Candidates\":var{candidates:t,gotInitialSetup:a}=o;if(!t)return;e.candidates.forEach((e=>{o.candidates.push(e.sdpString)})),a&&await Promise.all(o.candidates.map((e=>o.connection.addIceCandidate({candidate:e,sdpMLineIndex:0}))));break;case\"InitialSetup\":{const{connection:t,isOutgoing:n}=o;if(!t)return;if(a={transport:{candidates:[],ufrag:e.ufrag,pwd:e.pwd,fingerprints:e.fingerprints,\"rtcp-mux\":!1,xmlns:\"\"},sessionId:Date.now(),ssrcs:[e.audio&&{isVideo:!1,isMain:!1,userId:\"123\",endpoint:\"0\",sourceGroups:[{semantics:\"FID\",sources:[e.audio.ssrc]}]},e.video&&{isVideo:!0,isPresentation:!1,isMain:!1,userId:\"123\",endpoint:\"1\",sourceGroups:e.video.ssrcGroups.map((e=>({semantics:e.semantics,sources:e.ssrcs})))},e.screencast&&{isVideo:!0,isPresentation:!0,isMain:!1,userId:\"123\",endpoint:\"2\",sourceGroups:e.screencast.ssrcGroups.map((e=>({semantics:e.semantics,sources:e.ssrcs})))}],audioPayloadTypes:e.audio.payloadTypes?.map(i.p2pPayloadTypeToConference)||[],audioExtensions:e.audio.rtpExtensions,videoPayloadTypes:l(e.video).payloadTypes?.map(i.p2pPayloadTypeToConference)||[],videoExtensions:e.video.rtpExtensions},await t.setRemoteDescription({sdp:(0,r.default)(a,n,void 0,!0),type:n?\"answer\":\"offer\"}),o.conference=a,!n){if(a=await t.createAnswer(),!a)return;await t.setLocalDescription(a),m((0,s.default)(a,!0))}o.gotInitialSetup=!0,await Promise.all(o.candidates.map((e=>t.addIceCandidate({candidate:e,sdpMLineIndex:0}))));break}}}},\"./src/p2pMessage.ts\":(e,t,a)=>{a.r(t)},\"./src/parseSdp.ts\":(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var n=a(\"./src/utils.ts\");const s=(e,t=!1)=>{if(!e||!e.sdp)throw Error(\"Failed parsing SDP: session description is null\");const a=e.sdp.split(\"\\r\\nm=\").map(((e,t)=>0===t?e:`m=${e}`)).reduce(((e,t)=>{var a=t.match(/^m=(.+?)\\s/)?.[1]||\"header\";return e[e.hasOwnProperty(a)&&\"video\"===a?\"screencast\":a]=t.split(\"\\r\\n\").filter(Boolean),e}),{});var s=(e,t)=>t?a[t]?.find((t=>t.startsWith(e)))?.substr(e.length):Object.values(a).map((t=>t.find((t=>t.startsWith(e)))?.substr(e.length))).filter(Boolean)[0],i=e=>a[e].filter((e=>e.startsWith(\"a=extmap\"))).map((e=>{var[,t,e]=e.match(/extmap:(\\d+)(?:\\/.+)?\\s(.+)/);return{id:Number(t),uri:e}})),r=e=>{const t=a[e].filter((e=>e.startsWith(\"a=rtpmap\"))).map((e=>{const[,t,a]=e.match(/:(\\d+)\\s(.+)/)||[];var[n,s,e]=a.split(\"/\");return{id:Number(t),name:n,clockrate:Number(s),...e&&{channels:Number(e)}}})),n=a[e].filter((e=>e.startsWith(\"a=rtcp-fb\"))).map((e=>{const[,t,a]=e.match(/:(\\d+)\\s(.+)/)||[];var[n,e]=a.split(\" \");return{id:Number(t),type:n,subtype:e||\"\"}})),s=a[e].filter((e=>e.startsWith(\"a=fmtp\"))).map((e=>{const[,t,a]=e.match(/:(\\d+)\\s(.+)/)||[];if(e=a.split(\";\").reduce(((e,t)=>{var[a,t]=t.split(\"=\");return e[a]=t,e}),{}),!Object.values(e).some((e=>!e)))return{id:Number(t),data:e}})).filter(Boolean);return t.map((e=>{var t=s.filter((t=>t.id===e.id)).map((e=>e.data)).reduce(((e,t)=>Object.assign(e,t)),{}),a=n.filter((t=>t.id===e.id)).map((e=>({type:e.type,subtype:e.subtype})));return{...e,...0<Object.keys(t).length&&{parameters:t},...0<a.length&&{feedbackTypes:a}}}))};const o=s(\"a=ssrc:\",\"audio\");var c=o&&Number(o.split(\" \")[0]);const d=s(\"a=ssrc-group:\",\"video\")?.split(\" \")||void 0,p=s(\"a=ssrc-group:\",\"screencast\")?.split(\" \")||void 0;if(!d)throw Error(\"Failed parsing SDP: no video ssrc\");var[u,l]=s(\"a=fingerprint:\")?.split(\" \")||[],m=s(\"a=setup:\");if(!u||!l)throw Error(\"Failed parsing SDP: no fingerprint\");if(console.log(a),e=s(\"a=ice-ufrag:\"),s=s(\"a=ice-pwd:\"),!e||!s)throw Error(\"Failed parsing SDP: no ICE ufrag or pwd\");return{fingerprints:[{fingerprint:l,hash:u,setup:t?m:\"active\"}],pwd:s,ufrag:e,...c&&{ssrc:(0,n.toTelegramSource)(c)},...d&&{\"ssrc-groups\":[{semantics:d[0],sources:d.slice(1,d.length).map(Number).map(n.toTelegramSource)},t&&p&&{semantics:p[0],sources:p.slice(1,p.length).map(Number).map(n.toTelegramSource)}].filter(Boolean)},...t&&{audioExtmap:i(\"audio\"),videoExtmap:i(\"video\"),screencastExtmap:i(\"screencast\"),audioPayloadTypes:r(\"audio\"),videoPayloadTypes:r(\"video\"),screencastPayloadTypes:r(\"screencast\")}}}},\"./src/secretsauce.ts\":(e,t,a)=>{a.r(t),a.d(t,{getDevices:()=>async function(e,t=!0){return(await navigator.mediaDevices.enumerateDevices()).filter((a=>a.kind===`${e}${t?\"input\":\"output\"}`))},toggleSpeaker:()=>function(){o&&(o.isSpeakerDisabled=!o.isSpeakerDisabled,o?.onUpdate?.({\"@type\":\"updateGroupCallConnectionState\",connectionState:\"connected\",isSpeakerDisabled:o.isSpeakerDisabled}),o.participantFunctions&&Object.values(o.participantFunctions).forEach((e=>{e.toggleMute?.(!!o?.isSpeakerDisabled)})))},toggleNoiseSuppression:()=>function(){if(o&&o.myId&&o.streams){const a=o.streams[o.myId].audio;if(a){const n=a.getTracks()[0];var e,t;n&&(({echoCancellation:e,noiseSuppression:t}=n.getConstraints()),n.applyConstraints({echoCancellation:!e,noiseSuppression:!t}))}}},getUserStreams:()=>d,setVolume:()=>function(e,t){const a=o?.participantFunctions?.[e];a&&a.setVolume?.(t)},isStreamEnabled:()=>p,switchCameraInput:()=>async function(){if(o?.myId&&o.connection&&o.streams&&o.facingMode){const e=d(o.myId)?.video;if(e){const t=e.getTracks()[0];if(t){const e=o.connection.getSenders().find((e=>t.id===e.track?.id));if(e){o.facingMode=\"environment\"===o.facingMode?\"user\":\"environment\";try{const t=await l(\"video\",o.facingMode);await e.replaceTrack(t.getTracks()[0]),o.streams[o.myId].video=t}catch(e){}}}}}},toggleStream:()=>m,leaveGroupCall:()=>g,handleUpdateGroupCallParticipants:()=>async function(e){if(o){const{participants:n,conference:i,connection:r,myId:c}=o;if(n&&i&&r&&i.ssrcs&&i.transport&&c)if(e.find((e=>e.isSelf&&e.source!==o?.conference?.ssrcs?.find((e=>e.isMain&&!e.isVideo))?.sourceGroups[0].sources[0])))g();else{const n=[];if(e.forEach((e=>{if(e.isSelf)e.isMuted&&!e.canSelfUnmute&&(m(\"audio\",!1),m(\"video\",!1),m(\"presentation\",!1));else{var t=e.isLeft;const a=e.isMuted||e.isMutedByMe,s=!e.isVideoJoined||!e.video||t,r=!e.presentation||t;let o=!1,c=!1,d=!1;i.ssrcs.filter((t=>t.userId===e.id)).forEach((t=>{t.isVideo||(t.sourceGroups[0].sources[0]===e.source&&(c=!0),t.isRemoved=a),t.isVideo&&(t.isPresentation||(e.video&&t.endpoint===e.video.endpoint&&(o=!0),t.isRemoved=s),t.isPresentation&&(e.presentation&&t.endpoint===e.presentation.endpoint&&(d=!0),t.isRemoved=r))})),a||c||i.ssrcs.push({userId:e.id,isMain:!1,endpoint:`audio${e.source}`,isVideo:!1,sourceGroups:[{semantics:\"FID\",sources:[e.source]}]}),s||o||!e.video||(n.push(e.video.endpoint),i.ssrcs.push({userId:e.id,isMain:!1,endpoint:e.video.endpoint,isVideo:!0,sourceGroups:e.video.sourceGroups})),r||d||!e.presentation||i.ssrcs.push({isPresentation:!0,userId:e.id,isMain:!1,endpoint:e.presentation.endpoint,isVideo:!0,sourceGroups:e.presentation.sourceGroups})}})),o.updatingParticipantsQueue)o.updatingParticipantsQueue.push(i);else{o.updatingParticipantsQueue=[],e=(0,s.default)(i),await r.setRemoteDescription({type:\"offer\",sdp:e});try{var t=await r.createAnswer();if(await r.setLocalDescription(t),u(c),0<o.updatingParticipantsQueue.length)for(const e of o.updatingParticipantsQueue){await r.setRemoteDescription({type:\"offer\",sdp:(0,s.default)(e)});var a=await r.createAnswer();await r.setLocalDescription(a),u(c)}o.updatingParticipantsQueue=void 0}catch(e){console.error(e)}}}}},handleUpdateGroupCallConnection:()=>async function(e,t){if(o){var a=t?o.screenshareConference:o.conference;const i=t?o.screenshareConnection:o.connection;if(a&&i&&a.ssrcs){var n=Date.now();e={...a,transport:e.transport,sessionId:n,audioExtensions:e.audio?.[\"rtp-hdrexts\"],audioPayloadTypes:e.audio?.[\"payload-types\"],videoExtensions:e.video?.[\"rtp-hdrexts\"],videoPayloadTypes:e.video?.[\"payload-types\"]};o={...o,...t?{screenshareConference:e}:{conference:e}};try{await i.setRemoteDescription({type:\"answer\",sdp:(0,s.default)(e,!0,t)})}catch(e){console.error(e)}}}},startSharingScreen:()=>async function(){if(o)try{const e=await l(\"presentation\");return e?(e.getTracks()[0].onended=()=>{o&&o.myId&&(o.streams?.[o.myId].presentation,u(o.myId),c())},new Promise((t=>{var{connection:a,dataChannel:t}=y([e],t,!0);o={...o,screenshareConnection:a,screenshareDataChannel:t}}))):void 0}catch(e){return}},joinGroupCall:()=>function(e,t,a,n){if(o)throw Error(\"Already in call\");f(\"connecting\");var s=new MediaStream;return a.srcObject=s,a.play().catch((e=>console.warn(e))),o={onUpdate:n,participants:[],myId:e,speaking:{},silence:(0,i.silence)(t),black:(0,i.black)({width:640,height:480}),analyserInterval:setInterval(v,1e3),audioElement:a,audioContext:t,mediaStream:s},new Promise((e=>{o={...o,...y([o.silence,o.black],e)}}))}});var n=a(\"./src/parseSdp.ts\"),s=a(\"./src/buildSdp.ts\"),i=a(\"./src/blacksilence.ts\"),r=a(\"./src/utils.ts\");let o;function c(e){o&&(o.screenshareDataChannel?.close(),o.screenshareConnection?.close(),e||o.onUpdate?.({\"@type\":\"updateGroupCallLeavePresentation\"}))}function d(e){return o?.streams?.[e]}function p(e,t){const a=(t=t||o?.myId)&&d(t)?.[e];return!!a&&a.getTracks()[0]?.enabled}function u(e){o?.onUpdate?.({\"@type\":\"updateGroupCallStreams\",userId:e,hasAudioStream:p(\"audio\",e),hasVideoStream:p(\"video\",e),hasPresentationStream:p(\"presentation\",e),amplitude:o.speaking?.[e]})}function l(e,t=\"user\"){return\"presentation\"===e?navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0}):navigator.mediaDevices.getUserMedia({audio:\"audio\"===e&&{...r.IS_ECHO_CANCELLATION_SUPPORTED&&{echoCancellation:!0},...r.IS_NOISE_SUPPRESSION_SUPPORTED&&{noiseSuppression:!0}},video:\"video\"===e&&{facingMode:t}})}async function m(e,t){if(o&&o.myId&&o.connection&&o.streams){const a=d(o.myId)?.[e];if(a){const n=a.getTracks()[0];if(n){const a=[...o.connection.getSenders(),...o.screenshareConnection?.getSenders()||[]].find((e=>n.id===e.track?.id));if(a){t=void 0===t?!n.enabled:t;try{if(t&&!n.enabled){const t=await l(e);if(await a.replaceTrack(t.getTracks()[0]),o.streams[o.myId][e]=t,\"video\"===e)o.facingMode=\"user\";else if(\"audio\"===e){const e=o.audioContext;if(!e)return;const a=e.createMediaStreamSource(t),n=e.createAnalyser();n.minDecibels=-100,n.maxDecibels=-30,n.smoothingTimeConstant=.05,n.fftSize=1024,a.connect(n),o={...o,participantFunctions:{...o.participantFunctions,[o.myId]:{...o.participantFunctions?.[o.myId],getCurrentAmplitude:()=>{var e=new Uint8Array(n.frequencyBinCount);return n.getByteFrequencyData(e),(0,r.getAmplitude)(e,1.5)}}}}}}else if(!t&&n.enabled){n.stop();const t=\"audio\"===e?o.silence:o.black;if(!t)return;await a.replaceTrack(t.getTracks()[0]),o.streams[o.myId][e]=t,\"video\"===e&&(o.facingMode=void 0)}u(o.myId),\"presentation\"!==e||t||c(!0)}catch(e){}}}}}}function f(e){o?.onUpdate?.({\"@type\":\"updateGroupCallConnectionState\",connectionState:e})}function g(){o&&(o.myId&&o.streams?.[o.myId]&&Object.values(o.streams[o.myId]||{}).forEach((e=>{e?.getTracks().forEach((e=>{e.stop()}))})),c(!0),o.dataChannel?.close(),o.connection?.close(),f(\"disconnected\"),o.analyserInterval&&clearInterval(o.analyserInterval),o=void 0)}function v(){o&&o.participantFunctions&&Object.keys(o.participantFunctions).forEach((e=>{const t=o.participantFunctions[Number(e)].getCurrentAmplitude;var a,n;t&&(a=t(),n=o.speaking[e]||0,((o.speaking[e]=a)>r.THRESHOLD&&n<=r.THRESHOLD||a<=r.THRESHOLD&&n>r.THRESHOLD)&&u(e))}))}function S(e){if(o&&o.audioElement&&o.audioContext&&o.mediaStream){var t=o.conference?.ssrcs?.find((t=>t.endpoint===e.track.id));if(t&&t.userId){const{userId:n,isPresentation:s}=t;var a=o.participants?.find((e=>e.id===n));const i=\"video\"===e.track.kind?s?\"presentation\":\"video\":\"audio\";if(e.track.onended=()=>{o?.streams?.[n][i],u(n)},t=e.streams[0],\"audio\"===e.track.kind){const e=o.mediaStream,s=new window.AudioContext,i=s.createMediaStreamSource(t),c=s.createGain();c.gain.value=(a?.volume||1e4)/1e4;const d=s.createGain();c.gain.value=1;const p=s.createAnalyser();p.minDecibels=-100,p.maxDecibels=-30,p.smoothingTimeConstant=.05,p.fftSize=1024,i.connect(p).connect(d).connect(c).connect(s.destination),e.addTrack(i.mediaStream.getAudioTracks()[0]);const u=new Audio;u.srcObject=t,u.muted=!0,u.remove(),o={...o,participantFunctions:{...o.participantFunctions,[n]:{...o.participantFunctions?.[n],setVolume:e=>{c.gain.value=1<e?2*e:e},toggleMute:e=>{d.gain.value=e?0:1},getCurrentAmplitude:()=>{var e=new Uint8Array(p.frequencyBinCount);return p.getByteFrequencyData(e),(0,r.getAmplitude)(e,1.5)}}}}}o={...o,streams:{...o.streams,[n]:{...o.streams?.[n],[i]:t}}},u(n)}}}function y(e,t,a=!1){const s=new RTCPeerConnection;var i=a?void 0:function(e){const t=e.createDataChannel(\"data\",{id:0});return t.onopen=()=>{},t.onmessage=e=>{JSON.parse(e.data).colibriClass},t.onerror=e=>{console.log(\"%conerror\",\"background: green; font-size: 5em\"),console.error(e)},t}(s);return e.forEach((e=>e.getTracks().forEach((t=>{s.addTrack(t,e)})))),a||(s.oniceconnectionstatechange=()=>{var e=s.iceConnectionState;\"connected\"===e||\"completed\"===e?f(\"connected\"):\"checking\"===e||\"new\"===e?f(\"connecting\"):\"disconnected\"===s.iceConnectionState&&f(\"reconnecting\")}),s.ontrack=S,s.onnegotiationneeded=async()=>{if(o){var i=o.myId;if(i){var r=await s.createOffer({offerToReceiveVideo:!0,offerToReceiveAudio:!a});if(await s.setLocalDescription(r),r.sdp){var c=(0,n.default)(r),d=a?void 0:{userId:\"\",sourceGroups:[{semantics:\"FID\",sources:[c.ssrc||0]}],isRemoved:a,isMain:!0,isVideo:!1,isPresentation:a,endpoint:a?\"1\":\"0\"},p=c[\"ssrc-groups\"]&&{isPresentation:a,userId:\"\",sourceGroups:c[\"ssrc-groups\"],isMain:!0,isVideo:!0,endpoint:a?\"0\":\"1\"};r=a?o.screenshareConference:o.conference;const s=[];a?(p&&s.push(p),d&&s.push(d)):(d&&s.push(d),p&&s.push(p)),d=e.find((e=>\"audio\"===e.getTracks()[0].kind)),p=e.find((e=>\"video\"===e.getTracks()[0].kind)),o={...o,...a?{screenshareConference:{...r,ssrcs:s}}:{conference:{...r,ssrcs:s}},streams:{...o.streams,[i]:{...o.streams?.[i],...d&&{audio:d},...!a&&p?{video:p}:{presentation:p}}}},u(i),t(c)}}}},{connection:s,dataChannel:i}}},\"./src/types.ts\":(e,t,a)=>{a.r(t)},\"./src/utils.ts\":(e,t,a)=>{a.r(t),a.d(t,{toTelegramSource:()=>function(e){return e<<0},fromTelegramSource:()=>function(e){return e>>>0},getAmplitude:()=>function(e,t=3){if(!e)return 0;var a=e.length;let n=0;for(let t=0;t<a;t++)n+=e[t]*e[t];var s=Math.sqrt(n/a)/255;return Math.min(1,s*t)},p2pPayloadTypeToConference:()=>function(e){return{id:e.id,name:e.name,\"rtcp-fbs\":e.feedbackTypes,clockrate:e.clockrate,parameters:e.parameters,channels:e.channels}},THRESHOLD:()=>n,IS_SCREENSHARE_SUPPORTED:()=>s,IS_ECHO_CANCELLATION_SUPPORTED:()=>i,IS_NOISE_SUPPRESSION_SUPPORTED:()=>r});const n=.1,s=\"getDisplayMedia\"in(navigator?.mediaDevices||{}),i=navigator?.mediaDevices?.getSupportedConstraints().echoCancellation,r=navigator?.mediaDevices?.getSupportedConstraints().noiseSuppression}},t={};function a(n){var s=t[n];return void 0!==s||(s=t[n]={exports:{}},e[n](s,s.exports,a)),s.exports}a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var n={};(()=>{a.r(n),a.d(n,{handleUpdateGroupCallConnection:()=>e.handleUpdateGroupCallConnection,startSharingScreen:()=>e.startSharingScreen,joinGroupCall:()=>e.joinGroupCall,getDevices:()=>e.getDevices,getUserStreams:()=>e.getUserStreams,setVolume:()=>e.setVolume,isStreamEnabled:()=>e.isStreamEnabled,toggleStream:()=>e.toggleStream,leaveGroupCall:()=>e.leaveGroupCall,handleUpdateGroupCallParticipants:()=>e.handleUpdateGroupCallParticipants,switchCameraInput:()=>e.switchCameraInput,toggleSpeaker:()=>e.toggleSpeaker,toggleNoiseSuppression:()=>e.toggleNoiseSuppression,joinPhoneCall:()=>t.joinPhoneCall,processSignalingMessage:()=>t.processSignalingMessage,getStreams:()=>t.getStreams,toggleStreamP2p:()=>t.toggleStreamP2p,stopPhoneCall:()=>t.stopPhoneCall,switchCameraInputP2p:()=>t.switchCameraInputP2p,IS_SCREENSHARE_SUPPORTED:()=>s.IS_SCREENSHARE_SUPPORTED,THRESHOLD:()=>s.THRESHOLD});var e=a(\"./src/secretsauce.ts\"),t=a(\"./src/p2p.ts\"),s=(a(\"./src/p2pMessage.ts\"),a(\"./src/utils.ts\"));a(\"./src/types.ts\")})();var s,i=exports;for(s in n)i[s]=n[s];n.__esModule&&Object.defineProperty(i,\"__esModule\",{value:!0})})();"],"names":["addActionHandler","async","global","actions","payload","isFromLibrary","shouldDiscard","shouldRemove","rejoin","groupCall","selectActiveGroupCall","setGlobal","updateActiveGroupCall","connectionState","participantsCount","callApi","call","getGlobal","removeGroupCall","id","removeGroupCallAudioElement","groupCalls","activeGroupCallId","undefined","isCallPanelVisible","leaveGroupCall","joinGroupCall","user","selectUser","currentUserId","toggleStream","videoStopped","isStreamEnabled","participant","value","raiseHand","participantId","volume","setVolume","Math","floor","GROUP_CALL_VOLUME_MULTIPLIER","Number","muted","params","startSharingScreen","presentationPaused","showNotification","message","audioElement","getGroupCallAudioElement","audioContext","getGroupCallAudioContext","apiUpdate","inviteHash","loadMoreGroupCallParticipants","chatId","chat","selectChat","loadFullChat","phoneCall","selectPhoneCallUser","dhConfig","gAHash","isVideo","gB","data","JSON","stringify","encodedData","ratingPhoneCall","rating","comment","state","stopPhoneCall","EMOJI_DATA","Uint16Array","EMOJI_OFFSETS","update","toggleGroupCallPresentation","userId","selectGroupCallParticipant","updateGroupCallParticipant","omit","updateGroupCall","isSpeakerDisabled","groupCallId","participants","handleUpdateGroupCallParticipants","stream","handleUpdateGroupCallConnection","presentation","Object","keys","length","values","ARE_CALLS_SUPPORTED","isOutgoing","adminId","isBusy","accessHash","connections","protocol","libraryVersions","some","version","hangUp","langProvider","firstName","needRating","gA","keyFingerprint","emojis","newCall","gAOrB","joinPhoneCall","sendSignalingData","Boolean","isConnected","then","processSignalingMessage","vibrateShort","navigator","vibrate","memo","size","name","playSegment","color","iconData","setIconData","useState","useEffect","getAnimationData","AnimatedSticker","play","noLoop","speed","animationData","withGlobal","meParticipant","raiseHandRating","hasAudioStream","canSelfUnmute","isMuted","hasRequestedToSpeak","noAudioStream","toggleGroupCallMute","requestToSpeak","playGroupCallSound","getActions","lang","useLang","muteMouseDownState","useRef","isRequestingToSpeak","setIsRequestingToSpeak","isConnecting","shouldRaiseHand","prevShouldRaiseHand","usePrevious","sound","useMemo","r","random","animatedIconName","toggleMute","buttonText","className","buildClassName","onMouseDown","setTimeout","current","onMouseUp","SPEAKER_ICON_DISABLED_SEGMENT","SPEAKER_ICON_ENABLED_SEGMENT","isAdmin","selectIsAdminInActiveGroupCall","closeDropdown","isDropdownOpen","anchor","setGroupCallParticipantVolume","toggleGroupCallPanel","openChat","isDeleteUserModalOpen","openDeleteUserModal","closeDeleteUserModal","useFlag","isMutedByMe","isSelf","isRaiseHand","localVolume","setLocalVolume","GROUP_CALL_DEFAULT_VOLUME","runThrottled","fn","deps","ms","noFirst","fnMemo","useCallback","cb","throttle","useThrottledCallback","handleRemove","e","stopPropagation","handleCancelRequestToSpeak","handleMute","handleOpenProfile","speakerIconPlaySegment","Menu","isOpen","positionX","autoClose","style","y","onClose","type","min","max","onChange","target","MenuItem","icon","onClick","destructive","DeleteMemberModal","noColor","isSpeaking","amplitude","THRESHOLD","prevIsRaiseHand","prevIsMuted","microphoneColor","isUser","openParticipantMenu","anchorRef","aboutText","aboutColor","toString","replace","about","lastName","title","ref","Avatar","createGroupCallInviteLink","participantsIds","viewportIds","getMore","useInfiniteScroll","InfiniteScroll","items","onLoadMore","map","key","isActive","isFullscreen","handleClick","streams","getUserStreams","ENABLE_THUMBNAIL_VIDEO","autoPlay","playsInline","srcObject","onDoubleClick","selectedVideo","setSelectedVideo","presentationParticipants","filter","l","hasPresentationStream","videoParticipants","hasVideoStream","totalVideoCount","columnCount","shouldSpanLastVideo","handleClickVideo","CAMERA_FLIP_PLAY_SEGMENT","selectGroupCall","isSpeakerEnabled","toggleGroupCallVideo","connectToActiveGroupCall","containerRef","isLeaving","setIsLeaving","openFullscreen","closeFullscreen","isSidebarOpen","openSidebar","closeSidebar","hasVideoParticipants","video","isLandscape","IS_SINGLE_COLUMN_LAYOUT","participantMenu","setParticipantMenu","isParticipantMenuOpen","closeParticipantMenu","isConfirmLeaveModalOpen","openConfirmLeaveModal","closeConfirmLeaveModal","isEndGroupCallModal","setIsEndGroupCallModal","shouldEndGroupCall","setShouldEndGroupCall","hasVideo","hasPresentation","handleOpenParticipantMenu","rect","getBoundingClientRect","container","x","left","top","offsetTop","handleCloseConfirmLeaveModal","MainButton","onTrigger","Button","round","ariaLabel","handleToggleFullscreen","document","exitFullscreen","requestFullscreen","handleToggleSidebar","handleStreamsDoubleClick","IS_REQUEST_FULLSCREEN_SUPPORTED","toggleFullscreen","handleClose","addEventListener","removeEventListener","endGroupCall","handleLeaveGroupCall","handleCloseAnimationEnd","Modal","dialogRef","onCloseAnimationEnd","IS_SCREENSHARE_SUPPORTED","DropdownMenu","trigger","Loading","IS_ANDROID","IS_IOS","switchCameraInput","toggleSpeaker","Checkbox","label","checked","onCheck","isText","phoneCallUser","body","classList","toggle","customIcon","iconClassName","isDisabled","disabled","acceptCall","connectToActivePhoneCall","isDiscarded","reason","isIncomingRequested","isOutgoingRequested","isHangingUp","startHangingUp","stopHangingUp","handleHangUp","forceUpdate","useForceUpdate","useInterval","callStatus","videoState","screencastState","getStreams","hasOwnAudio","ownAudio","getTracks","enabled","hasOwnPresentation","ownPresentation","hasOwnVideo","ownVideo","isHidingPresentation","startHidingPresentation","stopHidingPresentation","isHidingVideo","startHidingVideo","stopHidingVideo","handleTogglePresentation","toggleStreamP2p","handleToggleVideo","handleToggleAudio","isEmojiOpen","openEmoji","closeEmoji","isFlipping","startFlipping","stopFlipping","handleFlipCamera","switchCameraInputP2p","timeElapsed","startDate","Date","styles","renderText","formatMediaDuration","closeCallRatingModal","setCallRating","inputRef","setRating","Array","fill","_","i","isFilled","index","InputText","placeholder","t","a","d","silence","n","black","s","createOscillator","connect","createMediaStreamDestination","start","MediaStream","assign","getAudioTracks","width","height","createElement","getContext","Error","fillRect","captureStream","getVideoTracks","default","push","sessionId","o","ssrcs","c","audioExtensions","videoExtensions","p","audioPayloadTypes","u","videoPayloadTypes","transport","ufrag","m","pwd","f","fingerprints","g","candidates","v","endpoint","join","S","sdpString","foundation","component","priority","ip","port","generation","forEach","hash","fingerprint","setup","h","channels","clockrate","parameters","subtype","isMain","uri","isRemoved","sourceGroups","semantics","sources","fromTelegramSource","facingMode","connection","getSenders","find","track","replaceTrack","RTCPeerConnection","iceServers","urls","isTurn","isStun","username","credentialType","credential","password","iceCandidatePoolSize","AudioContext","addTrack","onicecandidate","candidate","onconnectionstatechange","ontrack","kind","audio","catch","transceiver","mid","createDataChannel","negotiated","onmessage","parse","Audio","emitSignalingData","onUpdate","mediaState","isBatteryLow","videoRotation","blackVideo","blackPresentation","dataChannel","createOffer","offerToReceiveAudio","offerToReceiveVideo","setLocalDescription","stop","close","mediaDevices","getDisplayMedia","getUserMedia","IS_ECHO_CANCELLATION_SUPPORTED","echoCancellation","IS_NOISE_SUPPRESSION_SUPPORTED","noiseSuppression","onended","payloadTypes","findIndex","apt","ssrc","ssrcGroups","rtpExtensions","audioExtmap","videoExtmap","screencast","screencastPayloadTypes","screencastExtmap","gotInitialSetup","Promise","all","addIceCandidate","sdpMLineIndex","xmlns","now","isPresentation","p2pPayloadTypeToConference","setRemoteDescription","sdp","conference","createAnswer","split","reduce","match","hasOwnProperty","startsWith","substr","feedbackTypes","console","log","toTelegramSource","slice","getDevices","enumerateDevices","participantFunctions","toggleNoiseSuppression","myId","getConstraints","applyConstraints","source","isLeft","isVideoJoined","updatingParticipantsQueue","error","screenshareConference","screenshareConnection","screenshareDataChannel","warn","speaking","analyserInterval","setInterval","mediaStream","createMediaStreamSource","createAnalyser","minDecibels","maxDecibels","smoothingTimeConstant","fftSize","getCurrentAmplitude","Uint8Array","frequencyBinCount","getByteFrequencyData","getAmplitude","clearInterval","window","createGain","gain","destination","remove","onopen","colibriClass","onerror","oniceconnectionstatechange","iceConnectionState","onnegotiationneeded","sqrt","getSupportedConstraints","exports","defineProperty","enumerable","get","prototype","Symbol","toStringTag","__esModule"],"sourceRoot":""} |